@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/CHANGELOG.md +30 -0
- package/dist/atoms/Spinner/Spinner.d.ts +3 -1
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/atoms/Slider/Slider.tsx +1 -1
- package/src/atoms/Spinner/Spinner.tsx +8 -8
- package/src/molecules/Carousel/Carousel.tsx +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/ui",
|
|
3
|
-
"version": "1.
|
|
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": "
|
|
92
|
+
"gitHead": "830f839f0d3ca50c1d54c8c1efa8d8aecef3db92"
|
|
93
93
|
}
|
|
@@ -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
|
|
11
|
-
{ children, testId = 'store-spinner', ...otherProps },
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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(
|
|
87
|
+
const slides = preRenderedSlides.concat(
|
|
88
|
+
(children as any) ?? [],
|
|
89
|
+
postRenderedSlides
|
|
90
|
+
)
|
|
88
91
|
|
|
89
92
|
const slidePrevious = () => {
|
|
90
93
|
if (
|