@mmb-digital/design-system-web 0.1.13 → 0.1.15

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.
Files changed (31) hide show
  1. package/dist/components/formElement/select/control.d.ts +4 -0
  2. package/dist/components/formElement/select/downChevron.d.ts +2 -0
  3. package/dist/components/formElement/select/dropdownIndicator.d.ts +4 -0
  4. package/dist/components/formElement/select/index.d.ts +4 -0
  5. package/dist/components/formElement/select/option.d.ts +5 -0
  6. package/dist/components/formElement/select/select.d.ts +5 -0
  7. package/dist/components/formElement/select/select.style.d.ts +9 -0
  8. package/dist/components/formElement/select/select.types.d.ts +39 -0
  9. package/dist/components/formElement/select/selectBase.d.ts +4 -0
  10. package/dist/components/formElement/select/singleValue.d.ts +4 -0
  11. package/dist/components/formElement/textfieldInput/index.d.ts +1 -0
  12. package/dist/components/formElement/textfieldInput/textfieldInput/emailInput/emailInput.styles.d.ts +1 -2
  13. package/dist/components/formElement/textfieldInput/textfieldInput/phoneInput/phoneInput.styles.d.ts +1 -2
  14. package/dist/components/formElement/textfieldInput/textfieldInput/searchInput/searchInput.styles.d.ts +1 -2
  15. package/dist/components/formElement/textfieldInput/textfieldInput/textInput/textInput.styles.d.ts +1 -2
  16. package/dist/components/formElement/textfieldInput/textfieldInput/trailingTextInput/trailingTextInput.styles.d.ts +1 -2
  17. package/dist/components/icon/system/svg/arrowDown/big/iconSystemArrowDownBig.d.ts +1 -1
  18. package/dist/components/icon/system/svg/arrowDown/small/iconSystemArrowDownSmall.d.ts +1 -1
  19. package/dist/components/icon/system/svg/chevronDown/big/iconSystemChevronDownBig.d.ts +1 -1
  20. package/dist/components/icon/system/svg/chevronDown/small/iconSystemChevronDownSmall.d.ts +1 -1
  21. package/dist/components/tooltip/index.d.ts +1 -0
  22. package/dist/components/tooltip/useTooltipFloatingElement/index.d.ts +1 -0
  23. package/dist/components/tooltip/useTooltipFloatingElement/useCreateTooltipFloatingElement.d.ts +2 -0
  24. package/dist/components/tooltip/useTooltipFloatingElement/useCreateTooltipFloatingElement.test.d.ts +1 -0
  25. package/dist/components/tooltip/useTooltipFloatingElement/useCreateTooltipFloatingElement.types.d.ts +4 -0
  26. package/dist/index.cjs.js +42 -53
  27. package/dist/index.cjs.js.map +1 -1
  28. package/dist/index.esm.js +99 -110
  29. package/dist/index.esm.js.map +1 -1
  30. package/dist/style/styledComponents/theme.d.ts +0 -1
  31. package/package.json +2 -1
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ControlProps } from './select.types';
3
+ declare const Control: (props: ControlProps) => React.JSX.Element;
4
+ export default Control;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DownChevron: () => React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DropdownIndicatorProps } from './select.types';
3
+ declare const DropdownIndicator: (props: DropdownIndicatorProps) => React.JSX.Element;
4
+ export default DropdownIndicator;
@@ -0,0 +1,4 @@
1
+ import SelectBase from './selectBase';
2
+ import Select from './select';
3
+ export { Select, SelectBase };
4
+ export { SelectOption, SelectProps, SingleValue } from './select.types';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { OptionProps } from 'react-select';
3
+ import { SelectOption } from './select.types';
4
+ declare const Option: (props: OptionProps<SelectOption, false>) => React.JSX.Element;
5
+ export default Option;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { FieldValues } from 'react-hook-form';
3
+ import { SelectProps } from './select.types';
4
+ declare const Select: <T extends FieldValues>(props: SelectProps<T>) => React.JSX.Element;
5
+ export default Select;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export declare const ControlStyle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
+ isDisabled: boolean;
4
+ isFocused: boolean;
5
+ }>>;
6
+ export declare const DropdownIndicatoreStyle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
7
+ isFocused: boolean;
8
+ }>>;
9
+ export declare const SingleValueStyle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -0,0 +1,39 @@
1
+ import { JSX, PropsWithChildren, ReactNode, Ref } from 'react';
2
+ import { Control } from 'react-hook-form';
3
+ import type { FieldPath, FieldValues } from 'react-hook-form';
4
+ import { Options, Props, PropsValue, SingleValue as SV } from 'react-select';
5
+ export type SelectProps<T extends FieldValues> = SelectBaseProps & {
6
+ control: Control<T, any>;
7
+ defaultValue?: Options<SelectOption> | null;
8
+ name: FieldPath<T>;
9
+ };
10
+ export type SelectBaseProps = Props<SelectOption, false> & {
11
+ readonly isError?: boolean;
12
+ readonly options: Options<SelectOption>;
13
+ readonly value?: PropsValue<SelectOption>;
14
+ };
15
+ export interface SelectOption {
16
+ readonly icon?: ReactNode | string;
17
+ readonly label: string;
18
+ readonly value?: string;
19
+ }
20
+ export type SingleValue = SV<SelectOption>;
21
+ export interface DropdownIndicatorProps extends PropsWithChildren {
22
+ /** The focused state of the select. */
23
+ isFocused: boolean;
24
+ }
25
+ export interface ControlProps extends PropsWithChildren {
26
+ /** The mouse down event and the innerRef to pass down to the controller element. */
27
+ innerProps: JSX.IntrinsicElements['div'];
28
+ innerRef: Ref<HTMLDivElement>;
29
+ /** Whether the select is disabled. */
30
+ isDisabled: boolean;
31
+ /** Whether the select is focused. */
32
+ isFocused: boolean;
33
+ }
34
+ export interface SingleValueProps extends PropsWithChildren {
35
+ /** The data of the selected option rendered in the Single Value component. */
36
+ data: SelectOption;
37
+ /** Whether this is disabled. */
38
+ isDisabled: boolean;
39
+ }
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { SelectBaseProps } from './select.types';
3
+ declare const SelectBase: FC<SelectBaseProps>;
4
+ export default SelectBase;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SingleValueProps } from './select.types';
3
+ declare const SingleValue: (props: SingleValueProps) => React.JSX.Element;
4
+ export default SingleValue;
@@ -4,5 +4,6 @@ export * from './textfieldInput/emailInput';
4
4
  export * from './textfieldInput/phoneInput';
5
5
  export * from './textfieldInput/searchInput';
6
6
  export * from './textfieldInput/sliderInput';
7
+ export * from './textfieldInput/textInput';
7
8
  export * from './textfieldInput/trailingTextInput';
8
9
  export { InputSize } from './textfieldInput.types';
@@ -1,3 +1,2 @@
1
1
  /// <reference types="react" />
2
- import { EmailInputProps } from './emailInput.types';
3
- export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, EmailInputProps>>;
2
+ export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -1,3 +1,2 @@
1
1
  /// <reference types="react" />
2
- import { PhoneInputProps } from './phoneInput.types';
3
- export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, PhoneInputProps>>;
2
+ export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -1,3 +1,2 @@
1
1
  /// <reference types="react" />
2
- import { SearchInputProps } from './searchInput.types';
3
- export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SearchInputProps>>;
2
+ export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -1,3 +1,2 @@
1
1
  /// <reference types="react" />
2
- import { TextInputProps } from './textInput.types';
3
- export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, TextInputProps>>;
2
+ export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -1,3 +1,2 @@
1
1
  /// <reference types="react" />
2
- import { TrailingTextInputProps } from './trailingTextInput.types';
3
- export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, TrailingTextInputProps>>;
2
+ export declare const Wrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { IconSystemSvgProps } from '@/components/icon/system/svg/iconSystemSvg.types';
2
+ import { IconSystemSvgProps } from '../../iconSystemSvg.types';
3
3
  declare const IconSystemArrowDownBig: React.FC<IconSystemSvgProps>;
4
4
  export default IconSystemArrowDownBig;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { IconSystemSvgProps } from '@/components/icon/system/svg/iconSystemSvg.types';
2
+ import { IconSystemSvgProps } from '../../iconSystemSvg.types';
3
3
  declare const IconSystemArrowDownSmall: React.FC<IconSystemSvgProps>;
4
4
  export default IconSystemArrowDownSmall;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { IconSystemSvgProps } from '@/components/icon/system/svg/iconSystemSvg.types';
2
+ import { IconSystemSvgProps } from '../../iconSystemSvg.types';
3
3
  declare const IconSystemChevronDownBig: React.FC<IconSystemSvgProps>;
4
4
  export default IconSystemChevronDownBig;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { IconSystemSvgProps } from '@/components/icon/system/svg/iconSystemSvg.types';
2
+ import { IconSystemSvgProps } from '../../iconSystemSvg.types';
3
3
  declare const IconSystemChevronDownSmall: React.FC<IconSystemSvgProps>;
4
4
  export default IconSystemChevronDownSmall;
@@ -6,4 +6,5 @@ export { TooltipGeneral };
6
6
  export { TooltipGeneralProps } from './general/tooltipGeneral.types';
7
7
  export * from './infoDisplayableCheck/index';
8
8
  export * from './infoConditional/index';
9
+ export * from './useTooltipFloatingElement/index';
9
10
  export { TooltipPlacement, TooltipParentElement, TooltipParentElementProps, TooltipFloatingElement, TooltipInfoDisplayMethod } from './tooltip.types';
@@ -0,0 +1 @@
1
+ export { useCreateTooltipFloatingElement } from './useCreateTooltipFloatingElement';
@@ -0,0 +1,2 @@
1
+ import { CreateTooltipFloatingElementHookReturnFunction } from './useCreateTooltipFloatingElement.types';
2
+ export declare const useCreateTooltipFloatingElement: () => CreateTooltipFloatingElementHookReturnFunction;
@@ -0,0 +1,4 @@
1
+ import { FormattedMessageTypes } from '@/components/formatted/message';
2
+ import { MessageDescriptor } from 'react-intl';
3
+ import { TooltipFloatingElement } from '../tooltip.types';
4
+ export type CreateTooltipFloatingElementHookReturnFunction = (body: FormattedMessageTypes, title?: MessageDescriptor | undefined) => TooltipFloatingElement | undefined;