@faststore/ui 2.0.88-alpha.0 → 2.0.90-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
@@ -13,8 +13,6 @@ export { default as Banner, BannerContent, BannerImage, BannerLink, } from './co
13
13
  export type { BannerProps, BannerContentProps, BannerImageProps, BannerLinkProps, } from './components/molecules/Banner';
14
14
  export { default as Form } from './components/molecules/Form';
15
15
  export type { FormProps } from './components/molecules/Form';
16
- export { default as OutOfStock, OutOfStockTitle, OutOfStockMessage, } from './components/organisms/OutOfStock';
17
- export type { OutOfStockProps, OutOfStockMessageProps, OutOfStockTitleProps, } from './components/organisms/OutOfStock';
18
16
  export { Tiles, Tile } from './components/organisms/Tiles';
19
17
  export type { TilesProps, TileProps } from './components/organisms/Tiles';
20
18
  export { default as useSlider } from './hooks/useSlider';
package/dist/index.js CHANGED
@@ -9,7 +9,6 @@ export { default as Carousel } from './components/molecules/Carousel';
9
9
  export { default as Banner, BannerContent, BannerImage, BannerLink, } from './components/molecules/Banner';
10
10
  export { default as Form } from './components/molecules/Form';
11
11
  // Organisms
12
- export { default as OutOfStock, OutOfStockTitle, OutOfStockMessage, } from './components/organisms/OutOfStock';
13
12
  export { Tiles, Tile } from './components/organisms/Tiles';
14
13
  // Hooks
15
14
  export { default as useSlider } from './hooks/useSlider';
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;AAEZ,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAG7E,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAGnE,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,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"}
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;AAEZ,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAG7E,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAGnE,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,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAG7D,YAAY;AACZ,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.88-alpha.0",
3
+ "version": "2.0.90-alpha.0",
4
4
  "description": "A lightweight, framework agnostic component library for React",
5
5
  "author": "emersonlaurentino",
6
6
  "license": "MIT",
@@ -58,5 +58,5 @@
58
58
  "node": "16.18.0",
59
59
  "yarn": "1.19.1"
60
60
  },
61
- "gitHead": "a9aa7a6572c08e0bd26e384bb66464e633f1ad84"
61
+ "gitHead": "8382d02bffb1fcf8c517df11221b228ecb1a38bd"
62
62
  }
@@ -0,0 +1,123 @@
1
+ [data-fs-filter] {
2
+ // --------------------------------------------------------
3
+ // Design Tokens for Filter
4
+ // --------------------------------------------------------
5
+
6
+ // Title
7
+ --fs-filter-title-height : var(--fs-spacing-6);
8
+ --fs-filter-title-margin-bottom : var(--fs-spacing-0);
9
+ --fs-filter-title-text-size : var(--fs-text-size-2);
10
+ --fs-filter-title-line-height : 1.25;
11
+
12
+ // Accordion
13
+ --fs-filter-accordion-border-width-notebook : var(--fs-border-width);
14
+ --fs-filter-accordion-border-color-notebook : var(--fs-border-color-light);
15
+ --fs-filter-accordion-border-radius-notebook : var(--fs-border-radius);
16
+
17
+ // Accordion Item Button
18
+ --fs-filter-accordion-button-text-size : var(--fs-text-size-lead);
19
+ --fs-filter-accordion-button-text-weight : var(--fs-text-weight-regular);
20
+ --fs-filter-accordion-button-line-height : 1.5;
21
+ --fs-filter-accordion-button-padding-right-notebook : var(--fs-spacing-4);
22
+ --fs-filter-accordion-button-padding-left-notebook : var(--fs-filter-accordion-button-padding-right-notebook);
23
+
24
+ --fs-filter-accordion-button-text-size-notebook : var(--fs-text-size-2);
25
+ --fs-filter-accordion-button-line-height-notebook : 1.25;
26
+
27
+ // Accordion Item Panel
28
+ --fs-filter-accordion-item-panel-padding-right-notebook : var(--fs-spacing-4);
29
+ --fs-filter-accordion-item-panel-padding-left-notebook : var(--fs-filter-accordion-item-panel-padding-right-notebook);
30
+
31
+ // Accordion Item List
32
+ --fs-filter-list-padding-bottom : var(--fs-spacing-3);
33
+
34
+ // List Item
35
+ --fs-filter-list-item-not-last-margin-bottom : var(--fs-spacing-3);
36
+
37
+ // List Item Checkbox
38
+ --fs-filter-list-item-checkbox-width : 1.25rem;
39
+ --fs-filter-list-item-checkbox-height : var(--fs-filter-list-item-checkbox-width);
40
+
41
+ // List Item Label
42
+ --fs-filter-list-item-label-width : 100%;
43
+ --fs-filter-list-item-label-margin-left : var(--fs-spacing-1);
44
+ --fs-filter-list-item-label-text-size : var(--fs-text-size-2);
45
+ --fs-filter-list-item-label-line-height : 1.25;
46
+
47
+ // List Item Badge
48
+ --fs-filter-list-item-badge-margin-left : var(--fs-spacing-1);
49
+
50
+ [data-fs-filter-title] {
51
+ display: flex;
52
+ align-items: center;
53
+ height: var(--fs-filter-title-height);
54
+ margin-bottom: var(--fs-filter-title-margin-bottom);
55
+ font-size: var(--fs-filter-title-text-size);
56
+ line-height: var(--fs-filter-accordion-button-line-height-notebook);
57
+
58
+ @include media("<notebook") {
59
+ display: none;
60
+ }
61
+ }
62
+
63
+ [data-fs-filter-accordion] {
64
+ @include media(">=notebook") {
65
+ border: var(--fs-filter-accordion-border-width-notebook) solid var(--fs-filter-accordion-border-color-notebook);
66
+ border-radius: var(--fs-filter-accordion-border-radius-notebook);
67
+ }
68
+ }
69
+
70
+ [data-fs-filter-accordion-item] {
71
+ [data-fs-accordion-button] {
72
+ font-size: var(--fs-filter-accordion-button-text-size);
73
+ font-weight: var(--fs-filter-accordion-button-text-weight);
74
+ line-height: var(--fs-filter-accordion-button-line-height);
75
+
76
+ @include media(">=notebook") {
77
+ padding-right: var(--fs-filter-accordion-button-padding-right-notebook);
78
+ padding-left: var(--fs-filter-accordion-button-padding-left-notebook);
79
+ font-size: var(--fs-filter-accordion-button-text-size-notebook);
80
+ line-height: var(--fs-filter-accordion-button-line-height-notebook);
81
+ }
82
+ }
83
+
84
+ [data-fs-accordion-panel] {
85
+ @include media(">=notebook") {
86
+ padding-right: var(--fs-filter-accordion-item-panel-padding-right-notebook);
87
+ padding-left: var(--fs-filter-accordion-item-panel-padding-left-notebook);
88
+ }
89
+ }
90
+ }
91
+
92
+ [data-fs-filter-list] {
93
+ padding-bottom: var(--fs-filter-list-padding-bottom);
94
+ }
95
+
96
+ [data-fs-filter-list-item] {
97
+ display: flex;
98
+ align-items: center;
99
+
100
+ &:not(:last-child) {
101
+ margin-bottom: var(--fs-filter-list-item-not-last-margin-bottom);
102
+ }
103
+ }
104
+
105
+ [data-fs-filter-list-item-checkbox] {
106
+ flex-shrink: 0;
107
+ width: var(--fs-filter-list-item-checkbox-width);
108
+ height: var(--fs-filter-list-item-checkbox-height);
109
+ }
110
+
111
+ [data-fs-filter-list-item-label] {
112
+ display: flex;
113
+ align-items: center;
114
+ width: var(--fs-filter-list-item-label-width);
115
+ margin-left: var(--fs-filter-list-item-label-margin-left);
116
+ font-size: var(--fs-filter-list-item-label-text-size);
117
+ line-height: var(--fs-filter-list-item-label-line-height);
118
+ }
119
+
120
+ [data-fs-filter-list-item-badge] {
121
+ margin-left: var(--fs-filter-list-item-badge-margin-left);
122
+ }
123
+ }
@@ -0,0 +1,64 @@
1
+ [data-fs-filter-slider] {
2
+ // --------------------------------------------------------
3
+ // Design Tokens for Filter Slider
4
+ // --------------------------------------------------------
5
+
6
+ // Content
7
+ --fs-filter-slider-content-height : calc(100vh - var(--fs-filter-slider-footer-height));
8
+ --fs-filter-slider-content-padding : var(--fs-spacing-3) var(--fs-spacing-3) calc(var(--fs-filter-slider-footer-height) + var(--fs-spacing-3));
9
+
10
+ // Title
11
+ --fs-filter-slider-title-font-size : var(--fs-text-size-4);
12
+ --fs-filter-slider-title-font-weight : var(--fs-text-weight-bold);
13
+ --fs-filter-slider-title-line-height : 1.12;
14
+
15
+ // Footer
16
+ --fs-filter-slider-footer-width : 100%;
17
+ --fs-filter-slider-footer-height : 5rem;
18
+ --fs-filter-slider-footer-padding : var(--fs-spacing-3);
19
+ --fs-filter-slider-footer-bkg-color : var(--fs-color-neutral-0);
20
+ --fs-filter-slider-footer-box-shadow : 0 0 6px rgb(0 0 0 / 20%);
21
+
22
+ // Footer Buttons
23
+ --fs-filter-slider-footer-button-clear-width : 40%;
24
+ --fs-filter-slider-footer-button-clear-margin-right : var(--fs-spacing-3);
25
+
26
+ --fs-filter-slider-footer-button-apply-width : 60%;
27
+
28
+ [data-fs-filter-slider-content] {
29
+ height: var(--fs-filter-slider-content-height);
30
+ padding: var(--fs-filter-slider-content-padding);
31
+ overflow-y: auto;
32
+ }
33
+
34
+ [data-fs-filter-slider-title] {
35
+ font-size: var(--fs-filter-slider-title-font-size);
36
+ font-weight: var(--fs-filter-slider-title-font-weight);
37
+ line-height: var(--fs-filter-slider-title-line-height);
38
+ }
39
+
40
+ [data-fs-slide-over-header] {
41
+ padding: 0;
42
+ }
43
+
44
+ [data-fs-filter-slider-footer] {
45
+ position: sticky;
46
+ bottom: 0;
47
+ display: flex;
48
+ justify-content: space-between;
49
+ width: var(--fs-filter-slider-footer-width);
50
+ height: var(--fs-filter-slider-footer-height);
51
+ padding: var(--fs-filter-slider-footer-padding);
52
+ background-color: var(--fs-filter-slider-footer-bkg-color);
53
+ box-shadow: var(--fs-filter-slider-footer-box-shadow);
54
+ }
55
+
56
+ [data-fs-filter-slider-footer-button-clear] {
57
+ width: var(--fs-filter-slider-footer-button-clear-width);
58
+ margin-right: var(--fs-filter-slider-footer-button-clear-margin-right);
59
+ }
60
+
61
+ [data-fs-filter-slider-footer-button-apply] {
62
+ width: var(--fs-filter-slider-footer-button-apply-width);
63
+ }
64
+ }
@@ -0,0 +1,55 @@
1
+ [data-fs-out-of-stock] {
2
+ // --------------------------------------------------------
3
+ // Design Tokens for Out of Stock
4
+ // --------------------------------------------------------
5
+
6
+ // Title
7
+ --fs-out-of-stock-title-margin-bottom : var(--fs-spacing-0);
8
+ --fs-out-of-stock-title-line-height : 1.15;
9
+ --fs-out-of-stock-title-size : var(--fs-text-size-lead);
10
+ --fs-out-of-stock-title-weight : var(--fs-text-weight-bold);
11
+ --fs-out-of-stock-title-color : var(--fs-color-neutral-text);
12
+
13
+ // Message
14
+ --fs-out-of-stock-message-column-gap : var(--fs-spacing-0);
15
+ --fs-out-of-stock-message-margin-bottom : var(--fs-spacing-3);
16
+ --fs-out-of-stock-message-line-height : 1.15;
17
+ --fs-out-of-stock-message-size : var(--fs-text-size-body);
18
+ --fs-out-of-stock-message-weight : var(--fs-text-weight-regular);
19
+ --fs-out-of-stock-message-color : var(--fs-color-success-text);
20
+
21
+ // Button
22
+ --fs-out-of-stock-button-width : 100%;
23
+ --fs-out-of-stock-button-margin-top : var(--fs-spacing-3);
24
+
25
+ // --------------------------------------------------------
26
+ // Structural Styles
27
+ // --------------------------------------------------------
28
+
29
+ display: flex;
30
+ flex-direction: column;
31
+
32
+ [data-fs-out-of-stock-title] {
33
+ margin-bottom: var(--fs-out-of-stock-title-margin-bottom);
34
+ font-size: var(--fs-out-of-stock-title-size);
35
+ font-weight: var(--fs-out-of-stock-title-weight);
36
+ line-height: var(--fs-out-of-stock-title-line-height);
37
+ color: var(--fs-out-of-stock-title-color);
38
+ }
39
+
40
+ [data-fs-out-of-stock-message] {
41
+ display: flex;
42
+ column-gap: var(--fs-out-of-stock-message-column-gap);
43
+ align-items: center;
44
+ margin-bottom: var(--fs-out-of-stock-message-margin-bottom);
45
+ font-size: var(--fs-out-of-stock-message-font-size);
46
+ font-weight: var(--fs-out-of-stock-message-weight);
47
+ line-height: var(--fs-out-of-stock-message-line-height);
48
+ color: var(--fs-out-of-stock-message-color);
49
+ }
50
+
51
+ [data-fs-button] {
52
+ width: var(--fs-out-of-stock-button-width);
53
+ margin-top: var(--fs-out-of-stock-button-margin-top);
54
+ }
55
+ }
package/src/index.ts CHANGED
@@ -35,17 +35,6 @@ export { default as Form } from './components/molecules/Form'
35
35
  export type { FormProps } from './components/molecules/Form'
36
36
 
37
37
  // Organisms
38
- export {
39
- default as OutOfStock,
40
- OutOfStockTitle,
41
- OutOfStockMessage,
42
- } from './components/organisms/OutOfStock'
43
- export type {
44
- OutOfStockProps,
45
- OutOfStockMessageProps,
46
- OutOfStockTitleProps,
47
- } from './components/organisms/OutOfStock'
48
-
49
38
  export { Tiles, Tile } from './components/organisms/Tiles'
50
39
  export type { TilesProps, TileProps } from './components/organisms/Tiles'
51
40
 
@@ -48,7 +48,10 @@
48
48
  @import "../components/molecules/ToggleField/styles";
49
49
 
50
50
  // Organisms
51
+ @import "../components/organisms/Filter/styles";
52
+ @import "../components/organisms/FilterSlider/styles";
51
53
  @import "../components/organisms/Hero/styles";
54
+ @import "../components/organisms/OutOfStock/styles";
52
55
  @import "../components/organisms/PaymentMethods/styles";
53
56
  @import "../components/organisms/PriceRange/styles";
54
57
  @import "../components/organisms/SearchInput/styles";
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import type { ReactNode, FormHTMLAttributes } from 'react';
3
- export type OutOfStockBaseProps = {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress,
6
- * testing-library, and jest).
7
- */
8
- testId?: string;
9
- /**
10
- * Children for Out of Stock components.
11
- */
12
- children: string | ReactNode;
13
- };
14
- export type OutOfStockProps = OutOfStockBaseProps & {
15
- /**
16
- * Event emitted when form is submitted.
17
- */
18
- onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
19
- } & FormHTMLAttributes<HTMLFormElement>;
20
- declare const OutOfStock: ({ testId, children, ...otherProps }: OutOfStockProps) => JSX.Element;
21
- export default OutOfStock;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import Form from '../../molecules/Form';
3
- const OutOfStock = ({ testId = 'store-out-of-stock', children, ...otherProps }) => {
4
- return (React.createElement("section", { "data-fs-out-of-stock": true, "data-testid": testId },
5
- React.createElement(Form, { "data-out-of-stock-form": true, testId: `${testId}-form`, ...otherProps }, children)));
6
- };
7
- export default OutOfStock;
8
- //# sourceMappingURL=OutOfStock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OutOfStock.js","sourceRoot":"","sources":["../../../../src/components/organisms/OutOfStock/OutOfStock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,IAAI,MAAM,sBAAsB,CAAA;AAqBvC,MAAM,UAAU,GAAG,CAAC,EAClB,MAAM,GAAG,oBAAoB,EAC7B,QAAQ,EACR,GAAG,UAAU,EACG,EAAE,EAAE;IACpB,OAAO,CACL,8EAA2C,MAAM;QAC/C,oBAAC,IAAI,oCAAwB,MAAM,EAAE,GAAG,MAAM,OAAO,KAAM,UAAU,IAClE,QAAQ,CACJ,CACC,CACX,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import type { OutOfStockBaseProps } from './OutOfStock';
3
- export type OutOfStockMessageProps = {
4
- /**
5
- * Attribute used for polymorphic component.
6
- */
7
- as?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span';
8
- } & OutOfStockBaseProps;
9
- export declare const OutOfStockMessage: ({ as: MessageComponent, testId, children, ...otherProps }: OutOfStockMessageProps) => JSX.Element;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export const OutOfStockMessage = ({ as: MessageComponent = 'p', testId = 'store-out-of-stock-message', children, ...otherProps }) => {
3
- return (React.createElement(MessageComponent, { "data-out-of-stock-message": true, "data-testid": testId, ...otherProps }, children));
4
- };
5
- //# sourceMappingURL=OutOfStockMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OutOfStockMessage.js","sourceRoot":"","sources":["../../../../src/components/organisms/OutOfStock/OutOfStockMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,EAAE,EAAE,gBAAgB,GAAG,GAAG,EAC1B,MAAM,GAAG,4BAA4B,EACrC,QAAQ,EACR,GAAG,UAAU,EACU,EAAE,EAAE;IAC3B,OAAO,CACL,oBAAC,gBAAgB,sDAEF,MAAM,KACf,UAAU,IAEb,QAAQ,CACQ,CACpB,CAAA;AACH,CAAC,CAAA"}
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import type { OutOfStockBaseProps } from './OutOfStock';
3
- export type OutOfStockTitleProps = {
4
- /**
5
- * Attribute used for polymorphic component.
6
- */
7
- as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';
8
- } & OutOfStockBaseProps;
9
- export declare const OutOfStockTitle: ({ as: TitleComponent, testId, children, ...otherProps }: OutOfStockTitleProps) => JSX.Element;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export const OutOfStockTitle = ({ as: TitleComponent = 'h2', testId = 'store-out-of-stock-title', children, ...otherProps }) => {
3
- return (React.createElement(TitleComponent, { "data-out-of-stock-title": true, "data-testid": testId, ...otherProps }, children));
4
- };
5
- //# sourceMappingURL=OutOfStockTitle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OutOfStockTitle.js","sourceRoot":"","sources":["../../../../src/components/organisms/OutOfStock/OutOfStockTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,EAAE,EAAE,cAAc,GAAG,IAAI,EACzB,MAAM,GAAG,0BAA0B,EACnC,QAAQ,EACR,GAAG,UAAU,EACQ,EAAE,EAAE;IACzB,OAAO,CACL,oBAAC,cAAc,oDAEA,MAAM,KACf,UAAU,IAEb,QAAQ,CACM,CAClB,CAAA;AACH,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- export { default } from './OutOfStock';
2
- export { OutOfStockMessage } from './OutOfStockMessage';
3
- export { OutOfStockTitle } from './OutOfStockTitle';
4
- export type { OutOfStockProps } from './OutOfStock';
5
- export type { OutOfStockMessageProps } from './OutOfStockMessage';
6
- export type { OutOfStockTitleProps } from './OutOfStockTitle';
@@ -1,4 +0,0 @@
1
- export { default } from './OutOfStock';
2
- export { OutOfStockMessage } from './OutOfStockMessage';
3
- export { OutOfStockTitle } from './OutOfStockTitle';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/organisms/OutOfStock/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
@@ -1,39 +0,0 @@
1
- import React from 'react'
2
- import type { ReactNode, FormHTMLAttributes } from 'react'
3
-
4
- import Form from '../../molecules/Form'
5
-
6
- export type OutOfStockBaseProps = {
7
- /**
8
- * ID to find this component in testing tools (e.g.: cypress,
9
- * testing-library, and jest).
10
- */
11
- testId?: string
12
- /**
13
- * Children for Out of Stock components.
14
- */
15
- children: string | ReactNode
16
- }
17
-
18
- export type OutOfStockProps = OutOfStockBaseProps & {
19
- /**
20
- * Event emitted when form is submitted.
21
- */
22
- onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void
23
- } & FormHTMLAttributes<HTMLFormElement>
24
-
25
- const OutOfStock = ({
26
- testId = 'store-out-of-stock',
27
- children,
28
- ...otherProps
29
- }: OutOfStockProps) => {
30
- return (
31
- <section data-fs-out-of-stock data-testid={testId}>
32
- <Form data-out-of-stock-form testId={`${testId}-form`} {...otherProps}>
33
- {children}
34
- </Form>
35
- </section>
36
- )
37
- }
38
-
39
- export default OutOfStock
@@ -1,27 +0,0 @@
1
- import React from 'react'
2
-
3
- import type { OutOfStockBaseProps } from './OutOfStock'
4
-
5
- export type OutOfStockMessageProps = {
6
- /**
7
- * Attribute used for polymorphic component.
8
- */
9
- as?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span'
10
- } & OutOfStockBaseProps
11
-
12
- export const OutOfStockMessage = ({
13
- as: MessageComponent = 'p',
14
- testId = 'store-out-of-stock-message',
15
- children,
16
- ...otherProps
17
- }: OutOfStockMessageProps) => {
18
- return (
19
- <MessageComponent
20
- data-out-of-stock-message
21
- data-testid={testId}
22
- {...otherProps}
23
- >
24
- {children}
25
- </MessageComponent>
26
- )
27
- }
@@ -1,27 +0,0 @@
1
- import React from 'react'
2
-
3
- import type { OutOfStockBaseProps } from './OutOfStock'
4
-
5
- export type OutOfStockTitleProps = {
6
- /**
7
- * Attribute used for polymorphic component.
8
- */
9
- as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p'
10
- } & OutOfStockBaseProps
11
-
12
- export const OutOfStockTitle = ({
13
- as: TitleComponent = 'h2',
14
- testId = 'store-out-of-stock-title',
15
- children,
16
- ...otherProps
17
- }: OutOfStockTitleProps) => {
18
- return (
19
- <TitleComponent
20
- data-out-of-stock-title
21
- data-testid={testId}
22
- {...otherProps}
23
- >
24
- {children}
25
- </TitleComponent>
26
- )
27
- }
@@ -1,6 +0,0 @@
1
- export { default } from './OutOfStock'
2
- export { OutOfStockMessage } from './OutOfStockMessage'
3
- export { OutOfStockTitle } from './OutOfStockTitle'
4
- export type { OutOfStockProps } from './OutOfStock'
5
- export type { OutOfStockMessageProps } from './OutOfStockMessage'
6
- export type { OutOfStockTitleProps } from './OutOfStockTitle'