@moda/om 17.8.0 → 17.9.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 (102) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/index.cjs.js +4595 -4555
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +4595 -4555
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/src/components/Breakpoint/Breakpoint.d.ts +2 -4
  7. package/package.json +1 -1
  8. package/src/components/AspectRatioBox/AspectRatioBox.tsx +2 -2
  9. package/src/components/Badge/Badge.stories.tsx +6 -6
  10. package/src/components/Badge/Badge.test.tsx +1 -1
  11. package/src/components/Breadcrumbs/Breadcrumb/Breadcrumb.tsx +6 -6
  12. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +6 -6
  13. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +2 -2
  14. package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  15. package/src/components/Breakpoint/Breakpoint.stories.tsx +9 -9
  16. package/src/components/Breakpoint/Breakpoint.test.tsx +2 -2
  17. package/src/components/Breakpoint/Breakpoint.tsx +11 -4
  18. package/src/components/Button/Button.stories.tsx +2 -2
  19. package/src/components/Checkbox/Checkbox.stories.tsx +4 -4
  20. package/src/components/Checkbox/Checkbox.test.tsx +3 -3
  21. package/src/components/Checkbox/Checkbox.tsx +4 -4
  22. package/src/components/Clickable/Clickable.stories.tsx +2 -2
  23. package/src/components/ColorSwatch/ColorSwatch.stories.tsx +11 -11
  24. package/src/components/ColorSwatch/ColorSwatch.test.tsx +1 -1
  25. package/src/components/ColorSwatch/ColorSwatch.tsx +1 -1
  26. package/src/components/Constrain/Constrain.stories.tsx +1 -1
  27. package/src/components/Constrain/ExceedConstrain.stories.tsx +2 -2
  28. package/src/components/CreditCardNumberInput/CreditCardNumberInput.stories.tsx +1 -1
  29. package/src/components/CreditCardNumberInput/CreditCardNumberInput.test.tsx +4 -4
  30. package/src/components/DefinitionList/DefinitionList.stories.tsx +2 -2
  31. package/src/components/DefinitionList/DefinitionList.test.tsx +1 -1
  32. package/src/components/Divider/Divider.stories.tsx +3 -3
  33. package/src/components/Divider/Divider.test.tsx +1 -1
  34. package/src/components/Divider/Divider.tsx +1 -1
  35. package/src/components/Divider/NoLineDivider.tsx +1 -1
  36. package/src/components/Divider/TwoLineDivider.tsx +1 -1
  37. package/src/components/Expandable/Expandable.stories.tsx +9 -9
  38. package/src/components/Expandable/Expandable.test.tsx +1 -1
  39. package/src/components/Expandable/Expandable.tsx +3 -3
  40. package/src/components/Field/Field.stories.tsx +2 -2
  41. package/src/components/Field/Field.test.tsx +6 -6
  42. package/src/components/Field/Field.tsx +5 -5
  43. package/src/components/Loading/Loading.test.tsx +1 -1
  44. package/src/components/LoadingBalls/LoadingBalls.tsx +28 -28
  45. package/src/components/Modal/Modal.test.tsx +2 -2
  46. package/src/components/ModalOverlay/ModalOverlay.test.tsx +2 -2
  47. package/src/components/Paginator/Paginator.tsx +3 -3
  48. package/src/components/PasswordInput/PasswordInput.stories.tsx +1 -1
  49. package/src/components/PasswordInput/PasswordInput.tsx +6 -6
  50. package/src/components/Popover/Popover.stories.tsx +1 -1
  51. package/src/components/Popover/Popover.tsx +3 -3
  52. package/src/components/PromoBanner/PromoBanner.stories.tsx +9 -9
  53. package/src/components/PromoBanner/PromoBanner.tsx +1 -1
  54. package/src/components/RadioButton/RadioButton.stories.tsx +1 -1
  55. package/src/components/RadioButton/RadioButton.tsx +4 -4
  56. package/src/components/SearchInput/SearchInput.stories.tsx +2 -2
  57. package/src/components/SearchInput/SearchInput.test.tsx +1 -1
  58. package/src/components/SearchInput/SearchInput.tsx +3 -3
  59. package/src/components/Select/MultiSelect.tsx +5 -5
  60. package/src/components/Select/Select.stories.tsx +9 -9
  61. package/src/components/Select/Select.test.tsx +13 -13
  62. package/src/components/Select/Select.tsx +7 -7
  63. package/src/components/Select/SelectOption.tsx +1 -1
  64. package/src/components/Select/SelectOptions.tsx +5 -5
  65. package/src/components/Shape/ArcWindow.tsx +10 -10
  66. package/src/components/Shape/Bradley.tsx +3 -3
  67. package/src/components/Shape/Brancusi.tsx +3 -3
  68. package/src/components/Shape/Circle.tsx +10 -10
  69. package/src/components/Shape/Diamond.tsx +10 -10
  70. package/src/components/Shape/Keyhole.tsx +3 -3
  71. package/src/components/Shape/Mirror.tsx +3 -3
  72. package/src/components/Shape/Oval.tsx +3 -3
  73. package/src/components/Shape/Triangle.tsx +7 -7
  74. package/src/components/Shape/Window.tsx +3 -3
  75. package/src/components/SlidingPane/SlidingPane.stories.tsx +3 -3
  76. package/src/components/SlidingPane/SlidingPane.tsx +6 -6
  77. package/src/components/Stack/Stack.test.tsx +1 -1
  78. package/src/components/Tabs/TabList.tsx +1 -1
  79. package/src/components/Tabs/TabPanel.tsx +1 -1
  80. package/src/components/Tabs/TabPanels.tsx +1 -1
  81. package/src/components/Tabs/Tabs.stories.tsx +2 -2
  82. package/src/components/Tabs/Tabs.test.tsx +2 -2
  83. package/src/components/Tag/Tag.tsx +1 -1
  84. package/src/components/Text/Text.stories.tsx +5 -5
  85. package/src/components/Text/Text.test.tsx +1 -1
  86. package/src/components/TextInput/TextInput.stories.tsx +1 -1
  87. package/src/components/TextInput/TextInput.test.tsx +1 -1
  88. package/src/components/Textarea/Textarea.stories.tsx +1 -1
  89. package/src/components/Textarea/Textarea.test.tsx +3 -3
  90. package/src/components/Toast/Toast.stories.tsx +1 -1
  91. package/src/components/Toast/Toast.test.tsx +1 -1
  92. package/src/components/Toast/Toast.tsx +5 -5
  93. package/src/components/VerticalDivider/VerticalDivider.stories.tsx +2 -2
  94. package/src/components/VerticalDivider/VerticalDivider.test.tsx +2 -2
  95. package/src/mixins/font-smoothing/font-smoothing.stories.tsx +8 -8
  96. package/src/mixins/overflow-scroll/overflow-scroll.stories.tsx +2 -2
  97. package/src/mixins/stack/stack.stories.tsx +2 -2
  98. package/src/mixins/thin-underline/thin-underline.stories.tsx +1 -1
  99. package/src/mixins/visually-hidden/visually-hidden.stories.tsx +1 -1
  100. package/src/utilities/States/State.tsx +2 -2
  101. package/src/utilities/States/States.tsx +1 -1
  102. package/src/utilities/States/StatesProps.tsx +1 -1
@@ -5,14 +5,14 @@ import { Textarea } from './Textarea';
5
5
 
6
6
  describe('Textarea', () => {
7
7
  it('renders correctly', () => {
8
- render(<Textarea placeholder="Placeholder" defaultValue="Hello" />);
8
+ render(<Textarea placeholder='Placeholder' defaultValue='Hello' />);
9
9
 
10
10
  expect(screen.getByRole('textbox')).toHaveValue('Hello');
11
11
  expect(screen.getByRole('textbox')).toHaveAttribute('placeholder', 'Placeholder');
12
12
  });
13
13
 
14
14
  it('renders with an error', () => {
15
- render(<Textarea placeholder="Placeholder" defaultValue="Hello" label="Label" error="Error" />);
15
+ render(<Textarea placeholder='Placeholder' defaultValue='Hello' label='Label' error='Error' />);
16
16
 
17
17
  expect(screen.getByRole('textbox')).toHaveValue('Hello');
18
18
  expect(screen.getByRole('textbox')).toHaveClass('Textarea--error');
@@ -20,7 +20,7 @@ describe('Textarea', () => {
20
20
 
21
21
  it('renders with a className', () => {
22
22
  render(
23
- <Textarea className="Custom" placeholder="Placeholder" defaultValue="Hello" label="Label" />
23
+ <Textarea className='Custom' placeholder='Placeholder' defaultValue='Hello' label='Label' />
24
24
  );
25
25
 
26
26
  expect(screen.getByRole('textbox')).toHaveValue('Hello');
@@ -7,7 +7,7 @@ export default { title: 'Components/Toast' };
7
7
 
8
8
  export const Default = () => (
9
9
  <States<ToastProps> states={[{ theme: 'success' }, { theme: 'warning' }, { theme: 'error' }]}>
10
- <Toast theme="success" onRemove={() => action('removed')}>
10
+ <Toast theme='success' onRemove={() => action('removed')}>
11
11
  This is a toast notification.
12
12
  </Toast>
13
13
  </States>
@@ -7,7 +7,7 @@ describe('Toast', () => {
7
7
  it('works correctly', async () => {
8
8
  const onRemove = jest.fn();
9
9
  render(
10
- <Toast theme="success" onRemove={onRemove}>
10
+ <Toast theme='success' onRemove={onRemove}>
11
11
  Hello
12
12
  </Toast>
13
13
  );
@@ -14,17 +14,17 @@ export type ToastProps = {
14
14
  export const Toast: React.FC<ToastProps> = ({ theme, className, onRemove, children, ...rest }) => (
15
15
  <Stack
16
16
  className={classNames('Toast', `Toast--${theme}`, className)}
17
- direction="horizontal"
17
+ direction='horizontal'
18
18
  space={2}
19
- alignItems="center"
20
- justifyContent="space-between"
19
+ alignItems='center'
20
+ justifyContent='space-between'
21
21
  {...rest}
22
22
  >
23
- <Text treatment="bold1" color="snow">
23
+ <Text treatment='bold1' color='snow'>
24
24
  {children}
25
25
  </Text>
26
26
  {onRemove && (
27
- <Clickable aria-label="Remove" onClick={onRemove}>
27
+ <Clickable aria-label='Remove' onClick={onRemove}>
28
28
  <ExitIcon />
29
29
  </Clickable>
30
30
  )}
@@ -8,7 +8,7 @@ export default { title: 'Components/VerticalDivider' };
8
8
 
9
9
  export const Default = () => (
10
10
  <States>
11
- <Stack direction="horizontal" space={4}>
11
+ <Stack direction='horizontal' space={4}>
12
12
  <div> Lorem ipsum dolor sit amet</div>
13
13
 
14
14
  <VerticalDivider />
@@ -20,7 +20,7 @@ export const Default = () => (
20
20
 
21
21
  export const Double = () => (
22
22
  <States>
23
- <Stack direction="horizontal" space={4}>
23
+ <Stack direction='horizontal' space={4}>
24
24
  <div> Lorem ipsum dolor sit amet</div>
25
25
 
26
26
  <VerticalDivider double />
@@ -5,13 +5,13 @@ import { VerticalDivider } from './VerticalDivider';
5
5
 
6
6
  describe('VerticalDivider', () => {
7
7
  it('renders correctly', () => {
8
- render(<VerticalDivider aria-label="Divider" />);
8
+ render(<VerticalDivider aria-label='Divider' />);
9
9
 
10
10
  expect(screen.getByLabelText('Divider')).toBeVisible();
11
11
  });
12
12
 
13
13
  it('renders correctly - double', () => {
14
- render(<VerticalDivider aria-label="Divider" double />);
14
+ render(<VerticalDivider aria-label='Divider' double />);
15
15
 
16
16
  expect(screen.getByLabelText('Divider')).toBeVisible();
17
17
  expect(screen.getByLabelText('Divider')).toHaveClass('VerticalDivider--double');
@@ -9,22 +9,22 @@ export default { title: 'Mixins/font-smoothing' };
9
9
 
10
10
  export const Default = () => (
11
11
  <Stack space={3}>
12
- <div className="Story Mixins font-smoothing--antialiased">
13
- <Text treatment="eyebrow">@include font-smoothing(antialiased);</Text>
12
+ <div className='Story Mixins font-smoothing--antialiased'>
13
+ <Text treatment='eyebrow'>@include font-smoothing(antialiased);</Text>
14
14
  </div>
15
15
 
16
- <div className="Story Mixins font-smoothing--subpixel">
17
- <Text treatment="eyebrow">@include font-smoothing(subpixel);</Text>
16
+ <div className='Story Mixins font-smoothing--subpixel'>
17
+ <Text treatment='eyebrow'>@include font-smoothing(subpixel);</Text>
18
18
  </div>
19
19
 
20
- <div className="Story Mixins font-smoothing--antialiased" style={{ backgroundColor: 'black' }}>
21
- <Text color="snow" treatment="eyebrow">
20
+ <div className='Story Mixins font-smoothing--antialiased' style={{ backgroundColor: 'black' }}>
21
+ <Text color='snow' treatment='eyebrow'>
22
22
  @include font-smoothing(antialiased);
23
23
  </Text>
24
24
  </div>
25
25
 
26
- <div className="Story Mixins font-smoothing--subpixel" style={{ backgroundColor: 'black' }}>
27
- <Text color="snow" treatment="eyebrow">
26
+ <div className='Story Mixins font-smoothing--subpixel' style={{ backgroundColor: 'black' }}>
27
+ <Text color='snow' treatment='eyebrow'>
28
28
  @include font-smoothing(subpixel);
29
29
  </Text>
30
30
  </div>
@@ -5,9 +5,9 @@ import './overflow-scroll.stories.scss';
5
5
  export default { title: 'Mixins/overflow-scroll' };
6
6
 
7
7
  export const Default = () => (
8
- <div className="Story Mixins overflow-scroll">Overflowed on the y axis!</div>
8
+ <div className='Story Mixins overflow-scroll'>Overflowed on the y axis!</div>
9
9
  );
10
10
 
11
11
  export const OverflowX = () => (
12
- <div className="Story Mixins overflow-scroll-x">Overflowed on the x axis!</div>
12
+ <div className='Story Mixins overflow-scroll-x'>Overflowed on the x axis!</div>
13
13
  );
@@ -7,7 +7,7 @@ import './stack.stories.scss';
7
7
  export default { title: 'Mixins/stack' };
8
8
 
9
9
  export const Default = () => (
10
- <div className="Story Mixins stack">
10
+ <div className='Story Mixins stack'>
11
11
  <p>Defaults to $space: 4 === {space.scale[4]}</p>
12
12
 
13
13
  <span>Notice the different element tags</span>
@@ -17,7 +17,7 @@ export const Default = () => (
17
17
  );
18
18
 
19
19
  export const Horizontal = () => (
20
- <div className="Story Mixins stack stack--horizontal">
20
+ <div className='Story Mixins stack stack--horizontal'>
21
21
  <p>Accepts $direction: horizontal</p>
22
22
 
23
23
  <span>Notice the different element tags</span>
@@ -4,4 +4,4 @@ import './thin-underline.stories.scss';
4
4
 
5
5
  export default { title: 'Mixins/thin-underline' };
6
6
 
7
- export const Default = () => <div className="Story Mixins thin-underline">Hello</div>;
7
+ export const Default = () => <div className='Story Mixins thin-underline'>Hello</div>;
@@ -4,4 +4,4 @@ import './visually-hidden.stories.scss';
4
4
 
5
5
  export default { title: 'Mixins/visually-hidden' };
6
6
 
7
- export const Default = () => <div className="Story Mixins visually-hidden">Hello</div>;
7
+ export const Default = () => <div className='Story Mixins visually-hidden'>Hello</div>;
@@ -14,10 +14,10 @@ export const State: React.FC<Props> = ({ props, children, ...rest }) => {
14
14
  const innerChildren = isRenderProps(children) ? children(props) : children;
15
15
 
16
16
  return (
17
- <div className="State" {...rest}>
17
+ <div className='State' {...rest}>
18
18
  {Specimen}
19
19
 
20
- <code className="State__props">
20
+ <code className='State__props'>
21
21
  <StatesProps props={props}>{innerChildren}</StatesProps>
22
22
  </code>
23
23
  </div>
@@ -11,7 +11,7 @@ export interface Props {
11
11
 
12
12
  export const States: React.FC<Props> = ({ states = [{}], children, ...rest }) => {
13
13
  return (
14
- <div className="States">
14
+ <div className='States'>
15
15
  {states.map((props, index) => (
16
16
  <State key={index} props={props} {...rest}>
17
17
  {children}
@@ -19,7 +19,7 @@ export const StatesProps: React.FC<Props> = ({ props, children }) => {
19
19
  const childrenProps = omit(children.props, ...Object.keys(props || {}));
20
20
 
21
21
  return (
22
- <Stack className="StatesProps" space={2} direction="horizontal">
22
+ <Stack className='StatesProps' space={2} direction='horizontal'>
23
23
  <span>{children.type.displayName || children.type.name}</span>
24
24
  {!isEmpty(props) && <strong>{stringifyProps(props)}</strong>}
25
25
  {!isRenderProps(children) && !isEmpty(childrenProps) && (