@faststore/ui 1.8.52 → 1.9.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/ui",
3
- "version": "1.8.52",
3
+ "version": "1.9.4",
4
4
  "description": "A lightweight, framework agnostic component library for React",
5
5
  "author": "emersonlaurentino",
6
6
  "license": "MIT",
@@ -89,5 +89,5 @@
89
89
  "tsdx": "^0.14.1",
90
90
  "typescript": "^4.2.4"
91
91
  },
92
- "gitHead": "3d9c06662ab85ef52c457aa0c7418625e966bf9b"
92
+ "gitHead": "830f839f0d3ca50c1d54c8c1efa8d8aecef3db92"
93
93
  }
@@ -49,7 +49,7 @@ const Slider = ({
49
49
  const range = useRef<HTMLDivElement>(null)
50
50
 
51
51
  const getPercent = useCallback(
52
- (value) => Math.round(((value - min) / (max - min)) * 100),
52
+ (value: number) => Math.round(((value - min) / (max - min)) * 100),
53
53
  [min, max]
54
54
  )
55
55
 
@@ -1,3 +1,4 @@
1
+ import type { PropsWithChildren } from 'react'
1
2
  import React, { forwardRef } from 'react'
2
3
 
3
4
  export type SpinnerProps = {
@@ -7,13 +8,12 @@ export type SpinnerProps = {
7
8
  testId?: string
8
9
  }
9
10
 
10
- const Spinner = forwardRef<HTMLDivElement, SpinnerProps>(function Spinner(
11
- { children, testId = 'store-spinner', ...otherProps },
12
- ref
13
- ) {
14
- return (
15
- <span ref={ref} data-store-spinner data-testid={testId} {...otherProps} />
16
- )
17
- })
11
+ const Spinner = forwardRef<HTMLDivElement, PropsWithChildren<SpinnerProps>>(
12
+ function Spinner({ children, testId = 'store-spinner', ...otherProps }, ref) {
13
+ return (
14
+ <span ref={ref} data-store-spinner data-testid={testId} {...otherProps} />
15
+ )
16
+ }
17
+ )
18
18
 
19
19
  export default Spinner
@@ -84,7 +84,10 @@ function Carousel({
84
84
  const preRenderedSlides =
85
85
  infiniteMode && children ? childrenArray.slice(childrenCount - 1) : []
86
86
 
87
- const slides = preRenderedSlides.concat(children ?? [], postRenderedSlides)
87
+ const slides = preRenderedSlides.concat(
88
+ (children as any) ?? [],
89
+ postRenderedSlides
90
+ )
88
91
 
89
92
  const slidePrevious = () => {
90
93
  if (