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
@@ -1,64 +0,0 @@
|
|
1
|
-
/* @flow */
|
2
|
-
|
3
|
-
import React from 'react'
|
4
|
-
import classnames from 'classnames'
|
5
|
-
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
6
|
-
import { globalProps } from '../utilities/globalProps.js'
|
7
|
-
|
8
|
-
type BackgroundProps = {
|
9
|
-
aria?: object,
|
10
|
-
backgroundColor?: 'gradient' | 'dark' | 'light' | 'white',
|
11
|
-
children?: array<React.ReactNode> | React.ReactNode,
|
12
|
-
className?: string,
|
13
|
-
data?: object,
|
14
|
-
id?: string,
|
15
|
-
imageUrl?: string,
|
16
|
-
padding?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl',
|
17
|
-
tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
|
18
|
-
}
|
19
|
-
|
20
|
-
const Background = (props: BackgroundProps) => {
|
21
|
-
const {
|
22
|
-
aria = {},
|
23
|
-
backgroundColor = 'light',
|
24
|
-
children,
|
25
|
-
className,
|
26
|
-
data = {},
|
27
|
-
id,
|
28
|
-
imageUrl = '',
|
29
|
-
padding = 'md',
|
30
|
-
tag = 'div',
|
31
|
-
} = props
|
32
|
-
|
33
|
-
const ariaProps = buildAriaProps(aria)
|
34
|
-
const dataProps = buildDataProps(data)
|
35
|
-
const classes = classnames(buildCss('pb_background_kit'), className, globalProps(props, { padding }))
|
36
|
-
const Tag = `${tag}`
|
37
|
-
const backgroundStyle = {
|
38
|
-
backgroundImage: `url(${imageUrl})`,
|
39
|
-
backgroundSize: 'cover',
|
40
|
-
}
|
41
|
-
|
42
|
-
return (
|
43
|
-
<Tag
|
44
|
-
{...ariaProps}
|
45
|
-
{...dataProps}
|
46
|
-
id={id}
|
47
|
-
>
|
48
|
-
<If condition={imageUrl}>
|
49
|
-
<div
|
50
|
-
className={classes + 'lazyload blur_up'}
|
51
|
-
style={backgroundStyle}
|
52
|
-
>
|
53
|
-
{ children }
|
54
|
-
</div>
|
55
|
-
<Else />
|
56
|
-
<div className={classes + `bg_${backgroundColor}`}>
|
57
|
-
{ children }
|
58
|
-
</div>
|
59
|
-
</If>
|
60
|
-
</Tag>
|
61
|
-
)
|
62
|
-
}
|
63
|
-
|
64
|
-
export default Background
|
@@ -1,15 +0,0 @@
|
|
1
|
-
[class^=pb_background_kit] {
|
2
|
-
max-width: 100%;
|
3
|
-
max-height: 100%;
|
4
|
-
|
5
|
-
.blur_up {
|
6
|
-
-webkit-filter: blur(6px);
|
7
|
-
filter: blur(6px);
|
8
|
-
transition: filter 550ms, -webkit-filter 550ms;
|
9
|
-
}
|
10
|
-
|
11
|
-
.blur_up.lazyloaded {
|
12
|
-
-webkit-filter: blur(0);
|
13
|
-
filter: blur(0);
|
14
|
-
}
|
15
|
-
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module PbBackground
|
5
|
-
class Background
|
6
|
-
include Playbook::Props
|
7
|
-
|
8
|
-
partial "pb_background/background"
|
9
|
-
|
10
|
-
prop :background_color, type: Playbook::Props::Enum,
|
11
|
-
values: %w[gradient dark light white],
|
12
|
-
default: "light"
|
13
|
-
prop :image_url
|
14
|
-
prop :padding, type: Playbook::Props::Enum,
|
15
|
-
values: %w[none xs sm md lg xl],
|
16
|
-
default: "md"
|
17
|
-
prop :tag, type: Playbook::Props::Enum,
|
18
|
-
values: %w[h1 h2 h3 h4 h5 h6 p div span],
|
19
|
-
default: "div"
|
20
|
-
|
21
|
-
def classname
|
22
|
-
generate_classname("pb_background_kit", image_classname, background_color_classname, padding, separator: " ")
|
23
|
-
end
|
24
|
-
|
25
|
-
private
|
26
|
-
|
27
|
-
def image_classname
|
28
|
-
image_url.present? ? "lazyload blur_up" : ""
|
29
|
-
end
|
30
|
-
|
31
|
-
def background_color_classname
|
32
|
-
!image_url.present? ? "bg_#{background_color}" : ""
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
<%= pb_rails("background", props: { background_color: "gradient" }) do %>
|
2
|
-
Background Kit Gradient Color
|
3
|
-
<% end %>
|
4
|
-
|
5
|
-
<%= pb_rails("background", props: { background_color: "dark" }) do %>
|
6
|
-
<%= pb_rails("flex", props: { horizontal: "center"}) do %>
|
7
|
-
<%= pb_rails("flex/flex_item") do %>
|
8
|
-
<%= pb_rails("title", props: { dark: true, size: 2, text: "Background Kit Dark" })%>
|
9
|
-
<% end %>
|
10
|
-
<% end %>
|
11
|
-
<% end %>
|
12
|
-
|
13
|
-
<%= pb_rails("background", props: { background_color: "light", padding: "xl" }) do %>
|
14
|
-
<%= pb_rails("flex", props: { horizontal: "right"}) do %>
|
15
|
-
<%= pb_rails("flex/flex_item") do %>
|
16
|
-
<%= pb_rails("body", props: { text: "Background Kit Light" })%>
|
17
|
-
<% end %>
|
18
|
-
<% end %>
|
19
|
-
<% end %>
|
20
|
-
|
21
|
-
<%= pb_rails("background", props: { background_color: "white", padding: "lg" }) do %>
|
22
|
-
<%= pb_rails("flex") do %>
|
23
|
-
<%= pb_rails("flex/flex_item") do %>
|
24
|
-
<%= pb_rails("title", props: { size: 3, text: "Background Kit White" })%>
|
25
|
-
<% end %>
|
26
|
-
<% end %>
|
27
|
-
<% end %>
|
28
|
-
|
29
|
-
<%= pb_rails("background", props: { image_url: "https://images.unsplash.com/photo-1528459801416-a9e53bbf4e17?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1000&q=80", padding: "lg" }) do %>
|
30
|
-
<%= pb_rails("flex", props: { horizontal: "center", orientation: "column" }) do %>
|
31
|
-
<%= pb_rails("flex/flex_item") do %>
|
32
|
-
<%= pb_rails("title", props: { dark: true, size: 1, text: "Background Kit Image" })%>
|
33
|
-
<% end %>
|
34
|
-
<%= pb_rails("flex/flex_item", props: { padding: "lg" }) do %>
|
35
|
-
<%= pb_rails("card", props: { shadow: "deepest" }) do %>
|
36
|
-
We cannot seek achievement for ourselves and forget about progress and prosperity for our community... Our ambitions must be broad enough to include the aspirations and needs of others, for their sakes and for our own.
|
37
|
-
-Cesar Chavez
|
38
|
-
<% end %>
|
39
|
-
<% end %>
|
40
|
-
<% end %>
|
41
|
-
<% end %>
|
@@ -1,75 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Background } from '../../'
|
3
|
-
import { Body, Card, Flex, FlexItem, Title } from '../../'
|
4
|
-
|
5
|
-
const BackgroundDefault = () => (
|
6
|
-
<div>
|
7
|
-
<Background
|
8
|
-
backgroundColor="gradient"
|
9
|
-
>
|
10
|
-
{'Background Kit Gradient Color'}
|
11
|
-
</Background>
|
12
|
-
<Background
|
13
|
-
backgroundColor="dark"
|
14
|
-
>
|
15
|
-
<Flex
|
16
|
-
horizontal="center"
|
17
|
-
orientation="row"
|
18
|
-
>
|
19
|
-
<FlexItem>
|
20
|
-
<Title
|
21
|
-
dark
|
22
|
-
size={2}
|
23
|
-
text="Background Kit Dark"
|
24
|
-
/>
|
25
|
-
</FlexItem>
|
26
|
-
</Flex>
|
27
|
-
</Background>
|
28
|
-
<Background
|
29
|
-
backgroundColor="light"
|
30
|
-
padding="xl"
|
31
|
-
>
|
32
|
-
<Flex
|
33
|
-
horizontal="right"
|
34
|
-
orientation="row"
|
35
|
-
>
|
36
|
-
<FlexItem>
|
37
|
-
<Body
|
38
|
-
text="Background Kit Light"
|
39
|
-
/>
|
40
|
-
</FlexItem>
|
41
|
-
</Flex>
|
42
|
-
</Background>
|
43
|
-
<Background
|
44
|
-
backgroundColor="white"
|
45
|
-
padding="lg"
|
46
|
-
>
|
47
|
-
<Title
|
48
|
-
size={3}
|
49
|
-
text="Background Kit White"
|
50
|
-
/>
|
51
|
-
</Background>
|
52
|
-
<Background imageUrl="https://images.unsplash.com/photo-1528459801416-a9e53bbf4e17?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1000&q=80">
|
53
|
-
<Flex
|
54
|
-
orientation="column"
|
55
|
-
vertical="center"
|
56
|
-
>
|
57
|
-
<FlexItem>
|
58
|
-
<Title
|
59
|
-
dark
|
60
|
-
padding="lg"
|
61
|
-
size={1}
|
62
|
-
text="Background Kit Image"
|
63
|
-
/>
|
64
|
-
</FlexItem>
|
65
|
-
<FlexItem padding="lg">
|
66
|
-
<Card shadow="deepest">
|
67
|
-
{'We cannot seek achievement for ourselves and forget about progress and prosperity for our community... Our ambitions must be broad enough to include the aspirations and needs of others, for their sakes and for our own. - Cesar Chavez'}
|
68
|
-
</Card>
|
69
|
-
</FlexItem>
|
70
|
-
</Flex>
|
71
|
-
</Background>
|
72
|
-
</div>
|
73
|
-
)
|
74
|
-
|
75
|
-
export default BackgroundDefault
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default as BackgroundDefault } from './_background_default.jsx'
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<div class="pb--doc-demo-row">
|
2
|
-
<div>
|
3
|
-
<%= pb_rails("button_toolbar", props: { orientation: "vertical", connected: true }) do %>
|
4
|
-
<%= pb_rails("button", props: { text: "Field" }) %>
|
5
|
-
<%= pb_rails("button", props: { text: "Retail"}) %>
|
6
|
-
<%= pb_rails("button", props: { text: "Event"}) %>
|
7
|
-
<%= pb_rails("button", props: { text: "Training"}) %>
|
8
|
-
<%= pb_rails("button", props: { text: "Not Working"}) %>
|
9
|
-
<% end %>
|
10
|
-
</div>
|
11
|
-
</div>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Button, ButtonToolbar } from '../..'
|
3
|
-
|
4
|
-
const ButtonToolbarVertical = () => (
|
5
|
-
<div>
|
6
|
-
<ButtonToolbar
|
7
|
-
connected
|
8
|
-
orientation="vertical"
|
9
|
-
>
|
10
|
-
<Button
|
11
|
-
text="Field"
|
12
|
-
/>
|
13
|
-
<Button
|
14
|
-
text="Retail"
|
15
|
-
/>
|
16
|
-
<Button
|
17
|
-
text="Event"
|
18
|
-
/>
|
19
|
-
<Button
|
20
|
-
text="Training"
|
21
|
-
/>
|
22
|
-
<Button
|
23
|
-
text="Not Working"
|
24
|
-
/>
|
25
|
-
</ButtonToolbar>
|
26
|
-
</div>
|
27
|
-
)
|
28
|
-
|
29
|
-
export default ButtonToolbarVertical
|
data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.html.erb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
<div class="pb--doc-demo-row">
|
2
|
-
<div>
|
3
|
-
<%= pb_rails("button_toolbar", props: { orientation: "vertical", connected: true }) do %>
|
4
|
-
<%= pb_rails("button", props: { text: "Field", variant: "secondary" }) %>
|
5
|
-
<%= pb_rails("button", props: { text: "Retail", variant: "secondary" }) %>
|
6
|
-
<%= pb_rails("button", props: { text: "Event", variant: "secondary" }) %>
|
7
|
-
<%= pb_rails("button", props: { text: "Training", variant: "secondary" }) %>
|
8
|
-
<%= pb_rails("button", props: { text: "Not Working", variant: "secondary" }) %>
|
9
|
-
<% end %>
|
10
|
-
</div>
|
11
|
-
</div>
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Button, ButtonToolbar } from '../..'
|
3
|
-
|
4
|
-
const ButtonToolbarVerticalSecondary = () => (
|
5
|
-
<div>
|
6
|
-
<ButtonToolbar
|
7
|
-
connected
|
8
|
-
orientation="vertical"
|
9
|
-
>
|
10
|
-
<Button
|
11
|
-
text="Field"
|
12
|
-
variant="secondary"
|
13
|
-
/>
|
14
|
-
<Button
|
15
|
-
text="Retail"
|
16
|
-
variant="secondary"
|
17
|
-
/>
|
18
|
-
<Button
|
19
|
-
text="Event"
|
20
|
-
variant="secondary"
|
21
|
-
/>
|
22
|
-
<Button
|
23
|
-
text="Training"
|
24
|
-
variant="secondary"
|
25
|
-
/>
|
26
|
-
<Button
|
27
|
-
text="Not Working"
|
28
|
-
variant="secondary"
|
29
|
-
/>
|
30
|
-
</ButtonToolbar>
|
31
|
-
</div>
|
32
|
-
)
|
33
|
-
|
34
|
-
export default ButtonToolbarVerticalSecondary
|
@@ -1 +0,0 @@
|
|
1
|
-
By default the date picker input can only be modified by picking a date on the calendar. This prop allows your users to manually type in the date.
|
@@ -1,45 +0,0 @@
|
|
1
|
-
/* @flow */
|
2
|
-
|
3
|
-
import React from 'react'
|
4
|
-
import { Body, Flex, FlexItem, Icon } from '../..'
|
5
|
-
|
6
|
-
const TypeaheadWithPillsAsyncSummary = () => {
|
7
|
-
return (
|
8
|
-
<>
|
9
|
-
<Flex
|
10
|
-
marginBottom="lg"
|
11
|
-
vertical="center"
|
12
|
-
>
|
13
|
-
<FlexItem>
|
14
|
-
<Body
|
15
|
-
color="light"
|
16
|
-
>
|
17
|
-
<Icon
|
18
|
-
icon="info-circle"
|
19
|
-
marginRight="xs"
|
20
|
-
/>
|
21
|
-
</Body>
|
22
|
-
</FlexItem>
|
23
|
-
<FlexItem>
|
24
|
-
<Body
|
25
|
-
color="light"
|
26
|
-
>
|
27
|
-
{'If the data field '}
|
28
|
-
<code>{'imageUrl'}</code>
|
29
|
-
{' is present, '}
|
30
|
-
<code>{'FormPill'}</code>
|
31
|
-
{' will receive that field as a prop and display the image. '}
|
32
|
-
<br />
|
33
|
-
{'Additionally, you can also leverage the callback prop: '}
|
34
|
-
<code>{'onMultiValueClick'}</code>
|
35
|
-
{' to perform custom work when a '}
|
36
|
-
<code>{'MultiValue'}</code>
|
37
|
-
{' item is clicked.'}
|
38
|
-
</Body>
|
39
|
-
</FlexItem>
|
40
|
-
</Flex>
|
41
|
-
</>
|
42
|
-
)
|
43
|
-
}
|
44
|
-
|
45
|
-
export default TypeaheadWithPillsAsyncSummary
|
@@ -1,27 +0,0 @@
|
|
1
|
-
// @flow
|
2
|
-
|
3
|
-
import React from 'react'
|
4
|
-
import { Body, Icon } from '../..'
|
5
|
-
|
6
|
-
const TypeaheadWithPillsSummary = () => {
|
7
|
-
return (
|
8
|
-
<>
|
9
|
-
<Body
|
10
|
-
color="light"
|
11
|
-
marginBottom="lg"
|
12
|
-
>
|
13
|
-
<Icon
|
14
|
-
icon="info-circle"
|
15
|
-
marginRight="xs"
|
16
|
-
/>
|
17
|
-
{'Typeahead kit is data-driven. The minimum default fields are '}
|
18
|
-
<code>{'label'}</code>
|
19
|
-
{' and '}
|
20
|
-
<code>{'value'}</code>
|
21
|
-
{'.'}
|
22
|
-
</Body>
|
23
|
-
</>
|
24
|
-
)
|
25
|
-
}
|
26
|
-
|
27
|
-
export default TypeaheadWithPillsSummary
|