@faststore/core 0.3.6 → 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.
Files changed (90) hide show
  1. package/.storybook/preview.js +0 -4
  2. package/CHANGELOG.md +2 -0
  3. package/README.md +13 -11
  4. package/cypress/integration/analytics.test.js +1 -1
  5. package/cypress/integration/search.test.js +1 -1
  6. package/package.json +17 -16
  7. package/src/components/cart/CartItem/CartItem.tsx +4 -4
  8. package/src/components/cart/CartSidebar/CartSidebar.stories.mdx +3 -3
  9. package/src/components/cart/CartSidebar/CartSidebar.tsx +14 -11
  10. package/src/components/cart/CartToggle/CartToggle.tsx +6 -4
  11. package/src/components/cart/EmptyCart/EmptyCart.tsx +4 -3
  12. package/src/components/common/Footer/Footer.tsx +9 -5
  13. package/src/components/common/Footer/FooterLinks.tsx +1 -1
  14. package/src/components/common/Navbar/Navbar.tsx +4 -6
  15. package/src/components/common/Navbar/NavbarSlider.tsx +3 -5
  16. package/src/components/common/Navbar/navbar.module.scss +1 -1
  17. package/src/components/product/OutOfStock/OutOfStock.tsx +5 -5
  18. package/src/components/product/ProductCard/ProductCard.stories.mdx +14 -14
  19. package/src/components/product/ProductCard/ProductCard.tsx +10 -9
  20. package/src/components/regionalization/Regionalization.stories.mdx +2 -6
  21. package/src/components/regionalization/RegionalizationBar/RegionalizationBar.tsx +3 -3
  22. package/src/components/regionalization/RegionalizationButton/RegionalizationButton.tsx +4 -3
  23. package/src/components/regionalization/RegionalizationInput/RegionalizationInput.tsx +2 -2
  24. package/src/components/regionalization/RegionalizationModal/RegionalizationModalContent.tsx +3 -2
  25. package/src/components/search/Filter/Facets.tsx +9 -6
  26. package/src/components/search/Filter/FilterSlider.tsx +6 -6
  27. package/src/components/search/SearchHistory/SearchHistory.tsx +4 -5
  28. package/src/components/search/SearchInput/search-input.module.scss +1 -14
  29. package/src/components/search/SearchTop/SearchTop.tsx +4 -5
  30. package/src/components/search/Sort/Sort.tsx +2 -3
  31. package/src/components/sections/BannerText/banner-text.module.scss +6 -6
  32. package/src/components/sections/Incentives/Incentives.tsx +1 -1
  33. package/src/components/sections/Newsletter/Newsletter.tsx +10 -8
  34. package/src/components/sections/Newsletter/newsletter.module.scss +1 -1
  35. package/src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx +1 -1
  36. package/src/components/sections/ProducDetailsContent/product-details-content.module.scss +0 -9
  37. package/src/components/sections/ProductDetails/ProductDetails.tsx +11 -5
  38. package/src/components/sections/ProductDetails/product-details.module.scss +1 -1
  39. package/src/components/sections/ProductGallery/ProductGallery.tsx +4 -3
  40. package/src/components/sections/ScrollToTopButton/ScrollToTopButton.tsx +5 -4
  41. package/src/components/ui/Alert/Alert.tsx +7 -4
  42. package/src/components/ui/Button/Button.stories.mdx +3 -44
  43. package/src/components/ui/Button/ButtonLink/ButtonLink.tsx +2 -1
  44. package/src/components/ui/Button/button.module.scss +0 -381
  45. package/src/components/ui/Button/index.ts +0 -3
  46. package/src/components/ui/Gift/Gift.tsx +2 -2
  47. package/src/components/ui/ImageGallery/ImageGallerySelector.tsx +5 -5
  48. package/src/components/ui/ImageGallery/image-gallery-selector.module.scss +6 -0
  49. package/src/components/ui/Link/Link.tsx +19 -34
  50. package/src/components/ui/PriceRange/PriceRange.tsx +6 -4
  51. package/src/components/ui/PriceRange/price-range.module.scss +1 -1
  52. package/src/components/ui/ProductTitle/ProductTitle.stories.mdx +13 -15
  53. package/src/components/ui/QuantitySelector/quantity-selector.module.scss +21 -26
  54. package/src/components/ui/ShippingSimulation/ShippingSimulation.stories.mdx +1 -1
  55. package/src/components/ui/ShippingSimulation/ShippingSimulation.tsx +8 -3
  56. package/src/components/ui/SlideOver/SlideOver.stories.mdx +3 -3
  57. package/src/pages/_app.tsx +3 -4
  58. package/src/styles/global/components.scss +0 -3
  59. package/src/styles/global/storybook-components.scss +3 -3
  60. package/src/styles/global/utilities.scss +12 -5
  61. package/src/components/ui/Badge/Badge.stories.mdx +0 -465
  62. package/src/components/ui/Badge/Badge.tsx +0 -76
  63. package/src/components/ui/Badge/DiscountBadge.stories.mdx +0 -191
  64. package/src/components/ui/Badge/DiscountBadge.tsx +0 -57
  65. package/src/components/ui/Badge/badge.module.scss +0 -252
  66. package/src/components/ui/Badge/index.ts +0 -4
  67. package/src/components/ui/Button/Button.tsx +0 -85
  68. package/src/components/ui/Button/ButtonBuy/ButtonBuy.tsx +0 -24
  69. package/src/components/ui/Button/ButtonBuy/index.ts +0 -1
  70. package/src/components/ui/Checkbox/Checkbox.stories.mdx +0 -268
  71. package/src/components/ui/Checkbox/Checkbox.tsx +0 -20
  72. package/src/components/ui/Checkbox/checkbox.module.scss +0 -157
  73. package/src/components/ui/Checkbox/index.ts +0 -2
  74. package/src/components/ui/InputText/InputText.stories.mdx +0 -311
  75. package/src/components/ui/InputText/InputText.tsx +0 -128
  76. package/src/components/ui/InputText/index.ts +0 -2
  77. package/src/components/ui/InputText/input-text.module.scss +0 -168
  78. package/src/components/ui/Link/link.module.scss +0 -98
  79. package/src/components/ui/Radio/Radio.stories.mdx +0 -237
  80. package/src/components/ui/Radio/Radio.tsx +0 -36
  81. package/src/components/ui/Radio/index.ts +0 -2
  82. package/src/components/ui/Radio/radio.module.scss +0 -122
  83. package/src/components/ui/Select/Select.stories.mdx +0 -168
  84. package/src/components/ui/Select/Select.tsx +0 -70
  85. package/src/components/ui/Select/index.ts +0 -2
  86. package/src/components/ui/Select/select.module.scss +0 -85
  87. package/src/components/ui/SlideOver/overlay.scss +0 -14
  88. package/src/styles/global/resets.scss +0 -48
  89. package/src/styles/global/tokens.scss +0 -276
  90. package/src/styles/global/typography.scss +0 -66
@@ -1,6 +1,7 @@
1
1
  import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs'
2
2
 
3
- import Button, { ButtonBuy, ButtonLink } from '.'
3
+ import { ButtonLink } from '.'
4
+ import { Button, BuyButton } from '@faststore/ui'
4
5
  import Icon from 'src/components/ui/Icon'
5
6
 
6
7
  import {
@@ -149,48 +150,6 @@ export const Usage = ({ inverse, ...args }) => {
149
150
  <TokenRow token="--fs-button-icon-padding" value="0 var(--fs-spacing-1)" />
150
151
  </TokenTable>
151
152
 
152
- ### Counter
153
-
154
- <Canvas>
155
- <Story
156
- name="Counter"
157
- args={{
158
- icon: <Icon name="User" width="18" height="18" weight="bold" />,
159
- counter: 3,
160
- }}
161
- >
162
- {TemplateIcon.bind({})}
163
- </Story>
164
- </Canvas>
165
-
166
- <TokenTable>
167
- <TokenRow token="--fs-button-counter-size" value="var(--fs-spacing-3)" />
168
- <TokenRow token="--fs-button-counter-padding" value="var(--fs-spacing-0)" />
169
- <TokenRow
170
- token="--fs-button-counter-text-size"
171
- value="var(--fs-text-size-0)"
172
- />
173
- <TokenRow
174
- token="--fs-button-counter-text-color"
175
- value="var(--fs-color-text-inverse)"
176
- isColor
177
- />
178
- <TokenRow
179
- token="--fs-button-counter-bkg-color"
180
- value="var(--fs-color-link)"
181
- isColor
182
- />
183
- <TokenRow
184
- token="--fs-button-counter-border-radius"
185
- value="var(--fs-border-radius-pill)"
186
- />
187
- <TokenRow
188
- token="--fs-button-counter-border-color"
189
- value="var(--fs-color-body-bkg)"
190
- isColor
191
- />
192
- </TokenTable>
193
-
194
153
  ---
195
154
 
196
155
  ## Hierarchy <a id="hierarchy" />
@@ -646,7 +605,7 @@ export const Usage = ({ inverse, ...args }) => {
646
605
  title="Button Buy"
647
606
  description="A button with the intent of directly sending the user to the checkout/cart step."
648
607
  >
649
- <ButtonBuy>Button Buy</ButtonBuy>
608
+ <BuyButton>Button Buy</BuyButton>
650
609
  </SectionItem>
651
610
  <SectionItem
652
611
  title="Button Link"
@@ -1,11 +1,11 @@
1
1
  import { useRef } from 'react'
2
2
  import type { FocusEvent } from 'react'
3
3
  import { Icon as UIIcon } from '@faststore/ui'
4
+ import type { ButtonProps } from '@faststore/ui'
4
5
 
5
6
  import Link from 'src/components/ui/Link'
6
7
  import type { LinkProps } from 'src/components/ui/Link'
7
8
 
8
- import type { ButtonProps } from '../Button'
9
9
  import styles from '../button.module.scss'
10
10
 
11
11
  type ButtonLinkProps = ButtonProps & Omit<LinkProps, 'variant'>
@@ -27,6 +27,7 @@ function ButtonLink({
27
27
  className={styles.fsButton}
28
28
  data-fs-button
29
29
  data-fs-button-link
30
+ data-fs-link={null}
30
31
  data-fs-button-variant={variant}
31
32
  data-fs-button-inverse={inverse}
32
33
  data-fs-button-disabled={disabled}
@@ -1,389 +1,8 @@
1
- @import "src/styles/scaffold";
2
-
3
1
  .fs-button {
4
2
  // --------------------------------------------------------
5
3
  // Design Tokens for Buttons
6
4
  // --------------------------------------------------------
7
5
 
8
- // Default properties
9
- --fs-button-padding : calc(var(--fs-spacing-1) - (var(--fs-button-border-width) * 2)) var(--fs-spacing-3);
10
- --fs-button-height : var(--fs-control-tap-size);
11
- --fs-button-gap : var(--fs-spacing-2);
12
-
13
- --fs-button-shadow : var(--fs-shadow);
14
- --fs-button-shadow-hover : var(--fs-button-shadow);
15
-
16
- --fs-button-border-radius : var(--fs-border-radius);
17
- --fs-button-border-width : var(--fs-border-width-thick);
18
- --fs-button-border-color : transparent;
19
-
20
- --fs-button-text-size : var(--fs-text-size-base);
21
- --fs-button-text-weight : var(--fs-text-weight-bold);
22
-
23
- --fs-button-transition-function : var(--fs-transition-function);
24
- --fs-button-transition-property : var(--fs-transition-property);
25
- --fs-button-transition-timing : var(--fs-transition-timing);
26
-
27
- // Primary
28
- --fs-button-primary-text-color : var(--fs-color-primary-text);
29
- --fs-button-primary-text-color-hover : var(--fs-button-primary-text-color);
30
- --fs-button-primary-text-color-active : var(--fs-button-primary-text-color);
31
- --fs-button-primary-bkg-color : var(--fs-color-primary-bkg);
32
- --fs-button-primary-bkg-color-hover : var(--fs-color-primary-bkg-hover);
33
- --fs-button-primary-bkg-color-active : var(--fs-color-primary-bkg-active);
34
- --fs-button-primary-border-color : transparent;
35
- --fs-button-primary-border-color-hover : var(--fs-button-primary-border-color);
36
- --fs-button-primary-border-color-active : var(--fs-button-primary-border-color);
37
- --fs-button-primary-shadow-hover : var(--fs-button-shadow-hover);
38
-
39
- --fs-button-primary-inverse-text-color : var(--fs-button-primary-bkg-color);
40
- --fs-button-primary-inverse-text-color-hover : var(--fs-button-primary-bkg-color);
41
- --fs-button-primary-inverse-text-color-active : var(--fs-button-primary-bkg-color);
42
- --fs-button-primary-inverse-bkg-color : var(--fs-button-primary-text-color);
43
- --fs-button-primary-inverse-bkg-color-hover : var(--fs-color-primary-bkg-light);
44
- --fs-button-primary-inverse-bkg-color-active : var(--fs-color-primary-bkg-light-active);
45
- --fs-button-primary-inverse-border-color : var(--fs-button-primary-border-color);
46
- --fs-button-primary-inverse-border-color-hover : var(--fs-button-primary-border-color);
47
- --fs-button-primary-inverse-border-color-active : var(--fs-button-primary-border-color);
48
- --fs-button-primary-inverse-shadow-hover : var(--fs-button-shadow-hover);
49
-
50
- // Secondary
51
- --fs-button-secondary-text-color : var(--fs-color-secondary-text);
52
- --fs-button-secondary-text-color-hover : var(--fs-color-text-inverse);
53
- --fs-button-secondary-text-color-active : var(--fs-button-secondary-text-color-hover);
54
- --fs-button-secondary-bkg-color : var(--fs-color-secondary-bkg);
55
- --fs-button-secondary-bkg-color-hover : var(--fs-color-secondary-bkg-hover);
56
- --fs-button-secondary-bkg-color-active : var(--fs-color-secondary-bkg-active);
57
- --fs-button-secondary-border-color : var(--fs-button-secondary-text-color);
58
- --fs-button-secondary-border-color-hover : var(--fs-button-secondary-bkg-color-hover);
59
- --fs-button-secondary-border-color-active : var(--fs-button-secondary-bkg-color-active);
60
- --fs-button-secondary-shadow-hover : var(--fs-button-shadow-hover);
61
-
62
- --fs-button-secondary-inverse-text-color : var(--fs-button-secondary-text-color-hover);
63
- --fs-button-secondary-inverse-text-color-hover : var(--fs-button-secondary-text-color);
64
- --fs-button-secondary-inverse-text-color-active : var(--fs-button-secondary-inverse-text-color-hover);
65
- --fs-button-secondary-inverse-bkg-color : var(--fs-button-secondary-bkg-color);
66
- --fs-button-secondary-inverse-bkg-color-hover : var(--fs-button-secondary-text-color-hover);
67
- --fs-button-secondary-inverse-bkg-color-active : var(--fs-color-secondary-bkg-light);
68
- --fs-button-secondary-inverse-border-color : var(--fs-button-secondary-inverse-text-color);
69
- --fs-button-secondary-inverse-border-color-hover : var(--fs-button-secondary-inverse-bkg-color-hover);
70
- --fs-button-secondary-inverse-border-color-active : var(--fs-button-secondary-inverse-bkg-color-active);
71
- --fs-button-secondary-inverse-shadow-hover : var(--fs-button-shadow-hover);
72
-
73
- // Tertiary
74
- --fs-button-tertiary-text-color : var(--fs-color-tertiary-text);
75
- --fs-button-tertiary-text-color-hover : var(--fs-button-tertiary-text-color);
76
- --fs-button-tertiary-text-color-active : var(--fs-button-primary-bkg-color);
77
- --fs-button-tertiary-bkg-color : var(--fs-color-tertiary-bkg);
78
- --fs-button-tertiary-bkg-color-hover : var(--fs-color-tertiary-bkg-hover);
79
- --fs-button-tertiary-bkg-color-active : var(--fs-color-tertiary-bkg-active);
80
- --fs-button-tertiary-border-color : transparent;
81
- --fs-button-tertiary-border-color-hover : var(--fs-button-tertiary-border-color);
82
- --fs-button-tertiary-border-color-active : var(--fs-button-tertiary-border-color);
83
- --fs-button-tertiary-shadow-hover : var(--fs-button-shadow-hover);
84
-
85
- --fs-button-tertiary-inverse-text-color : var(--fs-button-secondary-text-color-hover);
86
- --fs-button-tertiary-inverse-text-color-hover : var(--fs-button-secondary-text-color-hover);
87
- --fs-button-tertiary-inverse-text-color-active : var(--fs-button-secondary-text-color-hover);
88
- --fs-button-tertiary-inverse-bkg-color : var(--fs-button-secondary-inverse-bkg-color);
89
- --fs-button-tertiary-inverse-bkg-color-hover : var(--fs-button-primary-bkg-color-hover);
90
- --fs-button-tertiary-inverse-bkg-color-active : var(--fs-button-primary-bkg-color-active);
91
- --fs-button-tertiary-inverse-border-color : var(--fs-button-tertiary-border-color);
92
- --fs-button-tertiary-inverse-border-color-hover : var(--fs-button-tertiary-border-color);
93
- --fs-button-tertiary-inverse-border-color-active : var(--fs-button-tertiary-border-color);
94
- --fs-button-tertiary-inverse-shadow-hover : var(--fs-button-shadow-hover);
95
-
96
- // Buy (Main CTA)
97
- --fs-button-buy-text-color : var(--fs-color-action-text);
98
- --fs-button-buy-text-color-hover : var(--fs-color-action-text);
99
- --fs-button-buy-text-color-active : var(--fs-color-action-text);
100
- --fs-button-buy-bkg-color : var(--fs-color-action-bkg);
101
- --fs-button-buy-bkg-color-hover : var(--fs-color-action-bkg-hover);
102
- --fs-button-buy-bkg-color-active : var(--fs-color-action-bkg-active);
103
- --fs-button-buy-border-color : var(--fs-button-buy-bkg-color);
104
- --fs-button-buy-border-color-hover : var(--fs-button-buy-bkg-color-hover);
105
- --fs-button-buy-border-color-active : var(--fs-button-buy-bkg-color-active);
106
- --fs-button-buy-shadow-hover : var(--fs-button-shadow-hover);
107
-
108
- // Disabled
109
- --fs-button-disabled-bkg-color : var(--fs-color-disabled-bkg);
110
- --fs-button-disabled-text-color : var(--fs-color-disabled-text);
111
-
112
- // Icon
113
- --fs-button-icon-padding : 0 var(--fs-spacing-1);
114
-
115
- // Counter
116
- --fs-button-counter-size : var(--fs-spacing-3);
117
- --fs-button-counter-padding : var(--fs-spacing-0);
118
- --fs-button-counter-text-size : var(--fs-text-size-0);
119
- --fs-button-counter-text-color : var(--fs-color-text-inverse);
120
- --fs-button-counter-bkg-color : var(--fs-color-link);
121
- --fs-button-counter-border-radius : var(--fs-border-radius-pill);
122
- --fs-button-counter-border-color : var(--fs-color-body-bkg);
123
-
124
- // Small
125
- --fs-button-small-padding : var(--fs-spacing-0) var(--fs-spacing-1);
126
- --fs-button-small-min-height : var(--fs-spacing-5);
127
- --fs-button-small-gap : var(--fs-spacing-1);
128
-
129
- // --------------------------------------------------------
130
- // Structural Styles
131
- // --------------------------------------------------------
132
-
133
- display: inline-flex;
134
- column-gap: var(--fs-button-gap);
135
- align-items: center;
136
- justify-content: center;
137
- min-height: var(--fs-button-height);
138
- padding: var(--fs-button-padding);
139
- font-size: var(--fs-button-text-size);
140
- font-weight: var(--fs-button-text-weight);
141
- text-decoration: none;
142
- cursor: pointer;
143
- border: var(--fs-button-border-width) solid var(--fs-button-border-color);
144
- border-radius: var(--fs-button-border-radius);
145
- outline: none;
146
- box-shadow: var(--fs-button-shadow);
147
- transition: var(--fs-button-transition-property) var(--fs-button-transition-timing) var(--fs-button-transition-function);
148
-
149
- [data-fs-icon] {
150
- display: flex;
151
- align-items: center;
152
- justify-content: center;
153
- }
154
-
155
- // --------------------------------------------------------
156
- // Variants Styles
157
- // --------------------------------------------------------
158
-
159
- &[data-fs-button-variant] {
160
- @include focus-ring-visible;
161
-
162
- &:disabled, &[data-button-disabled="true"] {
163
- color: var(--fs-button-disabled-text-color);
164
- cursor: not-allowed;
165
- background-color: var(--fs-button-disabled-bkg-color);
166
- border: 0;
167
- box-shadow: none;
168
- svg { color: var(--fs-color-neutral-5); }
169
-
170
- &:hover {
171
- color: var(--fs-button-disabled-text-color);
172
- background-color: var(--fs-button-disabled-bkg-color);
173
- }
174
- }
175
- }
176
-
177
- &[data-fs-button-size="small"] {
178
- --fs-control-tap-size: var(--fs-button-small-min-height);
179
-
180
- column-gap: var(--fs-button-small-gap);
181
- padding: var(--fs-button-small-padding);
182
- }
183
-
184
- &[data-fs-button-variant="primary"] {
185
- color: var(--fs-button-primary-text-color);
186
- background-color: var(--fs-button-primary-bkg-color);
187
- border: var(--fs-button-border-width) solid var(--fs-button-primary-border-color);
188
-
189
- &:hover {
190
- color: var(--fs-button-primary-text-color-hover);
191
- background-color: var(--fs-button-primary-bkg-color-hover);
192
- border-color: var(--fs-button-primary-border-color-hover);
193
- box-shadow: var(--fs-button-primary-shadow-hover);
194
- }
195
-
196
- &:focus, &:focus-visible {
197
- color: var(--fs-button-primary-text-color-hover);
198
- background-color: var(--fs-button-primary-bkg-color-hover);
199
- }
200
-
201
- &:active {
202
- color: var(--fs-button-primary-text-color-active);
203
- background-color: var(--fs-button-primary-bkg-color-active);
204
- border-color: var(--fs-button-primary-border-color-active);
205
- }
206
-
207
- &[data-fs-button-inverse="true"] {
208
- color: var(--fs-button-primary-inverse-text-color);
209
- background-color: var(--fs-button-primary-inverse-bkg-color);
210
- border: var(--fs-button-border-width) solid var(--fs-button-primary-inverse-border-color);
211
-
212
- &:hover {
213
- color: var(--fs-button-primary-inverse-text-color-hover);
214
- background-color: var(--fs-button-primary-inverse-bkg-color-hover);
215
- border-color: var(--fs-button-primary-inverse-border-color-hover);
216
- box-shadow: var(--fs-button-primary-inverse-shadow-hover);
217
- }
218
-
219
- &:focus, &:focus-visible {
220
- color: var(--fs-button-primary-inverse-text-color-hover);
221
- background-color: var(--fs-button-primary-inverse-bkg-color-hover);
222
- }
223
-
224
- &:active {
225
- color: var(--fs-button-primary-inverse-text-color-active);
226
- background-color: var(--fs-button-primary-inverse-bkg-color-active);
227
- border-color: var(--fs-button-primary-inverse-border-color-active);
228
- }
229
- }
230
- }
231
-
232
- &[data-fs-button-variant="secondary"] {
233
- color: var(--fs-button-secondary-text-color);
234
- background-color: var(--fs-button-secondary-bkg-color);
235
- border: var(--fs-button-border-width) solid var(--fs-button-secondary-border-color);
236
-
237
- &:hover {
238
- color: var(--fs-button-secondary-text-color-hover);
239
- background-color: var(--fs-button-secondary-bkg-color-hover);
240
- border-color: var(--fs-button-secondary-border-color-hover);
241
- box-shadow: var(--fs-button-secondary-shadow-hover);
242
- }
243
-
244
- &:focus, &:focus-visible {
245
- color: var(--fs-button-secondary-text-color-hover);
246
- background-color: var(--fs-button-secondary-bkg-color-hover);
247
- }
248
-
249
- &:active {
250
- color: var(--fs-button-secondary-text-color-active);
251
- background-color: var(--fs-button-secondary-bkg-color-active);
252
- border-color: var(--fs-button-secondary-border-color-active);
253
- }
254
-
255
- &[data-fs-button-inverse="true"] {
256
- color: var(--fs-button-secondary-inverse-text-color);
257
- background-color: var(--fs-button-secondary-inverse-bkg-color);
258
- border: var(--fs-button-border-width) solid var(--fs-button-secondary-inverse-border-color);
259
-
260
- &:hover {
261
- color: var(--fs-button-secondary-inverse-text-color-hover);
262
- background-color: var(--fs-button-secondary-inverse-bkg-color-hover);
263
- border-color: var(--fs-button-secondary-inverse-border-color-hover);
264
- box-shadow: var(--fs-button-secondary-inverse-shadow-hover);
265
- }
266
-
267
- &:focus, &:focus-visible {
268
- color: var(--fs-button-secondary-inverse-text-color-hover);
269
- background-color: var(--fs-button-secondary-inverse-bkg-color-hover);
270
- }
271
-
272
- &:active {
273
- color: var(--fs-button-secondary-inverse-text-color-active);
274
- background-color: var(--fs-button-secondary-inverse-bkg-color-active);
275
- border-color: var(--fs-button-secondary-inverse-border-color-active);
276
- }
277
- }
278
- }
279
-
280
- &[data-fs-button-variant="tertiary"] {
281
- color: var(--fs-button-tertiary-text-color);
282
- background-color: var(--fs-button-tertiary-bkg-color);
283
- border: var(--fs-button-border-width) solid var(--fs-button-tertiary-border-color);
284
-
285
- &:hover {
286
- color: var(--fs-button-tertiary-text-color-hover);
287
- background-color: var(--fs-button-tertiary-bkg-color-hover);
288
- border-color: var(--fs-button-tertiary-border-color-hover);
289
- box-shadow: var(--fs-button-tertiary-shadow-hover);
290
- }
291
-
292
- &:focus, &:focus-visible {
293
- color: var(--fs-button-tertiary-text-color-hover);
294
- background-color: var(--fs-button-tertiary-bkg-color-hover);
295
- }
296
-
297
- &:active {
298
- color: var(--fs-button-tertiary-text-color-active);
299
- background-color: var(--fs-button-tertiary-bkg-color-active);
300
- border-color: var(--fs-button-tertiary-border-color-active);
301
- }
302
-
303
- &[data-fs-button-inverse="true"] {
304
- color: var(--fs-button-tertiary-inverse-text-color);
305
- background-color: var(--fs-button-tertiary-inverse-bkg-color);
306
- border: var(--fs-button-border-width) solid var(--fs-button-tertiary-inverse-border-color);
307
-
308
- &:hover {
309
- color: var(--fs-button-tertiary-inverse-text-color-hover);
310
- background-color: var(--fs-button-tertiary-inverse-bkg-color-hover);
311
- border-color: var(--fs-button-tertiary-inverse-border-color-hover);
312
- box-shadow: var(--fs-button-tertiary-inverse-shadow-hover);
313
- }
314
-
315
- &:focus, &:focus-visible {
316
- color: var(--fs-button-tertiary-inverse-text-color-hover);
317
- background-color: var(--fs-button-tertiary-inverse-bkg-color-hover);
318
- }
319
-
320
- &:active {
321
- color: var(--fs-button-tertiary-inverse-text-color-active);
322
- background-color: var(--fs-button-tertiary-inverse-bkg-color-active);
323
- border-color: var(--fs-button-tertiary-inverse-border-color-active);
324
- }
325
- }
326
- }
327
-
328
- &[data-fs-button-variant="buy"] {
329
- color: var(--fs-button-buy-text-color);
330
- background-color: var(--fs-button-buy-bkg-color);
331
- border: var(--fs-button-border-width) solid var(--fs-button-buy-border-color);
332
-
333
- &:hover {
334
- color: var(--fs-button-buy-text-color-hover);
335
- background-color: var(--fs-button-buy-bkg-color-hover);
336
- border-color: var(--fs-button-buy-border-color-hover);
337
- box-shadow: var(--fs-button-buy-shadow-hover);
338
- }
339
-
340
- &:focus, &:focus-visible {
341
- color: var(--fs-button-buy-text-color-hover);
342
- background-color: var(--fs-button-buy-bkg-color-hover);
343
- }
344
-
345
- &:active {
346
- color: var(--fs-button-buy-text-color-hover);
347
- background-color: var(--fs-button-buy-bkg-color-active);
348
- border-color: var(--fs-button-buy-border-color-active);
349
- outline: none;
350
- }
351
- }
352
-
353
- &[data-fs-button-icon="true"] {
354
- position: relative;
355
-
356
- [data-fs-button-counter] {
357
- position: absolute;
358
- top: .375rem;
359
- left: 1.625rem;
360
- display: flex;
361
- align-items: center;
362
- justify-content: center;
363
- min-width: var(--fs-button-counter-size);
364
- height: var(--fs-button-counter-size);
365
- padding: var(--fs-button-counter-padding);
366
- font-size: var(--fs-button-counter-text-size);
367
- font-weight: var(--fs-text-weight-bold);
368
- color: var(--fs-button-counter-text-color);
369
- background: var(--fs-button-counter-bkg-color);
370
- border-radius: var(--fs-button-counter-border-radius);
371
- box-shadow: 0 0 0 var(--fs-button-border-width) var(--fs-button-counter-border-color);
372
- transition: var(--fs-button-transition-property) var(--fs-button-transition-timing) var(--fs-button-transition-function);
373
- }
374
-
375
- &:hover, &:active, &:focus, &:focus-visible {
376
- [data-fs-button-counter] { box-shadow: 0 0 0 var(--fs-button-border-width) var(--fs-button-tertiary-bkg-color-hover); }
377
- }
378
-
379
- &[data-fs-button-variant] {
380
- width: var(--fs-button-height);
381
- height: var(--fs-button-height);
382
- padding: var(--fs-button-icon-padding);
383
- border-width: 0;
384
- }
385
- }
386
-
387
6
  &[data-fs-button-link] {
388
7
  &:hover { text-decoration: none; }
389
8
 
@@ -1,6 +1,3 @@
1
- export { default } from './Button'
2
- export type { ButtonProps } from './Button'
3
- export { default as ButtonBuy } from './ButtonBuy'
4
1
  export { default as ButtonLink } from './ButtonLink'
5
2
  export { default as ButtonSignIn } from './ButtonLink/ButtonSignIn'
6
3
  export { default as ButtonSignInFallback } from './ButtonLink/ButtonSignIn/ButtonSignInFallback'
@@ -2,13 +2,13 @@ import {
2
2
  Gift as UIGift,
3
3
  GiftImage as UIGiftImage,
4
4
  GiftContent as UIGiftContent,
5
+ Badge as UIBadge,
5
6
  } from '@faststore/ui'
6
7
  import type { GiftProps } from '@faststore/ui'
7
8
 
8
9
  import { useFormattedPrice } from 'src/sdk/product/useFormattedPrice'
9
10
  import Icon from 'src/components/ui/Icon'
10
11
  import Price from 'src/components/ui/Price'
11
- import { Badge } from 'src/components/ui/Badge'
12
12
  import { Image } from 'src/components/ui/Image'
13
13
  import type { ProductSummary_ProductFragment } from '@generated/graphql'
14
14
 
@@ -66,7 +66,7 @@ function Gift({
66
66
  classes="text__legend"
67
67
  SRText="Original price:"
68
68
  />
69
- <Badge>{badgeLabel}</Badge>
69
+ <UIBadge>{badgeLabel}</UIBadge>
70
70
  </span>
71
71
  </UIGiftContent>
72
72
  </UIGift>
@@ -1,5 +1,5 @@
1
1
  import { useRef } from 'react'
2
- import { Button, IconButton } from '@faststore/ui'
2
+ import { Button as UIButton, IconButton as UIIconButton } from '@faststore/ui'
3
3
  import { useInView } from 'react-intersection-observer'
4
4
 
5
5
  import Icon from 'src/components/ui/Icon'
@@ -61,7 +61,7 @@ function ImageGallerySelector({ images, onSelect, currentImageIdx }: Props) {
61
61
  aria-label="Product images"
62
62
  >
63
63
  {elementHasScroll && !firstImageInView && (
64
- <IconButton
64
+ <UIIconButton
65
65
  data-fs-image-gallery-selector-control-button
66
66
  aria-label="backward slide image selector"
67
67
  icon={<Icon name="ArrowLeft" width={24} height={24} />}
@@ -78,7 +78,7 @@ function ImageGallerySelector({ images, onSelect, currentImageIdx }: Props) {
78
78
  : null
79
79
 
80
80
  return (
81
- <Button
81
+ <UIButton
82
82
  key={idx}
83
83
  aria-label={`${image.alternateName} - Image ${idx + 1} of ${
84
84
  images.length
@@ -97,12 +97,12 @@ function ImageGallerySelector({ images, onSelect, currentImageIdx }: Props) {
97
97
  width={72}
98
98
  height={72}
99
99
  />
100
- </Button>
100
+ </UIButton>
101
101
  )
102
102
  })}
103
103
  </div>
104
104
  {elementHasScroll && !lastImageInView && (
105
- <IconButton
105
+ <UIIconButton
106
106
  data-fs-image-gallery-selector-control-button
107
107
  aria-label="forward slide image selector"
108
108
  icon={<Icon name="ArrowLeft" width={24} height={24} />}
@@ -86,9 +86,15 @@
86
86
  [data-fs-image-gallery-selector-control-button] {
87
87
  position: absolute;
88
88
  z-index: 1;
89
+ color: var(--fs-color-text-display);
89
90
  background: linear-gradient(90deg, var(--fs-color-body-bkg) 55%, transparent);
90
91
  background-color: transparent;
91
92
  border: none;
93
+ border-radius: var(--fs-border-radius-circle);
94
+
95
+ &:hover {
96
+ color: var(--fs-color-text-display);
97
+ }
92
98
 
93
99
  span {
94
100
  display: flex;
@@ -1,29 +1,16 @@
1
1
  import { forwardRef, useMemo } from 'react'
2
- import type { Ref, ElementType, AnchorHTMLAttributes } from 'react'
2
+ import type { Ref, AnchorHTMLAttributes } from 'react'
3
3
  import NextLink from 'next/link'
4
4
  import type { LinkProps as FrameworkLinkProps } from 'next/link'
5
5
  import { Link as UILink } from '@faststore/ui'
6
- import type { LinkProps as UILinkProps } from '@faststore/ui'
6
+ import type { LinkProps as UILinkProps, LinkElementType } from '@faststore/ui'
7
7
 
8
- import styles from './link.module.scss'
9
-
10
- type Variant = 'default' | 'display' | 'footer' | 'inline'
11
-
12
- export type LinkProps<T extends ElementType = 'a'> = UILinkProps<T> &
8
+ export type LinkProps<T extends LinkElementType = 'a'> = UILinkProps<T> &
13
9
  FrameworkLinkProps &
14
- AnchorHTMLAttributes<HTMLAnchorElement> & {
15
- /**
16
- * Specifies the component variant.
17
- */
18
- variant?: Variant
19
- /**
20
- * Defines use of inverted color.
21
- */
22
- inverse?: boolean
23
- }
10
+ AnchorHTMLAttributes<HTMLAnchorElement>
24
11
 
25
12
  const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link<
26
- T extends ElementType = 'a'
13
+ T extends LinkElementType = 'a'
27
14
  >(
28
15
  { href, inverse, children, variant = 'default', ...otherProps }: LinkProps<T>,
29
16
  ref: Ref<HTMLAnchorElement> | undefined
@@ -35,18 +22,18 @@ const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link<
35
22
 
36
23
  if (isInternalLink) {
37
24
  return (
38
- <NextLink passHref href={href}>
39
- <UILink
40
- ref={ref}
41
- data-fs-link
42
- data-fs-link-variant={variant}
43
- data-fs-link-inverse={inverse}
44
- className={styles.fsLink}
45
- {...otherProps}
46
- >
47
- {children}
48
- </UILink>
49
- </NextLink>
25
+ <UILink
26
+ as={NextLink}
27
+ ref={ref}
28
+ variant={variant}
29
+ inverse={inverse}
30
+ passHref
31
+ href={href}
32
+ legacyBehavior={false}
33
+ {...otherProps}
34
+ >
35
+ <>{children}</>
36
+ </UILink>
50
37
  )
51
38
  }
52
39
 
@@ -54,10 +41,8 @@ const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link<
54
41
  <UILink
55
42
  ref={ref}
56
43
  href={href}
57
- data-fs-link
58
- data-fs-link-variant={variant}
59
- data-fs-link-inverse={inverse}
60
- className={styles.fsLink}
44
+ variant={variant}
45
+ inverse={inverse}
61
46
  {...otherProps}
62
47
  >
63
48
  {children}
@@ -1,5 +1,8 @@
1
1
  import { useState, useRef } from 'react'
2
- import { PriceRange as UIPriceRange } from '@faststore/ui'
2
+ import {
3
+ PriceRange as UIPriceRange,
4
+ InputField as UIInputField,
5
+ } from '@faststore/ui'
3
6
  import type { PriceRangeProps } from '@faststore/ui'
4
7
 
5
8
  import {
@@ -8,7 +11,6 @@ import {
8
11
  } from 'src/sdk/product/useFormattedPrice'
9
12
 
10
13
  import styles from './price-range.module.scss'
11
- import InputText from '../InputText'
12
14
 
13
15
  type Props = Omit<
14
16
  PriceRangeProps,
@@ -102,7 +104,7 @@ function PriceRange({ min, max, onEnd, step = 10, ...otherProps }: Props) {
102
104
  {...otherProps}
103
105
  />
104
106
  <div data-fs-price-range-inputs>
105
- <InputText
107
+ <UIInputField
106
108
  id="price-range-min"
107
109
  step={step}
108
110
  label="Min"
@@ -116,7 +118,7 @@ function PriceRange({ min, max, onEnd, step = 10, ...otherProps }: Props) {
116
118
  onChange={(e) => onChangeInputMin(e.target.value)}
117
119
  onBlur={() => !inputMinError && onEnd?.(priceRange)}
118
120
  />
119
- <InputText
121
+ <UIInputField
120
122
  id="price-range-max"
121
123
  label="Max"
122
124
  step={step}