@mmb-digital/design-system-web 0.1.19 → 0.1.21
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 +112 -92
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +61 -38
- package/dist/index.esm.js +208 -188
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { MessageDescriptor } from 'react-intl';
|
|
|
3
3
|
import { PrimitiveType } from 'intl-messageformat';
|
|
4
4
|
import { ReactDatePickerProps } from 'react-datepicker';
|
|
5
5
|
import { FieldValues, Control, FieldPath } from 'react-hook-form';
|
|
6
|
-
import { Options, Props, PropsValue, SingleValue as SingleValue$1 } from 'react-select';
|
|
6
|
+
import { Options, Props, SelectComponentsConfig, PropsValue, SingleValue as SingleValue$1, GroupBase } from 'react-select';
|
|
7
7
|
|
|
8
8
|
declare enum ButtonStyle {
|
|
9
9
|
PRIMARY = "primary",
|
|
@@ -182,6 +182,7 @@ declare enum IconSystemType {
|
|
|
182
182
|
chevronUp = "chevronUp",
|
|
183
183
|
close = "close",
|
|
184
184
|
minus = "minus",
|
|
185
|
+
pin = "pin",
|
|
185
186
|
plus = "plus",
|
|
186
187
|
search = "search"
|
|
187
188
|
}
|
|
@@ -299,7 +300,7 @@ interface CalculatorResultBodyItem {
|
|
|
299
300
|
left: {
|
|
300
301
|
element: ReactElement | string;
|
|
301
302
|
tooltip?: {
|
|
302
|
-
floatingElement
|
|
303
|
+
floatingElement?: TooltipFloatingElement | undefined;
|
|
303
304
|
} | undefined;
|
|
304
305
|
};
|
|
305
306
|
right: {
|
|
@@ -525,41 +526,6 @@ interface RadioButtonsHorizontalProps {
|
|
|
525
526
|
|
|
526
527
|
declare const RadioButtonsHorizontal: React.FC<RadioButtonsHorizontalProps>;
|
|
527
528
|
|
|
528
|
-
type SelectProps<T extends FieldValues> = SelectBaseProps & {
|
|
529
|
-
control: Control<T, any>;
|
|
530
|
-
defaultValue?: Options<SelectOption> | null;
|
|
531
|
-
name: FieldPath<T>;
|
|
532
|
-
};
|
|
533
|
-
type SelectBaseProps = Props<SelectOption, false> & {
|
|
534
|
-
readonly isError?: boolean;
|
|
535
|
-
readonly options: Options<SelectOption>;
|
|
536
|
-
readonly value?: PropsValue<SelectOption>;
|
|
537
|
-
};
|
|
538
|
-
interface SelectOption {
|
|
539
|
-
readonly icon?: ReactNode | string;
|
|
540
|
-
readonly label: string;
|
|
541
|
-
readonly value?: string;
|
|
542
|
-
}
|
|
543
|
-
type SingleValue = SingleValue$1<SelectOption>;
|
|
544
|
-
|
|
545
|
-
declare const SelectBase: FC<SelectBaseProps>;
|
|
546
|
-
|
|
547
|
-
declare const Select: <T extends FieldValues>(props: SelectProps<T>) => React.JSX.Element;
|
|
548
|
-
|
|
549
|
-
interface ToggleProps {
|
|
550
|
-
defaultValue?: boolean;
|
|
551
|
-
disabled?: boolean;
|
|
552
|
-
id: string | undefined;
|
|
553
|
-
label?: ReactNode | string;
|
|
554
|
-
name: string;
|
|
555
|
-
onChange?: (value: boolean) => void;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* Currently not compatible with react-hook-form
|
|
560
|
-
*/
|
|
561
|
-
declare const Toggle: FC<ToggleProps>;
|
|
562
|
-
|
|
563
529
|
interface InputBaseProps extends RefAttributes<HTMLInputElement> {
|
|
564
530
|
button?: ReactNode;
|
|
565
531
|
colorInput?: string | undefined;
|
|
@@ -654,7 +620,64 @@ interface TrailingTextInputProps extends InputProps, FieldWrapperValues {
|
|
|
654
620
|
|
|
655
621
|
declare const TrailingTextInput: FC<TrailingTextInputProps>;
|
|
656
622
|
|
|
623
|
+
type SelectProps<T extends FieldValues> = SelectBaseProps & {
|
|
624
|
+
control: Control<T, any>;
|
|
625
|
+
defaultValue?: Options<SelectOption> | null;
|
|
626
|
+
name: FieldPath<T>;
|
|
627
|
+
};
|
|
628
|
+
declare enum SelectType {
|
|
629
|
+
ASYNC_CREATABLE_SELECT = "AsyncCreatableSelect",
|
|
630
|
+
ASYNC_SELECT = "AsyncSelect",
|
|
631
|
+
CREATABLE_SELECT = "CreatableSelect",
|
|
632
|
+
REACT_SELECT = "ReactSelect"
|
|
633
|
+
}
|
|
634
|
+
type Group = GroupBase<SelectOption>;
|
|
635
|
+
type SelectBaseProps = Props<SelectOption, false> & {
|
|
636
|
+
readonly customComponents?: SelectComponentsConfig<SelectOption, false, Group>;
|
|
637
|
+
readonly isError?: boolean;
|
|
638
|
+
readonly options?: Options<SelectOption>;
|
|
639
|
+
readonly type?: SelectType;
|
|
640
|
+
readonly value?: PropsValue<SelectOption>;
|
|
641
|
+
};
|
|
642
|
+
type SelectFieldProps<T extends FieldValues> = FieldWrapperValues & SelectProps<T>;
|
|
643
|
+
interface SelectOption {
|
|
644
|
+
readonly icon?: ReactNode | string;
|
|
645
|
+
readonly label: string;
|
|
646
|
+
readonly value?: string;
|
|
647
|
+
}
|
|
648
|
+
type SingleValue = SingleValue$1<SelectOption>;
|
|
649
|
+
|
|
650
|
+
declare const SelectBase: FC<SelectBaseProps>;
|
|
651
|
+
|
|
652
|
+
declare const SelectField: <T extends FieldValues>(props: SelectFieldProps<T>) => React.JSX.Element;
|
|
653
|
+
|
|
654
|
+
declare const Select: <T extends FieldValues>(props: SelectProps<T>) => React.JSX.Element;
|
|
655
|
+
|
|
656
|
+
interface AsyncSelectProps extends SelectBaseProps {
|
|
657
|
+
control: Control;
|
|
658
|
+
defaultPlaceholder?: string;
|
|
659
|
+
name: string;
|
|
660
|
+
optionIcon?: IconSystemProps;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
declare const AsyncSelect: React.FC<AsyncSelectProps>;
|
|
664
|
+
|
|
665
|
+
interface ToggleProps {
|
|
666
|
+
defaultValue?: boolean;
|
|
667
|
+
disabled?: boolean;
|
|
668
|
+
id: string | undefined;
|
|
669
|
+
label?: ReactNode | string;
|
|
670
|
+
name: string;
|
|
671
|
+
onChange?: (value: boolean) => void;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Currently not compatible with react-hook-form
|
|
676
|
+
*/
|
|
677
|
+
declare const Toggle: FC<ToggleProps>;
|
|
678
|
+
|
|
657
679
|
interface TextAreaProps extends RefAttributes<HTMLTextAreaElement>, FieldWrapperValues {
|
|
680
|
+
disabled?: boolean;
|
|
658
681
|
hasError?: boolean;
|
|
659
682
|
onBlur?: ((event: FocusEvent<HTMLTextAreaElement>) => Promise<boolean | void>) | undefined;
|
|
660
683
|
onChange?: ((event: ChangeEvent<HTMLInputElement>) => Promise<boolean | void>) | undefined;
|
|
@@ -1256,4 +1279,4 @@ declare const theme: {
|
|
|
1256
1279
|
};
|
|
1257
1280
|
};
|
|
1258
1281
|
|
|
1259
|
-
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, FieldWrapper, 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, 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, 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 };
|
|
1282
|
+
export { 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, FieldWrapper, 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, 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, Table, TableBody, TableData, TableHead, TableHeadData, TableRow, TableVariant, Tabs, TabsItem, 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 };
|