@faststore/ui 3.99.1 → 4.0.0-dev.3

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 (136) hide show
  1. package/dist/cjs/index.js +1 -12
  2. package/dist/{cjs/components → components}/atoms/Incentive/Incentive.d.ts +1 -2
  3. package/dist/components/atoms/Incentive/Incentive.d.ts.map +1 -0
  4. package/dist/components/atoms/Incentive/index.d.ts.map +1 -0
  5. package/dist/{esm/components → components}/organisms/Tiles/Tile.d.ts +1 -2
  6. package/dist/components/organisms/Tiles/Tile.d.ts.map +1 -0
  7. package/dist/{cjs/components → components}/organisms/Tiles/Tiles.d.ts +1 -2
  8. package/dist/components/organisms/Tiles/Tiles.d.ts.map +1 -0
  9. package/dist/components/organisms/Tiles/index.d.ts.map +1 -0
  10. package/dist/es/index.mjs +46 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/{cjs/typings → typings}/PolymorphicGenerics.d.ts +1 -7
  13. package/dist/typings/PolymorphicGenerics.d.ts.map +1 -0
  14. package/dist/typings/index.d.ts.map +1 -0
  15. package/package.json +28 -29
  16. package/src/components/atoms/Button/styles.scss +4 -2
  17. package/src/components/atoms/Checkbox/styles.scss +3 -1
  18. package/src/components/atoms/Input/styles.scss +4 -2
  19. package/src/components/atoms/Link/styles.scss +4 -2
  20. package/src/components/atoms/Radio/styles.scss +3 -1
  21. package/src/components/atoms/Select/styles.scss +7 -5
  22. package/src/components/atoms/Textarea/styles.scss +3 -1
  23. package/src/components/molecules/Accordion/styles.scss +3 -1
  24. package/src/components/molecules/Breadcrumb/styles.scss +8 -5
  25. package/src/components/molecules/BuyButton/styles.scss +3 -2
  26. package/src/components/molecules/Carousel/styles.scss +22 -16
  27. package/src/components/molecules/CartItem/styles.scss +3 -1
  28. package/src/components/molecules/FileUploadCard/styles.scss +14 -14
  29. package/src/components/molecules/Gift/styles.scss +5 -3
  30. package/src/components/molecules/InputField/styles.scss +7 -3
  31. package/src/components/molecules/Modal/styles.scss +3 -1
  32. package/src/components/molecules/NavbarLinks/styles.scss +9 -6
  33. package/src/components/molecules/PickupPointCard/styles.scss +4 -2
  34. package/src/components/molecules/Popover/styles.scss +1 -1
  35. package/src/components/molecules/ProductCard/styles.scss +7 -5
  36. package/src/components/molecules/ProductTile/styles.scss +6 -4
  37. package/src/components/molecules/ProductTitle/styles.scss +8 -6
  38. package/src/components/molecules/SearchDropdown/styles.scss +4 -2
  39. package/src/components/molecules/SearchInputField/styles.scss +8 -10
  40. package/src/components/molecules/SearchProducts/styles.scss +5 -3
  41. package/src/components/molecules/SkuSelector/styles.scss +9 -9
  42. package/src/components/molecules/TextareaField/styles.scss +5 -3
  43. package/src/components/molecules/Toast/styles.scss +5 -3
  44. package/src/components/molecules/Toggle/styles.scss +3 -1
  45. package/src/components/organisms/BannerNewsletter/styles.scss +3 -1
  46. package/src/components/organisms/BannerText/styles.scss +6 -3
  47. package/src/components/organisms/EmptyState/styles.scss +4 -2
  48. package/src/components/organisms/Filter/styles.scss +6 -4
  49. package/src/components/organisms/FilterSkeleton/styles.scss +3 -1
  50. package/src/components/organisms/Footer/styles.scss +23 -21
  51. package/src/components/organisms/Hero/styles.scss +19 -16
  52. package/src/components/organisms/ImageGallery/styles.scss +26 -24
  53. package/src/components/organisms/Incentives/styles.scss +5 -3
  54. package/src/components/organisms/LocalizationSelector/styles.scss +90 -0
  55. package/src/components/organisms/Navbar/styles.scss +47 -29
  56. package/src/components/organisms/NavbarSlider/styles.scss +10 -2
  57. package/src/components/organisms/Newsletter/styles.scss +13 -12
  58. package/src/components/organisms/PaymentMethods/styles.scss +6 -4
  59. package/src/components/organisms/ProductComparison/styles.scss +7 -5
  60. package/src/components/organisms/ProductDetails/styles.scss +27 -25
  61. package/src/components/organisms/ProductGallery/styles.scss +20 -18
  62. package/src/components/organisms/ProductGrid/styles.scss +5 -3
  63. package/src/components/organisms/ProductShelf/styles.scss +5 -3
  64. package/src/components/organisms/QuickOrderDrawer/styles.scss +3 -13
  65. package/src/components/organisms/RegionPopover/styles.scss +3 -1
  66. package/src/components/organisms/SKUMatrix/styles.scss +22 -23
  67. package/src/components/organisms/SearchInput/styles.scss +3 -1
  68. package/src/components/organisms/SlideOver/styles.scss +46 -10
  69. package/src/components/organisms/Tiles/styles.scss +6 -4
  70. package/src/styles/base/layout.scss +6 -4
  71. package/src/styles/base/reset.scss +4 -2
  72. package/src/styles/base/tokens.scss +11 -9
  73. package/src/styles/base/typography.scss +2 -1
  74. package/src/styles/base/utilities.scss +32 -18
  75. package/src/styles/base.scss +4 -4
  76. package/src/styles/components.scss +1 -0
  77. package/src/styles/global.scss +1 -1
  78. package/dist/cjs/components/atoms/Incentive/Incentive.d.ts.map +0 -1
  79. package/dist/cjs/components/atoms/Incentive/Incentive.js +0 -9
  80. package/dist/cjs/components/atoms/Incentive/Incentive.js.map +0 -1
  81. package/dist/cjs/components/atoms/Incentive/index.d.ts.map +0 -1
  82. package/dist/cjs/components/atoms/Incentive/index.js +0 -9
  83. package/dist/cjs/components/atoms/Incentive/index.js.map +0 -1
  84. package/dist/cjs/components/organisms/Tiles/Tile.d.ts +0 -12
  85. package/dist/cjs/components/organisms/Tiles/Tile.d.ts.map +0 -1
  86. package/dist/cjs/components/organisms/Tiles/Tile.js +0 -9
  87. package/dist/cjs/components/organisms/Tiles/Tile.js.map +0 -1
  88. package/dist/cjs/components/organisms/Tiles/Tiles.d.ts.map +0 -1
  89. package/dist/cjs/components/organisms/Tiles/Tiles.js +0 -33
  90. package/dist/cjs/components/organisms/Tiles/Tiles.js.map +0 -1
  91. package/dist/cjs/components/organisms/Tiles/index.d.ts.map +0 -1
  92. package/dist/cjs/components/organisms/Tiles/index.js +0 -11
  93. package/dist/cjs/components/organisms/Tiles/index.js.map +0 -1
  94. package/dist/cjs/index.d.ts.map +0 -1
  95. package/dist/cjs/index.js.map +0 -1
  96. package/dist/cjs/typings/PolymorphicGenerics.d.ts.map +0 -1
  97. package/dist/cjs/typings/PolymorphicGenerics.js +0 -9
  98. package/dist/cjs/typings/PolymorphicGenerics.js.map +0 -1
  99. package/dist/cjs/typings/index.d.ts.map +0 -1
  100. package/dist/cjs/typings/index.js +0 -3
  101. package/dist/cjs/typings/index.js.map +0 -1
  102. package/dist/esm/components/atoms/Incentive/Incentive.d.ts +0 -12
  103. package/dist/esm/components/atoms/Incentive/Incentive.d.ts.map +0 -1
  104. package/dist/esm/components/atoms/Incentive/Incentive.js +0 -6
  105. package/dist/esm/components/atoms/Incentive/Incentive.js.map +0 -1
  106. package/dist/esm/components/atoms/Incentive/index.d.ts +0 -3
  107. package/dist/esm/components/atoms/Incentive/index.d.ts.map +0 -1
  108. package/dist/esm/components/atoms/Incentive/index.js +0 -2
  109. package/dist/esm/components/atoms/Incentive/index.js.map +0 -1
  110. package/dist/esm/components/organisms/Tiles/Tile.d.ts.map +0 -1
  111. package/dist/esm/components/organisms/Tiles/Tile.js +0 -6
  112. package/dist/esm/components/organisms/Tiles/Tile.js.map +0 -1
  113. package/dist/esm/components/organisms/Tiles/Tiles.d.ts +0 -12
  114. package/dist/esm/components/organisms/Tiles/Tiles.d.ts.map +0 -1
  115. package/dist/esm/components/organisms/Tiles/Tiles.js +0 -30
  116. package/dist/esm/components/organisms/Tiles/Tiles.js.map +0 -1
  117. package/dist/esm/components/organisms/Tiles/index.d.ts +0 -5
  118. package/dist/esm/components/organisms/Tiles/index.d.ts.map +0 -1
  119. package/dist/esm/components/organisms/Tiles/index.js +0 -3
  120. package/dist/esm/components/organisms/Tiles/index.js.map +0 -1
  121. package/dist/esm/index.d.ts +0 -6
  122. package/dist/esm/index.d.ts.map +0 -1
  123. package/dist/esm/index.js +0 -5
  124. package/dist/esm/index.js.map +0 -1
  125. package/dist/esm/typings/PolymorphicGenerics.d.ts +0 -29
  126. package/dist/esm/typings/PolymorphicGenerics.d.ts.map +0 -1
  127. package/dist/esm/typings/PolymorphicGenerics.js +0 -8
  128. package/dist/esm/typings/PolymorphicGenerics.js.map +0 -1
  129. package/dist/esm/typings/index.d.ts +0 -2
  130. package/dist/esm/typings/index.d.ts.map +0 -1
  131. package/dist/esm/typings/index.js +0 -2
  132. package/dist/esm/typings/index.js.map +0 -1
  133. /package/dist/{cjs/components → components}/atoms/Incentive/index.d.ts +0 -0
  134. /package/dist/{cjs/components → components}/organisms/Tiles/index.d.ts +0 -0
  135. /package/dist/{cjs/index.d.ts → index.d.ts} +0 -0
  136. /package/dist/{cjs/typings → typings}/index.d.ts +0 -0
package/dist/cjs/index.js CHANGED
@@ -1,12 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tiles = exports.Tile = exports.Incentive = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("@faststore/components"), exports);
6
- var Incentive_1 = require("./components/atoms/Incentive");
7
- Object.defineProperty(exports, "Incentive", { enumerable: true, get: function () { return tslib_1.__importDefault(Incentive_1).default; } });
8
- // Organisms
9
- var Tiles_1 = require("./components/organisms/Tiles");
10
- Object.defineProperty(exports, "Tile", { enumerable: true, get: function () { return Tiles_1.Tile; } });
11
- Object.defineProperty(exports, "Tiles", { enumerable: true, get: function () { return Tiles_1.Tiles; } });
12
- //# sourceMappingURL=index.js.map
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@faststore/components"),e=require("react"),E=e.forwardRef(function({testId:r="store-incentive",children:n,...o},s){return e.createElement("section",{ref:s,"data-fs-incentive":!0,"data-testid":r,...o},n)}),l=2,d=4,T=2,p=3,O=e.forwardRef(function({testId:r="store-tiles",children:n,...o},s){const i=e.Children.count(n);if(process.env.NODE_ENV==="development"&&(i<l||i>d))throw new Error(`Tiles cannot receive less than ${l} or more than ${d} children.`);process.env.NODE_ENV==="development"&&e.Children.forEach(n,a=>{if(a.type!==f)throw new Error("Only Tile components allowed as children.")});const u=i===p?"expanded-first":i===T?"expanded-first-two":"";return e.createElement("ul",{ref:s,role:"list","data-fs-tiles":!0,"data-fs-tiles-variant":u,"data-fs-content":"tiles","data-testid":r,...o},n)}),f=e.forwardRef(function({testId:r="store-tile",children:n,...o},s){return e.createElement("li",{ref:s,role:"listitem","data-fs-tile":!0,"data-testid":r,...o},n)});exports.Incentive=E;exports.Tile=f;exports.Tiles=O;Object.keys(c).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>c[t]})});
@@ -1,5 +1,4 @@
1
- import type { HTMLAttributes } from 'react';
2
- import React from 'react';
1
+ import { HTMLAttributes, default as React } from 'react';
3
2
  export interface IncentiveProps extends HTMLAttributes<HTMLDivElement> {
4
3
  /**
5
4
  * ID to find this component in testing tools (e.g.: cypress,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Incentive.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Incentive/Incentive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,QAAA,MAAM,SAAS,uFASb,CAAA;AAEF,eAAe,SAAS,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/Incentive/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA"}
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import type { HTMLAttributes } from 'react';
1
+ import { default as React, HTMLAttributes } from 'react';
3
2
  export interface TileProps extends HTMLAttributes<HTMLLIElement> {
4
3
  /**
5
4
  * ID to find this component in testing tools (e.g.: Cypress,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,aAAa,CAAC;IAC9D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,QAAA,MAAM,IAAI,iFAeR,CAAA;AAEF,eAAe,IAAI,CAAA"}
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
- import type { HTMLAttributes } from 'react';
1
+ import { default as React, HTMLAttributes } from 'react';
3
2
  export interface TilesProps extends HTMLAttributes<HTMLUListElement> {
4
3
  /**
5
4
  * ID to find this component in testing tools (e.g.: Cypress,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tiles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/Tiles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAA;AACnD,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,OAAO,CAAA;AAIzD,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IAClE;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAOD,QAAA,MAAM,KAAK,qFA6CT,CAAA;AAEF,eAAe,KAAK,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA"}
@@ -0,0 +1,46 @@
1
+ export * from "@faststore/components";
2
+ import r, { forwardRef as i, Children as l } from "react";
3
+ const m = i(function({ testId: t = "store-incentive", children: e, ...n }, s) {
4
+ return /* @__PURE__ */ r.createElement("section", { ref: s, "data-fs-incentive": !0, "data-testid": t, ...n }, e);
5
+ }), d = 2, f = 4, u = 2, T = 3, N = i(function({ testId: t = "store-tiles", children: e, ...n }, s) {
6
+ const o = l.count(e);
7
+ if (process.env.NODE_ENV === "development" && (o < d || o > f))
8
+ throw new Error(
9
+ `Tiles cannot receive less than ${d} or more than ${f} children.`
10
+ );
11
+ process.env.NODE_ENV === "development" && l.forEach(e, (c) => {
12
+ if (c.type !== _)
13
+ throw new Error("Only Tile components allowed as children.");
14
+ });
15
+ const E = o === T ? "expanded-first" : o === u ? "expanded-first-two" : "";
16
+ return /* @__PURE__ */ r.createElement(
17
+ "ul",
18
+ {
19
+ ref: s,
20
+ role: "list",
21
+ "data-fs-tiles": !0,
22
+ "data-fs-tiles-variant": E,
23
+ "data-fs-content": "tiles",
24
+ "data-testid": t,
25
+ ...n
26
+ },
27
+ e
28
+ );
29
+ }), _ = i(function({ testId: t = "store-tile", children: e, ...n }, s) {
30
+ return /* @__PURE__ */ r.createElement(
31
+ "li",
32
+ {
33
+ ref: s,
34
+ role: "listitem",
35
+ "data-fs-tile": !0,
36
+ "data-testid": t,
37
+ ...n
38
+ },
39
+ e
40
+ );
41
+ });
42
+ export {
43
+ m as Incentive,
44
+ _ as Tile,
45
+ N as Tiles
46
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AAErC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACnE,YAAY,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAGlE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAC1D,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA"}
@@ -1,10 +1,4 @@
1
- /**
2
- * These were heavily inspired by "Forwarding refs for a polymorphic React
3
- * component in TypeScript", written by Ben Ilegbodu.
4
- *
5
- * Article link: https://www.benmvp.com/blog/forwarding-refs-polymorphic-react-component-typescript/
6
- */
7
- import type { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType } from 'react';
1
+ import { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType } from 'react';
8
2
  type AsProp<C extends ElementType> = {
9
3
  as?: C;
10
4
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolymorphicGenerics.d.ts","sourceRoot":"","sources":["../../src/typings/PolymorphicGenerics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,WAAW,EACZ,MAAM,OAAO,CAAA;AAEd,KAAK,MAAM,CAAC,CAAC,SAAS,WAAW,IAAI;IACnC,EAAE,CAAC,EAAE,CAAC,CAAA;CACP,CAAA;AAED;;;;GAIG;AACH,KAAK,eAAe,CAClB,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACrC,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IACnC,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,aAAa,CAAC,CAAA;AAE5D;;;;GAIG;AACH,KAAK,uBAAuB,CAC1B,CAAC,SAAS,WAAW,EACrB,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAC3B,eAAe,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;AAEvD,MAAM,MAAM,yBAAyB,CACnC,CAAC,SAAS,WAAW,EACrB,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAC3B,uBAAuB,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AAEjD,MAAM,MAAM,gCAAgC,CAC1C,CAAC,SAAS,WAAW,EACrB,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IACvB,yBAAyB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;CAAE,CAAA;AAG/E,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,WAAW,IAC9C,gCAAgC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/typings/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,yBAAyB,EACzB,gCAAgC,EAChC,cAAc,GACf,MAAM,uBAAuB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/ui",
3
- "version": "3.99.1",
3
+ "version": "4.0.0-dev.3",
4
4
  "description": "A lightweight, framework agnostic component library for React",
5
5
  "author": "emersonlaurentino",
6
6
  "license": "MIT",
@@ -10,68 +10,67 @@
10
10
  "directory": "packages/ui"
11
11
  },
12
12
  "browserslist": "supports es6-module and not dead and last 2 version",
13
- "main": "dist/cjs/index.js",
14
- "module": "dist/esm/index.js",
15
- "typings": "dist/esm/index.d.ts",
13
+ "typings": "dist/index.d.ts",
16
14
  "exports": {
17
15
  ".": {
18
- "import": "./dist/esm/index.js",
19
- "require": "./dist/cjs/index.js",
20
- "types": "./dist/esm/index.d.ts",
21
- "default": "./dist/esm/index.js"
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/es/index.mjs",
18
+ "require": "./dist/cjs/index.js"
19
+ },
20
+ "./*.scss": {
21
+ "sass": "./src/*.scss"
22
22
  },
23
23
  "./src/*": "./src/*"
24
24
  },
25
25
  "sideEffects": false,
26
26
  "engines": {
27
- "node": ">=10"
27
+ "node": ">=20"
28
28
  },
29
29
  "files": [
30
30
  "dist",
31
31
  "src"
32
32
  ],
33
33
  "scripts": {
34
- "dev": "tsc --watch",
35
- "build": "tsc --module commonjs --outDir dist/cjs && tsc --module esnext --outDir dist/esm",
34
+ "dev": "vite build --watch",
35
+ "build": "vite build",
36
36
  "size": "size-limit",
37
37
  "analyze": "size-limit --why"
38
38
  },
39
39
  "size-limit": [
40
40
  {
41
41
  "path": "dist/cjs/index.js",
42
- "limit": "50 KB"
42
+ "limit": "62 KB"
43
43
  },
44
44
  {
45
- "path": "dist/esm/index.js",
46
- "limit": "40 KB"
45
+ "path": "dist/es/index.mjs",
46
+ "limit": "60 KB"
47
47
  }
48
48
  ],
49
49
  "dependencies": {
50
- "@faststore/components": "3.99.1",
51
- "include-media": "^1.4.10",
50
+ "@faststore/components": "4.0.0-dev.3",
51
+ "include-media": "^2.0.0",
52
52
  "modern-normalize": "^1.1.0",
53
- "react-swipeable": "^7.0.0",
54
- "tabbable": "^5.2.1"
53
+ "react-swipeable": "catalog:",
54
+ "tabbable": "catalog:"
55
55
  },
56
56
  "peerDependencies": {
57
- "@faststore/components": "workspace:*",
58
- "react": "^18.2.0",
59
- "react-dom": "^18.2.0"
57
+ "react": "catalog:",
58
+ "react-dom": "catalog:"
60
59
  },
61
60
  "devDependencies": {
62
61
  "@size-limit/preset-small-lib": "^7.0.8",
63
- "@types/node": "^18.11.16",
64
- "@types/react": "^18.2.42",
65
- "@types/tabbable": "^3.1.1",
62
+ "@types/node": "catalog:",
63
+ "@types/react": "catalog:",
64
+ "@types/tabbable": "catalog:",
66
65
  "babel-loader": "^8.2.5",
66
+ "sass": "^1.97.3",
67
67
  "size-limit": "^7.0.8",
68
- "tslib": "^2.3.1"
69
- },
70
- "volta": {
71
- "extends": "../../package.json"
68
+ "tslib": "catalog:",
69
+ "vite": "catalog:",
70
+ "vite-plugin-dts": "catalog:"
72
71
  },
73
72
  "publishConfig": {
74
73
  "access": "public"
75
74
  },
76
- "gitHead": "58c9a02f542a1b6ca57296d08361646f979ec469"
75
+ "gitHead": "e8b4a1b899f0ced0893de9b62b052b39474d623d"
77
76
  }
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities.scss";
2
+
1
3
  [data-fs-button] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for Buttons
@@ -149,12 +151,12 @@
149
151
  @media not all and (min-resolution: .001dpcm) {
150
152
  @supports (-webkit-appearance:none) {
151
153
  &:focus [data-fs-button-wrapper],
152
- &:focus:hover [data-fs-button-wrapper] { @include focus-ring; }
154
+ &:focus:hover [data-fs-button-wrapper] { @include utilities.focus-ring; }
153
155
  }
154
156
  }
155
157
 
156
158
  &:focus-visible [data-fs-button-wrapper],
157
- &:focus-visible:hover [data-fs-button-wrapper] { @include focus-ring; }
159
+ &:focus-visible:hover [data-fs-button-wrapper] { @include utilities.focus-ring; }
158
160
 
159
161
  &:disabled [data-fs-button-wrapper], &[data-fs-button-disabled="true"] [data-fs-button-wrapper] {
160
162
  color: var(--fs-button-disabled-text-color);
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities.scss";
2
+
1
3
  [data-fs-checkbox] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for Checkbox
@@ -52,7 +54,7 @@
52
54
  transition: var(--fs-checkbox-transition);
53
55
  appearance: none;
54
56
 
55
- @include input-focus-ring;
57
+ @include utilities.input-focus-ring;
56
58
 
57
59
  &::before {
58
60
  position: absolute;
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities.scss";
2
+
1
3
  [data-fs-input] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for Input
@@ -47,7 +49,7 @@
47
49
  box-shadow: var(--fs-input-box-shadow);
48
50
  transition: var(--fs-input-transition-property) var(--fs-input-transition-timing) var(--fs-input-transition-function);
49
51
 
50
- @include input-focus-ring;
52
+ @include utilities.input-focus-ring;
51
53
 
52
54
  &:hover:not(:disabled):not(:focus-visible):not(:focus) {
53
55
  border-color: var(--fs-input-border-color-hover);
@@ -55,8 +57,8 @@
55
57
  }
56
58
 
57
59
  &:disabled {
58
- cursor: not-allowed;
59
60
  color: var(--fs-input-disabled-text-color);
61
+ cursor: not-allowed;
60
62
  background-color: var(--fs-input-disabled-bkg-color);
61
63
  border: var(--fs-input-disabled-border-width) solid var(--fs-input-disabled-border-color);
62
64
  }
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities.scss";
2
+
1
3
  [data-fs-link] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for Link
@@ -54,7 +56,7 @@
54
56
  border-radius: var(--fs-link-border-radius);
55
57
  transition: var(--fs-link-transition-property) var(--fs-link-transition-timing) var(--fs-link-transition-function);
56
58
 
57
- @include focus-ring-visible;
59
+ @include utilities.focus-ring-visible;
58
60
  }
59
61
 
60
62
  // --------------------------------------------------------
@@ -83,7 +85,7 @@
83
85
  &[data-fs-link-size="small"] {
84
86
  font-size: var(--fs-link-small-text-size);
85
87
 
86
- @include media(">=notebook") { padding: var(--fs-link-small-padding); }
88
+ @include utilities.media(">=notebook") { padding: var(--fs-link-small-padding); }
87
89
  }
88
90
 
89
91
  &[data-fs-link-inverse="true"] {
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities.scss";
2
+
1
3
  [data-fs-radio] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for radio
@@ -47,7 +49,7 @@
47
49
  transition: var(--fs-radio-transition);
48
50
  appearance: none;
49
51
 
50
- @include input-focus-ring;
52
+ @include utilities.input-focus-ring;
51
53
 
52
54
  &::before {
53
55
  width: var(--fs-radio-knob-width);
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities.scss";
2
+
1
3
  [data-fs-select] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for Select
@@ -49,7 +51,7 @@
49
51
  transition: var(--fs-select-transition-property) var(--fs-select-transition-timing) var(--fs-select-transition-function);
50
52
  appearance: none;
51
53
 
52
- @include focus-ring-visible;
54
+ @include utilities.focus-ring-visible;
53
55
 
54
56
  &:focus { background-color: var(--fs-select-bkg-color-focus); }
55
57
 
@@ -62,17 +64,17 @@
62
64
  + [data-fs-select-icon] { display: none; }
63
65
  }
64
66
 
65
- @include media("<notebook") { min-height: var(--fs-select-min-height); }
67
+ @include utilities.media("<notebook") { min-height: var(--fs-select-min-height); }
66
68
 
67
- @include media(">=notebook") { height: var(--fs-select-height); }
69
+ @include utilities.media(">=notebook") { height: var(--fs-select-height); }
68
70
  }
69
71
 
70
72
  [data-fs-select-icon] {
71
73
  position: absolute;
72
74
  right: var(--fs-select-icon-position-right);
73
- color: var(--fs-select-icon-color);
74
- pointer-events: none;
75
75
  width: var(--fs-select-icon-width);
76
76
  height: var(--fs-select-icon-height);
77
+ color: var(--fs-select-icon-color);
78
+ pointer-events: none;
77
79
  }
78
80
  }
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities.scss";
2
+
1
3
  [data-fs-textarea] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for Textarea
@@ -50,7 +52,7 @@
50
52
  width 0s,
51
53
  height 0s;
52
54
 
53
- @include input-focus-ring;
55
+ @include utilities.input-focus-ring;
54
56
 
55
57
  &:hover:not(:disabled):not(:focus-visible):not(:focus) {
56
58
  border-color: var(--fs-textarea-border-color-hover);
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities";
2
+
1
3
  [data-fs-accordion] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for Accordion
@@ -30,7 +32,7 @@
30
32
  [data-fs-accordion-item] {
31
33
  border-bottom: var(--fs-accordion-item-border-bottom-width) solid var(--fs-accordion-item-border-bottom-color);
32
34
 
33
- @include media(">=notebook") {
35
+ @include utilities.media(">=notebook") {
34
36
  &:last-child {
35
37
  border-bottom: 0;
36
38
  }
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities";
2
+
1
3
  [data-fs-breadcrumb] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for Breadcrumb
@@ -46,7 +48,8 @@
46
48
  display: flex;
47
49
  align-items: center;
48
50
  overflow-x: hidden;
49
- @include media("<notebook") {
51
+
52
+ @include utilities.media("<notebook") {
50
53
  margin-left: var(--fs-breadcrumb-margin-left);
51
54
  }
52
55
  }
@@ -61,7 +64,7 @@
61
64
  text-overflow: ellipsis;
62
65
  white-space: nowrap;
63
66
 
64
- @include media("<=tablet") {
67
+ @include utilities.media("<=tablet") {
65
68
  max-width: var(--fs-breadcrumb-list-item-max-width-mobile);
66
69
  }
67
70
  }
@@ -89,7 +92,7 @@
89
92
  color: var(--fs-breadcrumb-list-item-last-text-color);
90
93
  }
91
94
 
92
- @include media(">=notebook") {
95
+ @include utilities.media(">=notebook") {
93
96
  &:nth-child(3) {
94
97
  overflow: visible;
95
98
  }
@@ -135,14 +138,14 @@
135
138
  }
136
139
 
137
140
  &[data-fs-breadcrumb-is-desktop="true"] {
138
- @include media("<notebook") {
141
+ @include utilities.media("<notebook") {
139
142
  display: none;
140
143
  visibility: hidden;
141
144
  }
142
145
  }
143
146
 
144
147
  &[data-fs-breadcrumb-is-desktop="false"] {
145
- @include media(">=notebook") {
148
+ @include utilities.media(">=notebook") {
146
149
  display: none;
147
150
  visibility: hidden;
148
151
  }
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities.scss";
2
+
1
3
  [data-fs-buy-button] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for Buy Button
@@ -22,7 +24,7 @@
22
24
  // Structural Styles
23
25
  // --------------------------------------------------------
24
26
 
25
- @include focus-ring-visible;
27
+ @include utilities.focus-ring-visible;
26
28
 
27
29
  color: var(--fs-buy-button-text-color);
28
30
 
@@ -31,7 +33,6 @@
31
33
  border: var(--fs-button-border-width) solid var(--fs-buy-button-border-color);
32
34
  }
33
35
 
34
-
35
36
  &:hover [data-fs-button-wrapper] {
36
37
  color: var(--fs-buy-button-text-color-hover);
37
38
  background-color: var(--fs-buy-button-bkg-color-hover);
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities";
2
+
1
3
  [data-fs-carousel] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for Carousel
@@ -5,7 +7,7 @@
5
7
 
6
8
  // Track
7
9
  --fs-carousel-padding-mobile : var(--fs-spacing-0) var(--fs-grid-padding);
8
- --fs-carousel-padding-desktop : var(--fs-spacing-0) calc((100% - var(--fs-grid-max-width))/2) var(--fs-spacing-0);
10
+ --fs-carousel-padding-desktop : var(--fs-spacing-0) calc((100% - var(--fs-grid-max-width)) / 2) var(--fs-spacing-0);
9
11
 
10
12
  // Item
11
13
  --fs-carousel-item-margin-right : var(--fs-spacing-3);
@@ -43,21 +45,21 @@
43
45
  // --------------------------------------------------------
44
46
 
45
47
  position: relative;
46
- width: inherit;
47
48
  display: flex;
48
49
  flex-direction: column;
49
50
  align-items: center;
51
+ width: inherit;
50
52
 
51
53
  &:hover {
52
54
  [data-fs-carousel-controls] {
53
- @include media(">=tablet") {
54
- opacity: 1;
55
+ @include utilities.media(">=tablet") {
55
56
  pointer-events: auto;
57
+ opacity: 1;
56
58
  }
57
59
  }
58
60
  }
59
61
 
60
- &[data-fs-carousel-variant='scroll'] [data-fs-carousel-item]{
62
+ &[data-fs-carousel-variant="scroll"] [data-fs-carousel-item] {
61
63
  flex-shrink: 0;
62
64
  }
63
65
 
@@ -71,13 +73,14 @@
71
73
  pointer-events: auto;
72
74
  opacity: 0;
73
75
 
74
- @include media(">notebook") {
76
+ @include utilities.media(">notebook") {
75
77
  width: calc(100% + 2 * var(--fs-control-tap-size) + 2 * var(--fs-spacing-4));
76
78
  }
77
79
  }
78
80
 
79
81
  [data-fs-carousel-control] {
80
82
  cursor: pointer;
83
+
81
84
  [data-fs-button-wrapper] {
82
85
  border-radius: var(--fs-carousel-controls-border-radius);
83
86
  box-shadow: var(--fs-carousel-controls-box-shadow);
@@ -98,7 +101,7 @@
98
101
  display: none;
99
102
  }
100
103
 
101
- @include media(">notebook") {
104
+ @include utilities.media(">notebook") {
102
105
  padding: var(--fs-carousel-padding-desktop);
103
106
  }
104
107
  }
@@ -111,39 +114,42 @@
111
114
 
112
115
  [data-fs-carousel-bullets] {
113
116
  position: relative;
114
- width: 100%;
115
- padding-top: var(--fs-carousel-bullets-padding-top);
116
117
  display: flex;
117
118
  flex-flow: row nowrap;
118
119
  column-gap: var(--fs-carousel-bullets-column-gap-mobile);
119
- padding-left: var(--fs-carousel-bullets-padding-left);
120
+ width: 100%;
121
+ padding-top: var(--fs-carousel-bullets-padding-top);
120
122
  padding-right: var(--fs-carousel-bullets-padding-right);
123
+ padding-left: var(--fs-carousel-bullets-padding-left);
121
124
 
122
- @include media(">tablet") {
123
- width: fit-content;
125
+ @include utilities.media(">tablet") {
126
+ column-gap: var(--fs-carousel-bullets-column-gap-tablet);
124
127
  align-items: center;
125
128
  justify-content: center;
129
+ width: fit-content;
126
130
  margin: auto;
127
- column-gap: var(--fs-carousel-bullets-column-gap-tablet);
128
131
  }
129
132
 
130
133
  [data-fs-carousel-bullet] {
131
- width: var(--fs-carousel-bullet-width-mobile);
132
134
  align-items: center;
133
135
  justify-content: center;
136
+ width: var(--fs-carousel-bullet-width-mobile);
137
+
134
138
  [data-fs-button-wrapper] {
135
- padding: 0;
136
139
  height: var(--fs-carousel-bullet-height-mobile);
140
+ padding: 0;
137
141
  background-color: var(--fs-carousel-bullet-bkg-color);
138
142
  border-color: transparent;
139
143
  border-radius: 0;
140
- @include media(">tablet") {
144
+
145
+ @include utilities.media(">tablet") {
141
146
  width: var(--fs-carousel-bullet-width-desktop);
142
147
  height: var(--fs-carousel-bullet-height-desktop);
143
148
  margin: 0;
144
149
  border-radius: var(--fs-carousel-bullet-border-radius);
145
150
  }
146
151
  }
152
+
147
153
  &[aria-selected="true"] [data-fs-button-wrapper] {
148
154
  background-color: var(--fs-carousel-bullet-bkg-color-selected);
149
155
  }
@@ -1,3 +1,5 @@
1
+ @use "../../../styles/base/utilities";
2
+
1
3
  [data-fs-cart-item] {
2
4
  // --------------------------------------------------------
3
5
  // Design Tokens for CartItem
@@ -65,7 +67,7 @@
65
67
  text-decoration: none;
66
68
  outline: none;
67
69
 
68
- @include truncate-title;
70
+ @include utilities.truncate-title;
69
71
  }
70
72
 
71
73
  [data-fs-cart-item-skus] {
@@ -3,21 +3,21 @@
3
3
  // Design Tokens for File Upload Card
4
4
  // --------------------------------------------------------
5
5
 
6
- --fs-file-upload-card-padding: var(--fs-spacing-3);
7
- --fs-file-upload-card-bkg-color: var(--fs-color-neutral-0);
8
- --fs-file-upload-card-border-width: var(--fs-border-width);
9
- --fs-file-upload-card-border-color: var(--fs-border-color-light);
10
- --fs-file-upload-card-border-radius: var(--fs-border-radius-medium);
11
- --fs-file-upload-card-dropzone-padding: var(--fs-spacing-3) var(--fs-spacing-4);
12
- --fs-file-upload-card-dropzone-border-width: var(--fs-border-width-thick);
13
- --fs-file-upload-card-dropzone-border-color: var(--fs-border-color-light);
6
+ --fs-file-upload-card-padding: var(--fs-spacing-3);
7
+ --fs-file-upload-card-bkg-color: var(--fs-color-neutral-0);
8
+ --fs-file-upload-card-border-width: var(--fs-border-width);
9
+ --fs-file-upload-card-border-color: var(--fs-border-color-light);
10
+ --fs-file-upload-card-border-radius: var(--fs-border-radius-medium);
11
+ --fs-file-upload-card-dropzone-padding: var(--fs-spacing-3) var(--fs-spacing-4);
12
+ --fs-file-upload-card-dropzone-border-width: var(--fs-border-width-thick);
13
+ --fs-file-upload-card-dropzone-border-color: var(--fs-border-color-light);
14
14
  --fs-file-upload-card-dropzone-border-radius: var(--fs-border-radius);
15
- --fs-file-upload-card-icon-size: 3rem;
16
- --fs-file-upload-card-badge-size: 1.5rem;
17
- --fs-file-upload-card-badge-bg-color: #0366dd;
18
- --fs-file-upload-card-shadow-color: #bfdbfe;
19
- --fs-file-upload-card-title-color: var(--fs-color-text);
20
- --fs-file-upload-card-link-color: var(--fs-color-link);
15
+ --fs-file-upload-card-icon-size: 3rem;
16
+ --fs-file-upload-card-badge-size: 1.5rem;
17
+ --fs-file-upload-card-badge-bg-color: #0366dd;
18
+ --fs-file-upload-card-shadow-color: #bfdbfe;
19
+ --fs-file-upload-card-title-color: var(--fs-color-text);
20
+ --fs-file-upload-card-link-color: var(--fs-color-link);
21
21
 
22
22
  // --------------------------------------------------------
23
23
  // Structural Styles