loon-bulma-react 2024.0.38 → 2024.1.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/index.cjs +197 -187
- package/dist/index.d.cts +87 -21
- package/dist/index.d.ts +87 -21
- package/dist/index.js +31 -31
- package/package.json +42 -42
- package/styles/0.9.3/_all.scss +21 -0
- package/styles/0.9.3/checkradio.scss +655 -0
- package/styles/{custom-bulma.scss → 0.9.3/custom-bulma.scss} +6 -0
- package/styles/0.9.3/quickview.scss +173 -0
- package/styles/0.9.3/range-sliders.scss +295 -0
- package/styles/0.9.3/steps.scss +279 -0
- package/styles/0.9.3/timeline.scss +308 -0
- package/styles/0.9.3/tooltip.scss +192 -0
- package/styles/_all.scss +355 -21
- package/styles/bulma-box.scss +117 -0
- package/styles/buttons.scss +19 -0
- package/styles/calendar.scss +148 -0
- package/styles/checkradio.scss +103 -97
- package/styles/extra-inputs.scss +34 -0
- package/styles/indicators.scss +141 -0
- package/styles/keyboard.scss +15 -0
- package/styles/linkbutton.scss +40 -0
- package/styles/menu.scss +152 -0
- package/styles/mini-calendar.scss +70 -0
- package/styles/notifier-container.scss +28 -0
- package/styles/quickview.scss +21 -54
- package/styles/range-sliders.scss +18 -16
- package/styles/select.scss +144 -0
- package/styles/steps.scss +36 -30
- package/styles/table.scss +330 -0
- package/styles/tabs.scss +263 -0
- package/styles/timeline.scss +24 -18
- package/styles/tooltip.scss +17 -8
- /package/styles/{bulma-button-generator.scss → 0.9.3/bulma-button-generator.scss} +0 -0
- /package/styles/{bulma-color-helper-generator.scss → 0.9.3/bulma-color-helper-generator.scss} +0 -0
- /package/styles/{bulma-hero-generator.scss → 0.9.3/bulma-hero-generator.scss} +0 -0
- /package/styles/{bulma-message-generator.scss → 0.9.3/bulma-message-generator.scss} +0 -0
- /package/styles/{bulma-notification-generator.scss → 0.9.3/bulma-notification-generator.scss} +0 -0
- /package/styles/{bulma-select-generator.scss → 0.9.3/bulma-select-generator.scss} +0 -0
- /package/styles/{bulma-tabs-generator.scss → 0.9.3/bulma-tabs-generator.scss} +0 -0
- /package/styles/{bulma-tag-generator.scss → 0.9.3/bulma-tag-generator.scss} +0 -0
- /package/styles/{checkbox-radio.sass → 0.9.3/checkbox-radio.sass} +0 -0
- /package/styles/{colors.sass → 0.9.3/colors.sass} +0 -0
- /package/styles/{indicator-styles.scss → 0.9.3/indicator-styles.scss} +0 -0
- /package/styles/{kbd-styles.scss → 0.9.3/kbd-styles.scss} +0 -0
- /package/styles/{notifier-styles.scss → 0.9.3/notifier-styles.scss} +0 -0
- /package/styles/{tiptap-editor.scss → 0.9.3/tiptap-editor.scss} +0 -0
- /package/styles/{variables.scss → 0.9.3/variables.scss} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -4,6 +4,8 @@ import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
|
4
4
|
import { Locale } from 'date-fns';
|
|
5
5
|
import { JSONContent } from '@tiptap/react';
|
|
6
6
|
|
|
7
|
+
/** Color scheme type */
|
|
8
|
+
type ColorSchemeType = 'light' | 'dark';
|
|
7
9
|
/**
|
|
8
10
|
* Type om een ander type beter leestbaar te maken, meer niet
|
|
9
11
|
*/
|
|
@@ -133,7 +135,7 @@ type AspectRatioProps = {
|
|
|
133
135
|
declare function AspectRatio({ ratio, children, caption, className }: AspectRatioProps): JSX.Element;
|
|
134
136
|
|
|
135
137
|
/** Basis block component met een standaard margin & padding (bulma) */
|
|
136
|
-
declare function Block({ id, children, className:
|
|
138
|
+
declare function Block({ id, children, className: cn, styles, }: {
|
|
137
139
|
id?: string;
|
|
138
140
|
children: React$1.ReactNode;
|
|
139
141
|
className?: string;
|
|
@@ -156,7 +158,7 @@ type BoxProps = {
|
|
|
156
158
|
* @returns een witte box om elementen.
|
|
157
159
|
* @example <Box>This is a box</Box>
|
|
158
160
|
*/
|
|
159
|
-
declare function Box({ id, children, className, styles, itemRef }: BoxProps): JSX.Element;
|
|
161
|
+
declare function Box({ id, children, className: cn, styles, itemRef }: BoxProps): JSX.Element;
|
|
160
162
|
|
|
161
163
|
type BorderBoxProps = {
|
|
162
164
|
children: React$1.ReactNode;
|
|
@@ -165,17 +167,32 @@ type BorderBoxProps = {
|
|
|
165
167
|
itemRef?: React$1.RefObject<HTMLDivElement> | undefined;
|
|
166
168
|
className?: string | undefined;
|
|
167
169
|
color?: ColorProp | undefined;
|
|
170
|
+
titleColor?: ColorProp | 'default' | 'border' | undefined;
|
|
168
171
|
alignment?: AlignmentProp | undefined;
|
|
169
172
|
};
|
|
173
|
+
/**
|
|
174
|
+
* Een Box met een border en een (optionele) title. De border heeft een optionele kleur. Default is dat 'dark'
|
|
175
|
+
* @example <BorderBox title="Title">Content</BorderBox>
|
|
176
|
+
* @example <BorderBox title="Title" color="p">Content</BorderBox>
|
|
177
|
+
* @example <BorderBox.Primary title="Title" alignment="c">Content</BorderBox.Primary>
|
|
178
|
+
*/
|
|
170
179
|
declare const BorderBox: {
|
|
171
|
-
({ children, title, style, itemRef, className: cn, color, alignment, }: BorderBoxProps): JSX.Element;
|
|
180
|
+
({ children, title, style, itemRef, className: cn, color, titleColor, alignment, }: BorderBoxProps): JSX.Element;
|
|
181
|
+
/** Een Box met een Primary-colored title */
|
|
172
182
|
Primary(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
183
|
+
/** Een Box met een Link-colored title */
|
|
173
184
|
Link(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
185
|
+
/** Een Box met een Info-colored title */
|
|
174
186
|
Info(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
187
|
+
/** Een Box met een Warning-colored title */
|
|
175
188
|
Warning(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
189
|
+
/** Een Box met een Danger-colored title */
|
|
176
190
|
Danger(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
191
|
+
/** Een Box met een Success-colored title */
|
|
177
192
|
Success(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
193
|
+
/** Een Box met een Light-colored title */
|
|
178
194
|
Light(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
195
|
+
/** Een Box met een Dark-colored title (default) */
|
|
179
196
|
Dark(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
180
197
|
};
|
|
181
198
|
|
|
@@ -399,7 +416,7 @@ type ContainerProps = {
|
|
|
399
416
|
* @example <Container>This is a container</Container>
|
|
400
417
|
*/
|
|
401
418
|
declare const Container: {
|
|
402
|
-
({ className, children, styles, size, id, itemRef }: ContainerProps): JSX.Element;
|
|
419
|
+
({ className: cn, children, styles, size, id, itemRef }: ContainerProps): JSX.Element;
|
|
403
420
|
/**
|
|
404
421
|
* Een container om content horizontaal te centreren in default viewports.
|
|
405
422
|
* @param props
|
|
@@ -487,7 +504,7 @@ type ContentPropsType = {
|
|
|
487
504
|
* @returns een div geschikt voor content. WYSIWYG ofzo.
|
|
488
505
|
* @example <Content>This is a content which can contain lists, <strong>strong</strong> and <em>italic</em> tags</Content>
|
|
489
506
|
*/
|
|
490
|
-
declare function Content({ size, className:
|
|
507
|
+
declare function Content({ size, className: cn, styles, id, children, itemRef }: ContentPropsType): JSX.Element;
|
|
491
508
|
|
|
492
509
|
type FooterProps = {
|
|
493
510
|
/** De content voor de footer */
|
|
@@ -508,14 +525,14 @@ type FooterProps = {
|
|
|
508
525
|
* @returns een footer met daarin de content.
|
|
509
526
|
* @example <Footer>This is a footer</Footer>
|
|
510
527
|
*/
|
|
511
|
-
declare function Footer({ children, alignment, className:
|
|
528
|
+
declare function Footer({ children, alignment, className: cn, styles, id, itemRef }: FooterProps): JSX.Element;
|
|
512
529
|
|
|
513
530
|
type HeroProps = {
|
|
514
531
|
itemRef?: React$1.RefObject<any>;
|
|
515
532
|
id?: string;
|
|
516
533
|
children?: React$1.ReactNode;
|
|
517
534
|
/** Type hero */
|
|
518
|
-
heroColorFor?: 'werknemer' | 'werkgever' | 'klant' | 'admin' | 'primary' | undefined;
|
|
535
|
+
heroColorFor?: 'werknemer' | 'werkgever' | 'klant' | 'admin' | 'primary' | 'info' | 'link' | 'danger' | 'success' | 'warning' | 'dark' | 'light' | undefined;
|
|
519
536
|
/** De grootte van de hero (default = small ('s')) */
|
|
520
537
|
size?: SizeProp | undefined;
|
|
521
538
|
};
|
|
@@ -665,6 +682,8 @@ type SectionPropsType = {
|
|
|
665
682
|
children: React$1.ReactNode;
|
|
666
683
|
className?: string;
|
|
667
684
|
styles?: CSSProperties;
|
|
685
|
+
/** size voor de section, de verticale margin. (default = `s`) */
|
|
686
|
+
size?: TagSizeProp;
|
|
668
687
|
};
|
|
669
688
|
/**
|
|
670
689
|
* Maak een simpele container m een pagina te verdelen in secties.
|
|
@@ -673,7 +692,7 @@ type SectionPropsType = {
|
|
|
673
692
|
* @returns een sectie voor op de pagina, met ruimte eromheen
|
|
674
693
|
* @example <Section>This is a section</Section>
|
|
675
694
|
*/
|
|
676
|
-
declare function Section({ children, className:
|
|
695
|
+
declare function Section({ children, className: cn, styles, id, itemRef, size }: SectionPropsType): JSX.Element;
|
|
677
696
|
|
|
678
697
|
/**
|
|
679
698
|
* Maak een ScrollArea om in een bepaalde richting te kunnen scrollen. De scrollareas maken gebruik van flexbox.
|
|
@@ -910,14 +929,15 @@ type HelpTxtProps = {
|
|
|
910
929
|
className?: string;
|
|
911
930
|
color?: ColorProp;
|
|
912
931
|
};
|
|
932
|
+
type HelpTxtPropsNoColor = StrictOmit<HelpTxtProps, 'color'>;
|
|
913
933
|
declare const HelpTxt: {
|
|
914
|
-
({ color, className:
|
|
915
|
-
Info(props:
|
|
916
|
-
Link(props:
|
|
917
|
-
Primary(props:
|
|
918
|
-
Danger(props:
|
|
919
|
-
Success(props:
|
|
920
|
-
Warning(props:
|
|
934
|
+
({ color, className: cn, children }: HelpTxtProps): JSX.Element;
|
|
935
|
+
Info(props: HelpTxtPropsNoColor): JSX.Element;
|
|
936
|
+
Link(props: HelpTxtPropsNoColor): JSX.Element;
|
|
937
|
+
Primary(props: HelpTxtPropsNoColor): JSX.Element;
|
|
938
|
+
Danger(props: HelpTxtPropsNoColor): JSX.Element;
|
|
939
|
+
Success(props: HelpTxtPropsNoColor): JSX.Element;
|
|
940
|
+
Warning(props: HelpTxtPropsNoColor): JSX.Element;
|
|
921
941
|
};
|
|
922
942
|
|
|
923
943
|
type IconProps = {
|
|
@@ -1219,8 +1239,9 @@ type ModalProps = {
|
|
|
1219
1239
|
/** De grootte van de modal: met SizeProp of een string. ( DEFAULT = 'm', 800px)
|
|
1220
1240
|
* - `SizeProp`: s: 600px, m: 800px, l: 1000px, xl: 1200px, max: 95%;
|
|
1221
1241
|
* - `string`: '834px', '50%, 60em', '100%'
|
|
1242
|
+
* - `number`: size < 100 ? als percentage, anders als px
|
|
1222
1243
|
*/
|
|
1223
|
-
size?: SizeProp | 'max' | string | undefined;
|
|
1244
|
+
size?: SizeProp | 'max' | string | number | undefined;
|
|
1224
1245
|
/** Helptag in Loon voor de modal */
|
|
1225
1246
|
helpTag?: string | undefined;
|
|
1226
1247
|
/** blokkeer sluiten van modal als je er buiten klikt? (default = false) */
|
|
@@ -1287,7 +1308,7 @@ type NotificationProps = {
|
|
|
1287
1308
|
onClick?(e?: React$1.MouseEvent<HTMLDivElement>): void;
|
|
1288
1309
|
/** Roep de @see onDismiss() automatisch aan na ... milliseconden */
|
|
1289
1310
|
autoDismissAfter?: number;
|
|
1290
|
-
/** kleur van de notificatie (
|
|
1311
|
+
/** kleur van de notificatie (default = 'i') */
|
|
1291
1312
|
color?: ColorProp;
|
|
1292
1313
|
icon?: string | IconProp;
|
|
1293
1314
|
itemRef?: React$1.RefObject<any>;
|
|
@@ -1654,6 +1675,8 @@ type TagProps = {
|
|
|
1654
1675
|
size?: TagSizeProp;
|
|
1655
1676
|
/** Moet de light-colored versie van de tag getoont worden */
|
|
1656
1677
|
light?: boolean;
|
|
1678
|
+
/** Moet de dark-colored versie van de tag getoont worden */
|
|
1679
|
+
dark?: boolean;
|
|
1657
1680
|
/** Moet er een dismiss-knop op de tag, en zo ja, definieer daar een functie voor */
|
|
1658
1681
|
onDismiss?: (e: React$1.MouseEvent<HTMLButtonElement>) => void;
|
|
1659
1682
|
/** Title voor de tag (tooltip) */
|
|
@@ -1682,7 +1705,7 @@ type TagsProps = {
|
|
|
1682
1705
|
* <Tag>Hello</Tag>
|
|
1683
1706
|
* <Tag color='d'>Danger</Tag>
|
|
1684
1707
|
*/
|
|
1685
|
-
declare function Tag({ children, color, size, light, title, onDismiss }: TagProps): JSX.Element;
|
|
1708
|
+
declare function Tag({ children, color, size, light, dark, title, onDismiss }: TagProps): JSX.Element;
|
|
1686
1709
|
/**
|
|
1687
1710
|
* Maak een tag-container aan. De tags kunnen aan elkaar geplakt worden of niet.
|
|
1688
1711
|
* De grootte van de tags kan ook ingesteld worden
|
|
@@ -1750,7 +1773,7 @@ type TimeLinePointProps = {
|
|
|
1750
1773
|
* </TimeLine>
|
|
1751
1774
|
*/
|
|
1752
1775
|
declare const TimeLine: {
|
|
1753
|
-
({ id, alignment, children, className:
|
|
1776
|
+
({ id, alignment, children, className: cn }: TimeLineProps): JSX.Element;
|
|
1754
1777
|
/**
|
|
1755
1778
|
* Een punt op de timeline, bijvoorbeeld een jaartal of een datum. Er wordt een <Tag> gebruikt
|
|
1756
1779
|
* @param props
|
|
@@ -3093,6 +3116,10 @@ declare function centerPad(v: string | number | boolean, padLen: number, opts?:
|
|
|
3093
3116
|
*/
|
|
3094
3117
|
declare function EvMv<T>(count: number | T[] | undefined | null, ev: string, mv: string, options?: EvMvOptions): string;
|
|
3095
3118
|
|
|
3119
|
+
declare function setColorScheme(scheme?: ColorSchemeType): void;
|
|
3120
|
+
declare function getCurrentColorScheme(): ColorSchemeType;
|
|
3121
|
+
declare function getSystemColorScheme(): ColorSchemeType;
|
|
3122
|
+
|
|
3096
3123
|
type CalendarType = 'm' | 'v' | 'w' | 'p';
|
|
3097
3124
|
type CalendarHours = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | (number & {});
|
|
3098
3125
|
type BaseEventProps = {
|
|
@@ -3271,7 +3298,6 @@ declare const Calendar: {
|
|
|
3271
3298
|
Fourweeks: typeof FourweeksView;
|
|
3272
3299
|
Planning: typeof PlanningView;
|
|
3273
3300
|
Mini: typeof MiniView;
|
|
3274
|
-
MiniKutAgenda: typeof MiniView;
|
|
3275
3301
|
};
|
|
3276
3302
|
|
|
3277
3303
|
/** actions die de tooltip kan doen */
|
|
@@ -4751,6 +4777,18 @@ declare function DialogsProvider({ children }: {
|
|
|
4751
4777
|
children: React.ReactNode;
|
|
4752
4778
|
}): JSX.Element;
|
|
4753
4779
|
|
|
4780
|
+
declare const ColorSchemeContext: React$1.Context<{
|
|
4781
|
+
scheme: ColorSchemeType;
|
|
4782
|
+
setScheme: (v: ColorSchemeType) => void;
|
|
4783
|
+
}>;
|
|
4784
|
+
declare function ColorSchemeProvider({ children }: {
|
|
4785
|
+
children: React$1.ReactNode;
|
|
4786
|
+
}): react_jsx_runtime.JSX.Element;
|
|
4787
|
+
declare function useColorScheme(): {
|
|
4788
|
+
scheme: ColorSchemeType;
|
|
4789
|
+
setScheme: (v: ColorSchemeType) => void;
|
|
4790
|
+
};
|
|
4791
|
+
|
|
4754
4792
|
type CopyType = {
|
|
4755
4793
|
/**
|
|
4756
4794
|
* Kopieer een waarde naar het clipboard, om die daarna ergens te kunnen plakken.
|
|
@@ -5190,4 +5228,32 @@ type FetchAPIWrapper = {
|
|
|
5190
5228
|
};
|
|
5191
5229
|
declare function useFetchAPI(): FetchAPIWrapper;
|
|
5192
5230
|
|
|
5193
|
-
|
|
5231
|
+
/**
|
|
5232
|
+
* Overschrijf de default right-click actie van een element met de meegegeven ref. Dit kan je gebruiken om je EIGEN context-menu systematiek te maken. Gebruik `<ContextMenu />`-component voor de standaard contextmenu implementatie.
|
|
5233
|
+
* @example
|
|
5234
|
+
* ```tsx
|
|
5235
|
+
* // some component
|
|
5236
|
+
* const outerRef = React.useRef<HTMLDivElement>(null);
|
|
5237
|
+
* const { x, y, show } = useContextMenu(outerRef);
|
|
5238
|
+
*
|
|
5239
|
+
* return
|
|
5240
|
+
* <div ref={outerRef}> bla di bla
|
|
5241
|
+
* {show && <div style={{ top: y, left: x }}>context menu</div>}
|
|
5242
|
+
* </div>
|
|
5243
|
+
* ```
|
|
5244
|
+
*/
|
|
5245
|
+
declare function useContextMenu<T extends HTMLElement = HTMLElement>(outerRef: React$1.RefObject<T>): {
|
|
5246
|
+
x: `${number}px`;
|
|
5247
|
+
y: `${number}px`;
|
|
5248
|
+
show: boolean;
|
|
5249
|
+
};
|
|
5250
|
+
/**
|
|
5251
|
+
* Standaard contextmenu component. Gebruik deze om een standaard contextmenu te tonen.
|
|
5252
|
+
* @returns
|
|
5253
|
+
*/
|
|
5254
|
+
declare function ContextMenu({ outerRef, children }: {
|
|
5255
|
+
outerRef: React$1.RefObject<HTMLDivElement>;
|
|
5256
|
+
children: React$1.ReactNode;
|
|
5257
|
+
}): react_jsx_runtime.JSX.Element;
|
|
5258
|
+
|
|
5259
|
+
export { AND, type ActionSheetButton, ActionSheetProvider, type AlignmentProp, type AllowedPromptTypes, type AnchorRelProp, type AnchorTargetProp, AspectRatio, type AspectRatioProps, type AutoCompleteProp, type BaseEventProps, BaseInput, Block, BorderBox, Box, type BoxProps, Button, Buttons as ButtonGroup, type ButtonGroupProps, type ButtonProps, Buttons, CB, Calendar, type CalendarOptions, type CalendarType, CheckBox, type CheckBoxInputProps as CheckboxInputProps, ColorInput, type ColorInputProps, type ColorProp, ColorSchemeContext, ColorSchemeProvider, type ColorSchemeType, Column, type ColumnProps, Columns, ComboBox, type ComboBoxProps, ConfirmProvider, Container, Content, ContextMenu, type CoordinatesProp, CurrencyInput, type CurrencyInputProps, DOTS, DataTable, type DataTableColumnProp as DataTableColumn, type DataTableProps, DateInput, type DateInputProps, DateTimeInput, type DateTimeInputProps, DefinedHexColors, DialogsProvider, type DiffFnType, type DirectionProp, EmailInput, type EmailInputProps, EvMv, type ExpandedColumnProps, FileInput, type FileInputProps, type FileInputValue, Footer, H1, H2, H3, H4, H5, H6, type HSLColor, HelpTxt, type HelpTxtProps, Hero, type HeroProps, type HexColor$1 as HexColor, HiddenInput, type HiddenInputProps, type Hotkey, type HotkeyItem, IF, IbanDetailsPerLand, Icon, type IconProps, IconStack, IconText, type IconTextProps, Image, type ImageProps, Indicator, type IndicatorPositionProp, type IndicatorProps, Input, InputContainer, type InputPropsType, type InputStylingPropsType, type InputValueType, type JSChangeDateTimeType, type JSDateSetterType, JSDateTime, JSDuration, Kbd, Kbds, type KeyOf, type KeyboardTypeProp, Link, LinkButton, type LinkButtonProps, type LinkProps, Menu, type MenuItemGroupProps, type MenuItemProps, type MenuProps, Message, type MessageProps, Modal, type ModalProps, MonthInput, type MonthInputProps, type MonthInputString, type MonthViewProps, MultiComboBox, type MultiComboBoxProps, NAND, NOR, NOT, Notification, type NotificationProps, Notifier, type NotifierContextType, type NotifierItemProps, type NotifierProps, NotifierProvider, type NotifierProviderProps, NumberInput, type NumberInputProps, OR, type OnOffToggleItemProps, Pagination, type PaginationParams, type PaginationProps, PasswordInput, type PasswordInputProps, type PositionProp, type PrettierType, ProgressBar, type ProgressBarProps, PromptProvider, QuickView, type QuickViewProps, RB, type RGBColor, RadioGroup, type RadioInputProps, RangeInput, type RangeInputProps, type RectProp, type RelationshipProp, ContextMenu as RightClickMenu, SWITCH, ScrollArea, Section, Select, type SelectInputProps, SimpleTable, type SimpleTableColProps, type SimpleTableProps, type SizeProp, type StepItemProps, Steps, type StepsProps, type StrictOmit, TabBar, type TabBarItemProps, type TabBarProps, Table, Tag, type TagProps, type TagSizeProp, Tags, TagsInput, type TagsInputProps, type TagsProps, TelephoneInput, type TelephoneInputProps, type TextAlignmentProp, TextArea, type TextAreaProps, TextEditor, TextInput, type TextInputProps, TimeInput, type TimeInputProps, TimeLine, type TimeLineItemProps, type TimeLinePointProps, type TimeLineProps, ToggleBar, type ToggleBarProps, type ToggleItemProps, TT as Tooltip, URLInput, type URLInputProps, type UncontrolledMode, type UncontrolledOptions, WeekInput, type WeekInputProps, type WeekInputString, type WeekViewProps, XNOR, XOR, boolSort, calculateTxtColor, centerPad, dateSort, getCurrentColorScheme, getHotkeyHandler, getHotkeyMatcher, getSystemColorScheme, hasBSN, hexToHSL, hexToRGB, hslToHex, hslToRGB, isHSLColor, isHexColor, isIBAN, isRGBColor, leftPad, numSort, parseHotkey, randomColorProp, randomDbl, randomInt, rgbToHSL, rgbToHex, rightPad, roundTo, setColorScheme, stringSort, useActionSheet, useBoolToggle, useClickOutside, useClipboard, useColorScheme, useConfirm, useContextMenu, useDebouncedState, useDebouncedValue, useFetchAPI, useHotkeys, useLocalStoredState, useNotifier, usePagination, usePrompt, useContextMenu as useRightClick, useScrollIntoView, useSessionStoredState, useToggle, useUncontrolled, useValidatedState };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
|
4
4
|
import { Locale } from 'date-fns';
|
|
5
5
|
import { JSONContent } from '@tiptap/react';
|
|
6
6
|
|
|
7
|
+
/** Color scheme type */
|
|
8
|
+
type ColorSchemeType = 'light' | 'dark';
|
|
7
9
|
/**
|
|
8
10
|
* Type om een ander type beter leestbaar te maken, meer niet
|
|
9
11
|
*/
|
|
@@ -133,7 +135,7 @@ type AspectRatioProps = {
|
|
|
133
135
|
declare function AspectRatio({ ratio, children, caption, className }: AspectRatioProps): JSX.Element;
|
|
134
136
|
|
|
135
137
|
/** Basis block component met een standaard margin & padding (bulma) */
|
|
136
|
-
declare function Block({ id, children, className:
|
|
138
|
+
declare function Block({ id, children, className: cn, styles, }: {
|
|
137
139
|
id?: string;
|
|
138
140
|
children: React$1.ReactNode;
|
|
139
141
|
className?: string;
|
|
@@ -156,7 +158,7 @@ type BoxProps = {
|
|
|
156
158
|
* @returns een witte box om elementen.
|
|
157
159
|
* @example <Box>This is a box</Box>
|
|
158
160
|
*/
|
|
159
|
-
declare function Box({ id, children, className, styles, itemRef }: BoxProps): JSX.Element;
|
|
161
|
+
declare function Box({ id, children, className: cn, styles, itemRef }: BoxProps): JSX.Element;
|
|
160
162
|
|
|
161
163
|
type BorderBoxProps = {
|
|
162
164
|
children: React$1.ReactNode;
|
|
@@ -165,17 +167,32 @@ type BorderBoxProps = {
|
|
|
165
167
|
itemRef?: React$1.RefObject<HTMLDivElement> | undefined;
|
|
166
168
|
className?: string | undefined;
|
|
167
169
|
color?: ColorProp | undefined;
|
|
170
|
+
titleColor?: ColorProp | 'default' | 'border' | undefined;
|
|
168
171
|
alignment?: AlignmentProp | undefined;
|
|
169
172
|
};
|
|
173
|
+
/**
|
|
174
|
+
* Een Box met een border en een (optionele) title. De border heeft een optionele kleur. Default is dat 'dark'
|
|
175
|
+
* @example <BorderBox title="Title">Content</BorderBox>
|
|
176
|
+
* @example <BorderBox title="Title" color="p">Content</BorderBox>
|
|
177
|
+
* @example <BorderBox.Primary title="Title" alignment="c">Content</BorderBox.Primary>
|
|
178
|
+
*/
|
|
170
179
|
declare const BorderBox: {
|
|
171
|
-
({ children, title, style, itemRef, className: cn, color, alignment, }: BorderBoxProps): JSX.Element;
|
|
180
|
+
({ children, title, style, itemRef, className: cn, color, titleColor, alignment, }: BorderBoxProps): JSX.Element;
|
|
181
|
+
/** Een Box met een Primary-colored title */
|
|
172
182
|
Primary(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
183
|
+
/** Een Box met een Link-colored title */
|
|
173
184
|
Link(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
185
|
+
/** Een Box met een Info-colored title */
|
|
174
186
|
Info(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
187
|
+
/** Een Box met een Warning-colored title */
|
|
175
188
|
Warning(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
189
|
+
/** Een Box met een Danger-colored title */
|
|
176
190
|
Danger(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
191
|
+
/** Een Box met een Success-colored title */
|
|
177
192
|
Success(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
193
|
+
/** Een Box met een Light-colored title */
|
|
178
194
|
Light(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
195
|
+
/** Een Box met een Dark-colored title (default) */
|
|
179
196
|
Dark(props: StrictOmit<BorderBoxProps, 'color'>): JSX.Element;
|
|
180
197
|
};
|
|
181
198
|
|
|
@@ -399,7 +416,7 @@ type ContainerProps = {
|
|
|
399
416
|
* @example <Container>This is a container</Container>
|
|
400
417
|
*/
|
|
401
418
|
declare const Container: {
|
|
402
|
-
({ className, children, styles, size, id, itemRef }: ContainerProps): JSX.Element;
|
|
419
|
+
({ className: cn, children, styles, size, id, itemRef }: ContainerProps): JSX.Element;
|
|
403
420
|
/**
|
|
404
421
|
* Een container om content horizontaal te centreren in default viewports.
|
|
405
422
|
* @param props
|
|
@@ -487,7 +504,7 @@ type ContentPropsType = {
|
|
|
487
504
|
* @returns een div geschikt voor content. WYSIWYG ofzo.
|
|
488
505
|
* @example <Content>This is a content which can contain lists, <strong>strong</strong> and <em>italic</em> tags</Content>
|
|
489
506
|
*/
|
|
490
|
-
declare function Content({ size, className:
|
|
507
|
+
declare function Content({ size, className: cn, styles, id, children, itemRef }: ContentPropsType): JSX.Element;
|
|
491
508
|
|
|
492
509
|
type FooterProps = {
|
|
493
510
|
/** De content voor de footer */
|
|
@@ -508,14 +525,14 @@ type FooterProps = {
|
|
|
508
525
|
* @returns een footer met daarin de content.
|
|
509
526
|
* @example <Footer>This is a footer</Footer>
|
|
510
527
|
*/
|
|
511
|
-
declare function Footer({ children, alignment, className:
|
|
528
|
+
declare function Footer({ children, alignment, className: cn, styles, id, itemRef }: FooterProps): JSX.Element;
|
|
512
529
|
|
|
513
530
|
type HeroProps = {
|
|
514
531
|
itemRef?: React$1.RefObject<any>;
|
|
515
532
|
id?: string;
|
|
516
533
|
children?: React$1.ReactNode;
|
|
517
534
|
/** Type hero */
|
|
518
|
-
heroColorFor?: 'werknemer' | 'werkgever' | 'klant' | 'admin' | 'primary' | undefined;
|
|
535
|
+
heroColorFor?: 'werknemer' | 'werkgever' | 'klant' | 'admin' | 'primary' | 'info' | 'link' | 'danger' | 'success' | 'warning' | 'dark' | 'light' | undefined;
|
|
519
536
|
/** De grootte van de hero (default = small ('s')) */
|
|
520
537
|
size?: SizeProp | undefined;
|
|
521
538
|
};
|
|
@@ -665,6 +682,8 @@ type SectionPropsType = {
|
|
|
665
682
|
children: React$1.ReactNode;
|
|
666
683
|
className?: string;
|
|
667
684
|
styles?: CSSProperties;
|
|
685
|
+
/** size voor de section, de verticale margin. (default = `s`) */
|
|
686
|
+
size?: TagSizeProp;
|
|
668
687
|
};
|
|
669
688
|
/**
|
|
670
689
|
* Maak een simpele container m een pagina te verdelen in secties.
|
|
@@ -673,7 +692,7 @@ type SectionPropsType = {
|
|
|
673
692
|
* @returns een sectie voor op de pagina, met ruimte eromheen
|
|
674
693
|
* @example <Section>This is a section</Section>
|
|
675
694
|
*/
|
|
676
|
-
declare function Section({ children, className:
|
|
695
|
+
declare function Section({ children, className: cn, styles, id, itemRef, size }: SectionPropsType): JSX.Element;
|
|
677
696
|
|
|
678
697
|
/**
|
|
679
698
|
* Maak een ScrollArea om in een bepaalde richting te kunnen scrollen. De scrollareas maken gebruik van flexbox.
|
|
@@ -910,14 +929,15 @@ type HelpTxtProps = {
|
|
|
910
929
|
className?: string;
|
|
911
930
|
color?: ColorProp;
|
|
912
931
|
};
|
|
932
|
+
type HelpTxtPropsNoColor = StrictOmit<HelpTxtProps, 'color'>;
|
|
913
933
|
declare const HelpTxt: {
|
|
914
|
-
({ color, className:
|
|
915
|
-
Info(props:
|
|
916
|
-
Link(props:
|
|
917
|
-
Primary(props:
|
|
918
|
-
Danger(props:
|
|
919
|
-
Success(props:
|
|
920
|
-
Warning(props:
|
|
934
|
+
({ color, className: cn, children }: HelpTxtProps): JSX.Element;
|
|
935
|
+
Info(props: HelpTxtPropsNoColor): JSX.Element;
|
|
936
|
+
Link(props: HelpTxtPropsNoColor): JSX.Element;
|
|
937
|
+
Primary(props: HelpTxtPropsNoColor): JSX.Element;
|
|
938
|
+
Danger(props: HelpTxtPropsNoColor): JSX.Element;
|
|
939
|
+
Success(props: HelpTxtPropsNoColor): JSX.Element;
|
|
940
|
+
Warning(props: HelpTxtPropsNoColor): JSX.Element;
|
|
921
941
|
};
|
|
922
942
|
|
|
923
943
|
type IconProps = {
|
|
@@ -1219,8 +1239,9 @@ type ModalProps = {
|
|
|
1219
1239
|
/** De grootte van de modal: met SizeProp of een string. ( DEFAULT = 'm', 800px)
|
|
1220
1240
|
* - `SizeProp`: s: 600px, m: 800px, l: 1000px, xl: 1200px, max: 95%;
|
|
1221
1241
|
* - `string`: '834px', '50%, 60em', '100%'
|
|
1242
|
+
* - `number`: size < 100 ? als percentage, anders als px
|
|
1222
1243
|
*/
|
|
1223
|
-
size?: SizeProp | 'max' | string | undefined;
|
|
1244
|
+
size?: SizeProp | 'max' | string | number | undefined;
|
|
1224
1245
|
/** Helptag in Loon voor de modal */
|
|
1225
1246
|
helpTag?: string | undefined;
|
|
1226
1247
|
/** blokkeer sluiten van modal als je er buiten klikt? (default = false) */
|
|
@@ -1287,7 +1308,7 @@ type NotificationProps = {
|
|
|
1287
1308
|
onClick?(e?: React$1.MouseEvent<HTMLDivElement>): void;
|
|
1288
1309
|
/** Roep de @see onDismiss() automatisch aan na ... milliseconden */
|
|
1289
1310
|
autoDismissAfter?: number;
|
|
1290
|
-
/** kleur van de notificatie (
|
|
1311
|
+
/** kleur van de notificatie (default = 'i') */
|
|
1291
1312
|
color?: ColorProp;
|
|
1292
1313
|
icon?: string | IconProp;
|
|
1293
1314
|
itemRef?: React$1.RefObject<any>;
|
|
@@ -1654,6 +1675,8 @@ type TagProps = {
|
|
|
1654
1675
|
size?: TagSizeProp;
|
|
1655
1676
|
/** Moet de light-colored versie van de tag getoont worden */
|
|
1656
1677
|
light?: boolean;
|
|
1678
|
+
/** Moet de dark-colored versie van de tag getoont worden */
|
|
1679
|
+
dark?: boolean;
|
|
1657
1680
|
/** Moet er een dismiss-knop op de tag, en zo ja, definieer daar een functie voor */
|
|
1658
1681
|
onDismiss?: (e: React$1.MouseEvent<HTMLButtonElement>) => void;
|
|
1659
1682
|
/** Title voor de tag (tooltip) */
|
|
@@ -1682,7 +1705,7 @@ type TagsProps = {
|
|
|
1682
1705
|
* <Tag>Hello</Tag>
|
|
1683
1706
|
* <Tag color='d'>Danger</Tag>
|
|
1684
1707
|
*/
|
|
1685
|
-
declare function Tag({ children, color, size, light, title, onDismiss }: TagProps): JSX.Element;
|
|
1708
|
+
declare function Tag({ children, color, size, light, dark, title, onDismiss }: TagProps): JSX.Element;
|
|
1686
1709
|
/**
|
|
1687
1710
|
* Maak een tag-container aan. De tags kunnen aan elkaar geplakt worden of niet.
|
|
1688
1711
|
* De grootte van de tags kan ook ingesteld worden
|
|
@@ -1750,7 +1773,7 @@ type TimeLinePointProps = {
|
|
|
1750
1773
|
* </TimeLine>
|
|
1751
1774
|
*/
|
|
1752
1775
|
declare const TimeLine: {
|
|
1753
|
-
({ id, alignment, children, className:
|
|
1776
|
+
({ id, alignment, children, className: cn }: TimeLineProps): JSX.Element;
|
|
1754
1777
|
/**
|
|
1755
1778
|
* Een punt op de timeline, bijvoorbeeld een jaartal of een datum. Er wordt een <Tag> gebruikt
|
|
1756
1779
|
* @param props
|
|
@@ -3093,6 +3116,10 @@ declare function centerPad(v: string | number | boolean, padLen: number, opts?:
|
|
|
3093
3116
|
*/
|
|
3094
3117
|
declare function EvMv<T>(count: number | T[] | undefined | null, ev: string, mv: string, options?: EvMvOptions): string;
|
|
3095
3118
|
|
|
3119
|
+
declare function setColorScheme(scheme?: ColorSchemeType): void;
|
|
3120
|
+
declare function getCurrentColorScheme(): ColorSchemeType;
|
|
3121
|
+
declare function getSystemColorScheme(): ColorSchemeType;
|
|
3122
|
+
|
|
3096
3123
|
type CalendarType = 'm' | 'v' | 'w' | 'p';
|
|
3097
3124
|
type CalendarHours = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | (number & {});
|
|
3098
3125
|
type BaseEventProps = {
|
|
@@ -3271,7 +3298,6 @@ declare const Calendar: {
|
|
|
3271
3298
|
Fourweeks: typeof FourweeksView;
|
|
3272
3299
|
Planning: typeof PlanningView;
|
|
3273
3300
|
Mini: typeof MiniView;
|
|
3274
|
-
MiniKutAgenda: typeof MiniView;
|
|
3275
3301
|
};
|
|
3276
3302
|
|
|
3277
3303
|
/** actions die de tooltip kan doen */
|
|
@@ -4751,6 +4777,18 @@ declare function DialogsProvider({ children }: {
|
|
|
4751
4777
|
children: React.ReactNode;
|
|
4752
4778
|
}): JSX.Element;
|
|
4753
4779
|
|
|
4780
|
+
declare const ColorSchemeContext: React$1.Context<{
|
|
4781
|
+
scheme: ColorSchemeType;
|
|
4782
|
+
setScheme: (v: ColorSchemeType) => void;
|
|
4783
|
+
}>;
|
|
4784
|
+
declare function ColorSchemeProvider({ children }: {
|
|
4785
|
+
children: React$1.ReactNode;
|
|
4786
|
+
}): react_jsx_runtime.JSX.Element;
|
|
4787
|
+
declare function useColorScheme(): {
|
|
4788
|
+
scheme: ColorSchemeType;
|
|
4789
|
+
setScheme: (v: ColorSchemeType) => void;
|
|
4790
|
+
};
|
|
4791
|
+
|
|
4754
4792
|
type CopyType = {
|
|
4755
4793
|
/**
|
|
4756
4794
|
* Kopieer een waarde naar het clipboard, om die daarna ergens te kunnen plakken.
|
|
@@ -5190,4 +5228,32 @@ type FetchAPIWrapper = {
|
|
|
5190
5228
|
};
|
|
5191
5229
|
declare function useFetchAPI(): FetchAPIWrapper;
|
|
5192
5230
|
|
|
5193
|
-
|
|
5231
|
+
/**
|
|
5232
|
+
* Overschrijf de default right-click actie van een element met de meegegeven ref. Dit kan je gebruiken om je EIGEN context-menu systematiek te maken. Gebruik `<ContextMenu />`-component voor de standaard contextmenu implementatie.
|
|
5233
|
+
* @example
|
|
5234
|
+
* ```tsx
|
|
5235
|
+
* // some component
|
|
5236
|
+
* const outerRef = React.useRef<HTMLDivElement>(null);
|
|
5237
|
+
* const { x, y, show } = useContextMenu(outerRef);
|
|
5238
|
+
*
|
|
5239
|
+
* return
|
|
5240
|
+
* <div ref={outerRef}> bla di bla
|
|
5241
|
+
* {show && <div style={{ top: y, left: x }}>context menu</div>}
|
|
5242
|
+
* </div>
|
|
5243
|
+
* ```
|
|
5244
|
+
*/
|
|
5245
|
+
declare function useContextMenu<T extends HTMLElement = HTMLElement>(outerRef: React$1.RefObject<T>): {
|
|
5246
|
+
x: `${number}px`;
|
|
5247
|
+
y: `${number}px`;
|
|
5248
|
+
show: boolean;
|
|
5249
|
+
};
|
|
5250
|
+
/**
|
|
5251
|
+
* Standaard contextmenu component. Gebruik deze om een standaard contextmenu te tonen.
|
|
5252
|
+
* @returns
|
|
5253
|
+
*/
|
|
5254
|
+
declare function ContextMenu({ outerRef, children }: {
|
|
5255
|
+
outerRef: React$1.RefObject<HTMLDivElement>;
|
|
5256
|
+
children: React$1.ReactNode;
|
|
5257
|
+
}): react_jsx_runtime.JSX.Element;
|
|
5258
|
+
|
|
5259
|
+
export { AND, type ActionSheetButton, ActionSheetProvider, type AlignmentProp, type AllowedPromptTypes, type AnchorRelProp, type AnchorTargetProp, AspectRatio, type AspectRatioProps, type AutoCompleteProp, type BaseEventProps, BaseInput, Block, BorderBox, Box, type BoxProps, Button, Buttons as ButtonGroup, type ButtonGroupProps, type ButtonProps, Buttons, CB, Calendar, type CalendarOptions, type CalendarType, CheckBox, type CheckBoxInputProps as CheckboxInputProps, ColorInput, type ColorInputProps, type ColorProp, ColorSchemeContext, ColorSchemeProvider, type ColorSchemeType, Column, type ColumnProps, Columns, ComboBox, type ComboBoxProps, ConfirmProvider, Container, Content, ContextMenu, type CoordinatesProp, CurrencyInput, type CurrencyInputProps, DOTS, DataTable, type DataTableColumnProp as DataTableColumn, type DataTableProps, DateInput, type DateInputProps, DateTimeInput, type DateTimeInputProps, DefinedHexColors, DialogsProvider, type DiffFnType, type DirectionProp, EmailInput, type EmailInputProps, EvMv, type ExpandedColumnProps, FileInput, type FileInputProps, type FileInputValue, Footer, H1, H2, H3, H4, H5, H6, type HSLColor, HelpTxt, type HelpTxtProps, Hero, type HeroProps, type HexColor$1 as HexColor, HiddenInput, type HiddenInputProps, type Hotkey, type HotkeyItem, IF, IbanDetailsPerLand, Icon, type IconProps, IconStack, IconText, type IconTextProps, Image, type ImageProps, Indicator, type IndicatorPositionProp, type IndicatorProps, Input, InputContainer, type InputPropsType, type InputStylingPropsType, type InputValueType, type JSChangeDateTimeType, type JSDateSetterType, JSDateTime, JSDuration, Kbd, Kbds, type KeyOf, type KeyboardTypeProp, Link, LinkButton, type LinkButtonProps, type LinkProps, Menu, type MenuItemGroupProps, type MenuItemProps, type MenuProps, Message, type MessageProps, Modal, type ModalProps, MonthInput, type MonthInputProps, type MonthInputString, type MonthViewProps, MultiComboBox, type MultiComboBoxProps, NAND, NOR, NOT, Notification, type NotificationProps, Notifier, type NotifierContextType, type NotifierItemProps, type NotifierProps, NotifierProvider, type NotifierProviderProps, NumberInput, type NumberInputProps, OR, type OnOffToggleItemProps, Pagination, type PaginationParams, type PaginationProps, PasswordInput, type PasswordInputProps, type PositionProp, type PrettierType, ProgressBar, type ProgressBarProps, PromptProvider, QuickView, type QuickViewProps, RB, type RGBColor, RadioGroup, type RadioInputProps, RangeInput, type RangeInputProps, type RectProp, type RelationshipProp, ContextMenu as RightClickMenu, SWITCH, ScrollArea, Section, Select, type SelectInputProps, SimpleTable, type SimpleTableColProps, type SimpleTableProps, type SizeProp, type StepItemProps, Steps, type StepsProps, type StrictOmit, TabBar, type TabBarItemProps, type TabBarProps, Table, Tag, type TagProps, type TagSizeProp, Tags, TagsInput, type TagsInputProps, type TagsProps, TelephoneInput, type TelephoneInputProps, type TextAlignmentProp, TextArea, type TextAreaProps, TextEditor, TextInput, type TextInputProps, TimeInput, type TimeInputProps, TimeLine, type TimeLineItemProps, type TimeLinePointProps, type TimeLineProps, ToggleBar, type ToggleBarProps, type ToggleItemProps, TT as Tooltip, URLInput, type URLInputProps, type UncontrolledMode, type UncontrolledOptions, WeekInput, type WeekInputProps, type WeekInputString, type WeekViewProps, XNOR, XOR, boolSort, calculateTxtColor, centerPad, dateSort, getCurrentColorScheme, getHotkeyHandler, getHotkeyMatcher, getSystemColorScheme, hasBSN, hexToHSL, hexToRGB, hslToHex, hslToRGB, isHSLColor, isHexColor, isIBAN, isRGBColor, leftPad, numSort, parseHotkey, randomColorProp, randomDbl, randomInt, rgbToHSL, rgbToHex, rightPad, roundTo, setColorScheme, stringSort, useActionSheet, useBoolToggle, useClickOutside, useClipboard, useColorScheme, useConfirm, useContextMenu, useDebouncedState, useDebouncedValue, useFetchAPI, useHotkeys, useLocalStoredState, useNotifier, usePagination, usePrompt, useContextMenu as useRightClick, useScrollIntoView, useSessionStoredState, useToggle, useUncontrolled, useValidatedState };
|