react-restyle-components 0.2.71 → 0.2.72

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.2.70",
3
+ "version": "0.2.71",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "author": {
@@ -1 +1 @@
1
- {"version":3,"file":"icons.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.component.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAI9C,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,IAAI,0DAMd,SAAS,KAAG,WA8Ed,CAAC"}
1
+ {"version":3,"file":"icons.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.component.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAI9C,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,IAAI,0DAMd,SAAS,KAAG,WA8Ed,CAAC"}
@@ -25,6 +25,7 @@ export * from './molecules/auto-complete-filter-multiple-select-multiple-fields-
25
25
  export * from './molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component';
26
26
  export * from './molecules/multi-select/multi-select.component';
27
27
  export * from './molecules/multi-select-with-field/multi-select-with-field.component';
28
+ export * from './molecules/modal/modal.component';
28
29
  export * from './molecules/modal-confirm/modal-confirm.component';
29
30
  export * from './molecules/autocomplete/autocomplete';
30
31
  export * from './molecules/auto-complete-group-by/auto-complete-group-by.component';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,6BAA6B,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iDAAiD,CAAC;AAChE,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AAExD,cAAc,+DAA+D,CAAC;AAC9E,cAAc,iJAAiJ,CAAC;AAChK,cAAc,6IAA6I,CAAC;AAC5J,cAAc,iDAAiD,CAAC;AAChE,cAAc,uEAAuE,CAAC;AACtF,cAAc,mDAAmD,CAAC;AAClE,cAAc,uCAAuC,CAAC;AACtD,cAAc,qEAAqE,CAAC;AACpF,cAAc,iDAAiD,CAAC;AAChE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,6FAA6F,CAAC;AAE5G,OAAO,EAAC,IAAI,EAAC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,6BAA6B,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iDAAiD,CAAC;AAChE,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,yCAAyC,CAAC;AAExD,cAAc,+DAA+D,CAAC;AAC9E,cAAc,iJAAiJ,CAAC;AAChK,cAAc,6IAA6I,CAAC;AAC5J,cAAc,iDAAiD,CAAC;AAChE,cAAc,uEAAuE,CAAC;AACtF,cAAc,mCAAmC,CAAC;AAClD,cAAc,mDAAmD,CAAC;AAClE,cAAc,uCAAuC,CAAC;AACtD,cAAc,qEAAqE,CAAC;AACpF,cAAc,iDAAiD,CAAC;AAChE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,6FAA6F,CAAC;AAE5G,OAAO,EAAC,IAAI,EAAC,CAAC"}
@@ -25,6 +25,7 @@ export * from './molecules/auto-complete-filter-multiple-select-multiple-fields-
25
25
  export * from './molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component';
26
26
  export * from './molecules/multi-select/multi-select.component';
27
27
  export * from './molecules/multi-select-with-field/multi-select-with-field.component';
28
+ export * from './molecules/modal/modal.component';
28
29
  export * from './molecules/modal-confirm/modal-confirm.component';
29
30
  export * from './molecules/autocomplete/autocomplete';
30
31
  export * from './molecules/auto-complete-group-by/auto-complete-group-by.component';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface ModalProps {
3
+ visible: boolean;
4
+ title: string;
5
+ onClose?: () => void;
6
+ isAutoClose?: boolean;
7
+ children?: React.ReactNode;
8
+ }
9
+ export declare const Modal: ({ visible, title, onClose, isAutoClose, children, }: ModalProps) => import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=modal.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/molecules/modal/modal.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,KAAK,wDAMf,UAAU,4CAyCZ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import React, { useEffect } from 'react';
3
+ export const Modal = ({ visible, title, onClose, isAutoClose = false, children, }) => {
4
+ const [showModal, setShowModal] = React.useState(visible);
5
+ useEffect(() => {
6
+ setShowModal(visible);
7
+ if (isAutoClose) {
8
+ setTimeout(() => {
9
+ onClose && onClose();
10
+ }, 1000);
11
+ }
12
+ }, [visible]);
13
+ return (_jsx(_Fragment, { children: showModal && (_jsxs(_Fragment, { children: [_jsx("div", { className: "justify-center items-center overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none", children: _jsx("div", { className: "relative w-auto my-5 mx-auto max-w-7xl", children: _jsxs("div", { className: "border-0 rounded-lg shadow-lg relative flex flex-col bg-white outline-none focus:outline-none", children: [_jsxs("div", { className: "flex items-start justify-between p-2 border-b border-solid border-gray-300 rounded-t", children: [_jsx("h3", { className: "text-xl font-semibold", children: title }), _jsx("button", { className: "p-1 border-0 text-black opacity-1 ml-6 float-right text-3xl leading-none font-semibold outline-none focus:outline-none", onClick: () => {
14
+ onClose && onClose();
15
+ setShowModal(false);
16
+ }, children: _jsx("span", { className: " text-black h-6 w-6 text-2xl block outline-none focus:outline-none", children: "\u00D7" }) })] }), _jsx("div", { className: "flex p-2 w-auto h-auto ", children: children })] }) }) }), _jsx("div", { className: "opacity-25 fixed inset-0 z-40 bg-black" })] })) }));
17
+ };
@@ -26,6 +26,7 @@
26
26
  } .mx-8 { margin-left: 2rem; margin-right: 2rem;
27
27
  } .mx-auto { margin-left: auto; margin-right: auto;
28
28
  } .my-4 { margin-top: 1rem; margin-bottom: 1rem;
29
+ } .my-5 { margin-top: 1.25rem; margin-bottom: 1.25rem;
29
30
  } .my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem;
30
31
  } .my-auto { margin-top: auto; margin-bottom: auto;
31
32
  } .-mt-2 { margin-top: -0.5rem;
@@ -64,6 +65,7 @@
64
65
  } .w-fit { width: fit-content;
65
66
  } .w-full { width: 100%;
66
67
  } .min-w-80 { min-width: 20rem;
68
+ } .max-w-7xl { max-width: 80rem;
67
69
  } .max-w-full { max-width: 100%;
68
70
  } .flex-1 { flex: 1 1 0%;
69
71
  } .-translate-x-1\/2 { --tw-translate-x: -50%; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -80,6 +82,7 @@
80
82
  } .flex-col { flex-direction: column;
81
83
  } .flex-wrap { flex-wrap: wrap;
82
84
  } .place-items-center { place-items: center;
85
+ } .items-start { align-items: flex-start;
83
86
  } .items-center { align-items: center;
84
87
  } .items-stretch { align-items: stretch;
85
88
  } .justify-end { justify-content: flex-end;
@@ -155,6 +158,7 @@
155
158
  } .text-base { font-size: 1rem; line-height: 1.5rem;
156
159
  } .text-lg { font-size: 1.125rem; line-height: 1.75rem;
157
160
  } .text-sm { font-size: 0.875rem; line-height: 1.25rem;
161
+ } .text-xl { font-size: 1.25rem; line-height: 1.75rem;
158
162
  } .font-bold { font-weight: 700;
159
163
  } .font-extrabold { font-weight: 800;
160
164
  } .font-medium { font-weight: 500;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.2.71",
3
+ "version": "0.2.72",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "author": {