playbook_ui_docs 14.15.0.pre.rc.4 → 14.16.0.pre.rc.1
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_advanced_table/docs/_advanced_table_infinite_scroll.jsx +50 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_infinite_scroll.json +152002 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +3 -3
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +20 -37
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +6 -6
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +1 -0
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_wrapped.html.erb +40 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_wrapped.jsx +50 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_wrapped.md +3 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled.html.erb +72 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled.jsx +91 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +60 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.md +1 -0
- data/app/pb_kits/playbook/pb_radio/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_radio/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_react_hook.jsx +58 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_react_hook.md +1 -0
- data/app/pb_kits/playbook/pb_select/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_select/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_default.html.erb +1 -2
- data/app/pb_kits/playbook/pb_title/docs/_title_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_title/docs/_title_display_size.html.erb +7 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_display_size.jsx +54 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_display_size.md +1 -0
- data/app/pb_kits/playbook/pb_title/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_title/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_icon_rails.html.erb +22 -0
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_sizing.jsx +69 -0
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_sizing.md +3 -0
- data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx +66 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.md +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/dist/playbook-doc.js +1 -1
- metadata +21 -3
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_icon.erb +0 -10
@@ -0,0 +1,54 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Title from '../_title'
|
4
|
+
|
5
|
+
const TitleDisplaySize = (props) => {
|
6
|
+
return (
|
7
|
+
<div>
|
8
|
+
<Title
|
9
|
+
displaySize="xs"
|
10
|
+
tag="h1"
|
11
|
+
text="Display Size xs"
|
12
|
+
{...props}
|
13
|
+
/>
|
14
|
+
<Title
|
15
|
+
displaySize="sm"
|
16
|
+
tag="h1"
|
17
|
+
text="Display Size sm"
|
18
|
+
{...props}
|
19
|
+
/>
|
20
|
+
<Title
|
21
|
+
displaySize="md"
|
22
|
+
tag="h1"
|
23
|
+
text="Display Size md"
|
24
|
+
{...props}
|
25
|
+
/>
|
26
|
+
<Title
|
27
|
+
displaySize="lg"
|
28
|
+
tag="h1"
|
29
|
+
text="Display Size lg"
|
30
|
+
{...props}
|
31
|
+
/>
|
32
|
+
<Title
|
33
|
+
displaySize="xl"
|
34
|
+
tag="h1"
|
35
|
+
text="Display Size xl"
|
36
|
+
{...props}
|
37
|
+
/>
|
38
|
+
<Title
|
39
|
+
displaySize="xxl"
|
40
|
+
tag="h1"
|
41
|
+
text="Display Size xxl"
|
42
|
+
{...props}
|
43
|
+
/>
|
44
|
+
<Title
|
45
|
+
size="display"
|
46
|
+
tag="h1"
|
47
|
+
text="This is a size of display"
|
48
|
+
{...props}
|
49
|
+
/>
|
50
|
+
</div>
|
51
|
+
)
|
52
|
+
}
|
53
|
+
|
54
|
+
export default TitleDisplaySize
|
@@ -0,0 +1 @@
|
|
1
|
+
Responsive sizes for large screens and tablets, perfect for digital signage.
|
@@ -5,6 +5,7 @@ examples:
|
|
5
5
|
- title_colors: Colors
|
6
6
|
- title_responsive: Responsive
|
7
7
|
- title_truncate: Truncate
|
8
|
+
- title_display_size: Display Size
|
8
9
|
|
9
10
|
react:
|
10
11
|
- title_default: Default UI
|
@@ -12,3 +13,4 @@ examples:
|
|
12
13
|
- title_colors: Colors
|
13
14
|
- title_responsive: Responsive
|
14
15
|
- title_truncate: Truncate
|
16
|
+
- title_display_size: Display Size
|
@@ -3,3 +3,4 @@ export { default as TitleLightWeight } from './_title_light_weight.jsx'
|
|
3
3
|
export { default as TitleColors } from './_title_colors.jsx'
|
4
4
|
export { default as TitleResponsive } from './_title_responsive.jsx'
|
5
5
|
export { default as TitleTruncate } from './_title_truncate.jsx'
|
6
|
+
export { default as TitleDisplaySize } from './_title_display_size.jsx'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<%= pb_rails "flex", props: { flex_direction: "row", gap: "md", wrap: true } do %>
|
2
|
+
<%= pb_rails "button", props: { id: "tool-tip-with-icon-1", text: "Tooltip With Icon" } %>
|
3
|
+
<%= pb_rails "tooltip", props: { trigger_element_selector: "#tool-tip-with-icon-1", tooltip_id: "tool-tip-with-icon-1", position: "top" } do %>
|
4
|
+
<%= pb_rails("icon", props: { icon: "paper-plane", fixed_width: true, color: "white", size: "1x", padding_right: "xxs" }) %>
|
5
|
+
Send Email
|
6
|
+
<% end %>
|
7
|
+
<%= pb_rails "button", props: { id: "tool-tip-with-icon-2", text: "Tooltip With Icon" } %>
|
8
|
+
<%= pb_rails "tooltip", props: { trigger_element_selector: "#tool-tip-with-icon-2", tooltip_id: "tool-tip-with-icon-2", position: "bottom" } do %>
|
9
|
+
<%= pb_rails("icon", props: { icon: "paper-plane", fixed_width: true, color: "white", size: "1x", padding_right: "xxs" }) %>
|
10
|
+
Send Email
|
11
|
+
<% end %>
|
12
|
+
<%= pb_rails "button", props: { id: "tool-tip-with-icon-3", text: "Tooltip With Icon" } %>
|
13
|
+
<%= pb_rails "tooltip", props: { trigger_element_selector: "#tool-tip-with-icon-3", tooltip_id: "tool-tip-with-icon-3", position: "left" } do %>
|
14
|
+
<%= pb_rails("icon", props: { icon: "paper-plane", fixed_width: true, color: "white", size: "1x", padding_right: "xxs" }) %>
|
15
|
+
Send Email
|
16
|
+
<% end %>
|
17
|
+
<%= pb_rails "button", props: { id: "tool-tip-with-icon-4", text: "Tooltip With Icon" } %>
|
18
|
+
<%= pb_rails "tooltip", props: { trigger_element_selector: "#tool-tip-with-icon-4", tooltip_id: "tool-tip-with-icon-4", position: "right" } do %>
|
19
|
+
<%= pb_rails("icon", props: { icon: "paper-plane", fixed_width: true, color: "white", size: "1x", padding_right: "xxs" }) %>
|
20
|
+
Send Email
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Button, Tooltip, Flex, FlexItem } from 'playbook-ui';
|
3
|
+
|
4
|
+
const TooltipSizing = (props) => {
|
5
|
+
|
6
|
+
return (
|
7
|
+
<Flex
|
8
|
+
flexDirection='row'
|
9
|
+
gap='md'
|
10
|
+
wrap
|
11
|
+
>
|
12
|
+
<FlexItem>
|
13
|
+
<Tooltip
|
14
|
+
height='150px'
|
15
|
+
placement='top'
|
16
|
+
text="I'm 150px high and 100px wide!"
|
17
|
+
width='100px'
|
18
|
+
{...props}
|
19
|
+
>
|
20
|
+
<Button text="Height and Width"/>
|
21
|
+
</Tooltip>
|
22
|
+
</FlexItem>
|
23
|
+
<FlexItem>
|
24
|
+
<Tooltip
|
25
|
+
maxHeight='100px'
|
26
|
+
placement='top'
|
27
|
+
text="I have a maxHeight of 100px! Lorem ipsum dolor sit amet consectetur adipisicing elit."
|
28
|
+
width='250px'
|
29
|
+
{...props}
|
30
|
+
>
|
31
|
+
<Button text="maxHeight"/>
|
32
|
+
</Tooltip>
|
33
|
+
</FlexItem>
|
34
|
+
<FlexItem>
|
35
|
+
<Tooltip
|
36
|
+
maxWidth='150px'
|
37
|
+
placement='top'
|
38
|
+
text="I have a maxWidth of 150px! Lorem ipsum dolor sit amet consectetur adipisicing elit."
|
39
|
+
{...props}
|
40
|
+
>
|
41
|
+
<Button text="maxWidth"/>
|
42
|
+
</Tooltip>
|
43
|
+
</FlexItem>
|
44
|
+
<FlexItem>
|
45
|
+
<Tooltip
|
46
|
+
minWidth='300px'
|
47
|
+
placement='top'
|
48
|
+
text="I have a minWidth of 300px!"
|
49
|
+
{...props}
|
50
|
+
>
|
51
|
+
<Button text="minWidth"/>
|
52
|
+
</Tooltip>
|
53
|
+
</FlexItem>
|
54
|
+
<FlexItem>
|
55
|
+
<Tooltip
|
56
|
+
maxWidth='150px'
|
57
|
+
minHeight='300px'
|
58
|
+
placement='top'
|
59
|
+
text="I have a minHeight of 300px!"
|
60
|
+
{...props}
|
61
|
+
>
|
62
|
+
<Button text="minHeight"/>
|
63
|
+
</Tooltip>
|
64
|
+
</FlexItem>
|
65
|
+
</Flex>
|
66
|
+
)
|
67
|
+
}
|
68
|
+
|
69
|
+
export default TooltipSizing
|
@@ -4,6 +4,7 @@ examples:
|
|
4
4
|
- tooltip_default: Default
|
5
5
|
- tooltip_interaction: Content Interaction
|
6
6
|
- tooltip_selectors: Using Common Selectors
|
7
|
+
- tooltip_icon_rails: Tooltip with Icon
|
7
8
|
- tooltip_with_icon_circle: Icon Circle Tooltip
|
8
9
|
- tooltip_delay_rails: Delay
|
9
10
|
- tooltip_show_tooltip: Show Tooltip
|
@@ -12,7 +13,7 @@ examples:
|
|
12
13
|
- tooltip_default_react: Default
|
13
14
|
- tooltip_interaction: Content Interaction
|
14
15
|
- tooltip_margin: Margin
|
16
|
+
- tooltip_sizing: Tooltip Sizing
|
15
17
|
- tooltip_icon: Tooltip with Icon
|
16
18
|
- tooltip_delay: Delay
|
17
19
|
- tooltip_show_tooltip_react: Show Tooltip
|
18
|
-
|
@@ -1,6 +1,7 @@
|
|
1
1
|
export { default as TooltipDefaultReact } from './_tooltip_default_react'
|
2
2
|
export { default as TooltipInteraction } from './_tooltip_interaction'
|
3
3
|
export { default as TooltipMargin } from './_tooltip_margin'
|
4
|
+
export { default as TooltipSizing } from './_tooltip_sizing'
|
4
5
|
export { default as TooltipIcon } from './_tooltip_icon'
|
5
6
|
export { default as TooltipDelay } from './_tooltip_delay'
|
6
7
|
export { default as TooltipShowTooltipReact } from './_tooltip_show_tooltip_react'
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import { Typeahead, Title } from 'playbook-ui'
|
4
|
+
import { useForm } from 'react-hook-form'
|
5
|
+
|
6
|
+
const languages = [
|
7
|
+
{ label: 'JavaScript', value: '1995', category: 'Web Development' },
|
8
|
+
{ label: 'Python', value: '1991', category: 'General Purpose' },
|
9
|
+
{ label: 'Java', value: '1995', category: 'Enterprise' },
|
10
|
+
{ label: 'C++', value: '1985', category: 'Systems Programming' },
|
11
|
+
{ label: 'Go', value: '2009', category: 'Systems Programming' },
|
12
|
+
{ label: 'Rust', value: '2010', category: 'Systems Programming' },
|
13
|
+
{ label: 'Swift', value: '2014', category: 'Mobile Development' },
|
14
|
+
{ label: 'Kotlin', value: '2011', category: 'Mobile Development' },
|
15
|
+
{ label: 'Ruby', value: '1995', category: 'General Purpose' },
|
16
|
+
{ label: 'PHP', value: '1995', category: 'Web Development' },
|
17
|
+
]
|
18
|
+
|
19
|
+
const colors = [
|
20
|
+
{ label: 'Orange', value: '#FFA500' },
|
21
|
+
{ label: 'Red', value: '#FF0000' },
|
22
|
+
{ label: 'Green', value: '#00FF00' },
|
23
|
+
{ label: 'Blue', value: '#0000FF' },
|
24
|
+
]
|
25
|
+
|
26
|
+
const TypeaheadReactHook = (props) => {
|
27
|
+
const { register, watch } = useForm()
|
28
|
+
|
29
|
+
const selectedLanguages = watch('languages')
|
30
|
+
const selectedColor = watch('color')
|
31
|
+
|
32
|
+
return (
|
33
|
+
<>
|
34
|
+
<Typeahead
|
35
|
+
isMulti
|
36
|
+
label="Multi Select Languages"
|
37
|
+
multiKit="language"
|
38
|
+
options={languages}
|
39
|
+
{...props}
|
40
|
+
{...register('languages')}
|
41
|
+
/>
|
42
|
+
<Title
|
43
|
+
size={4}
|
44
|
+
text='Selected Languages'
|
45
|
+
/>
|
46
|
+
{selectedLanguages && selectedLanguages.map(language => (
|
47
|
+
<p key={language.label}>{`${language.label} - ${language.value} - ${language.category}`}</p>
|
48
|
+
))}
|
49
|
+
|
50
|
+
<Typeahead
|
51
|
+
label="Colors"
|
52
|
+
marginTop="lg"
|
53
|
+
options={colors}
|
54
|
+
{...props}
|
55
|
+
{...register('color')}
|
56
|
+
/>
|
57
|
+
<Title
|
58
|
+
size={4}
|
59
|
+
text='Selected Color'
|
60
|
+
/>
|
61
|
+
<p>{ selectedColor && `${selectedColor.label} - ${selectedColor.value}`}</p>
|
62
|
+
</>
|
63
|
+
)
|
64
|
+
}
|
65
|
+
|
66
|
+
export default TypeaheadReactHook
|
@@ -0,0 +1 @@
|
|
1
|
+
You can pass `react-hook-form` props to the Typeahead kit.
|
@@ -49,7 +49,7 @@ const TypeaheadWithPillsAsyncCustomOptions = (props) => {
|
|
49
49
|
* @summary - for doc example purposes only
|
50
50
|
*/
|
51
51
|
const handleOnMultiValueClick = (value) => {
|
52
|
-
alert(`You
|
52
|
+
alert(`You added the user: "${value.label}"`)
|
53
53
|
}
|
54
54
|
|
55
55
|
return (
|
@@ -56,7 +56,7 @@ const TypeaheadWithPillsAsyncUsers = (props) => {
|
|
56
56
|
* @summary - for doc example purposes only
|
57
57
|
*/
|
58
58
|
const handleOnMultiValueClick = (value) => {
|
59
|
-
alert(`You
|
59
|
+
alert(`You added the user: "${value.label}"`)
|
60
60
|
}
|
61
61
|
|
62
62
|
return (
|
@@ -13,3 +13,4 @@ export { default as TypeaheadCustomMenuList } from './_typeahead_custom_menu_lis
|
|
13
13
|
export { default as TypeaheadMarginBottom } from './_typeahead_margin_bottom.jsx'
|
14
14
|
export { default as TypeaheadWithPillsColor } from './_typeahead_with_pills_color.jsx'
|
15
15
|
export { default as TypeaheadTruncatedText } from './_typeahead_truncated_text.jsx'
|
16
|
+
export { default as TypeaheadReactHook } from './_typeahead_react_hook.jsx'
|