@faststore/core 0.3.5 → 0.3.7
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/.github/workflows/release.yml +1 -1
- package/.storybook/preview.js +0 -4
- package/CHANGELOG.md +9 -0
- package/README.md +13 -11
- package/cypress/integration/analytics.test.js +1 -1
- package/cypress/integration/search.test.js +1 -1
- package/package.json +17 -16
- package/src/components/cart/CartItem/CartItem.tsx +4 -4
- package/src/components/cart/CartSidebar/CartSidebar.stories.mdx +3 -3
- package/src/components/cart/CartSidebar/CartSidebar.tsx +14 -11
- package/src/components/cart/CartToggle/CartToggle.tsx +6 -4
- package/src/components/cart/EmptyCart/EmptyCart.tsx +4 -3
- package/src/components/common/Footer/Footer.tsx +9 -5
- package/src/components/common/Footer/FooterLinks.tsx +1 -1
- package/src/components/common/Navbar/Navbar.tsx +4 -6
- package/src/components/common/Navbar/NavbarSlider.tsx +3 -5
- package/src/components/common/Navbar/navbar.module.scss +1 -1
- package/src/components/product/OutOfStock/OutOfStock.tsx +5 -5
- package/src/components/product/ProductCard/ProductCard.stories.mdx +14 -14
- package/src/components/product/ProductCard/ProductCard.tsx +10 -9
- package/src/components/regionalization/Regionalization.stories.mdx +2 -6
- package/src/components/regionalization/RegionalizationBar/RegionalizationBar.tsx +3 -3
- package/src/components/regionalization/RegionalizationButton/RegionalizationButton.tsx +4 -3
- package/src/components/regionalization/RegionalizationInput/RegionalizationInput.tsx +2 -2
- package/src/components/regionalization/RegionalizationModal/RegionalizationModalContent.tsx +3 -2
- package/src/components/search/Filter/Facets.tsx +9 -6
- package/src/components/search/Filter/FilterSlider.tsx +6 -6
- package/src/components/search/SearchHistory/SearchHistory.tsx +4 -5
- package/src/components/search/SearchInput/search-input.module.scss +1 -14
- package/src/components/search/SearchTop/SearchTop.tsx +4 -5
- package/src/components/search/Sort/Sort.tsx +2 -3
- package/src/components/sections/BannerText/banner-text.module.scss +6 -6
- package/src/components/sections/Incentives/Incentives.tsx +1 -1
- package/src/components/sections/Newsletter/Newsletter.tsx +10 -8
- package/src/components/sections/Newsletter/newsletter.module.scss +1 -1
- package/src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx +1 -1
- package/src/components/sections/ProducDetailsContent/product-details-content.module.scss +0 -9
- package/src/components/sections/ProductDetails/ProductDetails.tsx +11 -5
- package/src/components/sections/ProductDetails/product-details.module.scss +1 -1
- package/src/components/sections/ProductGallery/ProductGallery.tsx +4 -3
- package/src/components/sections/ScrollToTopButton/ScrollToTopButton.tsx +5 -4
- package/src/components/ui/Alert/Alert.tsx +7 -4
- package/src/components/ui/Button/Button.stories.mdx +3 -44
- package/src/components/ui/Button/ButtonLink/ButtonLink.tsx +2 -1
- package/src/components/ui/Button/button.module.scss +0 -381
- package/src/components/ui/Button/index.ts +0 -3
- package/src/components/ui/Gift/Gift.tsx +2 -2
- package/src/components/ui/ImageGallery/ImageGallerySelector.tsx +5 -5
- package/src/components/ui/ImageGallery/image-gallery-selector.module.scss +6 -0
- package/src/components/ui/Link/Link.tsx +19 -34
- package/src/components/ui/PriceRange/PriceRange.tsx +6 -4
- package/src/components/ui/PriceRange/price-range.module.scss +1 -1
- package/src/components/ui/ProductTitle/ProductTitle.stories.mdx +13 -15
- package/src/components/ui/QuantitySelector/quantity-selector.module.scss +21 -26
- package/src/components/ui/ShippingSimulation/ShippingSimulation.stories.mdx +1 -1
- package/src/components/ui/ShippingSimulation/ShippingSimulation.tsx +8 -3
- package/src/components/ui/SlideOver/SlideOver.stories.mdx +3 -3
- package/src/pages/_app.tsx +3 -4
- package/src/styles/global/components.scss +0 -3
- package/src/styles/global/storybook-components.scss +3 -3
- package/src/styles/global/utilities.scss +12 -5
- package/src/components/ui/Badge/Badge.stories.mdx +0 -465
- package/src/components/ui/Badge/Badge.tsx +0 -76
- package/src/components/ui/Badge/DiscountBadge.stories.mdx +0 -191
- package/src/components/ui/Badge/DiscountBadge.tsx +0 -57
- package/src/components/ui/Badge/badge.module.scss +0 -252
- package/src/components/ui/Badge/index.ts +0 -4
- package/src/components/ui/Button/Button.tsx +0 -85
- package/src/components/ui/Button/ButtonBuy/ButtonBuy.tsx +0 -24
- package/src/components/ui/Button/ButtonBuy/index.ts +0 -1
- package/src/components/ui/Checkbox/Checkbox.stories.mdx +0 -268
- package/src/components/ui/Checkbox/Checkbox.tsx +0 -20
- package/src/components/ui/Checkbox/checkbox.module.scss +0 -157
- package/src/components/ui/Checkbox/index.ts +0 -2
- package/src/components/ui/InputText/InputText.stories.mdx +0 -311
- package/src/components/ui/InputText/InputText.tsx +0 -128
- package/src/components/ui/InputText/index.ts +0 -2
- package/src/components/ui/InputText/input-text.module.scss +0 -168
- package/src/components/ui/Link/link.module.scss +0 -98
- package/src/components/ui/Radio/Radio.stories.mdx +0 -237
- package/src/components/ui/Radio/Radio.tsx +0 -36
- package/src/components/ui/Radio/index.ts +0 -2
- package/src/components/ui/Radio/radio.module.scss +0 -122
- package/src/components/ui/Select/Select.stories.mdx +0 -168
- package/src/components/ui/Select/Select.tsx +0 -70
- package/src/components/ui/Select/index.ts +0 -2
- package/src/components/ui/Select/select.module.scss +0 -85
- package/src/components/ui/SlideOver/overlay.scss +0 -14
- package/src/styles/global/resets.scss +0 -48
- package/src/styles/global/tokens.scss +0 -276
- package/src/styles/global/typography.scss +0 -66
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
|
|
2
|
-
import Select from '.'
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
TokenTable,
|
|
6
|
-
TokenRow,
|
|
7
|
-
TokenDivider,
|
|
8
|
-
} from 'src/../.storybook/components'
|
|
9
|
-
|
|
10
|
-
<Meta title="Atoms/Select" component={Select} />
|
|
11
|
-
|
|
12
|
-
export const Template = (args) => <Select {...args} />
|
|
13
|
-
|
|
14
|
-
<header>
|
|
15
|
-
|
|
16
|
-
# Select
|
|
17
|
-
|
|
18
|
-
Select components allow users to pick an option from a predefined list.
|
|
19
|
-
|
|
20
|
-
</header>
|
|
21
|
-
|
|
22
|
-
## Overview
|
|
23
|
-
|
|
24
|
-
The `Select` component uses [FastStore UI Select](https://www.faststore.dev/reference/ui/atoms/Select) as base.
|
|
25
|
-
|
|
26
|
-
<Canvas>
|
|
27
|
-
<Story
|
|
28
|
-
name="overview-default"
|
|
29
|
-
args={{
|
|
30
|
-
id: 'overview-default',
|
|
31
|
-
options: {
|
|
32
|
-
name_asc: 'Name, A-Z',
|
|
33
|
-
name_desc: 'Name, Z-A',
|
|
34
|
-
},
|
|
35
|
-
label: 'Order by:',
|
|
36
|
-
}}
|
|
37
|
-
>
|
|
38
|
-
{Template.bind({})}
|
|
39
|
-
</Story>
|
|
40
|
-
<Story
|
|
41
|
-
name="overview-disabled"
|
|
42
|
-
args={{
|
|
43
|
-
id: 'overview-disabled',
|
|
44
|
-
options: {
|
|
45
|
-
name_asc: 'Name, A-Z',
|
|
46
|
-
name_desc: 'Name, Z-A',
|
|
47
|
-
},
|
|
48
|
-
label: 'Order by:',
|
|
49
|
-
disabled: true,
|
|
50
|
-
}}
|
|
51
|
-
>
|
|
52
|
-
{Template.bind({})}
|
|
53
|
-
</Story>
|
|
54
|
-
</Canvas>
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Usage
|
|
59
|
-
|
|
60
|
-
`import Select from '../components/ui/Select'`
|
|
61
|
-
|
|
62
|
-
<Canvas>
|
|
63
|
-
<Story
|
|
64
|
-
name="select-default"
|
|
65
|
-
args={{
|
|
66
|
-
id: 'select-default',
|
|
67
|
-
options: {
|
|
68
|
-
name_asc: 'Name, A-Z',
|
|
69
|
-
name_desc: 'Name, Z-A',
|
|
70
|
-
},
|
|
71
|
-
label: 'Order by:',
|
|
72
|
-
}}
|
|
73
|
-
>
|
|
74
|
-
{Template.bind({})}
|
|
75
|
-
</Story>
|
|
76
|
-
</Canvas>
|
|
77
|
-
|
|
78
|
-
<ArgsTable story="select-default" />
|
|
79
|
-
|
|
80
|
-
<TokenTable>
|
|
81
|
-
<TokenRow token="--fs-select-height" value="var(--fs-spacing-6)" />
|
|
82
|
-
<TokenRow token="--fs-select-min-height" value="var(--fs-control-tap-size)" />
|
|
83
|
-
<TokenRow
|
|
84
|
-
token="--fs-select-padding"
|
|
85
|
-
value="var(--fs-spacing-1) var(--fs-spacing-5) var(--fs-spacing-1) var(--fs-spacing-2)"
|
|
86
|
-
/>
|
|
87
|
-
<TokenDivider />
|
|
88
|
-
<TokenRow
|
|
89
|
-
token="--fs-select-text-color"
|
|
90
|
-
value="var(--fs-color-link)"
|
|
91
|
-
isColor
|
|
92
|
-
/>
|
|
93
|
-
<TokenDivider />
|
|
94
|
-
<TokenRow token="--fs-select-border-radius" value="var(--fs-border-radius)" />
|
|
95
|
-
<TokenDivider />
|
|
96
|
-
<TokenRow token="--fs-select-bkg" value="transparent" />
|
|
97
|
-
<TokenRow
|
|
98
|
-
token="--fs-select-bkg-color-focus"
|
|
99
|
-
value="var(--fs-color-primary-bkg-light)"
|
|
100
|
-
isColor
|
|
101
|
-
/>
|
|
102
|
-
<TokenRow
|
|
103
|
-
token="--fs-select-bkg-color-hover"
|
|
104
|
-
value="var(--fs-select-bkg-color-focus)"
|
|
105
|
-
globalValue="var(--fs-color-primary-bkg-light)"
|
|
106
|
-
isColor
|
|
107
|
-
/>
|
|
108
|
-
<TokenDivider />
|
|
109
|
-
<TokenRow
|
|
110
|
-
token="--fs-select-transition-timing"
|
|
111
|
-
value="var(--fs-transition-timing)"
|
|
112
|
-
/>
|
|
113
|
-
<TokenRow
|
|
114
|
-
token="--fs-select-transition-property"
|
|
115
|
-
value="var(--fs-transition-property)"
|
|
116
|
-
/>
|
|
117
|
-
<TokenRow
|
|
118
|
-
token="--fs-select-transition-function"
|
|
119
|
-
value="var(--fs-transition-function)"
|
|
120
|
-
/>
|
|
121
|
-
</TokenTable>
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
## Nested Elements
|
|
126
|
-
|
|
127
|
-
### Label
|
|
128
|
-
|
|
129
|
-
<TokenTable>
|
|
130
|
-
<TokenRow
|
|
131
|
-
token="--fs-select-label-color"
|
|
132
|
-
value="var(--fs-color-text-light)"
|
|
133
|
-
isColor
|
|
134
|
-
/>
|
|
135
|
-
<TokenRow
|
|
136
|
-
token="--fs-select-label-margin-right"
|
|
137
|
-
value="var(--fs-spacing-1)"
|
|
138
|
-
/>
|
|
139
|
-
</TokenTable>
|
|
140
|
-
|
|
141
|
-
### Icon
|
|
142
|
-
|
|
143
|
-
<TokenTable>
|
|
144
|
-
<TokenRow
|
|
145
|
-
token="--fs-select-icon-color"
|
|
146
|
-
value="var(--fs-color-link)"
|
|
147
|
-
isColor
|
|
148
|
-
/>
|
|
149
|
-
<TokenRow
|
|
150
|
-
token="--fs-select-icon-position-right"
|
|
151
|
-
value="var(--fs-spacing-2)"
|
|
152
|
-
/>
|
|
153
|
-
</TokenTable>
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
## Variants
|
|
158
|
-
|
|
159
|
-
### Disabled
|
|
160
|
-
|
|
161
|
-
<TokenTable>
|
|
162
|
-
<TokenRow
|
|
163
|
-
token="--fs-select-disabled-text-color"
|
|
164
|
-
value="var(--fs-color-disabled-text)"
|
|
165
|
-
isColor
|
|
166
|
-
/>
|
|
167
|
-
<TokenRow token="--fs-select-disabled-text-opacity" value="1" />
|
|
168
|
-
</TokenTable>
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Select as UISelect, Label as UILabel } from '@faststore/ui'
|
|
2
|
-
import type { SelectProps as UISelectProps } from '@faststore/ui'
|
|
3
|
-
|
|
4
|
-
import Icon from 'src/components/ui/Icon'
|
|
5
|
-
|
|
6
|
-
import styles from './select.module.scss'
|
|
7
|
-
|
|
8
|
-
export interface SelectProps extends UISelectProps {
|
|
9
|
-
/**
|
|
10
|
-
* Redefines the id property to be required when using the Select component. The
|
|
11
|
-
* id will be used to link the UISelect component and its label.
|
|
12
|
-
*/
|
|
13
|
-
id: string
|
|
14
|
-
/**
|
|
15
|
-
* Defines the options available in the select. The SelectOptions object
|
|
16
|
-
* keys are the property names, while the values correspond to the text that
|
|
17
|
-
* will be displayed in the UI.
|
|
18
|
-
*/
|
|
19
|
-
options: Record<string, string>
|
|
20
|
-
/**
|
|
21
|
-
* Specifies the text that will be displayed in the label right next to the Select.
|
|
22
|
-
* If omitted, the label will not be rendered.
|
|
23
|
-
*/
|
|
24
|
-
label?: string
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function Select({
|
|
28
|
-
id,
|
|
29
|
-
className,
|
|
30
|
-
options,
|
|
31
|
-
onChange,
|
|
32
|
-
label,
|
|
33
|
-
value,
|
|
34
|
-
'aria-label': ariaLabel,
|
|
35
|
-
testId,
|
|
36
|
-
...otherProps
|
|
37
|
-
}: SelectProps) {
|
|
38
|
-
return (
|
|
39
|
-
<div data-fs-select className={`${styles.fsSelect} ${className}`}>
|
|
40
|
-
{label && (
|
|
41
|
-
<UILabel data-fs-select-label htmlFor={id}>
|
|
42
|
-
{label}
|
|
43
|
-
</UILabel>
|
|
44
|
-
)}
|
|
45
|
-
<UISelect
|
|
46
|
-
data-testid={testId}
|
|
47
|
-
onChange={onChange}
|
|
48
|
-
value={value}
|
|
49
|
-
aria-label={ariaLabel}
|
|
50
|
-
id={id}
|
|
51
|
-
{...otherProps}
|
|
52
|
-
>
|
|
53
|
-
{Object.keys(options).map((key) => (
|
|
54
|
-
<option key={key} value={key}>
|
|
55
|
-
{options[key]}
|
|
56
|
-
</option>
|
|
57
|
-
))}
|
|
58
|
-
</UISelect>
|
|
59
|
-
<Icon
|
|
60
|
-
data-fs-select-icon
|
|
61
|
-
name="CaretDown"
|
|
62
|
-
width={18}
|
|
63
|
-
height={18}
|
|
64
|
-
weight="bold"
|
|
65
|
-
/>
|
|
66
|
-
</div>
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export default Select
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
@import "src/styles/scaffold";
|
|
2
|
-
|
|
3
|
-
.fs-select[data-fs-select] {
|
|
4
|
-
// --------------------------------------------------------
|
|
5
|
-
// Design Tokens for Select
|
|
6
|
-
// --------------------------------------------------------
|
|
7
|
-
|
|
8
|
-
// Default properties
|
|
9
|
-
--fs-select-height : var(--fs-spacing-6);
|
|
10
|
-
--fs-select-min-height : var(--fs-control-tap-size);
|
|
11
|
-
--fs-select-padding : var(--fs-spacing-1) var(--fs-spacing-5) var(--fs-spacing-1) var(--fs-spacing-2);
|
|
12
|
-
|
|
13
|
-
--fs-select-text-color : var(--fs-color-link);
|
|
14
|
-
|
|
15
|
-
--fs-select-border-radius : var(--fs-border-radius);
|
|
16
|
-
|
|
17
|
-
--fs-select-bkg : transparent;
|
|
18
|
-
--fs-select-bkg-color-focus : var(--fs-color-primary-bkg-light);
|
|
19
|
-
--fs-select-bkg-color-hover : var(--fs-select-bkg-color-focus);
|
|
20
|
-
|
|
21
|
-
--fs-select-transition-timing : var(--fs-transition-timing);
|
|
22
|
-
--fs-select-transition-property : var(--fs-transition-property);
|
|
23
|
-
--fs-select-transition-function : var(--fs-transition-function);
|
|
24
|
-
|
|
25
|
-
// Label
|
|
26
|
-
--fs-select-label-color : var(--fs-color-text-light);
|
|
27
|
-
--fs-select-label-margin-right : var(--fs-spacing-1);
|
|
28
|
-
|
|
29
|
-
// Icon
|
|
30
|
-
--fs-select-icon-color : var(--fs-color-link);
|
|
31
|
-
--fs-select-icon-position-right : var(--fs-spacing-2);
|
|
32
|
-
|
|
33
|
-
// Disabled
|
|
34
|
-
--fs-select-disabled-text-color : var(--fs-color-disabled-text);
|
|
35
|
-
--fs-select-disabled-text-opacity : 1;
|
|
36
|
-
|
|
37
|
-
// --------------------------------------------------------
|
|
38
|
-
// Structural Styles
|
|
39
|
-
// --------------------------------------------------------
|
|
40
|
-
|
|
41
|
-
position: relative;
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
width: fit-content;
|
|
45
|
-
|
|
46
|
-
select {
|
|
47
|
-
padding: var(--fs-select-padding);
|
|
48
|
-
color: var(--fs-select-text-color);
|
|
49
|
-
background: var(--fs-select-bkg);
|
|
50
|
-
border: 0;
|
|
51
|
-
border-radius: var(--fs-select-border-radius);
|
|
52
|
-
box-shadow: 0;
|
|
53
|
-
transition: var(--fs-select-transition-property) var(--fs-select-transition-timing) var(--fs-select-transition-function);
|
|
54
|
-
appearance: none;
|
|
55
|
-
|
|
56
|
-
@include focus-ring-visible;
|
|
57
|
-
|
|
58
|
-
&:focus { background-color: var(--fs-select-bkg-color-focus); }
|
|
59
|
-
|
|
60
|
-
&:hover:not(:disabled) { background-color: var(--fs-select-bkg-color-hover); }
|
|
61
|
-
|
|
62
|
-
&:disabled {
|
|
63
|
-
color: var(--fs-select-disabled-text-color);
|
|
64
|
-
cursor: not-allowed;
|
|
65
|
-
opacity: var(--fs-select-disabled-text-opacity);
|
|
66
|
-
+ [data-fs-select-icon] { display: none; }
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@include media("<notebook") { min-height: var(--fs-select-min-height); }
|
|
70
|
-
|
|
71
|
-
@include media(">=notebook") { height: var(--fs-select-height); }
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[data-fs-select-label] {
|
|
75
|
-
margin-right: var(--fs-select-label-margin-right);
|
|
76
|
-
color: var(--fs-select-label-color);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
[data-fs-select-icon] {
|
|
80
|
-
position: absolute;
|
|
81
|
-
right: var(--fs-select-icon-position-right);
|
|
82
|
-
color: var(--fs-select-icon-color);
|
|
83
|
-
pointer-events: none;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
[data-modal-overlay] {
|
|
2
|
-
// --------------------------------------------------------
|
|
3
|
-
// Design Tokens for Overlay
|
|
4
|
-
// --------------------------------------------------------
|
|
5
|
-
--fs-overlay-bkg-color: rgb(0 0 0 / 20%);
|
|
6
|
-
|
|
7
|
-
position: fixed;
|
|
8
|
-
top: 0;
|
|
9
|
-
right: 0;
|
|
10
|
-
bottom: 0;
|
|
11
|
-
left: 0;
|
|
12
|
-
z-index: 3;
|
|
13
|
-
background-color: var(--fs-overlay-bkg-color);
|
|
14
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// ----------------------------------------------------------
|
|
2
|
-
// GLOBAL STYLES
|
|
3
|
-
// Resets
|
|
4
|
-
// ----------------------------------------------------------
|
|
5
|
-
|
|
6
|
-
@import "../vendors/modern-normalize.css";
|
|
7
|
-
|
|
8
|
-
// Reset default styles
|
|
9
|
-
body {
|
|
10
|
-
padding: 0;
|
|
11
|
-
margin: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Remove all of the default margins
|
|
15
|
-
blockquote,
|
|
16
|
-
dl,
|
|
17
|
-
dd,
|
|
18
|
-
h1,
|
|
19
|
-
h2,
|
|
20
|
-
h3,
|
|
21
|
-
h4,
|
|
22
|
-
h5,
|
|
23
|
-
h6,
|
|
24
|
-
hr,
|
|
25
|
-
figure,
|
|
26
|
-
p,
|
|
27
|
-
pre {
|
|
28
|
-
margin: 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Remove heading elements default style
|
|
32
|
-
h1,
|
|
33
|
-
h2,
|
|
34
|
-
h3,
|
|
35
|
-
h4,
|
|
36
|
-
h5,
|
|
37
|
-
h6 {
|
|
38
|
-
font-size: inherit;
|
|
39
|
-
font-weight: inherit;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Remove list elements default style
|
|
43
|
-
ol,
|
|
44
|
-
ul {
|
|
45
|
-
padding: 0;
|
|
46
|
-
margin: 0;
|
|
47
|
-
list-style: none;
|
|
48
|
-
}
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
// ----------------------------------------------------------
|
|
2
|
-
// GLOBAL TOKENS
|
|
3
|
-
// Base Store Theme
|
|
4
|
-
// ----------------------------------------------------------
|
|
5
|
-
|
|
6
|
-
@import "../vendors/include-media";
|
|
7
|
-
|
|
8
|
-
body {
|
|
9
|
-
// --------------------------------------------------------
|
|
10
|
-
// Colors (Branding Core)
|
|
11
|
-
// --------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// PALETTE
|
|
14
|
-
// Tone values must range from lightest to darkest.
|
|
15
|
-
// `0` is more suitable for backgrounds, and `4` for texts.
|
|
16
|
-
--fs-color-main-0 : #f1f2f3;
|
|
17
|
-
--fs-color-main-1 : #dbdbdb;
|
|
18
|
-
--fs-color-main-2 : #00419e;
|
|
19
|
-
--fs-color-main-3 : #002c71;
|
|
20
|
-
--fs-color-main-4 : #002155;
|
|
21
|
-
|
|
22
|
-
--fs-color-accent-0 : #e3e6e8;
|
|
23
|
-
--fs-color-accent-1 : #e3e6e8;
|
|
24
|
-
--fs-color-accent-2 : #74808b;
|
|
25
|
-
--fs-color-accent-3 : #5d666f;
|
|
26
|
-
--fs-color-accent-4 : #171a1c;
|
|
27
|
-
|
|
28
|
-
--fs-color-neutral-0 : #ffffff;
|
|
29
|
-
--fs-color-neutral-1 : #f1f2f3;
|
|
30
|
-
--fs-color-neutral-2 : #e3e6e8;
|
|
31
|
-
--fs-color-neutral-3 : #c7ccd1;
|
|
32
|
-
--fs-color-neutral-4 : #9099a2;
|
|
33
|
-
--fs-color-neutral-5 : #74808b;
|
|
34
|
-
--fs-color-neutral-6 : #5d666f;
|
|
35
|
-
--fs-color-neutral-7 : #171a1c;
|
|
36
|
-
|
|
37
|
-
// HIERARCHY
|
|
38
|
-
--fs-color-primary-text : var(--fs-color-text-inverse);
|
|
39
|
-
--fs-color-primary-bkg : var(--fs-color-main-2);
|
|
40
|
-
--fs-color-primary-bkg-hover : var(--fs-color-main-3);
|
|
41
|
-
--fs-color-primary-bkg-active : var(--fs-color-main-4);
|
|
42
|
-
--fs-color-primary-bkg-light : var(--fs-color-main-0);
|
|
43
|
-
--fs-color-primary-bkg-light-active : var(--fs-color-main-1);
|
|
44
|
-
|
|
45
|
-
--fs-color-secondary-text : var(--fs-color-primary-bkg);
|
|
46
|
-
--fs-color-secondary-bkg : transparent;
|
|
47
|
-
--fs-color-secondary-bkg-hover : var(--fs-color-primary-bkg);
|
|
48
|
-
--fs-color-secondary-bkg-active : var(--fs-color-main-3);
|
|
49
|
-
--fs-color-secondary-bkg-light : var(--fs-color-main-0);
|
|
50
|
-
--fs-color-secondary-bkg-light-active: var(--fs-color-secondary-bkg-light);
|
|
51
|
-
|
|
52
|
-
--fs-color-tertiary-text : var(--fs-color-link);
|
|
53
|
-
--fs-color-tertiary-bkg : transparent;
|
|
54
|
-
--fs-color-tertiary-bkg-hover : var(--fs-color-main-0);
|
|
55
|
-
--fs-color-tertiary-bkg-active : var(--fs-color-main-1);
|
|
56
|
-
--fs-color-tertiary-bkg-light : var(--fs-color-neutral-0);
|
|
57
|
-
--fs-color-tertiary-bkg-light-active : var(--fs-color-tertiary-bkg-light);
|
|
58
|
-
|
|
59
|
-
// COMPONENTS & STATES
|
|
60
|
-
--fs-color-body-bkg : var(--fs-color-neutral-0);
|
|
61
|
-
|
|
62
|
-
--fs-color-action-text : var(--fs-color-text-inverse);
|
|
63
|
-
--fs-color-action-bkg : var(--fs-color-accent-4);
|
|
64
|
-
--fs-color-action-bkg-hover : var(--fs-color-accent-3);
|
|
65
|
-
--fs-color-action-bkg-active : var(--fs-color-accent-2);
|
|
66
|
-
--fs-color-action-bkg-light : var(--fs-color-neutral-0);
|
|
67
|
-
--fs-color-action-bkg-light-active : var(--fs-color-tertiary-bkg-light);
|
|
68
|
-
|
|
69
|
-
--fs-color-link : var(--fs-color-main-2);
|
|
70
|
-
--fs-color-link-hover : var(--fs-color-main-2);
|
|
71
|
-
--fs-color-link-active : var(--fs-color-main-4);
|
|
72
|
-
--fs-color-link-visited : #6058ba;
|
|
73
|
-
--fs-color-link-inverse : var(--fs-color-neutral-0);
|
|
74
|
-
|
|
75
|
-
--fs-color-text : var(--fs-color-neutral-7);
|
|
76
|
-
--fs-color-text-light : var(--fs-color-neutral-6);
|
|
77
|
-
--fs-color-text-inverse : var(--fs-color-neutral-0);
|
|
78
|
-
--fs-color-text-display : var(--fs-color-neutral-7);
|
|
79
|
-
|
|
80
|
-
--fs-color-focus-ring : #8db6fa;
|
|
81
|
-
--fs-color-focus-ring-outline : #8db6fa80;
|
|
82
|
-
--fs-color-focus-ring-danger : #e1adad;
|
|
83
|
-
|
|
84
|
-
// SITUATIONS
|
|
85
|
-
--fs-color-success-text : #1e493b;
|
|
86
|
-
--fs-color-success-bkg : #b3ebd5;
|
|
87
|
-
--fs-color-success-border : var(--fs-color-success-text);
|
|
88
|
-
|
|
89
|
-
--fs-color-warning-text : var(--fs-color-text);
|
|
90
|
-
--fs-color-warning-bkg : #fdec8d;
|
|
91
|
-
--fs-color-warning-border : var(--fs-color-warning-text);
|
|
92
|
-
|
|
93
|
-
--fs-color-danger-text : #cb4242;
|
|
94
|
-
--fs-color-danger-bkg : var(--fs-color-focus-ring-danger);
|
|
95
|
-
--fs-color-danger-border : var(--fs-color-danger-text);
|
|
96
|
-
|
|
97
|
-
--fs-color-info-text : var(--fs-color-text);
|
|
98
|
-
--fs-color-info-bkg : var(--fs-color-main-1);
|
|
99
|
-
|
|
100
|
-
--fs-color-highlighted-text : var(--fs-color-text-display);
|
|
101
|
-
--fs-color-highlighted-bkg : var(--fs-color-accent-0);
|
|
102
|
-
|
|
103
|
-
--fs-color-neutral-text : var(--fs-color-text);
|
|
104
|
-
--fs-color-neutral-bkg : var(--fs-color-neutral-1);
|
|
105
|
-
|
|
106
|
-
--fs-color-disabled-text : var(--fs-color-neutral-6);
|
|
107
|
-
--fs-color-disabled-bkg : var(--fs-color-neutral-2);
|
|
108
|
-
|
|
109
|
-
// --------------------------------------------------------
|
|
110
|
-
// Typography (Branding Core)
|
|
111
|
-
// --------------------------------------------------------
|
|
112
|
-
|
|
113
|
-
// FACE
|
|
114
|
-
--fs-text-face-body : -apple-system, system-ui, BlinkMacSystemFont, sans-serif;
|
|
115
|
-
--fs-text-face-title : var(--fs-text-face-body);
|
|
116
|
-
|
|
117
|
-
// WEIGHT
|
|
118
|
-
--fs-text-weight-light : 300;
|
|
119
|
-
--fs-text-weight-regular : 400;
|
|
120
|
-
--fs-text-weight-bold : 700;
|
|
121
|
-
--fs-text-weight-black : 900;
|
|
122
|
-
|
|
123
|
-
// MAX LINES
|
|
124
|
-
--fs-text-max-lines : 2;
|
|
125
|
-
|
|
126
|
-
// TYPOGRAPHY SCALE
|
|
127
|
-
// Use a type scale to add rhythm to your typography and
|
|
128
|
-
// ensure consistency throughout the project.
|
|
129
|
-
// Access https://type-scale.com and pick a scale that
|
|
130
|
-
// suits the store's branding.
|
|
131
|
-
--fs-text-scale-mobile : 1.13;
|
|
132
|
-
--fs-text-scale-desktop : 1.25;
|
|
133
|
-
|
|
134
|
-
--fs-scale : var(--fs-text-scale-mobile);
|
|
135
|
-
|
|
136
|
-
@include media(">=notebook") {
|
|
137
|
-
--fs-scale : var(--fs-text-scale-desktop);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// NUMERIC SCALE
|
|
141
|
-
--fs-text-size-base : 16px; // 1rem
|
|
142
|
-
|
|
143
|
-
--fs-text-size-0 : 12px; // Smallest
|
|
144
|
-
--fs-text-size-1 : 14px; // Smaller // Mobile Desktop
|
|
145
|
-
--fs-text-size-2 : var(--fs-text-size-base); // 16px 16px
|
|
146
|
-
--fs-text-size-3 : calc(var(--fs-text-size-2) * var(--fs-scale)); // 18px 20px
|
|
147
|
-
--fs-text-size-4 : calc(var(--fs-text-size-3) * var(--fs-scale)); // 20px 25px
|
|
148
|
-
--fs-text-size-5 : calc(var(--fs-text-size-4) * var(--fs-scale)); // 23px 31px
|
|
149
|
-
--fs-text-size-6 : calc(var(--fs-text-size-5) * var(--fs-scale)); // 26px 39px
|
|
150
|
-
--fs-text-size-7 : calc(var(--fs-text-size-6) * var(--fs-scale)); // 29px 48px
|
|
151
|
-
--fs-text-size-8 : calc(var(--fs-text-size-7) * var(--fs-scale)); // 33px 61px
|
|
152
|
-
|
|
153
|
-
// HIERARCHY SCALE
|
|
154
|
-
--fs-text-size-title-huge : var(--fs-text-size-7);
|
|
155
|
-
--fs-text-size-title-page : var(--fs-text-size-6);
|
|
156
|
-
--fs-text-size-title-product : var(--fs-text-size-4);
|
|
157
|
-
--fs-text-size-title-section : var(--fs-text-size-4);
|
|
158
|
-
--fs-text-size-title-subsection : var(--fs-text-size-4);
|
|
159
|
-
--fs-text-size-title-mini : var(--fs-text-size-4);
|
|
160
|
-
--fs-text-size-lead : var(--fs-text-size-3);
|
|
161
|
-
--fs-text-size-menu : var(--fs-text-size-base);
|
|
162
|
-
--fs-text-size-body : var(--fs-text-size-base);
|
|
163
|
-
--fs-text-size-legend : var(--fs-text-size-1);
|
|
164
|
-
--fs-text-size-tiny : var(--fs-text-size-0);
|
|
165
|
-
|
|
166
|
-
// --------------------------------------------------------
|
|
167
|
-
// Spacing (UI Essentials)
|
|
168
|
-
// --------------------------------------------------------
|
|
169
|
-
|
|
170
|
-
// NUMERIC SCALE
|
|
171
|
-
--fs-spacing-0 : .25rem; // 4px
|
|
172
|
-
--fs-spacing-1 : .5rem; // 8px
|
|
173
|
-
--fs-spacing-2 : .75rem; // 12px
|
|
174
|
-
--fs-spacing-3 : 1rem; // 16px (--fs-text-size-base)
|
|
175
|
-
--fs-spacing-4 : 1.5rem; // 24px
|
|
176
|
-
--fs-spacing-5 : 2rem; // 32px
|
|
177
|
-
--fs-spacing-6 : 2.5rem; // 40px
|
|
178
|
-
--fs-spacing-7 : 3rem; // 48px
|
|
179
|
-
--fs-spacing-8 : 3.5rem; // 56px
|
|
180
|
-
--fs-spacing-9 : 4rem; // 64px
|
|
181
|
-
--fs-spacing-10 : 4.5rem; // 72px
|
|
182
|
-
--fs-spacing-11 : 5rem; // 80px
|
|
183
|
-
--fs-spacing-12 : 5.5rem; // 88px
|
|
184
|
-
--fs-spacing-13 : 6rem; // 96px
|
|
185
|
-
|
|
186
|
-
// --------------------------------------------------------
|
|
187
|
-
// Grid & Layout (UI Essentials)
|
|
188
|
-
// --------------------------------------------------------
|
|
189
|
-
|
|
190
|
-
// PADDING
|
|
191
|
-
--fs-grid-padding : var(--fs-spacing-3);
|
|
192
|
-
|
|
193
|
-
@include media(">=tablet") {
|
|
194
|
-
--fs-grid-padding : var(--fs-spacing-4);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
@include media(">=notebook") {
|
|
198
|
-
--fs-grid-padding : var(--fs-spacing-5);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Z-INDEX
|
|
202
|
-
--fs-z-index-below : -1;
|
|
203
|
-
--fs-z-index-default : 0;
|
|
204
|
-
--fs-z-index-top : 1;
|
|
205
|
-
--fs-z-index-high : 2;
|
|
206
|
-
--fs-z-index-highest : 3;
|
|
207
|
-
|
|
208
|
-
// CONTAINER
|
|
209
|
-
--fs-grid-max-width : var(--fs-grid-breakpoint-notebook);
|
|
210
|
-
|
|
211
|
-
// GAPS
|
|
212
|
-
--fs-grid-gap-0 : var(--fs-spacing-1);
|
|
213
|
-
--fs-grid-gap-1 : var(--fs-spacing-2);
|
|
214
|
-
--fs-grid-gap-2 : var(--fs-spacing-3);
|
|
215
|
-
--fs-grid-gap-3 : var(--fs-spacing-4);
|
|
216
|
-
--fs-grid-gap-4 : var(--fs-spacing-5);
|
|
217
|
-
|
|
218
|
-
// BREAKPOINTS
|
|
219
|
-
--fs-grid-breakpoint-phone : #{map-get($breakpoints, "phone")};
|
|
220
|
-
--fs-grid-breakpoint-phonemid : #{map-get($breakpoints, "phonemid")};
|
|
221
|
-
--fs-grid-breakpoint-tablet : #{map-get($breakpoints, "tablet")};
|
|
222
|
-
--fs-grid-breakpoint-notebook : #{map-get($breakpoints, "notebook")};
|
|
223
|
-
--fs-grid-breakpoint-desktop : #{map-get($breakpoints, "desktop")};
|
|
224
|
-
|
|
225
|
-
// --------------------------------------------------------
|
|
226
|
-
// Interactive Controls (UI Essentials)
|
|
227
|
-
// --------------------------------------------------------
|
|
228
|
-
|
|
229
|
-
// TAP
|
|
230
|
-
--fs-control-tap-size : var(--fs-spacing-7); // 3rem = 48px
|
|
231
|
-
--fs-control-tap-size-smallest : calc(var(--fs-control-tap-size) / 2);
|
|
232
|
-
--fs-control-min-height : var(--fs-control-tap-size);
|
|
233
|
-
|
|
234
|
-
@include media(">=notebook") {
|
|
235
|
-
--fs-control-tap-size : var(--fs-spacing-7); // This value can be smaller on desktops
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// STATES
|
|
239
|
-
--fs-control-bkg : var(--fs-color-neutral-0);
|
|
240
|
-
--fs-control-bkg-disabled : var(--fs-color-disabled-bkg);
|
|
241
|
-
|
|
242
|
-
// --------------------------------------------------------
|
|
243
|
-
// Refinements
|
|
244
|
-
// --------------------------------------------------------
|
|
245
|
-
|
|
246
|
-
// TRANSITION
|
|
247
|
-
--fs-transition-timing : .2s;
|
|
248
|
-
--fs-transition-property : all;
|
|
249
|
-
--fs-transition-function : ease-in-out;
|
|
250
|
-
|
|
251
|
-
// BORDERS
|
|
252
|
-
--fs-border-radius-small : 1px;
|
|
253
|
-
--fs-border-radius : 2px;
|
|
254
|
-
--fs-border-radius-medium : 8px;
|
|
255
|
-
--fs-border-radius-pill : 100px;
|
|
256
|
-
--fs-border-radius-circle : 100%;
|
|
257
|
-
|
|
258
|
-
--fs-border-width : 1px;
|
|
259
|
-
--fs-border-width-thick : 2px;
|
|
260
|
-
--fs-border-width-thickest : 3px;
|
|
261
|
-
|
|
262
|
-
--fs-border-color : var(--fs-color-neutral-4);
|
|
263
|
-
--fs-border-color-hover : var(--fs-color-main-3);
|
|
264
|
-
--fs-border-color-active : var(--fs-color-main-2);
|
|
265
|
-
--fs-border-color-disabled : var(--fs-color-neutral-6);
|
|
266
|
-
|
|
267
|
-
--fs-border-color-light : var(--fs-color-neutral-2);
|
|
268
|
-
--fs-border-color-light-hover : var(--fs-color-neutral-3);
|
|
269
|
-
--fs-border-color-light-active : var(--fs-color-neutral-3);
|
|
270
|
-
--fs-border-color-light-disabled : var(--fs-color-neutral-5);
|
|
271
|
-
|
|
272
|
-
// SHADOW
|
|
273
|
-
--fs-shadow : none;
|
|
274
|
-
--fs-shadow-darker : 0 0 10px rgb(0 0 0 / 20%);
|
|
275
|
-
--fs-shadow-hover : 0 0 0 1px var(--fs-color-main-4);
|
|
276
|
-
}
|