react-restyle-components 0.1.44 → 0.1.46
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/lib/cjs/core-components/atoms/icons/icons.component.js +40 -9
- package/lib/cjs/core-components/atoms/icons/icons.component.js.map +1 -1
- package/lib/cjs/core-components/atoms/icons/icons.stories.js +23 -0
- package/lib/cjs/core-components/atoms/icons/icons.stories.js.map +1 -0
- package/lib/cjs/core-components/atoms/icons/icons.test.js +16 -0
- package/lib/cjs/core-components/atoms/icons/icons.test.js.map +1 -0
- package/lib/cjs/core-components/atoms/stepper/stepper.test.js +1 -1
- package/lib/cjs/core-components/atoms/stepper/stepper.test.js.map +1 -1
- package/lib/cjs/core-components/atoms/tabs/tabs.component.js +46 -0
- package/lib/cjs/core-components/atoms/tabs/tabs.component.js.map +1 -0
- package/lib/cjs/core-components/atoms/tabs/tabs.stories.js +26 -0
- package/lib/cjs/core-components/atoms/tabs/tabs.stories.js.map +1 -0
- package/lib/cjs/core-components/atoms/tabs/tabs.test.js +19 -0
- package/lib/cjs/core-components/atoms/tabs/tabs.test.js.map +1 -0
- package/lib/cjs/core-components/index.js +1 -0
- package/lib/cjs/core-components/index.js.map +1 -1
- package/lib/cjs/library/assets/svg/DownArrow.svg +14 -0
- package/lib/cjs/library/assets/svg/UpArrow.svg +14 -0
- package/lib/cjs/library/assets/svg/checkedBox.svg +14 -0
- package/lib/cjs/library/assets/svg/checkedRadio.svg +13 -0
- package/lib/cjs/library/assets/svg/datePicker.svg +3 -0
- package/lib/cjs/library/assets/svg/index.ts +38 -0
- package/lib/cjs/library/assets/svg/timer copy.svg +3 -0
- package/lib/cjs/library/assets/svg/timer.svg +3 -0
- package/lib/cjs/library/assets/svg/unCheckbox.svg +3 -0
- package/lib/cjs/library/assets/svg/uncheckRadio.svg +3 -0
- package/lib/esm/core-components/atoms/icons/icons.component.js +17 -9
- package/lib/esm/core-components/atoms/icons/icons.component.js.map +1 -1
- package/lib/esm/core-components/atoms/icons/icons.stories.js +20 -0
- package/lib/esm/core-components/atoms/icons/icons.stories.js.map +1 -0
- package/lib/esm/core-components/atoms/icons/icons.test.js +11 -0
- package/lib/esm/core-components/atoms/icons/icons.test.js.map +1 -0
- package/lib/esm/core-components/atoms/stepper/stepper.test.js +1 -1
- package/lib/esm/core-components/atoms/stepper/stepper.test.js.map +1 -1
- package/lib/esm/core-components/atoms/tabs/tabs.component.js +19 -0
- package/lib/esm/core-components/atoms/tabs/tabs.component.js.map +1 -0
- package/lib/esm/core-components/atoms/tabs/tabs.stories.js +23 -0
- package/lib/esm/core-components/atoms/tabs/tabs.stories.js.map +1 -0
- package/lib/esm/core-components/atoms/tabs/tabs.test.js +14 -0
- package/lib/esm/core-components/atoms/tabs/tabs.test.js.map +1 -0
- package/lib/esm/core-components/index.js +1 -0
- package/lib/esm/core-components/index.js.map +1 -1
- package/lib/package.json +125 -0
- package/package.json +5 -2
|
@@ -1,10 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.Icon = void 0;
|
|
7
|
-
const react_1 =
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
32
|
+
const __1 = require("../..");
|
|
33
|
+
const component_1 = __importDefault(require("@loadable/component"));
|
|
34
|
+
let lib = 'md';
|
|
8
35
|
const Icon = ({ nameIcon, propsIcon, tooltip = '', isDisable = false, onClick, }) => {
|
|
9
36
|
try {
|
|
10
37
|
const iconProps = Object.assign(Object.assign({}, propsIcon), { color: isDisable ? '#808080' : (propsIcon === null || propsIcon === void 0 ? void 0 : propsIcon.color) || '#ffffff' });
|
|
@@ -12,17 +39,21 @@ const Icon = ({ nameIcon, propsIcon, tooltip = '', isDisable = false, onClick, }
|
|
|
12
39
|
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
13
40
|
.split(' ')[0]
|
|
14
41
|
.toLocaleLowerCase();
|
|
15
|
-
// const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//
|
|
21
|
-
// )
|
|
42
|
+
// const fullLib = `react-icons/${lib}/index.js`;
|
|
43
|
+
const fullLib = `react-icons/md/index.js`;
|
|
44
|
+
let ElementIcon = (0, component_1.default)(() => { var _a; return _a = fullLib, Promise.resolve().then(() => __importStar(require(_a))); }, {
|
|
45
|
+
resolveComponent: (el) => el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
|
|
46
|
+
});
|
|
47
|
+
// ElementIcon = loadable(() => import(`react-icons/${lib}`), {
|
|
48
|
+
// resolveComponent: (el) =>
|
|
49
|
+
// el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
|
|
50
|
+
// });
|
|
22
51
|
return (react_1.default.createElement("div", { onClick: () => {
|
|
23
52
|
if (!isDisable)
|
|
24
53
|
onClick && onClick();
|
|
25
|
-
} })
|
|
54
|
+
} }, !lodash_1.default.isEmpty(tooltip) ? (react_1.default.createElement(__1.Tooltip, { tooltipText: tooltip },
|
|
55
|
+
react_1.default.createElement(ElementIcon, Object.assign({}, iconProps)))) : (react_1.default.createElement(react_1.Suspense, { fallback: react_1.default.createElement("div", null, "Loading...") },
|
|
56
|
+
react_1.default.createElement(ElementIcon, Object.assign({}, iconProps))))));
|
|
26
57
|
}
|
|
27
58
|
catch (error) {
|
|
28
59
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"icons.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsC;AACtC,oDAAuB;AACvB,6BAA8B;AAC9B,oEAA2C;AAW3C,IAAI,GAAG,GAAG,IAAI,CAAC;AACR,MAAM,IAAI,GAAG,CAAC,EACnB,QAAQ,EACR,SAAS,EACT,OAAO,GAAG,EAAE,EACZ,SAAS,GAAG,KAAK,EACjB,OAAO,GACG,EAAe,EAAE;IAC3B,IAAI;QACF,MAAM,SAAS,mCACV,SAAS,KACZ,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,KAAI,SAAS,GAC7D,CAAC;QACF,MAAM,GAAG,GAAG,QAAQ;aACjB,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;aACtC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;aACb,iBAAiB,EAAE,CAAC;QACvB,iDAAiD;QACjD,MAAM,OAAO,GAAG,yBAAyB,CAAC;QAE1C,IAAI,WAAW,GAAQ,IAAA,mBAAQ,EAAC,GAAG,EAAE,uBAAQ,OAAO,4DAAC,EAAE;YACrD,gBAAgB,EAAE,CAAC,EAAE,EAAE,EAAE,CACvB,EAAE,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SACvE,CAAC,CAAC;QACH,+DAA+D;QAC/D,8BAA8B;QAC9B,4EAA4E;QAC5E,MAAM;QAEN,OAAO,CACL,uCACE,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,CAAC,SAAS;oBAAE,OAAO,IAAI,OAAO,EAAE,CAAC;YACvC,CAAC,IAEA,CAAC,gBAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACrB,8BAAC,WAAO,IAAC,WAAW,EAAE,OAAO;YAC3B,8BAAC,WAAW,oBAAK,SAAS,EAAI,CACtB,CACX,CAAC,CAAC,CAAC,CACF,8BAAC,gBAAQ,IAAC,QAAQ,EAAE,wDAAqB;YACvC,8BAAC,WAAW,oBAAK,SAAS,EAAI,CACrB,CACZ,CACG,CACP,CAAC;KACH;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,6DAAK,CAAC;KACd;AACH,CAAC,CAAC;AAhDW,QAAA,IAAI,QAgDf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Primary = void 0;
|
|
4
|
+
const icons_component_1 = require("./icons.component");
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Design System/Atoms/Icon',
|
|
7
|
+
component: icons_component_1.Icon,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
componentSubtitle: `import { Icon } from 'react-restyle-components'`,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
exports.default = meta;
|
|
14
|
+
exports.Primary = {
|
|
15
|
+
args: {
|
|
16
|
+
nameIcon: 'FaHistory',
|
|
17
|
+
propsIcon: {
|
|
18
|
+
color: '#000000',
|
|
19
|
+
size: 24,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=icons.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.stories.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.stories.tsx"],"names":[],"mappings":";;;AAEA,uDAAuC;AAEvC,MAAM,IAAI,GAAsB;IAC9B,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,sBAAI;IACf,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,iBAAiB,EAAE,iDAAiD;KACrE;CACF,CAAC;AACF,kBAAe,IAAI,CAAC;AAGP,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,QAAQ,EAAE,WAAW;QACrB,SAAS,EAAE;YACT,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,EAAE;SACT;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const _core_utils_1 = require("@core-utils");
|
|
8
|
+
const icons_component_1 = require("./icons.component");
|
|
9
|
+
it('render Icon correctly', () => {
|
|
10
|
+
const icon = (0, _core_utils_1.render)(react_1.default.createElement(icons_component_1.Icon, { nameIcon: "FaHistory", propsIcon: {
|
|
11
|
+
color: '#000000',
|
|
12
|
+
size: 24,
|
|
13
|
+
} }));
|
|
14
|
+
expect(icon).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=icons.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.test.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,6CAAmC;AACnC,uDAAuC;AACvC,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;IAC/B,MAAM,IAAI,GAAG,IAAA,oBAAM,EACjB,8BAAC,sBAAI,IACH,QAAQ,EAAC,WAAW,EACpB,SAAS,EAAE;YACT,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,EAAE;SACT,GACD,CACH,CAAC;IACF,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const _core_utils_1 = require("@core-utils");
|
|
8
8
|
const stepper_component_1 = require("./stepper.component");
|
|
9
|
-
it('
|
|
9
|
+
it('render Stepper correctly', () => {
|
|
10
10
|
const stepper = (0, _core_utils_1.render)(react_1.default.createElement(stepper_component_1.Stepper, { steps: ['1', '2', '3', '4'], currentStep: 3, onStepClick: () => jest.fn(), className: "mt-4" }));
|
|
11
11
|
expect(stepper).toMatchSnapshot();
|
|
12
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.test.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/stepper/stepper.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,6CAAmC;AACnC,2DAA4C;AAC5C,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"stepper.test.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/stepper/stepper.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,6CAAmC;AACnC,2DAA4C;AAC5C,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;IAClC,MAAM,OAAO,GAAG,IAAA,oBAAM,EACpB,8BAAC,2BAAO,IACN,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAC3B,WAAW,EAAE,CAAC,EACd,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAC5B,SAAS,EAAC,MAAM,GAChB,CACH,CAAC;IACF,MAAM,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,CAAC;AACpC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Tabs = void 0;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const __1 = require("../..");
|
|
29
|
+
const Tabs = ({ options, onSelect }) => {
|
|
30
|
+
const [selected, setSelected] = (0, react_1.useState)(options[0].title);
|
|
31
|
+
return (react_1.default.createElement("div", { className: "flex justify-center" },
|
|
32
|
+
react_1.default.createElement("ul", { className: "flex flex-wrap items-center justify-center -mb-px text-sm font-medium text-center text-black cursor-pointer gap-2" }, options === null || options === void 0 ? void 0 : options.map((item, index) => (react_1.default.createElement("li", { key: index, className: "bg-[#EF4444] rounded-md" },
|
|
33
|
+
react_1.default.createElement("div", { className: `inline-flex items-center justify-center p-3 border-b-2 gap-1 ${item.title == selected
|
|
34
|
+
? 'text-white font-bold md:text-md border-primary active'
|
|
35
|
+
: ' text-gray-200 md:text-md border-transparent'}`, onClick: () => {
|
|
36
|
+
setSelected(item.title);
|
|
37
|
+
onSelect(item.title);
|
|
38
|
+
} },
|
|
39
|
+
react_1.default.createElement(__1.Icon, { nameIcon: item.icon, propsIcon: {
|
|
40
|
+
color: item.title == selected ? '#ffffff' : '#000000',
|
|
41
|
+
size: 24,
|
|
42
|
+
} }),
|
|
43
|
+
item.title)))))));
|
|
44
|
+
};
|
|
45
|
+
exports.Tabs = Tabs;
|
|
46
|
+
//# sourceMappingURL=tabs.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/tabs/tabs.component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsC;AACtC,6BAA2B;AAOpB,MAAM,IAAI,GAAG,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAY,EAAE,EAAE;IACrD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC3D,OAAO,CACL,uCAAK,SAAS,EAAC,qBAAqB;QAClC,sCAAI,SAAS,EAAC,mHAAmH,IAC9H,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7B,sCAAI,GAAG,EAAE,KAAK,EAAE,SAAS,EAAC,yBAAyB;YACjD,uCACE,SAAS,EAAE,gEACT,IAAI,CAAC,KAAK,IAAI,QAAQ;oBACpB,CAAC,CAAC,wDAAwD;oBAC1D,CAAC,CAAC,+CACN,EAAE,EACF,OAAO,EAAE,GAAG,EAAE;oBACZ,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBACxB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,CAAC;gBAED,8BAAC,QAAI,IACH,QAAQ,EAAE,IAAI,CAAC,IAAI,EACnB,SAAS,EAAE;wBACT,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;wBACrD,IAAI,EAAE,EAAE;qBACT,GACD;gBACD,IAAI,CAAC,KAAK,CACP,CACH,CACN,CAAC,CACC,CACD,CACP,CAAC;AACJ,CAAC,CAAC;AAhCW,QAAA,IAAI,QAgCf"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Primary = void 0;
|
|
4
|
+
const tabs_component_1 = require("./tabs.component");
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Design System/Atoms/Tabs',
|
|
7
|
+
component: tabs_component_1.Tabs,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
componentSubtitle: `import { Tabs } from 'react-restyle-components'`,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
exports.default = meta;
|
|
14
|
+
exports.Primary = {
|
|
15
|
+
args: {
|
|
16
|
+
options: [
|
|
17
|
+
// {title: 'Work History', icon: 'FaHistory'},
|
|
18
|
+
// {title: 'Book Order', icon: 'FaBook'},
|
|
19
|
+
{ title: 'Make Frame', icon: 'MdFilterFrames' },
|
|
20
|
+
],
|
|
21
|
+
onSelect: (item) => {
|
|
22
|
+
console.log({ item });
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=tabs.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.stories.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/tabs/tabs.stories.tsx"],"names":[],"mappings":";;;AAEA,qDAAsC;AAKtC,MAAM,IAAI,GAAsB;IAC9B,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,qBAAI;IACf,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,iBAAiB,EAAE,iDAAiD;KACrE;CACF,CAAC;AACF,kBAAe,IAAI,CAAC;AAGP,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAC;YACN,8CAA8C;YAC9C,yCAAyC;YACzC,EAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAC;SAC9C;QACD,QAAQ,EAAC,CAAC,IAAI,EAAE,EAAE;YAChB,OAAO,CAAC,GAAG,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC;QAEtB,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const _core_utils_1 = require("@core-utils");
|
|
8
|
+
const tabs_component_1 = require("./tabs.component");
|
|
9
|
+
it('render Tabs correctly', () => {
|
|
10
|
+
const tabs = (0, _core_utils_1.render)(react_1.default.createElement(tabs_component_1.Tabs, { options: [
|
|
11
|
+
{ title: 'Work History', icon: 'FaHistory' },
|
|
12
|
+
{ title: 'Book Order', icon: 'FaBook' },
|
|
13
|
+
{ title: 'Make Frame', icon: 'MdFilterFrames' },
|
|
14
|
+
], onSelect: (item) => {
|
|
15
|
+
console.log({ item });
|
|
16
|
+
} }));
|
|
17
|
+
expect(tabs).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=tabs.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.test.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/tabs/tabs.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,6CAAmC;AACnC,qDAAsC;AACtC,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;IAC/B,MAAM,IAAI,GAAG,IAAA,oBAAM,EACjB,8BAAC,qBAAI,IACL,OAAO,EAAE;YACP,EAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAC;YAC1C,EAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAC;YACrC,EAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAC;SAC9C,EACD,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;YACjB,OAAO,CAAC,GAAG,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC;QAEtB,CAAC,GACC,CACH,CAAC;IACF,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
|
|
@@ -42,6 +42,7 @@ __exportStar(require("./atoms/stepper/stepper.component"), exports);
|
|
|
42
42
|
__exportStar(require("./atoms/timer/timer.component"), exports);
|
|
43
43
|
__exportStar(require("./atoms/tooltip/tooltip.component"), exports);
|
|
44
44
|
__exportStar(require("./atoms/icons/icons.component"), exports);
|
|
45
|
+
__exportStar(require("./atoms/tabs/tabs.component"), exports);
|
|
45
46
|
__exportStar(require("./molecules/css-multiline-input/css-multiline-input.component"), exports);
|
|
46
47
|
__exportStar(require("./molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component"), exports);
|
|
47
48
|
__exportStar(require("./molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core-components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core-components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AAoB5C,oBAAI;AAnBZ,oEAAkD;AAClD,uEAAqD;AACrD,4EAA0D;AAC1D,oEAAkD;AAClD,oEAAkD;AAClD,gEAA8C;AAC9C,kFAAgE;AAChE,kEAAgD;AAChD,gEAA8C;AAC9C,oEAAkD;AAClD,gEAA8C;AAC9C,oEAAkD;AAClD,gEAA8C;AAC9C,8DAA4C;AAE5C,gGAA8E;AAC9E,kLAAgK;AAChK,8KAA4J"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
className="ml-2 w-4 h-4 absolute right-0"
|
|
3
|
+
fill="none"
|
|
4
|
+
stroke="#E7503E"
|
|
5
|
+
viewBox="0 -6 20 20"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
>
|
|
8
|
+
<path
|
|
9
|
+
strokeLinecap="round"
|
|
10
|
+
strokeLinejoin="round"
|
|
11
|
+
strokeWidth="2"
|
|
12
|
+
d="M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
className="ml-2 w-4 h-4 absolute right-0"
|
|
3
|
+
fill="none"
|
|
4
|
+
stroke="#E7503E"
|
|
5
|
+
viewBox="0 -6 20 20"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
>
|
|
8
|
+
<path
|
|
9
|
+
strokeLinecap="round"
|
|
10
|
+
strokeLinejoin="round"
|
|
11
|
+
strokeWidth="2"
|
|
12
|
+
d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" >
|
|
2
|
+
<rect width="15" height="15" fill="#E5E5E5"/>
|
|
3
|
+
<g clip-path="url(#clip0_0_1)">
|
|
4
|
+
<rect width="360" height="640" transform="translate(-20 -399)" fill="white"/>
|
|
5
|
+
<rect x="0.5" y="0.5" width="14" height="14" rx="1.5" fill="white" />
|
|
6
|
+
<rect x="0.5" y="0.5" width="14" height="14" rx="1.5" />
|
|
7
|
+
<path d="M4 7.33333L6.33333 10L11.6667 5" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
</g>
|
|
9
|
+
<defs>
|
|
10
|
+
<clipPath id="clip0_0_1">
|
|
11
|
+
<rect width="360" height="640" fill="white" transform="translate(-20 -399)"/>
|
|
12
|
+
</clipPath>
|
|
13
|
+
</defs>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" >
|
|
2
|
+
<rect width="20" height="20" fill="#E5E5E5"/>
|
|
3
|
+
<g clip-path="url(#clip0_0_1)">
|
|
4
|
+
<rect width="360" height="2645" transform="translate(-253 -1410)" fill="white"/>
|
|
5
|
+
<circle cx="10" cy="10" r="9.5" stroke="#E7503D"/>
|
|
6
|
+
<circle cx="10" cy="10" r="6" fill="#E7503D"/>
|
|
7
|
+
</g>
|
|
8
|
+
<defs>
|
|
9
|
+
<clipPath id="clip0_0_1">
|
|
10
|
+
<rect width="360" height="2645" fill="white" transform="translate(-253 -1410)"/>
|
|
11
|
+
</clipPath>
|
|
12
|
+
</defs>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M14.4 1.2H11.4V0.3C11.4 0.220435 11.3684 0.144129 11.3121 0.087868C11.2559 0.0316071 11.1796 0 11.1 0C11.0204 0 10.9441 0.0316071 10.8879 0.087868C10.8316 0.144129 10.8 0.220435 10.8 0.3V1.2H4.2V0.3C4.2 0.220435 4.16839 0.144129 4.11213 0.087868C4.05587 0.0316071 3.97957 0 3.9 0C3.82044 0 3.74413 0.0316071 3.68787 0.087868C3.63161 0.144129 3.6 0.220435 3.6 0.3V1.2H0.6C0.44087 1.2 0.288258 1.26321 0.175736 1.37574C0.0632141 1.48826 0 1.64087 0 1.8L0 13.8C0 13.9591 0.0632141 14.1117 0.175736 14.2243C0.288258 14.3368 0.44087 14.4 0.6 14.4H14.4C14.5591 14.4 14.7117 14.3368 14.8243 14.2243C14.9368 14.1117 15 13.9591 15 13.8V1.8C15 1.64087 14.9368 1.48826 14.8243 1.37574C14.7117 1.26321 14.5591 1.2 14.4 1.2ZM14.4 13.8H0.6V4.8H14.4V13.8ZM14.4 4.2H0.6V1.8H14.4V4.2Z" fill="#E7503D" stroke="#E7503D" stroke-width="0.5"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import UnCheckbox from '../../../library/assets/svg/unCheckbox.svg';
|
|
2
|
+
import CheckedBox from '../../../library/assets/svg/checkedBox.svg';
|
|
3
|
+
import DatePickerSvg from '../../../library/assets/svg/datePicker.svg';
|
|
4
|
+
import CheckedRadio from '../../../library/assets/svg/checkedRadio.svg';
|
|
5
|
+
import UncheckRadio from '../../../library/assets/svg/uncheckRadio.svg';
|
|
6
|
+
import TimerSVG from '../../../library/assets/svg/timer.svg';
|
|
7
|
+
import UpArrow from '../../../library/assets/svg/UpArrow.svg';
|
|
8
|
+
import DownArrow from '../../../library/assets/svg/DownArrow.svg';
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
UnCheckbox,
|
|
12
|
+
CheckedBox,
|
|
13
|
+
DatePickerSvg,
|
|
14
|
+
CheckedRadio,
|
|
15
|
+
UncheckRadio,
|
|
16
|
+
TimerSVG,
|
|
17
|
+
UpArrow,
|
|
18
|
+
DownArrow,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// import {ReactComponent as UnCheckbox} from '../../../library/assets/svg/unCheckbox.svg';
|
|
22
|
+
// import {ReactComponent as CheckedBox} from '../../../library/assets/svg/checkedBox.svg';
|
|
23
|
+
// import {ReactComponent as DatePickerSvg} from '../../../library/assets/svg/datePicker.svg';
|
|
24
|
+
// import {ReactComponent as CheckedRadio} from '../../../library/assets/svg/checkedRadio.svg';
|
|
25
|
+
// import {ReactComponent as UncheckRadio} from '../../../library/assets/svg/uncheckRadio.svg';
|
|
26
|
+
// import {ReactComponent as TimerSVG} from '../../../library/assets/svg/timer.svg';
|
|
27
|
+
// import {ReactComponent as UpArrow} from '../../../library/assets/svg/UpArrow.svg';
|
|
28
|
+
// import {ReactComponent as DownArrow} from '../../../library/assets/svg/DownArrow.svg';
|
|
29
|
+
// export {
|
|
30
|
+
// UnCheckbox,
|
|
31
|
+
// CheckedBox,
|
|
32
|
+
// DatePickerSvg,
|
|
33
|
+
// CheckedRadio,
|
|
34
|
+
// UncheckRadio,
|
|
35
|
+
// TimerSVG,
|
|
36
|
+
// UpArrow,
|
|
37
|
+
// DownArrow,
|
|
38
|
+
// };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M16.0001 8.50005C16.0001 9.73343 15.6959 10.9478 15.1145 12.0355C14.533 13.1233 13.6923 14.0508 12.6668 14.736C11.6413 15.4213 10.4626 15.843 9.23515 15.9639C8.0077 16.0848 6.76939 15.9011 5.62989 15.4291C4.49039 14.9571 3.48489 14.2114 2.70244 13.2579C1.91999 12.3045 1.38474 11.1728 1.14412 9.96316C0.903492 8.75348 0.964912 7.50312 1.32294 6.32285C1.68096 5.14257 2.32454 4.06881 3.19667 3.19667C3.25817 3.13727 3.34054 3.1044 3.42604 3.10514C3.51154 3.10588 3.59332 3.14018 3.65378 3.20064C3.71424 3.2611 3.74854 3.34289 3.74928 3.42838C3.75002 3.51388 3.71716 3.59625 3.65776 3.65776C2.54364 4.76703 1.84472 6.22559 1.67816 7.78893C1.51161 9.35226 1.88754 10.9253 2.74293 12.2444C3.59833 13.5635 4.8812 14.5485 6.37648 15.0342C7.87176 15.5199 9.48855 15.4768 10.9558 14.9121C12.4231 14.3474 13.6517 13.2955 14.4356 11.9327C15.2195 10.5699 15.511 8.97903 15.2614 7.42679C15.0118 5.87456 14.2362 4.45531 13.0645 3.40697C11.8929 2.35863 10.3965 1.74493 8.82614 1.66874V4.58698C8.82614 4.67346 8.79178 4.75641 8.73063 4.81756C8.66947 4.87871 8.58653 4.91307 8.50005 4.91307C8.41356 4.91307 8.33062 4.87871 8.26947 4.81756C8.20831 4.75641 8.17396 4.67346 8.17396 4.58698V1.32609C8.17396 1.23961 8.20831 1.15666 8.26947 1.09551C8.33062 1.03436 8.41356 1 8.50005 1C10.4885 1.00226 12.3948 1.79317 13.8009 3.19921C15.2069 4.60525 15.9978 6.5116 16.0001 8.50005ZM8.26944 8.80977C8.29966 8.84027 8.33562 8.8645 8.37524 8.88107C8.41485 8.89764 8.45735 8.90622 8.5003 8.90632C8.54324 8.90642 8.58578 8.89804 8.62547 8.88165C8.66517 8.86527 8.70123 8.8412 8.7316 8.81084C8.76197 8.78048 8.78605 8.74442 8.80244 8.70473C8.81884 8.66504 8.82723 8.62251 8.82714 8.57956C8.82706 8.53662 8.81849 8.49412 8.80193 8.4545C8.78537 8.41487 8.76115 8.37891 8.73066 8.34868L5.39059 5.00861C5.32919 4.94873 5.24666 4.91546 5.16089 4.916C5.07513 4.91653 4.99303 4.95084 4.93237 5.01148C4.87172 5.07213 4.8374 5.15422 4.83685 5.23999C4.8363 5.32576 4.86957 5.40829 4.92944 5.4697L8.26944 8.80977ZM1.65218 2.30436C1.78117 2.30436 1.90726 2.26611 2.01451 2.19444C2.12176 2.12278 2.20535 2.02093 2.25471 1.90176C2.30407 1.78259 2.31699 1.65145 2.29182 1.52494C2.26666 1.39843 2.20455 1.28223 2.11334 1.19102C2.02213 1.09981 1.90592 1.0377 1.77941 1.01253C1.6529 0.987367 1.52177 1.00028 1.4026 1.04964C1.28343 1.09901 1.18157 1.1826 1.10991 1.28985C1.03825 1.3971 1 1.52319 1 1.65218C1 1.82515 1.06871 1.99103 1.19102 2.11334C1.31333 2.23564 1.47921 2.30436 1.65218 2.30436Z" fill="#212721" stroke="#E7503D"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M16.0001 8.50005C16.0001 9.73343 15.6959 10.9478 15.1145 12.0355C14.533 13.1233 13.6923 14.0508 12.6668 14.736C11.6413 15.4213 10.4626 15.843 9.23515 15.9639C8.0077 16.0848 6.76939 15.9011 5.62989 15.4291C4.49039 14.9571 3.48489 14.2114 2.70244 13.2579C1.91999 12.3045 1.38474 11.1728 1.14412 9.96316C0.903492 8.75348 0.964912 7.50312 1.32294 6.32285C1.68096 5.14257 2.32454 4.06881 3.19667 3.19667C3.25817 3.13727 3.34054 3.1044 3.42604 3.10514C3.51154 3.10588 3.59332 3.14018 3.65378 3.20064C3.71424 3.2611 3.74854 3.34289 3.74928 3.42838C3.75002 3.51388 3.71716 3.59625 3.65776 3.65776C2.54364 4.76703 1.84472 6.22559 1.67816 7.78893C1.51161 9.35226 1.88754 10.9253 2.74293 12.2444C3.59833 13.5635 4.8812 14.5485 6.37648 15.0342C7.87176 15.5199 9.48855 15.4768 10.9558 14.9121C12.4231 14.3474 13.6517 13.2955 14.4356 11.9327C15.2195 10.5699 15.511 8.97903 15.2614 7.42679C15.0118 5.87456 14.2362 4.45531 13.0645 3.40697C11.8929 2.35863 10.3965 1.74493 8.82614 1.66874V4.58698C8.82614 4.67346 8.79178 4.75641 8.73063 4.81756C8.66947 4.87871 8.58653 4.91307 8.50005 4.91307C8.41356 4.91307 8.33062 4.87871 8.26947 4.81756C8.20831 4.75641 8.17396 4.67346 8.17396 4.58698V1.32609C8.17396 1.23961 8.20831 1.15666 8.26947 1.09551C8.33062 1.03436 8.41356 1 8.50005 1C10.4885 1.00226 12.3948 1.79317 13.8009 3.19921C15.2069 4.60525 15.9978 6.5116 16.0001 8.50005ZM8.26944 8.80977C8.29966 8.84027 8.33562 8.8645 8.37524 8.88107C8.41485 8.89764 8.45735 8.90622 8.5003 8.90632C8.54324 8.90642 8.58578 8.89804 8.62547 8.88165C8.66517 8.86527 8.70123 8.8412 8.7316 8.81084C8.76197 8.78048 8.78605 8.74442 8.80244 8.70473C8.81884 8.66504 8.82723 8.62251 8.82714 8.57956C8.82706 8.53662 8.81849 8.49412 8.80193 8.4545C8.78537 8.41487 8.76115 8.37891 8.73066 8.34868L5.39059 5.00861C5.32919 4.94873 5.24666 4.91546 5.16089 4.916C5.07513 4.91653 4.99303 4.95084 4.93237 5.01148C4.87172 5.07213 4.8374 5.15422 4.83685 5.23999C4.8363 5.32576 4.86957 5.40829 4.92944 5.4697L8.26944 8.80977ZM1.65218 2.30436C1.78117 2.30436 1.90726 2.26611 2.01451 2.19444C2.12176 2.12278 2.20535 2.02093 2.25471 1.90176C2.30407 1.78259 2.31699 1.65145 2.29182 1.52494C2.26666 1.39843 2.20455 1.28223 2.11334 1.19102C2.02213 1.09981 1.90592 1.0377 1.77941 1.01253C1.6529 0.987367 1.52177 1.00028 1.4026 1.04964C1.28343 1.09901 1.18157 1.1826 1.10991 1.28985C1.03825 1.3971 1 1.52319 1 1.65218C1 1.82515 1.06871 1.99103 1.19102 2.11334C1.31333 2.23564 1.47921 2.30436 1.65218 2.30436Z" fill="#212721" stroke="#E7503D"/>
|
|
3
|
+
</svg>
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { Suspense } from 'react';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import { Tooltip } from '../..';
|
|
4
|
+
import loadable from '@loadable/component';
|
|
5
|
+
let lib = 'md';
|
|
2
6
|
export const Icon = ({ nameIcon, propsIcon, tooltip = '', isDisable = false, onClick, }) => {
|
|
3
7
|
try {
|
|
4
8
|
const iconProps = Object.assign(Object.assign({}, propsIcon), { color: isDisable ? '#808080' : (propsIcon === null || propsIcon === void 0 ? void 0 : propsIcon.color) || '#ffffff' });
|
|
@@ -6,17 +10,21 @@ export const Icon = ({ nameIcon, propsIcon, tooltip = '', isDisable = false, onC
|
|
|
6
10
|
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
7
11
|
.split(' ')[0]
|
|
8
12
|
.toLocaleLowerCase();
|
|
9
|
-
// const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
// )
|
|
13
|
+
// const fullLib = `react-icons/${lib}/index.js`;
|
|
14
|
+
const fullLib = `react-icons/md/index.js`;
|
|
15
|
+
let ElementIcon = loadable(() => import(fullLib), {
|
|
16
|
+
resolveComponent: (el) => el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
|
|
17
|
+
});
|
|
18
|
+
// ElementIcon = loadable(() => import(`react-icons/${lib}`), {
|
|
19
|
+
// resolveComponent: (el) =>
|
|
20
|
+
// el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
|
|
21
|
+
// });
|
|
16
22
|
return (React.createElement("div", { onClick: () => {
|
|
17
23
|
if (!isDisable)
|
|
18
24
|
onClick && onClick();
|
|
19
|
-
} })
|
|
25
|
+
} }, !_.isEmpty(tooltip) ? (React.createElement(Tooltip, { tooltipText: tooltip },
|
|
26
|
+
React.createElement(ElementIcon, Object.assign({}, iconProps)))) : (React.createElement(Suspense, { fallback: React.createElement("div", null, "Loading...") },
|
|
27
|
+
React.createElement(ElementIcon, Object.assign({}, iconProps))))));
|
|
20
28
|
}
|
|
21
29
|
catch (error) {
|
|
22
30
|
return React.createElement(React.Fragment, null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"icons.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAW3C,IAAI,GAAG,GAAG,IAAI,CAAC;AACf,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EACnB,QAAQ,EACR,SAAS,EACT,OAAO,GAAG,EAAE,EACZ,SAAS,GAAG,KAAK,EACjB,OAAO,GACG,EAAe,EAAE;IAC3B,IAAI;QACF,MAAM,SAAS,mCACV,SAAS,KACZ,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,KAAI,SAAS,GAC7D,CAAC;QACF,MAAM,GAAG,GAAG,QAAQ;aACjB,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;aACtC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;aACb,iBAAiB,EAAE,CAAC;QACvB,iDAAiD;QACjD,MAAM,OAAO,GAAG,yBAAyB,CAAC;QAE1C,IAAI,WAAW,GAAQ,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;YACrD,gBAAgB,EAAE,CAAC,EAAE,EAAE,EAAE,CACvB,EAAE,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SACvE,CAAC,CAAC;QACH,+DAA+D;QAC/D,8BAA8B;QAC9B,4EAA4E;QAC5E,MAAM;QAEN,OAAO,CACL,6BACE,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,CAAC,SAAS;oBAAE,OAAO,IAAI,OAAO,EAAE,CAAC;YACvC,CAAC,IAEA,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACrB,oBAAC,OAAO,IAAC,WAAW,EAAE,OAAO;YAC3B,oBAAC,WAAW,oBAAK,SAAS,EAAI,CACtB,CACX,CAAC,CAAC,CAAC,CACF,oBAAC,QAAQ,IAAC,QAAQ,EAAE,8CAAqB;YACvC,oBAAC,WAAW,oBAAK,SAAS,EAAI,CACrB,CACZ,CACG,CACP,CAAC;KACH;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,yCAAK,CAAC;KACd;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Icon } from './icons.component';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Design System/Atoms/Icon',
|
|
4
|
+
component: Icon,
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
parameters: {
|
|
7
|
+
componentSubtitle: `import { Icon } from 'react-restyle-components'`,
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Primary = {
|
|
12
|
+
args: {
|
|
13
|
+
nameIcon: 'FaHistory',
|
|
14
|
+
propsIcon: {
|
|
15
|
+
color: '#000000',
|
|
16
|
+
size: 24,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=icons.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.stories.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAEvC,MAAM,IAAI,GAAsB;IAC9B,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,iBAAiB,EAAE,iDAAiD;KACrE;CACF,CAAC;AACF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,QAAQ,EAAE,WAAW;QACrB,SAAS,EAAE;YACT,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,EAAE;SACT;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@core-utils';
|
|
3
|
+
import { Icon } from './icons.component';
|
|
4
|
+
it('render Icon correctly', () => {
|
|
5
|
+
const icon = render(React.createElement(Icon, { nameIcon: "FaHistory", propsIcon: {
|
|
6
|
+
color: '#000000',
|
|
7
|
+
size: 24,
|
|
8
|
+
} }));
|
|
9
|
+
expect(icon).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=icons.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.test.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;IAC/B,MAAM,IAAI,GAAG,MAAM,CACjB,oBAAC,IAAI,IACH,QAAQ,EAAC,WAAW,EACpB,SAAS,EAAE;YACT,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,EAAE;SACT,GACD,CACH,CAAC;IACF,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@core-utils';
|
|
3
3
|
import { Stepper } from './stepper.component';
|
|
4
|
-
it('
|
|
4
|
+
it('render Stepper correctly', () => {
|
|
5
5
|
const stepper = render(React.createElement(Stepper, { steps: ['1', '2', '3', '4'], currentStep: 3, onStepClick: () => jest.fn(), className: "mt-4" }));
|
|
6
6
|
expect(stepper).toMatchSnapshot();
|
|
7
7
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.test.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/stepper/stepper.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAC5C,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"stepper.test.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/stepper/stepper.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAC5C,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;IAClC,MAAM,OAAO,GAAG,MAAM,CACpB,oBAAC,OAAO,IACN,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAC3B,WAAW,EAAE,CAAC,EACd,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAC5B,SAAS,EAAC,MAAM,GAChB,CACH,CAAC;IACF,MAAM,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,CAAC;AACpC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Icon } from '../..';
|
|
3
|
+
export const Tabs = ({ options, onSelect }) => {
|
|
4
|
+
const [selected, setSelected] = useState(options[0].title);
|
|
5
|
+
return (React.createElement("div", { className: "flex justify-center" },
|
|
6
|
+
React.createElement("ul", { className: "flex flex-wrap items-center justify-center -mb-px text-sm font-medium text-center text-black cursor-pointer gap-2" }, options === null || options === void 0 ? void 0 : options.map((item, index) => (React.createElement("li", { key: index, className: "bg-[#EF4444] rounded-md" },
|
|
7
|
+
React.createElement("div", { className: `inline-flex items-center justify-center p-3 border-b-2 gap-1 ${item.title == selected
|
|
8
|
+
? 'text-white font-bold md:text-md border-primary active'
|
|
9
|
+
: ' text-gray-200 md:text-md border-transparent'}`, onClick: () => {
|
|
10
|
+
setSelected(item.title);
|
|
11
|
+
onSelect(item.title);
|
|
12
|
+
} },
|
|
13
|
+
React.createElement(Icon, { nameIcon: item.icon, propsIcon: {
|
|
14
|
+
color: item.title == selected ? '#ffffff' : '#000000',
|
|
15
|
+
size: 24,
|
|
16
|
+
} }),
|
|
17
|
+
item.title)))))));
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=tabs.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/tabs/tabs.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,IAAI,EAAC,MAAM,OAAO,CAAC;AAO3B,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAY,EAAE,EAAE;IACrD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC3D,OAAO,CACL,6BAAK,SAAS,EAAC,qBAAqB;QAClC,4BAAI,SAAS,EAAC,mHAAmH,IAC9H,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7B,4BAAI,GAAG,EAAE,KAAK,EAAE,SAAS,EAAC,yBAAyB;YACjD,6BACE,SAAS,EAAE,gEACT,IAAI,CAAC,KAAK,IAAI,QAAQ;oBACpB,CAAC,CAAC,wDAAwD;oBAC1D,CAAC,CAAC,+CACN,EAAE,EACF,OAAO,EAAE,GAAG,EAAE;oBACZ,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBACxB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,CAAC;gBAED,oBAAC,IAAI,IACH,QAAQ,EAAE,IAAI,CAAC,IAAI,EACnB,SAAS,EAAE;wBACT,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;wBACrD,IAAI,EAAE,EAAE;qBACT,GACD;gBACD,IAAI,CAAC,KAAK,CACP,CACH,CACN,CAAC,CACC,CACD,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Tabs } from './tabs.component';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Design System/Atoms/Tabs',
|
|
4
|
+
component: Tabs,
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
parameters: {
|
|
7
|
+
componentSubtitle: `import { Tabs } from 'react-restyle-components'`,
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Primary = {
|
|
12
|
+
args: {
|
|
13
|
+
options: [
|
|
14
|
+
// {title: 'Work History', icon: 'FaHistory'},
|
|
15
|
+
// {title: 'Book Order', icon: 'FaBook'},
|
|
16
|
+
{ title: 'Make Frame', icon: 'MdFilterFrames' },
|
|
17
|
+
],
|
|
18
|
+
onSelect: (item) => {
|
|
19
|
+
console.log({ item });
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=tabs.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.stories.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/tabs/tabs.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AAKtC,MAAM,IAAI,GAAsB;IAC9B,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,iBAAiB,EAAE,iDAAiD;KACrE;CACF,CAAC;AACF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAC;YACN,8CAA8C;YAC9C,yCAAyC;YACzC,EAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAC;SAC9C;QACD,QAAQ,EAAC,CAAC,IAAI,EAAE,EAAE;YAChB,OAAO,CAAC,GAAG,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC;QAEtB,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@core-utils';
|
|
3
|
+
import { Tabs } from './tabs.component';
|
|
4
|
+
it('render Tabs correctly', () => {
|
|
5
|
+
const tabs = render(React.createElement(Tabs, { options: [
|
|
6
|
+
{ title: 'Work History', icon: 'FaHistory' },
|
|
7
|
+
{ title: 'Book Order', icon: 'FaBook' },
|
|
8
|
+
{ title: 'Make Frame', icon: 'MdFilterFrames' },
|
|
9
|
+
], onSelect: (item) => {
|
|
10
|
+
console.log({ item });
|
|
11
|
+
} }));
|
|
12
|
+
expect(tabs).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=tabs.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.test.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/tabs/tabs.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAC;AACtC,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;IAC/B,MAAM,IAAI,GAAG,MAAM,CACjB,oBAAC,IAAI,IACL,OAAO,EAAE;YACP,EAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,EAAC;YAC1C,EAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAC;YACrC,EAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAC;SAC9C,EACD,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;YACjB,OAAO,CAAC,GAAG,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC;QAEtB,CAAC,GACC,CACH,CAAC;IACF,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
|
|
@@ -12,6 +12,7 @@ export * from './atoms/stepper/stepper.component';
|
|
|
12
12
|
export * from './atoms/timer/timer.component';
|
|
13
13
|
export * from './atoms/tooltip/tooltip.component';
|
|
14
14
|
export * from './atoms/icons/icons.component';
|
|
15
|
+
export * from './atoms/tabs/tabs.component';
|
|
15
16
|
export * from './molecules/css-multiline-input/css-multiline-input.component';
|
|
16
17
|
export * from './molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component';
|
|
17
18
|
export * from './molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,6BAA6B,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iDAAiD,CAAC;AAChE,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,6BAA6B,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iDAAiD,CAAC;AAChE,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAE5C,cAAc,+DAA+D,CAAC;AAC9E,cAAc,iJAAiJ,CAAC;AAChK,cAAc,6IAA6I,CAAC;AAE5J,OAAO,EAAC,IAAI,EAAC,CAAC"}
|
package/lib/package.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-restyle-components",
|
|
3
|
+
"version": "0.1.41",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Easy use restyle components",
|
|
6
|
+
"main": "lib/cjs/index.js",
|
|
7
|
+
"module": "lib/esm/index.js",
|
|
8
|
+
"author": {
|
|
9
|
+
"email": "onlyappasaheb4@gmail.com",
|
|
10
|
+
"name": "Lakade Appasaheb",
|
|
11
|
+
"url": "http://github.com/appasaheb4"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"start": "serve -s ./build",
|
|
16
|
+
"dev": "chmod +x setup.sh && sh ./setup.sh && craco start",
|
|
17
|
+
"serve-webapp": "craco build && craco start",
|
|
18
|
+
"build": "rm -rf lib && chmod +x npm-publish.sh && sh ./npm-publish.sh && tsc -p tsconfig.json & tsc -p tsconfig-cjs.json && copyfiles -u 1 src/library/assets/**/* lib/cjs && cp package.json lib/package.json",
|
|
19
|
+
"test": "react-scripts test",
|
|
20
|
+
"eject": "react-scripts eject",
|
|
21
|
+
"precommit": "lint-staged --allow-empty",
|
|
22
|
+
"storybook": "storybook dev -p 6006",
|
|
23
|
+
"build-storybook": "rm -rf docs-build && storybook build -o docs-build",
|
|
24
|
+
"deploy-storybook": "gh-pages -d docs-build",
|
|
25
|
+
"prettier": "prettier --write '**/*.{js,jsx}'",
|
|
26
|
+
"prepare": "husky install"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@loadable/component": "^5.16.4",
|
|
30
|
+
"@mui/material": "^5.15.19",
|
|
31
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
32
|
+
"@testing-library/react": "^13.1.1",
|
|
33
|
+
"@testing-library/user-event": "^13.5.0",
|
|
34
|
+
"@types/jest": "^27.4.1",
|
|
35
|
+
"@types/react": "^18.0.5",
|
|
36
|
+
"@types/react-dom": "^18.0.1",
|
|
37
|
+
"dayjs": "^1.11.1",
|
|
38
|
+
"react-datepicker": "^4.7.0",
|
|
39
|
+
"react-icons": "^5.2.1",
|
|
40
|
+
"reactstrap": "^9.0.2",
|
|
41
|
+
"tailwindcss": "^3.0.24",
|
|
42
|
+
"typescript": "^4.6.3"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@testing-library/jest-dom": "*",
|
|
46
|
+
"@testing-library/react": "*",
|
|
47
|
+
"@testing-library/user-event": "*",
|
|
48
|
+
"@types/jest": "*",
|
|
49
|
+
"@types/react": "*",
|
|
50
|
+
"@types/react-dom": "*",
|
|
51
|
+
"dayjs": "*",
|
|
52
|
+
"react": "*",
|
|
53
|
+
"react-datepicker": "*",
|
|
54
|
+
"react-dom": "*",
|
|
55
|
+
"react-scripts": "*",
|
|
56
|
+
"reactstrap": "*",
|
|
57
|
+
"tailwindcss": "*",
|
|
58
|
+
"typescript": "*",
|
|
59
|
+
"web-vitals": "*"
|
|
60
|
+
},
|
|
61
|
+
"files": ["*.md", "dist", "lib"],
|
|
62
|
+
"sideEffects": ["**/*.css"],
|
|
63
|
+
"eslintConfig": {
|
|
64
|
+
"extends": ["react-app", "react-app/jest", "plugin:storybook/recommended"],
|
|
65
|
+
"overrides": [
|
|
66
|
+
{
|
|
67
|
+
"files": ["**/*.stories.*"],
|
|
68
|
+
"rules": {
|
|
69
|
+
"import/no-anonymous-default-export": "off"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"browserslist": {
|
|
75
|
+
"production": [">0.2%", "not dead", "not op_mini all"],
|
|
76
|
+
"development": [
|
|
77
|
+
"last 1 chrome version",
|
|
78
|
+
"last 1 firefox version",
|
|
79
|
+
"last 1 safari version"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@chromatic-com/storybook": "^1.3.1",
|
|
84
|
+
"@craco/craco": "^6.4.3",
|
|
85
|
+
"@emotion/react": "^11.11.4",
|
|
86
|
+
"@emotion/styled": "^11.11.5",
|
|
87
|
+
"@storybook/addon-essentials": "^8.0.6",
|
|
88
|
+
"@storybook/addon-interactions": "^8.0.6",
|
|
89
|
+
"@storybook/addon-links": "^8.0.6",
|
|
90
|
+
"@storybook/addon-onboarding": "^8.0.6",
|
|
91
|
+
"@storybook/addon-webpack5-compiler-swc": "^1.0.2",
|
|
92
|
+
"@storybook/blocks": "^8.0.6",
|
|
93
|
+
"@storybook/react": "^8.0.6",
|
|
94
|
+
"@storybook/react-webpack5": "^8.0.6",
|
|
95
|
+
"@storybook/test": "^8.0.6",
|
|
96
|
+
"@svgr/webpack": "^8.1.0",
|
|
97
|
+
"autoprefixer": "^10.4.19",
|
|
98
|
+
"craco-alias": "^3.0.1",
|
|
99
|
+
"style-loader": "^4.0.0",
|
|
100
|
+
"css-loader": "^7.1.2",
|
|
101
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
102
|
+
"gh-pages": "^3.2.3",
|
|
103
|
+
"husky": "^7.0.4",
|
|
104
|
+
"copyfiles": "^2.4.1",
|
|
105
|
+
"lint-staged": "^12.4.0",
|
|
106
|
+
"postcss-loader": "^8.1.1",
|
|
107
|
+
"storybook": "^8.0.6",
|
|
108
|
+
"webpack": "^5.72.0"
|
|
109
|
+
},
|
|
110
|
+
"keywords": ["react", "components", "restyle-components", "tech-abl"],
|
|
111
|
+
"repository": {
|
|
112
|
+
"type": "git",
|
|
113
|
+
"url": "git+https://github.com/appasaheb4/react-restyle-components.git"
|
|
114
|
+
},
|
|
115
|
+
"bugs": {
|
|
116
|
+
"url": "https://github.com/appasaheb4/react-restyle-components/issues"
|
|
117
|
+
},
|
|
118
|
+
"homepage": "https://github.com/appasaheb4/react-restyle-components#readme",
|
|
119
|
+
"lint-staged": {
|
|
120
|
+
"*.{js,jsx,json,css,scss,md}": ["prettier --write", "git add"]
|
|
121
|
+
},
|
|
122
|
+
"resolutions": {
|
|
123
|
+
"jackspeak": "2.1.1"
|
|
124
|
+
}
|
|
125
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-restyle-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.46",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easy use restyle components",
|
|
6
6
|
"main": "lib/cjs/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"start": "serve -s ./build",
|
|
16
16
|
"dev": "chmod +x setup.sh && sh ./setup.sh && craco start",
|
|
17
17
|
"serve-webapp": "craco build && craco start",
|
|
18
|
-
"build": "rm -rf lib && chmod +x npm-publish.sh && sh ./npm-publish.sh && tsc -p tsconfig.json & tsc -p tsconfig-cjs.json",
|
|
18
|
+
"build": "rm -rf lib && chmod +x npm-publish.sh && sh ./npm-publish.sh && tsc -p tsconfig.json & tsc -p tsconfig-cjs.json && copyfiles -u 1 src/library/assets/**/* lib/cjs && cp package.json lib/package.json",
|
|
19
19
|
"test": "react-scripts test",
|
|
20
20
|
"eject": "react-scripts eject",
|
|
21
21
|
"precommit": "lint-staged --allow-empty",
|
|
@@ -112,9 +112,12 @@
|
|
|
112
112
|
"@svgr/webpack": "^8.1.0",
|
|
113
113
|
"autoprefixer": "^10.4.19",
|
|
114
114
|
"craco-alias": "^3.0.1",
|
|
115
|
+
"style-loader": "^4.0.0",
|
|
116
|
+
"css-loader": "^7.1.2",
|
|
115
117
|
"eslint-plugin-storybook": "^0.8.0",
|
|
116
118
|
"gh-pages": "^3.2.3",
|
|
117
119
|
"husky": "^7.0.4",
|
|
120
|
+
"copyfiles": "^2.4.1",
|
|
118
121
|
"lint-staged": "^12.4.0",
|
|
119
122
|
"postcss-loader": "^8.1.1",
|
|
120
123
|
"storybook": "^8.0.6",
|