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.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +58 -0
  4. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
  5. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
  6. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -0
  7. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
  8. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +3 -1
  9. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +2 -2
  10. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +4 -1
  11. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +1 -0
  12. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -1
  13. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +71 -36
  14. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +6 -6
  15. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -0
  16. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +1 -2
  17. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb +27 -0
  18. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -3
  19. data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +1 -1
  20. data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +3 -0
  21. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +1 -6
  22. data/app/pb_kits/playbook/pb_nav/item.html.erb +7 -19
  23. data/app/pb_kits/playbook/pb_nav/nav.html.erb +3 -8
  24. data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +1 -6
  25. data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -6
  26. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +2 -1
  27. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.html.erb +1 -0
  28. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx +7 -0
  29. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.md +1 -0
  30. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +47 -0
  31. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +88 -0
  32. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +1 -0
  33. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
  34. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +51 -0
  35. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md +2 -0
  36. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +96 -0
  37. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +101 -0
  38. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md +1 -0
  39. data/app/pb_kits/playbook/pb_table/docs/example.yml +5 -0
  40. data/app/pb_kits/playbook/pb_table/docs/index.js +3 -1
  41. data/app/pb_kits/playbook/pb_table/index.ts +41 -9
  42. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +4 -0
  43. data/app/pb_kits/playbook/pb_table/table_body.html.erb +13 -7
  44. data/app/pb_kits/playbook/pb_table/table_body.rb +2 -0
  45. data/app/pb_kits/playbook/pb_table/table_row.html.erb +14 -7
  46. data/app/pb_kits/playbook/pb_table/table_row.rb +14 -1
  47. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +14 -0
  48. data/app/pb_kits/playbook/pb_text_input/index.js +9 -0
  49. data/app/pb_kits/playbook/pb_text_input/text_input.rb +5 -2
  50. data/dist/chunks/{_typeahead-TUUtEUg8.js → _typeahead-CAIQfP7X.js} +2 -2
  51. data/dist/chunks/_weekday_stacked-Dq02Kbeo.js +45 -0
  52. data/dist/chunks/{lib-DjpLC8uO.js → lib-D3us1bGD.js} +2 -2
  53. data/dist/chunks/{pb_form_validation-S56UaHZl.js → pb_form_validation-BpihMSOQ.js} +1 -1
  54. data/dist/chunks/vendor.js +1 -1
  55. data/dist/menu.yml +0 -7
  56. data/dist/playbook-doc.js +1 -1
  57. data/dist/playbook-rails-react-bindings.js +1 -1
  58. data/dist/playbook-rails.js +1 -1
  59. data/dist/playbook.css +1 -1
  60. data/lib/playbook/version.rb +1 -1
  61. metadata +20 -23
  62. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +0 -66
  63. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +0 -98
  64. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +0 -28
  65. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb +0 -42
  66. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +0 -19
  67. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +0 -26
  68. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +0 -10
  69. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +0 -17
  70. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +0 -19
  71. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +0 -16
  72. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +0 -35
  73. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +0 -42
  74. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +0 -13
  75. data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +0 -15
  76. data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +0 -4
  77. data/app/pb_kits/playbook/pb_avatar_action_button/pb_avatar_action_button.test.js +0 -31
  78. data/dist/chunks/_weekday_stacked--GSH9pBR.js +0 -45
  79. /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: 520a725d004f38fd119945b399c5e1dc6bcf5ca9929821965555ac8f72c3ffa1
4
- data.tar.gz: '0490ed67775bcb53cefe0bbedcaca9d2482cf47e899b5cd0e16fc382f0bb014c'
3
+ metadata.gz: 0c8c78420782988bab01929b844343a9351bb6d664032a4c69e7e8af20da169a
4
+ data.tar.gz: 428d83bf48e70f2dcc354bc2a8d96e6f6a0906117717cb8963982b572f2395e6
5
5
  SHA512:
6
- metadata.gz: 479d29aca4903e65fbaff26957ab48561ebd5a1d59e032c299a83cff41aae40e20ff195eb6d70e1fada990b7a79611ebfe19ec6984fc38e90fb058bc545ab05a
7
- data.tar.gz: 17394761a8b8756c5bbb557c7245d28f597514f5e301a5857e56bb860f233a4b23224d58f122c64c6488a0ab766e97c7e0936958f36e20236942b2e5f00585c4
6
+ metadata.gz: 2b0d24de756436a380a8c7a55ded51eb922834b4356ce2d7f45211201b72e46e68f064af4fc583f10f8c3366e32eb0dcf1fde143a6602e308aa908f52f8a10a3
7
+ data.tar.gz: '0996317c488d86f20a67376e79913b403f0f9f767074c86745d721cc20a4ee0bfcf1322a6afab2ecb5662ab4b3d538209f1acabb3c47a2efe08756e563bf4e44'
@@ -1,7 +1,6 @@
1
1
 
2
2
  @import 'pb_advanced_table/advanced_table';
3
3
  @import 'pb_avatar/avatar';
4
- @import 'pb_avatar_action_button/avatar_action_button';
5
4
  @import 'pb_background/background';
6
5
  @import 'pb_badge/badge';
7
6
  @import 'pb_bar_graph/bar_graph';
@@ -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.
@@ -17,6 +17,7 @@ examples:
17
17
 
18
18
  react:
19
19
  - bar_graph_default: Default
20
+ - bar_graph_pb_styles: Playbook Styles
20
21
  - bar_graph_legend: Legend
21
22
  - bar_graph_legend_position: Legend Position
22
23
  - bar_graph_legend_non_clickable: Legend Non Clickable
@@ -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("draggable/draggable_container", props: {tag:"tbody"}) do %>
46
+ <%= pb_rails("table/table_body", props: {draggable_container: true}) do %>
47
47
  <% initial_items.each do |item| %>
48
- <%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id], tag:"tr"}) do %>
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, make use of the `tag` prop on the draggable_container to set it to 'tbody' and the same prop on the draggable_item to set that to 'tr'. This will create the functionality seen here.
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.
@@ -72,6 +72,7 @@ const DraggableWithTableReact = (props) => {
72
72
  <Body
73
73
  paddingLeft="xxs"
74
74
  text={assignee_name}
75
+ {...props}
75
76
  />
76
77
  </Flex>
77
78
  </Table.Cell>
@@ -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, Flex } from "playbook-ui";
1
+ import React, { useState, useEffect } from "react"
2
+ import { Button, Drawer, Icon, Nav, NavItem } from "playbook-ui"
3
3
 
4
- const useDrawer = (visible = false) => {
5
- const [opened, setOpened] = useState(visible);
6
- const toggle = () => setOpened(!opened);
4
+ const DrawerMenu = () => {
5
+ const [isSmallScreen, setIsSmallScreen] = useState(false)
6
+ const navItems = ["Overview", "Albums", "Similar Artists"]
7
7
 
8
- return [opened, toggle];
9
- };
10
-
11
- const DrawerBreakpoints = () => {
12
- const [smallDrawerOpened, toggleSmallDrawer] = useDrawer();
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
- <Flex wrap>
17
- <Button
18
- id="sm"
19
- marginRight="md"
20
- onClick={toggleSmallDrawer}
21
- >
22
- {"Will open at small breakpoint"}
23
- </Button>
24
- </Flex>
25
- <Flex>
26
- <Drawer
27
- behavior={"push"}
28
- breakpoint="sm"
29
- onClose={toggleSmallDrawer}
30
- opened={smallDrawerOpened}
31
- overlay={false}
32
- placement={"right"}
33
- size={"lg"}
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
- Open because small breakpoint
36
- </Drawer>
37
- </Flex>
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 DrawerBreakpoints;
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('change', handler)
12
- return () => mediaQuery.removeEventListener('change', handler)
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="md"
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 ? 'vertical' : 'horizontal'}
35
- padding={isSmallScreen ? 'none' : 'sm'}
34
+ orientation={isSmallScreen ? "vertical" : "horizontal"}
35
+ padding={isSmallScreen ? "none" : "sm"}
36
36
  >
37
37
  <NavItem link='#'
38
38
  text='About'
@@ -10,4 +10,5 @@ examples:
10
10
  - drawer_menu: Within Element
11
11
  - drawer_sizes: Sizes
12
12
  - drawer_overlay: Overlay
13
+ - drawer_breakpoints: Breakpoints
13
14
  - drawer_borders: Borders
@@ -1,3 +1,2 @@
1
1
  <%= pb_rails("icon_button") %>
2
- </br>
3
- <%= pb_rails("icon_button", props: {variant: "link"}) %>
2
+ <%= pb_rails("icon_button", props: {variant: "link", margin_top: "md" }) %>
@@ -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 %>
@@ -2,6 +2,4 @@ examples:
2
2
 
3
3
  rails:
4
4
  - icon_button_default: Default
5
-
6
-
7
-
5
+ - icon_button_sizes: Sizes
@@ -8,7 +8,7 @@
8
8
  <%= pb_rails("icon", props: { icon: object.icon,
9
9
  fixed_width: true,
10
10
  dark: object.dark,
11
- size: "2x",
11
+ size: object.size,
12
12
  color: "text_lt_default",
13
13
  classname: "icon_button_icon",
14
14
  padding_x: "xxs", padding_y: "xs" }) %>
@@ -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,8 +1,3 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- data: object.data,
4
- id: object.id,
5
- class: object.classname,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
7
2
  <%= react_component("MultiLevelSelect", object.multi_level_select_options) %>
8
3
  <% 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
- <%= content_tag(object.tag,
5
- aria: object.aria,
6
- class: object.classname,
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
- <%= content_tag(object.tag,
31
- aria: object.aria,
32
- class: object.classname,
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
- <%= content_tag(:nav,
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
- <%= content_tag(:div, class: "pb_nav_list_title") do %>
9
- <%= content_tag(:a, class: "pb_nav_list_item_link_text", href: object.link) do %>
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,7 +1,2 @@
1
- <%= content_tag(:div,
2
- aria: object.aria.merge!(label: object.status),
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
7
2
  <% end %>
@@ -1,9 +1,4 @@
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 %>
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 %>
@@ -3,7 +3,8 @@
3
3
  @import "../tokens/border_radius";
4
4
 
5
5
  @mixin pb_progress_pill {
6
- width: 45px;
6
+ width: 100%;
7
+ max-width: 45px;
7
8
  height: 4px;
8
9
  border-radius: $border_rad_light;
9
10
  margin-right: $space_xs;
@@ -1 +1,2 @@
1
1
  <%= pb_rails("progress_pills", props: { aria: { label: "2 out of 3 steps complete" }, steps: 3, active: 2 }) %>
2
+ <%= pb_rails("progress_pills", props: { aria: { label: "9 out of 18 steps complete" }, steps: 18, active: 9, margin_top: "md" }) %>
@@ -10,6 +10,13 @@ const ProgressPillsDefault = (props) => {
10
10
  steps={3}
11
11
  {...props}
12
12
  />
13
+ <ProgressPills
14
+ active={9}
15
+ aria={{ label: '9 out of 18 steps complete' }}
16
+ marginTop="md"
17
+ steps={18}
18
+ {...props}
19
+ />
13
20
  </>
14
21
  )
15
22
  }
@@ -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
+