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
@@ -5,8 +5,6 @@
|
|
5
5
|
@import "../pb_caption/caption";
|
6
6
|
|
7
7
|
[class^=pb_time_kit] {
|
8
|
-
letter-spacing: $lspace_looser;
|
9
|
-
text-transform: uppercase;
|
10
8
|
&[class*=_center] {
|
11
9
|
text-align: center;
|
12
10
|
}
|
@@ -15,10 +13,6 @@
|
|
15
13
|
text-align: right;
|
16
14
|
}
|
17
15
|
|
18
|
-
[class^=pb_body] {
|
19
|
-
font-weight: $bold !important;
|
20
|
-
}
|
21
|
-
|
22
16
|
[class^=pb_time_timezone] {
|
23
17
|
color: $text_lt_light;
|
24
18
|
font-weight: $bold;
|
@@ -28,26 +22,12 @@
|
|
28
22
|
}
|
29
23
|
}
|
30
24
|
|
31
|
-
&[class*=
|
32
|
-
|
33
|
-
|
34
|
-
letter-spacing: $lspace_tight;
|
35
|
-
text-transform: capitalize;
|
36
|
-
}
|
37
|
-
[class^=pb_time_timezone] {
|
38
|
-
color: $text_lt_light;
|
39
|
-
font-size: $font-large !important;
|
40
|
-
font-weight: $regular;
|
41
|
-
letter-spacing: $lspace_tight;
|
25
|
+
&[class*=dark] {
|
26
|
+
& * {
|
27
|
+
@include caption_dark;
|
42
28
|
}
|
43
|
-
|
44
|
-
|
45
|
-
&.dark {
|
46
|
-
[class^=pb_caption_kit] {
|
29
|
+
.pb_time {
|
47
30
|
color: $text_dk_default;
|
48
31
|
}
|
49
|
-
[class^=pb_body_kit] {
|
50
|
-
color: $text_dk_light;
|
51
|
-
}
|
52
32
|
}
|
53
33
|
}
|
@@ -1,24 +1,27 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import Time from '../_time.jsx'
|
3
3
|
|
4
|
-
const TimeAlign = () => {
|
4
|
+
const TimeAlign = (props) => {
|
5
5
|
return (
|
6
6
|
<div>
|
7
7
|
<Time
|
8
8
|
date={new Date()}
|
9
9
|
size="md"
|
10
|
+
{...props}
|
10
11
|
/>
|
11
12
|
<br />
|
12
13
|
<Time
|
13
14
|
align="center"
|
14
15
|
date={new Date()}
|
15
16
|
size="md"
|
17
|
+
{...props}
|
16
18
|
/>
|
17
19
|
<br />
|
18
20
|
<Time
|
19
21
|
align="right"
|
20
22
|
date={new Date()}
|
21
23
|
size="md"
|
24
|
+
{...props}
|
22
25
|
/>
|
23
26
|
</div>
|
24
27
|
)
|
@@ -1,38 +1,38 @@
|
|
1
1
|
<%= pb_rails("time", props: {
|
2
2
|
show_timezone: false,
|
3
|
-
time: Time.now
|
3
|
+
time: Time.now
|
4
4
|
}) %>
|
5
5
|
|
6
6
|
<br>
|
7
7
|
|
8
8
|
<%= pb_rails("time", props: {
|
9
9
|
time: DateTime.now,
|
10
|
-
timezone: "America/
|
10
|
+
timezone: "America/New_York"
|
11
11
|
}) %>
|
12
12
|
|
13
13
|
<br>
|
14
14
|
|
15
15
|
<%= pb_rails("time", props: {
|
16
|
-
time: "2012-08-02T15:49:29Z",
|
17
16
|
show_icon: true,
|
18
17
|
show_timezone: false,
|
18
|
+
time: "2012-08-02T15:49:29Z",
|
19
19
|
}) %>
|
20
20
|
|
21
21
|
<br>
|
22
22
|
|
23
23
|
<%= pb_rails("time", props: {
|
24
|
-
time: "2012-08-02T15:49:29Z",
|
25
24
|
show_icon: true,
|
26
|
-
|
25
|
+
time: "2012-08-02T15:49:29Z",
|
26
|
+
timezone: "America/New_York"
|
27
27
|
}) %>
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
<br>
|
30
|
+
<br>
|
31
31
|
|
32
|
-
|
33
|
-
time: Time.now,
|
34
|
-
size: "md",
|
32
|
+
<%= pb_rails("time", props: {
|
35
33
|
show_timezone: false,
|
34
|
+
size: "md",
|
35
|
+
time: Time.now,
|
36
36
|
}) %>
|
37
37
|
|
38
38
|
<br>
|
@@ -47,8 +47,8 @@
|
|
47
47
|
|
48
48
|
<%= pb_rails("time", props: {
|
49
49
|
show_icon: true,
|
50
|
-
size: "md",
|
51
50
|
show_timezone: false,
|
51
|
+
size: "md",
|
52
52
|
time: "2012-08-02T15:49:29Z",
|
53
53
|
}) %>
|
54
54
|
|
@@ -1,45 +1,56 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import Time from '../_time.jsx'
|
3
3
|
|
4
|
-
const TimeDefault = () => {
|
4
|
+
const TimeDefault = (props) => {
|
5
5
|
return (
|
6
6
|
<div>
|
7
7
|
<Time
|
8
8
|
date={new Date().getTime()}
|
9
|
+
showTimezone={false}
|
10
|
+
{...props}
|
9
11
|
/>
|
10
12
|
<br />
|
11
13
|
<Time
|
12
14
|
date={new Date()}
|
13
15
|
timeZone="America/New_York"
|
16
|
+
{...props}
|
14
17
|
/>
|
15
18
|
<br />
|
16
19
|
<Time
|
17
20
|
date={new Date().getTime()}
|
18
21
|
showIcon
|
22
|
+
showTimezone={false}
|
23
|
+
{...props}
|
19
24
|
/>
|
20
25
|
<br />
|
21
26
|
<Time
|
22
27
|
date={new Date()}
|
23
28
|
showIcon
|
24
29
|
timeZone="America/New_York"
|
30
|
+
{...props}
|
25
31
|
/>
|
26
32
|
<br />
|
27
33
|
<br />
|
28
34
|
<Time
|
29
35
|
date={new Date()}
|
36
|
+
showTimezone={false}
|
30
37
|
size="md"
|
38
|
+
{...props}
|
31
39
|
/>
|
32
40
|
<br />
|
33
41
|
<Time
|
34
42
|
date={new Date()}
|
35
43
|
size="md"
|
36
44
|
timeZone="America/New_York"
|
45
|
+
{...props}
|
37
46
|
/>
|
38
47
|
<br />
|
39
48
|
<Time
|
40
49
|
date={new Date()}
|
41
50
|
showIcon
|
51
|
+
showTimezone={false}
|
42
52
|
size="md"
|
53
|
+
{...props}
|
43
54
|
/>
|
44
55
|
<br />
|
45
56
|
<Time
|
@@ -47,6 +58,7 @@ const TimeDefault = () => {
|
|
47
58
|
showIcon
|
48
59
|
size="md"
|
49
60
|
timeZone="America/New_York"
|
61
|
+
{...props}
|
50
62
|
/>
|
51
63
|
</div>
|
52
64
|
)
|
@@ -1,16 +1,19 @@
|
|
1
1
|
import React, { Fragment } from 'react'
|
2
2
|
import Time from '../_time.jsx'
|
3
3
|
|
4
|
-
const TimeSizes = () => {
|
4
|
+
const TimeSizes = (props) => {
|
5
5
|
return (
|
6
6
|
<Fragment>
|
7
7
|
<Time
|
8
8
|
date={new Date()}
|
9
|
+
{...props}
|
9
10
|
/>
|
10
11
|
<br />
|
11
12
|
<Time
|
12
13
|
date={new Date()}
|
13
14
|
size="md"
|
15
|
+
timeZone="America/New_York"
|
16
|
+
{...props}
|
14
17
|
/>
|
15
18
|
</Fragment>
|
16
19
|
)
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import Time from '../_time.jsx'
|
3
3
|
|
4
|
-
const TimeStamp = () => {
|
4
|
+
const TimeStamp = (props) => {
|
5
5
|
return (
|
6
6
|
<div>
|
7
7
|
<Time
|
8
8
|
date={new Date()}
|
9
9
|
size="sm"
|
10
|
+
{...props}
|
10
11
|
/>
|
11
12
|
|
12
13
|
<br />
|
@@ -14,6 +15,7 @@ const TimeStamp = () => {
|
|
14
15
|
<Time
|
15
16
|
date={new Date().getTime()}
|
16
17
|
size="sm"
|
18
|
+
{...props}
|
17
19
|
/>
|
18
20
|
</div>
|
19
21
|
)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import Time from '../_time.jsx'
|
3
3
|
|
4
|
-
const
|
4
|
+
const TimeTimezone = (props) => {
|
5
5
|
const zones = {
|
6
6
|
east: 'America/New_York',
|
7
7
|
central: 'America/Chicago',
|
@@ -16,6 +16,7 @@ const TimeTimeZone = () => {
|
|
16
16
|
date={new Date()}
|
17
17
|
size="md"
|
18
18
|
timeZone={zones.east}
|
19
|
+
{...props}
|
19
20
|
/>
|
20
21
|
|
21
22
|
<br />
|
@@ -24,6 +25,7 @@ const TimeTimeZone = () => {
|
|
24
25
|
<Time
|
25
26
|
date={new Date()}
|
26
27
|
timeZone={zones.central}
|
28
|
+
{...props}
|
27
29
|
/>
|
28
30
|
|
29
31
|
<br />
|
@@ -32,6 +34,7 @@ const TimeTimeZone = () => {
|
|
32
34
|
<Time
|
33
35
|
date={new Date()}
|
34
36
|
timeZone={zones.mountain}
|
37
|
+
{...props}
|
35
38
|
/>
|
36
39
|
|
37
40
|
<br />
|
@@ -40,6 +43,7 @@ const TimeTimeZone = () => {
|
|
40
43
|
<Time
|
41
44
|
date={new Date()}
|
42
45
|
timeZone={zones.west}
|
46
|
+
{...props}
|
43
47
|
/>
|
44
48
|
|
45
49
|
<br />
|
@@ -48,10 +52,11 @@ const TimeTimeZone = () => {
|
|
48
52
|
<Time
|
49
53
|
date={new Date()}
|
50
54
|
timeZone={zones.asia}
|
55
|
+
{...props}
|
51
56
|
/>
|
52
57
|
|
53
58
|
</div>
|
54
59
|
)
|
55
60
|
}
|
56
61
|
|
57
|
-
export default
|
62
|
+
export default TimeTimezone
|
@@ -22,14 +22,14 @@
|
|
22
22
|
display: flex;
|
23
23
|
align-items: center;
|
24
24
|
[class*=pb_time_range_inline_arrow] {
|
25
|
-
margin-left:
|
26
|
-
margin-right:
|
25
|
+
margin-left: $space_xs/2;
|
26
|
+
margin-right: $space_xs/2;
|
27
27
|
}
|
28
28
|
[class*=pb_time_range_inline_timezone] {
|
29
|
-
margin-left:
|
29
|
+
margin-left: $space_xs/2;
|
30
30
|
}
|
31
31
|
[class*=pb_time_range_inline_icon] {
|
32
|
-
margin-right:
|
32
|
+
margin-right: $space_xs/2;
|
33
33
|
}
|
34
34
|
}
|
35
|
-
}
|
35
|
+
}
|
@@ -10,11 +10,11 @@ import { buildCss, buildDataProps } from '../utilities/props'
|
|
10
10
|
|
11
11
|
type TitleDetailProps = {
|
12
12
|
align?: "left" | "center" | "right",
|
13
|
-
className?:
|
13
|
+
className?: string,
|
14
14
|
data?: object,
|
15
|
-
detail:
|
16
|
-
id?:
|
17
|
-
title:
|
15
|
+
detail: string,
|
16
|
+
id?: string,
|
17
|
+
title: string,
|
18
18
|
}
|
19
19
|
|
20
20
|
const TitleDetail = (props: TitleDetailProps) => {
|
@@ -11,6 +11,9 @@ module Playbook
|
|
11
11
|
|
12
12
|
partial "pb_toggle/toggle"
|
13
13
|
|
14
|
+
prop :input_options, type: Playbook::Props::Hash,
|
15
|
+
default: {}
|
16
|
+
|
14
17
|
prop :checked, type: Playbook::Props::Boolean,
|
15
18
|
default: false
|
16
19
|
prop :name
|
@@ -24,7 +27,7 @@ module Playbook
|
|
24
27
|
end
|
25
28
|
|
26
29
|
def input
|
27
|
-
check_box_tag(name, value, checked)
|
30
|
+
check_box_tag(name, value, checked, input_options)
|
28
31
|
end
|
29
32
|
|
30
33
|
private
|
@@ -34,4 +37,4 @@ module Playbook
|
|
34
37
|
end
|
35
38
|
end
|
36
39
|
end
|
37
|
-
end
|
40
|
+
end
|
@@ -1,25 +1,29 @@
|
|
1
|
-
|
1
|
+
<% if object.pills %>
|
2
|
+
<%= react_component('Typeahead', object.typeahead_with_pills_options) %>
|
3
|
+
<% else %>
|
4
|
+
<%= content_tag(:div,
|
2
5
|
id: object.id,
|
3
6
|
data: object.data,
|
4
7
|
class: object.classname) do %>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
+
<div class="pb_typeahead_wrapper">
|
9
|
+
<div class="pb_typeahead_loading_indicator" data-pb-typeahead-kit-loading-indicator>
|
10
|
+
<i class="far fa-spinner fa-spin"></i>
|
11
|
+
</div>
|
12
|
+
<%= pb_rails("text_input", props: {
|
13
|
+
type: "search",
|
14
|
+
label: object.label,
|
15
|
+
name: object.name,
|
16
|
+
value: object.value,
|
17
|
+
placeholder: object.placeholder
|
18
|
+
}) %>
|
19
|
+
<%= pb_rails("list", props: { ordered: false, borderless: false, xpadding: true, role: "status", aria: { live: "polite" }, data: { pb_typeahead_kit_results: true } }) do %>
|
20
|
+
<% end %>
|
8
21
|
</div>
|
9
|
-
<%= pb_rails("text_input", props: {
|
10
|
-
type: "search",
|
11
|
-
label: object.label,
|
12
|
-
name: object.name,
|
13
|
-
value: object.value,
|
14
|
-
placeholder: object.placeholder
|
15
|
-
}) %>
|
16
|
-
<%= pb_rails("list", props: { ordered: false, borderless: false, xpadding: true, role: "status", aria: { live: "polite" }, data: { pb_typeahead_kit_results: true } }) do %>
|
17
|
-
<% end %>
|
18
|
-
</div>
|
19
22
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<% end %>
|
23
|
+
<template data-pb-typeahead-kit-result-option>
|
24
|
+
<%= pb_rails("list/item") do %>
|
25
|
+
<button type="button" data-result-option-item><%= tag(:slot, name: :content) %></button>
|
26
|
+
<% end %>
|
27
|
+
</template>
|
28
|
+
<% end %>
|
29
|
+
<% end %>
|
@@ -3,6 +3,7 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import Select from 'react-select'
|
5
5
|
import AsyncSelect from 'react-select/async'
|
6
|
+
import { get } from 'lodash'
|
6
7
|
|
7
8
|
import Control from './components/Control'
|
8
9
|
import IndicatorsContainer from './components/IndicatorsContainer'
|
@@ -12,6 +13,8 @@ import Option from './components/Option'
|
|
12
13
|
import Placeholder from './components/Placeholder'
|
13
14
|
import ValueContainer from './components/ValueContainer'
|
14
15
|
|
16
|
+
import { noop } from '../utilities/props'
|
17
|
+
|
15
18
|
/**
|
16
19
|
* @typedef {object} Props
|
17
20
|
* @prop {boolean} async - whether Typeahead should fetch data from
|
@@ -22,6 +25,8 @@ import ValueContainer from './components/ValueContainer'
|
|
22
25
|
type Props = {
|
23
26
|
async?: boolean,
|
24
27
|
label?: string,
|
28
|
+
loadOptions?: noop | string,
|
29
|
+
name?: string,
|
25
30
|
}
|
26
31
|
|
27
32
|
/**
|
@@ -45,14 +50,27 @@ const Typeahead = (props: Props) => {
|
|
45
50
|
},
|
46
51
|
isClearable: true,
|
47
52
|
isSearchable: true,
|
53
|
+
name,
|
48
54
|
...props,
|
49
55
|
}
|
50
56
|
|
57
|
+
if (typeof(props.loadOptions) === 'string') selectProps.loadOptions = get(window, props.loadOptions)
|
58
|
+
|
51
59
|
const Tag = props.async ? AsyncSelect : Select
|
52
60
|
|
61
|
+
const handleOnChange = (data, { action }) => {
|
62
|
+
if (action === 'clear') {
|
63
|
+
const multiValueClearEvent = new CustomEvent('pb-typeahead-kit-result-clear')
|
64
|
+
document.dispatchEvent(multiValueClearEvent)
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
53
68
|
return (
|
54
69
|
<div className="pb_typeahead_kit react-select">
|
55
|
-
<Tag
|
70
|
+
<Tag
|
71
|
+
onChange={handleOnChange}
|
72
|
+
{...selectProps}
|
73
|
+
/>
|
56
74
|
</div>
|
57
75
|
)
|
58
76
|
}
|