playbook_ui 13.13.0.pre.alpha.play10221678 → 13.13.0.pre.alpha.play10821726

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +5 -5
  3. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +3 -3
  4. data/app/pb_kits/playbook/pb_background/_background.tsx +9 -9
  5. data/app/pb_kits/playbook/pb_badge/_badge.tsx +2 -2
  6. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +3 -3
  7. data/app/pb_kits/playbook/pb_body/_body.tsx +4 -5
  8. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +3 -4
  9. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.tsx +3 -3
  10. data/app/pb_kits/playbook/pb_button/_button.tsx +40 -37
  11. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +3 -3
  12. data/app/pb_kits/playbook/pb_caption/_caption.tsx +1 -1
  13. data/app/pb_kits/playbook/pb_card/_card.tsx +2 -2
  14. data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +5 -4
  15. data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +3 -3
  16. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +9 -9
  17. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +1 -1
  18. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +5 -7
  19. data/app/pb_kits/playbook/pb_collapsible/_helper_functions.ts +2 -2
  20. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +5 -4
  21. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +16 -12
  22. data/app/pb_kits/playbook/pb_contact/_contact.tsx +3 -3
  23. data/app/pb_kits/playbook/pb_contact/docs/_contact_default_swift.md +14 -0
  24. data/app/pb_kits/playbook/pb_contact/docs/_contact_props_swift.md +6 -0
  25. data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail_swift.md +14 -0
  26. data/app/pb_kits/playbook/pb_contact/docs/example.yml +6 -0
  27. data/app/pb_kits/playbook/pb_currency/_currency.tsx +2 -2
  28. data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +1 -1
  29. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +4 -57
  30. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +4 -57
  31. data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +20 -16
  32. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +1 -1
  33. data/app/pb_kits/playbook/pb_date/_date.tsx +7 -7
  34. data/app/pb_kits/playbook/pb_date/docs/_date_alignment_swift.md +11 -0
  35. data/app/pb_kits/playbook/pb_date/docs/_date_default_swift.md +16 -0
  36. data/app/pb_kits/playbook/pb_date/docs/_date_props_swift.md +8 -0
  37. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled_swift.md +11 -0
  38. data/app/pb_kits/playbook/pb_date/docs/_date_variants_swift.md +14 -0
  39. data/app/pb_kits/playbook/pb_date/docs/example.yml +7 -0
  40. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -4
  41. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -3
  42. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +10 -11
  43. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.jsx +2 -2
  44. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -4
  45. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -2
  46. data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +3 -69
  47. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +2 -2
  48. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +2 -2
  49. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +8 -8
  50. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +2 -2
  51. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +1 -1
  52. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +2 -2
  53. data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +6 -3
  54. data/app/pb_kits/playbook/pb_detail/_detail.tsx +4 -4
  55. data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +2 -2
  56. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +42 -34
  57. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.tsx +1 -1
  58. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +4 -5
  59. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +4 -4
  60. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height.jsx +8 -4
  61. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.jsx +8 -4
  62. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx +4 -2
  63. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +1 -1
  64. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +5 -5
  65. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +1 -1
  66. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -1
  67. data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -1
  68. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +1 -1
  69. data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +1 -1
  70. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
  71. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +1 -1
  72. data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +1 -1
  73. data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +1 -1
  74. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -1
  75. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default_swift.md +18 -0
  76. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis_swift.md +34 -0
  77. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link_swift.md +18 -0
  78. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified_swift.md +13 -0
  79. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_props_swift.md +14 -0
  80. data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +6 -0
  81. data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
  82. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +1 -1
  83. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +1 -1
  84. data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +1 -1
  85. data/app/pb_kits/playbook/pb_image/_image.tsx +1 -1
  86. data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +1 -1
  87. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
  88. data/app/pb_kits/playbook/pb_layout/_layout.tsx +1 -1
  89. data/app/pb_kits/playbook/pb_legend/_legend.tsx +1 -1
  90. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +1 -1
  91. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +1 -1
  92. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +1 -1
  93. data/app/pb_kits/playbook/pb_list/_list.tsx +1 -1
  94. data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
  95. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -1
  96. data/app/pb_kits/playbook/pb_map/_map.tsx +1 -1
  97. data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
  98. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +1 -1
  99. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -1
  100. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +1 -1
  101. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +1 -1
  102. data/app/pb_kits/playbook/pb_nav/_item.tsx +1 -1
  103. data/app/pb_kits/playbook/pb_nav/_nav.tsx +1 -1
  104. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
  105. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +1 -1
  106. data/app/pb_kits/playbook/pb_person/_person.tsx +1 -1
  107. data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +1 -1
  108. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +1 -1
  109. data/app/pb_kits/playbook/pb_pill/_pill.tsx +1 -1
  110. data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
  111. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +1 -1
  112. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +1 -1
  113. data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +1 -1
  114. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +1 -1
  115. data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -1
  116. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +1 -1
  117. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -1
  118. data/app/pb_kits/playbook/pb_select/_select.tsx +1 -1
  119. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +1 -1
  120. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +1 -1
  121. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +1 -1
  122. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +1 -1
  123. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +1 -1
  124. data/app/pb_kits/playbook/pb_source/_source.tsx +1 -1
  125. data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +1 -1
  126. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +1 -1
  127. data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +1 -1
  128. data/app/pb_kits/playbook/pb_table/_table.tsx +1 -1
  129. data/app/pb_kits/playbook/pb_table/_table_row.tsx +1 -1
  130. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -1
  131. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +1 -1
  132. data/app/pb_kits/playbook/pb_time/_time.tsx +1 -1
  133. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +1 -1
  134. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +1 -1
  135. data/app/pb_kits/playbook/pb_timeline/_item.tsx +1 -1
  136. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -1
  137. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +1 -1
  138. data/app/pb_kits/playbook/pb_title/_title.tsx +1 -1
  139. data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +1 -1
  140. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +1 -1
  141. data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +1 -1
  142. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -1
  143. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +1 -1
  144. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -1
  145. data/app/pb_kits/playbook/pb_user/_user.tsx +1 -1
  146. data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +1 -1
  147. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +1 -1
  148. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +1 -1
  149. data/app/pb_kits/playbook/tokens/exports/exports.d.ts +1 -0
  150. data/app/pb_kits/playbook/utilities/props.ts +2 -2
  151. data/dist/menu.yml +240 -168
  152. data/dist/playbook-rails.js +4 -4
  153. data/lib/playbook/version.rb +1 -1
  154. metadata +16 -8
  155. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.html.erb +0 -29
  156. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.jsx +0 -34
  157. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.md +0 -7
  158. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.html.erb +0 -28
  159. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.jsx +0 -34
  160. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.md +0 -1
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "13.13.0"
5
- VERSION = "13.13.0.pre.alpha.play10221678"
5
+ VERSION = "13.13.0.pre.alpha.play10821726"
6
6
  end
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: 13.13.0.pre.alpha.play10221678
4
+ version: 13.13.0.pre.alpha.play10821726
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: 2023-12-13 00:00:00.000000000 Z
12
+ date: 2023-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -661,8 +661,11 @@ files:
661
661
  - app/pb_kits/playbook/pb_contact/contact.test.js
662
662
  - app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb
663
663
  - app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx
664
+ - app/pb_kits/playbook/pb_contact/docs/_contact_default_swift.md
665
+ - app/pb_kits/playbook/pb_contact/docs/_contact_props_swift.md
664
666
  - app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb
665
667
  - app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx
668
+ - app/pb_kits/playbook/pb_contact/docs/_contact_with_detail_swift.md
666
669
  - app/pb_kits/playbook/pb_contact/docs/_description.md
667
670
  - app/pb_kits/playbook/pb_contact/docs/example.yml
668
671
  - app/pb_kits/playbook/pb_contact/docs/index.js
@@ -713,15 +716,20 @@ files:
713
716
  - app/pb_kits/playbook/pb_date/date.rb
714
717
  - app/pb_kits/playbook/pb_date/docs/_date_alignment.html.erb
715
718
  - app/pb_kits/playbook/pb_date/docs/_date_alignment.jsx
719
+ - app/pb_kits/playbook/pb_date/docs/_date_alignment_swift.md
716
720
  - app/pb_kits/playbook/pb_date/docs/_date_default.html.erb
717
721
  - app/pb_kits/playbook/pb_date/docs/_date_default.jsx
722
+ - app/pb_kits/playbook/pb_date/docs/_date_default_swift.md
723
+ - app/pb_kits/playbook/pb_date/docs/_date_props_swift.md
718
724
  - app/pb_kits/playbook/pb_date/docs/_date_timezone.html.erb
719
725
  - app/pb_kits/playbook/pb_date/docs/_date_timezone.md
720
726
  - app/pb_kits/playbook/pb_date/docs/_date_unstyled.html.erb
721
727
  - app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx
722
728
  - app/pb_kits/playbook/pb_date/docs/_date_unstyled.md
729
+ - app/pb_kits/playbook/pb_date/docs/_date_unstyled_swift.md
723
730
  - app/pb_kits/playbook/pb_date/docs/_date_variants.html.erb
724
731
  - app/pb_kits/playbook/pb_date/docs/_date_variants.jsx
732
+ - app/pb_kits/playbook/pb_date/docs/_date_variants_swift.md
725
733
  - app/pb_kits/playbook/pb_date/docs/_description.md
726
734
  - app/pb_kits/playbook/pb_date/docs/example.yml
727
735
  - app/pb_kits/playbook/pb_date/docs/index.js
@@ -776,12 +784,6 @@ files:
776
784
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.md
777
785
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions_element.html.erb
778
786
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions_element.jsx
779
- - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.html.erb
780
- - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.jsx
781
- - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.md
782
- - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.html.erb
783
- - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.jsx
784
- - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.md
785
787
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.html.erb
786
788
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.md
787
789
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_range_limit.html.erb
@@ -1204,14 +1206,19 @@ files:
1204
1206
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.html.erb
1205
1207
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.jsx
1206
1208
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.md
1209
+ - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default_swift.md
1207
1210
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb
1208
1211
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx
1209
1212
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md
1213
+ - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis_swift.md
1210
1214
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.html.erb
1211
1215
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.jsx
1212
1216
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.md
1217
+ - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link_swift.md
1213
1218
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified.html.erb
1214
1219
  - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified.jsx
1220
+ - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified_swift.md
1221
+ - app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_props_swift.md
1215
1222
  - app/pb_kits/playbook/pb_home_address_street/docs/example.yml
1216
1223
  - app/pb_kits/playbook/pb_home_address_street/docs/index.js
1217
1224
  - app/pb_kits/playbook/pb_home_address_street/home_address_street.html.erb
@@ -2619,6 +2626,7 @@ files:
2619
2626
  - app/pb_kits/playbook/tokens/exports/_shadows.scss
2620
2627
  - app/pb_kits/playbook/tokens/exports/_spacing.scss
2621
2628
  - app/pb_kits/playbook/tokens/exports/_typography.scss
2629
+ - app/pb_kits/playbook/tokens/exports/exports.d.ts
2622
2630
  - app/pb_kits/playbook/tokens/index.scss
2623
2631
  - app/pb_kits/playbook/utilities/_background_colors.scss
2624
2632
  - app/pb_kits/playbook/utilities/_border_radius.scss
@@ -1,29 +0,0 @@
1
- <%= pb_rails("date_picker", props: {
2
- allow_input: true,
3
- custom_quick_pick_dates: {
4
- dates: [
5
- # Allow Playbook to handle the logic...
6
- {
7
- label: "Last 15 months",
8
- value: {
9
- timePeriod: "months",
10
- amount: 15,
11
- },
12
- },
13
- # Or, be explicit with an exact date range for more control...
14
- {
15
- label: "First Week of June 2022",
16
- value: ["06/01/2022", "06/07/2022"],
17
- },
18
- ],
19
- },
20
- end_date_id: "quick-pick-end-date",
21
- end_date_name: "quick-pick-end-date",
22
- mode: "range",
23
- picker_id: "date-picker-quick-pick-custom",
24
- placeholder: "mm/dd/yyyy to mm/dd/yyyy",
25
- selection_type: "quickpick",
26
- start_date_id: "quick-pick-start-date",
27
- start_date_name: "quick-pick-start-date"
28
- }) %>
29
-
@@ -1,34 +0,0 @@
1
- import React from "react"
2
- import DatePicker from "../_date_picker"
3
-
4
- const DatePickerQuickPickCustom = (props) => (
5
- <>
6
- <DatePicker
7
- allowInput
8
- customQuickPickDates={{
9
- dates: [
10
- // Allow Playbook to handle the logic...
11
- {
12
- label: "Last 15 months",
13
- value: {
14
- timePeriod: "months",
15
- amount: 15,
16
- },
17
- },
18
- // Or, be explicit with an exact date range for more control...
19
- {
20
- label: "First Week of June 2022",
21
- value: ["06/01/2022", "06/07/2022"],
22
- },
23
- ],
24
- }}
25
- mode='range'
26
- pickerId='date-picker-quick-pick-custom-override'
27
- placeholder='mm/dd/yyyy to mm/dd/yyyy'
28
- selectionType='quickpick'
29
- {...props}
30
- />
31
- </>
32
- )
33
-
34
- export default DatePickerQuickPickCustom
@@ -1,7 +0,0 @@
1
- The customQuickPickDates/custom_quick_pick_dates prop allows for the user/dev to define their own quick pick dates.
2
- The prop accepts an object with two key/value pairs: dates & override (separate doc example below).
3
-
4
- The dates property accepts an array of objects. Each object in the array has label and value properties. The label is what will be displayed in the UI of the dropdown menu. The value property is just the date that is going to be passed to the datepicker. The value property can be an array of two strings that represent a range, allowing for the dev to be extremely specific. Additionally, the dates array allows for a clean, simple API under that automatically converts dates in a common vernacular.
5
-
6
- The timePeriod property accepts "days", "weeks", "months", "quarters" or "years", representing past time periods.
7
- The amount property accepts any number.
@@ -1,28 +0,0 @@
1
- <%= pb_rails("date_picker", props: {
2
- allow_input: true,
3
- custom_quick_pick_dates: {
4
- override: false,
5
- dates: [
6
- {
7
- label: "Last 15 months",
8
- value: {
9
- timePeriod: "months",
10
- amount: 15,
11
- },
12
- },
13
- {
14
- label: "First Week of June 2022",
15
- value: ["06/01/2022", "06/07/2022"],
16
- },
17
- ],
18
- },
19
- end_date_id: "quick-pick-end-date",
20
- end_date_name: "quick-pick-end-date",
21
- mode: "range",
22
- picker_id: "date-picker-quick-pick-override",
23
- placeholder: "mm/dd/yyyy to mm/dd/yyyy",
24
- selection_type: "quickpick",
25
- start_date_id: "quick-pick-start-date",
26
- start_date_name: "quick-pick-start-date"
27
- }) %>
28
-
@@ -1,34 +0,0 @@
1
- import React from "react"
2
- import DatePicker from "../_date_picker"
3
-
4
- const DatePickerQuickPickCustomOverride = (props) => (
5
- <>
6
- <DatePicker
7
- allowInput
8
- customQuickPickDates={{
9
- override: false,
10
- dates: [
11
- {
12
- label: "Last 15 months",
13
- value: {
14
- timePeriod: "months",
15
- amount: 15,
16
- },
17
- },
18
- {
19
- label: "First Week of June 2022",
20
- value: ["06/01/2022", "06/07/2022"],
21
- },
22
- ],
23
- }}
24
- marginTop='lg'
25
- mode='range'
26
- pickerId='date-picker-quick-pick-custom'
27
- placeholder='mm/dd/yyyy to mm/dd/yyyy'
28
- selectionType='quickpick'
29
- {...props}
30
- />
31
- </>
32
- )
33
-
34
- export default DatePickerQuickPickCustomOverride
@@ -1 +0,0 @@
1
- The customQuickPickDates/custom_quick_pick_dates prop allows for an override boolean. The override allows for the user to completely override the quick pick dates that ship with the component. Default of `override` is set to true. If you would like to simply append your dates to the default quick pick dates, set this prop to false explicitly.