@vellira-ui/react-native 2.62.1 → 2.62.3
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/index.js +140 -70
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -773,7 +773,7 @@ const createStyles$21 = (theme) => StyleSheet.create({
|
|
|
773
773
|
borderTopRightRadius: theme.tokens.radius.lg,
|
|
774
774
|
borderWidth: 1,
|
|
775
775
|
...Platform.select({
|
|
776
|
-
web: { boxShadow:
|
|
776
|
+
web: { boxShadow: theme.components.dropdown.content.shadow },
|
|
777
777
|
default: {
|
|
778
778
|
shadowColor: theme.tokens.shadows.lg.color,
|
|
779
779
|
shadowOffset: {
|
|
@@ -854,7 +854,7 @@ function DropdownContent({ children, contentStyle, accessibilityLabel }) {
|
|
|
854
854
|
animation.setValue(0);
|
|
855
855
|
return;
|
|
856
856
|
}
|
|
857
|
-
if (reduceMotion) {
|
|
857
|
+
if (reduceMotion || Platform.OS === "web") {
|
|
858
858
|
animation.setValue(1);
|
|
859
859
|
return;
|
|
860
860
|
}
|
|
@@ -862,7 +862,7 @@ function DropdownContent({ children, contentStyle, accessibilityLabel }) {
|
|
|
862
862
|
Animated.timing(animation, {
|
|
863
863
|
toValue: 1,
|
|
864
864
|
duration: isSheet ? 220 : 160,
|
|
865
|
-
useNativeDriver:
|
|
865
|
+
useNativeDriver: true
|
|
866
866
|
}).start();
|
|
867
867
|
}, [
|
|
868
868
|
animation,
|
|
@@ -1332,7 +1332,10 @@ function useNativeFloatingPosition(placement = "top", offset = 8) {
|
|
|
1332
1332
|
//#endregion
|
|
1333
1333
|
//#region src/components/Dropdown/Dropdown.styles.ts
|
|
1334
1334
|
const createStyles$20 = (theme) => StyleSheet.create({
|
|
1335
|
-
root: { alignSelf:
|
|
1335
|
+
root: { alignSelf: Platform.select({
|
|
1336
|
+
web: "auto",
|
|
1337
|
+
default: "flex-start"
|
|
1338
|
+
}) },
|
|
1336
1339
|
emptyText: {
|
|
1337
1340
|
minHeight: 44,
|
|
1338
1341
|
paddingHorizontal: theme.tokens.spacing[3],
|
|
@@ -2013,7 +2016,7 @@ const createStyles$13 = (theme) => StyleSheet.create({ content: {
|
|
|
2013
2016
|
borderRadius: theme.components.modal.content.radius,
|
|
2014
2017
|
borderWidth: theme.components.modal.content.borderWidth,
|
|
2015
2018
|
...Platform.select({
|
|
2016
|
-
web: { boxShadow:
|
|
2019
|
+
web: { boxShadow: theme.components.modal.content.shadow },
|
|
2017
2020
|
default: {
|
|
2018
2021
|
shadowColor: theme.tokens.shadows.lg.color,
|
|
2019
2022
|
shadowOffset: {
|
|
@@ -2182,7 +2185,7 @@ function useModalRootAnimation({ animation, defaultOpen, duration, easing, open
|
|
|
2182
2185
|
const [shouldRender, setShouldRender] = useState(defaultOpen);
|
|
2183
2186
|
const [reduceMotion, setReduceMotion] = useState(false);
|
|
2184
2187
|
const animationDuration = resolveDuration(duration);
|
|
2185
|
-
const shouldAnimate = animation !== "none" && !reduceMotion;
|
|
2188
|
+
const shouldAnimate = animation !== "none" && !reduceMotion && Platform.OS !== "web";
|
|
2186
2189
|
useEffect(() => {
|
|
2187
2190
|
AccessibilityInfo.isReduceMotionEnabled?.().then(setReduceMotion);
|
|
2188
2191
|
const subscription = AccessibilityInfo.addEventListener?.("reduceMotionChanged", setReduceMotion);
|
|
@@ -2712,7 +2715,10 @@ function useRadioGroupContext() {
|
|
|
2712
2715
|
//#endregion
|
|
2713
2716
|
//#region src/primitives/Radio/Radio.styles.ts
|
|
2714
2717
|
const createStyles$10 = (theme) => StyleSheet.create({
|
|
2715
|
-
root: { alignSelf:
|
|
2718
|
+
root: { alignSelf: Platform.select({
|
|
2719
|
+
web: "auto",
|
|
2720
|
+
default: "flex-start"
|
|
2721
|
+
}) },
|
|
2716
2722
|
pressable: {
|
|
2717
2723
|
flexDirection: "row",
|
|
2718
2724
|
alignItems: "flex-start",
|
|
@@ -3806,6 +3812,42 @@ const createPresentationStyles = (theme) => StyleSheet.create({
|
|
|
3806
3812
|
borderColor: theme.components.select.dropdown.border,
|
|
3807
3813
|
borderWidth: 1
|
|
3808
3814
|
},
|
|
3815
|
+
surface: { ...Platform.select({
|
|
3816
|
+
web: { boxShadow: theme.components.select.dropdown.shadow },
|
|
3817
|
+
default: {
|
|
3818
|
+
shadowColor: theme.tokens.shadows.lg.color,
|
|
3819
|
+
shadowOffset: {
|
|
3820
|
+
width: theme.tokens.shadows.lg.x,
|
|
3821
|
+
height: theme.tokens.shadows.lg.y
|
|
3822
|
+
},
|
|
3823
|
+
shadowOpacity: theme.tokens.shadows.lg.opacity,
|
|
3824
|
+
shadowRadius: theme.tokens.shadows.lg.blur,
|
|
3825
|
+
elevation: theme.tokens.shadows.lg.elevation
|
|
3826
|
+
}
|
|
3827
|
+
}) },
|
|
3828
|
+
sheetSurface: {
|
|
3829
|
+
borderTopLeftRadius: theme.tokens.radius.lg,
|
|
3830
|
+
borderTopRightRadius: theme.tokens.radius.lg,
|
|
3831
|
+
...Platform.select({
|
|
3832
|
+
web: { boxShadow: `0 -${theme.tokens.shadows.lg.y}px ${theme.tokens.shadows.lg.blur}px color-mix(in srgb, ${theme.tokens.shadows.lg.color} ${theme.tokens.shadows.lg.opacity * 100}%, transparent)` },
|
|
3833
|
+
default: {
|
|
3834
|
+
shadowColor: theme.tokens.shadows.lg.color,
|
|
3835
|
+
shadowOffset: {
|
|
3836
|
+
width: theme.tokens.shadows.lg.x,
|
|
3837
|
+
height: -theme.tokens.shadows.lg.y
|
|
3838
|
+
},
|
|
3839
|
+
shadowOpacity: theme.tokens.shadows.lg.opacity,
|
|
3840
|
+
shadowRadius: theme.tokens.shadows.lg.blur,
|
|
3841
|
+
elevation: theme.tokens.shadows.lg.elevation
|
|
3842
|
+
}
|
|
3843
|
+
})
|
|
3844
|
+
},
|
|
3845
|
+
modalSurface: {
|
|
3846
|
+
width: "100%",
|
|
3847
|
+
maxWidth: 420,
|
|
3848
|
+
borderRadius: theme.tokens.radius.lg
|
|
3849
|
+
},
|
|
3850
|
+
popoverSurface: { borderRadius: theme.tokens.radius.lg },
|
|
3809
3851
|
sheet: {
|
|
3810
3852
|
maxHeight: "74%",
|
|
3811
3853
|
borderTopLeftRadius: theme.tokens.radius.lg,
|
|
@@ -3819,8 +3861,6 @@ const createPresentationStyles = (theme) => StyleSheet.create({
|
|
|
3819
3861
|
borderRadius: theme.tokens.radius.lg
|
|
3820
3862
|
},
|
|
3821
3863
|
popover: {
|
|
3822
|
-
width: "100%",
|
|
3823
|
-
maxWidth: 420,
|
|
3824
3864
|
maxHeight: "60%",
|
|
3825
3865
|
borderRadius: theme.tokens.radius.lg
|
|
3826
3866
|
},
|
|
@@ -3873,13 +3913,16 @@ const SelectModal = ({ visible, onClose, outsidePressProps, zIndex, contentStyle
|
|
|
3873
3913
|
],
|
|
3874
3914
|
testID: "select-content-root",
|
|
3875
3915
|
children: [/* @__PURE__ */ jsx(SelectBackdrop, { outsidePressProps }), /* @__PURE__ */ jsx(View, {
|
|
3876
|
-
style: [
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3916
|
+
style: [styles.surface, styles.modalSurface],
|
|
3917
|
+
children: /* @__PURE__ */ jsx(View, {
|
|
3918
|
+
style: [
|
|
3919
|
+
styles.content,
|
|
3920
|
+
styles.modalPresentation,
|
|
3921
|
+
contentStyle
|
|
3922
|
+
],
|
|
3923
|
+
testID: "select-modal",
|
|
3924
|
+
children
|
|
3925
|
+
})
|
|
3883
3926
|
})]
|
|
3884
3927
|
})
|
|
3885
3928
|
});
|
|
@@ -3900,18 +3943,31 @@ const SelectPopover = ({ visible, onClose, outsidePressProps, zIndex, position,
|
|
|
3900
3943
|
children: [/* @__PURE__ */ jsx(SelectBackdrop, { outsidePressProps }), /* @__PURE__ */ jsx(View, {
|
|
3901
3944
|
onLayout: onFloatingLayout,
|
|
3902
3945
|
style: [
|
|
3903
|
-
styles.
|
|
3904
|
-
styles.
|
|
3946
|
+
styles.surface,
|
|
3947
|
+
styles.popoverSurface,
|
|
3905
3948
|
{
|
|
3906
3949
|
position: "absolute",
|
|
3907
3950
|
top: position.top,
|
|
3908
3951
|
left: position.left
|
|
3909
3952
|
},
|
|
3910
|
-
matchTriggerWidth && triggerWidth ? {
|
|
3911
|
-
|
|
3953
|
+
matchTriggerWidth && triggerWidth ? {
|
|
3954
|
+
width: triggerWidth,
|
|
3955
|
+
maxWidth: triggerWidth
|
|
3956
|
+
} : {
|
|
3957
|
+
width: "100%",
|
|
3958
|
+
maxWidth: 420
|
|
3959
|
+
}
|
|
3912
3960
|
],
|
|
3913
|
-
testID: "select-popover",
|
|
3914
|
-
children
|
|
3961
|
+
testID: "select-popover-surface",
|
|
3962
|
+
children: /* @__PURE__ */ jsx(View, {
|
|
3963
|
+
style: [
|
|
3964
|
+
styles.content,
|
|
3965
|
+
styles.popover,
|
|
3966
|
+
contentStyle
|
|
3967
|
+
],
|
|
3968
|
+
testID: "select-popover",
|
|
3969
|
+
children
|
|
3970
|
+
})
|
|
3915
3971
|
})]
|
|
3916
3972
|
})
|
|
3917
3973
|
});
|
|
@@ -3933,14 +3989,17 @@ const SelectSheet = ({ visible, onClose, outsidePressProps, zIndex, contentStyle
|
|
|
3933
3989
|
Platform.OS === "web" && { zIndex }
|
|
3934
3990
|
],
|
|
3935
3991
|
testID: "select-content-root",
|
|
3936
|
-
children: [/* @__PURE__ */ jsx(SelectBackdrop, { outsidePressProps }), /* @__PURE__ */
|
|
3937
|
-
style: [
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3992
|
+
children: [/* @__PURE__ */ jsx(SelectBackdrop, { outsidePressProps }), /* @__PURE__ */ jsx(View, {
|
|
3993
|
+
style: [styles.surface, styles.sheetSurface],
|
|
3994
|
+
children: /* @__PURE__ */ jsxs(View, {
|
|
3995
|
+
style: [
|
|
3996
|
+
styles.content,
|
|
3997
|
+
styles.sheet,
|
|
3998
|
+
contentStyle
|
|
3999
|
+
],
|
|
4000
|
+
testID: "select-sheet",
|
|
4001
|
+
children: [/* @__PURE__ */ jsx(SelectHandle, {}), children]
|
|
4002
|
+
})
|
|
3944
4003
|
})]
|
|
3945
4004
|
})
|
|
3946
4005
|
});
|
|
@@ -3985,7 +4044,7 @@ const createSearchStyles = (theme) => StyleSheet.create({
|
|
|
3985
4044
|
alignItems: "center",
|
|
3986
4045
|
justifyContent: "center",
|
|
3987
4046
|
borderRadius: 999,
|
|
3988
|
-
backgroundColor:
|
|
4047
|
+
backgroundColor: "transparent"
|
|
3989
4048
|
}
|
|
3990
4049
|
});
|
|
3991
4050
|
//#endregion
|
|
@@ -4036,7 +4095,7 @@ const SelectSearchField = () => {
|
|
|
4036
4095
|
children: /* @__PURE__ */ jsx(Close, {
|
|
4037
4096
|
width: 14,
|
|
4038
4097
|
height: 14,
|
|
4039
|
-
color: theme.components.select.clearButton.
|
|
4098
|
+
color: theme.components.select.clearButton.fg
|
|
4040
4099
|
})
|
|
4041
4100
|
})
|
|
4042
4101
|
]
|
|
@@ -4226,9 +4285,6 @@ const createTriggerStyles = (theme) => StyleSheet.create({
|
|
|
4226
4285
|
paddingHorizontal: theme.tokens.spacing[5],
|
|
4227
4286
|
paddingVertical: theme.tokens.spacing[4]
|
|
4228
4287
|
},
|
|
4229
|
-
triggerWithClearSm: { paddingRight: theme.tokens.spacing[3] + 24 + theme.tokens.spacing[2] },
|
|
4230
|
-
triggerWithClearMd: { paddingRight: theme.tokens.spacing[4] + 24 + theme.tokens.spacing[2] },
|
|
4231
|
-
triggerWithClearLg: { paddingRight: theme.tokens.spacing[5] + 24 + theme.tokens.spacing[2] },
|
|
4232
4288
|
clearButtonContainer: {
|
|
4233
4289
|
position: "absolute",
|
|
4234
4290
|
top: 0,
|
|
@@ -4236,13 +4292,14 @@ const createTriggerStyles = (theme) => StyleSheet.create({
|
|
|
4236
4292
|
alignItems: "center",
|
|
4237
4293
|
justifyContent: "center"
|
|
4238
4294
|
},
|
|
4239
|
-
clearButtonContainerSm: { right: theme.tokens.spacing[3] },
|
|
4240
|
-
clearButtonContainerMd: { right: theme.tokens.spacing[4] },
|
|
4241
|
-
clearButtonContainerLg: { right: theme.tokens.spacing[5] },
|
|
4295
|
+
clearButtonContainerSm: { right: theme.tokens.spacing[3] + 16 + theme.tokens.spacing[2] },
|
|
4296
|
+
clearButtonContainerMd: { right: theme.tokens.spacing[4] + 16 + theme.tokens.spacing[2] },
|
|
4297
|
+
clearButtonContainerLg: { right: theme.tokens.spacing[5] + 16 + theme.tokens.spacing[2] },
|
|
4242
4298
|
value: {
|
|
4243
4299
|
flex: 1,
|
|
4244
4300
|
minWidth: 0
|
|
4245
4301
|
},
|
|
4302
|
+
valueWithClear: { marginRight: 24 + theme.tokens.spacing[2] },
|
|
4246
4303
|
text: { fontFamily: theme.tokens.typography.family.regular },
|
|
4247
4304
|
textSm: {
|
|
4248
4305
|
fontSize: theme.tokens.typography.size.sm,
|
|
@@ -4284,7 +4341,7 @@ const createTriggerStyles = (theme) => StyleSheet.create({
|
|
|
4284
4341
|
alignItems: "center",
|
|
4285
4342
|
justifyContent: "center",
|
|
4286
4343
|
borderRadius: 999,
|
|
4287
|
-
backgroundColor:
|
|
4344
|
+
backgroundColor: "transparent"
|
|
4288
4345
|
}
|
|
4289
4346
|
});
|
|
4290
4347
|
//#endregion
|
|
@@ -4317,11 +4374,6 @@ function SelectTrigger({ displayText, isPlaceholder, isOpen, size = "md", color
|
|
|
4317
4374
|
shadowRadius: 6,
|
|
4318
4375
|
elevation: 1
|
|
4319
4376
|
};
|
|
4320
|
-
const triggerWithClearStyle = {
|
|
4321
|
-
sm: styles.triggerWithClearSm,
|
|
4322
|
-
md: styles.triggerWithClearMd,
|
|
4323
|
-
lg: styles.triggerWithClearLg
|
|
4324
|
-
};
|
|
4325
4377
|
const clearButtonContainerStyle = {
|
|
4326
4378
|
sm: styles.clearButtonContainerSm,
|
|
4327
4379
|
md: styles.clearButtonContainerMd,
|
|
@@ -4383,7 +4435,6 @@ function SelectTrigger({ displayText, isPlaceholder, isOpen, size = "md", color
|
|
|
4383
4435
|
borderColor: triggerState.border
|
|
4384
4436
|
},
|
|
4385
4437
|
styles[size],
|
|
4386
|
-
showClearButton && triggerWithClearStyle[size],
|
|
4387
4438
|
isOpen && openRingStyle,
|
|
4388
4439
|
hasError && { borderColor: theme.components.select.trigger.error.border },
|
|
4389
4440
|
disabled && {
|
|
@@ -4405,7 +4456,7 @@ function SelectTrigger({ displayText, isPlaceholder, isOpen, size = "md", color
|
|
|
4405
4456
|
children: prefix
|
|
4406
4457
|
}),
|
|
4407
4458
|
/* @__PURE__ */ jsx(View, {
|
|
4408
|
-
style: styles.value,
|
|
4459
|
+
style: [styles.value, showClearButton && styles.valueWithClear],
|
|
4409
4460
|
children: renderValue()
|
|
4410
4461
|
}),
|
|
4411
4462
|
suffix && /* @__PURE__ */ jsx(Text, {
|
|
@@ -4416,7 +4467,7 @@ function SelectTrigger({ displayText, isPlaceholder, isOpen, size = "md", color
|
|
|
4416
4467
|
testID: "select-loading-indicator",
|
|
4417
4468
|
size: "small",
|
|
4418
4469
|
color: iconColor
|
|
4419
|
-
}) :
|
|
4470
|
+
}) : endIcon ? /* @__PURE__ */ jsx(View, {
|
|
4420
4471
|
...nativePointerEventsNone$2,
|
|
4421
4472
|
style: [styles.endIcon, webPointerEventsNone$2],
|
|
4422
4473
|
accessibilityElementsHidden: true,
|
|
@@ -4449,7 +4500,7 @@ function SelectTrigger({ displayText, isPlaceholder, isOpen, size = "md", color
|
|
|
4449
4500
|
children: /* @__PURE__ */ jsx(Close, {
|
|
4450
4501
|
width: 16,
|
|
4451
4502
|
height: 16,
|
|
4452
|
-
color: theme.components.select.clearButton.
|
|
4503
|
+
color: theme.components.select.clearButton.fg
|
|
4453
4504
|
})
|
|
4454
4505
|
})
|
|
4455
4506
|
})]
|
|
@@ -5004,14 +5055,7 @@ const createStyles$7 = (theme) => StyleSheet.create({
|
|
|
5004
5055
|
minWidth: 0,
|
|
5005
5056
|
alignSelf: "stretch"
|
|
5006
5057
|
},
|
|
5007
|
-
panelHidden: { display: "none" }
|
|
5008
|
-
text: {
|
|
5009
|
-
flexShrink: 1,
|
|
5010
|
-
color: theme.components.tabs.panel.fg,
|
|
5011
|
-
fontFamily: theme.tokens.typography.family.regular,
|
|
5012
|
-
fontSize: theme.tokens.typography.size.md,
|
|
5013
|
-
lineHeight: theme.tokens.typography.lineHeight.md
|
|
5014
|
-
}
|
|
5058
|
+
panelHidden: { display: "none" }
|
|
5015
5059
|
});
|
|
5016
5060
|
//#endregion
|
|
5017
5061
|
//#region src/components/Tabs/Content/TabsContent.tsx
|
|
@@ -5168,7 +5212,7 @@ const TabsIndicator = ({ children, style }) => {
|
|
|
5168
5212
|
},
|
|
5169
5213
|
isVertical ? {
|
|
5170
5214
|
top: 0,
|
|
5171
|
-
|
|
5215
|
+
right: 0,
|
|
5172
5216
|
width: 3,
|
|
5173
5217
|
height,
|
|
5174
5218
|
transform: [{ translateY }]
|
|
@@ -5209,7 +5253,7 @@ const TabsIndicator = ({ children, style }) => {
|
|
|
5209
5253
|
borderRadius: theme.tokens.radius.lg,
|
|
5210
5254
|
borderWidth: 1,
|
|
5211
5255
|
...Platform.select({
|
|
5212
|
-
web: { boxShadow: `${theme.tokens.shadows.sm.x}px ${theme.tokens.shadows.sm.y}px ${theme.tokens.shadows.sm.blur}px ${theme.tokens.shadows.sm.color}` },
|
|
5256
|
+
web: { boxShadow: `${theme.tokens.shadows.sm.x}px ${theme.tokens.shadows.sm.y}px ${theme.tokens.shadows.sm.blur}px color-mix(in srgb, ${theme.tokens.shadows.sm.color} ${theme.tokens.shadows.sm.opacity * 100}%, transparent)` },
|
|
5213
5257
|
default: {
|
|
5214
5258
|
shadowColor: theme.tokens.shadows.sm.color,
|
|
5215
5259
|
shadowOffset: {
|
|
@@ -5274,7 +5318,7 @@ const createStyles$6 = (theme) => StyleSheet.create({
|
|
|
5274
5318
|
listSegmented: {
|
|
5275
5319
|
alignSelf: "flex-start",
|
|
5276
5320
|
width: "auto",
|
|
5277
|
-
gap:
|
|
5321
|
+
gap: 0,
|
|
5278
5322
|
padding: 2,
|
|
5279
5323
|
backgroundColor: theme.components.tabs.list.segmentedBg,
|
|
5280
5324
|
borderColor: theme.components.tabs.list.border,
|
|
@@ -5291,6 +5335,18 @@ const createStyles$6 = (theme) => StyleSheet.create({
|
|
|
5291
5335
|
flexShrink: 0,
|
|
5292
5336
|
gap: theme.tokens.spacing[1],
|
|
5293
5337
|
marginBottom: 0
|
|
5338
|
+
},
|
|
5339
|
+
listPillsVertical: { gap: theme.tokens.spacing[2] },
|
|
5340
|
+
listSegmentedVertical: {
|
|
5341
|
+
gap: 0,
|
|
5342
|
+
padding: 2,
|
|
5343
|
+
width: 156,
|
|
5344
|
+
minWidth: 156,
|
|
5345
|
+
maxWidth: 156,
|
|
5346
|
+
backgroundColor: theme.components.tabs.list.segmentedBg,
|
|
5347
|
+
borderColor: theme.components.tabs.list.border,
|
|
5348
|
+
borderRadius: theme.tokens.radius.xl,
|
|
5349
|
+
borderWidth: 1
|
|
5294
5350
|
}
|
|
5295
5351
|
});
|
|
5296
5352
|
//#endregion
|
|
@@ -5305,6 +5361,8 @@ const TabsList = ({ children, scrollable: scrollableProp, style }) => {
|
|
|
5305
5361
|
variant === "segmented" && styles.listSegmented,
|
|
5306
5362
|
orientation === "vertical" && styles.listVertical,
|
|
5307
5363
|
variant === "line" && orientation === "vertical" && styles.listLineVertical,
|
|
5364
|
+
variant === "pills" && orientation === "vertical" && styles.listPillsVertical,
|
|
5365
|
+
variant === "segmented" && orientation === "vertical" && styles.listSegmentedVertical,
|
|
5308
5366
|
style
|
|
5309
5367
|
];
|
|
5310
5368
|
if (scrollable && orientation === "horizontal") return /* @__PURE__ */ jsx(ScrollView, {
|
|
@@ -5326,7 +5384,7 @@ TabsList.displayName = "TabsList";
|
|
|
5326
5384
|
const fontWeight$1 = (value) => value;
|
|
5327
5385
|
const createStyles$5 = (theme) => StyleSheet.create({
|
|
5328
5386
|
tab: {
|
|
5329
|
-
minHeight:
|
|
5387
|
+
minHeight: 36,
|
|
5330
5388
|
minWidth: 44,
|
|
5331
5389
|
alignItems: "center",
|
|
5332
5390
|
flexDirection: "row",
|
|
@@ -5396,7 +5454,6 @@ const createStyles$5 = (theme) => StyleSheet.create({
|
|
|
5396
5454
|
tabVertical: {
|
|
5397
5455
|
position: "relative",
|
|
5398
5456
|
width: "100%",
|
|
5399
|
-
minHeight: 44,
|
|
5400
5457
|
flexGrow: 0,
|
|
5401
5458
|
flexShrink: 0,
|
|
5402
5459
|
justifyContent: "flex-start"
|
|
@@ -5429,10 +5486,10 @@ const createStyles$5 = (theme) => StyleSheet.create({
|
|
|
5429
5486
|
tabTextActive: { color: theme.components.tabs.primary.trigger.active.fg },
|
|
5430
5487
|
tabTextPillsActive: { color: theme.components.tabs.primary.pills.active.fg },
|
|
5431
5488
|
tabPills: {
|
|
5432
|
-
minHeight:
|
|
5433
|
-
paddingHorizontal: theme.tokens.spacing[
|
|
5434
|
-
paddingVertical: theme.tokens.spacing[
|
|
5435
|
-
borderRadius: theme.tokens.radius.
|
|
5489
|
+
minHeight: 38,
|
|
5490
|
+
paddingHorizontal: theme.tokens.spacing[4],
|
|
5491
|
+
paddingVertical: theme.tokens.spacing[2],
|
|
5492
|
+
borderRadius: theme.tokens.radius.lg
|
|
5436
5493
|
},
|
|
5437
5494
|
tabPillsIconOnly: {
|
|
5438
5495
|
width: 36,
|
|
@@ -5730,8 +5787,15 @@ const TabsRoot = ({ children, value: controlledValue, defaultValue, onValueChang
|
|
|
5730
5787
|
setVersion((current) => current + 1);
|
|
5731
5788
|
}, []);
|
|
5732
5789
|
const registerTriggerLayout = useCallback((triggerValue, layout) => {
|
|
5733
|
-
|
|
5734
|
-
|
|
5790
|
+
const previous = triggerLayoutsRef.current.get(triggerValue);
|
|
5791
|
+
if (!layout) {
|
|
5792
|
+
if (!previous) return;
|
|
5793
|
+
triggerLayoutsRef.current.delete(triggerValue);
|
|
5794
|
+
setIndicatorVersion((current) => current + 1);
|
|
5795
|
+
return;
|
|
5796
|
+
}
|
|
5797
|
+
if (previous && previous.x === layout.x && previous.y === layout.y && previous.width === layout.width && previous.height === layout.height) return;
|
|
5798
|
+
triggerLayoutsRef.current.set(triggerValue, layout);
|
|
5735
5799
|
setIndicatorVersion((current) => current + 1);
|
|
5736
5800
|
}, []);
|
|
5737
5801
|
const getTriggerLayout = useCallback((triggerValue) => {
|
|
@@ -5858,7 +5922,10 @@ function TooltipArrow() {
|
|
|
5858
5922
|
//#endregion
|
|
5859
5923
|
//#region src/components/Tooltip/Tooltip.styles.ts
|
|
5860
5924
|
const createStyles$3 = (theme) => StyleSheet.create({
|
|
5861
|
-
root: { alignSelf:
|
|
5925
|
+
root: { alignSelf: Platform.select({
|
|
5926
|
+
web: "auto",
|
|
5927
|
+
default: "flex-start"
|
|
5928
|
+
}) },
|
|
5862
5929
|
overlay: { ...StyleSheet.absoluteFill },
|
|
5863
5930
|
bubble: {
|
|
5864
5931
|
position: "absolute",
|
|
@@ -5870,7 +5937,7 @@ const createStyles$3 = (theme) => StyleSheet.create({
|
|
|
5870
5937
|
borderRadius: theme.components.tooltip.content.radius,
|
|
5871
5938
|
borderWidth: theme.components.tooltip.content.borderWidth,
|
|
5872
5939
|
...Platform.select({
|
|
5873
|
-
web: { boxShadow:
|
|
5940
|
+
web: { boxShadow: theme.components.tooltip.content.shadow },
|
|
5874
5941
|
default: {
|
|
5875
5942
|
shadowColor: theme.tokens.shadows.md.color,
|
|
5876
5943
|
shadowOffset: {
|
|
@@ -6247,7 +6314,10 @@ function Button({ children, color = "primary", appearance = "solid", shape = "pi
|
|
|
6247
6314
|
devWarning(!iconOnly || Boolean(accessibilityLabel), "Button: icon-only buttons must provide an accessibilityLabel.");
|
|
6248
6315
|
const resolvedIconSize = iconSize ?? controlSize.iconSize;
|
|
6249
6316
|
const handleFocus = (event) => {
|
|
6250
|
-
|
|
6317
|
+
if (Platform.OS === "web") {
|
|
6318
|
+
const target = event.currentTarget;
|
|
6319
|
+
setIsFocused(target.matches?.(":focus-visible") ?? false);
|
|
6320
|
+
} else setIsFocused(true);
|
|
6251
6321
|
onFocus?.(event);
|
|
6252
6322
|
};
|
|
6253
6323
|
const handleBlur = (event) => {
|