@mmb-digital/design-system-web 0.1.135 → 0.1.136

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
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
- import React__default, { ReactNode, FC, PropsWithChildren, RefObject, MouseEvent, ReactElement, HTMLProps, SyntheticEvent, RefAttributes, FocusEvent, ChangeEvent, ComponentType, ComponentProps, TextareaHTMLAttributes, HTMLInputTypeAttribute, FocusEventHandler } from 'react';
2
+ import React__default, { ReactNode, FC, PropsWithChildren, RefObject, MouseEvent, ReactElement, HTMLProps, SyntheticEvent, RefAttributes, HTMLInputAutoCompleteAttribute, FocusEvent, ChangeEvent, ComponentType, ComponentProps, TextareaHTMLAttributes, HTMLInputTypeAttribute, FocusEventHandler } from 'react';
3
3
  import { MessageDescriptor } from 'react-intl';
4
4
  import { FormatXMLElementFn, PrimitiveType } from 'intl-messageformat';
5
5
  import { ReactDatePickerProps } from 'react-datepicker';
6
+ import * as csstype from 'csstype';
6
7
  import { Property } from 'csstype';
7
8
  import * as react_hook_form from 'react-hook-form';
8
9
  import { RegisterOptions, FieldValues, Control, FieldPath } from 'react-hook-form';
@@ -195,10 +196,10 @@ interface ErrorBoxProps {
195
196
  colorScheme: ColorScheme;
196
197
  content?: ReactElement | string;
197
198
  items?: ErrorBoxItem[];
199
+ tabIndex?: number;
198
200
  title?: ReactElement | string;
199
201
  }
200
-
201
- declare const ErrorBox: React__default.FC<ErrorBoxProps>;
202
+ declare const ErrorBox: React__default.ForwardRefExoticComponent<ErrorBoxProps & React__default.RefAttributes<HTMLDivElement>>;
202
203
 
203
204
  declare enum MediaType {
204
205
  desktop = "desktop",
@@ -426,6 +427,16 @@ declare const FieldLabelStoreProvider: (props: FieldLabelStoreProviderProps) =>
426
427
  declare const useFieldLabels: () => Record<string, React__default.ReactNode>;
427
428
  declare const useRegisterFieldLabel: () => (name: string, label: ReactNode) => void;
428
429
 
430
+ interface FieldConfig {
431
+ optionalLabelSuffix?: ReactNode;
432
+ }
433
+ interface FieldConfigProviderProps extends FieldConfig {
434
+ children: ReactNode;
435
+ }
436
+ /** Should only be used once in the root application wrapper. */
437
+ declare const FieldConfigProvider: (props: FieldConfigProviderProps) => React__default.JSX.Element;
438
+ declare const useFieldConfig: () => FieldConfig;
439
+
429
440
  type ModalOnClose = (reasonForClosing: ReasonForClosing) => void;
430
441
  declare enum ModalWidthType {
431
442
  default = "default",
@@ -635,7 +646,21 @@ interface UseFormatAmountTypeParam {
635
646
  type UseFormatAmountType = (param: UseFormatAmountTypeParam) => string;
636
647
  declare const useFormatAmount: () => UseFormatAmountType;
637
648
 
638
- interface DatePickerProps extends Omit<ReactDatePickerProps, 'calendarContainer' | 'customInput' | 'onChange' | 'renderCustomHeader' | 'showTimeSelect'> {
649
+ interface FieldControlProps extends DesignSystemBaseProps {
650
+ describedBy?: string;
651
+ id?: string;
652
+ invalid?: boolean;
653
+ labelledBy?: string;
654
+ name?: string;
655
+ required?: boolean;
656
+ }
657
+ declare enum FieldRequirement {
658
+ optional = "optional",
659
+ optionalWithoutLabelSuffix = "optionalWithoutLabelSuffix",
660
+ required = "required"
661
+ }
662
+
663
+ interface DatePickerProps extends Omit<ReactDatePickerProps, 'calendarContainer' | 'customInput' | 'onChange' | 'renderCustomHeader' | 'showTimeSelect'>, FieldControlProps {
639
664
  ariaLabelChevron?: string;
640
665
  dateFormat?: string[] | string;
641
666
  hasError?: boolean;
@@ -692,7 +717,8 @@ declare enum FieldWrapperLayout {
692
717
  horizontal = "horizontal",
693
718
  vertical = "vertical"
694
719
  }
695
- interface InputProps {
720
+ interface InputProps extends FieldControlProps {
721
+ autoComplete?: HTMLInputAutoCompleteAttribute;
696
722
  colorInput?: Property.Color | undefined;
697
723
  disabled?: boolean;
698
724
  halfWidth?: boolean;
@@ -704,21 +730,26 @@ interface InputProps {
704
730
  value?: string;
705
731
  }
706
732
 
707
- declare const resolveFieldWrapperHasError: (hasErrorProp: boolean | undefined, errorMessage: ReactNode) => boolean;
708
733
  interface FieldWrapperProps {
709
- children?: ReactNode;
734
+ children?: ReactNode | ((controlProps: FieldControlProps) => ReactNode);
710
735
  /** @deprecated Use `controlSectionWidth` instead. */
711
736
  childrenWidth?: Property.Width;
712
737
  colorScheme?: ColorScheme;
738
+ controlId?: string;
713
739
  controlMobileWidth?: Property.Width;
714
740
  /** `controlSection` represents the right section in horizontal layout. */
715
741
  controlSectionWidth?: Property.Width;
716
742
  controlWidth?: Property.Width;
717
743
  errorMessage?: ReactNode;
718
- /** @default isRenderable(errorMessage) */
744
+ /** @default FieldRequirement.required */
745
+ fieldRequirement?: FieldRequirement;
746
+ /** @deprecated Use `invalid` instead. */
719
747
  hasError?: boolean;
720
748
  hintText?: ReactNode;
749
+ /** @deprecated Use `controlId` instead. */
721
750
  id?: string;
751
+ /** @default isRenderable(errorMessage) */
752
+ invalid?: boolean;
722
753
  label?: ReactNode;
723
754
  labelId?: string;
724
755
  labelSuffix?: ReactNode;
@@ -728,17 +759,12 @@ interface FieldWrapperProps {
728
759
  successMessage?: ReactNode;
729
760
  tooltip?: TooltipFloatingElement;
730
761
  }
731
- declare const FieldWrapperContext: React__default.Context<Pick<FieldWrapperProps, "hasError" | "labelId">>;
732
762
  /** @deprecated Use `FieldWrapperProps` or `ComponentProps<typeof YourWrappedComponent>` instead. */
733
763
  type FieldWrapperValues = Omit<FieldWrapperProps, 'children'>;
734
764
  declare const FieldWrapper: (props: FieldWrapperProps) => React__default.JSX.Element;
735
765
 
736
- interface FormControlProps {
737
- hasError?: boolean;
738
- id?: string;
739
- name?: string;
740
- }
741
- declare const withFieldWrapper: <TProps extends FormControlProps, TElement extends HTMLElement>(FormControl: ComponentType<TProps>) => React__default.ForwardRefExoticComponent<React__default.PropsWithoutRef<Omit<FieldWrapperProps, "children"> & TProps> & React__default.RefAttributes<TElement>>;
766
+ type WithFieldWrapperProps = Omit<FieldWrapperProps, 'children' | 'controlId' | 'id'>;
767
+ declare const withFieldWrapper: <TProps extends FieldControlProps, TElement extends HTMLElement>(FieldControl: ComponentType<TProps>) => React__default.ForwardRefExoticComponent<React__default.PropsWithoutRef<TProps & WithFieldWrapperProps> & React__default.RefAttributes<TElement>>;
742
768
 
743
769
  interface RadioGeneralProps extends RefAttributes<HTMLInputElement> {
744
770
  readonly checked?: boolean;
@@ -799,7 +825,26 @@ interface RadioButtonGroupControlProps extends DesignSystemBaseProps {
799
825
  }
800
826
  declare const RadioButtonGroupControl: React__default.ForwardRefExoticComponent<RadioButtonGroupControlProps & React__default.RefAttributes<HTMLInputElement>>;
801
827
 
802
- declare const RadioButtonGroup: React.ForwardRefExoticComponent<Omit<FieldWrapperProps, "children"> & RadioButtonGroupControlProps & React.RefAttributes<HTMLInputElement>>;
828
+ declare const RadioButtonGroup: React.ForwardRefExoticComponent<RadioButtonGroupControlProps & {
829
+ layout?: FieldWrapperLayout | undefined;
830
+ tooltip?: TooltipFloatingElement | undefined;
831
+ label?: React.ReactNode;
832
+ colorScheme?: ColorScheme | undefined;
833
+ name?: string | undefined;
834
+ note?: React.ReactNode;
835
+ invalid?: boolean | undefined;
836
+ hasError?: boolean | undefined;
837
+ labelId?: string | undefined;
838
+ childrenWidth?: csstype.Property.Width | undefined;
839
+ controlMobileWidth?: csstype.Property.Width | undefined;
840
+ controlSectionWidth?: csstype.Property.Width | undefined;
841
+ controlWidth?: csstype.Property.Width | undefined;
842
+ errorMessage?: React.ReactNode;
843
+ fieldRequirement?: FieldRequirement | undefined;
844
+ hintText?: React.ReactNode;
845
+ labelSuffix?: React.ReactNode;
846
+ successMessage?: React.ReactNode;
847
+ } & React.RefAttributes<HTMLInputElement>>;
803
848
  type RadioButtonGroupProps = ComponentProps<typeof RadioButtonGroup>;
804
849
 
805
850
  interface RadioButtonGroupFieldProps extends Omit<RadioButtonGroupProps, 'onChange'> {
@@ -864,24 +909,30 @@ interface AsyncSelectProps extends SelectBaseProps {
864
909
 
865
910
  declare const AsyncSelect: React__default.FC<AsyncSelectProps>;
866
911
 
867
- interface ToggleProps {
868
- defaultValue?: boolean;
869
- disabled?: boolean;
870
- id: string | undefined;
871
- label?: ReactNode | string;
872
- name: string;
873
- onChange?: (value: boolean) => void;
874
- }
875
-
876
- /**
877
- * Currently not compatible with react-hook-form
878
- */
879
- declare const Toggle: FC<ToggleProps>;
880
-
881
- interface TextAreaControlProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
912
+ interface TextAreaControlProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, FieldControlProps {
913
+ /** @deprecated Use `invalid` instead. */
882
914
  hasError?: boolean;
883
915
  }
884
- declare const TextArea: React__default.ForwardRefExoticComponent<Omit<FieldWrapperProps, "children"> & TextAreaControlProps & React__default.RefAttributes<HTMLTextAreaElement>>;
916
+ declare const TextArea: React__default.ForwardRefExoticComponent<TextAreaControlProps & {
917
+ layout?: FieldWrapperLayout | undefined;
918
+ tooltip?: TooltipFloatingElement | undefined;
919
+ label?: React__default.ReactNode;
920
+ colorScheme?: ColorScheme | undefined;
921
+ name?: string | undefined;
922
+ note?: React__default.ReactNode;
923
+ invalid?: boolean | undefined;
924
+ hasError?: boolean | undefined;
925
+ labelId?: string | undefined;
926
+ childrenWidth?: csstype.Property.Width | undefined;
927
+ controlMobileWidth?: csstype.Property.Width | undefined;
928
+ controlSectionWidth?: csstype.Property.Width | undefined;
929
+ controlWidth?: csstype.Property.Width | undefined;
930
+ errorMessage?: React__default.ReactNode;
931
+ fieldRequirement?: FieldRequirement | undefined;
932
+ hintText?: React__default.ReactNode;
933
+ labelSuffix?: React__default.ReactNode;
934
+ successMessage?: React__default.ReactNode;
935
+ } & React__default.RefAttributes<HTMLTextAreaElement>>;
885
936
  type TextAreaProps = ComponentProps<typeof TextArea>;
886
937
 
887
938
  declare enum Spacing {
@@ -1464,12 +1515,14 @@ declare enum Overflow {
1464
1515
  }
1465
1516
  declare const resolveOverflowValue: (overflow: Overflow) => string;
1466
1517
 
1467
- interface InputBaseProps extends RefAttributes<HTMLInputElement> {
1518
+ interface InputBaseProps extends RefAttributes<HTMLInputElement>, FieldControlProps {
1519
+ autoComplete?: HTMLInputAutoCompleteAttribute;
1468
1520
  button?: ReactNode;
1469
1521
  colorInput?: Property.Color | undefined;
1470
1522
  colorScheme?: ColorScheme;
1471
1523
  disabled?: boolean;
1472
1524
  halfWidth?: boolean;
1525
+ /** @deprecated Use `invalid` instead. */
1473
1526
  hasError?: boolean;
1474
1527
  icon?: ReactNode;
1475
1528
  id?: string | undefined;
@@ -1514,7 +1567,26 @@ declare const InputLabel: FC<InputLabelProps>;
1514
1567
  interface EmailInputControlProps extends InputProps {
1515
1568
  placeholder?: string;
1516
1569
  }
1517
- declare const EmailInput: React__default.ForwardRefExoticComponent<Omit<FieldWrapperProps, "children"> & EmailInputControlProps & React__default.RefAttributes<HTMLInputElement>>;
1570
+ declare const EmailInput: React__default.ForwardRefExoticComponent<EmailInputControlProps & {
1571
+ layout?: FieldWrapperLayout | undefined;
1572
+ tooltip?: TooltipFloatingElement | undefined;
1573
+ label?: React__default.ReactNode;
1574
+ colorScheme?: ColorScheme | undefined;
1575
+ name?: string | undefined;
1576
+ note?: React__default.ReactNode;
1577
+ invalid?: boolean | undefined;
1578
+ hasError?: boolean | undefined;
1579
+ labelId?: string | undefined;
1580
+ childrenWidth?: csstype.Property.Width | undefined;
1581
+ controlMobileWidth?: csstype.Property.Width | undefined;
1582
+ controlSectionWidth?: csstype.Property.Width | undefined;
1583
+ controlWidth?: csstype.Property.Width | undefined;
1584
+ errorMessage?: React__default.ReactNode;
1585
+ fieldRequirement?: FieldRequirement | undefined;
1586
+ hintText?: React__default.ReactNode;
1587
+ labelSuffix?: React__default.ReactNode;
1588
+ successMessage?: React__default.ReactNode;
1589
+ } & React__default.RefAttributes<HTMLInputElement>>;
1518
1590
  type EmailInputProps = ComponentProps<typeof EmailInput>;
1519
1591
 
1520
1592
  interface MaskedInputBaseProps extends InputBaseProps {
@@ -1523,7 +1595,26 @@ interface MaskedInputBaseProps extends InputBaseProps {
1523
1595
  }
1524
1596
  declare const MaskedInputBase: React__default.ForwardRefExoticComponent<Omit<MaskedInputBaseProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
1525
1597
 
1526
- declare const MaskedInput: React.ForwardRefExoticComponent<Omit<Omit<FieldWrapperProps, "children"> & MaskedInputBaseProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
1598
+ declare const MaskedInput: React.ForwardRefExoticComponent<Omit<MaskedInputBaseProps & {
1599
+ layout?: FieldWrapperLayout | undefined;
1600
+ tooltip?: TooltipFloatingElement | undefined;
1601
+ label?: React.ReactNode;
1602
+ colorScheme?: ColorScheme | undefined;
1603
+ name?: string | undefined;
1604
+ note?: React.ReactNode;
1605
+ invalid?: boolean | undefined;
1606
+ hasError?: boolean | undefined;
1607
+ labelId?: string | undefined;
1608
+ childrenWidth?: csstype.Property.Width | undefined;
1609
+ controlMobileWidth?: csstype.Property.Width | undefined;
1610
+ controlSectionWidth?: csstype.Property.Width | undefined;
1611
+ controlWidth?: csstype.Property.Width | undefined;
1612
+ errorMessage?: React.ReactNode;
1613
+ fieldRequirement?: FieldRequirement | undefined;
1614
+ hintText?: React.ReactNode;
1615
+ labelSuffix?: React.ReactNode;
1616
+ successMessage?: React.ReactNode;
1617
+ }, "ref"> & React.RefAttributes<HTMLInputElement>>;
1527
1618
  type MaskedInputProps = ComponentProps<typeof MaskedInput>;
1528
1619
 
1529
1620
  type ManagedMaskedInputProps = Pick<MaskedInputProps, 'errorMessage' | 'onAccept' | 'onBlur' | 'value'>;
@@ -1531,7 +1622,26 @@ declare const withMaskedInputField: <TProps extends ManagedMaskedInputProps>(Com
1531
1622
  name: FieldPath<TFieldValues>;
1532
1623
  options?: RegisterOptions<TFieldValues>;
1533
1624
  }) => React__default.JSX.Element;
1534
- declare const MaskedInputField: <TFieldValues extends FieldValues>(props: Omit<Omit<FieldWrapperProps, "children"> & MaskedInputBaseProps, "ref"> & React__default.RefAttributes<HTMLInputElement> & {
1625
+ declare const MaskedInputField: <TFieldValues extends FieldValues>(props: Omit<MaskedInputBaseProps & {
1626
+ layout?: FieldWrapperLayout | undefined;
1627
+ tooltip?: TooltipFloatingElement | undefined;
1628
+ label?: React__default.ReactNode;
1629
+ colorScheme?: ColorScheme | undefined;
1630
+ name?: string | undefined;
1631
+ note?: React__default.ReactNode;
1632
+ invalid?: boolean | undefined;
1633
+ hasError?: boolean | undefined;
1634
+ labelId?: string | undefined;
1635
+ childrenWidth?: csstype.Property.Width | undefined;
1636
+ controlMobileWidth?: csstype.Property.Width | undefined;
1637
+ controlSectionWidth?: csstype.Property.Width | undefined;
1638
+ controlWidth?: csstype.Property.Width | undefined;
1639
+ errorMessage?: React__default.ReactNode;
1640
+ fieldRequirement?: FieldRequirement | undefined;
1641
+ hintText?: React__default.ReactNode;
1642
+ labelSuffix?: React__default.ReactNode;
1643
+ successMessage?: React__default.ReactNode;
1644
+ }, "ref"> & React__default.RefAttributes<HTMLInputElement> & {
1535
1645
  name: react_hook_form.Path<TFieldValues>;
1536
1646
  options?: RegisterOptions<TFieldValues> | undefined;
1537
1647
  }) => React__default.JSX.Element;
@@ -1554,7 +1664,26 @@ interface PhoneInputControlProps extends InputProps {
1554
1664
  prefix?: string;
1555
1665
  }
1556
1666
  /** @deprecated Use `PhoneInputNext` instead. */
1557
- declare const PhoneInput: React__default.ForwardRefExoticComponent<Omit<FieldWrapperProps, "children"> & PhoneInputControlProps & React__default.RefAttributes<HTMLInputElement>>;
1667
+ declare const PhoneInput: React__default.ForwardRefExoticComponent<PhoneInputControlProps & {
1668
+ layout?: FieldWrapperLayout | undefined;
1669
+ tooltip?: TooltipFloatingElement | undefined;
1670
+ label?: React__default.ReactNode;
1671
+ colorScheme?: ColorScheme | undefined;
1672
+ name?: string | undefined;
1673
+ note?: React__default.ReactNode;
1674
+ invalid?: boolean | undefined;
1675
+ hasError?: boolean | undefined;
1676
+ labelId?: string | undefined;
1677
+ childrenWidth?: csstype.Property.Width | undefined;
1678
+ controlMobileWidth?: csstype.Property.Width | undefined;
1679
+ controlSectionWidth?: csstype.Property.Width | undefined;
1680
+ controlWidth?: csstype.Property.Width | undefined;
1681
+ errorMessage?: React__default.ReactNode;
1682
+ fieldRequirement?: FieldRequirement | undefined;
1683
+ hintText?: React__default.ReactNode;
1684
+ labelSuffix?: React__default.ReactNode;
1685
+ successMessage?: React__default.ReactNode;
1686
+ } & React__default.RefAttributes<HTMLInputElement>>;
1558
1687
  type PhoneInputProps = ComponentProps<typeof PhoneInput>;
1559
1688
 
1560
1689
  interface PhoneInputNextProps extends Omit<MaskedInputProps, 'maskOptions'> {
@@ -1574,7 +1703,26 @@ interface SearchInputControlProps extends InputProps {
1574
1703
  hasError?: boolean;
1575
1704
  placeholder?: string;
1576
1705
  }
1577
- declare const SearchInput: React__default.ForwardRefExoticComponent<Omit<FieldWrapperProps, "children"> & SearchInputControlProps & React__default.RefAttributes<HTMLInputElement>>;
1706
+ declare const SearchInput: React__default.ForwardRefExoticComponent<SearchInputControlProps & {
1707
+ layout?: FieldWrapperLayout | undefined;
1708
+ tooltip?: TooltipFloatingElement | undefined;
1709
+ label?: ReactNode;
1710
+ colorScheme?: ColorScheme | undefined;
1711
+ name?: string | undefined;
1712
+ note?: ReactNode;
1713
+ invalid?: boolean | undefined;
1714
+ hasError?: boolean | undefined;
1715
+ labelId?: string | undefined;
1716
+ childrenWidth?: csstype.Property.Width | undefined;
1717
+ controlMobileWidth?: csstype.Property.Width | undefined;
1718
+ controlSectionWidth?: csstype.Property.Width | undefined;
1719
+ controlWidth?: csstype.Property.Width | undefined;
1720
+ errorMessage?: ReactNode;
1721
+ fieldRequirement?: FieldRequirement | undefined;
1722
+ hintText?: ReactNode;
1723
+ labelSuffix?: ReactNode;
1724
+ successMessage?: ReactNode;
1725
+ } & React__default.RefAttributes<HTMLInputElement>>;
1578
1726
  type SearchInputProps = ComponentProps<typeof SearchInput>;
1579
1727
 
1580
1728
  interface SliderInputLabel {
@@ -1623,16 +1771,68 @@ declare const SliderInput: React__default.FC<SliderInputProps>;
1623
1771
  interface TextInputControlProps extends InputProps {
1624
1772
  placeholder?: string;
1625
1773
  }
1626
- declare const TextInput: React__default.ForwardRefExoticComponent<Omit<FieldWrapperProps, "children"> & TextInputControlProps & React__default.RefAttributes<HTMLInputElement>>;
1774
+ declare const TextInput: React__default.ForwardRefExoticComponent<TextInputControlProps & {
1775
+ layout?: FieldWrapperLayout | undefined;
1776
+ tooltip?: TooltipFloatingElement | undefined;
1777
+ label?: React__default.ReactNode;
1778
+ colorScheme?: ColorScheme | undefined;
1779
+ name?: string | undefined;
1780
+ note?: React__default.ReactNode;
1781
+ invalid?: boolean | undefined;
1782
+ hasError?: boolean | undefined;
1783
+ labelId?: string | undefined;
1784
+ childrenWidth?: csstype.Property.Width | undefined;
1785
+ controlMobileWidth?: csstype.Property.Width | undefined;
1786
+ controlSectionWidth?: csstype.Property.Width | undefined;
1787
+ controlWidth?: csstype.Property.Width | undefined;
1788
+ errorMessage?: React__default.ReactNode;
1789
+ fieldRequirement?: FieldRequirement | undefined;
1790
+ hintText?: React__default.ReactNode;
1791
+ labelSuffix?: React__default.ReactNode;
1792
+ successMessage?: React__default.ReactNode;
1793
+ } & React__default.RefAttributes<HTMLInputElement>>;
1627
1794
  type TextInputProps = ComponentProps<typeof TextInput>;
1628
1795
 
1629
1796
  interface TrailingTextInputControlProps extends InputProps {
1630
1797
  placeholder?: string;
1631
1798
  suffix?: ReactNode;
1632
1799
  }
1633
- declare const TrailingTextInput: React__default.ForwardRefExoticComponent<Omit<FieldWrapperProps, "children"> & TrailingTextInputControlProps & React__default.RefAttributes<HTMLInputElement>>;
1800
+ declare const TrailingTextInput: React__default.ForwardRefExoticComponent<TrailingTextInputControlProps & {
1801
+ layout?: FieldWrapperLayout | undefined;
1802
+ tooltip?: TooltipFloatingElement | undefined;
1803
+ label?: ReactNode;
1804
+ colorScheme?: ColorScheme | undefined;
1805
+ name?: string | undefined;
1806
+ note?: ReactNode;
1807
+ invalid?: boolean | undefined;
1808
+ hasError?: boolean | undefined;
1809
+ labelId?: string | undefined;
1810
+ childrenWidth?: csstype.Property.Width | undefined;
1811
+ controlMobileWidth?: csstype.Property.Width | undefined;
1812
+ controlSectionWidth?: csstype.Property.Width | undefined;
1813
+ controlWidth?: csstype.Property.Width | undefined;
1814
+ errorMessage?: ReactNode;
1815
+ fieldRequirement?: FieldRequirement | undefined;
1816
+ hintText?: ReactNode;
1817
+ labelSuffix?: ReactNode;
1818
+ successMessage?: ReactNode;
1819
+ } & React__default.RefAttributes<HTMLInputElement>>;
1634
1820
  type TrailingTextInputProps = ComponentProps<typeof TrailingTextInput>;
1635
1821
 
1822
+ interface ToggleProps {
1823
+ defaultValue?: boolean;
1824
+ disabled?: boolean;
1825
+ id: string | undefined;
1826
+ label?: ReactNode | string;
1827
+ name: string;
1828
+ onChange?: (value: boolean) => void;
1829
+ }
1830
+
1831
+ /**
1832
+ * Currently not compatible with react-hook-form
1833
+ */
1834
+ declare const Toggle: FC<ToggleProps>;
1835
+
1636
1836
  declare enum TypographyVariant {
1637
1837
  textXs = "textXs",
1638
1838
  textSm = "textSm",
@@ -1746,15 +1946,15 @@ interface SelectItemOrder {
1746
1946
  source: SelectItemOrderSource;
1747
1947
  }
1748
1948
  type SelectItem = boolean | number | object | string | null;
1749
- interface SelectControlProps<TItem extends SelectItem> {
1949
+ interface SelectControlProps<TItem extends SelectItem> extends FieldControlProps {
1750
1950
  disabled?: boolean;
1751
1951
  formatter?: Formatter<TItem, ReactNode, number | string>;
1752
1952
  getItemKey?: (item: TItem | null) => number | string;
1953
+ /** @deprecated Use `invalid` instead. */
1753
1954
  hasError?: boolean;
1754
1955
  id?: string;
1755
1956
  itemOrder?: SelectItemOrder;
1756
1957
  items: TItem[];
1757
- labelId?: string;
1758
1958
  nilMessage?: string;
1759
1959
  onBlur?: FocusEventHandler<HTMLDivElement>;
1760
1960
  onChange: (item: TItem | null) => void;
@@ -1808,4 +2008,4 @@ declare const useMessageFormatter: <TInput extends unknown>(getMessage: (value:
1808
2008
  [x: string]: any;
1809
2009
  }>;
1810
2010
 
1811
- export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionKeyValue, type AccordionProps, AccordionVariant, AsyncSelect as AsyncReactSelect, Button, type ButtonProps, ButtonSize, ButtonStyle, ButtonType, ButtonsLayout, ButtonsLayoutAlign, ButtonsLayoutDirection, type ButtonsLayoutProps, ButtonsLayoutWrap, 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, FontWeight, _default as FormattedAmount, FormattedHtmlMessage, type FormattedHtmlMessageProps, FormattedMessage, type FormattedMessageProps, _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, Loader, LoaderOverlayBox, type LoaderOverlayBoxProps, type LoaderProps, LoaderSize, MaskedInput, MaskedInputBase, type MaskedInputBaseProps, MaskedInputField, type MaskedInputProps, MediaType, MediaTypeProvider, type MediaTypeProviderProps, type MessageValues, Modal, type ModalOnClose, type ModalProps, ModalVerticalPosition, ModalWidthType, NumberInput, NumberInputField, type NumberInputProps, Overflow, Paper, type PaperProps, PaperShadow, PhoneInput, PhoneInputField, PhoneInputNext, type PhoneInputNextProps, type PhoneInputProps, type PrimitiveMessageValues, ProgressPaper, type ProgressPaperProps, Radio, type RadioBaseWithLabelProps, RadioButton, RadioButtonGroup, RadioButtonGroupControl, type RadioButtonGroupControlProps, RadioButtonGroupField, type RadioButtonGroupFieldProps, type RadioButtonGroupItem, type RadioButtonGroupProps, type RadioButtonLabel, type RadioButtonProps, RadioField, type RadioFieldProps, type RadioLabel, RadioPosition, Select$1 as ReactSelect, SelectBase as ReactSelectBase, SelectField$1 as ReactSelectField, type SelectOption as ReactSelectOption, type SelectProps$1 as ReactSelectProps, ReasonForClosing, SearchInput, type SearchInputProps, Select, SelectControl, type SelectControlProps, SelectField, type SelectFieldProps, type SelectItem, type SelectItemOrder, SelectItemOrderSource, type SelectProps, 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, 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, type UseColorSchemeOptions, type UseColorSchemeParam, type UseDesignSystemOptions, type UseDesignSystemParam, type UseMediaTypeOptions, type UseMediaTypeParam, getColor, identityFormatter, isRenderable, resolveFieldWrapperHasError, resolveFontWeightValue, resolveOverflowValue, resolveSpacingValue, theme, useChooseColor, useColorScheme, useCreateTooltipFloatingElement, useDesignSystem, useFieldLabels, useFormatAmount, useFormattedPercentage, useIsMessageDisplayable, useMediaType, useMessageFormatter, useRegisterFieldLabel, withFieldWrapper, withMaskedInputField };
2011
+ export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionKeyValue, type AccordionProps, AccordionVariant, AsyncSelect as AsyncReactSelect, Button, type ButtonProps, ButtonSize, ButtonStyle, ButtonType, ButtonsLayout, ButtonsLayoutAlign, ButtonsLayoutDirection, type ButtonsLayoutProps, ButtonsLayoutWrap, 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, type FieldConfig, FieldConfigProvider, type FieldConfigProviderProps, type FieldControlProps, FieldLabelStoreProvider, type FieldLabelStoreProviderProps, FieldRequirement, FieldWrapper, FieldWrapperLayout, type FieldWrapperProps, type FieldWrapperValues, FontWeight, _default as FormattedAmount, FormattedHtmlMessage, type FormattedHtmlMessageProps, FormattedMessage, type FormattedMessageProps, _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, Loader, LoaderOverlayBox, type LoaderOverlayBoxProps, type LoaderProps, LoaderSize, MaskedInput, MaskedInputBase, type MaskedInputBaseProps, MaskedInputField, type MaskedInputProps, MediaType, MediaTypeProvider, type MediaTypeProviderProps, type MessageValues, Modal, type ModalOnClose, type ModalProps, ModalVerticalPosition, ModalWidthType, NumberInput, NumberInputField, type NumberInputProps, Overflow, Paper, type PaperProps, PaperShadow, PhoneInput, PhoneInputField, PhoneInputNext, type PhoneInputNextProps, type PhoneInputProps, type PrimitiveMessageValues, ProgressPaper, type ProgressPaperProps, Radio, type RadioBaseWithLabelProps, RadioButton, RadioButtonGroup, RadioButtonGroupControl, type RadioButtonGroupControlProps, RadioButtonGroupField, type RadioButtonGroupFieldProps, type RadioButtonGroupItem, type RadioButtonGroupProps, type RadioButtonLabel, type RadioButtonProps, RadioField, type RadioFieldProps, type RadioLabel, RadioPosition, Select$1 as ReactSelect, SelectBase as ReactSelectBase, SelectField$1 as ReactSelectField, type SelectOption as ReactSelectOption, type SelectProps$1 as ReactSelectProps, ReasonForClosing, SearchInput, type SearchInputProps, Select, SelectControl, type SelectControlProps, SelectField, type SelectFieldProps, type SelectItem, type SelectItemOrder, SelectItemOrderSource, type SelectProps, 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, 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, type UseColorSchemeOptions, type UseColorSchemeParam, type UseDesignSystemOptions, type UseDesignSystemParam, type UseMediaTypeOptions, type UseMediaTypeParam, getColor, identityFormatter, isRenderable, resolveFontWeightValue, resolveOverflowValue, resolveSpacingValue, theme, useChooseColor, useColorScheme, useCreateTooltipFloatingElement, useDesignSystem, useFieldConfig, useFieldLabels, useFormatAmount, useFormattedPercentage, useIsMessageDisplayable, useMediaType, useMessageFormatter, useRegisterFieldLabel, withFieldWrapper, withMaskedInputField };