@mmb-digital/design-system-web 0.1.112 → 0.1.113

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.d.ts CHANGED
@@ -11,6 +11,7 @@ import { Options, Props, SelectComponentsConfig, PropsValue, SingleValue as Sing
11
11
  import * as react_hook_form from 'react-hook-form';
12
12
  import { FieldValues, Control, FieldPath, RegisterOptions } from 'react-hook-form';
13
13
  import { FactoryOpts } from 'imask';
14
+ import { DefaultTheme } from 'styled-components';
14
15
 
15
16
  interface AccordionItemType {
16
17
  content: ReactNode;
@@ -1032,7 +1033,15 @@ interface TagProps {
1032
1033
 
1033
1034
  declare const Tag: FC<TagProps>;
1034
1035
 
1035
- declare enum StackGapSize {
1036
+ declare enum StackDirection {
1037
+ column = "column",
1038
+ columnReverse = "columnReverse",
1039
+ row = "row",
1040
+ rowReverse = "rowReverse"
1041
+ }
1042
+
1043
+ declare enum Spacing {
1044
+ none = "none",
1036
1045
  xxs = "xxs",
1037
1046
  xs = "xs",
1038
1047
  sm = "sm",
@@ -1044,130 +1053,7 @@ declare enum StackGapSize {
1044
1053
  xxxxl = "xxxxl",
1045
1054
  xxxxxl = "xxxxxl"
1046
1055
  }
1047
- declare enum StackDirection {
1048
- column = "column",
1049
- columnReverse = "columnReverse",
1050
- row = "row",
1051
- rowReverse = "rowReverse"
1052
- }
1053
-
1054
- interface StackProps {
1055
- children?: ReactNode;
1056
- className?: string;
1057
- direction?: StackDirection;
1058
- gap?: StackGapSize;
1059
- }
1060
- declare const Stack: React__default.FC<StackProps>;
1061
-
1062
- declare enum PaperShadow {
1063
- lg = "lg",
1064
- md = "md",
1065
- sm = "sm"
1066
- }
1067
-
1068
- interface DesignSystemBaseProps {
1069
- colorScheme?: ColorScheme;
1070
- mediaType?: MediaType;
1071
- }
1072
-
1073
- interface PaperProps extends DesignSystemBaseProps {
1074
- children: ReactNode;
1075
- className?: string;
1076
- shadow?: PaperShadow;
1077
- }
1078
- declare const Paper: React__default.FC<PaperProps>;
1079
-
1080
- interface ProgressDefinition {
1081
- activeStepIndex: number;
1082
- numberOfSteps: number;
1083
- }
1084
-
1085
- interface ProgressPaperProps extends PaperProps {
1086
- progressDefinition: ProgressDefinition;
1087
- }
1088
- declare const ProgressPaper: React__default.FC<ProgressPaperProps>;
1089
-
1090
- interface MediaTypeProviderProps {
1091
- children: ReactNode;
1092
- mediaType: MediaType;
1093
- }
1094
- declare const MediaTypeProvider: React__default.FC<MediaTypeProviderProps>;
1095
-
1096
- type UseMediaTypeParam = MediaType | {
1097
- mediaType?: MediaType | undefined;
1098
- };
1099
- interface UseMediaTypeOptions {
1100
- defaultMediaType?: MediaType;
1101
- }
1102
- /**
1103
- * priorities:
1104
- *
1105
- * 1. value passed to the hook
1106
- * 2. value passed from the nearest provider
1107
- * 3. defaultValue passed in the options object to the hook
1108
- * 4. fallbackMediaType
1109
- */
1110
- declare const useMediaType: (param?: UseMediaTypeParam, options?: UseMediaTypeOptions) => MediaType;
1111
-
1112
- interface ColorSchemeProviderProps {
1113
- children: ReactNode;
1114
- colorScheme: ColorScheme;
1115
- }
1116
- declare const ColorSchemeProvider: React__default.FC<ColorSchemeProviderProps>;
1117
-
1118
- type UseColorSchemeParam = ColorScheme | {
1119
- colorScheme?: ColorScheme | undefined;
1120
- };
1121
- interface UseColorSchemeOptions {
1122
- defaultColorScheme?: ColorScheme;
1123
- }
1124
- /**
1125
- * priorities:
1126
- *
1127
- * 1. value passed to the hook
1128
- * 2. value passed from the nearest provider
1129
- * 3. defaultValue passed in the options object to the hook
1130
- * 4. fallbackColorScheme
1131
- */
1132
- declare const useColorScheme: (param?: UseColorSchemeParam, options?: UseColorSchemeOptions) => ColorScheme;
1133
-
1134
- interface DesignSystemProviderProps {
1135
- children: ReactNode;
1136
- colorScheme?: ColorScheme;
1137
- mediaType?: MediaType;
1138
- }
1139
- /**
1140
- * It is recommended to use this provider only once in a component tree, ideally near the root.
1141
- * It is possible to override every provider for a subpart of the component tree.
1142
- */
1143
- declare const DesignSystemProvider: React__default.FC<DesignSystemProviderProps>;
1144
-
1145
- interface UseDesignSystemParam {
1146
- colorScheme?: ColorScheme | undefined;
1147
- mediaType?: MediaType | undefined;
1148
- }
1149
- interface UseDesignSystemOptions extends UseColorSchemeOptions, UseMediaTypeOptions {
1150
- }
1151
- declare const useDesignSystem: (param?: UseDesignSystemParam, options?: UseDesignSystemOptions) => {
1152
- colorScheme: ColorScheme;
1153
- mediaType: MediaType;
1154
- chooseColor: ChooseColor;
1155
- };
1156
-
1157
- interface FieldLabelStoreProviderProps {
1158
- children: ReactNode;
1159
- }
1160
- /**
1161
- * The purpose of this provider is to make labels passed to `FieldWrapper` accessible elsewhere,
1162
- * e.g. in a validation error summary.
1163
- *
1164
- * Field labels can be registered via the `useRegisterFieldLabel` hook, and consumed via the `useFieldLabels` hook.
1165
- **/
1166
- declare const FieldLabelStoreProvider: (props: FieldLabelStoreProviderProps) => React__default.JSX.Element;
1167
- declare const useFieldLabels: () => Record<string, React__default.ReactNode>;
1168
- declare const useRegisterFieldLabel: () => (name: string, label: ReactNode) => void;
1169
-
1170
- declare const isRenderable: (node: ReactNode) => node is Exclude<ReactNode, boolean | null | undefined>;
1056
+ declare const resolveSpacingValue: (theme: DefaultTheme, spacing: Spacing) => "4px" | "8px" | "12px" | "16px" | "24px" | "32px" | "40px" | "48px" | "56px" | "64px" | "0";
1171
1057
 
1172
1058
  declare const theme: {
1173
1059
  readonly palette: {
@@ -1709,5 +1595,124 @@ declare const theme: {
1709
1595
  readonly tooltip: 1080;
1710
1596
  };
1711
1597
  };
1598
+ type Theme = typeof theme;
1599
+
1600
+ interface StackProps {
1601
+ children?: ReactNode;
1602
+ className?: string;
1603
+ direction?: StackDirection;
1604
+ gap?: Spacing;
1605
+ }
1606
+ declare const Stack: React__default.FC<StackProps>;
1607
+
1608
+ declare enum PaperShadow {
1609
+ lg = "lg",
1610
+ md = "md",
1611
+ sm = "sm"
1612
+ }
1613
+
1614
+ interface DesignSystemBaseProps {
1615
+ colorScheme?: ColorScheme;
1616
+ mediaType?: MediaType;
1617
+ }
1618
+
1619
+ interface PaperProps extends DesignSystemBaseProps {
1620
+ children: ReactNode;
1621
+ className?: string;
1622
+ shadow?: PaperShadow;
1623
+ }
1624
+ declare const Paper: React__default.FC<PaperProps>;
1625
+
1626
+ interface ProgressDefinition {
1627
+ activeStepIndex: number;
1628
+ numberOfSteps: number;
1629
+ }
1630
+
1631
+ interface ProgressPaperProps extends PaperProps {
1632
+ progressDefinition: ProgressDefinition;
1633
+ }
1634
+ declare const ProgressPaper: React__default.FC<ProgressPaperProps>;
1635
+
1636
+ interface MediaTypeProviderProps {
1637
+ children: ReactNode;
1638
+ mediaType: MediaType;
1639
+ }
1640
+ declare const MediaTypeProvider: React__default.FC<MediaTypeProviderProps>;
1641
+
1642
+ type UseMediaTypeParam = MediaType | {
1643
+ mediaType?: MediaType | undefined;
1644
+ };
1645
+ interface UseMediaTypeOptions {
1646
+ defaultMediaType?: MediaType;
1647
+ }
1648
+ /**
1649
+ * priorities:
1650
+ *
1651
+ * 1. value passed to the hook
1652
+ * 2. value passed from the nearest provider
1653
+ * 3. defaultValue passed in the options object to the hook
1654
+ * 4. fallbackMediaType
1655
+ */
1656
+ declare const useMediaType: (param?: UseMediaTypeParam, options?: UseMediaTypeOptions) => MediaType;
1657
+
1658
+ interface ColorSchemeProviderProps {
1659
+ children: ReactNode;
1660
+ colorScheme: ColorScheme;
1661
+ }
1662
+ declare const ColorSchemeProvider: React__default.FC<ColorSchemeProviderProps>;
1663
+
1664
+ type UseColorSchemeParam = ColorScheme | {
1665
+ colorScheme?: ColorScheme | undefined;
1666
+ };
1667
+ interface UseColorSchemeOptions {
1668
+ defaultColorScheme?: ColorScheme;
1669
+ }
1670
+ /**
1671
+ * priorities:
1672
+ *
1673
+ * 1. value passed to the hook
1674
+ * 2. value passed from the nearest provider
1675
+ * 3. defaultValue passed in the options object to the hook
1676
+ * 4. fallbackColorScheme
1677
+ */
1678
+ declare const useColorScheme: (param?: UseColorSchemeParam, options?: UseColorSchemeOptions) => ColorScheme;
1679
+
1680
+ interface DesignSystemProviderProps {
1681
+ children: ReactNode;
1682
+ colorScheme?: ColorScheme;
1683
+ mediaType?: MediaType;
1684
+ }
1685
+ /**
1686
+ * It is recommended to use this provider only once in a component tree, ideally near the root.
1687
+ * It is possible to override every provider for a subpart of the component tree.
1688
+ */
1689
+ declare const DesignSystemProvider: React__default.FC<DesignSystemProviderProps>;
1690
+
1691
+ interface UseDesignSystemParam {
1692
+ colorScheme?: ColorScheme | undefined;
1693
+ mediaType?: MediaType | undefined;
1694
+ }
1695
+ interface UseDesignSystemOptions extends UseColorSchemeOptions, UseMediaTypeOptions {
1696
+ }
1697
+ declare const useDesignSystem: (param?: UseDesignSystemParam, options?: UseDesignSystemOptions) => {
1698
+ colorScheme: ColorScheme;
1699
+ mediaType: MediaType;
1700
+ chooseColor: ChooseColor;
1701
+ };
1702
+
1703
+ interface FieldLabelStoreProviderProps {
1704
+ children: ReactNode;
1705
+ }
1706
+ /**
1707
+ * The purpose of this provider is to make labels passed to `FieldWrapper` accessible elsewhere,
1708
+ * e.g. in a validation error summary.
1709
+ *
1710
+ * Field labels can be registered via the `useRegisterFieldLabel` hook, and consumed via the `useFieldLabels` hook.
1711
+ **/
1712
+ declare const FieldLabelStoreProvider: (props: FieldLabelStoreProviderProps) => React__default.JSX.Element;
1713
+ declare const useFieldLabels: () => Record<string, React__default.ReactNode>;
1714
+ declare const useRegisterFieldLabel: () => (name: string, label: ReactNode) => void;
1715
+
1716
+ declare const isRenderable: (node: ReactNode) => node is Exclude<ReactNode, boolean | null | undefined>;
1712
1717
 
1713
- 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, type ColorObject, ColorScheme, ColorSchemeProvider, type ColorSchemeProviderProps, DatePicker, type DatePickerProps, type DesignSystemBaseProps, DesignSystemProvider, type DesignSystemProviderProps, EmailInput, type EmailInputProps, ErrorBox, type ErrorBoxItem, type ErrorBoxProps, FieldLabelStoreProvider, type FieldLabelStoreProviderProps, FieldWrapper, FieldWrapperContext, FieldWrapperLayout, type FieldWrapperProps, type FieldWrapperValues, _default as FormattedAmount, FormattedHtmlMessage, type FormattedHtmlMessageProps, FormattedMessage, type FormattedMessageProps, type FormattedMessageTypes, _default$1 as FormattedPercentage, type GetColor, IconProduct, IconProductSize, IconProductType, IconSystem, IconSystemSize, IconSystemType, Infobox, type InfoboxProps, InfoboxSize, type InfoboxTextContent, InfoboxVariant, InputBase, type InputBaseProps, InputLabel, type InputLabelProps, InputLabelSize, InputSize, InputTextAlign, InputWeight, Loader, LoaderOverlayBox, type LoaderOverlayBoxProps, type LoaderProps, LoaderSize, MaskedInput, MaskedInputBase, type MaskedInputBaseProps, MaskedInputField, type MaskedInputProps, MediaType, MediaTypeProvider, type MediaTypeProviderProps, Modal, type ModalOnClose, type ModalProps, ModalVerticalPosition, ModalWidthType, NumberInput, NumberInputField, type NumberInputProps, Paper, type PaperProps, PaperShadow, PhoneInput, PhoneInputField, PhoneInputNext, type PhoneInputNextProps, type PhoneInputProps, ProgressPaper, type ProgressPaperProps, 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, SliderInputRoundingType, type SliderProps, SliderStepType, type SliderSteps, Stack, StackDirection, StackGapSize, type StackProps, type TabItemType, Table, TableBody, TableData, TableHead, TableHeadData, TableRow, TableVariant, Tabs, TabsActiveTabDefaultPosition, TabsItem, type TabsProps, TabsSize, type TabsType, TabsVariant, Tag, TagFontWeight, TagIconPosition, type TagProps, TagSize, TagTextTransform, TagType, TextArea, type TextAreaProps, TextInput, type TextInputProps, Toggle, type ToggleProps, type TooltipFloatingElement, TooltipGeneral, type TooltipGeneralProps, TooltipInfo, TooltipInfoConditional, type TooltipInfoConditionalProps, TooltipInfoDisplayMethod, TooltipInfoDisplayableCheck, type TooltipInfoDisplayableCheckProps, type TooltipInfoProps, TooltipPlacement, type TooltipRenderParent, TrailingTextInput, type TrailingTextInputProps, Typography, type TypographyProps, TypographyTextAlign, TypographyVariant, TypographyWeight, type UseColorSchemeOptions, type UseColorSchemeParam, type UseDesignSystemOptions, type UseDesignSystemParam, type UseMediaTypeOptions, type UseMediaTypeParam, getColor, isRenderable, resolveFieldWrapperHasError, theme, useChooseColor, useColorScheme, useCreateTooltipFloatingElement, useDesignSystem, useFieldLabels, useFormatAmount, useFormattedPercentage, useIsMessageDisplayable, useMediaType, useRegisterFieldLabel, withFieldWrapper, withMaskedInputField };
1718
+ 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, type ColorObject, ColorScheme, ColorSchemeProvider, type ColorSchemeProviderProps, DatePicker, type DatePickerProps, type DesignSystemBaseProps, DesignSystemProvider, type DesignSystemProviderProps, EmailInput, type EmailInputProps, ErrorBox, type ErrorBoxItem, type ErrorBoxProps, FieldLabelStoreProvider, type FieldLabelStoreProviderProps, FieldWrapper, FieldWrapperContext, FieldWrapperLayout, type FieldWrapperProps, type FieldWrapperValues, _default as FormattedAmount, FormattedHtmlMessage, type FormattedHtmlMessageProps, FormattedMessage, type FormattedMessageProps, type FormattedMessageTypes, _default$1 as FormattedPercentage, type GetColor, IconProduct, IconProductSize, IconProductType, IconSystem, IconSystemSize, IconSystemType, Infobox, type InfoboxProps, InfoboxSize, type InfoboxTextContent, InfoboxVariant, InputBase, type InputBaseProps, InputLabel, type InputLabelProps, InputLabelSize, InputSize, InputTextAlign, InputWeight, Loader, LoaderOverlayBox, type LoaderOverlayBoxProps, type LoaderProps, LoaderSize, MaskedInput, MaskedInputBase, type MaskedInputBaseProps, MaskedInputField, type MaskedInputProps, MediaType, MediaTypeProvider, type MediaTypeProviderProps, Modal, type ModalOnClose, type ModalProps, ModalVerticalPosition, ModalWidthType, NumberInput, NumberInputField, type NumberInputProps, Paper, type PaperProps, PaperShadow, PhoneInput, PhoneInputField, PhoneInputNext, type PhoneInputNextProps, type PhoneInputProps, ProgressPaper, type ProgressPaperProps, 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, SliderInputRoundingType, type SliderProps, SliderStepType, type SliderSteps, Spacing, Stack, StackDirection, type StackProps, type TabItemType, Table, TableBody, TableData, TableHead, TableHeadData, TableRow, TableVariant, Tabs, TabsActiveTabDefaultPosition, TabsItem, type TabsProps, TabsSize, type TabsType, TabsVariant, Tag, TagFontWeight, TagIconPosition, type TagProps, TagSize, TagTextTransform, TagType, TextArea, type TextAreaProps, TextInput, type TextInputProps, type Theme, Toggle, type ToggleProps, type TooltipFloatingElement, TooltipGeneral, type TooltipGeneralProps, TooltipInfo, TooltipInfoConditional, type TooltipInfoConditionalProps, TooltipInfoDisplayMethod, TooltipInfoDisplayableCheck, type TooltipInfoDisplayableCheckProps, type TooltipInfoProps, TooltipPlacement, type TooltipRenderParent, TrailingTextInput, type TrailingTextInputProps, Typography, type TypographyProps, TypographyTextAlign, TypographyVariant, TypographyWeight, type UseColorSchemeOptions, type UseColorSchemeParam, type UseDesignSystemOptions, type UseDesignSystemParam, type UseMediaTypeOptions, type UseMediaTypeParam, getColor, isRenderable, resolveFieldWrapperHasError, resolveSpacingValue, theme, useChooseColor, useColorScheme, useCreateTooltipFloatingElement, useDesignSystem, useFieldLabels, useFormatAmount, useFormattedPercentage, useIsMessageDisplayable, useMediaType, useRegisterFieldLabel, withFieldWrapper, withMaskedInputField };