loon-bulma-react 2026.0.47 → 2026.0.49
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/components/Button/Button.d.ts +2 -2
- package/dist/contexts/ActionSheet/ActionSheetContextProvider.d.ts +2 -0
- package/dist/contexts/Confirm/ConfirmContextProvider.d.ts +11 -5
- package/dist/contexts/Prompt/PromptContextProvider.d.ts +12 -7
- package/dist/index.js +6061 -5895
- package/dist/styles/_all.scss +2 -1
- package/package.json +17 -17
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
3
|
import { ColorProp, StrictOmit, SizeProp } from './../../types';
|
|
4
|
-
type
|
|
4
|
+
export type ButtonStyleProp = 'faded' | 'f' | 'inverted' | 'i' | 'static' | 's' | 'default' | 'd' | 'outlined' | 'o';
|
|
5
5
|
export type ButtonProps = {
|
|
6
6
|
/** Is de button loading ? */
|
|
7
7
|
loading?: boolean;
|
|
@@ -10,7 +10,7 @@ export type ButtonProps = {
|
|
|
10
10
|
/** Wat moet er op de button komen (text, icons etc.) */
|
|
11
11
|
children?: React.ReactNode;
|
|
12
12
|
/** Styling voor de button */
|
|
13
|
-
styling?:
|
|
13
|
+
styling?: ButtonStyleProp;
|
|
14
14
|
/** is dit een static button? */
|
|
15
15
|
isStatic?: boolean;
|
|
16
16
|
/** De grootte van de button */
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
import { ButtonStyleProp } from './../../components/Button/Button';
|
|
2
3
|
import { ColorProp } from './../../types';
|
|
3
4
|
import React from 'react';
|
|
4
5
|
type ActionSheetButton<T extends unknown = {}> = string | {
|
|
5
6
|
txt?: string | ((v: T) => string);
|
|
6
7
|
icon?: string | IconProp;
|
|
8
|
+
style: ButtonStyleProp;
|
|
7
9
|
value: T | string;
|
|
8
10
|
color?: ColorProp;
|
|
9
11
|
key?: string | undefined;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
import { ButtonStyleProp } from './../../components/Button/Button';
|
|
4
|
+
import { ColorProp } from 'lib';
|
|
3
5
|
type State = {
|
|
4
6
|
show: boolean;
|
|
5
7
|
content: string | React.ReactNode;
|
|
6
|
-
ok:
|
|
7
|
-
|
|
8
|
-
cancel: string;
|
|
9
|
-
cancelIcon?: IconProp | undefined;
|
|
8
|
+
ok: ConfirmButton;
|
|
9
|
+
cancel: ConfirmButton;
|
|
10
10
|
otherButtons?: React.ReactNode[];
|
|
11
11
|
modalID: number;
|
|
12
12
|
};
|
|
13
|
+
type ConfirmButton = {
|
|
14
|
+
text?: string;
|
|
15
|
+
icon?: IconProp | undefined;
|
|
16
|
+
color?: ColorProp | undefined;
|
|
17
|
+
style?: ButtonStyleProp | undefined;
|
|
18
|
+
};
|
|
13
19
|
/**
|
|
14
20
|
* Confirm provider om `useConfirm`-hook te kunnen gebruiken.
|
|
15
21
|
* @param children de children
|
|
@@ -53,7 +59,7 @@ declare function useConfirm(): {
|
|
|
53
59
|
* @returns Promise<boolean> met true als de gebruiker op OK heeft geklikt, false als anders
|
|
54
60
|
* @example const isConfirmed = await confirm("Weet je het zeker?")
|
|
55
61
|
*/
|
|
56
|
-
confirm: (content: string | React.ReactNode,
|
|
62
|
+
confirm: (content: string | React.ReactNode, ok?: Partial<ConfirmButton> | undefined, cancel?: Partial<ConfirmButton> | undefined, ...otherButtons: React.ReactNode[]) => Promise<boolean>;
|
|
57
63
|
/** INTERNAL USE ONLY - DO NOT USE */
|
|
58
64
|
confirmState: State;
|
|
59
65
|
};
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
import { ButtonStyleProp } from './../../components/Button/Button';
|
|
3
4
|
import { TextInputProps } from './../../forms/Text/TextInput';
|
|
4
|
-
import { StrictOmit } from './../../types';
|
|
5
|
+
import { ColorProp, StrictOmit } from './../../types';
|
|
6
|
+
type AllowedPromptTypes = 'text' | 'password' | 'number' | 'email' | 'tel' | 'url' | 'range' | 'date' | 'datetime-local' | 'datetime' | 'month' | 'week' | 'time' | 'color' | 'search';
|
|
7
|
+
type PromptButton = {
|
|
8
|
+
text?: string;
|
|
9
|
+
icon?: IconProp | undefined;
|
|
10
|
+
color?: ColorProp | undefined;
|
|
11
|
+
style?: ButtonStyleProp | undefined;
|
|
12
|
+
};
|
|
5
13
|
type State = {
|
|
6
14
|
show: boolean;
|
|
7
15
|
content: string | React.ReactNode;
|
|
8
|
-
submit:
|
|
9
|
-
|
|
10
|
-
cancel: string;
|
|
11
|
-
cancelIcon?: IconProp | undefined;
|
|
16
|
+
submit: PromptButton;
|
|
17
|
+
cancel: PromptButton;
|
|
12
18
|
otherButtons: React.ReactNode[];
|
|
13
19
|
value: string;
|
|
14
20
|
inputProps: TextInputProps;
|
|
@@ -29,7 +35,6 @@ type State = {
|
|
|
29
35
|
declare function PromptProvider({ children }: {
|
|
30
36
|
children: React.ReactNode;
|
|
31
37
|
}): React.JSX.Element;
|
|
32
|
-
export type AllowedPromptTypes = 'text' | 'password' | 'number' | 'email' | 'tel' | 'url' | 'range' | 'date' | 'datetime-local' | 'datetime' | 'month' | 'week' | 'time' | 'color' | 'search';
|
|
33
38
|
/**
|
|
34
39
|
* Hook voor de prompt
|
|
35
40
|
* @param submitTxt tekst voor op de OK-button (default = 'OK')
|
|
@@ -64,7 +69,7 @@ declare function usePrompt(inputSettings?: StrictOmit<TextInputProps, 'name'> &
|
|
|
64
69
|
* @returns Promise<boolean> met true als de gebruiker op OK heeft geklikt, false als anders
|
|
65
70
|
* @example const isConfirmed = await confirm("Weet je het zeker?")
|
|
66
71
|
*/
|
|
67
|
-
prompt: (content: string | React.ReactNode,
|
|
72
|
+
prompt: (content: string | React.ReactNode, submit?: Partial<PromptButton> | undefined, cancel?: Partial<PromptButton> | undefined, ...otherButtons: React.ReactNode[]) => Promise<string>;
|
|
68
73
|
/** INTERNAL USE ONLY - DO NOT USE */
|
|
69
74
|
promptState: State;
|
|
70
75
|
};
|