playbook_ui 14.10.0.pre.alpha.play16825301 → 14.10.0.pre.rc.0
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/_playbook.scss +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx +6 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +19 -32
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +6 -46
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +36 -94
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -8
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -4
- data/app/pb_kits/playbook/pb_advanced_table/index.js +92 -185
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +8 -57
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +13 -18
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -78
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +3 -12
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +2 -15
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +6 -10
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +4 -8
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +2 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +9 -11
- data/app/pb_kits/playbook/pb_badge/_badge.scss +2 -4
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +49 -53
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +36 -29
- data/app/pb_kits/playbook/pb_body/_body.scss +13 -14
- data/app/pb_kits/playbook/pb_body/_body_mixins.scss +16 -22
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +1 -3
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +0 -6
- data/app/pb_kits/playbook/pb_button/_button.scss +1 -3
- data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -2
- data/app/pb_kits/playbook/pb_card/_card.scss +3 -21
- data/app/pb_kits/playbook/pb_card/_card.tsx +7 -7
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +2 -2
- data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +1 -39
- data/app/pb_kits/playbook/pb_card/docs/_card_header.jsx +0 -90
- data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +2 -4
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +0 -3
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +0 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb +0 -8
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx +0 -9
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +4 -9
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +2 -2
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +1 -3
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss +3 -5
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +4 -6
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +2 -4
- data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +2 -2
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +8 -10
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +0 -5
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +17 -31
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_accept.jsx +1 -3
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_description.jsx +1 -4
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_max_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +2 -8
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +2 -11
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +4 -6
- data/app/pb_kits/playbook/pb_gauge/_gauge.scss +1 -31
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +3 -3
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +5 -25
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -17
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb +1 -17
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx +0 -15
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md +1 -2
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +1 -15
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +14 -4
- data/app/pb_kits/playbook/pb_label_value/_label_value.scss +2 -4
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +11 -30
- data/app/pb_kits/playbook/pb_link/_link.scss +3 -3
- data/app/pb_kits/playbook/pb_message/_message_mixins.scss +1 -3
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +1 -3
- data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +1 -11
- data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +2 -16
- data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +1 -1
- data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +2 -2
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +3 -5
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +8 -10
- data/app/pb_kits/playbook/pb_pill/_pill.scss +2 -4
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +2 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +2 -4
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +1 -64
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -3
- data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_section_separator/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +1 -4
- data/app/pb_kits/playbook/pb_select/_select.scss +3 -5
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +7 -9
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.scss +2 -2
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +2 -8
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +3 -9
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.html.erb +12 -8
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb +1 -48
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +36 -44
- data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +4 -4
- data/app/pb_kits/playbook/pb_table/_table.tsx +24 -80
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +1 -4
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -9
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -7
- data/app/pb_kits/playbook/pb_table/index.ts +26 -102
- data/app/pb_kits/playbook/pb_table/styles/_all.scss +1 -2
- data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +2 -63
- data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +4 -17
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +1 -106
- data/app/pb_kits/playbook/pb_table/table.html.erb +2 -8
- data/app/pb_kits/playbook/pb_table/table.rb +2 -21
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -3
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +4 -43
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +2 -219
- data/app/pb_kits/playbook/pb_textarea/_textarea.scss +1 -3
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +4 -5
- data/app/pb_kits/playbook/pb_timeline/_timeline.scss +2 -4
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +5 -5
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.html.erb +5 -4
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.jsx +4 -4
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.md +1 -1
- data/app/pb_kits/playbook/pb_timeline/timeline.rb +6 -6
- data/app/pb_kits/playbook/pb_title/_title.scss +5 -6
- data/app/pb_kits/playbook/pb_title/_title_mixin.scss +0 -13
- data/app/pb_kits/playbook/pb_toggle/_toggle.scss +3 -5
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +46 -115
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +2 -9
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -3
- data/app/pb_kits/playbook/tokens/_titles.scss +8 -0
- data/app/pb_kits/playbook/utilities/_hover.scss +2 -11
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +9 -20
- data/app/pb_kits/playbook/utilities/test/globalProps/hover.test.js +0 -15
- data/dist/chunks/_typeahead-B8fkIeXA.js +22 -0
- data/dist/chunks/_weekday_stacked-CiL8BjKa.js +45 -0
- data/dist/chunks/{lib-B7sgJtGS.js → lib-SyD3buPZ.js} +3 -3
- data/dist/chunks/{pb_form_validation-C5Cc0-1v.js → pb_form_validation-Dt8UJgrJ.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +2 -2
- 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/classnames.rb +0 -1
- data/lib/playbook/hover.rb +1 -7
- data/lib/playbook/spacing.rb +0 -21
- data/lib/playbook/version.rb +2 -2
- metadata +8 -59
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +0 -36
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.html.erb +0 -43
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.jsx +0 -60
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb +0 -58
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx +0 -74
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -50
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -57
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +0 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json +0 -5600
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.md +0 -1
- data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +0 -57
- data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb +0 -32
- data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb +0 -29
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.html.erb +0 -10
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +0 -42
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.html.erb +0 -9
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_rails.md +0 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.html.erb +0 -7
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.html.erb +0 -119
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.jsx +0 -174
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.html.erb +0 -15
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width_rails.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.html.erb +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.html.erb +0 -63
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.jsx +0 -97
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +0 -88
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb +0 -77
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +0 -87
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +0 -5
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +0 -75
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx +0 -108
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +0 -94
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.md +0 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.jsx +0 -83
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.jsx +0 -120
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +0 -1
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -35
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx +0 -106
- data/app/pb_kits/playbook/pb_text_input/inputMask.ts +0 -108
- data/app/pb_kits/playbook/utilities/_gap.scss +0 -29
- data/dist/chunks/_typeahead-C2iCBqxQ.js +0 -36
- data/dist/chunks/_weekday_stacked-CWnbnW7m.js +0 -45
- /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_border_radius_react.md → _skeleton_loading_border_radius.md} +0 -0
- /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_height_width_react.md → _skeleton_loading_height_width.md} +0 -0
@@ -181,96 +181,6 @@ const CardHeader = (props) => {
|
|
181
181
|
/>
|
182
182
|
</Card.Body>
|
183
183
|
</Card>
|
184
|
-
|
185
|
-
<Title
|
186
|
-
{...props}
|
187
|
-
marginBottom='sm'
|
188
|
-
size={4}
|
189
|
-
tag="h4"
|
190
|
-
text="Status Colors"
|
191
|
-
/>
|
192
|
-
|
193
|
-
<Card
|
194
|
-
{...props}
|
195
|
-
marginBottom='sm'
|
196
|
-
padding="none"
|
197
|
-
>
|
198
|
-
<Card.Header
|
199
|
-
headerColor="success"
|
200
|
-
>
|
201
|
-
<Body
|
202
|
-
dark
|
203
|
-
text="Success"
|
204
|
-
/>
|
205
|
-
</Card.Header>
|
206
|
-
<Card.Body>
|
207
|
-
<Body
|
208
|
-
{...props}
|
209
|
-
text="Body"
|
210
|
-
/>
|
211
|
-
</Card.Body>
|
212
|
-
</Card>
|
213
|
-
|
214
|
-
<Card
|
215
|
-
{...props}
|
216
|
-
marginBottom='sm'
|
217
|
-
padding="none"
|
218
|
-
>
|
219
|
-
<Card.Header
|
220
|
-
headerColor="error"
|
221
|
-
>
|
222
|
-
<Body
|
223
|
-
dark
|
224
|
-
text="Error"
|
225
|
-
/>
|
226
|
-
</Card.Header>
|
227
|
-
<Card.Body>
|
228
|
-
<Body
|
229
|
-
{...props}
|
230
|
-
text="Body"
|
231
|
-
/>
|
232
|
-
</Card.Body>
|
233
|
-
</Card>
|
234
|
-
|
235
|
-
<Card
|
236
|
-
{...props}
|
237
|
-
marginBottom='sm'
|
238
|
-
padding="none"
|
239
|
-
>
|
240
|
-
<Card.Header
|
241
|
-
headerColor="success_subtle"
|
242
|
-
>
|
243
|
-
<Body
|
244
|
-
text="Success Subtle"
|
245
|
-
/>
|
246
|
-
</Card.Header>
|
247
|
-
<Card.Body>
|
248
|
-
<Body
|
249
|
-
{...props}
|
250
|
-
text="Body"
|
251
|
-
/>
|
252
|
-
</Card.Body>
|
253
|
-
</Card>
|
254
|
-
|
255
|
-
<Card
|
256
|
-
{...props}
|
257
|
-
marginBottom='sm'
|
258
|
-
padding="none"
|
259
|
-
>
|
260
|
-
<Card.Header
|
261
|
-
headerColor="error_subtle"
|
262
|
-
>
|
263
|
-
<Body
|
264
|
-
text="Error Subtle"
|
265
|
-
/>
|
266
|
-
</Card.Header>
|
267
|
-
<Card.Body>
|
268
|
-
<Body
|
269
|
-
{...props}
|
270
|
-
text="Body"
|
271
|
-
/>
|
272
|
-
</Card.Body>
|
273
|
-
</Card>
|
274
184
|
</>
|
275
185
|
)
|
276
186
|
}
|
@@ -1 +1 @@
|
|
1
|
-
Card headers pass category, product,
|
1
|
+
Card headers pass category, product, and background colors only. List of all category, product, and background colors can be viewed <a href="https://playbook.powerapp.cloud/visual_guidelines/colors" target="_blank">here</a>.
|
@@ -1,5 +1,3 @@
|
|
1
|
-
@use "sass:math";
|
2
|
-
|
3
1
|
@import "../pb_button/button";
|
4
2
|
@import "../pb_button/button_mixins";
|
5
3
|
|
@@ -18,7 +16,7 @@ $pb_button_styles: (
|
|
18
16
|
flex-grow: 0;
|
19
17
|
width: $pb_button_size;
|
20
18
|
height: $pb_button_size;
|
21
|
-
border-radius:
|
19
|
+
border-radius: $pb_button_size / 2;
|
22
20
|
line-height: $pb_button_size;
|
23
21
|
flex-basis: $pb_button_size;
|
24
22
|
min-width: $pb_button_size;
|
@@ -55,4 +53,4 @@ $pb_button_styles: (
|
|
55
53
|
}
|
56
54
|
}
|
57
55
|
}
|
58
|
-
}
|
56
|
+
}
|
@@ -20,7 +20,6 @@ type CircleIconButtonProps = {
|
|
20
20
|
onClick?: React.MouseEventHandler<HTMLElement>,
|
21
21
|
newWindow?: boolean,
|
22
22
|
type?: 'button' | 'submit' | 'reset' | undefined,
|
23
|
-
target?: string
|
24
23
|
variant?: 'primary' | 'secondary' | 'link',
|
25
24
|
}
|
26
25
|
|
@@ -37,7 +36,6 @@ const CircleIconButton = (props: CircleIconButtonProps): React.ReactElement => {
|
|
37
36
|
loading = false,
|
38
37
|
onClick = noop,
|
39
38
|
type,
|
40
|
-
target,
|
41
39
|
link,
|
42
40
|
newWindow,
|
43
41
|
variant,
|
@@ -68,7 +66,6 @@ const CircleIconButton = (props: CircleIconButtonProps): React.ReactElement => {
|
|
68
66
|
loading={loading}
|
69
67
|
newWindow={newWindow}
|
70
68
|
onClick={onClick}
|
71
|
-
target={target}
|
72
69
|
text={null}
|
73
70
|
variant={variant}
|
74
71
|
>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= pb_content_tag do %>
|
2
|
-
<%= pb_rails("button", props: {type: object.type, loading: object.loading, link: object.link, new_window:object.new_window, variant: object.variant,
|
2
|
+
<%= pb_rails("button", props: {type: object.type, loading: object.loading, link: object.link, new_window:object.new_window, variant: object.variant, disabled: object.disabled, dark: object.dark}) do %>
|
3
3
|
<%= pb_rails("icon", props: {icon: object.icon, fixed_width: true, dark: object.dark}) %>
|
4
4
|
<% end %>
|
5
5
|
<% end %>
|
@@ -10,11 +10,3 @@
|
|
10
10
|
link: "https://google.com",
|
11
11
|
new_window: true
|
12
12
|
}) %>
|
13
|
-
<br/>
|
14
|
-
<%= pb_rails("circle_icon_button", props: {
|
15
|
-
icon: "info",
|
16
|
-
variant: "secondary",
|
17
|
-
aria: { label: "Link to Playbook in new window" },
|
18
|
-
link: "https://playbook.powerapp.cloud/",
|
19
|
-
target: "child"
|
20
|
-
}) %>
|
@@ -21,15 +21,6 @@ const CircleIconButtonLink = (props) => (
|
|
21
21
|
{...props}
|
22
22
|
/>
|
23
23
|
|
24
|
-
<br/>
|
25
|
-
|
26
|
-
<CircleIconButton
|
27
|
-
aria={{ label: "Link to Playbook in new window" }}
|
28
|
-
icon="info"
|
29
|
-
link="https://playbook.powerapp.cloud/"
|
30
|
-
target="child"
|
31
|
-
variant="secondary"
|
32
|
-
/>
|
33
24
|
</div>
|
34
25
|
)
|
35
26
|
|
@@ -2,7 +2,7 @@ import React, { useEffect, ReactElement } from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
3
3
|
import useCollapsible from './useCollapsible'
|
4
4
|
|
5
|
-
import { globalProps, globalInlineProps
|
5
|
+
import { globalProps, globalInlineProps } from '../utilities/globalProps'
|
6
6
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
7
7
|
|
8
8
|
import CollapsibleContent from './child_kits/CollapsibleContent'
|
@@ -32,7 +32,6 @@ type CollapsibleProps = {
|
|
32
32
|
onClick?: ()=> void,
|
33
33
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
34
34
|
id?: string,
|
35
|
-
tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div' | 'tr' | 'th' | 'td' | 'thead' | 'col',
|
36
35
|
}
|
37
36
|
|
38
37
|
const Collapsible = ({
|
@@ -48,9 +47,8 @@ const Collapsible = ({
|
|
48
47
|
onIconClick,
|
49
48
|
onClick,
|
50
49
|
id,
|
51
|
-
tag = 'div',
|
52
50
|
...props
|
53
|
-
}: CollapsibleProps
|
51
|
+
}: CollapsibleProps): React.ReactElement => {
|
54
52
|
const [isCollapsed, toggle, setIsCollapsed] = useCollapsible(collapsed)
|
55
53
|
|
56
54
|
useEffect(()=> {
|
@@ -78,12 +76,9 @@ const Collapsible = ({
|
|
78
76
|
className
|
79
77
|
)
|
80
78
|
const dynamicInlineProps = globalInlineProps(props)
|
81
|
-
|
82
|
-
const Tag: React.ReactElement | any = `${tag}`;
|
83
|
-
|
84
79
|
return (
|
85
80
|
<CollapsibleContext.Provider value={{ collapsed: isCollapsed, toggle, icon, iconSize, iconColor, onIconClick, onClick }}>
|
86
|
-
<
|
81
|
+
<div
|
87
82
|
{...ariaProps}
|
88
83
|
{...dataProps}
|
89
84
|
{...htmlProps}
|
@@ -101,7 +96,7 @@ const Collapsible = ({
|
|
101
96
|
<CollapsibleContent {...contentProps}>
|
102
97
|
{contentChildren}
|
103
98
|
</CollapsibleContent>
|
104
|
-
</
|
99
|
+
</div>
|
105
100
|
</CollapsibleContext.Provider>
|
106
101
|
)
|
107
102
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import classnames from 'classnames'
|
2
2
|
import React, { useContext, useRef, useEffect } from 'react'
|
3
3
|
import { buildCss } from '../../utilities/props'
|
4
|
-
import { globalProps
|
4
|
+
import { globalProps } from '../../utilities/globalProps'
|
5
5
|
import { hideElement, showElement } from '../_helper_functions'
|
6
6
|
|
7
7
|
import CollapsibleContext from '../context'
|
@@ -15,7 +15,7 @@ const CollapsibleContent = ({
|
|
15
15
|
children,
|
16
16
|
className,
|
17
17
|
...props
|
18
|
-
}: CollapsibleContentProps
|
18
|
+
}: CollapsibleContentProps): React.ReactElement => {
|
19
19
|
const context: {[key: string]: boolean | string} = useContext(CollapsibleContext)
|
20
20
|
const contentCSS = buildCss('pb_collapsible_content_kit')
|
21
21
|
const contentSpacing = globalProps(props)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import classnames from 'classnames'
|
4
4
|
import React, { useContext } from 'react'
|
5
5
|
import { buildCss } from '../../utilities/props'
|
6
|
-
import { globalProps
|
6
|
+
import { globalProps } from '../../utilities/globalProps'
|
7
7
|
|
8
8
|
import Flex from '../../pb_flex/_flex'
|
9
9
|
import FlexItem from '../../pb_flex/_flex_item'
|
@@ -25,7 +25,7 @@ const CollapsibleMain = ({
|
|
25
25
|
className,
|
26
26
|
cursor = 'pointer',
|
27
27
|
...props
|
28
|
-
}: CollapsibleMainProps
|
28
|
+
}: CollapsibleMainProps): React.ReactElement=> {
|
29
29
|
const {collapsed, toggle, icon, iconSize, iconColor, onIconClick, onClick}: any = useContext(CollapsibleContext)
|
30
30
|
const mainCSS = buildCss('pb_collapsible_main_kit')
|
31
31
|
const mainSpacing = globalProps(props, { cursor })
|
@@ -1,5 +1,3 @@
|
|
1
|
-
@use "sass:math";
|
2
|
-
|
3
1
|
@import "../../pb_textarea/textarea_mixin";
|
4
2
|
|
5
3
|
[class^=pb_date_picker_kit] {
|
@@ -43,7 +41,7 @@
|
|
43
41
|
&.error {
|
44
42
|
.date_picker_input_wrapper {
|
45
43
|
[class*=pb_body_kit] {
|
46
|
-
margin-top:
|
44
|
+
margin-top: $space_xs / 2;
|
47
45
|
}
|
48
46
|
|
49
47
|
input,
|
@@ -1,5 +1,3 @@
|
|
1
|
-
@use "sass:math";
|
2
|
-
|
3
1
|
@media (min-width: 500px) {
|
4
2
|
.flatpickr-calendar {
|
5
3
|
padding: $space_xs;
|
@@ -8,8 +6,8 @@
|
|
8
6
|
width: 315.88px
|
9
7
|
}
|
10
8
|
.flatpickr-months {
|
11
|
-
margin-left:
|
12
|
-
margin-top:
|
9
|
+
margin-left: $space_xs / 4;
|
10
|
+
margin-top: $space_xs / 3;
|
13
11
|
}
|
14
12
|
}
|
15
13
|
@media (max-width: 499px) {
|
@@ -21,7 +19,7 @@
|
|
21
19
|
}
|
22
20
|
}
|
23
21
|
// Firefox Header Adjustments
|
24
|
-
@supports (-moz-appearance:none) {
|
22
|
+
@supports (-moz-appearance:none) {
|
25
23
|
select.flatpickr-monthDropdown-months {
|
26
24
|
width: 97px !important;
|
27
25
|
margin-left: $space_xs + 3;
|
@@ -1,5 +1,3 @@
|
|
1
|
-
@use "sass:math";
|
2
|
-
|
3
1
|
[class^=pb_date_range_inline_kit] {
|
4
2
|
&[class*=_center] {
|
5
3
|
& > [class^=pb_caption],
|
@@ -23,14 +21,14 @@
|
|
23
21
|
display: flex;
|
24
22
|
align-items: center;
|
25
23
|
[class*=pb_date_range_inline_arrow] {
|
26
|
-
margin-left:
|
27
|
-
margin-right:
|
24
|
+
margin-left: $space_xs/2;
|
25
|
+
margin-right: $space_xs/2;
|
28
26
|
}
|
29
27
|
[class*=pb_date_range_inline_timezone] {
|
30
|
-
margin-left:
|
28
|
+
margin-left: $space_xs/2;
|
31
29
|
}
|
32
30
|
[class*=pb_date_range_inline_icon] {
|
33
|
-
margin-right:
|
31
|
+
margin-right: $space_xs/2;
|
34
32
|
}
|
35
33
|
}
|
36
34
|
}
|
@@ -1,5 +1,3 @@
|
|
1
|
-
@use "sass:math";
|
2
|
-
|
3
1
|
[class^=pb_date_time_stacked] {
|
4
2
|
|
5
3
|
[class^=padding_month] {
|
@@ -21,7 +19,7 @@
|
|
21
19
|
|
22
20
|
}
|
23
21
|
.date-time-padding {
|
24
|
-
padding-right:
|
25
|
-
padding-left:
|
22
|
+
padding-right: $space_xs / 2;
|
23
|
+
padding-left: $space_xs / 2;
|
26
24
|
}
|
27
25
|
|
@@ -287,6 +287,7 @@ const Drawer = (props: DrawerProps): React.ReactElement => {
|
|
287
287
|
{...ariaProps}
|
288
288
|
{...dataProps}
|
289
289
|
{...htmlProps}
|
290
|
+
style={dynamicInlineProps}
|
290
291
|
className={classnames(drawerClassNames.base, {
|
291
292
|
[drawerClassNames.afterOpen]:
|
292
293
|
animationState === "afterOpen",
|
@@ -295,7 +296,6 @@ const Drawer = (props: DrawerProps): React.ReactElement => {
|
|
295
296
|
})}
|
296
297
|
id={id}
|
297
298
|
onClick={(e) => e.stopPropagation()}
|
298
|
-
style={dynamicInlineProps}
|
299
299
|
>
|
300
300
|
{children}
|
301
301
|
</div>
|
@@ -306,6 +306,7 @@ const Drawer = (props: DrawerProps): React.ReactElement => {
|
|
306
306
|
{...dataProps}
|
307
307
|
{...htmlProps}
|
308
308
|
className={classes}
|
309
|
+
style={dynamicInlineProps}
|
309
310
|
>
|
310
311
|
{isModalVisible && (
|
311
312
|
<div
|
@@ -326,7 +327,6 @@ const Drawer = (props: DrawerProps): React.ReactElement => {
|
|
326
327
|
animationState === "beforeClose",
|
327
328
|
})}
|
328
329
|
onClick={(e) => e.stopPropagation()}
|
329
|
-
style={dynamicInlineProps}
|
330
330
|
>
|
331
331
|
{children}
|
332
332
|
</div>
|
@@ -1,5 +1,3 @@
|
|
1
|
-
@use "sass:math";
|
2
|
-
|
3
1
|
@import "../tokens/colors";
|
4
2
|
@import "../tokens/spacing";
|
5
3
|
@import "../tokens/typography";
|
@@ -124,7 +122,7 @@
|
|
124
122
|
|
125
123
|
&.error {
|
126
124
|
[class*=pb_body_kit] {
|
127
|
-
margin-top:
|
125
|
+
margin-top: $space_xs / 2;
|
128
126
|
}
|
129
127
|
|
130
128
|
[class*="dropdown_trigger_wrapper"] {
|
@@ -148,7 +146,7 @@
|
|
148
146
|
&[class*="subtle"] {
|
149
147
|
.dropdown_wrapper {
|
150
148
|
.pb_dropdown_container {
|
151
|
-
|
149
|
+
|
152
150
|
[class*="pb_dropdown_option"]:first-child {
|
153
151
|
margin-top: $space_xs;
|
154
152
|
}
|
@@ -163,7 +161,7 @@
|
|
163
161
|
border-radius: $border_radius_md;
|
164
162
|
border-bottom: none;
|
165
163
|
position: relative;
|
166
|
-
|
164
|
+
|
167
165
|
&::after {
|
168
166
|
content: "";
|
169
167
|
position: absolute;
|
@@ -174,20 +172,20 @@
|
|
174
172
|
background: $border_light;
|
175
173
|
}
|
176
174
|
}
|
177
|
-
|
175
|
+
|
178
176
|
[class*="pb_dropdown_option"]:last-child::after {
|
179
|
-
display: none;
|
177
|
+
display: none;
|
180
178
|
}
|
181
179
|
}
|
182
180
|
}
|
183
|
-
|
181
|
+
|
184
182
|
&[class*="separators_hidden"] {
|
185
183
|
.dropdown_wrapper {
|
186
184
|
.pb_dropdown_container {
|
187
185
|
[class*="pb_dropdown_option"]:first-child {
|
188
186
|
margin-top: $space_xs;
|
189
187
|
}
|
190
|
-
|
188
|
+
|
191
189
|
[class*="pb_dropdown_option"]:last-child {
|
192
190
|
margin-bottom: $space_xs;
|
193
191
|
}
|
@@ -195,7 +193,7 @@
|
|
195
193
|
[class*="pb_dropdown_option"] {
|
196
194
|
padding: $space_xxs $space_xs;
|
197
195
|
margin: $space_xxs $space_xs;
|
198
|
-
|
196
|
+
|
199
197
|
&::after {
|
200
198
|
height: 0px;
|
201
199
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useEffect, useCallback, useRef } from 'react'
|
2
|
-
import { useDropzone, DropzoneInputProps, DropzoneRootProps
|
2
|
+
import { useDropzone, DropzoneInputProps, DropzoneRootProps } from 'react-dropzone'
|
3
3
|
import classnames from 'classnames'
|
4
4
|
|
5
5
|
import { buildCss, buildDataProps, noop, buildHtmlProps } from '../utilities/props'
|
@@ -9,19 +9,16 @@ import type { Callback } from '../types'
|
|
9
9
|
import Body from '../pb_body/_body'
|
10
10
|
import Card from '../pb_card/_card'
|
11
11
|
|
12
|
-
import { isEmpty } from '../utilities/object'
|
13
|
-
|
14
12
|
type FileUploadProps = {
|
15
|
-
accept?:
|
13
|
+
accept?: string[],
|
16
14
|
className?: string,
|
17
15
|
customMessage?: string,
|
18
|
-
dark?: boolean,
|
19
16
|
data?: {[key: string]: string | number},
|
20
17
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
21
18
|
acceptedFilesDescription?: string,
|
22
19
|
maxSize?: number,
|
23
20
|
onFilesAccepted: Callback<File, File>,
|
24
|
-
onFilesRejected: (error: string, files:
|
21
|
+
onFilesRejected: (error: string, files: File[]) => void,
|
25
22
|
}
|
26
23
|
|
27
24
|
const getFormattedFileSize = (fileSize: number): string => {
|
@@ -30,11 +27,10 @@ const getFormattedFileSize = (fileSize: number): string => {
|
|
30
27
|
|
31
28
|
const FileUpload = (props: FileUploadProps): React.ReactElement => {
|
32
29
|
const {
|
33
|
-
accept =
|
30
|
+
accept = null,
|
34
31
|
acceptedFilesDescription = '',
|
35
32
|
className,
|
36
33
|
customMessage,
|
37
|
-
dark = false,
|
38
34
|
data = {},
|
39
35
|
htmlOptions = {},
|
40
36
|
maxSize,
|
@@ -50,37 +46,30 @@ const FileUpload = (props: FileUploadProps): React.ReactElement => {
|
|
50
46
|
getRootProps: () => DropzoneRootProps & any;
|
51
47
|
getInputProps: () => DropzoneInputProps & any;
|
52
48
|
isDragActive: boolean;
|
53
|
-
|
49
|
+
rejectedFiles: File[];
|
54
50
|
}
|
55
51
|
|
56
|
-
const { getRootProps, getInputProps, isDragActive,
|
52
|
+
const { getRootProps, getInputProps, isDragActive, rejectedFiles }: DropZoneProps = useDropzone({
|
57
53
|
accept,
|
58
54
|
maxSize,
|
59
55
|
onDrop,
|
60
56
|
})
|
61
57
|
|
62
|
-
const prevRejected = useRef<
|
58
|
+
const prevRejected = useRef<File[] | null>(null);
|
63
59
|
|
64
|
-
|
65
|
-
if (maxSize !== undefined) {
|
66
|
-
maxFileSizeText = `Max file size is ${getFormattedFileSize(maxSize)}.`
|
67
|
-
}
|
60
|
+
const maxFileSizeText = `Max file size is ${getFormattedFileSize(maxSize)}.`
|
68
61
|
|
69
62
|
useEffect(() => {
|
70
|
-
if (
|
71
|
-
const isFileTooLarge = maxSize &&
|
63
|
+
if (rejectedFiles === prevRejected.current) return
|
64
|
+
const isFileTooLarge = maxSize && rejectedFiles.length > 0 && rejectedFiles[0].size > maxSize;
|
72
65
|
if (isFileTooLarge) {
|
73
|
-
onFilesRejected(`File size is too large! ${maxFileSizeText}`,
|
66
|
+
onFilesRejected(`File size is too large! ${maxFileSizeText}`, rejectedFiles)
|
74
67
|
}
|
75
|
-
prevRejected.current =
|
76
|
-
}, [maxFileSizeText, maxSize, onFilesRejected,
|
68
|
+
prevRejected.current = rejectedFiles
|
69
|
+
}, [maxFileSizeText, maxSize, onFilesRejected, rejectedFiles])
|
77
70
|
|
78
71
|
const acceptedFileTypes = () => {
|
79
|
-
|
80
|
-
return []
|
81
|
-
}
|
82
|
-
|
83
|
-
return Object.keys(accept).map((fileType) => {
|
72
|
+
return accept.map((fileType) => {
|
84
73
|
if (fileType.startsWith('image/')) {
|
85
74
|
return fileType.replace('image/', ' ')
|
86
75
|
} else {
|
@@ -95,7 +84,7 @@ const FileUpload = (props: FileUploadProps): React.ReactElement => {
|
|
95
84
|
const getDescription = () => {
|
96
85
|
return customMessage
|
97
86
|
? customMessage
|
98
|
-
: `Choose a file or drag it here.${
|
87
|
+
: `Choose a file or drag it here.${accept === null ? '' : ` The accepted file types are: ${acceptedFilesDescription || acceptedFileTypes()}.`}${maxSize ? ` ${maxFileSizeText}` : ''}`;
|
99
88
|
}
|
100
89
|
|
101
90
|
return (
|
@@ -105,12 +94,9 @@ const FileUpload = (props: FileUploadProps): React.ReactElement => {
|
|
105
94
|
{...htmlProps}
|
106
95
|
{...getRootProps()}
|
107
96
|
>
|
108
|
-
<Card
|
97
|
+
<Card>
|
109
98
|
<input {...getInputProps()} />
|
110
|
-
<Body
|
111
|
-
color="light"
|
112
|
-
dark={dark}
|
113
|
-
>
|
99
|
+
<Body color="light">
|
114
100
|
{isDragActive ?
|
115
101
|
<p>{'Drop the files here ...'}</p>
|
116
102
|
:
|
@@ -25,10 +25,7 @@ const FileUploadCustomDescription = (props) => {
|
|
25
25
|
{...props}
|
26
26
|
/>
|
27
27
|
<FileUpload
|
28
|
-
accept={
|
29
|
-
"application/pdf": [".pdf"],
|
30
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
|
31
|
-
}}
|
28
|
+
accept={['application/pdf','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']}
|
32
29
|
acceptedFilesDescription="Adobe (.pdf) and Microsoft (.xslx)"
|
33
30
|
onFilesAccepted={handleOnFilesAccepted}
|
34
31
|
{...props}
|
@@ -18,7 +18,7 @@ const AcceptedFilesList = ({ files }) => (
|
|
18
18
|
const RejectedFilesList = ({ files }) => (
|
19
19
|
<List>
|
20
20
|
{files.map((file) => (
|
21
|
-
<ListItem key={file.
|
21
|
+
<ListItem key={file.name}><Body color="error">{`${file.name} (file too large)`}</Body></ListItem>
|
22
22
|
))}
|
23
23
|
</List>
|
24
24
|
)
|
@@ -5,17 +5,11 @@
|
|
5
5
|
id: object.id,
|
6
6
|
**combined_html_options) do %>
|
7
7
|
<%= pb_rails("form_group", props: {cursor: "pointer", full_width: object.full_width}) do %>
|
8
|
-
<label
|
9
|
-
for="upload-<%= object.id %>"
|
10
|
-
class="pb_button_kit_secondary_inline_enabled <%= 'dark' if object.dark %>"
|
11
|
-
>
|
12
|
-
<%= "#{object.label}" %>
|
13
|
-
</label>
|
8
|
+
<label for="upload-<%= object.id %>" class="pb_button_kit_secondary_inline_enabled"><%= "#{object.label}" %></label>
|
14
9
|
<%= pb_rails("text_input", props: {
|
15
10
|
type: "file",
|
16
|
-
dark: object.dark,
|
17
11
|
input_options: {
|
18
|
-
id: "upload-#{object.id}",
|
12
|
+
id: "upload-#{object.id}",
|
19
13
|
classname: "cursor_pointer",
|
20
14
|
}.merge(object.input_options)
|
21
15
|
}) %>
|