@faststore/ui 2.1.72 → 2.1.77
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/cjs/components/atoms/Incentive/Incentive.js +9 -0
- package/dist/cjs/components/atoms/Incentive/Incentive.js.map +1 -0
- package/dist/cjs/components/atoms/Incentive/index.js +9 -0
- package/dist/cjs/components/atoms/Incentive/index.js.map +1 -0
- package/dist/cjs/components/atoms/TextArea/TextArea.js +13 -0
- package/dist/cjs/components/atoms/TextArea/TextArea.js.map +1 -0
- package/dist/cjs/components/atoms/TextArea/index.js +9 -0
- package/dist/cjs/components/atoms/TextArea/index.js.map +1 -0
- package/dist/cjs/components/organisms/Tiles/Tile.js +9 -0
- package/dist/cjs/components/organisms/Tiles/Tile.js.map +1 -0
- package/dist/cjs/components/organisms/Tiles/Tiles.js +33 -0
- package/dist/cjs/components/organisms/Tiles/Tiles.js.map +1 -0
- package/dist/cjs/components/organisms/Tiles/index.js +11 -0
- package/dist/cjs/components/organisms/Tiles/index.js.map +1 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/typings/PolymorphicGenerics.js +9 -0
- package/dist/cjs/typings/PolymorphicGenerics.js.map +1 -0
- package/dist/cjs/typings/index.js +3 -0
- package/dist/{typings → cjs/typings}/index.js.map +1 -1
- package/dist/esm/components/atoms/Incentive/Incentive.d.ts +11 -0
- package/dist/esm/components/atoms/Incentive/Incentive.js.map +1 -0
- package/dist/esm/components/atoms/Incentive/index.d.ts +2 -0
- package/dist/esm/components/atoms/Incentive/index.js.map +1 -0
- package/dist/esm/components/atoms/TextArea/TextArea.d.ts +14 -0
- package/dist/esm/components/atoms/TextArea/TextArea.js.map +1 -0
- package/dist/esm/components/atoms/TextArea/index.d.ts +2 -0
- package/dist/esm/components/atoms/TextArea/index.js.map +1 -0
- package/dist/esm/components/organisms/Tiles/Tile.d.ts +11 -0
- package/dist/esm/components/organisms/Tiles/Tile.js.map +1 -0
- package/dist/esm/components/organisms/Tiles/Tiles.d.ts +11 -0
- package/dist/esm/components/organisms/Tiles/Tiles.js.map +1 -0
- package/dist/esm/components/organisms/Tiles/index.d.ts +4 -0
- package/dist/esm/components/organisms/Tiles/index.js.map +1 -0
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/typings/PolymorphicGenerics.d.ts +28 -0
- package/dist/esm/typings/PolymorphicGenerics.js.map +1 -0
- package/dist/esm/typings/index.d.ts +1 -0
- package/dist/esm/typings/index.js.map +1 -0
- package/package.json +21 -7
- package/dist/components/atoms/Incentive/Incentive.js.map +0 -1
- package/dist/components/atoms/Incentive/index.js.map +0 -1
- package/dist/components/atoms/TextArea/TextArea.js.map +0 -1
- package/dist/components/atoms/TextArea/index.js.map +0 -1
- package/dist/components/organisms/Tiles/Tile.js.map +0 -1
- package/dist/components/organisms/Tiles/Tiles.js.map +0 -1
- package/dist/components/organisms/Tiles/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/typings/PolymorphicGenerics.js.map +0 -1
- /package/dist/{components → cjs/components}/atoms/Incentive/Incentive.d.ts +0 -0
- /package/dist/{components → cjs/components}/atoms/Incentive/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/atoms/TextArea/TextArea.d.ts +0 -0
- /package/dist/{components → cjs/components}/atoms/TextArea/index.d.ts +0 -0
- /package/dist/{components → cjs/components}/organisms/Tiles/Tile.d.ts +0 -0
- /package/dist/{components → cjs/components}/organisms/Tiles/Tiles.d.ts +0 -0
- /package/dist/{components → cjs/components}/organisms/Tiles/index.d.ts +0 -0
- /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/{typings → cjs/typings}/PolymorphicGenerics.d.ts +0 -0
- /package/dist/{typings → cjs/typings}/index.d.ts +0 -0
- /package/dist/{components → esm/components}/atoms/Incentive/Incentive.js +0 -0
- /package/dist/{components → esm/components}/atoms/Incentive/index.js +0 -0
- /package/dist/{components → esm/components}/atoms/TextArea/TextArea.js +0 -0
- /package/dist/{components → esm/components}/atoms/TextArea/index.js +0 -0
- /package/dist/{components → esm/components}/organisms/Tiles/Tile.js +0 -0
- /package/dist/{components → esm/components}/organisms/Tiles/Tiles.js +0 -0
- /package/dist/{components → esm/components}/organisms/Tiles/index.js +0 -0
- /package/dist/{index.js → esm/index.js} +0 -0
- /package/dist/{typings → esm/typings}/PolymorphicGenerics.js +0 -0
- /package/dist/{typings → esm/typings}/index.js +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const Incentive = (0, react_1.forwardRef)(function Incentive({ testId = 'store-incentive', children, ...otherProps }, ref) {
|
|
6
|
+
return (react_1.default.createElement("div", { ref: ref, "data-fs-incentive": true, "data-testid": testId, ...otherProps }, children));
|
|
7
|
+
});
|
|
8
|
+
exports.default = Incentive;
|
|
9
|
+
//# sourceMappingURL=Incentive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Incentive.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Incentive/Incentive.tsx"],"names":[],"mappings":";;;AAAA,uDAAyC;AAWzC,MAAM,SAAS,GAAG,IAAA,kBAAU,EAAiC,SAAS,SAAS,CAC7E,EAAE,MAAM,GAAG,iBAAiB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACvD,GAAG;IAEH,OAAO,CACL,uCAAK,GAAG,EAAE,GAAG,4CAAiC,MAAM,KAAM,UAAU,IACjE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,kBAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var Incentive_1 = require("./Incentive");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Incentive_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Incentive/index.tsx"],"names":[],"mappings":";;;;;;AAAA,yCAAqC;AAA5B,qHAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const TextArea = (0, react_1.forwardRef)(function TextArea({ variant, testId = 'store-textarea', ...otherProps }, ref) {
|
|
6
|
+
const variants = {
|
|
7
|
+
'data-success': variant === 'success' || undefined,
|
|
8
|
+
'data-error': variant === 'error' || undefined,
|
|
9
|
+
};
|
|
10
|
+
return (react_1.default.createElement("textarea", { ref: ref, "data-fs-textarea": true, "data-testid": testId, ...variants, ...otherProps }));
|
|
11
|
+
});
|
|
12
|
+
exports.default = TextArea;
|
|
13
|
+
//# sourceMappingURL=TextArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":";;;AACA,uDAAyC;AAczC,MAAM,QAAQ,GAAG,IAAA,kBAAU,EACzB,SAAS,QAAQ,CACf,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,UAAU,EAAE,EACrD,GAAG;IAEH,MAAM,QAAQ,GAAG;QACf,cAAc,EAAE,OAAO,KAAK,SAAS,IAAI,SAAS;QAClD,YAAY,EAAE,OAAO,KAAK,OAAO,IAAI,SAAS;KAC/C,CAAA;IAED,OAAO,CACL,4CACE,GAAG,EAAE,GAAG,2CAEK,MAAM,KACf,QAAQ,KACR,UAAU,GACd,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,kBAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var TextArea_1 = require("./TextArea");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(TextArea_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/atoms/TextArea/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoC;AAA3B,oHAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const Tile = (0, react_1.forwardRef)(function Tile({ testId = 'store-tile', children, ...otherProps }, ref) {
|
|
6
|
+
return (react_1.default.createElement("li", { ref: ref, role: "listitem", "data-fs-tile": true, "data-testid": testId, ...otherProps }, children));
|
|
7
|
+
});
|
|
8
|
+
exports.default = Tile;
|
|
9
|
+
//# sourceMappingURL=Tile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../../../src/components/organisms/Tiles/Tile.tsx"],"names":[],"mappings":";;;AAAA,uDAAyC;AAWzC,MAAM,IAAI,GAAG,IAAA,kBAAU,EAA2B,SAAS,IAAI,CAC7D,EAAE,MAAM,GAAG,YAAY,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAClD,GAAG;IAEH,OAAO,CACL,sCACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,UAAU,uCAEF,MAAM,KACf,UAAU,IAEb,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,kBAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const _1 = require(".");
|
|
6
|
+
const MIN_CHILDREN = 2;
|
|
7
|
+
const MAX_CHILDREN = 4;
|
|
8
|
+
const NUMBER_ITEMS_TO_EXPAND_FIRST_TWO = 2;
|
|
9
|
+
const NUMBER_ITEMS_TO_EXPAND_FIRST = 3;
|
|
10
|
+
const Tiles = (0, react_1.forwardRef)(function Tiles({ testId = 'store-tiles', children, ...otherProps }, ref) {
|
|
11
|
+
const childrenCount = react_1.Children.count(children);
|
|
12
|
+
if (process.env.NODE_ENV === 'development') {
|
|
13
|
+
const isOutOfBounds = childrenCount < MIN_CHILDREN || childrenCount > MAX_CHILDREN;
|
|
14
|
+
if (isOutOfBounds) {
|
|
15
|
+
throw new Error(`Tiles cannot receive less than ${MIN_CHILDREN} or more than ${MAX_CHILDREN} children.`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (process.env.NODE_ENV === 'development') {
|
|
19
|
+
react_1.Children.forEach(children, (child) => {
|
|
20
|
+
if (child.type !== _1.Tile) {
|
|
21
|
+
throw new Error('Only Tile components allowed as children.');
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
const expandedClass = childrenCount === NUMBER_ITEMS_TO_EXPAND_FIRST
|
|
26
|
+
? 'expanded-first'
|
|
27
|
+
: childrenCount === NUMBER_ITEMS_TO_EXPAND_FIRST_TWO
|
|
28
|
+
? 'expanded-first-two'
|
|
29
|
+
: '';
|
|
30
|
+
return (react_1.default.createElement("ul", { ref: ref, role: "list", "data-fs-tiles": true, "data-fs-tiles-variant": expandedClass, "data-fs-content": "tiles", "data-testid": testId, ...otherProps }, children));
|
|
31
|
+
});
|
|
32
|
+
exports.default = Tiles;
|
|
33
|
+
//# sourceMappingURL=Tiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tiles.js","sourceRoot":"","sources":["../../../../../src/components/organisms/Tiles/Tiles.tsx"],"names":[],"mappings":";;;AAAA,uDAAmD;AAGnD,wBAAwB;AAUxB,MAAM,YAAY,GAAG,CAAC,CAAA;AACtB,MAAM,YAAY,GAAG,CAAC,CAAA;AACtB,MAAM,gCAAgC,GAAG,CAAC,CAAA;AAC1C,MAAM,4BAA4B,GAAG,CAAC,CAAA;AAEtC,MAAM,KAAK,GAAG,IAAA,kBAAU,EAA+B,SAAS,KAAK,CACnE,EAAE,MAAM,GAAG,aAAa,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACnD,GAAG;IAEH,MAAM,aAAa,GAAG,gBAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAE9C,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QAC1C,MAAM,aAAa,GACjB,aAAa,GAAG,YAAY,IAAI,aAAa,GAAG,YAAY,CAAA;QAE9D,IAAI,aAAa,EAAE;YACjB,MAAM,IAAI,KAAK,CACb,kCAAkC,YAAY,iBAAiB,YAAY,YAAY,CACxF,CAAA;SACF;KACF;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QAC1C,gBAAQ,CAAC,OAAO,CAAC,QAAwB,EAAE,CAAC,KAAK,EAAE,EAAE;YACnD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAI,EAAE;gBACvB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;aAC7D;QACH,CAAC,CAAC,CAAA;KACH;IAED,MAAM,aAAa,GACjB,aAAa,KAAK,4BAA4B;QAC5C,CAAC,CAAC,gBAAgB;QAClB,CAAC,CAAC,aAAa,KAAK,gCAAgC;YACpD,CAAC,CAAC,oBAAoB;YACtB,CAAC,CAAC,EAAE,CAAA;IAER,OAAO,CACL,sCACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,MAAM,kDAEY,aAAa,qBACpB,OAAO,iBACV,MAAM,KACf,UAAU,IAEb,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,kBAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Tile = exports.Tiles = void 0;
|
|
7
|
+
var Tiles_1 = require("./Tiles");
|
|
8
|
+
Object.defineProperty(exports, "Tiles", { enumerable: true, get: function () { return __importDefault(Tiles_1).default; } });
|
|
9
|
+
var Tile_1 = require("./Tile");
|
|
10
|
+
Object.defineProperty(exports, "Tile", { enumerable: true, get: function () { return __importDefault(Tile_1).default; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/organisms/Tiles/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAA0C;AAAjC,+GAAA,OAAO,OAAS;AAGzB,+BAAwC;AAA/B,6GAAA,OAAO,OAAQ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Tiles = exports.Tile = exports.Incentive = exports.TextArea = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("@faststore/components"), exports);
|
|
6
|
+
// Atoms
|
|
7
|
+
var TextArea_1 = require("./components/atoms/TextArea");
|
|
8
|
+
Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return tslib_1.__importDefault(TextArea_1).default; } });
|
|
9
|
+
var Incentive_1 = require("./components/atoms/Incentive");
|
|
10
|
+
Object.defineProperty(exports, "Incentive", { enumerable: true, get: function () { return tslib_1.__importDefault(Incentive_1).default; } });
|
|
11
|
+
// Organisms
|
|
12
|
+
var Tiles_1 = require("./components/organisms/Tiles");
|
|
13
|
+
Object.defineProperty(exports, "Tile", { enumerable: true, get: function () { return Tiles_1.Tile; } });
|
|
14
|
+
Object.defineProperty(exports, "Tiles", { enumerable: true, get: function () { return Tiles_1.Tiles; } });
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,gEAAqC;AAErC,QAAQ;AACR,wDAAiE;AAAxD,6HAAA,OAAO,OAAY;AAG5B,0DAAmE;AAA1D,+HAAA,OAAO,OAAa;AAG7B,YAAY;AACZ,sDAA0D;AAAjD,6FAAA,IAAI,OAAA;AAAE,8FAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* These were heavily inspired by "Forwarding refs for a polymorphic React
|
|
4
|
+
* component in TypeScript", written by Ben Ilegbodu.
|
|
5
|
+
*
|
|
6
|
+
* Article link: https://www.benmvp.com/blog/forwarding-refs-polymorphic-react-component-typescript/
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
//# sourceMappingURL=PolymorphicGenerics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolymorphicGenerics.js","sourceRoot":"","sources":["../../../src/typings/PolymorphicGenerics.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/typings/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface IncentiveProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress,
|
|
6
|
+
* testing-library, and jest).
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Incentive: React.ForwardRefExoticComponent<IncentiveProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default Incentive;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Incentive.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Incentive/Incentive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,SAAS,GAAG,UAAU,CAAiC,SAAS,SAAS,CAC7E,EAAE,MAAM,GAAG,iBAAiB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACvD,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,4CAAiC,MAAM,KAAM,UAAU,IACjE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Incentive/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {
|
|
4
|
+
/**
|
|
5
|
+
* Current variant of the input.
|
|
6
|
+
*/
|
|
7
|
+
variant?: 'success' | 'error';
|
|
8
|
+
/**
|
|
9
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
10
|
+
*/
|
|
11
|
+
testId?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
14
|
+
export default TextArea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAczC,MAAM,QAAQ,GAAG,UAAU,CACzB,SAAS,QAAQ,CACf,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,UAAU,EAAE,EACrD,GAAG;IAEH,MAAM,QAAQ,GAAG;QACf,cAAc,EAAE,OAAO,KAAK,SAAS,IAAI,SAAS;QAClD,YAAY,EAAE,OAAO,KAAK,OAAO,IAAI,SAAS;KAC/C,CAAA;IAED,OAAO,CACL,kCACE,GAAG,EAAE,GAAG,2CAEK,MAAM,KACf,QAAQ,KACR,UAAU,GACd,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/atoms/TextArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface TileProps extends HTMLAttributes<HTMLLIElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: Cypress,
|
|
6
|
+
* Testing Library, and Jest).
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Tile: React.ForwardRefExoticComponent<TileProps & React.RefAttributes<HTMLLIElement>>;
|
|
11
|
+
export default Tile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../../../src/components/organisms/Tiles/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,IAAI,GAAG,UAAU,CAA2B,SAAS,IAAI,CAC7D,EAAE,MAAM,GAAG,YAAY,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAClD,GAAG;IAEH,OAAO,CACL,4BACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,UAAU,uCAEF,MAAM,KACf,UAAU,IAEb,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface TilesProps extends HTMLAttributes<HTMLUListElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: Cypress,
|
|
6
|
+
* Testing Library, and Jest).
|
|
7
|
+
*/
|
|
8
|
+
testId?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Tiles: React.ForwardRefExoticComponent<TilesProps & React.RefAttributes<HTMLUListElement>>;
|
|
11
|
+
export default Tiles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tiles.js","sourceRoot":"","sources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,GAAG,EACR,IAAI,EAAC,MAAM,kDAEY,aAAa,qBACpB,OAAO,iBACV,MAAM,KACf,UAAU,IAEb,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/organisms/Tiles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAG1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from '@faststore/components';
|
|
2
|
+
export { default as TextArea } from './components/atoms/TextArea';
|
|
3
|
+
export type { TextAreaProps } from './components/atoms/TextArea';
|
|
4
|
+
export { default as Incentive } from './components/atoms/Incentive';
|
|
5
|
+
export type { IncentiveProps } from './components/atoms/Incentive';
|
|
6
|
+
export { Tile, Tiles } from './components/organisms/Tiles';
|
|
7
|
+
export type { TilesProps, TileProps } from './components/organisms/Tiles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AAErC,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These were heavily inspired by "Forwarding refs for a polymorphic React
|
|
3
|
+
* component in TypeScript", written by Ben Ilegbodu.
|
|
4
|
+
*
|
|
5
|
+
* Article link: https://www.benmvp.com/blog/forwarding-refs-polymorphic-react-component-typescript/
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType } from 'react';
|
|
8
|
+
type AsProp<C extends ElementType> = {
|
|
9
|
+
as?: C;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Allows for extending a set of props (`ExtendedProps`) by an overriding set of props
|
|
13
|
+
* (`OverrideProps`), ensuring that any duplicates are overridden by the overriding
|
|
14
|
+
* set of props.
|
|
15
|
+
*/
|
|
16
|
+
type ExtendableProps<ExtendedProps = Record<string, never>, OverrideProps = Record<string, never>> = OverrideProps & Omit<ExtendedProps, keyof OverrideProps>;
|
|
17
|
+
/**
|
|
18
|
+
* Allows for inheriting the props from the specified element type so that
|
|
19
|
+
* props like children, className & style work, as well as element-specific
|
|
20
|
+
* attributes like aria roles. The component (`C`) must be passed in.
|
|
21
|
+
*/
|
|
22
|
+
type InheritableElementProps<C extends ElementType, Props = Record<string, never>> = ExtendableProps<ComponentPropsWithoutRef<C>, Props>;
|
|
23
|
+
export type PolymorphicComponentProps<C extends ElementType, Props = Record<string, never>> = InheritableElementProps<C, Props & AsProp<C>>;
|
|
24
|
+
export type PolymorphicComponentPropsWithRef<C extends ElementType, P = Record<string, never>> = PolymorphicComponentProps<C, P> & {
|
|
25
|
+
ref?: ComponentPropsWithRef<C>['ref'];
|
|
26
|
+
};
|
|
27
|
+
export type PolymorphicRef<C extends ElementType> = PolymorphicComponentPropsWithRef<C>['ref'];
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolymorphicGenerics.js","sourceRoot":"","sources":["../../../src/typings/PolymorphicGenerics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { PolymorphicComponentProps, PolymorphicComponentPropsWithRef, PolymorphicRef, } from './PolymorphicGenerics';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/typings/index.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.77",
|
|
4
4
|
"description": "A lightweight, framework agnostic component library for React",
|
|
5
5
|
"author": "emersonlaurentino",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,8 +10,18 @@
|
|
|
10
10
|
"directory": "packages/ui"
|
|
11
11
|
},
|
|
12
12
|
"browserslist": "supports es6-module and not dead and last 2 version",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"main": "dist/cjs/index.js",
|
|
14
|
+
"module": "dist/esm/index.js",
|
|
15
|
+
"typings": "dist/esm/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
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"
|
|
22
|
+
},
|
|
23
|
+
"./src/*": "./src/*"
|
|
24
|
+
},
|
|
15
25
|
"sideEffects": false,
|
|
16
26
|
"engines": {
|
|
17
27
|
"node": ">=10"
|
|
@@ -22,19 +32,23 @@
|
|
|
22
32
|
],
|
|
23
33
|
"scripts": {
|
|
24
34
|
"dev": "tsc --watch",
|
|
25
|
-
"build": "tsc",
|
|
35
|
+
"build": "tsc --module commonjs --outDir dist/cjs & tsc --module esnext --outDir dist/esm",
|
|
26
36
|
"lint": "eslint src/**/*.{ts,tsx}",
|
|
27
37
|
"size": "size-limit",
|
|
28
38
|
"analyze": "size-limit --why"
|
|
29
39
|
},
|
|
30
40
|
"size-limit": [
|
|
31
41
|
{
|
|
32
|
-
"path": "dist/index.js",
|
|
42
|
+
"path": "dist/cjs/index.js",
|
|
43
|
+
"limit": "40 KB"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "dist/esm/index.js",
|
|
33
47
|
"limit": "40 KB"
|
|
34
48
|
}
|
|
35
49
|
],
|
|
36
50
|
"dependencies": {
|
|
37
|
-
"@faststore/components": "^2.1.
|
|
51
|
+
"@faststore/components": "^2.1.77",
|
|
38
52
|
"include-media": "^1.4.10",
|
|
39
53
|
"modern-normalize": "^1.1.0",
|
|
40
54
|
"react-swipeable": "^7.0.0",
|
|
@@ -58,5 +72,5 @@
|
|
|
58
72
|
"node": "16.18.0",
|
|
59
73
|
"yarn": "1.19.1"
|
|
60
74
|
},
|
|
61
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "e0e12e579c7f581162cca65d18028fe50324a85a"
|
|
62
76
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Incentive.js","sourceRoot":"","sources":["../../../../src/components/atoms/Incentive/Incentive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,SAAS,GAAG,UAAU,CAAiC,SAAS,SAAS,CAC7E,EAAE,MAAM,GAAG,iBAAiB,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EACvD,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,4CAAiC,MAAM,KAAM,UAAU,IACjE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,SAAS,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/atoms/Incentive/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAczC,MAAM,QAAQ,GAAG,UAAU,CACzB,SAAS,QAAQ,CACf,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,UAAU,EAAE,EACrD,GAAG;IAEH,MAAM,QAAQ,GAAG;QACf,cAAc,EAAE,OAAO,KAAK,SAAS,IAAI,SAAS;QAClD,YAAY,EAAE,OAAO,KAAK,OAAO,IAAI,SAAS;KAC/C,CAAA;IAED,OAAO,CACL,kCACE,GAAG,EAAE,GAAG,2CAEK,MAAM,KACf,QAAQ,KACR,UAAU,GACd,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/atoms/TextArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,IAAI,GAAG,UAAU,CAA2B,SAAS,IAAI,CAC7D,EAAE,MAAM,GAAG,YAAY,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAClD,GAAG;IAEH,OAAO,CACL,4BACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,UAAU,uCAEF,MAAM,KACf,UAAU,IAEb,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,IAAI,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tiles.js","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/Tiles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGnD,OAAO,EA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AAe,KAAK,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAG1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AAErC,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PolymorphicGenerics.js","sourceRoot":"","sources":["../../src/typings/PolymorphicGenerics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|