playbook_ui_docs 15.0.0 → 15.1.0.pre.rc.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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.html.erb +5 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +24 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_autocomplete.html.erb +41 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_autocomplete.jsx +80 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_autocomplete.md +1 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
- data/dist/playbook-doc.js +2 -2
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '063099822b8cd18873034e0f095b2ecc14e28cc22ddfdde5f48889bdc8bf43ad'
|
4
|
+
data.tar.gz: 03c384a25cac55c0cf2556875b8bccb74d97288f07cd0198780243796930702d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 214e2079545f2446f1133ac8ee7f021cb544a903db7e67a50fbcf18cb4d3f9c0ddb656d0abeeb0f33d283e15972b10dbf73f0f3af5980769a45ec82b6108bceb
|
7
|
+
data.tar.gz: f3a1e96252c75ac98c55a6601d4b172ce0775e399537844543799442cea899868efc7dd2ed15d417469fc7cf1794a3fc84f4c9aa41dccc63bdf5093d353c2b10
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { LoadingInline } from 'playbook-ui'
|
3
|
+
|
4
|
+
const LoadingInlineVariant = (props) => {
|
5
|
+
return (
|
6
|
+
<div>
|
7
|
+
<LoadingInline
|
8
|
+
text=" Dotted Spinner"
|
9
|
+
variant="dotted"
|
10
|
+
{...props}
|
11
|
+
/>
|
12
|
+
|
13
|
+
<br />
|
14
|
+
|
15
|
+
<LoadingInline
|
16
|
+
text=" Solid Spinner"
|
17
|
+
variant="solid"
|
18
|
+
{...props}
|
19
|
+
/>
|
20
|
+
</div>
|
21
|
+
)
|
22
|
+
}
|
23
|
+
|
24
|
+
export default LoadingInlineVariant
|
@@ -3,9 +3,11 @@ examples:
|
|
3
3
|
rails:
|
4
4
|
- loading_inline_default: Default
|
5
5
|
- loading_inline_custom: Custom Text
|
6
|
+
- loading_inline_variant: Variant
|
6
7
|
|
7
8
|
|
8
9
|
|
9
10
|
react:
|
10
11
|
- loading_inline_default: Default
|
11
12
|
- loading_inline_custom: Custom Text
|
13
|
+
- loading_inline_variant: Variant
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<%= pb_rails("text_input", props: {
|
2
|
+
autocomplete: false,
|
3
|
+
label: "autocomplete='off'",
|
4
|
+
name: "firstName",
|
5
|
+
placeholder: "Enter first name",
|
6
|
+
}) %>
|
7
|
+
|
8
|
+
<%= pb_rails("text_input", props: {
|
9
|
+
label: "no autocomplete attribute (let browser decide- basically 'on')",
|
10
|
+
name: "lastName",
|
11
|
+
placeholder: "Enter last name"
|
12
|
+
}) %>
|
13
|
+
|
14
|
+
<%= pb_rails("text_input", props: {
|
15
|
+
autocomplete: true,
|
16
|
+
label: "autocomplete='on'",
|
17
|
+
name: "phone",
|
18
|
+
type: "phone",
|
19
|
+
placeholder: "Enter phone number"
|
20
|
+
}) %>
|
21
|
+
|
22
|
+
<%= pb_rails("body", props: { margin_bottom: "sm" }) do %>
|
23
|
+
The following have the same autocomplete attributes (email), but have
|
24
|
+
different name attributes (email and emailAlt). Many browsers will
|
25
|
+
open autocomplete based on name attributes instead of autocomplete:
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<%= pb_rails("text_input", props: {
|
29
|
+
autocomplete: "email",
|
30
|
+
label: "autocomplete='email' name='email'",
|
31
|
+
name: "email",
|
32
|
+
placeholder: "Enter email address"
|
33
|
+
}) %>
|
34
|
+
|
35
|
+
<%= pb_rails("text_input", props: {
|
36
|
+
autocomplete: "email",
|
37
|
+
label: "autocomplete='email' name='emailAlt'",
|
38
|
+
name: "emailAlt",
|
39
|
+
type: "email",
|
40
|
+
placeholder: "Enter email address"
|
41
|
+
}) %>
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
|
3
|
+
import TextInput from '../../pb_text_input/_text_input'
|
4
|
+
import Body from '../../pb_body/_body'
|
5
|
+
|
6
|
+
|
7
|
+
const TextInputAutocomplete = (props) => {
|
8
|
+
const [formFields, setFormFields] = useState({
|
9
|
+
firstName: "",
|
10
|
+
lastName: "",
|
11
|
+
phone: "",
|
12
|
+
emailTest: "",
|
13
|
+
email: "",
|
14
|
+
});
|
15
|
+
|
16
|
+
const handleOnChangeFormField = ({ target }) => {
|
17
|
+
const { name, value } = target;
|
18
|
+
setFormFields({ ...formFields, [name]: value });
|
19
|
+
};
|
20
|
+
|
21
|
+
return (
|
22
|
+
<div>
|
23
|
+
<TextInput
|
24
|
+
autoComplete={false}
|
25
|
+
label="autocomplete='off'"
|
26
|
+
name="firstName"
|
27
|
+
onChange={handleOnChangeFormField}
|
28
|
+
placeholder="Enter first name"
|
29
|
+
value={formFields.firstName}
|
30
|
+
{...props}
|
31
|
+
/>
|
32
|
+
<TextInput
|
33
|
+
label="no autocomplete attribute (let browser decide- basically 'on')"
|
34
|
+
name="lastName"
|
35
|
+
onChange={handleOnChangeFormField}
|
36
|
+
placeholder="Enter last name"
|
37
|
+
value={formFields.lastName}
|
38
|
+
{...props}
|
39
|
+
/>
|
40
|
+
<TextInput
|
41
|
+
autoComplete
|
42
|
+
label="autocomplete='on'"
|
43
|
+
name="phone"
|
44
|
+
onChange={handleOnChangeFormField}
|
45
|
+
placeholder="Enter phone number"
|
46
|
+
type="phone"
|
47
|
+
value={formFields.phone}
|
48
|
+
{...props}
|
49
|
+
/>
|
50
|
+
<Body marginBottom="sm">
|
51
|
+
The following have the same autocomplete attributes (email), but have
|
52
|
+
different name attributes (email and emailAlt). Many browsers will
|
53
|
+
open autocomplete based on name attributes instead of autocomplete:
|
54
|
+
</Body>
|
55
|
+
<TextInput
|
56
|
+
autoComplete="email"
|
57
|
+
label="autocomplete='email' name='email'"
|
58
|
+
name="email"
|
59
|
+
onChange={handleOnChangeFormField}
|
60
|
+
placeholder="Enter email address"
|
61
|
+
type="email"
|
62
|
+
value={formFields.email}
|
63
|
+
{...props}
|
64
|
+
/>
|
65
|
+
<TextInput
|
66
|
+
autoComplete="email"
|
67
|
+
label="autocomplete='email' name='emailAlt'"
|
68
|
+
marginTop="sm"
|
69
|
+
name="emailTest"
|
70
|
+
onChange={handleOnChangeFormField}
|
71
|
+
placeholder="Enter email address"
|
72
|
+
type="email"
|
73
|
+
value={formFields.emailTest}
|
74
|
+
{...props}
|
75
|
+
/>
|
76
|
+
</div>
|
77
|
+
);
|
78
|
+
};
|
79
|
+
|
80
|
+
export default TextInputAutocomplete;
|
@@ -0,0 +1 @@
|
|
1
|
+
Set this prop to `false` or `"off"` to remove autocomplete from text inputs. You can also set it to a string, but browsers will often defer to other attributes like `name`.
|
@@ -9,6 +9,8 @@ examples:
|
|
9
9
|
- text_input_no_label: No Label
|
10
10
|
- text_input_options: Input Options
|
11
11
|
- text_input_mask: Mask
|
12
|
+
- text_input_autocomplete: Autocomplete
|
13
|
+
|
12
14
|
react:
|
13
15
|
- text_input_default: Default
|
14
16
|
- text_input_error: With Error
|
@@ -19,6 +21,7 @@ examples:
|
|
19
21
|
- text_input_no_label: No Label
|
20
22
|
- text_input_mask: Mask
|
21
23
|
- text_input_sanitize: Sanitized Masked Input
|
24
|
+
- text_input_autocomplete: Autocomplete
|
22
25
|
|
23
26
|
|
24
27
|
swift:
|
@@ -7,3 +7,4 @@ export { default as TextInputInline } from './_text_input_inline.jsx'
|
|
7
7
|
export { default as TextInputNoLabel } from './_text_input_no_label.jsx'
|
8
8
|
export { default as TextInputMask } from './_text_input_mask.jsx'
|
9
9
|
export { default as TextInputSanitize } from './_text_input_sanitize.jsx'
|
10
|
+
export { default as TextInputAutocomplete } from './_text_input_autocomplete.jsx'
|