playbook_ui 11.4.0 → 11.5.0.pre.alpha.pre.rubocop
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/pb_button/button.test.js +6 -8
- data/app/pb_kits/playbook/pb_date/_date.tsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +13 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +24 -19
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +1 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +8 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +25 -3
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.html.erb +44 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.jsx +60 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.md +9 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions_element.html.erb +33 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions_element.jsx +67 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss +4 -4
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +142 -0
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js +116 -0
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_time/{_date_time.jsx → _date_time.tsx} +2 -5
- data/app/pb_kits/playbook/pb_date_time/dateTime.test.js +110 -0
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_align.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_year_stacked/{_date_year_stacked.jsx → _date_year_stacked.tsx} +6 -6
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +67 -0
- data/app/pb_kits/playbook/pb_dialog/_dialog.jsx +32 -14
- data/app/pb_kits/playbook/pb_dialog/_dialog.scss +5 -0
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.jsx +2 -2
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx +22 -4
- data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.jsx +3 -3
- data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +79 -17
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_stacked_alert.jsx +55 -93
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +79 -42
- data/app/pb_kits/playbook/pb_file_upload/{_file_upload.jsx → _file_upload.tsx} +6 -10
- data/app/pb_kits/playbook/pb_form_group/{_form_group.jsx → _form_group.tsx} +1 -4
- data/app/pb_kits/playbook/pb_form_group/form_group.test.js +17 -0
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +10 -1
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.html.erb +5 -0
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.jsx +26 -0
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.md +1 -0
- data/app/pb_kits/playbook/pb_hashtag/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_hashtag/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_hashtag/hashtag.html.erb +1 -1
- data/app/pb_kits/playbook/pb_hashtag/hashtag.rb +6 -0
- data/app/pb_kits/playbook/pb_hashtag/hashtag.test.js +54 -0
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +3 -0
- data/app/pb_kits/playbook/pb_home_address_street/city_emphasis.html.erb +2 -1
- data/app/pb_kits/playbook/pb_home_address_street/city_emphasis.rb +2 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.html.erb +12 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.jsx +23 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.md +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +4 -0
- data/app/pb_kits/playbook/pb_home_address_street/street_emphasis.html.erb +2 -1
- data/app/pb_kits/playbook/pb_home_address_street/street_emphasis.rb +4 -1
- data/app/pb_kits/playbook/pb_layout/{_layout.jsx → _layout.tsx} +13 -19
- data/app/pb_kits/playbook/pb_layout/layout.test.js +98 -0
- data/app/pb_kits/playbook/pb_lightbox/lightbox.test.jsx +23 -15
- data/app/pb_kits/playbook/pb_time/_time.tsx +2 -2
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +5 -2
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.html.erb +9 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.jsx +10 -0
- data/app/pb_kits/playbook/pb_timestamp/timestamp.rb +4 -1
- data/app/pb_kits/playbook/pb_timestamp/timestamp.test.js +164 -0
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +0 -4
- data/app/pb_kits/playbook/pb_tooltip/tooltip.test.jsx +11 -8
- data/app/pb_kits/playbook/tokens/_colors.scss +74 -74
- data/app/pb_kits/playbook/tokens/_typography.scss +8 -8
- data/app/pb_kits/playbook/utilities/_flexbox.scss +11 -11
- data/app/pb_kits/playbook/utilities/{_align_content.scss → flexbox_global_props/_align_content.scss} +0 -0
- data/app/pb_kits/playbook/utilities/{_align_items.scss → flexbox_global_props/_align_items.scss} +0 -0
- data/app/pb_kits/playbook/utilities/{_align_self.scss → flexbox_global_props/_align_self.scss} +0 -0
- data/app/pb_kits/playbook/utilities/{_flex.scss → flexbox_global_props/_flex.scss} +0 -0
- data/app/pb_kits/playbook/utilities/{_flex_direction.scss → flexbox_global_props/_flex_direction.scss} +0 -0
- data/app/pb_kits/playbook/utilities/{_flex_grow.scss → flexbox_global_props/_flex_grow.scss} +0 -0
- data/app/pb_kits/playbook/utilities/{_flex_shrink.scss → flexbox_global_props/_flex_shrink.scss} +0 -0
- data/app/pb_kits/playbook/utilities/{_flex_wrap.scss → flexbox_global_props/_flex_wrap.scss} +0 -0
- data/app/pb_kits/playbook/utilities/{_justify_content.scss → flexbox_global_props/_justify_content.scss} +0 -0
- data/app/pb_kits/playbook/utilities/{_justify_self.scss → flexbox_global_props/_justify_self.scss} +0 -0
- data/app/pb_kits/playbook/utilities/{_order.scss → flexbox_global_props/_order.scss} +0 -0
- data/app/pb_kits/playbook/utilities/props.ts +1 -1
- data/app/pb_kits/playbook/utilities/test-utils.js +2 -3
- data/lib/playbook/version.rb +2 -2
- metadata +39 -21
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +0 -155
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.
|
4
|
+
version: 11.5.0.pre.alpha.pre.rubocop
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-09-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -689,6 +689,11 @@ files:
|
|
689
689
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.md
|
690
690
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.jsx
|
691
691
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.md
|
692
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.html.erb
|
693
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.jsx
|
694
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.md
|
695
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions_element.html.erb
|
696
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions_element.jsx
|
692
697
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb
|
693
698
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx
|
694
699
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_time.html.erb
|
@@ -713,10 +718,11 @@ files:
|
|
713
718
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss
|
714
719
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_time_selection_styles.scss
|
715
720
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_week_styles.scss
|
716
|
-
- app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx
|
717
721
|
- app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss
|
722
|
+
- app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx
|
718
723
|
- app/pb_kits/playbook/pb_date_range_inline/date_range_inline.html.erb
|
719
724
|
- app/pb_kits/playbook/pb_date_range_inline/date_range_inline.rb
|
725
|
+
- app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js
|
720
726
|
- app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.html.erb
|
721
727
|
- app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx
|
722
728
|
- app/pb_kits/playbook/pb_date_range_inline/docs/_description.md
|
@@ -750,8 +756,9 @@ files:
|
|
750
756
|
- app/pb_kits/playbook/pb_date_stacked/docs/_footer.md
|
751
757
|
- app/pb_kits/playbook/pb_date_stacked/docs/example.yml
|
752
758
|
- app/pb_kits/playbook/pb_date_stacked/docs/index.js
|
753
|
-
- app/pb_kits/playbook/pb_date_time/_date_time.jsx
|
754
759
|
- app/pb_kits/playbook/pb_date_time/_date_time.scss
|
760
|
+
- app/pb_kits/playbook/pb_date_time/_date_time.tsx
|
761
|
+
- app/pb_kits/playbook/pb_date_time/dateTime.test.js
|
755
762
|
- app/pb_kits/playbook/pb_date_time/date_time.html.erb
|
756
763
|
- app/pb_kits/playbook/pb_date_time/date_time.rb
|
757
764
|
- app/pb_kits/playbook/pb_date_time/docs/_date_time_align.html.erb
|
@@ -772,10 +779,11 @@ files:
|
|
772
779
|
- app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default.jsx
|
773
780
|
- app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml
|
774
781
|
- app/pb_kits/playbook/pb_date_time_stacked/docs/index.js
|
775
|
-
- app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx
|
776
782
|
- app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.scss
|
783
|
+
- app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx
|
777
784
|
- app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.html.erb
|
778
785
|
- app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
|
786
|
+
- app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js
|
779
787
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default.html.erb
|
780
788
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default.jsx
|
781
789
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default.md
|
@@ -828,8 +836,8 @@ files:
|
|
828
836
|
- app/pb_kits/playbook/pb_docs/kit_example.rb
|
829
837
|
- app/pb_kits/playbook/pb_enhanced_element/element_observer.js
|
830
838
|
- app/pb_kits/playbook/pb_enhanced_element/index.js
|
831
|
-
- app/pb_kits/playbook/pb_file_upload/_file_upload.jsx
|
832
839
|
- app/pb_kits/playbook/pb_file_upload/_file_upload.scss
|
840
|
+
- app/pb_kits/playbook/pb_file_upload/_file_upload.tsx
|
833
841
|
- app/pb_kits/playbook/pb_file_upload/docs/_description.md
|
834
842
|
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_accept.jsx
|
835
843
|
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_description.jsx
|
@@ -940,8 +948,8 @@ files:
|
|
940
948
|
- app/pb_kits/playbook/pb_form/docs/example.yml
|
941
949
|
- app/pb_kits/playbook/pb_form/form.rb
|
942
950
|
- app/pb_kits/playbook/pb_form/pb_form_validation.js
|
943
|
-
- app/pb_kits/playbook/pb_form_group/_form_group.jsx
|
944
951
|
- app/pb_kits/playbook/pb_form_group/_form_group.scss
|
952
|
+
- app/pb_kits/playbook/pb_form_group/_form_group.tsx
|
945
953
|
- app/pb_kits/playbook/pb_form_group/docs/_form_group_button.html.erb
|
946
954
|
- app/pb_kits/playbook/pb_form_group/docs/_form_group_button.jsx
|
947
955
|
- app/pb_kits/playbook/pb_form_group/docs/_form_group_date_picker.html.erb
|
@@ -963,6 +971,7 @@ files:
|
|
963
971
|
- app/pb_kits/playbook/pb_form_group/docs/index.js
|
964
972
|
- app/pb_kits/playbook/pb_form_group/form_group.html.erb
|
965
973
|
- app/pb_kits/playbook/pb_form_group/form_group.rb
|
974
|
+
- app/pb_kits/playbook/pb_form_group/form_group.test.js
|
966
975
|
- app/pb_kits/playbook/pb_form_pill/_form_pill.scss
|
967
976
|
- app/pb_kits/playbook/pb_form_pill/_form_pill.tsx
|
968
977
|
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_example.html.erb
|
@@ -1012,10 +1021,14 @@ files:
|
|
1012
1021
|
- app/pb_kits/playbook/pb_hashtag/docs/_footer.md
|
1013
1022
|
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_default.html.erb
|
1014
1023
|
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_default.jsx
|
1024
|
+
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.html.erb
|
1025
|
+
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.jsx
|
1026
|
+
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.md
|
1015
1027
|
- app/pb_kits/playbook/pb_hashtag/docs/example.yml
|
1016
1028
|
- app/pb_kits/playbook/pb_hashtag/docs/index.js
|
1017
1029
|
- app/pb_kits/playbook/pb_hashtag/hashtag.html.erb
|
1018
1030
|
- app/pb_kits/playbook/pb_hashtag/hashtag.rb
|
1031
|
+
- app/pb_kits/playbook/pb_hashtag/hashtag.test.js
|
1019
1032
|
- app/pb_kits/playbook/pb_highlight/_highlight.scss
|
1020
1033
|
- app/pb_kits/playbook/pb_highlight/_highlight.tsx
|
1021
1034
|
- app/pb_kits/playbook/pb_highlight/docs/_description.md
|
@@ -1038,6 +1051,9 @@ files:
|
|
1038
1051
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb
|
1039
1052
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx
|
1040
1053
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md
|
1054
|
+
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.html.erb
|
1055
|
+
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.jsx
|
1056
|
+
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.md
|
1041
1057
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified.html.erb
|
1042
1058
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified.jsx
|
1043
1059
|
- app/pb_kits/playbook/pb_home_address_street/docs/example.yml
|
@@ -1159,8 +1175,8 @@ files:
|
|
1159
1175
|
- app/pb_kits/playbook/pb_label_value/docs/index.js
|
1160
1176
|
- app/pb_kits/playbook/pb_label_value/label_value.html.erb
|
1161
1177
|
- app/pb_kits/playbook/pb_label_value/label_value.rb
|
1162
|
-
- app/pb_kits/playbook/pb_layout/_layout.jsx
|
1163
1178
|
- app/pb_kits/playbook/pb_layout/_layout.scss
|
1179
|
+
- app/pb_kits/playbook/pb_layout/_layout.tsx
|
1164
1180
|
- app/pb_kits/playbook/pb_layout/_layout_mixin.scss
|
1165
1181
|
- app/pb_kits/playbook/pb_layout/body.html.erb
|
1166
1182
|
- app/pb_kits/playbook/pb_layout/body.rb
|
@@ -1195,6 +1211,7 @@ files:
|
|
1195
1211
|
- app/pb_kits/playbook/pb_layout/item.rb
|
1196
1212
|
- app/pb_kits/playbook/pb_layout/layout.html.erb
|
1197
1213
|
- app/pb_kits/playbook/pb_layout/layout.rb
|
1214
|
+
- app/pb_kits/playbook/pb_layout/layout.test.js
|
1198
1215
|
- app/pb_kits/playbook/pb_layout/sidebar.html.erb
|
1199
1216
|
- app/pb_kits/playbook/pb_layout/sidebar.rb
|
1200
1217
|
- app/pb_kits/playbook/pb_legend/_legend.jsx
|
@@ -1933,6 +1950,7 @@ files:
|
|
1933
1950
|
- app/pb_kits/playbook/pb_timestamp/docs/index.js
|
1934
1951
|
- app/pb_kits/playbook/pb_timestamp/timestamp.html.erb
|
1935
1952
|
- app/pb_kits/playbook/pb_timestamp/timestamp.rb
|
1953
|
+
- app/pb_kits/playbook/pb_timestamp/timestamp.test.js
|
1936
1954
|
- app/pb_kits/playbook/pb_title/_title.scss
|
1937
1955
|
- app/pb_kits/playbook/pb_title/_title.tsx
|
1938
1956
|
- app/pb_kits/playbook/pb_title/_title_mixin.scss
|
@@ -2154,29 +2172,29 @@ files:
|
|
2154
2172
|
- app/pb_kits/playbook/tokens/exports/_spacing.scss
|
2155
2173
|
- app/pb_kits/playbook/tokens/exports/_typography.scss
|
2156
2174
|
- app/pb_kits/playbook/tokens/index.scss
|
2157
|
-
- app/pb_kits/playbook/utilities/_align_content.scss
|
2158
|
-
- app/pb_kits/playbook/utilities/_align_items.scss
|
2159
|
-
- app/pb_kits/playbook/utilities/_align_self.scss
|
2160
2175
|
- app/pb_kits/playbook/utilities/_background_colors.scss
|
2161
2176
|
- app/pb_kits/playbook/utilities/_colors.scss
|
2162
2177
|
- app/pb_kits/playbook/utilities/_cursor.scss
|
2163
2178
|
- app/pb_kits/playbook/utilities/_display.scss
|
2164
|
-
- app/pb_kits/playbook/utilities/_flex.scss
|
2165
|
-
- app/pb_kits/playbook/utilities/_flex_direction.scss
|
2166
|
-
- app/pb_kits/playbook/utilities/_flex_grow.scss
|
2167
|
-
- app/pb_kits/playbook/utilities/_flex_shrink.scss
|
2168
|
-
- app/pb_kits/playbook/utilities/_flex_wrap.scss
|
2169
2179
|
- app/pb_kits/playbook/utilities/_flexbox.scss
|
2170
|
-
- app/pb_kits/playbook/utilities/_justify_content.scss
|
2171
|
-
- app/pb_kits/playbook/utilities/_justify_self.scss
|
2172
2180
|
- app/pb_kits/playbook/utilities/_line_height.scss
|
2173
2181
|
- app/pb_kits/playbook/utilities/_max_width.scss
|
2174
2182
|
- app/pb_kits/playbook/utilities/_mixins.scss
|
2175
2183
|
- app/pb_kits/playbook/utilities/_number_spacing.scss
|
2176
|
-
- app/pb_kits/playbook/utilities/_order.scss
|
2177
2184
|
- app/pb_kits/playbook/utilities/_positioning.scss
|
2178
2185
|
- app/pb_kits/playbook/utilities/_shadow.scss
|
2179
2186
|
- app/pb_kits/playbook/utilities/_spacing.scss
|
2187
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_align_content.scss
|
2188
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_align_items.scss
|
2189
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_align_self.scss
|
2190
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_flex.scss
|
2191
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_flex_direction.scss
|
2192
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_flex_grow.scss
|
2193
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_flex_shrink.scss
|
2194
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_flex_wrap.scss
|
2195
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_justify_content.scss
|
2196
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_justify_self.scss
|
2197
|
+
- app/pb_kits/playbook/utilities/flexbox_global_props/_order.scss
|
2180
2198
|
- app/pb_kits/playbook/utilities/globalProps.ts
|
2181
2199
|
- app/pb_kits/playbook/utilities/props.ts
|
2182
2200
|
- app/pb_kits/playbook/utilities/test-utils.js
|
@@ -2266,9 +2284,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2266
2284
|
version: '0'
|
2267
2285
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2268
2286
|
requirements:
|
2269
|
-
- - "
|
2287
|
+
- - ">"
|
2270
2288
|
- !ruby/object:Gem::Version
|
2271
|
-
version:
|
2289
|
+
version: 1.3.1
|
2272
2290
|
requirements: []
|
2273
2291
|
rubygems_version: 3.3.7
|
2274
2292
|
signing_key:
|
@@ -1,155 +0,0 @@
|
|
1
|
-
/* @flow */
|
2
|
-
|
3
|
-
import React from 'react'
|
4
|
-
import classnames from 'classnames'
|
5
|
-
|
6
|
-
import { globalProps } from '../utilities/globalProps'
|
7
|
-
import { buildCss } from '../utilities/props'
|
8
|
-
import DateTime from '../pb_kit/dateTime'
|
9
|
-
|
10
|
-
import Body from '../pb_body/_body'
|
11
|
-
import Caption from '../pb_caption/_caption'
|
12
|
-
import Icon from '../pb_icon/_icon'
|
13
|
-
|
14
|
-
type DateRangeInlineProps = {
|
15
|
-
className?: string,
|
16
|
-
id?: string,
|
17
|
-
data?: string,
|
18
|
-
align?: "left" | "center" | "vertical",
|
19
|
-
size?: "sm" | "xs",
|
20
|
-
dark?: boolean,
|
21
|
-
icon?: boolean,
|
22
|
-
startDate?: date,
|
23
|
-
endDate?: date
|
24
|
-
}
|
25
|
-
|
26
|
-
const dateTimestamp = (dateValue, includeYear) => {
|
27
|
-
const date = new DateTime({ value: dateValue })
|
28
|
-
if (includeYear) {
|
29
|
-
return `${date.toMonth()} ${date.toDay()}, ${date.toYear()}`
|
30
|
-
} else {
|
31
|
-
return `${date.toMonth()} ${date.toDay()}`
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
const dateTimeIso = (dateValue) => {
|
36
|
-
const date = new DateTime({ value: dateValue })
|
37
|
-
return date.toIso()
|
38
|
-
}
|
39
|
-
|
40
|
-
const DateRangeInline = (props: DateRangeInlineProps) => {
|
41
|
-
const {
|
42
|
-
icon = false,
|
43
|
-
dark = false,
|
44
|
-
size = 'sm',
|
45
|
-
align = 'left',
|
46
|
-
startDate,
|
47
|
-
endDate,
|
48
|
-
className,
|
49
|
-
} = props
|
50
|
-
|
51
|
-
const iconContent = () => {
|
52
|
-
return (
|
53
|
-
<If condition={icon}>
|
54
|
-
<Body
|
55
|
-
color="light"
|
56
|
-
key={Math.random()}
|
57
|
-
tag="span"
|
58
|
-
>
|
59
|
-
<Icon
|
60
|
-
className="pb_date_range_inline_icon"
|
61
|
-
dark={dark}
|
62
|
-
fixedWidth
|
63
|
-
icon="calendar-alt"
|
64
|
-
size={size}
|
65
|
-
tag="span"
|
66
|
-
/>
|
67
|
-
</Body>
|
68
|
-
</If>
|
69
|
-
)
|
70
|
-
}
|
71
|
-
|
72
|
-
const dateInCurrentYear = () => {
|
73
|
-
const currentDate = new Date()
|
74
|
-
return startDate.getFullYear() == endDate.getFullYear() && startDate.getFullYear() == currentDate.getFullYear()
|
75
|
-
}
|
76
|
-
|
77
|
-
const dateRangeClasses = buildCss('pb_date_range_inline_kit', align)
|
78
|
-
|
79
|
-
const renderTime = (date) => {
|
80
|
-
return (
|
81
|
-
<time dateTime={dateTimeIso(date)}>
|
82
|
-
<Choose>
|
83
|
-
<When condition={dateInCurrentYear()}>
|
84
|
-
{` ${dateTimestamp(date, false)} `}
|
85
|
-
</When>
|
86
|
-
<Otherwise>
|
87
|
-
{` ${dateTimestamp(date, true)} `}
|
88
|
-
</Otherwise>
|
89
|
-
</Choose>
|
90
|
-
</time>
|
91
|
-
)
|
92
|
-
}
|
93
|
-
|
94
|
-
return (
|
95
|
-
<div className={classnames(dateRangeClasses, globalProps(props), className)}>
|
96
|
-
<div className="pb_date_range_inline_wrapper">
|
97
|
-
<If condition={size == 'xs'}>
|
98
|
-
{iconContent()}
|
99
|
-
<Caption
|
100
|
-
dark={dark}
|
101
|
-
tag="span"
|
102
|
-
>
|
103
|
-
{renderTime(startDate)}
|
104
|
-
</Caption>
|
105
|
-
<Caption
|
106
|
-
dark={dark}
|
107
|
-
tag="span"
|
108
|
-
>
|
109
|
-
<Icon
|
110
|
-
className="pb_date_range_inline_arrow"
|
111
|
-
fixedWidth
|
112
|
-
icon="long-arrow-right"
|
113
|
-
/>
|
114
|
-
</Caption>
|
115
|
-
<Caption
|
116
|
-
dark={dark}
|
117
|
-
tag="span"
|
118
|
-
>
|
119
|
-
{renderTime(endDate)}
|
120
|
-
</Caption>
|
121
|
-
</If>
|
122
|
-
|
123
|
-
<If condition={size == 'sm'}>
|
124
|
-
{iconContent()}
|
125
|
-
<Body
|
126
|
-
dark={dark}
|
127
|
-
tag="span"
|
128
|
-
>
|
129
|
-
{renderTime(startDate)}
|
130
|
-
</Body>
|
131
|
-
<Body
|
132
|
-
color="light"
|
133
|
-
dark={dark}
|
134
|
-
tag="span"
|
135
|
-
>
|
136
|
-
<Icon
|
137
|
-
className="pb_date_range_inline_arrow"
|
138
|
-
dark={dark}
|
139
|
-
fixedWidth
|
140
|
-
icon="long-arrow-right"
|
141
|
-
/>
|
142
|
-
</Body>
|
143
|
-
<Body
|
144
|
-
dark={dark}
|
145
|
-
tag="span"
|
146
|
-
>
|
147
|
-
{renderTime(endDate)}
|
148
|
-
</Body>
|
149
|
-
</If>
|
150
|
-
</div>
|
151
|
-
</div>
|
152
|
-
)
|
153
|
-
}
|
154
|
-
|
155
|
-
export default DateRangeInline
|