playbook_ui 14.9.0.pre.alpha.play1703errorstatealignment5060 → 14.9.0.pre.alpha.play1742globalheightfixes4766

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx +6 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -8
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +2 -4
  6. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +3 -5
  7. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +0 -8
  8. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
  9. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +0 -8
  10. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +0 -2
  11. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +2 -0
  12. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +49 -53
  13. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +36 -29
  14. data/app/pb_kits/playbook/pb_body/_body.scss +13 -14
  15. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +16 -22
  16. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +0 -6
  17. data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -2
  18. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -1
  19. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +4 -9
  20. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +2 -2
  21. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +2 -2
  22. data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +0 -5
  23. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +2 -7
  24. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +2 -8
  25. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +2 -11
  26. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -17
  27. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb +1 -17
  28. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx +0 -15
  29. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md +1 -2
  30. data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +1 -15
  31. data/app/pb_kits/playbook/pb_link/_link.scss +3 -3
  32. data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +1 -11
  33. data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +2 -16
  34. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +1 -1
  35. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +4 -4
  36. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
  37. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +0 -2
  38. data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +1 -2
  39. data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +0 -2
  40. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +36 -44
  41. data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +4 -4
  42. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -5
  43. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -5
  44. data/app/pb_kits/playbook/pb_table/index.ts +26 -100
  45. data/app/pb_kits/playbook/pb_table/styles/_all.scss +1 -2
  46. data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +1 -106
  47. data/app/pb_kits/playbook/pb_table/table.html.erb +1 -1
  48. data/app/pb_kits/playbook/pb_table/table.rb +2 -17
  49. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +3 -35
  50. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -1
  51. data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
  52. data/app/pb_kits/playbook/pb_text_input/text_input.test.js +2 -139
  53. data/app/pb_kits/playbook/pb_title/_title.scss +5 -6
  54. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +0 -13
  55. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +46 -115
  56. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +2 -9
  57. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -3
  58. data/app/pb_kits/playbook/tokens/_titles.scss +8 -0
  59. data/app/pb_kits/playbook/utilities/_hover.scss +2 -11
  60. data/app/pb_kits/playbook/utilities/globalProps.ts +0 -2
  61. data/app/pb_kits/playbook/utilities/test/globalProps/hover.test.js +0 -15
  62. data/dist/chunks/_typeahead-B8fkIeXA.js +22 -0
  63. data/dist/chunks/_weekday_stacked-DjRTXEi-.js +45 -0
  64. data/dist/chunks/{lib-CuCy3_xO.js → lib-SyD3buPZ.js} +3 -3
  65. data/dist/chunks/{pb_form_validation-D37k10a0.js → pb_form_validation-Dt8UJgrJ.js} +1 -1
  66. data/dist/chunks/vendor.js +1 -1
  67. data/dist/menu.yml +1 -1
  68. data/dist/playbook-doc.js +1 -1
  69. data/dist/playbook-rails-react-bindings.js +1 -1
  70. data/dist/playbook-rails.js +1 -1
  71. data/dist/playbook.css +1 -1
  72. data/lib/playbook/hover.rb +1 -7
  73. data/lib/playbook/version.rb +1 -1
  74. metadata +6 -27
  75. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +0 -36
  76. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.md +0 -1
  77. data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +0 -57
  78. data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb +0 -32
  79. data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb +0 -29
  80. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.jsx +0 -166
  81. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.jsx +0 -89
  82. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb +0 -95
  83. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +0 -75
  84. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.md +0 -1
  85. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx +0 -108
  86. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.md +0 -2
  87. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +0 -94
  88. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.md +0 -0
  89. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.jsx +0 -83
  90. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +0 -3
  91. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.jsx +0 -120
  92. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +0 -1
  93. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -35
  94. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx +0 -88
  95. data/app/pb_kits/playbook/pb_text_input/inputMask.ts +0 -64
  96. data/dist/chunks/_typeahead-l1kq1p9m.js +0 -22
  97. data/dist/chunks/_weekday_stacked-DkCMUF58.js +0 -45
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cafdaf728f6e7924b815a4a2525dd59cb72dcb4986d8062dbc8df9a56ca3897
4
- data.tar.gz: 45233fb274a14a0522f2c8bb7f1d8ce4222e6d7d69298bbf839be73ea1d3de7b
3
+ metadata.gz: b11194d151b3e24db52c214a1e3dcad53c2a70fa66202a339f52208baea87636
4
+ data.tar.gz: bc9bcfd9149d3501e2ad32a85e5f20c49d0b9a24366a3432cbd1af254a32a8f4
5
5
  SHA512:
6
- metadata.gz: 20668527d152f490902220ba60775ab6479f1cb7dc0a18e33341759c064751eb12d55ee5e17953c0fec90d2e24b2916880110fe89c92df8e1cbb5f98af9f8eba
7
- data.tar.gz: 5aeebf46b23221b0cb447ca22b3a197ea38fc7181fd157aa4504490dfef84f4024536d9d10a58f91ed3704754f735b46b0b295ab17d058a2ad7b15b870fb3503
6
+ metadata.gz: 05141da61222882833c06a7e264cab818552acf7ee1624a77196a3103c8942ae867d353d012680db35d702676c933cb125f91e51c7db966fec51b96d8b84a723
7
+ data.tar.gz: be4d849aaac1e5ae95a43d1714b7cde01235d586f9eaf871e55d399fda9291bc26b45c4a590460147364001d872e0835dc9e3518e1a18ace66bbd97d9e0cd242
@@ -3,13 +3,18 @@ import React from "react"
3
3
  //CollapsibleTrail component
4
4
  const CollapsibleTrail = ({ leftOffset }: { leftOffset: number }) => {
5
5
  const style: { [key: string]: string | number } = {
6
+ position: "absolute",
6
7
  left: `${leftOffset}em`,
8
+ top: 0,
9
+ bottom: 0,
10
+ width: "2px",
11
+ backgroundColor: "#E4E8F0",
7
12
  }
8
13
 
9
14
  return (
10
15
  <div
11
16
  className="collapsible-trail"
12
- style={style}
17
+ style={style}
13
18
  />
14
19
  )
15
20
  }
@@ -110,14 +110,6 @@
110
110
  height: auto;
111
111
  }
112
112
 
113
- .collapsible-trail {
114
- background-color: $border_light;
115
- position: absolute;
116
- top: 0;
117
- bottom: 0;
118
- width: 2px;
119
- }
120
-
121
113
  // Responsive Styles
122
114
  @media only screen and (max-width: $screen-xl-min) {
123
115
  &[class*="table-responsive-scroll"] {
@@ -2,7 +2,6 @@ examples:
2
2
  rails:
3
3
  - advanced_table_beta: Default (Required Props)
4
4
  - advanced_table_beta_subrow_headers: SubRow Headers
5
- - advanced_table_collapsible_trail_rails: Collapsible Trail
6
5
  - advanced_table_beta_sort: Enable Sorting
7
6
  - advanced_table_custom_cell_rails: Custom Components for Cells
8
7
 
@@ -14,16 +14,14 @@ module Playbook
14
14
  default: "header"
15
15
  prop :subrow_headers, type: Playbook::Props::Array,
16
16
  default: []
17
- prop :collapsible_trail, type: Playbook::Props::Boolean,
18
- default: true
19
17
 
20
18
  def render_row_and_children(row, column_definitions, current_depth, first_parent_child)
21
19
  output = ActiveSupport::SafeBuffer.new
22
20
  is_first_child_of_subrow = current_depth.positive? && first_parent_child && subrow_headers[current_depth - 1].present?
23
21
 
24
- output << pb_rails("advanced_table/table_subrow_header", props: { row: row, column_definitions: column_definitions, depth: current_depth, subrow_header: subrow_headers[current_depth - 1], collapsible_trail: collapsible_trail }) if is_first_child_of_subrow && enable_toggle_expansion == "all"
22
+ output << pb_rails("advanced_table/table_subrow_header", props: { row: row, column_definitions: column_definitions, depth: current_depth, subrow_header: subrow_headers[current_depth - 1] }) if is_first_child_of_subrow && enable_toggle_expansion == "all"
25
23
 
26
- output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: column_definitions, depth: current_depth, collapsible_trail: collapsible_trail })
24
+ output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: column_definitions, depth: current_depth })
27
25
 
28
26
  if row[:children].present?
29
27
  output << content_tag(:div, class: "toggle-content", data: { advanced_table_content: row.object_id.to_s + id }) do
@@ -4,10 +4,8 @@
4
4
  <%= pb_rails("table/table_header", props: { tag: "div", id: item[:accessor], classname: object.th_classname, sort_menu: item[:sort_menu] }) do %>
5
5
  <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end", text_align: "end" }) do %>
6
6
  <% if index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") %>
7
- <button
8
- class="gray-icon toggle-all-icon"
9
- onclick="expandAllRows(this); event.preventDefault();">
10
- <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
7
+ <button class="gray-icon toggle-all-icon" onclick="expandAllRows(this)">
8
+ <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
11
9
  </button>
12
10
  <% end %>
13
11
  <%= item[:label] %>
@@ -15,4 +13,4 @@
15
13
  <% end %>
16
14
  <% end %>
17
15
  <% end %>
18
- <% end %>
16
+ <% end %>
@@ -2,14 +2,6 @@
2
2
  <% object.column_definitions.each_with_index do |column, index| %>
3
3
  <%= pb_rails("table/table_cell", props: { tag:"div", classname:object.td_classname}) do %>
4
4
  <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
5
- <% if collapsible_trail && index.zero? %>
6
- <% (1..depth).each do |i| %>
7
- <% additional_offset = i > 1 ? (i - 1) * 0.25 : 0 %>
8
- <% left_offset = i * 1.0 + additional_offset %>
9
- <div class="collapsible-trail" style="left: <%= left_offset %>em"></div>
10
- <% end %>
11
- <% end %>
12
-
13
5
  <div style="padding-left: <%= depth * 1.25 %>em">
14
6
  <%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
15
7
  <% if index.zero? && object.row[:children].present? %>
@@ -9,8 +9,6 @@ module Playbook
9
9
  default: []
10
10
  prop :row
11
11
  prop :depth
12
- prop :collapsible_trail, type: Playbook::Props::Boolean,
13
- default: true
14
12
 
15
13
  def classname
16
14
  generate_classname("pb_table_tr", "bg-white", subrow_depth_classname, separator: " ")
@@ -6,14 +6,6 @@
6
6
  <% object.column_definitions.each_with_index do |column, index| %>
7
7
  <%= pb_rails("table/table_cell", props: { tag: "div", classname: object.td_classname}) do %>
8
8
  <%= pb_rails("flex", props:{ align: "center", justify: "start" }) do %>
9
- <% if collapsible_trail && index.zero? %>
10
- <% (1..depth).each do |i| %>
11
- <% additional_offset = i > 1 ? (i - 1) * 0.25 : 0 %>
12
- <% left_offset = i * 1.0 + additional_offset %>
13
- <div class="collapsible-trail" style="left: <%= left_offset %>em"></div>
14
- <% end %>
15
- <% end %>
16
-
17
9
  <div style="padding-left: <%= depth * 1.25 %>em">
18
10
  <%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
19
11
  <% if index.zero? && object.row[:children].present? %>
@@ -12,8 +12,6 @@ module Playbook
12
12
  default: "header"
13
13
  prop :subrow_header, type: Playbook::Props::String,
14
14
  default: ""
15
- prop :collapsible_trail, type: Playbook::Props::Boolean,
16
- default: true
17
15
 
18
16
  def classname
19
17
  generate_classname("pb_table_tr", "bg-white", subrow_depth_classname, separator: " ")
@@ -31,12 +31,14 @@ $avatar-sizes: (
31
31
  [class^=pb_card_kit].overlay_top_center {
32
32
  left: 50%;
33
33
  transform: translateX(-50%);
34
+ padding: 2px !important;
34
35
  }
35
36
 
36
37
  [class^=pb_card_kit].overlay_left_center,
37
38
  [class^=pb_card_kit].overlay_right_center {
38
39
  top: 50%;
39
40
  transform: translateY(-50%);
41
+ padding: 2px !important;
40
42
  }
41
43
  }
42
44
 
@@ -1,70 +1,66 @@
1
1
  import React from 'react'
2
- import ReactDOMServer from 'react-dom/server'
3
- import BarGraph from '../_bar_graph'
4
- import Icon from '../../pb_icon/_icon'
5
2
 
6
- const chartData = [
7
- {
8
- name: 'Role',
9
- data: [0, 200, 300, 654, 656],
10
- },
11
- {
12
- name: 'Company',
13
- data: [150, 524, 320, 440, 500],
14
- },
15
- ]
3
+ import BarGraph from '../_bar_graph'
16
4
 
17
- const renderIcon = (iconName, color) => {
18
- return ReactDOMServer.renderToStaticMarkup(
19
- <Icon
20
- color={color}
21
- icon={iconName}
22
- />)
23
- };
5
+ const chartData = [{
6
+ name: 'Installation',
7
+ data: [1475, 200, 3000, 654, 656],
8
+ }, {
9
+ name: 'Manufacturing',
10
+ data: [4434, 524, 2320, 440, 500],
11
+ }, {
12
+ name: 'Sales & Distribution',
13
+ data: [3387, 743, 1344, 434, 440],
14
+ }, {
15
+ name: 'Project Development',
16
+ data: [3227, 878, 999, 780, 1000],
17
+ }, {
18
+ name: 'Other',
19
+ data: [1111, 677, 3245, 500, 200],
20
+ }]
24
21
 
25
22
  const barGraphOptions = {
26
- yAxis: {
27
- tickInterval: 5,
23
+ subtitle: {
24
+ text: "Overwritten subtitle",
25
+ style: {
26
+ color: "red"
27
+ }
28
28
  },
29
29
  xAxis: {
30
- categories: ['1', '2', '3', '4', '5'],
31
- labels: {
32
- useHTML: true,
33
- formatter: function () {
34
- switch (this.value) {
35
- case '1':
36
- return `${renderIcon('frown', 'error')}`;
37
- case '2':
38
- return `${renderIcon('frown', 'warning')}`;
39
- case '3':
40
- return `${renderIcon('frown-open', 'neutral')}`;
41
- case '4':
42
- return `${renderIcon('smile', 'category_7')}`;
43
- case '5':
44
- return `${renderIcon('smile-beam', 'success')}`;
45
- default:
46
- return ''
47
- }
48
- },
49
- style: {
50
- fontSize: '1.4em',
51
- },
52
- y: 42,
53
- },
54
- },
55
- legend: {
56
- itemMarginTop: 62,
57
- },
30
+ labels: {
31
+ useHTML: true,
32
+ formatter: function() {
33
+ switch (this.value) {
34
+ case 'Jan':
35
+ return `<i class="far fa-apple-whole"></i> ${this.value}`
36
+ case 'Feb':
37
+ return `<i class="far fa-strawberry"></i> ${this.value}`
38
+ case 'Mar':
39
+ return `<i class="far fa-lemon"></i> ${this.value}`
40
+ case 'Apr':
41
+ return `<i class="far fa-pear"></i> ${this.value}`
42
+ case 'May':
43
+ return `<i class="far fa-peach"></i> ${this.value}`
44
+ default:
45
+ return ''
46
+ }
47
+ }
48
+ }
49
+ }
58
50
  }
59
51
 
60
- const BarGraphCustom = () => (
52
+ const BarGraphCustom = (props) => (
61
53
  <div>
62
54
  <BarGraph
55
+ axisTitle="Number of Employees"
63
56
  chartData={chartData}
64
57
  customOptions={barGraphOptions}
65
- id="happiness-dashboard"
66
- legend
58
+ id="bar-custom"
59
+ subTitle="Subtitle to replace"
67
60
  title="Bar Graph with Custom Overrides"
61
+ xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
62
+ yAxisMin={0}
63
+ {...props}
68
64
  />
69
65
  </div>
70
66
  )
@@ -1,42 +1,49 @@
1
1
  <% data = [{
2
- name: 'Role',
3
- data: [0, 200, 300, 654, 656],
2
+ name: 'Installation',
3
+ data: [1475,200,3000,654,656]
4
4
  }, {
5
- name: 'Company',
6
- data: [150, 524, 320, 440, 500],
5
+ name: 'Manufacturing',
6
+ data: [4434,524,2320,440,500]
7
+ }, {
8
+ name: 'Sales & Distribution',
9
+ data: [3387,743,1344,434,440,]
10
+ }, {
11
+ name: 'Project Development',
12
+ data: [3227,878,999,780,1000]
13
+ }, {
14
+ name: 'Other',
15
+ data: [1111,677,3245,500,200]
7
16
  }] %>
8
17
 
9
18
  <% bar_graph_options = {
10
- customOptions: {
11
- yAxis: {
12
- tickInterval: 5,
13
- },
14
- xAxis: {
15
- categories: [
16
- raw(pb_rails("icon", props: { icon: "frown", color: "error", size: "2x" })),
17
- raw(pb_rails("icon", props: { icon: "frown", color: "warning", size: "2x" })),
18
- raw(pb_rails("icon", props: { icon: "frown-open", color: "neutral", size: "2x" })),
19
- raw(pb_rails("icon", props: { icon: "smile", color: "category_7", size: "2x" })),
20
- raw(pb_rails("icon", props: { icon: "smile-beam", color: "success", size: "2x" }))
21
- ],
22
- labels: {
23
- useHTML: true,
24
- sytle: {
25
- fontSize: '1.4em',
19
+ customOptions: {
20
+ subtitle: {
21
+ text: "Overwritten subtitle",
22
+ style: {
23
+ color: "red"
24
+ }
26
25
  },
27
- y: 42,
28
- },
29
- },
30
- legend: {
31
- itemMarginTop: 62,
32
- },
33
- }
26
+ xAxis: {
27
+ categories: [
28
+ '<i class="far fa-apple-whole"></i> Jan',
29
+ '<i class="far fa-strawberry"></i> Feb',
30
+ '<i class="far fa-lemon"></i> Mar',
31
+ '<i class="far fa-pear"></i> Apr',
32
+ '<i class="far fa-peach"></i> May'
33
+ ],
34
+ labels: {
35
+ useHTML: true,
36
+ }
37
+ }
38
+ }
34
39
  } %>
35
40
 
36
41
  <%= pb_rails("bar_graph", props: {
42
+ axis_title: 'Number of Employees',
37
43
  chart_data: data,
38
44
  id: "bar-default",
39
- legend: true,
45
+ y_axis_min: 0,
46
+ subtitle: 'Subtitle to replace',
40
47
  title: 'Bar Graph with Custom Overrides',
41
48
  custom_options: bar_graph_options
42
- }) %>
49
+ }) %>
@@ -1,25 +1,24 @@
1
1
  @import "./body_mixins";
2
2
  @import "../tokens/titles";
3
3
 
4
- [class^="pb_body_kit"] {
4
+ [class^=pb_body_kit]{
5
5
  @include pb_body($text_lt_default);
6
6
  @each $color_name, $color_value in $pb_body_colors {
7
7
  &[class*=_#{"" + $color_name}] {
8
8
  @include pb_body($color_value);
9
9
  }
10
10
  @each $status_name, $status_value in $pb_body_status {
11
- &[class*="_default_#{$status_name}"] {
11
+ &[class*=_default_#{$status_name}] {
12
12
  @include pb_body($status_value);
13
13
  }
14
14
  }
15
15
  }
16
- @each $dark_color_name, $dark_color_value in $pb_dark_body_colors {
17
- &[class*="_#{$dark_color_name}"][class*="dark"] {
16
+ @each $dark_color_name, $dark_color_value in $pb_dark_body_colors{
17
+ &[class*=_#{$dark_color_name}][class*=dark]{
18
18
  @include pb_body($dark_color_value);
19
19
  }
20
20
  }
21
- b,
22
- strong {
21
+ b, strong {
23
22
  font-weight: $bold;
24
23
  }
25
24
 
@@ -30,8 +29,7 @@
30
29
  }
31
30
  }
32
31
 
33
- em,
34
- i {
32
+ em, i {
35
33
  font-style: italic;
36
34
  }
37
35
 
@@ -41,25 +39,26 @@
41
39
  }
42
40
 
43
41
  @each $status_name, $status_value in $pb_body_status {
44
- &[class*="#{$status_name}"] {
42
+ &[class*=#{$status_name}] {
45
43
  @include pb_body($status_value);
46
44
  }
47
45
  }
48
46
 
49
- &[class*="dark"] {
47
+ &[class*=dark] {
50
48
  a {
51
49
  color: $active_dark;
52
50
  }
53
51
  @include pb_body_dark();
54
- @each $dark_color_name, $dark_color_value in $pb_dark_body_colors {
55
- &[class*="_#{$dark_color_name}"][class*="dark"] {
52
+ @each $dark_color_name, $dark_color_value in $pb_dark_body_colors{
53
+ &[class*=_#{$dark_color_name}][class*=dark]{
56
54
  @include pb_body($dark_color_value);
57
55
  }
58
56
  }
59
- @each $status_name, $status_value in $pb_dark_body_status {
60
- &[class*="_#{$status_name}"] {
57
+ @each $status_name, $status_value in $pb_body_status {
58
+ &[class*=_#{$status_name}] {
61
59
  @include pb_body($status_value);
62
60
  }
63
61
  }
64
62
  }
63
+
65
64
  }
@@ -3,35 +3,29 @@
3
3
  @import "../tokens/typography";
4
4
 
5
5
  $pb_body_colors: (
6
- default: $text_lt_default,
7
- light: $text_lt_light,
8
- lighter: $text_lt_lighter,
9
- link: $primary,
10
- error: $error,
11
- success: $text_lt_success_sm,
6
+ default: $text_lt_default,
7
+ light: $text_lt_light,
8
+ lighter: $text_lt_lighter,
9
+ link: $primary,
10
+ error: $error,
11
+ success: $text_lt_success_sm,
12
12
  );
13
13
 
14
14
  $pb_dark_body_colors: (
15
- default: $text_dk_default,
16
- light: $text_dk_light,
17
- lighter: $text_dk_lighter,
18
- link: $active_dark,
19
- error: $error,
20
- success: $text_dk_success_sm,
15
+ default: $text_dk_default,
16
+ light: $text_dk_light,
17
+ lighter: $text_dk_lighter,
18
+ link: $active_dark,
19
+ error: $error,
20
+ success: $text_dk_success_sm,
21
21
  );
22
22
 
23
23
  // Order is important here!
24
24
  $pb_body_status: (
25
- default: $text_lt_default,
26
- negative: $error,
27
- dark_error: $error_dark_body,
28
- positive: $text_lt_success_sm,
29
- );
30
-
31
- $pb_dark_body_status: (
32
- default: $text_dk_default,
33
- negative: $error_dark,
34
- positive: $text_dk_success_sm,
25
+ default: $text_lt_default,
26
+ negative: $error,
27
+ dark_error: $error_dark_body,
28
+ positive: $text_lt_success_sm,
35
29
  );
36
30
 
37
31
  @mixin pb_body($color: $text_lt_default) {
@@ -13,7 +13,6 @@ const BreadCrumbsDefault = (props) => {
13
13
  <Icon
14
14
  icon="home"
15
15
  size="1x"
16
- {...props}
17
16
  />
18
17
  <BreadCrumbItem
19
18
  {...props}
@@ -23,13 +22,11 @@ const BreadCrumbsDefault = (props) => {
23
22
  size="4"
24
23
  tag="span"
25
24
  text="Home"
26
- {...props}
27
25
  />
28
26
  </BreadCrumbItem>
29
27
  <Icon
30
28
  icon="users"
31
29
  size="1x"
32
- {...props}
33
30
  />
34
31
  <Link
35
32
  {...props}
@@ -39,20 +36,17 @@ const BreadCrumbsDefault = (props) => {
39
36
  size="4"
40
37
  tag="span"
41
38
  text="Users"
42
- {...props}
43
39
  />
44
40
  </Link>
45
41
  <Icon
46
42
  icon="user"
47
43
  size="1x"
48
- {...props}
49
44
  />
50
45
  <Link {...props}>
51
46
  <Title
52
47
  size="4"
53
48
  tag="span"
54
49
  text="User"
55
- {...props}
56
50
  />
57
51
  </Link>
58
52
  </BreadCrumbs>
@@ -13,10 +13,9 @@ $pb_caption_colors: (
13
13
  $pb_dark_caption_colors: (
14
14
  default: $text_dk_default,
15
15
  light: $text_dk_light,
16
- lighter: $text_dk_lighter,
17
16
  link: $active_dark,
18
17
  success: $text_dk_success_sm,
19
- error: $error_dark,
18
+ error: $error,
20
19
  );
21
20
 
22
21
 
@@ -32,7 +32,7 @@ $pb_card_header_colors: map-merge(map-merge($product_colors, $additional_colors)
32
32
  }
33
33
 
34
34
  @mixin pb_card_selected_dark {
35
- @include pb_card_selected($primary_action_dark);
35
+ @include pb_card_selected($primary_action);
36
36
  }
37
37
 
38
38
  @mixin pb_card($background: $card_light, $border_color: $border_light) {
@@ -2,7 +2,7 @@ import React, { useEffect, ReactElement } from 'react'
2
2
  import classnames from 'classnames'
3
3
  import useCollapsible from './useCollapsible'
4
4
 
5
- import { globalProps, globalInlineProps, GlobalProps } from '../utilities/globalProps'
5
+ import { globalProps, globalInlineProps } from '../utilities/globalProps'
6
6
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
7
7
 
8
8
  import CollapsibleContent from './child_kits/CollapsibleContent'
@@ -32,7 +32,6 @@ type CollapsibleProps = {
32
32
  onClick?: ()=> void,
33
33
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
34
34
  id?: string,
35
- tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div' | 'tr' | 'th' | 'td' | 'thead' | 'col',
36
35
  }
37
36
 
38
37
  const Collapsible = ({
@@ -48,9 +47,8 @@ const Collapsible = ({
48
47
  onIconClick,
49
48
  onClick,
50
49
  id,
51
- tag = 'div',
52
50
  ...props
53
- }: CollapsibleProps & GlobalProps): React.ReactElement => {
51
+ }: CollapsibleProps): React.ReactElement => {
54
52
  const [isCollapsed, toggle, setIsCollapsed] = useCollapsible(collapsed)
55
53
 
56
54
  useEffect(()=> {
@@ -78,12 +76,9 @@ const Collapsible = ({
78
76
  className
79
77
  )
80
78
  const dynamicInlineProps = globalInlineProps(props)
81
-
82
- const Tag: React.ReactElement | any = `${tag}`;
83
-
84
79
  return (
85
80
  <CollapsibleContext.Provider value={{ collapsed: isCollapsed, toggle, icon, iconSize, iconColor, onIconClick, onClick }}>
86
- <Tag
81
+ <div
87
82
  {...ariaProps}
88
83
  {...dataProps}
89
84
  {...htmlProps}
@@ -101,7 +96,7 @@ const Collapsible = ({
101
96
  <CollapsibleContent {...contentProps}>
102
97
  {contentChildren}
103
98
  </CollapsibleContent>
104
- </Tag>
99
+ </div>
105
100
  </CollapsibleContext.Provider>
106
101
  )
107
102
  }
@@ -1,7 +1,7 @@
1
1
  import classnames from 'classnames'
2
2
  import React, { useContext, useRef, useEffect } from 'react'
3
3
  import { buildCss } from '../../utilities/props'
4
- import { globalProps, GlobalProps } from '../../utilities/globalProps'
4
+ import { globalProps } from '../../utilities/globalProps'
5
5
  import { hideElement, showElement } from '../_helper_functions'
6
6
 
7
7
  import CollapsibleContext from '../context'
@@ -15,7 +15,7 @@ const CollapsibleContent = ({
15
15
  children,
16
16
  className,
17
17
  ...props
18
- }: CollapsibleContentProps & GlobalProps): React.ReactElement => {
18
+ }: CollapsibleContentProps): React.ReactElement => {
19
19
  const context: {[key: string]: boolean | string} = useContext(CollapsibleContext)
20
20
  const contentCSS = buildCss('pb_collapsible_content_kit')
21
21
  const contentSpacing = globalProps(props)
@@ -3,7 +3,7 @@
3
3
  import classnames from 'classnames'
4
4
  import React, { useContext } from 'react'
5
5
  import { buildCss } from '../../utilities/props'
6
- import { globalProps, GlobalProps } from '../../utilities/globalProps'
6
+ import { globalProps } from '../../utilities/globalProps'
7
7
 
8
8
  import Flex from '../../pb_flex/_flex'
9
9
  import FlexItem from '../../pb_flex/_flex_item'
@@ -25,7 +25,7 @@ const CollapsibleMain = ({
25
25
  className,
26
26
  cursor = 'pointer',
27
27
  ...props
28
- }: CollapsibleMainProps & GlobalProps): React.ReactElement=> {
28
+ }: CollapsibleMainProps): React.ReactElement=> {
29
29
  const {collapsed, toggle, icon, iconSize, iconColor, onIconClick, onClick}: any = useContext(CollapsibleContext)
30
30
  const mainCSS = buildCss('pb_collapsible_main_kit')
31
31
  const mainSpacing = globalProps(props, { cursor })
@@ -11,8 +11,3 @@
11
11
  }
12
12
  }
13
13
 
14
- .dark [class*='pb_file_upload_kit'] {
15
- [class*='pb_card_kit'] {
16
- border: 1px $text_dk_lighter dashed;
17
- }
18
- }