playbook_ui 14.13.0 → 14.14.0.pre.alpha.PBNTR866finalizecssendlessscroll6462

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 (187) 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/RegularTableView.tsx +127 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/TableActionBar.tsx +55 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/Components/TablePagination.tsx +33 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/Components/VirtualizedTableView.tsx +275 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/Context/AdvancedTableContext.tsx +143 -3
  8. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableActions.ts +66 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +195 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +45 -99
  11. data/app/pb_kits/playbook/pb_advanced_table/Utilities/CellRendererUtils.tsx +73 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts +52 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/Utilities/TableContainerStyles.ts +80 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +129 -7
  15. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +153 -298
  16. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +8 -1
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx +75 -0
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_infinite_scroll.jsx +50 -0
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +3 -1
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +33 -0
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +3 -0
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_infinite_scroll.json +152002 -0
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -1
  26. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +3 -1
  27. data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +58 -0
  28. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
  29. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
  30. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -0
  31. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
  32. data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +17 -8
  33. data/app/pb_kits/playbook/pb_checkbox/checkbox.test.js +16 -0
  34. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx +69 -0
  35. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md +1 -0
  36. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +2 -1
  37. data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
  38. data/app/pb_kits/playbook/pb_currency/_currency.tsx +46 -31
  39. data/app/pb_kits/playbook/pb_currency/currency.html.erb +15 -8
  40. data/app/pb_kits/playbook/pb_currency/currency.rb +17 -2
  41. data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display.html.erb +22 -0
  42. data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display.jsx +34 -0
  43. data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display_rails.md +1 -0
  44. data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display_react.md +1 -0
  45. data/app/pb_kits/playbook/pb_currency/docs/example.yml +2 -0
  46. data/app/pb_kits/playbook/pb_currency/docs/index.js +2 -1
  47. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +3 -1
  48. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +2 -2
  49. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +4 -1
  50. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +90 -0
  51. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +5 -0
  52. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +2 -0
  53. data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
  54. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +7 -4
  55. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +6 -3
  56. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +32 -8
  57. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.html.erb +8 -0
  58. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.html.erb +33 -0
  59. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +0 -0
  60. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb +20 -1
  61. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.html.erb +24 -0
  62. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.html.erb +21 -0
  63. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.md +1 -0
  64. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.html.erb +49 -0
  65. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +5 -0
  66. data/app/pb_kits/playbook/pb_drawer/drawer.html.erb +20 -12
  67. data/app/pb_kits/playbook/pb_drawer/drawer.rb +49 -1
  68. data/app/pb_kits/playbook/pb_drawer/index.js +257 -0
  69. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
  70. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +2 -1
  71. data/app/pb_kits/playbook/pb_icon_button/_icon_button.tsx +71 -0
  72. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +1 -2
  73. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.jsx +17 -0
  74. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb +27 -0
  75. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.jsx +61 -0
  76. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +5 -3
  77. data/app/pb_kits/playbook/pb_icon_button/docs/index.js +2 -0
  78. data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +1 -1
  79. data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +3 -0
  80. data/app/pb_kits/playbook/pb_icon_button/icon_button.test.jsx +39 -0
  81. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +1 -6
  82. data/app/pb_kits/playbook/pb_nav/item.html.erb +7 -19
  83. data/app/pb_kits/playbook/pb_nav/nav.html.erb +3 -8
  84. data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +1 -6
  85. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +13 -0
  86. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +11 -1
  87. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_hide_scroll_bar.html.erb +11 -0
  88. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_hide_scroll_bar.jsx +37 -0
  89. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_hide_scroll_bar_rails.md +1 -0
  90. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_hide_scroll_bar_react.md +1 -0
  91. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.html.erb +11 -0
  92. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +37 -0
  93. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.md +1 -0
  94. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md +1 -0
  95. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +4 -0
  96. data/app/pb_kits/playbook/pb_overlay/docs/index.js +2 -0
  97. data/app/pb_kits/playbook/pb_overlay/index.js +61 -0
  98. data/app/pb_kits/playbook/pb_overlay/overlay.html.erb +5 -3
  99. data/app/pb_kits/playbook/pb_overlay/overlay.rb +16 -1
  100. data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +12 -0
  101. data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx +48 -10
  102. data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -6
  103. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +6 -1
  104. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +7 -5
  105. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.html.erb +1 -0
  106. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx +7 -0
  107. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.md +1 -0
  108. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.html.erb +1 -0
  109. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.jsx +18 -0
  110. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_rails.md +1 -0
  111. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_react.md +1 -0
  112. data/app/pb_kits/playbook/pb_progress_pills/docs/example.yml +2 -0
  113. data/app/pb_kits/playbook/pb_progress_pills/docs/index.js +1 -0
  114. data/app/pb_kits/playbook/pb_progress_pills/progress_pills.html.erb +2 -7
  115. data/app/pb_kits/playbook/pb_progress_pills/progress_pills.rb +6 -0
  116. data/app/pb_kits/playbook/pb_progress_pills/progress_pills.test.js +26 -1
  117. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +1 -5
  118. data/app/pb_kits/playbook/pb_progress_step/progress_step.html.erb +1 -5
  119. data/app/pb_kits/playbook/pb_progress_step/progress_step_item.html.erb +3 -7
  120. data/app/pb_kits/playbook/pb_radio/radio.html.erb +6 -11
  121. data/app/pb_kits/playbook/pb_select/index.js +38 -0
  122. data/app/pb_kits/playbook/pb_select/select.rb +8 -0
  123. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +47 -0
  124. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +88 -0
  125. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +1 -0
  126. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
  127. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +51 -0
  128. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md +2 -0
  129. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +96 -0
  130. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +101 -0
  131. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md +1 -0
  132. data/app/pb_kits/playbook/pb_table/docs/example.yml +5 -0
  133. data/app/pb_kits/playbook/pb_table/docs/index.js +3 -1
  134. data/app/pb_kits/playbook/pb_table/index.ts +41 -9
  135. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +4 -0
  136. data/app/pb_kits/playbook/pb_table/subcomponents/_table_body.tsx +29 -2
  137. data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +31 -3
  138. data/app/pb_kits/playbook/pb_table/table_body.html.erb +13 -7
  139. data/app/pb_kits/playbook/pb_table/table_body.rb +2 -0
  140. data/app/pb_kits/playbook/pb_table/table_row.html.erb +14 -7
  141. data/app/pb_kits/playbook/pb_table/table_row.rb +14 -1
  142. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +14 -0
  143. data/app/pb_kits/playbook/pb_text_input/index.js +9 -0
  144. data/app/pb_kits/playbook/pb_text_input/text_input.rb +5 -2
  145. data/app/pb_kits/playbook/pb_tooltip/_tooltip.scss +0 -3
  146. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_delay_rails.html.erb +39 -0
  147. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_delay_rails.md +3 -0
  148. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_interaction.html.erb +26 -0
  149. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +2 -0
  150. data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +282 -0
  151. data/app/pb_kits/playbook/pb_tooltip/index.js +2 -2
  152. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +10 -2
  153. data/dist/chunks/_typeahead-B1p_cPQJ.js +36 -0
  154. data/dist/chunks/_weekday_stacked-DTN9JLqd.js +45 -0
  155. data/dist/chunks/lazysizes-B7xYodB-.js +1 -0
  156. data/dist/chunks/{lib-DjpLC8uO.js → lib-Fr78pbpF.js} +2 -2
  157. data/dist/chunks/{pb_form_validation-S56UaHZl.js → pb_form_validation-CN51bfsD.js} +1 -1
  158. data/dist/chunks/vendor.js +1 -1
  159. data/dist/menu.yml +3 -10
  160. data/dist/playbook-doc.js +1 -1
  161. data/dist/playbook-rails-react-bindings.js +1 -1
  162. data/dist/playbook-rails.js +1 -1
  163. data/dist/playbook.css +1 -1
  164. data/lib/playbook/forms/builder/time_zone_select_field.rb +19 -0
  165. data/lib/playbook/forms/builder.rb +1 -0
  166. data/lib/playbook/version.rb +2 -2
  167. metadata +75 -24
  168. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +0 -66
  169. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +0 -98
  170. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +0 -28
  171. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb +0 -42
  172. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +0 -19
  173. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +0 -26
  174. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +0 -10
  175. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +0 -17
  176. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +0 -19
  177. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +0 -16
  178. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +0 -35
  179. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +0 -42
  180. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +0 -13
  181. data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +0 -15
  182. data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +0 -4
  183. data/app/pb_kits/playbook/pb_avatar_action_button/pb_avatar_action_button.test.js +0 -31
  184. data/dist/chunks/_typeahead-btjo1UN5.js +0 -36
  185. data/dist/chunks/_weekday_stacked-DeYS_l8v.js +0 -45
  186. data/dist/chunks/lazysizes-DHz07jlL.js +0 -1
  187. /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
@@ -1,19 +0,0 @@
1
- import React from 'react'
2
-
3
- import AvatarActionButton from '../_avatar_action_button'
4
-
5
- const AvatarActionButtonOnClick = (props) => (
6
- <div className="pb--doc-demo-row">
7
- <AvatarActionButton
8
- imageAlt="Sophia Carden"
9
- imageUrl="https://randomuser.me/api/portraits/women/8.jpg"
10
- linkAriaLabel="Alert Sophia Carden"
11
- linkUrl="https://www.google.com"
12
- name="Sophia Carden"
13
- onClick={() => alert('clicked!')}
14
- {...props}
15
- />
16
- </div>
17
- )
18
-
19
- export default AvatarActionButtonOnClick
@@ -1,16 +0,0 @@
1
- <div class="pb--doc-demo-row">
2
-
3
- <%= pb_rails("avatar_action_button", props: {
4
- link_aria_label: "Alert Sophia Carden",
5
- name: "Sophia Carden",
6
- id: "clickable",
7
- link_url: "http://www.google.com",
8
- image_alt: "Sophia Carden",
9
- image_url: "https://randomuser.me/api/portraits/women/8.jpg",
10
- }) %>
11
-
12
- <%= javascript_tag do %>
13
- document.querySelector('#clickable').addEventListener('click', () => alert('clickable clicked!'))
14
- <% end %>
15
-
16
- </div>
@@ -1,35 +0,0 @@
1
- <div class="pb--doc-demo-row">
2
-
3
- <%= pb_rails("avatar_action_button", props: {
4
- link_aria_label: "Sophia Carden",
5
- name: "Sophia Carden",
6
- image_alt: "Sophia Carden",
7
- image_url: "https://randomuser.me/api/portraits/women/8.jpg",
8
- placement: "bottom_left"
9
- }) %>
10
-
11
- <%= pb_rails("avatar_action_button", props: {
12
- link_aria_label: "Sophia Carden",
13
- name: "Sophia Carden",
14
- image_alt: "Sophia Carden",
15
- image_url: "https://randomuser.me/api/portraits/women/8.jpg",
16
- placement: "bottom_right"
17
- }) %>
18
-
19
- <%= pb_rails("avatar_action_button", props: {
20
- link_aria_label: "Sophia Carden",
21
- name: "Sophia Carden",
22
- image_alt: "Sophia Carden",
23
- image_url: "https://randomuser.me/api/portraits/women/8.jpg",
24
- placement: "top_left"
25
- }) %>
26
-
27
- <%= pb_rails("avatar_action_button", props: {
28
- link_aria_label: "Sophia Carden",
29
- name: "Sophia Carden",
30
- image_alt: "Sophia Carden",
31
- image_url: "https://randomuser.me/api/portraits/women/8.jpg",
32
- placement: "top_right"
33
- }) %>
34
-
35
- </div>
@@ -1,42 +0,0 @@
1
- import React from 'react'
2
-
3
- import AvatarActionButton from '../_avatar_action_button'
4
-
5
- const AvatarActionButtonPlacement = (props) => (
6
- <div className="pb--doc-demo-row">
7
- <AvatarActionButton
8
- imageAlt="Sophia Carden"
9
- imageUrl="https://randomuser.me/api/portraits/women/8.jpg"
10
- linkAriaLabel="Sophia Carden"
11
- name="Sophia Carden"
12
- placement="bottom_left"
13
- {...props}
14
- />
15
- <AvatarActionButton
16
- imageAlt="Sophia Carden"
17
- imageUrl="https://randomuser.me/api/portraits/women/8.jpg"
18
- linkAriaLabel="Sophia Carden"
19
- name="Sophia Carden"
20
- placement="bottom_right"
21
- {...props}
22
- />
23
- <AvatarActionButton
24
- imageAlt="Sophia Carden"
25
- imageUrl="https://randomuser.me/api/portraits/women/8.jpg"
26
- linkAriaLabel="Sophia Carden"
27
- name="Sophia Carden"
28
- placement="top_left"
29
- {...props}
30
- />
31
- <AvatarActionButton
32
- imageAlt="Sophia Carden"
33
- imageUrl="https://randomuser.me/api/portraits/women/8.jpg"
34
- linkAriaLabel="Sophia Carden"
35
- name="Sophia Carden"
36
- placement="top_right"
37
- {...props}
38
- />
39
- </div>
40
- )
41
-
42
- export default AvatarActionButtonPlacement
@@ -1,13 +0,0 @@
1
- <div class="pb--doc-demo-row">
2
-
3
- <%= pb_rails("avatar_action_button", props: {
4
- link_aria_label: "Sophia Carden",
5
- name: "Sophia Carden",
6
- link_url: "http://www.google.com",
7
- image_alt: "Sophia Carden",
8
- image_url: "https://randomuser.me/api/portraits/women/8.jpg",
9
- tooltip_text: "Tooltip Text",
10
- tooltip_id: "avatar_1",
11
- }) %>
12
-
13
- </div>
@@ -1,15 +0,0 @@
1
- examples:
2
-
3
- rails:
4
- - avatar_action_button_default: Default
5
- - avatar_action_button_placement: Placement
6
- - avatar_action_button_actions: Actions
7
- - avatar_action_button_onclick: On Click
8
- - avatar_action_button_tooltip: Tooltip
9
-
10
-
11
- react:
12
- - avatar_action_button_default: Default
13
- - avatar_action_button_placement: Placement
14
- - avatar_action_button_actions: Actions
15
- - avatar_action_button_on_click: On Click
@@ -1,4 +0,0 @@
1
- export { default as AvatarActionButtonDefault } from './_avatar_action_button_default.jsx'
2
- export { default as AvatarActionButtonPlacement } from './_avatar_action_button_placement.jsx'
3
- export { default as AvatarActionButtonActions } from './_avatar_action_button_actions.jsx'
4
- export { default as AvatarActionButtonOnClick } from './_avatar_action_button_on_click.jsx'
@@ -1,31 +0,0 @@
1
- import React from 'react'
2
- import { render, screen } from '../utilities/test-utils'
3
-
4
- import AvatarActionButton from './_avatar_action_button'
5
-
6
- const imageUrl = 'https://randomuser.me/api/portraits/women/8.jpg',
7
- testId = 'scarden',
8
- name = 'Sophia Carden',
9
- imageAlt = 'Sophia Carden Profile'
10
-
11
- test('loads the given image url and name', () => {
12
- render(
13
- <AvatarActionButton
14
- data={{ testid: testId }}
15
- imageAlt={imageAlt}
16
- imageUrl={imageUrl}
17
- linkAriaLabel={name}
18
- name={name}
19
- />
20
- )
21
-
22
- const kit = screen.getByTestId(testId)
23
- const image = screen.getByAltText(imageAlt)
24
- const link = kit.children[0]
25
-
26
- expect(kit).toHaveClass('pb_avatar_action_button_kit_add_bottom_left_md')
27
- expect(image).toHaveAttribute('data-src', imageUrl)
28
- expect(image).toHaveAttribute('src', imageUrl)
29
- expect(image).toHaveAttribute('alt', imageAlt)
30
- expect(link).toHaveAttribute('aria-label', name)
31
- })