playbook_ui 14.13.0.pre.alpha.play1834depupdatesass6024 → 14.13.0.pre.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) 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 -71
  6. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +21 -37
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +0 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -3
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
  11. data/app/pb_kits/playbook/pb_advanced_table/index.js +6 -9
  12. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +5 -8
  13. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +0 -9
  14. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +7 -11
  15. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +7 -6
  16. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +3 -9
  17. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +2 -6
  18. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  19. data/app/pb_kits/playbook/pb_date/_date.tsx +4 -14
  20. data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +1 -2
  21. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +5 -13
  22. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +5 -2
  23. data/app/pb_kits/playbook/pb_draggable/draggable_container.html.erb +2 -2
  24. data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +0 -5
  25. data/app/pb_kits/playbook/pb_draggable/draggable_item.html.erb +1 -1
  26. data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +0 -4
  27. data/app/pb_kits/playbook/pb_draggable/index.js +15 -151
  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_home_address_street/_home_address_street.tsx +7 -11
  35. data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +0 -2
  36. data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +0 -1
  37. data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +2 -13
  38. data/app/pb_kits/playbook/pb_icon/icon.html.erb +6 -2
  39. data/app/pb_kits/playbook/pb_layout/body.html.erb +5 -1
  40. data/app/pb_kits/playbook/pb_layout/footer.html.erb +5 -1
  41. data/app/pb_kits/playbook/pb_layout/header.html.erb +5 -1
  42. data/app/pb_kits/playbook/pb_layout/item.html.erb +5 -1
  43. data/app/pb_kits/playbook/pb_layout/layout.html.erb +5 -1
  44. data/app/pb_kits/playbook/pb_layout/sidebar.html.erb +5 -1
  45. data/app/pb_kits/playbook/pb_legend/legend.html.erb +6 -1
  46. data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +6 -7
  47. data/app/pb_kits/playbook/pb_link/_link.tsx +0 -18
  48. data/app/pb_kits/playbook/pb_link/docs/example.yml +3 -5
  49. data/app/pb_kits/playbook/pb_link/docs/index.js +1 -2
  50. data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
  51. data/app/pb_kits/playbook/pb_link/link.rb +0 -6
  52. data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -30
  53. data/app/pb_kits/playbook/pb_message/message.html.erb +6 -1
  54. data/app/pb_kits/playbook/pb_message/message_mention.html.erb +6 -1
  55. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
  56. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +9 -6
  57. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +9 -6
  58. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -26
  59. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +1 -0
  60. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -25
  61. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -25
  62. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +1 -1
  63. data/app/pb_kits/playbook/pb_text_input/index.js +83 -52
  64. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -3
  65. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
  66. data/app/pb_kits/playbook/pb_tooltip/index.js +27 -45
  67. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -5
  68. data/app/pb_kits/playbook/pb_user/_user.tsx +0 -3
  69. data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -2
  70. data/app/pb_kits/playbook/pb_user/docs/index.js +0 -1
  71. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
  72. data/app/pb_kits/playbook/pb_user/user.rb +0 -1
  73. data/app/pb_kits/playbook/pb_user/user.test.js +0 -14
  74. data/dist/chunks/_typeahead-BWwaAo_0.js +36 -0
  75. data/dist/chunks/_weekday_stacked-zyBCd1s8.js +45 -0
  76. data/dist/chunks/{lib-WQEeEj3t.js → lib-kMuhBuU7.js} +2 -2
  77. data/dist/chunks/{pb_form_validation-Cq64l4zn.js → pb_form_validation-DBJ0wZuS.js} +1 -1
  78. data/dist/chunks/vendor.js +1 -1
  79. data/dist/menu.yml +0 -6
  80. data/dist/playbook-doc.js +1 -1
  81. data/dist/playbook-rails-react-bindings.js +1 -1
  82. data/dist/playbook-rails.js +1 -1
  83. data/dist/playbook.css +1 -1
  84. data/lib/playbook/version.rb +2 -2
  85. metadata +7 -38
  86. data/app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts +0 -26
  87. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +0 -55
  88. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +0 -3
  89. data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +0 -4
  90. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +0 -92
  91. data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +0 -15
  92. data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +0 -28
  93. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +0 -64
  94. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +0 -2
  95. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +0 -21
  96. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +0 -5
  97. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +0 -45
  98. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +0 -1
  99. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -8
  100. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +0 -2
  101. data/app/pb_kits/playbook/pb_copy_button/index.js +0 -47
  102. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb +0 -99
  103. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md +0 -1
  104. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +0 -61
  105. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +0 -1
  106. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +0 -58
  107. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +0 -3
  108. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +0 -11
  109. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +0 -22
  110. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +0 -1
  111. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +0 -1
  112. data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +0 -15
  113. data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +0 -29
  114. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +0 -42
  115. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +0 -59
  116. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +0 -2
  117. data/dist/chunks/_typeahead-DQTwAd_2.js +0 -36
  118. data/dist/chunks/_weekday_stacked-CnPEqV7l.js +0 -45
  119. /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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "14.13.0"
5
- VERSION = "14.13.0.pre.alpha.play1834depupdatesass6024"
4
+ PREVIOUS_VERSION = "14.12.0"
5
+ VERSION = "14.13.0.pre.rc.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.13.0.pre.alpha.play1834depupdatesass6024
4
+ version: 14.13.0.pre.rc.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-02-10 00:00:00.000000000 Z
12
+ date: 2025-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -265,7 +265,6 @@ files:
265
265
  - app/pb_kits/playbook/pb_advanced_table/README.md
266
266
  - app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx
267
267
  - app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx
268
- - app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts
269
268
  - app/pb_kits/playbook/pb_advanced_table/Utilities/BrowserCheck.tsx
270
269
  - app/pb_kits/playbook/pb_advanced_table/Utilities/ExpansionControlHelpers.tsx
271
270
  - app/pb_kits/playbook/pb_advanced_table/Utilities/IconHelpers.tsx
@@ -333,8 +332,6 @@ files:
333
332
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx
334
333
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md
335
334
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md
336
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx
337
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
338
335
  - app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
339
336
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json
340
337
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json
@@ -801,19 +798,6 @@ files:
801
798
  - app/pb_kits/playbook/pb_contact/docs/_description.md
802
799
  - app/pb_kits/playbook/pb_contact/docs/example.yml
803
800
  - app/pb_kits/playbook/pb_contact/docs/index.js
804
- - app/pb_kits/playbook/pb_copy_button/_copy_button.scss
805
- - app/pb_kits/playbook/pb_copy_button/_copy_button.tsx
806
- - app/pb_kits/playbook/pb_copy_button/copy_button.html.erb
807
- - app/pb_kits/playbook/pb_copy_button/copy_button.rb
808
- - app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx
809
- - app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb
810
- - app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx
811
- - app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb
812
- - app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx
813
- - app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md
814
- - app/pb_kits/playbook/pb_copy_button/docs/example.yml
815
- - app/pb_kits/playbook/pb_copy_button/docs/index.js
816
- - app/pb_kits/playbook/pb_copy_button/index.js
817
801
  - app/pb_kits/playbook/pb_currency/_currency.scss
818
802
  - app/pb_kits/playbook/pb_currency/_currency.tsx
819
803
  - app/pb_kits/playbook/pb_currency/currency.html.erb
@@ -1171,8 +1155,6 @@ files:
1171
1155
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.md
1172
1156
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx
1173
1157
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.md
1174
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb
1175
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md
1176
1158
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx
1177
1159
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md
1178
1160
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb
@@ -1185,8 +1167,6 @@ files:
1185
1167
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md
1186
1168
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb
1187
1169
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md
1188
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb
1189
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md
1190
1170
  - app/pb_kits/playbook/pb_draggable/docs/example.yml
1191
1171
  - app/pb_kits/playbook/pb_draggable/docs/index.js
1192
1172
  - app/pb_kits/playbook/pb_draggable/draggable.html.erb
@@ -1355,10 +1335,8 @@ files:
1355
1335
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss
1356
1336
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx
1357
1337
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_description.md
1358
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb
1359
1338
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.jsx
1360
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md
1361
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_react.md
1339
+ - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.md
1362
1340
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.html.erb
1363
1341
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.jsx
1364
1342
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.md
@@ -1566,10 +1544,6 @@ files:
1566
1544
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx
1567
1545
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md
1568
1546
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis_swift.md
1569
- - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb
1570
- - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx
1571
- - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md
1572
- - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md
1573
1547
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.html.erb
1574
1548
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.jsx
1575
1549
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.md
@@ -1854,8 +1828,6 @@ files:
1854
1828
  - app/pb_kits/playbook/pb_link/docs/_link_icon.jsx
1855
1829
  - app/pb_kits/playbook/pb_link/docs/_link_tag.html.erb
1856
1830
  - app/pb_kits/playbook/pb_link/docs/_link_tag.jsx
1857
- - app/pb_kits/playbook/pb_link/docs/_link_target.html.erb
1858
- - app/pb_kits/playbook/pb_link/docs/_link_target.jsx
1859
1831
  - app/pb_kits/playbook/pb_link/docs/_link_underline.html.erb
1860
1832
  - app/pb_kits/playbook/pb_link/docs/_link_underline.jsx
1861
1833
  - app/pb_kits/playbook/pb_link/docs/example.yml
@@ -3174,9 +3146,6 @@ files:
3174
3146
  - app/pb_kits/playbook/pb_user/docs/_user_default.html.erb
3175
3147
  - app/pb_kits/playbook/pb_user/docs/_user_default.jsx
3176
3148
  - app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md
3177
- - app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb
3178
- - app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx
3179
- - app/pb_kits/playbook/pb_user/docs/_user_light_weight.md
3180
3149
  - app/pb_kits/playbook/pb_user/docs/_user_presence_indicator_swift.md
3181
3150
  - app/pb_kits/playbook/pb_user/docs/_user_props_table.md
3182
3151
  - app/pb_kits/playbook/pb_user/docs/_user_size.html.erb
@@ -3332,11 +3301,11 @@ files:
3332
3301
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3333
3302
  - app/pb_kits/playbook/utilities/text.ts
3334
3303
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3335
- - dist/chunks/_typeahead-DQTwAd_2.js
3336
- - dist/chunks/_weekday_stacked-CnPEqV7l.js
3304
+ - dist/chunks/_typeahead-BWwaAo_0.js
3305
+ - dist/chunks/_weekday_stacked-zyBCd1s8.js
3337
3306
  - dist/chunks/lazysizes-B7xYodB-.js
3338
- - dist/chunks/lib-WQEeEj3t.js
3339
- - dist/chunks/pb_form_validation-Cq64l4zn.js
3307
+ - dist/chunks/lib-kMuhBuU7.js
3308
+ - dist/chunks/pb_form_validation-DBJ0wZuS.js
3340
3309
  - dist/chunks/vendor.js
3341
3310
  - dist/menu.yml
3342
3311
  - dist/playbook-doc.js
@@ -1,26 +0,0 @@
1
- export const showActionBar = (elem: HTMLElement) => {
2
- elem.style.display = "block";
3
- const height = elem.scrollHeight + "px";
4
- elem.style.height = height;
5
- elem.classList.add("is-visible");
6
- elem.style.overflow = "hidden";
7
-
8
- window.setTimeout(() => {
9
- if (elem.classList.contains("is-visible")) {
10
- elem.style.height = "";
11
- elem.style.overflow = "visible";
12
- }
13
- }, 300);
14
- };
15
-
16
- export const hideActionBar = (elem: HTMLElement) => {
17
- elem.style.height = elem.scrollHeight + "px";
18
- elem.offsetHeight;
19
- window.setTimeout(() => {
20
- elem.style.height = "0";
21
- elem.style.overflow = "hidden";
22
- }, 10);
23
- window.setTimeout(() => {
24
- elem.classList.remove("is-visible");
25
- }, 300);
26
- };
@@ -1,55 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data.json"
4
-
5
- const AdvancedTableTablePropsStickyHeader = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- accessor: "newEnrollments",
14
- label: "New Enrollments",
15
- },
16
- {
17
- accessor: "scheduledMeetings",
18
- label: "Scheduled Meetings",
19
- },
20
- {
21
- accessor: "attendanceRate",
22
- label: "Attendance Rate",
23
- },
24
- {
25
- accessor: "completedClasses",
26
- label: "Completed Classes",
27
- },
28
- {
29
- accessor: "classCompletionRate",
30
- label: "Class Completion Rate",
31
- },
32
- {
33
- accessor: "graduatedStudents",
34
- label: "Graduated Students",
35
- },
36
- ]
37
-
38
- const tableProps = {
39
- sticky: true
40
- }
41
-
42
- return (
43
- <div>
44
- <AdvancedTable
45
- columnDefinitions={columnDefinitions}
46
- maxHeight="xs"
47
- tableData={MOCK_DATA}
48
- tableProps={tableProps}
49
- {...props}
50
- />
51
- </div>
52
- )
53
- }
54
-
55
- export default AdvancedTableTablePropsStickyHeader
@@ -1,3 +0,0 @@
1
- Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
2
-
3
- A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props) doc example above.
@@ -1,4 +0,0 @@
1
- .pb_copy_button_kit {
2
- width: fit-content;
3
- height: fit-content;
4
- }
@@ -1,92 +0,0 @@
1
-
2
- import React, { useState } from 'react'
3
- import classnames from 'classnames'
4
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
5
- import { globalProps } from '../utilities/globalProps'
6
-
7
- import Button from '../pb_button/_button'
8
- import Tooltip from '../pb_tooltip/_tooltip'
9
-
10
- type CopyButtonProps = {
11
- aria?: { [key: string]: string },
12
- className?: string,
13
- data?: { [key: string]: string },
14
- id?: string,
15
- from?: string,
16
- text?: string,
17
- tooltipPlacement?: "top" | "right" | "bottom" | "left",
18
- tooltipText?: string,
19
- value?: string,
20
- }
21
-
22
- const CopyButton = (props: CopyButtonProps) => {
23
- const {
24
- aria = {},
25
- className,
26
- data = {},
27
- from = '',
28
- id,
29
- text= 'Copy',
30
- tooltipPlacement= 'bottom',
31
- tooltipText = 'Copied!',
32
- value = '',
33
- } = props
34
-
35
- const [copied, setCopied] = useState(false)
36
-
37
- const ariaProps = buildAriaProps(aria)
38
- const dataProps = buildDataProps(data)
39
- const classes = classnames(buildCss('pb_copy_button_kit'), globalProps(props), className)
40
-
41
- const copy = () => {
42
- if (!from && !value) {
43
- return
44
- }
45
-
46
- if (value) {
47
- navigator.clipboard.writeText(value)
48
- } else if (from) {
49
- const copyElement = document.getElementById(from);
50
- let copyText = copyElement?.innerText
51
-
52
- if (copyElement instanceof HTMLTextAreaElement || copyElement instanceof HTMLInputElement) {
53
- copyText = copyElement.value;
54
- }
55
-
56
- if (copyText) {
57
- navigator.clipboard.writeText(copyText)
58
- }
59
- }
60
-
61
- setCopied(true)
62
-
63
- setTimeout(() => {
64
- setCopied(false)
65
- }, 1000);
66
- }
67
-
68
- return (
69
- <div
70
- {...ariaProps}
71
- {...dataProps}
72
- className={classes}
73
- id={id}
74
- >
75
- <Tooltip
76
- forceOpenTooltip={copied}
77
- placement={tooltipPlacement}
78
- showTooltip={false}
79
- text={tooltipText}
80
- >
81
- <Button
82
- icon='copy'
83
- onClick={copy}
84
- >
85
- { text }
86
- </Button>
87
- </Tooltip>
88
- </div>
89
- )
90
- }
91
-
92
- export default CopyButton
@@ -1,15 +0,0 @@
1
- <%= pb_content_tag do %>
2
- <%= pb_rails("button", props: { icon: "copy" }) do %>
3
- <%= object.text %>
4
- <% end %>
5
- <% if object.id %>
6
- <%= pb_rails("tooltip", props: {
7
- trigger_element_selector: "##{object.id}",
8
- position: object.tooltip_position,
9
- tooltip_id: "#{object.id}_tooltip",
10
- trigger_method: "click"
11
- }) do %>
12
- <%= object.tooltip_text %>
13
- <% end %>
14
- <% end %>
15
- <% end %>
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module PbCopyButton
5
- class CopyButton < ::Playbook::KitBase
6
- prop :text
7
- prop :tooltip_position,
8
- type: Playbook::Props::Enum,
9
- values: %w[top right bottom left],
10
- default: "top"
11
- prop :tooltip_text, type: Playbook::Props::String,
12
- default: "Copied!"
13
- prop :value
14
- prop :from
15
-
16
- def classname
17
- generate_classname("pb_copy_button_kit")
18
- end
19
-
20
- def data
21
- Hash(values[:data]).merge(
22
- "copy-value": value,
23
- "from": from
24
- )
25
- end
26
- end
27
- end
28
- end
@@ -1,64 +0,0 @@
1
- import React from 'react';
2
- import { CopyButton } from 'playbook-ui'
3
- import { ensureAccessible, renderKit, render, fireEvent, screen } from '../utilities/test-utils'
4
-
5
- const props = {
6
- data: { testid: 'default', value: 'copy' }
7
- }
8
-
9
- test('returns namespaced class name', () => {
10
- const kit = renderKit(CopyButton, props)
11
- expect(kit).toBeInTheDocument()
12
- expect(kit).toHaveClass('pb_copy_button_kit')
13
- })
14
-
15
- it('should be accessible', async () => {
16
- ensureAccessible(CopyButton, props)
17
- })
18
-
19
- // It's difficult to actually use navigator.clipboard.readText, so we mock
20
- it('copies the value to clipboard and pastes it into an input', async () => {
21
- Object.defineProperty(global, 'navigator', {
22
- value: {
23
- clipboard: {
24
- writeText: jest.fn().mockResolvedValueOnce(undefined),
25
- },
26
- },
27
- writable: true,
28
- })
29
-
30
- render(<CopyButton {...props} />)
31
-
32
- const copyButton = screen.getByTestId('default')
33
- fireEvent.click(copyButton)
34
-
35
- await navigator.clipboard.writeText('copy')
36
-
37
- expect(navigator.clipboard.writeText).toHaveBeenCalledWith("copy");
38
- })
39
-
40
- test('passes text and tooltip props to button', () => {
41
- render(
42
- <CopyButton
43
- data={{ testid: 'text-test' }}
44
- text={"text"}
45
- tooltipPlacement="right"
46
- tooltipText="Text copied!"
47
- value="copy"
48
- />
49
- )
50
-
51
- const content = screen.getByText("text")
52
- expect(content).toHaveTextContent("text")
53
-
54
- const kit = screen.getByTestId('text-test')
55
- const button = kit.querySelector('.pb_button_kit_primary_inline_enabled')
56
- expect(button).toBeInTheDocument()
57
-
58
- fireEvent.click(button)
59
- const tooltipContent = screen.getByText("Text copied!")
60
- expect(tooltipContent).toHaveTextContent("Text copied!")
61
-
62
- const tooltip = kit.querySelector('.pb_tooltip_kit')
63
- expect(tooltip).toBeInTheDocument()
64
- })
@@ -1,2 +0,0 @@
1
- <%= pb_rails("copy_button", props: { id: "default-copy-button", text: "Copy Text", value: "Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease." } ) %>
2
- <%= pb_rails("textarea", props: { margin_top: "xs", placeholder: "Copy and paste here" }) %>
@@ -1,21 +0,0 @@
1
- import React from 'react'
2
- import { CopyButton, Textarea } from 'playbook-ui'
3
-
4
- const CopyButtonDefault = (props) => (
5
- <div>
6
- <CopyButton
7
- {...props}
8
- text="Copy Text"
9
- tooltipPlacement="right"
10
- tooltipText="Text copied!"
11
- value="Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease."
12
- />
13
-
14
- <Textarea
15
- {...props}
16
- placeholder="Copy and paste here"
17
- />
18
- </div>
19
- )
20
-
21
- export default CopyButtonDefault
@@ -1,5 +0,0 @@
1
- <%= pb_rails("body", props: { id: "body", text: "Copy this body text!"}) %>
2
- <%= pb_rails("copy_button", props: { text: "Copy Body text", from: "body", id: "copy-body-button" }) %>
3
- <%= pb_rails("text_input", props: { margin_top: "xs", placeholder: "Copy and paste here" }) %>
4
- <%= pb_rails("copy_button", props: { text: "Copy Text Input", from: "copy-input", id: "copy-input-button" }) %>
5
- <%= pb_rails("text_input", props: { margin_top: "xs", id: "copy-input" , value: "Copy and paste here" }) %>
@@ -1,45 +0,0 @@
1
- import React, { useState } from 'react'
2
- import { CopyButton, Body, TextInput, Textarea } from 'playbook-ui'
3
-
4
- const CopyButtonFrom = (props) => {
5
- const [text, setText] = useState("Copy this text input text")
6
-
7
- const handleChange = (event) => {
8
- setText(event.target.value);
9
- }
10
-
11
- return (<div>
12
- <Body id="body">Copy this body text!</Body>
13
- <CopyButton
14
- {...props}
15
- from="body"
16
- marginBottom="sm"
17
- text="Copy Body text"
18
- tooltipPlacement="right"
19
- tooltipText="Body text copied!"
20
- />
21
-
22
- <TextInput
23
- {...props}
24
- id="textinput"
25
- onChange={handleChange}
26
- value={text}
27
- />
28
- <CopyButton
29
- {...props}
30
- from="textinput"
31
- marginBottom="sm"
32
- text="Copy Text Input"
33
- tooltipPlacement="right"
34
- tooltipText="Text input copied!"
35
- />
36
-
37
- <Textarea
38
- {...props}
39
- placeholder="Copy and paste here"
40
- />
41
- </div>
42
- )
43
- }
44
-
45
- export default CopyButtonFrom
@@ -1 +0,0 @@
1
- Provide an element's ID as the `from` parameter, and its text will be copied. If the element is an input, its `value` will be copied; otherwise, the `innerText` will be used. Additionally, if a `value` prop is provided, it will override the content from the `from` element and be copied instead.
@@ -1,8 +0,0 @@
1
- examples:
2
- rails:
3
- - copy_button_default: Default
4
- - copy_button_from: Copy From
5
-
6
- react:
7
- - copy_button_default: Default
8
- - copy_button_from: Copy From
@@ -1,2 +0,0 @@
1
- export { default as CopyButtonDefault } from './_copy_button_default.jsx'
2
- export { default as CopyButtonFrom } from './_copy_button_from.jsx'
@@ -1,47 +0,0 @@
1
- import PbEnhancedElement from "../pb_enhanced_element"
2
-
3
- export default class PbCopyButton extends PbEnhancedElement {
4
- static get selector() {
5
- return '.pb_copy_button_kit'
6
- }
7
-
8
- connect() {
9
- this.handleClick = this.handleClick.bind(this)
10
- this.button = this.element.querySelector('button')
11
- if (this.button) {
12
- this.button.addEventListener('click', this.handleClick)
13
- }
14
- }
15
-
16
- disconnect() {
17
- if (this.button) {
18
- this.button.removeEventListener('click', this.handleClick)
19
- }
20
- }
21
-
22
- handleClick() {
23
- const fromId = this.element.getAttribute('data-from')
24
- if (fromId) {
25
- const fromElement = document.querySelector(`#${fromId}`)
26
- if (fromElement) {
27
- let contentToCopy = ''
28
- if (fromElement.tagName.toLowerCase() === 'input') {
29
- contentToCopy = fromElement.value
30
- } else {
31
- contentToCopy = fromElement.innerText
32
- }
33
- navigator.clipboard.writeText(contentToCopy)
34
- .catch(err => console.error('Failed to copy text', err))
35
- return
36
- }
37
- }
38
-
39
- const textToCopy = this.element.getAttribute('data-copy-value')
40
- if (textToCopy) {
41
- navigator.clipboard.writeText(textToCopy)
42
- .catch(err => console.error('Failed to copy text', err))
43
- } else {
44
- console.warn('No data-copy-value attribute found or data-from element')
45
- }
46
- }
47
- }