loon-bulma-react 2026.0.39 → 2026.0.41
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/DragDrop/DragDropList.d.ts +6 -4
- package/dist/forms/Select/Select.d.ts +1 -1
- package/dist/hooks/useClipboard.d.ts +3 -3
- package/dist/index.js +1257 -1249
- package/dist/internal_functions/createIconsInternal.d.ts +2 -1
- package/dist/lib/classes/Console.d.ts +29 -0
- package/dist/lib/classes/FetchWrapper.d.ts +124 -0
- package/dist/lib/components/AspectRatio/AspectRatio.d.ts +28 -0
- package/dist/lib/components/Block/Block.d.ts +9 -0
- package/dist/lib/components/Box/BorderBox.d.ts +29 -0
- package/dist/lib/components/Box/Box.d.ts +20 -0
- package/dist/lib/components/Button/Button.d.ts +87 -0
- package/dist/lib/components/ButtonGroup/ButtonGroup.d.ts +26 -0
- package/dist/lib/components/Calendar/CalendarItems/CalendarColoredItem.d.ts +18 -0
- package/dist/lib/components/Calendar/CalendarItems/CalendarItem.d.ts +18 -0
- package/dist/lib/components/Calendar/DayContainer.d.ts +25 -0
- package/dist/lib/components/Calendar/EventDescriptions.d.ts +33 -0
- package/dist/lib/components/Calendar/Fourweeks/FourweeksView.d.ts +23 -0
- package/dist/lib/components/Calendar/Mini/MiniView.d.ts +24 -0
- package/dist/lib/components/Calendar/Month/MonthView.d.ts +23 -0
- package/dist/lib/components/Calendar/Planning/PlanningView.d.ts +41 -0
- package/dist/lib/components/Calendar/Props.d.ts +58 -0
- package/dist/lib/components/Calendar/Week/AlldayContainer.d.ts +19 -0
- package/dist/lib/components/Calendar/Week/HourRow.d.ts +30 -0
- package/dist/lib/components/Calendar/Week/WeekView.d.ts +24 -0
- package/dist/lib/components/Calendar/calendar.functions.d.ts +10 -0
- package/dist/lib/components/Calendar/index.d.ts +15 -0
- package/dist/lib/components/CodeBlock/CodeBlock.d.ts +49 -0
- package/dist/lib/components/Columns/Column.d.ts +207 -0
- package/dist/lib/components/Columns/Columns.d.ts +35 -0
- package/dist/lib/components/Container/Container.d.ts +45 -0
- package/dist/lib/components/Content/Content.d.ts +22 -0
- package/dist/lib/components/DataTable/DataTable.d.ts +227 -0
- package/dist/lib/components/DataTable/DataTableDropdown.d.ts +39 -0
- package/dist/lib/components/Divider/Divider.d.ts +23 -0
- package/dist/lib/components/DragDrop/DragDropList.d.ts +97 -0
- package/dist/lib/components/Dropdown/Dropdown.d.ts +42 -0
- package/dist/lib/components/Footer/Footer.d.ts +22 -0
- package/dist/lib/components/Help/Help.d.ts +19 -0
- package/dist/lib/components/Hero/Hero.d.ts +104 -0
- package/dist/lib/components/Icon/Icon.d.ts +84 -0
- package/dist/lib/components/Image/Image.d.ts +28 -0
- package/dist/lib/components/Indicator/Indicator.d.ts +25 -0
- package/dist/lib/components/Kbd/Kbd.d.ts +30 -0
- package/dist/lib/components/Label/Label.d.ts +11 -0
- package/dist/lib/components/Link/Link.d.ts +44 -0
- package/dist/lib/components/Menu/Menu.d.ts +64 -0
- package/dist/lib/components/Message/Message.d.ts +49 -0
- package/dist/lib/components/Modal/Modal.d.ts +89 -0
- package/dist/lib/components/Notification/Notification.d.ts +38 -0
- package/dist/lib/components/Pagination/Pagination.d.ts +58 -0
- package/dist/lib/components/Panel/Panel.d.ts +99 -0
- package/dist/lib/components/ProgressBar/ProgressBar.d.ts +28 -0
- package/dist/lib/components/QuickView/QuickView.d.ts +61 -0
- package/dist/lib/components/ScrollArea/ScrollArea.d.ts +76 -0
- package/dist/lib/components/Section/Section.d.ts +21 -0
- package/dist/lib/components/SimpleTable/SimpleTable.d.ts +130 -0
- package/dist/lib/components/Steps/Steps.d.ts +61 -0
- package/dist/lib/components/TabBar/TabBar.d.ts +47 -0
- package/dist/lib/components/Tag/Tag.d.ts +54 -0
- package/dist/lib/components/TimeLine/TimeLine.d.ts +62 -0
- package/dist/lib/components/Titles/Titles.d.ts +71 -0
- package/dist/lib/components/ToggleBar/ToggleBar.d.ts +80 -0
- package/dist/lib/components/Tooltip/Tooltip.d.ts +50 -0
- package/dist/lib/components/TreeView/TreeView.d.ts +185 -0
- package/dist/lib/contexts/ActionSheet/ActionSheetContextProvider.d.ts +76 -0
- package/dist/lib/contexts/AppProvider/AppProviders.d.ts +17 -0
- package/dist/lib/contexts/ColorSchemeProvider/ColorSchemeProvider.d.ts +15 -0
- package/dist/lib/contexts/Confirm/ConfirmContextProvider.d.ts +60 -0
- package/dist/lib/contexts/DefaultsProvider/DefaultsProvider.d.ts +100 -0
- package/dist/lib/contexts/DialogsProvider/DialogsProvider.d.ts +4 -0
- package/dist/lib/contexts/KeysProvider/KeysProvider.d.ts +52 -0
- package/dist/lib/contexts/ModalProvider/ModalProvider.d.ts +11 -0
- package/dist/lib/contexts/ModeProvider/ModeProvider.d.ts +16 -0
- package/dist/lib/contexts/Notifier/Notifier.d.ts +81 -0
- package/dist/lib/contexts/Prompt/PromptContextProvider.d.ts +71 -0
- package/dist/lib/forms/Checkbox/Checkbox.d.ts +48 -0
- package/dist/lib/forms/ComboBox/ComboBox.d.ts +44 -0
- package/dist/lib/forms/ComboBox/MultiComboBox.d.ts +44 -0
- package/dist/lib/forms/ComboBox/useComboBoxScroll.d.ts +4 -0
- package/dist/lib/forms/Currency/CurrencyInput.d.ts +50 -0
- package/dist/lib/forms/Datetimes/DateInput.d.ts +37 -0
- package/dist/lib/forms/Datetimes/DateTimeInput.d.ts +44 -0
- package/dist/lib/forms/Datetimes/TimeInput.d.ts +42 -0
- package/dist/lib/forms/File/FileInput.d.ts +71 -0
- package/dist/lib/forms/Input.d.ts +248 -0
- package/dist/lib/forms/MaskedInput/IBANInput.d.ts +95 -0
- package/dist/lib/forms/MaskedInput/MaskedInput.d.ts +46 -0
- package/dist/lib/forms/Numeric/NumberInput.d.ts +16 -0
- package/dist/lib/forms/Numeric/RangeInput.d.ts +21 -0
- package/dist/lib/forms/Others/ColorInput.d.ts +56 -0
- package/dist/lib/forms/Others/HiddenInput.d.ts +29 -0
- package/dist/lib/forms/Others/TelephoneInput.d.ts +14 -0
- package/dist/lib/forms/Others/URLInput.d.ts +14 -0
- package/dist/lib/forms/Periodes/MonthInput.d.ts +43 -0
- package/dist/lib/forms/Periodes/WeekInput.d.ts +43 -0
- package/dist/lib/forms/Radio/Radio.d.ts +97 -0
- package/dist/lib/forms/Select/Select.d.ts +136 -0
- package/dist/lib/forms/TagsInput/TagsInput.d.ts +44 -0
- package/dist/lib/forms/Text/EmailInput.d.ts +14 -0
- package/dist/lib/forms/Text/FormattedInput.d.ts +54 -0
- package/dist/lib/forms/Text/PasswordInput.d.ts +19 -0
- package/dist/lib/forms/Text/TextArea.d.ts +31 -0
- package/dist/lib/forms/Text/TextEditor.d.ts +36 -0
- package/dist/lib/forms/Text/TextInput.d.ts +30 -0
- package/dist/lib/hooks/useCaretPosition.d.ts +8 -0
- package/dist/lib/hooks/useClickOutside.d.ts +15 -0
- package/dist/lib/hooks/useClipboard.d.ts +21 -0
- package/dist/lib/hooks/useContextMenu.d.ts +29 -0
- package/dist/lib/hooks/useCookieState.d.ts +37 -0
- package/dist/lib/hooks/useDebounced.hooks.d.ts +85 -0
- package/dist/lib/hooks/useFetchApi.d.ts +65 -0
- package/dist/lib/hooks/useHotkeys.d.ts +96 -0
- package/dist/lib/hooks/useIndexedDb.d.ts +90 -0
- package/dist/lib/hooks/useLocalStoredState.d.ts +36 -0
- package/dist/lib/hooks/useMediaQuery.d.ts +154 -0
- package/dist/lib/hooks/usePagination.d.ts +25 -0
- package/dist/lib/hooks/usePropState.d.ts +16 -0
- package/dist/lib/hooks/useScrollIntoView.d.ts +59 -0
- package/dist/lib/hooks/useSessionStoredState.d.ts +38 -0
- package/dist/lib/hooks/useThrottle.hooks.d.ts +99 -0
- package/dist/lib/hooks/useToggle.d.ts +16 -0
- package/dist/lib/hooks/useUncontrolled.d.ts +44 -0
- package/dist/lib/hooks/useValidatedState.d.ts +21 -0
- package/dist/lib/index.d.ts +174 -0
- package/dist/lib/internal_functions/createIconsInternal.d.ts +36 -0
- package/dist/lib/internal_functions/getAlignmentClass.d.ts +16 -0
- package/dist/lib/internal_functions/getColorClass.d.ts +23 -0
- package/dist/lib/internal_functions/getPositionClass.d.ts +2 -0
- package/dist/lib/internal_functions/getSizeClass.d.ts +23 -0
- package/dist/lib/internal_functions/index.d.ts +8 -0
- package/dist/lib/shims/useSyncExternalStoreShim.d.ts +1 -0
- package/dist/lib/shims/useSyncExternalStoreWithSelector.d.ts +5 -0
- package/dist/lib/test-data.d.ts +9 -0
- package/dist/lib/types/index.d.ts +104 -0
- package/dist/lib/utils/BSN.functions.d.ts +57 -0
- package/dist/lib/utils/IBAN.functions.d.ts +138 -0
- package/dist/lib/utils/JSDateTime.class.d.ts +512 -0
- package/dist/lib/utils/JSDuration.class.d.ts +184 -0
- package/dist/lib/utils/colors.d.ts +54 -0
- package/dist/lib/utils/compare.d.ts +7 -0
- package/dist/lib/utils/deserialize.function.d.ts +2 -0
- package/dist/lib/utils/flattenChildren.function.d.ts +49 -0
- package/dist/lib/utils/math.d.ts +22 -0
- package/dist/lib/utils/object.functions.d.ts +37 -0
- package/dist/lib/utils/operators.d.ts +195 -0
- package/dist/lib/utils/serialize.function.d.ts +2 -0
- package/dist/lib/utils/sorting.d.ts +34 -0
- package/dist/lib/utils/string.utils.d.ts +125 -0
- package/package.json +51 -51
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
import { TextInputProps } from './../../forms/Text/TextInput';
|
|
4
|
+
import { StrictOmit } from './../../types';
|
|
5
|
+
type State = {
|
|
6
|
+
show: boolean;
|
|
7
|
+
content: string | React.ReactNode;
|
|
8
|
+
submit: string;
|
|
9
|
+
submitIcon?: IconProp | undefined;
|
|
10
|
+
cancel: string;
|
|
11
|
+
cancelIcon?: IconProp | undefined;
|
|
12
|
+
otherButtons: React.ReactNode[];
|
|
13
|
+
value: string;
|
|
14
|
+
inputProps: TextInputProps;
|
|
15
|
+
modalID: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* prompt provider om `usePrompt`-hook te kunnen gebruiken.
|
|
19
|
+
* @param children de children
|
|
20
|
+
* @returns
|
|
21
|
+
* @example // index.tsx of App.tsx
|
|
22
|
+
* root.render(
|
|
23
|
+
* <PromptProvider>
|
|
24
|
+
* <>
|
|
25
|
+
* // ...
|
|
26
|
+
* </>
|
|
27
|
+
* </PromptProvider>)
|
|
28
|
+
*/
|
|
29
|
+
declare function PromptProvider({ children }: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export type AllowedPromptTypes = 'text' | 'password' | 'number' | 'email' | 'tel' | 'url' | 'range' | 'date' | 'datetime-local' | 'datetime' | 'month' | 'week' | 'time' | 'color' | 'search';
|
|
33
|
+
/**
|
|
34
|
+
* Hook voor de prompt
|
|
35
|
+
* @param submitTxt tekst voor op de OK-button (default = 'OK')
|
|
36
|
+
* @param cancelTxt tekst voor opd e cancel-button (default = 'Annuleren')
|
|
37
|
+
* @param inputSettings: de props voor de input, gebruikt dezelfde als `<TextInput>`, alleen `name` en `label` zijn optioneel
|
|
38
|
+
* @returns onConfirm-fn, onCancel-fn, prompt-fn, onUpdate-fn, promptState
|
|
39
|
+
* @example
|
|
40
|
+
* const { prompt } = usePrompt({
|
|
41
|
+
* name: 'my-prompt-input',
|
|
42
|
+
* label: 'Mijn superspeciale prompt input',
|
|
43
|
+
* type: 'password',
|
|
44
|
+
* max: 6,
|
|
45
|
+
* });
|
|
46
|
+
* // ...
|
|
47
|
+
* const result = await prompt("Geef een waarde op", "Okidoki","Neuhh")
|
|
48
|
+
* // OR:
|
|
49
|
+
* const result2 = await prompt(<p>Doe een waarde!</p>)
|
|
50
|
+
*/
|
|
51
|
+
declare function usePrompt(inputSettings?: StrictOmit<TextInputProps, 'name'> & {
|
|
52
|
+
name?: string;
|
|
53
|
+
type?: AllowedPromptTypes;
|
|
54
|
+
}): {
|
|
55
|
+
/** INTERNAL USE ONLY - DO NOT USE */
|
|
56
|
+
onSubmit: () => void;
|
|
57
|
+
/** INTERNAL USE ONLY - DO NOT USE */
|
|
58
|
+
onCancel: () => void;
|
|
59
|
+
/** INTERNAL USE ONLY - DO NOT USE */
|
|
60
|
+
onUpdate: (val: string) => void;
|
|
61
|
+
/**
|
|
62
|
+
* awaitable confirm function. Geef een string of Fragment op om iets in de confirm-modal te tonen
|
|
63
|
+
* @param content string of Fragment met de boodschap voor de confirm
|
|
64
|
+
* @returns Promise<boolean> met true als de gebruiker op OK heeft geklikt, false als anders
|
|
65
|
+
* @example const isConfirmed = await confirm("Weet je het zeker?")
|
|
66
|
+
*/
|
|
67
|
+
prompt: (content: string | React.ReactNode, okText?: string | undefined, cancelText?: string | undefined, okIcon?: IconProp | undefined, cancelIcon?: IconProp | undefined, ...otherButtons: React.ReactNode[]) => Promise<string>;
|
|
68
|
+
/** INTERNAL USE ONLY - DO NOT USE */
|
|
69
|
+
promptState: State;
|
|
70
|
+
};
|
|
71
|
+
export { PromptProvider, usePrompt };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { StrictOmit, ColorProp } from './../../types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { InputPropsType, InputStylingPropsType, InputErrorProps } from '../Input';
|
|
4
|
+
type CheckBoxInputProps = StrictOmit<InputPropsType<string>, 'value' | 'onValueChanged' | 'type' | 'step' | 'pattern' | 'errorMessage' | 'infoMessage' | 'min' | 'max' | 'pattern' | 'placeholder' | 'iconRight'> & StrictOmit<InputStylingPropsType, 'icon'> & {
|
|
5
|
+
/** is de input checked? */
|
|
6
|
+
value?: boolean;
|
|
7
|
+
/** label bij de input. Mag ook een `React.ReactNode` zijn. Als geen label, dan wordt de `name`-property gebruikt. */
|
|
8
|
+
label?: string | React.ReactNode;
|
|
9
|
+
/** kleur voor de checkbox. (default = `p`, primary) */
|
|
10
|
+
color?: ColorProp;
|
|
11
|
+
/** foutmelding bij de input */ errorMessage?: string | ((s: InputErrorProps<boolean>) => string);
|
|
12
|
+
/** info-melding bij de input */ infoMessage?: string | ((v: boolean) => string);
|
|
13
|
+
onValueChanged?: (v: boolean) => void | Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Een checkbox input met een container eromheen. Om een checkbox in te voegen zonder container, gebruik dan de `<CB ... />`-component. DEze component 'wrapt' deze `CB`-component.
|
|
17
|
+
* De properties `type`, `step`, `min`, `max`, `pattern`, `icon` en `placeholder` kunnen niet op deze component gebruikt worden. Ze slaan nergens op bij checkboxes.
|
|
18
|
+
*
|
|
19
|
+
* **De checkbox maakt *geen* gebruik van de `checked`-prop van normale checkboxes, gebruik `value`!**
|
|
20
|
+
* @param value is de checkbox checked?
|
|
21
|
+
* @param label label bij de checkbox. Mag ook een `React.ReactNode` zijn. Als geen label, dan wordt de `name`-property gebruikt.
|
|
22
|
+
* @param color kleur voor de checkbox. (default = `p`, primary)
|
|
23
|
+
* @param styling styling voor de checkbox. (default = `normal`)
|
|
24
|
+
* @example
|
|
25
|
+
* const [x, setX] = React.useState(false);
|
|
26
|
+
* <CheckBox name="test" label="test" value={x} onValueChanged={setX} direction='v'/>
|
|
27
|
+
*/
|
|
28
|
+
declare function CheckBox({ id, label, name, size: sizeProp, direction: directionProp, required, showRequiredOnLabel, value, labelHidden, helpTag, infoData, onValueChanged, onBlur, onFocus, ...props }: CheckBoxInputProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Een checkbox input die nog helemaal zelf aan te passen is, dus zonder container eromheen. Om een checkbox in met wat meer styling te gebruiken, gebruik dan de `CheckBox` component.
|
|
31
|
+
* Dat is een wrapper om deze component heen. De properties `type`, `step`, `min`, `max`, `icon`, `pattern`, `placeholder` en `direction` zijn niet van toepassing op deze component.
|
|
32
|
+
*
|
|
33
|
+
* **De checkbox maakt *geen* gebruik van de `checked`-prop van normale checkboxes, gebruik `value`!**
|
|
34
|
+
* @param value is de checkbox checked?
|
|
35
|
+
* @param label label bij de checkbox. Mag ook een `React.ReactNode` zijn. Als geen label, dan wordt de `name`-property gebruikt.
|
|
36
|
+
* @param color kleur voor de checkbox. (default = `p`, primary)
|
|
37
|
+
* @param styling styling voor de checkbox. (default = `normal`)
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* const [x, setX] = React.useState(false);
|
|
41
|
+
* <CB name="test" label="test" value={x} onValueChanged={setX}/>
|
|
42
|
+
*/
|
|
43
|
+
declare function CB({ helpTag, errorMessage, infoMessage, label, disabled, keyboardType, title, name, value, required, spellCheck, id, autoComplete, readonly, autofocus, form, inputRef: ref, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onValueChanged, size: sizeProp, alignment: alignmentProp, color, infoDataEl, }: // inverted = false,
|
|
44
|
+
StrictOmit<CheckBoxInputProps, 'direction' | 'labelHidden' | 'infoData'> & {
|
|
45
|
+
infoDataEl?: React.ReactNode;
|
|
46
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export { CheckBox, CB };
|
|
48
|
+
export type { CheckBoxInputProps as CheckboxInputProps };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StrictOmit, AutoCompleteProp } from './../../types';
|
|
3
|
+
import { InputPropsType, InputStylingPropsType, InputErrorProps, InputValueType } from '../Input';
|
|
4
|
+
type ComboBoxProps<T extends unknown = {}> = StrictOmit<InputPropsType<number | string | string[]>, 'type' | 'step' | 'inputRef' | 'value' | 'onValueChanged' | 'min' | 'max' | 'readonly' | 'pattern' | 'errorMessage' | 'infoMessage' | 'title' | 'form' | 'autoComplete' | 'spellCheck' | 'keyboardType'> & InputStylingPropsType & {
|
|
5
|
+
/** De waarde van de combobox */ value: T;
|
|
6
|
+
/** Alle mogelijke opties in de combobox */ options: T[];
|
|
7
|
+
/** Is autocomplete aan op deze combobox? (default = `'off'` ) */ autoComplete?: AutoCompleteProp;
|
|
8
|
+
/** functie om het label in de combobox samen te stellen
|
|
9
|
+
* default:
|
|
10
|
+
*/
|
|
11
|
+
formatLabel?: (value: T) => string;
|
|
12
|
+
formatOption?: (value: T, index: number) => React.ReactNode;
|
|
13
|
+
formatValue?: (value: T) => React.ReactNode;
|
|
14
|
+
/** callback voor calue changes */
|
|
15
|
+
onValueChanged?: (value: T) => void | Promise<void>;
|
|
16
|
+
/** Als we typen in de combobox, hoe moet er gezocht worden? Default doorzoeken we de `JSON.stringify`-string van de objecten */
|
|
17
|
+
onSearch?: (searchTxt: string, value: T) => boolean;
|
|
18
|
+
/** foutmelding bij de input */ errorMessage?: string | ((s: InputErrorProps<string>) => string);
|
|
19
|
+
/** info-melding bij de input */ infoMessage?: string | ((v: InputValueType) => string);
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Een ComboBox is een combi van een `<Select>` en een `<Input>`. Je kan een waarde uit een lijst kieze, maar deze ook intypen.
|
|
23
|
+
* @example // Combobox met string values
|
|
24
|
+
* const options:string[] = users.slice(0, 100).map((item) => `${item.first_name} ${item.last_name}`);
|
|
25
|
+
* <ComboBox name="ComboBox"
|
|
26
|
+
* value={value}
|
|
27
|
+
* options={options}
|
|
28
|
+
* onValueChanged={onChange}
|
|
29
|
+
* onSearch={(txt, v) => v.includes(txt)}
|
|
30
|
+
* />
|
|
31
|
+
* @example // ComboBox met object values
|
|
32
|
+
* const options: User[] = users.slice(0, 100);
|
|
33
|
+
* <ComboBox<typeof value2>
|
|
34
|
+
* name="ComboBox - Objects"
|
|
35
|
+
* value={value2}
|
|
36
|
+
* options={options2}
|
|
37
|
+
* onValueChanged={onChange2}
|
|
38
|
+
* labelForValue={(v) => `${v.first_name} ${v.last_name}`}
|
|
39
|
+
* onSearch={(txt, v) => v.last_name.includes(txt) || v.first_name.includes(txt)}
|
|
40
|
+
* />
|
|
41
|
+
*/
|
|
42
|
+
declare function ComboBox<T extends unknown = {}>({ value, options, id, name, label, required, showRequiredOnLabel, errorMessage, infoMessage, alignment: alignmentProp, size: sizeProp, direction: directionProp, placeholder, helpTag, disabled, loading, autofocus, iconRight, labelHidden, icon, infoData, className: cn, color, onValueChanged, onChange, onFocus, onBlur, onKeyDown, onKeyUp, onSearch, formatLabel, formatValue, formatOption, }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export { ComboBox };
|
|
44
|
+
export type { ComboBoxProps };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { StrictOmit, AutoCompleteProp } from './../../types';
|
|
2
|
+
import { InputPropsType, InputStylingPropsType, InputErrorProps, InputValueType } from '../Input';
|
|
3
|
+
type MultiComboBoxProps<T extends unknown = {}> = StrictOmit<InputPropsType<number | string | string[]>, 'type' | 'step' | 'inputRef' | 'value' | 'onValueChanged' | 'min' | 'max' | 'readonly' | 'pattern' | 'errorMessage' | 'infoMessage' | 'title' | 'form' | 'autoComplete' | 'spellCheck' | 'keyboardType' | 'onChange'> & InputStylingPropsType & {
|
|
4
|
+
/** De waarde van de combobox */ value: T[];
|
|
5
|
+
/** Alle mogelijke opties in de combobox */ options: T[];
|
|
6
|
+
/** Is autocomplete aan op deze combobox? (default = `'off'` ) */ autoComplete?: AutoCompleteProp;
|
|
7
|
+
/** functie om het label in de combobox samen te stellen
|
|
8
|
+
* default:
|
|
9
|
+
*/
|
|
10
|
+
formatLabel?: (value: T) => string;
|
|
11
|
+
/** functie om de waarde in de combobox samen te stellen (als niet-geopend) */
|
|
12
|
+
formatValue?: (value: T[]) => string;
|
|
13
|
+
/** callback voor calue changes */
|
|
14
|
+
onValueChanged?: (value: T[]) => void | Promise<void>;
|
|
15
|
+
/** Als we typen in de combobox, hoe moet er gezocht worden? Default doorzoeken we de `JSON.stringify`-string van de objecten */
|
|
16
|
+
onSearch?: (searchTxt: string, value: T) => boolean | Promise<void>;
|
|
17
|
+
/** foutmelding bij de input */ errorMessage?: string | ((s: InputErrorProps<T[]>) => string);
|
|
18
|
+
/** info-melding bij de input */ infoMessage?: string | ((v: InputValueType) => string);
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Een MultiComboBox is een combi van een `<Select>` en een `<Input>`. Je kan een waarde uit een lijst kiezen, maar deze ook zoeken door hem in te typen.
|
|
22
|
+
* @example // Combobox met string values
|
|
23
|
+
* const options: string[] = users.slice(0, 100).map((item) => `${item.first_name} ${item.last_name}`);
|
|
24
|
+
* <MultiComboBox name="MultiComboBox"
|
|
25
|
+
* value={value}
|
|
26
|
+
* options={options}
|
|
27
|
+
* onValueChanged={onChange}
|
|
28
|
+
* onSearch={(txt, v) => v.includes(txt)}
|
|
29
|
+
* />
|
|
30
|
+
* @example // MultiComboBox met object values
|
|
31
|
+
* const options: User[] = users.slice(0, 100);
|
|
32
|
+
* <MultiComboBox<User>
|
|
33
|
+
* name="MultiComboBox - Objects"
|
|
34
|
+
* value={value2}
|
|
35
|
+
* options={options2}
|
|
36
|
+
* onValueChanged={onChange2}
|
|
37
|
+
* formatLabel={(v) => `${v.first_name} ${v.last_name}`}
|
|
38
|
+
* formatValue={(items) => items.map((v) => `${v.first_name} ${v.last_name}`).join(', ')}
|
|
39
|
+
* onSearch={(txt, v) => v.last_name.includes(txt) || v.first_name.includes(txt)}
|
|
40
|
+
* />
|
|
41
|
+
*/
|
|
42
|
+
declare function MultiComboBox<T extends unknown = {}>({ value, options, id, name, label, required, showRequiredOnLabel, errorMessage, infoMessage, alignment: alignmentProp, size: sizeProp, direction: directionProp, placeholder, helpTag, disabled, loading, autofocus, labelHidden, icon, iconRight, infoData, color, onValueChanged, onFocus, onBlur, onKeyDown, onKeyUp, onSearch, formatLabel, formatValue, }: MultiComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export { MultiComboBox };
|
|
44
|
+
export type { MultiComboBoxProps };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** speciale use scroll handler voor de combobox */
|
|
3
|
+
declare function useComboBoxScroll(focusIndex: number, container: React.RefObject<HTMLDivElement | null>, list: React.RefObject<HTMLUListElement | null>): void;
|
|
4
|
+
export { useComboBoxScroll };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { StrictOmit } from './../../types';
|
|
2
|
+
import { InputPropsType, InputStylingPropsType, InputErrorProps } from '../Input';
|
|
3
|
+
type CurrencyInputProps = StrictOmit<InputPropsType<number>, 'keyboardType' | 'pattern' | 'value' | 'type' | 'onValueChanged' | 'errorMessage' | 'infoMessage'> & InputStylingPropsType & {
|
|
4
|
+
/** waarde van de input. Als number of als number-string-tuple (zoals waarde uit `onValueChanged`) */
|
|
5
|
+
value?: number | undefined;
|
|
6
|
+
/** foutmelding bij de input */
|
|
7
|
+
errorMessage?: string | ((v: InputErrorProps) => string);
|
|
8
|
+
/** speciale informatie-tekst bij de input */
|
|
9
|
+
infoMessage?: string | ((v?: number) => string);
|
|
10
|
+
/** suffix achter het bedrag (default = `''`) */
|
|
11
|
+
suffix?: string;
|
|
12
|
+
/** prefix voor het bedrag (default = `''`) */
|
|
13
|
+
prefix?: string;
|
|
14
|
+
/** aantal getoonde decimalen _achter_ de integer, ook als dat 0 is! (default = `2`) */
|
|
15
|
+
decimalScale?: number;
|
|
16
|
+
/** Scheidingsteken gehele getallen en decimalen (default = `','` ) */
|
|
17
|
+
decimalSeparator?: ',' | '.';
|
|
18
|
+
/** scheidingsteken voor duizend-tallen, (default = `'.'`) */
|
|
19
|
+
groupSeparator?: '.' | ',';
|
|
20
|
+
/** negatieve getallen toestaan ? (default = `false`) */
|
|
21
|
+
allowNegativeValue?: boolean;
|
|
22
|
+
leadingZeros?: boolean;
|
|
23
|
+
/** value-changed callback met de nieuwe waarde van de input. Kan direct met de `setX()` van `const [x, setX] = React.useState()` worden gebruikt
|
|
24
|
+
* @example
|
|
25
|
+
* const [x, setX] = React.useState<number>(0);
|
|
26
|
+
* return <MyCurrencyInput value={x} onValueChange={setX} {...props} />
|
|
27
|
+
*/
|
|
28
|
+
onValueChanged?: (value: number) => void | Promise<void>;
|
|
29
|
+
/** value-changed callback met de nieuwe string-waarde van de input. */
|
|
30
|
+
onStringValueChanged?: (value: string) => void | Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
/** Een input speciaal voor bedragen. Geeft standaard een eur-teken weer met daarachter het ingevoerde bedrag.
|
|
33
|
+
* Het bedrag wordt als number-string-tuple opgeslagen, zodat het ook met een `setX()` van `const [x, setX] = React.useState()` kan worden gebruikt.
|
|
34
|
+
* De eerste waarde van de tuple is het bedrag als string, de tweede waarde is het bedrag als number. Deze laatste gaat **niet** altijd goed, daarom moeten we met strings werken ipv numbers.
|
|
35
|
+
* @param value waarde van de input. Als string of als number-string-tuple (zoals waarde uit `onValueChanged`)
|
|
36
|
+
* @param prefix prefix voo het bedrag (default = `'€ '`)
|
|
37
|
+
* @param suffix suffix achter het bedrag (default = `''`)
|
|
38
|
+
* @param decimalScale aantal getoonde decimalen _achter_ de integer, ook als dat 0 is! (default = `2`)
|
|
39
|
+
* @param decimalSeparator Scheidingsteken gehele getallen en decimalen (default = `','` )
|
|
40
|
+
* @param onValueChanged value-changed callback met de nieuwe waarde van de input. Kan direct met de `setX()` van `const [x, setX] = React.useState()` worden gebruikt
|
|
41
|
+
* @example // value is een tuple van [string, number] (het bedrag als number en het bedrag als string)
|
|
42
|
+
* const [x, setX] = React.useState<[string, number]>([0, '0']);
|
|
43
|
+
* <CurrencyInput value={x} onValueChanged={setX} />
|
|
44
|
+
* @example // value is een string
|
|
45
|
+
* const [x, setX] = React.useState<string>('0');
|
|
46
|
+
* <CurrencyInput value={x} onValueChanged={([strVal, _numVal]) => setX(strVal)} />
|
|
47
|
+
*/
|
|
48
|
+
declare function CurrencyInput({ allowNegativeValue, placeholder, helpTag, errorMessage, infoMessage, label, disabled, title, name, value, required, showRequiredOnLabel, spellCheck, id, autoComplete, max: maxProp, min: minProp, inputRef, readonly, step, autofocus, iconRight, infoData, form, color, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onValueChanged, onStringValueChanged, size: sizeProp, alignment: alignmentProp, direction: directionProp, labelHidden, loading, icon, suffix, prefix, decimalScale, decimalSeparator, groupSeparator, leadingZeros, }: CurrencyInputProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export { CurrencyInput };
|
|
50
|
+
export type { CurrencyInputProps };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { StrictOmit } from './../../types';
|
|
2
|
+
import { JSDateTime } from './../../utils/JSDateTime.class';
|
|
3
|
+
import { InputPropsType, InputStylingPropsType } from '../Input';
|
|
4
|
+
type DateInputProps = StrictOmit<InputPropsType<string>, 'type' | 'value' | 'onValueChanged'> & InputStylingPropsType & {
|
|
5
|
+
/**
|
|
6
|
+
* De waarde van de input
|
|
7
|
+
* - als string: `yyyy-MM-dd` of `yyyyMMdd` (deze laatste wordt automatisch omgezet naar `yyyy-MM-dd`)
|
|
8
|
+
* - als Date: `new Date()` object
|
|
9
|
+
* - als JSDateTime: `JSDateTime` object (from `loon-bulma-react`-library)
|
|
10
|
+
*/
|
|
11
|
+
value?: string | Date | JSDateTime;
|
|
12
|
+
/** value of input changed. Get the value as a string (`yyyy-mm-dd`) */
|
|
13
|
+
onValueChanged?(newVal: string): void | Promise<void>;
|
|
14
|
+
/** value of input changed. Get the value as a javascript `Date` object */
|
|
15
|
+
onDateValueChanged?(newVal: Date): void | Promise<void>;
|
|
16
|
+
/** value of input changed. Get the value as a custom `JSDateTime` object (from `loon-bulma-react`-library) */
|
|
17
|
+
onJSDateTimeValueChanged?(newVal: JSDateTime): void | Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Date Input voor het selecteren van een datum.
|
|
21
|
+
* @param value Er zijn 3 manieren om de value op te geven
|
|
22
|
+
* - als string: `yyyy-MM-dd`
|
|
23
|
+
* - als Date: `new Date()` object
|
|
24
|
+
* - als JSDateTime: `JSDateTime` object (from `loon-bulma-react`-library)
|
|
25
|
+
*
|
|
26
|
+
* @param onValueChanged bestaat niet. Er zijn 3 callbacks voor de verschillende value types
|
|
27
|
+
* - onValueChanged: als string
|
|
28
|
+
* - onDateValueChanged: als Date
|
|
29
|
+
* - onJSDateTimeValueChanged: als JSDateTime
|
|
30
|
+
*
|
|
31
|
+
* @example <DateInput value="2020-01-01" {...props} onValueChanged={(v) => console.log(v)}/>
|
|
32
|
+
* @example <DateInput value={new Date()} {...props} onDateValueChanged={(v) => console.log(v)}/>
|
|
33
|
+
* @example <DateInput value={JSDateTime.now()} {...props} onJSDateTimeValueChanged={(v) => console.log(v)}/>
|
|
34
|
+
*/
|
|
35
|
+
declare function DateInput({ value, icon, onValueChanged, onDateValueChanged, onJSDateTimeValueChanged, ...props }: DateInputProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export { DateInput };
|
|
37
|
+
export type { DateInputProps };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { StrictOmit } from './../../types';
|
|
2
|
+
import { JSDateTime } from './../../utils/JSDateTime.class';
|
|
3
|
+
import { InputPropsType, InputStylingPropsType } from '../Input';
|
|
4
|
+
type DateTimeInputProps = StrictOmit<InputPropsType<string>, 'type' | 'value' | 'onValueChanged'> & InputStylingPropsType & {
|
|
5
|
+
/** Moeten de secondes en de milliseconden ook getoond worden? (default = `'none'`)
|
|
6
|
+
* - `'both'`: secondes en milliseconden
|
|
7
|
+
* - `'seconds'`: alleen secondes
|
|
8
|
+
* - `'none'`: geen secondes of milliseconden
|
|
9
|
+
*/
|
|
10
|
+
useSecAndMillis?: 'both' | 'seconds' | 'none';
|
|
11
|
+
/**
|
|
12
|
+
* De waarde van de input
|
|
13
|
+
* - als string: `hh:mm:ss` of `hh:mm`
|
|
14
|
+
* - als Date: `new Date()` object
|
|
15
|
+
* - als JSDateTime: `JSDateTime` object (from `loon-bulma-react`-library)
|
|
16
|
+
*/
|
|
17
|
+
value?: string | Date | JSDateTime;
|
|
18
|
+
/** value of input changed. Get the value as a string (`yyyy-mm-dd`) */
|
|
19
|
+
onValueChanged?(newVal: string): void | Promise<void>;
|
|
20
|
+
/** value of input changed. Get the value as a javascript `Date` object */
|
|
21
|
+
onDateValueChanged?(newVal: Date): void | Promise<void>;
|
|
22
|
+
/** value of input changed. Get the value as a custom `JSDateTime` object (from `loon-bulma-react`-library) */
|
|
23
|
+
onJSDateTimeValueChanged?(newVal: JSDateTime): void | Promise<void>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* DateTime Input voor het selecteren van een datum en de tijd.
|
|
27
|
+
* @param value: Er zijn 3 manieren om de value op te geven
|
|
28
|
+
* - als string: `yyyy-MM-dd hh:mm:ss` of `yyyy-MM-dd hh:mm
|
|
29
|
+
* - als Date: `new Date()` object
|
|
30
|
+
* - als JSDateTime: `JSDateTime` object (from `loon-bulma-react`-library)
|
|
31
|
+
*
|
|
32
|
+
* @param onValueChanged bestaat niet. Er zijn 3 callbacks voor de verschillende value types
|
|
33
|
+
* - onValueChanged: als string
|
|
34
|
+
* - onDateValueChanged: als Date
|
|
35
|
+
* - onJSDateTimeValueChanged: als JSDateTime
|
|
36
|
+
*
|
|
37
|
+
* @param useSeconds Moeten de secondes ook getoont worden in de input? (Default = false)
|
|
38
|
+
* @example <DateTimeInput value="2020-01-01T12:00:00" onValueChanged={(val) => console.log(val)} />
|
|
39
|
+
* @example <DateTimeInput value={new Date()} onDateValueChanged={(val) => console.log(val)} />
|
|
40
|
+
* @example <DateTimeInput value={JSDateTime.now()} onJSDateTimeValueChanged={(val) => console.log(val)} />
|
|
41
|
+
*/
|
|
42
|
+
declare function DateTimeInput({ value, step, useSecAndMillis, icon, onValueChanged, onDateValueChanged, onJSDateTimeValueChanged, ...props }: DateTimeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export { DateTimeInput };
|
|
44
|
+
export type { DateTimeInputProps };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { StrictOmit } from './../../types';
|
|
2
|
+
import { JSDateTime } from './../../utils/JSDateTime.class';
|
|
3
|
+
import { InputPropsType, InputStylingPropsType } from '../Input';
|
|
4
|
+
type TimeInputProps = StrictOmit<InputPropsType<string>, 'step' | 'type' | 'value' | 'onValueChanged'> & InputStylingPropsType & {
|
|
5
|
+
/** Moeten de secondes ook getoont worden in de input? (Default = false) */
|
|
6
|
+
useSeconds?: boolean;
|
|
7
|
+
/** Moeten de millsecondes ook getoont worden in de input? (Default = false) */
|
|
8
|
+
useMillis?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* De waarde van de input
|
|
11
|
+
* - als string: `hh:mm:ss` of `hh:mm`
|
|
12
|
+
* - als Date: `new Date()` object
|
|
13
|
+
* - als JSDateTime: `JSDateTime` object (from `loon-bulma-react`-library)
|
|
14
|
+
*/
|
|
15
|
+
value?: string | Date | JSDateTime;
|
|
16
|
+
/** value of input changed. Get the value as a string (`hh:mm:ss` of `hh:mm`) */
|
|
17
|
+
onValueChanged?(newVal: string): void | Promise<void>;
|
|
18
|
+
/** value of input changed. Get the value as a javascript `Date` object */
|
|
19
|
+
onDateValueChanged?(newVal: Date): void | Promise<void>;
|
|
20
|
+
/** value of input changed. Get the value as a custom `JSDateTime` object (from `loon-bulma-react`-library) */
|
|
21
|
+
onJSDateTimeValueChanged?(newVal: JSDateTime): void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Time Input voor het selecteren van een tijd.
|
|
25
|
+
* @param value: Er zijn 3 manieren om de value op te geven
|
|
26
|
+
* - als string: `hh:mm:ss` of `hh:mm`
|
|
27
|
+
* - als Date: `new Date()` object
|
|
28
|
+
* - als JSDateTime: `JSDateTime` object (from `loon-bulma-react`-library)
|
|
29
|
+
*
|
|
30
|
+
* @param onValueChanged bestaat niet. Er zijn 3 callbacks voor de verschillende value types
|
|
31
|
+
* - onValueChanged: als string
|
|
32
|
+
* - onDateValueChanged: als Date
|
|
33
|
+
* - onJSDateTimeValueChanged: als JSDateTime
|
|
34
|
+
*
|
|
35
|
+
* @param useSeconds Moeten de secondes ook getoont worden in de input? (Default = false)
|
|
36
|
+
* @example <TimeInput value="12:00:00" onValueChanged={(val) => console.log(val)} />
|
|
37
|
+
* @example <TimeInput value={new Date()} onDateValueChanged={(val) => console.log(val)} />
|
|
38
|
+
* @example <TimeInput value={JSDateTime.now()} onJSDateTimeValueChanged={(val) => console.log(val)} />
|
|
39
|
+
*/
|
|
40
|
+
declare function TimeInput({ value, useSeconds, useMillis, icon, onValueChanged, onDateValueChanged, onJSDateTimeValueChanged, ...props }: TimeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export { TimeInput };
|
|
42
|
+
export type { TimeInputProps };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { StrictOmit } from './../../types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { InputPropsType, InputStylingPropsType, InputErrorProps } from '../Input';
|
|
4
|
+
type FileInputValue = {
|
|
5
|
+
files: File[];
|
|
6
|
+
path: string;
|
|
7
|
+
};
|
|
8
|
+
type FileInputProps = StrictOmit<InputPropsType<string>, 'type' | 'step' | 'value' | 'onChange' | 'onValueChanged'> & InputStylingPropsType & {
|
|
9
|
+
/** Is het mogelijk om meerdere files te selectere (default = `false`) */
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
/** Tekst op de kies-bestand-button (default = `'Kies een bestand'`) */
|
|
12
|
+
chooseFileTxt?: string;
|
|
13
|
+
/** Tekst om weer te geven als er geen bestanden zijn (default = `'Geen bestand(en) geselecteerd'`) */
|
|
14
|
+
noFilesTxt?: string;
|
|
15
|
+
/** Toon als een grote knop, niet als ene input (default = `false`) */
|
|
16
|
+
boxed?: boolean;
|
|
17
|
+
/** toegestane extensies of MIME-types
|
|
18
|
+
* - type `string`: komma-geschijden lijst van extensies of MIME-types, bijv. `'image/*, .pdf'`
|
|
19
|
+
* - type `string[]`: array van extensies of MIME-types, bijv. `['image/*', '.pdf']`
|
|
20
|
+
*
|
|
21
|
+
* **LET OP:** In het geval van extensies *MOET* de punt ervoor staan!
|
|
22
|
+
*/
|
|
23
|
+
accept?: string | string[];
|
|
24
|
+
/** Voor mobile devices: Welke camera moet gebruikt worden (default = `false`)
|
|
25
|
+
* - `undefined`: laat de gebruiker kiezen
|
|
26
|
+
* - `true`: laat de gebruiker kiezen
|
|
27
|
+
* - `false`: geen camera
|
|
28
|
+
* - `'user'`: de selfie camera
|
|
29
|
+
* - `'environment'`: camera op de achterkant
|
|
30
|
+
*/
|
|
31
|
+
capture?: boolean | 'user' | 'environment';
|
|
32
|
+
/** De geselecteerde files EN het path naar deze files.
|
|
33
|
+
* **LET OP: ** Het is niet mogelijk om in te stellen welke files al geselecteerd zijn.
|
|
34
|
+
*/
|
|
35
|
+
value?: FileInputValue;
|
|
36
|
+
/** functie om de namen van bestanden weer te geven.
|
|
37
|
+
*
|
|
38
|
+
* **default:** toon de namen van alle geselecteerde bestanden, gescheiden door komma's. Als er geen bestanden zijn, dan de noFilesTxt tonen.
|
|
39
|
+
*/
|
|
40
|
+
formatter?: (value: FileInputValue) => string;
|
|
41
|
+
/** callback voor value changes. Bevat het path naar de file(s) en de files in een array. */
|
|
42
|
+
onValueChanged?: (value: FileInputValue) => void | Promise<void>;
|
|
43
|
+
/** callback voor value changes. **LET OP:** de files vindt je in `e.target.files` */
|
|
44
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void | Promise<void>;
|
|
45
|
+
/** foutmelding bij de input */
|
|
46
|
+
errorMessage?: string | ((s: InputErrorProps<FileInputValue>) => string);
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Een input voor het selecteren van een bestand. de `value`-prop is een object met daarin de Files en het fake path.
|
|
50
|
+
* **De `value`-prop *MOET* `undefined` zijn voordat je begint. Het is niet mogelijk om alvast een waarde op te geven voor file-inputs in browsers**
|
|
51
|
+
*
|
|
52
|
+
* Onderstaande props zijn anders of speciaal voor file-inputs
|
|
53
|
+
* @param multiple Is het mogelijk om meerdere files te selectere (default = `false`)
|
|
54
|
+
* @param chooseFileTxt tekst op de knop om files te selecteren (default = `'Kies een bestand'`)
|
|
55
|
+
* @param noFilesTxt tekst om weer te geven als er geen bestanden zijn (default = `'Geen bestand(en) geselecteerd'`)
|
|
56
|
+
* @param boxed toon als een grote knop, niet als ene input (default = `false`)
|
|
57
|
+
* @param accept toegestane extensies of MIME-types
|
|
58
|
+
* - type `string`: komma-geschijden lijst van extensies of MIME-types, bijv. `'image/*, .pdf'`
|
|
59
|
+
* - type `string[]`: array van extensies of MIME-types, bijv. `['image/*', '.pdf']`
|
|
60
|
+
|
|
61
|
+
* **LET OP:** In het geval van extensies *MOET* de punt ervoor staan!
|
|
62
|
+
* @param capture Voor mobile devices: Welke camera moet gebruikt worden (default = `false`)
|
|
63
|
+
* @param value De geselecteerde files EN het path naar deze files.
|
|
64
|
+
* **LET OP: ** Het is niet mogelijk om in te stellen welke files al geselecteerd zijn.
|
|
65
|
+
* @param formatter functie om de namen van bestanden weer te geven.
|
|
66
|
+
* **default:** toon de namen van alle geselecteerde bestanden, gescheiden door komma's. Als er geen bestanden zijn, dan de noFilesTxt tonen.
|
|
67
|
+
* @param onValueChanged callback voor value changes. Bevat het path naar de file(s) en de files in een array.
|
|
68
|
+
*/
|
|
69
|
+
declare function FileInput({ labelHidden, multiple, placeholder, helpTag, errorMessage: errorProp, infoMessage: infoProp, label, disabled, keyboardType, title, name, required, showRequiredOnLabel, spellCheck, id, autoComplete, max, min, readonly, pattern, autofocus, form, inputRef: ref, onBlur, onChange, onFocus, onKeyDown, onKeyUp, onValueChanged, size: sizeProp, alignment: alignmentProp, direction: directionProp, value, icon, boxed, accept, capture, noFilesTxt, chooseFileTxt, infoData, color, formatter, }: FileInputProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export { FileInput };
|
|
71
|
+
export type { FileInputProps, FileInputValue };
|