agroptima-design-system 0.27.11 → 0.27.12
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/.github/workflows/run-linters.yml +1 -1
- package/.github/workflows/run-tests.yml +1 -1
- package/.nvmrc +1 -1
- package/package.json +12 -13
- package/src/atoms/Multiselect.tsx +2 -2
- package/src/stories/Alert.stories.ts +1 -1
- package/src/stories/CardMenu.stories.js +0 -2
- package/src/stories/CardsTable.stories.js +3 -3
- package/src/stories/Collapsible.stories.js +6 -6
- package/src/stories/Drawer.stories.js +1 -1
- package/src/stories/Form.stories.js +3 -3
- package/src/stories/Modal.stories.js +4 -4
- package/src/stories/Popover.stories.js +2 -2
- package/tests/Alert.spec.tsx +2 -2
- package/tests/Badge.spec.tsx +2 -2
- package/tests/Button.spec.tsx +2 -2
- package/tests/Card.spec.tsx +2 -2
- package/tests/CardMenuOption.spec.tsx +1 -1
- package/tests/CardsTable.spec.tsx +3 -3
- package/tests/CheckableTag.spec.tsx +2 -2
- package/tests/Checkbox.spec.tsx +1 -1
- package/tests/Collapsible.spec.tsx +2 -2
- package/tests/Drawer.spec.tsx +3 -3
- package/tests/EmptyState.spec.tsx +3 -3
- package/tests/FloatingButton.spec.tsx +2 -2
- package/tests/Icon.spec.tsx +1 -1
- package/tests/IconButton.spec.tsx +2 -2
- package/tests/Input.spec.tsx +1 -1
- package/tests/Menu.spec.tsx +2 -2
- package/tests/Modal.spec.tsx +1 -1
- package/tests/Multiselect.spec.tsx +1 -1
- package/tests/Pagination.spec.tsx +1 -1
- package/tests/Popover.spec.tsx +2 -2
- package/tests/QuantitySelector.spec.tsx +1 -2
- package/tests/RadioButton.spec.tsx +1 -2
- package/tests/Select.spec.tsx +1 -2
- package/tests/TextArea.spec.tsx +1 -2
- package/tests/utils/classNames.spec.tsx +1 -1
- package/tsconfig.json +1 -4
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
lts/*
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agroptima-design-system",
|
|
3
|
-
|
|
4
|
-
"version": "0.27.11",
|
|
3
|
+
"version": "0.27.12",
|
|
5
4
|
"scripts": {
|
|
6
5
|
"dev": "npm run storybook",
|
|
7
6
|
"storybook": "storybook dev -p 6006 --ci",
|
|
@@ -25,16 +24,16 @@
|
|
|
25
24
|
"@chromatic-com/storybook": "^3.2.2",
|
|
26
25
|
"@eslint/eslintrc": "^3.1.0",
|
|
27
26
|
"@eslint/js": "^9.14.0",
|
|
28
|
-
"@storybook/addon-a11y": "^8.4.
|
|
27
|
+
"@storybook/addon-a11y": "^8.4.5",
|
|
29
28
|
"@storybook/addon-designs": "^8.0.4",
|
|
30
|
-
"@storybook/addon-essentials": "^8.4.
|
|
31
|
-
"@storybook/addon-interactions": "^8.4.
|
|
32
|
-
"@storybook/addon-links": "^8.4.
|
|
33
|
-
"@storybook/addon-viewport": "^8.4.
|
|
34
|
-
"@storybook/blocks": "^8.4.
|
|
35
|
-
"@storybook/nextjs": "^8.4.
|
|
36
|
-
"@storybook/react": "^8.4.
|
|
37
|
-
"@storybook/test": "^8.4.
|
|
29
|
+
"@storybook/addon-essentials": "^8.4.5",
|
|
30
|
+
"@storybook/addon-interactions": "^8.4.5",
|
|
31
|
+
"@storybook/addon-links": "^8.4.5",
|
|
32
|
+
"@storybook/addon-viewport": "^8.4.5",
|
|
33
|
+
"@storybook/blocks": "^8.4.5",
|
|
34
|
+
"@storybook/nextjs": "^8.4.5",
|
|
35
|
+
"@storybook/react": "^8.4.5",
|
|
36
|
+
"@storybook/test": "^8.4.5",
|
|
38
37
|
"@svgr/webpack": "^8.1.0",
|
|
39
38
|
"@testing-library/jest-dom": "^6.6.3",
|
|
40
39
|
"@testing-library/react": "^16.0.1",
|
|
@@ -49,12 +48,12 @@
|
|
|
49
48
|
"eslint-config-next": "15.0.3",
|
|
50
49
|
"eslint-config-prettier": "^9.0.0",
|
|
51
50
|
"eslint-plugin-prettier": "^5.0.1",
|
|
52
|
-
"eslint-plugin-storybook": "^0.11.
|
|
51
|
+
"eslint-plugin-storybook": "^0.11.1",
|
|
53
52
|
"jest": "^29.7.0",
|
|
54
53
|
"jest-axe": "^9.0.0",
|
|
55
54
|
"jest-environment-jsdom": "^29.7.0",
|
|
56
55
|
"prettier": "3.3.3",
|
|
57
|
-
"storybook": "^8.4.
|
|
56
|
+
"storybook": "^8.4.5",
|
|
58
57
|
"ts-node": "^10.9.2",
|
|
59
58
|
"typescript": "^5.6.3"
|
|
60
59
|
},
|
|
@@ -4,8 +4,8 @@ import { Icon } from './Icon'
|
|
|
4
4
|
import { IconButton } from './Button'
|
|
5
5
|
import { classNames } from '../utils/classNames'
|
|
6
6
|
import { buildHelpText } from '../utils/buildHelpText'
|
|
7
|
-
import { useOutsideClick } from '
|
|
8
|
-
import { useOpen } from '
|
|
7
|
+
import { useOutsideClick } from '../utils/useOutsideClick'
|
|
8
|
+
import { useOpen } from '../utils/useOpen'
|
|
9
9
|
|
|
10
10
|
export type Variant = 'primary'
|
|
11
11
|
export type Option = { id: string; label: string }
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
} from '../atoms/CardsTable'
|
|
11
11
|
import { IconButton } from '../atoms/Button'
|
|
12
12
|
import { Badge } from '../atoms/Badge'
|
|
13
|
-
import { Checkbox } from '
|
|
14
|
-
import { Popover, PopoverMenu, PopoverMenuOption } from '
|
|
15
|
-
import { Button } from '
|
|
13
|
+
import { Checkbox } from '../atoms/Checkbox'
|
|
14
|
+
import { Popover, PopoverMenu, PopoverMenuOption } from '../atoms/Popover'
|
|
15
|
+
import { Button } from '../atoms/Button'
|
|
16
16
|
|
|
17
17
|
const figmaPrimaryDesign = {
|
|
18
18
|
design: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Collapsible } from '
|
|
3
|
-
import { Input } from '
|
|
4
|
-
import { Select } from '
|
|
5
|
-
import { Card } from '
|
|
6
|
-
import { Form as FormComponent, Actions } from '
|
|
7
|
-
import { Button } from '
|
|
2
|
+
import { Collapsible } from '../atoms/Collapsible'
|
|
3
|
+
import { Input } from '../atoms/Input'
|
|
4
|
+
import { Select } from '../atoms/Select'
|
|
5
|
+
import { Card } from '../atoms/Card'
|
|
6
|
+
import { Form as FormComponent, Actions } from '../atoms/Form'
|
|
7
|
+
import { Button } from '../atoms/Button'
|
|
8
8
|
|
|
9
9
|
const figmaPrimaryDesign = {
|
|
10
10
|
design: {
|
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
|
|
3
3
|
import { Drawer } from '../atoms/Drawer'
|
|
4
4
|
import { CheckableTagGroup, CheckableTag } from '../atoms/CheckableTag'
|
|
5
|
-
import { Collapsible } from '
|
|
5
|
+
import { Collapsible } from '../atoms/Collapsible'
|
|
6
6
|
|
|
7
7
|
const figmaPrimaryDesign = {
|
|
8
8
|
design: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Form, Actions } from '
|
|
2
|
-
import { Input } from '
|
|
3
|
-
import { Button } from '
|
|
1
|
+
import { Form, Actions } from '../atoms/Form'
|
|
2
|
+
import { Input } from '../atoms/Input'
|
|
3
|
+
import { Button } from '../atoms/Button'
|
|
4
4
|
|
|
5
5
|
const meta = {
|
|
6
6
|
title: 'Design System/Atoms/Form',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Modal } from '
|
|
3
|
-
import { DetailItem } from '
|
|
4
|
-
import { Collapsible } from '
|
|
5
|
-
import { Card } from '
|
|
2
|
+
import { Modal } from '../atoms/Modal'
|
|
3
|
+
import { DetailItem } from '../atoms/DetailItem'
|
|
4
|
+
import { Collapsible } from '../atoms/Collapsible'
|
|
5
|
+
import { Card } from '../atoms/Card'
|
|
6
6
|
|
|
7
7
|
const figmaPrimaryDesign = {
|
|
8
8
|
design: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Popover, PopoverMenu, PopoverMenuOption } from '
|
|
3
|
-
import { Button } from '
|
|
2
|
+
import { Popover, PopoverMenu, PopoverMenuOption } from '../atoms/Popover'
|
|
3
|
+
import { Button } from '../atoms/Button'
|
|
4
4
|
|
|
5
5
|
const figmaPrimaryDesign = {
|
|
6
6
|
design: {
|
package/tests/Alert.spec.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Variant } from '
|
|
1
|
+
import type { Variant } from '../src/atoms/Alert/Alert'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { screen, render } from '@testing-library/react'
|
|
4
|
-
import { Alert } from '
|
|
4
|
+
import { Alert } from '../src/atoms/Alert'
|
|
5
5
|
|
|
6
6
|
describe('Alert', () => {
|
|
7
7
|
const variants = ['info', 'success', 'warning', 'error']
|
package/tests/Badge.spec.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Variant } from '
|
|
1
|
+
import type { Variant } from '../src/atoms/Badge'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { getByTitle, render, screen } from '@testing-library/react'
|
|
4
|
-
import { Badge } from '
|
|
4
|
+
import { Badge } from '../src/atoms/Badge'
|
|
5
5
|
|
|
6
6
|
describe('Badge', () => {
|
|
7
7
|
const variants = [
|
package/tests/Button.spec.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ButtonVariant } from '
|
|
1
|
+
import type { ButtonVariant } from '../src/atoms/Button/Button'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { screen, render } from '@testing-library/react'
|
|
4
4
|
import userEvent from '@testing-library/user-event'
|
|
5
|
-
import { Button } from '
|
|
5
|
+
import { Button } from '../src/atoms/Button/Button'
|
|
6
6
|
|
|
7
7
|
describe('Button', () => {
|
|
8
8
|
const variants = [
|
package/tests/Card.spec.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { render } from '@testing-library/react'
|
|
3
|
-
import { Card, CardHeader, CardContent, CardFooter } from '
|
|
4
|
-
import { Button } from '
|
|
3
|
+
import { Card, CardHeader, CardContent, CardFooter } from '../src/atoms/Card'
|
|
4
|
+
import { Button } from '../src/atoms/Button'
|
|
5
5
|
|
|
6
6
|
describe('Product card', () => {
|
|
7
7
|
it('renders the expected structure and data', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { render } from '@testing-library/react'
|
|
3
|
-
import { CardMenuOption } from '
|
|
3
|
+
import { CardMenuOption } from '../src/atoms/CardMenu/CardMenuOption'
|
|
4
4
|
|
|
5
5
|
describe('CardMenuOption', () => {
|
|
6
6
|
it('renders', () => {
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
CardsTableBody,
|
|
9
9
|
CardsTableCell,
|
|
10
10
|
Alignment,
|
|
11
|
-
} from '
|
|
12
|
-
import { IconButton } from '
|
|
13
|
-
import { Badge } from '
|
|
11
|
+
} from '../src/atoms/CardsTable'
|
|
12
|
+
import { IconButton } from '../src/atoms/Button'
|
|
13
|
+
import { Badge } from '../src/atoms/Badge'
|
|
14
14
|
|
|
15
15
|
describe('CardsTable', () => {
|
|
16
16
|
it('renders', () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Variant } from '
|
|
1
|
+
import type { Variant } from '../src/atoms/CheckableTag'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { render } from '@testing-library/react'
|
|
4
|
-
import { CheckableTag } from '
|
|
4
|
+
import { CheckableTag } from '../src/atoms/CheckableTag'
|
|
5
5
|
|
|
6
6
|
describe('CheckableTag', () => {
|
|
7
7
|
const variants = ['primary']
|
package/tests/Checkbox.spec.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { render } from '@testing-library/react'
|
|
3
|
-
import { Collapsible } from '
|
|
4
|
-
import { Input } from '
|
|
3
|
+
import { Collapsible } from '../src/atoms/Collapsible'
|
|
4
|
+
import { Input } from '../src/atoms/Input'
|
|
5
5
|
|
|
6
6
|
describe('Collapsible', () => {
|
|
7
7
|
it('renders', () => {
|
package/tests/Drawer.spec.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { render } from '@testing-library/react'
|
|
3
|
-
import { Drawer } from '
|
|
4
|
-
import { Collapsible } from '
|
|
5
|
-
import { CheckableTag, CheckableTagGroup } from '
|
|
3
|
+
import { Drawer } from '../src/atoms/Drawer'
|
|
4
|
+
import { Collapsible } from '../src/atoms/Collapsible'
|
|
5
|
+
import { CheckableTag, CheckableTagGroup } from '../src/atoms/CheckableTag'
|
|
6
6
|
|
|
7
7
|
describe('Drawer', () => {
|
|
8
8
|
it('renders with expected title, content and buttons', () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { render } from '@testing-library/react'
|
|
3
|
-
import type { Variant } from '
|
|
4
|
-
import { EmptyState } from '
|
|
5
|
-
import { Button } from '
|
|
3
|
+
import type { Variant } from '../src/atoms/EmptyState'
|
|
4
|
+
import { EmptyState } from '../src/atoms/EmptyState'
|
|
5
|
+
import { Button } from '../src/atoms/Button/Button'
|
|
6
6
|
|
|
7
7
|
describe('EmptyState', () => {
|
|
8
8
|
const variants = ['primary']
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Variant } from '
|
|
1
|
+
import type { Variant } from '../src/atoms/Button/FloatingButton'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { screen, render } from '@testing-library/react'
|
|
4
4
|
import userEvent from '@testing-library/user-event'
|
|
5
|
-
import { FloatingButton } from '
|
|
5
|
+
import { FloatingButton } from '../src/atoms/Button/FloatingButton'
|
|
6
6
|
|
|
7
7
|
describe('Floating Button', () => {
|
|
8
8
|
const variants = ['primary']
|
package/tests/Icon.spec.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Variant } from '
|
|
1
|
+
import type { Variant } from '../src/atoms/Button/IconButton'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { screen, render } from '@testing-library/react'
|
|
4
4
|
import userEvent from '@testing-library/user-event'
|
|
5
|
-
import { IconButton } from '
|
|
5
|
+
import { IconButton } from '../src/atoms/Button/IconButton'
|
|
6
6
|
|
|
7
7
|
describe('Icon Button', () => {
|
|
8
8
|
const variants = ['primary', 'secondary']
|
package/tests/Input.spec.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { getByText, render, screen } from '@testing-library/react'
|
|
3
3
|
import userEvent from '@testing-library/user-event'
|
|
4
|
-
import { Input } from '
|
|
4
|
+
import { Input } from '../src/atoms/Input'
|
|
5
5
|
|
|
6
6
|
describe('Input', () => {
|
|
7
7
|
it('renders the Text type', () => {
|
package/tests/Menu.spec.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { render } from '@testing-library/react'
|
|
3
|
-
import { Menu } from '
|
|
4
|
-
import { MenuDropdown, MenuLink } from '
|
|
3
|
+
import { Menu } from '../src/atoms/Menu/Menu'
|
|
4
|
+
import { MenuDropdown, MenuLink } from '../src/atoms/Menu'
|
|
5
5
|
|
|
6
6
|
describe('Menu', () => {
|
|
7
7
|
it('renders first-level menu', () => {
|
package/tests/Modal.spec.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { render, screen } from '@testing-library/react'
|
|
3
3
|
import userEvent from '@testing-library/user-event'
|
|
4
|
-
import { Multiselect } from '
|
|
4
|
+
import { Multiselect } from '../src/atoms/Multiselect'
|
|
5
5
|
import { Placeholder } from 'storybook/internal/components'
|
|
6
6
|
|
|
7
7
|
describe('Multiselect', () => {
|
package/tests/Popover.spec.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { render } from '@testing-library/react'
|
|
3
|
-
import { Popover, PopoverMenu, PopoverMenuOption } from '@/atoms/Popover'
|
|
4
|
-
import { Button } from '@/atoms/Button'
|
|
5
3
|
import userEvent from '@testing-library/user-event'
|
|
4
|
+
import { Popover, PopoverMenu, PopoverMenuOption } from '../src/atoms/Popover'
|
|
5
|
+
import { Button } from '../src/atoms/Button'
|
|
6
6
|
|
|
7
7
|
describe('PopoverMenu', () => {
|
|
8
8
|
it('shows when click on button', async () => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import { render } from '@testing-library/react'
|
|
3
|
-
import { QuantitySelector } from '
|
|
2
|
+
import { QuantitySelector } from '../src/atoms/QuantitySelector'
|
|
4
3
|
|
|
5
4
|
describe('QuantitySelector', () => {
|
|
6
5
|
it('renders', () => {
|
package/tests/Select.spec.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import { render, screen } from '@testing-library/react'
|
|
2
|
+
import { Select } from '../src/atoms/Select'
|
|
3
3
|
import userEvent from '@testing-library/user-event'
|
|
4
|
-
import { Select } from '@/atoms/Select'
|
|
5
4
|
|
|
6
5
|
describe('Select', () => {
|
|
7
6
|
it('renders', async () => {
|
package/tests/TextArea.spec.tsx
CHANGED