@faststore/ui 1.3.39 → 1.3.43
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 +41 -0
- package/dist/atoms/Incentive/Incentive.d.ts +11 -0
- package/dist/atoms/Incentive/index.d.ts +2 -0
- package/dist/atoms/Incentive/stories/Incentive.stories.d.ts +4 -0
- package/dist/atoms/Incentive/stories/assets/Icons.d.ts +2 -0
- package/dist/atoms/Link/Link.d.ts +19 -0
- package/dist/atoms/Link/index.d.ts +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/molecules/QuantitySelector/QuantitySelector.d.ts +30 -0
- package/dist/molecules/QuantitySelector/index.d.ts +2 -0
- package/dist/molecules/QuantitySelector/stories/QuantitySelector.stories.d.ts +5 -0
- package/dist/molecules/QuantitySelector/stories/assets/Icons.d.ts +7 -0
- package/dist/typings/PolymorphicGenerics.d.ts +1 -0
- package/dist/typings/index.d.ts +1 -1
- package/dist/ui.cjs.development.js +57 -0
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js +55 -1
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/atoms/Incentive/Incentive.test.tsx +36 -0
- package/src/atoms/Incentive/Incentive.tsx +23 -0
- package/src/atoms/Incentive/index.tsx +2 -0
- package/src/atoms/Incentive/stories/Incentive.mdx +24 -0
- package/src/atoms/Incentive/stories/Incentive.stories.tsx +26 -0
- package/src/atoms/Incentive/stories/assets/Icons.tsx +14 -0
- package/src/atoms/Link/Link.test.tsx +53 -0
- package/src/atoms/Link/Link.tsx +47 -0
- package/src/atoms/Link/index.tsx +2 -0
- package/src/atoms/Link/stories/Link.mdx +35 -0
- package/src/atoms/Link/stories/Link.stories.tsx +30 -0
- package/src/index.ts +9 -0
- package/src/molecules/QuantitySelector/QuantitySelector.test.tsx +93 -0
- package/src/molecules/QuantitySelector/QuantitySelector.tsx +82 -0
- package/src/molecules/QuantitySelector/index.ts +2 -0
- package/src/molecules/QuantitySelector/stories/QuantitySelector.mdx +26 -0
- package/src/molecules/QuantitySelector/stories/QuantitySelector.stories.tsx +77 -0
- package/src/molecules/QuantitySelector/stories/assets/Icons.tsx +52 -0
- package/src/typings/PolymorphicGenerics.ts +5 -0
- package/src/typings/index.ts +1 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
type QuantitySelectorIconProps = {
|
|
4
|
+
color: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function PlusIcon(props: QuantitySelectorIconProps) {
|
|
8
|
+
return (
|
|
9
|
+
<svg
|
|
10
|
+
width="32"
|
|
11
|
+
height="32"
|
|
12
|
+
viewBox="0 0 32 32"
|
|
13
|
+
fill="none"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
>
|
|
16
|
+
<path
|
|
17
|
+
d="M11 16H21"
|
|
18
|
+
stroke={props.color}
|
|
19
|
+
strokeWidth="1.5"
|
|
20
|
+
strokeLinecap="round"
|
|
21
|
+
strokeLinejoin="round"
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
d="M16 11V21"
|
|
25
|
+
stroke={props.color}
|
|
26
|
+
strokeWidth="1.5"
|
|
27
|
+
strokeLinecap="round"
|
|
28
|
+
strokeLinejoin="round"
|
|
29
|
+
/>
|
|
30
|
+
</svg>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function MinusIcon(props: QuantitySelectorIconProps) {
|
|
35
|
+
return (
|
|
36
|
+
<svg
|
|
37
|
+
width="32"
|
|
38
|
+
height="32"
|
|
39
|
+
viewBox="0 0 32 32"
|
|
40
|
+
fill="none"
|
|
41
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
42
|
+
>
|
|
43
|
+
<path
|
|
44
|
+
d="M11 16H21"
|
|
45
|
+
stroke={props.color}
|
|
46
|
+
strokeWidth="1.5"
|
|
47
|
+
strokeLinecap="round"
|
|
48
|
+
strokeLinejoin="round"
|
|
49
|
+
/>
|
|
50
|
+
</svg>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
@@ -44,3 +44,8 @@ export type PolymorphicComponentPropsWithRef<
|
|
|
44
44
|
C extends ElementType,
|
|
45
45
|
P = Record<string, never>
|
|
46
46
|
> = PolymorphicComponentProps<C, P> & { ref?: ComponentPropsWithRef<C>['ref'] }
|
|
47
|
+
|
|
48
|
+
// Extract the `ref` prop from a polymorphic component
|
|
49
|
+
export type PolymorphicRef<
|
|
50
|
+
C extends ElementType
|
|
51
|
+
> = PolymorphicComponentPropsWithRef<C>['ref']
|