react-restyle-components 0.1.45 → 0.1.47
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/App.js +12 -36
- package/lib/cjs/App.test.js +8 -10
- package/lib/cjs/core-components/atoms/buttons/button.stories.js +24 -26
- package/lib/cjs/core-components/atoms/buttons/buttons.component.js +9 -27
- package/lib/cjs/core-components/atoms/buttons/buttons.test.js +7 -15
- package/lib/cjs/core-components/atoms/check-box/checkBox.component.js +35 -102
- package/lib/cjs/core-components/atoms/check-box/checkBox.stories.js +17 -17
- package/lib/cjs/core-components/atoms/check-box/checkBox.test.js +7 -15
- package/lib/cjs/core-components/atoms/date-picker/date-picker.component.js +37 -98
- package/lib/cjs/core-components/atoms/date-picker/date-picker.stories.js +15 -17
- package/lib/cjs/core-components/atoms/date-picker/date-picker.test.js +7 -16
- package/lib/cjs/core-components/atoms/form/form.component.js +159 -571
- package/lib/cjs/core-components/atoms/form/form.test.js +59 -87
- package/lib/cjs/core-components/atoms/icons/icons.component.js +58 -41
- 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/input/input-otp.component.js +76 -118
- package/lib/cjs/core-components/atoms/input/input-pin.component.js +98 -180
- package/lib/cjs/core-components/atoms/input/input-pin.stories.js +14 -14
- package/lib/cjs/core-components/atoms/input/input-pin.test.js +10 -28
- package/lib/cjs/core-components/atoms/input/input.component.js +33 -104
- package/lib/cjs/core-components/atoms/input/input.stories.js +15 -15
- package/lib/cjs/core-components/atoms/input/input.test.js +10 -30
- package/lib/cjs/core-components/atoms/input-dropdown/input-dropdown.component.js +53 -127
- package/lib/cjs/core-components/atoms/input-dropdown/input-dropdown.stories.js +12 -12
- package/lib/cjs/core-components/atoms/input-dropdown/input-dropdown.test.js +7 -16
- package/lib/cjs/core-components/atoms/loader/loader.component.js +21 -83
- package/lib/cjs/core-components/atoms/loader/loader.stories.js +8 -8
- package/lib/cjs/core-components/atoms/loader/loader.test.js +7 -11
- package/lib/cjs/core-components/atoms/radio/radio.component.js +37 -102
- package/lib/cjs/core-components/atoms/radio/radio.stories.js +16 -16
- package/lib/cjs/core-components/atoms/radio/radio.test.js +7 -15
- package/lib/cjs/core-components/atoms/stepper/stepper.component.js +34 -77
- package/lib/cjs/core-components/atoms/stepper/stepper.stories.js +13 -13
- package/lib/cjs/core-components/atoms/stepper/stepper.test.js +7 -16
- package/lib/cjs/core-components/atoms/tabs/tabs.component.js +32 -81
- package/lib/cjs/core-components/atoms/tabs/tabs.stories.js +16 -16
- package/lib/cjs/core-components/atoms/tabs/tabs.stories.js.map +1 -1
- package/lib/cjs/core-components/atoms/tabs/tabs.test.js +13 -20
- package/lib/cjs/core-components/atoms/timer/timer.component.js +92 -119
- package/lib/cjs/core-components/atoms/timer/timer.test.js +10 -20
- package/lib/cjs/core-components/atoms/tooltip/tooltip.component.js +45 -85
- package/lib/cjs/core-components/atoms/tooltip/tooltip.component.test.js +9 -13
- package/lib/cjs/core-components/atoms/tooltip/tooltip.stories.js +8 -8
- package/lib/cjs/core-components/index.js +27 -64
- package/lib/cjs/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +106 -210
- package/lib/cjs/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.test.js +9 -23
- package/lib/cjs/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.stories.js +36 -38
- package/lib/cjs/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +104 -209
- package/lib/cjs/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.test.js +16 -28
- package/lib/cjs/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.stories.js +22 -24
- package/lib/cjs/core-components/molecules/css-multiline-input/css-multiline-input.component.js +106 -203
- package/lib/cjs/core-components/molecules/css-multiline-input/css-multiline-input.stories.js +8 -8
- package/lib/cjs/core-components/molecules/css-multiline-input/css-multiline-input.test.js +7 -14
- package/lib/cjs/core-components/molecules/css-multiline-input/css-properties.js +159 -159
- package/lib/cjs/core-utils/index.js +15 -31
- package/lib/cjs/core-utils/unit-test.utils.js +6 -8
- package/lib/cjs/index.js +15 -31
- 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.js +13 -39
- 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/cjs/reportWebVitals.js +1 -1
- package/lib/cjs/setupTests.js +1 -1
- package/lib/esm/App.js +12 -34
- package/lib/esm/App.test.js +8 -8
- package/lib/esm/core-components/atoms/buttons/button.stories.js +24 -24
- package/lib/esm/core-components/atoms/buttons/buttons.component.js +7 -23
- package/lib/esm/core-components/atoms/buttons/buttons.test.js +7 -13
- package/lib/esm/core-components/atoms/check-box/checkBox.component.js +19 -65
- package/lib/esm/core-components/atoms/check-box/checkBox.stories.js +18 -18
- package/lib/esm/core-components/atoms/check-box/checkBox.test.js +7 -13
- package/lib/esm/core-components/atoms/date-picker/date-picker.component.js +21 -54
- package/lib/esm/core-components/atoms/date-picker/date-picker.stories.js +14 -14
- package/lib/esm/core-components/atoms/date-picker/date-picker.test.js +8 -15
- package/lib/esm/core-components/atoms/form/form.component.js +138 -513
- package/lib/esm/core-components/atoms/form/form.test.js +60 -78
- package/lib/esm/core-components/atoms/icons/icons.component.js +32 -36
- 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/input/input-otp.component.js +59 -80
- package/lib/esm/core-components/atoms/input/input-pin.component.js +81 -142
- package/lib/esm/core-components/atoms/input/input-pin.stories.js +15 -15
- package/lib/esm/core-components/atoms/input/input-pin.test.js +10 -26
- package/lib/esm/core-components/atoms/input/input.component.js +16 -66
- package/lib/esm/core-components/atoms/input/input.stories.js +16 -16
- package/lib/esm/core-components/atoms/input/input.test.js +10 -28
- package/lib/esm/core-components/atoms/input-dropdown/input-dropdown.component.js +36 -95
- package/lib/esm/core-components/atoms/input-dropdown/input-dropdown.stories.js +13 -13
- package/lib/esm/core-components/atoms/input-dropdown/input-dropdown.test.js +7 -14
- package/lib/esm/core-components/atoms/loader/loader.component.js +20 -80
- package/lib/esm/core-components/atoms/loader/loader.stories.js +9 -9
- package/lib/esm/core-components/atoms/loader/loader.test.js +7 -7
- package/lib/esm/core-components/atoms/radio/radio.component.js +21 -65
- package/lib/esm/core-components/atoms/radio/radio.stories.js +17 -17
- package/lib/esm/core-components/atoms/radio/radio.test.js +7 -13
- package/lib/esm/core-components/atoms/stepper/stepper.component.js +32 -74
- package/lib/esm/core-components/atoms/stepper/stepper.stories.js +14 -14
- package/lib/esm/core-components/atoms/stepper/stepper.test.js +7 -14
- package/lib/esm/core-components/atoms/tabs/tabs.component.js +15 -43
- package/lib/esm/core-components/atoms/tabs/tabs.stories.js +17 -17
- package/lib/esm/core-components/atoms/tabs/tabs.stories.js.map +1 -1
- package/lib/esm/core-components/atoms/tabs/tabs.test.js +13 -18
- package/lib/esm/core-components/atoms/timer/timer.component.js +75 -81
- package/lib/esm/core-components/atoms/timer/timer.test.js +10 -10
- package/lib/esm/core-components/atoms/tooltip/tooltip.component.js +25 -46
- package/lib/esm/core-components/atoms/tooltip/tooltip.component.test.js +9 -9
- package/lib/esm/core-components/atoms/tooltip/tooltip.stories.js +9 -9
- package/lib/esm/core-components/index.js +19 -19
- package/lib/esm/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +88 -170
- package/lib/esm/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.test.js +9 -17
- package/lib/esm/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.stories.js +37 -38
- package/lib/esm/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +86 -169
- package/lib/esm/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.test.js +16 -22
- package/lib/esm/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.stories.js +23 -24
- package/lib/esm/core-components/molecules/css-multiline-input/css-multiline-input.component.js +90 -166
- package/lib/esm/core-components/molecules/css-multiline-input/css-multiline-input.stories.js +9 -9
- package/lib/esm/core-components/molecules/css-multiline-input/css-multiline-input.test.js +7 -9
- package/lib/esm/core-components/molecules/css-multiline-input/css-properties.js +159 -159
- package/lib/esm/core-utils/index.js +2 -2
- package/lib/esm/core-utils/unit-test.utils.js +5 -5
- package/lib/esm/index.js +2 -2
- package/lib/esm/library/assets/svg/index.js +10 -19
- package/lib/esm/reportWebVitals.js +1 -1
- package/lib/esm/setupTests.js +2 -2
- package/lib/package.json +124 -0
- package/package.json +4 -4
|
@@ -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>
|
package/lib/cjs/setupTests.js
CHANGED
|
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
// expect(element).toHaveTextContent(/react/i)
|
|
6
6
|
// learn more: https://github.com/testing-library/jest-dom
|
|
7
7
|
require("@testing-library/jest-dom");
|
|
8
|
-
//# sourceMappingURL=setupTests.js.map
|
|
8
|
+
//# sourceMappingURL=setupTests.js.map
|
package/lib/esm/App.js
CHANGED
|
@@ -1,37 +1,15 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import logo from
|
|
3
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import logo from './logo.svg';
|
|
3
|
+
import './App.css';
|
|
4
4
|
function App() {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
className: "App-logo",
|
|
14
|
-
alt: "logo",
|
|
15
|
-
}),
|
|
16
|
-
React.createElement(
|
|
17
|
-
"p",
|
|
18
|
-
null,
|
|
19
|
-
"Edit ",
|
|
20
|
-
React.createElement("code", null, "src/App.tsx"),
|
|
21
|
-
" and save to reload.",
|
|
22
|
-
),
|
|
23
|
-
React.createElement(
|
|
24
|
-
"a",
|
|
25
|
-
{
|
|
26
|
-
className: "App-link",
|
|
27
|
-
href: "https://reactjs.org",
|
|
28
|
-
target: "_blank",
|
|
29
|
-
rel: "noopener noreferrer",
|
|
30
|
-
},
|
|
31
|
-
"Learn React",
|
|
32
|
-
),
|
|
33
|
-
),
|
|
34
|
-
);
|
|
5
|
+
return (React.createElement("div", { className: "App" },
|
|
6
|
+
React.createElement("header", { className: "App-header" },
|
|
7
|
+
React.createElement("img", { src: logo, className: "App-logo", alt: "logo" }),
|
|
8
|
+
React.createElement("p", null,
|
|
9
|
+
"Edit ",
|
|
10
|
+
React.createElement("code", null, "src/App.tsx"),
|
|
11
|
+
" and save to reload."),
|
|
12
|
+
React.createElement("a", { className: "App-link", href: "https://reactjs.org", target: "_blank", rel: "noopener noreferrer" }, "Learn React"))));
|
|
35
13
|
}
|
|
36
14
|
export default App;
|
|
37
|
-
//# sourceMappingURL=App.js.map
|
|
15
|
+
//# sourceMappingURL=App.js.map
|
package/lib/esm/App.test.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { render, screen } from
|
|
3
|
-
import App from
|
|
4
|
-
test(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import App from './App';
|
|
4
|
+
test('renders learn react link', () => {
|
|
5
|
+
render(React.createElement(App, null));
|
|
6
|
+
const linkElement = screen.getByText(/learn react/i);
|
|
7
|
+
expect(linkElement).toBeInTheDocument();
|
|
8
8
|
});
|
|
9
|
-
//# sourceMappingURL=App.test.js.map
|
|
9
|
+
//# sourceMappingURL=App.test.js.map
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Button } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from './buttons.component';
|
|
3
3
|
// import {Title, Component, Source, Canvas, ArgTypes} from '@storybook/blocks';
|
|
4
|
-
import { fn } from
|
|
4
|
+
import { fn } from '@storybook/test';
|
|
5
5
|
const meta = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
title: 'Design System/Atoms/Button',
|
|
7
|
+
component: Button,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
args: {
|
|
10
|
+
className: 'w-40',
|
|
11
|
+
},
|
|
12
|
+
parameters: {
|
|
13
|
+
componentSubtitle: `import { Button } from 'react-restyle-components'`,
|
|
14
|
+
},
|
|
15
15
|
};
|
|
16
16
|
export default meta;
|
|
17
17
|
export const Primary = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
// parameters: {
|
|
19
|
+
// backgrounds: {
|
|
20
|
+
// default: 'dark',
|
|
21
|
+
// },
|
|
22
|
+
// },
|
|
23
|
+
args: {
|
|
24
|
+
disable: false,
|
|
25
|
+
type: 'solid' || 'outline',
|
|
26
|
+
children: React.createElement("span", null, "Primary"),
|
|
27
|
+
onClick: fn(),
|
|
28
|
+
},
|
|
29
29
|
};
|
|
30
30
|
// export const Disable: Story = {
|
|
31
31
|
// args: {
|
|
@@ -34,4 +34,4 @@ export const Primary = {
|
|
|
34
34
|
// disable: true,
|
|
35
35
|
// },
|
|
36
36
|
// };
|
|
37
|
-
//# sourceMappingURL=button.stories.js.map
|
|
37
|
+
//# sourceMappingURL=button.stories.js.map
|
|
@@ -1,24 +1,8 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
export const Button = ({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
onClick,
|
|
7
|
-
children,
|
|
8
|
-
}) => {
|
|
9
|
-
const buttonColorClass =
|
|
10
|
-
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.createElement(
|
|
14
|
-
"button",
|
|
15
|
-
{
|
|
16
|
-
"data-testid": "buttonElement",
|
|
17
|
-
disabled: disable,
|
|
18
|
-
className: `${className} rounded-100px px-3 py-1 text-md ${buttonColorClass} pt-2 pb-2 font-nunitoSansRegular ${disable ? "opacity-50" : "opacity-100"}`,
|
|
19
|
-
onClick: () => onClick(),
|
|
20
|
-
},
|
|
21
|
-
children,
|
|
22
|
-
);
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const Button = ({ type = 'solid', className = 'w-40', disable = false, onClick, children, }) => {
|
|
3
|
+
const buttonColorClass = type === 'solid'
|
|
4
|
+
? 'text-white bg-[#007BFF] hover:bg-[#007BFF] hover:shadow-lg text-white'
|
|
5
|
+
: 'dark:text-white text-black border border-gray-400 hover:shadow-lg';
|
|
6
|
+
return (React.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));
|
|
23
7
|
};
|
|
24
|
-
//# sourceMappingURL=buttons.component.js.map
|
|
8
|
+
//# sourceMappingURL=buttons.component.js.map
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
/* eslint-disable testing-library/render-result-naming-convention */
|
|
2
|
-
import React from
|
|
3
|
-
import { render } from
|
|
4
|
-
import { Button } from
|
|
5
|
-
it(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Button,
|
|
9
|
-
{ className: "bg-gray-light w-40", onClick: () => jest.fn() },
|
|
10
|
-
"Permanent Address",
|
|
11
|
-
),
|
|
12
|
-
);
|
|
13
|
-
expect(button).toMatchSnapshot();
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { render } from '@core-utils';
|
|
4
|
+
import { Button } from './buttons.component';
|
|
5
|
+
it('render Button correctly', () => {
|
|
6
|
+
const button = render(React.createElement(Button, { className: "bg-gray-light w-40", onClick: () => jest.fn() }, "Permanent Address"));
|
|
7
|
+
expect(button).toMatchSnapshot();
|
|
14
8
|
});
|
|
15
|
-
//# sourceMappingURL=buttons.test.js.map
|
|
9
|
+
//# sourceMappingURL=buttons.test.js.map
|
|
@@ -1,66 +1,20 @@
|
|
|
1
|
-
import React, { useState } from
|
|
2
|
-
import { UnCheckbox, CheckedBox } from
|
|
3
|
-
import { InputWrapper } from
|
|
4
|
-
export const CheckBox = ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"div",
|
|
20
|
-
{
|
|
21
|
-
className: `${className} flex flex-row items-center `,
|
|
22
|
-
onClick: () => {
|
|
23
|
-
const result =
|
|
24
|
-
list === null || list === void 0
|
|
25
|
-
? void 0
|
|
26
|
-
: list.map((e, i) => {
|
|
27
|
-
if (i == index)
|
|
28
|
-
return Object.assign(Object.assign({}, e), {
|
|
29
|
-
checked: !item.checked,
|
|
30
|
-
});
|
|
31
|
-
else return Object.assign({}, e);
|
|
32
|
-
});
|
|
33
|
-
setList(result);
|
|
34
|
-
onChange(
|
|
35
|
-
result === null || result === void 0
|
|
36
|
-
? void 0
|
|
37
|
-
: result.filter((item) => item.checked),
|
|
38
|
-
);
|
|
39
|
-
},
|
|
40
|
-
key: index,
|
|
41
|
-
},
|
|
42
|
-
React.createElement(
|
|
43
|
-
"div",
|
|
44
|
-
{ className: "flex mt-1" },
|
|
45
|
-
item.checked
|
|
46
|
-
? React.createElement(CheckedBox, {
|
|
47
|
-
width: width,
|
|
48
|
-
height: width,
|
|
49
|
-
fill: "#E7503D",
|
|
50
|
-
stroke: "E7503D",
|
|
51
|
-
})
|
|
52
|
-
: React.createElement(UnCheckbox, {
|
|
53
|
-
width: width,
|
|
54
|
-
height: width,
|
|
55
|
-
}),
|
|
56
|
-
),
|
|
57
|
-
React.createElement(
|
|
58
|
-
"span",
|
|
59
|
-
null,
|
|
60
|
-
item === null || item === void 0 ? void 0 : item.title,
|
|
61
|
-
),
|
|
62
|
-
),
|
|
63
|
-
),
|
|
64
|
-
);
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { UnCheckbox, CheckedBox } from '../../../library/assets/svg';
|
|
3
|
+
import { InputWrapper } from '../form/form.component';
|
|
4
|
+
export const CheckBox = ({ title = 'Banks', data = [{ title: 'SBI Bank', checked: false }], className, onChange, }) => {
|
|
5
|
+
const [list, setList] = useState(data);
|
|
6
|
+
const width = 20;
|
|
7
|
+
return (React.createElement(InputWrapper, { label: title }, list === null || list === void 0 ? void 0 : list.map((item, index) => (React.createElement("div", { className: `${className} flex flex-row items-center `, onClick: () => {
|
|
8
|
+
const result = list === null || list === void 0 ? void 0 : list.map((e, i) => {
|
|
9
|
+
if (i == index)
|
|
10
|
+
return Object.assign(Object.assign({}, e), { checked: !item.checked });
|
|
11
|
+
else
|
|
12
|
+
return Object.assign({}, e);
|
|
13
|
+
});
|
|
14
|
+
setList(result);
|
|
15
|
+
onChange(result === null || result === void 0 ? void 0 : result.filter((item) => item.checked));
|
|
16
|
+
}, key: index },
|
|
17
|
+
React.createElement("div", { className: "flex mt-1" }, item.checked ? (React.createElement(CheckedBox, { width: width, height: width, fill: "#E7503D", stroke: "E7503D" })) : (React.createElement(UnCheckbox, { width: width, height: width }))),
|
|
18
|
+
React.createElement("span", null, item === null || item === void 0 ? void 0 : item.title))))));
|
|
65
19
|
};
|
|
66
|
-
//# sourceMappingURL=checkBox.component.js.map
|
|
20
|
+
//# sourceMappingURL=checkBox.component.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { CheckBox } from
|
|
1
|
+
import { CheckBox } from './checkBox.component';
|
|
2
2
|
const meta = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
title: 'Design System/Atoms/CheckBox',
|
|
4
|
+
component: CheckBox,
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
parameters: {
|
|
7
|
+
componentSubtitle: `import { CheckBox } from 'react-restyle-components'`,
|
|
8
|
+
},
|
|
9
9
|
};
|
|
10
10
|
export default meta;
|
|
11
11
|
export const Primary1 = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
args: {
|
|
13
|
+
title: 'Banks',
|
|
14
|
+
data: [
|
|
15
|
+
{ title: 'SBI Bank', checked: false },
|
|
16
|
+
{ title: 'ICICI Bank', checked: false },
|
|
17
|
+
],
|
|
18
|
+
disable: false,
|
|
19
|
+
onChange: (item) => {
|
|
20
|
+
console.log({ item });
|
|
21
|
+
},
|
|
21
22
|
},
|
|
22
|
-
},
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=checkBox.stories.js.map
|
|
24
|
+
//# sourceMappingURL=checkBox.stories.js.map
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
/* eslint-disable testing-library/render-result-naming-convention */
|
|
2
|
-
import React from
|
|
3
|
-
import { render } from
|
|
4
|
-
import { CheckBox } from
|
|
5
|
-
it(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
title: "Title",
|
|
9
|
-
data: [],
|
|
10
|
-
onChange: () => jest.fn(),
|
|
11
|
-
}),
|
|
12
|
-
);
|
|
13
|
-
expect(checkbox).toMatchSnapshot();
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { render } from '@core-utils';
|
|
4
|
+
import { CheckBox } from './checkBox.component';
|
|
5
|
+
it('render CheckBox correctly', () => {
|
|
6
|
+
const checkbox = render(React.createElement(CheckBox, { title: "Title", data: [], onChange: () => jest.fn() }));
|
|
7
|
+
expect(checkbox).toMatchSnapshot();
|
|
14
8
|
});
|
|
15
|
-
//# sourceMappingURL=checkBox.test.js.map
|
|
9
|
+
//# sourceMappingURL=checkBox.test.js.map
|
|
@@ -1,55 +1,22 @@
|
|
|
1
|
-
import React, { useState, forwardRef } from
|
|
2
|
-
import DatePicker from
|
|
3
|
-
import
|
|
4
|
-
import { DatePickerSvg } from
|
|
5
|
-
import dayjs from
|
|
6
|
-
import { InputWrapper } from
|
|
7
|
-
export const DatePickerComp = ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
ref: ref,
|
|
22
|
-
className:
|
|
23
|
-
" border-gray-light place-items-center border rounded-md px-2 flex ",
|
|
24
|
-
},
|
|
25
|
-
React.createElement(
|
|
26
|
-
"label",
|
|
27
|
-
{
|
|
28
|
-
className: "mr-3 font-nunitoSansRegular text-primaryCharcoal text-lg",
|
|
29
|
-
},
|
|
30
|
-
props.value || props.placeholder,
|
|
31
|
-
),
|
|
32
|
-
React.createElement(DatePickerSvg, { width: 15, height: 15 }),
|
|
33
|
-
);
|
|
34
|
-
});
|
|
35
|
-
CustomInput.displayName = "CustomInput";
|
|
36
|
-
const handleChanges = (date) => {
|
|
37
|
-
setPickedDate(date);
|
|
38
|
-
};
|
|
39
|
-
return React.createElement(
|
|
40
|
-
InputWrapper,
|
|
41
|
-
{ label: title },
|
|
42
|
-
React.createElement(
|
|
43
|
-
"div",
|
|
44
|
-
{ className: `${className} flex zIndex-999` },
|
|
45
|
-
React.createElement(DatePicker, {
|
|
46
|
-
selected: pickedDate || new Date(),
|
|
47
|
-
dateFormat: showFormat,
|
|
48
|
-
placeholder: placeholder,
|
|
49
|
-
onChange: handleChanges,
|
|
50
|
-
customInput: React.createElement(CustomInput, null),
|
|
51
|
-
}),
|
|
52
|
-
),
|
|
53
|
-
);
|
|
1
|
+
import React, { useState, forwardRef } from 'react';
|
|
2
|
+
import DatePicker from 'react-datepicker';
|
|
3
|
+
import 'react-datepicker/dist/react-datepicker.css';
|
|
4
|
+
import { DatePickerSvg } from '../../../library/assets/svg';
|
|
5
|
+
import dayjs from 'dayjs';
|
|
6
|
+
import { InputWrapper } from '../form/form.component';
|
|
7
|
+
export const DatePickerComp = ({ title = 'Title', className, disable, value, showFormat = 'yyyy-MM-dd', placeholder = 'Select Date', }) => {
|
|
8
|
+
const [pickedDate, setPickedDate] = useState(value && dayjs(value).toDate());
|
|
9
|
+
const CustomInput = forwardRef((props, ref) => {
|
|
10
|
+
return (React.createElement("div", { onClick: !disable && props.onClick, ref: ref, className: " border-gray-light place-items-center border rounded-md px-2 flex " },
|
|
11
|
+
React.createElement("label", { className: "mr-3 font-nunitoSansRegular text-primaryCharcoal text-lg" }, props.value || props.placeholder),
|
|
12
|
+
React.createElement(DatePickerSvg, { width: 15, height: 15 })));
|
|
13
|
+
});
|
|
14
|
+
CustomInput.displayName = 'CustomInput';
|
|
15
|
+
const handleChanges = (date) => {
|
|
16
|
+
setPickedDate(date);
|
|
17
|
+
};
|
|
18
|
+
return (React.createElement(InputWrapper, { label: title },
|
|
19
|
+
React.createElement("div", { className: `${className} flex zIndex-999` },
|
|
20
|
+
React.createElement(DatePicker, { selected: pickedDate || new Date(), dateFormat: showFormat, placeholder: placeholder, onChange: handleChanges, customInput: React.createElement(CustomInput, null) }))));
|
|
54
21
|
};
|
|
55
|
-
//# sourceMappingURL=date-picker.component.js.map
|
|
22
|
+
//# sourceMappingURL=date-picker.component.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import dayjs from
|
|
2
|
-
import { DatePickerComp } from
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { DatePickerComp } from './date-picker.component';
|
|
3
3
|
const meta = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
title: 'Design System/Atoms/DatePicker',
|
|
5
|
+
component: DatePickerComp,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
parameters: {
|
|
8
|
+
componentSubtitle: `import { DatePickerComp } from 'react-restyle-components'`,
|
|
9
|
+
},
|
|
10
10
|
};
|
|
11
11
|
export default meta;
|
|
12
12
|
export const Primary = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
args: {
|
|
14
|
+
title: 'Date',
|
|
15
|
+
value: dayjs().format('YYYY-MM-DD'),
|
|
16
|
+
showFormat: 'dd-MM-yyyy',
|
|
17
|
+
},
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=date-picker.stories.js.map
|
|
19
|
+
//# sourceMappingURL=date-picker.stories.js.map
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/* eslint-disable testing-library/render-result-naming-convention */
|
|
2
|
-
import React from
|
|
3
|
-
import { render } from
|
|
4
|
-
import { DatePickerComp } from
|
|
5
|
-
import dayjs from
|
|
6
|
-
it(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
title: "Date",
|
|
10
|
-
className: "mt-6",
|
|
11
|
-
value: dayjs().format("YYYY-MM-DD"),
|
|
12
|
-
showFormat: "dd-MM-yyyy",
|
|
13
|
-
}),
|
|
14
|
-
);
|
|
15
|
-
expect(datepicker).toMatchSnapshot();
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { render } from '@core-utils';
|
|
4
|
+
import { DatePickerComp } from './date-picker.component';
|
|
5
|
+
import dayjs from 'dayjs';
|
|
6
|
+
it('render DatePicker correctly', () => {
|
|
7
|
+
const datepicker = render(React.createElement(DatePickerComp, { title: "Date", className: "mt-6", value: dayjs().format('YYYY-MM-DD'), showFormat: 'dd-MM-yyyy' }));
|
|
8
|
+
expect(datepicker).toMatchSnapshot();
|
|
16
9
|
});
|
|
17
|
-
//# sourceMappingURL=date-picker.test.js.map
|
|
10
|
+
//# sourceMappingURL=date-picker.test.js.map
|