playbook_ui 14.11.1.pre.alpha.PLAY17445539 → 14.11.1.pre.alpha.hfhbrakemanplaybook5370
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.md +2 -2
- data/app/pb_kits/playbook/pb_button/button.html.erb +3 -2
- data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +6 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +9 -3
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_drawer/_drawer.scss +177 -154
- data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +264 -162
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +45 -3
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +1 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +16 -9
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +19 -44
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +3 -21
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +21 -16
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +19 -2
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -2
- data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +5 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +12 -7
- data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +14 -9
- data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +11 -6
- data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +14 -8
- data/app/pb_kits/playbook/pb_list/item.html.erb +8 -30
- data/app/pb_kits/playbook/pb_list/item.rb +0 -7
- data/app/pb_kits/playbook/pb_list/list.html.erb +11 -31
- data/app/pb_kits/playbook/pb_list/list.rb +0 -4
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -6
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +12 -30
- data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +1 -3
- data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +1 -20
- data/app/pb_kits/playbook/pb_radio/_radio.scss +8 -12
- data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +3 -8
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list.html.erb +3 -17
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list.rb +0 -3
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +4 -11
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.rb +0 -3
- data/app/pb_kits/playbook/pb_table/_table.tsx +3 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -2
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_table/index.ts +34 -93
- data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +5 -6
- data/app/pb_kits/playbook/pb_table/table.html.erb +1 -1
- data/app/pb_kits/playbook/pb_table/table.rb +2 -17
- data/app/pb_kits/playbook/pb_timeline/_timeline.scss +30 -30
- data/dist/chunks/{_typeahead-vFuUQM5F.js → _typeahead-BNULwihE.js} +2 -2
- data/dist/chunks/_weekday_stacked-BKWemDAe.js +45 -0
- data/dist/chunks/{lib-OFT985dg.js → lib-B7sgJtGS.js} +2 -2
- data/dist/chunks/{pb_form_validation-CrsXd1-Y.js → pb_form_validation-C5Cc0-1v.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +6 -21
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md +0 -5
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb +0 -38
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md +0 -3
- data/app/pb_kits/playbook/pb_drawer/context.ts +0 -11
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +0 -38
- data/app/pb_kits/playbook/pb_drawer/hooks/useBreakpoint.tsx +0 -73
- data/app/pb_kits/playbook/pb_drawer/hooks/useDrawerAnimation.tsx +0 -21
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.html.erb +0 -15
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx +0 -24
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb +0 -74
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb +0 -74
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md +0 -3
- data/app/pb_kits/playbook/pb_table/utilities/addDataTitle.ts +0 -22
- data/dist/chunks/_weekday_stacked-DG3A22sS.js +0 -45
@@ -1,56 +1,31 @@
|
|
1
|
-
import React
|
2
|
-
import { Button, Drawer, Icon,
|
1
|
+
import React from "react";
|
2
|
+
import { Button, Drawer, Icon, Title } from "playbook-ui";
|
3
3
|
|
4
4
|
const DrawerMenu = () => {
|
5
|
-
const [isSmallScreen, setIsSmallScreen] = useState(false)
|
6
|
-
|
7
|
-
useEffect(() => {
|
8
|
-
const mediaQuery = window.matchMedia("(max-width: 600px)")
|
9
|
-
setIsSmallScreen(mediaQuery.matches)
|
10
|
-
const handler = (e) => setIsSmallScreen(e.matches)
|
11
|
-
mediaQuery.addEventListener('change', handler)
|
12
|
-
return () => mediaQuery.removeEventListener('change', handler)
|
13
|
-
}, [])
|
14
5
|
|
15
6
|
return (
|
16
|
-
|
17
|
-
<Button id=
|
18
|
-
padding=
|
7
|
+
<>
|
8
|
+
<Button id="menuButton"
|
9
|
+
padding="sm"
|
19
10
|
>
|
20
|
-
<Icon icon=
|
21
|
-
size=
|
11
|
+
<Icon icon="bars"
|
12
|
+
size="3x"
|
22
13
|
/>
|
23
14
|
</Button>
|
24
15
|
<Drawer
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
16
|
+
behavior="push"
|
17
|
+
closeBreakpoint="md"
|
18
|
+
menuButtonID="menuButton"
|
19
|
+
overlay={false}
|
20
|
+
placement="left"
|
21
|
+
size="lg"
|
29
22
|
withinElement
|
30
23
|
>
|
31
|
-
<
|
32
|
-
|
33
|
-
link='#'
|
34
|
-
orientation={isSmallScreen ? 'vertical' : 'horizontal'}
|
35
|
-
padding={isSmallScreen ? 'none' : 'sm'}
|
36
|
-
>
|
37
|
-
<NavItem link='#'
|
38
|
-
text='About'
|
39
|
-
/>
|
40
|
-
<NavItem active
|
41
|
-
link='#'
|
42
|
-
text='Case Studies'
|
43
|
-
/>
|
44
|
-
<NavItem link='#'
|
45
|
-
text='Service'
|
46
|
-
/>
|
47
|
-
<NavItem link='#'
|
48
|
-
text='Contacts'
|
49
|
-
/>
|
50
|
-
</Nav>
|
24
|
+
<Title paddingBottom="md">A really neat menu</Title>
|
25
|
+
<Button text="This Button does nothing" />
|
51
26
|
</Drawer>
|
52
|
-
|
53
|
-
)
|
54
|
-
}
|
27
|
+
</>
|
28
|
+
);
|
29
|
+
};
|
55
30
|
|
56
|
-
export default DrawerMenu
|
31
|
+
export default DrawerMenu;
|
@@ -1,24 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
### Within Element
|
4
|
-
The `withinElement` prop allows you to render the drawer within its parent container:
|
5
|
-
- The drawer will be positioned relative to its parent element
|
6
|
-
- Useful for creating nested navigation structures
|
7
|
-
- This must be used in conjunction with the `triggerId` prop
|
8
|
-
|
9
|
-
This provides a clean way to create responsive navigation patterns that adapt to different screen sizes while maintaining a consistent user experience.
|
10
|
-
|
11
|
-
### Trigger Id
|
12
|
-
The `triggerId` prop allows you to connect an element to control the drawer:
|
13
|
-
- The specified element will toggle the drawer open/closed
|
14
|
-
- The element is automatically hidden when the drawer is opened via breakpoint
|
15
|
-
- The element reappears when the drawer is closed via breakpoint
|
16
|
-
|
17
|
-
### Breakpoint
|
18
|
-
Use the `breakpoint` prop to control when the drawer automatically opens or closes based on screen size. For example, setting `breakpoint="md"` will:
|
19
|
-
- Close the drawer on screens smaller than the medium breakpoint (992px)
|
20
|
-
- Automatically open the drawer on screens larger than or equal to the medium breakpoint
|
21
|
-
|
1
|
+
Our drawer kit can fulfill your responsive menu needs! Using the `closeBreakpoint` prop you can have the menu close on smaller screens like phones/tablets.
|
22
2
|
|
3
|
+
Set a menu button with the `menuButtonID` props. When the Drawer is open, the menu button will be hidden. But when your Brakpoint closes the drawer, you can toggle the Drawer open/close with your menu butotn.
|
23
4
|
|
5
|
+
Also use the `withinElement` props to have the Drawer open within a specific element, instead of the default behavior of it taking up the entire screen size.
|
24
6
|
|
@@ -1,25 +1,24 @@
|
|
1
|
-
import React, { useState } from "react"
|
2
|
-
import { Button, Drawer, Flex } from "playbook-ui"
|
1
|
+
import React, { useState } from "react";
|
2
|
+
import { Button, Drawer, Flex } from "playbook-ui";
|
3
3
|
|
4
4
|
const DrawerSizes = () => {
|
5
5
|
// Individual state variables for each drawer size
|
6
|
-
const [openedNoOverlayDrawer, setOpenedNoOverlayDrawer] = useState(false)
|
7
|
-
const [openedOverlayDrawer, setOpenedOverlayDrawer] = useState(false)
|
6
|
+
const [openedNoOverlayDrawer, setOpenedNoOverlayDrawer] = useState(false);
|
7
|
+
const [openedOverlayDrawer, setOpenedOverlayDrawer] = useState(false);
|
8
8
|
|
9
9
|
// Toggle functions for each drawer
|
10
|
-
const toggleNoOverlayDrawer = () =>
|
11
|
-
|
12
|
-
const toggleOverlayDrawer = () => setOpenedOverlayDrawer(!openedOverlayDrawer)
|
10
|
+
const toggleNoOverlayDrawer = () => setOpenedNoOverlayDrawer(!openedNoOverlayDrawer);
|
11
|
+
const toggleOverlayDrawer = () => setOpenedOverlayDrawer(!openedOverlayDrawer);
|
13
12
|
|
14
13
|
return (
|
15
14
|
<>
|
16
15
|
<Flex wrap>
|
17
|
-
<Button marginRight=
|
16
|
+
<Button marginRight="md"
|
18
17
|
onClick={toggleNoOverlayDrawer}
|
19
18
|
>
|
20
19
|
No Overlay Drawer
|
21
20
|
</Button>
|
22
|
-
<Button marginRight=
|
21
|
+
<Button marginRight="md"
|
23
22
|
onClick={toggleOverlayDrawer}
|
24
23
|
>
|
25
24
|
Overlay Drawer
|
@@ -28,23 +27,29 @@ const DrawerSizes = () => {
|
|
28
27
|
|
29
28
|
{/* Drawers for each size */}
|
30
29
|
<Drawer
|
30
|
+
behavior="push"
|
31
|
+
fullHeight
|
31
32
|
onClose={toggleNoOverlayDrawer}
|
32
33
|
opened={openedNoOverlayDrawer}
|
33
34
|
overlay={false}
|
34
|
-
|
35
|
+
placement="right"
|
36
|
+
size="lg"
|
35
37
|
>
|
36
38
|
This is a Drawer with no overlay
|
37
39
|
</Drawer>
|
38
40
|
<Drawer
|
41
|
+
behavior="push"
|
42
|
+
fullHeight
|
39
43
|
onClose={toggleOverlayDrawer}
|
40
44
|
opened={openedOverlayDrawer}
|
41
|
-
|
42
|
-
|
45
|
+
overlay
|
46
|
+
placement="right"
|
47
|
+
size="lg"
|
43
48
|
>
|
44
|
-
This is a Drawer with an overlay
|
49
|
+
This is a Drawer with an overlay
|
45
50
|
</Drawer>
|
46
51
|
</>
|
47
|
-
)
|
48
|
-
}
|
52
|
+
);
|
53
|
+
};
|
49
54
|
|
50
|
-
export default DrawerSizes
|
55
|
+
export default DrawerSizes;
|
@@ -19,8 +19,7 @@ const DrawerSizes = () => {
|
|
19
19
|
return (
|
20
20
|
<>
|
21
21
|
<Flex wrap>
|
22
|
-
<Button
|
23
|
-
marginRight="md"
|
22
|
+
<Button marginRight="md"
|
24
23
|
onClick={toggleXsDrawer}
|
25
24
|
>
|
26
25
|
XS Drawer
|
@@ -49,8 +48,11 @@ const DrawerSizes = () => {
|
|
49
48
|
|
50
49
|
{/* Drawers for each size */}
|
51
50
|
<Drawer
|
51
|
+
behavior="push"
|
52
|
+
fullHeight
|
52
53
|
onClose={toggleXsDrawer}
|
53
54
|
opened={openedXsDrawer}
|
55
|
+
overlay
|
54
56
|
placement="right"
|
55
57
|
size="xs"
|
56
58
|
>
|
@@ -58,32 +60,47 @@ const DrawerSizes = () => {
|
|
58
60
|
</Drawer>
|
59
61
|
|
60
62
|
<Drawer
|
63
|
+
behavior="push"
|
64
|
+
fullHeight
|
61
65
|
onClose={toggleSmDrawer}
|
62
66
|
opened={openedSmDrawer}
|
67
|
+
overlay
|
68
|
+
placement="right"
|
63
69
|
size="sm"
|
64
70
|
>
|
65
71
|
This is an SM Drawer
|
66
72
|
</Drawer>
|
67
73
|
|
68
74
|
<Drawer
|
75
|
+
behavior="push"
|
76
|
+
fullHeight
|
69
77
|
onClose={toggleMdDrawer}
|
70
78
|
opened={openedMdDrawer}
|
79
|
+
overlay
|
71
80
|
placement="right"
|
81
|
+
size="md"
|
72
82
|
>
|
73
83
|
This is an MD Drawer
|
74
84
|
</Drawer>
|
75
85
|
|
76
86
|
<Drawer
|
87
|
+
behavior="push"
|
88
|
+
fullHeight
|
77
89
|
onClose={toggleLgDrawer}
|
78
90
|
opened={openedLgDrawer}
|
91
|
+
overlay
|
92
|
+
placement="right"
|
79
93
|
size="lg"
|
80
94
|
>
|
81
95
|
This is an LG Drawer
|
82
96
|
</Drawer>
|
83
97
|
|
84
98
|
<Drawer
|
99
|
+
behavior="push"
|
100
|
+
fullHeight
|
85
101
|
onClose={toggleXlDrawer}
|
86
102
|
opened={openedXlDrawer}
|
103
|
+
overlay
|
87
104
|
placement="right"
|
88
105
|
size="xl"
|
89
106
|
>
|
@@ -4,4 +4,3 @@ export { default as DrawerOverlay } from './_drawer_overlay.jsx'
|
|
4
4
|
export { default as DrawerBorders } from './_drawer_borders.jsx'
|
5
5
|
export { default as DrawerBreakpoints } from './_drawer_breakpoints.jsx'
|
6
6
|
export { default as DrawerMenu } from './_drawer_menu.jsx'
|
7
|
-
export { default as DrawerBehavior } from './_drawer_behavior.jsx'
|
@@ -39,7 +39,7 @@ test('renders with the right border class when border prop is right', async () =
|
|
39
39
|
const container = document.getElementById('drawer-id');
|
40
40
|
const drawer = container.querySelector('#drawer-id .pb_drawer');
|
41
41
|
|
42
|
-
expect(drawer).toHaveClass('
|
42
|
+
expect(drawer).toHaveClass('drawer_border_right');
|
43
43
|
});
|
44
44
|
|
45
45
|
test('renders with the full border class when border prop is full', async () => {
|
@@ -51,7 +51,7 @@ test('renders with the full border class when border prop is full', async () =>
|
|
51
51
|
|
52
52
|
const container = document.getElementById('drawer-id');
|
53
53
|
const drawer = container.querySelector('#drawer-id .pb_drawer');
|
54
|
-
expect(drawer).toHaveClass('
|
54
|
+
expect(drawer).toHaveClass('drawer_border_full');
|
55
55
|
});
|
56
56
|
|
57
57
|
test('does not have a border class when border prop is none', async () => {
|
@@ -63,9 +63,9 @@ test('does not have a border class when border prop is none', async () => {
|
|
63
63
|
|
64
64
|
const container = document.getElementById('drawer-id');
|
65
65
|
const drawer = container.querySelector('#drawer-id .pb_drawer');
|
66
|
-
expect(drawer).not.toHaveClass('
|
67
|
-
expect(drawer).not.toHaveClass('
|
68
|
-
expect(drawer).not.toHaveClass('
|
66
|
+
expect(drawer).not.toHaveClass('drawer_border_right');
|
67
|
+
expect(drawer).not.toHaveClass('drawer_border_left');
|
68
|
+
expect(drawer).not.toHaveClass('drawer_border_full');
|
69
69
|
});
|
70
70
|
|
71
71
|
test('renders the correct size class for a large drawer', async () => {
|
@@ -1 +1 @@
|
|
1
|
-
For the `subtle` variant, it is recommended that you set the `Separators` prop to `false` to remove the separator lines between the options for a cleaner look.
|
1
|
+
For the `subtle` variant, it is recommended that you set the `Separators` prop to `false` to remove the separator lines between the options for a more cleaner look.
|
@@ -1,14 +1,19 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<% if object.label.present? %>
|
3
8
|
<%= pb_rails("caption", props: {text: object.label, margin_bottom:"xs"}) %>
|
4
9
|
<% end %>
|
5
10
|
<div class="dropdown_wrapper<%= error_class %>" style="position: relative">
|
6
|
-
<input
|
7
|
-
data-default-value="<%= input_default_value %>"
|
8
|
-
id="dropdown-selected-option"
|
9
|
-
name="<%= object.name %>"
|
10
|
-
style="display: none"
|
11
|
-
<%= object.required ? "required" : ""%>
|
11
|
+
<input
|
12
|
+
data-default-value="<%= input_default_value %>"
|
13
|
+
id="dropdown-selected-option"
|
14
|
+
name="<%= object.name %>"
|
15
|
+
style="display: none"
|
16
|
+
<%= object.required ? "required" : ""%>
|
12
17
|
/>
|
13
18
|
<% if content.present? %>
|
14
19
|
<%= content.presence %>
|
@@ -1,15 +1,20 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("list", props: {ordered: false, borderless: false}) do %>
|
3
|
-
<% if content.present? %>
|
8
|
+
<% if content.present? %>
|
4
9
|
<%= content.presence %>
|
5
|
-
<% else %>
|
10
|
+
<% else %>
|
6
11
|
<%= pb_rails("list/item", props: {
|
7
|
-
display: "flex",
|
8
|
-
justify_content: "center",
|
9
|
-
padding:"xs",
|
10
|
-
}) do %>
|
12
|
+
display: "flex",
|
13
|
+
justify_content: "center",
|
14
|
+
padding:"xs",
|
15
|
+
}) do %>
|
11
16
|
<%= pb_rails("body", props: {text: "No option"}) %>
|
12
17
|
<% end %>
|
13
18
|
<% end %>
|
14
|
-
<% end %>
|
15
|
-
<% end %>
|
19
|
+
<% end %>
|
20
|
+
<% end %>
|
@@ -1,10 +1,15 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.option[:id],
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("list/item", props: {
|
3
|
-
display: "flex",
|
4
|
-
justify_content: "center",
|
5
|
-
padding:"none",
|
8
|
+
display: "flex",
|
9
|
+
justify_content: "center",
|
10
|
+
padding:"none",
|
6
11
|
cursor: "pointer"
|
7
|
-
}) do %>
|
12
|
+
}) do %>
|
8
13
|
<div class="dropdown_option_wrapper">
|
9
14
|
<% if content.present? %>
|
10
15
|
<%= content.presence %>
|
@@ -13,4 +18,4 @@
|
|
13
18
|
<% end %>
|
14
19
|
</div>
|
15
20
|
<% end %>
|
16
|
-
<% end %>
|
21
|
+
<% end %>
|
@@ -1,16 +1,21 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<% if content.present? %>
|
3
8
|
<div style="display: inline-block" tabindex="0" data-dropdown-custom-trigger>
|
4
9
|
<%= content.presence %>
|
5
10
|
</div>
|
6
11
|
<% else %>
|
7
12
|
<%= pb_rails("flex", props: {
|
8
|
-
align: "center",
|
9
|
-
border_radius:"lg",
|
10
|
-
classname: object.trigger_wrapper_classes,
|
11
|
-
cursor: "pointer",
|
12
|
-
justify: "between",
|
13
|
-
padding_x:"sm",
|
13
|
+
align: "center",
|
14
|
+
border_radius:"lg",
|
15
|
+
classname: object.trigger_wrapper_classes,
|
16
|
+
cursor: "pointer",
|
17
|
+
justify: "between",
|
18
|
+
padding_x:"sm",
|
14
19
|
padding_y:"xs",
|
15
20
|
html_options: {tabindex:"0"}
|
16
21
|
}) do %>
|
@@ -18,7 +23,7 @@
|
|
18
23
|
<%= pb_rails("flex", props: {align: "center"}) do %>
|
19
24
|
<% if object.custom_display.present? %>
|
20
25
|
<%= pb_rails("flex", props: {align: "center"}) do %>
|
21
|
-
<div id="dropdown_trigger_custom_display" style="display: none;">
|
26
|
+
<div id="dropdown_trigger_custom_display" style="display: none;">
|
22
27
|
<%= object.custom_display %>
|
23
28
|
</div>
|
24
29
|
<%= pb_rails("body", props: {text: object.default_display_placeholder, id: "dropdown_trigger_display"}) %>
|
@@ -35,3 +40,4 @@
|
|
35
40
|
<% end %>
|
36
41
|
<% end %>
|
37
42
|
<% end %>
|
43
|
+
|
@@ -1,32 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
**combined_html_options
|
10
|
-
) do %>
|
11
|
-
<% if object.drag_handle %>
|
12
|
-
<span style="vertical-align: middle;">
|
13
|
-
<%= pb_rails("body") do %>
|
14
|
-
<svg width="auto" height="auto" viewBox="0 0 31 25" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="pb_custom_icon svg-inline--fa vertical_align_middle svg_fw"><path d="M12.904 6.355a1.48 1.48 0 01-1.5-1.5c0-.796.656-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5 0 .844-.703 1.5-1.5 1.5zm0 7.5a1.48 1.48 0 01-1.5-1.5c0-.796.656-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5 0 .844-.703 1.5-1.5 1.5zm1.5 6c0 .844-.703 1.5-1.5 1.5a1.48 1.48 0 01-1.5-1.5c0-.796.656-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5zm4.5-13.5a1.48 1.48 0 01-1.5-1.5c0-.796.657-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5 0 .844-.703 1.5-1.5 1.5zm1.5 6c0 .844-.703 1.5-1.5 1.5a1.48 1.48 0 01-1.5-1.5c0-.796.657-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5zm-1.5 9a1.48 1.48 0 01-1.5-1.5c0-.796.657-1.5 1.5-1.5.797 0 1.5.704 1.5 1.5 0 .844-.703 1.5-1.5 1.5z" fill="#242B42"></path></svg>
|
15
|
-
<% end %>
|
16
|
-
</span>
|
17
|
-
<% end %>
|
18
|
-
<%= content.presence %>
|
19
|
-
<% end %>
|
20
|
-
<% end %>
|
21
|
-
<% else %>
|
22
|
-
<%= content_tag(:li,
|
23
|
-
aria: object.aria,
|
24
|
-
class: object.classname,
|
25
|
-
data: object.data,
|
26
|
-
id: object.id,
|
27
|
-
tabindex: object.tabindex,
|
28
|
-
**combined_html_options
|
29
|
-
) do %>
|
1
|
+
<%= content_tag(:li,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
tabindex: object.tabindex,
|
7
|
+
**combined_html_options
|
8
|
+
) do %>
|
30
9
|
<%= content.presence %>
|
31
|
-
<% end %>
|
32
10
|
<% end %>
|
@@ -3,18 +3,11 @@
|
|
3
3
|
module Playbook
|
4
4
|
module PbList
|
5
5
|
class Item < Playbook::KitBase
|
6
|
-
prop :drag_handle, type: Playbook::Props::Boolean,
|
7
|
-
default: true
|
8
|
-
prop :drag_id, type: Playbook::Props::String
|
9
6
|
prop :tabindex
|
10
7
|
|
11
8
|
def classname
|
12
9
|
generate_classname("pb_item_kit")
|
13
10
|
end
|
14
|
-
|
15
|
-
def draggable?
|
16
|
-
drag_id.present?
|
17
|
-
end
|
18
11
|
end
|
19
12
|
end
|
20
13
|
end
|
@@ -1,33 +1,13 @@
|
|
1
|
-
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
**combined_html_options
|
13
|
-
) do %>
|
14
|
-
<%= content.presence %>
|
15
|
-
<% end %>
|
16
|
-
<% end %>
|
17
|
-
<% end %>
|
18
|
-
<% end %>
|
19
|
-
<% else %>
|
20
|
-
<%= content_tag(:div, class: object.list_classname) do %>
|
21
|
-
<%= content_tag(:"#{object.ordered_class}",
|
22
|
-
aria: object.aria,
|
23
|
-
class: object.classname,
|
24
|
-
data: object.data,
|
25
|
-
id: object.id,
|
26
|
-
role: object.role,
|
27
|
-
tabindex: object.tabindex,
|
28
|
-
**combined_html_options
|
29
|
-
) do %>
|
30
|
-
<%= content.presence %>
|
31
|
-
<% end %>
|
1
|
+
<%= content_tag(:div, class: object.list_classname) do %>
|
2
|
+
<%= content_tag(:"#{object.ordered_class}",
|
3
|
+
aria: object.aria,
|
4
|
+
class: object.classname,
|
5
|
+
data: object.data,
|
6
|
+
id: object.id,
|
7
|
+
role: object.role,
|
8
|
+
tabindex: object.tabindex,
|
9
|
+
**combined_html_options
|
10
|
+
) do %>
|
11
|
+
<%= content.presence %>
|
32
12
|
<% end %>
|
33
13
|
<% end %>
|
@@ -7,10 +7,6 @@ module Playbook
|
|
7
7
|
default: false
|
8
8
|
prop :dark, type: Playbook::Props::Boolean,
|
9
9
|
default: false
|
10
|
-
prop :enable_drag, type: Playbook::Props::Boolean,
|
11
|
-
default: false
|
12
|
-
prop :items, type: Playbook::Props::Array,
|
13
|
-
default: []
|
14
10
|
prop :layout, type: Playbook::Props::Enum,
|
15
11
|
values: ["left", "right", ""],
|
16
12
|
default: ""
|
@@ -12,7 +12,6 @@ type LoadingInlineProps = {
|
|
12
12
|
aria?: { [key: string]: string },
|
13
13
|
className?: string,
|
14
14
|
data?: { [key: string]: string },
|
15
|
-
dark?: boolean,
|
16
15
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
17
16
|
id?: string,
|
18
17
|
text?: string,
|
@@ -24,7 +23,6 @@ const LoadingInline = (props: LoadingInlineProps) => {
|
|
24
23
|
aria = {},
|
25
24
|
className,
|
26
25
|
data = {},
|
27
|
-
dark = false,
|
28
26
|
htmlOptions = {},
|
29
27
|
id,
|
30
28
|
text = ' Loading',
|
@@ -47,10 +45,7 @@ const LoadingInline = (props: LoadingInlineProps) => {
|
|
47
45
|
className={classes}
|
48
46
|
id={id}
|
49
47
|
>
|
50
|
-
<Body
|
51
|
-
color="light"
|
52
|
-
dark={dark}
|
53
|
-
>
|
48
|
+
<Body color="light">
|
54
49
|
<Icon
|
55
50
|
aria={{ label: 'loading icon' }}
|
56
51
|
fixedWidth
|