playbook_ui 14.16.0.pre.rc.6 → 14.17.0.pre.alpha.PBNTR920emojipickerpoc7130
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/pb_advanced_table/Utilities/types.ts +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +104 -2
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +168 -85
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +10 -0
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +20 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +90 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.html.erb +39 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +6 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/index.js +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +4 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +19 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +38 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +49 -37
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +39 -0
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +1 -1
- data/app/pb_kits/playbook/pb_button/_button.scss +5 -5
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +1 -1
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +14 -7
- data/app/pb_kits/playbook/pb_contact/contact.test.js +7 -7
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +34 -34
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +16 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -11
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -7
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +28 -24
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js +2 -2
- data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.test.js +1 -1
- data/app/pb_kits/playbook/pb_draggable/_draggable.scss +115 -5
- data/app/pb_kits/playbook/pb_draggable/_draggable.tsx +6 -4
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +91 -24
- data/app/pb_kits/playbook/pb_draggable/context/types.ts +35 -28
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +184 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +97 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -0
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +3 -3
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +11 -2
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +65 -6
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +3 -0
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +3 -3
- data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +3 -4
- data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +2 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +2 -2
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +67 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +67 -0
- data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +22 -0
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon/_icon.scss +8 -1
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.html.erb +10 -4
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.jsx +49 -24
- data/app/pb_kits/playbook/pb_icon/icon.test.js +9 -9
- data/app/pb_kits/playbook/pb_icon_button/_icon_button.tsx +4 -1
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_click.jsx +13 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon_value/icon_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_label_value/label_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_layout/_layout.scss +58 -0
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +20 -7
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +190 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +5 -0
- data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_layout/layout.test.js +4 -0
- data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +90 -0
- data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +57 -0
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Slide.tsx +1 -1
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.tsx +1 -1
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnails.tsx +1 -1
- data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +1 -1
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +1 -1
- data/app/pb_kits/playbook/pb_link/link.test.jsx +2 -2
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +23 -0
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +28 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.html.erb +72 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.jsx +97 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +71 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +91 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_multi_level_select/index.js +105 -0
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +10 -0
- data/app/pb_kits/playbook/pb_nav/_nav.scss +5 -0
- data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +5 -3
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +29 -11
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.html.erb +4 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +2 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.md +1 -0
- data/app/pb_kits/playbook/pb_stat_change/stat_change.test.js +8 -4
- data/app/pb_kits/playbook/pb_table/_table.tsx +4 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx +50 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.jsx +59 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_table/styles/_headers.scss +76 -0
- data/app/pb_kits/playbook/pb_table/styles/_striped.scss +3 -3
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_head.tsx +11 -1
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_header.tsx +11 -1
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +5 -0
- data/app/pb_kits/playbook/pb_table/table.test.js +17 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_emoji_picker.jsx +371 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_tooltip/index.js +183 -56
- data/app/pb_kits/playbook/pb_tooltip/tooltip.html.erb +2 -5
- data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +4 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +3 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.html.erb +19 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.jsx +23 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -5
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +3 -0
- data/app/pb_kits/playbook/pb_user/_user.tsx +78 -13
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.html.erb +22 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +40 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options_rails.md +5 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options_react.md +5 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_user/user.html.erb +28 -12
- data/app/pb_kits/playbook/pb_user/user.rb +17 -1
- data/app/pb_kits/playbook/pb_user/user.test.js +182 -1
- data/app/pb_kits/playbook/pb_user_badge/user_badge.html.erb +1 -6
- data/app/pb_kits/playbook/tokens/_colors.scss +1 -4
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
- data/app/pb_kits/playbook/utilities/object.test.js +287 -1
- data/app/pb_kits/playbook/utilities/object.ts +171 -3
- data/app/pb_kits/playbook/utilities/text.ts +1 -1
- data/dist/chunks/_typeahead-7W5Ha5Td.js +22 -0
- data/dist/chunks/_weekday_stacked-DSKatW3m.js +45 -0
- data/dist/chunks/lib-BGzBzFZX.js +29 -0
- data/dist/chunks/{pb_form_validation-BvDxpfs-.js → pb_form_validation-BvNy9Bd6.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/forms/builder/multi_level_select_field.rb +2 -0
- data/lib/playbook/kit_base.rb +4 -4
- data/lib/playbook/version.rb +2 -2
- metadata +40 -9
- data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +0 -282
- data/dist/chunks/_typeahead-CRAPc8k-.js +0 -22
- data/dist/chunks/_weekday_stacked-T0kFfioG.js +0 -45
- data/dist/chunks/lib-BeKPJYlk.js +0 -29
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.md → _advanced_table_selectable_rows_no_subrows_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.md → _advanced_table_selectable_rows_react.md} +0 -0
@@ -7,7 +7,7 @@ $pb_pill_height: 25px;
|
|
7
7
|
|
8
8
|
|
9
9
|
$confirmation_toast_colors: (
|
10
|
-
neutral: $
|
10
|
+
neutral: $text_lt_light,
|
11
11
|
success: $success,
|
12
12
|
error: $error,
|
13
13
|
tip: transparent,
|
@@ -87,7 +87,7 @@ $confirmation_toast_colors: (
|
|
87
87
|
overflow: hidden;
|
88
88
|
display: -webkit-box;
|
89
89
|
-webkit-line-clamp: 3;
|
90
|
-
-webkit-box-orient: vertical;
|
90
|
+
-webkit-box-orient: vertical;
|
91
91
|
white-space: normal;
|
92
92
|
text-align: left;
|
93
93
|
}
|
@@ -22,6 +22,72 @@
|
|
22
22
|
|
23
23
|
%>
|
24
24
|
|
25
|
+
<% treeData = [{
|
26
|
+
label: "Power Home Remodeling",
|
27
|
+
value: "Power Home Remodeling",
|
28
|
+
id: "100",
|
29
|
+
expanded: true,
|
30
|
+
children: [
|
31
|
+
{
|
32
|
+
label: "People",
|
33
|
+
value: "People",
|
34
|
+
id: "101",
|
35
|
+
expanded: true,
|
36
|
+
children: [
|
37
|
+
{
|
38
|
+
label: "Talent Acquisition",
|
39
|
+
value: "Talent Acquisition",
|
40
|
+
id: "102",
|
41
|
+
},
|
42
|
+
{
|
43
|
+
label: "Business Affairs",
|
44
|
+
value: "Business Affairs",
|
45
|
+
id: "103",
|
46
|
+
children: [
|
47
|
+
{
|
48
|
+
label: "Initiatives",
|
49
|
+
value: "Initiatives",
|
50
|
+
id: "104",
|
51
|
+
},
|
52
|
+
{
|
53
|
+
label: "Learning & Development",
|
54
|
+
value: "Learning & Development",
|
55
|
+
id: "105",
|
56
|
+
},
|
57
|
+
],
|
58
|
+
},
|
59
|
+
{
|
60
|
+
label: "People Experience",
|
61
|
+
value: "People Experience",
|
62
|
+
id: "106",
|
63
|
+
},
|
64
|
+
],
|
65
|
+
},
|
66
|
+
{
|
67
|
+
label: "Contact Center",
|
68
|
+
value: "Contact Center",
|
69
|
+
id: "107",
|
70
|
+
children: [
|
71
|
+
{
|
72
|
+
label: "Appointment Management",
|
73
|
+
value: "Appointment Management",
|
74
|
+
id: "108",
|
75
|
+
},
|
76
|
+
{
|
77
|
+
label: "Customer Service",
|
78
|
+
value: "Customer Service",
|
79
|
+
id: "109",
|
80
|
+
},
|
81
|
+
{
|
82
|
+
label: "Energy",
|
83
|
+
value: "Energy",
|
84
|
+
id: "110",
|
85
|
+
},
|
86
|
+
],
|
87
|
+
},
|
88
|
+
],
|
89
|
+
}] %>
|
90
|
+
|
25
91
|
<%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
|
26
92
|
<%= form.typeahead :example_typeahead, props: { data: { typeahead_example1: true, user: {} }, label: true, placeholder: "Search for a user" } %>
|
27
93
|
<%= form.text_field :example_text_field, props: { label: true } %>
|
@@ -47,6 +113,7 @@
|
|
47
113
|
<%= form.date_picker :example_date_picker_1, props: { label: true } %>
|
48
114
|
<%= form.star_rating_field :example_star_rating, props: { variant: "interactive", label: true } %>
|
49
115
|
<%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: true } %>
|
116
|
+
<%= form.multi_level_select :example_multi_level_select, props: { id: "multi-level-select-form-default", tree_data: treeData, margin_bottom: "sm", label: "Example Multi Level Select field" } %>
|
50
117
|
|
51
118
|
<%= form.actions do |action| %>
|
52
119
|
<%= action.submit %>
|
@@ -21,6 +21,72 @@
|
|
21
21
|
]
|
22
22
|
%>
|
23
23
|
|
24
|
+
<% treeData = [{
|
25
|
+
label: "Power Home Remodeling",
|
26
|
+
value: "Power Home Remodeling",
|
27
|
+
id: "100",
|
28
|
+
expanded: true,
|
29
|
+
children: [
|
30
|
+
{
|
31
|
+
label: "People",
|
32
|
+
value: "People",
|
33
|
+
id: "101",
|
34
|
+
expanded: true,
|
35
|
+
children: [
|
36
|
+
{
|
37
|
+
label: "Talent Acquisition",
|
38
|
+
value: "Talent Acquisition",
|
39
|
+
id: "102",
|
40
|
+
},
|
41
|
+
{
|
42
|
+
label: "Business Affairs",
|
43
|
+
value: "Business Affairs",
|
44
|
+
id: "103",
|
45
|
+
children: [
|
46
|
+
{
|
47
|
+
label: "Initiatives",
|
48
|
+
value: "Initiatives",
|
49
|
+
id: "104",
|
50
|
+
},
|
51
|
+
{
|
52
|
+
label: "Learning & Development",
|
53
|
+
value: "Learning & Development",
|
54
|
+
id: "105",
|
55
|
+
},
|
56
|
+
],
|
57
|
+
},
|
58
|
+
{
|
59
|
+
label: "People Experience",
|
60
|
+
value: "People Experience",
|
61
|
+
id: "106",
|
62
|
+
},
|
63
|
+
],
|
64
|
+
},
|
65
|
+
{
|
66
|
+
label: "Contact Center",
|
67
|
+
value: "Contact Center",
|
68
|
+
id: "107",
|
69
|
+
children: [
|
70
|
+
{
|
71
|
+
label: "Appointment Management",
|
72
|
+
value: "Appointment Management",
|
73
|
+
id: "108",
|
74
|
+
},
|
75
|
+
{
|
76
|
+
label: "Customer Service",
|
77
|
+
value: "Customer Service",
|
78
|
+
id: "109",
|
79
|
+
},
|
80
|
+
{
|
81
|
+
label: "Energy",
|
82
|
+
value: "Energy",
|
83
|
+
id: "110",
|
84
|
+
},
|
85
|
+
],
|
86
|
+
},
|
87
|
+
],
|
88
|
+
}] %>
|
89
|
+
|
24
90
|
<%= pb_form_with(scope: :example, method: :get, url: "", validate: true) do |form| %>
|
25
91
|
<%= 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
92
|
<%= form.text_field :example_text_field_validation, props: { label: true, required: true } %>
|
@@ -38,6 +104,7 @@
|
|
38
104
|
<%= form.date_picker :example_date_picker_2, props: { label: true, required: true, validation_message: "Please, select a date.", allow_input: true } %>
|
39
105
|
<%= form.star_rating_field :example_star_rating_validation, props: { variant: "interactive", label: true, required: true } %>
|
40
106
|
<%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: true, blank_selection: "Select a Time Zone...", required: true } %>
|
107
|
+
<%= form.multi_level_select :example_multi_level_select, props: { id: "multi-level-select-form", tree_data: treeData, margin_bottom: "sm", required: true, label: "Example Multi Level Select field" } %>
|
41
108
|
|
42
109
|
<%= form.actions do |action| %>
|
43
110
|
<%= action.submit %>
|
@@ -205,4 +205,26 @@
|
|
205
205
|
border-top-left-radius: 0;
|
206
206
|
}
|
207
207
|
}
|
208
|
+
|
209
|
+
.pb_text_input_kit.error {
|
210
|
+
.text_input_wrapper {
|
211
|
+
input:focus {
|
212
|
+
outline: none;
|
213
|
+
}
|
214
|
+
}
|
215
|
+
|
216
|
+
& + * input,
|
217
|
+
& + * select {
|
218
|
+
border-left-color: $red;
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
.pb_text_input_kit:not(.error):focus-within + .error,
|
223
|
+
.pb_text_input_kit:not(.error):focus-within + .pb_select .error {
|
224
|
+
input,
|
225
|
+
select {
|
226
|
+
border-left: none;
|
227
|
+
padding-left: calc(var(--iti-flag-width) + 1px);
|
228
|
+
}
|
229
|
+
}
|
208
230
|
}
|
@@ -13,7 +13,7 @@ import typography from "../tokens/exports/_typography.module.scss";
|
|
13
13
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
|
14
14
|
import { globalProps } from "../utilities/globalProps";
|
15
15
|
import { GenericObject } from "../types";
|
16
|
-
import { merge } from '
|
16
|
+
import { merge } from '../utilities/object'
|
17
17
|
|
18
18
|
type GaugeProps = {
|
19
19
|
aria: { [key: string]: string };
|
@@ -1,10 +1,17 @@
|
|
1
1
|
@import "../tokens/colors";
|
2
2
|
|
3
|
+
$additional_colors: (
|
4
|
+
"light": $text_lt_light,
|
5
|
+
"lighter": $text_lt_lighter,
|
6
|
+
"link": $primary
|
7
|
+
);
|
8
|
+
|
3
9
|
// All the merges below create $icon_colors, a map of all color tokens in colors.scss
|
4
10
|
$merge_kits1: map-merge($status_colors, $category_colors);
|
5
11
|
$merge_kits2: map-merge($merge_kits1, $product_colors);
|
6
12
|
$merge_kits3: map-merge($merge_kits2, $text_colors);
|
7
|
-
$
|
13
|
+
$merge_kits4: map-merge($merge_kits3, $data_colors);
|
14
|
+
$icon_colors: map-merge($merge_kits4, $additional_colors);
|
8
15
|
|
9
16
|
.pb_custom_icon, .pb_icon_kit {
|
10
17
|
@each $color_name, $color_value in $icon_colors {
|
@@ -1,5 +1,11 @@
|
|
1
|
-
<%= pb_rails("flex", props: {
|
2
|
-
<%= pb_rails("icon", props: { icon: "user", fixed_width: true, color: "primary",
|
3
|
-
<%= pb_rails("icon", props: { icon: "recycle", fixed_width: true, color: "data_4",
|
1
|
+
<%= pb_rails("flex", props: { margin_bottom: "sm" }) do %>
|
2
|
+
<%= pb_rails("icon", props: { icon: "user", fixed_width: true, color: "primary", size: "2x" }) %>
|
3
|
+
<%= pb_rails("icon", props: { icon: "recycle", fixed_width: true, color: "data_4", size: "2x" }) %>
|
4
4
|
<%= pb_rails("icon", props: { icon: "roofing", fixed_width: true, color: "product_5_background", size: "2x" }) %>
|
5
|
-
<% end %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<%= pb_rails("flex", props: {}) do %>
|
8
|
+
<%= pb_rails("icon", props: { icon: "user", fixed_width: true, color: "light", size: "2x" }) %>
|
9
|
+
<%= pb_rails("icon", props: { icon: "recycle", fixed_width: true, color: "lighter", size: "2x" }) %>
|
10
|
+
<%= pb_rails("icon", props: { icon: "roofing", fixed_width: true, color: "link", size: "2x" }) %>
|
11
|
+
<% end %>
|
@@ -1,32 +1,57 @@
|
|
1
1
|
import React from "react"
|
2
2
|
import Icon from "../_icon"
|
3
|
+
import Flex from "../../pb_flex/_flex"
|
3
4
|
|
4
5
|
const IconDefault = (props) => {
|
5
6
|
return (
|
6
|
-
<div
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
7
|
+
<div>
|
8
|
+
<Flex marginBottom="sm">
|
9
|
+
<Icon
|
10
|
+
color="primary"
|
11
|
+
fixedWidth
|
12
|
+
icon="user"
|
13
|
+
size="2x"
|
14
|
+
{...props}
|
15
|
+
/>
|
16
|
+
<Icon
|
17
|
+
color="data_4"
|
18
|
+
fixedWidth
|
19
|
+
icon="recycle"
|
20
|
+
size="2x"
|
21
|
+
{...props}
|
22
|
+
/>
|
23
|
+
<Icon
|
24
|
+
color="product_5_background"
|
25
|
+
fixedWidth
|
26
|
+
icon="product-roofing"
|
27
|
+
size="2x"
|
28
|
+
{...props}
|
29
|
+
/>
|
30
|
+
</Flex>
|
31
|
+
|
32
|
+
<Flex>
|
33
|
+
<Icon
|
34
|
+
color="light"
|
35
|
+
fixedWidth
|
36
|
+
icon="user"
|
37
|
+
size="2x"
|
38
|
+
{...props}
|
39
|
+
/>
|
40
|
+
<Icon
|
41
|
+
color="lighter"
|
42
|
+
fixedWidth
|
43
|
+
icon="recycle"
|
44
|
+
size="2x"
|
45
|
+
{...props}
|
46
|
+
/>
|
47
|
+
<Icon
|
48
|
+
color="link"
|
49
|
+
fixedWidth
|
50
|
+
icon="product-roofing"
|
51
|
+
size="2x"
|
52
|
+
{...props}
|
53
|
+
/>
|
54
|
+
</Flex>
|
30
55
|
</div>
|
31
56
|
)
|
32
57
|
}
|
@@ -16,7 +16,7 @@ describe("Icon Kit", () => {
|
|
16
16
|
)
|
17
17
|
|
18
18
|
const kit = screen.getByTestId(testId)
|
19
|
-
expect(kit).toHaveClass("
|
19
|
+
expect(kit).toHaveClass("pb_custom_icon svg-inline--fa svg_fw")
|
20
20
|
})
|
21
21
|
|
22
22
|
test("renders rotate prop", () => {[
|
@@ -31,7 +31,7 @@ describe("Icon Kit", () => {
|
|
31
31
|
)
|
32
32
|
|
33
33
|
const kit = screen.getByTestId(testId)
|
34
|
-
expect(kit).toHaveClass(`
|
34
|
+
expect(kit).toHaveClass(`pb_custom_icon svg-inline--fa rotate_${rotateProp} svg_fw`)
|
35
35
|
|
36
36
|
cleanup()
|
37
37
|
})
|
@@ -48,7 +48,7 @@ describe("Icon Kit", () => {
|
|
48
48
|
)
|
49
49
|
|
50
50
|
const kit = screen.getByTestId(testId)
|
51
|
-
expect(kit).toHaveClass("
|
51
|
+
expect(kit).toHaveClass("pb_custom_icon svg-inline--fa flip_horizontal svg_fw")
|
52
52
|
})
|
53
53
|
|
54
54
|
|
@@ -63,7 +63,7 @@ describe("Icon Kit", () => {
|
|
63
63
|
)
|
64
64
|
|
65
65
|
const kit = screen.getByTestId(testId)
|
66
|
-
expect(kit).toHaveClass("
|
66
|
+
expect(kit).toHaveClass("pb_custom_icon svg-inline--fa spin svg_fw")
|
67
67
|
})
|
68
68
|
|
69
69
|
test("renders pull icon", () => {
|
@@ -77,7 +77,7 @@ describe("Icon Kit", () => {
|
|
77
77
|
)
|
78
78
|
|
79
79
|
const kit = screen.getByTestId(testId)
|
80
|
-
expect(kit).toHaveClass("
|
80
|
+
expect(kit).toHaveClass("pb_custom_icon svg-inline--fa svg_fw pull_left")
|
81
81
|
})
|
82
82
|
|
83
83
|
test("renders pull icon", () => {
|
@@ -91,7 +91,7 @@ describe("Icon Kit", () => {
|
|
91
91
|
)
|
92
92
|
|
93
93
|
const kit = screen.getByTestId(testId)
|
94
|
-
expect(kit).toHaveClass("
|
94
|
+
expect(kit).toHaveClass("pb_custom_icon svg-inline--fa svg_fw pull_left")
|
95
95
|
})
|
96
96
|
|
97
97
|
test("renders border around icon", () => {
|
@@ -105,7 +105,7 @@ describe("Icon Kit", () => {
|
|
105
105
|
)
|
106
106
|
|
107
107
|
const kit = screen.getByTestId(testId)
|
108
|
-
expect(kit).toHaveClass("
|
108
|
+
expect(kit).toHaveClass("pb_custom_icon svg-inline--fa svg_border svg_fw")
|
109
109
|
})
|
110
110
|
|
111
111
|
test("renders size prop", () => {
|
@@ -132,7 +132,7 @@ describe("Icon Kit", () => {
|
|
132
132
|
)
|
133
133
|
|
134
134
|
const kit = screen.getByTestId(testId)
|
135
|
-
expect(kit).toHaveClass(`
|
135
|
+
expect(kit).toHaveClass(`pb_custom_icon svg-inline--fa svg_${sizeProp} svg_fw`)
|
136
136
|
|
137
137
|
cleanup()
|
138
138
|
})
|
@@ -149,7 +149,7 @@ describe("Icon Kit", () => {
|
|
149
149
|
)
|
150
150
|
|
151
151
|
const kit = screen.getByTestId(testId)
|
152
|
-
expect(kit).toHaveClass("
|
152
|
+
expect(kit).toHaveClass("pb_custom_icon svg-inline--fa svg_fw")
|
153
153
|
})
|
154
154
|
|
155
155
|
test("renders with color prop", () => {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
import React from 'react'
|
3
3
|
import classnames from 'classnames'
|
4
|
-
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
4
|
+
import { buildAriaProps, buildCss, buildDataProps, noop } from '../utilities/props'
|
5
5
|
import { globalProps } from '../utilities/globalProps'
|
6
6
|
|
7
7
|
import Button from '../pb_button/_button'
|
@@ -17,6 +17,7 @@ type IconButtonProps = {
|
|
17
17
|
id?: string,
|
18
18
|
link?: string,
|
19
19
|
newWindow?: boolean,
|
20
|
+
onClick?: React.MouseEventHandler<HTMLElement>,
|
20
21
|
size?: IconSizes,
|
21
22
|
target?: string,
|
22
23
|
variant?: 'default' | 'link',
|
@@ -32,6 +33,7 @@ const IconButton = (props: IconButtonProps) => {
|
|
32
33
|
id,
|
33
34
|
link,
|
34
35
|
newWindow = false,
|
36
|
+
onClick = noop,
|
35
37
|
size = "2x",
|
36
38
|
target,
|
37
39
|
variant = "default",
|
@@ -53,6 +55,7 @@ const IconButton = (props: IconButtonProps) => {
|
|
53
55
|
htmlType={htmlType}
|
54
56
|
link={link}
|
55
57
|
newWindow={newWindow}
|
58
|
+
onClick={onClick}
|
56
59
|
target={target}
|
57
60
|
>
|
58
61
|
<Icon
|
@@ -10,6 +10,8 @@ $list-header-height: $space_lg;
|
|
10
10
|
$list-footer-height: $space_lg;
|
11
11
|
$list-border-radius: $border_rad_lighter;
|
12
12
|
$card-border-radius: $border_rad_lightest;
|
13
|
+
$bracket-connector-width: 45px;
|
14
|
+
$bracket-border-width: 4px;
|
13
15
|
|
14
16
|
|
15
17
|
[class^=pb_layout_kit] {
|
@@ -168,6 +170,62 @@ $card-border-radius: $border_rad_lightest;
|
|
168
170
|
}
|
169
171
|
}
|
170
172
|
|
173
|
+
&[class*=_bracket]{
|
174
|
+
display: flex;
|
175
|
+
overflow-x: scroll;
|
176
|
+
|
177
|
+
div.layout_round {
|
178
|
+
display: flex;
|
179
|
+
flex-direction: column;
|
180
|
+
justify-content: space-around;
|
181
|
+
flex-grow: 1;
|
182
|
+
}
|
183
|
+
|
184
|
+
.connector_container {
|
185
|
+
display: flex;
|
186
|
+
flex-direction: column;
|
187
|
+
justify-content: space-around;
|
188
|
+
}
|
189
|
+
.right_connector {
|
190
|
+
border-top: $bracket-border-width solid $border_light;
|
191
|
+
width: $bracket-connector-width;
|
192
|
+
margin-left: $bracket-connector-width;
|
193
|
+
}
|
194
|
+
|
195
|
+
.layout_round .layout_game {
|
196
|
+
position: relative;
|
197
|
+
}
|
198
|
+
|
199
|
+
.half_box {
|
200
|
+
content: '';
|
201
|
+
position: absolute;
|
202
|
+
top: calc(50% - $bracket-border-width / 2);
|
203
|
+
height: calc(100% + $bracket-border-width);
|
204
|
+
width: $bracket-connector-width;
|
205
|
+
right: -$bracket-connector-width;
|
206
|
+
border-top-right-radius: $border_radius_lg;
|
207
|
+
border-bottom-right-radius: $border_radius_lg;
|
208
|
+
border-top: $bracket-border-width solid $border_light;
|
209
|
+
border-bottom: $bracket-border-width solid $border_light;
|
210
|
+
border-right: $bracket-border-width solid $border_light;
|
211
|
+
}
|
212
|
+
|
213
|
+
.layout_round_label {
|
214
|
+
display: none;
|
215
|
+
}
|
216
|
+
|
217
|
+
@media (max-width: $screen-md-max) {
|
218
|
+
flex-direction: column;
|
219
|
+
.layout_round_label {
|
220
|
+
display: block;
|
221
|
+
}
|
222
|
+
.layout_round .layout_game::after,
|
223
|
+
.connector_container,
|
224
|
+
.half_box {
|
225
|
+
display: none !important;
|
226
|
+
}
|
227
|
+
}
|
228
|
+
}
|
171
229
|
|
172
230
|
&[class*=_sidebar]{
|
173
231
|
$layout_sizes: (
|
@@ -4,6 +4,9 @@ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../uti
|
|
4
4
|
|
5
5
|
import { GlobalProps, globalProps, globalInlineProps } from '../utilities/globalProps'
|
6
6
|
|
7
|
+
import { Round, RoundLabel } from "./subcomponents/_round";
|
8
|
+
import Game from "./subcomponents/_game";
|
9
|
+
|
7
10
|
type LayoutPropTypes = {
|
8
11
|
aria?: {[key: string]: string},
|
9
12
|
children?: React.ReactChild[] | React.ReactChild,
|
@@ -18,7 +21,7 @@ type LayoutPropTypes = {
|
|
18
21
|
size?: "xs" | "sm" | "md" | "base" | "lg" | "xl",
|
19
22
|
variant?: "light" | "dark" | "gradient",
|
20
23
|
transparent?: boolean,
|
21
|
-
layout?: "sidebar" | "collection" | "kanban" | "content" | "masonry",
|
24
|
+
layout?: "sidebar" | "collection" | "kanban" | "content" | "masonry" | "bracket",
|
22
25
|
} & GlobalProps
|
23
26
|
|
24
27
|
type LayoutSideProps = {
|
@@ -140,7 +143,7 @@ const Layout = (props: LayoutPropTypes) => {
|
|
140
143
|
const htmlProps = buildHtmlProps(htmlOptions)
|
141
144
|
|
142
145
|
const layoutCss =
|
143
|
-
layout == 'collection'
|
146
|
+
(layout == 'collection' || layout == 'bracket')
|
144
147
|
? `pb_layout_kit_${layout}`
|
145
148
|
: layout == 'kanban'
|
146
149
|
? `pb_layout_kit_${layout}${responsiveClass}`
|
@@ -151,11 +154,9 @@ const Layout = (props: LayoutPropTypes) => {
|
|
151
154
|
})
|
152
155
|
|
153
156
|
const layoutCollapseCss =
|
154
|
-
layout == 'collection'
|
157
|
+
(layout == 'collection' || layout == 'kanban' || layout == 'bracket')
|
155
158
|
? ''
|
156
|
-
: layout
|
157
|
-
? ''
|
158
|
-
: buildCss('layout', position, 'collapse', collapse)
|
159
|
+
: buildCss('layout', position, 'collapse', collapse)
|
159
160
|
|
160
161
|
const layoutChildren = React.Children.toArray(children)
|
161
162
|
|
@@ -175,6 +176,15 @@ const Layout = (props: LayoutPropTypes) => {
|
|
175
176
|
(child: React.ReactElement & {type: {displayName: string}}) => child.type?.displayName !== 'Side'
|
176
177
|
)
|
177
178
|
|
179
|
+
const numberOfRounds = Array.isArray(nonSideChildren) ? React.Children.toArray(children).filter(
|
180
|
+
(child) => {
|
181
|
+
return (child as React.ReactElement).type === Layout.Round;
|
182
|
+
}
|
183
|
+
).length : 0
|
184
|
+
const bracketChildren = nonSideChildren.map(child =>
|
185
|
+
React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds }) : child
|
186
|
+
)
|
187
|
+
|
178
188
|
const filteredProps = {...props}
|
179
189
|
delete filteredProps?.position
|
180
190
|
|
@@ -196,7 +206,7 @@ const Layout = (props: LayoutPropTypes) => {
|
|
196
206
|
style={dynamicInlineProps}
|
197
207
|
>
|
198
208
|
{subComponentTags('Side')}
|
199
|
-
{nonSideChildren}
|
209
|
+
{layout === 'bracket' ? bracketChildren : nonSideChildren}
|
200
210
|
</div>
|
201
211
|
)
|
202
212
|
}
|
@@ -206,5 +216,8 @@ Layout.Body = Body
|
|
206
216
|
Layout.Item = Item
|
207
217
|
Layout.Header = Header
|
208
218
|
Layout.Footer = Footer
|
219
|
+
Layout.Round = Round
|
220
|
+
Layout.Game = Game
|
221
|
+
Layout.RoundLabel = RoundLabel
|
209
222
|
|
210
223
|
export default Layout
|