@particle-network/ui-native 0.5.1-beta.3 → 0.5.1-beta.5
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/components/UXButton/button.styles.js +5 -5
- package/dist/components/UXChip/styles.js +2 -2
- package/dist/components/UXModal/index.js +1 -1
- package/dist/components/UXRadio/radio.js +1 -7
- package/dist/components/UXSlider/slider.js +1 -1
- package/dist/components/UXSlider/slider.styles.js +1 -1
- package/dist/components/UXSwitch/switch.js +1 -1
- package/dist/components/UXTabs/styles.js +4 -4
- package/dist/components/UXToast/ToastView.js +1 -1
- package/dist/components/date-picker/date-button.js +2 -2
- package/dist/components/input/input.js +1 -1
- package/dist/components/input/number-input.js +1 -1
- package/dist/components/input/styles.js +1 -1
- package/dist/config/config.default.js +2 -2
- package/dist/config/config.street.js +3 -3
- package/package.json +5 -5
|
@@ -112,7 +112,7 @@ const useStyles = (props)=>{
|
|
|
112
112
|
}
|
|
113
113
|
if ('solid' === variant) {
|
|
114
114
|
if (customColorConfig) return customColorConfig.text;
|
|
115
|
-
if ('contrast' === color) return '
|
|
115
|
+
if ('contrast' === color) return 'bgDefault';
|
|
116
116
|
return 'white';
|
|
117
117
|
}
|
|
118
118
|
return color;
|
|
@@ -129,7 +129,7 @@ const useStyles = (props)=>{
|
|
|
129
129
|
const backgroundColor = useMemo(()=>{
|
|
130
130
|
const customColorConfig = buttonConfig?.color?.[color];
|
|
131
131
|
if (isSelected) {
|
|
132
|
-
if ('secondary' === color && 'solid' === variant) return getColor('
|
|
132
|
+
if ('secondary' === color && 'solid' === variant) return getColor('cursor');
|
|
133
133
|
}
|
|
134
134
|
if ('solid' === variant) {
|
|
135
135
|
if (customColorConfig) return getColor(customColorConfig.background);
|
|
@@ -138,7 +138,7 @@ const useStyles = (props)=>{
|
|
|
138
138
|
'default',
|
|
139
139
|
'secondary'
|
|
140
140
|
].includes(color)) return getColor(color);
|
|
141
|
-
return getColor('
|
|
141
|
+
return getColor('bg200');
|
|
142
142
|
}
|
|
143
143
|
if ('flat' === variant) {
|
|
144
144
|
if (customColorConfig) return `${getColor(customColorConfig.background)}20`;
|
|
@@ -146,7 +146,7 @@ const useStyles = (props)=>{
|
|
|
146
146
|
if ([
|
|
147
147
|
'default',
|
|
148
148
|
'secondary'
|
|
149
|
-
].includes(color)) return getColor('
|
|
149
|
+
].includes(color)) return getColor('bg300');
|
|
150
150
|
return `${getColor(color)}20`;
|
|
151
151
|
}
|
|
152
152
|
return 'transparent';
|
|
@@ -163,7 +163,7 @@ const useStyles = (props)=>{
|
|
|
163
163
|
'default',
|
|
164
164
|
'secondary'
|
|
165
165
|
].includes(color)) return getColor('secondary');
|
|
166
|
-
if ('contrast' === color) return getColor('
|
|
166
|
+
if ('contrast' === color) return getColor('bgDefault');
|
|
167
167
|
return getColor(color);
|
|
168
168
|
}
|
|
169
169
|
return 'transparent';
|
|
@@ -44,13 +44,13 @@ const useStyles = ({ size = 'md', color = 'default', variant = 'flat', isDisable
|
|
|
44
44
|
if ('solid' === variant) {
|
|
45
45
|
if ([
|
|
46
46
|
'default'
|
|
47
|
-
].includes(color)) return getColor('
|
|
47
|
+
].includes(color)) return getColor('bg200');
|
|
48
48
|
return getColor(color);
|
|
49
49
|
}
|
|
50
50
|
if ('flat' === variant) {
|
|
51
51
|
if ([
|
|
52
52
|
'default'
|
|
53
|
-
].includes(color)) return getColor('
|
|
53
|
+
].includes(color)) return getColor('bg300');
|
|
54
54
|
return `${getColor(color)}20`;
|
|
55
55
|
}
|
|
56
56
|
return 'transparent';
|
|
@@ -246,7 +246,7 @@ const UXModal = /*#__PURE__*/ forwardRef((props, scrollViewRef)=>{
|
|
|
246
246
|
onTouchMove: onTouchMoveSideLine,
|
|
247
247
|
onTouchStart: onTouchStartSideLine,
|
|
248
248
|
children: /*#__PURE__*/ jsx(Box, {
|
|
249
|
-
bg: "
|
|
249
|
+
bg: "cursor",
|
|
250
250
|
h: 4,
|
|
251
251
|
radius: "full",
|
|
252
252
|
w: 40
|
|
@@ -32,12 +32,6 @@ const UXRadio = ({ size, color, children, value, isDisabled, ...props })=>{
|
|
|
32
32
|
}, [
|
|
33
33
|
radioSize
|
|
34
34
|
]);
|
|
35
|
-
const gap = useMemo(()=>{
|
|
36
|
-
if ('sm' === radioSize) return 6;
|
|
37
|
-
return 8;
|
|
38
|
-
}, [
|
|
39
|
-
radioSize
|
|
40
|
-
]);
|
|
41
35
|
return /*#__PURE__*/ jsx(Pressable, {
|
|
42
36
|
disabled: radioIsDisabled,
|
|
43
37
|
style: {
|
|
@@ -45,7 +39,7 @@ const UXRadio = ({ size, color, children, value, isDisabled, ...props })=>{
|
|
|
45
39
|
},
|
|
46
40
|
onPress: handleSelectChange,
|
|
47
41
|
children: /*#__PURE__*/ jsxs(Flex, {
|
|
48
|
-
gap:
|
|
42
|
+
gap: 4,
|
|
49
43
|
items: "center",
|
|
50
44
|
...props,
|
|
51
45
|
children: [
|
|
@@ -228,7 +228,7 @@ const UXSlider = ({ color = 'primary', minValue = 0, maxValue = 100, defaultValu
|
|
|
228
228
|
styles.mark,
|
|
229
229
|
{
|
|
230
230
|
left: markPos - MARK_SIZE / 2,
|
|
231
|
-
backgroundColor: isActive ? colors[color] : colors.
|
|
231
|
+
backgroundColor: isActive ? colors[color] : colors.secondary
|
|
232
232
|
}
|
|
233
233
|
]
|
|
234
234
|
}, index);
|
|
@@ -77,7 +77,7 @@ const UXSwitch = (props)=>{
|
|
|
77
77
|
style: [
|
|
78
78
|
styles.track,
|
|
79
79
|
{
|
|
80
|
-
backgroundColor: isSelected ? getColor(color) : getColor('
|
|
80
|
+
backgroundColor: isSelected ? getColor(color) : getColor('cursor')
|
|
81
81
|
}
|
|
82
82
|
],
|
|
83
83
|
children: /*#__PURE__*/ jsx(Animated.View, {
|
|
@@ -80,8 +80,8 @@ const useStyles = (props)=>{
|
|
|
80
80
|
ms
|
|
81
81
|
]);
|
|
82
82
|
const wrapperBackgroundColor = useMemo(()=>{
|
|
83
|
-
if ('switch' === variant) return getColor('
|
|
84
|
-
if ('solid' === variant) return getColor('
|
|
83
|
+
if ('switch' === variant) return getColor('bg200');
|
|
84
|
+
if ('solid' === variant) return getColor('bg200');
|
|
85
85
|
return 'transparent';
|
|
86
86
|
}, [
|
|
87
87
|
variant,
|
|
@@ -125,8 +125,8 @@ const useStyles = (props)=>{
|
|
|
125
125
|
if (!isSelected) return 'transparent';
|
|
126
126
|
if ('text' === variant || 'underlined' === variant) return 'transparent';
|
|
127
127
|
if ('default' === color) {
|
|
128
|
-
if ('light' === variant) return getColor('
|
|
129
|
-
return getColor('
|
|
128
|
+
if ('light' === variant) return getColor('bg200');
|
|
129
|
+
return getColor('cursor');
|
|
130
130
|
}
|
|
131
131
|
return getColor(color);
|
|
132
132
|
}, [
|
|
@@ -13,7 +13,7 @@ const ToastView = ({ type, text, props: toastProps })=>{
|
|
|
13
13
|
const { toast: toastConfig } = useComponentConfig();
|
|
14
14
|
const { colors } = useTheme();
|
|
15
15
|
const bg = useMemo(()=>{
|
|
16
|
-
if (!colorBg) return colors.
|
|
16
|
+
if (!colorBg) return colors.cursor;
|
|
17
17
|
if ('success' === type) return '#0E3728';
|
|
18
18
|
if ('error' === type) return '#501D1D';
|
|
19
19
|
}, [
|
|
@@ -8,8 +8,8 @@ const DateButton = ({ isSelected, text, ...props })=>/*#__PURE__*/ jsx(UXPressab
|
|
|
8
8
|
border: 1,
|
|
9
9
|
h: 30,
|
|
10
10
|
radius: 4,
|
|
11
|
-
borderColor: isSelected ? 'primary' : '
|
|
12
|
-
bg: "
|
|
11
|
+
borderColor: isSelected ? 'primary' : 'bg200',
|
|
12
|
+
bg: "bg200",
|
|
13
13
|
...props,
|
|
14
14
|
children: /*#__PURE__*/ jsx(Text, {
|
|
15
15
|
body3Bold: true,
|
|
@@ -143,7 +143,7 @@ const UXInput = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
143
143
|
ref: inputRef,
|
|
144
144
|
allowFontScaling: false,
|
|
145
145
|
editable: !isDisabled && !isReadOnly,
|
|
146
|
-
placeholderTextColor: getColor('
|
|
146
|
+
placeholderTextColor: getColor('cursor'),
|
|
147
147
|
cursorColor: styles.container.borderColor,
|
|
148
148
|
selectionColor: `${styles.container.borderColor}90`,
|
|
149
149
|
style: [
|
|
@@ -239,7 +239,7 @@ const UXNumberInput = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
239
239
|
allowFontScaling: false,
|
|
240
240
|
editable: !isDisabled && !isReadOnly,
|
|
241
241
|
keyboardType: keyboardType,
|
|
242
|
-
placeholderTextColor: getColor('
|
|
242
|
+
placeholderTextColor: getColor('cursor'),
|
|
243
243
|
cursorColor: styles.container.borderColor,
|
|
244
244
|
selectionColor: `${styles.container.borderColor}90`,
|
|
245
245
|
style: [
|
|
@@ -20,10 +20,10 @@ const streetComponentConfig = {
|
|
|
20
20
|
color: {
|
|
21
21
|
default: {
|
|
22
22
|
background: 'foreground',
|
|
23
|
-
text: '
|
|
23
|
+
text: 'bgDefault'
|
|
24
24
|
},
|
|
25
25
|
secondary: {
|
|
26
|
-
background: '
|
|
26
|
+
background: 'bg200',
|
|
27
27
|
text: 'foreground'
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -45,7 +45,7 @@ const streetComponentConfig = {
|
|
|
45
45
|
},
|
|
46
46
|
modal: {
|
|
47
47
|
radius: 34,
|
|
48
|
-
bg: '
|
|
48
|
+
bg: 'bgDefault',
|
|
49
49
|
backdrop: {
|
|
50
50
|
light: '#00000050',
|
|
51
51
|
dark: '#1f1f2370'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-network/ui-native",
|
|
3
|
-
"version": "0.5.1-beta.
|
|
3
|
+
"version": "0.5.1-beta.5",
|
|
4
4
|
"main": "./entry.js",
|
|
5
5
|
"react-native": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"react-native-size-matters": "^0.4.2",
|
|
46
46
|
"react-native-toast-message": "^2.3.3",
|
|
47
47
|
"react-native-worklets": "0.5.1",
|
|
48
|
-
"@particle-network/
|
|
49
|
-
"@particle-network/
|
|
48
|
+
"@particle-network/icons": "0.5.1-beta.5",
|
|
49
|
+
"@particle-network/ui-shared": "0.4.1-beta.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@babel/core": "^7.24.0",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"vite": "^6.3.5",
|
|
91
91
|
"zustand": "^5.0.8",
|
|
92
92
|
"@particle-network/eslint-config": "0.3.0",
|
|
93
|
-
"@particle-network/
|
|
94
|
-
"@particle-network/
|
|
93
|
+
"@particle-network/icons": "0.5.1-beta.5",
|
|
94
|
+
"@particle-network/lintstaged-config": "0.1.0"
|
|
95
95
|
},
|
|
96
96
|
"overrides": {
|
|
97
97
|
"react-docgen-typescript": "2.2.2",
|