playbook_ui 7.0.1.pre.alpha14 → 7.0.1.pre.alpha15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/playbook/application_controller.rb +0 -2
- data/app/pb_kits/playbook/_playbook.scss +1 -1
- data/app/pb_kits/playbook/data/menu.yml +5 -4
- data/app/pb_kits/playbook/index.js +4 -1
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.html.erb +1 -12
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +1 -1
- data/app/pb_kits/playbook/pb_body/body.rb +1 -1
- data/app/pb_kits/playbook/pb_button/_button_mixins.scss +1 -0
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +3 -3
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +82 -90
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_dark.scss +57 -0
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +27 -0
- data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.rb +4 -2
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.html.erb +17 -7
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx +32 -9
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.html.erb +18 -7
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.jsx +37 -9
- data/app/pb_kits/playbook/pb_button_toolbar/docs/example.yml +3 -7
- data/app/pb_kits/playbook/pb_button_toolbar/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_caption/_caption.html.erb +7 -5
- data/app/pb_kits/playbook/pb_caption/docs/_caption_block.html.erb +11 -0
- data/app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx +28 -0
- data/app/pb_kits/playbook/pb_caption/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_caption/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.html.erb +1 -2
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +1 -3
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +3 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +34 -32
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb +1 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx +1 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.jsx +4 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.html.erb +9 -9
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.jsx +8 -8
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.md +3 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.html.erb +8 -14
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +122 -39
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +33 -2
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.rb +44 -9
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.html.erb +14 -1
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx +45 -1
- data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.html.erb +1 -8
- data/app/pb_kits/playbook/pb_distribution_bar/distribution_bar.rb +7 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.html.erb +3 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +29 -15
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +10 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.html.erb +21 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.jsx +38 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.html.erb +2 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.html.erb +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.jsx +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +7 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +18 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +9 -6
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_simple_form.html.erb +3 -3
- data/app/pb_kits/playbook/pb_form/docs/_form_simple_form_validate.html.erb +3 -3
- data/app/pb_kits/playbook/pb_form/form_builder/checkbox_field.rb +7 -2
- data/app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb +1 -0
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.html.erb +1 -13
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +1 -1
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +7 -6
- data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_wrong_numbers.jsx +1 -0
- data/app/pb_kits/playbook/pb_popover/_popover.scss +6 -4
- data/app/pb_kits/playbook/pb_popover/index.js +3 -1
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +3 -0
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +168 -33
- data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.html.erb +3 -1
- data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.jsx +10 -8
- data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +14 -16
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +6 -3
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.html.erb +17 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.jsx +17 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.jsx +10 -3
- data/app/pb_kits/playbook/pb_progress_step/progress_step.rb +11 -1
- data/app/pb_kits/playbook/pb_progress_step/progress_step_item.rb +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx +68 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.md +2 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.html.erb +61 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.jsx +89 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_one_action.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_one_action.jsx +68 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_one_action.md +2 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.html.erb +43 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.jsx +80 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.jsx +63 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +12 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +6 -0
- data/app/pb_kits/playbook/pb_time/_time.html.erb +17 -20
- data/app/pb_kits/playbook/pb_time/_time.jsx +40 -27
- data/app/pb_kits/playbook/pb_time/_time.scss +4 -24
- data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +4 -1
- data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +11 -11
- data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +13 -1
- data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +4 -1
- data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +3 -1
- data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +7 -2
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +5 -5
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +4 -4
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_options.html.erb +10 -0
- data/app/pb_kits/playbook/pb_toggle/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_toggle/toggle.rb +5 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.html.erb +24 -20
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +19 -1
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +8 -1
- data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +21 -13
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_context_dark.html.erb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb +25 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +0 -3
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.md +8 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.html.erb +30 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md +11 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.html.erb +25 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +0 -3
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.md +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +24 -1
- data/app/pb_kits/playbook/react_rails_kits.js +6 -0
- data/app/pb_kits/playbook/tokens/_colors.scss +22 -23
- data/app/pb_kits/playbook/tokens/_typography.scss +4 -4
- data/app/pb_kits/playbook/tokens/index.scss +11 -0
- data/app/pb_kits/playbook/vendor.js +8 -0
- data/lib/generators/kit/kit_generator.rb +1 -1
- data/lib/playbook/engine.rb +1 -0
- data/lib/playbook/version.rb +1 -1
- data/lib/tasks/changelog.rake +14 -0
- data/lib/tasks/pb_release.rake +14 -3
- metadata +35 -81
- data/app/controllers/playbook/guides_controller.rb +0 -11
- data/app/controllers/playbook/pages_controller.rb +0 -99
- data/app/controllers/playbook/samples_controller.rb +0 -40
- data/app/pb_kits/playbook/packs/application.js +0 -55
- data/app/pb_kits/playbook/packs/examples.js +0 -182
- data/app/pb_kits/playbook/packs/main.scss +0 -12
- data/app/pb_kits/playbook/packs/samples.js +0 -21
- data/app/pb_kits/playbook/packs/site_styles/_samples.scss +0 -72
- data/app/pb_kits/playbook/packs/site_styles/_scaffold.scss +0 -43
- data/app/pb_kits/playbook/packs/site_styles/_site-style.scss +0 -146
- data/app/pb_kits/playbook/packs/site_styles/docs/_all.scss +0 -10
- data/app/pb_kits/playbook/packs/site_styles/docs/_bg_light_doc_example.scss +0 -7
- data/app/pb_kits/playbook/packs/site_styles/docs/_code_snippet.scss +0 -531
- data/app/pb_kits/playbook/packs/site_styles/docs/_color_utilities.scss +0 -92
- data/app/pb_kits/playbook/packs/site_styles/docs/_flex_examples.scss +0 -15
- data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +0 -148
- data/app/pb_kits/playbook/packs/site_styles/docs/_kits_examples.scss +0 -15
- data/app/pb_kits/playbook/packs/site_styles/docs/_markdown.scss +0 -88
- data/app/pb_kits/playbook/packs/site_styles/docs/_spacing_tokens.scss +0 -72
- data/app/pb_kits/playbook/pb_background/_background.html.erb +0 -14
- data/app/pb_kits/playbook/pb_background/_background.jsx +0 -64
- data/app/pb_kits/playbook/pb_background/_background.scss +0 -15
- data/app/pb_kits/playbook/pb_background/background.rb +0 -36
- data/app/pb_kits/playbook/pb_background/docs/_background_default.html.erb +0 -41
- data/app/pb_kits/playbook/pb_background/docs/_background_default.jsx +0 -75
- data/app/pb_kits/playbook/pb_background/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_background/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.html.erb +0 -11
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.jsx +0 -29
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.html.erb +0 -11
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.jsx +0 -34
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.html.erb +0 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx +0 -13
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md +0 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.html.erb +0 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.jsx +0 -13
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_summary.jsx +0 -45
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_summary.jsx +0 -27
- data/app/views/layouts/playbook/_mobile_hamburger.html.erb +0 -2
- data/app/views/layouts/playbook/_nav.html.erb +0 -37
- data/app/views/layouts/playbook/_sidebar.html.erb +0 -51
- data/app/views/layouts/playbook/application.html.erb +0 -26
- data/app/views/layouts/playbook/fullscreen.html.slim +0 -10
- data/app/views/layouts/playbook/grid.html.slim +0 -10
- data/app/views/layouts/playbook/samples.html.erb +0 -19
- data/app/views/playbook/guides/create_kit.html.slim +0 -16
- data/app/views/playbook/guides/create_kit/_file_naming.html.md +0 -2
- data/app/views/playbook/guides/create_kit/_generator.html.md +0 -6
- data/app/views/playbook/guides/create_kit/_kit_examples.html.md +0 -2
- data/app/views/playbook/guides/create_kit/_kit_rails.html.md +0 -2
- data/app/views/playbook/guides/create_kit/_kit_react.html.md +0 -2
- data/app/views/playbook/guides/create_kit/_layout.html.md +0 -2
- data/app/views/playbook/guides/create_kit/_view_objects.html.md +0 -2
- data/app/views/playbook/guides/create_kit/_writing_sass.md +0 -10
- data/app/views/playbook/guides/use_nitro.html.slim +0 -6
- data/app/views/playbook/guides/use_nitro/_local.html.md +0 -2
- data/app/views/playbook/guides/use_nitro/_nitro_components.html.md +0 -2
- data/app/views/playbook/guides/use_nitro/_versions.html.md +0 -2
- data/app/views/playbook/pages/fullscreen.html.slim +0 -10
- data/app/views/playbook/pages/grid.html.slim +0 -2
- data/app/views/playbook/pages/home.html.slim +0 -4
- data/app/views/playbook/pages/kit_category_show.html.erb +0 -14
- data/app/views/playbook/pages/kit_show.html.erb +0 -33
- data/app/views/playbook/pages/kits.html.erb +0 -12
- data/app/views/playbook/pages/principals/_getting_started.html.md +0 -30
- data/app/views/playbook/pages/principles.html.slim +0 -3
- data/app/views/playbook/pages/tokens.html.slim +0 -15
- data/app/views/playbook/pages/tokens/_pb_doc_spacing.html.slim +0 -61
- data/app/views/playbook/pages/utilities.html.slim +0 -116
- data/app/views/playbook/pages/utilities/_pb_doc_color.html.slim +0 -15
- data/app/views/playbook/samples/collection_detail/index.html.erb +0 -169
- data/app/views/playbook/samples/collection_detail/index.jsx +0 -372
- data/app/views/playbook/samples/dashboards/index.html.erb +0 -81
- data/app/views/playbook/samples/dashboards/index.jsx +0 -130
- data/app/views/playbook/samples/filter_table/index.html.erb +0 -348
- data/app/views/playbook/samples/filter_table/index.jsx +0 -433
- data/app/views/playbook/samples/registration/index.html.erb +0 -316
- data/app/views/playbook/samples/registration/index.jsx +0 -476
- data/app/views/playbook/samples/sample_show.html.erb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56a4cb93a8661659aaab85d401b6bc2dc35fd48c4f79fdff2be38b38a1da8a49
|
4
|
+
data.tar.gz: d7e29af88a980f946845c64c6585bf1c81bd4a96d8bd8cf3a7c77666b5c1ea1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f3f323a335d3f1a6c440fd791854ddc6ff245d143c836d4d166fa512ca92bec43a02a01c7fbdd77a20059167bce1585300963df94b433d4f0e551530afe31b5
|
7
|
+
data.tar.gz: c3dace91cad070dccb45fe050e51769b9c20510302dd694d88b0b74ffa8a183ca6065b226711086df0de26a9cef72bb3c5fd3ae3e8fe9948a27a24f2d8ebe98c
|
@@ -1,3 +1,4 @@
|
|
1
|
+
@import "tokens/fonts";
|
1
2
|
@import "pb_body/body";
|
2
3
|
@import "pb_button/button";
|
3
4
|
@import 'pb_button_toolbar/button_toolbar';
|
@@ -82,4 +83,3 @@
|
|
82
83
|
@import 'pb_time_stacked/time_stacked';
|
83
84
|
@import 'pb_weekday_stacked/weekday_stacked';
|
84
85
|
@import './utilities/spacing';
|
85
|
-
|
@@ -7,7 +7,6 @@ samples:
|
|
7
7
|
kits:
|
8
8
|
- avatar
|
9
9
|
- avatar_action_button
|
10
|
-
- background
|
11
10
|
- buttons:
|
12
11
|
- button
|
13
12
|
- button_toolbar
|
@@ -21,6 +20,7 @@ kits:
|
|
21
20
|
- gauge
|
22
21
|
- legend
|
23
22
|
- line_graph
|
23
|
+
|
24
24
|
- filter
|
25
25
|
- fixed_confirmation_toast
|
26
26
|
- flex
|
@@ -55,9 +55,10 @@ kits:
|
|
55
55
|
- hashtag
|
56
56
|
- pill
|
57
57
|
- popover
|
58
|
-
-
|
59
|
-
|
60
|
-
|
58
|
+
- progress:
|
59
|
+
- progress_pills
|
60
|
+
- progress_simple
|
61
|
+
- progress_step
|
61
62
|
- section_separator
|
62
63
|
- source
|
63
64
|
- star_rating
|
@@ -1,7 +1,10 @@
|
|
1
|
+
import './_playbook.scss'
|
2
|
+
import 'lazysizes/plugins/attrchange/ls.attrchange'
|
3
|
+
import 'lazysizes'
|
4
|
+
|
1
5
|
// React Component JSX Imports from the React Kits
|
2
6
|
export Avatar from './pb_avatar/_avatar.jsx'
|
3
7
|
export AvatarActionButton from './pb_avatar_action_button/_avatar_action_button.jsx'
|
4
|
-
export Background from 'pb_background/_background.jsx'
|
5
8
|
export Badge from './pb_badge/_badge.jsx'
|
6
9
|
export BarGraph from './pb_bar_graph/_bar_graph.jsx'
|
7
10
|
export Body from './pb_body/_body.jsx'
|
@@ -1,12 +1 @@
|
|
1
|
-
<%=
|
2
|
-
aria: object.aria,
|
3
|
-
id: object.id,
|
4
|
-
data: object.data,
|
5
|
-
class: object.classname) %>
|
6
|
-
<% content_for :pb_js do %>
|
7
|
-
<%= javascript_tag do %>
|
8
|
-
window.addEventListener('DOMContentLoaded', function() {
|
9
|
-
new pbChart('.selector', <%= object.chart_options %>)
|
10
|
-
})
|
11
|
-
<% end %>
|
12
|
-
<% end %>
|
1
|
+
<%= react_component('BarGraph', object.chart_options) %>
|
@@ -17,7 +17,7 @@ type ButtonToolbarProps = {
|
|
17
17
|
onClick?: EventHandler,
|
18
18
|
orientation?: "horizontal" | "vertical",
|
19
19
|
text?: string,
|
20
|
-
|
20
|
+
variant?: "primary" | "secondary",
|
21
21
|
}
|
22
22
|
|
23
23
|
const ButtonToolbar = (props: ButtonToolbarProps) => {
|
@@ -25,18 +25,18 @@ const ButtonToolbar = (props: ButtonToolbarProps) => {
|
|
25
25
|
aria = {},
|
26
26
|
children,
|
27
27
|
className,
|
28
|
-
connected = false,
|
29
28
|
data = {},
|
30
29
|
id,
|
31
30
|
orientation = 'horizontal',
|
32
31
|
text,
|
32
|
+
variant = 'primary',
|
33
33
|
} = props
|
34
34
|
|
35
35
|
const ariaProps = buildAriaProps(aria)
|
36
36
|
const dataProps = buildDataProps(data)
|
37
37
|
|
38
38
|
const classes = classnames(
|
39
|
-
buildCss('pb_button_toolbar_kit', orientation,
|
39
|
+
buildCss('pb_button_toolbar_kit', orientation, variant),
|
40
40
|
globalProps(props),
|
41
41
|
className
|
42
42
|
)
|
@@ -1,109 +1,101 @@
|
|
1
1
|
@import "../pb_button/button";
|
2
2
|
@import "../pb_button/button_mixins";
|
3
|
+
@import "./button_toolbar_mixins";
|
4
|
+
@import "./button_toolbar_dark";
|
3
5
|
@import "../tokens/colors";
|
6
|
+
@import "../tokens/opacity";
|
4
7
|
|
5
8
|
[class^=pb_button_toolbar]{
|
6
|
-
// Orientation =========
|
7
|
-
&[class*=_horizontal] {
|
8
|
-
display: inline-flex;
|
9
|
-
flex-direction: row;
|
10
|
-
align-items: center;
|
11
|
-
justify-content: flex-start;
|
12
|
-
|
13
|
-
& > [class^=pb_button] {
|
14
|
-
margin-right: $space-xs;
|
15
9
|
|
16
|
-
|
17
|
-
&:hover {
|
18
|
-
background-color:darken($royal, 20%);
|
19
|
-
}
|
20
|
-
}
|
10
|
+
// Horizontal =============
|
21
11
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
12
|
+
&[class*=_horizontal] {
|
13
|
+
display: inline-flex;
|
14
|
+
flex-direction: row;
|
15
|
+
align-items: center;
|
16
|
+
justify-content: flex-start;
|
17
|
+
& > [class^=pb_button] {
|
18
|
+
&:not(:last-child){
|
19
|
+
border-bottom-right-radius: 0;
|
20
|
+
border-top-right-radius: 0;
|
21
|
+
border-right-width: 0;
|
22
|
+
}
|
23
|
+
&:not(:first-child){
|
24
|
+
border-bottom-left-radius: 0;
|
25
|
+
border-top-left-radius: 0;
|
26
|
+
border-left-width: 0;
|
33
27
|
}
|
34
28
|
}
|
35
|
-
&[class*=
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
& > [class^=pb_button]
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
29
|
+
&[class*=_primary] {
|
30
|
+
& > [class^=pb_button]:not(:first-child)::before {
|
31
|
+
@include toolbar_border(false, $primary_border)
|
32
|
+
}
|
33
|
+
}
|
34
|
+
&[class*=_secondary] {
|
35
|
+
& > [class^=pb_button]:not(:first-child)::before {
|
36
|
+
@include toolbar_border(false, $secondary_border)
|
37
|
+
}
|
38
|
+
}
|
39
|
+
& > [class^=pb_button]:not(:first-child):hover::before,
|
40
|
+
[class^=pb_button]:hover + [class^=pb_button]::before {
|
41
|
+
opacity: 0
|
42
|
+
}
|
43
|
+
}
|
48
44
|
|
49
|
-
|
50
|
-
&:hover {
|
51
|
-
background-color:darken($royal, 20%);
|
52
|
-
}
|
53
|
-
}
|
45
|
+
// Vertical =============
|
54
46
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
47
|
+
&[class*=_vertical] {
|
48
|
+
display: inline-flex;
|
49
|
+
flex-direction: column;
|
50
|
+
align-items: flex-start;
|
51
|
+
justify-content: center;
|
52
|
+
& > [class^=pb_button] {
|
53
|
+
display: block;
|
54
|
+
flex-grow: 1;
|
55
|
+
flex-shrink: 1;
|
56
|
+
flex-basis: auto;
|
57
|
+
width: 100%;
|
58
|
+
&:not(:last-child){
|
59
|
+
border-bottom-right-radius: 0;
|
60
|
+
border-bottom-left-radius: 0;
|
61
|
+
border-bottom-width: 0;
|
62
|
+
}
|
63
|
+
&:not(:first-child){
|
64
|
+
border-top-right-radius: 0;
|
65
|
+
border-top-left-radius: 0;
|
66
|
+
border-top-width: 0;
|
66
67
|
}
|
67
68
|
}
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
& > [class^=pb_button] {
|
72
|
-
margin: 0;
|
69
|
+
&[class*=_primary] {
|
70
|
+
& > [class^=pb_button]:not(:first-child)::before {
|
71
|
+
@include toolbar_border(true, $primary_border)
|
73
72
|
}
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
border-bottom-right-radius: 0;
|
79
|
-
border-top-right-radius: 0;
|
80
|
-
border-right-width: 0;
|
81
|
-
border: 1px solid #e1e4e8;
|
82
|
-
}
|
83
|
-
&:not(:first-child){
|
84
|
-
border-bottom-left-radius: 0;
|
85
|
-
border-top-left-radius: 0;
|
86
|
-
border-left-width: 0;
|
87
|
-
border: 1px solid #e1e4e8;
|
88
|
-
}
|
89
|
-
}
|
73
|
+
}
|
74
|
+
&[class*=_secondary] {
|
75
|
+
& > [class^=pb_button]:not(:first-child)::before {
|
76
|
+
@include toolbar_border(true, $secondary_border)
|
90
77
|
}
|
78
|
+
}
|
79
|
+
& > [class^=pb_button]:not(:first-child):hover::before,
|
80
|
+
[class^=pb_button]:hover + [class^=pb_button]::before {
|
81
|
+
opacity: 0
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
// Hover =============
|
91
86
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
border-top-left-radius: 0;
|
103
|
-
border-top-width: 0;
|
104
|
-
border: 1px solid #e1e4e8;
|
105
|
-
}
|
87
|
+
& > [class^=pb_button] {
|
88
|
+
@media (hover:hover) {
|
89
|
+
&:hover {
|
90
|
+
background-color:darken($royal, 20%);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
&[class*=secondary] {
|
94
|
+
@media (hover:hover) {
|
95
|
+
&:hover {
|
96
|
+
background-color:rgba($primary_action, $opacity_3)
|
106
97
|
}
|
107
98
|
}
|
108
99
|
}
|
109
|
-
}
|
100
|
+
}
|
101
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
@import "./button_toolbar_mixins";
|
2
|
+
@import "../tokens/colors";
|
3
|
+
@import "../tokens/opacity";
|
4
|
+
|
5
|
+
[class^=pb_button_toolbar]{
|
6
|
+
|
7
|
+
// Vertical =============
|
8
|
+
|
9
|
+
&[class*=_vertical] {
|
10
|
+
&[class*=_primary].dark {
|
11
|
+
& > [class^=pb_button]:not(:first-child)::before {
|
12
|
+
@include toolbar_border(true, $primary_dark)
|
13
|
+
}
|
14
|
+
}
|
15
|
+
&[class*=_secondary].dark {
|
16
|
+
& > [class^=pb_button]:not(:first-child)::before {
|
17
|
+
@include toolbar_border(true, $secondary_dark)
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
// Horizontal =============
|
23
|
+
|
24
|
+
&[class*=_horizontal] {
|
25
|
+
&[class*=_primary].dark {
|
26
|
+
& > [class^=pb_button]:not(:first-child)::before {
|
27
|
+
@include toolbar_border(false, $primary_dark)
|
28
|
+
}
|
29
|
+
}
|
30
|
+
&[class*=_secondary].dark {
|
31
|
+
& > [class^=pb_button]:not(:first-child)::before {
|
32
|
+
@include toolbar_border(false, $secondary_dark)
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
& > [class^=pb_button]:not(:first-child):hover::before,
|
37
|
+
[class^=pb_button]:hover + [class^=pb_button]::before {
|
38
|
+
opacity: 0
|
39
|
+
}
|
40
|
+
|
41
|
+
// Hover =============
|
42
|
+
|
43
|
+
[class^=pb_button].dark {
|
44
|
+
@media (hover:hover) {
|
45
|
+
&:hover {
|
46
|
+
background-color:darken($royal, 20%);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
&[class*=secondary] {
|
50
|
+
@media (hover:hover) {
|
51
|
+
&:hover {
|
52
|
+
background-color:rgba($primary_action, $opacity_3)
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@import "../tokens/spacing";
|
2
|
+
@import "../tokens/colors";
|
3
|
+
@import "../tokens/opacity";
|
4
|
+
|
5
|
+
$primary_border: rgba($white, $opacity_1);
|
6
|
+
$secondary_border: rgba($white, $opacity_10);
|
7
|
+
$primary_dark: rgba($bg_dark, $opacity_2);
|
8
|
+
$secondary_dark: rgba($bg_dark, $opacity_2);
|
9
|
+
|
10
|
+
@mixin toolbar_border($horizontal: true, $color: $color) {
|
11
|
+
@if $horizontal == true {
|
12
|
+
height: 2px;
|
13
|
+
width: calc(100% + #{$space_md} + #{$space_md});
|
14
|
+
top: calc(-#{$space_xs} - 1px);
|
15
|
+
left: -$space_md;
|
16
|
+
} @else {
|
17
|
+
width: 2px;
|
18
|
+
height: $space_md;
|
19
|
+
top: 0;
|
20
|
+
right: calc(#{$space_lg} + 2px);
|
21
|
+
}
|
22
|
+
background-color: $color;
|
23
|
+
content: '';
|
24
|
+
position: relative;
|
25
|
+
bottom: 0;
|
26
|
+
display: block;
|
27
|
+
}
|
@@ -12,11 +12,13 @@ module Playbook
|
|
12
12
|
prop :orientation, type: Playbook::Props::Enum,
|
13
13
|
values: %w[horizontal vertical],
|
14
14
|
default: "horizontal"
|
15
|
-
|
15
|
+
prop :variant, type: Playbook::Props::Enum,
|
16
|
+
values: %w[primary secondary],
|
17
|
+
default: "primary"
|
16
18
|
prop :text
|
17
19
|
|
18
20
|
def classname
|
19
|
-
generate_classname("pb_button_toolbar_kit", orientation,
|
21
|
+
generate_classname("pb_button_toolbar_kit", orientation, variant)
|
20
22
|
end
|
21
23
|
|
22
24
|
private
|
@@ -1,7 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<%= pb_rails("
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
<div class="pb--doc-demo-row">
|
2
|
+
|
3
|
+
<%= pb_rails("button_toolbar", props: { orientation: "vertical" }) do %>
|
4
|
+
<%= pb_rails("button", props: { text: "Create" }) %>
|
5
|
+
<%= pb_rails("button", props: { text: "Edit"}) %>
|
6
|
+
<%= pb_rails("button", props: { text: "Copy"}) %>
|
7
|
+
<%= pb_rails("button", props: { text: "Cut"}) %>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<%= pb_rails("button_toolbar", props: { orientation: "horizontal" }) do %>
|
11
|
+
<%= pb_rails("button", props: { text: "Create" }) %>
|
12
|
+
<%= pb_rails("button", props: { text: "Edit" }) %>
|
13
|
+
<%= pb_rails("button", props: { text: "Copy" }) %>
|
14
|
+
<%= pb_rails("button", props: { text: "Cut" }) %>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
</div>
|