@mmb-digital/design-system-web 0.1.16 → 0.1.18

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.
@@ -0,0 +1,1244 @@
1
+ import React, { ReactNode, FC, ReactElement, SyntheticEvent, RefAttributes, HTMLInputTypeAttribute, MouseEvent, HTMLAttributes } from 'react';
2
+ import { ColorScheme as ColorScheme$1 } from '@/util/colorScheme';
3
+ import { ModalProps as ModalProps$1 } from '@/components/modal/modal/modal.types';
4
+ import { TooltipFloatingElement as TooltipFloatingElement$1, TooltipParentElement as TooltipParentElement$1, TooltipPlacement as TooltipPlacement$1 } from '@/components/tooltip/tooltip.types';
5
+ import { FormattedMessageTypes as FormattedMessageTypes$1 } from '@/components/formatted/message';
6
+ import { MessageDescriptor } from 'react-intl';
7
+ import { TooltipFloatingElement as TooltipFloatingElement$2 } from '@/components/tooltip';
8
+ import { CalculatorResultBoxProps as CalculatorResultBoxProps$1 } from '@/components/calculator/calculatorResult/calculatorResultBox/calculatorResultBox.types';
9
+ import { CalculatorResultValues as CalculatorResultValues$1 } from '@/components/calculator/calculatorResult/calculatorResult.types';
10
+ import { MediaType as MediaType$1 } from '@/media';
11
+ import { PrimitiveType } from 'intl-messageformat';
12
+ import { ReactDatePickerProps } from 'react-datepicker';
13
+ import { CheckboxBaseProps } from '@/components/formElement/checkbox/checkboxBase';
14
+ import { RadioButtonLabel as RadioButtonLabel$1 } from '@/components/formElement/radio';
15
+ import { FieldValues, Control, FieldPath } from 'react-hook-form';
16
+ import { Options, Props, PropsValue, SingleValue as SingleValue$1 } from 'react-select';
17
+ import { MinMaxLabels as MinMaxLabels$1, SliderStepType as SliderStepType$1, SliderSteps as SliderSteps$1 } from '@/components/slider/slider/slider.types';
18
+ import { ColorScheme as ColorScheme$2, ChooseColor as ChooseColor$1 } from '@/util/colorScheme/colorScheme.types';
19
+
20
+ declare enum ButtonStyle {
21
+ PRIMARY = "primary",
22
+ SECONDARY = "secondary",
23
+ TERTIARY = "tertiary"
24
+ }
25
+ declare enum ButtonSize {
26
+ MD = "md",
27
+ SM = "sm",
28
+ XL = "xl",
29
+ XS = "xs",
30
+ XXL = "xxl"
31
+ }
32
+ declare enum ButtonType {
33
+ BUTTON = "button",
34
+ RESET = "reset",
35
+ SUBMIT = "submit"
36
+ }
37
+ interface ButtonProps {
38
+ buttonStyle: ButtonStyle;
39
+ children: ReactNode;
40
+ disabled?: boolean;
41
+ displayOnlyIcon?: boolean;
42
+ fullWidth?: boolean | undefined;
43
+ iconLeft?: ReactNode;
44
+ iconRight?: ReactNode;
45
+ onClick?: () => void;
46
+ size: ButtonSize;
47
+ type?: ButtonType;
48
+ }
49
+
50
+ declare const Button: FC<ButtonProps>;
51
+
52
+ interface SliderBreakpoint {
53
+ readonly bottomBreakpoint: number;
54
+ readonly step: number;
55
+ }
56
+ interface SliderSteps {
57
+ readonly baseStep: number;
58
+ readonly breakpointList: SliderBreakpoint[];
59
+ }
60
+ declare enum SliderStepType {
61
+ VISUALLY_LINEAR_BY_VALUE = "visuallyLinearByValue",// step changes dynamically (visually steps are of different sizes)
62
+ VISUALLY_SAME_STEP_SIZE = "visuallySameStepSize"
63
+ }
64
+ interface MinMaxLabels {
65
+ readonly max: ReactElement | string;
66
+ readonly min: ReactElement | string;
67
+ }
68
+ interface SliderProps {
69
+ readonly disable?: boolean | undefined;
70
+ readonly max: number;
71
+ readonly min: number;
72
+ readonly minMaxLabels: MinMaxLabels | undefined;
73
+ readonly onChange: (value: number) => void;
74
+ readonly onFinalChange: (value: number) => void;
75
+ readonly stepType: SliderStepType;
76
+ readonly steps: SliderSteps;
77
+ readonly value: number;
78
+ }
79
+
80
+ declare const Slider: React.FC<SliderProps>;
81
+
82
+ declare enum InfoboxVariant {
83
+ DARK = "dark",
84
+ PRIMARY = "primary",
85
+ SECONDARY = "secondary"
86
+ }
87
+ declare enum InfoboxSize {
88
+ MD = "md",
89
+ SM = "sm",
90
+ XS = "xs"
91
+ }
92
+ interface InfoboxProps {
93
+ children: ReactNode;
94
+ isWarning?: boolean;
95
+ size: InfoboxSize;
96
+ variant: InfoboxVariant;
97
+ }
98
+
99
+ declare const Infobox: FC<InfoboxProps>;
100
+
101
+ declare enum TableVariant {
102
+ EXCHANGE = "exchange",
103
+ SIMPLE = "simple"
104
+ }
105
+ interface TableProps {
106
+ children: ReactNode;
107
+ variant: TableVariant;
108
+ }
109
+
110
+ declare const Table: FC<TableProps>;
111
+
112
+ declare const TableBody: FC<TableProps>;
113
+
114
+ declare const TableData: FC<TableProps>;
115
+
116
+ declare const TableHead: FC<TableProps>;
117
+
118
+ declare const TableHeadData: FC<TableProps>;
119
+
120
+ declare const TableRow: FC<TableProps>;
121
+
122
+ declare enum TabsVariant {
123
+ primary = "primary",
124
+ secondary = "secondary",
125
+ tertiary = "tertiary"
126
+ }
127
+ interface TabsItemProps {
128
+ colorScheme: ColorScheme$1;
129
+ icon?: ReactNode;
130
+ id: string;
131
+ isActive?: boolean;
132
+ onClick?: () => void;
133
+ text?: ReactNode | string;
134
+ variant: TabsVariant;
135
+ }
136
+ interface TabsProps {
137
+ colorScheme?: ColorScheme$1;
138
+ defaultActiveStep?: number;
139
+ steps: TabsItemProps[];
140
+ variant: TabsVariant;
141
+ }
142
+
143
+ declare const TabsItem: FC<TabsItemProps>;
144
+
145
+ declare const Tabs: FC<TabsProps>;
146
+
147
+ declare enum IconProductType {
148
+ information = "information",
149
+ warningTriangle = "warningTriangle"
150
+ }
151
+ declare enum IconProductSize {
152
+ big = "big",
153
+ small = "small"
154
+ }
155
+ declare enum IconProductVariant {
156
+ active = "active",
157
+ default = "default"
158
+ }
159
+ interface IconProductProps {
160
+ readonly colorScheme?: ColorScheme$1;
161
+ readonly size: IconProductSize;
162
+ readonly type: IconProductType;
163
+ readonly variant?: IconProductVariant | undefined;
164
+ }
165
+
166
+ declare const IconProduct: React.FC<IconProductProps>;
167
+
168
+ declare enum IconSystemType {
169
+ arrowDown = "arrowDown",
170
+ arrowLeft = "arrowLeft",
171
+ arrowRight = "arrowRight",
172
+ arrowUp = "arrowUp",
173
+ arrowUpRight = "arrowUpRight",
174
+ bank = "bank",
175
+ checkmark = "checkmark",
176
+ chevronDown = "chevronDown",
177
+ chevronLeft = "chevronLeft",
178
+ chevronRight = "chevronRight",
179
+ chevronUp = "chevronUp",
180
+ close = "close",
181
+ minus = "minus",
182
+ plus = "plus",
183
+ search = "search"
184
+ }
185
+ declare enum IconSystemSize {
186
+ big = "big",
187
+ small = "small"
188
+ }
189
+ interface IconSystemProps {
190
+ readonly colorScheme?: ColorScheme$1;
191
+ readonly fill?: string;
192
+ readonly size: IconSystemSize;
193
+ readonly stroke?: string;
194
+ readonly type: IconSystemType;
195
+ }
196
+
197
+ declare const IconSystem: React.FC<IconSystemProps>;
198
+
199
+ declare const Modal: React.FC<ModalProps$1>;
200
+
201
+ type ModalOnClose = (reasonForClosing: ReasonForClosing) => void;
202
+ interface ModalProps {
203
+ readonly children: ReactElement | string;
204
+ readonly hideCloseButton: boolean;
205
+ readonly isOpen: boolean;
206
+ readonly modalRootElementId?: string | undefined;
207
+ readonly onClose: ModalOnClose;
208
+ readonly title?: ReactElement | string | undefined;
209
+ }
210
+ declare enum ReasonForClosing {
211
+ CLOSE_BUTTON = "closeButton",
212
+ ESC = "esc",
213
+ OVERLAY = "overlay"
214
+ }
215
+
216
+ interface TooltipInfoProps {
217
+ readonly colorScheme?: ColorScheme$1;
218
+ readonly floatingElement: TooltipFloatingElement$1;
219
+ }
220
+
221
+ declare const TooltipInfo: React.FC<TooltipInfoProps>;
222
+
223
+ interface TooltipGeneralProps {
224
+ readonly colorScheme: ColorScheme$1;
225
+ readonly floatingElement: TooltipFloatingElement$1;
226
+ readonly onClose?: (() => void) | undefined;
227
+ readonly onOpen?: (() => void) | undefined;
228
+ readonly parentElement: TooltipParentElement$1;
229
+ readonly placement?: TooltipPlacement$1 | undefined;
230
+ }
231
+
232
+ declare const TooltipGeneral: React.FC<TooltipGeneralProps>;
233
+
234
+ interface TooltipParentElementProps extends Record<string, unknown> {
235
+ ref: (node: Element | null) => void;
236
+ }
237
+ type TooltipParentElement = (props: TooltipParentElementProps) => ReactElement;
238
+ declare enum TooltipPlacement {
239
+ bottom = "bottom",
240
+ left = "left",
241
+ right = "right",
242
+ top = "top"
243
+ }
244
+ interface TooltipFloatingElement {
245
+ body: ReactElement | string;
246
+ title?: ReactElement | string | undefined;
247
+ }
248
+ declare enum TooltipInfoDisplayMethod {
249
+ ONLY_TOOLTIP = "onlyTooltip",
250
+ WITH_NBSP = "withNbsp"
251
+ }
252
+
253
+ interface TooltipInfoDisplayableCheckProps {
254
+ body: FormattedMessageTypes$1;
255
+ colorScheme?: ColorScheme$1;
256
+ displayMethod: TooltipInfoDisplayMethod;
257
+ title?: FormattedMessageTypes$1 | undefined;
258
+ }
259
+
260
+ declare const TooltipInfoDisplayableCheck: React.FC<TooltipInfoDisplayableCheckProps>;
261
+
262
+ interface TooltipInfoConditionalProps {
263
+ colorScheme?: ColorScheme$1;
264
+ displayMethod: TooltipInfoDisplayMethod;
265
+ floatingElement?: Partial<TooltipFloatingElement> | undefined;
266
+ }
267
+
268
+ declare const TooltipInfoConditional: React.FC<TooltipInfoConditionalProps>;
269
+
270
+ type CreateTooltipFloatingElementHookReturnFunction = (body: FormattedMessageTypes$1, title?: MessageDescriptor | undefined) => TooltipFloatingElement | undefined;
271
+
272
+ declare const useCreateTooltipFloatingElement: () => CreateTooltipFloatingElementHookReturnFunction;
273
+
274
+ interface CalculatorResultHeader {
275
+ bottom?: ReactElement | string | undefined;
276
+ main?: ReactElement | string | undefined;
277
+ top?: ReactElement | string | undefined;
278
+ }
279
+ interface CalculatorResultBodyItem {
280
+ left: {
281
+ element: ReactElement | string;
282
+ tooltip?: {
283
+ floatingElement: TooltipFloatingElement$2;
284
+ } | undefined;
285
+ };
286
+ right: {
287
+ element: ReactElement | string;
288
+ };
289
+ }
290
+ interface CalculatorResultMain {
291
+ element: ReactElement | string;
292
+ topSeparator?: boolean;
293
+ }
294
+ interface CalculatorResultValues {
295
+ bodyItems: CalculatorResultBodyItem[];
296
+ header: CalculatorResultHeader;
297
+ main: CalculatorResultMain;
298
+ }
299
+
300
+ interface CalculatorResultProps extends CalculatorResultValues {
301
+ }
302
+
303
+ /**
304
+ * If you want to display text below result (for example a representative example), consider using CalculatorResultBox component
305
+ */
306
+ declare const CalculatorResult: React.FC<CalculatorResultProps>;
307
+
308
+ /**
309
+ * If you just want CalculatorResult without text below it, consider using CalculatorResult
310
+ */
311
+ declare const CalculatorResultBox: React.FC<CalculatorResultBoxProps$1>;
312
+
313
+ interface CalculatorResultBoxModal {
314
+ content: ReactElement | string;
315
+ text: ReactElement | string;
316
+ }
317
+ interface CalculatorResultBoxProps extends CalculatorResultValues$1 {
318
+ description?: ReactElement | string;
319
+ mediaType: MediaType$1;
320
+ modal: CalculatorResultBoxModal | undefined;
321
+ }
322
+
323
+ declare enum LoaderSize {
324
+ LG = "lg",
325
+ SM = "sm"
326
+ }
327
+ interface LoaderProps {
328
+ colorScheme: ColorScheme$1;
329
+ loaderSize: LoaderSize;
330
+ }
331
+
332
+ declare const Loader: React.FC<LoaderProps>;
333
+
334
+ interface LoaderOverlayBoxProps {
335
+ colorScheme: ColorScheme$1;
336
+ loaderSize: LoaderSize;
337
+ }
338
+
339
+ declare const LoaderOverlayBox: React.FC<LoaderOverlayBoxProps>;
340
+
341
+ interface FormattedPercentageProps {
342
+ readonly maximumFractionDigits?: number;
343
+ readonly minimumFractionDigits?: number;
344
+ readonly value: number;
345
+ }
346
+
347
+ declare const _default$1: React.NamedExoticComponent<FormattedPercentageProps>;
348
+
349
+ interface UseFormatPercentageTypeParam {
350
+ maximumFractionDigits?: number;
351
+ minimumFractionDigits?: number;
352
+ value: number;
353
+ }
354
+ type UseFormatPercentage = (param: UseFormatPercentageTypeParam) => string;
355
+ declare const useFormattedPercentage: () => UseFormatPercentage;
356
+
357
+ interface FormattedMessageTypes extends MessageDescriptor {
358
+ values?: Record<string, PrimitiveType>;
359
+ }
360
+
361
+ type FormattedMessageProps = FormattedMessageTypes;
362
+
363
+ declare const FormattedMessage: React.FC<FormattedMessageProps>;
364
+
365
+ type FormattedHtmlMessageProps = FormattedMessageTypes;
366
+
367
+ declare const FormattedHtmlMessage: React.FC<FormattedHtmlMessageProps>;
368
+
369
+ type IsMessageDisplayableHookReturnFunction = (messageDescriptor: MessageDescriptor) => boolean;
370
+
371
+ declare const useIsMessageDisplayable: () => IsMessageDisplayableHookReturnFunction;
372
+
373
+ interface FormattedAmountProps {
374
+ readonly amount: number;
375
+ readonly currency?: string;
376
+ readonly maximumFractionDigits?: number;
377
+ readonly minimumFractionDigits?: number;
378
+ }
379
+
380
+ declare const _default: React.NamedExoticComponent<FormattedAmountProps>;
381
+
382
+ interface UseFormatAmountTypeParam {
383
+ amount: number;
384
+ currency?: string;
385
+ maximumFractionDigits?: number;
386
+ minimumFractionDigits?: number;
387
+ }
388
+ type UseFormatAmountType = (param: UseFormatAmountTypeParam) => string;
389
+ declare const useFormatAmount: () => UseFormatAmountType;
390
+
391
+ interface DatePickerProps extends Omit<ReactDatePickerProps, 'calendarContainer' | 'customInput' | 'onChange' | 'renderCustomHeader' | 'showTimeSelect'> {
392
+ dateFormat?: string[] | string;
393
+ locale?: string;
394
+ maxDate?: Date;
395
+ minDate?: Date;
396
+ name: string;
397
+ onChange(date: Date | null, event: SyntheticEvent<never> | undefined): void;
398
+ startDate?: Date | null;
399
+ }
400
+
401
+ declare const DatePicker: (props: DatePickerProps) => React.JSX.Element;
402
+
403
+ declare enum CheckboxPosition {
404
+ left = "left",
405
+ right = "right"
406
+ }
407
+ interface CheckboxLabel {
408
+ readonly label: React.ReactElement | string;
409
+ readonly tooltip?: TooltipFloatingElement$2 | undefined;
410
+ }
411
+ interface CheckboxProps extends CheckboxBaseProps {
412
+ readonly errorMessage?: React.ReactElement | string | undefined;
413
+ readonly label?: CheckboxLabel | undefined;
414
+ readonly position?: CheckboxPosition | undefined;
415
+ }
416
+
417
+ declare const Checkbox: React.FC<CheckboxProps>;
418
+
419
+ interface RadioGeneralProps extends RefAttributes<HTMLInputElement> {
420
+ readonly disabled?: boolean;
421
+ readonly id?: string | undefined;
422
+ readonly isError?: boolean | undefined;
423
+ readonly name: string;
424
+ readonly onBlur?: ((event: React.FocusEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
425
+ readonly onChange?: ((event: React.ChangeEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
426
+ readonly value: string;
427
+ }
428
+
429
+ interface RadioLabel {
430
+ readonly label: React.ReactElement | string;
431
+ readonly tooltip?: TooltipFloatingElement$2 | undefined;
432
+ }
433
+ declare enum RadioPosition {
434
+ left = "left",
435
+ right = "right"
436
+ }
437
+ interface RadioBaseWithLabelProps extends RadioGeneralProps {
438
+ readonly errorMessage?: React.ReactElement | string | undefined;
439
+ readonly label?: RadioLabel | undefined;
440
+ readonly position?: RadioPosition | undefined;
441
+ }
442
+
443
+ declare const Radio: React.FC<RadioBaseWithLabelProps>;
444
+
445
+ interface RadioButtonLabel {
446
+ main: React.ReactElement | string;
447
+ top?: React.ReactElement | string | undefined;
448
+ }
449
+ interface RadioButtonProps extends RadioGeneralProps {
450
+ readonly errorMessage?: React.ReactElement | string | undefined;
451
+ readonly label: RadioButtonLabel;
452
+ }
453
+
454
+ declare const RadioButton: React.FC<RadioButtonProps>;
455
+
456
+ interface RadioButtonsHorizontalLabel {
457
+ readonly element: React.ReactElement | string;
458
+ readonly tooltip?: TooltipFloatingElement$2 | undefined;
459
+ }
460
+ interface RadioButtonsHorizontalItem {
461
+ id?: string | undefined;
462
+ label: RadioButtonLabel$1;
463
+ value: string;
464
+ }
465
+ interface RadioButtonsHorizontalProps {
466
+ disabled?: boolean;
467
+ isError?: boolean | undefined;
468
+ items: RadioButtonsHorizontalItem[];
469
+ label?: RadioButtonsHorizontalLabel | undefined;
470
+ minWidthOfItem?: string;
471
+ name: string;
472
+ onBlur?: ((event: React.FocusEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
473
+ onChange?: ((event: React.ChangeEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
474
+ }
475
+
476
+ declare const RadioButtonsHorizontal: React.FC<RadioButtonsHorizontalProps>;
477
+
478
+ type SelectProps<T extends FieldValues> = SelectBaseProps & {
479
+ control: Control<T, any>;
480
+ defaultValue?: Options<SelectOption> | null;
481
+ name: FieldPath<T>;
482
+ };
483
+ type SelectBaseProps = Props<SelectOption, false> & {
484
+ readonly isError?: boolean;
485
+ readonly options: Options<SelectOption>;
486
+ readonly value?: PropsValue<SelectOption>;
487
+ };
488
+ interface SelectOption {
489
+ readonly icon?: ReactNode | string;
490
+ readonly label: string;
491
+ readonly value?: string;
492
+ }
493
+ type SingleValue = SingleValue$1<SelectOption>;
494
+
495
+ declare const SelectBase: FC<SelectBaseProps>;
496
+
497
+ declare const Select: <T extends FieldValues>(props: SelectProps<T>) => React.JSX.Element;
498
+
499
+ interface ToggleProps {
500
+ defaultValue?: boolean;
501
+ disabled?: boolean;
502
+ id: string | undefined;
503
+ label?: ReactNode | string;
504
+ name: string;
505
+ onChange?: (value: boolean) => void;
506
+ }
507
+
508
+ /**
509
+ * Currently not compatible with react-hook-form
510
+ */
511
+ declare const Toggle: FC<ToggleProps>;
512
+
513
+ declare enum InputSize {
514
+ MD = "md",
515
+ XL = "xl"
516
+ }
517
+ declare enum TextAlign {
518
+ center = "center",
519
+ left = "left",
520
+ right = "right"
521
+ }
522
+ interface InputProps {
523
+ disabled?: boolean;
524
+ errorMessage?: ReactNode | string;
525
+ halfWidth?: boolean;
526
+ hasError?: boolean;
527
+ hintText?: ReactNode | string;
528
+ id?: string | undefined;
529
+ label?: ReactNode | string;
530
+ maxLength?: number;
531
+ name: string;
532
+ onBlur?: ((event: React.FocusEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
533
+ onChange?: ((event: React.ChangeEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
534
+ size: InputSize;
535
+ tooltip?: TooltipFloatingElement$2 | undefined;
536
+ value?: string;
537
+ }
538
+
539
+ interface InputBaseProps extends RefAttributes<HTMLInputElement> {
540
+ button?: ReactNode;
541
+ colorInput?: string | undefined;
542
+ disabled?: boolean;
543
+ halfWidth?: boolean;
544
+ hasError?: boolean;
545
+ icon?: ReactNode;
546
+ id?: string | undefined;
547
+ maxLength?: number;
548
+ name: string;
549
+ onBlur?: ((event: React.FocusEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
550
+ onChange?: ((event: React.ChangeEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
551
+ placeholder?: string;
552
+ prefix?: ReactNode | string;
553
+ size: InputSize;
554
+ suffix?: ReactNode | string;
555
+ textAlign?: TextAlign;
556
+ type?: HTMLInputTypeAttribute;
557
+ value?: string;
558
+ }
559
+
560
+ declare const InputBase: FC<InputBaseProps>;
561
+
562
+ interface InputLabelProps {
563
+ hasError?: boolean;
564
+ id?: string;
565
+ label?: ReactNode | string;
566
+ tooltip?: TooltipFloatingElement$2 | undefined;
567
+ }
568
+
569
+ declare const InputLabel: FC<InputLabelProps>;
570
+
571
+ interface EmailInputProps extends InputProps {
572
+ placeholder?: string;
573
+ }
574
+
575
+ declare const EmailInput: FC<EmailInputProps>;
576
+
577
+ interface PhoneInputProps extends InputProps {
578
+ placeholder?: string;
579
+ prefix?: string;
580
+ }
581
+
582
+ declare const PhoneInput: FC<PhoneInputProps>;
583
+
584
+ interface SearchInputProps extends InputProps {
585
+ buttonAction?: () => void;
586
+ buttonText?: ReactNode | string;
587
+ placeholder?: string;
588
+ }
589
+
590
+ declare const SearchInput: FC<SearchInputProps>;
591
+
592
+ interface SliderInputLabel {
593
+ element: ReactNode | string;
594
+ tooltip?: TooltipFloatingElement$2 | undefined;
595
+ }
596
+ interface SliderInputMinMax {
597
+ max: number;
598
+ min: number;
599
+ }
600
+ interface SliderInputProps extends RefAttributes<HTMLInputElement> {
601
+ disabled?: boolean | undefined;
602
+ hasError?: boolean;
603
+ id?: string | undefined;
604
+ isInputHidden?: boolean | undefined;
605
+ label: SliderInputLabel;
606
+ mediaType: MediaType$1;
607
+ minMax: SliderInputMinMax;
608
+ minMaxLabels: MinMaxLabels$1 | undefined;
609
+ name: string;
610
+ onBlur?: ((event: React.FocusEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
611
+ onChange?: ((event: React.ChangeEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
612
+ prefix?: ReactNode | string | undefined;
613
+ stepType: SliderStepType$1;
614
+ steps: SliderSteps$1;
615
+ suffix?: ReactNode | string | undefined;
616
+ }
617
+
618
+ declare const SliderInput: React.FC<SliderInputProps>;
619
+
620
+ interface TextInputProps extends InputProps {
621
+ placeholder?: string;
622
+ }
623
+
624
+ declare const TextInput: FC<TextInputProps>;
625
+
626
+ interface TrailingTextInputProps extends InputProps {
627
+ placeholder?: string;
628
+ suffix?: ReactNode | string;
629
+ }
630
+
631
+ declare const TrailingTextInput: FC<TrailingTextInputProps>;
632
+
633
+ declare enum TypographyVariant {
634
+ H1 = "h1",
635
+ H2 = "h2",
636
+ H3 = "h3",
637
+ H4 = "h4",
638
+ H5 = "h5",
639
+ TEXT_LG = "textLg",
640
+ TEXT_MD = "textMd",
641
+ TEXT_SM = "textSm",
642
+ TEXT_XS = "textXs"
643
+ }
644
+ declare enum TypographyTextAlign {
645
+ CENTER = "center",
646
+ LEFT = "left",
647
+ RIGHT = "right"
648
+ }
649
+ declare enum TypographyWeight {
650
+ THIN_100 = "thin",
651
+ EXTRA_LIGHT_200 = "extraLight",
652
+ LIGHT_300 = "light",
653
+ REGULAR_400 = "normal",
654
+ MEDIUM_500 = "medium",
655
+ SEMI_BOLD_600 = "semiBold",
656
+ BOLD_700 = "bold",
657
+ EXTRA_BOLD_800 = "extraBold",
658
+ HEAVY_900 = "heavy",
659
+ ULTRA_950 = "ultra"
660
+ }
661
+ interface TypographyProps {
662
+ children: ReactNode;
663
+ color?: string;
664
+ fullWidth?: boolean;
665
+ onClick?: ((event: MouseEvent<HTMLElement>) => void) | undefined;
666
+ textAlign?: TypographyTextAlign;
667
+ variant: TypographyVariant;
668
+ weight?: TypographyWeight;
669
+ }
670
+
671
+ declare const Typography: FC<TypographyProps>;
672
+
673
+ declare enum GapSize {
674
+ XXS = "xxs",
675
+ XS = "xs",
676
+ SM = "sm",
677
+ MD = "md",
678
+ LG = "lg",
679
+ XL = "xl",
680
+ XXL = "xxl",
681
+ XXXL = "xxxl",
682
+ XXXXL = "xxxxl",
683
+ XXXXXL = "xxxxxl"
684
+ }
685
+ declare enum StackDirection {
686
+ column = "column",
687
+ row = "row"
688
+ }
689
+ type StackProps = HTMLAttributes<HTMLDivElement> & {
690
+ direction?: StackDirection;
691
+ gap?: GapSize;
692
+ };
693
+
694
+ declare const Stack: React.FC<StackProps>;
695
+
696
+ declare enum MediaType {
697
+ desktop = "desktop",
698
+ mobile = "mobile"
699
+ }
700
+
701
+ declare const useColorScheme: (colorScheme: ColorScheme$2) => ChooseColor$1;
702
+
703
+ declare enum ColorScheme {
704
+ dark = "dark",
705
+ light = "light"
706
+ }
707
+ interface ColorSchemeObject<Dark extends string = string, Light extends string = string> {
708
+ dark: Dark;
709
+ light: Light;
710
+ }
711
+ type ChooseColor = <Dark extends string = string, Light extends string = string>(colorSchemeObject: ColorSchemeObject<Dark, Light>) => Dark | Light;
712
+ type GetColor = <Dark extends string = string, Light extends string = string>(colorScheme: ColorScheme, colorSchemeObject: ColorSchemeObject<Dark, Light>) => Dark | Light;
713
+
714
+ declare const getColor: GetColor;
715
+
716
+ declare const theme: {
717
+ palette: {
718
+ gold100: string;
719
+ gold200: string;
720
+ gold500: string;
721
+ gold600: string;
722
+ gold700: string;
723
+ gold800: string;
724
+ pink100: string;
725
+ pink200: string;
726
+ pink300: string;
727
+ pink400: string;
728
+ pink500: string;
729
+ pink600: string;
730
+ pink700: string;
731
+ pink800: string;
732
+ pink900: string;
733
+ pink1000: string;
734
+ grey100: string;
735
+ grey200: string;
736
+ grey300: string;
737
+ grey400: string;
738
+ grey500: string;
739
+ grey600: string;
740
+ grey700: string;
741
+ grey800: string;
742
+ grey900: string;
743
+ grey1000: string;
744
+ black: string;
745
+ white: string;
746
+ transparent: string;
747
+ yellow100: string;
748
+ yellow200: string;
749
+ yellow300: string;
750
+ yellow400: string;
751
+ yellow500: string;
752
+ yellow600: string;
753
+ yellow700: string;
754
+ yellow800: string;
755
+ yellow900: string;
756
+ yellow1000: string;
757
+ green100: string;
758
+ green200: string;
759
+ green300: string;
760
+ green400: string;
761
+ green500: string;
762
+ green600: string;
763
+ green700: string;
764
+ green800: string;
765
+ green900: string;
766
+ green1000: string;
767
+ red100: string;
768
+ red200: string;
769
+ red300: string;
770
+ red400: string;
771
+ red500: string;
772
+ red600: string;
773
+ red700: string;
774
+ red800: string;
775
+ red900: string;
776
+ red1000: string;
777
+ blue100: string;
778
+ blue200: string;
779
+ blue300: string;
780
+ blue400: string;
781
+ blue500: string;
782
+ blue600: string;
783
+ blue700: string;
784
+ blue800: string;
785
+ blue900: string;
786
+ blue1000: string;
787
+ };
788
+ colors: {
789
+ fg: {
790
+ neutral: {
791
+ default: {
792
+ light: string;
793
+ dark: string;
794
+ };
795
+ subtle: {
796
+ light: string;
797
+ dark: string;
798
+ };
799
+ subtlest: {
800
+ light: string;
801
+ dark: string;
802
+ };
803
+ white: {
804
+ light: string;
805
+ dark: string;
806
+ };
807
+ };
808
+ disabled: {
809
+ light: string;
810
+ dark: string;
811
+ };
812
+ inverse: {
813
+ light: string;
814
+ dark: string;
815
+ };
816
+ link: {
817
+ default: {
818
+ light: string;
819
+ dark: string;
820
+ };
821
+ hover: {
822
+ light: string;
823
+ dark: string;
824
+ };
825
+ pressed: {
826
+ light: string;
827
+ dark: string;
828
+ };
829
+ };
830
+ success: {
831
+ light: string;
832
+ dark: string;
833
+ };
834
+ warning: {
835
+ light: string;
836
+ dark: string;
837
+ };
838
+ error: {
839
+ light: string;
840
+ dark: string;
841
+ };
842
+ info: {
843
+ light: string;
844
+ dark: string;
845
+ };
846
+ promo: {
847
+ light: string;
848
+ dark: string;
849
+ };
850
+ brand: {
851
+ default: {
852
+ light: string;
853
+ dark: string;
854
+ };
855
+ bold: {
856
+ light: string;
857
+ dark: string;
858
+ };
859
+ };
860
+ accent: {
861
+ default: {
862
+ light: string;
863
+ dark: string;
864
+ };
865
+ bold: {
866
+ light: string;
867
+ dark: string;
868
+ };
869
+ };
870
+ };
871
+ bg: {
872
+ neutral: {
873
+ default: {
874
+ light: string;
875
+ dark: string;
876
+ };
877
+ subtle: {
878
+ light: string;
879
+ dark: string;
880
+ };
881
+ subtlest: {
882
+ light: string;
883
+ dark: string;
884
+ };
885
+ white: {
886
+ light: string;
887
+ dark: string;
888
+ };
889
+ };
890
+ disabled: {
891
+ light: string;
892
+ dark: string;
893
+ };
894
+ promo: {
895
+ default: {
896
+ light: string;
897
+ dark: string;
898
+ };
899
+ bold: {
900
+ light: string;
901
+ dark: string;
902
+ };
903
+ };
904
+ error: {
905
+ default: {
906
+ light: string;
907
+ dark: string;
908
+ };
909
+ bold: {
910
+ light: string;
911
+ dark: string;
912
+ };
913
+ };
914
+ warning: {
915
+ default: {
916
+ light: string;
917
+ dark: string;
918
+ };
919
+ bold: {
920
+ light: string;
921
+ dark: string;
922
+ };
923
+ };
924
+ inverse: {
925
+ light: string;
926
+ dark: string;
927
+ };
928
+ success: {
929
+ default: {
930
+ light: string;
931
+ dark: string;
932
+ };
933
+ bold: {
934
+ light: string;
935
+ dark: string;
936
+ };
937
+ };
938
+ info: {
939
+ default: {
940
+ light: string;
941
+ dark: string;
942
+ };
943
+ bold: {
944
+ light: string;
945
+ dark: string;
946
+ };
947
+ };
948
+ accent: {
949
+ light: string;
950
+ dark: string;
951
+ };
952
+ brand: {
953
+ default: {
954
+ light: string;
955
+ dark: string;
956
+ hover: {
957
+ light: string;
958
+ dark: string;
959
+ };
960
+ pressed: {
961
+ light: string;
962
+ dark: string;
963
+ };
964
+ };
965
+ bold: {
966
+ light: string;
967
+ dark: string;
968
+ hover: {
969
+ light: string;
970
+ dark: string;
971
+ };
972
+ pressed: {
973
+ light: string;
974
+ dark: string;
975
+ };
976
+ };
977
+ };
978
+ };
979
+ surface: {
980
+ overlay: {
981
+ light: string;
982
+ dark: string;
983
+ };
984
+ risen: {
985
+ light: string;
986
+ dark: string;
987
+ };
988
+ default: {
989
+ light: string;
990
+ dark: string;
991
+ };
992
+ sunken: {
993
+ light: string;
994
+ dark: string;
995
+ };
996
+ };
997
+ border: {
998
+ neutral: {
999
+ default: {
1000
+ light: string;
1001
+ dark: string;
1002
+ };
1003
+ subtle: {
1004
+ light: string;
1005
+ dark: string;
1006
+ };
1007
+ subtlest: {
1008
+ light: string;
1009
+ dark: string;
1010
+ };
1011
+ };
1012
+ disabled: {
1013
+ light: string;
1014
+ dark: string;
1015
+ };
1016
+ success: {
1017
+ light: string;
1018
+ dark: string;
1019
+ };
1020
+ warning: {
1021
+ light: string;
1022
+ dark: string;
1023
+ };
1024
+ error: {
1025
+ light: string;
1026
+ dark: string;
1027
+ };
1028
+ promo: {
1029
+ light: string;
1030
+ dark: string;
1031
+ };
1032
+ brand: {
1033
+ bold: {
1034
+ light: string;
1035
+ dark: string;
1036
+ };
1037
+ default: {
1038
+ light: string;
1039
+ dark: string;
1040
+ };
1041
+ subtle: {
1042
+ light: string;
1043
+ dark: string;
1044
+ };
1045
+ subtlest: {
1046
+ light: string;
1047
+ dark: string;
1048
+ };
1049
+ };
1050
+ inverse: {
1051
+ light: string;
1052
+ dark: string;
1053
+ };
1054
+ accent: {
1055
+ light: string;
1056
+ dark: string;
1057
+ };
1058
+ };
1059
+ icon: {
1060
+ bg: {
1061
+ light: string;
1062
+ dark: string;
1063
+ };
1064
+ brand: {
1065
+ light: string;
1066
+ dark: string;
1067
+ };
1068
+ neutral: {
1069
+ light: string;
1070
+ dark: string;
1071
+ };
1072
+ inverse: {
1073
+ light: string;
1074
+ dark: string;
1075
+ };
1076
+ disabled: {
1077
+ light: string;
1078
+ dark: string;
1079
+ };
1080
+ error: {
1081
+ light: string;
1082
+ dark: string;
1083
+ };
1084
+ };
1085
+ shadow: {
1086
+ buttonFocus: string;
1087
+ cards: string;
1088
+ ultraStrongBlueLg: string;
1089
+ strongBlueMd: string;
1090
+ };
1091
+ focus: {
1092
+ light: string;
1093
+ dark: string;
1094
+ };
1095
+ };
1096
+ font: {
1097
+ size: {
1098
+ heading: {
1099
+ h1: {
1100
+ desktop: string;
1101
+ mobile: string;
1102
+ };
1103
+ h2: {
1104
+ desktop: string;
1105
+ mobile: string;
1106
+ };
1107
+ h3: {
1108
+ desktop: string;
1109
+ mobile: string;
1110
+ };
1111
+ h4: {
1112
+ desktop: string;
1113
+ mobile: string;
1114
+ };
1115
+ h5: {
1116
+ desktop: string;
1117
+ mobile: string;
1118
+ };
1119
+ };
1120
+ body: {
1121
+ xs: string;
1122
+ sm: string;
1123
+ md: string;
1124
+ lg: string;
1125
+ };
1126
+ };
1127
+ lineHeight: {
1128
+ heading: {
1129
+ h1: {
1130
+ desktop: string;
1131
+ mobile: string;
1132
+ };
1133
+ h2: {
1134
+ desktop: string;
1135
+ mobile: string;
1136
+ };
1137
+ h3: {
1138
+ desktop: string;
1139
+ mobile: string;
1140
+ };
1141
+ h4: {
1142
+ desktop: string;
1143
+ mobile: string;
1144
+ };
1145
+ h5: {
1146
+ desktop: string;
1147
+ mobile: string;
1148
+ };
1149
+ };
1150
+ body: {
1151
+ lg: string;
1152
+ md: string;
1153
+ sm: string;
1154
+ xs: string;
1155
+ };
1156
+ };
1157
+ weight: {
1158
+ thin: number;
1159
+ extraLight: number;
1160
+ light: number;
1161
+ normal: number;
1162
+ medium: number;
1163
+ semiBold: number;
1164
+ bold: number;
1165
+ extraBold: number;
1166
+ heavy: number;
1167
+ ultra: number;
1168
+ };
1169
+ letterSpacing: {
1170
+ heading: {
1171
+ h1: {
1172
+ desktop: string;
1173
+ mobile: string;
1174
+ };
1175
+ h2: {
1176
+ desktop: string;
1177
+ mobile: string;
1178
+ };
1179
+ h3: {
1180
+ desktop: string;
1181
+ mobile: string;
1182
+ };
1183
+ h4: {
1184
+ desktop: string;
1185
+ mobile: string;
1186
+ };
1187
+ h5: {
1188
+ desktop: string;
1189
+ mobile: string;
1190
+ };
1191
+ };
1192
+ body: {
1193
+ lg: string;
1194
+ md: string;
1195
+ sm: string;
1196
+ xs: string;
1197
+ };
1198
+ };
1199
+ };
1200
+ spacing: {
1201
+ xxs: string;
1202
+ xs: string;
1203
+ sm: string;
1204
+ md: string;
1205
+ lg: string;
1206
+ xl: string;
1207
+ xxl: string;
1208
+ xxxl: string;
1209
+ xxxxl: string;
1210
+ xxxxxl: string;
1211
+ };
1212
+ borderRadius: {
1213
+ xxs: string;
1214
+ xs: string;
1215
+ sm: string;
1216
+ md: string;
1217
+ lg: string;
1218
+ xl: string;
1219
+ full: string;
1220
+ };
1221
+ shadow: {
1222
+ box: {
1223
+ sm: string;
1224
+ md: string;
1225
+ lg: string;
1226
+ };
1227
+ border: {
1228
+ sm: string;
1229
+ };
1230
+ };
1231
+ container: {
1232
+ xl: string;
1233
+ };
1234
+ breakpoints: {
1235
+ xs: string;
1236
+ sm: string;
1237
+ md: string;
1238
+ lg: string;
1239
+ xl: string;
1240
+ xxl: string;
1241
+ };
1242
+ };
1243
+
1244
+ export { Button, type ButtonProps, ButtonSize, ButtonStyle, ButtonType, CalculatorResult, CalculatorResultBox, type CalculatorResultBoxModal, type CalculatorResultBoxProps, type CalculatorResultProps, Checkbox, type CheckboxLabel, CheckboxPosition, type CheckboxProps, type ChooseColor, ColorScheme, type ColorSchemeObject, DatePicker, type DatePickerProps, EmailInput, type EmailInputProps, _default as FormattedAmount, FormattedHtmlMessage, type FormattedHtmlMessageProps, FormattedMessage, type FormattedMessageProps, type FormattedMessageTypes, _default$1 as FormattedPercentage, GapSize, type GetColor, IconProduct, IconProductSize, IconProductType, IconSystem, IconSystemSize, IconSystemType, TooltipInfoConditional as InfoConditional, Infobox, type InfoboxProps, InfoboxSize, InfoboxVariant, InputBase, type InputBaseProps, InputLabel, type InputLabelProps, InputSize, Loader, LoaderOverlayBox, type LoaderOverlayBoxProps, type LoaderProps, LoaderSize, MediaType, Modal, type ModalOnClose, type ModalProps, PhoneInput, type PhoneInputProps, Radio, type RadioBaseWithLabelProps, RadioButton, type RadioButtonLabel, type RadioButtonProps, RadioButtonsHorizontal, type RadioButtonsHorizontalItem, type RadioButtonsHorizontalLabel, type RadioButtonsHorizontalProps, type RadioLabel, RadioPosition, ReasonForClosing, SearchInput, type SearchInputProps, Select, SelectBase, type SelectOption, type SelectProps, type SingleValue, Slider, type SliderBreakpoint, SliderInput, type SliderInputLabel, type SliderInputMinMax, type SliderInputProps, type SliderProps, SliderStepType, type SliderSteps, Stack, StackDirection, type StackProps, Table, TableBody, TableData, TableHead, TableHeadData, TableRow, TableVariant, Tabs, TabsItem, TextInput, type TextInputProps, Toggle, type ToggleProps, type TooltipFloatingElement, TooltipGeneral, type TooltipGeneralProps, TooltipInfo, type TooltipInfoConditionalProps, TooltipInfoDisplayMethod, TooltipInfoDisplayableCheck, type TooltipInfoDisplayableCheckProps, type TooltipInfoProps, type TooltipParentElement, type TooltipParentElementProps, TooltipPlacement, TrailingTextInput, type TrailingTextInputProps, Typography, type TypographyProps, TypographyTextAlign, TypographyVariant, TypographyWeight, getColor, theme, useColorScheme, useCreateTooltipFloatingElement, useFormatAmount, useFormattedPercentage, useIsMessageDisplayable };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmb-digital/design-system-web",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "MMB design-system-web",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -1,3 +0,0 @@
1
- import { RollupOptions } from 'rollup';
2
- declare const rollupConfig: RollupOptions;
3
- export default rollupConfig;
package/rollup.config.ts DELETED
@@ -1,43 +0,0 @@
1
- import resolve from '@rollup/plugin-node-resolve';
2
- import commonjs from '@rollup/plugin-commonjs';
3
- import typescript from '@rollup/plugin-typescript';
4
- // import dts from 'rollup-plugin-dts';
5
- import { terser } from 'rollup-plugin-terser';
6
- import peerDepsExternal from 'rollup-plugin-peer-deps-external';
7
- import json from '@rollup/plugin-json';
8
- import css from 'rollup-plugin-import-css';
9
- import { RollupOptions } from 'rollup';
10
-
11
- import packageJson from './package.json' assert { type: 'json' };
12
-
13
- const rollupConfig: RollupOptions = {
14
- input: 'src/index.ts',
15
- output: [
16
- {
17
- file: packageJson.main,
18
- format: 'cjs',
19
- sourcemap: true,
20
- },
21
- {
22
- file: packageJson.module,
23
- format: 'esm',
24
- sourcemap: true,
25
- },
26
- ],
27
- plugins: [
28
- // @ts-ignore
29
- peerDepsExternal(),
30
- resolve(),
31
- commonjs(),
32
- typescript({
33
- tsconfig: 'tsconfig.json',
34
- exclude: ['**/*.test.ts', '**/*.stories.tsx', 'jest.config.ts'],
35
- }),
36
- json(),
37
- css(),
38
- terser(),
39
- ],
40
- external: [],
41
- };
42
-
43
- export default rollupConfig;