loon-bulma-react 2023.0.1 → 2023.0.2
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/README.md +40 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +28 -0
- package/dist/components/Box/Box.d.ts +19 -0
- package/dist/components/Columns/Column.d.ts +153 -0
- package/dist/components/Columns/Columns.d.ts +29 -0
- package/dist/components/Container/Container.d.ts +78 -0
- package/dist/components/Content/Content.d.ts +16 -0
- package/dist/components/Footer/Footer.d.ts +18 -0
- package/dist/components/Form/File/FileInput.d.ts +0 -3
- package/dist/components/Form/Form.d.ts +4 -4
- package/dist/components/Form/shared/Base.Input.Container.d.ts +1 -1
- package/dist/components/Hero/Hero.d.ts +120 -0
- package/dist/components/Image/Image.d.ts +27 -0
- package/dist/components/Message/Message.d.ts +1 -1
- package/dist/components/ScrollArea/ScrollArea.d.ts +72 -0
- package/dist/components/Section/Section.d.ts +15 -0
- package/dist/components/index.d.ts +57 -0
- package/dist/contexts/Confirm/Confirm.d.ts +20 -0
- package/dist/contexts/Confirm/ConfirmContextProvider.d.ts +25 -0
- package/dist/contexts/Confirm/ConfirmDialog.d.ts +2 -0
- package/dist/contexts/index.d.ts +4 -0
- package/dist/forms/Checkbox/Checkbox.d.ts +49 -0
- package/dist/forms/Datetimes/DateInput.d.ts +43 -0
- package/dist/forms/Datetimes/DateTimeInput.d.ts +43 -0
- package/dist/forms/Datetimes/TimeInput.d.ts +46 -0
- package/dist/forms/File/FileInput.d.ts +62 -0
- package/dist/forms/Form.d.ts +186 -0
- package/dist/forms/FormBuilder/FormBuilder.d.ts +9 -0
- package/dist/{components/Form/FormProps.d.ts → forms/FormBuilder/FormBuilderProps.d.ts} +20 -14
- package/dist/forms/Input.d.ts +56 -0
- package/dist/forms/Numeric/MultiRangeInput.d.ts +44 -0
- package/dist/forms/Numeric/NumberInput.d.ts +46 -0
- package/dist/forms/Numeric/RangeInput.d.ts +45 -0
- package/dist/forms/Others/ColorInput.d.ts +42 -0
- package/dist/forms/Others/HiddenInput.d.ts +29 -0
- package/dist/forms/Radio/Radio.d.ts +120 -0
- package/dist/{components/Form/SelectProps.d.ts → forms/Selects/BaseSelectProps.d.ts} +7 -0
- package/dist/forms/Selects/MultiSelect.d.ts +56 -0
- package/dist/forms/Selects/Select.d.ts +56 -0
- package/dist/forms/Text/EmailInput.d.ts +49 -0
- package/dist/forms/Text/PasswordInput.d.ts +49 -0
- package/dist/forms/Text/TextArea.d.ts +46 -0
- package/dist/forms/Text/TextInput.d.ts +61 -0
- package/dist/forms/index.d.ts +40 -0
- package/dist/{components/Form → forms/shared}/Base.Input.Container.d.ts +1 -1
- package/dist/{components/Form → forms/shared}/BaseInputProps.d.ts +14 -2
- package/dist/{components/Form → forms/shared}/InputError.d.ts +0 -0
- package/dist/forms/shared/InputIcons.d.ts +13 -0
- package/dist/forms/shared/index.d.ts +4 -0
- package/dist/functions/calculateTxtColor.function.d.ts +15 -0
- package/dist/functions/index.d.ts +1 -0
- package/dist/functions/txtColorDecision.d.ts +2 -2
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/useEventListener.d.ts +1 -25
- package/dist/index.d.ts +5 -110
- package/dist/index.js +4523 -4067
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +4486 -4069
- package/dist/index.modern.js.map +1 -1
- package/dist/loon-react-bulma-types.d.ts +9 -0
- package/dist/utils/calculateTxtColor.function.d.ts +15 -0
- package/dist/utils/date-utils.d.ts +24 -1
- package/dist/utils/hasBSN.function.d.ts +15 -0
- package/dist/utils/index.d.ts +4 -0
- package/package.json +11 -11
- package/styles/custom-bulma.scss +1 -0
- package/styles/variables.scss +3 -1
- package/dist/components/Button/ButtonBase.d.ts +0 -29
- package/dist/components/Button/InvertedButton.d.ts +0 -30
- package/dist/components/Button/LightButton.d.ts +0 -30
- package/dist/components/Button/LightOutlinedButton.d.ts +0 -30
- package/dist/components/Button/OutlinedButton.d.ts +0 -30
- package/dist/components/Calendar/Events/Event.d.ts +0 -16
- package/dist/components/Calendar/Events/InvertedEvent.d.ts +0 -16
- package/dist/components/Calendar/Props.d.ts +0 -61
- package/dist/components/Form/Checkbox.d.ts +0 -29
- package/dist/components/Form/ColorInput.d.ts +0 -36
- package/dist/components/Form/DateInput.d.ts +0 -35
- package/dist/components/Form/DateTimeInput.d.ts +0 -34
- package/dist/components/Form/EmailInput.d.ts +0 -39
- package/dist/components/Form/FormValidatie.d.ts +0 -32
- package/dist/components/Form/HiddenInput.d.ts +0 -17
- package/dist/components/Form/MultiRangeInput.d.ts +0 -35
- package/dist/components/Form/MultiSelect.d.ts +0 -45
- package/dist/components/Form/NumberInput.d.ts +0 -38
- package/dist/components/Form/Others/BasicInput.d.ts +0 -31
- package/dist/components/Form/Others/Input.d.ts +0 -31
- package/dist/components/Form/PasswordInput.d.ts +0 -38
- package/dist/components/Form/RangeInput.d.ts +0 -36
- package/dist/components/Form/Select.d.ts +0 -42
- package/dist/components/Form/TextArea.d.ts +0 -36
- package/dist/components/Form/TextInput.d.ts +0 -39
- package/dist/components/Form/TimeInput.d.ts +0 -37
- package/dist/components/Layout/Columns/ColumnProps.d.ts +0 -11
- package/dist/components/Layout/Columns/Fifths.d.ts +0 -22
- package/dist/components/Layout/Columns/Numbered.d.ts +0 -50
- package/dist/components/Layout/Columns/Quarters.d.ts +0 -22
- package/dist/components/Layout/Columns/Thirds.d.ts +0 -10
- package/dist/components/Layout/Columns/index.d.ts +0 -5
- package/dist/components/Layout/FlexBox/Flexbox.d.ts +0 -48
- package/dist/components/Layout/Hero/HeroProps.d.ts +0 -37
- package/dist/components/Message/MessageProps.d.ts +0 -11
- package/dist/components/Notification/NotificationProps.d.ts +0 -13
- package/dist/components/Table/Table.d.ts +0 -8
- package/dist/components/Table/TableProps.d.ts +0 -52
- package/dist/components/Tabs/Tabs.d.ts +0 -34
- package/dist/components/Titles/TitleProps.d.ts +0 -31
- package/dist/functions/hasBSN.d.ts +0 -15
- package/dist/hooks/useViewToggle.d.ts +0 -18
- package/dist/utils/JSDate.class.d.ts +0 -37
package/README.md
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
> ## Aanpassingen
|
|
4
4
|
>
|
|
5
5
|
> - Inputs: voor inputs waarbij je moet typen: de `icons`-prop om een eigen icoontje in te kunnen stellen.
|
|
6
|
+
> - Confirm provider: een Zeker-weten?-achtige popup.
|
|
6
7
|
|
|
7
8
|
## [Bulma](https://bulma.io/) & [React](https://reactjs.org/) componenten voor Loon Salarissoftware.
|
|
8
9
|
|
|
9
10
|
- [Installatie](#installatie)
|
|
10
11
|
- [Gebruik](#gebruik)
|
|
11
12
|
- [Notifier](#notifier)
|
|
13
|
+
- [Confirmation](#confirmation)
|
|
12
14
|
- [Componenten](#components)
|
|
13
15
|
|
|
14
16
|
- [Layout](#layout)
|
|
@@ -229,6 +231,44 @@ const { notify, remove, clear } = useNotifier();
|
|
|
229
231
|
>
|
|
230
232
|
> De `useNotifier()`-hook werkt alleen in componenten die children zijn van de _NotifierProvider_, dus als je de _NotifierProvider_ in `App.tsx` importeert en neerzet, kan je de hook daar **niet** gebruiken.
|
|
231
233
|
|
|
234
|
+
## Confirm <a id="confirmation"></a>
|
|
235
|
+
|
|
236
|
+
De ConfirmProvider is een ContextProvider die ervoor zorgt dat je overal ee confirm-request kan doen met een mooiere modal dan de modal van Bulma. De ConfirmProvider moet om de componenten heen die de `useConfirm()`-hook gebruiken.
|
|
237
|
+
|
|
238
|
+
```tsx
|
|
239
|
+
// App.tsx
|
|
240
|
+
<ConfirmProvider>
|
|
241
|
+
{/* Alle children die de Confirm moeten kunnen gebruiken*/}
|
|
242
|
+
{children}
|
|
243
|
+
<MyComponent />
|
|
244
|
+
<MyComponent2>La di dah</MyComponent2>
|
|
245
|
+
</ConfirmProvider>
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
In een van de componenten kan dan de `useConfirm()`-hook gebruikt worden om een confirm te tonen.
|
|
249
|
+
|
|
250
|
+
```tsx
|
|
251
|
+
// MyComponent.tsx
|
|
252
|
+
export function MyComponent() {
|
|
253
|
+
const { confirm } = useConfirm('JAA', 'NEE', <Button.Info>Meer info</Button.Info>);
|
|
254
|
+
|
|
255
|
+
const confirmSomething = (msg: string) => {
|
|
256
|
+
const isConfirmed = await confirm(msg);
|
|
257
|
+
if (isConfirmed) console.log('YAYYY');
|
|
258
|
+
else console.log('NOOOOO');
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
return <Button onClick={() => confirmSomething('Zeker weten?')}>Confirm</Button>;
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
De `useConfirm()`-hook exporteert nog meer dan alleen de `confirm()`-function. Deze functies zijn voor intern gebruik.
|
|
266
|
+
|
|
267
|
+
- confirm: `(content: string) => Promise<boolean>`;
|
|
268
|
+
- (AFBLIJVEN) onConfirm: `() => void`;
|
|
269
|
+
- (AFBLIJVEN) onCancel: `() => void`;
|
|
270
|
+
- (AFBLIJVEN) confirmState: `State` van de confirm req;
|
|
271
|
+
|
|
232
272
|
## Componenten <a id="components"></a>
|
|
233
273
|
|
|
234
274
|
### Layout <a id="layout"></a>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** Props voor een aspect-ratio */
|
|
3
|
+
declare type AspectRatioProps = {
|
|
4
|
+
/** de ratio (width x height) van het gewenste element */
|
|
5
|
+
ratio: '1by1' | '5by4' | '4by5' | '4by3' | '3by4' | '3by2' | '2by3' | '5by3' | '3by5' | '16by9' | '9by16' | '2by1' | '1by2' | '3by1' | '1by3';
|
|
6
|
+
/** het item dat aan de aspect-ratio moet voldoen */
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/** */
|
|
9
|
+
caption?: {
|
|
10
|
+
placement: 'top' | 'bottom';
|
|
11
|
+
text: string;
|
|
12
|
+
};
|
|
13
|
+
/** extra classes on aspect-ratio-element */
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* gebruik een aspect-ratio voor een bepaald resizable element, waar een width en height bij hoort.
|
|
18
|
+
* Zoals bijvoorbeeld een iframe, img, etc
|
|
19
|
+
* @param props
|
|
20
|
+
* @returns een aspect-ratio'd element.
|
|
21
|
+
* @example
|
|
22
|
+
* <AspectRatio ratio="16by9" >
|
|
23
|
+
* <iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ">
|
|
24
|
+
* </AspectRatio>
|
|
25
|
+
*/
|
|
26
|
+
declare function AspectRatio(props: AspectRatioProps): JSX.Element;
|
|
27
|
+
export { AspectRatio };
|
|
28
|
+
export type { AspectRatioProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
declare type BoxProps = {
|
|
3
|
+
/** de children van de box */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** Andere classes om op de box toe te passen */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** style props direct op de box */
|
|
8
|
+
styles?: CSSProperties;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Maak een witte box om andere elementen heen. Voor forms of modals. Heeft een beetje schaduw.
|
|
12
|
+
* @see {@link https://bulma.io/documentation/elements/box/}
|
|
13
|
+
* @param {{children: any, classes?: string|string[]}} props
|
|
14
|
+
* @returns een witte box om elementen.
|
|
15
|
+
* @example <Box>This is a box</Box>
|
|
16
|
+
*/
|
|
17
|
+
declare const Box: ({ children, className: classes, styles }: BoxProps) => JSX.Element;
|
|
18
|
+
export { Box };
|
|
19
|
+
export type { BoxProps };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
declare type ColumnProps = {
|
|
3
|
+
/** wat staat er in deze kolom */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** extra classes op deze kolom */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** zet de styling direct */
|
|
8
|
+
styles?: CSSProperties;
|
|
9
|
+
};
|
|
10
|
+
declare type ExpandedColumnProps = ColumnProps & {
|
|
11
|
+
/** is deze kolom zo smal mogelijk of vanaf welke schermmaat */
|
|
12
|
+
narrow?: boolean | 'mobile' | 'tablet' | 'touch' | 'desktop' | 'widescreen' | 'fullhd';
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Standaard kolom voor gebruik in {@link Columns}.
|
|
16
|
+
* Als voor narrow een waarde is meegegeven, wordt de minimale ruimte voor deze kolom aangehouden: https://bulma.io/documentation/columns/sizes/
|
|
17
|
+
* @return Een kolom
|
|
18
|
+
* @example
|
|
19
|
+
* <Column>This is a column</Column>
|
|
20
|
+
* <Column narrow>This is a narrow column</Column>
|
|
21
|
+
*/
|
|
22
|
+
declare const Column: {
|
|
23
|
+
(props: ExpandedColumnProps): JSX.Element;
|
|
24
|
+
/** Column full width of parent
|
|
25
|
+
* @returns een kolom met de maximale breedte van de parent 'Columns'
|
|
26
|
+
* @example <Column.Full>This is a full column</Column.Full>
|
|
27
|
+
*/
|
|
28
|
+
Full(props: ColumnProps): JSX.Element;
|
|
29
|
+
/** Column 1/2 width of parent
|
|
30
|
+
* @returns een kolom met de halve breedte van de parent 'Columns'
|
|
31
|
+
* @example <Column.Half>This is a half column</Column.Half>
|
|
32
|
+
*/
|
|
33
|
+
Half(props: ColumnProps): JSX.Element;
|
|
34
|
+
/** Spread columns based on thirds (1/3, 2/3) */
|
|
35
|
+
Thirds: {
|
|
36
|
+
/** Column 1/3 width of parent
|
|
37
|
+
* @returns een kolom met 1/3 breedte van de parent 'Columns'
|
|
38
|
+
* @example <Column.Thirds.One>This is a first third column</Column.Thirds.One>
|
|
39
|
+
*/
|
|
40
|
+
One: (props: ColumnProps) => JSX.Element;
|
|
41
|
+
/** Column 2/3 width of parent
|
|
42
|
+
* @returns een kolom met 2/3 breedte van de parent 'Columns'
|
|
43
|
+
* @example <Column.Thirds.Two>This is a second third column</Column.Thirds.Two>
|
|
44
|
+
*/
|
|
45
|
+
Two: (props: ColumnProps) => JSX.Element;
|
|
46
|
+
};
|
|
47
|
+
/** Spread columns based on quarters (1/4, 2/4, 3/4) */
|
|
48
|
+
Quarters: {
|
|
49
|
+
/** Column 1/4 width of parent
|
|
50
|
+
* @returns een kolom met 1/4 breedte van de parent 'Columns'
|
|
51
|
+
* @example <Column.Quarters.One>This is a 1/4 column</Column.Quarters.One>
|
|
52
|
+
*/
|
|
53
|
+
One: (props: ColumnProps) => JSX.Element;
|
|
54
|
+
/** Column 2/4 width of parent
|
|
55
|
+
* @returns een kolom met 2/4 breedte van de parent 'Columns'
|
|
56
|
+
* @example <Column.Quarters.Two>This is a 2/4 column</Column.Quarters.Two>
|
|
57
|
+
*/
|
|
58
|
+
Two: (props: ColumnProps) => JSX.Element;
|
|
59
|
+
/** Column 3/4 width of parent
|
|
60
|
+
* @returns een kolom met 3/4 breedte van de parent 'Columns'
|
|
61
|
+
* @example <Column.Quarters.Three>This is a 3/4 column</Column.Quarters.Three>
|
|
62
|
+
*/
|
|
63
|
+
Three: (props: ColumnProps) => JSX.Element;
|
|
64
|
+
};
|
|
65
|
+
/** Spread columns based on fifths (1/5, 2/5, 3/5, 4/5) */
|
|
66
|
+
Fifths: {
|
|
67
|
+
/** Column 1/5 width of parent
|
|
68
|
+
* @returns een kolom met 1/5 breedte van de parent 'Columns'
|
|
69
|
+
* @example <Column.Fifths.One>This is a 1/5 column</Column.Fifths.One>
|
|
70
|
+
*/
|
|
71
|
+
One: (props: ColumnProps) => JSX.Element;
|
|
72
|
+
/** Column 2/5 width of parent
|
|
73
|
+
* @returns een kolom met 2/5 breedte van de parent 'Columns'
|
|
74
|
+
* @example <Column.Fifths.Two>This is a 2/5 column</Column.Fifths.Two>
|
|
75
|
+
*/
|
|
76
|
+
Two: (props: ColumnProps) => JSX.Element;
|
|
77
|
+
/** Column 3/5 width of parent
|
|
78
|
+
* @returns een kolom met 3/5 breedte van de parent 'Columns'
|
|
79
|
+
* @example <Column.Fifths.Three>This is a 3/5 column</Column.Fifths.Three>
|
|
80
|
+
*/
|
|
81
|
+
Three: (props: ColumnProps) => JSX.Element;
|
|
82
|
+
/** Column 4/5 width of parent
|
|
83
|
+
* @returns een kolom met 4/5 breedte van de parent 'Columns'
|
|
84
|
+
* @example <Column.Fifths.Four>This is a 4/5 column</Column.Fifths.Four>
|
|
85
|
+
*/
|
|
86
|
+
Four: (props: ColumnProps) => JSX.Element;
|
|
87
|
+
};
|
|
88
|
+
Twelves: {
|
|
89
|
+
/** Column 1/12 width of parent
|
|
90
|
+
* @returns een kolom met 1/12 breedte van de parent 'Columns'
|
|
91
|
+
* @example <Column.Twelves.One>This is a 1/12 column</Column.Twelves.One>
|
|
92
|
+
*/
|
|
93
|
+
One: (props: ColumnProps) => JSX.Element;
|
|
94
|
+
/** Column 2/12 width of parent
|
|
95
|
+
* @returns een kolom met 2/12 breedte van de parent 'Columns'
|
|
96
|
+
* @example <Column.Twelves.Two>This is a 2/12 column</Column.Twelves.Two>
|
|
97
|
+
*/
|
|
98
|
+
Two: (props: ColumnProps) => JSX.Element;
|
|
99
|
+
/** Column 3/12 width of parent
|
|
100
|
+
* @returns een kolom met 3/12 breedte van de parent 'Columns'
|
|
101
|
+
* @example <Column.Twelves.Three>This is a 3/12 column</Column.Twelves.Three>
|
|
102
|
+
*/
|
|
103
|
+
Three: (props: ColumnProps) => JSX.Element;
|
|
104
|
+
/** Column 4/12 width of parent
|
|
105
|
+
* @returns een kolom met 4/12 breedte van de parent 'Columns'
|
|
106
|
+
* @example <Column.Twelves.Four>This is a 4/12 column</Column.Twelves.Four>
|
|
107
|
+
*/
|
|
108
|
+
Four: (props: ColumnProps) => JSX.Element;
|
|
109
|
+
/** Column 5/12 width of parent
|
|
110
|
+
* @returns een kolom met 5/12 breedte van de parent 'Columns'
|
|
111
|
+
* @example <Column.Twelves.Five>This is a 5/12 column</Column.Twelves.Five>
|
|
112
|
+
*/
|
|
113
|
+
Five: (props: ColumnProps) => JSX.Element;
|
|
114
|
+
/** Column 6/12 width of parent
|
|
115
|
+
* @returns een kolom met 6/12 breedte van de parent 'Columns'
|
|
116
|
+
* @example <Column.Twelves.Six>This is a 6/12 column</Column.Twelves.Six>
|
|
117
|
+
*/
|
|
118
|
+
Six: (props: ColumnProps) => JSX.Element;
|
|
119
|
+
/** Column 7/12 width of parent
|
|
120
|
+
* @returns een kolom met 7/12 breedte van de parent 'Columns'
|
|
121
|
+
* @example <Column.Twelves.Seven>This is a 7/12 column</Column.Twelves.Seven>
|
|
122
|
+
*/
|
|
123
|
+
Seven: (props: ColumnProps) => JSX.Element;
|
|
124
|
+
/** Column 8/12 width of parent
|
|
125
|
+
* @returns een kolom met 8/12 breedte van de parent 'Columns'
|
|
126
|
+
* @example <Column.Twelves.Eight>This is a 8/12 column</Column.Twelves.Eight>
|
|
127
|
+
*/
|
|
128
|
+
Eight: (props: ColumnProps) => JSX.Element;
|
|
129
|
+
/** Column 9/12 width of parent
|
|
130
|
+
* @returns een kolom met 9/12 breedte van de parent 'Columns'
|
|
131
|
+
* @example <Column.Twelves.Nine>This is a 9/12 column</Column.Twelves.Nine>
|
|
132
|
+
*/
|
|
133
|
+
Nine: (props: ColumnProps) => JSX.Element;
|
|
134
|
+
/** Column 10/12 width of parent
|
|
135
|
+
* @returns een kolom met 10/12 breedte van de parent 'Columns'
|
|
136
|
+
* @example <Column.Twelves.Ten>This is a 10/12 column</Column.Twelves.Ten>
|
|
137
|
+
*/
|
|
138
|
+
Ten: (props: ColumnProps) => JSX.Element;
|
|
139
|
+
/** Column 11/12 width of parent
|
|
140
|
+
* @returns een kolom met 11/12 breedte van de parent 'Columns'
|
|
141
|
+
* @example <Column.Twelves.Eleven>This is a 11/12 column</Column.Twelves.Eleven>
|
|
142
|
+
*/
|
|
143
|
+
Eleven: (props: ColumnProps) => JSX.Element;
|
|
144
|
+
/** Column 12/12 width of parent
|
|
145
|
+
* @returns een kolom met 12/12 breedte van de parent 'Columns'
|
|
146
|
+
* @example <Column.Twelves.Twelve>This is a 12/12 column</Column.Twelves.Twelve>
|
|
147
|
+
*/
|
|
148
|
+
Twelve: (props: ColumnProps) => JSX.Element;
|
|
149
|
+
};
|
|
150
|
+
displayName: string;
|
|
151
|
+
};
|
|
152
|
+
export { Column };
|
|
153
|
+
export type { ColumnProps, ExpandedColumnProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
export declare type ColumnsProps = {
|
|
3
|
+
/** Children van de Columns. Moeten van het type @see Column zijn */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** de gap-grootte (stappen van .25rem), een margin tussen kolommen (default = 3, 0.75rem) */
|
|
6
|
+
gap?: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | undefined;
|
|
7
|
+
/** mogen de kolommen over meerdere rijen verdeeld worden */
|
|
8
|
+
multiline?: boolean;
|
|
9
|
+
/** moeten de kolom centraal aligned worden */
|
|
10
|
+
centered?: boolean;
|
|
11
|
+
/** extra classes voor dit element */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** set de styling direct */
|
|
14
|
+
styles?: CSSProperties;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Verdeel een pagina in kolommen, children zijn van het type {@link Column } voor het maken van de kolommen.
|
|
18
|
+
*
|
|
19
|
+
* Kijk op {@link https://bulma.io/documentation/columns/sizes/} voor de bulma-uitleg.
|
|
20
|
+
* @param {ColumnProps} props
|
|
21
|
+
* @returns Columns component which can be used to create a column layout.
|
|
22
|
+
* @example
|
|
23
|
+
* <Columns>
|
|
24
|
+
* <Column>This is a column</Column>
|
|
25
|
+
* <Column>This is a column</Column>
|
|
26
|
+
* <Column narrow>This is a narrow column</Column>
|
|
27
|
+
* </Columns>
|
|
28
|
+
*/
|
|
29
|
+
export declare function Columns({ children, gap, multiline, centered, className: classes, styles }: ColumnsProps): JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
declare type ContainerProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/** extra classes */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** set styling directly on container */
|
|
7
|
+
styles?: CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Een container om content horizontaal te centreren in grote viewports.
|
|
11
|
+
* @param props
|
|
12
|
+
* @return een default container
|
|
13
|
+
*
|
|
14
|
+
* @description De width van de container is afhankelijk van de maximale viewport width:
|
|
15
|
+
* | | Component | tot 1023px | tot 1216px | tot 1408px | groter |
|
|
16
|
+
* |----|----------------------|------------|------------|------------|-----------|
|
|
17
|
+
* | >> | `<Container>` | max-width | 960px | 1152px | 1344px |
|
|
18
|
+
* | | `<Container.Wide>` | max-width | max-width | 1152px | 1344px |
|
|
19
|
+
* | | `<Container.Widest>` | max-width | max-width | max-width | 1344px |
|
|
20
|
+
* | | `<Container.Max>` | max-width | max-width | max-width | max-width |
|
|
21
|
+
*
|
|
22
|
+
* @example <Container>This is a container</Container>
|
|
23
|
+
*/
|
|
24
|
+
declare const Container: {
|
|
25
|
+
(props: ContainerProps): JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Een container om content horizontaal te centreren in grote viewports.
|
|
28
|
+
* @param props
|
|
29
|
+
* @returns een iets bredere container
|
|
30
|
+
*
|
|
31
|
+
* @description De width van de container is afhankelijk van de maximale viewport width:
|
|
32
|
+
* | | Component | tot 1023px | tot 1216px | tot 1408px | groter |
|
|
33
|
+
* |----|----------------------|------------|------------|------------|-----------|
|
|
34
|
+
* | | `<Container>` | max-width | 960px | 1152px | 1344px |
|
|
35
|
+
* | >> | `<Container.Wide>` | max-width | max-width | 1152px | 1344px |
|
|
36
|
+
* | | `<Container.Widest>` | max-width | max-width | max-width | 1344px |
|
|
37
|
+
* | | `<Container.Max>` | max-width | max-width | max-width | max-width |
|
|
38
|
+
*
|
|
39
|
+
* @example <Container.Wide>This is a somewhat wider container</Container.Wide>
|
|
40
|
+
*/
|
|
41
|
+
Wide(props: ContainerProps): JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* Een container om content horizontaal te centreren in grote viewports.
|
|
44
|
+
* @param props
|
|
45
|
+
* @returns een hele brede container
|
|
46
|
+
*
|
|
47
|
+
* @description De width van de container is afhankelijk van de maximale viewport width:
|
|
48
|
+
* | | Component | tot 1023px | tot 1216px | tot 1408px | groter |
|
|
49
|
+
* |----|----------------------|------------|------------|------------|-----------|
|
|
50
|
+
* | | `<Container>` | max-width | 960px | 1152px | 1344px |
|
|
51
|
+
* | | `<Container.Wide>` | max-width | max-width | 1152px | 1344px |
|
|
52
|
+
* | >> | `<Container.Widest>` | max-width | max-width | max-width | 1344px |
|
|
53
|
+
* | | `<Container.Max>` | max-width | max-width | max-width | max-width |
|
|
54
|
+
*
|
|
55
|
+
* @example <Container.Widest>This is a wide container</Container.Widest>
|
|
56
|
+
*/
|
|
57
|
+
Widest(props: ContainerProps): JSX.Element;
|
|
58
|
+
/**
|
|
59
|
+
* Een container om content horizontaal te centreren in grote viewports.
|
|
60
|
+
* De width van de container is afhankelijk van de maximale viewport width.
|
|
61
|
+
* Aan de linker- en rechter-zijde wordt een margin van 32px behouden.
|
|
62
|
+
* @param props
|
|
63
|
+
* @returns een container die de gehele breedte van de viewport gebruikt.
|
|
64
|
+
*
|
|
65
|
+
* @description De width van de container is afhankelijk van de maximale viewport width:
|
|
66
|
+
* | | Component | tot 1023px | tot 1216px | tot 1408px | groter |
|
|
67
|
+
* |----|----------------------|------------|------------|------------|-----------|
|
|
68
|
+
* | | `<Container>` | max-width | 960px | 1152px | 1344px |
|
|
69
|
+
* | | `<Container.Wide>` | max-width | max-width | 1152px | 1344px |
|
|
70
|
+
* | | `<Container.Widest>` | max-width | max-width | max-width | 1344px |
|
|
71
|
+
* | >> | `<Container.Max>` | max-width | max-width | max-width | max-width |
|
|
72
|
+
*
|
|
73
|
+
* @example <Container.Max>This is an almost-fullwidth container </Container.Max>
|
|
74
|
+
*/
|
|
75
|
+
Max(props: ContainerProps): JSX.Element;
|
|
76
|
+
};
|
|
77
|
+
export { Container };
|
|
78
|
+
export type { ContainerProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { SizeProp } from '../../loon-react-bulma-types';
|
|
3
|
+
declare type ContentPropsType = {
|
|
4
|
+
size?: SizeProp;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
styles?: CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Een Content component voor generated content. De meeste html tags kunnen hier worden gebruikt.
|
|
11
|
+
* @param props size: de tekstgrootte, children: de content van de content
|
|
12
|
+
* @returns een div geschikt voor content. WYSIWYG ofzo.
|
|
13
|
+
* @example <Content>This is a content which can contain lists, <strong>strong</strong> and <em>italic</em> tags</Content>
|
|
14
|
+
*/
|
|
15
|
+
export declare function Content({ size, className, styles, children }: ContentPropsType): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AlignmentProp } from '../../loon-react-bulma-types';
|
|
3
|
+
export declare type FooterProps = {
|
|
4
|
+
/** de content voor de footer */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** alignment bij de footer. (default = 'c') */
|
|
7
|
+
alignment?: AlignmentProp;
|
|
8
|
+
/** extra classes voor op de footer */
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Maak een footer voor onderaan de pagina.
|
|
13
|
+
* - de footer bevat een container waarvan de text default 'centered' is.
|
|
14
|
+
* @param props
|
|
15
|
+
* @returns een footer met daarin de content.
|
|
16
|
+
* @example <Footer>This is a footer</Footer>
|
|
17
|
+
*/
|
|
18
|
+
export declare function Footer({ children, alignment, className }: FooterProps): JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
2
|
import { BaseInputProps } from '../shared';
|
|
4
3
|
declare type FileInputProps = Omit<BaseInputProps, 'icons'> & {
|
|
5
4
|
/** file types die een file-input zou moeten accepteren. Komma-gescheiden lijst van unieke file-type-specificaties (zie MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file) */
|
|
@@ -24,8 +23,6 @@ declare type FileInputProps = Omit<BaseInputProps, 'icons'> & {
|
|
|
24
23
|
onValueChanged?(files: FileList, isValid?: boolean): any | void;
|
|
25
24
|
/** formatteer de weergegeven filenaamm volgens een eigen functie */
|
|
26
25
|
filenameFormatter?(val: string, files: FileList): string;
|
|
27
|
-
/** icon voor op de input */
|
|
28
|
-
icon?: string | IconProp;
|
|
29
26
|
};
|
|
30
27
|
/**
|
|
31
28
|
* Maak een file input
|
|
@@ -129,10 +129,10 @@ declare const Form: {
|
|
|
129
129
|
disabled?: boolean | undefined;
|
|
130
130
|
tooltip?: string | undefined;
|
|
131
131
|
children?: React.ReactNode;
|
|
132
|
-
size?: "s" | "
|
|
133
|
-
color?: "
|
|
132
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
133
|
+
color?: "s" | "l" | "w" | "i" | "p" | "d" | undefined;
|
|
134
134
|
styling?: "rounded" | "noborder" | "colored" | "blocky" | undefined;
|
|
135
|
-
direction?: "
|
|
135
|
+
direction?: "h" | "horizontal" | "v" | "vertical" | undefined;
|
|
136
136
|
textAlign?: "l" | "c" | "r" | undefined;
|
|
137
137
|
}) => JSX.Element;
|
|
138
138
|
};
|
|
@@ -178,7 +178,7 @@ declare const Form: {
|
|
|
178
178
|
*/
|
|
179
179
|
Buttons: ({ children, size, alignment, }: {
|
|
180
180
|
children: React.ReactNode;
|
|
181
|
-
size?: "s" | "
|
|
181
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
182
182
|
alignment?: "l" | "c" | "r" | undefined;
|
|
183
183
|
}) => JSX.Element;
|
|
184
184
|
};
|
|
@@ -8,6 +8,6 @@ export declare const InputContainer: ({ label, children: input, error, size, dir
|
|
|
8
8
|
} | undefined;
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
error?: React.ReactNode;
|
|
11
|
-
size?: "s" | "
|
|
11
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
12
12
|
direction: DirectionProp;
|
|
13
13
|
}) => JSX.Element;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SizeProp } from '../../loon-react-bulma-types';
|
|
3
|
+
declare type HeroProps = {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
/** type hero */
|
|
6
|
+
heroColorFor?: 'werknemer' | 'werkgever' | 'klant' | 'admin' | 'primary' | undefined;
|
|
7
|
+
/** de grootte van de hero (default = small ('s')) */
|
|
8
|
+
size?: SizeProp | undefined;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Maak een schermbrede hero aan. Optionele top-buttons en/of tabs voor navigatie
|
|
12
|
+
* @param props
|
|
13
|
+
* @returns een Hero
|
|
14
|
+
* @example
|
|
15
|
+
|
|
16
|
+
*/
|
|
17
|
+
declare const Hero: {
|
|
18
|
+
(props: HeroProps): JSX.Element;
|
|
19
|
+
/** Top-bar van de hero met
|
|
20
|
+
* - een BurgerMenu voor de navigatie-items
|
|
21
|
+
* - items aan de rechterkant van het scherm
|
|
22
|
+
* @param props props
|
|
23
|
+
* @returns een HeroHead met daarin optionele links of buttons
|
|
24
|
+
* @example
|
|
25
|
+
* <Hero.Head>
|
|
26
|
+
* <Hero.Head.Button onClick={handleClickNotify}>Notify</Hero.Head.Button>
|
|
27
|
+
* <Hero.Head.Button onClick={handleClickClear}>Clear</Hero.Head.Button>
|
|
28
|
+
* <Hero.Head.Link to="https://www.bulma.io">Bulma</Hero.Head.Link>
|
|
29
|
+
* <Hero.Head.Link to="https://www.nodeJS.org">NodeJS</Hero.Head.Link>
|
|
30
|
+
* </Hero.Head>
|
|
31
|
+
*/
|
|
32
|
+
Head: {
|
|
33
|
+
(props: {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
}): JSX.Element;
|
|
36
|
+
/** een button in de hero head
|
|
37
|
+
* @param props props
|
|
38
|
+
* @returns een button in de hero head
|
|
39
|
+
* @example <Hero.Head.Button onClick={handleClick}>Button</Hero.Head.Button>
|
|
40
|
+
*/
|
|
41
|
+
Button(props: {
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
tooltip?: string | undefined;
|
|
44
|
+
onClick?: ((e: any) => void) | undefined;
|
|
45
|
+
}): JSX.Element;
|
|
46
|
+
/** Een link in de hero head
|
|
47
|
+
* @param props props
|
|
48
|
+
* @returns een link in de hero head
|
|
49
|
+
* @example <Hero.Head.Link to="https://www.loon.be" tooltip="Loon.be">Loon.be</Hero.Head.Link>
|
|
50
|
+
*/
|
|
51
|
+
Link(props: {
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
tooltip?: string;
|
|
54
|
+
to?: string;
|
|
55
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
56
|
+
rel?: 'alternat' | 'author' | 'bookmark' | 'external' | 'help' | 'license' | 'next' | 'nofollow' | 'noreferrer' | 'noopener' | 'prev' | 'search' | 'tag';
|
|
57
|
+
}): JSX.Element;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* BOdy of the hero, which could contain a title and/or subtitle
|
|
61
|
+
* @param props props
|
|
62
|
+
* @returns hero body with content
|
|
63
|
+
* @example
|
|
64
|
+
* <Hero.Body>
|
|
65
|
+
* <Title>Title</Title>
|
|
66
|
+
* <Subtitle>Subtitle</Subtitle>
|
|
67
|
+
* </Hero.Body>
|
|
68
|
+
*/
|
|
69
|
+
Body(props: {
|
|
70
|
+
children: React.ReactNode;
|
|
71
|
+
}): JSX.Element;
|
|
72
|
+
/**
|
|
73
|
+
* Hero foot with navigation
|
|
74
|
+
* @param props props
|
|
75
|
+
* @returns hero foot with navigation
|
|
76
|
+
* @example
|
|
77
|
+
* <Hero.Foot>
|
|
78
|
+
* <ul>
|
|
79
|
+
* <li className="is-active"><a href="">Active Navigation Link </a></li>
|
|
80
|
+
* <li><a href="">Another Navigation Link</a></li>
|
|
81
|
+
* </ul>
|
|
82
|
+
* </Hero.Foot>
|
|
83
|
+
|
|
84
|
+
* <Hero.NavList>
|
|
85
|
+
* <Hero.NavItem to="/">Navigation Link</Hero.NavItem>
|
|
86
|
+
* </Hero.NavList>
|
|
87
|
+
*/
|
|
88
|
+
Foot: {
|
|
89
|
+
(props: {
|
|
90
|
+
children: React.ReactNode;
|
|
91
|
+
}): JSX.Element;
|
|
92
|
+
/** Navigation ItemList voor In een Hero Foot. Parent should be <Hero.Foot> and children should be <Hero.Foot.NavItem>
|
|
93
|
+
* @param props props
|
|
94
|
+
* @returns Navigation Item List for Hero's
|
|
95
|
+
* @example
|
|
96
|
+
* <Hero.Foot.NavList>
|
|
97
|
+
* <Hero.Foot.NavItem to="/">URL </Hero.Foot.NavItem>
|
|
98
|
+
* <Hero.Foot.NavItem to="/">URL </Hero.Foot.NavItem>
|
|
99
|
+
* </Hero.Foot.NavList>
|
|
100
|
+
*/
|
|
101
|
+
NavList(props: {
|
|
102
|
+
children: React.ReactNode;
|
|
103
|
+
}): JSX.Element;
|
|
104
|
+
/** Navigation Item voor in een Hero Foot. Parent should be <Hero.Foot.NavList>
|
|
105
|
+
* @param props props
|
|
106
|
+
* @returns Navigation Item for Hero's
|
|
107
|
+
* @example <Hero.Foot.NavItem to="/">URL</Hero.Foot.NavItem>
|
|
108
|
+
*/
|
|
109
|
+
NavItem(props: {
|
|
110
|
+
children: React.ReactNode;
|
|
111
|
+
to: string;
|
|
112
|
+
active?: boolean;
|
|
113
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
114
|
+
tooltip?: string;
|
|
115
|
+
rel?: 'alternat' | 'author' | 'bookmark' | 'external' | 'help' | 'license' | 'next' | 'nofollow' | 'noreferrer' | 'noopener' | 'prev' | 'search' | 'tag';
|
|
116
|
+
}): JSX.Element;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export { Hero };
|
|
120
|
+
export type { HeroProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type ImageProps = {
|
|
3
|
+
/** de ratio (width x height) van de afbeelding */
|
|
4
|
+
ratio: '1by1' | '5by4' | '4by5' | '4by3' | '3by4' | '3by2' | '2by3' | '5by3' | '3by5' | '16by9' | '9by16' | '2by1' | '1by2' | '3by1' | '1by3' | 'square';
|
|
5
|
+
/** geef een gewenste width op in geval van een ratio. Als er geen waarde is, wordt de parent gevuld
|
|
6
|
+
* voor ratio='square' MOETEN de string literal waarden worden gebruikt */
|
|
7
|
+
imgWidth?: '16' | '24' | '32' | '48' | '64' | '96' | '128' | string;
|
|
8
|
+
/** wordt de afbeelding rond ? LET OP: Alleen voor ratio == 'square'! */
|
|
9
|
+
isRounded?: boolean;
|
|
10
|
+
/** src-attribuut van image tag */
|
|
11
|
+
src: string;
|
|
12
|
+
/** alt-attribuut van image tag */
|
|
13
|
+
alt: string;
|
|
14
|
+
/** een optionele figcaption */
|
|
15
|
+
figCaption?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Een afbeelding met een vastgestelde aspect ratio.
|
|
19
|
+
* Voor de ratio 'square' kan er een size worden opgegeven.
|
|
20
|
+
* De andere ratio's nemen de gehele width van de parent-container in.
|
|
21
|
+
* @param props
|
|
22
|
+
* @returns an image with a fixed aspect ratio
|
|
23
|
+
* @example <Image ratio="1by1" src="https://www.loon.be/images/logo.png" alt="Loon.be" />
|
|
24
|
+
*/
|
|
25
|
+
declare function Image(props: ImageProps): JSX.Element;
|
|
26
|
+
export { Image };
|
|
27
|
+
export type { ImageProps };
|
|
@@ -17,7 +17,7 @@ declare type MessageProps = {
|
|
|
17
17
|
*/
|
|
18
18
|
declare const Message: {
|
|
19
19
|
({ children, title, size, color }: MessageProps & {
|
|
20
|
-
color?: "
|
|
20
|
+
color?: "i" | "p" | "s" | "d" | "w" | "l" | undefined;
|
|
21
21
|
}): JSX.Element;
|
|
22
22
|
/** een primary-colored message
|
|
23
23
|
* @param props props
|