@moda/om 17.7.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 +14 -0
  2. package/dist/index.cjs.js +4601 -4557
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +4601 -4557
  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 +26 -24
  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
@@ -7,7 +7,7 @@ export default { title: 'Components/Expandable' };
7
7
 
8
8
  export const Default = () => (
9
9
  <States<Partial<ExpandableProps>> states={[{}, { expanded: true }]}>
10
- <Expandable name="Editor’s Note">
10
+ <Expandable name='Editor’s Note'>
11
11
  Mark Cross’ ‘Cole’ duffle bag is crafted from textured grain leather with ample space for your
12
12
  long-haul travels. It opens to reveal red twill lining and ample compartments for your
13
13
  essentials. It has polished silver-tone palladium hardware and is stamped with the label’s
@@ -20,7 +20,7 @@ export const Default = () => (
20
20
  // Push content into the DOM only after epanding component
21
21
  export const VirtualizeContent = () => (
22
22
  <States<Partial<ExpandableProps>> states={[{}, { expanded: false, virtual: true }]}>
23
- <Expandable name="Editor’s Note">
23
+ <Expandable name='Editor’s Note'>
24
24
  Mark Cross’ ‘Cole’ duffle bag is crafted from textured grain leather with ample space for your
25
25
  long-haul travels. It opens to reveal red twill lining and ample compartments for your
26
26
  essentials. It has polished silver-tone palladium hardware and is stamped with the label’s
@@ -32,7 +32,7 @@ export const VirtualizeContent = () => (
32
32
 
33
33
  export const ChevronIcon = () => (
34
34
  <States<Partial<ExpandableProps>> states={[{}, { expanded: true }]}>
35
- <Expandable icon="chevron" name="Editor’s Note">
35
+ <Expandable icon='chevron' name='Editor’s Note'>
36
36
  Mark Cross’ ‘Cole’ duffle bag is crafted from textured grain leather with ample space for your
37
37
  long-haul travels. It opens to reveal red twill lining and ample compartments for your
38
38
  essentials. It has polished silver-tone palladium hardware and is stamped with the label’s
@@ -44,7 +44,7 @@ export const ChevronIcon = () => (
44
44
 
45
45
  export const DarkBackground = () => (
46
46
  <div style={{ backgroundColor: 'black', padding: '20px' }}>
47
- <Expandable name="Editor’s Note" background="dark">
47
+ <Expandable name='Editor’s Note' background='dark'>
48
48
  Mark Cross’ ‘Cole’ duffle bag is crafted from textured grain leather with ample space for your
49
49
  long-haul travels. It opens to reveal red twill lining and ample compartments for your
50
50
  essentials. It has polished silver-tone palladium hardware and is stamped with the label’s
@@ -57,14 +57,14 @@ export const DarkBackground = () => (
57
57
  export const Stacked = () => (
58
58
  <States>
59
59
  <Stack space={0}>
60
- <Expandable name="Editor’s Note" expanded>
60
+ <Expandable name='Editor’s Note' expanded>
61
61
  <p>
62
62
  Acne Studios’ ‘1996’ jeans are fitted with a high-rise waist and straight-leg silhouette.
63
63
  Designed in a dark-blue wash, this five-pocket style is detailed with contrast
64
64
  top-stitching to mirror vintage pairs.
65
65
  </p>
66
66
  </Expandable>
67
- <Expandable name="Product Details">
67
+ <Expandable name='Product Details'>
68
68
  <ul>
69
69
  <li>Belt loops, five-pocket style</li>
70
70
  <li>Button and concealed zip fastening at front</li>
@@ -73,7 +73,7 @@ export const Stacked = () => (
73
73
  </ul>
74
74
  <p>Made in Italy Product Code 684196</p>
75
75
  </Expandable>
76
- <Expandable name="Size &amp; Fit">
76
+ <Expandable name='Size &amp; Fit'>
77
77
  <ul>
78
78
  <li>
79
79
  Model measurements: height 6&apos;2&quot;/188cm - neck 15.5&quot;/39cm - waist
@@ -84,11 +84,11 @@ export const Stacked = () => (
84
84
  <li>We suggest taking your normal size</li>
85
85
  </ul>
86
86
  <p>
87
- Questions? Please contact <a href="mailto:care@modaoperandi.com">care@modaoperandi.com</a>
87
+ Questions? Please contact <a href='mailto:care@modaoperandi.com'>care@modaoperandi.com</a>
88
88
  .
89
89
  </p>
90
90
  </Expandable>
91
- <Expandable name="Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...">
91
+ <Expandable name='Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...'>
92
92
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed condimentum laoreet urna nec
93
93
  consequat. Morbi et volutpat nulla, a vehicula nisl. Nullam tincidunt ac neque ornare
94
94
  mattis. Donec eget dapibus enim. Aliquam ut tortor pretium dui pretium tincidunt. Donec quis
@@ -9,7 +9,7 @@ describe('Expandable', () => {
9
9
  const user = userEvent.setup();
10
10
 
11
11
  render(
12
- <Expandable virtual name="Hello">
12
+ <Expandable virtual name='Hello'>
13
13
  Goodbye
14
14
  </Expandable>
15
15
  );
@@ -58,18 +58,18 @@ export const Expandable: React.FC<ExpandableProps> = ({
58
58
  )}
59
59
  {...rest}
60
60
  >
61
- <Clickable className="Expandable__name" onClick={handleClick} data-testid={dataTestId}>
61
+ <Clickable className='Expandable__name' onClick={handleClick} data-testid={dataTestId}>
62
62
  {name}
63
63
 
64
64
  {icon !== 'plus-minus' && (
65
- <div className="Expandable__icon">
65
+ <div className='Expandable__icon'>
66
66
  {icon === 'chevron' && expanded && <ChevronUpIcon />}
67
67
  {icon === 'chevron' && !expanded && <ChevronDownIcon />}
68
68
  </div>
69
69
  )}
70
70
  </Clickable>
71
71
 
72
- <div className="Expandable__contents">{expanded || !virtual ? children : null}</div>
72
+ <div className='Expandable__contents'>{expanded || !virtual ? children : null}</div>
73
73
  </div>
74
74
  );
75
75
  };
@@ -19,7 +19,7 @@ export const Default = () => (
19
19
  { label: 'Name of input', error: 'Something went wrong' }
20
20
  ]}
21
21
  >
22
- <Field placeholder="An input" />
22
+ <Field placeholder='An input' />
23
23
  </States>
24
24
  );
25
25
 
@@ -36,7 +36,7 @@ export const AribitraryChildren = () => (
36
36
  ]}
37
37
  >
38
38
  <Field>
39
- <Textarea placeholder="A textarea" />
39
+ <Textarea placeholder='A textarea' />
40
40
  </Field>
41
41
  </States>
42
42
  );
@@ -6,14 +6,14 @@ import { Field } from './Field';
6
6
 
7
7
  describe('Field', () => {
8
8
  it('renders correctly', () => {
9
- render(<Field placeholder="Placeholder" defaultValue="Hello" />);
9
+ render(<Field placeholder='Placeholder' defaultValue='Hello' />);
10
10
 
11
11
  expect(screen.getByRole('textbox')).toBeVisible();
12
12
  expect(screen.getByRole('textbox')).toHaveAttribute('placeholder', 'Placeholder');
13
13
  });
14
14
 
15
15
  it('renders with a label', () => {
16
- render(<Field placeholder="Placeholder" defaultValue="Hello" label="Label" />);
16
+ render(<Field placeholder='Placeholder' defaultValue='Hello' label='Label' />);
17
17
 
18
18
  expect(screen.getByRole('textbox')).toBeVisible();
19
19
  expect(screen.getByRole('textbox')).toHaveAttribute('placeholder', 'Placeholder');
@@ -21,7 +21,7 @@ describe('Field', () => {
21
21
  });
22
22
 
23
23
  it('renders with an error', () => {
24
- render(<Field placeholder="Placeholder" defaultValue="Hello" label="Label" error="Error" />);
24
+ render(<Field placeholder='Placeholder' defaultValue='Hello' label='Label' error='Error' />);
25
25
 
26
26
  expect(screen.getByRole('textbox')).toBeVisible();
27
27
  expect(screen.getByRole('textbox')).toHaveClass('TextInput--error');
@@ -37,7 +37,7 @@ describe('Field', () => {
37
37
 
38
38
  render(
39
39
  <Field>
40
- <Select idRef="1" name="name-1" label="Sort by" options={options} />
40
+ <Select idRef='1' name='name-1' label='Sort by' options={options} />
41
41
  </Field>
42
42
  );
43
43
 
@@ -46,7 +46,7 @@ describe('Field', () => {
46
46
 
47
47
  it('renders with a className', () => {
48
48
  render(
49
- <Field className="Custom" placeholder="Placeholder" defaultValue="Hello" label="Label" />
49
+ <Field className='Custom' placeholder='Placeholder' defaultValue='Hello' label='Label' />
50
50
  );
51
51
 
52
52
  expect(screen.getByRole('textbox')).toBeVisible();
@@ -56,7 +56,7 @@ describe('Field', () => {
56
56
 
57
57
  it('supports custom children', () => {
58
58
  render(
59
- <Field placeholder="Placeholder" defaultValue="Hello" label="Label">
59
+ <Field placeholder='Placeholder' defaultValue='Hello' label='Label'>
60
60
  <textarea />
61
61
  </Field>
62
62
  );
@@ -17,10 +17,10 @@ export const Field = React.forwardRef(
17
17
  ) => {
18
18
  return (
19
19
  <label className={classNames('Field', className)}>
20
- {label && <span className="Field__label">{label}</span>}
20
+ {label && <span className='Field__label'>{label}</span>}
21
21
 
22
22
  {/* TODO: Codify some kind of IconWrapper component */}
23
- <span className="Field__context">
23
+ <span className='Field__context'>
24
24
  {children ? (
25
25
  <>
26
26
  {React.cloneElement(children, {
@@ -34,7 +34,7 @@ export const Field = React.forwardRef(
34
34
  })}
35
35
 
36
36
  {error && (
37
- <span className="Field__icon">
37
+ <span className='Field__icon'>
38
38
  <WarningIcon />
39
39
  </span>
40
40
  )}
@@ -49,7 +49,7 @@ export const Field = React.forwardRef(
49
49
  {...rest}
50
50
  />
51
51
  {error && (
52
- <span className="Field__icon">
52
+ <span className='Field__icon'>
53
53
  <WarningIcon />
54
54
  </span>
55
55
  )}
@@ -57,7 +57,7 @@ export const Field = React.forwardRef(
57
57
  )}
58
58
  </span>
59
59
 
60
- {error && <span className="Field__error">{error}</span>}
60
+ {error && <span className='Field__error'>{error}</span>}
61
61
  </label>
62
62
  );
63
63
  }
@@ -5,7 +5,7 @@ import { Loading } from './Loading';
5
5
 
6
6
  describe('Loading', () => {
7
7
  it('renders correctly', () => {
8
- render(<Loading aria-label="Loading" />);
8
+ render(<Loading aria-label='Loading' />);
9
9
  expect(screen.getByLabelText('Loading')).toBeVisible();
10
10
  });
11
11
  });
@@ -14,44 +14,44 @@ const defaultSize = 32;
14
14
  export const LoadingBalls: React.FC<Props> = ({ className, width, height }: Props) => (
15
15
  <svg
16
16
  className={classNames('LoadingBalls', className)}
17
- viewBox="0 0 32 32"
17
+ viewBox='0 0 32 32'
18
18
  width={width || defaultSize}
19
19
  height={height || defaultSize}
20
20
  >
21
- <circle transform="translate(8 0)" cx="0" cy="16" r="0">
21
+ <circle transform='translate(8 0)' cx='0' cy='16' r='0'>
22
22
  <animate
23
- attributeName="r"
24
- values="0; 4; 0; 0"
25
- dur="1.2s"
26
- repeatCount="indefinite"
27
- begin="0"
28
- keyTimes="0;0.2;0.7;1"
29
- keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8"
30
- calcMode="spline"
23
+ attributeName='r'
24
+ values='0; 4; 0; 0'
25
+ dur='1.2s'
26
+ repeatCount='indefinite'
27
+ begin='0'
28
+ keyTimes='0;0.2;0.7;1'
29
+ keySplines='0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8'
30
+ calcMode='spline'
31
31
  />
32
32
  </circle>
33
- <circle transform="translate(16 0)" cx="0" cy="16" r="0">
33
+ <circle transform='translate(16 0)' cx='0' cy='16' r='0'>
34
34
  <animate
35
- attributeName="r"
36
- values="0; 4; 0; 0"
37
- dur="1.2s"
38
- repeatCount="indefinite"
39
- begin="0.3"
40
- keyTimes="0;0.2;0.7;1"
41
- keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8"
42
- calcMode="spline"
35
+ attributeName='r'
36
+ values='0; 4; 0; 0'
37
+ dur='1.2s'
38
+ repeatCount='indefinite'
39
+ begin='0.3'
40
+ keyTimes='0;0.2;0.7;1'
41
+ keySplines='0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8'
42
+ calcMode='spline'
43
43
  />
44
44
  </circle>
45
- <circle transform="translate(24 0)" cx="0" cy="16" r="0">
45
+ <circle transform='translate(24 0)' cx='0' cy='16' r='0'>
46
46
  <animate
47
- attributeName="r"
48
- values="0; 4; 0; 0"
49
- dur="1.2s"
50
- repeatCount="indefinite"
51
- begin="0.6"
52
- keyTimes="0;0.2;0.7;1"
53
- keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8"
54
- calcMode="spline"
47
+ attributeName='r'
48
+ values='0; 4; 0; 0'
49
+ dur='1.2s'
50
+ repeatCount='indefinite'
51
+ begin='0.6'
52
+ keyTimes='0;0.2;0.7;1'
53
+ keySplines='0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8'
54
+ calcMode='spline'
55
55
  />
56
56
  </circle>
57
57
  </svg>
@@ -14,8 +14,8 @@ describe('Modal', () => {
14
14
  const onClose = jest.fn();
15
15
  const onClickButton = jest.fn();
16
16
  render(
17
- <Modal data-testid="modal" onClose={onClose}>
18
- <button data-testid="button" onClick={onClickButton}>
17
+ <Modal data-testid='modal' onClose={onClose}>
18
+ <button data-testid='button' onClick={onClickButton}>
19
19
  Click Me
20
20
  </button>
21
21
  </Modal>
@@ -8,11 +8,11 @@ const ModalComponent: React.FC = () => {
8
8
  const [showModal, setShowModal] = useState(false);
9
9
 
10
10
  return showModal ? (
11
- <ModalOverlay data-testid="modal" onClose={() => setShowModal(false)}>
11
+ <ModalOverlay data-testid='modal' onClose={() => setShowModal(false)}>
12
12
  Modal Content
13
13
  </ModalOverlay>
14
14
  ) : (
15
- <button data-testid="button" onClick={() => setShowModal(true)}>
15
+ <button data-testid='button' onClick={() => setShowModal(true)}>
16
16
  Click Me
17
17
  </button>
18
18
  );
@@ -66,7 +66,7 @@ export const Paginator: React.FC<Props> = ({
66
66
  const prevPage = (page: number) => onGoToPage(page - 1);
67
67
 
68
68
  return (
69
- <section className={classNames('Paginator', className)} aria-label="Pagination">
69
+ <section className={classNames('Paginator', className)} aria-label='Pagination'>
70
70
  <button
71
71
  disabled={!canDoPrev(selectedPage)}
72
72
  onClick={() => {
@@ -75,7 +75,7 @@ export const Paginator: React.FC<Props> = ({
75
75
  }}
76
76
  className={classNames('Paginator__button', 'Paginator__button--previous')}
77
77
  >
78
- <ChevronLeftIcon className="Paginator__previous-chevron" /> Previous
78
+ <ChevronLeftIcon className='Paginator__previous-chevron' /> Previous
79
79
  </button>
80
80
 
81
81
  {pages.map((page, index) => (
@@ -108,7 +108,7 @@ export const Paginator: React.FC<Props> = ({
108
108
  }}
109
109
  className={classNames('Paginator__button', 'Paginator__button--next')}
110
110
  >
111
- Next <ChevronRightIcon className="Paginator__next-chevron" />
111
+ Next <ChevronRightIcon className='Paginator__next-chevron' />
112
112
  </button>
113
113
  </section>
114
114
  );
@@ -6,6 +6,6 @@ export default { title: 'Components/PasswordInput' };
6
6
 
7
7
  export const Default = () => (
8
8
  <States<Partial<PasswordInputProps>> states={[{}, { error: 'Password cannot be empty.' }]}>
9
- <PasswordInput id="signInPassword" placeholder="Password" />
9
+ <PasswordInput id='signInPassword' placeholder='Password' />
10
10
  </States>
11
11
  );
@@ -15,23 +15,23 @@ export const PasswordInput = forwardRef(
15
15
  };
16
16
 
17
17
  return (
18
- <div className="PasswordInput">
18
+ <div className='PasswordInput'>
19
19
  <Input
20
- className="PasswordInput__editor"
20
+ className='PasswordInput__editor'
21
21
  ref={ref}
22
22
  type={passwordShown ? 'text' : 'password'}
23
23
  {...rest}
24
24
  />
25
25
 
26
26
  <Clickable
27
- className="PasswordInput__password-action"
27
+ className='PasswordInput__password-action'
28
28
  onClick={togglePasswordVisiblity}
29
- type="button"
29
+ type='button'
30
30
  >
31
31
  {passwordShown ? (
32
- <Text treatment="eyebrow">HIDE</Text>
32
+ <Text treatment='eyebrow'>HIDE</Text>
33
33
  ) : (
34
- <Text treatment="eyebrow">SHOW</Text>
34
+ <Text treatment='eyebrow'>SHOW</Text>
35
35
  )}
36
36
  </Clickable>
37
37
  </div>
@@ -33,7 +33,7 @@ export const Default = () => (
33
33
  >
34
34
  <Popover content={Content} style={{ display: 'inline-block' }}>
35
35
  <Text>
36
- <ControlLink href="https://www.modaoperandi.com/women">Hover on Link</ControlLink>
36
+ <ControlLink href='https://www.modaoperandi.com/women'>Hover on Link</ControlLink>
37
37
  </Text>
38
38
  </Popover>
39
39
  </States>
@@ -128,7 +128,7 @@ export const Popover: React.FC<PopoverProps> = ({
128
128
  onMouseLeave={handleMouseLeave}
129
129
  {...rest}
130
130
  >
131
- <span className="Popover__trigger">
131
+ <span className='Popover__trigger'>
132
132
  {isOpen && (
133
133
  <div
134
134
  className={classNames('Popover__box', {
@@ -137,11 +137,11 @@ export const Popover: React.FC<PopoverProps> = ({
137
137
  })}
138
138
  >
139
139
  <div
140
- className="Popover__caret"
140
+ className='Popover__caret'
141
141
  style={{ zIndex: zIndex != null ? zIndex + 1 : undefined }}
142
142
  />
143
143
 
144
- <div className="Popover__content" style={{ zIndex }}>
144
+ <div className='Popover__content' style={{ zIndex }}>
145
145
  {content}
146
146
  </div>
147
147
  </div>
@@ -9,22 +9,22 @@ export const Default = () => (
9
9
  states={[
10
10
  { children: <span>Center</span> },
11
11
  {
12
- children: [<span key="left">Left</span>, <span key="right">Right</span>]
12
+ children: [<span key='left'>Left</span>, <span key='right'>Right</span>]
13
13
  },
14
14
  {
15
15
  children: [
16
- <span key="left">Left</span>,
17
- <span key="center">Center</span>,
18
- <span key="right">Right</span>
16
+ <span key='left'>Left</span>,
17
+ <span key='center'>Center</span>,
18
+ <span key='right'>Right</span>
19
19
  ]
20
20
  },
21
21
  {
22
22
  children: [
23
- <span key="left">Currency: USA (USD $)</span>,
24
- <span key="center" className="FOO">
25
- Order by Dec. 12 for delivery by Dec. 25 — <a href="#">LEARN MORE</a>
23
+ <span key='left'>Currency: USA (USD $)</span>,
24
+ <span key='center' className='FOO'>
25
+ Order by Dec. 12 for delivery by Dec. 25 — <a href='#'>LEARN MORE</a>
26
26
  </span>,
27
- <span key="right">Hi, Friend</span>
27
+ <span key='right'>Hi, Friend</span>
28
28
  ]
29
29
  }
30
30
  ]}
@@ -38,7 +38,7 @@ export const Mobile = () => (
38
38
  <PromoBanner>
39
39
  <span>Currency: USA (USD $)</span>
40
40
  <span>
41
- Order by Dec. 12 for delivery by Dec. 25 — <a href="#">LEARN MORE</a>
41
+ Order by Dec. 12 for delivery by Dec. 25 — <a href='#'>LEARN MORE</a>
42
42
  </span>
43
43
  <span>Hi, Friend</span>
44
44
  </PromoBanner>
@@ -11,7 +11,7 @@ export const PromoBanner: React.FC<PromoBannerProps> = ({ className, children, .
11
11
  const length = Children.count(children);
12
12
  return (
13
13
  <div className={classNames('PromoBanner', className)} {...rest}>
14
- <Constrain className="PromoBanner__constrain">
14
+ <Constrain className='PromoBanner__constrain'>
15
15
  {Children.map(children, (child: JSX.Element, index) => {
16
16
  const isCenter = length % 2 !== 0 && Math.floor(length / 2) === index;
17
17
  return cloneElement(child, {
@@ -29,7 +29,7 @@ export const Select = () => {
29
29
  return (
30
30
  <States>
31
31
  <Stack space={3}>
32
- <Text color="burnt-orange">{selected}</Text>
32
+ <Text color='burnt-orange'>{selected}</Text>
33
33
 
34
34
  {EXAMPLES.map(value => (
35
35
  <RadioButton
@@ -36,16 +36,16 @@ export const RadioButton: React.FC<RadioButtonProps> = ({
36
36
  <input
37
37
  ref={inputRef}
38
38
  tabIndex={-1}
39
- className="RadioButton__input"
40
- type="radio"
41
- role="radio"
39
+ className='RadioButton__input'
40
+ type='radio'
41
+ role='radio'
42
42
  checked={checked}
43
43
  value={value}
44
44
  disabled={disabled}
45
45
  {...rest}
46
46
  />
47
47
  {children && (
48
- <span className="RadioButton__label" tabIndex={-1}>
48
+ <span className='RadioButton__label' tabIndex={-1}>
49
49
  {children}
50
50
  </span>
51
51
  )}
@@ -9,7 +9,7 @@ export default { title: 'Components/SearchInput' };
9
9
  export const Default = () => (
10
10
  <States<SearchInputProps> states={[{}, { value: 'prada' }, { autoFocus: true }]}>
11
11
  <SearchInput
12
- placeholder="Search"
12
+ placeholder='Search'
13
13
  onChange={action('onChange')}
14
14
  onChangeValue={action('onChangeValue')}
15
15
  />
@@ -34,7 +34,7 @@ export const DropdownExample = () => {
34
34
 
35
35
  return (
36
36
  <div style={{ display: 'flex', flexDirection: 'column' }}>
37
- <SearchInput placeholder="Search" onChangeValue={setQuery} value={query} autoFocus />
37
+ <SearchInput placeholder='Search' onChangeValue={setQuery} value={query} autoFocus />
38
38
 
39
39
  {query && (
40
40
  <Text style={{ border: '1px solid gray', marginTop: '-1px', padding: '1rem' }}>
@@ -6,7 +6,7 @@ import { SearchInput } from './SearchInput';
6
6
 
7
7
  describe('SearchInput', () => {
8
8
  it('clears the input when the button is clicked', async () => {
9
- render(<SearchInput value="Hello" />);
9
+ render(<SearchInput value='Hello' />);
10
10
 
11
11
  expect(screen.getByRole('textbox')).toHaveValue('Hello');
12
12
 
@@ -50,12 +50,12 @@ export const SearchInput: React.FC<SearchInputProps> = ({
50
50
 
51
51
  return (
52
52
  <div className={classNames('SearchInput', className)}>
53
- <div className="SearchInput__icon">
53
+ <div className='SearchInput__icon'>
54
54
  <SearchIcon />
55
55
  </div>
56
56
 
57
57
  <TextInput
58
- className="SearchInput__input"
58
+ className='SearchInput__input'
59
59
  onChange={handleChange}
60
60
  value={controlledValue}
61
61
  ref={ref}
@@ -63,7 +63,7 @@ export const SearchInput: React.FC<SearchInputProps> = ({
63
63
  />
64
64
 
65
65
  {controlledValue && (
66
- <Clickable className="SearchInput__clear" onClick={handleClick} type="reset">
66
+ <Clickable className='SearchInput__clear' onClick={handleClick} type='reset'>
67
67
  <ExitIcon />
68
68
  </Clickable>
69
69
  )}
@@ -85,16 +85,16 @@ export const MultiSelect: React.FC<Props> = ({
85
85
  ref={selectRef}
86
86
  {...rest}
87
87
  >
88
- <Clickable className="MultiSelect__search" disabled={disabled} onClick={handleToggle}>
89
- <div className="MultiSelect__selected-items">
88
+ <Clickable className='MultiSelect__search' disabled={disabled} onClick={handleToggle}>
89
+ <div className='MultiSelect__selected-items'>
90
90
  {values.map((value, index) => (
91
- <span className="MultiSelect__selected-item" key={index}>
92
- <span className="MultiSelect__selected-value">
91
+ <span className='MultiSelect__selected-item' key={index}>
92
+ <span className='MultiSelect__selected-value'>
93
93
  {options.find(option => option.value === value)?.label || value}
94
94
  </span>
95
95
  <ExitIcon
96
96
  style={{ width: '8px', height: '8px', position: 'relative' }}
97
- className="MultiSelect__exit"
97
+ className='MultiSelect__exit'
98
98
  onClick={() => handleRemove(value)}
99
99
  />
100
100
  </span>