@vellira-ui/react-native 2.43.1 → 2.43.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.d.ts CHANGED
@@ -8,7 +8,7 @@ export type { SelectOption, SelectProps } from './components/Select';
8
8
  export { Select } from './components/Select';
9
9
  export type { TabsContentProps, TabsListProps, TabsProps, TabsTriggerProps, } from './components/Tabs';
10
10
  export { Tabs } from './components/Tabs';
11
- export type { TooltipArrowProps, TooltipContentProps, TooltipProps, TooltipRootProps, TooltipTriggerProps, } from './components/Tooltip';
11
+ export type { TooltipContentProps, TooltipProps, TooltipRootProps, TooltipTriggerProps, } from './components/Tooltip';
12
12
  export { Tooltip } from './components/Tooltip';
13
13
  export type { FormFieldProps } from './patterns/FormField';
14
14
  export { FormField } from './patterns/FormField';
package/dist/index.js CHANGED
@@ -1757,8 +1757,8 @@ const indicatorSizeBySize = {
1757
1757
  md: 8,
1758
1758
  lg: 10
1759
1759
  };
1760
- const nativePointerEventsNone$5 = Platform.OS === "web" ? void 0 : { pointerEvents: "none" };
1761
- const webPointerEventsNone$5 = Platform.OS === "web" ? { pointerEvents: "none" } : void 0;
1760
+ const nativePointerEventsNone$4 = Platform.OS === "web" ? void 0 : { pointerEvents: "none" };
1761
+ const webPointerEventsNone$4 = Platform.OS === "web" ? { pointerEvents: "none" } : void 0;
1762
1762
  const Radio = forwardRef(({ value, checked, defaultChecked = false, disabled: disabledProp = false, required: requiredProp = false, size: sizeProp, color: colorProp, onCheckedChange, label, description, icon, error, accessibilityLabel, accessibilityHint, containerStyle, labelStyle, descriptionStyle, errorStyle, style, ...rest }, ref) => {
1763
1763
  const { theme } = useTheme();
1764
1764
  const styles = createStyles$10(theme);
@@ -1838,10 +1838,10 @@ const Radio = forwardRef(({ value, checked, defaultChecked = false, disabled: di
1838
1838
  onPress: handlePress,
1839
1839
  style: resolvePressableStyle,
1840
1840
  children: (state) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(View, {
1841
- ...nativePointerEventsNone$5,
1841
+ ...nativePointerEventsNone$4,
1842
1842
  style: [
1843
1843
  styles.control,
1844
- webPointerEventsNone$5,
1844
+ webPointerEventsNone$4,
1845
1845
  {
1846
1846
  width: controlSize,
1847
1847
  height: controlSize,
@@ -1870,8 +1870,8 @@ const Radio = forwardRef(({ value, checked, defaultChecked = false, disabled: di
1870
1870
  resolvedDisabled && styles.indicatorDisabled
1871
1871
  ] }))
1872
1872
  }), (label || description) && /* @__PURE__ */ jsxs(View, {
1873
- ...nativePointerEventsNone$5,
1874
- style: [styles.content, webPointerEventsNone$5],
1873
+ ...nativePointerEventsNone$4,
1874
+ style: [styles.content, webPointerEventsNone$4],
1875
1875
  children: [label && (typeof label === "string" ? /* @__PURE__ */ jsx(Text, {
1876
1876
  style: [
1877
1877
  styles.label,
@@ -3274,9 +3274,9 @@ const createTriggerStyles = (theme) => StyleSheet.create({
3274
3274
  //#endregion
3275
3275
  //#region src/components/Select/Trigger/SelectTrigger.tsx
3276
3276
  const SelectTriggerSlot = createSelectSlot("trigger", "Select.Trigger");
3277
- const nativePointerEventsNone$4 = Platform.OS === "web" ? void 0 : { pointerEvents: "none" };
3277
+ const nativePointerEventsNone$3 = Platform.OS === "web" ? void 0 : { pointerEvents: "none" };
3278
3278
  const nativePointerEventsBoxNone = Platform.OS === "web" ? void 0 : { pointerEvents: "box-none" };
3279
- const webPointerEventsNone$4 = Platform.OS === "web" ? { pointerEvents: "none" } : void 0;
3279
+ const webPointerEventsNone$3 = Platform.OS === "web" ? { pointerEvents: "none" } : void 0;
3280
3280
  const webPointerEventsBoxNone = Platform.OS === "web" ? { pointerEvents: "box-none" } : void 0;
3281
3281
  function SelectTrigger({ displayText, isPlaceholder, isOpen, size = "md", color = "primary", variant = "outline", disabled = false, required = false, hasError = false, hasValue = false, loading = false, clearable = false, startIcon, endIcon, prefix, suffix, accessibilityLabel, accessibilityHint, nativeID, accessibilityLabelledBy, ariaDescribedBy, triggerStyle, textStyle, onPress, onClear }) {
3282
3282
  const { theme } = useTheme();
@@ -3371,8 +3371,8 @@ function SelectTrigger({ displayText, isPlaceholder, isOpen, size = "md", color
3371
3371
  ],
3372
3372
  children: [
3373
3373
  startIcon && /* @__PURE__ */ jsx(View, {
3374
- ...nativePointerEventsNone$4,
3375
- style: [styles.startIcon, webPointerEventsNone$4],
3374
+ ...nativePointerEventsNone$3,
3375
+ style: [styles.startIcon, webPointerEventsNone$3],
3376
3376
  accessibilityElementsHidden: true,
3377
3377
  importantForAccessibility: "no",
3378
3378
  children: renderIcon(startIcon)
@@ -3394,8 +3394,8 @@ function SelectTrigger({ displayText, isPlaceholder, isOpen, size = "md", color
3394
3394
  size: "small",
3395
3395
  color: iconColor
3396
3396
  }) : showClearButton ? null : endIcon ? /* @__PURE__ */ jsx(View, {
3397
- ...nativePointerEventsNone$4,
3398
- style: [styles.endIcon, webPointerEventsNone$4],
3397
+ ...nativePointerEventsNone$3,
3398
+ style: [styles.endIcon, webPointerEventsNone$3],
3399
3399
  accessibilityElementsHidden: true,
3400
3400
  importantForAccessibility: "no",
3401
3401
  children: renderIcon(endIcon)
@@ -3745,8 +3745,8 @@ const COLLAPSED_SIZE = 8;
3745
3745
  const LINE_ANIMATION_DURATION = 360;
3746
3746
  const SURFACE_ANIMATION_DURATION = 220;
3747
3747
  const easing = Easing?.bezier?.(.22, 1, .36, 1) ?? ((value) => value);
3748
- const nativePointerEventsNone$3 = Platform.OS === "web" ? void 0 : { pointerEvents: "none" };
3749
- const webPointerEventsNone$3 = Platform.OS === "web" ? { pointerEvents: "none" } : void 0;
3748
+ const nativePointerEventsNone$2 = Platform.OS === "web" ? void 0 : { pointerEvents: "none" };
3749
+ const webPointerEventsNone$2 = Platform.OS === "web" ? { pointerEvents: "none" } : void 0;
3750
3750
  const animateValue = (value, toValue, duration) => Animated.timing(value, {
3751
3751
  toValue,
3752
3752
  duration,
@@ -3947,8 +3947,8 @@ const TabsIndicator = ({ children, style }) => {
3947
3947
  return /* @__PURE__ */ jsx(Animated.View, {
3948
3948
  accessibilityElementsHidden: true,
3949
3949
  importantForAccessibility: "no-hide-descendants",
3950
- ...nativePointerEventsNone$3,
3951
- style: [indicatorStyle, webPointerEventsNone$3],
3950
+ ...nativePointerEventsNone$2,
3951
+ style: [indicatorStyle, webPointerEventsNone$2],
3952
3952
  children
3953
3953
  });
3954
3954
  };
@@ -4450,46 +4450,6 @@ const useTooltipContext = () => {
4450
4450
  };
4451
4451
  TooltipContext.displayName = "TooltipContext";
4452
4452
  //#endregion
4453
- //#region src/components/Tooltip/Arrow/TooltipArrow.tsx
4454
- const nativePointerEventsNone$2 = Platform.OS === "web" ? void 0 : { pointerEvents: "none" };
4455
- const webPointerEventsNone$2 = Platform.OS === "web" ? { pointerEvents: "none" } : void 0;
4456
- const TooltipArrow = ({ style }) => {
4457
- const { theme } = useTheme();
4458
- const tooltip = useTooltipContext();
4459
- const size = theme.components.tooltip.arrow.size;
4460
- const side = tooltip.placement.split("-")[0];
4461
- const staticSide = {
4462
- top: "bottom",
4463
- right: "left",
4464
- bottom: "top",
4465
- left: "right"
4466
- }[side];
4467
- const crossAxisStyle = side === "left" || side === "right" ? {
4468
- top: "50%",
4469
- marginTop: -size / 2
4470
- } : {
4471
- left: "50%",
4472
- marginLeft: -size / 2
4473
- };
4474
- return /* @__PURE__ */ jsx(View, {
4475
- ...nativePointerEventsNone$2,
4476
- style: [
4477
- {
4478
- position: "absolute",
4479
- width: size,
4480
- height: size,
4481
- backgroundColor: theme.components.tooltip.arrow.bg,
4482
- transform: [{ rotate: "45deg" }],
4483
- [staticSide]: -size / 2,
4484
- ...crossAxisStyle
4485
- },
4486
- webPointerEventsNone$2,
4487
- style
4488
- ]
4489
- });
4490
- };
4491
- TooltipArrow.displayName = "Tooltip.Arrow";
4492
- //#endregion
4493
4453
  //#region src/components/Tooltip/Tooltip.styles.ts
4494
4454
  const createStyles$3 = (theme) => StyleSheet.create({
4495
4455
  root: { alignSelf: "flex-start" },
@@ -4553,7 +4513,7 @@ const TooltipContent = ({ children, forceMount = false, withArrow = false, style
4553
4513
  children: [Children.map(children, (child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx(Text, {
4554
4514
  style: [styles.text, textStyle],
4555
4515
  children: child
4556
- }) : child), withArrow && /* @__PURE__ */ jsx(TooltipArrow, {})]
4516
+ }) : child), withArrow && /* @__PURE__ */ jsx(InternalArrow, {})]
4557
4517
  });
4558
4518
  if (!visible) return bubble;
4559
4519
  return /* @__PURE__ */ jsx(Modal$1, {
@@ -4569,6 +4529,37 @@ const TooltipContent = ({ children, forceMount = false, withArrow = false, style
4569
4529
  });
4570
4530
  };
4571
4531
  TooltipContent.displayName = "Tooltip.Content";
4532
+ function InternalArrow() {
4533
+ const { theme } = useTheme();
4534
+ const tooltip = useTooltipContext();
4535
+ const size = theme.components.tooltip.arrow.size;
4536
+ const side = tooltip.placement.split("-")[0];
4537
+ const staticSide = {
4538
+ top: "bottom",
4539
+ right: "left",
4540
+ bottom: "top",
4541
+ left: "right"
4542
+ }[side];
4543
+ const crossAxisStyle = side === "left" || side === "right" ? {
4544
+ top: "50%",
4545
+ marginTop: -size / 2
4546
+ } : {
4547
+ left: "50%",
4548
+ marginLeft: -size / 2
4549
+ };
4550
+ return /* @__PURE__ */ jsx(View, {
4551
+ ...nativePointerEventsNone$1,
4552
+ style: [{
4553
+ position: "absolute",
4554
+ width: size,
4555
+ height: size,
4556
+ backgroundColor: theme.components.tooltip.arrow.bg,
4557
+ transform: [{ rotate: "45deg" }],
4558
+ [staticSide]: -size / 2,
4559
+ ...crossAxisStyle
4560
+ }, webPointerEventsNone$1]
4561
+ });
4562
+ }
4572
4563
  //#endregion
4573
4564
  //#region src/components/Tooltip/internal/useTooltipDelay.ts
4574
4565
  const resolveTooltipDelay = (delay) => {
@@ -4708,8 +4699,7 @@ TooltipTrigger.displayName = "Tooltip.Trigger";
4708
4699
  //#region src/components/Tooltip/Tooltip.tsx
4709
4700
  const Tooltip = Object.assign(TooltipRoot, {
4710
4701
  Trigger: TooltipTrigger,
4711
- Content: TooltipContent,
4712
- Arrow: TooltipArrow
4702
+ Content: TooltipContent
4713
4703
  });
4714
4704
  Tooltip.displayName = "Tooltip";
4715
4705
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellira-ui/react-native",
3
- "version": "2.43.1",
3
+ "version": "2.43.3",
4
4
  "description": "React Native components for Vellira Design System",
5
5
  "author": "Roman Bakurov",
6
6
  "license": "MIT",