playbook_ui 14.3.0.pre.rc.4 → 14.3.0.pre.rc.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +3 -3
  3. data/app/pb_kits/playbook/pb_badge/_badge.scss +2 -2
  4. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +1 -1
  5. data/app/pb_kits/playbook/pb_button/_button.scss +1 -1
  6. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +2 -2
  7. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +1 -1
  8. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleIcon.tsx +30 -24
  9. data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +11 -7
  10. data/app/pb_kits/playbook/pb_collapsible/collapsible_main.rb +2 -0
  11. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_no_icon.html.erb +10 -0
  12. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_no_icon.jsx +21 -0
  13. data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +2 -0
  14. data/app/pb_kits/playbook/pb_collapsible/docs/index.js +2 -1
  15. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +1 -1
  16. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss +2 -2
  17. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +4 -4
  18. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +4 -4
  19. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -1
  20. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +2 -2
  21. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +1 -1
  22. data/app/pb_kits/playbook/pb_label_value/_label_value.scss +1 -1
  23. data/app/pb_kits/playbook/pb_message/_message_mixins.scss +1 -1
  24. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +1 -1
  25. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_no_icon.html.erb +24 -0
  26. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_no_icon.jsx +88 -0
  27. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_no_icon_rails.md +1 -0
  28. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_no_icon_react.md +1 -0
  29. data/app/pb_kits/playbook/pb_nav/docs/example.yml +2 -0
  30. data/app/pb_kits/playbook/pb_nav/docs/index.js +4 -3
  31. data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +3 -3
  32. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +2 -2
  33. data/app/pb_kits/playbook/pb_phone_number_input/intlTelInput.scss +1290 -0
  34. data/app/pb_kits/playbook/pb_pill/_pill.scss +2 -2
  35. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +2 -2
  36. data/app/pb_kits/playbook/pb_radio/_radio.tsx +100 -50
  37. data/app/pb_kits/playbook/pb_radio/docs/_radio_children.jsx +56 -0
  38. data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -0
  39. data/app/pb_kits/playbook/pb_radio/docs/index.js +1 -0
  40. data/app/pb_kits/playbook/pb_rich_text_editor/_previewer_mixin.scss +49 -13
  41. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +2 -14
  42. data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +23 -23
  43. data/app/pb_kits/playbook/pb_rich_text_editor/_trix_styles.scss +19 -27
  44. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +21 -11
  45. data/app/pb_kits/playbook/pb_select/_select.scss +1 -1
  46. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +3 -3
  47. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -1
  48. data/app/pb_kits/playbook/pb_textarea/_textarea.scss +1 -1
  49. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +4 -4
  50. data/app/pb_kits/playbook/pb_timeline/_timeline.scss +2 -2
  51. data/app/pb_kits/playbook/pb_toggle/_toggle.scss +3 -3
  52. data/dist/chunks/{_typeahead-KAYMhDNO.js → _typeahead-LJmEV1CI.js} +3 -3
  53. data/dist/chunks/{_weekday_stacked-CTvE8Bet.js → _weekday_stacked-mN_WkUcx.js} +1 -1
  54. data/dist/chunks/vendor.js +1 -1
  55. data/dist/playbook-doc.js +1 -1
  56. data/dist/playbook-rails-react-bindings.js +1 -1
  57. data/dist/playbook-rails.js +1 -1
  58. data/dist/playbook.css +1 -1
  59. data/lib/playbook/version.rb +1 -1
  60. metadata +11 -3
@@ -1,7 +1,7 @@
1
1
 
2
2
  <%= pb_rails("rich_text_editor", props: { id: "content-preview-editor" }) %>
3
3
  <div id="card-obfuscation" style="display:none">
4
- <%= pb_rails("card", props: { margin_top: "md" }) do %>
4
+ <%= pb_rails("card", props: { margin_top: "md", max_width: "md", padding: "sm" }) do %>
5
5
  <div id="content-preview" class="trix-content">
6
6
  </div>
7
7
  <% end %>
@@ -11,15 +11,25 @@
11
11
  <% end %>
12
12
 
13
13
  <script>
14
- // Button event handler
15
- const button = document.getElementById('preview-button');
16
- button.addEventListener('click', function() {
17
- const content = document.getElementById('content-preview-editor');
18
- const previewArea = document.getElementById('content-preview');
19
- const cardDiv = document.getElementById('card-obfuscation');
14
+ document.addEventListener('DOMContentLoaded', () => {
15
+ function handleButtonClick() {
16
+ const editorContainer = [...document.querySelectorAll('[data-react-props]')]
17
+ .find(element => element.getAttribute('data-react-props')?.includes('"id":"content-preview-editor"'))
20
18
 
21
- previewArea.innerHTML = content.value;
22
- cardDiv.classList.add('mt_md');
23
- cardDiv.style.display = 'block';
24
- });
19
+ const editorElement = editorContainer?.querySelector('trix-editor')
20
+ const inputId = editorElement?.getAttribute('input')
21
+ const inputElement = inputId && document.getElementById(inputId)
22
+
23
+ const editorContent = inputElement?.value || ''
24
+ const previewArea = document.getElementById('content-preview')
25
+ const cardDiv = document.getElementById('card-obfuscation')
26
+
27
+ if (previewArea && cardDiv) {
28
+ previewArea.innerHTML = editorContent
29
+ cardDiv.style.display = 'block'
30
+ }
31
+ }
32
+
33
+ document.getElementById('preview-button')?.addEventListener('click', handleButtonClick)
34
+ })
25
35
  </script>
@@ -81,7 +81,7 @@
81
81
  display: block;
82
82
  &.error {
83
83
  [class*=pb_body_kit] {
84
- margin-top: calc($space_xs / 2);
84
+ margin-top: $space_xs / 2;
85
85
  }
86
86
  > select:first-child {
87
87
  border-color: $error;
@@ -43,7 +43,7 @@ $pb_selectable_card_border: 2px;
43
43
  align-items: center;
44
44
  height: $pb_selectable_card_indicator_size;
45
45
  width: $pb_selectable_card_indicator_size;
46
- border-radius: calc($pb_selectable_card_indicator_size/2) + calc($pb_selectable_card_border/2);
46
+ border-radius: $pb_selectable_card_indicator_size/2 + $pb_selectable_card_border/2;
47
47
  border-width: $pb_selectable_card_border;
48
48
  border-style: solid;
49
49
  border-color: $white;
@@ -52,8 +52,8 @@ $pb_selectable_card_border: 2px;
52
52
  font-size: $font_smaller;
53
53
  text-align: center;
54
54
  position: absolute;
55
- top: -(calc($pb_selectable_card_indicator_size/2));
56
- right: -(calc($pb_selectable_card_indicator_size/2));
55
+ top: -($pb_selectable_card_indicator_size/2);
56
+ right: -($pb_selectable_card_indicator_size/2);
57
57
  opacity: 0;
58
58
  }
59
59
  }
@@ -101,7 +101,7 @@
101
101
  &.error {
102
102
  .text_input_wrapper {
103
103
  [class*="pb_body_kit"] {
104
- margin-top: calc($space_xs / 2);
104
+ margin-top: $space_xs / 2;
105
105
  }
106
106
  input,
107
107
  .text_input {
@@ -60,7 +60,7 @@
60
60
 
61
61
  &.error {
62
62
  [class*=pb_body_kit] {
63
- margin-top: calc($space_xs / 2);
63
+ margin-top: $space_xs / 2;
64
64
  }
65
65
  textarea {
66
66
  border-color: $error;
@@ -22,14 +22,14 @@
22
22
  display: flex;
23
23
  align-items: center;
24
24
  [class*=pb_time_range_inline_arrow] {
25
- margin-left: calc($space_xs/2);
26
- margin-right: calc($space_xs/2);
25
+ margin-left: $space_xs/2;
26
+ margin-right: $space_xs/2;
27
27
  }
28
28
  [class*=pb_time_range_inline_timezone] {
29
- margin-left: calc($space_xs/2);
29
+ margin-left: $space_xs/2;
30
30
  }
31
31
  [class*=pb_time_range_inline_icon] {
32
- margin-right: calc($space_xs/2);
32
+ margin-right: $space_xs/2;
33
33
  }
34
34
  }
35
35
  }
@@ -4,9 +4,9 @@
4
4
  @import "../tokens/typography";
5
5
 
6
6
  $connector_width: 2px;
7
- $icon_margin: calc($space_xs/2);
7
+ $icon_margin: $space_xs/2;
8
8
  $icon_height: 28px;
9
- $height_from_top: calc($icon_height/2) - calc($connector_width/2);
9
+ $height_from_top: $icon_height/2 - $connector_width/2;
10
10
 
11
11
  @mixin pb_timeline_line_solid($width, $height, $margin) {
12
12
  width: $width;
@@ -8,7 +8,7 @@ $transition: .2s ease-in-out;
8
8
  [class^=pb_toggle_kit] {
9
9
  position: relative;
10
10
  $width: 44px;
11
- $height: calc($width / 2);
11
+ $height: $width / 2;
12
12
  $border_success: 3px solid $color_checkbox_success;
13
13
  $border_default: 3px solid $color_checkbox_default;
14
14
 
@@ -27,7 +27,7 @@ $transition: .2s ease-in-out;
27
27
  &:after {
28
28
  transition: $transition;
29
29
  content: "";
30
- width: calc($width / 2) - 4px;
30
+ width: $width / 2 - 4px;
31
31
  height: $height - 4px;
32
32
  background-color: $color_checkbox_default;
33
33
  border-radius: 50%;
@@ -68,7 +68,7 @@ $transition: .2s ease-in-out;
68
68
  background-color: $color_checkbox_success;
69
69
 
70
70
  &:after {
71
- left: calc($width / 2) + 2px;
71
+ left: $width / 2 + 2px;
72
72
  background-color: $white;
73
73
  }
74
74
  }