@faststore/ui 2.0.169-alpha.0 → 2.0.175-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.
Files changed (29) hide show
  1. package/dist/index.d.ts +0 -2
  2. package/dist/index.js +0 -2
  3. package/dist/index.js.map +1 -1
  4. package/package.json +4 -4
  5. package/src/components/{molecules → organisms}/Banner/styles.scss +11 -11
  6. package/src/components/organisms/BannerNewsletter/styles.scss +1 -1
  7. package/src/index.ts +0 -14
  8. package/src/styles/base/layout.scss +10 -0
  9. package/src/styles/components.scss +1 -1
  10. package/dist/components/molecules/Banner/Banner.d.ts +0 -14
  11. package/dist/components/molecules/Banner/Banner.js +0 -6
  12. package/dist/components/molecules/Banner/Banner.js.map +0 -1
  13. package/dist/components/molecules/Banner/BannerContent.d.ts +0 -10
  14. package/dist/components/molecules/Banner/BannerContent.js +0 -6
  15. package/dist/components/molecules/Banner/BannerContent.js.map +0 -1
  16. package/dist/components/molecules/Banner/BannerImage.d.ts +0 -10
  17. package/dist/components/molecules/Banner/BannerImage.js +0 -6
  18. package/dist/components/molecules/Banner/BannerImage.js.map +0 -1
  19. package/dist/components/molecules/Banner/BannerLink.d.ts +0 -10
  20. package/dist/components/molecules/Banner/BannerLink.js +0 -6
  21. package/dist/components/molecules/Banner/BannerLink.js.map +0 -1
  22. package/dist/components/molecules/Banner/index.d.ts +0 -8
  23. package/dist/components/molecules/Banner/index.js +0 -5
  24. package/dist/components/molecules/Banner/index.js.map +0 -1
  25. package/src/components/molecules/Banner/Banner.tsx +0 -31
  26. package/src/components/molecules/Banner/BannerContent.tsx +0 -24
  27. package/src/components/molecules/Banner/BannerImage.tsx +0 -24
  28. package/src/components/molecules/Banner/BannerLink.tsx +0 -24
  29. package/src/components/molecules/Banner/index.ts +0 -11
package/dist/index.d.ts CHANGED
@@ -3,7 +3,5 @@ export { default as TextArea } from './components/atoms/TextArea';
3
3
  export type { TextAreaProps } from './components/atoms/TextArea';
4
4
  export { default as Incentive } from './components/atoms/Incentive';
5
5
  export type { IncentiveProps } from './components/atoms/Incentive';
6
- export { default as Banner, BannerContent, BannerImage, BannerLink, } from './components/molecules/Banner';
7
- export type { BannerProps, BannerContentProps, BannerImageProps, BannerLinkProps, } from './components/molecules/Banner';
8
6
  export { Tile, Tiles } from './components/organisms/Tiles';
9
7
  export type { TilesProps, TileProps } from './components/organisms/Tiles';
package/dist/index.js CHANGED
@@ -2,8 +2,6 @@ export * from '@faststore/components';
2
2
  // Atoms
3
3
  export { default as TextArea } from './components/atoms/TextArea';
4
4
  export { default as Incentive } from './components/atoms/Incentive';
5
- // Molecules
6
- export { default as Banner, BannerContent, BannerImage, BannerLink, } from './components/molecules/Banner';
7
5
  // Organisms
8
6
  export { Tile, Tiles } from './components/organisms/Tiles';
9
7
  //# sourceMappingURL=index.js.map
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,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EACL,OAAO,IAAI,MAAM,EACjB,aAAa,EACb,WAAW,EACX,UAAU,GACX,MAAM,+BAA+B,CAAA;AAQtC,YAAY;AACZ,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AAErC,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/ui",
3
- "version": "2.0.169-alpha.0",
3
+ "version": "2.0.175-alpha.0",
4
4
  "description": "A lightweight, framework agnostic component library for React",
5
5
  "author": "emersonlaurentino",
6
6
  "license": "MIT",
@@ -45,8 +45,8 @@
45
45
  "react-dom": "^18.2.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@faststore/eslint-config": "^2.0.104-alpha.0",
49
- "@faststore/shared": "^2.0.104-alpha.0",
48
+ "@faststore/eslint-config": "^2.0.173-alpha.0",
49
+ "@faststore/shared": "^2.0.173-alpha.0",
50
50
  "@size-limit/preset-small-lib": "^7.0.8",
51
51
  "@types/tabbable": "^3.1.1",
52
52
  "babel-loader": "^8.2.5",
@@ -58,5 +58,5 @@
58
58
  "node": "16.18.0",
59
59
  "yarn": "1.19.1"
60
60
  },
61
- "gitHead": "243d208d99b39628236e7e86491b22621d54127e"
61
+ "gitHead": "49cd929bd62bf068a51337335d97142703f1c813"
62
62
  }
@@ -1,4 +1,4 @@
1
- [data-fs-banner-text] {
1
+ [data-fs-banner] {
2
2
  // --------------------------------------------------------
3
3
  // Design Tokens for Banner Text
4
4
  // --------------------------------------------------------
@@ -49,7 +49,7 @@
49
49
  padding: var(--fs-banner-padding-desktop);
50
50
  }
51
51
 
52
- [data-fs-banner-text-content] {
52
+ [data-fs-banner-content] {
53
53
  display: flex;
54
54
  flex-direction: column;
55
55
  align-items: center;
@@ -57,7 +57,7 @@
57
57
  height: 100%;
58
58
  }
59
59
 
60
- [data-fs-banner-text-link] [data-fs-link-button] {
60
+ [data-fs-banner-link] {
61
61
  min-width: var(--fs-banner-button-link-min-width);
62
62
  margin: var(--fs-banner-button-link-margin-top) auto 0;
63
63
  }
@@ -66,7 +66,7 @@
66
66
  // Variants Styles
67
67
  // --------------------------------------------------------
68
68
 
69
- &[data-fs-banner-text-variant="primary"] {
69
+ &[data-fs-banner-variant="primary"] {
70
70
  h2 {
71
71
  font-size: var(--fs-banner-title-size);
72
72
  font-weight: var(--fs-banner-title-weight);
@@ -79,7 +79,7 @@
79
79
  }
80
80
  }
81
81
 
82
- &[data-fs-banner-text-variant="secondary"] {
82
+ &[data-fs-banner-variant="secondary"] {
83
83
  h2 {
84
84
  margin-bottom: var(--fs-spacing-2);
85
85
  font-size: var(--fs-banner-title-size);
@@ -99,26 +99,26 @@
99
99
  }
100
100
  }
101
101
 
102
- &[data-fs-banner-text-color-variant="main"] {
102
+ &[data-fs-banner-color-variant="main"] {
103
103
  background-color: var(--fs-banner-main-bkg-color);
104
104
 
105
- [data-fs-banner-text-heading] {
105
+ [data-fs-banner-heading] {
106
106
  color: var(--fs-banner-main-text-color);
107
107
  }
108
108
  }
109
109
 
110
- &[data-fs-banner-text-color-variant="light"] {
110
+ &[data-fs-banner-color-variant="light"] {
111
111
  background-color: var(--fs-banner-light-bkg-color);
112
112
 
113
- [data-fs-banner-text-heading] {
113
+ [data-fs-banner-heading] {
114
114
  color: var(--fs-banner-light-text-color);
115
115
  }
116
116
  }
117
117
 
118
- &[data-fs-banner-text-color-variant="accent"] {
118
+ &[data-fs-banner-color-variant="accent"] {
119
119
  background-color: var(--fs-banner-accent-bkg-color);
120
120
 
121
- [data-fs-banner-text-heading] {
121
+ [data-fs-banner-heading] {
122
122
  color: var(--fs-banner-accent-text-color);
123
123
  }
124
124
  }
@@ -1,7 +1,7 @@
1
1
  [data-fs-banner-newsletter] {
2
2
  margin-bottom: var(--fs-grid-padding);
3
3
 
4
- [data-fs-banner-text] {
4
+ [data-fs-banner] {
5
5
  border-radius: var(--fs-border-radius);
6
6
  }
7
7
 
package/src/index.ts CHANGED
@@ -7,20 +7,6 @@ export type { TextAreaProps } from './components/atoms/TextArea'
7
7
  export { default as Incentive } from './components/atoms/Incentive'
8
8
  export type { IncentiveProps } from './components/atoms/Incentive'
9
9
 
10
- // Molecules
11
- export {
12
- default as Banner,
13
- BannerContent,
14
- BannerImage,
15
- BannerLink,
16
- } from './components/molecules/Banner'
17
- export type {
18
- BannerProps,
19
- BannerContentProps,
20
- BannerImageProps,
21
- BannerLinkProps,
22
- } from './components/molecules/Banner'
23
-
24
10
  // Organisms
25
11
  export { Tile, Tiles } from './components/organisms/Tiles'
26
12
  export type { TilesProps, TileProps } from './components/organisms/Tiles'
@@ -78,3 +78,13 @@ main {
78
78
  height: 100%;
79
79
  object-fit: cover;
80
80
  }
81
+
82
+ ////////////////////
83
+ // Pages
84
+ ////////////////////
85
+
86
+ // Homepage
87
+ .section-newsletter {
88
+ padding-top: var(--fs-grid-padding);
89
+ padding-bottom: 0;
90
+ }
@@ -19,7 +19,6 @@
19
19
  // Molecules
20
20
  @import "../components/molecules/Accordion/styles";
21
21
  @import "../components/molecules/Alert/styles";
22
- @import "../components/molecules/Banner/styles";
23
22
  @import "../components/molecules/Breadcrumb/styles";
24
23
  @import "../components/molecules/BuyButton/styles";
25
24
  @import "../components/molecules/Carousel/styles";
@@ -56,6 +55,7 @@
56
55
  @import "../components/molecules/ToggleField/styles";
57
56
 
58
57
  // Organisms
58
+ @import "../components/organisms/Banner/styles";
59
59
  @import "../components/organisms/BannerNewsletter/styles";
60
60
  @import "../components/organisms/CartSidebar/styles";
61
61
  @import "../components/organisms/EmptyState/styles";
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import type { HTMLAttributes } from 'react';
3
- type BannerDirectionVariant = 'vertical' | 'horizontal';
4
- export interface BannerProps extends HTMLAttributes<HTMLDivElement> {
5
- /**
6
- * ID to find this component in testing tools (e.g.: cypress,
7
- * testing-library, and jest).
8
- */
9
- testId?: string;
10
- children: React.ReactNode;
11
- variant?: BannerDirectionVariant;
12
- }
13
- declare const Banner: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<HTMLDivElement>>;
14
- export default Banner;
@@ -1,6 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const Banner = forwardRef(function Banner({ testId = 'store-banner', children, variant = 'vertical', ...otherProps }, ref) {
3
- return (React.createElement("article", { ref: ref, "data-fs-banner": variant, "data-testid": testId, ...otherProps }, children));
4
- });
5
- export default Banner;
6
- //# sourceMappingURL=Banner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../../src/components/molecules/Banner/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAczC,MAAM,MAAM,GAAG,UAAU,CAA8B,SAAS,MAAM,CACpE,EAAE,MAAM,GAAG,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,UAAU,EAAE,GAAG,UAAU,EAAE,EAC1E,GAAG;IAEH,OAAO,CACL,iCACE,GAAG,EAAE,GAAG,oBACQ,OAAO,iBACV,MAAM,KACf,UAAU,IAEb,QAAQ,CACD,CACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,MAAM,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { HTMLAttributes } from 'react';
2
- import React from 'react';
3
- export interface BannerContentProps extends HTMLAttributes<HTMLDivElement> {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
6
- */
7
- testId?: string;
8
- }
9
- declare const BannerContent: React.ForwardRefExoticComponent<BannerContentProps & React.RefAttributes<HTMLDivElement>>;
10
- export default BannerContent;
@@ -1,6 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const BannerContent = forwardRef(function BannerContent({ testId = 'store-banner-content', children, ...otherProps }, ref) {
3
- return (React.createElement("div", { ref: ref, "data-banner-content": true, "data-testid": testId, ...otherProps }, children));
4
- });
5
- export default BannerContent;
6
- //# sourceMappingURL=BannerContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BannerContent.js","sourceRoot":"","sources":["../../../../src/components/molecules/Banner/BannerContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,aAAa,GAAG,UAAU,CAC9B,SAAS,aAAa,CACpB,EAAE,MAAM,GAAG,sBAAsB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC5D,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,8CAAmC,MAAM,KAAM,UAAU,IACnE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { HTMLAttributes } from 'react';
2
- import React from 'react';
3
- export interface BannerImageProps extends HTMLAttributes<HTMLDivElement> {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
6
- */
7
- testId?: string;
8
- }
9
- declare const BannerImage: React.ForwardRefExoticComponent<BannerImageProps & React.RefAttributes<HTMLDivElement>>;
10
- export default BannerImage;
@@ -1,6 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const BannerImage = forwardRef(function BannerImage({ testId = 'store-banner-image', children, ...otherProps }, ref) {
3
- return (React.createElement("div", { ref: ref, "data-banner-image": true, "data-testid": testId, ...otherProps }, children));
4
- });
5
- export default BannerImage;
6
- //# sourceMappingURL=BannerImage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BannerImage.js","sourceRoot":"","sources":["../../../../src/components/molecules/Banner/BannerImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,WAAW,GAAG,UAAU,CAC5B,SAAS,WAAW,CAClB,EAAE,MAAM,GAAG,oBAAoB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAC1D,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,4CAAiC,MAAM,KAAM,UAAU,IACjE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { HTMLAttributes } from 'react';
2
- import React from 'react';
3
- export interface BannerLinkProps extends HTMLAttributes<HTMLDivElement> {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
6
- */
7
- testId?: string;
8
- }
9
- declare const BannerLink: React.ForwardRefExoticComponent<BannerLinkProps & React.RefAttributes<HTMLDivElement>>;
10
- export default BannerLink;
@@ -1,6 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const BannerLink = forwardRef(function BannerLink({ testId = 'store-banner-link', children, ...otherProps }, ref) {
3
- return (React.createElement("div", { ref: ref, "data-banner-link": true, "data-testid": testId, ...otherProps }, children));
4
- });
5
- export default BannerLink;
6
- //# sourceMappingURL=BannerLink.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BannerLink.js","sourceRoot":"","sources":["../../../../src/components/molecules/Banner/BannerLink.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AASzC,MAAM,UAAU,GAAG,UAAU,CAC3B,SAAS,UAAU,CACjB,EAAE,MAAM,GAAG,mBAAmB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACzD,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,2CAAgC,MAAM,KAAM,UAAU,IAChE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -1,8 +0,0 @@
1
- export { default } from './Banner';
2
- export type { BannerProps } from './Banner';
3
- export { default as BannerImage } from './BannerImage';
4
- export type { BannerImageProps } from './BannerImage';
5
- export { default as BannerContent } from './BannerContent';
6
- export type { BannerContentProps } from './BannerContent';
7
- export { default as BannerLink } from './BannerLink';
8
- export type { BannerLinkProps } from './BannerLink';
@@ -1,5 +0,0 @@
1
- export { default } from './Banner';
2
- export { default as BannerImage } from './BannerImage';
3
- export { default as BannerContent } from './BannerContent';
4
- export { default as BannerLink } from './BannerLink';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/molecules/Banner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGlC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AAGtD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAG1D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA"}
@@ -1,31 +0,0 @@
1
- import React, { forwardRef } from 'react'
2
- import type { HTMLAttributes } from 'react'
3
-
4
- type BannerDirectionVariant = 'vertical' | 'horizontal'
5
- export interface BannerProps extends HTMLAttributes<HTMLDivElement> {
6
- /**
7
- * ID to find this component in testing tools (e.g.: cypress,
8
- * testing-library, and jest).
9
- */
10
- testId?: string
11
- children: React.ReactNode
12
- variant?: BannerDirectionVariant
13
- }
14
-
15
- const Banner = forwardRef<HTMLDivElement, BannerProps>(function Banner(
16
- { testId = 'store-banner', children, variant = 'vertical', ...otherProps },
17
- ref
18
- ) {
19
- return (
20
- <article
21
- ref={ref}
22
- data-fs-banner={variant}
23
- data-testid={testId}
24
- {...otherProps}
25
- >
26
- {children}
27
- </article>
28
- )
29
- })
30
-
31
- export default Banner
@@ -1,24 +0,0 @@
1
- import type { HTMLAttributes } from 'react'
2
- import React, { forwardRef } from 'react'
3
-
4
- export interface BannerContentProps extends HTMLAttributes<HTMLDivElement> {
5
- /**
6
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
7
- */
8
- testId?: string
9
- }
10
-
11
- const BannerContent = forwardRef<HTMLDivElement, BannerContentProps>(
12
- function BannerContent(
13
- { testId = 'store-banner-content', children, ...otherProps },
14
- ref
15
- ) {
16
- return (
17
- <div ref={ref} data-banner-content data-testid={testId} {...otherProps}>
18
- {children}
19
- </div>
20
- )
21
- }
22
- )
23
-
24
- export default BannerContent
@@ -1,24 +0,0 @@
1
- import type { HTMLAttributes } from 'react'
2
- import React, { forwardRef } from 'react'
3
-
4
- export interface BannerImageProps extends HTMLAttributes<HTMLDivElement> {
5
- /**
6
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
7
- */
8
- testId?: string
9
- }
10
-
11
- const BannerImage = forwardRef<HTMLDivElement, BannerImageProps>(
12
- function BannerImage(
13
- { testId = 'store-banner-image', children, ...otherProps },
14
- ref
15
- ) {
16
- return (
17
- <div ref={ref} data-banner-image data-testid={testId} {...otherProps}>
18
- {children}
19
- </div>
20
- )
21
- }
22
- )
23
-
24
- export default BannerImage
@@ -1,24 +0,0 @@
1
- import type { HTMLAttributes } from 'react'
2
- import React, { forwardRef } from 'react'
3
-
4
- export interface BannerLinkProps extends HTMLAttributes<HTMLDivElement> {
5
- /**
6
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
7
- */
8
- testId?: string
9
- }
10
-
11
- const BannerLink = forwardRef<HTMLDivElement, BannerLinkProps>(
12
- function BannerLink(
13
- { testId = 'store-banner-link', children, ...otherProps },
14
- ref
15
- ) {
16
- return (
17
- <div ref={ref} data-banner-link data-testid={testId} {...otherProps}>
18
- {children}
19
- </div>
20
- )
21
- }
22
- )
23
-
24
- export default BannerLink
@@ -1,11 +0,0 @@
1
- export { default } from './Banner'
2
- export type { BannerProps } from './Banner'
3
-
4
- export { default as BannerImage } from './BannerImage'
5
- export type { BannerImageProps } from './BannerImage'
6
-
7
- export { default as BannerContent } from './BannerContent'
8
- export type { BannerContentProps } from './BannerContent'
9
-
10
- export { default as BannerLink } from './BannerLink'
11
- export type { BannerLinkProps } from './BannerLink'