@moda/om 21.2.0 → 21.2.1
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.cjs.js +35 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +35 -9
- package/dist/index.esm.js.map +1 -1
- package/package.json +42 -44
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +3 -3
- package/src/components/Breakpoint/Breakpoint.stories.tsx +1 -1
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/Button/Button.test.tsx +1 -1
- package/src/components/Checkbox/Checkbox.test.tsx +2 -2
- package/src/components/Clickable/Clickable.stories.tsx +1 -1
- package/src/components/ColorSwatch/ColorSwatch.stories.tsx +1 -1
- package/src/components/ControlLink/ControlLink.stories.tsx +1 -1
- package/src/components/Field/Field.stories.tsx +1 -1
- package/src/components/Modal/Modal.test.tsx +4 -4
- package/src/components/Paginator/Paginator.stories.tsx +1 -1
- package/src/components/SearchInput/SearchInput.stories.tsx +1 -1
- package/src/components/Select/Select.stories.tsx +1 -1
- package/src/components/Select/Select.test.tsx +2 -2
- package/src/components/SelectableButton/SelectableButton.stories.tsx +1 -1
- package/src/components/Tag/Tag.stories.tsx +1 -1
- package/src/components/Tag/Tag.test.tsx +1 -1
- package/src/components/Toast/Toast.stories.tsx +1 -1
- package/src/components/Toast/Toast.test.tsx +1 -1
- package/src/hooks/useKeyboardListNavigation.spec.ts +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moda/om",
|
|
3
|
-
"version": "21.2.
|
|
3
|
+
"version": "21.2.1",
|
|
4
4
|
"description": "Moda Operandi design system",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -48,106 +48,104 @@
|
|
|
48
48
|
"react-router-dom": "^5.1.2"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@moda/icons": "^6.
|
|
52
|
-
"@moda/tokens": "^6.
|
|
51
|
+
"@moda/icons": "^6.1.14",
|
|
52
|
+
"@moda/tokens": "^6.4.58",
|
|
53
53
|
"@mona-health/react-input-mask": "^3.0.3",
|
|
54
54
|
"@storybook/addon-styling": "^2.0.0",
|
|
55
55
|
"classnames": "^2.5.1",
|
|
56
56
|
"credit-card-type": "^10.0.2",
|
|
57
57
|
"focus-visible": "^5.2.1",
|
|
58
58
|
"proportional-scale": "^4.0.0",
|
|
59
|
-
"react-focus-on": "^3.
|
|
59
|
+
"react-focus-on": "^3.10.0",
|
|
60
60
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
61
|
-
"storybook": "^
|
|
61
|
+
"storybook": "^9.0.17",
|
|
62
62
|
"use-cursor": "^1.2.3"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@babel/core": "^7.
|
|
66
|
-
"@babel/preset-env": "^7.
|
|
67
|
-
"@babel/preset-react": "^7.
|
|
68
|
-
"@babel/preset-typescript": "^7.27.
|
|
69
|
-
"@commitlint/cli": "^19.8.
|
|
70
|
-
"@commitlint/config-conventional": "^19.8.
|
|
71
|
-
"@eslint/js": "^9.
|
|
65
|
+
"@babel/core": "^7.28.0",
|
|
66
|
+
"@babel/preset-env": "^7.28.0",
|
|
67
|
+
"@babel/preset-react": "^7.27.1",
|
|
68
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
69
|
+
"@commitlint/cli": "^19.8.1",
|
|
70
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
71
|
+
"@eslint/js": "^9.31.0",
|
|
72
72
|
"@moda/rollup-plugin-postcss": "^4.0.1",
|
|
73
73
|
"@rollup/plugin-babel": "^6.0.4",
|
|
74
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
74
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
75
75
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
76
|
-
"@storybook/addon-
|
|
77
|
-
"@storybook/addon-essentials": "^8.6.12",
|
|
78
|
-
"@storybook/addon-links": "^8.6.12",
|
|
76
|
+
"@storybook/addon-links": "^9.0.17",
|
|
79
77
|
"@storybook/addon-postcss": "^2.0.0",
|
|
80
|
-
"@storybook/addon-viewport": "^8.6.12",
|
|
81
78
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
|
82
79
|
"@storybook/addons": "^7.6.17",
|
|
83
|
-
"@storybook/react": "^
|
|
84
|
-
"@storybook/react-webpack5": "^
|
|
80
|
+
"@storybook/react": "^9.0.17",
|
|
81
|
+
"@storybook/react-webpack5": "^9.0.17",
|
|
85
82
|
"@testing-library/jest-dom": "^6.6.3",
|
|
86
83
|
"@testing-library/react": "^16.3.0",
|
|
87
84
|
"@testing-library/user-event": "^14.6.1",
|
|
88
|
-
"@types/
|
|
85
|
+
"@types/chai": "^5.2.2",
|
|
86
|
+
"@types/cheerio": "^1.0.0",
|
|
89
87
|
"@types/classnames": "^2.3.4",
|
|
90
88
|
"@types/credit-card-type": "^9.0.3",
|
|
91
|
-
"@types/jest": "^
|
|
89
|
+
"@types/jest": "^30.0.0",
|
|
92
90
|
"@types/ramda": "^0.30.2",
|
|
93
|
-
"@types/react": "^19.1.
|
|
94
|
-
"@types/react-dom": "^19.1.
|
|
91
|
+
"@types/react": "^19.1.8",
|
|
92
|
+
"@types/react-dom": "^19.1.6",
|
|
95
93
|
"@types/react-input-mask": "^3.0.6",
|
|
96
94
|
"@types/react-router-dom": "^5.3.3",
|
|
97
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
98
|
-
"@typescript-eslint/parser": "^8.
|
|
95
|
+
"@typescript-eslint/eslint-plugin": "^8.37.0",
|
|
96
|
+
"@typescript-eslint/parser": "^8.37.0",
|
|
99
97
|
"autoprefixer": "^10.4.21",
|
|
100
98
|
"babel-loader": "^10.0.0",
|
|
101
99
|
"commitizen": "^4.3.1",
|
|
102
100
|
"css-loader": "^7.1.2",
|
|
103
101
|
"cz-conventional-changelog": "^3.3.0",
|
|
104
|
-
"eslint": "^9.
|
|
105
|
-
"eslint-config-prettier": "^10.1.
|
|
106
|
-
"eslint-plugin-import": "^2.
|
|
102
|
+
"eslint": "^9.31.0",
|
|
103
|
+
"eslint-config-prettier": "^10.1.5",
|
|
104
|
+
"eslint-plugin-import": "^2.32.0",
|
|
107
105
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
108
106
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
109
107
|
"eslint-plugin-no-loops": "^0.4.0",
|
|
110
108
|
"eslint-plugin-node": "^11.1.0",
|
|
111
|
-
"eslint-plugin-prettier": "^5.
|
|
109
|
+
"eslint-plugin-prettier": "^5.5.1",
|
|
112
110
|
"eslint-plugin-promise": "^7.2.1",
|
|
113
111
|
"eslint-plugin-react": "^7.37.5",
|
|
114
112
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
115
113
|
"eslint-plugin-standard": "^5.0.0",
|
|
116
|
-
"eslint-plugin-testing-library": "^7.
|
|
117
|
-
"globals": "^16.
|
|
114
|
+
"eslint-plugin-testing-library": "^7.6.0",
|
|
115
|
+
"globals": "^16.3.0",
|
|
118
116
|
"husky": "^9.1.7",
|
|
119
117
|
"identity-obj-proxy": "^3.0.0",
|
|
120
118
|
"ignore-not-found-export-webpack-plugin": "^1.0.2",
|
|
121
|
-
"jest": "^
|
|
122
|
-
"jest-environment-jsdom": "^
|
|
119
|
+
"jest": "^30.0.4",
|
|
120
|
+
"jest-environment-jsdom": "^30.0.4",
|
|
123
121
|
"jest-matchmedia-mock": "^1.1.0",
|
|
124
|
-
"lint-staged": "^16.
|
|
122
|
+
"lint-staged": "^16.1.2",
|
|
125
123
|
"node-sass-package-importer": "^5.3.3",
|
|
126
124
|
"pinst": "^3.0.0",
|
|
127
|
-
"postcss": "^8.5.
|
|
125
|
+
"postcss": "^8.5.6",
|
|
128
126
|
"postcss-loader": "^8.1.1",
|
|
129
|
-
"prettier": "^3.
|
|
130
|
-
"ramda": "^0.
|
|
127
|
+
"prettier": "^3.6.2",
|
|
128
|
+
"ramda": "^0.31.3",
|
|
131
129
|
"react": "^19.1.0",
|
|
132
130
|
"react-dom": "^19.1.0",
|
|
133
131
|
"react-router-dom": "^5.1.2",
|
|
134
|
-
"rollup": "^4.
|
|
132
|
+
"rollup": "^4.45.1",
|
|
135
133
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
136
134
|
"rollup-plugin-scss": "^4.0.1",
|
|
137
|
-
"sass": "^1.
|
|
135
|
+
"sass": "^1.89.2",
|
|
138
136
|
"sass-loader": "^16.0.5",
|
|
139
|
-
"semantic-release": "^24.2.
|
|
137
|
+
"semantic-release": "^24.2.7",
|
|
140
138
|
"semantic-release-npm-github": "^5.0.0",
|
|
141
139
|
"style-loader": "^4.0.0",
|
|
142
|
-
"ts-jest": "^29.
|
|
140
|
+
"ts-jest": "^29.4.0",
|
|
143
141
|
"typescript": "^5.8.3",
|
|
144
|
-
"typescript-eslint": "^8.
|
|
142
|
+
"typescript-eslint": "^8.37.0",
|
|
145
143
|
"waait": "^1.0.5",
|
|
146
|
-
"webpack": "^5.
|
|
144
|
+
"webpack": "^5.100.2",
|
|
147
145
|
"webpack-cli": "^6.0.1"
|
|
148
146
|
},
|
|
149
147
|
"overrides": {
|
|
150
|
-
"@types/react": "^19.1.
|
|
148
|
+
"@types/react": "^19.1.8",
|
|
151
149
|
"react": "^19.1.0",
|
|
152
150
|
"react-dom": "^19.1.0"
|
|
153
151
|
},
|
|
@@ -12,8 +12,8 @@ describe('Breadcrumbs', () => {
|
|
|
12
12
|
<Breadcrumb>Three</Breadcrumb>
|
|
13
13
|
</Breadcrumbs>
|
|
14
14
|
);
|
|
15
|
-
expect(screen.getAllByRole('listitem')
|
|
16
|
-
expect(screen.getAllByRole('listitem')
|
|
17
|
-
expect(screen.getAllByRole('listitem')
|
|
15
|
+
expect(screen.getAllByRole('listitem')[0]).toHaveAttribute('itemprop');
|
|
16
|
+
expect(screen.getAllByRole('listitem')[0]).toHaveAttribute('itemscope');
|
|
17
|
+
expect(screen.getAllByRole('listitem')[0]).toHaveAttribute('itemtype');
|
|
18
18
|
});
|
|
19
19
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BrowserRouter } from 'react-router-dom';
|
|
3
|
-
import { action } from '
|
|
3
|
+
import { action } from 'storybook/actions';
|
|
4
4
|
import Heart from '@moda/icons/favorite-outline-16';
|
|
5
5
|
|
|
6
6
|
import { States } from '../../utilities';
|
|
@@ -15,7 +15,7 @@ describe('Checkbox', () => {
|
|
|
15
15
|
|
|
16
16
|
await userEvent.click(screen.getByTestId('checkbox'));
|
|
17
17
|
|
|
18
|
-
expect(handleChange).
|
|
18
|
+
expect(handleChange).toHaveBeenCalled();
|
|
19
19
|
expect(screen.getByRole('checkbox') as HTMLInputElement).toBeChecked();
|
|
20
20
|
|
|
21
21
|
rerender(<Checkbox data-testid='checkbox' checked={false} onChange={handleChange} />);
|
|
@@ -31,7 +31,7 @@ describe('Checkbox', () => {
|
|
|
31
31
|
|
|
32
32
|
await userEvent.click(screen.getByTestId('checkbox'));
|
|
33
33
|
|
|
34
|
-
expect(handleChange).
|
|
34
|
+
expect(handleChange).toHaveBeenCalled();
|
|
35
35
|
expect(screen.getByRole('checkbox') as HTMLInputElement).toBeChecked();
|
|
36
36
|
});
|
|
37
37
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { action } from '
|
|
2
|
+
import { action } from 'storybook/actions';
|
|
3
3
|
import { BrowserRouter } from 'react-router-dom';
|
|
4
4
|
import { States } from '../../utilities';
|
|
5
5
|
import { Clickable, ClickableProps } from './Clickable';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { action } from '
|
|
2
|
+
import { action } from 'storybook/actions';
|
|
3
3
|
import { States } from '../../utilities';
|
|
4
4
|
import { Stack } from '../Stack';
|
|
5
5
|
import { ColorSwatch, ColorSwatchProps, SKU_COLORS } from '.';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { action } from '
|
|
2
|
+
import { action } from 'storybook/actions';
|
|
3
3
|
import { BrowserRouter } from 'react-router-dom';
|
|
4
4
|
import { States } from '../../utilities';
|
|
5
5
|
import { ControlLink, ControlLinkProps } from './ControlLink';
|
|
@@ -24,11 +24,11 @@ describe('Modal', () => {
|
|
|
24
24
|
const button = screen.getByTestId('button');
|
|
25
25
|
|
|
26
26
|
await userEvent.click(button);
|
|
27
|
-
expect(onClose).
|
|
28
|
-
expect(onClickButton).
|
|
27
|
+
expect(onClose).toHaveBeenCalledTimes(0);
|
|
28
|
+
expect(onClickButton).toHaveBeenCalledTimes(1);
|
|
29
29
|
|
|
30
30
|
await userEvent.click(modal);
|
|
31
|
-
expect(onClose).
|
|
32
|
-
expect(onClickButton).
|
|
31
|
+
expect(onClose).toHaveBeenCalledTimes(1);
|
|
32
|
+
expect(onClickButton).toHaveBeenCalledTimes(1);
|
|
33
33
|
});
|
|
34
34
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { action } from '
|
|
2
|
+
import { action } from 'storybook/actions';
|
|
3
3
|
import { States } from '../../utilities';
|
|
4
4
|
import { Text } from '../Text';
|
|
5
5
|
import { SearchInput, SearchInputProps } from './SearchInput';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState, useCallback } from 'react';
|
|
2
|
-
import { action } from '
|
|
2
|
+
import { action } from 'storybook/actions';
|
|
3
3
|
import { States } from '../../utilities';
|
|
4
4
|
import { Input } from '../Field';
|
|
5
5
|
import { Select, SelectProps } from './Select';
|
|
@@ -65,7 +65,7 @@ describe('Select', () => {
|
|
|
65
65
|
await userEvent.click(button);
|
|
66
66
|
const option = screen.getByLabelText('Bar');
|
|
67
67
|
await userEvent.click(option);
|
|
68
|
-
expect(onChange).
|
|
68
|
+
expect(onChange).toHaveBeenCalledWith('bar');
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
it('does not call onChange when selecting a disabled option', async () => {
|
|
@@ -84,7 +84,7 @@ describe('Select', () => {
|
|
|
84
84
|
await userEvent.click(button);
|
|
85
85
|
const option = screen.getByLabelText('Baz');
|
|
86
86
|
await userEvent.click(option);
|
|
87
|
-
expect(onChange).not.
|
|
87
|
+
expect(onChange).not.toHaveBeenCalled();
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
it('renders correctly with ":" between label and value if value is not undefined', async () => {
|
|
@@ -153,7 +153,7 @@ describe('useKeyboardListNavigation', () => {
|
|
|
153
153
|
|
|
154
154
|
fireEvent.keyDown(window, { key: 'Enter' });
|
|
155
155
|
|
|
156
|
-
expect(onEnter).
|
|
156
|
+
expect(onEnter).toHaveBeenCalledTimes(1);
|
|
157
157
|
expect(onEnter).toHaveBeenCalledWith({
|
|
158
158
|
element: 'first',
|
|
159
159
|
event: expect.anything(),
|
|
@@ -166,7 +166,7 @@ describe('useKeyboardListNavigation', () => {
|
|
|
166
166
|
|
|
167
167
|
fireEvent.keyDown(window, { key: 'Enter' });
|
|
168
168
|
|
|
169
|
-
expect(onEnter).
|
|
169
|
+
expect(onEnter).toHaveBeenCalledTimes(2);
|
|
170
170
|
expect(onEnter).toHaveBeenLastCalledWith({
|
|
171
171
|
element: 'third',
|
|
172
172
|
event: expect.anything(),
|
|
@@ -220,13 +220,13 @@ describe('useKeyboardListNavigation', () => {
|
|
|
220
220
|
|
|
221
221
|
fireEvent.keyDown(window, { key: 'Enter' });
|
|
222
222
|
|
|
223
|
-
expect(onEnter).
|
|
223
|
+
expect(onEnter).toHaveBeenCalledTimes(0);
|
|
224
224
|
|
|
225
225
|
fireEvent.keyDown(window, { key: 'ArrowDown' });
|
|
226
226
|
|
|
227
227
|
fireEvent.keyDown(window, { key: 'Enter' });
|
|
228
228
|
|
|
229
|
-
expect(onEnter).
|
|
229
|
+
expect(onEnter).toHaveBeenCalledTimes(1);
|
|
230
230
|
});
|
|
231
231
|
});
|
|
232
232
|
});
|