playbook_ui 14.12.0.pre.alpha.playrailsinputmaskissue5933 → 14.12.0.pre.alpha.testingwithfas5686

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +4 -11
  5. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +10 -9
  6. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +21 -34
  7. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +13 -8
  8. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +0 -2
  9. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_loading_react.md → _advanced_table_loading.md} +2 -2
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
  12. data/app/pb_kits/playbook/pb_advanced_table/index.js +6 -9
  13. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +1 -3
  14. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +5 -9
  15. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -2
  16. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +6 -9
  17. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
  18. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -14
  19. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +7 -11
  20. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +7 -6
  21. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +3 -9
  22. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +2 -6
  23. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  24. data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +1 -1
  25. data/app/pb_kits/playbook/pb_date/_date.tsx +4 -14
  26. data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +1 -2
  27. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +5 -13
  28. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +6 -1
  29. data/app/pb_kits/playbook/pb_filter/filter.html.erb +5 -1
  30. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -1
  31. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +5 -7
  32. data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +6 -1
  33. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
  34. data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
  35. data/app/pb_kits/playbook/pb_icon/icon.rb +1 -1
  36. data/app/pb_kits/playbook/pb_icon/icon.test.js +8 -8
  37. data/app/pb_kits/playbook/pb_link/_link.tsx +0 -18
  38. data/app/pb_kits/playbook/pb_link/docs/example.yml +3 -5
  39. data/app/pb_kits/playbook/pb_link/docs/index.js +1 -2
  40. data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
  41. data/app/pb_kits/playbook/pb_link/link.rb +0 -6
  42. data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -30
  43. data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +2 -2
  44. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
  45. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +9 -6
  46. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +9 -6
  47. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -26
  48. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +1 -0
  49. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -25
  50. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -25
  51. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +1 -1
  52. data/app/pb_kits/playbook/pb_text_input/index.js +83 -52
  53. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -3
  54. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
  55. data/app/pb_kits/playbook/pb_tooltip/index.js +27 -45
  56. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -5
  57. data/app/pb_kits/playbook/pb_user/_user.tsx +0 -3
  58. data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -2
  59. data/app/pb_kits/playbook/pb_user/docs/index.js +0 -1
  60. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
  61. data/app/pb_kits/playbook/pb_user/user.rb +0 -1
  62. data/app/pb_kits/playbook/pb_user/user.test.js +0 -14
  63. data/dist/chunks/_typeahead-DkuPTikq.js +36 -0
  64. data/dist/chunks/_weekday_stacked-DWgU5uIW.js +45 -0
  65. data/dist/chunks/{lib-DjpLC8uO.js → lib-kMuhBuU7.js} +1 -1
  66. data/dist/chunks/{pb_form_validation-S56UaHZl.js → pb_form_validation-DBJ0wZuS.js} +1 -1
  67. data/dist/chunks/vendor.js +1 -1
  68. data/dist/menu.yml +0 -6
  69. data/dist/playbook-doc.js +1 -1
  70. data/dist/playbook-rails-react-bindings.js +1 -1
  71. data/dist/playbook-rails.js +1 -1
  72. data/dist/playbook.css +1 -1
  73. data/lib/playbook/pb_forms_helper.rb +4 -13
  74. data/lib/playbook/version.rb +1 -1
  75. metadata +8 -32
  76. data/app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts +0 -26
  77. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb +0 -33
  78. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md +0 -1
  79. data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +0 -4
  80. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +0 -92
  81. data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +0 -15
  82. data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +0 -28
  83. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +0 -64
  84. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +0 -2
  85. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +0 -21
  86. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +0 -5
  87. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +0 -45
  88. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +0 -1
  89. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -8
  90. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +0 -2
  91. data/app/pb_kits/playbook/pb_copy_button/index.js +0 -47
  92. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +0 -58
  93. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +0 -3
  94. data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +0 -15
  95. data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +0 -29
  96. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +0 -42
  97. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +0 -59
  98. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +0 -2
  99. data/dist/chunks/_typeahead-qhstadx9.js +0 -36
  100. data/dist/chunks/_weekday_stacked-CAHsfiaG.js +0 -45
  101. data/lib/playbook/pb_forms_global_props_helper.rb +0 -136
  102. /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
@@ -14,7 +14,6 @@ type PbDateProps = {
14
14
  alignment?: "left" | "center" | "right";
15
15
  aria?: { [key: string]: string };
16
16
  className?: string;
17
- dark?: boolean;
18
17
  data?: { [key: string]: string };
19
18
  htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
20
19
  id?: string;
@@ -30,7 +29,6 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
30
29
  aria = {},
31
30
  alignment = "left",
32
31
  className,
33
- dark = false,
34
32
  data = {},
35
33
  htmlOptions = {},
36
34
  id,
@@ -58,7 +56,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
58
56
  );
59
57
 
60
58
  return (
61
- <div
59
+ <div
62
60
  {...ariaProps}
63
61
  {...dataProps}
64
62
  {...htmlProps}
@@ -95,9 +93,7 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
95
93
  </>
96
94
  : size == "md" || size == "lg"
97
95
  ? (
98
- <Title
99
- dark={dark}
100
- size={4}
96
+ <Title size={4}
101
97
  tag="h4"
102
98
  >
103
99
  {showIcon && (
@@ -131,7 +127,6 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
131
127
  <>
132
128
  {showIcon && (
133
129
  <Caption className="pb_icon_kit_container"
134
- dark={dark}
135
130
  tag="span"
136
131
  >
137
132
  <Icon fixedWidth
@@ -143,20 +138,15 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
143
138
 
144
139
  {showDayOfWeek && (
145
140
  <>
146
- <Caption dark={dark}
147
- tag="div">
148
- {weekday}
149
- </Caption>
141
+ <Caption tag="div">{weekday}</Caption>
150
142
  <Caption color="light"
151
- dark={dark}
152
143
  tag="div"
153
144
  text=" • "
154
145
  />
155
146
  </>
156
147
  )}
157
148
 
158
- <Caption dark={dark}
159
- tag="span">
149
+ <Caption tag="span">
160
150
  {month} {day}
161
151
  {currentYear != year && <>{`, ${year}`}</>}
162
152
  </Caption>
@@ -18,7 +18,7 @@ const DateDefault = (props) => {
18
18
  value={"2012-08-03"}
19
19
  {...props}
20
20
  />
21
- <Caption {...props}>{"(Hyphenated Date)"}</Caption>
21
+ <Caption>{"(Hyphenated Date)"}</Caption>
22
22
  </div>
23
23
 
24
24
  <br />
@@ -56,7 +56,6 @@ const DateDefault = (props) => {
56
56
  <Title
57
57
  size={4}
58
58
  text={"(Hyphenated Date)"}
59
- {...props}
60
59
  />
61
60
  </div>
62
61
 
@@ -4,8 +4,7 @@ import { Caption, Date as FormattedDate, Title } from 'playbook-ui'
4
4
  const DateUnstyled = (props) => {
5
5
  return (
6
6
  <>
7
- <Caption {...props}
8
- size="xs"
7
+ <Caption size="xs"
9
8
  text="Basic unstyled example"
10
9
  />
11
10
  <FormattedDate
@@ -16,14 +15,10 @@ const DateUnstyled = (props) => {
16
15
 
17
16
  <br />
18
17
 
19
- <Caption {...props}
20
-
21
- size="xs"
18
+ <Caption size="xs"
22
19
  text="Example with wrapping typography kit"
23
20
  />
24
- <Title {...props}
25
- size={1}
26
- >
21
+ <Title size={1}>
27
22
  <FormattedDate
28
23
  unstyled
29
24
  value={new Date('25 Dec 1995')}
@@ -33,13 +28,10 @@ const DateUnstyled = (props) => {
33
28
 
34
29
  <br />
35
30
 
36
- <Caption {...props}
37
- size="xs"
31
+ <Caption size="xs"
38
32
  text="Example with icon + subcaption"
39
33
  />
40
- <Caption {...props}
41
- size="xs"
42
- >
34
+ <Caption size="xs">
43
35
  <FormattedDate
44
36
  showDayOfWeek
45
37
  showIcon
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag(:div) do %>
1
+ <%= content_tag("div",
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id,
6
+ **combined_html_options) do %>
2
7
  <%= pb_rails("form_group", props: {cursor: "pointer", full_width: object.full_width}) do %>
3
8
  <label
4
9
  for="upload-<%= object.id %>"
@@ -1,4 +1,8 @@
1
- <%= pb_content_tag(:div) do %>
1
+ <%= content_tag(:div,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ **combined_html_options) do %>
2
6
  <%= object.wrapper do %>
3
7
  <%= pb_rails("flex", props: { orientation: "row", padding_right: "lg", vertical: "center" }) do %>
4
8
  <% if (object.template != "sort_only") %>
@@ -5,7 +5,6 @@ examples:
5
5
  - fixed_confirmation_toast_multi_line: Multi Line
6
6
  - fixed_confirmation_toast_close: Click to Close
7
7
  - fixed_confirmation_toast_positions: Click to Show Positions
8
- - fixed_confirmation_toast_auto_close: Click to Show Auto Close
9
8
  - fixed_confirmation_toast_children: Children
10
9
  - fixed_confirmation_toast_custom_icon: Custom Icon
11
10
 
@@ -2,18 +2,16 @@ import PbEnhancedElement from '../pb_enhanced_element'
2
2
 
3
3
  export default class PbFixedConfirmationToast extends PbEnhancedElement {
4
4
  static get selector() {
5
- return '[class*="pb_fixed_confirmation_toast_kit"]'
5
+ return '.remove_toast'
6
6
  }
7
7
 
8
8
  connect() {
9
9
  this.self = this.element
10
10
  this.autoCloseToast(this.self)
11
11
 
12
- if (this.self.classList.contains('remove_toast')) {
13
- this.self.addEventListener('click', () => {
14
- this.removeToast(this.self)
15
- })
16
- }
12
+ this.self.addEventListener('click', () => {
13
+ this.removeToast(this.self)
14
+ })
17
15
  }
18
16
 
19
17
  removeToast(elem) {
@@ -34,4 +32,4 @@ export default class PbFixedConfirmationToast extends PbEnhancedElement {
34
32
  }, autoCloseIntValue)
35
33
  }
36
34
  }
37
- }
35
+ }
@@ -1,3 +1,8 @@
1
- <%= pb_content_tag(:div) do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id,
6
+ **combined_html_options) do %>
2
7
  <%= content.presence %>
3
8
  <% end %>
@@ -1,4 +1,4 @@
1
- <%= pb_content_tag(:div, class: object.classname + object.size_class, tabindex: object.tabindex) do %>
1
+ <%= content_tag(:div, id: object.id, data: object.data, class: object.classname + object.size_class, tabindex: object.tabindex, **combined_html_options) do %>
2
2
  <% if object.name.present? %>
3
3
  <%= pb_rails("avatar", props: { name: object.name, image_url: object.avatar_url, size: "xxs" }) %>
4
4
  <% if object.truncate %>
@@ -137,7 +137,7 @@ const Icon = (props: IconProps) => {
137
137
  pulse = false,
138
138
  rotation,
139
139
  size,
140
- fontStyle = 'far',
140
+ fontStyle = 'fas',
141
141
  spin = false,
142
142
  tabIndex,
143
143
  } = props
@@ -33,7 +33,7 @@ module Playbook
33
33
  default: nil
34
34
  prop :font_style, type: Playbook::Props::Enum,
35
35
  values: %w[far fas fab fak],
36
- default: "far"
36
+ default: "fas"
37
37
  prop :spin, type: Playbook::Props::Boolean,
38
38
  default: false
39
39
  prop :color, type: Playbook::Props::String
@@ -16,7 +16,7 @@ describe("Icon Kit", () => {
16
16
  )
17
17
 
18
18
  const kit = screen.getByTestId(testId)
19
- expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw far")
19
+ expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fas")
20
20
  })
21
21
 
22
22
  test("renders rotate prop", () => {[
@@ -31,7 +31,7 @@ describe("Icon Kit", () => {
31
31
  )
32
32
 
33
33
  const kit = screen.getByTestId(testId)
34
- expect(kit).toHaveClass(`fa-user pb_icon_kit fa-fw fa-rotate-${rotateProp} far`)
34
+ expect(kit).toHaveClass(`fa-user pb_icon_kit fa-fw fa-rotate-${rotateProp} fas`)
35
35
 
36
36
  cleanup()
37
37
  })
@@ -48,7 +48,7 @@ describe("Icon Kit", () => {
48
48
  )
49
49
 
50
50
  const kit = screen.getByTestId(testId)
51
- expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fa-flip-horizontal far")
51
+ expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fa-flip-horizontal fas")
52
52
  })
53
53
 
54
54
 
@@ -63,7 +63,7 @@ describe("Icon Kit", () => {
63
63
  )
64
64
 
65
65
  const kit = screen.getByTestId(testId)
66
- expect(kit).toHaveClass("fa-spinner pb_icon_kit fa-fw fa-spin far")
66
+ expect(kit).toHaveClass("fa-spinner pb_icon_kit fa-fw fa-spin fas")
67
67
  })
68
68
 
69
69
  test("renders pull icon", () => {
@@ -77,7 +77,7 @@ describe("Icon Kit", () => {
77
77
  )
78
78
 
79
79
  const kit = screen.getByTestId(testId)
80
- expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left far")
80
+ expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left fas")
81
81
  })
82
82
 
83
83
  test("renders pull icon", () => {
@@ -91,7 +91,7 @@ describe("Icon Kit", () => {
91
91
  )
92
92
 
93
93
  const kit = screen.getByTestId(testId)
94
- expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left far")
94
+ expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left fas")
95
95
  })
96
96
 
97
97
  test("renders border around icon", () => {
@@ -105,7 +105,7 @@ describe("Icon Kit", () => {
105
105
  )
106
106
 
107
107
  const kit = screen.getByTestId(testId)
108
- expect(kit).toHaveClass("fa-user pb_icon_kit fa-border fa-fw far")
108
+ expect(kit).toHaveClass("fa-user pb_icon_kit fa-border fa-fw fas")
109
109
  })
110
110
 
111
111
  test("renders size prop", () => {
@@ -132,7 +132,7 @@ describe("Icon Kit", () => {
132
132
  )
133
133
 
134
134
  const kit = screen.getByTestId(testId)
135
- expect(kit).toHaveClass(`pb_icon_kit fa-user fa-fw fa-${sizeProp} far`)
135
+ expect(kit).toHaveClass(`pb_icon_kit fa-user fa-fw fa-${sizeProp} fas`)
136
136
 
137
137
  cleanup()
138
138
  })
@@ -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
- })
@@ -95,11 +95,11 @@ test('should not have a left border', () => {
95
95
  test('should have a right icon', () => {
96
96
  render(<NavDefault iconRight="angle-down" />)
97
97
  const kit = screen.getByTestId(itemTestId)
98
- expect(kit).toContainHTML('<i class="pb_icon_kit far pb_nav_list_item_icon_right fa-fw fa-angle-down" />')
98
+ expect(kit).toContainHTML('<i class="pb_icon_kit fas pb_nav_list_item_icon_right fa-fw fa-angle-down" />')
99
99
  })
100
100
 
101
101
  test('should have a left icon', () => {
102
102
  render(<NavDefault iconLeft="users-class" />)
103
103
  const kit = screen.getByTestId(itemTestId)
104
- expect(kit).toContainHTML('<i class="pb_icon_kit far pb_nav_list_item_icon_left fa-fw fa-users-class" />')
104
+ expect(kit).toContainHTML('<i class="pb_icon_kit fas pb_nav_list_item_icon_left fa-fw fa-users-class" />')
105
105
  })
@@ -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 {