@prosperitainova/mirage-ui 1.0.3 → 1.0.6

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 (58) hide show
  1. package/README.md +22 -36
  2. package/dist/cjs/assets/asset-1f5f3d97 +5 -0
  3. package/dist/cjs/assets/asset-90a77f27 +83 -0
  4. package/dist/cjs/assets/asset-d29508fd +2 -0
  5. package/dist/cjs/assets/asset-e29ddd46 +1 -0
  6. package/dist/cjs/index.js +2 -2
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/types/src/lib/Breadcrumb/Breadcrumb.d.ts +1 -0
  9. package/dist/cjs/types/src/lib/Breadcrumb/Breadcrumb.stories.d.ts +1 -0
  10. package/dist/cjs/types/src/lib/Button/Button.d.ts +3 -0
  11. package/dist/cjs/types/src/lib/ButtonDropdown/ButtonDropdown.d.ts +1 -1
  12. package/dist/cjs/types/src/lib/Checkbox/Checkbox.d.ts +1 -0
  13. package/dist/cjs/types/src/lib/Dropzone/Dropzone.d.ts +4 -3
  14. package/dist/cjs/types/src/lib/Dropzone/Dropzone.stories.d.ts +3 -3
  15. package/dist/cjs/types/src/lib/Input/Input.d.ts +1 -0
  16. package/dist/cjs/types/src/lib/InteractiveModal/InteractiveModal.d.ts +1 -0
  17. package/dist/cjs/types/src/lib/LateralModal/LateralModal.d.ts +1 -0
  18. package/dist/cjs/types/src/lib/MenuDropdown/MenuDropdown.d.ts +2 -1
  19. package/dist/cjs/types/src/lib/NotificationsBar/NotificationsBar.d.ts +2 -0
  20. package/dist/cjs/types/src/lib/RadioGroup/RadioGroup.d.ts +1 -0
  21. package/dist/cjs/types/src/lib/Search/Search.d.ts +1 -0
  22. package/dist/cjs/types/src/lib/Sellect/Sellect.d.ts +3 -2
  23. package/dist/cjs/types/src/lib/SideBar/SideBar.d.ts +4 -8
  24. package/dist/cjs/types/src/lib/TabMenu/TabMenu.d.ts +3 -0
  25. package/dist/cjs/types/src/lib/TabMenu/TabMenu.stories.d.ts +1 -0
  26. package/dist/cjs/types/src/lib/Table/Table.d.ts +1 -0
  27. package/dist/cjs/types/src/lib/Toast/Toast.d.ts +1 -0
  28. package/dist/cjs/types/src/theme/DefaultTheme.d.ts +1 -0
  29. package/dist/esm/assets/asset-1f5f3d97 +5 -0
  30. package/dist/esm/assets/asset-90a77f27 +83 -0
  31. package/dist/esm/assets/asset-d29508fd +2 -0
  32. package/dist/esm/assets/asset-e29ddd46 +1 -0
  33. package/dist/esm/index.js +2 -2
  34. package/dist/esm/index.js.map +1 -1
  35. package/dist/esm/types/src/lib/Breadcrumb/Breadcrumb.d.ts +1 -0
  36. package/dist/esm/types/src/lib/Breadcrumb/Breadcrumb.stories.d.ts +1 -0
  37. package/dist/esm/types/src/lib/Button/Button.d.ts +3 -0
  38. package/dist/esm/types/src/lib/ButtonDropdown/ButtonDropdown.d.ts +1 -1
  39. package/dist/esm/types/src/lib/Checkbox/Checkbox.d.ts +1 -0
  40. package/dist/esm/types/src/lib/Dropzone/Dropzone.d.ts +4 -3
  41. package/dist/esm/types/src/lib/Dropzone/Dropzone.stories.d.ts +3 -3
  42. package/dist/esm/types/src/lib/Input/Input.d.ts +1 -0
  43. package/dist/esm/types/src/lib/InteractiveModal/InteractiveModal.d.ts +1 -0
  44. package/dist/esm/types/src/lib/LateralModal/LateralModal.d.ts +1 -0
  45. package/dist/esm/types/src/lib/MenuDropdown/MenuDropdown.d.ts +2 -1
  46. package/dist/esm/types/src/lib/NotificationsBar/NotificationsBar.d.ts +2 -0
  47. package/dist/esm/types/src/lib/RadioGroup/RadioGroup.d.ts +1 -0
  48. package/dist/esm/types/src/lib/Search/Search.d.ts +1 -0
  49. package/dist/esm/types/src/lib/Sellect/Sellect.d.ts +3 -2
  50. package/dist/esm/types/src/lib/SideBar/SideBar.d.ts +4 -8
  51. package/dist/esm/types/src/lib/TabMenu/TabMenu.d.ts +3 -0
  52. package/dist/esm/types/src/lib/TabMenu/TabMenu.stories.d.ts +1 -0
  53. package/dist/esm/types/src/lib/Table/Table.d.ts +1 -0
  54. package/dist/esm/types/src/lib/Toast/Toast.d.ts +1 -0
  55. package/dist/esm/types/src/theme/DefaultTheme.d.ts +1 -0
  56. package/dist/index.d.ts +12 -14
  57. package/package.json +7 -7
  58. package/README.old.md +0 -29
@@ -1,3 +1,4 @@
1
+ import "../../../src/theme/fonts/ProximaNova.css";
1
2
  type ItemsProps = {
2
3
  label: string;
3
4
  href: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Story } from "@storybook/react";
2
3
  declare const BreadcrumbStories: {
3
4
  title: string;
@@ -1,4 +1,5 @@
1
1
  import { ButtonHTMLAttributes } from "react";
2
+ import "../../../src/theme/fonts/ProximaNova.css";
2
3
  export declare const AppButton: import("styled-components").StyledComponent<"button", any, ButtonHTMLAttributes<HTMLButtonElement> & {
3
4
  mode: "main" | "border" | "phantom";
4
5
  link?: boolean | undefined;
@@ -11,6 +12,7 @@ export declare const AppButton: import("styled-components").StyledComponent<"but
11
12
  label?: string | undefined;
12
13
  value?: string | undefined;
13
14
  type?: string | undefined;
15
+ children?: JSX.Element | undefined;
14
16
  }, never>;
15
17
  export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
16
18
  mode: "main" | "border" | "phantom";
@@ -24,6 +26,7 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
24
26
  label?: string;
25
27
  value?: string;
26
28
  type?: string;
29
+ children?: JSX.Element;
27
30
  };
28
31
  declare const Button: (props: ButtonProps) => JSX.Element;
29
32
  export default Button;
@@ -1,4 +1,5 @@
1
1
  import { ButtonHTMLAttributes } from "react";
2
+ import "../../../src/theme/fonts/ProximaNova.css";
2
3
  export type DropdownOptions = {
3
4
  value: string;
4
5
  label: string;
@@ -13,7 +14,6 @@ export type ButtonDropdownProps = ButtonHTMLAttributes<HTMLButtonElement> & {
13
14
  value?: string;
14
15
  type?: string;
15
16
  double?: boolean;
16
- open?: boolean;
17
17
  options: DropdownOptions[];
18
18
  };
19
19
  declare const ButtonDropdown: (props: ButtonDropdownProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ import "../../../src/theme/fonts/ProximaNova.css";
1
2
  export type CheckboxProps = {
2
3
  label?: string;
3
4
  disabled?: boolean;
@@ -1,7 +1,8 @@
1
- /// <reference types="react" />
1
+ import "../../../src/theme/fonts/ProximaNova.css";
2
2
  export type DropzoneProps = {
3
3
  error: string;
4
4
  helper: string;
5
+ onFilesChanged: (files: File[]) => void;
5
6
  };
6
- declare function Previews(props: DropzoneProps): JSX.Element;
7
- export default Previews;
7
+ declare const Dropzone: (props: DropzoneProps) => JSX.Element;
8
+ export default Dropzone;
@@ -1,8 +1,8 @@
1
- import Dropzone from "./Dropzone";
1
+ import { DropzoneProps } from "./Dropzone";
2
2
  import { Story } from "@storybook/react";
3
3
  declare const DropzoneStories: {
4
4
  title: string;
5
- component: typeof Dropzone;
5
+ component: (props: DropzoneProps) => JSX.Element;
6
6
  };
7
7
  export default DropzoneStories;
8
- export declare const DropzoneStory: Story<any>;
8
+ export declare const DropzoneStory: Story<DropzoneProps>;
@@ -1,4 +1,5 @@
1
1
  import { InputHTMLAttributes, TextareaHTMLAttributes } from "react";
2
+ import "../../../src/theme/fonts/ProximaNova.css";
2
3
  export type InputProps = InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement> & {
3
4
  error?: string;
4
5
  success?: boolean;
@@ -1,4 +1,5 @@
1
1
  import { HTMLAttributes } from "react";
2
+ import "../../../src/theme/fonts/ProximaNova.css";
2
3
  export type ModalProps = HTMLAttributes<HTMLDivElement> & {
3
4
  open?: boolean;
4
5
  header?: boolean;
@@ -1,4 +1,5 @@
1
1
  import { HTMLAttributes } from "react";
2
+ import "../../../src/theme/fonts/ProximaNova.css";
2
3
  export type ModalProps = HTMLAttributes<HTMLDivElement> & {
3
4
  open?: boolean;
4
5
  header?: boolean;
@@ -1,4 +1,5 @@
1
1
  import { ButtonHTMLAttributes } from "react";
2
+ import "../../../src/theme/fonts/ProximaNova.css";
2
3
  export type UsersProps = {
3
4
  img: string;
4
5
  name: string;
@@ -6,7 +7,7 @@ export type UsersProps = {
6
7
  };
7
8
  export type MenuDropdownProps = ButtonHTMLAttributes<HTMLButtonElement> & {
8
9
  open?: boolean;
9
- onClick?: (props: string) => void;
10
+ onUserChange?: (user: UsersProps, index: number) => void;
10
11
  users?: UsersProps[];
11
12
  };
12
13
  declare const MenuDropdown: (props: MenuDropdownProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ import "../../../src/theme/fonts/ProximaNova.css";
1
2
  export type NotificationsProps = {
2
3
  img: string;
3
4
  text: string;
@@ -7,6 +8,7 @@ export type NotificationsBarProps = {
7
8
  title: string;
8
9
  message?: string;
9
10
  notifications?: NotificationsProps[];
11
+ onNotificationClick?: (notification: NotificationsProps, index: number) => void;
10
12
  };
11
13
  declare const NotificationBar: (props: NotificationsBarProps) => JSX.Element;
12
14
  export default NotificationBar;
@@ -1,5 +1,6 @@
1
1
  import { HTMLAttributes } from "react";
2
2
  import { RadioProps } from "../Radio/Radio";
3
+ import "../../../src/theme/fonts/ProximaNova.css";
3
4
  export type RadioGroupProps = HTMLAttributes<HTMLDivElement> & {
4
5
  display: "row" | "column";
5
6
  options: RadioProps[];
@@ -1,4 +1,5 @@
1
1
  import { InputHTMLAttributes } from "react";
2
+ import "../../../src/theme/fonts/ProximaNova.css";
2
3
  export type ResultsProps = {
3
4
  value: string;
4
5
  label: string;
@@ -1,9 +1,10 @@
1
1
  import { Props as ReactSelectProps } from "react-select";
2
+ import "../../../src/theme/fonts/ProximaNova.css";
2
3
  export type SelectProps = ReactSelectProps & {
3
4
  error?: string;
4
5
  success?: boolean;
5
6
  helper?: string;
6
7
  label?: string;
7
8
  };
8
- declare const Sellect: (props: SelectProps) => JSX.Element;
9
- export default Sellect;
9
+ declare const AppSelect: (props: SelectProps) => JSX.Element;
10
+ export default AppSelect;
@@ -1,17 +1,13 @@
1
- export type TopMenusProps = {
2
- icon: string;
3
- text: string;
4
- onClick?: () => void;
5
- };
6
- export type BottomMenusProps = {
1
+ import "../../../src/theme/fonts/ProximaNova.css";
2
+ export type MenuItem = {
7
3
  icon: string;
8
4
  text: string;
9
5
  onClick?: () => void;
10
6
  };
11
7
  export type SideBarProps = {
12
8
  activedIndex?: number;
13
- topMenus: TopMenusProps[];
14
- bottomMenus?: BottomMenusProps[];
9
+ menu: MenuItem[];
10
+ footer?: MenuItem[];
15
11
  logo: string;
16
12
  active?: boolean;
17
13
  };
@@ -1,9 +1,12 @@
1
+ import "../../../src/theme/fonts/ProximaNova.css";
1
2
  export type MenusProps = {
2
3
  label: string;
3
4
  value: string;
5
+ disabled?: boolean;
4
6
  };
5
7
  export type TabMenuProps = {
6
8
  menus: MenusProps[];
9
+ onChangeTab?: (index: number) => void;
7
10
  };
8
11
  declare const TabMenu: (props: TabMenuProps) => JSX.Element;
9
12
  export default TabMenu;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Story } from "@storybook/react";
2
3
  import { TabMenuProps } from "./TabMenu";
3
4
  declare const TabMenuStories: {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import "../../../src/theme/fonts/ProximaNova.css";
2
3
  export type TableColumn<T = any> = {
3
4
  label: string;
4
5
  key: string;
@@ -1,4 +1,5 @@
1
1
  import { HTMLAttributes } from "react";
2
+ import "../../../src/theme/fonts/ProximaNova.css";
2
3
  export type ToastProps = HTMLAttributes<HTMLDivElement> & {
3
4
  active?: boolean;
4
5
  mode: "warning" | "success" | "error";
@@ -1,3 +1,4 @@
1
1
  import { AppTheme } from "../types";
2
+ import "./fonts/ProximaNova.css";
2
3
  declare const defaultTheme: AppTheme;
3
4
  export default defaultTheme;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes } from 'react';
3
2
  import { Props } from 'react-select';
4
3
 
@@ -24,6 +23,7 @@ type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
24
23
  label?: string;
25
24
  value?: string;
26
25
  type?: string;
26
+ children?: JSX.Element;
27
27
  };
28
28
  declare const Button: (props: ButtonProps) => JSX.Element;
29
29
 
@@ -41,7 +41,6 @@ type ButtonDropdownProps = ButtonHTMLAttributes<HTMLButtonElement> & {
41
41
  value?: string;
42
42
  type?: string;
43
43
  double?: boolean;
44
- open?: boolean;
45
44
  options: DropdownOptions[];
46
45
  };
47
46
  declare const ButtonDropdown: (props: ButtonDropdownProps) => JSX.Element;
@@ -58,8 +57,9 @@ declare const Checkbox: ({ onChange, ...props }: CheckboxProps) => JSX.Element;
58
57
  type DropzoneProps = {
59
58
  error: string;
60
59
  helper: string;
60
+ onFilesChanged: (files: File[]) => void;
61
61
  };
62
- declare function Previews(props: DropzoneProps): JSX.Element;
62
+ declare const Dropzone: (props: DropzoneProps) => JSX.Element;
63
63
 
64
64
  type InputProps = InputHTMLAttributes<HTMLInputElement> & TextareaHTMLAttributes<HTMLTextAreaElement> & {
65
65
  error?: string;
@@ -93,7 +93,7 @@ type UsersProps = {
93
93
  };
94
94
  type MenuDropdownProps = ButtonHTMLAttributes<HTMLButtonElement> & {
95
95
  open?: boolean;
96
- onClick?: (props: string) => void;
96
+ onUserChange?: (user: UsersProps, index: number) => void;
97
97
  users?: UsersProps[];
98
98
  };
99
99
  declare const MenuDropdown: (props: MenuDropdownProps) => JSX.Element;
@@ -107,6 +107,7 @@ type NotificationsBarProps = {
107
107
  title: string;
108
108
  message?: string;
109
109
  notifications?: NotificationsProps[];
110
+ onNotificationClick?: (notification: NotificationsProps, index: number) => void;
110
111
  };
111
112
  declare const NotificationBar: (props: NotificationsBarProps) => JSX.Element;
112
113
 
@@ -143,22 +144,17 @@ type SelectProps = Props & {
143
144
  helper?: string;
144
145
  label?: string;
145
146
  };
146
- declare const Sellect: (props: SelectProps) => JSX.Element;
147
+ declare const AppSelect: (props: SelectProps) => JSX.Element;
147
148
 
148
- type TopMenusProps = {
149
- icon: string;
150
- text: string;
151
- onClick?: () => void;
152
- };
153
- type BottomMenusProps = {
149
+ type MenuItem = {
154
150
  icon: string;
155
151
  text: string;
156
152
  onClick?: () => void;
157
153
  };
158
154
  type SideBarProps = {
159
155
  activedIndex?: number;
160
- topMenus: TopMenusProps[];
161
- bottomMenus?: BottomMenusProps[];
156
+ menu: MenuItem[];
157
+ footer?: MenuItem[];
162
158
  logo: string;
163
159
  active?: boolean;
164
160
  };
@@ -175,9 +171,11 @@ declare const Spacer: (props: SpacerProps) => JSX.Element;
175
171
  type MenusProps = {
176
172
  label: string;
177
173
  value: string;
174
+ disabled?: boolean;
178
175
  };
179
176
  type TabMenuProps = {
180
177
  menus: MenusProps[];
178
+ onChangeTab?: (index: number) => void;
181
179
  };
182
180
  declare const TabMenu: (props: TabMenuProps) => JSX.Element;
183
181
 
@@ -198,4 +196,4 @@ type ToggleProps = {
198
196
  };
199
197
  declare const Toggle: (props: ToggleProps) => JSX.Element;
200
198
 
201
- export { Breadcrumb, Button, ButtonDropdown, Checkbox, Previews as Dropzone, Input, InteractiveModal, lateralModal as LateralModal, MenuDropdown as Menudropdown, NotificationBar as NotificationsBar, RadioGroup, Search, Sellect, SideBar, Spacer, TabMenu as Table, Toast, Toggle };
199
+ export { Breadcrumb, Button, ButtonDropdown, Checkbox, Dropzone, Input, InteractiveModal, lateralModal as LateralModal, MenuDropdown as Menudropdown, NotificationBar as NotificationsBar, RadioGroup, Search, AppSelect as Sellect, SideBar, Spacer, TabMenu as Table, Toast, Toggle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosperitainova/mirage-ui",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -56,10 +56,7 @@
56
56
  "styled-components": "^5.3.6"
57
57
  },
58
58
  "devDependencies": {
59
- "@types/node": "^16.18.8",
60
- "@types/react": "^18.0.26",
61
59
  "@rollup/plugin-commonjs": "^24.0.0",
62
- "@rollup/plugin-image": "^3.0.1",
63
60
  "@rollup/plugin-node-resolve": "^15.0.1",
64
61
  "@rollup/plugin-typescript": "^11.0.0",
65
62
  "@storybook/addon-actions": "^6.5.14",
@@ -72,18 +69,21 @@
72
69
  "@storybook/preset-create-react-app": "^4.1.2",
73
70
  "@storybook/react": "^6.5.14",
74
71
  "@storybook/testing-library": "^0.0.13",
72
+ "@types/node": "^16.18.8",
73
+ "@types/react": "^18.0.26",
75
74
  "@types/styled-components": "^5.1.26",
76
75
  "babel-plugin-named-exports-order": "^0.0.2",
76
+ "postcss": "^8.4.21",
77
77
  "postcss-assets": "^6.0.0",
78
78
  "prop-types": "^15.8.1",
79
+ "react": "^18.2.0",
80
+ "react-dom": "^18.2.0",
81
+ "react-scripts": "^5.0.1",
79
82
  "rollup": "^3.10.0",
80
- "rollup-plugin-css-only": "^4.3.0",
81
83
  "rollup-plugin-dts": "^5.1.1",
82
84
  "rollup-plugin-peer-deps-external": "^2.2.4",
83
85
  "rollup-plugin-postcss": "^4.0.2",
84
- "rollup-plugin-svg": "^2.0.0",
85
86
  "rollup-plugin-terser": "^7.0.2",
86
- "rollup-plugin-url": "^3.0.1",
87
87
  "storybook-addon-styled-component-theme": "^2.0.0",
88
88
  "webpack": "^5.75.0"
89
89
  },
package/README.old.md DELETED
@@ -1,29 +0,0 @@
1
- # README #
2
-
3
- This README would normally document whatever steps are necessary to get your application up and running.
4
-
5
- ### What is this repository for? ###
6
-
7
- * Quick summary
8
- * Version
9
- * [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
10
-
11
- ### How do I get set up? ###
12
-
13
- * Summary of set up
14
- * Configuration
15
- * Dependencies
16
- * Database configuration
17
- * How to run tests
18
- * Deployment instructions
19
-
20
- ### Contribution guidelines ###
21
-
22
- * Writing tests
23
- * Code review
24
- * Other guidelines
25
-
26
- ### Who do I talk to? ###
27
-
28
- * Repo owner or admin
29
- * Other community or team contact