playbook_ui 14.12.0.pre.alpha.play1849cssbargraph5901 → 14.12.0.pre.alpha.play1862buttondisabledlinkbug5714

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +4 -3
  3. data/app/pb_kits/playbook/pb_advanced_table/index.js +6 -9
  4. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +5 -8
  5. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -9
  6. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +7 -11
  7. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +7 -6
  8. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +3 -9
  9. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +2 -6
  10. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -1
  11. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -1
  12. data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +1 -2
  13. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +3 -3
  14. data/app/pb_kits/playbook/pb_date/_date.tsx +4 -14
  15. data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +1 -2
  16. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +5 -13
  17. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +6 -1
  18. data/app/pb_kits/playbook/pb_filter/filter.html.erb +5 -1
  19. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -1
  20. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +5 -7
  21. data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +6 -1
  22. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
  23. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +7 -11
  24. data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +0 -2
  25. data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +0 -1
  26. data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +2 -11
  27. data/app/pb_kits/playbook/pb_link/_link.tsx +0 -18
  28. data/app/pb_kits/playbook/pb_link/docs/example.yml +3 -5
  29. data/app/pb_kits/playbook/pb_link/docs/index.js +1 -2
  30. data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
  31. data/app/pb_kits/playbook/pb_link/link.rb +0 -6
  32. data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -30
  33. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
  34. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +9 -6
  35. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +9 -6
  36. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -26
  37. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +1 -0
  38. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -25
  39. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -25
  40. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
  41. data/app/pb_kits/playbook/pb_tooltip/index.js +27 -45
  42. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -5
  43. data/app/pb_kits/playbook/pb_user/_user.tsx +0 -3
  44. data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -2
  45. data/app/pb_kits/playbook/pb_user/docs/index.js +0 -1
  46. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
  47. data/app/pb_kits/playbook/pb_user/user.rb +0 -1
  48. data/app/pb_kits/playbook/pb_user/user.test.js +0 -14
  49. data/dist/chunks/{_typeahead-BM1R3tnS.js → _typeahead-BIhRQo8Q.js} +3 -3
  50. data/dist/chunks/_weekday_stacked-VKMYuo6-.js +45 -0
  51. data/dist/chunks/{lib-DjpLC8uO.js → lib-kMuhBuU7.js} +1 -1
  52. data/dist/chunks/{pb_form_validation-S56UaHZl.js → pb_form_validation-DBJ0wZuS.js} +1 -1
  53. data/dist/chunks/vendor.js +1 -1
  54. data/dist/menu.yml +2 -2
  55. data/dist/playbook-doc.js +1 -1
  56. data/dist/playbook-rails-react-bindings.js +1 -1
  57. data/dist/playbook-rails.js +1 -1
  58. data/dist/playbook.css +1 -1
  59. data/lib/playbook/version.rb +1 -1
  60. metadata +7 -26
  61. data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +0 -60
  62. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +0 -64
  63. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +0 -1
  64. data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +0 -15
  65. data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +0 -28
  66. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +0 -2
  67. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +0 -5
  68. data/app/pb_kits/playbook/pb_copy_button/index.js +0 -47
  69. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +0 -58
  70. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +0 -3
  71. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +0 -11
  72. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +0 -22
  73. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +0 -1
  74. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +0 -1
  75. data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +0 -15
  76. data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +0 -29
  77. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +0 -42
  78. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +0 -59
  79. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +0 -2
  80. data/dist/chunks/_weekday_stacked-CmWdEFxG.js +0 -45
  81. /data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/{_fixed_confirmation_toast_auto_close_react.md → _fixed_confirmation_toast_auto_close.md} +0 -0
@@ -5,14 +5,12 @@ examples:
5
5
  - home_address_street_emphasis: Emphasis
6
6
  - home_address_street_modified: Modified
7
7
  - home_address_street_link: Link
8
- - home_address_street_formatting: Formatting
9
8
 
10
9
  react:
11
10
  - home_address_street_default: Default
12
11
  - home_address_street_emphasis: Emphasis
13
12
  - home_address_street_modified: Modified
14
13
  - home_address_street_link: Link
15
- - home_address_street_formatting: Formatting
16
14
 
17
15
  swift:
18
16
  - home_address_street_default_swift: Default
@@ -2,4 +2,3 @@ export { default as HomeAddressStreetDefault } from './_home_address_street_defa
2
2
  export { default as HomeAddressStreetEmphasis } from './_home_address_street_emphasis.jsx'
3
3
  export { default as HomeAddressStreetModified } from './_home_address_street_modified.jsx'
4
4
  export { default as HomeAddressStreetLink } from './_home_address_street_link.jsx'
5
- export { default as HomeAddressStreetFormatting } from './_home_address_street_formatting.jsx'
@@ -18,7 +18,6 @@ module Playbook
18
18
  prop :state
19
19
  prop :zipcode
20
20
  prop :territory
21
- prop :preserve_case, default: false
22
21
  prop :dark, type: Playbook::Props::Boolean, default: false
23
22
 
24
23
  def classname
@@ -30,7 +29,7 @@ module Playbook
30
29
  end
31
30
 
32
31
  def city_state
33
- [city&.titleize, state&.upcase].join(", ")
32
+ [city&.titleize, state].join(", ")
34
33
  end
35
34
 
36
35
  def zip
@@ -38,7 +37,7 @@ module Playbook
38
37
  end
39
38
 
40
39
  def address_house_style
41
- [format_street_address, house_style].join(separator)
40
+ [address&.titleize, house_style].join(separator)
42
41
  end
43
42
 
44
43
  def address_house_style2
@@ -49,14 +48,6 @@ module Playbook
49
48
  house_style ? " \u00b7 " : ""
50
49
  end
51
50
 
52
- def format_street_address
53
- preserve_case ? address : custom_titleize(address)
54
- end
55
-
56
- def custom_titleize(str)
57
- str.split(" ").map(&:capitalize).join(" ")
58
- end
59
-
60
51
  def city_emphasis_props
61
52
  {
62
53
  address_house_style: address_house_style,
@@ -19,9 +19,7 @@ type LinkProps = {
19
19
  icon?: string,
20
20
  iconRight?: string,
21
21
  id?: string,
22
- tabIndex?: number,
23
22
  tag?: 'a' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
24
- target?: string,
25
23
  text?: string,
26
24
  underline?: boolean,
27
25
  } & GlobalProps
@@ -39,9 +37,7 @@ const Link = (props: LinkProps): React.ReactElement => {
39
37
  icon = '',
40
38
  iconRight = '',
41
39
  id = '',
42
- tabIndex,
43
40
  tag = 'a',
44
- target = '',
45
41
  text = '',
46
42
  underline = false,
47
43
  } = props
@@ -56,14 +52,6 @@ const Link = (props: LinkProps): React.ReactElement => {
56
52
  )
57
53
  const Tag = tag as keyof JSX.IntrinsicElements
58
54
 
59
- const getTargetAttribute = () => {
60
- if (target && href) {
61
- return target
62
- }
63
-
64
- return undefined
65
- }
66
-
67
55
  const renderContent = () => (
68
56
  <>
69
57
  {icon && (
@@ -99,9 +87,6 @@ const Link = (props: LinkProps): React.ReactElement => {
99
87
  <a
100
88
  {...commonProps}
101
89
  href={href}
102
- rel={target !== 'child' ? 'noreferrer' : undefined}
103
- tabIndex={tabIndex}
104
- target={getTargetAttribute()}
105
90
  >
106
91
  {renderContent()}
107
92
  </a>
@@ -111,9 +96,6 @@ const Link = (props: LinkProps): React.ReactElement => {
111
96
  <a
112
97
  {...commonProps}
113
98
  href={href}
114
- rel={target !== 'child' ? 'noreferrer' : undefined}
115
- tabIndex={tabIndex}
116
- target={getTargetAttribute()}
117
99
  >
118
100
  <Tag>{renderContent()}</Tag>
119
101
  </a>
@@ -1,18 +1,16 @@
1
1
  examples:
2
-
2
+
3
3
  rails:
4
4
  - link_color: Color
5
5
  - link_underline: Underline
6
6
  - link_icon: Icon
7
7
  - link_disabled: Disabled
8
8
  - link_tag: Tag
9
- - link_target: Target
10
-
11
-
9
+
10
+
12
11
  react:
13
12
  - link_color: Color
14
13
  - link_underline: Underline
15
14
  - link_icon: Icon
16
15
  - link_disabled: Disabled
17
16
  - link_tag: Tag
18
- - link_target: Target
@@ -2,5 +2,4 @@ export { default as LinkColor } from './_link_color.jsx'
2
2
  export { default as LinkUnderline } from './_link_underline.jsx'
3
3
  export { default as LinkIcon } from './_link_icon.jsx'
4
4
  export { default as LinkDisabled } from './_link_disabled.jsx'
5
- export { default as LinkTag } from './_link_tag.jsx'
6
- export { default as LinkTarget } from './_link_target.jsx'
5
+ export { default as LinkTag } from './_link_tag.jsx'
@@ -9,7 +9,7 @@
9
9
  <% end %>
10
10
 
11
11
  <% if object.tag == "a" %>
12
- <%= pb_content_tag(object.tag, { href: object.href, target: object.target }) do %>
12
+ <%= pb_content_tag(object.tag, { href: object.href }) do %>
13
13
  <%= link_content.call %>
14
14
  <% end %>
15
15
  <% else %>
@@ -11,11 +11,9 @@ module Playbook
11
11
  prop :href
12
12
  prop :icon
13
13
  prop :icon_right
14
- prop :tabindex
15
14
  prop :tag, type: Playbook::Props::Enum,
16
15
  values: %w[a h1 h2 h3 h4 h5 h6 p span div],
17
16
  default: "a"
18
- prop :target
19
17
  prop :text
20
18
  prop :underline, type: Playbook::Props::Boolean,
21
19
  default: false
@@ -28,10 +26,6 @@ module Playbook
28
26
  text
29
27
  end
30
28
 
31
- def target_attribute
32
- target if target && href
33
- end
34
-
35
29
  private
36
30
 
37
31
  def color_class
@@ -90,33 +90,3 @@ test('adds icon right', () => {
90
90
  const icon = kit.querySelector('.pb_icon_kit')
91
91
  expect(icon).toBeInTheDocument();
92
92
  })
93
-
94
- test('should render target prop', () => {
95
- render(
96
- <Link
97
- data={{ testid: 'target-test' }}
98
- href="https://playbook.powerapp.cloud/"
99
- target="blank"
100
- />
101
- )
102
-
103
- const kit = screen.getByTestId('target-test')
104
-
105
- expect(kit).toHaveAttribute('target', 'blank')
106
- })
107
-
108
-
109
- test('should render child target prop', () => {
110
- render(
111
- <Link
112
- data={{ testid: 'target-test' }}
113
- href="https://playbook.powerapp.cloud/"
114
- tabIndex={0}
115
- target="child"
116
- />
117
- )
118
-
119
- const kit = screen.getByTestId('target-test')
120
-
121
- expect(kit).toHaveAttribute('target', 'child')
122
- })
@@ -2,7 +2,7 @@
2
2
  <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-1", tooltip: "Tooltip for step 1", tooltip_position: "right", step_direction: "horizontal" }) do %>
3
3
  step 1
4
4
  <% end %>
5
- <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-2", tooltip: "Tooltip for step 2", tooltip_position: "left", step_direction: "horizontal" }) do %>
5
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-2", tooltip: "Tooltip for step 2", step_direction: "horizontal" }) do %>
6
6
  step 2
7
7
  <% end %>
8
8
  <%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-3", tooltip: "Tooltip for step 3", tooltip_position: "left", step_direction: "horizontal" }) do %>
@@ -11,7 +11,7 @@
11
11
  <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-4", tooltip: "Tooltip for step 4", tooltip_position: "bottom" }) do %>
12
12
  step 4
13
13
  <% end %>
14
- <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-5", tooltip: "Tooltip for step 5", tooltip_position: "left" }) do %>
14
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-5", tooltip: "Tooltip for step 5" }) do %>
15
15
  step 5
16
16
  <% end %>
17
17
  <% end %>
@@ -19,7 +19,7 @@
19
19
  <br /><br />
20
20
 
21
21
  <%= pb_rails("progress_step", props: {orientation: "vertical"}) do %>
22
- <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-6", tooltip: "Tooltip step 1", step_direction: "vertical", tooltip_position: "left" }) do %>
22
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-6", tooltip: "Tooltip step 1", step_direction: "vertical" }) do %>
23
23
  <% end %>
24
24
  <%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-7", tooltip: "Tooltip step 2", tooltip_position: "left"}) do %>
25
25
  <% end %>
@@ -31,10 +31,10 @@
31
31
 
32
32
  <br /><br>
33
33
  <%= pb_rails("progress_step",props:{ variant:"tracker", icon:true}) do %>
34
- <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-10", tooltip: "The order has been received", step_direction: "horizontal" , tooltip_position: "right" }) do %>
34
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "complete", classname: "tooltip-trigger-10", tooltip: "The order has been received", step_direction: "horizontal" , tooltip_position: "right" }) do %>
35
35
  <%= pb_rails("caption", props:{text: "Ordered"})%>
36
36
  <% end %>
37
- <%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-11", tooltip:"Item(s) have been shipped", tooltip_position: "right" }) do %>
37
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "active", classname: "tooltip-trigger-11", tooltip:"Item(s) have been shipped" }) do %>
38
38
  <%= pb_rails("caption", props:{text: "Shipped"})%>
39
39
  <% end %>
40
40
  <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-12", tooltip:"This step has not been reached", tooltip_position: "left" }) do %>
@@ -50,7 +50,7 @@
50
50
  <%= pb_rails("progress_step/progress_step_item", props: {status: "active", icon: "exclamation-triangle", classname: "tooltip-trigger-14", tooltip: "More details needed before shipment", tooltip_position: "bottom" }) do %>
51
51
  <%= pb_rails("caption", props:{text: "Shipped"})%>
52
52
  <% end %>
53
- <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-15", tooltip: "This step is inactive", tooltip_position: "bottom"}) do %>
53
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-15", tooltip: "This step is inactive"}) do %>
54
54
  <%= pb_rails("caption", props:{text: "Out for Delivery"})%>
55
55
  <% end %>
56
56
  <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive", classname: "tooltip-trigger-16", tooltip: "Estimated delivery: Jun 27", tooltip_position: "left"}) do %>
@@ -39,17 +39,20 @@
39
39
  </tr>
40
40
  </tbody>
41
41
  <% end %>
42
+
42
43
  <%= pb_rails("table", props: { size: "sm", margin_bottom: "lg" }) do %>
43
44
  <colgroup>
44
45
  <%= pb_rails("background", props: { background_color: "error_subtle", tag: "col" }) %>
45
- <%= pb_rails("background", props: { background_color: "info_subtle", tag: "col" }) %>
46
+ <%= pb_rails("background", props: { background_color: "card_light", tag: "col" }) %>
46
47
  <%= pb_rails("background", props: { background_color: "warning_subtle", tag: "col" }) %>
47
48
  </colgroup>
48
- <thead>
49
- <th>Column 1</th>
50
- <th>Column 2</th>
51
- <th>Column 3</th>
52
- </thead>
49
+ <%= pb_rails("background", props: { background_color: "card_light", tag: "thead" }) do %>
50
+ <tr>
51
+ <th>Column 1</th>
52
+ <th>Column 2</th>
53
+ <th>Column 3</th>
54
+ </tr>
55
+ <% end %>
53
56
  <tbody>
54
57
  <tr>
55
58
  <td>Value 1</td>
@@ -68,7 +68,7 @@ const TableWithBackgroundKit = (props) => {
68
68
  tag='col'
69
69
  />
70
70
  <Background
71
- backgroundColor="info_subtle"
71
+ backgroundColor="card_light"
72
72
  tag='col'
73
73
  />
74
74
  <Background
@@ -76,13 +76,16 @@ const TableWithBackgroundKit = (props) => {
76
76
  tag='col'
77
77
  />
78
78
  </colgroup>
79
- <thead>
79
+ <Background
80
+ backgroundColor="card_light"
81
+ tag='thead'
82
+ >
80
83
  <tr>
81
- <th>{'Column 1'}</th>
82
- <th>{'Column 2'}</th>
83
- <th>{'Column 3'}</th>
84
+ <th>{'Column 1'}</th>
85
+ <th>{'Column 2'}</th>
86
+ <th>{'Column 3'}</th>
84
87
  </tr>
85
- </thead>
88
+ </Background>
86
89
  <tbody>
87
90
  <tr>
88
91
  <td>{'Value 1'}</td>
@@ -74,31 +74,6 @@
74
74
  &.table-card {
75
75
  background: none !important;
76
76
 
77
- &.dark {
78
- tbody, .pb_table_tbody {
79
- tr, .pb_table_tr {
80
- td, .pb_table_td {
81
- background: $bg_dark_card !important;
82
- border-color: $border_dark !important;
83
- &:before {
84
- color: $text_dk_light !important;
85
- }
86
- &:after {
87
- height: 0;
88
- background-color: transparent;
89
- }
90
-
91
- &:first-child {
92
- border-radius: $border_rad_light $border_rad_light 0 0 !important;
93
- }
94
- &:last-child {
95
- border-radius: 0 0 $border_rad_light $border_rad_light !important;
96
- }
97
- }
98
- }
99
- }
100
- }
101
-
102
77
  tbody, .pb_table_tbody {
103
78
  tr, .pb_table_tr {
104
79
  td, .pb_table_td {
@@ -106,7 +81,6 @@
106
81
  border-left-width: 1px !important;
107
82
  border-right-width: 1px !important;
108
83
  border-top-width: 1px !important;
109
-
110
84
  &:after {
111
85
  height: 0;
112
86
  background-color: transparent;
@@ -77,6 +77,7 @@
77
77
  tbody, .pb_table_tbody {
78
78
  tr, .pb_table_tr {
79
79
  td, .pb_table_td {
80
+ background: $white !important;
80
81
  border-left-width: 1px !important;
81
82
  border-right-width: 1px !important;
82
83
  border-top-width: 1px !important;
@@ -74,31 +74,6 @@
74
74
  &.table-card {
75
75
  background: none !important;
76
76
 
77
- &.dark {
78
- tbody, .pb_table_tbody {
79
- tr, .pb_table_tr {
80
- td, .pb_table_td {
81
- background: $bg_dark_card !important;
82
- border-color: $border_dark !important;
83
- &:before {
84
- color: $text_dk_light !important;
85
- }
86
- &:after {
87
- height: 0;
88
- background-color: transparent;
89
- }
90
-
91
- &:first-child {
92
- border-radius: $border_rad_light $border_rad_light 0 0 !important;
93
- }
94
- &:last-child {
95
- border-radius: 0 0 $border_rad_light $border_rad_light !important;
96
- }
97
- }
98
- }
99
- }
100
- }
101
-
102
77
  tbody, .pb_table_tbody {
103
78
  tr, .pb_table_tr {
104
79
  td, .pb_table_td {
@@ -74,31 +74,6 @@
74
74
  &.table-card {
75
75
  background: none !important;
76
76
 
77
- &.dark {
78
- tbody, .pb_table_tbody {
79
- tr, .pb_table_tr {
80
- td, .pb_table_td {
81
- background: $bg_dark_card !important;
82
- border-color: $border_dark !important;
83
- &:before {
84
- color: $text_dk_light !important;
85
- }
86
- &:after {
87
- height: 0;
88
- background-color: transparent;
89
- }
90
-
91
- &:first-child {
92
- border-radius: $border_rad_light $border_rad_light 0 0 !important;
93
- }
94
- &:last-child {
95
- border-radius: 0 0 $border_rad_light $border_rad_light !important;
96
- }
97
- }
98
- }
99
- }
100
- }
101
-
102
77
  tbody, .pb_table_tbody {
103
78
  tr, .pb_table_tr {
104
79
  td, .pb_table_td {
@@ -43,4 +43,4 @@
43
43
  Whoa. I'm a tooltip.
44
44
  <% end %>
45
45
  <% end %>
46
- <% end %>
46
+ <% end %>
@@ -1,4 +1,5 @@
1
1
  import PbEnhancedElement from '../pb_enhanced_element'
2
+
2
3
  import {
3
4
  createPopperLite as createPopper,
4
5
  flip,
@@ -16,34 +17,27 @@ export default class PbTooltip extends PbEnhancedElement {
16
17
 
17
18
  connect() {
18
19
  this.triggerElements.forEach((trigger) => {
19
- const method = this.triggerMethod
20
-
21
- if (method === 'click') {
22
- trigger.addEventListener('click', () => {
20
+ trigger.addEventListener('mouseenter', () => {
21
+ this.mouseenterTimeout = setTimeout(() => {
23
22
  this.showTooltip(trigger)
24
- })
25
- } else {
26
- trigger.addEventListener('mouseenter', () => {
27
- this.mouseenterTimeout = setTimeout(() => {
28
- this.showTooltip(trigger)
29
- this.checkCloseTooltip(trigger)
30
- }, TOOLTIP_TIMEOUT)
31
-
32
- trigger.addEventListener('mouseleave', () => {
33
- clearTimeout(this.mouseenterTimeout)
34
- setTimeout(() => {
35
- this.hideTooltip()
36
- }, 0)
37
- }, { once: true })
38
- })
39
-
40
- this.tooltip.addEventListener('mouseenter', () => {
23
+ this.checkCloseTooltip(trigger)
24
+ }, TOOLTIP_TIMEOUT)
25
+
26
+ trigger.addEventListener('mouseleave', () => {
41
27
  clearTimeout(this.mouseenterTimeout)
42
- })
43
- this.tooltip.addEventListener('mouseleave', () => {
44
- this.hideTooltip()
45
- })
46
- }
28
+
29
+ setTimeout(() => {
30
+ this.hideTooltip()
31
+ }, 0)
32
+ }, { once: true })
33
+ })
34
+ })
35
+
36
+ this.tooltip.addEventListener('mouseenter', () => {
37
+ clearTimeout(this.mouseenterTimeout)
38
+ })
39
+ this.tooltip.addEventListener('mouseleave', () => {
40
+ this.hideTooltip()
47
41
  })
48
42
  }
49
43
 
@@ -60,7 +54,7 @@ export default class PbTooltip extends PbEnhancedElement {
60
54
  }
61
55
 
62
56
  showTooltip(trigger) {
63
- if (this.shouldShowTooltip === 'false') return
57
+ if (this.shouldShowTooltip === "false") return
64
58
 
65
59
  this.popper = createPopper(trigger, this.tooltip, {
66
60
  placement: this.position,
@@ -84,13 +78,6 @@ export default class PbTooltip extends PbEnhancedElement {
84
78
  ],
85
79
  })
86
80
  this.tooltip.classList.add('show')
87
-
88
- if (this.triggerMethod === 'click') {
89
- clearTimeout(this.autoHideTimeout)
90
- this.autoHideTimeout = setTimeout(() => {
91
- this.hideTooltip()
92
- }, 1000)
93
- }
94
81
  }
95
82
 
96
83
  hideTooltip() {
@@ -107,26 +94,25 @@ export default class PbTooltip extends PbEnhancedElement {
107
94
  let triggerEl
108
95
 
109
96
  if (this.triggerElementId) {
110
- triggerEl = document.querySelector(`#${this.triggerElementId}`)
97
+ triggerEl = document.querySelector(`#${this.triggerElementId}`) //deprecated
111
98
  } else {
112
99
  const selectorIsId = this.triggerElementSelector.indexOf('#') > -1
113
- triggerEl = selectorIsId
114
- ? document.querySelector(`${this.triggerElementSelector}`)
115
- : document.querySelectorAll(`${this.triggerElementSelector}`)
100
+ triggerEl = selectorIsId ? document.querySelector(`${this.triggerElementSelector}`) :
101
+ document.querySelectorAll(`${this.triggerElementSelector}`)
116
102
  }
117
103
 
118
104
  if (!triggerEl) {
105
+ /* eslint no-console: ["error", { allow: ["warn", "error"] }] */
119
106
  console.error('Tooltip Kit: an invalid or unavailable DOM reference was provided!')
120
107
  return []
121
108
  }
122
109
 
123
110
  if (!triggerEl.length) triggerEl = [triggerEl]
124
- return (this._triggerElements = this._triggerElements || triggerEl)
111
+ return this._triggerElements = (this._triggerElements || triggerEl)
125
112
  }
126
113
 
127
114
  get tooltip() {
128
- return (this._tooltip =
129
- this._tooltip || this.element.querySelector(`#${this.tooltipId}`))
115
+ return this._tooltip = (this._tooltip || this.element.querySelector(`#${this.tooltipId}`))
130
116
  }
131
117
 
132
118
  get position() {
@@ -148,8 +134,4 @@ export default class PbTooltip extends PbEnhancedElement {
148
134
  get shouldShowTooltip() {
149
135
  return this.element.dataset.pbTooltipShowTooltip
150
136
  }
151
-
152
- get triggerMethod() {
153
- return this.element.dataset.pbTooltipTriggerMethod || 'hover'
154
- }
155
137
  }
@@ -9,9 +9,6 @@ module Playbook
9
9
  prop :tooltip_id
10
10
  prop :dark, type: Playbook::Props::Boolean,
11
11
  default: false
12
- prop :trigger_method, type: Playbook::Props::Enum,
13
- values: %w[hover click],
14
- default: "hover"
15
12
 
16
13
  def classname
17
14
  generate_classname("pb_tooltip_kit", dark_class)
@@ -24,8 +21,7 @@ module Playbook
24
21
  pb_tooltip_trigger_element_selector: trigger_element_selector,
25
22
  pb_tooltip_trigger_element_id: trigger_element_id,
26
23
  pb_tooltip_tooltip_id: tooltip_id,
27
- pb_tooltip_show_tooltip: true,
28
- pb_tooltip_trigger_method: trigger_method
24
+ pb_tooltip_show_tooltip: true
29
25
  )
30
26
  end
31
27
 
@@ -13,7 +13,6 @@ type UserProps = {
13
13
  aria?: {[key: string]: string},
14
14
  avatar?: boolean,
15
15
  avatarUrl?: string,
16
- bold?: boolean,
17
16
  className?: string,
18
17
  dark?: boolean,
19
18
  data?: {[key: string]: string},
@@ -33,7 +32,6 @@ const User = (props: UserProps): React.ReactElement => {
33
32
  aria = {},
34
33
  avatar = false,
35
34
  avatarUrl,
36
- bold = true,
37
35
  className,
38
36
  dark = false,
39
37
  data = {},
@@ -77,7 +75,6 @@ const User = (props: UserProps): React.ReactElement => {
77
75
  }
78
76
  <div className="content_wrapper">
79
77
  <Title
80
- bold={bold}
81
78
  dark={dark}
82
79
  size={size == 'lg' ? 3 : 4}
83
80
  text={name}
@@ -2,7 +2,6 @@ examples:
2
2
 
3
3
  rails:
4
4
  - user_default: Default
5
- - user_light_weight: Light Weight
6
5
  - user_with_territory: With Territory
7
6
  - user_text_only: Text Only
8
7
  - user_size: Horizontal Size
@@ -12,7 +11,6 @@ examples:
12
11
 
13
12
  react:
14
13
  - user_default: Default
15
- - user_light_weight: Light Weight
16
14
  - user_with_territory: With Territory
17
15
  - user_text_only: Text Only
18
16
  - user_size: Horizontal Size
@@ -1,5 +1,4 @@
1
1
  export { default as UserDefault } from './_user_default.jsx'
2
- export { default as UserLightWeight } from './_user_light_weight.jsx'
3
2
  export { default as UserWithTerritory } from './_user_with_territory.jsx'
4
3
  export { default as UserTextOnly } from './_user_text_only.jsx'
5
4
  export { default as UserSize } from './_user_size.jsx'
@@ -12,7 +12,7 @@
12
12
  }) %>
13
13
  <% end %>
14
14
  <%= content_tag(:div, class: "content_wrapper") do %>
15
- <%= pb_rails("title", props: { text: object.name, size: object.title_size, dark: object.dark, bold: object.bold }) %>
15
+ <%= pb_rails("title", props: { text: object.name, size: object.title_size, dark: object.dark }) %>
16
16
  <%= pb_rails("body", props: {
17
17
  text: "#{object.details}",
18
18
  dark: object.dark,
@@ -9,7 +9,6 @@ module Playbook
9
9
  prop :avatar, type: Playbook::Props::Boolean,
10
10
  default: false
11
11
  prop :avatar_url
12
- prop :bold, type: Playbook::Props::Boolean, default: true
13
12
  prop :name
14
13
  prop :orientation, type: Playbook::Props::Enum,
15
14
  values: %w[vertical horizontal],