@faststore/ui 1.8.49 → 1.8.51

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 CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 1.8.51 (2022-06-03)
7
+
8
+
9
+ ### Features
10
+
11
+ * **UI:** Add Hero component ([#1336](https://github.com/vtex/faststore/issues/1336)) ([767c0cd](https://github.com/vtex/faststore/commit/767c0cdc5eaf6bd56020d64fd7718b1379c09390))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 1.8.49 (2022-05-31)
7
18
 
8
19
 
package/dist/index.d.ts CHANGED
@@ -74,5 +74,7 @@ export { default as Dropdown, DropdownButton, DropdownItem, DropdownMenu, } from
74
74
  export type { DropdownProps, DropdownButtonProps, DropdownItemProps, DropdownMenuProps, } from './molecules/Dropdown';
75
75
  export { default as OutOfStock, OutOfStockTitle, OutOfStockMessage, } from './organisms/OutOfStock';
76
76
  export type { OutOfStockProps, OutOfStockMessageProps, OutOfStockTitleProps, } from './organisms/OutOfStock';
77
+ export { default as Hero, HeroHeading, HeroImage } from './organisms/Hero';
78
+ export type { HeroProps, HeroHeadingProps, HeroImageProps, } from './organisms/Hero';
77
79
  export { default as useSlider } from './hooks/useSlider';
78
80
  export type { UseSliderArgs, SliderState, SliderDispatch, SlideDirection, } from './hooks/useSlider';
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { HTMLAttributes } from 'react';
3
+ export interface HeroProps extends HTMLAttributes<HTMLDivElement> {
4
+ /**
5
+ * ID to find this component in testing tools (e.g.: cypress,
6
+ * testing-library, and jest).
7
+ */
8
+ testId?: string;
9
+ }
10
+ declare const Hero: React.ForwardRefExoticComponent<HeroProps & React.RefAttributes<HTMLDivElement>>;
11
+ export default Hero;
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ import React from 'react';
3
+ export interface HeroHeadingProps 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 HeroHeading: React.ForwardRefExoticComponent<HeroHeadingProps & React.RefAttributes<HTMLDivElement>>;
10
+ export default HeroHeading;
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ import React from 'react';
3
+ export interface HeroImageProps 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 HeroImage: React.ForwardRefExoticComponent<HeroImageProps & React.RefAttributes<HTMLDivElement>>;
10
+ export default HeroImage;
@@ -0,0 +1,6 @@
1
+ export { default } from './Hero';
2
+ export type { HeroProps } from './Hero';
3
+ export { default as HeroImage } from './HeroImage';
4
+ export type { HeroImageProps } from './HeroImage';
5
+ export { default as HeroHeading } from './HeroHeading';
6
+ export type { HeroHeadingProps } from './HeroHeading';
@@ -0,0 +1,4 @@
1
+ import type { HeroProps } from '../Hero';
2
+ export declare const Hero: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, HeroProps>;
3
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
4
+ export default _default;
@@ -2003,6 +2003,42 @@ const OutOfStockTitle = ({
2003
2003
  }, children);
2004
2004
  };
2005
2005
 
2006
+ const Hero = /*#__PURE__*/React.forwardRef(function Hero({
2007
+ testId = 'store-hero',
2008
+ children,
2009
+ ...otherProps
2010
+ }, ref) {
2011
+ return React__default.createElement("article", Object.assign({
2012
+ ref: ref,
2013
+ "data-store-hero": true,
2014
+ "data-testid": testId
2015
+ }, otherProps), children);
2016
+ });
2017
+
2018
+ const HeroImage = /*#__PURE__*/React.forwardRef(function HeroImage({
2019
+ testId = 'store-hero-image',
2020
+ children,
2021
+ ...otherProps
2022
+ }, ref) {
2023
+ return React__default.createElement("div", Object.assign({
2024
+ ref: ref,
2025
+ "data-hero-image": true,
2026
+ "data-testid": testId
2027
+ }, otherProps), children);
2028
+ });
2029
+
2030
+ const HeroHeading = /*#__PURE__*/React.forwardRef(function HeroHeading({
2031
+ testId = 'store-hero-heading',
2032
+ children,
2033
+ ...otherProps
2034
+ }, ref) {
2035
+ return React__default.createElement("header", Object.assign({
2036
+ ref: ref,
2037
+ "data-hero-heading": true,
2038
+ "data-testid": testId
2039
+ }, otherProps), children);
2040
+ });
2041
+
2006
2042
  exports.Accordion = Accordion;
2007
2043
  exports.AccordionButton = AccordionButton;
2008
2044
  exports.AccordionItem = AccordionItem;
@@ -2027,6 +2063,9 @@ exports.DropdownButton = DropdownButton;
2027
2063
  exports.DropdownItem = DropdownItem;
2028
2064
  exports.DropdownMenu = DropdownMenu;
2029
2065
  exports.Form = Form;
2066
+ exports.Hero = Hero;
2067
+ exports.HeroHeading = HeroHeading;
2068
+ exports.HeroImage = HeroImage;
2030
2069
  exports.Icon = Icon;
2031
2070
  exports.IconButton = IconButton;
2032
2071
  exports.Incentive = Incentive;