playbook_ui_docs 13.31.0.pre.alpha.PLAY882formpillprimaryandneutral3201 → 13.31.0.pre.alpha.PLAY10863202
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_text_input/docs/_text_input_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +7 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +2 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +1 -1
- data/dist/playbook-doc.js +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7205f191019eeab4d66ece29e57fe8ecb11f7308e040bfd033817b1aec1beef4
|
4
|
+
data.tar.gz: 30ba066009c2db180c9627afb83423309ab1f09822647ed78af9c6d3a27ed731
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63cc90516f0e211059d31e0a4422f3f26cea56049471393840ae12c758e0721fd6f7e9ffd6cee3937220b8b7b25e7f76d19c8b3d7ef2ef076381cead095a00b9
|
7
|
+
data.tar.gz: b6e1bc1e318370d91981e983977b2c91afa8c11adeda72b1eea1447beb97524c9b0fe4f9b337928bbc75e8acd4200aaa08bb2534cac1791ee65a71455cdc8737
|
@@ -5,12 +5,12 @@ import TextInput from '../../pb_text_input/_text_input'
|
|
5
5
|
import Title from '../../pb_title/_title'
|
6
6
|
|
7
7
|
const TextInputDefault = (props) => {
|
8
|
+
const [firstName, setFirstName] = useState('')
|
8
9
|
const handleOnChangeFirstName = ({ target }) => {
|
9
10
|
setFirstName(target.value)
|
10
11
|
}
|
11
12
|
const ref = React.createRef()
|
12
13
|
|
13
|
-
const [firstName, setFirstName] = useState('')
|
14
14
|
const [formFields, setFormFields] = useState({
|
15
15
|
firstName: 'Jane',
|
16
16
|
lastName: 'Doe',
|
@@ -14,6 +14,12 @@ import {
|
|
14
14
|
Typeahead,
|
15
15
|
} from '../..'
|
16
16
|
|
17
|
+
type TypeAheadWithHighlightProps = {
|
18
|
+
data: {
|
19
|
+
name: String,
|
20
|
+
},
|
21
|
+
};
|
22
|
+
|
17
23
|
const USERS = [
|
18
24
|
{
|
19
25
|
name: "Wade Winningham",
|
@@ -37,7 +43,7 @@ const USERS = [
|
|
37
43
|
},
|
38
44
|
];
|
39
45
|
|
40
|
-
const TypeaheadWithHighlight = (props) => {
|
46
|
+
const TypeaheadWithHighlight = (props: TypeAheadWithHighlightProps) => {
|
41
47
|
const [selectedUser, setSelectedUser] = useState()
|
42
48
|
|
43
49
|
const formatOptionLabel = ({name, territory, title}, {inputValue}) => {
|
@@ -47,8 +47,6 @@ const promiseOptions = (inputValue) =>
|
|
47
47
|
|
48
48
|
const TypeaheadWithPillsAsync = (props) => {
|
49
49
|
const [users, setUsers] = useState([])
|
50
|
-
const handleOnChange = (value) => setUsers(formatUsers(value))
|
51
|
-
const formatValue = (users) => formatUsers(users)
|
52
50
|
const formatUsers = (users) => {
|
53
51
|
const results = () => (users.map((user) => {
|
54
52
|
if (Object.keys(user)[0] === 'name' || Object.keys(user)[1] === 'id'){
|
@@ -59,6 +57,8 @@ const TypeaheadWithPillsAsync = (props) => {
|
|
59
57
|
}))
|
60
58
|
return results()
|
61
59
|
}
|
60
|
+
const handleOnChange = (value) => setUsers(formatUsers(value))
|
61
|
+
const formatValue = (users) => formatUsers(users)
|
62
62
|
|
63
63
|
return (
|
64
64
|
<>
|
@@ -48,7 +48,7 @@ const promiseOptions = (inputValue) =>
|
|
48
48
|
|
49
49
|
const TypeaheadWithPillsAsyncCustomOptions = (props) => {
|
50
50
|
const [users, setUsers] = useState([])
|
51
|
-
const handleOnChange = (value) => setUsers(value)
|
51
|
+
const handleOnChange = (value) => {setUsers(value)}
|
52
52
|
|
53
53
|
/**
|
54
54
|
*
|