@moda/om 17.14.2 → 18.0.0

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 (64) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/index.cjs.js +95 -135
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +95 -135
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/src/components/AspectRatioBox/AspectRatioBox.d.ts +1 -1
  7. package/dist/src/components/Badge/Badge.d.ts +2 -2
  8. package/dist/src/components/Breadcrumbs/Breadcrumb/Breadcrumb.d.ts +1 -1
  9. package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  10. package/dist/src/components/Breakpoint/Breakpoint.d.ts +4 -4
  11. package/dist/src/components/Breakpoint/BreakpointProvider.d.ts +1 -1
  12. package/dist/src/components/Breakpoint/generateMediaQuery.d.ts +2 -2
  13. package/dist/src/components/Button/Button.d.ts +1 -1
  14. package/dist/src/components/Checkbox/Checkbox.d.ts +2 -2
  15. package/dist/src/components/Clickable/Clickable.d.ts +3 -3
  16. package/dist/src/components/ColorSwatch/ColorSwatch.d.ts +2 -2
  17. package/dist/src/components/ColorSwatch/skuColors.d.ts +1 -1
  18. package/dist/src/components/Constrain/Constrain.d.ts +1 -1
  19. package/dist/src/components/Constrain/ExceedConstrain.d.ts +1 -1
  20. package/dist/src/components/ControlLink/ControlLink.d.ts +1 -1
  21. package/dist/src/components/CreditCardNumberInput/CreditCardNumberInput.d.ts +1 -1
  22. package/dist/src/components/CreditCardNumberInput/CreditCardNumberInputField.d.ts +1 -1
  23. package/dist/src/components/DefinitionList/DefinitionList.d.ts +1 -1
  24. package/dist/src/components/Divider/Divider.d.ts +1 -1
  25. package/dist/src/components/Expandable/Expandable.d.ts +1 -1
  26. package/dist/src/components/Field/Field.d.ts +1 -1
  27. package/dist/src/components/Label/Label.d.ts +1 -1
  28. package/dist/src/components/Loading/Loading.d.ts +1 -1
  29. package/dist/src/components/Modal/Modal.d.ts +1 -1
  30. package/dist/src/components/ModalOverlay/ModalOverlay.d.ts +1 -1
  31. package/dist/src/components/Overlay/Overlay.d.ts +1 -1
  32. package/dist/src/components/PasswordInput/PasswordInput.d.ts +1 -1
  33. package/dist/src/components/Popover/Popover.d.ts +1 -1
  34. package/dist/src/components/PromoBanner/PromoBanner.d.ts +1 -1
  35. package/dist/src/components/RadioButton/RadioButton.d.ts +1 -1
  36. package/dist/src/components/SearchInput/SearchInput.d.ts +1 -2
  37. package/dist/src/components/Select/MultiSelect.d.ts +1 -1
  38. package/dist/src/components/Select/Select.d.ts +2 -2
  39. package/dist/src/components/Select/SelectLabel.d.ts +1 -1
  40. package/dist/src/components/Select/SelectOption.d.ts +1 -1
  41. package/dist/src/components/Select/SelectOptions.d.ts +1 -1
  42. package/dist/src/components/Select/useSelect.d.ts +1 -1
  43. package/dist/src/components/SelectableButton/SelectableButton.d.ts +1 -1
  44. package/dist/src/components/Shape/Shape.d.ts +1 -1
  45. package/dist/src/components/SlidingPane/SlidingPane.d.ts +1 -1
  46. package/dist/src/components/Stack/Stack.d.ts +1 -1
  47. package/dist/src/components/Tabs/Tab.d.ts +2 -2
  48. package/dist/src/components/Tabs/TabList.d.ts +1 -1
  49. package/dist/src/components/Tabs/TabPanel.d.ts +1 -1
  50. package/dist/src/components/Tabs/TabPanels.d.ts +1 -1
  51. package/dist/src/components/Tabs/Tabs.d.ts +1 -1
  52. package/dist/src/components/Tag/Tag.d.ts +1 -1
  53. package/dist/src/components/Text/Text.d.ts +4 -4
  54. package/dist/src/components/TextInput/TextInput.d.ts +2 -2
  55. package/dist/src/components/Textarea/Textarea.d.ts +1 -1
  56. package/dist/src/components/Toast/Toast.d.ts +1 -1
  57. package/dist/src/components/VerticalDivider/VerticalDivider.d.ts +1 -1
  58. package/dist/src/hooks/useBreakpoint.d.ts +3 -3
  59. package/dist/src/hooks/useKeyboardListNavigation.d.ts +3 -3
  60. package/dist/src/utilities/States/isRenderProps.d.ts +1 -1
  61. package/package.json +2 -2
  62. package/src/components/SearchInput/SearchInput.stories.tsx +2 -6
  63. package/src/components/SearchInput/SearchInput.test.tsx +14 -0
  64. package/src/components/SearchInput/SearchInput.tsx +6 -13
@@ -3,7 +3,7 @@ import './AspectRatioBox.scss';
3
3
  export declare const DEFAULT_PRODUCT_ASPECT_WIDTH = 128;
4
4
  export declare const DEFAULT_PRODUCT_ASPECT_HEIGHT = 205;
5
5
  export declare const DEFAULT_PRODUCT_ASPECT_RATIO: number;
6
- export declare type AspectRatioBoxProps = React.HTMLAttributes<HTMLDivElement> & {
6
+ export type AspectRatioBoxProps = React.HTMLAttributes<HTMLDivElement> & {
7
7
  aspectWidth?: number;
8
8
  aspectHeight?: number;
9
9
  maxWidth: number;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './Badge.scss';
3
- export declare type BadgeTheme = 'forest-green' | 'klein-blue' | 'brick' | 'dark-fuchsia' | 'noise';
4
- export declare type BadgeProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
3
+ export type BadgeTheme = 'forest-green' | 'klein-blue' | 'brick' | 'dark-fuchsia' | 'noise';
4
+ export type BadgeProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
5
5
  theme?: BadgeTheme;
6
6
  };
7
7
  export declare const Badge: React.FC<BadgeProps>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ControlLinkProps } from '../../ControlLink';
3
3
  import './Breadcrumb.scss';
4
- export declare type BreadcrumbProps = ControlLinkProps & {
4
+ export type BreadcrumbProps = ControlLinkProps & {
5
5
  position?: number;
6
6
  to?: string;
7
7
  href?: string;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import './Breadcrumbs.scss';
3
- export declare type BreadcrumbsProps = React.OlHTMLAttributes<HTMLOListElement>;
3
+ export type BreadcrumbsProps = React.OlHTMLAttributes<HTMLOListElement>;
4
4
  export declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
@@ -1,14 +1,14 @@
1
1
  import React, { HTMLAttributes } from 'react';
2
2
  import './Breakpoint.scss';
3
- declare type At = {
3
+ type At = {
4
4
  at: string;
5
5
  };
6
- declare type GreaterThan = {
6
+ type GreaterThan = {
7
7
  gt: string;
8
8
  };
9
- declare type LessThan = {
9
+ type LessThan = {
10
10
  lt: string;
11
11
  };
12
- export declare type BreakpointProps = (At | GreaterThan | LessThan) & HTMLAttributes<HTMLDivElement>;
12
+ export type BreakpointProps = (At | GreaterThan | LessThan) & HTMLAttributes<HTMLDivElement>;
13
13
  export declare const Breakpoint: React.FC<BreakpointProps>;
14
14
  export {};
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type BreakpointProviderProps = {
2
+ export type BreakpointProviderProps = {
3
3
  /**
4
4
  * `defaultWidth` controls the behavior of `useBreakpoint` and `Breakpoint` on the initial render
5
5
  * possible values are:
@@ -1,6 +1,6 @@
1
1
  import { breakpoints } from '@moda/tokens';
2
- export declare type Mode = 'at' | 'gt' | 'lt';
3
- export declare type Breakpoint = keyof typeof breakpoints;
2
+ export type Mode = 'at' | 'gt' | 'lt';
3
+ export type Breakpoint = keyof typeof breakpoints;
4
4
  export interface GenerateMediaQuery {
5
5
  mode: Mode;
6
6
  breakpoint: Breakpoint;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ClickableProps } from '../Clickable';
3
3
  import './Button.scss';
4
- export declare type ButtonProps = {
4
+ export type ButtonProps = {
5
5
  secondary?: boolean;
6
6
  tertiary?: boolean;
7
7
  elevated?: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './Checkbox.scss';
3
- export declare type ShowCheckedUsing = 'checkmark' | 'circle';
4
- export declare type CheckboxProps = React.InputHTMLAttributes<HTMLInputElement> & {
3
+ export type ShowCheckedUsing = 'checkmark' | 'circle';
4
+ export type CheckboxProps = React.InputHTMLAttributes<HTMLInputElement> & {
5
5
  children?: JSX.Element | string;
6
6
  checkIcon?: ShowCheckedUsing;
7
7
  dataTestId?: string;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { LinkProps } from 'react-router-dom';
3
3
  import './Clickable.scss';
4
- declare type ButtonElProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
5
- declare type AnchorElProps = React.AnchorHTMLAttributes<HTMLAnchorElement>;
6
- export declare type ClickableProps = {
4
+ type ButtonElProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
5
+ type AnchorElProps = React.AnchorHTMLAttributes<HTMLAnchorElement>;
6
+ export type ClickableProps = {
7
7
  disabled?: boolean;
8
8
  styleless?: boolean;
9
9
  } & (ButtonElProps | AnchorElProps | LinkProps);
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { SkuColor } from './skuColors';
3
3
  import './ColorSwatch.scss';
4
- export declare type ColorSwatchSize = 'default' | 'small';
5
- export declare type ColorSwatchProps = Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>, 'onMouseEnter'> & {
4
+ export type ColorSwatchSize = 'default' | 'small';
5
+ export type ColorSwatchProps = Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>, 'onMouseEnter'> & {
6
6
  size?: ColorSwatchSize;
7
7
  color: SkuColor | string;
8
8
  backgroundUrl?: string;
@@ -50,4 +50,4 @@ export declare const SKU_COLORS: {
50
50
  white: string;
51
51
  yellow: string;
52
52
  };
53
- export declare type SkuColor = keyof typeof SKU_COLORS;
53
+ export type SkuColor = keyof typeof SKU_COLORS;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import './Constrain.scss';
3
- export declare type ConstrainProps = React.HTMLAttributes<HTMLDivElement>;
3
+ export type ConstrainProps = React.HTMLAttributes<HTMLDivElement>;
4
4
  export declare const Constrain: React.FC<ConstrainProps>;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import './ExceedConstrain.scss';
3
- export declare type ExceedConstrainProps = React.HTMLAttributes<HTMLDivElement>;
3
+ export type ExceedConstrainProps = React.HTMLAttributes<HTMLDivElement>;
4
4
  export declare const ExceedConstrain: React.FC<ExceedConstrainProps>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ClickableProps } from '../Clickable';
3
3
  import './ControlLink.scss';
4
- export declare type ControlLinkProps = ClickableProps & {
4
+ export type ControlLinkProps = ClickableProps & {
5
5
  disabled?: boolean;
6
6
  underlined?: boolean;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Props as InputMaskProps } from 'react-input-mask';
3
3
  import { FieldProps } from '../Field';
4
- export declare type CreditCardNumberInputProps = Omit<InputMaskProps & FieldProps, 'mask' | 'value' | 'defaultValue'> & {
4
+ export type CreditCardNumberInputProps = Omit<InputMaskProps & FieldProps, 'mask' | 'value' | 'defaultValue'> & {
5
5
  value?: string;
6
6
  defaultValue?: string;
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FieldProps } from '../Field';
3
- export declare type CreditCardNumberInputFieldProps = Omit<FieldProps, 'onChange'> & {
3
+ export type CreditCardNumberInputFieldProps = Omit<FieldProps, 'onChange'> & {
4
4
  onChange?: React.ChangeEventHandler<HTMLInputElement>;
5
5
  };
6
6
  export declare const CreditCardNumberInputField: React.FC<CreditCardNumberInputFieldProps>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './DefinitionList.scss';
3
- export declare type DefinitionListProps = React.HTMLAttributes<HTMLDListElement> & {
3
+ export type DefinitionListProps = React.HTMLAttributes<HTMLDListElement> & {
4
4
  term: string;
5
5
  children: React.ReactNode;
6
6
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { TextTreatment, TextColor, TextFontFamily } from '../Text';
3
3
  import './Divider.scss';
4
- export declare type DividerProps = React.HTMLAttributes<HTMLDivElement> & {
4
+ export type DividerProps = React.HTMLAttributes<HTMLDivElement> & {
5
5
  text?: string;
6
6
  treatment?: TextTreatment;
7
7
  color?: TextColor;
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import './Expandable.scss';
3
- export declare type ExpandableProps = React.HTMLAttributes<HTMLDivElement> & {
3
+ export type ExpandableProps = React.HTMLAttributes<HTMLDivElement> & {
4
4
  name: string | ReactNode;
5
5
  defaultExpanded?: boolean;
6
6
  expanded?: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { TextInputProps } from '../TextInput';
3
3
  import './Field.scss';
4
- export declare type FieldProps = TextInputProps & {
4
+ export type FieldProps = TextInputProps & {
5
5
  children?: JSX.Element;
6
6
  };
7
7
  export declare const Field: React.ForwardRefExoticComponent<import("../TextInput").InputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> & {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './Label.scss';
3
- export declare type LabelProps = React.LabelHTMLAttributes<HTMLLabelElement> & {
3
+ export type LabelProps = React.LabelHTMLAttributes<HTMLLabelElement> & {
4
4
  hidden?: boolean;
5
5
  };
6
6
  export declare const Label: React.FC<LabelProps>;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import './Loading.scss';
3
- export declare type LoadingProps = React.HTMLAttributes<HTMLDivElement>;
3
+ export type LoadingProps = React.HTMLAttributes<HTMLDivElement>;
4
4
  export declare const Loading: React.FC<LoadingProps>;
@@ -1,7 +1,7 @@
1
1
  import React, { ComponentProps } from 'react';
2
2
  import { FocusOn } from 'react-focus-on';
3
3
  import './Modal.scss';
4
- export declare type ModalProps = React.HTMLAttributes<HTMLDivElement> & {
4
+ export type ModalProps = React.HTMLAttributes<HTMLDivElement> & {
5
5
  onClose(): void;
6
6
  shards?: ComponentProps<typeof FocusOn>['shards'];
7
7
  autoFocus?: boolean;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { ModalProps } from '../Modal';
3
3
  import { OverlayProps } from '../Overlay';
4
4
  import './ModalOverlay.scss';
5
- export declare type ModalOverlayProps = ModalProps & OverlayProps & {
5
+ export type ModalOverlayProps = ModalProps & OverlayProps & {
6
6
  overlayClassName?: string;
7
7
  contentClassName?: string;
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './Overlay.scss';
3
3
  export declare const UNMOUNT_DELAY_MS = 500;
4
- export declare type OverlayProps = React.HTMLAttributes<HTMLDivElement> & {
4
+ export type OverlayProps = React.HTMLAttributes<HTMLDivElement> & {
5
5
  show?: boolean;
6
6
  };
7
7
  export declare const Overlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { FieldProps } from '../Field';
3
3
  import './PasswordInput.scss';
4
- export declare type PasswordInputProps = FieldProps;
4
+ export type PasswordInputProps = FieldProps;
5
5
  export declare const PasswordInput: React.ForwardRefExoticComponent<import("..").InputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> & {
6
6
  children?: JSX.Element | undefined;
7
7
  } & React.RefAttributes<HTMLInputElement>>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './Popover.scss';
3
- export declare type PopoverProps = React.HTMLAttributes<HTMLDivElement> & {
3
+ export type PopoverProps = React.HTMLAttributes<HTMLDivElement> & {
4
4
  content: JSX.Element;
5
5
  children: JSX.Element;
6
6
  open?: boolean;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './PromoBanner.scss';
3
- export declare type PromoBannerProps = React.HTMLAttributes<HTMLDivElement> & {
3
+ export type PromoBannerProps = React.HTMLAttributes<HTMLDivElement> & {
4
4
  children: JSX.Element | [JSX.Element, JSX.Element] | [JSX.Element, JSX.Element, JSX.Element];
5
5
  };
6
6
  export declare const PromoBanner: React.FC<PromoBannerProps>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './RadioButton.scss';
3
- export declare type RadioButtonProps = React.InputHTMLAttributes<HTMLInputElement> & {
3
+ export type RadioButtonProps = React.InputHTMLAttributes<HTMLInputElement> & {
4
4
  children?: JSX.Element | string;
5
5
  };
6
6
  export declare const RadioButton: React.FC<RadioButtonProps>;
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import { TextInputProps } from '../TextInput';
3
3
  import './SearchInput.scss';
4
- export declare type SearchInputProps = TextInputProps & {
4
+ export type SearchInputProps = TextInputProps & {
5
5
  value?: string;
6
6
  onClear?(): void;
7
- onChangeValue?(value: string): void;
8
7
  };
9
8
  export declare const SearchInput: React.FC<SearchInputProps>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SelectableOption } from '.';
3
3
  import './MultiSelect.scss';
4
- declare type Props = Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'value' | 'onChange'> & {
4
+ type Props = Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'value' | 'onChange'> & {
5
5
  defaultValue?: string[] | undefined;
6
6
  disabled?: boolean;
7
7
  dropDirection?: 'down' | 'up';
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import './Select.scss';
3
- export declare type SelectableOption = {
3
+ export type SelectableOption = {
4
4
  value: string;
5
5
  label: string;
6
6
  disabled?: boolean;
7
7
  };
8
- export declare type SelectProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'value' | 'onChange'> & {
8
+ export type SelectProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'value' | 'onChange'> & {
9
9
  allowAutoFill?: boolean;
10
10
  autoSelect?: boolean;
11
11
  defaultValue?: string | undefined;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type SelectLabelProps = React.LabelHTMLAttributes<HTMLLabelElement> & {
2
+ export type SelectLabelProps = React.LabelHTMLAttributes<HTMLLabelElement> & {
3
3
  idRef?: string;
4
4
  label?: string;
5
5
  hasValue: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SelectableOption } from './Select';
3
3
  import './SelectOption.scss';
4
- export declare type SelectOptionProps = Omit<React.HTMLAttributes<HTMLLIElement>, 'onClick'> & {
4
+ export type SelectOptionProps = Omit<React.HTMLAttributes<HTMLLIElement>, 'onClick'> & {
5
5
  active: boolean;
6
6
  selected: boolean;
7
7
  option: SelectableOption;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SelectableOption } from './Select';
3
3
  import './SelectOptions.scss';
4
- export declare type SelectOptionsProps = Omit<React.HTMLAttributes<HTMLUListElement>, 'onSelect' | 'onFocus'> & {
4
+ export type SelectOptionsProps = Omit<React.HTMLAttributes<HTMLUListElement>, 'onSelect' | 'onFocus'> & {
5
5
  idRef: string;
6
6
  searchable?: boolean;
7
7
  autoFocus?: boolean;
@@ -3,7 +3,7 @@ declare enum Mode {
3
3
  Resting = 0,
4
4
  Open = 1
5
5
  }
6
- declare type Action = {
6
+ type Action = {
7
7
  type: 'OPEN';
8
8
  } | {
9
9
  type: 'CLOSE';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ClickableProps } from '../Clickable';
3
3
  import './SelectableButton.scss';
4
- export declare type SelectableButtonProps = ClickableProps & {
4
+ export type SelectableButtonProps = ClickableProps & {
5
5
  hover?: boolean;
6
6
  selected?: boolean;
7
7
  unavailable?: boolean;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare type ShapeProps = React.HTMLAttributes<HTMLOrSVGElement>;
2
+ export type ShapeProps = React.HTMLAttributes<HTMLOrSVGElement>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './SlidingPane.scss';
3
- export declare type SlidingPaneProps = React.HTMLAttributes<HTMLDivElement> & {
3
+ export type SlidingPaneProps = React.HTMLAttributes<HTMLDivElement> & {
4
4
  children: React.ReactNode;
5
5
  title: string;
6
6
  visible: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './Stack.scss';
3
3
  import * as CSS from 'csstype';
4
- export declare type StackProps = React.HTMLAttributes<HTMLDivElement> & {
4
+ export type StackProps = React.HTMLAttributes<HTMLDivElement> & {
5
5
  space: number;
6
6
  direction?: 'vertical' | 'horizontal';
7
7
  alignItems?: CSS.Properties['alignItems'];
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import './Tab.scss';
3
- export declare type Tab = {
3
+ export type Tab = {
4
4
  name: string;
5
5
  title: string;
6
6
  panel: JSX.Element;
7
7
  };
8
- export declare type TabProps = {
8
+ export type TabProps = {
9
9
  tab: Tab;
10
10
  activeTab: string;
11
11
  onTabChosen(tabName: string): void;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Tab } from '.';
3
3
  import './TabList.scss';
4
- export declare type TabListProps = {
4
+ export type TabListProps = {
5
5
  tabs: Tab[];
6
6
  onTabSelected(tabName: string): void;
7
7
  activePanel: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './TabPanel.scss';
3
- export declare type TabPanelProps = {
3
+ export type TabPanelProps = {
4
4
  children: React.ReactNode;
5
5
  };
6
6
  export declare const TabPanel: React.FC<TabPanelProps>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Tab } from '.';
3
3
  import './TabPanels.scss';
4
- export declare type TabPanelsProps = {
4
+ export type TabPanelsProps = {
5
5
  panels: Tab[];
6
6
  activePanel: string;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Tab } from '.';
3
3
  import './Tabs.scss';
4
- export declare type TabsProps = React.HTMLAttributes<HTMLDivElement> & {
4
+ export type TabsProps = React.HTMLAttributes<HTMLDivElement> & {
5
5
  tabs: Tab[];
6
6
  onTabClicked?: (tabName: string) => void;
7
7
  activeTab?: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './Tag.scss';
3
- export declare type TagProps = {
3
+ export type TagProps = {
4
4
  disabled?: boolean;
5
5
  onRemove?: () => void;
6
6
  } & React.HTMLAttributes<HTMLDivElement>;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { typography, colors } from '@moda/tokens';
3
3
  import './Text.scss';
4
- export declare type TextTreatment = keyof typeof typography['text-treatments'];
5
- export declare type TextColor = keyof typeof colors.all;
6
- export declare type TextFontFamily = keyof typeof typography.fonts;
7
- export declare type TextProps = React.HTMLAttributes<HTMLSpanElement> & {
4
+ export type TextTreatment = keyof typeof typography['text-treatments'];
5
+ export type TextColor = keyof typeof colors.all;
6
+ export type TextFontFamily = keyof typeof typography.fonts;
7
+ export type TextProps = React.HTMLAttributes<HTMLSpanElement> & {
8
8
  treatment?: TextTreatment;
9
9
  color?: TextColor;
10
10
  family?: TextFontFamily;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './TextInput.scss';
3
- export declare type InputProps = {
3
+ export type InputProps = {
4
4
  disabled?: boolean;
5
5
  error?: boolean | string;
6
6
  focus?: boolean;
@@ -8,5 +8,5 @@ export declare type InputProps = {
8
8
  onChange?: (value: string) => void;
9
9
  onChangeEvent?: (event: React.ChangeEvent<HTMLInputElement>) => void;
10
10
  };
11
- export declare type TextInputProps = InputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>;
11
+ export type TextInputProps = InputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>;
12
12
  export declare const TextInput: React.ForwardRefExoticComponent<InputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { InputProps } from '../TextInput';
3
3
  import './Textarea.scss';
4
- export declare type TextareaProps = InputProps & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>;
4
+ export type TextareaProps = InputProps & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>;
5
5
  export declare const Textarea: React.ForwardRefExoticComponent<InputProps & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> & React.RefAttributes<HTMLTextAreaElement>>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { StackProps } from '../Stack';
3
3
  import './Toast.scss';
4
- export declare type ToastProps = {
4
+ export type ToastProps = {
5
5
  theme: 'success' | 'warning' | 'error';
6
6
  onRemove?: () => void;
7
7
  } & Omit<StackProps, 'direction' | 'space'>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './VerticalDivider.scss';
3
- export declare type VerticalDividerProps = {
3
+ export type VerticalDividerProps = {
4
4
  double?: boolean;
5
5
  } & React.HTMLAttributes<HTMLDivElement>;
6
6
  export declare const VerticalDivider: React.FC<VerticalDividerProps>;
@@ -1,11 +1,11 @@
1
1
  import { Mode as ModeType, Breakpoint as BreakpointType } from '../components/Breakpoint/generateMediaQuery';
2
- declare type At = {
2
+ type At = {
3
3
  at: string;
4
4
  };
5
- declare type GreaterThan = {
5
+ type GreaterThan = {
6
6
  gt: string;
7
7
  };
8
- declare type LessThan = {
8
+ type LessThan = {
9
9
  lt: string;
10
10
  };
11
11
  export declare const discriminate: (props: At | GreaterThan | LessThan) => {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare type UseKeyboardListNavigationAction = {
2
+ export type UseKeyboardListNavigationAction = {
3
3
  type: 'RESET';
4
4
  payload: {
5
5
  defaultCursor: number;
@@ -20,12 +20,12 @@ export declare type UseKeyboardListNavigationAction = {
20
20
  cursor: number;
21
21
  };
22
22
  };
23
- export declare type UseKeyboardListNavigationState = {
23
+ export type UseKeyboardListNavigationState = {
24
24
  cursor: number;
25
25
  length: number;
26
26
  interactive: boolean;
27
27
  };
28
- export declare type UseKeyboardListNavigationProps<T> = {
28
+ export type UseKeyboardListNavigationProps<T> = {
29
29
  list: T[];
30
30
  defaultSelected?: T;
31
31
  waitForInteractive?: boolean;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare type RenderProps = {
2
+ export type RenderProps = {
3
3
  (props: any): JSX.Element;
4
4
  };
5
5
  export declare const isRenderProps: (children: JSX.Element | RenderProps) => children is RenderProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda/om",
3
- "version": "17.14.2",
3
+ "version": "18.0.0",
4
4
  "description": "Moda Operandi design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -141,7 +141,7 @@
141
141
  "typescript": "^4.0.2",
142
142
  "waait": "^1.0.5",
143
143
  "webpack": "^5.72.1",
144
- "webpack-cli": "^4.0.0"
144
+ "webpack-cli": "^5.0.0"
145
145
  },
146
146
  "config": {
147
147
  "commitizen": {
@@ -8,11 +8,7 @@ export default { title: 'Components/SearchInput' };
8
8
 
9
9
  export const Default = () => (
10
10
  <States<SearchInputProps> states={[{}, { value: 'prada' }, { autoFocus: true }]}>
11
- <SearchInput
12
- placeholder='Search'
13
- onChange={action('onChange')}
14
- onChangeValue={action('onChangeValue')}
15
- />
11
+ <SearchInput placeholder='Search' onChange={action('onChange')} />
16
12
  </States>
17
13
  );
18
14
 
@@ -34,7 +30,7 @@ export const DropdownExample = () => {
34
30
 
35
31
  return (
36
32
  <div style={{ display: 'flex', flexDirection: 'column' }}>
37
- <SearchInput placeholder='Search' onChangeValue={setQuery} value={query} autoFocus />
33
+ <SearchInput placeholder='Search' onChange={setQuery} value={query} autoFocus />
38
34
 
39
35
  {query && (
40
36
  <Text style={{ border: '1px solid gray', marginTop: '-1px', padding: '1rem' }}>