fluent-styles 1.62.5 → 1.62.7

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.
Files changed (132) hide show
  1. package/lib/commonjs/badge/index.js +8 -13
  2. package/lib/commonjs/badge/index.js.map +1 -1
  3. package/lib/commonjs/button/index.js +3 -4
  4. package/lib/commonjs/button/index.js.map +1 -1
  5. package/lib/commonjs/card/index.js +15 -23
  6. package/lib/commonjs/card/index.js.map +1 -1
  7. package/lib/commonjs/checkBox/index.js +3 -5
  8. package/lib/commonjs/checkBox/index.js.map +1 -1
  9. package/lib/commonjs/circularProgress/index.js +83 -102
  10. package/lib/commonjs/circularProgress/index.js.map +1 -1
  11. package/lib/commonjs/dropdown/index.js +6 -10
  12. package/lib/commonjs/dropdown/index.js.map +1 -1
  13. package/lib/commonjs/header/index.js +55 -59
  14. package/lib/commonjs/header/index.js.map +1 -1
  15. package/lib/commonjs/image/index.js +3 -5
  16. package/lib/commonjs/image/index.js.map +1 -1
  17. package/lib/commonjs/index.js +0 -7
  18. package/lib/commonjs/index.js.map +1 -1
  19. package/lib/commonjs/input/index.js +3 -5
  20. package/lib/commonjs/input/index.js.map +1 -1
  21. package/lib/commonjs/page/index.js +4 -20
  22. package/lib/commonjs/page/index.js.map +1 -1
  23. package/lib/commonjs/safeAreaView/index.js +0 -4
  24. package/lib/commonjs/safeAreaView/index.js.map +1 -1
  25. package/lib/commonjs/seperator/index.js +3 -5
  26. package/lib/commonjs/seperator/index.js.map +1 -1
  27. package/lib/commonjs/shape/cycle.js +3 -5
  28. package/lib/commonjs/shape/cycle.js.map +1 -1
  29. package/lib/commonjs/shape/index.js +3 -6
  30. package/lib/commonjs/shape/index.js.map +1 -1
  31. package/lib/commonjs/slider/index.js +22 -72
  32. package/lib/commonjs/slider/index.js.map +1 -1
  33. package/lib/commonjs/spinner/index.js +11 -17
  34. package/lib/commonjs/spinner/index.js.map +1 -1
  35. package/lib/commonjs/tabBar/TabBar.js +139 -87
  36. package/lib/commonjs/tabBar/TabBar.js.map +1 -1
  37. package/lib/commonjs/utiles/styled.js +11 -14
  38. package/lib/commonjs/utiles/styled.js.map +1 -1
  39. package/lib/module/badge/index.js +8 -10
  40. package/lib/module/badge/index.js.map +1 -1
  41. package/lib/module/button/index.js +3 -4
  42. package/lib/module/button/index.js.map +1 -1
  43. package/lib/module/card/index.js +15 -20
  44. package/lib/module/card/index.js.map +1 -1
  45. package/lib/module/checkBox/index.js +4 -5
  46. package/lib/module/checkBox/index.js.map +1 -1
  47. package/lib/module/circularProgress/index.js +84 -103
  48. package/lib/module/circularProgress/index.js.map +1 -1
  49. package/lib/module/dropdown/index.js +7 -9
  50. package/lib/module/dropdown/index.js.map +1 -1
  51. package/lib/module/header/index.js +48 -52
  52. package/lib/module/header/index.js.map +1 -1
  53. package/lib/module/image/index.js +3 -4
  54. package/lib/module/image/index.js.map +1 -1
  55. package/lib/module/index.js +1 -1
  56. package/lib/module/index.js.map +1 -1
  57. package/lib/module/input/index.js +4 -5
  58. package/lib/module/input/index.js.map +1 -1
  59. package/lib/module/page/index.js +4 -21
  60. package/lib/module/page/index.js.map +1 -1
  61. package/lib/module/safeAreaView/index.js +0 -4
  62. package/lib/module/safeAreaView/index.js.map +1 -1
  63. package/lib/module/seperator/index.js +3 -4
  64. package/lib/module/seperator/index.js.map +1 -1
  65. package/lib/module/shape/cycle.js +3 -4
  66. package/lib/module/shape/cycle.js.map +1 -1
  67. package/lib/module/shape/index.js +3 -6
  68. package/lib/module/shape/index.js.map +1 -1
  69. package/lib/module/slider/index.js +22 -72
  70. package/lib/module/slider/index.js.map +1 -1
  71. package/lib/module/spinner/index.js +10 -13
  72. package/lib/module/spinner/index.js.map +1 -1
  73. package/lib/module/tabBar/TabBar.js +140 -88
  74. package/lib/module/tabBar/TabBar.js.map +1 -1
  75. package/lib/module/utiles/styled.js +10 -13
  76. package/lib/module/utiles/styled.js.map +1 -1
  77. package/lib/typescript/badge/index.d.ts +4 -13
  78. package/lib/typescript/badge/index.d.ts.map +1 -1
  79. package/lib/typescript/button/index.d.ts +4 -12
  80. package/lib/typescript/button/index.d.ts.map +1 -1
  81. package/lib/typescript/card/index.d.ts +8 -37
  82. package/lib/typescript/card/index.d.ts.map +1 -1
  83. package/lib/typescript/checkBox/index.d.ts +1 -12
  84. package/lib/typescript/checkBox/index.d.ts.map +1 -1
  85. package/lib/typescript/circularProgress/index.d.ts +5 -4
  86. package/lib/typescript/circularProgress/index.d.ts.map +1 -1
  87. package/lib/typescript/dialog/index.d.ts +1 -6
  88. package/lib/typescript/dialog/index.d.ts.map +1 -1
  89. package/lib/typescript/divider/index.d.ts +1 -6
  90. package/lib/typescript/divider/index.d.ts.map +1 -1
  91. package/lib/typescript/dropdown/index.d.ts +2 -12
  92. package/lib/typescript/dropdown/index.d.ts.map +1 -1
  93. package/lib/typescript/header/index.d.ts +6 -6
  94. package/lib/typescript/header/index.d.ts.map +1 -1
  95. package/lib/typescript/image/index.d.ts +2 -9
  96. package/lib/typescript/image/index.d.ts.map +1 -1
  97. package/lib/typescript/index.d.ts +1 -1
  98. package/lib/typescript/index.d.ts.map +1 -1
  99. package/lib/typescript/input/index.d.ts +1 -12
  100. package/lib/typescript/input/index.d.ts.map +1 -1
  101. package/lib/typescript/page/index.d.ts +7 -17
  102. package/lib/typescript/page/index.d.ts.map +1 -1
  103. package/lib/typescript/pressable/index.d.ts +1 -6
  104. package/lib/typescript/pressable/index.d.ts.map +1 -1
  105. package/lib/typescript/safeAreaProvider/index.d.ts +1 -6
  106. package/lib/typescript/safeAreaProvider/index.d.ts.map +1 -1
  107. package/lib/typescript/safeAreaView/index.d.ts +1 -6
  108. package/lib/typescript/safeAreaView/index.d.ts.map +1 -1
  109. package/lib/typescript/scrollView/index.d.ts +1 -6
  110. package/lib/typescript/scrollView/index.d.ts.map +1 -1
  111. package/lib/typescript/seperator/index.d.ts +2 -7
  112. package/lib/typescript/seperator/index.d.ts.map +1 -1
  113. package/lib/typescript/shape/cycle.d.ts +2 -12
  114. package/lib/typescript/shape/cycle.d.ts.map +1 -1
  115. package/lib/typescript/shape/index.d.ts +2 -7
  116. package/lib/typescript/shape/index.d.ts.map +1 -1
  117. package/lib/typescript/slider/index.d.ts +5 -27
  118. package/lib/typescript/slider/index.d.ts.map +1 -1
  119. package/lib/typescript/spacer/index.d.ts +1 -6
  120. package/lib/typescript/spacer/index.d.ts.map +1 -1
  121. package/lib/typescript/spinner/index.d.ts +3 -18
  122. package/lib/typescript/spinner/index.d.ts.map +1 -1
  123. package/lib/typescript/stack/index.d.ts +3 -18
  124. package/lib/typescript/stack/index.d.ts.map +1 -1
  125. package/lib/typescript/tabBar/TabBar.d.ts.map +1 -1
  126. package/lib/typescript/text/index.d.ts +1 -6
  127. package/lib/typescript/text/index.d.ts.map +1 -1
  128. package/lib/typescript/utiles/styled.d.ts +1 -6
  129. package/lib/typescript/utiles/styled.d.ts.map +1 -1
  130. package/package.json +1 -1
  131. package/src/header/index.tsx +1 -1
  132. package/src/slider/index.tsx +77 -29
@@ -5,12 +5,7 @@ type ShapeVariants = {
5
5
  size?: string | number | [string | number, ViewStyle];
6
6
  };
7
7
  type ShapeProps = ShapeVariants & ViewProps & ViewStyle;
8
- declare const StyledShape: {
9
- (props: ShapeVariants & ViewProps & ViewStyle & {
10
- ref?: import("react").Ref<any> | undefined;
11
- }): import("react").JSX.Element;
12
- displayName: string;
13
- };
14
- export { StyledShape, StyledShape as StyleShape };
8
+ declare const StyleShape: import("react").ForwardRefExoticComponent<ShapeVariants & ViewProps & ViewStyle & import("react").RefAttributes<any>>;
9
+ export { StyleShape };
15
10
  export type { ShapeProps };
16
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shape/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI1D,KAAK,aAAa,GAAG;IACjB,KAAK,CAAC,EAAE,OAAO,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,SAAS,CAAC,CAAC;CACzD,CAAC;AAEF,KAAK,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAExD,QAAA,MAAM,WAAW;;;;;CAyBf,CAAC;AAGH,OAAO,EAAE,WAAW,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shape/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG1D,KAAK,aAAa,GAAG;IACjB,KAAK,CAAC,EAAE,OAAO,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,SAAS,CAAC,CAAC;CACzD,CAAC;AAEF,KAAK,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAExD,QAAA,MAAM,UAAU,uHAuBd,CAAC;AAEH,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -10,33 +10,11 @@
10
10
  * • gradient — gradient-filled track
11
11
  * • buffer — primary thumb + secondary buffer fill (media player style)
12
12
  *
13
- * FIX (v1.1):
14
- * The previous version had a useEffect(() => setLocalLow(value), [value])
15
- * that created a feedback loop when used as a controlled component:
16
- * onValueChange setState re-render value prop changes
17
- * useEffect fires setLocalLow resets thumb snaps back
18
- *
19
- * Fix strategy:
20
- * 1. useEffect only fires on MOUNT (empty dep array) — sets initial position once
21
- * 2. External value changes are ignored while dragging (dragging ref guard)
22
- * 3. External value changes ARE applied when not dragging (programmatic updates work)
23
- * 4. onValueChange fires continuously during drag (for live display updates)
24
- * 5. onSlidingComplete fires once on finger lift (for committing to state)
25
- *
26
- * Correct usage in parent (controlled, live display):
27
- * const displayRef = useRef(initialValue) // never causes re-render
28
- * const [display, setDisplay] = useState(initialValue)
29
- * <StyledSlider
30
- * value={initialValue} // ← frozen, never updated
31
- * onValueChange={v => { displayRef.current = v; setDisplay(v) }}
32
- * onSlidingComplete={v => commitToState(v)}
33
- * />
34
- *
35
- * Simplest usage (fire-and-forget):
36
- * <StyledSlider
37
- * value={28}
38
- * onSlidingComplete={v => saveValue(v)}
39
- * />
13
+ * Tooltip fix (three-layer layout):
14
+ * Track fill lives in its own overflow:hidden View
15
+ * Thumbs + tooltips live in a sibling overflow:visible wrapper
16
+ * SVG <Path> triangle pointer never clips, always sharp
17
+ * useNativeDriver: false for tooltipAnim so text colour renders correctly on iOS
40
18
  */
41
19
  import React from "react";
42
20
  export type SliderVariant = "default" | "range" | "stepped" | "gradient" | "buffer";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/slider/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAaxE,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,OAAO,GACP,SAAS,GACT,UAAU,GACV,QAAQ,CAAC;AACb,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC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AK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD;AAiSD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA6QpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -2,12 +2,7 @@
2
2
  import { ViewProps } from 'react-native';
3
3
  import { ViewStyleProps } from '../utiles/viewStyleProps';
4
4
  type SpacerProps = ViewProps & (Pick<ViewStyleProps, 'margin' | 'marginTop' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginHorizontal' | 'marginVertical' | 'backgroundColor' | 'borderRadius' | 'borderWidth' | 'borderColor' | 'flex' | 'width' | 'height'>);
5
- declare const StyledSpacer: {
6
- (props: ViewProps & Pick<ViewStyleProps, "flex" | "backgroundColor" | "borderColor" | "borderRadius" | "borderWidth" | "height" | "margin" | "marginBottom" | "marginHorizontal" | "marginLeft" | "marginRight" | "marginTop" | "marginVertical" | "width"> & {
7
- ref?: import("react").Ref<any> | undefined;
8
- }): import("react").JSX.Element;
9
- displayName: string;
10
- };
5
+ declare const StyledSpacer: import("react").ForwardRefExoticComponent<ViewProps & Pick<ViewStyleProps, "flex" | "backgroundColor" | "borderColor" | "borderRadius" | "borderWidth" | "height" | "margin" | "marginBottom" | "marginHorizontal" | "marginLeft" | "marginRight" | "marginTop" | "marginVertical" | "width"> & import("react").RefAttributes<any>>;
11
6
  export { StyledSpacer };
12
7
  export type { SpacerProps };
13
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/spacer/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAa,MAAM,0BAA0B,CAAC;AAErE,KAAK,WAAW,GAAI,SAAS,GAAG,CAAC,IAAI,CAAC,cAAc,EAChD,QAAQ,GACR,WAAW,GACX,cAAc,GACd,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,MAAM,GACN,OAAO,GACP,QAAQ,CAAC,CAAC,CAAC;AAEf,QAAA,MAAM,YAAY;;;;;CAIhB,CAAC;AAEH,OAAO,EAAG,YAAY,EAAE,CAAC;AACzB,YAAY,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/spacer/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAa,MAAM,0BAA0B,CAAC;AAErE,KAAK,WAAW,GAAI,SAAS,GAAG,CAAC,IAAI,CAAC,cAAc,EAChD,QAAQ,GACR,WAAW,GACX,cAAc,GACd,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,MAAM,GACN,OAAO,GACP,QAAQ,CAAC,CAAC,CAAC;AAEf,QAAA,MAAM,YAAY,qUAIhB,CAAC;AAEH,OAAO,EAAG,YAAY,EAAE,CAAC;AACzB,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -37,12 +37,7 @@ declare const variantConfig: Record<'default' | 'primary' | 'success' | 'warning
37
37
  * - Theme integration
38
38
  * - Accessibility support
39
39
  */
40
- declare const StyledSpinner: {
41
- ({ size, variant, color, overlay, overlayColor, label, labelColor, labelSize, accessibilityLabel, ref, ...rest }: SpinnerProps & {
42
- ref?: React.Ref<any> | undefined;
43
- }): React.JSX.Element;
44
- displayName: string;
45
- };
40
+ declare const StyledSpinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<any>>;
46
41
  /**
47
42
  * Props for SpinnerContainer - Full-screen loading overlay with backdrop
48
43
  */
@@ -57,12 +52,7 @@ interface SpinnerContainerProps extends Omit<SpinnerProps, 'ref' | 'overlay'> {
57
52
  *
58
53
  * Use for: Page loading, data fetching, async operations
59
54
  */
60
- declare const SpinnerContainer: {
61
- ({ isVisible, size, variant, color, backdropColor, message, labelColor, labelSize, onBackdropPress, ref, ...rest }: SpinnerContainerProps & {
62
- ref?: React.Ref<any> | undefined;
63
- }): React.JSX.Element | null;
64
- displayName: string;
65
- };
55
+ declare const SpinnerContainer: React.ForwardRefExoticComponent<SpinnerContainerProps & React.RefAttributes<any>>;
66
56
  /**
67
57
  * Props for InlineSpinner - Spinner with text in a row
68
58
  */
@@ -76,12 +66,7 @@ interface InlineSpinnerProps extends Omit<SpinnerProps, 'overlay'> {
76
66
  *
77
67
  * Use for: Button loading states, inline operations, compact loading indicators
78
68
  */
79
- declare const InlineSpinner: {
80
- ({ size, variant, color, text, labelColor, labelSize, direction, gap, accessibilityLabel, ref, ...rest }: InlineSpinnerProps & {
81
- ref?: React.Ref<any> | undefined;
82
- }): React.JSX.Element;
83
- displayName: string;
84
- };
69
+ declare const InlineSpinner: React.ForwardRefExoticComponent<InlineSpinnerProps & React.RefAttributes<any>>;
85
70
  /**
86
71
  * Exports
87
72
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/spinner/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,s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,QAAA,MAAM,aAAa,EAAE,MAAM,CACzB,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,EACxD;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAsBjC,CAAC;AAWF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,aAAa,0EAqFlB,CAAC;AAIF;;GAEG;AACH,UAAU,qBAAsB,SAAQ,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,SAAS,CAAC;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,mFAsFrB,CAAC;AAIF;;GAEG;AACH,UAAU,kBAAmB,SAAQ,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,QAAA,MAAM,aAAa,gFA+ClB,CAAC;AAIF;;GAEG;AACH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,UAAU,EACV,aAAa,GACd,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -16,24 +16,9 @@ type StackProps = StackVariants & ViewProps & ViewStyle;
16
16
  * Default: neutral layout (no flex direction preset)
17
17
  * Use horizontal or vertical variants to set flex direction
18
18
  */
19
- declare const Stack: {
20
- (props: StackVariants & ViewProps & ViewStyle & {
21
- ref?: import("react").Ref<any> | undefined;
22
- }): import("react").JSX.Element;
23
- displayName: string;
24
- };
25
- declare const XStack: {
26
- (props: Omit<StackProps, "horizontal" | "vertical"> & {
27
- ref?: import("react").Ref<any> | undefined;
28
- }): import("react").JSX.Element;
29
- displayName: string;
30
- };
31
- declare const YStack: {
32
- (props: Omit<StackProps, "horizontal" | "vertical"> & {
33
- ref?: import("react").Ref<any> | undefined;
34
- }): import("react").JSX.Element;
35
- displayName: string;
36
- };
19
+ declare const Stack: import("react").ForwardRefExoticComponent<StackVariants & ViewProps & ViewStyle & import("react").RefAttributes<any>>;
20
+ declare const XStack: import("react").ForwardRefExoticComponent<Omit<StackProps, "horizontal" | "vertical"> & import("react").RefAttributes<any>>;
21
+ declare const YStack: import("react").ForwardRefExoticComponent<Omit<StackProps, "horizontal" | "vertical"> & import("react").RefAttributes<any>>;
37
22
  export { Stack, XStack, YStack };
38
23
  export type { StackProps };
39
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stack/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG1D;;;;;GAKG;AACH,KAAK,aAAa,GAAG;IACjB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;CAC7C,CAAC;AAEF,KAAK,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAExD;;;;GAIG;AACH,QAAA,MAAM,KAAK;;;;;CAkBT,CAAC;AAEH,QAAA,MAAM,MAAM;;;;;CAKV,CAAC;AAEH,QAAA,MAAM,MAAM;;;;;CAKV,CAAC;AAEH,OAAO,EAAG,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stack/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG1D;;;;;GAKG;AACH,KAAK,aAAa,GAAG;IACjB,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;CAC7C,CAAC;AAEF,KAAK,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAExD;;;;GAIG;AACH,QAAA,MAAM,KAAK,uHAkBT,CAAC;AAEH,QAAA,MAAM,MAAM,6HAKV,CAAC;AAEH,QAAA,MAAM,MAAM,6HAKV,CAAC;AAEH,OAAO,EAAG,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../src/tabBar/TabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAA;AAWd,OAAO,EAKL,KAAK,WAAW,EAEhB,KAAK,QAAQ,EACd,MAAM,aAAa,CAAA;AAyWpB,eAAO,MAAM,MAAM,6CAEd,MAAM,GAAG,QAAQ,CAAA"}
1
+ {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../src/tabBar/TabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAA;AAad,OAAO,EAKL,KAAK,WAAW,EAEhB,KAAK,QAAQ,EACd,MAAM,aAAa,CAAA;AAwdpB,eAAO,MAAM,MAAM,6CAEd,MAAM,GAAG,QAAQ,CAAA"}
@@ -10,12 +10,7 @@ type TextVariants = {
10
10
  link?: boolean;
11
11
  };
12
12
  type StyledTextProps = TextVariants & TextProps & TextStyle;
13
- declare const StyledText: {
14
- (props: TextVariants & TextProps & TextStyle & {
15
- ref?: import("react").Ref<any> | undefined;
16
- }): import("react").JSX.Element;
17
- displayName: string;
18
- };
13
+ declare const StyledText: import("react").ForwardRefExoticComponent<TextVariants & TextProps & TextStyle & import("react").RefAttributes<any>>;
19
14
  export { StyledText };
20
15
  export type { StyledTextProps };
21
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/text/index.ts"],"names":[],"mappings":";AACA,OAAO,EAEH,SAAS,EACT,SAAS,EACZ,MAAM,cAAc,CAAC;AAItB,KAAK,YAAY,GAAG;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAE;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,eAAe,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAE5D,QAAA,MAAM,UAAU;;;;;CAgDd,CAAC;AAEH,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/text/index.ts"],"names":[],"mappings":";AACA,OAAO,EAEH,SAAS,EACT,SAAS,EACZ,MAAM,cAAc,CAAC;AAItB,KAAK,YAAY,GAAG;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAE;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,eAAe,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAE5D,QAAA,MAAM,UAAU,sHAgDd,CAAC;AAEH,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -9,11 +9,6 @@ interface StyledOptions {
9
9
  } | ((selected: string, options: any) => Style);
10
10
  };
11
11
  }
12
- declare const styled: <P extends object>(Component: React.ComponentType<P>, { base, variants }?: StyledOptions) => {
13
- (props: P & {
14
- ref?: React.Ref<any> | undefined;
15
- }): React.JSX.Element;
16
- displayName: string;
17
- };
12
+ declare const styled: <P extends object>(Component: React.ComponentType<P>, { base, variants }?: StyledOptions) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
18
13
  export { styled };
19
14
  //# sourceMappingURL=styled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/utiles/styled.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEhE,KAAK,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEhD,UAAU,aAAa;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE;QACP,CAAC,GAAG,EAAE,MAAM,GAAG;YACX,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,KAAK,CAAC,CAAC;SAC1E,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,KAAK,CAAC,CAAC;KACnD,CAAC;CACL;AAED,QAAA,MAAM,MAAM,6EAEY,aAAa;;;;;CA+BpC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/utiles/styled.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,aAAa,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEhE,KAAK,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEhD,UAAU,aAAa;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE;QACP,CAAC,GAAG,EAAE,MAAM,GAAG;YACX,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,KAAK,CAAC,CAAC;SAC1E,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,KAAK,CAAC,CAAC;KACnD,CAAC;CACL;AAED,QAAA,MAAM,MAAM,6EAEY,aAAa,yFA4BpC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fluent-styles",
3
3
  "description": "Develop different styled versions of UI components.",
4
- "version": "1.62.5",
4
+ "version": "1.62.7",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
7
7
  "react-native": "src/index.ts",
@@ -155,7 +155,7 @@ const HeaderComponent = ({
155
155
  )}
156
156
  {
157
157
  rightIcon && (
158
- <> {rightIcon}</>
158
+ <>{rightIcon}</>
159
159
  )
160
160
  }
161
161
 
@@ -247,71 +247,119 @@ const Thumb: React.FC<ThumbProps> = ({
247
247
  onMove,
248
248
  onEnd,
249
249
  }) => {
250
- const scaleAnim = useRef(new Animated.Value(1)).current;
251
- const tooltipAnim = useRef(new Animated.Value(alwaysTooltip ? 1 : 0)).current;
252
- const dragging = useRef(false);
250
+ const scaleAnim = useRef(new Animated.Value(1)).current
251
+ const tooltipAnim = useRef(new Animated.Value(alwaysTooltip ? 1 : 0)).current
252
+ const dragging = useRef(false)
253
+
254
+ const latestTrackWidth = useRef(trackWidth)
255
+ const latestOnMove = useRef(onMove)
256
+ const latestOnEnd = useRef(onEnd)
257
+ const latestOnStart = useRef(onStart)
258
+
259
+ const startFractionRef = useRef(position)
260
+
261
+ useEffect(() => {
262
+ latestTrackWidth.current = trackWidth
263
+ }, [trackWidth])
264
+
265
+ useEffect(() => {
266
+ latestOnMove.current = onMove
267
+ }, [onMove])
268
+
269
+ useEffect(() => {
270
+ latestOnEnd.current = onEnd
271
+ }, [onEnd])
272
+
273
+ useEffect(() => {
274
+ latestOnStart.current = onStart
275
+ }, [onStart])
276
+
277
+ useEffect(() => {
278
+ if (!dragging.current) {
279
+ startFractionRef.current = position
280
+ }
281
+ }, [position])
253
282
 
254
283
  const animateIn = () => {
255
284
  Animated.parallel([
256
- Animated.spring(scaleAnim, { toValue: 1.2, useNativeDriver: true }),
285
+ Animated.spring(scaleAnim, {
286
+ toValue: 1.2,
287
+ useNativeDriver: true,
288
+ }),
257
289
  Animated.timing(tooltipAnim, {
258
290
  toValue: 1,
259
291
  duration: 150,
260
292
  easing: Easing.out(Easing.ease),
261
293
  useNativeDriver: false,
262
294
  }),
263
- ]).start();
264
- };
295
+ ]).start()
296
+ }
265
297
 
266
298
  const animateOut = () => {
267
299
  Animated.parallel([
268
- Animated.spring(scaleAnim, { toValue: 1, useNativeDriver: true }),
300
+ Animated.spring(scaleAnim, {
301
+ toValue: 1,
302
+ useNativeDriver: true,
303
+ }),
269
304
  Animated.timing(tooltipAnim, {
270
305
  toValue: alwaysTooltip ? 1 : 0,
271
306
  duration: 150,
272
307
  useNativeDriver: false,
273
308
  }),
274
- ]).start();
275
- };
309
+ ]).start()
310
+ }
276
311
 
277
312
  const panResponder = useRef(
278
313
  PanResponder.create({
279
314
  onStartShouldSetPanResponder: () => !disabled,
280
315
  onMoveShouldSetPanResponder: () => !disabled,
316
+
281
317
  onPanResponderGrant: () => {
282
- dragging.current = true;
283
- onStart();
284
- if (showTooltip) animateIn();
318
+ dragging.current = true
319
+ startFractionRef.current = position
320
+ latestOnStart.current?.()
321
+ if (showTooltip) animateIn()
285
322
  },
323
+
286
324
  onPanResponderMove: (_, gs: PanResponderGestureState) => {
287
- if (!dragging.current || trackWidth <= 0) return;
288
- const newFraction = clamp(position + gs.dx / trackWidth, 0, 1);
289
- onMove(newFraction);
325
+ const width = latestTrackWidth.current
326
+ if (!dragging.current || width <= 0) return
327
+
328
+ const newFraction = clamp(
329
+ startFractionRef.current + gs.dx / width,
330
+ 0,
331
+ 1
332
+ )
333
+
334
+ latestOnMove.current?.(newFraction)
290
335
  },
336
+
291
337
  onPanResponderRelease: () => {
292
- dragging.current = false;
293
- onEnd();
294
- animateOut();
338
+ dragging.current = false
339
+ latestOnEnd.current?.()
340
+ animateOut()
295
341
  },
342
+
296
343
  onPanResponderTerminate: () => {
297
- dragging.current = false;
298
- animateOut();
344
+ dragging.current = false
345
+ latestOnEnd.current?.()
346
+ animateOut()
299
347
  },
300
- }),
301
- ).current;
348
+ })
349
+ ).current
302
350
 
303
- const left = position * trackWidth - thumbD / 2;
351
+ const left = position * trackWidth - thumbD / 2
304
352
 
305
353
  return (
306
354
  <Animated.View
307
355
  {...panResponder.panHandlers}
308
356
  style={{
309
- position: "absolute",
357
+ position: 'absolute',
310
358
  left,
311
359
  top: 0,
312
360
  width: thumbD,
313
361
  height: thumbD,
314
- overflow: "visible",
362
+ overflow: 'visible',
315
363
  transform: [{ scale: scaleAnim }],
316
364
  }}
317
365
  >
@@ -331,7 +379,7 @@ const Thumb: React.FC<ThumbProps> = ({
331
379
  borderRadius: thumbD / 2,
332
380
  backgroundColor: color,
333
381
  borderWidth: 2,
334
- borderColor: borderColor,
382
+ borderColor,
335
383
  shadowColor: borderColor,
336
384
  shadowOpacity: 0.25,
337
385
  shadowRadius: 6,
@@ -340,8 +388,8 @@ const Thumb: React.FC<ThumbProps> = ({
340
388
  }}
341
389
  />
342
390
  </Animated.View>
343
- );
344
- };
391
+ )
392
+ }
345
393
 
346
394
  // ─── Gradient fill ────────────────────────────────────────────────────────────
347
395
 
@@ -444,7 +492,7 @@ export const StyledSlider: React.FC<StyledSliderProps> = ({
444
492
  if (bufferValue !== undefined) setBufLocal(bufferValue);
445
493
  }, [bufferValue]);
446
494
 
447
- const range = max - min;
495
+ const range = Math.max(max - min, 1);
448
496
  const lowF = clamp((localLow - min) / range, 0, 1);
449
497
  const highF = clamp((localHigh - min) / range, 0, 1);
450
498
  const bufF = clamp((bufLocal - min) / range, 0, 1);