blue-react 8.7.3 → 8.8.0

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/style.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Blue React v8.7.3 (https://bruegmann.github.io/blue-react)
2
+ * Blue React v8.8.0 (https://bruegmann.github.io/blue-react)
3
3
  * Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-react/blob/master/LICENSE).
4
4
  */
5
5
 
@@ -16,6 +16,7 @@ export interface ModalProps {
16
16
  * `"ask"` | `"tell"` | `"verify"`
17
17
  */
18
18
  type: ModalType;
19
+ inputType?: string;
19
20
  }
20
21
  /**
21
22
  * Simple modal/dialog. Designed to work as an alternative to JavaScript's native `alert()`, `prompt()` and `confirm()` functions.
@@ -23,4 +24,4 @@ export interface ModalProps {
23
24
  *
24
25
  * For easy use, you should use the hook `useModal` together with `ModalProvider`. See the example there.
25
26
  */
26
- export default function Modal({ modalContent, modalTitle, modalIcon, unSetModalContent, onSubmit, defaultInput, type }: ModalProps): JSX.Element;
27
+ export default function Modal({ modalContent, modalTitle, modalIcon, unSetModalContent, onSubmit, defaultInput, type, inputType }: ModalProps): JSX.Element;
@@ -1,11 +1,18 @@
1
1
  import { ReactNode } from "react";
2
+ interface ModelAlertOptions {
3
+ title?: string;
4
+ icon?: ReactNode;
5
+ }
6
+ interface ModelAskOptions extends ModelAlertOptions {
7
+ inputType?: string;
8
+ }
2
9
  export interface ModalProviderProps {
3
10
  children?: ReactNode;
4
11
  }
5
12
  declare const ModalProvider: ({ children, ...rest }: ModalProviderProps) => JSX.Element;
6
13
  declare const useModal: () => {
7
- ask: (text: string, title?: string, icon?: ReactNode) => Promise<string | boolean>;
8
- tell: (text: string, title?: string, icon?: ReactNode) => Promise<boolean>;
9
- verify: (text: string, title?: string, icon?: ReactNode) => Promise<boolean>;
14
+ ask: (text: string, options?: ModelAskOptions) => Promise<string | boolean>;
15
+ tell: (text: string, options?: ModelAlertOptions) => Promise<boolean>;
16
+ verify: (text: string, options?: ModelAlertOptions) => Promise<boolean>;
10
17
  };
11
18
  export { ModalProvider, useModal };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blue-react",
3
- "version": "8.7.3",
3
+ "version": "8.8.0",
4
4
  "description": "Blue React Components",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "main": "index.js",
@@ -58,7 +58,7 @@
58
58
  "gh-pages": "^3.1.0",
59
59
  "license-report": "^6.2.0",
60
60
  "lint-staged": "^11.1.2",
61
- "node-sass": "^6.0.1",
61
+ "node-sass": "^8.0.0",
62
62
  "postcss-cli": "^9.0.1",
63
63
  "postcss-minify": "^1.1.0",
64
64
  "prettier": "2.4.1",