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.
Files changed (39) hide show
  1. package/.github/workflows/run-linters.yml +1 -1
  2. package/.github/workflows/run-tests.yml +1 -1
  3. package/.nvmrc +1 -1
  4. package/package.json +12 -13
  5. package/src/atoms/Multiselect.tsx +2 -2
  6. package/src/stories/Alert.stories.ts +1 -1
  7. package/src/stories/CardMenu.stories.js +0 -2
  8. package/src/stories/CardsTable.stories.js +3 -3
  9. package/src/stories/Collapsible.stories.js +6 -6
  10. package/src/stories/Drawer.stories.js +1 -1
  11. package/src/stories/Form.stories.js +3 -3
  12. package/src/stories/Modal.stories.js +4 -4
  13. package/src/stories/Popover.stories.js +2 -2
  14. package/tests/Alert.spec.tsx +2 -2
  15. package/tests/Badge.spec.tsx +2 -2
  16. package/tests/Button.spec.tsx +2 -2
  17. package/tests/Card.spec.tsx +2 -2
  18. package/tests/CardMenuOption.spec.tsx +1 -1
  19. package/tests/CardsTable.spec.tsx +3 -3
  20. package/tests/CheckableTag.spec.tsx +2 -2
  21. package/tests/Checkbox.spec.tsx +1 -1
  22. package/tests/Collapsible.spec.tsx +2 -2
  23. package/tests/Drawer.spec.tsx +3 -3
  24. package/tests/EmptyState.spec.tsx +3 -3
  25. package/tests/FloatingButton.spec.tsx +2 -2
  26. package/tests/Icon.spec.tsx +1 -1
  27. package/tests/IconButton.spec.tsx +2 -2
  28. package/tests/Input.spec.tsx +1 -1
  29. package/tests/Menu.spec.tsx +2 -2
  30. package/tests/Modal.spec.tsx +1 -1
  31. package/tests/Multiselect.spec.tsx +1 -1
  32. package/tests/Pagination.spec.tsx +1 -1
  33. package/tests/Popover.spec.tsx +2 -2
  34. package/tests/QuantitySelector.spec.tsx +1 -2
  35. package/tests/RadioButton.spec.tsx +1 -2
  36. package/tests/Select.spec.tsx +1 -2
  37. package/tests/TextArea.spec.tsx +1 -2
  38. package/tests/utils/classNames.spec.tsx +1 -1
  39. package/tsconfig.json +1 -4
@@ -17,7 +17,7 @@ jobs:
17
17
  - name: Setup Node
18
18
  uses: actions/setup-node@v3
19
19
  with:
20
- node-version: 18.x
20
+ node-version: lts/*
21
21
  cache: 'npm'
22
22
 
23
23
  - name: Install dependencies
@@ -17,7 +17,7 @@ jobs:
17
17
  - name: Setup Node
18
18
  uses: actions/setup-node@v3
19
19
  with:
20
- node-version: 18.x
20
+ node-version: lts/*
21
21
  cache: 'npm'
22
22
 
23
23
  - name: Install dependencies
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 18.18
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.2",
27
+ "@storybook/addon-a11y": "^8.4.5",
29
28
  "@storybook/addon-designs": "^8.0.4",
30
- "@storybook/addon-essentials": "^8.4.2",
31
- "@storybook/addon-interactions": "^8.4.2",
32
- "@storybook/addon-links": "^8.4.2",
33
- "@storybook/addon-viewport": "^8.4.2",
34
- "@storybook/blocks": "^8.4.2",
35
- "@storybook/nextjs": "^8.4.2",
36
- "@storybook/react": "^8.4.2",
37
- "@storybook/test": "^8.4.2",
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.0",
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.2",
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 '@/utils/useOutsideClick'
8
- import { useOpen } from '@/utils/useOpen'
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 }
@@ -1,5 +1,5 @@
1
- import { Alert } from '../atoms/Alert'
2
1
  import type { StoryObj } from '@storybook/react'
2
+ import { Alert } from '../atoms/Alert'
3
3
 
4
4
  const meta = {
5
5
  title: 'Design System/Atoms/Alert',
@@ -1,5 +1,3 @@
1
- import React from 'react'
2
-
3
1
  import { CardMenu, CardMenuOption } from '../atoms/CardMenu'
4
2
 
5
3
  const figmaPrimaryDesign = {
@@ -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 '@/atoms/Checkbox'
14
- import { Popover, PopoverMenu, PopoverMenuOption } from '@/atoms/Popover'
15
- import { Button } from '@/atoms/Button'
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 '@/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'
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 '@/atoms/Collapsible'
5
+ import { Collapsible } from '../atoms/Collapsible'
6
6
 
7
7
  const figmaPrimaryDesign = {
8
8
  design: {
@@ -1,6 +1,6 @@
1
- import { Form, Actions } from '@/atoms/Form'
2
- import { Input } from '@/atoms/Input'
3
- import { Button } from '@/atoms/Button'
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 '@/atoms/Modal'
3
- import { DetailItem } from '@/atoms/DetailItem'
4
- import { Collapsible } from '@/atoms/Collapsible'
5
- import { Card } from '@/atoms/Card'
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 '@/atoms/Popover'
3
- import { Button } from '@/atoms/Button'
2
+ import { Popover, PopoverMenu, PopoverMenuOption } from '../atoms/Popover'
3
+ import { Button } from '../atoms/Button'
4
4
 
5
5
  const figmaPrimaryDesign = {
6
6
  design: {
@@ -1,7 +1,7 @@
1
- import type { Variant } from '@/atoms/Alert/Alert'
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 '@/atoms/Alert'
4
+ import { Alert } from '../src/atoms/Alert'
5
5
 
6
6
  describe('Alert', () => {
7
7
  const variants = ['info', 'success', 'warning', 'error']
@@ -1,7 +1,7 @@
1
- import type { Variant } from '@/atoms/Badge'
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 '@/atoms/Badge'
4
+ import { Badge } from '../src/atoms/Badge'
5
5
 
6
6
  describe('Badge', () => {
7
7
  const variants = [
@@ -1,8 +1,8 @@
1
- import type { ButtonVariant } from '@/atoms/Button/Button'
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 '@/atoms/Button/Button'
5
+ import { Button } from '../src/atoms/Button/Button'
6
6
 
7
7
  describe('Button', () => {
8
8
  const variants = [
@@ -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 '@/atoms/Card'
4
- import { Button } from '@/atoms/Button'
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 '@/atoms/CardMenu/CardMenuOption'
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 '@/atoms/CardsTable'
12
- import { IconButton } from '@/atoms/Button'
13
- import { Badge } from '@/atoms/Badge'
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 '@/atoms/CheckableTag'
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 '@/atoms/CheckableTag'
4
+ import { CheckableTag } from '../src/atoms/CheckableTag'
5
5
 
6
6
  describe('CheckableTag', () => {
7
7
  const variants = ['primary']
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react'
3
- import { Checkbox } from '@/atoms/Checkbox'
3
+ import { Checkbox } from '../src/atoms/Checkbox'
4
4
 
5
5
  describe('Checkbox', () => {
6
6
  const variants = ['primary']
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react'
3
- import { Collapsible } from '@/atoms/Collapsible'
4
- import { Input } from '@/atoms/Input'
3
+ import { Collapsible } from '../src/atoms/Collapsible'
4
+ import { Input } from '../src/atoms/Input'
5
5
 
6
6
  describe('Collapsible', () => {
7
7
  it('renders', () => {
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react'
3
- import { Drawer } from '@/atoms/Drawer'
4
- import { Collapsible } from '@/atoms/Collapsible'
5
- import { CheckableTag, CheckableTagGroup } from '@/atoms/CheckableTag'
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 '@/atoms/EmptyState'
4
- import { EmptyState } from '@/atoms/EmptyState'
5
- import { Button } from '@/atoms/Button/Button'
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 '@/atoms/Button/FloatingButton'
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 '@/atoms/Button/FloatingButton'
5
+ import { FloatingButton } from '../src/atoms/Button/FloatingButton'
6
6
 
7
7
  describe('Floating Button', () => {
8
8
  const variants = ['primary']
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react'
3
- import { Icon } from '@/atoms/Icon'
3
+ import { Icon } from '../src/atoms/Icon'
4
4
 
5
5
  describe('Icon', () => {
6
6
  it('renders with the expected graphic and styles', () => {
@@ -1,8 +1,8 @@
1
- import type { Variant } from '@/atoms/Button/IconButton'
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 '@/atoms/Button/IconButton'
5
+ import { IconButton } from '../src/atoms/Button/IconButton'
6
6
 
7
7
  describe('Icon Button', () => {
8
8
  const variants = ['primary', 'secondary']
@@ -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 '@/atoms/Input'
4
+ import { Input } from '../src/atoms/Input'
5
5
 
6
6
  describe('Input', () => {
7
7
  it('renders the Text type', () => {
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react'
3
- import { Menu } from '@/atoms/Menu/Menu'
4
- import { MenuDropdown, MenuLink } from '@/atoms/Menu'
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', () => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import { screen, render } from '@testing-library/react'
3
- import { Modal } from '@/atoms/Modal'
3
+ import { Modal } from '../src/atoms/Modal'
4
4
 
5
5
  describe('Modal', () => {
6
6
  const variants = ['info', 'success', 'warning', 'error']
@@ -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 '@/atoms/Multiselect'
4
+ import { Multiselect } from '../src/atoms/Multiselect'
5
5
  import { Placeholder } from 'storybook/internal/components'
6
6
 
7
7
  describe('Multiselect', () => {
@@ -5,7 +5,7 @@ import {
5
5
  PaginationArrow,
6
6
  PaginationNumber,
7
7
  Ellipsis,
8
- } from '@/atoms/Pagination'
8
+ } from '../src/atoms/Pagination'
9
9
 
10
10
  describe('Pagination', () => {
11
11
  it('renders Pagination components', () => {
@@ -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 '@/atoms/QuantitySelector'
2
+ import { QuantitySelector } from '../src/atoms/QuantitySelector'
4
3
 
5
4
  describe('QuantitySelector', () => {
6
5
  it('renders', () => {
@@ -1,6 +1,5 @@
1
- import React from 'react'
2
1
  import { render } from '@testing-library/react'
3
- import { RadioButton } from '@/atoms/RadioButton'
2
+ import { RadioButton } from '../src/atoms/RadioButton'
4
3
 
5
4
  describe('RadioButton', () => {
6
5
  const variants = ['primary']
@@ -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 () => {
@@ -1,6 +1,5 @@
1
- import React from 'react'
2
1
  import { render } from '@testing-library/react'
3
- import { TextArea } from '@/atoms/TextArea'
2
+ import { TextArea } from '../src/atoms/TextArea'
4
3
 
5
4
  describe('TextArea', () => {
6
5
  it('renders', () => {
@@ -1,4 +1,4 @@
1
- import { classNames } from '@/utils/classNames'
1
+ import { classNames } from '../../src/utils/classNames'
2
2
 
3
3
  describe('classNames', () => {
4
4
  it('returns a string of classes', () => {
package/tsconfig.json CHANGED
@@ -18,10 +18,7 @@
18
18
  {
19
19
  "name": "next"
20
20
  }
21
- ],
22
- "paths": {
23
- "@/*": ["./src/*"]
24
- }
21
+ ]
25
22
  },
26
23
  "include": [
27
24
  "next-env.d.ts",