react-restyle-components 0.1.85 → 0.1.86
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/index.d.ts +2 -0
- package/lib/cjs/index.js +18 -0
- package/lib/cjs/src/App.d.ts +4 -0
- package/lib/cjs/src/App.js +15 -0
- package/lib/cjs/src/core-components/atoms/buttons/button.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/buttons/button.stories.js +42 -0
- package/lib/cjs/src/core-components/atoms/buttons/buttons.component.d.ts +11 -0
- package/lib/cjs/src/core-components/atoms/buttons/buttons.component.js +15 -0
- package/lib/cjs/src/core-components/atoms/buttons/buttons.test.js +13 -0
- package/lib/cjs/src/core-components/atoms/check-box/checkBox.component.d.ts +11 -0
- package/lib/cjs/src/core-components/atoms/check-box/checkBox.component.js +47 -0
- package/lib/cjs/src/core-components/atoms/check-box/checkBox.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/check-box/checkBox.stories.js +26 -0
- package/lib/cjs/src/core-components/atoms/check-box/checkBox.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/check-box/checkBox.test.js +13 -0
- package/lib/cjs/src/core-components/atoms/date-picker/date-picker.component.d.ts +13 -0
- package/lib/cjs/src/core-components/atoms/date-picker/date-picker.component.js +52 -0
- package/lib/cjs/src/core-components/atoms/date-picker/date-picker.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/date-picker/date-picker.stories.js +24 -0
- package/lib/cjs/src/core-components/atoms/date-picker/date-picker.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/date-picker/date-picker.test.js +14 -0
- package/lib/cjs/src/core-components/atoms/form/form.component.d.ts +102 -0
- package/lib/cjs/src/core-components/atoms/form/form.component.js +192 -0
- package/lib/cjs/src/core-components/atoms/form/form.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/form/form.test.js +99 -0
- package/lib/cjs/src/core-components/atoms/icons/icons.component.d.ts +11 -0
- package/lib/cjs/src/core-components/atoms/icons/icons.component.js +66 -0
- package/lib/cjs/src/core-components/atoms/icons/icons.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/icons/icons.stories.js +22 -0
- package/lib/cjs/src/core-components/atoms/icons/icons.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/icons/icons.test.js +15 -0
- package/lib/cjs/src/core-components/atoms/input/input-otp.component.d.ts +15 -0
- package/lib/cjs/src/core-components/atoms/input/input-otp.component.js +88 -0
- package/lib/cjs/src/core-components/atoms/input/input-pin.component.d.ts +16 -0
- package/lib/cjs/src/core-components/atoms/input/input-pin.component.js +107 -0
- package/lib/cjs/src/core-components/atoms/input/input-pin.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/input/input-pin.stories.js +23 -0
- package/lib/cjs/src/core-components/atoms/input/input-pin.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/input/input-pin.test.js +17 -0
- package/lib/cjs/src/core-components/atoms/input/input.component.d.ts +19 -0
- package/lib/cjs/src/core-components/atoms/input/input.component.js +45 -0
- package/lib/cjs/src/core-components/atoms/input/input.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/input/input.stories.js +24 -0
- package/lib/cjs/src/core-components/atoms/input/input.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/input/input.test.js +17 -0
- package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.component.d.ts +11 -0
- package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.component.js +64 -0
- package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.stories.js +20 -0
- package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.test.js +13 -0
- package/lib/cjs/src/core-components/atoms/loader/loader.component.d.ts +4 -0
- package/lib/cjs/src/core-components/atoms/loader/loader.component.js +61 -0
- package/lib/cjs/src/core-components/atoms/loader/loader.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/loader/loader.stories.js +16 -0
- package/lib/cjs/src/core-components/atoms/loader/loader.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/loader/loader.test.js +13 -0
- package/lib/cjs/src/core-components/atoms/radio/radio.component.d.ts +10 -0
- package/lib/cjs/src/core-components/atoms/radio/radio.component.js +49 -0
- package/lib/cjs/src/core-components/atoms/radio/radio.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/radio/radio.stories.js +25 -0
- package/lib/cjs/src/core-components/atoms/radio/radio.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/radio/radio.test.js +13 -0
- package/lib/cjs/src/core-components/atoms/stepper/stepper.component.d.ts +10 -0
- package/lib/cjs/src/core-components/atoms/stepper/stepper.component.js +42 -0
- package/lib/cjs/src/core-components/atoms/stepper/stepper.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/stepper/stepper.stories.js +21 -0
- package/lib/cjs/src/core-components/atoms/stepper/stepper.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/stepper/stepper.test.js +12 -0
- package/lib/cjs/src/core-components/atoms/tabs/tabs.component.d.ts +11 -0
- package/lib/cjs/src/core-components/atoms/tabs/tabs.component.js +46 -0
- package/lib/cjs/src/core-components/atoms/tabs/tabs.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/tabs/tabs.stories.js +25 -0
- package/lib/cjs/src/core-components/atoms/tabs/tabs.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/tabs/tabs.test.js +18 -0
- package/lib/cjs/src/core-components/atoms/timer/timer.component.d.ts +7 -0
- package/lib/cjs/src/core-components/atoms/timer/timer.component.js +106 -0
- package/lib/cjs/src/core-components/atoms/timer/timer.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/timer/timer.test.js +19 -0
- package/lib/cjs/src/core-components/atoms/tooltip/tooltip.component.d.ts +10 -0
- package/lib/cjs/src/core-components/atoms/tooltip/tooltip.component.js +56 -0
- package/lib/cjs/src/core-components/atoms/tooltip/tooltip.component.test.d.ts +1 -0
- package/lib/cjs/src/core-components/atoms/tooltip/tooltip.component.test.js +14 -0
- package/lib/cjs/src/core-components/atoms/tooltip/tooltip.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/atoms/tooltip/tooltip.stories.js +16 -0
- package/lib/cjs/src/core-components/index.d.ts +24 -0
- package/lib/cjs/src/core-components/index.js +53 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts +18 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +119 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.test.d.ts +1 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.test.js +14 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.stories.js +48 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts +17 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +120 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.test.d.ts +1 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.test.js +21 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.stories.js +31 -0
- package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.d.ts +9 -0
- package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.js +144 -0
- package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.stories.js +20 -0
- package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.component.d.ts +12 -0
- package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.component.js +124 -0
- package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.stories.js +16 -0
- package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.test.d.ts +1 -0
- package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.test.js +15 -0
- package/lib/cjs/src/core-components/molecules/css-multiline-input/css-properties.d.ts +8931 -0
- package/lib/cjs/src/core-components/molecules/css-multiline-input/css-properties.js +164 -0
- package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.component.d.ts +12 -0
- package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.component.js +60 -0
- package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.stories.js +23 -0
- package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.test.d.ts +1 -0
- package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.test.js +15 -0
- package/lib/cjs/src/core-components/molecules/multi-select/multi-select.component.d.ts +9 -0
- package/lib/cjs/src/core-components/molecules/multi-select/multi-select.component.js +79 -0
- package/lib/cjs/src/core-components/molecules/multi-select/multi-select.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/molecules/multi-select/multi-select.stories.js +22 -0
- package/lib/cjs/src/core-components/molecules/multi-select/multi-select.test.d.ts +1 -0
- package/lib/cjs/src/core-components/molecules/multi-select/multi-select.test.js +15 -0
- package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.component.d.ts +10 -0
- package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.component.js +88 -0
- package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.stories.d.ts +6 -0
- package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.stories.js +23 -0
- package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.test.d.ts +1 -0
- package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.test.js +17 -0
- package/lib/cjs/src/core-utils/index.d.ts +1 -0
- package/lib/cjs/src/core-utils/index.js +17 -0
- package/lib/cjs/src/core-utils/unit-test.utils.d.ts +4 -0
- package/lib/cjs/src/core-utils/unit-test.utils.js +16 -0
- package/lib/cjs/src/index.d.ts +1 -0
- package/lib/cjs/src/index.js +17 -0
- package/lib/cjs/src/library/assets/svg/index.d.ts +9 -0
- package/lib/cjs/src/library/assets/svg/index.js +40 -0
- package/lib/cjs/src/reportWebVitals.d.ts +3 -0
- package/lib/cjs/src/reportWebVitals.js +37 -0
- package/lib/cjs/src/setupTests.d.ts +1 -0
- package/lib/cjs/src/setupTests.js +7 -0
- package/lib/package.json +24 -97
- package/lib/src/App.js +5 -9
- package/lib/src/core-components/atoms/buttons/buttons.component.d.ts +1 -1
- package/lib/src/core-components/atoms/buttons/buttons.component.js +1 -1
- package/lib/src/core-components/atoms/check-box/checkBox.component.d.ts +1 -1
- package/lib/src/core-components/atoms/check-box/checkBox.component.js +2 -2
- package/lib/src/core-components/atoms/check-box/checkBox.stories.d.ts +1 -1
- package/lib/src/core-components/atoms/check-box/checkBox.stories.js +1 -1
- package/lib/src/core-components/atoms/date-picker/date-picker.component.d.ts +1 -1
- package/lib/src/core-components/atoms/date-picker/date-picker.component.js +1 -1
- package/lib/src/core-components/atoms/form/form.component.d.ts +2 -2
- package/lib/src/core-components/atoms/form/form.component.js +2 -2
- package/lib/src/core-components/atoms/icons/icons.component.d.ts +1 -2
- package/lib/src/core-components/atoms/icons/icons.component.js +1 -1
- package/lib/src/core-components/atoms/input/input-otp.component.d.ts +1 -1
- package/lib/src/core-components/atoms/input/input-otp.component.js +1 -1
- package/lib/src/core-components/atoms/input/input-pin.component.d.ts +1 -1
- package/lib/src/core-components/atoms/input/input-pin.component.js +1 -1
- package/lib/src/core-components/atoms/input/input.component.d.ts +1 -1
- package/lib/src/core-components/atoms/input/input.component.js +1 -1
- package/lib/src/core-components/atoms/input-dropdown/input-dropdown.component.d.ts +1 -1
- package/lib/src/core-components/atoms/input-dropdown/input-dropdown.component.js +1 -1
- package/lib/src/core-components/atoms/loader/loader.component.d.ts +1 -1
- package/lib/src/core-components/atoms/loader/loader.component.js +1 -1
- package/lib/src/core-components/atoms/radio/radio.component.d.ts +1 -1
- package/lib/src/core-components/atoms/radio/radio.component.js +1 -1
- package/lib/src/core-components/atoms/stepper/stepper.component.d.ts +1 -1
- package/lib/src/core-components/atoms/stepper/stepper.component.js +1 -1
- package/lib/src/core-components/atoms/tabs/tabs.component.d.ts +1 -1
- package/lib/src/core-components/atoms/tabs/tabs.component.js +1 -1
- package/lib/src/core-components/atoms/timer/timer.component.d.ts +1 -1
- package/lib/src/core-components/atoms/timer/timer.component.js +1 -1
- package/lib/src/core-components/atoms/tooltip/tooltip.component.d.ts +1 -1
- package/lib/src/core-components/atoms/tooltip/tooltip.component.js +1 -1
- package/lib/src/core-components/index.d.ts +2 -1
- package/lib/src/core-components/index.js +2 -1
- package/lib/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts +1 -1
- package/lib/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +1 -1
- package/lib/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts +1 -1
- package/lib/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +1 -1
- package/lib/src/core-components/molecules/autocomplete/autocomplete.css +46 -0
- package/lib/src/core-components/molecules/autocomplete/autocomplete.d.ts +9 -0
- package/lib/src/core-components/molecules/autocomplete/autocomplete.js +117 -0
- package/lib/src/core-components/molecules/autocomplete/autocomplete.stories.d.ts +6 -0
- package/lib/src/core-components/molecules/autocomplete/autocomplete.stories.js +17 -0
- package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.component.d.ts +1 -1
- package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.component.js +1 -1
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.stories.d.ts +1 -1
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.stories.js +1 -1
- package/lib/src/index.css +17 -4
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.js +12 -1
- package/lib/src/reportWebVitals.d.ts +3 -1
- package/lib/src/reportWebVitals.js +12 -2
- package/lib/src/tc.css +1 -0
- package/lib/tc.css +1 -1
- package/package.json +23 -96
- package/lib/src/App.test.js +0 -8
- /package/lib/{src/App.test.d.ts → cjs/src/core-components/atoms/buttons/buttons.test.d.ts} +0 -0
package/lib/cjs/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
require("./tc.css");
|
|
18
|
+
__exportStar(require("./src/core-components"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
require("./App.css");
|
|
8
|
+
const core_components_1 = require("./core-components");
|
|
9
|
+
function App() {
|
|
10
|
+
return (react_1.default.createElement("div", null,
|
|
11
|
+
react_1.default.createElement("div", null,
|
|
12
|
+
react_1.default.createElement("p", null, "New testing"),
|
|
13
|
+
react_1.default.createElement(core_components_1.Autocomplete, { value: "", onValueChange: () => { }, options: ['One', 'Two'] }))));
|
|
14
|
+
}
|
|
15
|
+
exports.default = App;
|
|
@@ -0,0 +1,42 @@
|
|
|
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.Primary = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const buttons_component_1 = require("./buttons.component");
|
|
9
|
+
// import {Title, Component, Source, Canvas, ArgTypes} from '@storybook/blocks';
|
|
10
|
+
const test_1 = require("@storybook/test");
|
|
11
|
+
const meta = {
|
|
12
|
+
title: 'Design System/Atoms/Button',
|
|
13
|
+
component: buttons_component_1.Button,
|
|
14
|
+
tags: ['autodocs'],
|
|
15
|
+
args: {
|
|
16
|
+
className: 'w-40',
|
|
17
|
+
},
|
|
18
|
+
parameters: {
|
|
19
|
+
componentSubtitle: `import { Button } from 'react-restyle-components'`,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
exports.default = meta;
|
|
23
|
+
exports.Primary = {
|
|
24
|
+
// parameters: {
|
|
25
|
+
// backgrounds: {
|
|
26
|
+
// default: 'dark',
|
|
27
|
+
// },
|
|
28
|
+
// },
|
|
29
|
+
args: {
|
|
30
|
+
disable: false,
|
|
31
|
+
type: 'solid' || 'outline',
|
|
32
|
+
children: react_1.default.createElement("span", null, "Primary"),
|
|
33
|
+
onClick: (0, test_1.fn)(),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
// export const Disable: Story = {
|
|
37
|
+
// args: {
|
|
38
|
+
// ...Primary.args,
|
|
39
|
+
// children: <span>Disable</span>,
|
|
40
|
+
// disable: true,
|
|
41
|
+
// },
|
|
42
|
+
// };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../../tc.css';
|
|
3
|
+
interface ButtonProps {
|
|
4
|
+
type?: 'solid' | 'outline';
|
|
5
|
+
className?: any;
|
|
6
|
+
disable?: boolean;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const Button: ({ type, className, disable, onClick, children, }: ButtonProps) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
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.Button = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
require("../../../tc.css");
|
|
9
|
+
const Button = ({ type = 'solid', className = 'w-40', disable = false, onClick, children, }) => {
|
|
10
|
+
const buttonColorClass = type === 'solid'
|
|
11
|
+
? 'text-white bg-[#007BFF] hover:bg-[#007BFF] hover:shadow-lg text-white'
|
|
12
|
+
: 'dark:text-white text-black border border-gray-400 hover:shadow-lg';
|
|
13
|
+
return (react_1.default.createElement("button", { "data-testid": "buttonElement", disabled: disable, className: `${className} rounded-100px px-3 py-1 text-md ${buttonColorClass} pt-2 pb-2 font-nunitoSansRegular ${disable ? 'opacity-50' : 'opacity-100'}`, onClick: () => onClick() }, children));
|
|
14
|
+
};
|
|
15
|
+
exports.Button = Button;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
/* eslint-disable testing-library/render-result-naming-convention */
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const _core_utils_1 = require("@core-utils");
|
|
9
|
+
const buttons_component_1 = require("./buttons.component");
|
|
10
|
+
it('render Button correctly', () => {
|
|
11
|
+
const button = (0, _core_utils_1.render)(react_1.default.createElement(buttons_component_1.Button, { className: "bg-gray-light w-40", onClick: () => jest.fn() }, "Permanent Address"));
|
|
12
|
+
expect(button).toMatchSnapshot();
|
|
13
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../../tc.css';
|
|
3
|
+
interface CheckBoxProps {
|
|
4
|
+
title: string;
|
|
5
|
+
data: Array<any>;
|
|
6
|
+
className?: string;
|
|
7
|
+
disable?: boolean;
|
|
8
|
+
onChange: (items: any) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const CheckBox: ({ title, data, className, onChange, }: CheckBoxProps) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
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.CheckBox = void 0;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
require("../../../tc.css");
|
|
29
|
+
const svg_1 = require("../../../library/assets/svg");
|
|
30
|
+
const form_component_1 = require("../form/form.component");
|
|
31
|
+
const CheckBox = ({ title = 'Banks', data = [{ title: 'SBI Bank', checked: false }], className, onChange, }) => {
|
|
32
|
+
const [list, setList] = (0, react_1.useState)(data);
|
|
33
|
+
const width = 20;
|
|
34
|
+
return (react_1.default.createElement(form_component_1.InputWrapper, { label: title }, list?.map((item, index) => (react_1.default.createElement("div", { className: `${className} flex flex-row items-center `, onClick: () => {
|
|
35
|
+
const result = list?.map((e, i) => {
|
|
36
|
+
if (i === index)
|
|
37
|
+
return { ...e, checked: !item.checked };
|
|
38
|
+
else
|
|
39
|
+
return { ...e };
|
|
40
|
+
});
|
|
41
|
+
setList(result);
|
|
42
|
+
onChange(result?.filter((item) => item.checked));
|
|
43
|
+
}, key: index },
|
|
44
|
+
react_1.default.createElement("div", { className: "flex mt-1" }, item.checked ? (react_1.default.createElement(svg_1.CheckedBox, { width: width, height: width, fill: "#E7503D", stroke: "E7503D" })) : (react_1.default.createElement(svg_1.UnCheckbox, { width: width, height: width }))),
|
|
45
|
+
react_1.default.createElement("span", null, item?.title))))));
|
|
46
|
+
};
|
|
47
|
+
exports.CheckBox = CheckBox;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Primary = void 0;
|
|
4
|
+
const checkBox_component_1 = require("./checkBox.component");
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Design System/Atoms/CheckBox',
|
|
7
|
+
component: checkBox_component_1.CheckBox,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
componentSubtitle: `import { CheckBox } from 'react-restyle-components'`,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
exports.default = meta;
|
|
14
|
+
exports.Primary = {
|
|
15
|
+
args: {
|
|
16
|
+
title: 'Banks',
|
|
17
|
+
data: [
|
|
18
|
+
{ title: 'SBI Bank', checked: false },
|
|
19
|
+
{ title: 'ICICI Bank', checked: false },
|
|
20
|
+
],
|
|
21
|
+
disable: false,
|
|
22
|
+
onChange: (item) => {
|
|
23
|
+
console.log({ item });
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
/* eslint-disable testing-library/render-result-naming-convention */
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const _core_utils_1 = require("@core-utils");
|
|
9
|
+
const checkBox_component_1 = require("./checkBox.component");
|
|
10
|
+
it('render CheckBox correctly', () => {
|
|
11
|
+
const checkbox = (0, _core_utils_1.render)(react_1.default.createElement(checkBox_component_1.CheckBox, { title: "Title", data: [], onChange: () => jest.fn() }));
|
|
12
|
+
expect(checkbox).toMatchSnapshot();
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../../tc.css';
|
|
3
|
+
import 'react-datepicker/dist/react-datepicker.css';
|
|
4
|
+
interface DatePickerProps {
|
|
5
|
+
title: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
disable?: boolean;
|
|
9
|
+
showFormat?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const DatePickerComp: ({ title, className, disable, value, showFormat, placeholder, }: DatePickerProps) => React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.DatePickerComp = void 0;
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
require("../../../tc.css");
|
|
32
|
+
const react_datepicker_1 = __importDefault(require("react-datepicker"));
|
|
33
|
+
require("react-datepicker/dist/react-datepicker.css");
|
|
34
|
+
const svg_1 = require("../../../library/assets/svg");
|
|
35
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
36
|
+
const form_component_1 = require("../form/form.component");
|
|
37
|
+
const DatePickerComp = ({ title = 'Title', className, disable, value, showFormat = 'yyyy-MM-dd', placeholder = 'Select Date', }) => {
|
|
38
|
+
const [pickedDate, setPickedDate] = (0, react_1.useState)(value && (0, dayjs_1.default)(value).toDate());
|
|
39
|
+
const CustomInput = (0, react_1.forwardRef)((props, ref) => {
|
|
40
|
+
return (react_1.default.createElement("div", { onClick: !disable && props.onClick, ref: ref, className: " border-gray-light place-items-center border rounded-md px-2 flex " },
|
|
41
|
+
react_1.default.createElement("label", { className: "mr-3 font-nunitoSansRegular text-primaryCharcoal text-lg" }, props.value || props.placeholder),
|
|
42
|
+
react_1.default.createElement(svg_1.DatePickerSvg, { width: 15, height: 15 })));
|
|
43
|
+
});
|
|
44
|
+
CustomInput.displayName = 'CustomInput';
|
|
45
|
+
const handleChanges = (date) => {
|
|
46
|
+
setPickedDate(date);
|
|
47
|
+
};
|
|
48
|
+
return (react_1.default.createElement(form_component_1.InputWrapper, { label: title },
|
|
49
|
+
react_1.default.createElement("div", { className: `${className} flex zIndex-999` },
|
|
50
|
+
react_1.default.createElement(react_datepicker_1.default, { selected: pickedDate || new Date(), dateFormat: showFormat, placeholder: placeholder, onChange: handleChanges, customInput: react_1.default.createElement(CustomInput, null) }))));
|
|
51
|
+
};
|
|
52
|
+
exports.DatePickerComp = DatePickerComp;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { DatePickerComp } from './date-picker.component';
|
|
3
|
+
declare const meta: Meta<typeof DatePickerComp>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof DatePickerComp>;
|
|
6
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,24 @@
|
|
|
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.Primary = void 0;
|
|
7
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
8
|
+
const date_picker_component_1 = require("./date-picker.component");
|
|
9
|
+
const meta = {
|
|
10
|
+
title: 'Design System/Atoms/DatePicker',
|
|
11
|
+
component: date_picker_component_1.DatePickerComp,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
parameters: {
|
|
14
|
+
componentSubtitle: `import { DatePickerComp } from 'react-restyle-components'`,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
exports.default = meta;
|
|
18
|
+
exports.Primary = {
|
|
19
|
+
args: {
|
|
20
|
+
title: 'Date',
|
|
21
|
+
value: (0, dayjs_1.default)().format('YYYY-MM-DD'),
|
|
22
|
+
showFormat: 'dd-MM-yyyy',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
/* eslint-disable testing-library/render-result-naming-convention */
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const _core_utils_1 = require("@core-utils");
|
|
9
|
+
const date_picker_component_1 = require("./date-picker.component");
|
|
10
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
11
|
+
it('render DatePicker correctly', () => {
|
|
12
|
+
const datepicker = (0, _core_utils_1.render)(react_1.default.createElement(date_picker_component_1.DatePickerComp, { title: "Date", className: "mt-6", value: (0, dayjs_1.default)().format('YYYY-MM-DD'), showFormat: 'dd-MM-yyyy' }));
|
|
13
|
+
expect(datepicker).toMatchSnapshot();
|
|
14
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../../tc.css';
|
|
3
|
+
import '../../../tc.css';
|
|
4
|
+
interface LabelProps {
|
|
5
|
+
htmlFor: string;
|
|
6
|
+
hasError?: boolean;
|
|
7
|
+
style?: any;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const Label: React.FunctionComponent<LabelProps>;
|
|
11
|
+
interface InputWrapperProps {
|
|
12
|
+
id?: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
hasError?: boolean;
|
|
16
|
+
style?: any;
|
|
17
|
+
ref?: any;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const InputWrapper: React.FunctionComponent<InputWrapperProps>;
|
|
21
|
+
interface InputProps extends InputWrapperProps {
|
|
22
|
+
value?: any;
|
|
23
|
+
defaultValue?: any;
|
|
24
|
+
name?: string;
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
type?: string;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
className?: string;
|
|
30
|
+
labelClassName?: string;
|
|
31
|
+
rows?: number;
|
|
32
|
+
style?: any;
|
|
33
|
+
wrapperStyle?: any;
|
|
34
|
+
hasError?: boolean;
|
|
35
|
+
pattern?: any;
|
|
36
|
+
maxLength?: number;
|
|
37
|
+
isAutoFocus?: boolean;
|
|
38
|
+
input2isBlurEnable?: boolean;
|
|
39
|
+
onChange?: (e: any) => void;
|
|
40
|
+
onBlur?: (e: any) => void;
|
|
41
|
+
onKeyDown?: (e: any) => void;
|
|
42
|
+
onKeyUp?: (e: any) => void;
|
|
43
|
+
inputRef?: any;
|
|
44
|
+
}
|
|
45
|
+
export declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
|
|
46
|
+
export declare const InputPassword: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
|
|
47
|
+
export declare const Input1: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
|
|
48
|
+
export declare const Input2: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
|
|
49
|
+
export declare const MultilineInput: (props: InputProps) => React.JSX.Element;
|
|
50
|
+
export declare const MultilineInput1: (props: InputProps) => React.JSX.Element;
|
|
51
|
+
interface InputRadioProps extends InputWrapperProps {
|
|
52
|
+
values?: any[];
|
|
53
|
+
value?: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
required?: boolean;
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
labelStyle?: any;
|
|
58
|
+
onChange?: (e: any) => void;
|
|
59
|
+
}
|
|
60
|
+
export declare const InputRadio: (props: InputRadioProps) => React.JSX.Element;
|
|
61
|
+
interface InputDateProps extends InputWrapperProps {
|
|
62
|
+
value?: any;
|
|
63
|
+
name?: string;
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
hasError?: boolean;
|
|
67
|
+
format?: string;
|
|
68
|
+
use12Hours?: boolean;
|
|
69
|
+
isCalenderOpen?: boolean;
|
|
70
|
+
minDate?: Date;
|
|
71
|
+
maxDate?: Date;
|
|
72
|
+
onChange?: (e: any) => void;
|
|
73
|
+
onCalendarToggle?: (status: boolean) => void;
|
|
74
|
+
onFocusRemove?: (date: any) => void;
|
|
75
|
+
}
|
|
76
|
+
export declare const InputDate: ({ name, value, placeholder, use12Hours, label, id, hasError, disabled, format, onChange, onFocusRemove, }: InputDateProps) => React.JSX.Element;
|
|
77
|
+
export declare const CheckBox: (props: any) => React.JSX.Element;
|
|
78
|
+
interface InputFileProps extends InputWrapperProps {
|
|
79
|
+
value?: any;
|
|
80
|
+
name?: string;
|
|
81
|
+
placeholder?: string;
|
|
82
|
+
disabled?: boolean;
|
|
83
|
+
accept?: string;
|
|
84
|
+
multiple?: boolean;
|
|
85
|
+
hasError?: boolean;
|
|
86
|
+
onChange?: (e: any) => void;
|
|
87
|
+
}
|
|
88
|
+
export declare const InputFile: (props: InputFileProps) => React.JSX.Element;
|
|
89
|
+
interface ToggleProps extends InputWrapperProps {
|
|
90
|
+
disabled?: boolean;
|
|
91
|
+
isToggleLabel?: boolean;
|
|
92
|
+
defaultChecked?: boolean;
|
|
93
|
+
className?: string;
|
|
94
|
+
icons?: any;
|
|
95
|
+
value?: boolean;
|
|
96
|
+
name?: string;
|
|
97
|
+
onChange?: (e: boolean) => void;
|
|
98
|
+
style?: any;
|
|
99
|
+
}
|
|
100
|
+
export declare const Toggle: (props: ToggleProps) => React.JSX.Element;
|
|
101
|
+
export declare const DeliveryScheduleToggle: (props: ToggleProps) => React.JSX.Element;
|
|
102
|
+
export {};
|