@mmb-digital/design-system-web 0.1.34 → 0.1.36
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.js +209 -179
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +42 -25
- package/dist/index.esm.js +280 -250
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode, FC,
|
|
1
|
+
import React, { ReactNode, FC, PropsWithChildren, ReactElement, SyntheticEvent, RefAttributes, FocusEvent, ChangeEvent, HTMLInputTypeAttribute, MouseEvent, HTMLAttributes } from 'react';
|
|
2
2
|
import { MessageDescriptor } from 'react-intl';
|
|
3
3
|
import { PrimitiveType } from 'intl-messageformat';
|
|
4
4
|
import { ReactDatePickerProps } from 'react-datepicker';
|
|
@@ -26,6 +26,35 @@ declare const Accordion: FC<AccordionProps>;
|
|
|
26
26
|
|
|
27
27
|
declare const AccordionItem: FC<AccordionItemProps>;
|
|
28
28
|
|
|
29
|
+
declare enum ColorScheme {
|
|
30
|
+
dark = "dark",
|
|
31
|
+
light = "light"
|
|
32
|
+
}
|
|
33
|
+
interface ColorSchemeObject<Dark extends string = string, Light extends string = string> {
|
|
34
|
+
dark: Dark;
|
|
35
|
+
light: Light;
|
|
36
|
+
}
|
|
37
|
+
type ChooseColor = <Dark extends string = string, Light extends string = string>(colorSchemeObject: ColorSchemeObject<Dark, Light>) => Dark | Light;
|
|
38
|
+
type GetColor = <Dark extends string = string, Light extends string = string>(colorScheme: ColorScheme, colorSchemeObject: ColorSchemeObject<Dark, Light>) => Dark | Light;
|
|
39
|
+
|
|
40
|
+
declare const useColorScheme: (colorScheme: ColorScheme) => ChooseColor;
|
|
41
|
+
|
|
42
|
+
declare const getColor: GetColor;
|
|
43
|
+
|
|
44
|
+
interface AccordionContentType extends PropsWithChildren {
|
|
45
|
+
colorScheme?: ColorScheme;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare const AccordionContent: FC<AccordionContentType>;
|
|
49
|
+
|
|
50
|
+
interface AccordionKeyValueType {
|
|
51
|
+
colorScheme?: ColorScheme;
|
|
52
|
+
label: ReactNode | string;
|
|
53
|
+
value: ReactNode | string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare const AccordionKeyValue: FC<AccordionKeyValueType>;
|
|
57
|
+
|
|
29
58
|
declare enum ButtonStyle {
|
|
30
59
|
PRIMARY = "primary",
|
|
31
60
|
SECONDARY = "secondary",
|
|
@@ -75,6 +104,7 @@ interface MinMaxLabels {
|
|
|
75
104
|
readonly min: ReactElement | string;
|
|
76
105
|
}
|
|
77
106
|
interface SliderProps {
|
|
107
|
+
readonly colorScheme: ColorScheme;
|
|
78
108
|
readonly disable?: boolean | undefined;
|
|
79
109
|
readonly max: number;
|
|
80
110
|
readonly min: number;
|
|
@@ -88,25 +118,15 @@ interface SliderProps {
|
|
|
88
118
|
|
|
89
119
|
declare const Slider: React.FC<SliderProps>;
|
|
90
120
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
interface ColorSchemeObject<Dark extends string = string, Light extends string = string> {
|
|
96
|
-
dark: Dark;
|
|
97
|
-
light: Light;
|
|
121
|
+
interface ErrorBoxItem {
|
|
122
|
+
body: ReactElement | string;
|
|
123
|
+
onClick?: () => void;
|
|
98
124
|
}
|
|
99
|
-
type ChooseColor = <Dark extends string = string, Light extends string = string>(colorSchemeObject: ColorSchemeObject<Dark, Light>) => Dark | Light;
|
|
100
|
-
type GetColor = <Dark extends string = string, Light extends string = string>(colorScheme: ColorScheme, colorSchemeObject: ColorSchemeObject<Dark, Light>) => Dark | Light;
|
|
101
|
-
|
|
102
|
-
declare const useColorScheme: (colorScheme: ColorScheme) => ChooseColor;
|
|
103
|
-
|
|
104
|
-
declare const getColor: GetColor;
|
|
105
125
|
|
|
106
126
|
interface ErrorBoxProps {
|
|
107
127
|
colorScheme: ColorScheme;
|
|
108
128
|
content?: ReactElement | string;
|
|
109
|
-
|
|
129
|
+
items?: ErrorBoxItem[];
|
|
110
130
|
title?: ReactElement | string;
|
|
111
131
|
}
|
|
112
132
|
|
|
@@ -136,19 +156,14 @@ declare enum TableVariant {
|
|
|
136
156
|
EXCHANGE = "exchange",
|
|
137
157
|
SIMPLE = "simple"
|
|
138
158
|
}
|
|
139
|
-
|
|
140
|
-
center = "center",
|
|
141
|
-
left = "left",
|
|
142
|
-
right = "right"
|
|
143
|
-
}
|
|
144
|
-
interface TableProps {
|
|
145
|
-
children: ReactNode;
|
|
159
|
+
interface TableProps extends PropsWithChildren {
|
|
146
160
|
variant: TableVariant;
|
|
147
161
|
}
|
|
148
162
|
interface TableCellProps extends PropsWithChildren {
|
|
163
|
+
align?: 'center' | 'char' | 'justify' | 'left' | 'right';
|
|
149
164
|
delimiter?: boolean;
|
|
150
|
-
textAlign?: TextAlign$1;
|
|
151
165
|
variant: TableVariant;
|
|
166
|
+
width?: number | string;
|
|
152
167
|
}
|
|
153
168
|
|
|
154
169
|
declare const Table: FC<TableProps>;
|
|
@@ -159,7 +174,7 @@ declare const TableData: FC<TableCellProps>;
|
|
|
159
174
|
|
|
160
175
|
declare const TableHead: FC<TableProps>;
|
|
161
176
|
|
|
162
|
-
declare const TableHeadData: FC<
|
|
177
|
+
declare const TableHeadData: FC<TableCellProps>;
|
|
163
178
|
|
|
164
179
|
declare const TableRow: FC<TableProps>;
|
|
165
180
|
|
|
@@ -653,9 +668,11 @@ interface SliderInputMinMax {
|
|
|
653
668
|
min: number;
|
|
654
669
|
}
|
|
655
670
|
interface SliderInputProps extends RefAttributes<HTMLInputElement> {
|
|
671
|
+
colorScheme?: ColorScheme;
|
|
656
672
|
disabled?: boolean | undefined;
|
|
657
673
|
hasError?: boolean;
|
|
658
674
|
id?: string | undefined;
|
|
675
|
+
inputNote?: ReactElement | string;
|
|
659
676
|
isInputHidden?: boolean | undefined;
|
|
660
677
|
label: SliderInputLabel;
|
|
661
678
|
mediaType: MediaType;
|
|
@@ -1344,4 +1361,4 @@ declare const theme: {
|
|
|
1344
1361
|
};
|
|
1345
1362
|
};
|
|
1346
1363
|
|
|
1347
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, AsyncSelect, 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, ErrorBox, type ErrorBoxProps, FieldWrapper, FieldWrapperLayout, type FieldWrapperValues, _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, RadioButtonLayout, type RadioButtonProps, RadioButtonsHorizontal, type RadioButtonsHorizontalItem, type RadioButtonsHorizontalLabel, type RadioButtonsHorizontalProps, type RadioLabel, RadioPosition, ReasonForClosing, SearchInput, type SearchInputProps, Select, SelectBase, SelectField, 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, type TabItemType, Table, TableBody, TableData, TableHead, TableHeadData, TableRow, TableVariant, Tabs, TabsItem, type TabsProps, type TabsType, TabsVariant, TextArea, type TextAreaProps, 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 };
|
|
1364
|
+
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionKeyValue, type AccordionProps, AsyncSelect, 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, ErrorBox, type ErrorBoxItem, type ErrorBoxProps, FieldWrapper, FieldWrapperLayout, type FieldWrapperValues, _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, RadioButtonLayout, type RadioButtonProps, RadioButtonsHorizontal, type RadioButtonsHorizontalItem, type RadioButtonsHorizontalLabel, type RadioButtonsHorizontalProps, type RadioLabel, RadioPosition, ReasonForClosing, SearchInput, type SearchInputProps, Select, SelectBase, SelectField, 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, type TabItemType, Table, TableBody, TableData, TableHead, TableHeadData, TableRow, TableVariant, Tabs, TabsItem, type TabsProps, type TabsType, TabsVariant, TextArea, type TextAreaProps, 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 };
|