react-restyle-components 0.1.28 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/lib/cjs/App.js +36 -12
  2. package/lib/cjs/App.test.js +10 -8
  3. package/lib/cjs/core-components/atoms/buttons/button.stories.js +20 -8
  4. package/lib/cjs/core-components/atoms/buttons/buttons.component.js +17 -6
  5. package/lib/cjs/core-components/atoms/buttons/buttons.component.test.js +15 -7
  6. package/lib/cjs/core-components/atoms/check-box/checkBox.component.js +27 -11
  7. package/lib/cjs/core-components/atoms/check-box/checkBox.component.js.map +1 -1
  8. package/lib/cjs/core-components/atoms/check-box/checkBox.component.test.js +14 -7
  9. package/lib/cjs/core-components/atoms/check-box/checkBox.stories.js +22 -9
  10. package/lib/cjs/core-components/atoms/date-picker/date-picker.component.js +98 -38
  11. package/lib/cjs/core-components/atoms/date-picker/date-picker.component.js.map +1 -1
  12. package/lib/cjs/core-components/atoms/date-picker/date-picker.component.test.js +15 -7
  13. package/lib/cjs/core-components/atoms/date-picker/date-picker.stories.js +18 -8
  14. package/lib/cjs/core-components/atoms/input/input-otp.component.js +119 -77
  15. package/lib/cjs/core-components/atoms/input/input-otp.component.js.map +1 -1
  16. package/lib/cjs/core-components/atoms/input/input-otp.styles.css +35 -0
  17. package/lib/cjs/core-components/atoms/input/input-pin.component.js +174 -94
  18. package/lib/cjs/core-components/atoms/input/input-pin.component.test.js +28 -10
  19. package/lib/cjs/core-components/atoms/input/input-pin.stories.js +17 -9
  20. package/lib/cjs/core-components/atoms/input/input.component.js +65 -13
  21. package/lib/cjs/core-components/atoms/input/input.component.test.js +30 -10
  22. package/lib/cjs/core-components/atoms/input/input.stories.js +16 -7
  23. package/lib/cjs/core-components/atoms/input/input.styles.css +35 -0
  24. package/lib/cjs/core-components/atoms/input-dropdown/input-dropdown.component.js +134 -58
  25. package/lib/cjs/core-components/atoms/input-dropdown/input-dropdown.component.js.map +1 -1
  26. package/lib/cjs/core-components/atoms/input-dropdown/input-dropdown.component.test.js +16 -7
  27. package/lib/cjs/core-components/atoms/input-dropdown/input-dropdown.stories.js +14 -7
  28. package/lib/cjs/core-components/atoms/loader/loader.component.js +83 -21
  29. package/lib/cjs/core-components/atoms/loader/loader.component.test.js +11 -7
  30. package/lib/cjs/core-components/atoms/loader/loader.stories.js +14 -8
  31. package/lib/cjs/core-components/atoms/radio/radio.component.js +22 -8
  32. package/lib/cjs/core-components/atoms/radio/radio.component.js.map +1 -1
  33. package/lib/cjs/core-components/atoms/radio/radio.component.test.js +14 -7
  34. package/lib/cjs/core-components/atoms/radio/radio.stories.js +22 -10
  35. package/lib/cjs/core-components/atoms/stepper/stepper.component.js +77 -34
  36. package/lib/cjs/core-components/atoms/stepper/stepper.component.test.js +16 -7
  37. package/lib/cjs/core-components/atoms/stepper/stepper.stories.js +15 -7
  38. package/lib/cjs/core-components/atoms/timer/timer.component.js +120 -93
  39. package/lib/cjs/core-components/atoms/timer/timer.component.js.map +1 -1
  40. package/lib/cjs/core-components/atoms/timer/timer.component.test.js +20 -10
  41. package/lib/cjs/core-components/index.js +35 -16
  42. package/lib/cjs/core-utils/index.js +31 -15
  43. package/lib/cjs/core-utils/unit-test.utils.js +8 -6
  44. package/lib/cjs/index.js +31 -15
  45. package/lib/cjs/reportWebVitals.js +52 -29
  46. package/lib/cjs/setupTests.js +1 -1
  47. package/lib/esm/App.js +34 -12
  48. package/lib/esm/App.test.js +8 -8
  49. package/lib/esm/core-components/atoms/buttons/button.stories.js +17 -7
  50. package/lib/esm/core-components/atoms/buttons/buttons.component.js +13 -4
  51. package/lib/esm/core-components/atoms/buttons/buttons.component.test.js +13 -7
  52. package/lib/esm/core-components/atoms/check-box/checkBox.component.js +20 -9
  53. package/lib/esm/core-components/atoms/check-box/checkBox.component.js.map +1 -1
  54. package/lib/esm/core-components/atoms/check-box/checkBox.component.test.js +9 -7
  55. package/lib/esm/core-components/atoms/check-box/checkBox.stories.js +16 -8
  56. package/lib/esm/core-components/atoms/date-picker/date-picker.component.js +52 -20
  57. package/lib/esm/core-components/atoms/date-picker/date-picker.component.js.map +1 -1
  58. package/lib/esm/core-components/atoms/date-picker/date-picker.component.test.js +14 -8
  59. package/lib/esm/core-components/atoms/date-picker/date-picker.stories.js +16 -8
  60. package/lib/esm/core-components/atoms/input/input-otp.component.js +80 -59
  61. package/lib/esm/core-components/atoms/input/input-otp.component.js.map +1 -1
  62. package/lib/esm/core-components/atoms/input/input-otp.styles.css +35 -0
  63. package/lib/esm/core-components/atoms/input/input-pin.component.js +136 -77
  64. package/lib/esm/core-components/atoms/input/input-pin.component.test.js +26 -10
  65. package/lib/esm/core-components/atoms/input/input-pin.stories.js +14 -8
  66. package/lib/esm/core-components/atoms/input/input.component.js +62 -12
  67. package/lib/esm/core-components/atoms/input/input.component.test.js +28 -10
  68. package/lib/esm/core-components/atoms/input/input.stories.js +13 -6
  69. package/lib/esm/core-components/atoms/input/input.styles.css +35 -0
  70. package/lib/esm/core-components/atoms/input-dropdown/input-dropdown.component.js +96 -37
  71. package/lib/esm/core-components/atoms/input-dropdown/input-dropdown.component.js.map +1 -1
  72. package/lib/esm/core-components/atoms/input-dropdown/input-dropdown.component.test.js +14 -7
  73. package/lib/esm/core-components/atoms/input-dropdown/input-dropdown.stories.js +11 -6
  74. package/lib/esm/core-components/atoms/loader/loader.component.js +80 -20
  75. package/lib/esm/core-components/atoms/loader/loader.component.test.js +7 -7
  76. package/lib/esm/core-components/atoms/loader/loader.stories.js +11 -7
  77. package/lib/esm/core-components/atoms/radio/radio.component.js +12 -6
  78. package/lib/esm/core-components/atoms/radio/radio.component.js.map +1 -1
  79. package/lib/esm/core-components/atoms/radio/radio.component.test.js +9 -7
  80. package/lib/esm/core-components/atoms/radio/radio.stories.js +16 -9
  81. package/lib/esm/core-components/atoms/stepper/stepper.component.js +74 -32
  82. package/lib/esm/core-components/atoms/stepper/stepper.component.test.js +14 -7
  83. package/lib/esm/core-components/atoms/stepper/stepper.stories.js +12 -6
  84. package/lib/esm/core-components/atoms/timer/timer.component.js +81 -75
  85. package/lib/esm/core-components/atoms/timer/timer.component.js.map +1 -1
  86. package/lib/esm/core-components/atoms/timer/timer.component.test.js +10 -10
  87. package/lib/esm/core-components/index.js +12 -12
  88. package/lib/esm/core-utils/index.js +2 -2
  89. package/lib/esm/core-utils/unit-test.utils.js +5 -5
  90. package/lib/esm/index.js +2 -2
  91. package/lib/esm/reportWebVitals.js +10 -10
  92. package/lib/esm/setupTests.js +2 -2
  93. package/package.json +20 -4
@@ -1,13 +1,31 @@
1
1
  /* eslint-disable testing-library/render-result-naming-convention */
2
- import React from 'react';
3
- import { render } from '@core-utils';
4
- import { Input } from './input.component';
5
- it('render Input correctly without error', () => {
6
- const input = render(React.createElement(Input, { className: "h-1 relative top-1 border-red-600 border-b-0 dummy", title: 'input', hasError: false, value: '', inputStyle: " border-b-0 invisible ", onChange: () => jest.fn() }));
7
- expect(input).toMatchSnapshot();
2
+ import React from "react";
3
+ import { render } from "@core-utils";
4
+ import { Input } from "./input.component";
5
+ it("render Input correctly without error", () => {
6
+ const input = render(
7
+ React.createElement(Input, {
8
+ className: "h-1 relative top-1 border-red-600 border-b-0 dummy",
9
+ title: "input",
10
+ hasError: false,
11
+ value: "",
12
+ inputStyle: " border-b-0 invisible ",
13
+ onChange: () => jest.fn(),
14
+ })
15
+ );
16
+ expect(input).toMatchSnapshot();
8
17
  });
9
- it('render Input correctly with error', () => {
10
- const input = render(React.createElement(Input, { className: "h-1 relative top-1 border-red-600 border-b-0 dummy", title: 'input', hasError: true, value: '', inputStyle: " border-b-0 invisible ", onChange: () => jest.fn() }));
11
- expect(input).toMatchSnapshot();
18
+ it("render Input correctly with error", () => {
19
+ const input = render(
20
+ React.createElement(Input, {
21
+ className: "h-1 relative top-1 border-red-600 border-b-0 dummy",
22
+ title: "input",
23
+ hasError: true,
24
+ value: "",
25
+ inputStyle: " border-b-0 invisible ",
26
+ onChange: () => jest.fn(),
27
+ })
28
+ );
29
+ expect(input).toMatchSnapshot();
12
30
  });
13
- //# sourceMappingURL=input.component.test.js.map
31
+ //# sourceMappingURL=input.component.test.js.map
@@ -1,10 +1,17 @@
1
- import React from 'react';
2
- import { Input } from './input.component';
1
+ import React from "react";
2
+ import { Input } from "./input.component";
3
3
  // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
4
4
  export default {
5
- title: 'Atoms/Input',
6
- component: Input,
5
+ title: "Atoms/Input",
6
+ component: Input,
7
7
  };
8
8
  // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
9
- export const Primary = () => (React.createElement(Input, { className: "mt-4", title: "Enter your Pan Number", hasError: true, value: "", onChange: (panNumber) => console.log({ panNumber }) }));
10
- //# sourceMappingURL=input.stories.js.map
9
+ export const Primary = () =>
10
+ React.createElement(Input, {
11
+ className: "mt-4",
12
+ title: "Enter your Pan Number",
13
+ hasError: true,
14
+ value: "",
15
+ onChange: (panNumber) => console.log({ panNumber }),
16
+ });
17
+ //# sourceMappingURL=input.stories.js.map
@@ -0,0 +1,35 @@
1
+ .-z-1 {
2
+ z-index: -1;
3
+ }
4
+
5
+ .origin-0 {
6
+ transform-origin: 0%;
7
+ }
8
+
9
+ input:focus ~ label,
10
+ input:not(:placeholder-shown) ~ label,
11
+ textarea:focus ~ label,
12
+ textarea:not(:placeholder-shown) ~ label,
13
+ select:focus ~ label,
14
+ select:not([value=""]):valid ~ label {
15
+ /* @apply transform; scale-75; -translate-y-6; */
16
+ --tw-translate-x: 0;
17
+ --tw-translate-y: 0;
18
+ --tw-rotate: 0;
19
+ --tw-skew-x: 0;
20
+ --tw-skew-y: 0;
21
+ transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))
22
+ rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
23
+ scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
24
+ --tw-scale-x: 0.75;
25
+ --tw-scale-y: 0.75;
26
+ --tw-translate-y: -1.5rem;
27
+ }
28
+
29
+ input:focus ~ label,
30
+ select:focus ~ label {
31
+ /* @apply text-black; left-0; */
32
+ --tw-text-opacity: 1;
33
+ color: "#696969";
34
+ left: 0px;
35
+ }
@@ -1,38 +1,97 @@
1
- import React, { useState, useEffect, useRef } from 'react';
2
- import UpArrow from '../../../library/assets/svg/UpArrow.svg';
3
- import DownArrow from '../../../library/assets/svg/DownArrow.svg';
4
- export const InputDropdown = ({ items, className, hasError, title, onChange, }) => {
5
- const [isOpen, setIsOpen] = useState(false);
6
- const [value, setValue] = useState('');
7
- const useOutsideAlerter = (ref) => {
8
- useEffect(() => {
9
- function handleClickOutside(event) {
10
- if (ref.current &&
11
- !ref.current.contains(event.target) &&
12
- isOpen &&
13
- isOpen)
14
- setIsOpen(!isOpen);
15
- }
16
- document.addEventListener('mousedown', handleClickOutside);
17
- return () => {
18
- document.removeEventListener('mousedown', handleClickOutside);
19
- };
20
- }, [ref]);
21
- };
22
- const wrapperRef = useRef(null);
23
- useOutsideAlerter(wrapperRef);
24
- return (React.createElement("div", { className: `${className} relative` },
25
- React.createElement("div", { className: "flex flex-row items-center " },
26
- React.createElement("input", { type: "text", name: "name", placeholder: title, value: value, className: " text-gray-dark-secondary pt-3 pb-2 w-full px-0 mt-0 bg-transparent border-gray-secondary border-0 border-b appearance-none focus:outline-none focus:ring-0 font-nunitoSansRegular text-md", onClick: () => {
27
- setIsOpen(!isOpen);
28
- }, onChange: (event) => onChange && onChange(event.target.value) }),
29
- !isOpen && React.createElement("img", { src: UpArrow, className: "absolute h-4 w-4 right-0" }),
30
- isOpen && React.createElement("img", { src: DownArrow, className: "absolute h-4 w-4 right-0" })),
31
- isOpen && (React.createElement("div", { className: "z-10 w-full absolute text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700", ref: wrapperRef },
32
- React.createElement("ul", { className: "py-1" }, items.map((item, index) => (React.createElement("li", { key: index, className: "block py-2 px-4 text-md hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 font-nunitoSansRegular", onClick: () => {
33
- setValue(item);
34
- setIsOpen(!isOpen);
35
- } }, item)))))),
36
- hasError && (React.createElement("span", { className: "text-primaryCharcoal text-4xs", id: "error" }, `${title} is required`))));
1
+ import React, { useState, useEffect, useRef } from "react";
2
+ import UpArrow from "@assets/svg/UpArrow.svg";
3
+ import DownArrow from "@assets/svg/DownArrow.svg";
4
+ export const InputDropdown = ({
5
+ items,
6
+ className,
7
+ hasError,
8
+ title,
9
+ onChange,
10
+ }) => {
11
+ const [isOpen, setIsOpen] = useState(false);
12
+ const [value, setValue] = useState("");
13
+ const useOutsideAlerter = (ref) => {
14
+ useEffect(() => {
15
+ function handleClickOutside(event) {
16
+ if (
17
+ ref.current &&
18
+ !ref.current.contains(event.target) &&
19
+ isOpen &&
20
+ isOpen
21
+ )
22
+ setIsOpen(!isOpen);
23
+ }
24
+ document.addEventListener("mousedown", handleClickOutside);
25
+ return () => {
26
+ document.removeEventListener("mousedown", handleClickOutside);
27
+ };
28
+ }, [ref]);
29
+ };
30
+ const wrapperRef = useRef(null);
31
+ useOutsideAlerter(wrapperRef);
32
+ return React.createElement(
33
+ "div",
34
+ { className: `${className} relative` },
35
+ React.createElement(
36
+ "div",
37
+ { className: "flex flex-row items-center " },
38
+ React.createElement("input", {
39
+ type: "text",
40
+ name: "name",
41
+ placeholder: title,
42
+ value: value,
43
+ className:
44
+ " text-gray-dark-secondary pt-3 pb-2 w-full px-0 mt-0 bg-transparent border-gray-secondary border-0 border-b appearance-none focus:outline-none focus:ring-0 font-nunitoSansRegular text-md",
45
+ onClick: () => {
46
+ setIsOpen(!isOpen);
47
+ },
48
+ onChange: (event) => onChange && onChange(event.target.value),
49
+ }),
50
+ !isOpen &&
51
+ React.createElement("img", {
52
+ src: UpArrow,
53
+ className: "absolute h-4 w-4 right-0",
54
+ }),
55
+ isOpen &&
56
+ React.createElement("img", {
57
+ src: DownArrow,
58
+ className: "absolute h-4 w-4 right-0",
59
+ })
60
+ ),
61
+ isOpen &&
62
+ React.createElement(
63
+ "div",
64
+ {
65
+ className:
66
+ "z-10 w-full absolute text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700",
67
+ ref: wrapperRef,
68
+ },
69
+ React.createElement(
70
+ "ul",
71
+ { className: "py-1" },
72
+ items.map((item, index) =>
73
+ React.createElement(
74
+ "li",
75
+ {
76
+ key: index,
77
+ className:
78
+ "block py-2 px-4 text-md hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 font-nunitoSansRegular",
79
+ onClick: () => {
80
+ setValue(item);
81
+ setIsOpen(!isOpen);
82
+ },
83
+ },
84
+ item
85
+ )
86
+ )
87
+ )
88
+ ),
89
+ hasError &&
90
+ React.createElement(
91
+ "span",
92
+ { className: "text-primaryCharcoal text-4xs", id: "error" },
93
+ `${title} is required`
94
+ )
95
+ );
37
96
  };
38
- //# sourceMappingURL=input-dropdown.component.js.map
97
+ //# sourceMappingURL=input-dropdown.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-dropdown.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/input-dropdown/input-dropdown.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AACzD,OAAO,OAAO,MAAM,yCAAyC,CAAC;AAC9D,OAAO,SAAS,MAAM,2CAA2C,CAAC;AASlE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,QAAQ,EACR,KAAK,EACL,QAAQ,GACW,EAAE,EAAE;IACvB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IACrD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAE/C,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,EAAE;QAChC,SAAS,CAAC,G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AS,EAAC,MAAM,IACjB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,4BACE,GAAG,EAAE,KAAK,EACV,SAAS,EAAC,+GAA+G,EACzH,OAAO,EAAE,GAAG,EAAE;oBACZ,QAAQ,CAAC,IAAI,CAAC,CAAC;oBACf,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;gBACrB,CAAC,IAEA,IAAI,CACF,CACN,CAAC,CACC,CACD,CACP;QAEA,QAAQ,IAAI,CACX,8BAAM,SAAS,EAAC,+BAA+B,EAAC,EAAE,EAAC,OAAO,IACvD,GAAG,KAAK,cAAc,CAClB,CACR,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"input-dropdown.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/input-dropdown/input-dropdown.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AACzD,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,SAAS,MAAM,2BAA2B,CAAC;AASlD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,QAAQ,EACR,KAAK,EACL,QAAQ,GACW,EAAE,EAAE;IACvB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IACrD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAE/C,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,EAAE;QAChC,SAAS,CAAC,GAAG,EAAE;YACb,SAAS,kBAAkB,CAAC,KAAK;gBAC/B,IACE,GAAG,CAAC,OAAO;oBACX,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;oBACnC,MAAM;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E,GAAG,EAAE;oBACZ,QAAQ,CAAC,IAAI,CAAC,CAAC;oBACf,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;gBACrB,CAAC,IAEA,IAAI,CACF,CACN,CAAC,CACC,CACD,CACP;QAEA,QAAQ,IAAI,CACX,8BAAM,SAAS,EAAC,+BAA+B,EAAC,EAAE,EAAC,OAAO,IACvD,GAAG,KAAK,cAAc,CAClB,CACR,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,9 +1,16 @@
1
1
  /* eslint-disable testing-library/render-result-naming-convention */
2
- import React from 'react';
3
- import { render } from '@core-utils';
4
- import { InputDropdown } from './input-dropdown.component';
5
- it('render InputDropdown correctly', () => {
6
- const inputDropDown = render(React.createElement(InputDropdown, { title: "Source of funds", items: ['Bank account', 'UPI', 'Credit Card'], hasError: true, onChange: () => jest.fn() }));
7
- expect(inputDropDown).toMatchSnapshot();
2
+ import React from "react";
3
+ import { render } from "@core-utils";
4
+ import { InputDropdown } from "./input-dropdown.component";
5
+ it("render InputDropdown correctly", () => {
6
+ const inputDropDown = render(
7
+ React.createElement(InputDropdown, {
8
+ title: "Source of funds",
9
+ items: ["Bank account", "UPI", "Credit Card"],
10
+ hasError: true,
11
+ onChange: () => jest.fn(),
12
+ })
13
+ );
14
+ expect(inputDropDown).toMatchSnapshot();
8
15
  });
9
- //# sourceMappingURL=input-dropdown.component.test.js.map
16
+ //# sourceMappingURL=input-dropdown.component.test.js.map
@@ -1,10 +1,15 @@
1
- import React from 'react';
2
- import { InputDropdown } from './input-dropdown.component';
1
+ import React from "react";
2
+ import { InputDropdown } from "./input-dropdown.component";
3
3
  // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
4
4
  export default {
5
- title: 'Atoms/InputDropdown',
6
- component: InputDropdown,
5
+ title: "Atoms/InputDropdown",
6
+ component: InputDropdown,
7
7
  };
8
8
  // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
9
- export const Primary = () => (React.createElement(InputDropdown, { title: "Source of funds", items: ['Bank account', 'UPI', 'Credit Card'], hasError: true }));
10
- //# sourceMappingURL=input-dropdown.stories.js.map
9
+ export const Primary = () =>
10
+ React.createElement(InputDropdown, {
11
+ title: "Source of funds",
12
+ items: ["Bank account", "UPI", "Credit Card"],
13
+ hasError: true,
14
+ });
15
+ //# sourceMappingURL=input-dropdown.stories.js.map
@@ -1,16 +1,48 @@
1
- import React from 'react';
2
- import { Container, Row, Spinner } from 'reactstrap';
3
- export const Loader = () => (React.createElement(Container, { fluid: true, className: "vh-50 d-flex" },
4
- React.createElement(Row, { className: "justify-content-center align-self-center w-100 text-center" },
5
- React.createElement(Spinner, { color: "primary" }))));
1
+ import React from "react";
2
+ import { Container, Row, Spinner } from "reactstrap";
3
+ export const Loader = () =>
4
+ React.createElement(
5
+ Container,
6
+ { fluid: true, className: "vh-50 d-flex" },
7
+ React.createElement(
8
+ Row,
9
+ {
10
+ className: "justify-content-center align-self-center w-100 text-center",
11
+ },
12
+ React.createElement(Spinner, { color: "primary" })
13
+ )
14
+ );
6
15
  export const ModalLoader = () => {
7
- return (React.createElement(React.Fragment, null,
8
- React.createElement(React.Fragment, null,
9
- React.createElement("div", { className: "justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none" },
10
- React.createElement("div", { className: "relative mx-auto " },
11
- React.createElement("div", { className: "border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none" },
12
- React.createElement("div", { className: "relative p-2 flex-auto flex flex-col items-center" },
13
- React.createElement("style", null, `
16
+ return React.createElement(
17
+ React.Fragment,
18
+ null,
19
+ React.createElement(
20
+ React.Fragment,
21
+ null,
22
+ React.createElement(
23
+ "div",
24
+ {
25
+ className:
26
+ "justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none",
27
+ },
28
+ React.createElement(
29
+ "div",
30
+ { className: "relative mx-auto " },
31
+ React.createElement(
32
+ "div",
33
+ {
34
+ className:
35
+ "border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none",
36
+ },
37
+ React.createElement(
38
+ "div",
39
+ {
40
+ className: "relative p-2 flex-auto flex flex-col items-center",
41
+ },
42
+ React.createElement(
43
+ "style",
44
+ null,
45
+ `
14
46
  .spinner .background {
15
47
  fill: #555;
16
48
  }
@@ -42,12 +74,40 @@ export const ModalLoader = () => {
42
74
  transform: rotate(360deg);
43
75
  }
44
76
  }
45
- `),
46
- React.createElement("svg", { className: "spinner", width: "100", height: "100", viewBox: "0 0 100 100" },
47
- React.createElement("circle", { className: "background", cx: "0", cy: "0" }),
48
- React.createElement("path", { className: "line", d: "M 37.5,50 C 37.5,43.096441 43.096441,37.5 50,37.5 C 56.903559,37.5 62.5,43.096441 62.5,50 C 62.5,56.903559 56.903559,62.5 50,62.5 C 43.096441,62.5 37.5,56.903559 37.5,50" })),
49
- ' ',
50
- React.createElement("span", { style: { marginTop: -15 } }, "loading ..."))))),
51
- React.createElement("div", { className: "opacity-25 fixed inset-0 z-40 bg-black" }))));
77
+ `
78
+ ),
79
+ React.createElement(
80
+ "svg",
81
+ {
82
+ className: "spinner",
83
+ width: "100",
84
+ height: "100",
85
+ viewBox: "0 0 100 100",
86
+ },
87
+ React.createElement("circle", {
88
+ className: "background",
89
+ cx: "0",
90
+ cy: "0",
91
+ }),
92
+ React.createElement("path", {
93
+ className: "line",
94
+ d: "M 37.5,50 C 37.5,43.096441 43.096441,37.5 50,37.5 C 56.903559,37.5 62.5,43.096441 62.5,50 C 62.5,56.903559 56.903559,62.5 50,62.5 C 43.096441,62.5 37.5,56.903559 37.5,50",
95
+ })
96
+ ),
97
+ " ",
98
+ React.createElement(
99
+ "span",
100
+ { style: { marginTop: -15 } },
101
+ "loading ..."
102
+ )
103
+ )
104
+ )
105
+ )
106
+ ),
107
+ React.createElement("div", {
108
+ className: "opacity-25 fixed inset-0 z-40 bg-black",
109
+ })
110
+ )
111
+ );
52
112
  };
53
- //# sourceMappingURL=loader.component.js.map
113
+ //# sourceMappingURL=loader.component.js.map
@@ -1,9 +1,9 @@
1
1
  /* eslint-disable testing-library/render-result-naming-convention */
2
- import React from 'react';
3
- import { render } from '@core-utils';
4
- import { Loader } from './loader.component';
5
- it('render XB_Loader correctly', () => {
6
- const loader = render(React.createElement(Loader, null));
7
- expect(loader).toMatchSnapshot();
2
+ import React from "react";
3
+ import { render } from "@core-utils";
4
+ import { Loader } from "./loader.component";
5
+ it("render XB_Loader correctly", () => {
6
+ const loader = render(React.createElement(Loader, null));
7
+ expect(loader).toMatchSnapshot();
8
8
  });
9
- //# sourceMappingURL=loader.component.test.js.map
9
+ //# sourceMappingURL=loader.component.test.js.map
@@ -1,11 +1,15 @@
1
- import React from 'react';
2
- import { Loader } from './loader.component';
1
+ import React from "react";
2
+ import { Loader } from "./loader.component";
3
3
  // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
4
4
  export default {
5
- title: 'Atoms/Loader',
6
- component: Loader,
5
+ title: "Atoms/Loader",
6
+ component: Loader,
7
7
  };
8
8
  // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
9
- export const Primary = () => (React.createElement("div", { className: "flex flex-row" },
10
- React.createElement(Loader, null)));
11
- //# sourceMappingURL=loader.stories.js.map
9
+ export const Primary = () =>
10
+ React.createElement(
11
+ "div",
12
+ { className: "flex flex-row" },
13
+ React.createElement(Loader, null)
14
+ );
15
+ //# sourceMappingURL=loader.stories.js.map
@@ -1,8 +1,14 @@
1
- import React from 'react';
2
- import { ReactComponent as CheckedRadio } from '../../../library/assets/svg/checkedRadio.svg';
3
- import { ReactComponent as UncheckRadio } from '../../../library/assets/svg/uncheckRadio.svg';
1
+ import React from "react";
2
+ import { ReactComponent as CheckedRadio } from "@assets/svg/checkedRadio.svg";
3
+ import { ReactComponent as UncheckRadio } from "@assets/svg/uncheckRadio.svg";
4
4
  export const Radio = ({ className, checked, onChange }) => {
5
- const width = 20;
6
- return (React.createElement("div", { className: `${className} flex flex-row mr-2`, onClick: onChange }, checked ? (React.createElement(CheckedRadio, { width: width, height: width })) : (React.createElement(UncheckRadio, { width: width, height: width }))));
5
+ const width = 20;
6
+ return React.createElement(
7
+ "div",
8
+ { className: `${className} flex flex-row mr-2`, onClick: onChange },
9
+ checked
10
+ ? React.createElement(CheckedRadio, { width: width, height: width })
11
+ : React.createElement(UncheckRadio, { width: width, height: width })
12
+ );
7
13
  };
8
- //# sourceMappingURL=radio.component.js.map
14
+ //# sourceMappingURL=radio.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/radio/radio.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,cAAc,IAAI,YAAY,EAAC,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAC,cAAc,IAAI,YAAY,EAAC,MAAM,8CAA8C,CAAC;AAQ5F,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAa,EAAE,EAAE;IAClE,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,OAAO,CACL,6BAAK,SAAS,EAAE,GAAG,SAAS,qBAAqB,EAAE,OAAO,EAAE,QAAQ,IACjE,OAAO,CAAC,CAAC,CAAC,CACT,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAI,CAC9C,CAAC,CAAC,CAAC,CACF,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAI,CAC9C,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"radio.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/radio/radio.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,cAAc,IAAI,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAC,cAAc,IAAI,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAQ5E,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAa,EAAE,EAAE;IAClE,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,OAAO,CACL,6BAAK,SAAS,EAAE,GAAG,SAAS,qBAAqB,EAAE,OAAO,EAAE,QAAQ,IACjE,OAAO,CAAC,CAAC,CAAC,CACT,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAI,CAC9C,CAAC,CAAC,CAAC,CACF,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAI,CAC9C,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,9 +1,11 @@
1
1
  /* eslint-disable testing-library/render-result-naming-convention */
2
- import React from 'react';
3
- import { render } from '@core-utils';
4
- import { Radio } from './radio.component';
5
- it('render XB_Radio correctly', () => {
6
- const radio = render(React.createElement(Radio, { checked: true, onChange: () => jest.fn() }));
7
- expect(radio).toMatchSnapshot();
2
+ import React from "react";
3
+ import { render } from "@core-utils";
4
+ import { Radio } from "./radio.component";
5
+ it("render XB_Radio correctly", () => {
6
+ const radio = render(
7
+ React.createElement(Radio, { checked: true, onChange: () => jest.fn() })
8
+ );
9
+ expect(radio).toMatchSnapshot();
8
10
  });
9
- //# sourceMappingURL=radio.component.test.js.map
11
+ //# sourceMappingURL=radio.component.test.js.map
@@ -1,13 +1,20 @@
1
- import React from 'react';
2
- import { Radio } from './radio.component';
1
+ import React from "react";
2
+ import { Radio } from "./radio.component";
3
3
  // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
4
4
  export default {
5
- title: 'Atoms/Radio',
6
- component: Radio,
5
+ title: "Atoms/Radio",
6
+ component: Radio,
7
7
  };
8
8
  // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
9
- export const Primary = () => (React.createElement(React.Fragment, null,
10
- React.createElement("div", { className: "flex flex-row" },
11
- React.createElement(Radio, { checked: true, onChange: () => { } }),
12
- React.createElement("span", null, "Married"))));
13
- //# sourceMappingURL=radio.stories.js.map
9
+ export const Primary = () =>
10
+ React.createElement(
11
+ React.Fragment,
12
+ null,
13
+ React.createElement(
14
+ "div",
15
+ { className: "flex flex-row" },
16
+ React.createElement(Radio, { checked: true, onChange: () => {} }),
17
+ React.createElement("span", null, "Married")
18
+ )
19
+ );
20
+ //# sourceMappingURL=radio.stories.js.map