agroptima-design-system 0.37.2-beta.0 → 0.37.3
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/package.json
CHANGED
package/src/atoms/Checkbox.tsx
CHANGED
|
@@ -46,7 +46,7 @@ export function Checkbox({
|
|
|
46
46
|
type="checkbox"
|
|
47
47
|
className="checkbox"
|
|
48
48
|
disabled={disabled}
|
|
49
|
-
aria-label={accessibilityLabel}
|
|
49
|
+
aria-label={accessibilityLabel || `${name} checkbox`}
|
|
50
50
|
{...props}
|
|
51
51
|
/>
|
|
52
52
|
<Label
|
|
@@ -54,8 +54,9 @@ export function Checkbox({
|
|
|
54
54
|
required={props.required}
|
|
55
55
|
disabled={disabled}
|
|
56
56
|
className={classNames({ 'visually-hidden': hideLabel })}
|
|
57
|
+
aria-labelledby={identifier}
|
|
57
58
|
>
|
|
58
|
-
{children
|
|
59
|
+
{children}
|
|
59
60
|
</Label>
|
|
60
61
|
</div>
|
|
61
62
|
)
|
package/tests/Divider.spec.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { IconButton } from '../src/atoms/Button'
|
|
|
4
4
|
import { Divider } from '../src/atoms/Divider'
|
|
5
5
|
|
|
6
6
|
describe('Divider', () => {
|
|
7
|
-
it('renders', () => {
|
|
7
|
+
it('renders with title', () => {
|
|
8
8
|
const { getByRole, getByText, container } = render(
|
|
9
9
|
<Divider title="A title divider" icon="Line" />,
|
|
10
10
|
)
|
|
@@ -44,4 +44,10 @@ describe('Divider', () => {
|
|
|
44
44
|
expect(getByText('A title divider with button')).toBeInTheDocument()
|
|
45
45
|
expect(handleClick).toHaveBeenCalledTimes(1)
|
|
46
46
|
})
|
|
47
|
+
|
|
48
|
+
it('renders without title nor icon', () => {
|
|
49
|
+
const { getByRole, container } = render(<Divider />)
|
|
50
|
+
expect(getByRole('separator')).toHaveClass('divider primary')
|
|
51
|
+
expect(container.querySelector('.long.line')).toBeInTheDocument()
|
|
52
|
+
})
|
|
47
53
|
})
|