playbook_ui 15.2.0.pre.alpha.advancedtableicons11557 → 15.2.0.pre.alpha.buttonfix11269
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 +6 -4
- data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers_rails.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_react.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/index.js +1 -5
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +6 -6
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +6 -6
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +2 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +5 -49
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +2 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.jsx +1 -1
- data/app/pb_kits/playbook/pb_draggable/_draggable.scss +0 -8
- data/app/pb_kits/playbook/pb_dropdown/index.js +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +3 -5
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_description.md +0 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -4
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +0 -10
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +2 -1
- data/app/pb_kits/playbook/pb_icon/icon.rb +2 -1
- data/app/pb_kits/playbook/pb_list/item.html.erb +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.tsx +6 -8
- data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.rb +10 -7
- data/app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx +1 -73
- data/app/pb_kits/playbook/pb_pb_circle_chart/_pb_circle_chart.tsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.rb +10 -7
- data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +0 -47
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +22 -105
- data/app/pb_kits/playbook/pb_popover/docs/_popover_list.html.erb +2 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +2 -41
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +20 -60
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +0 -36
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -8
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +0 -6
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.test.js +1 -127
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +1 -1
- data/app/pb_kits/playbook/pb_timeline/_timeline.scss +233 -250
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -1
- data/app/pb_kits/playbook/pb_timeline/timeline.test.js +2 -2
- data/app/pb_kits/playbook/tokens/_positioning.scss +0 -1
- data/app/pb_kits/playbook/utilities/_positioning.scss +1 -6
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -3
- data/dist/chunks/{_line_graph-DtToukzQ.js → _line_graph-BxcVBQsJ.js} +1 -1
- data/dist/chunks/_typeahead-eZENQ_Y_.js +6 -0
- data/dist/chunks/{_weekday_stacked-DWHza5yt.js → _weekday_stacked-BhPyFGlS.js} +3 -3
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +0 -6
- data/dist/playbook-doc.js +2 -2
- 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/pagination_renderer.rb +2 -2
- data/lib/playbook/pb_forms_helper.rb +6 -7
- data/lib/playbook/version.rb +1 -1
- data/lib/playbook/z_index.rb +1 -1
- metadata +5 -46
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +0 -39
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.html.erb +0 -51
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.html.erb +0 -40
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.md +0 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/_pb_line_graph.scss +0 -3
- data/app/pb_kits/playbook/pb_pb_line_graph/_pb_line_graph.tsx +0 -61
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.html.erb +0 -34
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +0 -52
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.md +0 -5
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.html.erb +0 -34
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.jsx +0 -45
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.html.erb +0 -47
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.jsx +0 -64
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.md +0 -3
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.html.erb +0 -24
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.jsx +0 -37
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.html.erb +0 -39
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.jsx +0 -45
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +0 -86
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.jsx +0 -116
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.md +0 -11
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/example.yml +0 -20
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/index.js +0 -6
- data/app/pb_kits/playbook/pb_pb_line_graph/pbLineGraphTheme.ts +0 -125
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.html.erb +0 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.rb +0 -25
- data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.test.jsx +0 -110
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_attributes.jsx +0 -38
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_attributes.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.jsx +0 -34
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.jsx +0 -37
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_simple.jsx +0 -37
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.jsx +0 -38
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.md +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.jsx +0 -69
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.md +0 -1
- data/dist/chunks/_typeahead-nqpbB2ym.js +0 -6
|
@@ -43,287 +43,270 @@ $gap_lg: $height_from_top + $space_lg;
|
|
|
43
43
|
flex-direction: $flex_direction;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
height: $height !important;
|
|
46
|
+
[class^=pb_timeline_kit] {
|
|
47
|
+
&[class*=_horizontal] {
|
|
48
|
+
@include flex_wrapper(row);
|
|
49
|
+
width: 100%;
|
|
50
|
+
>div {
|
|
51
|
+
&:last-child {
|
|
52
|
+
flex-basis: auto !important;
|
|
53
|
+
[class^=pb_timeline_item_step] {
|
|
54
|
+
[class=pb_timeline_item_connector] {
|
|
55
|
+
opacity: 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
[class=pb_timeline_item_right_block] {
|
|
59
|
+
display: block;
|
|
60
|
+
width: 100%;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
}
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
@if $min_width != auto {
|
|
79
|
-
min-width: $min_width;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@if $height != auto {
|
|
83
|
-
height: $height;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@if $display != block {
|
|
87
|
-
display: $display;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@mixin timeline_right_block($margin_bottom: $space_lg) {
|
|
93
|
-
.pb_timeline_item_right_block {
|
|
94
|
-
@include flex_wrapper(column);
|
|
95
|
-
margin-bottom: $margin_bottom;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.pb_timeline_kit_horizontal,
|
|
100
|
-
.pb_timeline_kit_horizontal_with_date {
|
|
101
|
-
@include flex_wrapper(row);
|
|
102
|
-
width: 100%;
|
|
103
|
-
|
|
104
|
-
>div {
|
|
105
|
-
&:last-child {
|
|
106
|
-
flex-basis: auto !important;
|
|
107
|
-
|
|
108
|
-
.pb_timeline_item_step {
|
|
109
|
-
.pb_timeline_item_connector {
|
|
110
|
-
opacity: 0;
|
|
66
|
+
[class*=pb_timeline_item_kit] {
|
|
67
|
+
&[class*=_solid] {
|
|
68
|
+
flex-basis: 100%;
|
|
69
|
+
[class^=pb_timeline_item_step] {
|
|
70
|
+
@include flex_wrapper(row);
|
|
71
|
+
align-items: center;
|
|
72
|
+
margin-top: $space_xs;
|
|
73
|
+
margin-bottom: $space_xs;
|
|
74
|
+
[class=pb_timeline_item_connector] {
|
|
75
|
+
@include pb_timeline_line_solid($connector_width, $connector_width, 0 $icon_margin 0 $icon_margin );
|
|
76
|
+
}
|
|
111
77
|
}
|
|
112
78
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
79
|
+
&[class*=_dotted] {
|
|
80
|
+
flex-basis: 100%;
|
|
81
|
+
[class^=pb_timeline_item_step] {
|
|
82
|
+
@include flex_wrapper(row);
|
|
83
|
+
align-items: center;
|
|
84
|
+
margin-top: $space_xs;
|
|
85
|
+
margin-bottom: $space_xs;
|
|
86
|
+
[class=pb_timeline_item_connector] {
|
|
87
|
+
@include pb_timeline_line_dotted_horizontal($connector_width, $connector_width, 0 $icon_margin 0 $icon_margin );
|
|
88
|
+
}
|
|
89
|
+
}
|
|
119
90
|
}
|
|
120
91
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
92
|
+
&[class*=_with_date] {
|
|
93
|
+
@include flex_wrapper(row);
|
|
94
|
+
width: 100%;
|
|
95
|
+
>div {
|
|
96
|
+
&:last-child {
|
|
97
|
+
flex-basis: auto !important;
|
|
98
|
+
[class^=pb_timeline_item_step] {
|
|
99
|
+
[class=pb_timeline_item_connector] {
|
|
100
|
+
opacity: 0;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
[class=pb_timeline_item_right_block] {
|
|
104
|
+
display: block;
|
|
105
|
+
width: 100%;
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
133
110
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
111
|
+
[class*=pb_timeline_item_kit] {
|
|
112
|
+
&[class*=_solid] {
|
|
113
|
+
flex-basis: 100%;
|
|
114
|
+
[class=pb_timeline_item_left_block] {
|
|
115
|
+
display: flex;
|
|
116
|
+
height: 55px;
|
|
117
|
+
[class=pb_date_stacked_kit_center_sm] {
|
|
118
|
+
[class=pb_date_stacked_day_month] {
|
|
119
|
+
[class=pb_caption_kit_md] {
|
|
120
|
+
text-align: left;
|
|
121
|
+
}
|
|
122
|
+
[class=pb_title_kit_4] {
|
|
123
|
+
text-align: left;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
[class^=pb_timeline_item_step] {
|
|
129
|
+
@include flex_wrapper(row);
|
|
130
|
+
margin-top: $space_xs;
|
|
131
|
+
margin-bottom: $space_xs;
|
|
132
|
+
[class=pb_timeline_item_connector] {
|
|
133
|
+
@include pb_timeline_line_solid($connector_width, $connector_width, 0 $icon_margin 0 $icon_margin );
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
&[class*=_dotted] {
|
|
138
|
+
flex-basis: 100%;
|
|
139
|
+
[class=pb_timeline_item_left_block] {
|
|
140
|
+
height: 55px;
|
|
141
|
+
[class=pb_date_stacked_kit_center_sm] {
|
|
142
|
+
[class=pb_date_stacked_day_month] {
|
|
143
|
+
[class=pb_caption_kit_md] {
|
|
144
|
+
text-align: left;
|
|
145
|
+
}
|
|
146
|
+
[class=pb_title_kit_4] {
|
|
147
|
+
text-align: left;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
[class^=pb_timeline_item_step] {
|
|
153
|
+
@include flex_wrapper(row);
|
|
154
|
+
margin-top: $space_xs;
|
|
155
|
+
margin-bottom: $space_xs;
|
|
156
|
+
[class=pb_timeline_item_connector] {
|
|
157
|
+
@include pb_timeline_line_dotted_horizontal($connector_width, $connector_width, 0 $icon_margin 0 $icon_margin );
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
147
161
|
}
|
|
148
162
|
}
|
|
149
163
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
.pb_date_stacked_day_month {
|
|
159
|
-
.pb_caption_kit_md {
|
|
160
|
-
text-align: left;
|
|
161
|
-
}
|
|
164
|
+
&[class*=_vertical] {
|
|
165
|
+
@include flex_wrapper(column);
|
|
166
|
+
align-items: flex-start;
|
|
167
|
+
align-self: auto;
|
|
168
|
+
>div:last-child {
|
|
169
|
+
[class^=pb_timeline_item_step] {
|
|
170
|
+
[class=pb_timeline_item_connector] {
|
|
171
|
+
opacity: 0;
|
|
162
172
|
}
|
|
163
173
|
}
|
|
164
174
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
+
[class*=pb_timeline_item_kit] {
|
|
176
|
+
@include flex_wrapper(row);
|
|
177
|
+
&[class*=_solid] {
|
|
178
|
+
flex-basis: 100%;
|
|
179
|
+
[class^=pb_timeline_item_step] {
|
|
180
|
+
@include flex_wrapper(column);
|
|
181
|
+
align-items: center;
|
|
182
|
+
align-content: flex-start;
|
|
183
|
+
margin-right: $space_sm;
|
|
184
|
+
margin-left: $space_sm;
|
|
185
|
+
[class=pb_timeline_item_connector] {
|
|
186
|
+
@include pb_timeline_line_solid($connector_width, $connector_width, $icon_margin 0 $icon_margin 0);
|
|
175
187
|
}
|
|
176
188
|
}
|
|
189
|
+
[class=pb_timeline_item_left_block] {
|
|
190
|
+
margin-bottom: $space_lg;
|
|
191
|
+
width: 0px;
|
|
192
|
+
}
|
|
193
|
+
[class=pb_timeline_item_right_block] {
|
|
194
|
+
@include flex_wrapper(column);
|
|
195
|
+
margin-bottom: $space_lg;
|
|
196
|
+
}
|
|
177
197
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
198
|
+
&[class*=_dotted] {
|
|
199
|
+
flex-basis: 100%;
|
|
200
|
+
[class^=pb_timeline_item_step] {
|
|
201
|
+
@include flex_wrapper(column);
|
|
202
|
+
align-items: center;
|
|
203
|
+
margin-right: $space_sm;
|
|
204
|
+
margin-left: $space_sm;
|
|
205
|
+
[class=pb_timeline_item_connector] {
|
|
206
|
+
@include pb_timeline_line_dotted_vertical($connector_width, $connector_width, $icon_margin 0 $icon_margin 0);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
[class=pb_timeline_item_left_block] {
|
|
210
|
+
margin-bottom: $space_lg;
|
|
211
|
+
width: 0px;
|
|
212
|
+
}
|
|
213
|
+
[class=pb_timeline_item_right_block] {
|
|
214
|
+
@include flex_wrapper(column);
|
|
215
|
+
margin-bottom: $space_lg;
|
|
216
|
+
}
|
|
187
217
|
}
|
|
188
218
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
.pb_timeline_kit_vertical_with_date_gap_sm,
|
|
200
|
-
.pb_timeline_kit_vertical_with_date_gap_md,
|
|
201
|
-
.pb_timeline_kit_vertical_with_date_gap_lg {
|
|
202
|
-
@include flex_wrapper(column);
|
|
203
|
-
align-items: flex-start;
|
|
204
|
-
align-self: auto;
|
|
205
|
-
|
|
206
|
-
>div:last-child {
|
|
207
|
-
.pb_timeline_item_step {
|
|
208
|
-
.pb_timeline_item_connector {
|
|
209
|
-
opacity: 0;
|
|
219
|
+
&[class*=_with_date] {
|
|
220
|
+
@include flex_wrapper(column);
|
|
221
|
+
align-items: flex-start;
|
|
222
|
+
align-self: auto;
|
|
223
|
+
>div:last-child {
|
|
224
|
+
[class^=pb_timeline_item_step] {
|
|
225
|
+
[class=pb_timeline_item_connector] {
|
|
226
|
+
opacity: 0;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
210
229
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
230
|
+
[class*=pb_timeline_item_kit] {
|
|
231
|
+
@include flex_wrapper(row);
|
|
232
|
+
&[class*=_solid] {
|
|
233
|
+
flex-basis: 100%;
|
|
234
|
+
[class^=pb_timeline_item_step] {
|
|
235
|
+
@include flex_wrapper(column);
|
|
236
|
+
align-items: center;
|
|
237
|
+
align-content: flex-start;
|
|
238
|
+
margin-right: $space_sm;
|
|
239
|
+
margin-left: $space_sm;
|
|
240
|
+
[class=pb_timeline_item_connector] {
|
|
241
|
+
@include pb_timeline_line_solid($connector_width, $connector_width, $icon_margin 0 $icon_margin 0);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
[class=pb_timeline_item_left_block] {
|
|
245
|
+
margin-bottom: $space_lg;
|
|
246
|
+
min-width: $space_lg;
|
|
247
|
+
}
|
|
248
|
+
[class=pb_timeline_item_right_block] {
|
|
249
|
+
@include flex_wrapper(column);
|
|
250
|
+
margin-bottom: $space_lg;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
&[class*=_dotted] {
|
|
254
|
+
flex-basis: 100%;
|
|
255
|
+
[class^=pb_timeline_item_step] {
|
|
256
|
+
@include flex_wrapper(column);
|
|
257
|
+
align-items: center;
|
|
258
|
+
margin-right: $space_sm;
|
|
259
|
+
margin-left: $space_sm;
|
|
260
|
+
[class=pb_timeline_item_connector] {
|
|
261
|
+
@include pb_timeline_line_dotted_vertical($connector_width, $connector_width, $icon_margin 0 $icon_margin 0);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
[class=pb_timeline_item_left_block] {
|
|
265
|
+
margin-bottom: $space_lg;
|
|
266
|
+
min-width: $space_lg;
|
|
267
|
+
}
|
|
268
|
+
[class=pb_timeline_item_right_block] {
|
|
269
|
+
@include flex_wrapper(column);
|
|
270
|
+
margin-bottom: $space_lg;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
227
273
|
}
|
|
228
274
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
@include flex_wrapper(row);
|
|
237
|
-
flex-basis: 100%;
|
|
238
|
-
|
|
239
|
-
.pb_timeline_item_step {
|
|
240
|
-
@include timeline_item_step_base(column, center, 0, $space_sm);
|
|
241
|
-
|
|
242
|
-
.pb_timeline_item_connector {
|
|
243
|
-
@include pb_timeline_line_dotted_vertical($connector_width,
|
|
244
|
-
$connector_width,
|
|
245
|
-
$icon_margin 0 $icon_margin 0);
|
|
275
|
+
&[class*=_gap_xs] {
|
|
276
|
+
[class*=pb_timeline_item_kit] {
|
|
277
|
+
[class^=pb_timeline_item_step] {
|
|
278
|
+
[class=pb_timeline_item_connector] {
|
|
279
|
+
height: $gap_xs !important;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
246
282
|
}
|
|
247
283
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
&.pb_timeline_kit_vertical_with_date_gap_xs,
|
|
255
|
-
&.pb_timeline_kit_vertical_with_date_gap_sm,
|
|
256
|
-
&.pb_timeline_kit_vertical_with_date_gap_md,
|
|
257
|
-
&.pb_timeline_kit_vertical_with_date_gap_lg {
|
|
258
|
-
@include flex_wrapper(column);
|
|
259
|
-
align-items: flex-start;
|
|
260
|
-
align-self: auto;
|
|
261
|
-
|
|
262
|
-
>div:last-child {
|
|
263
|
-
.pb_timeline_item_step {
|
|
264
|
-
.pb_timeline_item_connector {
|
|
265
|
-
opacity: 0;
|
|
284
|
+
&[class*=_gap_sm] {
|
|
285
|
+
[class*=pb_timeline_item_kit] {
|
|
286
|
+
[class^=pb_timeline_item_step] {
|
|
287
|
+
[class=pb_timeline_item_connector] {
|
|
288
|
+
height: $gap_sm !important;
|
|
289
|
+
}
|
|
266
290
|
}
|
|
267
291
|
}
|
|
268
292
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
.pb_timeline_item_step {
|
|
276
|
-
@include timeline_item_step_base(column, center, 0, $space_sm);
|
|
277
|
-
align-content: flex-start;
|
|
278
|
-
|
|
279
|
-
.pb_timeline_item_connector {
|
|
280
|
-
@include pb_timeline_line_solid($connector_width,
|
|
281
|
-
$connector_width,
|
|
282
|
-
$icon_margin 0 $icon_margin 0);
|
|
293
|
+
&[class*=_gap_md] {
|
|
294
|
+
[class*=pb_timeline_item_kit] {
|
|
295
|
+
[class^=pb_timeline_item_step] {
|
|
296
|
+
[class=pb_timeline_item_connector] {
|
|
297
|
+
height: $gap_md !important;
|
|
298
|
+
}
|
|
283
299
|
}
|
|
284
300
|
}
|
|
285
|
-
|
|
286
|
-
@include timeline_left_block($space_lg, auto, $space_lg);
|
|
287
|
-
@include timeline_right_block($space_lg);
|
|
288
301
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
.pb_timeline_item_connector {
|
|
297
|
-
@include pb_timeline_line_dotted_vertical($connector_width,
|
|
298
|
-
$connector_width,
|
|
299
|
-
$icon_margin 0 $icon_margin 0);
|
|
302
|
+
&[class*=_gap_lg] {
|
|
303
|
+
[class*=pb_timeline_item_kit] {
|
|
304
|
+
[class^=pb_timeline_item_step] {
|
|
305
|
+
[class=pb_timeline_item_connector] {
|
|
306
|
+
height: $gap_lg !important;
|
|
307
|
+
}
|
|
300
308
|
}
|
|
301
309
|
}
|
|
302
|
-
|
|
303
|
-
@include timeline_left_block($space_lg, auto, $space_lg);
|
|
304
|
-
@include timeline_right_block($space_lg);
|
|
305
310
|
}
|
|
306
311
|
}
|
|
307
312
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
.pb_timeline_kit_vertical_gap_xs,
|
|
312
|
-
.pb_timeline_kit_vertical_with_date_gap_xs {
|
|
313
|
-
@include timeline_gap_height($gap_xs);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.pb_timeline_kit_vertical_gap_sm,
|
|
317
|
-
.pb_timeline_kit_vertical__with_date_gap_sm {
|
|
318
|
-
@include timeline_gap_height($gap_sm);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.pb_timeline_kit_vertical_gap_md,
|
|
322
|
-
.pb_timeline_kit_vertical_with_date_gap_md {
|
|
323
|
-
@include timeline_gap_height($gap_md);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.pb_timeline_kit_vertical_gap_lg,
|
|
327
|
-
.pb_timeline_kit_vertical_with_date_gap_lg {
|
|
328
|
-
@include timeline_gap_height($gap_lg);
|
|
329
|
-
}
|
|
@@ -38,7 +38,7 @@ const Timeline = ({
|
|
|
38
38
|
const ariaProps = buildAriaProps(aria)
|
|
39
39
|
const dataProps = buildDataProps(data)
|
|
40
40
|
const htmlProps = buildHtmlProps(htmlOptions)
|
|
41
|
-
const dateStyle = showDate === true ? '
|
|
41
|
+
const dateStyle = showDate === true ? '_with_date' : ''
|
|
42
42
|
const itemGapStyle = itemGap === 'none' ? '' : `gap_${itemGap}`
|
|
43
43
|
const timelineCss = buildCss('pb_timeline_kit', `${orientation}`, dateStyle, itemGapStyle)
|
|
44
44
|
|
|
@@ -161,12 +161,12 @@ test('should pass showDate prop', () => {
|
|
|
161
161
|
const props = { showDate: true }
|
|
162
162
|
render(<TimelineDefault {...props} />)
|
|
163
163
|
const kit = screen.getByTestId(testId)
|
|
164
|
-
expect(kit).toHaveClass('
|
|
164
|
+
expect(kit).toHaveClass('pb_timeline_kit_horizontal__with_date')
|
|
165
165
|
})
|
|
166
166
|
|
|
167
167
|
test('should pass showDate prop with Children', () => {
|
|
168
168
|
const props = { showDate: true }
|
|
169
169
|
render(<TimelineWithChildren {...props} />)
|
|
170
170
|
const kit = screen.getByTestId(testId)
|
|
171
|
-
expect(kit).toHaveClass('
|
|
171
|
+
expect(kit).toHaveClass('pb_timeline_kit_horizontal__with_date')
|
|
172
172
|
})
|
|
@@ -58,10 +58,6 @@
|
|
|
58
58
|
z-index: $z_10 !important;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.z_index_max {
|
|
62
|
-
z-index: $z_max !important;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
61
|
$zIndex_values: (
|
|
66
62
|
1: $z_1,
|
|
67
63
|
2: $z_2,
|
|
@@ -72,8 +68,7 @@ $zIndex_values: (
|
|
|
72
68
|
7: $z_7,
|
|
73
69
|
8: $z_8,
|
|
74
70
|
9: $z_9,
|
|
75
|
-
10: $z_10
|
|
76
|
-
max: $z_max
|
|
71
|
+
10: $z_10
|
|
77
72
|
);
|
|
78
73
|
|
|
79
74
|
@each $size, $size_value in $breakpoints_grid {
|
|
@@ -186,7 +186,7 @@ type VerticalAlign = {
|
|
|
186
186
|
verticalAlign?: "baseline" | "super" | "top" | "middle" | "bottom" | "sub" | "text-top" | "text-bottom"
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
type ZIndexType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
|
|
189
|
+
type ZIndexType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
|
|
190
190
|
type ZIndexResponsiveType = {[key: string]: ZIndexType}
|
|
191
191
|
type ZIndex = {
|
|
192
192
|
zIndex?: ZIndexType,
|
|
@@ -439,8 +439,6 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
|
439
439
|
Object.entries(zIndexEntry[1]).forEach((zIndexObj) => {
|
|
440
440
|
css += `z_index_${zIndexObj[0]}_${zIndexObj[1]} `
|
|
441
441
|
})
|
|
442
|
-
} else if (zIndexEntry[1] === 'max') {
|
|
443
|
-
css += `z_index_max `
|
|
444
442
|
}
|
|
445
443
|
}
|
|
446
444
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx,Fragment,jsxs}from"react/jsx-runtime";import{useState,useEffect}from"react";import{e as buildAriaProps,f as buildDataProps,g as buildHtmlProps,H as HighchartsReact,h as Highcharts,i as classnames,j as globalProps,k as HighchartsMore,S as SolidGauge,l as buildCss}from"./_typeahead-nqpbB2ym.js";import{c as colors,h as highchartsTheme,m as merge,a as highchartsDarkTheme,t as typography}from"./lib-QZuu1ltS.js";const mapColors=array=>{const regex=/(data)\-[1-8]/;const newArray=array.map((item=>regex.test(item)?`${colors[`data_${item[item.length-1]}`]}`:item));return newArray};const BarGraph=({aria:aria={},data:data={},align:align="center",axisTitle:axisTitle,dark:dark=false,chartData:chartData,className:className="pb_bar_graph",colors:colors2,htmlOptions:htmlOptions={},customOptions:customOptions={},axisFormat:axisFormat,id:id,pointStart:pointStart,stacking:stacking,subTitle:subTitle,type:type="column",title:title="Title",xAxisCategories:xAxisCategories,yAxisMin:yAxisMin,yAxisMax:yAxisMax,legend:legend=false,toggleLegendClick:toggleLegendClick=true,height:height,layout:layout="horizontal",verticalAlign:verticalAlign="bottom",x:x=0,y:y=0,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();const staticOptions={title:{text:title},chart:{height:height,type:type},subtitle:{text:subTitle},yAxis:[{labels:{format:typeof axisFormat==="string"?axisFormat:axisFormat&&axisFormat[0]?axisFormat[0].format:""},min:yAxisMin,max:yAxisMax,opposite:false,title:{text:Array.isArray(axisTitle)?axisTitle.length>0?axisTitle[0].name:null:axisTitle},plotLines:typeof yAxisMin!=="undefined"&&yAxisMin!==null?[]:[{value:0,zIndex:10,color:"#E4E8F0"}]}],xAxis:{categories:xAxisCategories},legend:{enabled:legend,align:align,verticalAlign:verticalAlign,layout:layout,x:x,y:y},colors:colors2!==void 0&&colors2.length>0?mapColors(colors2):highchartsTheme.colors,plotOptions:{series:{stacking:stacking,pointStart:pointStart,borderWidth:stacking?0:"",events:{},dataLabels:{enabled:false}}},series:chartData,credits:false};if(Array.isArray(axisTitle)&&axisTitle.length>1&&axisTitle[1].name){staticOptions.yAxis.push({labels:{format:typeof axisFormat==="string"?axisFormat:axisFormat[1].format},min:yAxisMin,max:yAxisMax,opposite:true,title:{text:axisTitle[1].name},plotLines:typeof yAxisMin!=="undefined"&&yAxisMin!==null?[]:[{value:0,zIndex:10,color:"#E4E8F0"}]})}if(!toggleLegendClick){staticOptions.plotOptions.series.events={legendItemClick:()=>false}}const filteredProps={...props};delete filteredProps.verticalAlign;const[options,setOptions]=useState({});useEffect((()=>{setOptions(merge(staticOptions,customOptions))}),[chartData]);return jsx(HighchartsReact,{containerProps:{className:classnames(globalProps(filteredProps),className),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})};const alignBlockElement=event=>{const itemToMove=document.querySelector(`#wrapper-circle-chart-${event.target.renderTo.id} .pb-circle-chart-block`);const chartContainer=document.querySelector(`#${event.target.renderTo.id}`);if(itemToMove!==null&&chartContainer!==null){itemToMove.style.height=`${event.target.chartHeight}px`;itemToMove.style.width=`${event.target.chartWidth}px`;if(chartContainer.firstChild!==null){chartContainer.firstChild.before(itemToMove)}}};const CircleChart=({align:align="center",aria:aria={},rounded:rounded=false,borderColor:borderColor=(rounded?null:""),borderWidth:borderWidth=(rounded?20:null),chartData:chartData,children:children,className:className,colors:colors2=[],customOptions:customOptions={},dark:dark=false,data:data={},dataLabelHtml:dataLabelHtml="<div>{point.name}</div>",dataLabels:dataLabels=false,height:height,htmlOptions:htmlOptions={},id:id,innerSize:innerSize="md",legend:legend=false,maxPointSize:maxPointSize=null,minPointSize:minPointSize=null,startAngle:startAngle=null,style:style="pie",title:title,tooltipHtml:tooltipHtml,useHtml:useHtml=false,zMin:zMin=null,layout:layout="horizontal",verticalAlign:verticalAlign="bottom",x:x=0,y:y=0,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);HighchartsMore(Highcharts);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();Highcharts.setOptions({tooltip:{headerFormat:null,pointFormat:tooltipHtml?tooltipHtml:'<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',useHTML:useHtml}});const innerSizes={sm:"35%",md:"50%",lg:"85%",none:"0%"};const innerSizeFormat=size=>innerSizes[size];const filteredProps={...props};delete filteredProps.verticalAlign;const[options,setOptions]=useState({});useEffect((()=>{const formattedChartData=chartData.map((obj=>{obj.y=obj.value;delete obj.value;return obj}));const staticOptions={title:{text:title},chart:{height:height,type:style,events:{render:event=>alignBlockElement(event),redraw:event=>alignBlockElement(event)}},legend:{align:align,verticalAlign:verticalAlign,layout:layout,x:x,y:y},plotOptions:{pie:{colors:colors2.length>0?mapColors(colors2):highchartsTheme.colors,dataLabels:{enabled:dataLabels,connectorShape:"straight",connectorWidth:3,format:dataLabelHtml},showInLegend:legend}},series:[{minPointSize:minPointSize,maxPointSize:maxPointSize,innerSize:borderWidth==20?"100%":innerSizeFormat(innerSize),data:formattedChartData,zMin:zMin,startAngle:startAngle,borderWidth:borderWidth,borderColor:borderColor}],credits:false};setOptions(merge(staticOptions,customOptions))}),[chartData]);return jsx(Fragment,{children:children?jsxs("div",{id:`wrapper-circle-chart-${id}`,children:[jsx(HighchartsReact,{containerProps:{className:classnames("pb_circle_chart",globalProps(filteredProps)),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options}),jsx("div",{className:"pb-circle-chart-block",children:children})]}):jsx(HighchartsReact,{containerProps:{className:classnames("pb_circle_chart",globalProps(filteredProps)),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})})};const Gauge=({aria:aria={},chartData:chartData,customOptions:customOptions={},dark:dark=false,data:data={},disableAnimation:disableAnimation=false,fullCircle:fullCircle=false,height:height=null,htmlOptions:htmlOptions={},id:id,max:max=100,min:min=0,prefix:prefix="",showLabels:showLabels=false,style:style="solidgauge",suffix:suffix="",title:title="",tooltipHtml:tooltipHtml='<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',colors:colors$1=[],minorTickInterval:minorTickInterval=null,circumference:circumference=(fullCircle?[0,360]:[-100,100]),...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);HighchartsMore(Highcharts);SolidGauge(Highcharts);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();Highcharts.setOptions({tooltip:{pointFormat:tooltipHtml,followPointer:true}});const css=buildCss({pb_gauge_kit:true});const[options,setOptions]=useState({});useEffect((()=>{const formattedChartData=chartData.map((obj=>{obj.y=obj.value;delete obj.value;return obj}));const staticOptions={chart:{events:{load(){setTimeout(this.reflow.bind(this),0)}},type:style,height:height},title:{text:title},yAxis:{min:min,max:max,lineWidth:0,tickWidth:0,minorTickInterval:minorTickInterval,tickAmount:2,tickPositions:[min,max],labels:{y:26,enabled:showLabels}},credits:false,series:[{data:formattedChartData}],pane:{center:["50%","50%"],size:"90%",startAngle:circumference[0],endAngle:circumference[1],background:{borderWidth:20,innerRadius:"90%",outerRadius:"90%",shape:"arc",className:"gauge-pane"}},colors:colors$1!==void 0&&colors$1.length>0?mapColors(colors$1):highchartsTheme.colors,plotOptions:{series:{animation:!disableAnimation},solidgauge:{borderColor:colors$1!==void 0&&colors$1.length===1?mapColors(colors$1).join():highchartsTheme.colors[0],borderWidth:20,radius:90,innerRadius:"90%",dataLabels:{borderWidth:0,color:colors.text_lt_default,enabled:true,format:`<span class="prefix${dark?" dark":""}">${prefix}</span><span class="fix${dark?" dark":""}">{y:,f}</span><span class="suffix${dark?" dark":""}">${suffix}</span>`,style:{fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_2},y:-26}}}};setOptions(merge(staticOptions,customOptions));if(document.querySelector(".prefix")){document.querySelectorAll(".prefix").forEach((prefix2=>{prefix2.setAttribute("y","28")}));document.querySelectorAll(".fix").forEach((fix=>fix.setAttribute("y","38")))}}),[chartData]);return jsx(HighchartsReact,{containerProps:{className:classnames(css,globalProps(props)),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})};const LineGraph=({aria:aria={},data:data={},align:align="center",className:className="pb_bar_graph",customOptions:customOptions={},dark:dark=false,gradient:gradient=false,type:type="line",htmlOptions:htmlOptions={},id:id,legend:legend=false,toggleLegendClick:toggleLegendClick=true,layout:layout="horizontal",verticalAlign:verticalAlign="bottom",x:x=0,y:y=0,axisTitle:axisTitle,xAxisCategories:xAxisCategories,yAxisMin:yAxisMin,yAxisMax:yAxisMax,chartData:chartData,pointStart:pointStart,subTitle:subTitle,title:title,height:height,colors:colors2=[],...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();const staticOptions={title:{text:title},chart:{height:height,type:type},subtitle:{text:subTitle},yAxis:{min:yAxisMin,max:yAxisMax,title:{text:axisTitle}},xAxis:{categories:xAxisCategories},legend:{enabled:legend,align:align,verticalAlign:verticalAlign,layout:layout,x:x,y:y},colors:colors2!==void 0&&colors2.length>0?mapColors(colors2):highchartsTheme.colors,plotOptions:{series:{pointStart:pointStart,events:{},dataLabels:{enabled:false}}},series:chartData,credits:false};if(!toggleLegendClick){staticOptions.plotOptions.series.events={legendItemClick:()=>false}}const filteredProps={...props};delete filteredProps.verticalAlign;const[options,setOptions]=useState({});useEffect((()=>{setOptions(merge(staticOptions,customOptions))}),[chartData]);return jsx(HighchartsReact,{containerProps:{className:classnames(globalProps(filteredProps),className),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})};export{BarGraph as B,CircleChart as C,Gauge as G,LineGraph as L};
|
|
1
|
+
import{jsx,Fragment,jsxs}from"react/jsx-runtime";import{useState,useEffect}from"react";import{d as buildAriaProps,e as buildDataProps,f as buildHtmlProps,H as HighchartsReact,g as Highcharts,h as classnames,i as globalProps,j as HighchartsMore,S as SolidGauge,k as buildCss}from"./_typeahead-eZENQ_Y_.js";import{c as colors,h as highchartsTheme,m as merge,a as highchartsDarkTheme,t as typography}from"./lib-QZuu1ltS.js";const mapColors=array=>{const regex=/(data)\-[1-8]/;const newArray=array.map((item=>regex.test(item)?`${colors[`data_${item[item.length-1]}`]}`:item));return newArray};const BarGraph=({aria:aria={},data:data={},align:align="center",axisTitle:axisTitle,dark:dark=false,chartData:chartData,className:className="pb_bar_graph",colors:colors2,htmlOptions:htmlOptions={},customOptions:customOptions={},axisFormat:axisFormat,id:id,pointStart:pointStart,stacking:stacking,subTitle:subTitle,type:type="column",title:title="Title",xAxisCategories:xAxisCategories,yAxisMin:yAxisMin,yAxisMax:yAxisMax,legend:legend=false,toggleLegendClick:toggleLegendClick=true,height:height,layout:layout="horizontal",verticalAlign:verticalAlign="bottom",x:x=0,y:y=0,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();const staticOptions={title:{text:title},chart:{height:height,type:type},subtitle:{text:subTitle},yAxis:[{labels:{format:typeof axisFormat==="string"?axisFormat:axisFormat&&axisFormat[0]?axisFormat[0].format:""},min:yAxisMin,max:yAxisMax,opposite:false,title:{text:Array.isArray(axisTitle)?axisTitle.length>0?axisTitle[0].name:null:axisTitle},plotLines:typeof yAxisMin!=="undefined"&&yAxisMin!==null?[]:[{value:0,zIndex:10,color:"#E4E8F0"}]}],xAxis:{categories:xAxisCategories},legend:{enabled:legend,align:align,verticalAlign:verticalAlign,layout:layout,x:x,y:y},colors:colors2!==void 0&&colors2.length>0?mapColors(colors2):highchartsTheme.colors,plotOptions:{series:{stacking:stacking,pointStart:pointStart,borderWidth:stacking?0:"",events:{},dataLabels:{enabled:false}}},series:chartData,credits:false};if(Array.isArray(axisTitle)&&axisTitle.length>1&&axisTitle[1].name){staticOptions.yAxis.push({labels:{format:typeof axisFormat==="string"?axisFormat:axisFormat[1].format},min:yAxisMin,max:yAxisMax,opposite:true,title:{text:axisTitle[1].name},plotLines:typeof yAxisMin!=="undefined"&&yAxisMin!==null?[]:[{value:0,zIndex:10,color:"#E4E8F0"}]})}if(!toggleLegendClick){staticOptions.plotOptions.series.events={legendItemClick:()=>false}}const filteredProps={...props};delete filteredProps.verticalAlign;const[options,setOptions]=useState({});useEffect((()=>{setOptions(merge(staticOptions,customOptions))}),[chartData]);return jsx(HighchartsReact,{containerProps:{className:classnames(globalProps(filteredProps),className),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})};const alignBlockElement=event=>{const itemToMove=document.querySelector(`#wrapper-circle-chart-${event.target.renderTo.id} .pb-circle-chart-block`);const chartContainer=document.querySelector(`#${event.target.renderTo.id}`);if(itemToMove!==null&&chartContainer!==null){itemToMove.style.height=`${event.target.chartHeight}px`;itemToMove.style.width=`${event.target.chartWidth}px`;if(chartContainer.firstChild!==null){chartContainer.firstChild.before(itemToMove)}}};const CircleChart=({align:align="center",aria:aria={},rounded:rounded=false,borderColor:borderColor=(rounded?null:""),borderWidth:borderWidth=(rounded?20:null),chartData:chartData,children:children,className:className,colors:colors2=[],customOptions:customOptions={},dark:dark=false,data:data={},dataLabelHtml:dataLabelHtml="<div>{point.name}</div>",dataLabels:dataLabels=false,height:height,htmlOptions:htmlOptions={},id:id,innerSize:innerSize="md",legend:legend=false,maxPointSize:maxPointSize=null,minPointSize:minPointSize=null,startAngle:startAngle=null,style:style="pie",title:title,tooltipHtml:tooltipHtml,useHtml:useHtml=false,zMin:zMin=null,layout:layout="horizontal",verticalAlign:verticalAlign="bottom",x:x=0,y:y=0,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);HighchartsMore(Highcharts);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();Highcharts.setOptions({tooltip:{headerFormat:null,pointFormat:tooltipHtml?tooltipHtml:'<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',useHTML:useHtml}});const innerSizes={sm:"35%",md:"50%",lg:"85%",none:"0%"};const innerSizeFormat=size=>innerSizes[size];const filteredProps={...props};delete filteredProps.verticalAlign;const[options,setOptions]=useState({});useEffect((()=>{const formattedChartData=chartData.map((obj=>{obj.y=obj.value;delete obj.value;return obj}));const staticOptions={title:{text:title},chart:{height:height,type:style,events:{render:event=>alignBlockElement(event),redraw:event=>alignBlockElement(event)}},legend:{align:align,verticalAlign:verticalAlign,layout:layout,x:x,y:y},plotOptions:{pie:{colors:colors2.length>0?mapColors(colors2):highchartsTheme.colors,dataLabels:{enabled:dataLabels,connectorShape:"straight",connectorWidth:3,format:dataLabelHtml},showInLegend:legend}},series:[{minPointSize:minPointSize,maxPointSize:maxPointSize,innerSize:borderWidth==20?"100%":innerSizeFormat(innerSize),data:formattedChartData,zMin:zMin,startAngle:startAngle,borderWidth:borderWidth,borderColor:borderColor}],credits:false};setOptions(merge(staticOptions,customOptions))}),[chartData]);return jsx(Fragment,{children:children?jsxs("div",{id:`wrapper-circle-chart-${id}`,children:[jsx(HighchartsReact,{containerProps:{className:classnames("pb_circle_chart",globalProps(filteredProps)),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options}),jsx("div",{className:"pb-circle-chart-block",children:children})]}):jsx(HighchartsReact,{containerProps:{className:classnames("pb_circle_chart",globalProps(filteredProps)),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})})};const Gauge=({aria:aria={},chartData:chartData,customOptions:customOptions={},dark:dark=false,data:data={},disableAnimation:disableAnimation=false,fullCircle:fullCircle=false,height:height=null,htmlOptions:htmlOptions={},id:id,max:max=100,min:min=0,prefix:prefix="",showLabels:showLabels=false,style:style="solidgauge",suffix:suffix="",title:title="",tooltipHtml:tooltipHtml='<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',colors:colors$1=[],minorTickInterval:minorTickInterval=null,circumference:circumference=(fullCircle?[0,360]:[-100,100]),...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);HighchartsMore(Highcharts);SolidGauge(Highcharts);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();Highcharts.setOptions({tooltip:{pointFormat:tooltipHtml,followPointer:true}});const css=buildCss({pb_gauge_kit:true});const[options,setOptions]=useState({});useEffect((()=>{const formattedChartData=chartData.map((obj=>{obj.y=obj.value;delete obj.value;return obj}));const staticOptions={chart:{events:{load(){setTimeout(this.reflow.bind(this),0)}},type:style,height:height},title:{text:title},yAxis:{min:min,max:max,lineWidth:0,tickWidth:0,minorTickInterval:minorTickInterval,tickAmount:2,tickPositions:[min,max],labels:{y:26,enabled:showLabels}},credits:false,series:[{data:formattedChartData}],pane:{center:["50%","50%"],size:"90%",startAngle:circumference[0],endAngle:circumference[1],background:{borderWidth:20,innerRadius:"90%",outerRadius:"90%",shape:"arc",className:"gauge-pane"}},colors:colors$1!==void 0&&colors$1.length>0?mapColors(colors$1):highchartsTheme.colors,plotOptions:{series:{animation:!disableAnimation},solidgauge:{borderColor:colors$1!==void 0&&colors$1.length===1?mapColors(colors$1).join():highchartsTheme.colors[0],borderWidth:20,radius:90,innerRadius:"90%",dataLabels:{borderWidth:0,color:colors.text_lt_default,enabled:true,format:`<span class="prefix${dark?" dark":""}">${prefix}</span><span class="fix${dark?" dark":""}">{y:,f}</span><span class="suffix${dark?" dark":""}">${suffix}</span>`,style:{fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_2},y:-26}}}};setOptions(merge(staticOptions,customOptions));if(document.querySelector(".prefix")){document.querySelectorAll(".prefix").forEach((prefix2=>{prefix2.setAttribute("y","28")}));document.querySelectorAll(".fix").forEach((fix=>fix.setAttribute("y","38")))}}),[chartData]);return jsx(HighchartsReact,{containerProps:{className:classnames(css,globalProps(props)),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})};const LineGraph=({aria:aria={},data:data={},align:align="center",className:className="pb_bar_graph",customOptions:customOptions={},dark:dark=false,gradient:gradient=false,type:type="line",htmlOptions:htmlOptions={},id:id,legend:legend=false,toggleLegendClick:toggleLegendClick=true,layout:layout="horizontal",verticalAlign:verticalAlign="bottom",x:x=0,y:y=0,axisTitle:axisTitle,xAxisCategories:xAxisCategories,yAxisMin:yAxisMin,yAxisMax:yAxisMax,chartData:chartData,pointStart:pointStart,subTitle:subTitle,title:title,height:height,colors:colors2=[],...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();const staticOptions={title:{text:title},chart:{height:height,type:type},subtitle:{text:subTitle},yAxis:{min:yAxisMin,max:yAxisMax,title:{text:axisTitle}},xAxis:{categories:xAxisCategories},legend:{enabled:legend,align:align,verticalAlign:verticalAlign,layout:layout,x:x,y:y},colors:colors2!==void 0&&colors2.length>0?mapColors(colors2):highchartsTheme.colors,plotOptions:{series:{pointStart:pointStart,events:{},dataLabels:{enabled:false}}},series:chartData,credits:false};if(!toggleLegendClick){staticOptions.plotOptions.series.events={legendItemClick:()=>false}}const filteredProps={...props};delete filteredProps.verticalAlign;const[options,setOptions]=useState({});useEffect((()=>{setOptions(merge(staticOptions,customOptions))}),[chartData]);return jsx(HighchartsReact,{containerProps:{className:classnames(globalProps(filteredProps),className),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})};export{BarGraph as B,CircleChart as C,Gauge as G,LineGraph as L};
|