@prosperitainova/mirage-ui 1.0.23 → 1.0.25

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.
@@ -2,7 +2,7 @@ import { Props as ReactSelectProps } from "react-select";
2
2
  import "../../../src/theme/fonts/ProximaNova.css";
3
3
  export type SelectProps = Omit<ReactSelectProps, "onChange"> & {
4
4
  onChange?: (e: any) => void;
5
- error?: string;
5
+ error?: string | boolean;
6
6
  success?: boolean;
7
7
  helper?: string;
8
8
  label?: string;
@@ -1,13 +1,15 @@
1
1
  import { InputHTMLAttributes, TextareaHTMLAttributes } from "react";
2
2
  import "../../../src/theme/fonts/ProximaNova.css";
3
3
  export type InputProps = InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement> & {
4
+ value?: string | number | boolean | readonly string[] | undefined;
4
5
  error?: string | boolean;
5
6
  success?: boolean;
6
7
  helper?: string;
7
8
  label?: string;
8
9
  newPassword?: boolean;
9
10
  newPasswordLevel?: string;
10
- filled?: boolean;
11
+ search?: boolean;
12
+ mask?: string;
11
13
  };
12
14
  declare const Input: (props: InputProps) => JSX.Element;
13
15
  export default Input;
@@ -0,0 +1,13 @@
1
+ import "../../../src/theme/fonts/ProximaNova.css";
2
+ export type InputCurrencyProps = {
3
+ value?: string | number | boolean | readonly string[] | undefined;
4
+ error?: string | boolean;
5
+ success?: boolean;
6
+ helper?: string;
7
+ label?: string;
8
+ disabled?: boolean;
9
+ required?: boolean;
10
+ type?: string;
11
+ };
12
+ declare const InputCurrency: (props: InputCurrencyProps) => JSX.Element;
13
+ export default InputCurrency;
@@ -0,0 +1,8 @@
1
+ import { InputCurrencyProps } from "./InputCurrency";
2
+ import { Story } from "@storybook/react";
3
+ declare const InputCurrencyStories: {
4
+ title: string;
5
+ component: (props: InputCurrencyProps) => JSX.Element;
6
+ };
7
+ export default InputCurrencyStories;
8
+ export declare const Primary: Story<InputCurrencyProps>;
@@ -0,0 +1 @@
1
+ export { default } from "./InputCurrency";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InputProps as InputMaskProps } from "./MaskInput";
2
3
  import { Story } from "@storybook/react";
3
4
  declare const InputStories: {
@@ -9,10 +9,11 @@ export type NotificationsBarProps = {
9
9
  message?: string;
10
10
  notifications?: NotificationsProps[];
11
11
  onNotificationClick?: (notification: NotificationsProps, index: number) => void;
12
- left: number;
13
- right: number;
14
- top: number;
15
- bottom: number;
12
+ left?: number;
13
+ right?: number;
14
+ top?: number;
15
+ bottom?: number;
16
+ open?: boolean;
16
17
  };
17
18
  declare const NotificationBar: (props: NotificationsBarProps) => JSX.Element;
18
19
  export default NotificationBar;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NotificationsBarProps } from "./NotificationsBar";
2
3
  import { Story } from "@storybook/react";
3
4
  declare const SearchStories: {
@@ -2,7 +2,7 @@ import "../../../src/theme/fonts/ProximaNova.css";
2
2
  export type MenuItem = {
3
3
  icon: string;
4
4
  text: string;
5
- onClick?: () => void;
5
+ onMenuClick?: () => void;
6
6
  };
7
7
  export type SideBarProps = {
8
8
  menu: MenuItem[];
@@ -18,5 +18,6 @@ export { default as TabMenu } from "./TabMenu";
18
18
  export { default as Toast } from "./Toast";
19
19
  export { default as Toggle } from "./Toggle";
20
20
  export { default as ProgressBar } from "./ProgressBar";
21
- export { default as MaskInput } from "./MaskInput";
22
21
  export { default as InputToken } from "./InputToken";
22
+ export { default as Table } from "./Table";
23
+ export { default as InputCurrency } from "./InputCurrency";
package/dist/index.d.ts CHANGED
@@ -63,16 +63,18 @@ type DropzoneProps = {
63
63
  };
64
64
  declare const Dropzone: (props: DropzoneProps) => JSX.Element;
65
65
 
66
- type InputProps$1 = InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement> & {
66
+ type InputProps = InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement> & {
67
+ value?: string | number | boolean | readonly string[] | undefined;
67
68
  error?: string | boolean;
68
69
  success?: boolean;
69
70
  helper?: string;
70
71
  label?: string;
71
72
  newPassword?: boolean;
72
73
  newPasswordLevel?: string;
73
- filled?: boolean;
74
+ search?: boolean;
75
+ mask?: string;
74
76
  };
75
- declare const Input: (props: InputProps$1) => JSX.Element;
77
+ declare const Input: (props: InputProps) => JSX.Element;
76
78
 
77
79
  type ModalProps$1 = HTMLAttributes<HTMLDivElement> & {
78
80
  open?: boolean;
@@ -115,10 +117,11 @@ type NotificationsBarProps = {
115
117
  message?: string;
116
118
  notifications?: NotificationsProps[];
117
119
  onNotificationClick?: (notification: NotificationsProps, index: number) => void;
118
- left: number;
119
- right: number;
120
- top: number;
121
- bottom: number;
120
+ left?: number;
121
+ right?: number;
122
+ top?: number;
123
+ bottom?: number;
124
+ open?: boolean;
122
125
  };
123
126
  declare const NotificationBar: (props: NotificationsBarProps) => JSX.Element;
124
127
 
@@ -160,7 +163,7 @@ declare const Search: (props: SearchProps) => JSX.Element;
160
163
 
161
164
  type SelectProps = Omit<Props, "onChange"> & {
162
165
  onChange?: (e: any) => void;
163
- error?: string;
166
+ error?: string | boolean;
164
167
  success?: boolean;
165
168
  helper?: string;
166
169
  label?: string;
@@ -170,7 +173,7 @@ declare const CustomSelect: (props: SelectProps) => JSX.Element;
170
173
  type MenuItem = {
171
174
  icon: string;
172
175
  text: string;
173
- onClick?: () => void;
176
+ onMenuClick?: () => void;
174
177
  };
175
178
  type SideBarProps = {
176
179
  menu: MenuItem[];
@@ -222,19 +225,32 @@ type ProgressBarProps = {
222
225
  };
223
226
  declare const ProgressBar: (props: ProgressBarProps) => JSX.Element;
224
227
 
225
- type InputProps = InputHTMLAttributes<HTMLInputElement> & {
228
+ type InputTokenProps = {
229
+ inputsNumber?: number;
230
+ };
231
+ declare function InputToken({ inputsNumber: numberOfInputs }: InputTokenProps): JSX.Element;
232
+
233
+ type TableColumn<T = any> = {
234
+ label: string;
235
+ key: string;
236
+ render?: (data: T) => JSX.Element;
237
+ };
238
+ type TableProps = {
239
+ columns: TableColumn<any>[];
240
+ data: any[];
241
+ };
242
+ declare const Table: ({ data, columns }: TableProps) => JSX.Element;
243
+
244
+ type InputCurrencyProps = {
245
+ value?: string | number | boolean | readonly string[] | undefined;
226
246
  error?: string | boolean;
227
247
  success?: boolean;
228
248
  helper?: string;
229
249
  label?: string;
230
- cep?: boolean;
231
- mask?: string;
232
- };
233
- declare const MaskInput: (props: InputProps) => JSX.Element;
234
-
235
- type InputTokenProps = {
236
- inputsNumber?: number;
250
+ disabled?: boolean;
251
+ required?: boolean;
252
+ type?: string;
237
253
  };
238
- declare function InputToken({ inputsNumber: numberOfInputs }: InputTokenProps): JSX.Element;
254
+ declare const InputCurrency: (props: InputCurrencyProps) => JSX.Element;
239
255
 
240
- export { Breadcrumb, Button, ButtonDropdown, Checkbox, CustomSelect, Dropzone, Input, InputToken, InteractiveModal, lateralModal as LateralModal, MaskInput, MenuDropdown as Menudropdown, NotificationBar as NotificationsBar, ProgressBar, Radio, RadioGroup, Search, SideBar, Spacer, TabMenu, Toast, Toggle };
256
+ export { Breadcrumb, Button, ButtonDropdown, Checkbox, CustomSelect, Dropzone, Input, InputCurrency, InputToken, InteractiveModal, lateralModal as LateralModal, MenuDropdown as Menudropdown, NotificationBar as NotificationsBar, ProgressBar, Radio, RadioGroup, Search, SideBar, Spacer, TabMenu, Table, Toast, Toggle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosperitainova/mirage-ui",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -8,9 +8,10 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
11
- "@types/react-input-mask": "^3.0.2",
11
+ "typescript": "^4.9.4",
12
12
  "react-dropzone": "^14.2.3",
13
13
  "react-input-mask": "^2.0.4",
14
+ "react-number-format": "^5.1.3",
14
15
  "react-select": "^5.7.0",
15
16
  "typescript": "^4.9.4"
16
17
  },
@@ -75,6 +76,7 @@
75
76
  "@types/node": "^16.18.8",
76
77
  "@types/react": "^18.0.26",
77
78
  "@types/styled-components": "^5.1.26",
79
+ "@types/react-input-mask": "^3.0.2",
78
80
  "babel-plugin-named-exports-order": "^0.0.2",
79
81
  "postcss": "^8.4.21",
80
82
  "postcss-assets": "^6.0.0",