playbook_ui 14.18.0.pre.alpha.PLAY20397473 → 14.18.0.pre.alpha.PLAY20787400

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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +6 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows_react.jsx → _advanced_table_selectable_rows_no_subrows.jsx} +2 -2
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +1 -5
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +2 -3
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +3 -3
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/index.js +11 -228
  9. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +1 -9
  10. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +3 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +2 -1
  12. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.jsx +1 -4
  13. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -2
  14. data/app/pb_kits/playbook/pb_draggable/draggable.rb +1 -9
  15. data/app/pb_kits/playbook/pb_draggable/index.js +142 -139
  16. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +1 -4
  17. data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -1
  18. data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +18 -22
  19. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -1
  20. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -1
  21. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +0 -13
  22. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +1 -3
  23. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +1 -8
  24. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +0 -2
  25. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  26. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
  27. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +0 -19
  28. data/app/pb_kits/playbook/pb_popover/docs/example.yml +0 -1
  29. data/app/pb_kits/playbook/pb_popover/index.ts +1 -13
  30. data/app/pb_kits/playbook/pb_popover/popover.rb +0 -2
  31. data/app/pb_kits/playbook/pb_select/docs/_select_error.jsx +2 -7
  32. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx +1 -9
  33. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx +1 -7
  34. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.jsx +2 -6
  35. data/dist/chunks/{_typeahead-D8CsVBZO.js → _typeahead-BX8IifKY.js} +2 -2
  36. data/dist/chunks/{_weekday_stacked-CHQsoCdP.js → _weekday_stacked-DfMD7HJz.js} +1 -1
  37. data/dist/chunks/{lib-BmTAc7Nc.js → lib-96_ZmvAo.js} +1 -1
  38. data/dist/chunks/{pb_form_validation-BWjy4bFn.js → pb_form_validation-Vv2TqXVC.js} +1 -1
  39. data/dist/chunks/vendor.js +1 -1
  40. data/dist/playbook-doc.js +2 -2
  41. data/dist/playbook-rails-react-bindings.js +1 -1
  42. data/dist/playbook-rails.js +1 -1
  43. data/dist/playbook.css +1 -1
  44. data/lib/playbook/version.rb +1 -1
  45. metadata +12 -26
  46. data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +0 -106
  47. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +0 -43
  48. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb +0 -55
  49. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md +0 -1
  50. data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.html.erb +0 -41
  51. data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.md +0 -1
  52. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +0 -52
  53. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +0 -1
  54. data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +0 -110
  55. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.html.erb +0 -10
  56. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.jsx +0 -20
  57. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.md +0 -1
  58. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb +0 -46
  59. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.md +0 -1
  60. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_rails.html.erb → _advanced_table_selectable_rows.html.erb} +0 -0
  61. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows_rails.html.erb → _advanced_table_selectable_rows_no_subrows.html.erb} +0 -0
  62. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.md → _advanced_table_selectable_rows_react.md} +0 -0
  63. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_react.md → _draggable_drop_zones.md} +0 -0
  64. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_colors_react.md → _draggable_drop_zones_colors.md} +0 -0
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.18.0"
5
- VERSION = "14.18.0.pre.alpha.PLAY20397473"
5
+ VERSION = "14.18.0.pre.alpha.PLAY20787400"
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.18.0.pre.alpha.PLAY20397473
4
+ version: 14.18.0.pre.alpha.PLAY20787400
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-05-01 00:00:00.000000000 Z
12
+ date: 2025-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -330,18 +330,18 @@ files:
330
330
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb
331
331
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx
332
332
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.md
333
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.html.erb
333
334
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx
334
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md
335
335
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx
336
336
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md
337
337
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx
338
338
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md
339
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.html.erb
339
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb
340
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx
340
341
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md
341
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_react.jsx
342
342
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_react.md
343
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.html.erb
344
343
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md
344
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_react.md
345
345
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
346
346
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.md
347
347
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx
@@ -374,7 +374,6 @@ files:
374
374
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json
375
375
  - app/pb_kits/playbook/pb_advanced_table/docs/example.yml
376
376
  - app/pb_kits/playbook/pb_advanced_table/docs/index.js
377
- - app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js
378
377
  - app/pb_kits/playbook/pb_advanced_table/index.js
379
378
  - app/pb_kits/playbook/pb_advanced_table/scss_partials/_chrome_styles.scss
380
379
  - app/pb_kits/playbook/pb_advanced_table/scss_partials/_loading.scss
@@ -1219,15 +1218,12 @@ files:
1219
1218
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx
1220
1219
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.md
1221
1220
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default_react.md
1222
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb
1223
1221
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx
1224
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb
1222
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md
1225
1223
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx
1226
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md
1227
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_react.md
1224
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md
1228
1225
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx
1229
1226
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md
1230
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_react.md
1231
1227
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.html.erb
1232
1228
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.md
1233
1229
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.html.erb
@@ -1427,8 +1423,6 @@ files:
1427
1423
  - app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_react.md
1428
1424
  - app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb
1429
1425
  - app/pb_kits/playbook/pb_filter/docs/_filter_single.jsx
1430
- - app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.html.erb
1431
- - app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.md
1432
1426
  - app/pb_kits/playbook/pb_filter/docs/_sort_only.html.erb
1433
1427
  - app/pb_kits/playbook/pb_filter/docs/_sort_only.jsx
1434
1428
  - app/pb_kits/playbook/pb_filter/docs/example.yml
@@ -1940,13 +1934,10 @@ files:
1940
1934
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb
1941
1935
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx
1942
1936
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md
1943
- - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx
1944
- - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md
1945
1937
  - app/pb_kits/playbook/pb_line_graph/docs/example.yml
1946
1938
  - app/pb_kits/playbook/pb_line_graph/docs/index.js
1947
1939
  - app/pb_kits/playbook/pb_line_graph/lineGraph.test.js
1948
1940
  - app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
1949
- - app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts
1950
1941
  - app/pb_kits/playbook/pb_line_graph/line_graph.html.erb
1951
1942
  - app/pb_kits/playbook/pb_line_graph/line_graph.rb
1952
1943
  - app/pb_kits/playbook/pb_link/_link.scss
@@ -2352,9 +2343,6 @@ files:
2352
2343
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.md
2353
2344
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_clear_field.jsx
2354
2345
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_clear_field.md
2355
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.html.erb
2356
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.jsx
2357
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.md
2358
2346
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.html.erb
2359
2347
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.jsx
2360
2348
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.md
@@ -2403,8 +2391,6 @@ files:
2403
2391
  - app/pb_kits/playbook/pb_popover/docs/_description.md
2404
2392
  - app/pb_kits/playbook/pb_popover/docs/_popover_actionable_content.html.erb
2405
2393
  - app/pb_kits/playbook/pb_popover/docs/_popover_actionable_content.jsx
2406
- - app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb
2407
- - app/pb_kits/playbook/pb_popover/docs/_popover_append_to.md
2408
2394
  - app/pb_kits/playbook/pb_popover/docs/_popover_close.html.erb
2409
2395
  - app/pb_kits/playbook/pb_popover/docs/_popover_close.jsx
2410
2396
  - app/pb_kits/playbook/pb_popover/docs/_popover_default.html.erb
@@ -3535,11 +3521,11 @@ files:
3535
3521
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3536
3522
  - app/pb_kits/playbook/utilities/text.ts
3537
3523
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3538
- - dist/chunks/_typeahead-D8CsVBZO.js
3539
- - dist/chunks/_weekday_stacked-CHQsoCdP.js
3524
+ - dist/chunks/_typeahead-BX8IifKY.js
3525
+ - dist/chunks/_weekday_stacked-DfMD7HJz.js
3540
3526
  - dist/chunks/lazysizes-B7xYodB-.js
3541
- - dist/chunks/lib-BmTAc7Nc.js
3542
- - dist/chunks/pb_form_validation-BWjy4bFn.js
3527
+ - dist/chunks/lib-96_ZmvAo.js
3528
+ - dist/chunks/pb_form_validation-Vv2TqXVC.js
3543
3529
  - dist/chunks/vendor.js
3544
3530
  - dist/menu.yml
3545
3531
  - dist/playbook-doc.js
@@ -1,106 +0,0 @@
1
- import PbEnhancedElement from "../pb_enhanced_element";
2
-
3
- const FLAT_ADVANCED_TABLE_SELECTOR = "[data-flat-advanced-table-select]";
4
-
5
- export default class PbFlatAdvancedTable extends PbEnhancedElement {
6
- static get selector() {
7
- return FLAT_ADVANCED_TABLE_SELECTOR;
8
- }
9
-
10
- get target() {
11
- const table = this.element.closest("table");
12
- return table.querySelectorAll(
13
- `"label[data-flat-advanced-table-select='true']"`
14
- );
15
- }
16
-
17
- static selectedRows = new Set();
18
-
19
- connect() {
20
- const table = this.element.closest("table");
21
- if (!table) return;
22
- const mainTable = this.element.closest(".pb_advanced_table");
23
- // Prevent double-init
24
- if (table.dataset.flatAdvancedTableInitialized) return;
25
- table.dataset.flatAdvancedTableInitialized = "true";
26
-
27
- const checkboxLabels = table.querySelectorAll(
28
- "label[data-flat-advanced-table-select='true']"
29
- );
30
- checkboxLabels.forEach((label) => {
31
- const checkbox = label.querySelector("input[type='checkbox']");
32
- if (!checkbox) return;
33
- checkbox.addEventListener("change", () => {
34
- const rowId = checkbox.id;
35
- const isChecked = checkbox.checked;
36
-
37
- if (isChecked) {
38
- PbFlatAdvancedTable.selectedRows.add(rowId);
39
- } else {
40
- PbFlatAdvancedTable.selectedRows.delete(rowId);
41
- }
42
-
43
- // Update row background color based on checkbox state
44
- const rowEl = checkbox.closest("tr");
45
- if (rowEl) {
46
- if (isChecked) {
47
- rowEl.classList.add("bg-row-selection");
48
- rowEl.classList.remove("bg-white");
49
- } else {
50
- rowEl.classList.remove("bg-row-selection");
51
- rowEl.classList.add("bg-white");
52
- }
53
- }
54
- const allCheckboxes = table.querySelectorAll(
55
- "label[data-flat-advanced-table-select='true'] input[type='checkbox']"
56
- );
57
-
58
- const selectAllInput = table.querySelector(
59
- "#select-all-rows input[type='checkbox']"
60
- );
61
-
62
- if (selectAllInput) {
63
- const allChecked = Array.from(allCheckboxes).every(cb => cb.checked);
64
- selectAllInput.checked = allChecked;
65
- }
66
-
67
- mainTable.dataset.selectedRows = JSON.stringify(
68
- Array.from(PbFlatAdvancedTable.selectedRows)
69
- );
70
- });
71
-
72
- });
73
-
74
- // Handle select-all checkbox
75
- const selectAllWrapper = table.querySelector("#select-all-rows");
76
- if (selectAllWrapper) {
77
- const selectAllInput = selectAllWrapper.querySelector(
78
- 'input[type="checkbox"]'
79
- );
80
- selectAllInput.addEventListener("change", () => {
81
- const checkAll = selectAllInput.checked;
82
-
83
- checkboxLabels.forEach((label) => {
84
- const cb = label.querySelector("input[type='checkbox']");
85
- cb.checked = checkAll;
86
- const rowId = cb.id;
87
- const rowEl = cb.closest("tr");
88
-
89
- if (checkAll) {
90
- PbFlatAdvancedTable.selectedRows.add(rowId);
91
- rowEl?.classList.add("bg-row-selection");
92
- rowEl?.classList.remove("bg-white");
93
- } else {
94
- PbFlatAdvancedTable.selectedRows.delete(rowId);
95
- rowEl?.classList.remove("bg-row-selection");
96
- rowEl?.classList.add("bg-white");
97
- }
98
- });
99
-
100
- mainTable.dataset.selectedRows = JSON.stringify(
101
- Array.from(PbFlatAdvancedTable.selectedRows)
102
- );
103
- });
104
- }
105
- }
106
- }
@@ -1,43 +0,0 @@
1
- <% data_shadow = [
2
- { id: "51", text: "Task 1" },
3
- { id: "52", text: "Task 2" },
4
- { id: "53", text: "Task 3" }
5
- ] %>
6
-
7
- <% data_outline = [
8
- { id: "61", text: "Task 1" },
9
- { id: "62", text: "Task 2" },
10
- { id: "63", text: "Task 3" }
11
- ] %>
12
-
13
- <%= pb_rails("flex", props: { justify: "around" }) do %>
14
- <%= pb_rails("flex/flex_item", props: { margin_right: "xl" }) do %>
15
- <%= pb_rails("draggable", props: { drop_zone_type: "shadow", initial_items: data_shadow }) do %>
16
- <%= pb_rails("caption", props: { margin_bottom: "xs", text: "Shadow", text_align: "center" }) %>
17
- <%= pb_rails("draggable/draggable_container", props: { html_options: { style: { width: "200px" } } }) do %>
18
- <% data_shadow.each do |item| %>
19
- <%= pb_rails("card", props: { drag_id: item[:id], draggable_item: true, margin_bottom: "xs", padding: "xs", padding_right: "xl" }) do %>
20
- <%= pb_rails("flex", props: { align_items: "stretch", flex_direction: "column" }) do %>
21
- <%= pb_rails("body", props: { text: item[:text] }) %>
22
- <% end %>
23
- <% end %>
24
- <% end %>
25
- <% end %>
26
- <% end %>
27
- <% end %>
28
-
29
- <%= pb_rails("flex/flex_item", props: { margin_right: "xl" }) do %>
30
- <%= pb_rails("draggable", props: { drop_zone_type: "outline", initial_items: data_outline }) do %>
31
- <%= pb_rails("caption", props: { margin_bottom: "xs", text: "Outline", text_align: "center" }) %>
32
- <%= pb_rails("draggable/draggable_container", props: { html_options: { style: { width: "200px" } } }) do %>
33
- <% data_outline.each do |item| %>
34
- <%= pb_rails("card", props: { drag_id: item[:id], draggable_item: true, margin_bottom: "xs", padding: "xs", padding_right: "xl" }) do %>
35
- <%= pb_rails("flex", props: { align_items: "stretch", flex_direction: "column" }) do %>
36
- <%= pb_rails("body", props: { text: item[:text] }) %>
37
- <% end %>
38
- <% end %>
39
- <% end %>
40
- <% end %>
41
- <% end %>
42
- <% end %>
43
- <% end %>
@@ -1,55 +0,0 @@
1
- <% initial_items = [
2
- {
3
- id: "141",
4
- url: "https://unsplash.it/500/400/?image=633",
5
- },
6
- {
7
- id: "142",
8
- url: "https://unsplash.it/500/400/?image=634",
9
- },
10
- {
11
- id: "143",
12
- url: "https://unsplash.it/500/400/?image=637",
13
- },
14
- ] %>
15
-
16
- <% next_init_items = [
17
- {
18
- id: "151",
19
- url: "https://unsplash.it/500/400/?image=633",
20
- },
21
- {
22
- id: "152",
23
- url: "https://unsplash.it/500/400/?image=634",
24
- },
25
- {
26
- id: "153",
27
- url: "https://unsplash.it/500/400/?image=637",
28
- },
29
- ] %>
30
-
31
- <%= pb_rails("draggable", props: {initial_items: initial_items, drop_zone_type: "shadow", drop_zone_color: "primary"}) do %>
32
- <%= pb_rails("draggable/draggable_container") do %>
33
- <%= pb_rails("flex", props: { gap: "sm" }) do %>
34
- <% initial_items.each do |item| %>
35
- <%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id]}) do %>
36
- <%= pb_rails("image", props: { alt: item[:id], size: "md", url: item[:url] }) %>
37
- <% end %>
38
- <% end %>
39
- <% end %>
40
- <% end %>
41
- <% end %>
42
-
43
- <br/>
44
-
45
- <%= pb_rails("draggable", props: {initial_items: next_init_items, drop_zone_type: "outline", drop_zone_color: "purple"}) do %>
46
- <%= pb_rails("draggable/draggable_container") do %>
47
- <%= pb_rails("flex", props: { gap: "sm" }) do %>
48
- <% initial_items.each do |item| %>
49
- <%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id]}) do %>
50
- <%= pb_rails("image", props: { alt: item[:id], size: "md", url: item[:url] }) %>
51
- <% end %>
52
- <% end %>
53
- <% end %>
54
- <% end %>
55
- <% end %>
@@ -1 +0,0 @@
1
- The default `color` for Draggable kit drop zones is "neutral", with "primary" or "purple" as additional options.
@@ -1,41 +0,0 @@
1
- <%=
2
- pb_rails("filter", props: {
3
- id: "filter_within_trubo_frames",
4
- position: "top",
5
- filters: [
6
- { name: "name", value: "John Wick" },
7
- { name: "city", value: "San Francisco"}
8
- ],
9
- sort_menu: [
10
- { item: "Popularity", link: "?q[sorts]=managers_popularity+asc", active: true, direction: "desc" },
11
- { item: "Mananger's Title", link: "?q[sorts]=managers_title+asc", active: false },
12
- { item: "Manager's Name", link: "?q[sorts]=managers_name+asc", active: false },
13
- ],
14
- template: "default",
15
- results: 1,
16
- popover_props: { append_to: "parent" },
17
- }) do
18
- %>
19
- <%
20
- example_collection = [
21
- OpenStruct.new(name: "USA", value: 1),
22
- OpenStruct.new(name: "Canada", value: 2),
23
- OpenStruct.new(name: "Brazil", value: 3),
24
- OpenStruct.new(name: "Philippines", value: 4),
25
- OpenStruct.new(name: "A galaxy far far away, like really far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far away...", value: 5)
26
- ]
27
- %>
28
- <%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
29
- <%= form.text_field :example_text_field, props: { label: true } %>
30
- <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: {max_width: "sm", label: true } %>
31
-
32
- <%= form.actions do |action| %>
33
- <%= action.submit props: {
34
- text: "Apply",
35
- data: {
36
- disable_with: "pb_rails('icon', props: { icon: 'spinner', spin: true, fixed_width: true })Searching...".html_safe
37
- },}%>
38
- <%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
39
- <% end %>
40
- <% end %>
41
- <% end %>
@@ -1 +0,0 @@
1
- By default, the filter popover attaches to the `<body>`. To attach it elsewhere, like inside a Turbo Frame, pass the `append_to` prop through `popover_props`. Set it to `"parent"` to place the tooltip inside its parent element, or pass any CSS selector (`#id` or `.class`) to specify a custom container.
@@ -1,52 +0,0 @@
1
- import React from 'react'
2
- import lineGraphTheme from '../lineGraphTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
-
6
- const data = [{
7
- name: 'Installation',
8
- data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
9
- }, {
10
- name: 'Manufacturing',
11
- data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
12
- }, {
13
- name: 'Sales & Distribution',
14
- data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387],
15
- }, {
16
- name: 'Project Development',
17
- data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227],
18
- }, {
19
- name: 'Other',
20
- data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111],
21
- }]
22
-
23
- const categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
24
-
25
- const baseOptions = {
26
- series: data,
27
- title: { text: "Solar Employment Growth by Sector, 2010-2016" },
28
- subtitle: { text: "Source: thesolarfoundation.com" },
29
- xAxis: {
30
- categories: categories,
31
- },
32
- yAxis: {
33
- title: {
34
- text: "Number of Employees",
35
- },
36
- },
37
- }
38
-
39
- const LineGraphPbStyles = () => {
40
- const options = Highcharts.merge({}, lineGraphTheme, baseOptions)
41
-
42
- return(
43
- <div>
44
- <HighchartsReact
45
- highcharts={Highcharts}
46
- options={options}
47
- />
48
- </div>
49
- )
50
- }
51
-
52
- export default LineGraphPbStyles
@@ -1 +0,0 @@
1
- You don't need to use the Line Graph Kit to apply Playbook styles to your Highcharts line graph. Just import lineGraphTheme.ts and merge it with your graph options—Playbook’s styling will apply automatically.
@@ -1,110 +0,0 @@
1
- import colors from '../tokens/exports/_colors.module.scss'
2
- import typography from '../tokens/exports/_typography.module.scss'
3
-
4
- const lineGraphTheme = {
5
- title: {
6
- text: "",
7
- style: {
8
- color: colors.text_lt_default,
9
- fontFamily: typography.font_family_base,
10
- fontWeight: typography.bold,
11
- fontSize: typography.heading_3,
12
- },
13
- },
14
- subtitle: {
15
- text: "" ,
16
- style: {
17
- fontFamily: typography.font_family_base,
18
- color: colors.text_lt_light,
19
- fontWeight: typography.regular,
20
- fontSize: typography.text_base,
21
- },
22
- },
23
- chart: {
24
- type: "line",
25
- },
26
- tooltip: {
27
- backgroundColor: {
28
- linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
29
- stops: [
30
- [0, colors.bg_dark],
31
- [1, colors.bg_dark],
32
- ],
33
- },
34
- followPointer: true,
35
- shadow: false,
36
- borderWidth: 0,
37
- borderRadius: 10,
38
- style: {
39
- fontFamily: typography.font_family_base,
40
- color: colors.text_dk_default,
41
- fontWeight: typography.regular,
42
- fontSize: typography.text_smaller,
43
- },
44
- },
45
- plotOptions: {
46
- line: {
47
- dataLabels: {
48
- enabled: false,
49
- },
50
- },
51
- },
52
- credits: { enabled: false },
53
- legend: { enabled: false },
54
- colors: [
55
- colors.data_1,
56
- colors.data_2,
57
- colors.data_3,
58
- colors.data_4,
59
- colors.data_5,
60
- colors.data_6,
61
- colors.data_7,
62
- ],
63
- xAxis: {
64
- gridLineWidth: 0,
65
- lineColor: colors.border_light,
66
- tickColor: colors.border_light,
67
- labels: {
68
- style: {
69
- fontFamily: typography.font_family_base,
70
- color: colors.text_lt_lighter,
71
- fontWeight: typography.bold,
72
- fontSize: typography.text_smaller,
73
- },
74
- },
75
- title: {
76
- style: {
77
- color: colors.text_lt_default,
78
- fontFamily: typography.font_family_base,
79
- fontWeight: typography.regular,
80
- fontSize: typography.heading_4,
81
- },
82
- },
83
- },
84
- yAxis: {
85
- alternateGridColor: undefined as string | undefined,
86
- minorTickInterval: null as number | null,
87
- gridLineColor: colors.border_light,
88
- minorGridLineColor: colors.border_light,
89
- lineWidth: 0,
90
- tickWidth: 0,
91
- labels: {
92
- style: {
93
- fontFamily: typography.font_family_base,
94
- color: colors.text_lt_lighter,
95
- fontWeight: typography.bold,
96
- fontSize: typography.text_smaller,
97
- },
98
- },
99
- title: {
100
- style: {
101
- fontFamily: typography.font_family_base,
102
- color: colors.text_lt_lighter,
103
- fontWeight: typography.bold,
104
- fontSize: typography.text_smaller,
105
- },
106
- },
107
- },
108
- }
109
-
110
- export default lineGraphTheme;
@@ -1,10 +0,0 @@
1
- <%= pb_rails("phone_number_input", props: {
2
- country_search: true,
3
- id: "country-search",
4
- }) %>
5
-
6
- <%= pb_rails("phone_number_input", props: {
7
- country_search: true,
8
- id: "country-search-limited",
9
- only_countries: ["br", "us", "ph", "gb"],
10
- }) %>
@@ -1,20 +0,0 @@
1
- import React from 'react'
2
- import PhoneNumberInput from '../_phone_number_input'
3
-
4
- const PhoneNumberInputCountrySearch = (props) => (
5
- <>
6
- <PhoneNumberInput
7
- countrySearch
8
- id='country-search'
9
- {...props}
10
- />
11
- <PhoneNumberInput
12
- countrySearch
13
- id='country-search-limited'
14
- onlyCountries={["br", "us", "ph", "gb"]}
15
- {...props}
16
- />
17
- </>
18
- )
19
-
20
- export default PhoneNumberInputCountrySearch
@@ -1 +0,0 @@
1
- Set `country_search` / `countrySearch` to true to allow users to search for a specific Country within the dropdown. If the range of countries has been limited, only the selected countries will be searchable.
@@ -1,46 +0,0 @@
1
- <%= pb_rails("flex", props: {
2
- dark: true,
3
- orientation: "row",
4
- vertical: "center",
5
- margin_bottom: "md"
6
- }) do %>
7
- <%= pb_rails("body", props: { text: "Click info for more details" }) %>
8
- &nbsp;
9
- <%= pb_rails("circle_icon_button", props: {
10
- variant: "secondary",
11
- icon: "info",
12
- id: "append-to-popover-1"
13
- }) %>
14
- <%= pb_rails("popover", props: {
15
- trigger_element_id: "append-to-popover-1",
16
- tooltip_id: "append-to-tooltip-1",
17
- offset: true,
18
- position: "top",
19
- append_to: "parent",
20
- }) do %>
21
- I'm a popover. I have been appended to my parent element.
22
- <% end %>
23
- <% end %>
24
-
25
- <%= pb_rails("flex", props: {
26
- dark: true,
27
- orientation: "row",
28
- vertical: "center"
29
- }) do %>
30
- <%= pb_rails("body", props: { text: "Click info for more details" }) %>
31
- &nbsp;
32
- <%= pb_rails("circle_icon_button", props: {
33
- variant: "secondary",
34
- icon: "info",
35
- id: "append-to-popover-2"
36
- }) %>
37
- <%= pb_rails("popover", props: {
38
- trigger_element_id: "append-to-popover-2",
39
- tooltip_id: "append-to-tooltip-2",
40
- offset: true,
41
- position: "top",
42
- append_to: ".kit-show-wrapper",
43
- }) do %>
44
- I'm a popover. I have been appended to the .kit-show-wrapper.
45
- <% end %>
46
- <% end %>
@@ -1 +0,0 @@
1
- By default, the popover tooltip attaches to the `<body>`. To attach it elsewhere, use the `append_to` prop. Set it to `"parent"` to place the tooltip inside its parent element, or pass any CSS selector (`#id` or `.class`) to specify a custom container.