@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.
Files changed (41) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/atoms/Incentive/Incentive.d.ts +11 -0
  3. package/dist/atoms/Incentive/index.d.ts +2 -0
  4. package/dist/atoms/Incentive/stories/Incentive.stories.d.ts +4 -0
  5. package/dist/atoms/Incentive/stories/assets/Icons.d.ts +2 -0
  6. package/dist/atoms/Link/Link.d.ts +19 -0
  7. package/dist/atoms/Link/index.d.ts +2 -0
  8. package/dist/index.d.ts +6 -0
  9. package/dist/molecules/QuantitySelector/QuantitySelector.d.ts +30 -0
  10. package/dist/molecules/QuantitySelector/index.d.ts +2 -0
  11. package/dist/molecules/QuantitySelector/stories/QuantitySelector.stories.d.ts +5 -0
  12. package/dist/molecules/QuantitySelector/stories/assets/Icons.d.ts +7 -0
  13. package/dist/typings/PolymorphicGenerics.d.ts +1 -0
  14. package/dist/typings/index.d.ts +1 -1
  15. package/dist/ui.cjs.development.js +57 -0
  16. package/dist/ui.cjs.development.js.map +1 -1
  17. package/dist/ui.cjs.production.min.js +1 -1
  18. package/dist/ui.cjs.production.min.js.map +1 -1
  19. package/dist/ui.esm.js +55 -1
  20. package/dist/ui.esm.js.map +1 -1
  21. package/package.json +3 -3
  22. package/src/atoms/Incentive/Incentive.test.tsx +36 -0
  23. package/src/atoms/Incentive/Incentive.tsx +23 -0
  24. package/src/atoms/Incentive/index.tsx +2 -0
  25. package/src/atoms/Incentive/stories/Incentive.mdx +24 -0
  26. package/src/atoms/Incentive/stories/Incentive.stories.tsx +26 -0
  27. package/src/atoms/Incentive/stories/assets/Icons.tsx +14 -0
  28. package/src/atoms/Link/Link.test.tsx +53 -0
  29. package/src/atoms/Link/Link.tsx +47 -0
  30. package/src/atoms/Link/index.tsx +2 -0
  31. package/src/atoms/Link/stories/Link.mdx +35 -0
  32. package/src/atoms/Link/stories/Link.stories.tsx +30 -0
  33. package/src/index.ts +9 -0
  34. package/src/molecules/QuantitySelector/QuantitySelector.test.tsx +93 -0
  35. package/src/molecules/QuantitySelector/QuantitySelector.tsx +82 -0
  36. package/src/molecules/QuantitySelector/index.ts +2 -0
  37. package/src/molecules/QuantitySelector/stories/QuantitySelector.mdx +26 -0
  38. package/src/molecules/QuantitySelector/stories/QuantitySelector.stories.tsx +77 -0
  39. package/src/molecules/QuantitySelector/stories/assets/Icons.tsx +52 -0
  40. package/src/typings/PolymorphicGenerics.ts +5 -0
  41. 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']
@@ -1,4 +1,5 @@
1
1
  export type {
2
2
  PolymorphicComponentProps,
3
3
  PolymorphicComponentPropsWithRef,
4
+ PolymorphicRef,
4
5
  } from './PolymorphicGenerics'