@faststore/ui 1.8.45 → 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 +33 -0
- package/dist/index.d.ts +2 -0
- package/dist/organisms/Hero/Hero.d.ts +11 -0
- package/dist/organisms/Hero/HeroHeading.d.ts +10 -0
- package/dist/organisms/Hero/HeroImage.d.ts +10 -0
- package/dist/organisms/Hero/index.d.ts +6 -0
- package/dist/organisms/Hero/stories/Hero.stories.d.ts +4 -0
- package/dist/ui.cjs.development.js +39 -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 +37 -1
- package/dist/ui.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +7 -0
- package/src/organisms/Hero/Hero.test.tsx +60 -0
- package/src/organisms/Hero/Hero.tsx +23 -0
- package/src/organisms/Hero/HeroHeading.tsx +24 -0
- package/src/organisms/Hero/HeroImage.tsx +22 -0
- package/src/organisms/Hero/index.tsx +8 -0
- package/src/organisms/Hero/stories/Hero.mdx +48 -0
- package/src/organisms/Hero/stories/Hero.stories.tsx +56 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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
|
+
|
|
17
|
+
## 1.8.49 (2022-05-31)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* remove docs from build on codesandbox ([#1334](https://github.com/vtex/faststore/issues/1334)) ([c9eabde](https://github.com/vtex/faststore/commit/c9eabdea8d951d42a9b3898572719e1f45294b33))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 1.8.46 (2022-05-30)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* using cache ([#1330](https://github.com/vtex/faststore/issues/1330)) ([6f8a7a4](https://github.com/vtex/faststore/commit/6f8a7a4a593f7e82586d7e3d48f5254e011b8df6))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## 1.8.45 (2022-05-30)
|
|
7
40
|
|
|
8
41
|
**Note:** Version bump only for package @faststore/ui
|
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;
|