@papillonarts/components 0.17.0 → 0.19.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/Button/Button.js +2 -2
- 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
|
@@ -41,8 +41,8 @@ function Button(_ref) {
|
|
|
41
41
|
_ref$autoFocus = _ref.autoFocus,
|
|
42
42
|
autoFocus = _ref$autoFocus === void 0 ? _Button.defaultProps.autoFocus : _ref$autoFocus;
|
|
43
43
|
var stateProps = state === _Button.buttonState.inactive ? _objectSpread({}, {
|
|
44
|
-
disabled:
|
|
45
|
-
'aria-disabled':
|
|
44
|
+
disabled: true,
|
|
45
|
+
'aria-disabled': true
|
|
46
46
|
}) : null;
|
|
47
47
|
var fileInputRef = (0, _hooks.useRef)(null);
|
|
48
48
|
if (element === _Button.buttonElement.button) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papillonarts/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Papillon Arts Components",
|
|
5
5
|
"homepage": "https://github.com/papillonarts/papillonarts/tree/master/packages/components",
|
|
6
6
|
"repository": {
|
|
@@ -18,21 +18,16 @@
|
|
|
18
18
|
"clean-up": "rm -rf build node_modules package-lock.json",
|
|
19
19
|
"install-packages": "npm i",
|
|
20
20
|
"install-papillonarts-latest": "npm i \"@papillonarts/css\"@latest && npm i \"@papillonarts/library\"@latest",
|
|
21
|
-
"remove-test-folders": "rm -rf src/**/**/__tests__ && rm -rf src/**/**/**/__tests__ && rm -rf src/primer/Concept",
|
|
22
|
-
"remove-snapshot-folders": "rm -rf src/**/**/__tests__/__snapshots__",
|
|
23
|
-
"remove-build-folder": "rm -rf build",
|
|
24
|
-
"remove-markdown-files": "find build -maxdepth 3 -type f -name \"*.md\" -delete",
|
|
25
21
|
"generate-typing": "tsc",
|
|
26
|
-
"
|
|
27
|
-
"generate-commonjs": "npm-run-all remove-snapshot-folders remove-build-folder transpile remove-markdown-files",
|
|
22
|
+
"generate-commonjs": "rm -rf build && babel --copy-files --no-copy-ignored --extensions '.js,.jsx,.ts,.tsx,.snap,.mdx' --out-dir build src --ignore **/__tests__,**/*.mdx",
|
|
28
23
|
"build": "npm-run-all generate-commonjs generate-typing",
|
|
29
24
|
"build-test": "npm run build",
|
|
30
25
|
"build-acceptance": "npm run build",
|
|
31
26
|
"build-release": "npm run build"
|
|
32
27
|
},
|
|
33
28
|
"dependencies": {
|
|
34
|
-
"@papillonarts/css": "^0.
|
|
35
|
-
"@papillonarts/library": "^0.
|
|
29
|
+
"@papillonarts/css": "^0.19.0",
|
|
30
|
+
"@papillonarts/library": "^0.19.0"
|
|
36
31
|
},
|
|
37
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "1e0d601dc56a0abcde7730828eb1d83faca7222a"
|
|
38
33
|
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# Alert
|
|
2
|
-
|
|
3
|
-
> Flash messages, or alerts, inform users of successful or pending actions. Use them sparingly. Don't show more than one at a time.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - Default,
|
|
8
|
-
> - Info, Warning, Error, Success
|
|
9
|
-
> - Consent, Consent with input
|
|
10
|
-
|
|
11
|
-
## Default
|
|
12
|
-
|
|
13
|
-
> Flash messages start off looking decently neutral—they're just light blue rounded rectangles.
|
|
14
|
-
|
|
15
|
-
```jsx
|
|
16
|
-
<Alert variant={alertVariant.info}>{children}</Alert>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Default Multiple Paragraphs
|
|
20
|
-
|
|
21
|
-
> You can put multiple paragraphs of text in a flash message—the last paragraph's bottom margin will be automatically override.
|
|
22
|
-
|
|
23
|
-
```jsx
|
|
24
|
-
<Alert variant={alertVariant.default}>
|
|
25
|
-
<p>
|
|
26
|
-
This is a longer flash message in it's own paragraph. It ends up looking something like this. If we keep adding more text,
|
|
27
|
-
it'll eventually wrap to a new line.
|
|
28
|
-
</p>
|
|
29
|
-
<p>And this is another paragraph.</p>
|
|
30
|
-
</Alert>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Info
|
|
34
|
-
|
|
35
|
-
```jsx
|
|
36
|
-
<Alert variant={alertVariant.info}>{children}</Alert>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Warning
|
|
40
|
-
|
|
41
|
-
```jsx
|
|
42
|
-
<Alert variant={alertVariant.warning}>{children}</Alert>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Error
|
|
46
|
-
|
|
47
|
-
```jsx
|
|
48
|
-
<Alert variant={alertVariant.error}>{children}</Alert>
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Success
|
|
52
|
-
|
|
53
|
-
```jsx
|
|
54
|
-
<Alert variant={alertVariant.success}>{children}</Alert>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Consent
|
|
58
|
-
|
|
59
|
-
```jsx
|
|
60
|
-
<Alert
|
|
61
|
-
variant={alertVariant.consent}
|
|
62
|
-
consent={{
|
|
63
|
-
action: {
|
|
64
|
-
approve: action('Approved'),
|
|
65
|
-
cancel: action('Cancelled'),
|
|
66
|
-
},
|
|
67
|
-
}}
|
|
68
|
-
>
|
|
69
|
-
{children}
|
|
70
|
-
</Alert>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Consent with input
|
|
74
|
-
|
|
75
|
-
```jsx
|
|
76
|
-
<Alert
|
|
77
|
-
variant={alertVariant.consent}
|
|
78
|
-
consent={{
|
|
79
|
-
action: {
|
|
80
|
-
approve: action('Approved'),
|
|
81
|
-
cancel: action('Cancelled'),
|
|
82
|
-
},
|
|
83
|
-
withInput: true,
|
|
84
|
-
}}
|
|
85
|
-
>
|
|
86
|
-
{children}
|
|
87
|
-
</Alert>
|
|
88
|
-
```
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# Blankslate
|
|
2
|
-
|
|
3
|
-
> Blankslates are for when there is a lack of content within a page or section. Use them as placeholders to tell users why something isn't there. Be sure to provide an action to add content as well.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - Default
|
|
8
|
-
> - Narrow, Capped, Spacious
|
|
9
|
-
> - Large, No background
|
|
10
|
-
|
|
11
|
-
## Default
|
|
12
|
-
|
|
13
|
-
> Wrap some content in the outer .blankslate wrapper to give it the blankslate appearance.
|
|
14
|
-
|
|
15
|
-
```jsx
|
|
16
|
-
<Blankslate variant={blankslateVariant.default} heading={heading} text={text} />
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Narrow
|
|
20
|
-
|
|
21
|
-
> Narrows the blankslate container to not occupy the entire available width.
|
|
22
|
-
|
|
23
|
-
```jsx
|
|
24
|
-
<Blankslate variant={blankslateVariant.narrow} heading={heading} text={text} />
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Capped
|
|
28
|
-
|
|
29
|
-
> Removes the border-radius on the top corners.
|
|
30
|
-
|
|
31
|
-
```jsx
|
|
32
|
-
<Blankslate variant={blankslateVariant.capped} heading={heading} text={text} />
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Spacious
|
|
36
|
-
|
|
37
|
-
> Significantly increases the vertical padding.
|
|
38
|
-
|
|
39
|
-
```jsx
|
|
40
|
-
<Blankslate variant={blankslateVariant.spacious} heading={heading} text={text} />
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Large
|
|
44
|
-
|
|
45
|
-
> Increases the size of the text in the blankslate
|
|
46
|
-
|
|
47
|
-
```jsx
|
|
48
|
-
<Blankslate variant={blankslateVariant.large} heading={heading} text={text} />
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## No background
|
|
52
|
-
|
|
53
|
-
> Removes the background-color and border.
|
|
54
|
-
|
|
55
|
-
```jsx
|
|
56
|
-
<Blankslate hasCleanBackground={true} heading={heading} text={text} />
|
|
57
|
-
```
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Breadcrumb
|
|
2
|
-
|
|
3
|
-
> Breadcrumbs are used to show taxonomical context on pages that are many levels deep in a site’s hierarchy. Breadcrumbs show and link to parent, grandparent, and sometimes great-grandparent pages. Breadcrumbs are most appropriate on pages that:
|
|
4
|
-
|
|
5
|
-
- Are many levels deep on a site
|
|
6
|
-
- Do not have a section-level navigation
|
|
7
|
-
- May need the ability to quickly go back to the previous (parent) page
|
|
8
|
-
|
|
9
|
-
# Variants
|
|
10
|
-
|
|
11
|
-
> - Default, Inactive
|
|
12
|
-
|
|
13
|
-
## Default
|
|
14
|
-
|
|
15
|
-
```jsx
|
|
16
|
-
<Breadcrumb ariaAttr={ariaAttr} items={items} onClick={action('onClick')} />
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Inactive
|
|
20
|
-
|
|
21
|
-
```jsx
|
|
22
|
-
<Breadcrumb ariaAttr={ariaAttr} items={items} onClick={action('onClick')} state={breadcrumbState.inactive} />
|
|
23
|
-
```
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
# Button
|
|
2
|
-
|
|
3
|
-
> Buttons are used for actions, like in forms, while textual hyperlinks are used for destinations, or moving from one page to another.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - DefaultButton, DefaultSmallButton, DefaultLargeButton, DefaultInactiveButton, DefaultIconButtonLeftAligned, DefaultIconButtonRightAligned, DefaultLinkButton
|
|
8
|
-
>
|
|
9
|
-
> - PrimaryButton, PrimarySmallButton, PrimaryLargeButton, PrimaryInactiveButton, PrimaryIconButtonLeftAligned, PrimaryIconButtonRightAligned
|
|
10
|
-
>
|
|
11
|
-
> - DangerButton, DangerSmallButton, DangerLargeButton, DangerInactiveButton, DangerIconButtonLeftAligned, DangerIconButtonRightAligned
|
|
12
|
-
>
|
|
13
|
-
> - OutlineButton, OutlineSmallButton, OutlineLargeButton, OutlineInactiveButton, OutlineIconButtonLeftAligned, OutlineIconButtonRightAligned
|
|
14
|
-
>
|
|
15
|
-
> - BlueButton, BlueSmallButton, BlueLargeButton, BlueInactiveButton, BlueIconButtonLeftAligned, BlueIconButtonRightAligned
|
|
16
|
-
>
|
|
17
|
-
> - OrangeButton, OrangeSmallButton, OrangeLargeButton, OrangeInactiveButton, OrangeIconButtonLeftAligned, OrangeIconButtonRightAligned
|
|
18
|
-
|
|
19
|
-
## DefaultButton
|
|
20
|
-
|
|
21
|
-
```jsx
|
|
22
|
-
<Button text="Default button" onClick={action('onClick')} />
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## DefaultSmallButton
|
|
26
|
-
|
|
27
|
-
```jsx
|
|
28
|
-
<Button text="Default small button" size={buttonSize.small} onClick={action('onClick')} />
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## DefaultLargeButton
|
|
32
|
-
|
|
33
|
-
```jsx
|
|
34
|
-
<Button text="Default large button" size={buttonSize.large} onClick={action('onClick')} />
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## DefaultInactiveButton
|
|
38
|
-
|
|
39
|
-
```jsx
|
|
40
|
-
<Button text="Default inactive button" state={buttonState.inactive} onClick={action('onClick')} />
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## DefaultIconButtonLeftAligned
|
|
44
|
-
|
|
45
|
-
```jsx
|
|
46
|
-
<Button text="Default icon button" icon={plusIconLeftAligned} onClick={action('onClick')} />
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## DefaultIconButtonRightAligned
|
|
50
|
-
|
|
51
|
-
```jsx
|
|
52
|
-
<Button text="Default icon button" icon={plusIconRightAligned} onClick={action('onClick')} />
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## DefaultLinkButton
|
|
56
|
-
|
|
57
|
-
```jsx
|
|
58
|
-
<Button element={buttonElement.a} href="#url" text="Default link button" onClick={action('onClick')} />
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## PrimaryButton
|
|
62
|
-
|
|
63
|
-
```jsx
|
|
64
|
-
<Button text="Primary button" variant={buttonVariant.primary} onClick={action('onClick')} />
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## PrimarySmallButton
|
|
68
|
-
|
|
69
|
-
```jsx
|
|
70
|
-
<Button text="Primary small button" variant={buttonVariant.primary} size={buttonSize.small} onClick={action('onClick')} />
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## PrimaryLargeButton
|
|
74
|
-
|
|
75
|
-
```jsx
|
|
76
|
-
<Button text="Primary large button" variant={buttonVariant.primary} size={buttonSize.large} onClick={action('onClick')} />
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## PrimaryInactiveButton
|
|
80
|
-
|
|
81
|
-
```jsx
|
|
82
|
-
<Button text="Primary inactive button" variant={buttonVariant.primary} state={buttonState.inactive} onClick={action('onClick')} />
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## PrimaryIconButtonLeftAligned
|
|
86
|
-
|
|
87
|
-
```jsx
|
|
88
|
-
<Button text="Primary icon button" variant={buttonVariant.primary} icon={plusIconLeftAligned} onClick={action('onClick')} />
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## PrimaryIconButtonRightAligned
|
|
92
|
-
|
|
93
|
-
```jsx
|
|
94
|
-
<Button text="Primary icon button" variant={buttonVariant.primary} icon={plusIconRightAligned} onClick={action('onClick')} />
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## DangerButton
|
|
98
|
-
|
|
99
|
-
```jsx
|
|
100
|
-
<Button text="Danger button" variant={buttonVariant.danger} onClick={action('onClick')} />
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## DangerSmallButton
|
|
104
|
-
|
|
105
|
-
```jsx
|
|
106
|
-
<Button text="Danger small button" variant={buttonVariant.danger} size={buttonSize.small} onClick={action('onClick')} />
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## DangerLargeButton
|
|
110
|
-
|
|
111
|
-
```jsx
|
|
112
|
-
<Button text="Danger large button" variant={buttonVariant.danger} size={buttonSize.large} onClick={action('onClick')} />
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## DangerInactiveButton
|
|
116
|
-
|
|
117
|
-
```jsx
|
|
118
|
-
<Button text="Danger inactive button" variant={buttonVariant.danger} state={buttonState.inactive} onClick={action('onClick')} />
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## DangerIconButtonLeftAligned
|
|
122
|
-
|
|
123
|
-
```jsx
|
|
124
|
-
<Button text="Danger icon button" variant={buttonVariant.danger} icon={plusIconLeftAligned} onClick={action('onClick')} />
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## DangerIconButtonRightAligned
|
|
128
|
-
|
|
129
|
-
```jsx
|
|
130
|
-
<Button text="Danger icon button" variant={buttonVariant.danger} icon={plusIconRightAligned} onClick={action('onClick')} />
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## OutlineButton
|
|
134
|
-
|
|
135
|
-
```jsx
|
|
136
|
-
<Button text="Outline button" variant={buttonVariant.outline} onClick={action('onClick')} />
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## OutlineSmallButton
|
|
140
|
-
|
|
141
|
-
```jsx
|
|
142
|
-
<Button text="Outline small button" variant={buttonVariant.outline} size={buttonSize.small} onClick={action('onClick')} />
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## OutlineLargeButton
|
|
146
|
-
|
|
147
|
-
```jsx
|
|
148
|
-
<Button text="Outline large button" variant={buttonVariant.outline} size={buttonSize.large} onClick={action('onClick')} />
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## OutlineInactiveButton
|
|
152
|
-
|
|
153
|
-
```jsx
|
|
154
|
-
<Button text="Outline inactive button" variant={buttonVariant.outline} state={buttonState.inactive} onClick={action('onClick')} />
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## OutlineIconButtonLeftAligned
|
|
158
|
-
|
|
159
|
-
```jsx
|
|
160
|
-
<Button text="Outline icon button" variant={buttonVariant.outline} icon={plusIconLeftAligned} onClick={action('onClick')} />
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## OutlineIconButtonRightAligned
|
|
164
|
-
|
|
165
|
-
```jsx
|
|
166
|
-
<Button text="Outline icon button" variant={buttonVariant.outline} icon={plusIconRightAligned} onClick={action('onClick')} />
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## BlueButton
|
|
170
|
-
|
|
171
|
-
```jsx
|
|
172
|
-
<Button text="Blue button" variant={buttonVariant.blue} onClick={action('onClick')} />
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## BlueSmallButton
|
|
176
|
-
|
|
177
|
-
```jsx
|
|
178
|
-
<Button text="Blue small button" variant={buttonVariant.blue} size={buttonSize.small} onClick={action('onClick')} />
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## BlueLargeButton
|
|
182
|
-
|
|
183
|
-
```jsx
|
|
184
|
-
<Button text="Blue large button" variant={buttonVariant.blue} size={buttonSize.large} onClick={action('onClick')} />
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## BlueInactiveButton
|
|
188
|
-
|
|
189
|
-
```jsx
|
|
190
|
-
<Button text="Blue inactive button" variant={buttonVariant.blue} state={buttonState.inactive} onClick={action('onClick')} />
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
## BlueIconButtonLeftAligned
|
|
194
|
-
|
|
195
|
-
```jsx
|
|
196
|
-
<Button text="Blue icon button" variant={buttonVariant.blue} icon={plusIconLeftAligned} onClick={action('onClick')} />
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
## BlueIconButtonRightAligned
|
|
200
|
-
|
|
201
|
-
```jsx
|
|
202
|
-
<Button text="Blue icon button" variant={buttonVariant.blue} icon={plusIconRightAligned} onClick={action('onClick')} />
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## OrangeButton
|
|
206
|
-
|
|
207
|
-
```jsx
|
|
208
|
-
<Button text="Orange button" variant={buttonVariant.orange} onClick={action('onClick')} />
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## OrangeSmallButton
|
|
212
|
-
|
|
213
|
-
```jsx
|
|
214
|
-
<Button text="Orange small button" variant={buttonVariant.orange} size={buttonSize.small} onClick={action('onClick')} />
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
## OrangeLargeButton
|
|
218
|
-
|
|
219
|
-
```jsx
|
|
220
|
-
<Button text="Orange large button" variant={buttonVariant.orange} size={buttonSize.large} onClick={action('onClick')} />
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
## OrangeInactiveButton
|
|
224
|
-
|
|
225
|
-
```jsx
|
|
226
|
-
<Button text="Orange inactive button" variant={buttonVariant.orange} state={buttonState.inactive} onClick={action('onClick')} />
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## OrangeIconButtonLeftAligned
|
|
230
|
-
|
|
231
|
-
```jsx
|
|
232
|
-
<Button text="Orange icon button" variant={buttonVariant.orange} icon={plusIconLeftAligned} onClick={action('onClick')} />
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
## OrangeIconButtonRightAligned
|
|
236
|
-
|
|
237
|
-
```jsx
|
|
238
|
-
<Button text="Orange icon button" variant={buttonVariant.orange} icon={plusIconRightAligned} onClick={action('onClick')} />
|
|
239
|
-
```
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Dropdown
|
|
2
|
-
|
|
3
|
-
> Dropdowns are lightweight context menus for housing navigation and actions. They're great for instances where you don't need the full power (and code) of the select menu.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - Regular, Inactive
|
|
8
|
-
|
|
9
|
-
## Regular
|
|
10
|
-
|
|
11
|
-
```jsx
|
|
12
|
-
<Dropdown summary={summary} ariaAttr={ariaAttr} items={items} onClick={action('onClick')} />
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Inactive
|
|
16
|
-
|
|
17
|
-
```jsx
|
|
18
|
-
<Dropdown summary={summary} ariaAttr={ariaAttr} items={items} onClick={action('onClick')} state={dropdownState.inactive} />
|
|
19
|
-
```
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# Checkbox
|
|
2
|
-
|
|
3
|
-
> Style individual form checkbox controls and utilize common layouts.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - IsChecked, IsCheckedInactive
|
|
8
|
-
> - IsNotChecked, IsNotCheckedInactive
|
|
9
|
-
|
|
10
|
-
## IsChecked
|
|
11
|
-
|
|
12
|
-
```jsx
|
|
13
|
-
<Checkbox ariaAttr={ariaAttr} isChecked={true} onChange={action('onChange')} text={text.isChecked} />
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## IsCheckedInactive
|
|
17
|
-
|
|
18
|
-
```jsx
|
|
19
|
-
<Checkbox ariaAttr={ariaAttr} isChecked={true} onChange={action('onChange')} text={text.isChecked} state={checkboxState.inactive} />
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## IsNotChecked
|
|
23
|
-
|
|
24
|
-
```jsx
|
|
25
|
-
<Checkbox ariaAttr={ariaAttr} isChecked={false} onChange={action('onChange')} text={text.isNotChecked} />
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## IsNotCheckedInactive
|
|
29
|
-
|
|
30
|
-
```jsx
|
|
31
|
-
<Checkbox ariaAttr={ariaAttr} isChecked={false} onChange={action('onChange')} text={text.isNotChecked} state={checkboxState.inactive} />
|
|
32
|
-
```
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`<Checkbox /> Render must match isChecked() 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="m-0 form-checkbox"
|
|
7
|
-
>
|
|
8
|
-
<label
|
|
9
|
-
for="checkbox"
|
|
10
|
-
>
|
|
11
|
-
<input
|
|
12
|
-
aria-describedby="help-text-for-checkbox"
|
|
13
|
-
checked=""
|
|
14
|
-
type="checkbox"
|
|
15
|
-
/>
|
|
16
|
-
is checked
|
|
17
|
-
</label>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
exports[`<Checkbox /> Render must match isCheckedInactive() 1`] = `
|
|
23
|
-
<div>
|
|
24
|
-
<div
|
|
25
|
-
class="m-0 form-checkbox checkbox-inactive"
|
|
26
|
-
>
|
|
27
|
-
<label
|
|
28
|
-
for="checkbox"
|
|
29
|
-
>
|
|
30
|
-
<input
|
|
31
|
-
aria-describedby="help-text-for-checkbox"
|
|
32
|
-
checked=""
|
|
33
|
-
type="checkbox"
|
|
34
|
-
/>
|
|
35
|
-
is checked
|
|
36
|
-
</label>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
exports[`<Checkbox /> Render must match isNotChecked() 1`] = `
|
|
42
|
-
<div>
|
|
43
|
-
<div
|
|
44
|
-
class="m-0 form-checkbox"
|
|
45
|
-
>
|
|
46
|
-
<label
|
|
47
|
-
for="checkbox"
|
|
48
|
-
>
|
|
49
|
-
<input
|
|
50
|
-
aria-describedby="help-text-for-checkbox"
|
|
51
|
-
type="checkbox"
|
|
52
|
-
/>
|
|
53
|
-
is not checked
|
|
54
|
-
</label>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
`;
|
|
58
|
-
|
|
59
|
-
exports[`<Checkbox /> Render must match isNotCheckedInactive() 1`] = `
|
|
60
|
-
<div>
|
|
61
|
-
<div
|
|
62
|
-
class="m-0 form-checkbox checkbox-inactive"
|
|
63
|
-
>
|
|
64
|
-
<label
|
|
65
|
-
for="checkbox"
|
|
66
|
-
>
|
|
67
|
-
<input
|
|
68
|
-
aria-describedby="help-text-for-checkbox"
|
|
69
|
-
type="checkbox"
|
|
70
|
-
/>
|
|
71
|
-
is not checked
|
|
72
|
-
</label>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
`;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Input
|
|
2
|
-
|
|
3
|
-
> Style individual form input controls and utilize common layouts.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - Default, Inactive
|
|
8
|
-
|
|
9
|
-
## Default
|
|
10
|
-
|
|
11
|
-
```jsx
|
|
12
|
-
<Input
|
|
13
|
-
placeholder={placeholder}
|
|
14
|
-
ariaAttr={ariaAttr}
|
|
15
|
-
onChange={action('onChange')}
|
|
16
|
-
onKeyUp={action('onKeyUp')}
|
|
17
|
-
onFocus={action('onFocus')}
|
|
18
|
-
onBlur={action('onBlur')}
|
|
19
|
-
/>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Inactive
|
|
23
|
-
|
|
24
|
-
```jsx
|
|
25
|
-
<Input
|
|
26
|
-
placeholder={placeholder}
|
|
27
|
-
ariaAttr={ariaAttr}
|
|
28
|
-
onChange={action('onChange')}
|
|
29
|
-
onKeyUp={action('onKeyUp')}
|
|
30
|
-
onFocus={action('onFocus')}
|
|
31
|
-
onBlur={action('onBlur')}
|
|
32
|
-
state={inputState.inactive}
|
|
33
|
-
/>
|
|
34
|
-
```
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`<Input /> Render must match inactive() 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<input
|
|
6
|
-
aria-label="Repository description"
|
|
7
|
-
class="form-control input-inactive"
|
|
8
|
-
placeholder="Fantastic placeholder"
|
|
9
|
-
type="text"
|
|
10
|
-
/>
|
|
11
|
-
</div>
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
exports[`<Input /> Render must match regular() 1`] = `
|
|
15
|
-
<div>
|
|
16
|
-
<input
|
|
17
|
-
aria-label="Repository description"
|
|
18
|
-
class="form-control"
|
|
19
|
-
placeholder="Fantastic placeholder"
|
|
20
|
-
type="text"
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
`;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Radio
|
|
2
|
-
|
|
3
|
-
> Style individual form radio controls and utilize common layouts.
|
|
4
|
-
|
|
5
|
-
# Variants
|
|
6
|
-
|
|
7
|
-
> - Default, Inactive
|
|
8
|
-
|
|
9
|
-
## Default
|
|
10
|
-
|
|
11
|
-
```jsx
|
|
12
|
-
<Fragment>
|
|
13
|
-
<Radio name={name} onChange={action('onChange-white')} text="White" />
|
|
14
|
-
<Radio name={name} isChecked={true} onChange={action('onChange-black')} text="Black" />
|
|
15
|
-
</Fragment>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Inactive
|
|
19
|
-
|
|
20
|
-
```jsx
|
|
21
|
-
<Fragment>
|
|
22
|
-
<Radio name={name} onChange={action('onChange-white')} text="White" state={radioState.inactive} />
|
|
23
|
-
<Radio name={name} isChecked={true} onChange={action('onChange-black')} text="Black" state={radioState.inactive} />
|
|
24
|
-
</Fragment>
|
|
25
|
-
```
|