playbook_ui_docs 15.3.0.pre.alpha.PLAY2577reactpopoverappendToPOC11730 → 15.3.0.pre.alpha.play259311731
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_popover/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_popover/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.html.erb +64 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.jsx +70 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.md +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +2 -1
- data/dist/playbook-doc.js +2 -2
- metadata +5 -4
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +0 -68
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to_react.md +0 -1
- /data/app/pb_kits/playbook/pb_popover/docs/{_popover_append_to_rails.md → _popover_append_to.md} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1047649d80aebbfb6d10ccab977e755246c761d150f329aea700c983028283d2
|
|
4
|
+
data.tar.gz: 618b44e5c53323595024bab405d6f7d59df0abaf36d70589a7f5464cb8c61597
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9fdeaef894a14a5566a144e5fc8d3444b019e36ca2b9c5f2c89e028ec14c63ce88cd03925c6ca1d7fe2f7d2907a79a8cb28b264e1af191e26b150fe9d37b344
|
|
7
|
+
data.tar.gz: d8fcc59193671b9f8bb5409b72d2ac8c5adad51e6b3de981a0644e0375afabf1ac10cbbd238cc76bf1fb1b06b08f44e95accde0a99cd795f299e0d40b3555dd3
|
|
@@ -4,4 +4,3 @@ export { default as PopoverClose } from './_popover_close.jsx'
|
|
|
4
4
|
export { default as PopoverZIndex } from './_popover_z_index.jsx'
|
|
5
5
|
export { default as PopoverScrollHeight } from './_popover_scroll_height.jsx'
|
|
6
6
|
export { default as PopoverActionableContent } from './_popover_actionable_content.jsx'
|
|
7
|
-
export { default as PopoverAppendTo } from './_popover_append_to.jsx'
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<%
|
|
2
|
+
grouped_options = [
|
|
3
|
+
{
|
|
4
|
+
label: "Warm Colors",
|
|
5
|
+
options: [
|
|
6
|
+
{ label: "Red", value: "#FF0000" },
|
|
7
|
+
{ label: "Orange", value: "#FFA500" },
|
|
8
|
+
{ label: "Yellow", value: "#FFFF00" },
|
|
9
|
+
{ label: "Coral", value: "#FF7F50" },
|
|
10
|
+
{ label: "Gold", value: "#FFD700" }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: "Cool Colors",
|
|
15
|
+
options: [
|
|
16
|
+
{ label: "Blue", value: "#0000FF" },
|
|
17
|
+
{ label: "Teal", value: "#008080" },
|
|
18
|
+
{ label: "Cyan", value: "#00FFFF" },
|
|
19
|
+
{ label: "Navy", value: "#000080" },
|
|
20
|
+
{ label: "Turquoise", value: "#40E0D0" }
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: "Neutrals",
|
|
25
|
+
options: [
|
|
26
|
+
{ label: "White", value: "#FFFFFF" },
|
|
27
|
+
{ label: "Black", value: "#000000" },
|
|
28
|
+
{ label: "Gray", value: "#808080" },
|
|
29
|
+
{ label: "Beige", value: "#F5F5DC" },
|
|
30
|
+
{ label: "Silver", value: "#C0C0C0" }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: "Earth Tones",
|
|
35
|
+
options: [
|
|
36
|
+
{ label: "Brown", value: "#A52A2A" },
|
|
37
|
+
{ label: "Olive", value: "#808000" },
|
|
38
|
+
{ label: "Forest Green", value: "#228B22" },
|
|
39
|
+
{ label: "Tan", value: "#D2B48C" },
|
|
40
|
+
{ label: "Maroon", value: "#800000" }
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "Fun Shades",
|
|
45
|
+
options: [
|
|
46
|
+
{ label: "Pink", value: "#FFC0CB" },
|
|
47
|
+
{ label: "Magenta", value: "#FF00FF" },
|
|
48
|
+
{ label: "Lime", value: "#00FF00" },
|
|
49
|
+
{ label: "Purple", value: "#800080" },
|
|
50
|
+
{ label: "Indigo", value: "#4B0082" }
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
%>
|
|
55
|
+
|
|
56
|
+
<%= pb_rails("typeahead", props: {
|
|
57
|
+
default_options:[{ label: "Pink", value: "#FFC0CB" }],
|
|
58
|
+
id: "typeahead-custom-options",
|
|
59
|
+
options: grouped_options,
|
|
60
|
+
label: "Colors",
|
|
61
|
+
name: :foo,
|
|
62
|
+
is_multi: false
|
|
63
|
+
})
|
|
64
|
+
%>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import Typeahead from '../_typeahead'
|
|
4
|
+
|
|
5
|
+
const groupedOptions = [
|
|
6
|
+
{
|
|
7
|
+
label: "Warm Colors",
|
|
8
|
+
options: [
|
|
9
|
+
{ label: "Red", value: "#FF0000" },
|
|
10
|
+
{ label: "Orange", value: "#FFA500" },
|
|
11
|
+
{ label: "Yellow", value: "#FFFF00" },
|
|
12
|
+
{ label: "Coral", value: "#FF7F50" },
|
|
13
|
+
{ label: "Gold", value: "#FFD700" }
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: "Cool Colors",
|
|
18
|
+
options: [
|
|
19
|
+
{ label: "Blue", value: "#0000FF" },
|
|
20
|
+
{ label: "Teal", value: "#008080" },
|
|
21
|
+
{ label: "Cyan", value: "#00FFFF" },
|
|
22
|
+
{ label: "Navy", value: "#000080" },
|
|
23
|
+
{ label: "Turquoise", value: "#40E0D0" }
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: "Neutrals",
|
|
28
|
+
options: [
|
|
29
|
+
{ label: "White", value: "#FFFFFF" },
|
|
30
|
+
{ label: "Black", value: "#000000" },
|
|
31
|
+
{ label: "Gray", value: "#808080" },
|
|
32
|
+
{ label: "Beige", value: "#F5F5DC" },
|
|
33
|
+
{ label: "Silver", value: "#C0C0C0" }
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: "Earth Tones",
|
|
38
|
+
options: [
|
|
39
|
+
{ label: "Brown", value: "#A52A2A" },
|
|
40
|
+
{ label: "Olive", value: "#808000" },
|
|
41
|
+
{ label: "Forest Green", value: "#228B22" },
|
|
42
|
+
{ label: "Tan", value: "#D2B48C" },
|
|
43
|
+
{ label: "Maroon", value: "#800000" }
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: "Fun Shades",
|
|
48
|
+
options: [
|
|
49
|
+
{ label: "Pink", value: "#FFC0CB" },
|
|
50
|
+
{ label: "Magenta", value: "#FF00FF" },
|
|
51
|
+
{ label: "Lime", value: "#00FF00" },
|
|
52
|
+
{ label: "Purple", value: "#800080" },
|
|
53
|
+
{ label: "Indigo", value: "#4B0082" }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
const TypeaheadCustomOptions = (props) => {
|
|
59
|
+
return (
|
|
60
|
+
<Typeahead
|
|
61
|
+
defaultValue={[{ label: "Pink", value: "#FFC0CB" }]}
|
|
62
|
+
label="Colors"
|
|
63
|
+
options={groupedOptions}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default TypeaheadCustomOptions
|
|
70
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Grouped options can also be achieved with the Typeahead as seen here.
|
|
@@ -2,6 +2,7 @@ examples:
|
|
|
2
2
|
rails:
|
|
3
3
|
- typeahead_default: Default
|
|
4
4
|
- typeahead_default_options: With Default Options
|
|
5
|
+
- typeahead_custom_options: With Grouped Options
|
|
5
6
|
- typeahead_with_context: With Context
|
|
6
7
|
- typeahead_with_pills: With Pills
|
|
7
8
|
- typeahead_without_pills: Without Pills (Single Select)
|
|
@@ -21,6 +22,7 @@ examples:
|
|
|
21
22
|
react:
|
|
22
23
|
- typeahead_default: Default
|
|
23
24
|
- typeahead_default_value: With Default Value
|
|
25
|
+
- typeahead_custom_options: With Grouped Options
|
|
24
26
|
- typeahead_react_hook: React Hook
|
|
25
27
|
- typeahead_with_highlight: With Highlight
|
|
26
28
|
- typeahead_with_pills: With Pills
|
|
@@ -16,4 +16,5 @@ export { default as TypeaheadTruncatedText } from './_typeahead_truncated_text.j
|
|
|
16
16
|
export { default as TypeaheadReactHook } from './_typeahead_react_hook.jsx'
|
|
17
17
|
export { default as TypeaheadDisabled } from './_typeahead_disabled.jsx'
|
|
18
18
|
export { default as TypeaheadPreserveInput } from './_typeahead_preserve_input.jsx'
|
|
19
|
-
export { default as TypeaheadDefaultValue } from './_typeahead_default_value.jsx'
|
|
19
|
+
export { default as TypeaheadDefaultValue } from './_typeahead_default_value.jsx'
|
|
20
|
+
export { default as TypeaheadCustomOptions } from './_typeahead_custom_options.jsx'
|