playbook_ui 14.3.0.pre.rc.4 → 14.3.0.pre.rc.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +3 -3
- data/app/pb_kits/playbook/pb_badge/_badge.scss +2 -2
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +1 -1
- data/app/pb_kits/playbook/pb_button/_button.scss +1 -1
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +2 -2
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +1 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +1 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss +2 -2
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +4 -4
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +4 -4
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +2 -2
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +1 -1
- data/app/pb_kits/playbook/pb_label_value/_label_value.scss +1 -1
- data/app/pb_kits/playbook/pb_message/_message_mixins.scss +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +1 -1
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +3 -3
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +2 -2
- data/app/pb_kits/playbook/pb_phone_number_input/intlTelInput.scss +1290 -0
- data/app/pb_kits/playbook/pb_pill/_pill.scss +2 -2
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +2 -2
- data/app/pb_kits/playbook/pb_radio/_radio.tsx +100 -50
- data/app/pb_kits/playbook/pb_radio/docs/_radio_children.jsx +56 -0
- data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_radio/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_previewer_mixin.scss +49 -13
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +2 -14
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +23 -23
- data/app/pb_kits/playbook/pb_rich_text_editor/_trix_styles.scss +19 -27
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +21 -11
- data/app/pb_kits/playbook/pb_select/_select.scss +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +3 -3
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -1
- data/app/pb_kits/playbook/pb_textarea/_textarea.scss +1 -1
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +4 -4
- data/app/pb_kits/playbook/pb_timeline/_timeline.scss +2 -2
- data/app/pb_kits/playbook/pb_toggle/_toggle.scss +3 -3
- data/dist/chunks/{_typeahead-KAYMhDNO.js → _typeahead-C4E2LFD8.js} +3 -3
- data/dist/chunks/{_weekday_stacked-CTvE8Bet.js → _weekday_stacked-BxO6ii_q.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +5 -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
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
-
|
22
|
-
|
23
|
-
|
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>
|
@@ -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:
|
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: -(
|
56
|
-
right: -(
|
55
|
+
top: -($pb_selectable_card_indicator_size/2);
|
56
|
+
right: -($pb_selectable_card_indicator_size/2);
|
57
57
|
opacity: 0;
|
58
58
|
}
|
59
59
|
}
|
@@ -22,14 +22,14 @@
|
|
22
22
|
display: flex;
|
23
23
|
align-items: center;
|
24
24
|
[class*=pb_time_range_inline_arrow] {
|
25
|
-
margin-left:
|
26
|
-
margin-right:
|
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:
|
29
|
+
margin-left: $space_xs/2;
|
30
30
|
}
|
31
31
|
[class*=pb_time_range_inline_icon] {
|
32
|
-
margin-right:
|
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:
|
7
|
+
$icon_margin: $space_xs/2;
|
8
8
|
$icon_height: 28px;
|
9
|
-
$height_from_top:
|
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:
|
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:
|
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:
|
71
|
+
left: $width / 2 + 2px;
|
72
72
|
background-color: $white;
|
73
73
|
}
|
74
74
|
}
|