playbook_ui 14.6.2.pre.alpha.PLAY1551tiptapextbump4350 → 14.6.2.pre.alpha.PLAY1607dependencydisplayymlupdate4271
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +1 -2
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +2 -1
- data/app/pb_kits/playbook/pb_currency/_currency.tsx +6 -16
- data/app/pb_kits/playbook/pb_currency/currency.rb +11 -38
- data/app/pb_kits/playbook/pb_currency/currency.test.js +0 -35
- data/app/pb_kits/playbook/pb_currency/docs/example.yml +1 -3
- data/app/pb_kits/playbook/pb_currency/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +1 -67
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +0 -1
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +1 -5
- data/app/pb_kits/playbook/tokens/_typography.scss +0 -35
- data/dist/chunks/_weekday_stacked-Dh3OU4s8.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +316 -4
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +3 -23
- data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.html.erb +0 -7
- data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.jsx +0 -18
- data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.md +0 -3
- data/app/pb_kits/playbook/pb_link/_link.scss +0 -66
- data/app/pb_kits/playbook/pb_link/_link.tsx +0 -107
- data/app/pb_kits/playbook/pb_link/docs/_link_color.html.erb +0 -30
- data/app/pb_kits/playbook/pb_link/docs/_link_color.jsx +0 -40
- data/app/pb_kits/playbook/pb_link/docs/_link_disabled.html.erb +0 -5
- data/app/pb_kits/playbook/pb_link/docs/_link_disabled.jsx +0 -15
- data/app/pb_kits/playbook/pb_link/docs/_link_icon.html.erb +0 -15
- data/app/pb_kits/playbook/pb_link/docs/_link_icon.jsx +0 -25
- data/app/pb_kits/playbook/pb_link/docs/_link_tag.html.erb +0 -35
- data/app/pb_kits/playbook/pb_link/docs/_link_tag.jsx +0 -45
- data/app/pb_kits/playbook/pb_link/docs/_link_underline.html.erb +0 -5
- data/app/pb_kits/playbook/pb_link/docs/_link_underline.jsx +0 -15
- data/app/pb_kits/playbook/pb_link/docs/example.yml +0 -16
- data/app/pb_kits/playbook/pb_link/docs/index.js +0 -5
- data/app/pb_kits/playbook/pb_link/link.html.erb +0 -21
- data/app/pb_kits/playbook/pb_link/link.rb +0 -44
- data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -92
- data/dist/chunks/_weekday_stacked-BLVPFG6h.js +0 -45
@@ -1,92 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { ensureAccessible, renderKit, render, screen } from '../utilities/test-utils'
|
3
|
-
|
4
|
-
import { Link } from 'playbook-ui'
|
5
|
-
|
6
|
-
const link = 'https://www.google.com'
|
7
|
-
|
8
|
-
const props = {
|
9
|
-
data: { testid: 'default' },
|
10
|
-
href: link,
|
11
|
-
}
|
12
|
-
|
13
|
-
test('returns namespaced class name', () => {
|
14
|
-
const kit = renderKit(Link , props)
|
15
|
-
expect(kit).toBeInTheDocument()
|
16
|
-
expect(kit).toHaveClass('pb_link_kit')
|
17
|
-
expect(kit).toHaveAttribute('href', link)
|
18
|
-
})
|
19
|
-
|
20
|
-
it("should be accessible", async () => {
|
21
|
-
ensureAccessible(Link, props)
|
22
|
-
})
|
23
|
-
|
24
|
-
test('with colors', () => {
|
25
|
-
['default', 'body', 'muted', 'destructive'].forEach((color) => {
|
26
|
-
const testId = `colors-test-${color}`
|
27
|
-
render(
|
28
|
-
<Link
|
29
|
-
color={color}
|
30
|
-
data={{ testid: testId }}
|
31
|
-
text="Test colors"
|
32
|
-
/>
|
33
|
-
)
|
34
|
-
|
35
|
-
const kit = screen.getByTestId(testId)
|
36
|
-
expect(kit).toHaveClass(`pb_link_kit_${color}`)
|
37
|
-
})
|
38
|
-
})
|
39
|
-
|
40
|
-
test('disable prop', () => {
|
41
|
-
render(
|
42
|
-
<Link
|
43
|
-
data={{ testid: 'disable-test' }}
|
44
|
-
disabled
|
45
|
-
/>
|
46
|
-
)
|
47
|
-
|
48
|
-
const kit = screen.getByTestId('disable-test')
|
49
|
-
|
50
|
-
expect(kit).toHaveClass('pb_link_kit_disabled')
|
51
|
-
})
|
52
|
-
|
53
|
-
test('underline prop', () => {
|
54
|
-
render(
|
55
|
-
<Link
|
56
|
-
data={{ testid: 'underline-test' }}
|
57
|
-
underline
|
58
|
-
/>
|
59
|
-
)
|
60
|
-
|
61
|
-
const kit = screen.getByTestId('underline-test')
|
62
|
-
|
63
|
-
expect(kit).toHaveClass('pb_link_kit_underline')
|
64
|
-
})
|
65
|
-
|
66
|
-
test('adds icon', () => {
|
67
|
-
render(
|
68
|
-
<Link
|
69
|
-
data={{ testid: 'icon-test' }}
|
70
|
-
icon="arrow-up-right-from-square"
|
71
|
-
/>
|
72
|
-
)
|
73
|
-
|
74
|
-
const kit = screen.getByTestId('icon-test')
|
75
|
-
|
76
|
-
const icon = kit.querySelector('.pb_icon_kit')
|
77
|
-
expect(icon).toBeInTheDocument();
|
78
|
-
})
|
79
|
-
|
80
|
-
test('adds icon right', () => {
|
81
|
-
render(
|
82
|
-
<Link
|
83
|
-
data={{ testid: 'icon-right-test' }}
|
84
|
-
iconRight="chevron-right"
|
85
|
-
/>
|
86
|
-
)
|
87
|
-
|
88
|
-
const kit = screen.getByTestId('icon-right-test')
|
89
|
-
|
90
|
-
const icon = kit.querySelector('.pb_icon_kit')
|
91
|
-
expect(icon).toBeInTheDocument();
|
92
|
-
})
|