sprint-asia-custom-component 0.1.89 → 0.1.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -23834,7 +23834,7 @@
23834
23834
  }, title), isRequired && /*#__PURE__*/React__default["default"].createElement("p", {
23835
23835
  className: "text-sm font-normal text-danger500 ml-1"
23836
23836
  }, "*")), /*#__PURE__*/React__default["default"].createElement("div", {
23837
- className: "cursor-pointer py-1 border border-neutral40 bg-neutral20 rounded-md w-fit flex items-center"
23837
+ className: "cursor-pointer py-1 border border-black bg-white rounded-md w-fit flex items-center"
23838
23838
  }, /*#__PURE__*/React__default["default"].createElement("div", {
23839
23839
  className: "p-2"
23840
23840
  }, /*#__PURE__*/React__default["default"].createElement(PiCalendarBlankDuotone, {
@@ -23848,7 +23848,7 @@
23848
23848
  selectsRange: true,
23849
23849
  utcOffset: 0,
23850
23850
  dateFormat: "d MMM yyyy",
23851
- className: "cursor-pointer bg-neutral20 text-neutral300 rounded-md pr-2 focus:outline-none text-sm"
23851
+ className: "cursor-pointer bg-white text-neutral300 rounded-md pr-2 focus:outline-none text-sm"
23852
23852
  })));
23853
23853
  };
23854
23854
 
@@ -28891,7 +28891,7 @@
28891
28891
  as: "div",
28892
28892
  className: "relative z-10",
28893
28893
  initialFocus: cancelButtonRef,
28894
- onClose: () => props.isOpen,
28894
+ onClose: () => props.onClose,
28895
28895
  static: true
28896
28896
  }, /*#__PURE__*/React__default["default"].createElement(qe.Child, {
28897
28897
  as: React.Fragment,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sprint-asia-custom-component",
3
3
  "main": "dist/index.js",
4
- "version": "0.1.89",
4
+ "version": "0.1.91",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@headlessui/react": "^1.7.18",
@@ -19,7 +19,7 @@ const CustomDatePicker = ({ startDate, onChangeStartDate, endDate, onChangeEndDa
19
19
  </div>
20
20
  )}
21
21
 
22
- <div className="cursor-pointer py-1 border border-neutral40 bg-neutral20 rounded-md w-fit flex items-center">
22
+ <div className="cursor-pointer py-1 border border-black bg-white rounded-md w-fit flex items-center">
23
23
  <div className="p-2">
24
24
  <PiCalendarBlankDuotone size={16} className="text-neutral300" />
25
25
  </div>
@@ -32,7 +32,7 @@ const CustomDatePicker = ({ startDate, onChangeStartDate, endDate, onChangeEndDa
32
32
  selectsRange
33
33
  utcOffset={0}
34
34
  dateFormat="d MMM yyyy"
35
- className="cursor-pointer bg-neutral20 text-neutral300 rounded-md pr-2 focus:outline-none text-sm"
35
+ className="cursor-pointer bg-white text-neutral300 rounded-md pr-2 focus:outline-none text-sm"
36
36
  />
37
37
  </div>
38
38
  </div>
@@ -1,62 +1,69 @@
1
- import React from 'react'
2
- import { Fragment, useRef} from 'react'
3
- import { Dialog, Transition } from '@headlessui/react'
4
- import LogoSuccess from "../../../assets/images/logo_success.png"
5
- import LogoFailed from "../../../assets/images/logo_failed.png"
1
+ import React from "react";
2
+ import { Fragment, useRef } from "react";
3
+ import { Dialog, Transition } from "@headlessui/react";
4
+ import LogoSuccess from "../../../assets/images/logo_success.png";
5
+ import LogoFailed from "../../../assets/images/logo_failed.png";
6
6
 
7
7
  const ModalResult = (props) => {
8
- const cancelButtonRef = useRef(null)
8
+ const cancelButtonRef = useRef(null);
9
9
 
10
10
  function handleBackgroundClick(e) {
11
- e.stopPropagation()
11
+ e.stopPropagation();
12
12
  }
13
13
 
14
14
  return (
15
15
  <Transition.Root show={props.isOpen} as={Fragment}>
16
- <Dialog as="div" className="relative z-10" initialFocus={cancelButtonRef} onClose={() => props.isOpen} static={true}>
16
+ <Dialog
17
+ as="div"
18
+ className="relative z-10"
19
+ initialFocus={cancelButtonRef}
20
+ onClose={() => props.onClose}
21
+ static={true}
22
+ >
23
+ <Transition.Child
24
+ as={Fragment}
25
+ enter="ease-out duration-300"
26
+ enterFrom="opacity-0"
27
+ enterTo="opacity-100"
28
+ leave="ease-in duration-200"
29
+ leaveFrom="opacity-100"
30
+ leaveTo="opacity-0"
31
+ >
32
+ <div className="fixed inset-0 bg-black bg-opacity-25 transition-opacity" onClick={handleBackgroundClick} />
33
+ </Transition.Child>
34
+
35
+ <div className="fixed inset-0 z-10 w-screen overflow-y-auto">
36
+ <div className="flex min-h-full items-center justify-center p-4 text-center sm:items-center sm:p-0">
17
37
  <Transition.Child
18
- as={Fragment}
19
- enter="ease-out duration-300"
20
- enterFrom="opacity-0"
21
- enterTo="opacity-100"
22
- leave="ease-in duration-200"
23
- leaveFrom="opacity-100"
24
- leaveTo="opacity-0"
38
+ as={Fragment}
39
+ enter="ease-out duration-300"
40
+ enterFrom="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
41
+ enterTo="opacity-100 translate-y-0 sm:scale-100"
42
+ leave="ease-in duration-200"
43
+ leaveFrom="opacity-100 translate-y-0 sm:scale-100"
44
+ leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
25
45
  >
26
- <div className="fixed inset-0 bg-black bg-opacity-25 transition-opacity" onClick={handleBackgroundClick}/>
27
- </Transition.Child>
28
-
29
- <div className="fixed inset-0 z-10 w-screen overflow-y-auto">
30
- <div className="flex min-h-full items-center justify-center p-4 text-center sm:items-center sm:p-0">
31
- <Transition.Child
32
- as={Fragment}
33
- enter="ease-out duration-300"
34
- enterFrom="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
35
- enterTo="opacity-100 translate-y-0 sm:scale-100"
36
- leave="ease-in duration-200"
37
- leaveFrom="opacity-100 translate-y-0 sm:scale-100"
38
- leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
39
- >
40
- <Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all w-80">
41
- <div className="bg-white px-4 pb-4 pt-5 sm:p-4 text-center">
42
- <div className='flex justify-center items-center my-3'>
43
- {
44
- props.type == "success" ?
45
- <img src={LogoSuccess} className='w-14 h-14'/>
46
- :
47
- <img src={LogoFailed} className='w-14 h-14'/>
48
- }
49
- </div>
50
- <p className='text-xl text-black font-semibold mt-2'>{props.type == "success" ? "Success" : "Failed"}</p>
51
- <p className='text-sm text-black mb-2'>{props.subtitle}</p>
52
- </div>
53
- </Dialog.Panel>
54
- </Transition.Child>
46
+ <Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all w-80">
47
+ <div className="bg-white px-4 pb-4 pt-5 sm:p-4 text-center">
48
+ <div className="flex justify-center items-center my-3">
49
+ {props.type == "success" ? (
50
+ <img src={LogoSuccess} className="w-14 h-14" />
51
+ ) : (
52
+ <img src={LogoFailed} className="w-14 h-14" />
53
+ )}
54
+ </div>
55
+ <p className="text-xl text-black font-semibold mt-2">
56
+ {props.type == "success" ? "Success" : "Failed"}
57
+ </p>
58
+ <p className="text-sm text-black mb-2">{props.subtitle}</p>
55
59
  </div>
56
- </div>
57
- </Dialog>
60
+ </Dialog.Panel>
61
+ </Transition.Child>
62
+ </div>
63
+ </div>
64
+ </Dialog>
58
65
  </Transition.Root>
59
- )
60
- }
66
+ );
67
+ };
61
68
 
62
- export default ModalResult
69
+ export default ModalResult;