agroptima-design-system 0.24.4 → 0.24.5
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/jest.config.ts +10 -2
- package/package.json +4 -4
- package/src/atoms/Alert.scss +1 -1
- package/src/atoms/Alert.tsx +2 -1
- package/src/atoms/Button/Button.tsx +5 -3
- package/src/atoms/Button/FloatingButton.tsx +5 -3
- package/src/atoms/Button/IconButton.tsx +5 -3
- package/src/atoms/CardMenu/CardMenuOption.tsx +5 -3
- package/src/atoms/CardsTableList.tsx +3 -3
- package/src/atoms/Collapsible.tsx +1 -1
- package/src/atoms/EmptyState.tsx +2 -1
- package/src/atoms/Input.tsx +2 -1
- package/src/atoms/Menu/MenuDropdown.tsx +2 -1
- package/src/atoms/Menu/MenuLink.tsx +3 -2
- package/src/atoms/Modal.tsx +2 -1
- package/src/atoms/Pagination/PaginationArrow.tsx +2 -1
- package/src/atoms/Pagination/PaginationNumber.tsx +2 -1
- package/src/atoms/QuantitySelector.tsx +2 -1
- package/src/stories/Alert.stories.ts +1 -1
- package/src/stories/Badge.stories.ts +1 -1
- package/src/stories/Button.stories.ts +1 -1
- package/src/stories/CardsTableList.stories.ts +1 -1
- package/src/stories/Changelog.mdx +4 -0
- package/src/stories/Checkbox.stories.ts +1 -1
- package/src/stories/FloatingButton.stories.ts +1 -1
- package/src/stories/IconButton.stories.ts +1 -1
- package/src/stories/Input.stories.ts +1 -1
- package/src/stories/Multiselect.stories.ts +1 -1
- package/src/stories/QuantitySelector.stories.ts +1 -1
- package/src/stories/Select.stories.ts +1 -1
- package/src/stories/TextArea.stories.ts +1 -1
- package/src/utils/sort.ts +1 -1
- package/tests/Alert.spec.tsx +2 -1
- package/tests/Badge.spec.tsx +2 -1
- package/tsconfig.json +13 -1
package/jest.config.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Config } from 'jest'
|
|
2
|
-
|
|
2
|
+
const nextJest = require('next/jest')
|
|
3
3
|
|
|
4
4
|
const createJestConfig = nextJest({
|
|
5
5
|
dir: './',
|
|
@@ -12,6 +12,14 @@ const config: Config = {
|
|
|
12
12
|
'^.+\\.(svg)$': '<rootDir>/tests/svg.mock.js',
|
|
13
13
|
},
|
|
14
14
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
|
15
|
+
globals: {
|
|
16
|
+
'ts-jest': {
|
|
17
|
+
useESM: true,
|
|
18
|
+
tsconfig: {
|
|
19
|
+
verbatimModuleSyntax: false,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
15
23
|
}
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
module.exports = createJestConfig(config)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agroptima-design-system",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.5",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "npm run storybook",
|
|
6
6
|
"storybook": "storybook dev -p 6006 --ci",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"@storybook/test": "^8.2.5",
|
|
35
35
|
"@svgr/webpack": "^8.1.0",
|
|
36
36
|
"@testing-library/jest-dom": "^6.4.2",
|
|
37
|
-
"@testing-library/react": "^
|
|
37
|
+
"@testing-library/react": "^16.0.0",
|
|
38
38
|
"@types/jest": "^29.5.12",
|
|
39
39
|
"@types/jest-axe": "^3.5.9",
|
|
40
|
-
"@types/node": "^
|
|
40
|
+
"@types/node": "^22.1.0",
|
|
41
41
|
"@types/react": "^18.2.38",
|
|
42
42
|
"@types/react-dom": "^18.2.17",
|
|
43
43
|
"eslint": "^8",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"eslint-plugin-prettier": "^5.0.1",
|
|
47
47
|
"eslint-plugin-storybook": "^0.8.0",
|
|
48
48
|
"jest": "^29.7.0",
|
|
49
|
-
"jest-axe": "^
|
|
49
|
+
"jest-axe": "^9.0.0",
|
|
50
50
|
"jest-environment-jsdom": "^29.7.0",
|
|
51
51
|
"storybook": "^8.2.5",
|
|
52
52
|
"ts-node": "^10.9.2",
|
package/src/atoms/Alert.scss
CHANGED
package/src/atoms/Alert.tsx
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
1
|
+
import type { IconType } from '../Icon'
|
|
2
|
+
import type { BaseButtonProps } from './BaseButton'
|
|
3
|
+
import { Icon } from '../Icon'
|
|
3
4
|
import { classNames } from '../../utils/classNames'
|
|
4
|
-
import {
|
|
5
|
+
import { BaseButton } from './BaseButton'
|
|
6
|
+
import './Button.scss'
|
|
5
7
|
|
|
6
8
|
interface CustomProps {
|
|
7
9
|
label: string
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
1
|
+
import type { IconType } from '../Icon'
|
|
2
|
+
import type { BaseButtonProps } from './BaseButton'
|
|
3
|
+
import { Icon } from '../Icon'
|
|
3
4
|
import { classNames } from '../../utils/classNames'
|
|
4
|
-
import {
|
|
5
|
+
import { BaseButton } from './BaseButton'
|
|
6
|
+
import './FloatingButton.scss'
|
|
5
7
|
|
|
6
8
|
export type Variant = 'primary'
|
|
7
9
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
1
|
+
import type { IconType } from '../Icon'
|
|
2
|
+
import type { BaseButtonProps } from './BaseButton'
|
|
3
|
+
import { Icon } from '../Icon'
|
|
3
4
|
import { classNames } from '../../utils/classNames'
|
|
4
|
-
import {
|
|
5
|
+
import { BaseButton } from './BaseButton'
|
|
6
|
+
import './IconButton.scss'
|
|
5
7
|
|
|
6
8
|
export type Variant = 'primary' | 'secondary'
|
|
7
9
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '
|
|
1
|
+
import type { IconType } from '../Icon'
|
|
2
|
+
import type { LinkProps as NextLinkProps } from 'next/link'
|
|
3
|
+
import { Icon } from '../Icon'
|
|
3
4
|
import { classNames } from '../../utils/classNames'
|
|
4
|
-
import Link
|
|
5
|
+
import Link from 'next/link'
|
|
6
|
+
import './CardMenu.scss'
|
|
5
7
|
|
|
6
8
|
export type Variant = 'primary'
|
|
7
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import type { IconType } from './Icon'
|
|
2
2
|
import React, { useState } from 'react'
|
|
3
3
|
import { sortBy } from '../utils/sort'
|
|
4
4
|
import {
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
CardsTableHead,
|
|
10
10
|
CardsTableBody,
|
|
11
11
|
} from './CardsTable'
|
|
12
|
-
|
|
13
|
-
import
|
|
12
|
+
import { Icon } from './Icon'
|
|
13
|
+
import './CardsTable/CardsTable.scss'
|
|
14
14
|
|
|
15
15
|
export type Variant = 'primary'
|
|
16
16
|
|
package/src/atoms/EmptyState.tsx
CHANGED
package/src/atoms/Input.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { IconType } from './Icon'
|
|
1
2
|
import React, { useState } from 'react'
|
|
2
|
-
import { Icon
|
|
3
|
+
import { Icon } from './Icon'
|
|
3
4
|
import { classNames } from '../utils/classNames'
|
|
4
5
|
import { buildHelpText } from '../utils/buildHelpText'
|
|
5
6
|
import './Input.scss'
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import type { IconType } from '../Icon'
|
|
2
2
|
import React from 'react'
|
|
3
|
-
import { Icon
|
|
3
|
+
import { Icon } from '../Icon'
|
|
4
4
|
import { classNames } from '../../utils/classNames'
|
|
5
5
|
import Link from 'next/link'
|
|
6
|
+
import './Menu.scss'
|
|
6
7
|
|
|
7
8
|
export type Variant = 'primary'
|
|
8
9
|
|
package/src/atoms/Modal.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { IconButtonProps } from '../Button'
|
|
1
2
|
import React from 'react'
|
|
2
3
|
import { classNames } from '../../utils/classNames'
|
|
4
|
+
import { IconButton } from '../Button'
|
|
3
5
|
import './Pagination.scss'
|
|
4
|
-
import { IconButton, IconButtonProps } from '../Button'
|
|
5
6
|
|
|
6
7
|
export type Variant = 'primary'
|
|
7
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ButtonProps } from '../Button'
|
|
1
2
|
import React from 'react'
|
|
2
3
|
import { classNames } from '../../utils/classNames'
|
|
4
|
+
import { Button } from '../Button'
|
|
3
5
|
import './Pagination.scss'
|
|
4
|
-
import { Button, ButtonProps } from '../Button'
|
|
5
6
|
|
|
6
7
|
export type Variant = 'primary'
|
|
7
8
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { InputProps } from './Input'
|
|
1
2
|
import React from 'react'
|
|
2
3
|
import { classNames } from '../utils/classNames'
|
|
3
|
-
import { Input
|
|
4
|
+
import { Input } from './Input'
|
|
4
5
|
import { Button } from './Button'
|
|
5
6
|
import './QuantitySelector.scss'
|
|
6
7
|
|
|
@@ -6,6 +6,10 @@ import { Meta } from "@storybook/blocks";
|
|
|
6
6
|
|
|
7
7
|
# 0.24.4
|
|
8
8
|
|
|
9
|
+
* Remove margin from Alert component.
|
|
10
|
+
|
|
11
|
+
# 0.24.4
|
|
12
|
+
|
|
9
13
|
* Details Modal component height has been changed to 100%.
|
|
10
14
|
* Details Modal component footer has been changed to fixed.
|
|
11
15
|
* Collapsible component accepts a new property `noHorizontalPadding`.
|
package/src/utils/sort.ts
CHANGED
package/tests/Alert.spec.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { Variant } from '@/atoms/Alert'
|
|
1
2
|
import React from 'react'
|
|
2
3
|
import { screen, render } from '@testing-library/react'
|
|
3
|
-
import { Alert
|
|
4
|
+
import { Alert } from '@/atoms/Alert'
|
|
4
5
|
|
|
5
6
|
describe('Alert', () => {
|
|
6
7
|
const variants = ['info', 'success', 'warning', 'error']
|
package/tests/Badge.spec.tsx
CHANGED
package/tsconfig.json
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"isolatedModules": true,
|
|
14
14
|
"jsx": "preserve",
|
|
15
15
|
"incremental": true,
|
|
16
|
+
"verbatimModuleSyntax": true,
|
|
16
17
|
"plugins": [
|
|
17
18
|
{
|
|
18
19
|
"name": "next"
|
|
@@ -22,6 +23,17 @@
|
|
|
22
23
|
"@/*": ["./src/*"]
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
|
-
"include": [
|
|
26
|
+
"include": [
|
|
27
|
+
"next-env.d.ts",
|
|
28
|
+
"**/*.ts",
|
|
29
|
+
"**/*.tsx",
|
|
30
|
+
".next/types/**/*.ts",
|
|
31
|
+
"src/stories/CardsTable.stories.js",
|
|
32
|
+
"src/stories/Modal.stories.js",
|
|
33
|
+
"src/stories/Typography.stories.mdx",
|
|
34
|
+
"src/stories/Card.stories.js",
|
|
35
|
+
"src/stories/Menu.stories.js",
|
|
36
|
+
"src/stories/EmptyState.stories.js"
|
|
37
|
+
],
|
|
26
38
|
"exclude": ["node_modules"]
|
|
27
39
|
}
|