playbook_ui 14.15.0.pre.alpha.PLAY1756pbcontenttagpt76722 → 14.15.0.pre.alpha.PLAY1871speedupvitebuildwatch6643
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +2 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_hooks.md +1 -3
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_icon_button/_icon_button.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +0 -6
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +1 -3
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list.html.erb +6 -1
- data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +5 -1
- data/app/pb_kits/playbook/pb_table/table.html.erb +12 -2
- data/app/pb_kits/playbook/pb_table/table_body.html.erb +12 -2
- data/app/pb_kits/playbook/pb_table/table_cell.html.erb +12 -2
- data/app/pb_kits/playbook/pb_table/table_head.html.erb +12 -2
- data/app/pb_kits/playbook/pb_table/table_header.html.erb +12 -3
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +18 -5
- data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +5 -1
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.scss +2 -2
- data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_tooltip/tooltip.html.erb +6 -7
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +7 -32
- data/app/pb_kits/playbook/tokens/_display.scss +1 -3
- data/app/pb_kits/playbook/utilities/_display.scss +1 -6
- data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +1 -1
- data/dist/chunks/{_typeahead-D720juMS.js → _typeahead-DIuxdvr1.js} +1 -1
- data/dist/chunks/_weekday_stacked-CpYzhAVN.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +1 -9
- 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/display.rb +2 -2
- data/lib/playbook/version.rb +1 -1
- metadata +4 -20
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.html.erb +0 -39
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_close.html.erb +0 -39
- data/app/pb_kits/playbook/pb_empty_state/_empty_state.scss +0 -38
- data/app/pb_kits/playbook/pb_empty_state/_empty_state.tsx +0 -213
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.jsx +0 -38
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.jsx +0 -17
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.jsx +0 -21
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.jsx +0 -35
- data/app/pb_kits/playbook/pb_empty_state/docs/default_image/computer_fly_no_branding.svg +0 -21
- data/app/pb_kits/playbook/pb_empty_state/docs/default_image/utils.tsx +0 -118
- data/app/pb_kits/playbook/pb_empty_state/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_empty_state/docs/index.js +0 -4
- data/app/pb_kits/playbook/pb_empty_state/empty_state.test.jsx +0 -17
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_hidden_inputs.html.erb +0 -5
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_hidden_inputs.md +0 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_sizing.html.erb +0 -22
- data/dist/chunks/_weekday_stacked-D_IMHltv.js +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b06850c1ac1d1db64309d61fa6cac8e9f315214db6ab81455507e6fde789b8ce
|
4
|
+
data.tar.gz: 351e090b7c347cb5378ac9b238917d1a3663da8064766395ffedf87e85267477
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff636db5c3c57686bda88879f85dffe6323d73e3f1fe2ff47d20a3e12b30352be92f2290ab8058d8ec96f2aca193fe8a0513b2e131cfd2005118e9ff5ab1d01d
|
7
|
+
data.tar.gz: d7ad03832b1215e4c97c43e9f1fd75f1f1ed465298a0bf647b08229b4530456cebf636ef8414c89387aa7ece11b0bd0019a1ed978a9754769fabfa5cfc41c651
|
@@ -1,5 +1,4 @@
|
|
1
1
|
|
2
|
-
|
3
2
|
@import 'pb_advanced_table/advanced_table';
|
4
3
|
@import 'pb_avatar/avatar';
|
5
4
|
@import 'pb_background/background';
|
@@ -15,8 +14,8 @@
|
|
15
14
|
@import 'pb_circle_chart/circle_chart';
|
16
15
|
@import 'pb_circle_icon_button/circle_icon_button';
|
17
16
|
@import 'pb_collapsible/collapsible';
|
18
|
-
@import 'pb_contact/contact';
|
19
17
|
@import 'pb_copy_button/copy_button';
|
18
|
+
@import 'pb_contact/contact';
|
20
19
|
@import 'pb_currency/currency';
|
21
20
|
@import 'pb_dashboard_value/dashboard_value';
|
22
21
|
@import 'pb_date/date';
|
@@ -46,7 +45,6 @@
|
|
46
45
|
@import 'pb_highlight/highlight';
|
47
46
|
@import 'pb_home_address_street/home_address_street';
|
48
47
|
@import 'pb_icon/icon';
|
49
|
-
@import 'pb_icon_button/icon_button';
|
50
48
|
@import 'pb_icon_circle/icon_circle';
|
51
49
|
@import 'pb_icon_stat_value/icon_stat_value';
|
52
50
|
@import 'pb_icon_value/icon_value';
|
@@ -111,7 +109,7 @@
|
|
111
109
|
@import 'pb_user_badge/user_badge';
|
112
110
|
@import 'pb_walkthrough/walkthrough';
|
113
111
|
@import 'pb_weekday_stacked/weekday_stacked';
|
114
|
-
@import '
|
112
|
+
@import 'pb_icon_button/icon_button';
|
115
113
|
@import 'utilities/mixins';
|
116
114
|
@import 'utilities/spacing';
|
117
115
|
@import 'utilities/cursor';
|
@@ -1,3 +1 @@
|
|
1
|
-
You can find a full list of flatpickr events and hooks in their [documentation](https://flatpickr.js.org/events/).
|
2
|
-
|
3
|
-
Use `window.addEventListener("DOMContentLoaded", () => {})`, not `document.addEventListener("DOMContentLoaded", () => {})`.
|
1
|
+
You can find a full list of flatpickr events and hooks in their [documentation](https://flatpickr.js.org/events/).
|
@@ -7,8 +7,6 @@ examples:
|
|
7
7
|
- date_picker_allow_input: Allow Input
|
8
8
|
- date_picker_input: Input Field
|
9
9
|
- date_picker_label: Label
|
10
|
-
- date_picker_on_change: onChange
|
11
|
-
- date_picker_on_close: onClose
|
12
10
|
# - date_picker_range: Range
|
13
11
|
- date_picker_quick_pick_rails: Range (Quick Pick)
|
14
12
|
- date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
|
26
26
|
<%= form.typeahead :example_typeahead, props: { data: { typeahead_example1: true, user: {} }, label: true, placeholder: "Search for a user" } %>
|
27
27
|
<%= form.text_field :example_text_field, props: { label: true } %>
|
28
|
-
<%= form.phone_number_field :example_phone_number_field, props: { label: "Example phone field"
|
28
|
+
<%= form.phone_number_field :example_phone_number_field, props: { label: "Example phone field" } %>
|
29
29
|
<%= form.email_field :example_email_field, props: { label: true } %>
|
30
30
|
<%= form.number_field :example_number_field, props: { label: true } %>
|
31
31
|
<%= form.search_field :example_search_field, props: { label: true } %>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<%= pb_form_with(scope: :example, method: :get, url: "", validate: true) do |form| %>
|
25
25
|
<%= form.typeahead :example_typeahead_validation, props: { data: { typeahead_example2: true, user: {} }, label: true, placeholder: "Search for a user", required: true, validation: { message: "Please select a user." } } %>
|
26
26
|
<%= form.text_field :example_text_field_validation, props: { label: true, required: true } %>
|
27
|
-
<%= form.phone_number_field :example_phone_number_field_validation, props: { label: "Example phone field"
|
27
|
+
<%= form.phone_number_field :example_phone_number_field_validation, props: { label: "Example phone field" } %>
|
28
28
|
<%= form.email_field :example_email_field_validation, props: { label: true, required: true } %>
|
29
29
|
<%= form.number_field :example_number_field_validation, props: { label: true, required: true } %>
|
30
30
|
<%= form.search_field :example_project_number_validation, props: { label: true, required: true, validation: { pattern: "[0-9]{2}-[0-9]{5}", message: "Please enter a valid project number (example: 33-12345)." } } %>
|
@@ -23,7 +23,6 @@ type PhoneNumberInputProps = {
|
|
23
23
|
data?: { [key: string]: string },
|
24
24
|
disabled?: boolean,
|
25
25
|
error?: string,
|
26
|
-
hiddenInputs?: boolean,
|
27
26
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
28
27
|
id?: string,
|
29
28
|
initialCountry?: string,
|
@@ -73,7 +72,6 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
|
|
73
72
|
dark = false,
|
74
73
|
data = {},
|
75
74
|
disabled = false,
|
76
|
-
hiddenInputs = false,
|
77
75
|
htmlOptions = {},
|
78
76
|
id = "",
|
79
77
|
initialCountry = "",
|
@@ -245,10 +243,6 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
|
|
245
243
|
countrySearch: false,
|
246
244
|
fixDropdownWidth: false,
|
247
245
|
formatAsYouType: formatAsYouType,
|
248
|
-
hiddenInput: hiddenInputs ? () => ({
|
249
|
-
phone: `${name}_full`,
|
250
|
-
country: `${name}_country_code`,
|
251
|
-
}) : null,
|
252
246
|
})
|
253
247
|
|
254
248
|
itiRef.current = telInputInit;
|
@@ -16,6 +16,4 @@ examples:
|
|
16
16
|
- phone_number_input_initial_country: Initial Country
|
17
17
|
- phone_number_input_only_countries: Limited Countries
|
18
18
|
- phone_number_input_validation: Form Validation
|
19
|
-
- phone_number_input_format: Format as You Type
|
20
|
-
- phone_number_input_hidden_inputs: Hidden Inputs
|
21
|
-
|
19
|
+
- phone_number_input_format: Format as You Type
|
@@ -23,8 +23,6 @@ module Playbook
|
|
23
23
|
default: ""
|
24
24
|
prop :format_as_you_type, type: Playbook::Props::Boolean,
|
25
25
|
default: false
|
26
|
-
prop :hidden_inputs, type: Playbook::Props::Boolean,
|
27
|
-
default: false
|
28
26
|
|
29
27
|
def classname
|
30
28
|
generate_classname("pb_phone_number_input")
|
@@ -37,7 +35,6 @@ module Playbook
|
|
37
35
|
disabled: disabled,
|
38
36
|
error: error,
|
39
37
|
formatAsYouType: format_as_you_type,
|
40
|
-
hiddenInputs: hidden_inputs,
|
41
38
|
initialCountry: initial_country,
|
42
39
|
label: label,
|
43
40
|
name: name,
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<% if enable_drag %>
|
3
8
|
<%= pb_rails("draggable", props: {initial_items: object.items}) do %>
|
4
9
|
<%= pb_rails("draggable/draggable_container") do %>
|
@@ -6,11 +6,21 @@
|
|
6
6
|
|
7
7
|
<%= content_tag(:div, class: responsive_class, 'data-pb-table-wrapper' => true) do %>
|
8
8
|
<% if object.tag == "table" %>
|
9
|
-
<%=
|
9
|
+
<%= content_tag(:table,
|
10
|
+
aria: object.aria,
|
11
|
+
class: object.classname,
|
12
|
+
data: object.data,
|
13
|
+
id: object.id,
|
14
|
+
**combined_html_options) do %>
|
10
15
|
<%= content.presence %>
|
11
16
|
<% end %>
|
12
17
|
<% else %>
|
13
|
-
<%=
|
18
|
+
<%= content_tag(:div,
|
19
|
+
aria: object.aria,
|
20
|
+
class: object.classname,
|
21
|
+
data: object.data,
|
22
|
+
id: object.id,
|
23
|
+
**combined_html_options) do %>
|
14
24
|
<%= content.presence %>
|
15
25
|
<% end %>
|
16
26
|
<% end %>
|
@@ -4,12 +4,22 @@
|
|
4
4
|
<%= content.presence %>
|
5
5
|
<% end %>
|
6
6
|
<% else %>
|
7
|
-
<%=
|
7
|
+
<%= content_tag(:tbody,
|
8
|
+
aria: object.aria,
|
9
|
+
class: object.classname,
|
10
|
+
data: object.data,
|
11
|
+
id: object.id,
|
12
|
+
**combined_html_options) do %>
|
8
13
|
<%= content.presence %>
|
9
14
|
<% end %>
|
10
15
|
<% end %>
|
11
16
|
<% else %>
|
12
|
-
<%=
|
17
|
+
<%= content_tag(:div,
|
18
|
+
aria: object.aria,
|
19
|
+
class: object.classname,
|
20
|
+
data: object.data,
|
21
|
+
id: object.id,
|
22
|
+
**combined_html_options) do %>
|
13
23
|
<%= content.presence %>
|
14
24
|
<% end %>
|
15
25
|
<% end %>
|
@@ -1,9 +1,19 @@
|
|
1
1
|
<% if object.tag == "table" %>
|
2
|
-
<%=
|
2
|
+
<%= content_tag(:td,
|
3
|
+
aria: object.aria,
|
4
|
+
class: object.classname,
|
5
|
+
data: object.data,
|
6
|
+
id: object.id,
|
7
|
+
**combined_html_options) do %>
|
3
8
|
<%= content.presence || object.text %>
|
4
9
|
<% end %>
|
5
10
|
<% else %>
|
6
|
-
<%=
|
11
|
+
<%= content_tag(:div,
|
12
|
+
aria: object.aria,
|
13
|
+
class: object.classname,
|
14
|
+
data: object.data,
|
15
|
+
id: object.id,
|
16
|
+
**combined_html_options) do %>
|
7
17
|
<%= content.presence || object.text %>
|
8
18
|
<% end %>
|
9
19
|
<% end %>
|
@@ -1,9 +1,19 @@
|
|
1
1
|
<% if object.tag == "table" %>
|
2
|
-
<%=
|
2
|
+
<%= content_tag(:thead,
|
3
|
+
aria: object.aria,
|
4
|
+
class: object.classname,
|
5
|
+
data: object.data,
|
6
|
+
id: object.id,
|
7
|
+
**combined_html_options) do %>
|
3
8
|
<%= content.presence %>
|
4
9
|
<% end %>
|
5
10
|
<% else %>
|
6
|
-
<%=
|
11
|
+
<%= content_tag(:div,
|
12
|
+
aria: object.aria,
|
13
|
+
class: object.classname,
|
14
|
+
data: object.data,
|
15
|
+
id: object.id,
|
16
|
+
**combined_html_options) do %>
|
7
17
|
<%= content.presence %>
|
8
18
|
<% end %>
|
9
19
|
<% end %>
|
@@ -1,7 +1,11 @@
|
|
1
1
|
<% if object.tag == "table" %>
|
2
|
-
<%=
|
2
|
+
<%= content_tag(:th,
|
3
3
|
colspan: object.colspan,
|
4
|
-
|
4
|
+
aria: object.aria,
|
5
|
+
class: object.classname,
|
6
|
+
data: object.data,
|
7
|
+
id: "pb-th#{object.id}",
|
8
|
+
**combined_html_options) do %>
|
5
9
|
<% unless sorting_style? %>
|
6
10
|
<%= content.presence || object.text %>
|
7
11
|
<% else %>
|
@@ -42,7 +46,12 @@
|
|
42
46
|
<% end %>
|
43
47
|
<% end %>
|
44
48
|
<% else %>
|
45
|
-
<%=
|
49
|
+
<%= content_tag(:div,
|
50
|
+
aria: object.aria,
|
51
|
+
class: object.classname,
|
52
|
+
data: object.data,
|
53
|
+
id: object.id,
|
54
|
+
**combined_html_options) do %>
|
46
55
|
<% unless sorting_style? %>
|
47
56
|
<%= content.presence || object.text %>
|
48
57
|
<% else %>
|
@@ -1,9 +1,12 @@
|
|
1
1
|
<% if object.collapsible && object.tag == "table" %>
|
2
|
-
<%=
|
2
|
+
<%= content_tag(:tr,
|
3
|
+
aria: object.aria,
|
3
4
|
class: object.classname + " collapsible-tr",
|
4
|
-
data: object.data.merge(id: object.id),
|
5
|
+
data: object.data.merge(id: object.id),
|
6
|
+
id: object.id,
|
5
7
|
'data-pb-table-collapsible-wrapper' => true,
|
6
|
-
'data-pb-table-collapsible-cell-id' => object.toggle_cell_id
|
8
|
+
'data-pb-table-collapsible-cell-id' => object.toggle_cell_id,
|
9
|
+
**combined_html_options) do %>
|
7
10
|
<%= content.presence %>
|
8
11
|
<% end %>
|
9
12
|
|
@@ -21,12 +24,22 @@
|
|
21
24
|
<%= content.presence %>
|
22
25
|
<% end %>
|
23
26
|
<% else %>
|
24
|
-
<%=
|
27
|
+
<%= content_tag(:tr,
|
28
|
+
aria: object.aria,
|
29
|
+
class: object.classname,
|
30
|
+
data: object.data,
|
31
|
+
id: object.id,
|
32
|
+
**combined_html_options) do %>
|
25
33
|
<%= content.presence %>
|
26
34
|
<% end %>
|
27
35
|
<% end %>
|
28
36
|
<% else %>
|
29
|
-
<%=
|
37
|
+
<%= content_tag(:div,
|
38
|
+
aria: object.aria,
|
39
|
+
class: object.classname,
|
40
|
+
data: object.data,
|
41
|
+
id: object.id,
|
42
|
+
**combined_html_options) do %>
|
30
43
|
<%= content.presence %>
|
31
44
|
<% end %>
|
32
45
|
<% end %>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
<% if object.label.present? %>
|
3
7
|
<%= pb_rails("caption", props: { text: object.label, dark: object.dark, classname: "pb_text_input_kit_label" }) %>
|
4
8
|
<% end %>
|
@@ -54,7 +54,7 @@ $tooltip_shadow: rgba(60, 106, 172, 0.18);
|
|
54
54
|
margin-bottom: 50px;
|
55
55
|
}
|
56
56
|
|
57
|
-
&.visible,
|
57
|
+
&.visible,
|
58
58
|
&.show {
|
59
59
|
z-index: $z_9;
|
60
60
|
padding: $space_xs $space_sm;
|
@@ -117,7 +117,7 @@ $tooltip_shadow: rgba(60, 106, 172, 0.18);
|
|
117
117
|
color: $charcoal;
|
118
118
|
background-color: $white;
|
119
119
|
}
|
120
|
-
.arrow {
|
120
|
+
.arrow {
|
121
121
|
border-color: $white transparent transparent transparent;
|
122
122
|
opacity: $opacity_10;
|
123
123
|
}
|
@@ -4,7 +4,6 @@ examples:
|
|
4
4
|
- tooltip_default: Default
|
5
5
|
- tooltip_interaction: Content Interaction
|
6
6
|
- tooltip_selectors: Using Common Selectors
|
7
|
-
- tooltip_sizing: Tooltip Sizing
|
8
7
|
- tooltip_icon_rails: Tooltip with Icon
|
9
8
|
- tooltip_with_icon_circle: Icon Circle Tooltip
|
10
9
|
- tooltip_delay_rails: Delay
|
@@ -1,11 +1,10 @@
|
|
1
1
|
<%= content_tag(:div,
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<div class="tooltip_tooltip" id="<%= object.tooltip_id %>" role="tooltip" style="<%= object.height_and_width_helper %>">
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
6
|
+
<div class="tooltip_tooltip" id="<%= object.tooltip_id %>" role="tooltip">
|
8
7
|
<%= content.presence %>
|
9
8
|
<div class="arrow" id="<%= object.tooltip_id %>-arrow"></div>
|
10
9
|
</div>
|
11
|
-
<% end %>
|
10
|
+
<% end %>
|
@@ -3,49 +3,24 @@
|
|
3
3
|
module Playbook
|
4
4
|
module PbTooltip
|
5
5
|
class Tooltip < Playbook::KitBase
|
6
|
-
prop :dark, type: Playbook::Props::Boolean,
|
7
|
-
default: false
|
8
|
-
prop :delay_open
|
9
|
-
prop :delay_close
|
10
|
-
prop :height
|
11
|
-
prop :interaction, type: Playbook::Props::Boolean,
|
12
|
-
default: false
|
13
|
-
prop :max_height
|
14
|
-
prop :max_width
|
15
|
-
prop :min_height
|
16
|
-
prop :min_width
|
17
6
|
prop :position
|
18
|
-
prop :tooltip_id
|
19
7
|
prop :trigger_element_selector
|
20
8
|
prop :trigger_element_id, deprecated: true
|
9
|
+
prop :tooltip_id
|
10
|
+
prop :interaction, type: Playbook::Props::Boolean,
|
11
|
+
default: false
|
12
|
+
prop :delay_open
|
13
|
+
prop :delay_close
|
14
|
+
prop :dark, type: Playbook::Props::Boolean,
|
15
|
+
default: false
|
21
16
|
prop :trigger_method, type: Playbook::Props::Enum,
|
22
17
|
values: %w[hover click],
|
23
18
|
default: "hover"
|
24
|
-
prop :width
|
25
19
|
|
26
20
|
def classname
|
27
21
|
generate_classname("pb_tooltip_kit", dark_class)
|
28
22
|
end
|
29
23
|
|
30
|
-
def remove_height_properties(combined_html_options_style)
|
31
|
-
return nil if combined_html_options_style.nil?
|
32
|
-
|
33
|
-
combined_html_options_style.gsub(/\s*(height|min-height|max-height)\s*:[^;]*;?\s*/, "")
|
34
|
-
.strip
|
35
|
-
.presence
|
36
|
-
end
|
37
|
-
|
38
|
-
def height_and_width_helper
|
39
|
-
out = ""
|
40
|
-
out += "width: #{width};" if width.present?
|
41
|
-
out += "height: #{height};" if height.present?
|
42
|
-
out += "max-height: #{max_height};" if max_height.present?
|
43
|
-
out += "max-width: #{max_width};" if max_width.present?
|
44
|
-
out += "min-height: #{min_height};" if min_height.present?
|
45
|
-
out += "min-width: #{min_width};" if min_width.present?
|
46
|
-
out
|
47
|
-
end
|
48
|
-
|
49
24
|
def data
|
50
25
|
data = Hash(values[:data]).merge(
|
51
26
|
pb_tooltip_kit: true,
|
@@ -4,12 +4,10 @@ $display_inline_block: inline-block !default;
|
|
4
4
|
$display_flex: flex !default;
|
5
5
|
$display_none: none !default;
|
6
6
|
$display_inline_flex: inline-flex !default;
|
7
|
-
$display_grid: grid !default;
|
8
7
|
$displays: (
|
9
8
|
display_none: $display_none,
|
10
9
|
display_flex: $display_flex,
|
11
10
|
display_inline: $display_inline,
|
12
11
|
display_inline_block: $display_inline_block,
|
13
|
-
display_block: $display_block
|
14
|
-
display_grid: $display_grid
|
12
|
+
display_block: $display_block
|
15
13
|
);
|
@@ -24,18 +24,13 @@
|
|
24
24
|
display: none;
|
25
25
|
}
|
26
26
|
|
27
|
-
.display_grid {
|
28
|
-
display: grid;
|
29
|
-
}
|
30
|
-
|
31
27
|
$display_values: (
|
32
28
|
none: $display_none,
|
33
29
|
flex: $display_flex,
|
34
30
|
inline: $display_inline,
|
35
31
|
inline_block: $display_inline_block,
|
36
32
|
inline_flex: $display_inline_flex,
|
37
|
-
block: $display_block
|
38
|
-
grid: $display_grid
|
33
|
+
block: $display_block
|
39
34
|
);
|
40
35
|
|
41
36
|
// using a grid here
|
@@ -9,7 +9,7 @@ const testSubject = 'body'
|
|
9
9
|
|
10
10
|
// %w[block inline_block inline flex inline_flex none]
|
11
11
|
test('Global Props: returns proper class name', () => {
|
12
|
-
const propValues = ["block", "inline", "inline_block", "flex", "inline_flex", "none"
|
12
|
+
const propValues = ["block", "inline", "inline_block", "flex", "inline_flex", "none"]
|
13
13
|
for(let x = 0, y = propValues.length; x < y; ++x) {
|
14
14
|
const testId = `${testSubject}-${propValues[x]}`
|
15
15
|
render(
|