@faststore/ui 3.0.24 → 3.0.32-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/components/atoms/Incentive/Incentive.d.ts +11 -0
- package/dist/components/atoms/Incentive/Incentive.js +6 -0
- package/dist/components/atoms/Incentive/Incentive.js.map +1 -0
- package/dist/components/atoms/Incentive/index.d.ts +2 -0
- package/dist/components/atoms/Incentive/index.js +2 -0
- package/dist/components/atoms/Incentive/index.js.map +1 -0
- package/dist/components/atoms/TextArea/TextArea.d.ts +14 -0
- package/dist/components/atoms/TextArea/TextArea.js +10 -0
- package/dist/components/atoms/TextArea/TextArea.js.map +1 -0
- package/dist/components/atoms/TextArea/index.d.ts +2 -0
- package/dist/components/atoms/TextArea/index.js +2 -0
- package/dist/components/atoms/TextArea/index.js.map +1 -0
- package/dist/components/organisms/Tiles/Tile.d.ts +11 -0
- package/dist/components/organisms/Tiles/Tile.js +6 -0
- package/dist/components/organisms/Tiles/Tile.js.map +1 -0
- package/dist/components/organisms/Tiles/Tiles.d.ts +11 -0
- package/dist/components/organisms/Tiles/Tiles.js +30 -0
- package/dist/components/organisms/Tiles/Tiles.js.map +1 -0
- package/dist/components/organisms/Tiles/index.d.ts +4 -0
- package/dist/components/organisms/Tiles/index.js +3 -0
- package/dist/components/organisms/Tiles/index.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/typings/PolymorphicGenerics.d.ts +28 -0
- package/dist/typings/PolymorphicGenerics.js +8 -0
- package/dist/typings/PolymorphicGenerics.js.map +1 -0
- package/dist/typings/index.d.ts +1 -0
- package/dist/typings/index.js +2 -0
- package/dist/typings/index.js.map +1 -0
- package/package.json +3 -3
- package/src/components/molecules/InputField/styles.scss +3 -2
- package/src/components/molecules/OrderSummary/styles.scss +4 -0
- package/src/components/molecules/ProductCard/styles.scss +4 -2
- package/src/components/molecules/QuantitySelector/styles.scss +1 -1
- package/src/components/molecules/Toast/styles.scss +1 -1
- package/src/components/organisms/PaymentMethods/styles.scss +3 -5
- package/src/components/organisms/RegionModal/styles.scss +1 -1
- package/src/styles/base/tokens.scss +15 -12
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface IncentiveProps 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 Incentive: React.ForwardRefExoticComponent<IncentiveProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default Incentive;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
const Incentive = forwardRef(function Incentive({ testId = 'store-incentive', children, ...otherProps }, ref) {
|
|
3
|
+
return (React.createElement("div", { ref: ref, "data-fs-incentive": true, "data-testid": testId, ...otherProps }, children));
|
|
4
|
+
});
|
|
5
|
+
export default Incentive;
|
|
6
|
+
//# sourceMappingURL=Incentive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Incentive.js","sourceRoot":"","sources":["../../../../src/components/atoms/Incentive/Incentive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,SAAS,GAAG,UAAU,CAAiC,SAAS,SAAS,CAC7E,EAAE,MAAM,GAAG,iBAAiB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACvD,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,4CAAiC,MAAM,KAAM,UAAU,IACjE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/atoms/Incentive/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {
|
|
4
|
+
/**
|
|
5
|
+
* Current variant of the input.
|
|
6
|
+
*/
|
|
7
|
+
variant?: 'success' | 'error';
|
|
8
|
+
/**
|
|
9
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
10
|
+
*/
|
|
11
|
+
testId?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
14
|
+
export default TextArea;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
const TextArea = forwardRef(function TextArea({ variant, testId = 'store-textarea', ...otherProps }, ref) {
|
|
3
|
+
const variants = {
|
|
4
|
+
'data-success': variant === 'success' || undefined,
|
|
5
|
+
'data-error': variant === 'error' || undefined,
|
|
6
|
+
};
|
|
7
|
+
return (React.createElement("textarea", { ref: ref, "data-fs-textarea": true, "data-testid": testId, ...variants, ...otherProps }));
|
|
8
|
+
});
|
|
9
|
+
export default TextArea;
|
|
10
|
+
//# sourceMappingURL=TextArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAczC,MAAM,QAAQ,GAAG,UAAU,CACzB,SAAS,QAAQ,CACf,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,UAAU,EAAE,EACrD,GAAG;IAEH,MAAM,QAAQ,GAAG;QACf,cAAc,EAAE,OAAO,KAAK,SAAS,IAAI,SAAS;QAClD,YAAY,EAAE,OAAO,KAAK,OAAO,IAAI,SAAS;KAC/C,CAAA;IAED,OAAO,CACL,kCACE,GAAG,EAAE,GAAG,2CAEK,MAAM,KACf,QAAQ,KACR,UAAU,GACd,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface TileProps extends HTMLAttributes<HTMLLIElement> {
|
|
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 Tile: React.ForwardRefExoticComponent<TileProps & React.RefAttributes<HTMLLIElement>>;
|
|
11
|
+
export default Tile;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
const Tile = forwardRef(function Tile({ testId = 'store-tile', children, ...otherProps }, ref) {
|
|
3
|
+
return (React.createElement("li", { ref: ref, role: "listitem", "data-fs-tile": true, "data-testid": testId, ...otherProps }, children));
|
|
4
|
+
});
|
|
5
|
+
export default Tile;
|
|
6
|
+
//# sourceMappingURL=Tile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,IAAI,GAAG,UAAU,CAA2B,SAAS,IAAI,CAC7D,EAAE,MAAM,GAAG,YAAY,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAClD,GAAG;IAEH,OAAO,CACL,4BACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,UAAU,uCAEF,MAAM,KACf,UAAU,IAEb,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface TilesProps extends HTMLAttributes<HTMLUListElement> {
|
|
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 Tiles: React.ForwardRefExoticComponent<TilesProps & React.RefAttributes<HTMLUListElement>>;
|
|
11
|
+
export default Tiles;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { Children, forwardRef } from 'react';
|
|
2
|
+
import { Tile } from '.';
|
|
3
|
+
const MIN_CHILDREN = 2;
|
|
4
|
+
const MAX_CHILDREN = 4;
|
|
5
|
+
const NUMBER_ITEMS_TO_EXPAND_FIRST_TWO = 2;
|
|
6
|
+
const NUMBER_ITEMS_TO_EXPAND_FIRST = 3;
|
|
7
|
+
const Tiles = forwardRef(function Tiles({ testId = 'store-tiles', children, ...otherProps }, ref) {
|
|
8
|
+
const childrenCount = Children.count(children);
|
|
9
|
+
if (process.env.NODE_ENV === 'development') {
|
|
10
|
+
const isOutOfBounds = childrenCount < MIN_CHILDREN || childrenCount > MAX_CHILDREN;
|
|
11
|
+
if (isOutOfBounds) {
|
|
12
|
+
throw new Error(`Tiles cannot receive less than ${MIN_CHILDREN} or more than ${MAX_CHILDREN} children.`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if (process.env.NODE_ENV === 'development') {
|
|
16
|
+
Children.forEach(children, (child) => {
|
|
17
|
+
if (child.type !== Tile) {
|
|
18
|
+
throw new Error('Only Tile components allowed as children.');
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
const expandedClass = childrenCount === NUMBER_ITEMS_TO_EXPAND_FIRST
|
|
23
|
+
? 'expanded-first'
|
|
24
|
+
: childrenCount === NUMBER_ITEMS_TO_EXPAND_FIRST_TWO
|
|
25
|
+
? 'expanded-first-two'
|
|
26
|
+
: '';
|
|
27
|
+
return (React.createElement("ul", { ref: ref, role: "list", "data-fs-tiles": true, "data-fs-tiles-variant": expandedClass, "data-fs-content": "tiles", "data-testid": testId, ...otherProps }, children));
|
|
28
|
+
});
|
|
29
|
+
export default Tiles;
|
|
30
|
+
//# sourceMappingURL=Tiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tiles.js","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/Tiles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGnD,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAA;AAUxB,MAAM,YAAY,GAAG,CAAC,CAAA;AACtB,MAAM,YAAY,GAAG,CAAC,CAAA;AACtB,MAAM,gCAAgC,GAAG,CAAC,CAAA;AAC1C,MAAM,4BAA4B,GAAG,CAAC,CAAA;AAEtC,MAAM,KAAK,GAAG,UAAU,CAA+B,SAAS,KAAK,CACnE,EAAE,MAAM,GAAG,aAAa,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACnD,GAAG;IAEH,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAE9C,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QAC1C,MAAM,aAAa,GACjB,aAAa,GAAG,YAAY,IAAI,aAAa,GAAG,YAAY,CAAA;QAE9D,IAAI,aAAa,EAAE;YACjB,MAAM,IAAI,KAAK,CACb,kCAAkC,YAAY,iBAAiB,YAAY,YAAY,CACxF,CAAA;SACF;KACF;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QAC1C,QAAQ,CAAC,OAAO,CAAC,QAAwB,EAAE,CAAC,KAAK,EAAE,EAAE;YACnD,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE;gBACvB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;aAC7D;QACH,CAAC,CAAC,CAAA;KACH;IAED,MAAM,aAAa,GACjB,aAAa,KAAK,4BAA4B;QAC5C,CAAC,CAAC,gBAAgB;QAClB,CAAC,CAAC,aAAa,KAAK,gCAAgC;YACpD,CAAC,CAAC,oBAAoB;YACtB,CAAC,CAAC,EAAE,CAAA;IAER,OAAO,CACL,4BACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,MAAM,kDAEY,aAAa,qBACpB,OAAO,iBACV,MAAM,KACf,UAAU,IAEb,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAG1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from '@faststore/components';
|
|
2
|
+
export { default as TextArea } from './components/atoms/TextArea';
|
|
3
|
+
export type { TextAreaProps } from './components/atoms/TextArea';
|
|
4
|
+
export { default as Incentive } from './components/atoms/Incentive';
|
|
5
|
+
export type { IncentiveProps } from './components/atoms/Incentive';
|
|
6
|
+
export { Tile, Tiles } from './components/organisms/Tiles';
|
|
7
|
+
export type { TilesProps, TileProps } from './components/organisms/Tiles';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from '@faststore/components';
|
|
2
|
+
// Atoms
|
|
3
|
+
export { default as TextArea } from './components/atoms/TextArea';
|
|
4
|
+
export { default as Incentive } from './components/atoms/Incentive';
|
|
5
|
+
// Organisms
|
|
6
|
+
export { Tile, Tiles } from './components/organisms/Tiles';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These were heavily inspired by "Forwarding refs for a polymorphic React
|
|
3
|
+
* component in TypeScript", written by Ben Ilegbodu.
|
|
4
|
+
*
|
|
5
|
+
* Article link: https://www.benmvp.com/blog/forwarding-refs-polymorphic-react-component-typescript/
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType } from 'react';
|
|
8
|
+
type AsProp<C extends ElementType> = {
|
|
9
|
+
as?: C;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Allows for extending a set of props (`ExtendedProps`) by an overriding set of props
|
|
13
|
+
* (`OverrideProps`), ensuring that any duplicates are overridden by the overriding
|
|
14
|
+
* set of props.
|
|
15
|
+
*/
|
|
16
|
+
type ExtendableProps<ExtendedProps = Record<string, never>, OverrideProps = Record<string, never>> = OverrideProps & Omit<ExtendedProps, keyof OverrideProps>;
|
|
17
|
+
/**
|
|
18
|
+
* Allows for inheriting the props from the specified element type so that
|
|
19
|
+
* props like children, className & style work, as well as element-specific
|
|
20
|
+
* attributes like aria roles. The component (`C`) must be passed in.
|
|
21
|
+
*/
|
|
22
|
+
type InheritableElementProps<C extends ElementType, Props = Record<string, never>> = ExtendableProps<ComponentPropsWithoutRef<C>, Props>;
|
|
23
|
+
export type PolymorphicComponentProps<C extends ElementType, Props = Record<string, never>> = InheritableElementProps<C, Props & AsProp<C>>;
|
|
24
|
+
export type PolymorphicComponentPropsWithRef<C extends ElementType, P = Record<string, never>> = PolymorphicComponentProps<C, P> & {
|
|
25
|
+
ref?: ComponentPropsWithRef<C>['ref'];
|
|
26
|
+
};
|
|
27
|
+
export type PolymorphicRef<C extends ElementType> = PolymorphicComponentPropsWithRef<C>['ref'];
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These were heavily inspired by "Forwarding refs for a polymorphic React
|
|
3
|
+
* component in TypeScript", written by Ben Ilegbodu.
|
|
4
|
+
*
|
|
5
|
+
* Article link: https://www.benmvp.com/blog/forwarding-refs-polymorphic-react-component-typescript/
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=PolymorphicGenerics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolymorphicGenerics.js","sourceRoot":"","sources":["../../src/typings/PolymorphicGenerics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { PolymorphicComponentProps, PolymorphicComponentPropsWithRef, PolymorphicRef, } from './PolymorphicGenerics';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/typings/index.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/ui",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.32-alpha.0",
|
|
4
4
|
"description": "A lightweight, framework agnostic component library for React",
|
|
5
5
|
"author": "emersonlaurentino",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@faststore/components": "^3.0.
|
|
51
|
+
"@faststore/components": "^3.0.32-alpha.0",
|
|
52
52
|
"include-media": "^1.4.10",
|
|
53
53
|
"modern-normalize": "^1.1.0",
|
|
54
54
|
"react-swipeable": "^7.0.0",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"volta": {
|
|
72
72
|
"extends": "../../package.json"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "0535b4a1cea2f006ddf542caed8e8e51675fd43a"
|
|
75
75
|
}
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
color: var(--fs-input-field-color);
|
|
52
52
|
|
|
53
53
|
&:placeholder-shown + label {
|
|
54
|
-
top: calc(
|
|
54
|
+
top: calc(50% - (var(--fs-input-field-size) / 2));
|
|
55
55
|
overflow: hidden;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
position: absolute;
|
|
81
81
|
padding: var(--fs-input-field-label-padding);
|
|
82
82
|
font-size: var(--fs-input-field-size);
|
|
83
|
-
line-height:
|
|
83
|
+
line-height: var(--fs-input-field-size);
|
|
84
84
|
color: var(--fs-input-field-label-color);
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -120,6 +120,7 @@
|
|
|
120
120
|
position: absolute;
|
|
121
121
|
top: 0;
|
|
122
122
|
right: 0;
|
|
123
|
+
height: 100%;
|
|
123
124
|
|
|
124
125
|
[data-fs-button-wrapper]::before {
|
|
125
126
|
position: absolute;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// Default properties
|
|
7
7
|
--fs-order-summary-padding : var(--fs-spacing-3);
|
|
8
8
|
--fs-order-summary-margin-bottom : var(--fs-spacing-2);
|
|
9
|
+
--fs-order-summary-row-gap : 0;
|
|
9
10
|
|
|
10
11
|
--fs-order-summary-discount-text-color : var(--fs-color-success-text);
|
|
11
12
|
|
|
@@ -15,7 +16,10 @@
|
|
|
15
16
|
// --------------------------------------------------------
|
|
16
17
|
// Structural Styles
|
|
17
18
|
// --------------------------------------------------------
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
18
21
|
padding: var(--fs-order-summary-padding);
|
|
22
|
+
row-gap: var(--fs-order-summary-row-gap);
|
|
19
23
|
|
|
20
24
|
li {
|
|
21
25
|
display: flex;
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
--fs-product-card-price-size : var(--fs-text-size-base);
|
|
40
40
|
|
|
41
41
|
// Out Of Stock
|
|
42
|
-
--fs-product-card-out-of-stock-bkg-color :
|
|
42
|
+
--fs-product-card-out-of-stock-bkg-color : transparent;
|
|
43
|
+
--fs-product-card-out-of-stock-border-color: var(--fs-color-neutral-1);
|
|
43
44
|
--fs-product-card-out-of-stock-img-opacity : .5;
|
|
44
45
|
|
|
45
46
|
// Wide
|
|
@@ -157,7 +158,8 @@
|
|
|
157
158
|
// --------------------------------------------------------
|
|
158
159
|
|
|
159
160
|
&[data-fs-product-card="out-of-stock"] {
|
|
160
|
-
--fs-product-card-bkg-color
|
|
161
|
+
--fs-product-card-bkg-color : var(--fs-product-card-out-of-stock-bkg-color);
|
|
162
|
+
--fs-product-card-border-color : var(--fs-product-card-out-of-stock-border-color);
|
|
161
163
|
|
|
162
164
|
[data-fs-product-card-image] { opacity: var(--fs-product-card-out-of-stock-img-opacity); }
|
|
163
165
|
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
justify-content: center;
|
|
43
43
|
width: var(--fs-qty-selector-width);
|
|
44
44
|
height: var(--fs-qty-selector-height);
|
|
45
|
-
border-radius: var(--fs-qty-selector-border-radius);
|
|
46
45
|
box-shadow: var(--fs-qty-selector-shadow);
|
|
47
46
|
|
|
48
47
|
[data-quantity-selector-input] {
|
|
@@ -53,6 +52,7 @@
|
|
|
53
52
|
color: var(--fs-qty-selector-text-color);
|
|
54
53
|
text-align: center;
|
|
55
54
|
border: var(--fs-qty-selector-border-width) solid var(--fs-qty-selector-border-color);
|
|
55
|
+
border-radius: var(--fs-qty-selector-border-radius);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
[data-quantity-selector-button] {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
// Title
|
|
33
33
|
--fs-toast-title-size : var(--fs-text-size-body);
|
|
34
34
|
--fs-toast-title-weight : var(--fs-text-weight-bold);
|
|
35
|
-
--fs-toast-title-line-height :
|
|
35
|
+
--fs-toast-title-line-height : 1.2;
|
|
36
36
|
--fs-toast-title-margin-left : var(--fs-spacing-3);
|
|
37
37
|
|
|
38
38
|
// Message
|
|
@@ -44,17 +44,15 @@
|
|
|
44
44
|
justify-content: space-between;
|
|
45
45
|
margin-top: var(--fs-payment-methods-flags-margin-top);
|
|
46
46
|
|
|
47
|
-
li {
|
|
48
|
-
display: flex;
|
|
49
|
-
place-content: center;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
47
|
@include media("<notebook") {
|
|
53
48
|
column-gap: var(--fs-grid-gap-2);
|
|
54
49
|
}
|
|
55
50
|
}
|
|
56
51
|
|
|
57
52
|
[data-fs-payment-methods-flag] {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
58
56
|
width: var(--fs-payment-methods-flag-width);
|
|
59
57
|
height: var(--fs-payment-methods-flag-height);
|
|
60
58
|
overflow: hidden;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// --------------------------------------------------------
|
|
15
15
|
// Structural Styles
|
|
16
16
|
// --------------------------------------------------------
|
|
17
|
-
[data-fs-
|
|
17
|
+
[data-fs-input-field] {
|
|
18
18
|
margin-bottom: var(--fs-region-modal-margin-bottom);
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -117,6 +117,8 @@
|
|
|
117
117
|
// WEIGHT
|
|
118
118
|
--fs-text-weight-light : 300;
|
|
119
119
|
--fs-text-weight-regular : 400;
|
|
120
|
+
--fs-text-weight-medium : 500;
|
|
121
|
+
--fs-text-weight-semibold : 600;
|
|
120
122
|
--fs-text-weight-bold : 700;
|
|
121
123
|
--fs-text-weight-black : 900;
|
|
122
124
|
|
|
@@ -128,8 +130,8 @@
|
|
|
128
130
|
// ensure consistency throughout the project.
|
|
129
131
|
// Access https://type-scale.com and pick a scale that
|
|
130
132
|
// suits the store's branding.
|
|
131
|
-
--fs-text-scale-mobile :
|
|
132
|
-
--fs-text-scale-desktop :
|
|
133
|
+
--fs-text-scale-mobile : 2px;
|
|
134
|
+
--fs-text-scale-desktop : 4px;
|
|
133
135
|
|
|
134
136
|
--fs-scale : var(--fs-text-scale-mobile);
|
|
135
137
|
|
|
@@ -141,18 +143,19 @@
|
|
|
141
143
|
--fs-text-size-base : 16px; // 1rem
|
|
142
144
|
|
|
143
145
|
--fs-text-size-0 : 12px; // Smallest
|
|
144
|
-
--fs-text-size-1 : 14px; // Smaller
|
|
145
|
-
--fs-text-size-2 : var(--fs-text-size-base);
|
|
146
|
-
--fs-text-size-3 : calc(var(--fs-text-size-2)
|
|
147
|
-
--fs-text-size-4 : calc(var(--fs-text-size-3)
|
|
148
|
-
--fs-text-size-5 : calc(var(--fs-text-size-4)
|
|
149
|
-
--fs-text-size-6 : calc(var(--fs-text-size-5)
|
|
150
|
-
--fs-text-size-7 : calc(var(--fs-text-size-6)
|
|
151
|
-
--fs-text-size-8 : calc(var(--fs-text-size-7)
|
|
146
|
+
--fs-text-size-1 : 14px; // Smaller // Mobile Desktop
|
|
147
|
+
--fs-text-size-2 : var(--fs-text-size-base); // 16px 16px
|
|
148
|
+
--fs-text-size-3 : calc(var(--fs-text-size-2) + var(--fs-scale)); // 18px 20px
|
|
149
|
+
--fs-text-size-4 : calc(var(--fs-text-size-3) + var(--fs-scale)); // 20px 24px
|
|
150
|
+
--fs-text-size-5 : calc(var(--fs-text-size-4) + var(--fs-scale)); // 22px 28px
|
|
151
|
+
--fs-text-size-6 : calc(var(--fs-text-size-5) + var(--fs-scale)); // 24px 32px
|
|
152
|
+
--fs-text-size-7 : calc(var(--fs-text-size-6) + (var(--fs-scale) * 2)); // 28px 40px
|
|
153
|
+
--fs-text-size-8 : calc(var(--fs-text-size-7) + (var(--fs-scale) * 2)); // 32px 48px
|
|
154
|
+
--fs-text-size-9 : calc(var(--fs-text-size-8) + (var(--fs-scale) * 2)); // 36px 56px
|
|
152
155
|
|
|
153
156
|
// HIERARCHY SCALE
|
|
154
|
-
--fs-text-size-title-huge : var(--fs-text-size-
|
|
155
|
-
--fs-text-size-title-page : var(--fs-text-size-
|
|
157
|
+
--fs-text-size-title-huge : var(--fs-text-size-8);
|
|
158
|
+
--fs-text-size-title-page : var(--fs-text-size-7);
|
|
156
159
|
--fs-text-size-title-product : var(--fs-text-size-4);
|
|
157
160
|
--fs-text-size-title-section : var(--fs-text-size-4);
|
|
158
161
|
--fs-text-size-title-subsection : var(--fs-text-size-4);
|