@faststore/ui 2.0.61-alpha.0 → 2.0.62-alpha.0

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/dist/index.d.ts CHANGED
@@ -21,8 +21,6 @@ export { default as Carousel } from './components/molecules/Carousel';
21
21
  export type { CarouselProps } from './components/molecules/Carousel';
22
22
  export { default as Banner, BannerContent, BannerImage, BannerLink, } from './components/molecules/Banner';
23
23
  export type { BannerProps, BannerContentProps, BannerImageProps, BannerLinkProps, } from './components/molecules/Banner';
24
- export { default as PaymentMethods } from './components/molecules/PaymentMethods';
25
- export type { PaymentMethodsProps } from './components/molecules/PaymentMethods';
26
24
  export { default as Breadcrumb } from './components/molecules/Breadcrumb';
27
25
  export type { BreadcrumbProps } from './components/molecules/Breadcrumb';
28
26
  export { default as Form } from './components/molecules/Form';
package/dist/index.js CHANGED
@@ -12,7 +12,6 @@ export { default as Bullets } from './components/molecules/Bullets';
12
12
  export { default as SearchInput } from './components/molecules/SearchInput';
13
13
  export { default as Carousel } from './components/molecules/Carousel';
14
14
  export { default as Banner, BannerContent, BannerImage, BannerLink, } from './components/molecules/Banner';
15
- export { default as PaymentMethods } from './components/molecules/PaymentMethods';
16
15
  export { default as Breadcrumb } from './components/molecules/Breadcrumb';
17
16
  export { default as Form } from './components/molecules/Form';
18
17
  // Organisms
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AAErC,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAG/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oC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,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAG3E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAG7E,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,oCAAoC,CAAA;AAQ3C,OAAO,EACL,OAAO,IAAI,IAAI,EACf,SAAS,EACT,WAAW,EACX,WAAW,GACZ,MAAM,6BAA6B,CAAA;AAQpC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAGnE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAM3E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAGrE,OAAO,EACL,OAAO,IAAI,MAAM,EACjB,aAAa,EACb,WAAW,EACX,UAAU,GACX,MAAM,+BAA+B,CAAA;AAQtC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAGzE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAG7D,YAAY;AACZ,OAAO,EACL,OAAO,IAAI,UAAU,EACrB,eAAe,EACf,iBAAiB,GAClB,MAAM,mCAAmC,CAAA;AAO1C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AAG1D,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/ui",
3
- "version": "2.0.61-alpha.0",
3
+ "version": "2.0.62-alpha.0",
4
4
  "description": "A lightweight, framework agnostic component library for React",
5
5
  "author": "emersonlaurentino",
6
6
  "license": "MIT",
@@ -59,5 +59,5 @@
59
59
  "node": "16.18.0",
60
60
  "yarn": "1.19.1"
61
61
  },
62
- "gitHead": "7cb1ceba4bdfd0495b1f9226fa640d476ba15810"
62
+ "gitHead": "62683f903ca899d767fae418db5169cadf15e0f4"
63
63
  }
@@ -0,0 +1,63 @@
1
+ [data-fs-payment-methods] {
2
+ // --------------------------------------------------------
3
+ // Design Tokens for Payment Methods
4
+ // --------------------------------------------------------
5
+
6
+ // Default properties
7
+
8
+ // Title
9
+ --fs-payment-methods-title-size : var(--fs-text-size-body);
10
+ --fs-payment-methods-title-weight : var(--fs-text-weight-bold);
11
+ --fs-payment-methods-title-line-height : 1.25;
12
+
13
+ // Flag
14
+ --fs-payment-methods-flag-width : 2.125rem;
15
+ --fs-payment-methods-flag-border-width : var(--fs-border-width);
16
+ --fs-payment-methods-flag-border-color : var(--fs-color-neutral-3);
17
+ --fs-payment-methods-flag-border-radius : var(--fs-border-radius-small);
18
+
19
+ // Flags
20
+ --fs-payment-methods-flags-row-gap : var(--fs-spacing-1);
21
+ --fs-payment-methods-flags-margin-top : var(--fs-spacing-3);
22
+
23
+ // --------------------------------------------------------
24
+ // Structural Styles
25
+ // --------------------------------------------------------
26
+
27
+ [data-fs-payment-methods-title] {
28
+ & > *:first-child {
29
+ font-size: var(--fs-payment-methods-title-size);
30
+ font-weight: var(--fs-payment-methods-title-weight);
31
+ line-height: var(--fs-payment-methods-title-line-height);
32
+ }
33
+
34
+ @include media("<notebook") {
35
+ text-align: center;
36
+ }
37
+ }
38
+
39
+ [data-fs-payment-methods-flags] {
40
+ display: grid;
41
+ grid-template-columns: repeat(4, minmax(0, max-content));
42
+ row-gap: var(--fs-payment-methods-flags-row-gap);
43
+ justify-content: space-between;
44
+ margin-top: var(--fs-payment-methods-flags-margin-top);
45
+
46
+ li {
47
+ display: flex;
48
+ place-content: center;
49
+ }
50
+
51
+ @include media("<notebook") {
52
+ column-gap: var(--fs-grid-gap-2);
53
+ }
54
+ }
55
+
56
+ [data-fs-payment-methods-flag] {
57
+ width: var(--fs-payment-methods-flag-width);
58
+ height: var(--fs-payment-methods-flag-height);
59
+ overflow: hidden;
60
+ border: var(--fs-payment-methods-flag-border-width) solid var(--fs-payment-methods-flag-border-color);
61
+ border-radius: var(--fs-payment-methods-flag-border-radius);
62
+ }
63
+ }
package/src/index.ts CHANGED
@@ -68,9 +68,6 @@ export type {
68
68
  BannerLinkProps,
69
69
  } from './components/molecules/Banner'
70
70
 
71
- export { default as PaymentMethods } from './components/molecules/PaymentMethods'
72
- export type { PaymentMethodsProps } from './components/molecules/PaymentMethods'
73
-
74
71
  export { default as Breadcrumb } from './components/molecules/Breadcrumb'
75
72
  export type { BreadcrumbProps } from './components/molecules/Breadcrumb'
76
73
 
@@ -39,4 +39,5 @@
39
39
 
40
40
  // Organisms
41
41
  @import "../components/organisms/Hero/styles";
42
+ @import "../components/organisms/PaymentMethods/styles";
42
43
  @import "../components/organisms/PriceRange/styles";
@@ -1,26 +0,0 @@
1
- import type { ReactNode, AriaAttributes } from 'react';
2
- import React from 'react';
3
- export interface PaymentMethodsProps {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress,
6
- * testing-library, and jest).
7
- */
8
- testId?: string;
9
- /**
10
- * Title of the payment methods section (e.g.: "Payment methods",
11
- * "Accepted Cards").
12
- */
13
- title?: ReactNode;
14
- /**
15
- * Defines a string value that labels the current element when
16
- * title is not used.
17
- */
18
- 'aria-label'?: AriaAttributes['aria-label'];
19
- /**
20
- * Children will receive the flags to be displayed in the payment
21
- * methods section (e.g.:, visa, mastercard, etc).
22
- */
23
- children: ReactNode;
24
- }
25
- declare const PaymentMethods: React.ForwardRefExoticComponent<PaymentMethodsProps & React.RefAttributes<HTMLDivElement>>;
26
- export default PaymentMethods;
@@ -1,8 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const PaymentMethods = forwardRef(function PaymentMethods({ testId = 'store-payment-methods', title, 'aria-label': ariaLabel = 'Payment Methods', children, ...otherProps }, ref) {
3
- return (React.createElement("div", { ref: ref, "data-fs-payment-methods": true, "data-testid": testId, ...otherProps },
4
- !!title && React.createElement("div", null, title),
5
- React.createElement("div", { "data-payment-methods-flags": true, "aria-label": title ? undefined : ariaLabel }, children)));
6
- });
7
- export default PaymentMethods;
8
- //# sourceMappingURL=PaymentMethods.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaymentMethods.js","sourceRoot":"","sources":["../../../../src/components/molecules/PaymentMethods/PaymentMethods.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAyBzC,MAAM,cAAc,GAAG,UAAU,CAC/B,SAAS,cAAc,CACrB,EACE,MAAM,GAAG,uBAAuB,EAChC,KAAK,EACL,YAAY,EAAE,SAAS,GAAG,iBAAiB,EAC3C,QAAQ,EACR,GAAG,UAAU,EACd,EACD,GAAG;IAEH,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,kDAEK,MAAM,KACf,UAAU;QAEb,CAAC,CAAC,KAAK,IAAI,iCAAM,KAAK,CAAO;QAC9B,+EAEc,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAExC,QAAQ,CACL,CACF,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default } from './PaymentMethods';
2
- export type { PaymentMethodsProps } from './PaymentMethods';
@@ -1,2 +0,0 @@
1
- export { default } from './PaymentMethods';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/molecules/PaymentMethods/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA"}
@@ -1,57 +0,0 @@
1
- import type { ReactNode, AriaAttributes } from 'react'
2
- import React, { forwardRef } from 'react'
3
-
4
- export interface PaymentMethodsProps {
5
- /**
6
- * ID to find this component in testing tools (e.g.: cypress,
7
- * testing-library, and jest).
8
- */
9
- testId?: string
10
- /**
11
- * Title of the payment methods section (e.g.: "Payment methods",
12
- * "Accepted Cards").
13
- */
14
- title?: ReactNode
15
- /**
16
- * Defines a string value that labels the current element when
17
- * title is not used.
18
- */
19
- 'aria-label'?: AriaAttributes['aria-label']
20
- /**
21
- * Children will receive the flags to be displayed in the payment
22
- * methods section (e.g.:, visa, mastercard, etc).
23
- */
24
- children: ReactNode
25
- }
26
-
27
- const PaymentMethods = forwardRef<HTMLDivElement, PaymentMethodsProps>(
28
- function PaymentMethods(
29
- {
30
- testId = 'store-payment-methods',
31
- title,
32
- 'aria-label': ariaLabel = 'Payment Methods',
33
- children,
34
- ...otherProps
35
- },
36
- ref
37
- ) {
38
- return (
39
- <div
40
- ref={ref}
41
- data-fs-payment-methods
42
- data-testid={testId}
43
- {...otherProps}
44
- >
45
- {!!title && <div>{title}</div>}
46
- <div
47
- data-payment-methods-flags
48
- aria-label={title ? undefined : ariaLabel}
49
- >
50
- {children}
51
- </div>
52
- </div>
53
- )
54
- }
55
- )
56
-
57
- export default PaymentMethods
@@ -1,2 +0,0 @@
1
- export { default } from './PaymentMethods'
2
- export type { PaymentMethodsProps } from './PaymentMethods'