@faststore/ui 2.0.122-alpha.0 → 2.0.132-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 +0 -6
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/atoms/Button/styles.scss +103 -63
- package/src/components/molecules/Accordion/styles.scss +3 -1
- package/src/components/molecules/Alert/styles.scss +2 -15
- package/src/components/molecules/Banner/styles.scss +1 -1
- package/src/components/molecules/BuyButton/styles.scss +9 -5
- package/src/components/molecules/Carousel/styles.scss +82 -56
- package/src/components/molecules/InputField/styles.scss +3 -9
- package/src/components/molecules/LinkButton/styles.scss +1 -2
- package/src/components/molecules/NavbarLinks/styles.scss +12 -9
- package/src/components/molecules/QuantitySelector/styles.scss +20 -75
- package/src/components/molecules/RegionBar/styles.scss +12 -9
- package/src/components/molecules/SearchInputField/styles.scss +16 -30
- package/src/components/organisms/Filter/styles.scss +11 -10
- package/src/components/organisms/Hero/styles.scss +4 -2
- package/src/components/organisms/ImageGallery/styles.scss +33 -20
- package/src/components/organisms/ProductShelf/styles.scss +2 -3
- package/src/index.ts +0 -16
- package/dist/components/molecules/Bullets/Bullets.d.ts +0 -35
- package/dist/components/molecules/Bullets/Bullets.js +0 -12
- package/dist/components/molecules/Bullets/Bullets.js.map +0 -1
- package/dist/components/molecules/Bullets/index.d.ts +0 -2
- package/dist/components/molecules/Bullets/index.js +0 -2
- package/dist/components/molecules/Bullets/index.js.map +0 -1
- package/dist/components/molecules/Carousel/Arrows.d.ts +0 -12
- package/dist/components/molecules/Carousel/Arrows.js +0 -6
- package/dist/components/molecules/Carousel/Arrows.js.map +0 -1
- package/dist/components/molecules/Carousel/Carousel.d.ts +0 -54
- package/dist/components/molecules/Carousel/Carousel.js +0 -183
- package/dist/components/molecules/Carousel/Carousel.js.map +0 -1
- package/dist/components/molecules/Carousel/CarouselItem.d.ts +0 -11
- package/dist/components/molecules/Carousel/CarouselItem.js +0 -18
- package/dist/components/molecules/Carousel/CarouselItem.js.map +0 -1
- package/dist/components/molecules/Carousel/hooks/useSlideVisibility.d.ts +0 -9
- package/dist/components/molecules/Carousel/hooks/useSlideVisibility.js +0 -29
- package/dist/components/molecules/Carousel/hooks/useSlideVisibility.js.map +0 -1
- package/dist/components/molecules/Carousel/index.d.ts +0 -2
- package/dist/components/molecules/Carousel/index.js +0 -3
- package/dist/components/molecules/Carousel/index.js.map +0 -1
- package/dist/hooks/useSlider/index.d.ts +0 -2
- package/dist/hooks/useSlider/index.js +0 -3
- package/dist/hooks/useSlider/index.js.map +0 -1
- package/dist/hooks/useSlider/useSlider.d.ts +0 -64
- package/dist/hooks/useSlider/useSlider.js +0 -103
- package/dist/hooks/useSlider/useSlider.js.map +0 -1
- package/src/components/molecules/Bullets/Bullets.tsx +0 -88
- package/src/components/molecules/Bullets/index.ts +0 -2
- package/src/components/molecules/Carousel/Arrows.tsx +0 -58
- package/src/components/molecules/Carousel/Carousel.tsx +0 -387
- package/src/components/molecules/Carousel/CarouselItem.tsx +0 -54
- package/src/components/molecules/Carousel/hooks/useSlideVisibility.ts +0 -59
- package/src/components/molecules/Carousel/index.ts +0 -2
- package/src/hooks/useSlider/index.ts +0 -2
- package/src/hooks/useSlider/useSlider.ts +0 -209
|
@@ -117,10 +117,10 @@
|
|
|
117
117
|
|
|
118
118
|
[data-fs-button] {
|
|
119
119
|
position: absolute;
|
|
120
|
-
top:
|
|
121
|
-
right:
|
|
120
|
+
top: 0;
|
|
121
|
+
right: 0;
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
[data-fs-button-wrapper]::before {
|
|
124
124
|
position: absolute;
|
|
125
125
|
left: calc(-1 * var(--fs-spacing-1));
|
|
126
126
|
width: 1px;
|
|
@@ -129,11 +129,5 @@
|
|
|
129
129
|
background-color: var(--fs-input-field-border-color);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
[data-fs-button][data-fs-icon-button] {
|
|
134
|
-
&::before {
|
|
135
|
-
left: calc(-1 * var(--fs-spacing-1));
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
132
|
}
|
|
139
133
|
}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
// --------------------------------------------------------
|
|
3
3
|
// Structural Styles
|
|
4
4
|
// --------------------------------------------------------
|
|
5
|
+
text-decoration: none;
|
|
5
6
|
|
|
6
|
-
&:hover { text-decoration: none; }
|
|
7
|
-
|
|
8
7
|
&:disabled, &[data-fs-button-disabled="true"] { pointer-events: none; }
|
|
9
8
|
}
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
// Design Tokens for Navbar Links
|
|
4
4
|
// --------------------------------------------------------
|
|
5
5
|
|
|
6
|
-
--fs-navbar-links-padding-top-notebook : var(--fs-spacing-1);
|
|
7
|
-
--fs-navbar-links-padding-bottom-notebook : var(--fs-navbar-links-padding-top-notebook);
|
|
8
|
-
|
|
9
6
|
--fs-navbar-links-bkg-color : var(--fs-color-body-bkg);
|
|
10
7
|
|
|
11
8
|
--fs-navbar-links-transition-property : var(--fs-transition-property);
|
|
@@ -57,7 +54,7 @@
|
|
|
57
54
|
margin-left: calc(-1 * var(--fs-spacing-1));
|
|
58
55
|
|
|
59
56
|
// TODO: remove this after navbar 2.0 is implemented
|
|
60
|
-
&[data-fs-button-variant="tertiary"] {
|
|
57
|
+
&[data-fs-button-variant="tertiary"] [data-fs-button-wrapper] {
|
|
61
58
|
color: var(--fs-color-text-display);
|
|
62
59
|
}
|
|
63
60
|
|
|
@@ -67,18 +64,24 @@
|
|
|
67
64
|
}
|
|
68
65
|
|
|
69
66
|
@include media(">=notebook") {
|
|
70
|
-
padding-top: var(--fs-navbar-links-padding-top-notebook);
|
|
71
|
-
padding-bottom: var(--fs-navbar-links-padding-bottom-notebook);
|
|
72
|
-
|
|
73
67
|
[data-fs-navbar-links-list] {
|
|
68
|
+
position: relative;
|
|
74
69
|
display: flex;
|
|
70
|
+
align-items: center;
|
|
75
71
|
column-gap: var(--fs-spacing-3);
|
|
76
72
|
padding-left: var(--fs-navbar-links-list-padding-left-notebook);
|
|
77
73
|
margin-left: var(--fs-navbar-links-list-margin-left-notebook);
|
|
78
|
-
|
|
74
|
+
&::before {
|
|
75
|
+
position: absolute;
|
|
76
|
+
left: calc(-1 * var(--fs-spacing-1));
|
|
77
|
+
width: var(--fs-navbar-links-list-border-left-width-notebook);
|
|
78
|
+
height: 60%;
|
|
79
|
+
content: "";
|
|
80
|
+
background-color: var(--fs-navbar-links-list-border-left-color-notebook);
|
|
81
|
+
}
|
|
79
82
|
}
|
|
80
83
|
|
|
81
|
-
[data-fs-navbar-links-list-item] {
|
|
84
|
+
[data-fs-navbar-links-list-item] > [data-fs-link] {
|
|
82
85
|
width: var(--fs-navbar-links-link-width-notebook);
|
|
83
86
|
padding: var(--fs-navbar-links-link-padding-notebook);
|
|
84
87
|
}
|
|
@@ -19,28 +19,17 @@
|
|
|
19
19
|
--fs-qty-selector-border-color : var(--fs-border-color);
|
|
20
20
|
--fs-qty-selector-border-color-hover : var(--fs-border-color-active);
|
|
21
21
|
|
|
22
|
-
// Text
|
|
23
22
|
--fs-qty-selector-text-size : var(--fs-text-size-base);
|
|
24
23
|
--fs-qty-selector-text-color : var(--fs-color-text);
|
|
25
|
-
--fs-qty-selector-text-color-hover : var(--fs-qty-selector-text-color);
|
|
26
|
-
|
|
27
|
-
// Icon
|
|
28
|
-
--fs-qty-selector-icon-color : var(--fs-color-link);
|
|
29
24
|
|
|
30
25
|
// Button
|
|
31
|
-
--fs-qty-selector-button-shadow : none;
|
|
32
|
-
--fs-qty-selector-button-shadow-hover : none;
|
|
33
26
|
--fs-qty-selector-button-bkg-color : transparent;
|
|
34
|
-
--fs-qty-selector-button-bkg-color-hover : var(--fs-color-primary-bkg-light);
|
|
35
|
-
--fs-qty-selector-button-bkg-color-focus : var(--fs-qty-selector-button-bkg-color-hover);
|
|
36
27
|
--fs-qty-selector-button-border-radius : var(--fs-qty-selector-border-radius);
|
|
37
28
|
|
|
38
29
|
// Disabled
|
|
39
30
|
--fs-qty-selector-disabled-bkg-color : var(--fs-color-disabled-bkg);
|
|
40
31
|
--fs-qty-selector-disabled-text-color : var(--fs-color-disabled-text);
|
|
41
|
-
--fs-qty-selector-disabled-icon-color : var(--fs-border-color-light-disabled);
|
|
42
32
|
--fs-qty-selector-disabled-border-color : var(--fs-qty-selector-disabled-bkg-color);
|
|
43
|
-
--fs-qty-selector-disabled-button-bkg-color : var(--fs-qty-selector-button-bkg-color-hover);
|
|
44
33
|
|
|
45
34
|
// --------------------------------------------------------
|
|
46
35
|
// Structural Styles
|
|
@@ -56,12 +45,6 @@
|
|
|
56
45
|
border-radius: var(--fs-qty-selector-border-radius);
|
|
57
46
|
box-shadow: var(--fs-qty-selector-shadow);
|
|
58
47
|
|
|
59
|
-
[data-fs-icon] {
|
|
60
|
-
margin: 0;
|
|
61
|
-
line-height: 0;
|
|
62
|
-
color: var(--fs-qty-selector-icon-color);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
48
|
[data-quantity-selector-input] {
|
|
66
49
|
width: 100%;
|
|
67
50
|
height: 100%;
|
|
@@ -69,74 +52,34 @@
|
|
|
69
52
|
font-size: var(--fs-qty-selector-text-size);
|
|
70
53
|
color: var(--fs-qty-selector-text-color);
|
|
71
54
|
text-align: center;
|
|
55
|
+
border: var(--fs-qty-selector-border-width) solid var(--fs-qty-selector-border-color);
|
|
72
56
|
}
|
|
73
57
|
|
|
74
58
|
[data-quantity-selector-button] {
|
|
75
59
|
position: absolute;
|
|
76
|
-
background-color: var(--fs-qty-selector-button-bkg-color);
|
|
77
|
-
|
|
78
|
-
[data-fs-button-icon] {
|
|
79
|
-
display: flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
justify-content: center;
|
|
82
|
-
width: 100%;
|
|
83
|
-
height: 100%;
|
|
84
|
-
border-radius: var(--fs-qty-selector-button-border-radius);
|
|
85
|
-
box-shadow: var(--fs-qty-selector-button-shadow);
|
|
86
|
-
}
|
|
87
60
|
|
|
88
|
-
|
|
89
|
-
|
|
61
|
+
[data-fs-button-wrapper] { border-radius: var(--fs-qty-selector-button-border-radius); }
|
|
62
|
+
|
|
63
|
+
&:not(:hover):not(:focus-visible) {
|
|
64
|
+
[data-fs-button-wrapper] {
|
|
65
|
+
background-color: var(--fs-qty-selector-button-bkg-color);
|
|
66
|
+
}
|
|
90
67
|
}
|
|
91
68
|
|
|
92
69
|
&:first-of-type { left: 0; }
|
|
93
|
-
|
|
94
70
|
&:last-of-type { right: 0; }
|
|
95
71
|
|
|
96
|
-
&:hover:not(:disabled) [data-fs-button-icon] {
|
|
97
|
-
background-color: var(--fs-qty-selector-button-bkg-color-hover);
|
|
98
|
-
box-shadow: var(--fs-qty-selector-button-shadow-hover);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
72
|
&:disabled {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
&:hover, &:focus-visible {
|
|
73
|
+
[data-fs-button-wrapper],
|
|
74
|
+
&:hover [data-fs-button-wrapper],
|
|
75
|
+
&:focus-visible [data-fs-button-wrapper] {
|
|
106
76
|
background-color: var(--fs-qty-selector-button-bkg-color);
|
|
107
77
|
}
|
|
108
|
-
|
|
109
|
-
[data-fs-button-icon] {
|
|
110
|
-
color: var(--fs-qty-selector-disabled-icon-color);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&:hover:not(:disabled) {
|
|
115
|
-
background-color: transparent;
|
|
116
|
-
box-shadow: none;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&:focus:not(:disabled) {
|
|
120
|
-
background-color: transparent;
|
|
121
|
-
box-shadow: none;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&:focus-visible {
|
|
125
|
-
background-color: var(--fs-qty-selector-button-bkg-color);
|
|
126
|
-
outline: none;
|
|
127
|
-
box-shadow: none;
|
|
128
|
-
|
|
129
|
-
[data-fs-button-icon] {
|
|
130
|
-
@include focus-ring;
|
|
131
|
-
|
|
132
|
-
background-color: var(--fs-qty-selector-button-bkg-color-focus);
|
|
133
|
-
}
|
|
134
78
|
}
|
|
135
79
|
}
|
|
136
80
|
|
|
137
81
|
&:hover {
|
|
138
82
|
[data-quantity-selector-input]:not(:disabled):not(:focus) {
|
|
139
|
-
color: var(--fs-qty-selector-text-color-hover);
|
|
140
83
|
background-color: var(--fs-qty-selector-bkg-color-hover);
|
|
141
84
|
border-color: var(--fs-qty-selector-border-color-hover);
|
|
142
85
|
border-width: var(--fs-qty-selector-border-width-hover);
|
|
@@ -144,14 +87,16 @@
|
|
|
144
87
|
}
|
|
145
88
|
}
|
|
146
89
|
|
|
147
|
-
|
|
148
|
-
// Variants Styles
|
|
149
|
-
// --------------------------------------------------------
|
|
90
|
+
}
|
|
150
91
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
92
|
+
// --------------------------------------------------------
|
|
93
|
+
// Variants Styles
|
|
94
|
+
// --------------------------------------------------------
|
|
95
|
+
|
|
96
|
+
[data-fs-quantity-selector="disabled"] {
|
|
97
|
+
[data-quantity-selector-input] {
|
|
98
|
+
background-color: var(--fs-qty-selector-disabled-bkg-color);
|
|
99
|
+
border-color: var(--fs-qty-selector-disabled-border-color);
|
|
100
|
+
color: var(--fs-qty-selector-disabled-text-color);
|
|
156
101
|
}
|
|
157
102
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
// Default properties
|
|
7
7
|
--fs-region-bar-width : 100%;
|
|
8
|
-
--fs-region-bar-padding : var(--fs-spacing-0) var(--fs-spacing-
|
|
8
|
+
--fs-region-bar-padding : var(--fs-spacing-0) var(--fs-spacing-1) var(--fs-spacing-1) var(--fs-spacing-2);
|
|
9
9
|
|
|
10
10
|
--fs-region-bar-text-color : var(--fs-color-text-display);
|
|
11
11
|
|
|
@@ -32,14 +32,17 @@
|
|
|
32
32
|
|
|
33
33
|
[data-fs-button] {
|
|
34
34
|
width: var(--fs-region-bar-width);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
|
|
36
|
+
[data-fs-button-wrapper]{
|
|
37
|
+
padding: var(--fs-region-bar-padding);
|
|
38
|
+
color: var(--fs-region-bar-text-color);
|
|
39
|
+
background-color: var(--fs-region-bar-bkg-color);
|
|
40
|
+
border-bottom: var(--fs-region-bar-border-bottom-width) solid var(--fs-region-bar-border-bottom-color);
|
|
41
|
+
border-radius: 0;
|
|
42
|
+
|
|
43
|
+
> span {
|
|
44
|
+
display: contents;
|
|
45
|
+
}
|
|
43
46
|
}
|
|
44
47
|
}
|
|
45
48
|
|
|
@@ -3,29 +3,20 @@
|
|
|
3
3
|
// Design Tokens for Search Input Field
|
|
4
4
|
// --------------------------------------------------------
|
|
5
5
|
// Default properties
|
|
6
|
-
--fs-search-input-height-
|
|
6
|
+
--fs-search-input-field-height-mobile : var(--fs-control-tap-size);
|
|
7
|
+
--fs-search-input-field-height-desktop : var(--fs-spacing-6);
|
|
7
8
|
|
|
8
|
-
--fs-search-input-field-
|
|
9
|
-
--fs-search-input-field-
|
|
10
|
-
|
|
11
|
-
--fs-search-input-field-transition-timing : var(--fs-transition-timing);
|
|
12
|
-
--fs-search-input-field-transition-function : ease;
|
|
9
|
+
--fs-search-input-field-transition-timing : var(--fs-transition-timing);
|
|
10
|
+
--fs-search-input-field-transition-function : ease;
|
|
13
11
|
|
|
14
12
|
// Button
|
|
15
|
-
--fs-search-input-field-button-
|
|
16
|
-
--fs-search-input-field-button-
|
|
17
|
-
--fs-search-input-field-button-
|
|
18
|
-
|
|
19
|
-
--fs-search-input-field-button-height-mobile : var(--fs-search-input-field-button-width);
|
|
20
|
-
--fs-search-input-field-button-height-desktop : var(--fs-search-input-field-height-desktop);
|
|
13
|
+
--fs-search-input-field-button-min-height : var(--fs-search-input-field-height-desktop);
|
|
14
|
+
--fs-search-input-field-button-padding-top-desktop : var(--fs-spacing-0);
|
|
15
|
+
--fs-search-input-field-button-padding-bottom-desktop : var(--fs-search-input-field-button-padding-top-desktop);
|
|
21
16
|
|
|
22
17
|
// Input
|
|
23
|
-
--fs-search-input-field-input-padding-right
|
|
24
|
-
--fs-search-input-field-input-bkg-color
|
|
25
|
-
|
|
26
|
-
// Icon
|
|
27
|
-
--fs-search-input-field-icon-width : var(--fs-spacing-4);
|
|
28
|
-
--fs-search-input-field-icon-height : var(--fs-search-input-field-icon-width);
|
|
18
|
+
--fs-search-input-field-input-padding-right : var(--fs-spacing-7);
|
|
19
|
+
--fs-search-input-field-input-bkg-color : var(--fs-color-body-bkg);
|
|
29
20
|
|
|
30
21
|
// --------------------------------------------------------
|
|
31
22
|
// Structural Styles
|
|
@@ -41,20 +32,14 @@
|
|
|
41
32
|
@include media(">=notebook") { height: var(--fs-search-input-field-height-desktop); }
|
|
42
33
|
|
|
43
34
|
[data-fs-icon-button][data-fs-button-variant] {
|
|
44
|
-
position:
|
|
45
|
-
right:
|
|
46
|
-
width: var(--fs-search-input-field-button-width);
|
|
47
|
-
height: var(--fs-search-input-field-button-height-mobile);
|
|
48
|
-
padding: 0;
|
|
49
|
-
background-color: var(--fs-search-input-field-button-bkg-color);
|
|
50
|
-
border: 0;
|
|
35
|
+
position: relative;
|
|
36
|
+
right: .125rem;
|
|
51
37
|
@include media(">=notebook") {
|
|
52
|
-
|
|
38
|
+
position: absolute;
|
|
39
|
+
padding-top: var(--fs-search-input-field-button-padding-top-desktop);
|
|
40
|
+
padding-bottom: var(--fs-search-input-field-button-padding-bottom-desktop);
|
|
53
41
|
min-height: var(--fs-search-input-field-button-min-height);
|
|
54
|
-
|
|
55
|
-
svg {
|
|
56
|
-
width: var(--fs-search-input-field-icon-width);
|
|
57
|
-
height: var(--fs-search-input-field-icon-height);
|
|
42
|
+
right: 0;
|
|
58
43
|
}
|
|
59
44
|
}
|
|
60
45
|
|
|
@@ -63,6 +48,7 @@
|
|
|
63
48
|
padding-right: var(--fs-search-input-field-input-padding-right);
|
|
64
49
|
background-color: var(--fs-search-input-field-input-bkg-color);
|
|
65
50
|
transition: box-shadow var(--fs-search-input-field-transition-timing) var(--fs-search-input-field-transition-timing), border var(--fs-search-input-field-transition-timing) var(--fs-search-input-field-transition-function);
|
|
51
|
+
@include media("<notebook") { border: 0; }
|
|
66
52
|
}
|
|
67
53
|
|
|
68
54
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
--fs-filter-accordion-button-padding-right-notebook : var(--fs-spacing-4);
|
|
22
22
|
--fs-filter-accordion-button-padding-left-notebook : var(--fs-filter-accordion-button-padding-right-notebook);
|
|
23
23
|
|
|
24
|
-
--fs-filter-accordion-button-text-size-notebook
|
|
24
|
+
--fs-filter-accordion-button-text-size-notebook : var(--fs-text-size-2);
|
|
25
25
|
--fs-filter-accordion-button-line-height-notebook : 1.25;
|
|
26
26
|
|
|
27
27
|
// Accordion Item Panel
|
|
@@ -69,15 +69,16 @@
|
|
|
69
69
|
|
|
70
70
|
[data-fs-filter-accordion-item] {
|
|
71
71
|
[data-fs-accordion-button] {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
[data-fs-button-wrapper] {
|
|
73
|
+
font-size: var(--fs-filter-accordion-button-text-size);
|
|
74
|
+
font-weight: var(--fs-filter-accordion-button-text-weight);
|
|
75
|
+
line-height: var(--fs-filter-accordion-button-line-height);
|
|
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
|
+
}
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
|
|
@@ -107,9 +107,11 @@
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
[data-fs-button] {
|
|
110
|
-
justify-content: space-between;
|
|
111
|
-
min-width: 11.25rem;
|
|
112
110
|
margin-top: var(--fs-spacing-6);
|
|
111
|
+
[data-fs-button-wrapper] {
|
|
112
|
+
min-width: 11.25rem;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
}
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
[data-fs-hero-icon] {
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
// Image Gallery Selector Elements
|
|
27
27
|
--fs-image-gallery-selector-elements-gap : var(--fs-spacing-1);
|
|
28
28
|
--fs-image-gallery-selector-elements-gap-notebook : var(--fs-spacing-2);
|
|
29
|
-
--fs-image-gallery-selector-elements-padding
|
|
29
|
+
--fs-image-gallery-selector-elements-padding-mobile : var(--fs-spacing-0) var(--fs-grid-padding);
|
|
30
|
+
--fs-image-gallery-selector-elements-padding-notebook : var(--fs-spacing-0) 0;
|
|
30
31
|
|
|
31
32
|
// Image Gallery Selector Thumbnail
|
|
32
33
|
--fs-image-gallery-selector-thumbnail-width-mobile : var(--fs-spacing-8);
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
[data-fs-image-gallery-selector-elements] {
|
|
90
91
|
display: flex;
|
|
91
92
|
column-gap: var(--fs-image-gallery-selector-elements-gap);
|
|
92
|
-
padding: var(--fs-image-gallery-selector-elements-padding);
|
|
93
|
+
padding: var(--fs-image-gallery-selector-elements-padding-mobile);
|
|
93
94
|
overflow-x: auto;
|
|
94
95
|
scroll-behavior: smooth;
|
|
95
96
|
|
|
@@ -99,32 +100,37 @@
|
|
|
99
100
|
flex-direction: column;
|
|
100
101
|
row-gap: var(--fs-image-gallery-selector-elements-gap-notebook);
|
|
101
102
|
overflow-y: hidden;
|
|
103
|
+
align-items: center;
|
|
104
|
+
width: 100%;
|
|
105
|
+
padding: var(--fs-image-gallery-selector-elements-padding-notebook);
|
|
102
106
|
}
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
[data-fs-image-gallery-selector-thumbnail] {
|
|
106
|
-
flex-shrink: 0;
|
|
107
110
|
width: var(--fs-image-gallery-selector-thumbnail-width-mobile);
|
|
108
111
|
height: var(--fs-image-gallery-selector-thumbnail-height-mobile);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
112
|
+
|
|
113
|
+
[data-fs-button-wrapper] {
|
|
114
|
+
padding: 0;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
background-color: transparent;
|
|
117
|
+
border: var(--fs-image-gallery-selector-thumbnail-border-width) solid transparent;
|
|
118
|
+
border-radius: var(--fs-image-gallery-selector-thumbnail-border-radius);
|
|
119
|
+
transition: all var(--fs-image-gallery-transition-timing) var(--fs-image-gallery-transition-function);
|
|
120
|
+
> span {
|
|
121
|
+
width: 100%;
|
|
122
|
+
height: 100%;
|
|
123
|
+
}
|
|
118
124
|
}
|
|
119
125
|
|
|
120
|
-
|
|
126
|
+
|
|
127
|
+
&:hover:not([data-fs-image-gallery-selector-thumbnail="selected"]) [data-fs-button-wrapper] {
|
|
121
128
|
border-color: var(--fs-image-gallery-selector-thumbnail-selected-border-color);
|
|
122
|
-
box-shadow: 0 0 0 var(--fs-image-gallery-selector-thumbnail-selected-border-width) var(--fs-color-focus-ring-outline);
|
|
123
129
|
}
|
|
124
130
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
131
|
+
&[data-fs-image-gallery-selector-thumbnail="selected"] [data-fs-button-wrapper] {
|
|
132
|
+
border-color: var(--fs-image-gallery-selector-thumbnail-selected-border-color);
|
|
133
|
+
box-shadow: 0 0 0 var(--fs-image-gallery-selector-thumbnail-selected-border-width) var(--fs-color-focus-ring-outline);
|
|
128
134
|
}
|
|
129
135
|
|
|
130
136
|
[data-fs-image] {
|
|
@@ -186,9 +192,16 @@
|
|
|
186
192
|
}
|
|
187
193
|
|
|
188
194
|
[data-fs-image-gallery-selector-control-button] {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
195
|
+
|
|
196
|
+
[data-fs-button-wrapper] {
|
|
197
|
+
background-color: var(--fs-image-gallery-selector-control-bkg-color);
|
|
198
|
+
border-radius: var(--fs-image-gallery-selector-control-border-radius);
|
|
199
|
+
box-shadow: var(--fs-image-gallery-selector-control-shadow);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&:hover [data-fs-button-wrapper] { box-shadow: var(--fs-image-gallery-selector-control-shadow); }
|
|
203
|
+
|
|
204
|
+
&:hover { box-shadow: var(--fs-image-gallery-selector-control-shadow); }
|
|
192
205
|
|
|
193
206
|
@include media(">=notebook") {
|
|
194
207
|
transform: rotate(90deg);
|
|
@@ -6,19 +6,18 @@
|
|
|
6
6
|
--fs-product-shelf-items-gap : var(--fs-grid-gap-1);
|
|
7
7
|
--fs-product-shelf-items-padding-top : var(--fs-spacing-0);
|
|
8
8
|
--fs-product-shelf-items-padding-bottom : var(--fs-spacing-3);
|
|
9
|
-
--fs-product-shelf-items-left : calc(-1 * var(--fs-spacing-1));
|
|
10
9
|
|
|
11
10
|
// --------------------------------------------------------
|
|
12
11
|
// Structural Styles
|
|
13
12
|
// --------------------------------------------------------
|
|
14
13
|
|
|
14
|
+
width: 100%;
|
|
15
|
+
|
|
15
16
|
[data-fs-product-shelf-items] {
|
|
16
17
|
display: flex;
|
|
17
18
|
align-items: stretch;
|
|
18
19
|
overflow-x: auto;
|
|
19
20
|
position: relative;
|
|
20
|
-
left: var(--fs-product-shelf-items-left);
|
|
21
|
-
|
|
22
21
|
|
|
23
22
|
[data-fs-product-shelf-item] { width: 100%; }
|
|
24
23
|
|
package/src/index.ts
CHANGED
|
@@ -8,13 +8,6 @@ export { default as Incentive } from './components/atoms/Incentive'
|
|
|
8
8
|
export type { IncentiveProps } from './components/atoms/Incentive'
|
|
9
9
|
|
|
10
10
|
// Molecules
|
|
11
|
-
|
|
12
|
-
export { default as Bullets } from './components/molecules/Bullets'
|
|
13
|
-
export type { BulletsProps } from './components/molecules/Bullets'
|
|
14
|
-
|
|
15
|
-
export { default as Carousel } from './components/molecules/Carousel'
|
|
16
|
-
export type { CarouselProps } from './components/molecules/Carousel'
|
|
17
|
-
|
|
18
11
|
export {
|
|
19
12
|
default as Banner,
|
|
20
13
|
BannerContent,
|
|
@@ -31,12 +24,3 @@ export type {
|
|
|
31
24
|
// Organisms
|
|
32
25
|
export { Tile, Tiles } from './components/organisms/Tiles'
|
|
33
26
|
export type { TilesProps, TileProps } from './components/organisms/Tiles'
|
|
34
|
-
|
|
35
|
-
// Hooks
|
|
36
|
-
export { default as useSlider } from './hooks/useSlider'
|
|
37
|
-
export type {
|
|
38
|
-
UseSliderArgs,
|
|
39
|
-
SliderState,
|
|
40
|
-
SliderDispatch,
|
|
41
|
-
SlideDirection,
|
|
42
|
-
} from './hooks/useSlider'
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes, MouseEvent } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface BulletsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'role'> {
|
|
4
|
-
/**
|
|
5
|
-
* Number of bullets that should be rendered.
|
|
6
|
-
*/
|
|
7
|
-
totalQuantity: number;
|
|
8
|
-
/**
|
|
9
|
-
* The currently active bullet (zero-indexed).
|
|
10
|
-
*/
|
|
11
|
-
activeBullet: number;
|
|
12
|
-
/**
|
|
13
|
-
* Event handler for clicks on each bullet. The handler will be called with
|
|
14
|
-
* the index of the bullet that received the click.
|
|
15
|
-
*/
|
|
16
|
-
onClick: (e: MouseEvent, bulletIdx: number) => void;
|
|
17
|
-
/**
|
|
18
|
-
* ID to find this component in testing tools (e.g.: cypress,
|
|
19
|
-
* testing-library, and jest).
|
|
20
|
-
*/
|
|
21
|
-
testId?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Function that should be used to generate the aria-label attribute added
|
|
24
|
-
* to each bullet that is inactive. It receives the bullet index as an
|
|
25
|
-
* argument so that it can be interpolated in the generated string.
|
|
26
|
-
*/
|
|
27
|
-
ariaLabelGenerator?: (index: number, isActive: boolean) => string;
|
|
28
|
-
/**
|
|
29
|
-
* Function that should be used to generate the aria-controls attribute added
|
|
30
|
-
* to each bullet. It receives the bullet index as argument and should return a string.
|
|
31
|
-
*/
|
|
32
|
-
ariaControlsGenerator?: (index: number) => string;
|
|
33
|
-
}
|
|
34
|
-
declare const Bullets: React.ForwardRefExoticComponent<BulletsProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
-
export default Bullets;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, useMemo } from 'react';
|
|
2
|
-
import { Button } from '@faststore/components';
|
|
3
|
-
const defaultAriaLabel = (idx, isActive) => isActive ? 'Current page' : `Go to page ${idx + 1}`;
|
|
4
|
-
const Bullets = forwardRef(function Bullets({ totalQuantity, activeBullet, onClick, testId = 'store-bullets', ariaLabelGenerator = defaultAriaLabel, ariaControlsGenerator, ...otherProps }, ref) {
|
|
5
|
-
const bulletIndexes = useMemo(() => Array(totalQuantity).fill(0), [totalQuantity]);
|
|
6
|
-
return (React.createElement("div", { ref: ref, "data-fs-bullets": true, "data-testid": testId, role: "tablist", ...otherProps }, bulletIndexes.map((_, idx) => {
|
|
7
|
-
const isActive = activeBullet === idx;
|
|
8
|
-
return (React.createElement(Button, { key: idx, role: "tab", tabIndex: -1, "data-fs-bullet": true, testId: `${testId}-bullet`, onClick: (e) => onClick(e, idx), "aria-label": ariaLabelGenerator(idx, isActive), "aria-controls": ariaControlsGenerator?.(idx), "aria-selected": isActive }));
|
|
9
|
-
})));
|
|
10
|
-
});
|
|
11
|
-
export default Bullets;
|
|
12
|
-
//# sourceMappingURL=Bullets.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Bullets.js","sourceRoot":"","sources":["../../../../src/components/molecules/Bullets/Bullets.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAmC9C,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,QAAiB,EAAE,EAAE,CAC1D,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,GAAG,GAAG,CAAC,EAAE,CAAA;AAErD,MAAM,OAAO,GAAG,UAAU,CAA+B,SAAS,OAAO,CACvE,EACE,aAAa,EACb,YAAY,EACZ,OAAO,EACP,MAAM,GAAG,eAAe,EACxB,kBAAkB,GAAG,gBAAgB,EACrC,qBAAqB,EACrB,GAAG,UAAU,EACd,EACD,GAAG;IAEH,MAAM,aAAa,GAAG,OAAO,CAC3B,GAAG,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAClC,CAAC,aAAa,CAAC,CAChB,CAAA;IAED,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,0CAEK,MAAM,EACnB,IAAI,EAAC,SAAS,KACV,UAAU,IAEb,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;QAC5B,MAAM,QAAQ,GAAG,YAAY,KAAK,GAAG,CAAA;QAErC,OAAO,CACL,oBAAC,MAAM,IACL,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,KAAK,EACV,QAAQ,EAAE,CAAC,CAAC,0BAEZ,MAAM,EAAE,GAAG,MAAM,SAAS,EAC1B,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,gBACnB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,CAAC,mBAC9B,qBAAqB,EAAE,CAAC,GAAG,CAAC,mBAC5B,QAAQ,GACvB,CACH,CAAA;IACH,CAAC,CAAC,CACE,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,OAAO,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/molecules/Bullets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface IconProps {
|
|
3
|
-
size?: {
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
};
|
|
7
|
-
viewBox?: string;
|
|
8
|
-
color?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const LeftArrowIcon: ({ size, viewBox, color, }: IconProps) => JSX.Element;
|
|
11
|
-
export declare const RightArrowIcon: ({ size, viewBox, color, }: IconProps) => JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export const LeftArrowIcon = ({ size = { width: 25, height: 25 }, viewBox = '0 0 16 16', color = 'currentColor', }) => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: viewBox, width: size.width, height: size.height },
|
|
3
|
-
React.createElement("path", { d: "M11 1L4 8L11 15", strokeWidth: "2", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round", stroke: color, fill: "none" })));
|
|
4
|
-
export const RightArrowIcon = ({ size = { width: 25, height: 25 }, viewBox = '0 0 16 16', color = 'currentColor', }) => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: viewBox, width: size.width, height: size.height },
|
|
5
|
-
React.createElement("path", { d: "M5 15L12 8L5 1", strokeWidth: "2", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round", stroke: color, fill: "none" })));
|
|
6
|
-
//# sourceMappingURL=Arrows.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Arrows.js","sourceRoot":"","sources":["../../../../src/components/molecules/Carousel/Arrows.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,IAAI,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAChC,OAAO,GAAG,WAAW,EACrB,KAAK,GAAG,cAAc,GACZ,EAAE,EAAE,CAAC,CACf,6BACE,KAAK,EAAC,4BAA4B,EAClC,UAAU,EAAC,8BAA8B,EACzC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM;IAEnB,8BACE,CAAC,EAAC,iBAAiB,EACnB,WAAW,EAAC,GAAG,EACf,gBAAgB,EAAC,IAAI,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,MAAM,EAAE,KAAK,EACb,IAAI,EAAC,MAAM,GACX,CACE,CACP,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,IAAI,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAChC,OAAO,GAAG,WAAW,EACrB,KAAK,GAAG,cAAc,GACZ,EAAE,EAAE,CAAC,CACf,6BACE,KAAK,EAAC,4BAA4B,EAClC,UAAU,EAAC,8BAA8B,EACzC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM;IAEnB,8BACE,CAAC,EAAC,gBAAgB,EAClB,WAAW,EAAC,GAAG,EACf,gBAAgB,EAAC,IAAI,EACrB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,MAAM,EAAE,KAAK,EACb,IAAI,EAAC,MAAM,GACX,CACE,CACP,CAAA"}
|