playbook_ui 14.13.0.pre.alpha.PBNTR5596029 → 14.13.0.pre.alpha.PLAY1856doc6166
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/_playbook.scss +0 -1
- data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +58 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +3 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +2 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +4 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -1
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +71 -36
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +6 -6
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +1 -2
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb +27 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -3
- data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +3 -0
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +1 -6
- data/app/pb_kits/playbook/pb_nav/item.html.erb +7 -19
- data/app/pb_kits/playbook/pb_nav/nav.html.erb +3 -8
- data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +1 -6
- data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -6
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +2 -1
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.html.erb +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx +7 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +88 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +51 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md +2 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +96 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +101 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_table/index.ts +41 -9
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +4 -0
- data/app/pb_kits/playbook/pb_table/table_body.html.erb +13 -7
- data/app/pb_kits/playbook/pb_table/table_body.rb +2 -0
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +14 -7
- data/app/pb_kits/playbook/pb_table/table_row.rb +14 -1
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +14 -0
- data/app/pb_kits/playbook/pb_text_input/index.js +9 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +5 -2
- data/dist/chunks/{_typeahead-TUUtEUg8.js → _typeahead-CAIQfP7X.js} +2 -2
- data/dist/chunks/_weekday_stacked-Dq02Kbeo.js +45 -0
- data/dist/chunks/{lib-DjpLC8uO.js → lib-D3us1bGD.js} +2 -2
- data/dist/chunks/{pb_form_validation-S56UaHZl.js → pb_form_validation-BpihMSOQ.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +0 -7
- 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 +20 -23
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +0 -66
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +0 -98
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +0 -28
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb +0 -42
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +0 -19
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +0 -26
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +0 -10
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +0 -17
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +0 -19
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +0 -16
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +0 -35
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +0 -42
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +0 -13
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +0 -15
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +0 -4
- data/app/pb_kits/playbook/pb_avatar_action_button/pb_avatar_action_button.test.js +0 -31
- data/dist/chunks/_weekday_stacked--GSH9pBR.js +0 -45
- /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible_with_custom_click.md → _table_with_collapsible_with_custom_click_react.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: 0c8c78420782988bab01929b844343a9351bb6d664032a4c69e7e8af20da169a
|
4
|
+
data.tar.gz: 428d83bf48e70f2dcc354bc2a8d96e6f6a0906117717cb8963982b572f2395e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b0d24de756436a380a8c7a55ded51eb922834b4356ce2d7f45211201b72e46e68f064af4fc583f10f8c3366e32eb0dcf1fde143a6602e308aa908f52f8a10a3
|
7
|
+
data.tar.gz: '0996317c488d86f20a67376e79913b403f0f9f767074c86745d721cc20a4ee0bfcf1322a6afab2ecb5662ab4b3d538209f1acabb3c47a2efe08756e563bf4e44'
|
@@ -0,0 +1,58 @@
|
|
1
|
+
@import "../tokens/colors";
|
2
|
+
@import "../tokens/typography";
|
3
|
+
@import url("https://code.highcharts.com/css/highcharts.css");
|
4
|
+
|
5
|
+
:root {
|
6
|
+
--highcharts-color-0: #{$data_1};
|
7
|
+
--highcharts-color-1: #{$data_2};
|
8
|
+
--highcharts-color-2: #{$data_3};
|
9
|
+
--highcharts-color-3: #{$data_4};
|
10
|
+
--highcharts-color-4: #{$data_5};
|
11
|
+
--highcharts-color-5: #{$data_6};
|
12
|
+
--highcharts-color-6: #{$data_7};
|
13
|
+
--highcharts-color-7: #{$data_8};
|
14
|
+
}
|
15
|
+
|
16
|
+
.highcharts-title {
|
17
|
+
font-family: $font_family_base;
|
18
|
+
font-weight: $bold;
|
19
|
+
font-size: $heading_3;
|
20
|
+
color: $text_lt_default;
|
21
|
+
fill: $text_lt_default;
|
22
|
+
}
|
23
|
+
|
24
|
+
.highcharts-subtitle {
|
25
|
+
font-family: $font_family_base;
|
26
|
+
color: $text_lt_light;
|
27
|
+
fill: $text_lt_light;
|
28
|
+
font-weight: $regular;
|
29
|
+
font-size: $text_base;
|
30
|
+
}
|
31
|
+
|
32
|
+
.highcharts-yaxis > .highcharts-axis-title {
|
33
|
+
color: $text_lt_lighter;
|
34
|
+
fill: $text_lt_lighter;
|
35
|
+
font-family: $font_family_base;
|
36
|
+
font-weight: $bold;
|
37
|
+
font-size: $text_smaller;
|
38
|
+
}
|
39
|
+
|
40
|
+
.highcharts-axis-labels {
|
41
|
+
font-family: $font_family_base;
|
42
|
+
color: $text_lt_lighter;
|
43
|
+
fill: $text_lt_lighter;
|
44
|
+
font-weight: $bold;
|
45
|
+
font-size: $text_smaller;
|
46
|
+
}
|
47
|
+
|
48
|
+
.highcharts-grid-line {
|
49
|
+
stroke: $border_light;
|
50
|
+
}
|
51
|
+
|
52
|
+
.highcharts-point {
|
53
|
+
border-radius: 3px;
|
54
|
+
}
|
55
|
+
|
56
|
+
.highcharts-axis-line {
|
57
|
+
stroke: $border_light;
|
58
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Highcharts from "highcharts";
|
3
|
+
import HighchartsReact from "highcharts-react-official";
|
4
|
+
|
5
|
+
import "../BarGraphStyles.scss";
|
6
|
+
// Your path might look more like this
|
7
|
+
//import "playbook-ui/dist/pb_bar_graph/BarGraphStyles.scss";
|
8
|
+
|
9
|
+
const columnChartData = [
|
10
|
+
{
|
11
|
+
name: "Installation",
|
12
|
+
data: [1475, 200, 3000, 654, 656],
|
13
|
+
},
|
14
|
+
{
|
15
|
+
name: "Manufacturing",
|
16
|
+
data: [4434, 524, 2320, 440, 500],
|
17
|
+
},
|
18
|
+
{
|
19
|
+
name: "Sales & Distribution",
|
20
|
+
data: [3387, 743, 1344, 434, 440],
|
21
|
+
},
|
22
|
+
{
|
23
|
+
name: "Project Development",
|
24
|
+
data: [3227, 878, 999, 780, 1000],
|
25
|
+
},
|
26
|
+
{
|
27
|
+
name: "Other",
|
28
|
+
data: [1111, 677, 3245, 500, 200],
|
29
|
+
},
|
30
|
+
];
|
31
|
+
|
32
|
+
const columnOptions = {
|
33
|
+
chart: {
|
34
|
+
type: "column",
|
35
|
+
},
|
36
|
+
series: columnChartData,
|
37
|
+
title: {
|
38
|
+
text: "Solar Employment Growth by Sector, 2010-2016",
|
39
|
+
},
|
40
|
+
subtitle: {
|
41
|
+
text: "Source: thesolarfoundation.com",
|
42
|
+
},
|
43
|
+
xAxis: {
|
44
|
+
categories: ["Jan", "Feb", "Mar", "Apr", "May"],
|
45
|
+
},
|
46
|
+
yAxis: {
|
47
|
+
min: 0,
|
48
|
+
title: {
|
49
|
+
text: "Number of Employees",
|
50
|
+
},
|
51
|
+
},
|
52
|
+
legend: { enabled: false },
|
53
|
+
credits: { enabled: false },
|
54
|
+
};
|
55
|
+
|
56
|
+
const BarGraphPbStyles = () => (
|
57
|
+
<div>
|
58
|
+
<HighchartsReact highcharts={Highcharts}
|
59
|
+
options={columnOptions}
|
60
|
+
/>
|
61
|
+
</div>
|
62
|
+
)
|
63
|
+
|
64
|
+
export default BarGraphPbStyles
|
@@ -0,0 +1 @@
|
|
1
|
+
You don't need to use the bar graph kit to apply the styles to your Highcharts bar graph. Just import the BarGraphStyles.scss to your component and the styles will apply automatically.
|
@@ -10,3 +10,4 @@ export { default as BarGraphStacked } from './_bar_graph_stacked.jsx'
|
|
10
10
|
export { default as BarGraphNegativeNumbers } from './_bar_graph_negative_numbers.jsx'
|
11
11
|
export { default as BarGraphSecondaryYAxis } from './_bar_graph_secondary_y_axis.jsx'
|
12
12
|
export { default as BarGraphHorizontal } from './_bar_graph_horizontal.jsx'
|
13
|
+
export { default as BarGraphPbStyles } from './_bar_graph_pb_styles.jsx'
|
@@ -29,6 +29,7 @@ type DatePickerProps = {
|
|
29
29
|
hideLabel?: boolean,
|
30
30
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
31
31
|
id?: string,
|
32
|
+
initializeOnce?: boolean,
|
32
33
|
inLine?: boolean,
|
33
34
|
inputAria?: { [key: string]: string },
|
34
35
|
inputData?: { [key: string]: string },
|
@@ -73,6 +74,7 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
|
|
73
74
|
hideLabel = false,
|
74
75
|
htmlOptions = {},
|
75
76
|
id,
|
77
|
+
initializeOnce = false,
|
76
78
|
inLine = false,
|
77
79
|
inputAria = {},
|
78
80
|
inputData = {},
|
@@ -134,7 +136,7 @@ useEffect(() => {
|
|
134
136
|
yearRange,
|
135
137
|
required: false,
|
136
138
|
}, scrollContainer)
|
137
|
-
})
|
139
|
+
}, initializeOnce ? [] : undefined)
|
138
140
|
const filteredProps = {...props}
|
139
141
|
if (filteredProps.marginBottom === undefined) {
|
140
142
|
filteredProps.marginBottom = "sm"
|
@@ -43,9 +43,9 @@
|
|
43
43
|
<% end %>
|
44
44
|
<% end %>
|
45
45
|
|
46
|
-
<%= pb_rails("
|
46
|
+
<%= pb_rails("table/table_body", props: {draggable_container: true}) do %>
|
47
47
|
<% initial_items.each do |item| %>
|
48
|
-
<%= pb_rails("
|
48
|
+
<%= pb_rails("table/table_row", props:{drag_id: item[:id], draggable_item: true}) do %>
|
49
49
|
<%= pb_rails("table/table_cell", props: { text: item[:id]}) %>
|
50
50
|
<%= pb_rails("table/table_cell") do %>
|
51
51
|
<%= pb_rails("flex", props:{align:"center"}) do %>
|
@@ -1 +1,4 @@
|
|
1
|
-
The draggable kit can also be used in conjunction with the table kit to create draggable table rows. To do this
|
1
|
+
The draggable kit can also be used in conjunction with the table kit to create draggable table rows. To do this:
|
2
|
+
|
3
|
+
- use the `draggable_container` prop on the table/table_body to designate it as the Draggable Container
|
4
|
+
- use the `draggable_item` prop on the table/table_row to designate it as the Draggable Item. Make sure to also pass id to the `drag_id` prop here.
|
@@ -4,8 +4,8 @@ examples:
|
|
4
4
|
- draggable_with_list: Draggable with List Kit
|
5
5
|
- draggable_with_selectable_list: Draggable with SelectableList Kit
|
6
6
|
- draggable_with_cards: Draggable with Cards
|
7
|
-
- draggable_multiple_containers: Dragging Across Multiple Containers
|
8
7
|
- draggable_with_table_react: Draggable with Table
|
8
|
+
- draggable_multiple_containers: Dragging Across Multiple Containers
|
9
9
|
|
10
10
|
rails:
|
11
11
|
- draggable_default_rails: Default
|
@@ -1,42 +1,77 @@
|
|
1
|
-
import React, { useState } from "react"
|
2
|
-
import { Button, Drawer,
|
1
|
+
import React, { useState, useEffect } from "react"
|
2
|
+
import { Button, Drawer, Icon, Nav, NavItem } from "playbook-ui"
|
3
3
|
|
4
|
-
const
|
5
|
-
const [
|
6
|
-
const
|
4
|
+
const DrawerMenu = () => {
|
5
|
+
const [isSmallScreen, setIsSmallScreen] = useState(false)
|
6
|
+
const navItems = ["Overview", "Albums", "Similar Artists"]
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
useEffect(() => {
|
9
|
+
const mediaQuery = window.matchMedia("(max-width: 992px)")
|
10
|
+
const updateScreen = (e) => setIsSmallScreen(e.matches)
|
11
|
+
updateScreen(mediaQuery)
|
12
|
+
mediaQuery.addEventListener('change', updateScreen)
|
13
|
+
return () => mediaQuery.removeEventListener('change', updateScreen)
|
14
|
+
}, [])
|
13
15
|
|
14
16
|
return (
|
15
|
-
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
17
|
+
<div>
|
18
|
+
<Button id='sidebar'
|
19
|
+
padding='xs'
|
20
|
+
>
|
21
|
+
<Icon icon='bars'
|
22
|
+
size='2x'
|
23
|
+
/>
|
24
|
+
</Button>
|
25
|
+
<Drawer
|
26
|
+
behavior={"push"}
|
27
|
+
breakpoint='md'
|
28
|
+
overlay={isSmallScreen ? true : false}
|
29
|
+
placement='left'
|
30
|
+
size='md'
|
31
|
+
triggerId='sidebar'
|
32
|
+
>
|
33
|
+
<Nav
|
34
|
+
link='#'
|
35
|
+
orientation='vertical'
|
36
|
+
padding={isSmallScreen ? "none" : "sm"}
|
37
|
+
variant='bold'
|
34
38
|
>
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
39
|
+
{navItems.map((text, index) => {
|
40
|
+
return (
|
41
|
+
<NavItem
|
42
|
+
collapsible
|
43
|
+
collapsibleTrail
|
44
|
+
fontWeight='bolder'
|
45
|
+
iconLeft='city'
|
46
|
+
iconRight={["plus", "minus"]}
|
47
|
+
key={index}
|
48
|
+
link='#'
|
49
|
+
text={text}
|
50
|
+
>
|
51
|
+
<NavItem fontSize='small'
|
52
|
+
link='#'
|
53
|
+
marginY='none'
|
54
|
+
text='City'
|
55
|
+
/>
|
56
|
+
<NavItem
|
57
|
+
fontSize='small'
|
58
|
+
link='#'
|
59
|
+
marginY='none'
|
60
|
+
text='People'
|
61
|
+
/>
|
62
|
+
<NavItem
|
63
|
+
fontSize='small'
|
64
|
+
link='#'
|
65
|
+
marginY='none'
|
66
|
+
text='Business'
|
67
|
+
/>
|
68
|
+
</NavItem>
|
69
|
+
)
|
70
|
+
})}
|
71
|
+
</Nav>
|
72
|
+
</Drawer>
|
73
|
+
</div>
|
74
|
+
)
|
75
|
+
}
|
41
76
|
|
42
|
-
export default
|
77
|
+
export default DrawerMenu
|
@@ -8,8 +8,8 @@ const DrawerMenu = () => {
|
|
8
8
|
const mediaQuery = window.matchMedia("(max-width: 600px)")
|
9
9
|
setIsSmallScreen(mediaQuery.matches)
|
10
10
|
const handler = (e) => setIsSmallScreen(e.matches)
|
11
|
-
mediaQuery.addEventListener(
|
12
|
-
return () => mediaQuery.removeEventListener(
|
11
|
+
mediaQuery.addEventListener("change", handler)
|
12
|
+
return () => mediaQuery.removeEventListener("change", handler)
|
13
13
|
}, [])
|
14
14
|
|
15
15
|
return (
|
@@ -22,17 +22,17 @@ const DrawerMenu = () => {
|
|
22
22
|
/>
|
23
23
|
</Button>
|
24
24
|
<Drawer
|
25
|
-
breakpoint=
|
25
|
+
breakpoint='md'
|
26
26
|
placement='bottom'
|
27
27
|
size='full'
|
28
28
|
triggerId='menuButton'
|
29
29
|
withinElement
|
30
30
|
>
|
31
|
-
<Nav
|
31
|
+
<Nav
|
32
32
|
highlight={false}
|
33
33
|
link='#'
|
34
|
-
orientation={isSmallScreen ?
|
35
|
-
padding={isSmallScreen ?
|
34
|
+
orientation={isSmallScreen ? "vertical" : "horizontal"}
|
35
|
+
padding={isSmallScreen ? "none" : "sm"}
|
36
36
|
>
|
37
37
|
<NavItem link='#'
|
38
38
|
text='About'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<%= pb_rails("flex", props: { align: "center"}) do %>
|
2
|
+
<%= pb_rails("icon_button", props: {size: "lg"}) %> <span>Large</span>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<%= pb_rails("flex", props: { align: "center" }) do %>
|
6
|
+
<%= pb_rails("icon_button", props: {size: "sm"}) %> <span>Small</span>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<%= pb_rails("flex", props: { align: "center" }) do %>
|
10
|
+
<%= pb_rails("icon_button", props: {size: "xs"}) %> <span>XSmall</span>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= pb_rails("flex", props: { align: "center", margin_top: "md" }) do %>
|
14
|
+
<%= pb_rails("icon_button", props: {size: "1x"}) %> <span>1x</span>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<%= pb_rails("flex", props: { align: "center" }) do %>
|
18
|
+
<%= pb_rails("icon_button", props: {size: "2x"}) %> <span>2x</span>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<%= pb_rails("flex", props: { align: "center" }) do %>
|
22
|
+
<%= pb_rails("icon_button", props: {size: "3x"}) %> <span>3x</span>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<%= pb_rails("flex", props: { align: "center" }) do %>
|
26
|
+
<%= pb_rails("icon_button", props: {size: "4x"}) %> <span>4x</span>
|
27
|
+
<% end %>
|
@@ -14,6 +14,9 @@ module Playbook
|
|
14
14
|
prop :variant, type: Playbook::Props::Enum,
|
15
15
|
values: %w[default link],
|
16
16
|
default: "default"
|
17
|
+
prop :size, type: Playbook::Props::Enum,
|
18
|
+
values: %w[1x 2x 3x 4x 5x 6x 7x 8x 9x 10x xs sm lg],
|
19
|
+
default: "2x"
|
17
20
|
def classname
|
18
21
|
generate_classname("pb_icon_button_kit", variant)
|
19
22
|
end
|
@@ -1,15 +1,9 @@
|
|
1
1
|
<% if object.collapsible %>
|
2
2
|
<%= pb_rails("collapsible", props: { name: "collapsible-nav-example", classname: object.collapsible_nav_classname }) do %>
|
3
3
|
<%= pb_rails("collapsible/collapsible_main", props: { name: "default-collapsible-nav", icon: object.collapsible_icons, size: "xs", dark: object.dark, classname:object.margin_classes }) do %>
|
4
|
-
<%=
|
5
|
-
|
6
|
-
|
7
|
-
data: object.data,
|
8
|
-
dark: object.dark,
|
9
|
-
id: object.id,
|
10
|
-
href: object.link && object.link,
|
11
|
-
target: object.link && object.target,
|
12
|
-
**combined_html_options
|
4
|
+
<%= pb_content_tag( object.tag,
|
5
|
+
href: object.link && object.link,
|
6
|
+
target: object.link && object.target
|
13
7
|
) do %>
|
14
8
|
<% if object.image_url %>
|
15
9
|
<%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper_collapsible" }) %>
|
@@ -20,22 +14,16 @@
|
|
20
14
|
<span class="pb_nav_list_item_text_collapsible">
|
21
15
|
<%= object.text %>
|
22
16
|
</span>
|
23
|
-
<% end %>
|
17
|
+
<% end %>
|
24
18
|
<% end %>
|
25
19
|
<%= pb_rails("collapsible/collapsible_content", props: {collapsed: object.collapsed}) do %>
|
26
20
|
<%= content.presence %>
|
27
21
|
<% end %>
|
28
22
|
<% end %>
|
29
23
|
<% else %>
|
30
|
-
<%=
|
31
|
-
|
32
|
-
|
33
|
-
**combined_html_options,
|
34
|
-
data: object.data,
|
35
|
-
dark: object.dark,
|
36
|
-
id: object.id,
|
37
|
-
href: object.link && object.link,
|
38
|
-
target: object.link && object.target
|
24
|
+
<%= pb_content_tag( object.tag,
|
25
|
+
href: object.link && object.link,
|
26
|
+
target: object.link && object.target
|
39
27
|
) do %>
|
40
28
|
<% if object.image_url %>
|
41
29
|
<%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper" }) %>
|
@@ -1,12 +1,7 @@
|
|
1
|
-
<%=
|
2
|
-
aria: object.aria,
|
3
|
-
class: object.classname,
|
4
|
-
data: object.data,
|
5
|
-
id: object.id,
|
6
|
-
**combined_html_options) do %>
|
1
|
+
<%= pb_content_tag(:nav) do %>
|
7
2
|
<% if object.title %>
|
8
|
-
<%=
|
9
|
-
<%=
|
3
|
+
<%= pb_content_tag do %>
|
4
|
+
<%= pb_content_tag(:a) do %>
|
10
5
|
<%= pb_rails("caption", props: { text: object.title, dark: dark }) %>
|
11
6
|
<% end %>
|
12
7
|
<% end %>
|
@@ -1,9 +1,4 @@
|
|
1
|
-
<%=
|
2
|
-
aria: object.aria,
|
3
|
-
class: object.classname,
|
4
|
-
data: object.data,
|
5
|
-
id: object.id,
|
6
|
-
**combined_html_options) do %>
|
1
|
+
<%= pb_content_tag do %>
|
7
2
|
<div class="pb_popover_tooltip hide" id="<%= object.tooltip_id %>" role="tooltip" style="<%= object.z_index_helper %>">
|
8
3
|
<div class="pb_popover_body <%= object.width_height_class_helper %> <%= object.popover_spacing_helper %>" style="<%= object.width_height_helper %>">
|
9
4
|
<%= content.presence %>
|
@@ -0,0 +1 @@
|
|
1
|
+
Progress pills start at `45px` wide if the container allows, but will shrink down to `1px` as the container gets smaller. Resize this window to see each pill shrink.
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<%= pb_rails("table", props: { size: "sm" }) do %>
|
2
|
+
<%= pb_rails("table/table_head") do %>
|
3
|
+
<%= pb_rails("table/table_row") do %>
|
4
|
+
<%= pb_rails("table/table_header", props: { text: "Column 1" }) %>
|
5
|
+
<%= pb_rails("table/table_header", props: { text: "Column 2" }) %>
|
6
|
+
<%= pb_rails("table/table_header", props: { text: "Column 3" }) %>
|
7
|
+
<%= pb_rails("table/table_header", props: { text: "Column 4" }) %>
|
8
|
+
<%= pb_rails("table/table_header", props: { text: "Column 5" }) %>
|
9
|
+
<%= pb_rails("table/table_header", props: { text: "" }) %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
<%= pb_rails("table/table_body") do %>
|
13
|
+
<%= pb_rails("table/table_row", props: { cursor: "pointer", html_options: { onclick: "alert('Row 1 clicked')" } }) do %>
|
14
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1" }) %>
|
15
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2" }) %>
|
16
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3" }) %>
|
17
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4" }) %>
|
18
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5" }) %>
|
19
|
+
<%= pb_rails("table/table_cell", props: { text_align: "right" }) do %>
|
20
|
+
<%= pb_rails("icon", props: { color: "primary_action", fixed_width: true, icon: "chevron-right", size: "xs" }) %>
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<%= pb_rails("table/table_row", props: { cursor: "pointer", html_options: { onclick: "alert('Row 2 clicked')" } }) do %>
|
25
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1" }) %>
|
26
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2" }) %>
|
27
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3" }) %>
|
28
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4" }) %>
|
29
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5" }) %>
|
30
|
+
<%= pb_rails("table/table_cell", props: { text_align: "right" }) do %>
|
31
|
+
<%= pb_rails("icon", props: { color: "primary_action", fixed_width: true, icon: "chevron-right", size: "xs" }) %>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<%= pb_rails("table/table_row", props: { cursor: "pointer", html_options: { onclick: "alert('Row 3 clicked')" } }) do %>
|
36
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1" }) %>
|
37
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2" }) %>
|
38
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3" }) %>
|
39
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4" }) %>
|
40
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5" }) %>
|
41
|
+
<%= pb_rails("table/table_cell", props: { text_align: "right" }) do %>
|
42
|
+
<%= pb_rails("icon", props: { color: "primary_action", fixed_width: true, icon: "chevron-right", size: "xs" }) %>
|
43
|
+
<% end %>
|
44
|
+
<% end %>
|
45
|
+
<% end %>
|
46
|
+
<% end %>
|
47
|
+
|