playbook_ui 13.27.0.pre.alpha.PLAY1342DRYcontenttagRailssimplekits2896 → 13.27.0.pre.alpha.PLAY11782918
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_advanced_table/advanced_table.html.erb +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +5 -1
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +6 -1
- data/app/pb_kits/playbook/pb_badge/badge.html.erb +6 -1
- data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.html.erb +6 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +6 -1
- data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +6 -1
- data/app/pb_kits/playbook/pb_collapsible/collapsible_content.html.erb +6 -1
- data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +6 -1
- data/app/pb_kits/playbook/pb_contact/contact.html.erb +6 -1
- data/app/pb_kits/playbook/pb_currency/currency.html.erb +6 -1
- data/app/pb_kits/playbook/pb_dashboard_value/dashboard_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date/date.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md +5 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.md +6 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md +3 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md +5 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +6 -6
- data/app/pb_kits/playbook/pb_dropdown/dropdown_option.rb +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +6 -1
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.html.erb +6 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_icon_value/icon_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_label_pill/label_pill.html.erb +6 -1
- data/app/pb_kits/playbook/pb_label_value/label_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_message/message_mention.html.erb +6 -6
- data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +6 -1
- data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +6 -1
- data/app/pb_kits/playbook/pb_pagination/pagination.html.erb +6 -1
- data/app/pb_kits/playbook/pb_person/person.html.erb +6 -1
- data/app/pb_kits/playbook/pb_person_contact/person_contact.html.erb +6 -1
- data/app/pb_kits/playbook/pb_pill/pill.html.erb +6 -1
- data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +6 -1
- data/app/pb_kits/playbook/pb_select/_select.scss +8 -0
- data/app/pb_kits/playbook/pb_source/source.html.erb +5 -1
- data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +5 -1
- data/app/pb_kits/playbook/pb_stat_value/stat_value.html.erb +5 -1
- data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_time_stacked/time_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_timeline/item.html.erb +5 -1
- data/app/pb_kits/playbook/pb_timeline/timeline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_timestamp/timestamp.html.erb +6 -1
- data/app/pb_kits/playbook/pb_title_count/title_count.html.erb +6 -1
- data/app/pb_kits/playbook/pb_title_detail/title_detail.html.erb +5 -1
- data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.html.erb +6 -1
- data/dist/menu.yml +2 -2
- data/lib/playbook/kit_base.rb +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +10 -6
- /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_subcomponent_structure.html.erb → _dropdown_subcomponent_structure_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_display.html.erb → _dropdown_with_custom_display_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_options.html.erb → _dropdown_with_custom_options_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_trigger.html.erb → _dropdown_with_custom_trigger_rails.html.erb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6466216ec4562410f156f78c56d5b5cea39128fc2d3a7bd9070cfa52d60bc1b0
|
4
|
+
data.tar.gz: 9a879d1ac8668679cab39c6b3a0020e8cd43a22f9edf1e00b7500a711ac394e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5527730cce4f26a72a3fd514b746538ef7032e3bd571bb2a9af9692182c0f7c01d5b695fe134aa33ac2e94f9877b0d6c963475ce12b8a47287997159387a99aa
|
7
|
+
data.tar.gz: 16f4a1a26d5b277a2a420e35868d44cc933d49e0b8b0aaf13c6b2bba46bd151bd57e0710f5dfa025d61a4209064b40a42aa9907323a2142440b99303bf13ab38
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id) do %>
|
2
6
|
<%= pb_rails("table", props: { size: "sm", tag:"div", data_table: true, number_spacing:"tabular", responsive:"none" }) do %>
|
3
7
|
<% if content.present? %>
|
4
8
|
<% content.presence %>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id) do %>
|
2
6
|
<%= pb_rails("table/table_row", props: {tag:"div"}) do %>
|
3
7
|
<% object.column_definitions.each_with_index do |item, index| %>
|
4
8
|
<%= pb_rails("table/table_header", props: { tag:"div", id:item[:accessor], classname:object.th_classname}) do %>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id) do %>
|
2
6
|
<% object.column_definitions.each_with_index do |column, index| %>
|
3
7
|
<%= pb_rails("table/table_cell", props: { tag:"div", classname:object.td_classname}) do %>
|
4
8
|
<%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<% if object.tooltip_text.present? %>
|
3
8
|
<%= pb_rails("tooltip", props: {
|
4
9
|
trigger_element_id: object.tooltip_id,
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("button", props: {type: object.type, link: object.link, new_window:object.new_window, variant: object.variant, disabled: object.disabled, dark: object.dark}) do %>
|
3
8
|
<%= pb_rails("icon", props: {icon: object.icon, fixed_width: true, dark: object.dark}) %>
|
4
9
|
<% end %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
aria: object.aria,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
|
3
8
|
<%= pb_rails("flex", props: {vertical: "center", spacing: "between", cursor: "pointer"}) do %>
|
4
9
|
<%= pb_rails("flex/flex_item") do %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("caption", props: object.caption_props) %>
|
3
8
|
|
4
9
|
<div class=<%= "pb_currency_wrapper#{object.variant_class || object.emphasized_class}" %>>
|
@@ -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 object.stat_label.present? %>
|
3
8
|
<%= pb_rails("body", props: { color: "light", text: object.stat_label } ) %>
|
4
9
|
<% end %>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
<div class="pb_date_range_inline_wrapper">
|
3
7
|
<% if object.icon == true %>
|
4
8
|
<%= pb_rails(object.text_kit, props: { tag: "span", dark: object.dark, color: object.icon_color, text: pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true, size: object.size, classname: "pb_date_range_inline_icon" }) }) %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
aria: object.aria,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
|
3
8
|
<%= pb_rails("flex", props: {classname: "flex-container", vertical: "stretch"}) do %>
|
4
9
|
<%= pb_rails("body", props: {classname: "flex-item"}) do %>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
<%= pb_rails("title", props: { text: object.day_month, size: 4, dark: object.dark }) %>
|
3
7
|
<%= pb_rails("body", props: { text: object.year, size: 4, color: "light", dark: object.dark }) %>
|
4
8
|
<% end %>
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
This kit's `options` prop requires an array of objects, each of which will be used as the selectable options within the dropdown. Each option object can support any number of key-value pairs, but each must contain `label` and `value`.
|
@@ -1,7 +1,6 @@
|
|
1
|
-
The dropdown
|
1
|
+
The dropdown is built using all of the following subcomponents:
|
2
2
|
|
3
|
-
`Dropdown.
|
4
|
-
`Dropdown.Container
|
5
|
-
`Dropdown.Option`
|
6
|
-
|
7
|
-
See the code snippet below for a visual on how to use the kit with subcomponents. Each subcomponent allows for GlobalProps in addition to any subcomponent specfic props.
|
3
|
+
`Dropdown.Trigger` is the UI component that users interact with to toggle the dropdown.
|
4
|
+
`Dropdown.Container` is the floating container that wraps the list of dropdown options.
|
5
|
+
`Dropdown.Option` renders options that are passed to the container.
|
6
|
+
Each of these subcomponents can be altered using global props and/or their respective props. See doc examples below for more information on each.
|
@@ -0,0 +1,6 @@
|
|
1
|
+
The dropdown is built using all of the following required subcomponents:
|
2
|
+
|
3
|
+
`dropdown/dropdown_trigger` is the UI component that users interact with to toggle the dropdown.
|
4
|
+
`dropdown/dropdown_container` is the floating container that wraps the list of dropdown options.
|
5
|
+
`dropdown/dropdown_option` renders options that are passed to the container.
|
6
|
+
Each of these subcomponents can be altered using global props and/or their respective props. See doc examples below for more information on each.
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
1
|
+
Optionally utilize `customDisplay` on the `Dropdown.Trigger` subcomponent to customize its content after an option is selected. The component passed to customDisplay will be rendered to the left of the default text-based display. In this example the Avatar kit is being used.
|
2
2
|
|
3
|
-
The `placeholder` prop can also be used to customize the placeholder text for the default Trigger
|
3
|
+
The `placeholder` prop can also be used to customize the placeholder text for the default `Dropdown.Trigger`.
|
4
4
|
|
5
|
-
The `onSelect` prop
|
5
|
+
The `onSelect` prop returns the selected option as an object to be utilized by the dev. In this example we are using the `onSelect` to set a state with the selected option and using it to customize the `customDisplay`.
|
@@ -0,0 +1,5 @@
|
|
1
|
+
Optionally utilize `custom_display` on the `dropdown/dropdown_trigger` subcomponent to customize its content after an option is selected. The component passed to custom_display will be rendered to the left of the default text-based display. In this example the Avatar kit is being used.
|
2
|
+
|
3
|
+
The `placeholder` prop can also be used to customize the placeholder text for the default `dropdown/dropdown_trigger`.
|
4
|
+
|
5
|
+
The dropdown follows the typical rails pattern of utilizing hidden inputs for form submission. The hidden input value is the selected options' id.
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
`Dropdown.Option` subcomponent accepts any child components to customize the options' contents and display. By default, options are Body kit text that is set by the `label` value from the `option` object.
|
@@ -0,0 +1 @@
|
|
1
|
+
`dropdown/dropdown_option` subcomponent accepts any child components to customize the options' contents and display. By default, options are Body kit text that is set by the `label` value from the `option` object.
|
@@ -1 +1 @@
|
|
1
|
-
By default,
|
1
|
+
By default, dropdown option padding is set to `xs`, but this padding can be overridden using our global prop spacing token. In this example we are increasing the option padding to `sm`.
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Optionally replace the default trigger's select element by passing child components directly to the `Dropdown.Trigger`.
|
@@ -0,0 +1 @@
|
|
1
|
+
Optionally replace the default trigger's select element by passing child components directly to the `dropdown/dropdown_trigger`.
|
@@ -1 +1 @@
|
|
1
|
-
The
|
1
|
+
The top-level Dropdown component optionally accepts any string through a `label` prop to produce a label above your trigger element.
|
@@ -1,12 +1,12 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
3
|
- dropdown_default: Default
|
4
|
-
-
|
4
|
+
- dropdown_subcomponent_structure_rails: Subcomponent Structure
|
5
5
|
- dropdown_with_label: With Label
|
6
|
-
-
|
7
|
-
-
|
8
|
-
-
|
9
|
-
- dropdown_with_custom_padding: Custom Padding
|
6
|
+
- dropdown_with_custom_options_rails: Custom Options
|
7
|
+
- dropdown_with_custom_display_rails: Custom Display
|
8
|
+
- dropdown_with_custom_trigger_rails: Custom Trigger
|
9
|
+
- dropdown_with_custom_padding: Custom Option Padding
|
10
10
|
|
11
11
|
react:
|
12
12
|
- dropdown_default: Default
|
@@ -15,7 +15,7 @@ examples:
|
|
15
15
|
- dropdown_with_custom_options: Custom Options
|
16
16
|
- dropdown_with_custom_display: Custom Display
|
17
17
|
- dropdown_with_custom_trigger: Custom Trigger
|
18
|
-
- dropdown_with_custom_padding: Custom Padding
|
18
|
+
- dropdown_with_custom_padding: Custom Option Padding
|
19
19
|
# - dropdown_with_autocomplete: Autocomplete
|
20
20
|
# - dropdown_with_autocomplete_and_custom_display: Autocomplete with Custom Display
|
21
21
|
# - dropdown_with_external_control: useDropdown Hook
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("icon", props: { icon: object.icon_value, classname: "pb_icon", fixed_width: true }) %>
|
3
8
|
|
4
9
|
<% if content %>
|
@@ -1,3 +1,8 @@
|
|
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
|
<%= pb_rails("icon", props: { dark: object.dark, icon: object.icon, fixed_width: true }) %>
|
3
8
|
<% end %>
|
@@ -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
|
<%= pb_rails("body", props: { color: "light", dark: object.dark }) do %>
|
3
8
|
<%= pb_rails("icon", props: { icon: object.icon, fixed_width: true }) %>
|
4
9
|
<%= object.text %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("caption", props: { text: object.label, classname: "pb_label_pill_label"}) %>
|
3
8
|
<%= pb_rails("pill", props: { text: object.pill_value, variant: object.variant, classname: "pb_label_pill_pill" }) %>
|
4
9
|
<% end %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("caption", props: { text: object.label, dark: object.dark }) %>
|
3
8
|
<% if object.variant == "details" %>
|
4
9
|
<%= pb_rails("flex", props: {inline: true, vertical: "center"}) do %>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
|
3
7
|
<%= pb_rails("body", props: { color: "light", dark: object.dark }) do %>
|
4
8
|
<%= pb_rails("icon", props: { aria: { label: "loading icon" }, fixed_width: true, icon: "spinner", pulse: true }) %> <%= object.text %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%= content_tag(:div,
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
aria: object.aria,
|
6
|
+
**combined_html_options) do %>
|
7
|
+
<%= content %>
|
8
8
|
<% end %>
|
@@ -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
|
<% object.users.take(object.display_count).each do |user| %>
|
3
8
|
<%= pb_rails("avatar", props: user.merge({size: object.size, classname: "pb_multiple_users_item", dark: object.dark}) ) %>
|
4
9
|
<% end %>
|
@@ -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
|
<%= pb_rails("avatar", props: object.users[0].merge({size: "xs", classname: "pb_multiple_users_stacked_item", dark: object.dark}) ) %>
|
3
8
|
|
4
9
|
<% unless object.only_one %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("body", props: {
|
3
8
|
tag: "span",
|
4
9
|
classname: "pb_person_first" }) { object.first_name } %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("person", props: {
|
3
8
|
first_name: object.first_name,
|
4
9
|
last_name: object.last_name,
|
@@ -1,3 +1,8 @@
|
|
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
|
<%= pb_rails("title", props: { text: object.display_text, tag: "div", size: 4, classname: "pb_pill_text" }) %>
|
3
8
|
<% end %>
|
@@ -102,6 +102,9 @@
|
|
102
102
|
pointer-events: none;
|
103
103
|
}
|
104
104
|
&.inline {
|
105
|
+
svg {
|
106
|
+
right: 6px;
|
107
|
+
}
|
105
108
|
@mixin active_arrow_style {
|
106
109
|
svg {
|
107
110
|
color: $primary !important;
|
@@ -130,6 +133,7 @@
|
|
130
133
|
box-shadow: none;
|
131
134
|
border-color: transparent;
|
132
135
|
padding: 4px 8px;
|
136
|
+
padding-right: $space_lg;
|
133
137
|
border-radius: 4px;
|
134
138
|
option {
|
135
139
|
background-color: $white;
|
@@ -213,6 +217,9 @@
|
|
213
217
|
}
|
214
218
|
}
|
215
219
|
&.inline {
|
220
|
+
svg {
|
221
|
+
right: 6px;
|
222
|
+
}
|
216
223
|
&:not(:hover) {
|
217
224
|
svg {
|
218
225
|
display: none;
|
@@ -233,6 +240,7 @@
|
|
233
240
|
border-color: transparent;
|
234
241
|
background: transparent;
|
235
242
|
padding: 4px 8px;
|
243
|
+
padding-right: $space_lg;
|
236
244
|
border-radius: 4px;
|
237
245
|
option {
|
238
246
|
background-color: $white;
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
<%= pb_rails("body", props: { status: object.status }) do %>
|
3
7
|
<%= pb_rails("icon", props: { fixed_width: true, icon: object.returned_icon }) if object.returned_icon %>
|
4
8
|
<%= "#{object.value}%" if object.value %>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
<div class="pb_time_range_inline_wrapper">
|
3
7
|
<% if object.icon == true %>
|
4
8
|
<%= pb_rails(object.text_kit, props: { tag: "span", dark: object.dark, color: object.icon_color, text: pb_rails("icon", props: { icon: "clock", dark: object.dark, classname:"pb_time_range_inline_icon", fixed_width: true, size: object.size }) }) %>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
|
3
7
|
<%= pb_rails("body", props: { color: "light", dark: object.dark, classname: "pb_time_stacked time-spacing" }) do %>
|
4
8
|
<time>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
<%= pb_rails("title", props: { text: object.title, size: 4 }) %>
|
3
7
|
<%= pb_rails("body", props: { text: object.detail, color: "light" }) %>
|
4
8
|
<% end %>
|
@@ -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
|
<%= pb_rails("caption", props: {dark: object.dark, text: object.day_of_week}) %>
|
3
8
|
<%= pb_rails("title", props: {dark: object.dark, size: 4, tag: "span", text: object.formatted_month_and_day}) %>
|
4
9
|
<% end %>
|
data/dist/menu.yml
CHANGED
@@ -255,9 +255,9 @@ kits:
|
|
255
255
|
description: Playbook's date picker is built using flatpickr, a vanilla js library. Common date picker use cases and features have been adapted into simple prop based configuration detailed in the docs below.
|
256
256
|
status: "stable"
|
257
257
|
- name: dropdown
|
258
|
-
platforms: *
|
258
|
+
platforms: *web
|
259
259
|
description: ""
|
260
|
-
status: "
|
260
|
+
status: "stable"
|
261
261
|
- name: "multi_level_select"
|
262
262
|
platforms: *web
|
263
263
|
description: The MultiLevelSelect kit renders a multi leveled select dropdown based on data from the user.
|
data/lib/playbook/kit_base.rb
CHANGED
@@ -81,7 +81,7 @@ module Playbook
|
|
81
81
|
end
|
82
82
|
|
83
83
|
# rubocop:disable Style/OptionalBooleanParameter
|
84
|
-
def pb_content_tag(name
|
84
|
+
def pb_content_tag(name, content_or_options_with_block = nil, options = {}, escape = true, &block)
|
85
85
|
combined_options = options
|
86
86
|
.merge(combined_html_options)
|
87
87
|
.merge(default_options.merge(content_or_options_with_block))
|
data/lib/playbook/version.rb
CHANGED
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: 13.27.0.pre.alpha.
|
4
|
+
version: 13.27.0.pre.alpha.PLAY11782918
|
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: 2024-05-
|
12
|
+
date: 2024-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -1049,25 +1049,29 @@ files:
|
|
1049
1049
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
|
1050
1050
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
|
1051
1051
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
|
1052
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.html.erb
|
1053
1052
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
|
1054
1053
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md
|
1054
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.html.erb
|
1055
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.md
|
1055
1056
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx
|
1056
1057
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.md
|
1057
1058
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx
|
1058
1059
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.md
|
1059
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.html.erb
|
1060
1060
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx
|
1061
1061
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
|
1062
|
-
- app/pb_kits/playbook/pb_dropdown/docs/
|
1062
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
|
1063
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md
|
1063
1064
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx
|
1064
1065
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.md
|
1066
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb
|
1067
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.md
|
1065
1068
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb
|
1066
1069
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.jsx
|
1067
1070
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md
|
1068
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.html.erb
|
1069
1071
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx
|
1070
1072
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md
|
1073
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb
|
1074
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.md
|
1071
1075
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.jsx
|
1072
1076
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_hook.jsx
|
1073
1077
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb
|
File without changes
|
File without changes
|
File without changes
|