@papillonarts/components 0.16.0 → 0.18.0
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/build/primer/Toast/Toast.md +38 -0
- package/package.json +5 -10
- package/build/primer/Alert/Alert.mdx +0 -88
- package/build/primer/Blankslate/Blankslate.mdx +0 -57
- package/build/primer/Breadcrumb/Breadcrumb.mdx +0 -23
- package/build/primer/Button/Button.mdx +0 -239
- package/build/primer/Dropdown/Dropdown.mdx +0 -19
- package/build/primer/Form/Checkbox/Checkbox.mdx +0 -32
- package/build/primer/Form/Checkbox/__tests__/__snapshots__/Checkbox.int.test.ts.snap +0 -75
- package/build/primer/Form/Input/Input.mdx +0 -34
- package/build/primer/Form/Input/__tests__/__snapshots__/Input.int.test.ts.snap +0 -23
- package/build/primer/Form/Radio/Radio.mdx +0 -25
- package/build/primer/Form/Radio/__tests__/__snapshots__/Radio.int.test.ts.snap +0 -65
- package/build/primer/Grid/DisplayTable/DisplayTable.mdx +0 -14
- package/build/primer/Grid/DisplayTable/__tests__/__snapshots__/DisplayTable.int.test.ts.snap +0 -326
- package/build/primer/Grid/FlexGrid/FlexGrid.mdx +0 -106
- package/build/primer/Grid/FlexGrid/__tests__/__snapshots__/FlexGrid.int.test.ts.snap +0 -6247
- package/build/primer/Label/Label.mdx +0 -13
- package/build/primer/Loader/Loader.mdx +0 -31
- package/build/primer/Navigation/Menu/Menu.mdx +0 -25
- package/build/primer/Navigation/Menu/__tests__/__snapshots__/Menu.int.test.ts.snap +0 -114
- package/build/primer/Navigation/TabNav/TabNav.mdx +0 -56
- package/build/primer/Navigation/TabNav/__tests__/__snapshots__/TabNav.int.test.ts.snap +0 -164
- package/build/primer/Navigation/UnderlineNav/UnderlineNav.mdx +0 -65
- package/build/primer/Navigation/UnderlineNav/__tests__/__snapshots__/UnderlineNav.int.test.ts.snap +0 -259
- package/build/primer/Pagination/PreviousNext/PreviousNext.mdx +0 -20
- package/build/primer/Pagination/PreviousNext/__tests__/__snapshots__/PreviousNext.int.test.ts.snap +0 -63
- package/build/primer/Popover/Popover.mdx +0 -190
- package/build/primer/Progress/Progress.mdx +0 -31
- package/build/primer/Select/Select.mdx +0 -19
- package/build/primer/SelectMenu/SelectMenu.mdx +0 -13
- package/build/primer/Subhead/Subhead.mdx +0 -20
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Label
|
|
2
|
-
|
|
3
|
-
> Labels add metadata or indicate status of items and navigational elements. Three different types of labels are available: Labels for adding metadata, States for indicating status, and Counters for showing the count for a number of items.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - Default
|
|
8
|
-
|
|
9
|
-
## Default
|
|
10
|
-
|
|
11
|
-
```jsx
|
|
12
|
-
<Label text="default label" />
|
|
13
|
-
```
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Loader
|
|
2
|
-
|
|
3
|
-
> Loaders inform users that an action is still in progress and might take a while to complete.
|
|
4
|
-
|
|
5
|
-
## Variants
|
|
6
|
-
|
|
7
|
-
> - Heading, Text, Label, Button
|
|
8
|
-
|
|
9
|
-
## Heading
|
|
10
|
-
|
|
11
|
-
```jsx
|
|
12
|
-
<Loader variant={loaderVariant.heading} text={text} />
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Text
|
|
16
|
-
|
|
17
|
-
```jsx
|
|
18
|
-
<Loader variant={loaderVariant.text} text={text} />
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Label
|
|
22
|
-
|
|
23
|
-
```jsx
|
|
24
|
-
<Loader variant={loaderVariant.label} text={text} />
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Button
|
|
28
|
-
|
|
29
|
-
```jsx
|
|
30
|
-
<Loader variant={loaderVariant.button} text={text} />
|
|
31
|
-
```
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Menu
|
|
2
|
-
|
|
3
|
-
> The menu is a vertical list of navigational links. A menu's width and placement must be set by you. If you like, just use our grid columns as a parent. Otherwise, apply a custom width.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - Default, WithIcons, WithHeading
|
|
8
|
-
|
|
9
|
-
## Default
|
|
10
|
-
|
|
11
|
-
```jsx
|
|
12
|
-
<Menu ariaAttr={ariaAttr} items={defaultItems} onClick={action('onClick')} />
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## WithIcons
|
|
16
|
-
|
|
17
|
-
```jsx
|
|
18
|
-
<Menu ariaAttr={ariaAttr} items={iconItems} onClick={action('onClick')} />
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## WithHeading
|
|
22
|
-
|
|
23
|
-
```jsx
|
|
24
|
-
<Menu heading={heading} ariaAttr={ariaAttr} items={defaultItems} onClick={action('onClick')} />
|
|
25
|
-
```
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`<Menu /> Render must match regular() 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<nav
|
|
6
|
-
aria-label="Person settings"
|
|
7
|
-
aria-labelledby="menu-heading"
|
|
8
|
-
class="menu"
|
|
9
|
-
>
|
|
10
|
-
<a
|
|
11
|
-
aria-current="page"
|
|
12
|
-
class="menu-item"
|
|
13
|
-
href="#url"
|
|
14
|
-
>
|
|
15
|
-
Account
|
|
16
|
-
</a>
|
|
17
|
-
<a
|
|
18
|
-
class="menu-item"
|
|
19
|
-
href="#url"
|
|
20
|
-
>
|
|
21
|
-
Profile
|
|
22
|
-
</a>
|
|
23
|
-
<a
|
|
24
|
-
class="menu-item"
|
|
25
|
-
href="#url"
|
|
26
|
-
>
|
|
27
|
-
Emails
|
|
28
|
-
</a>
|
|
29
|
-
<a
|
|
30
|
-
class="menu-item"
|
|
31
|
-
href="#url"
|
|
32
|
-
>
|
|
33
|
-
Notifications
|
|
34
|
-
</a>
|
|
35
|
-
</nav>
|
|
36
|
-
</div>
|
|
37
|
-
`;
|
|
38
|
-
|
|
39
|
-
exports[`<Menu /> Render must match withHeading() 1`] = `
|
|
40
|
-
<div>
|
|
41
|
-
<nav
|
|
42
|
-
aria-label="Person settings"
|
|
43
|
-
aria-labelledby="menu-heading"
|
|
44
|
-
class="menu"
|
|
45
|
-
>
|
|
46
|
-
<span
|
|
47
|
-
class="menu-heading"
|
|
48
|
-
>
|
|
49
|
-
Menu heading
|
|
50
|
-
</span>
|
|
51
|
-
<a
|
|
52
|
-
aria-current="page"
|
|
53
|
-
class="menu-item"
|
|
54
|
-
href="#url"
|
|
55
|
-
>
|
|
56
|
-
Account
|
|
57
|
-
</a>
|
|
58
|
-
<a
|
|
59
|
-
class="menu-item"
|
|
60
|
-
href="#url"
|
|
61
|
-
>
|
|
62
|
-
Profile
|
|
63
|
-
</a>
|
|
64
|
-
<a
|
|
65
|
-
class="menu-item"
|
|
66
|
-
href="#url"
|
|
67
|
-
>
|
|
68
|
-
Emails
|
|
69
|
-
</a>
|
|
70
|
-
<a
|
|
71
|
-
class="menu-item"
|
|
72
|
-
href="#url"
|
|
73
|
-
>
|
|
74
|
-
Notifications
|
|
75
|
-
</a>
|
|
76
|
-
</nav>
|
|
77
|
-
</div>
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
exports[`<Menu /> Render must match withIcons() 1`] = `
|
|
81
|
-
<div>
|
|
82
|
-
<nav
|
|
83
|
-
aria-label="Person settings"
|
|
84
|
-
aria-labelledby="menu-heading"
|
|
85
|
-
class="menu"
|
|
86
|
-
>
|
|
87
|
-
<a
|
|
88
|
-
aria-current="page"
|
|
89
|
-
class="menu-item"
|
|
90
|
-
href="#url"
|
|
91
|
-
>
|
|
92
|
-
Account
|
|
93
|
-
</a>
|
|
94
|
-
<a
|
|
95
|
-
class="menu-item"
|
|
96
|
-
href="#url"
|
|
97
|
-
>
|
|
98
|
-
Profile
|
|
99
|
-
</a>
|
|
100
|
-
<a
|
|
101
|
-
class="menu-item"
|
|
102
|
-
href="#url"
|
|
103
|
-
>
|
|
104
|
-
Emails
|
|
105
|
-
</a>
|
|
106
|
-
<a
|
|
107
|
-
class="menu-item"
|
|
108
|
-
href="#url"
|
|
109
|
-
>
|
|
110
|
-
Notifications
|
|
111
|
-
</a>
|
|
112
|
-
</nav>
|
|
113
|
-
</div>
|
|
114
|
-
`;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# TabNav
|
|
2
|
-
|
|
3
|
-
> When you need to toggle between different views, consider using a tabnav. It'll give you a left-aligned horizontal row of tabs.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - Default
|
|
8
|
-
> - WithButtonActions, WithTextActions, WithLinkActions
|
|
9
|
-
> - WithNavigation, WithMixedEnabledVisibleItems
|
|
10
|
-
> - Inactive
|
|
11
|
-
|
|
12
|
-
## Default
|
|
13
|
-
|
|
14
|
-
```jsx
|
|
15
|
-
<TabNav ariaAttr={ariaAttr} items={defaultItems} onClick={action('onClick')} />
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## WithButtonActions
|
|
19
|
-
|
|
20
|
-
```jsx
|
|
21
|
-
<TabNav ariaAttr={ariaAttr} items={defaultItems} actions={buttonActions} onClick={action('onClick')} />
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## WithTextActions
|
|
25
|
-
|
|
26
|
-
```jsx
|
|
27
|
-
<TabNav ariaAttr={ariaAttr} items={defaultItems} actions={textActions} onClick={action('onClick')} />
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## WithLinkActions
|
|
31
|
-
|
|
32
|
-
```jsx
|
|
33
|
-
<TabNav ariaAttr={ariaAttr} items={defaultItems} actions={linkActions} onClick={action('onClick')} />
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## WithNavigation
|
|
37
|
-
|
|
38
|
-
```jsx
|
|
39
|
-
<BrowserRouter>
|
|
40
|
-
<TabNav ariaAttr={ariaAttr} items={navigationItems} onClick={action('onClick')} />
|
|
41
|
-
</BrowserRouter>
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## WithMixedEnabledVisibleItems
|
|
45
|
-
|
|
46
|
-
```jsx
|
|
47
|
-
<BrowserRouter>
|
|
48
|
-
<TabNav ariaAttr={ariaAttr} items={mixedEnabledVisibleItems} onClick={action('onClick')} />
|
|
49
|
-
</BrowserRouter>
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Inactive
|
|
53
|
-
|
|
54
|
-
```jsx
|
|
55
|
-
<TabNav ariaAttr={ariaAttr} items={defaultItems} onClick={action('onClick')} state={tabNavState.inactive} />
|
|
56
|
-
```
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`<TabNav /> Render must match inactive() 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="tabnav tabnav-inactive"
|
|
7
|
-
>
|
|
8
|
-
<nav
|
|
9
|
-
aria-label="Foo bar"
|
|
10
|
-
class="tabnav-tabs"
|
|
11
|
-
>
|
|
12
|
-
<a
|
|
13
|
-
aria-current="page"
|
|
14
|
-
class="tabnav-tab"
|
|
15
|
-
href="#url"
|
|
16
|
-
>
|
|
17
|
-
Foo tab
|
|
18
|
-
</a>
|
|
19
|
-
<a
|
|
20
|
-
class="tabnav-tab"
|
|
21
|
-
href="#url"
|
|
22
|
-
>
|
|
23
|
-
Bar tab
|
|
24
|
-
</a>
|
|
25
|
-
</nav>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
exports[`<TabNav /> Render must match regular() 1`] = `
|
|
31
|
-
<div>
|
|
32
|
-
<div
|
|
33
|
-
class="tabnav"
|
|
34
|
-
>
|
|
35
|
-
<nav
|
|
36
|
-
aria-label="Foo bar"
|
|
37
|
-
class="tabnav-tabs"
|
|
38
|
-
>
|
|
39
|
-
<a
|
|
40
|
-
aria-current="page"
|
|
41
|
-
class="tabnav-tab"
|
|
42
|
-
href="#url"
|
|
43
|
-
>
|
|
44
|
-
Foo tab
|
|
45
|
-
</a>
|
|
46
|
-
<a
|
|
47
|
-
class="tabnav-tab"
|
|
48
|
-
href="#url"
|
|
49
|
-
>
|
|
50
|
-
Bar tab
|
|
51
|
-
</a>
|
|
52
|
-
</nav>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
exports[`<TabNav /> Render must match withButtonActions() 1`] = `
|
|
58
|
-
<div>
|
|
59
|
-
<div
|
|
60
|
-
class="tabnav"
|
|
61
|
-
>
|
|
62
|
-
<a
|
|
63
|
-
class="btn btn-sm float-right"
|
|
64
|
-
href="#url"
|
|
65
|
-
role="button"
|
|
66
|
-
>
|
|
67
|
-
Button
|
|
68
|
-
</a>
|
|
69
|
-
<nav
|
|
70
|
-
aria-label="Foo bar"
|
|
71
|
-
class="tabnav-tabs"
|
|
72
|
-
>
|
|
73
|
-
<a
|
|
74
|
-
aria-current="page"
|
|
75
|
-
class="tabnav-tab"
|
|
76
|
-
href="#url"
|
|
77
|
-
>
|
|
78
|
-
Foo tab
|
|
79
|
-
</a>
|
|
80
|
-
<a
|
|
81
|
-
class="tabnav-tab"
|
|
82
|
-
href="#url"
|
|
83
|
-
>
|
|
84
|
-
Bar tab
|
|
85
|
-
</a>
|
|
86
|
-
</nav>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
`;
|
|
90
|
-
|
|
91
|
-
exports[`<TabNav /> Render must match withLinkActions() 1`] = `
|
|
92
|
-
<div>
|
|
93
|
-
<div
|
|
94
|
-
class="tabnav"
|
|
95
|
-
>
|
|
96
|
-
<div
|
|
97
|
-
class="float-right"
|
|
98
|
-
>
|
|
99
|
-
<a
|
|
100
|
-
class="tabnav-extra"
|
|
101
|
-
href="#url"
|
|
102
|
-
>
|
|
103
|
-
Tabnav extra link
|
|
104
|
-
</a>
|
|
105
|
-
<a
|
|
106
|
-
class="tabnav-extra"
|
|
107
|
-
href="#url"
|
|
108
|
-
>
|
|
109
|
-
Tabnav extra link
|
|
110
|
-
</a>
|
|
111
|
-
</div>
|
|
112
|
-
<nav
|
|
113
|
-
aria-label="Foo bar"
|
|
114
|
-
class="tabnav-tabs"
|
|
115
|
-
>
|
|
116
|
-
<a
|
|
117
|
-
aria-current="page"
|
|
118
|
-
class="tabnav-tab"
|
|
119
|
-
href="#url"
|
|
120
|
-
>
|
|
121
|
-
Foo tab
|
|
122
|
-
</a>
|
|
123
|
-
<a
|
|
124
|
-
class="tabnav-tab"
|
|
125
|
-
href="#url"
|
|
126
|
-
>
|
|
127
|
-
Bar tab
|
|
128
|
-
</a>
|
|
129
|
-
</nav>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
`;
|
|
133
|
-
|
|
134
|
-
exports[`<TabNav /> Render must match withTextActions() 1`] = `
|
|
135
|
-
<div>
|
|
136
|
-
<div
|
|
137
|
-
class="tabnav"
|
|
138
|
-
>
|
|
139
|
-
<div
|
|
140
|
-
class="tabnav-extra float-right"
|
|
141
|
-
>
|
|
142
|
-
Tabnav widget text here.
|
|
143
|
-
</div>
|
|
144
|
-
<nav
|
|
145
|
-
aria-label="Foo bar"
|
|
146
|
-
class="tabnav-tabs"
|
|
147
|
-
>
|
|
148
|
-
<a
|
|
149
|
-
aria-current="page"
|
|
150
|
-
class="tabnav-tab"
|
|
151
|
-
href="#url"
|
|
152
|
-
>
|
|
153
|
-
Foo tab
|
|
154
|
-
</a>
|
|
155
|
-
<a
|
|
156
|
-
class="tabnav-tab"
|
|
157
|
-
href="#url"
|
|
158
|
-
>
|
|
159
|
-
Bar tab
|
|
160
|
-
</a>
|
|
161
|
-
</nav>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
`;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# UnderlineNav
|
|
2
|
-
|
|
3
|
-
> Use UnderlineNav to style navigation with a minimal underlined selected state, typically used for navigation placed at the top of the page. This component comes with variations to accommodate icons, containers and other content.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - Default
|
|
8
|
-
> - WithActions, RightAligned, RightAlignedWithActions
|
|
9
|
-
> - WithIcons, FullContainer
|
|
10
|
-
|
|
11
|
-
## Default
|
|
12
|
-
|
|
13
|
-
```jsx
|
|
14
|
-
<UnderlineNav ariaAttr={ariaAttr} items={buttonItems} itemType={underlineNavItemType.button} onClick={action('onClick')} />
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## WithActions
|
|
18
|
-
|
|
19
|
-
```jsx
|
|
20
|
-
<UnderlineNav ariaAttr={ariaAttr} items={anchorItems} itemType={underlineNavItemType.a} actions={actions} onClick={action('onClick')} />
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## RightAligned
|
|
24
|
-
|
|
25
|
-
```jsx
|
|
26
|
-
<UnderlineNav
|
|
27
|
-
ariaAttr={ariaAttr}
|
|
28
|
-
items={anchorItems}
|
|
29
|
-
itemType={underlineNavItemType.a}
|
|
30
|
-
align={underlineNavAlignmentType.right}
|
|
31
|
-
onClick={action('onClick')}
|
|
32
|
-
/>
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## RightAlignedWithActions
|
|
36
|
-
|
|
37
|
-
```jsx
|
|
38
|
-
<UnderlineNav
|
|
39
|
-
ariaAttr={ariaAttr}
|
|
40
|
-
items={anchorItems}
|
|
41
|
-
itemType={underlineNavItemType.a}
|
|
42
|
-
align={underlineNavAlignmentType.right}
|
|
43
|
-
actions={actions}
|
|
44
|
-
onClick={action('onClick')}
|
|
45
|
-
/>
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## WithIcons
|
|
49
|
-
|
|
50
|
-
```jsx
|
|
51
|
-
<UnderlineNav ariaAttr={ariaAttr} items={iconItems} itemType={underlineNavItemType.a} onClick={action('onClick')} />
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## FullContainer
|
|
55
|
-
|
|
56
|
-
```jsx
|
|
57
|
-
<UnderlineNav
|
|
58
|
-
ariaAttr={ariaAttr}
|
|
59
|
-
items={fullContainerItems}
|
|
60
|
-
itemType={underlineNavItemType.a}
|
|
61
|
-
actions={actions}
|
|
62
|
-
fullContainer
|
|
63
|
-
onClick={action('onClick')}
|
|
64
|
-
/>
|
|
65
|
-
```
|