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.
Files changed (225) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/playbook/application_controller.rb +0 -2
  3. data/app/pb_kits/playbook/_playbook.scss +1 -1
  4. data/app/pb_kits/playbook/data/menu.yml +5 -4
  5. data/app/pb_kits/playbook/index.js +4 -1
  6. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.html.erb +1 -12
  7. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +1 -1
  8. data/app/pb_kits/playbook/pb_body/body.rb +1 -1
  9. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +1 -0
  10. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +3 -3
  11. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +82 -90
  12. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_dark.scss +57 -0
  13. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +27 -0
  14. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.rb +4 -2
  15. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.html.erb +17 -7
  16. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx +32 -9
  17. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.html.erb +18 -7
  18. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.jsx +37 -9
  19. data/app/pb_kits/playbook/pb_button_toolbar/docs/example.yml +3 -7
  20. data/app/pb_kits/playbook/pb_button_toolbar/docs/index.js +0 -2
  21. data/app/pb_kits/playbook/pb_caption/_caption.html.erb +7 -5
  22. data/app/pb_kits/playbook/pb_caption/docs/_caption_block.html.erb +11 -0
  23. data/app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx +28 -0
  24. data/app/pb_kits/playbook/pb_caption/docs/example.yml +2 -0
  25. data/app/pb_kits/playbook/pb_caption/docs/index.js +1 -0
  26. data/app/pb_kits/playbook/pb_date_picker/_date_picker.html.erb +1 -2
  27. data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +1 -3
  28. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +3 -2
  29. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +34 -32
  30. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb +1 -2
  31. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx +1 -2
  32. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +1 -0
  33. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.html.erb +4 -0
  34. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.jsx +4 -0
  35. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.html.erb +9 -9
  36. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.jsx +8 -8
  37. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.md +3 -1
  38. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb +1 -0
  39. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx +1 -0
  40. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -4
  41. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -2
  42. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.html.erb +8 -14
  43. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +122 -39
  44. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +33 -2
  45. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.rb +44 -9
  46. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.html.erb +14 -1
  47. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx +45 -1
  48. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.html.erb +1 -8
  49. data/app/pb_kits/playbook/pb_distribution_bar/distribution_bar.rb +7 -0
  50. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.html.erb +3 -2
  51. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +29 -15
  52. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +10 -0
  53. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.html.erb +21 -0
  54. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.jsx +38 -0
  55. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.html.erb +2 -1
  56. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.jsx +1 -2
  57. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +1 -1
  58. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +1 -1
  59. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.html.erb +1 -1
  60. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.jsx +1 -1
  61. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +2 -0
  62. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +1 -0
  63. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +7 -1
  64. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +18 -0
  65. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +9 -6
  66. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  67. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form.html.erb +3 -3
  68. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form_validate.html.erb +3 -3
  69. data/app/pb_kits/playbook/pb_form/form_builder/checkbox_field.rb +7 -2
  70. data/app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb +1 -0
  71. data/app/pb_kits/playbook/pb_line_graph/_line_graph.html.erb +1 -13
  72. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +1 -1
  73. data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +7 -6
  74. data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_wrong_numbers.jsx +1 -0
  75. data/app/pb_kits/playbook/pb_popover/_popover.scss +6 -4
  76. data/app/pb_kits/playbook/pb_popover/index.js +3 -1
  77. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +3 -0
  78. data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +168 -33
  79. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.html.erb +3 -1
  80. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.jsx +10 -8
  81. data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -1
  82. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +14 -16
  83. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +6 -3
  84. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.html.erb +17 -1
  85. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.jsx +17 -1
  86. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.jsx +10 -3
  87. data/app/pb_kits/playbook/pb_progress_step/progress_step.rb +11 -1
  88. data/app/pb_kits/playbook/pb_progress_step/progress_step_item.rb +1 -1
  89. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.html.erb +34 -0
  90. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx +68 -0
  91. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.md +2 -0
  92. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.html.erb +61 -0
  93. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.jsx +89 -0
  94. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.md +1 -0
  95. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.html.erb +34 -0
  96. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.jsx +68 -0
  97. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.md +2 -0
  98. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.html.erb +43 -0
  99. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.jsx +80 -0
  100. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.md +1 -0
  101. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.html.erb +34 -0
  102. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.jsx +63 -0
  103. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.md +1 -0
  104. data/app/pb_kits/playbook/pb_table/docs/example.yml +12 -0
  105. data/app/pb_kits/playbook/pb_table/docs/index.js +6 -0
  106. data/app/pb_kits/playbook/pb_time/_time.html.erb +17 -20
  107. data/app/pb_kits/playbook/pb_time/_time.jsx +40 -27
  108. data/app/pb_kits/playbook/pb_time/_time.scss +4 -24
  109. data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +4 -1
  110. data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +11 -11
  111. data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +13 -1
  112. data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +4 -1
  113. data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +3 -1
  114. data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +7 -2
  115. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +5 -5
  116. data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +4 -4
  117. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_options.html.erb +10 -0
  118. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +1 -0
  119. data/app/pb_kits/playbook/pb_toggle/toggle.rb +5 -2
  120. data/app/pb_kits/playbook/pb_typeahead/_typeahead.html.erb +24 -20
  121. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +19 -1
  122. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +8 -1
  123. data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +21 -13
  124. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb +1 -1
  125. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_context_dark.html.erb +1 -1
  126. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb +25 -0
  127. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +0 -3
  128. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.md +8 -0
  129. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.html.erb +30 -0
  130. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md +11 -0
  131. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.html.erb +25 -0
  132. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +0 -3
  133. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.md +1 -0
  134. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +3 -0
  135. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +24 -1
  136. data/app/pb_kits/playbook/react_rails_kits.js +6 -0
  137. data/app/pb_kits/playbook/tokens/_colors.scss +22 -23
  138. data/app/pb_kits/playbook/tokens/_typography.scss +4 -4
  139. data/app/pb_kits/playbook/tokens/index.scss +11 -0
  140. data/app/pb_kits/playbook/vendor.js +8 -0
  141. data/lib/generators/kit/kit_generator.rb +1 -1
  142. data/lib/playbook/engine.rb +1 -0
  143. data/lib/playbook/version.rb +1 -1
  144. data/lib/tasks/changelog.rake +14 -0
  145. data/lib/tasks/pb_release.rake +14 -3
  146. metadata +35 -81
  147. data/app/controllers/playbook/guides_controller.rb +0 -11
  148. data/app/controllers/playbook/pages_controller.rb +0 -99
  149. data/app/controllers/playbook/samples_controller.rb +0 -40
  150. data/app/pb_kits/playbook/packs/application.js +0 -55
  151. data/app/pb_kits/playbook/packs/examples.js +0 -182
  152. data/app/pb_kits/playbook/packs/main.scss +0 -12
  153. data/app/pb_kits/playbook/packs/samples.js +0 -21
  154. data/app/pb_kits/playbook/packs/site_styles/_samples.scss +0 -72
  155. data/app/pb_kits/playbook/packs/site_styles/_scaffold.scss +0 -43
  156. data/app/pb_kits/playbook/packs/site_styles/_site-style.scss +0 -146
  157. data/app/pb_kits/playbook/packs/site_styles/docs/_all.scss +0 -10
  158. data/app/pb_kits/playbook/packs/site_styles/docs/_bg_light_doc_example.scss +0 -7
  159. data/app/pb_kits/playbook/packs/site_styles/docs/_code_snippet.scss +0 -531
  160. data/app/pb_kits/playbook/packs/site_styles/docs/_color_utilities.scss +0 -92
  161. data/app/pb_kits/playbook/packs/site_styles/docs/_flex_examples.scss +0 -15
  162. data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +0 -148
  163. data/app/pb_kits/playbook/packs/site_styles/docs/_kits_examples.scss +0 -15
  164. data/app/pb_kits/playbook/packs/site_styles/docs/_markdown.scss +0 -88
  165. data/app/pb_kits/playbook/packs/site_styles/docs/_spacing_tokens.scss +0 -72
  166. data/app/pb_kits/playbook/pb_background/_background.html.erb +0 -14
  167. data/app/pb_kits/playbook/pb_background/_background.jsx +0 -64
  168. data/app/pb_kits/playbook/pb_background/_background.scss +0 -15
  169. data/app/pb_kits/playbook/pb_background/background.rb +0 -36
  170. data/app/pb_kits/playbook/pb_background/docs/_background_default.html.erb +0 -41
  171. data/app/pb_kits/playbook/pb_background/docs/_background_default.jsx +0 -75
  172. data/app/pb_kits/playbook/pb_background/docs/example.yml +0 -8
  173. data/app/pb_kits/playbook/pb_background/docs/index.js +0 -1
  174. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.html.erb +0 -11
  175. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.jsx +0 -29
  176. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.html.erb +0 -11
  177. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.jsx +0 -34
  178. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.html.erb +0 -4
  179. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx +0 -13
  180. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md +0 -1
  181. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.html.erb +0 -4
  182. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.jsx +0 -13
  183. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_summary.jsx +0 -45
  184. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_summary.jsx +0 -27
  185. data/app/views/layouts/playbook/_mobile_hamburger.html.erb +0 -2
  186. data/app/views/layouts/playbook/_nav.html.erb +0 -37
  187. data/app/views/layouts/playbook/_sidebar.html.erb +0 -51
  188. data/app/views/layouts/playbook/application.html.erb +0 -26
  189. data/app/views/layouts/playbook/fullscreen.html.slim +0 -10
  190. data/app/views/layouts/playbook/grid.html.slim +0 -10
  191. data/app/views/layouts/playbook/samples.html.erb +0 -19
  192. data/app/views/playbook/guides/create_kit.html.slim +0 -16
  193. data/app/views/playbook/guides/create_kit/_file_naming.html.md +0 -2
  194. data/app/views/playbook/guides/create_kit/_generator.html.md +0 -6
  195. data/app/views/playbook/guides/create_kit/_kit_examples.html.md +0 -2
  196. data/app/views/playbook/guides/create_kit/_kit_rails.html.md +0 -2
  197. data/app/views/playbook/guides/create_kit/_kit_react.html.md +0 -2
  198. data/app/views/playbook/guides/create_kit/_layout.html.md +0 -2
  199. data/app/views/playbook/guides/create_kit/_view_objects.html.md +0 -2
  200. data/app/views/playbook/guides/create_kit/_writing_sass.md +0 -10
  201. data/app/views/playbook/guides/use_nitro.html.slim +0 -6
  202. data/app/views/playbook/guides/use_nitro/_local.html.md +0 -2
  203. data/app/views/playbook/guides/use_nitro/_nitro_components.html.md +0 -2
  204. data/app/views/playbook/guides/use_nitro/_versions.html.md +0 -2
  205. data/app/views/playbook/pages/fullscreen.html.slim +0 -10
  206. data/app/views/playbook/pages/grid.html.slim +0 -2
  207. data/app/views/playbook/pages/home.html.slim +0 -4
  208. data/app/views/playbook/pages/kit_category_show.html.erb +0 -14
  209. data/app/views/playbook/pages/kit_show.html.erb +0 -33
  210. data/app/views/playbook/pages/kits.html.erb +0 -12
  211. data/app/views/playbook/pages/principals/_getting_started.html.md +0 -30
  212. data/app/views/playbook/pages/principles.html.slim +0 -3
  213. data/app/views/playbook/pages/tokens.html.slim +0 -15
  214. data/app/views/playbook/pages/tokens/_pb_doc_spacing.html.slim +0 -61
  215. data/app/views/playbook/pages/utilities.html.slim +0 -116
  216. data/app/views/playbook/pages/utilities/_pb_doc_color.html.slim +0 -15
  217. data/app/views/playbook/samples/collection_detail/index.html.erb +0 -169
  218. data/app/views/playbook/samples/collection_detail/index.jsx +0 -372
  219. data/app/views/playbook/samples/dashboards/index.html.erb +0 -81
  220. data/app/views/playbook/samples/dashboards/index.jsx +0 -130
  221. data/app/views/playbook/samples/filter_table/index.html.erb +0 -348
  222. data/app/views/playbook/samples/filter_table/index.jsx +0 -433
  223. data/app/views/playbook/samples/registration/index.html.erb +0 -316
  224. data/app/views/playbook/samples/registration/index.jsx +0 -476
  225. data/app/views/playbook/samples/sample_show.html.erb +0 -36
@@ -14,8 +14,8 @@
14
14
  :example_text_area,
15
15
  :example_select_field,
16
16
  :example_collection_select_field,
17
- :example_checkbox_field
18
- :example_date_picker_field2
17
+ :example_checkbox_field,
18
+ :example_date_picker_field_2
19
19
 
20
20
 
21
21
  def self.model_name
@@ -52,7 +52,7 @@
52
52
  <%= form.select :example_select_field, [["Yes", 1], ["No", 2]], props: { required: true, blank_selection: "Select One...", label: true } %>
53
53
  <%= form.collection_select :example_collection_select_field, example_collection, :value, :name, props: { required: true, blank_selection: "Select One...", label: true } %>
54
54
  <%= form.check_box :example_checkbox_field, props: { text: "Example Checkbox", label: true, required: true } %>
55
- <%= form.date_picker :example_date_picker_field2, props: { default_date: 'blank', required: true } %>
55
+ <%= form.date_picker :example_date_picker_field_2, props: { default_date: 'blank', label: true, required: true } %>
56
56
 
57
57
  <%= form.actions do |action| %>
58
58
  <%= action.submit %>
@@ -4,13 +4,18 @@ module Playbook
4
4
  module PbForm
5
5
  module FormBuilder
6
6
  module CheckboxField
7
- def check_box(name, props: {}, **options, &block)
7
+ def check_box(name, props: {}, **options)
8
8
  label_text = @template.label(@object_name, name) if props[:label] == true
9
9
  options[:required] = true if props[:required]
10
10
  props[:margin_bottom] = "sm"
11
11
  props[:form_spacing] = true
12
12
 
13
- input = super(name, **options, &block)
13
+ checked_value = options[:checked_value]
14
+ unchecked_value = options[:unchecked_value]
15
+ options.delete(:checked_value)
16
+ options.delete(:unchecked_value)
17
+
18
+ input = super(name, options, checked_value, unchecked_value)
14
19
 
15
20
  if props[:label]
16
21
  @template.pb_rails("caption", props: { text: label_text, margin_bottom: "xs" }) +
@@ -8,6 +8,7 @@ module Playbook
8
8
  prefix = @object_name
9
9
  html_attribute_name = "#{prefix}[#{name}]"
10
10
  html_id = "#{prefix}_#{name}"
11
+ props[:label] = @template.label(@object_name, name) if props[:label] == true
11
12
 
12
13
  props[:name] = html_attribute_name
13
14
  props[:picker_id] = html_id
@@ -1,13 +1 @@
1
- <%= content_tag(:div, "",
2
- aria: object.aria,
3
- id: object.id,
4
- data: object.data,
5
- class: object.classname
6
- ) %>
7
- <% content_for :pb_js do %>
8
- <%= javascript_tag do %>
9
- window.addEventListener('DOMContentLoaded', function() {
10
- new pbChart('.selector', <%= object.chart_options %>)
11
- })
12
- <% end %>
13
- <% end %>
1
+ <%= react_component('LineGraph', object.chart_options) %>
@@ -44,7 +44,7 @@ module Playbook
44
44
  legend: legend,
45
45
  toggleLegendClick: toggle_legend_click,
46
46
  height: height,
47
- }.to_json.html_safe
47
+ }
48
48
  end
49
49
 
50
50
  def classname
@@ -77,22 +77,23 @@ const PersonContact = (props: PersonContactProps) => {
77
77
  contactDetail={contactObject.contactDetail}
78
78
  contactType={contactObject.contactType}
79
79
  contactValue={contactObject.contactValue}
80
- key={index}
80
+ key={`valid-contact-${index}`}
81
81
  />
82
- ))}
82
+ ))}
83
83
  {wrongContacts().map((contactObject, index) => (
84
- <>
84
+ <div key={`wrong-contact-caption-wrapper-${index}`}>
85
85
  <Caption
86
86
  className="wrong_numbers"
87
+ key={`wrong-contact-caption-${index}`}
87
88
  text="wrong number"
88
89
  />
89
90
  <Contact
90
91
  contactType={contactObject.contactType}
91
92
  contactValue={contactObject.contactValue}
92
- key={index}
93
+ key={`wrong-contact-${index}`}
93
94
  />
94
- </>
95
- ))}
95
+ </div>
96
+ ))}
96
97
  </div>
97
98
  )
98
99
  }
@@ -23,6 +23,7 @@ const PersonContactWithWrongNumbers = () => {
23
23
  },
24
24
  ]}
25
25
  firstName="Pauline"
26
+ key="person-contact-1"
26
27
  lastName="Smith"
27
28
  />
28
29
  </>
@@ -31,12 +31,14 @@
31
31
 
32
32
  .pb_popover_tooltip {
33
33
  opacity: 0;
34
- animation-name: fadeOut;
35
- animation-duration: 150ms;
36
- animation-timing-function: linear;
37
- animation-fill-mode: forwards;
38
34
  visibility: hidden;
39
35
  pointer-events: none;
36
+ &.hide {
37
+ animation-name: fadeOut;
38
+ animation-duration: 150ms;
39
+ animation-timing-function: linear;
40
+ animation-fill-mode: forwards;
41
+ }
40
42
  &.show {
41
43
  animation-name: fadeIn;
42
44
  animation-duration: 150ms;
@@ -37,7 +37,7 @@ export default class PbPopover extends PbEnhancedElement {
37
37
 
38
38
  setTimeout(() => {
39
39
  this.popper.update()
40
- this.tooltip.classList.toggle('show')
40
+ this.toggleTooltip()
41
41
  }, 0)
42
42
  })
43
43
  }
@@ -71,10 +71,12 @@ export default class PbPopover extends PbEnhancedElement {
71
71
 
72
72
  hideTooltip() {
73
73
  this.tooltip.classList.remove('show')
74
+ this.tooltip.classList.add('hide')
74
75
  }
75
76
 
76
77
  toggleTooltip() {
77
78
  this.tooltip.classList.toggle('show')
79
+ this.tooltip.classList.toggle('hide')
78
80
  }
79
81
 
80
82
  get triggerElement() {
@@ -13,12 +13,14 @@ type ProgressStepProps = {
13
13
  orientation?: "horizontal" | "vertical",
14
14
  icon?: boolean,
15
15
  variant?: string,
16
+ color?: string,
16
17
  }
17
18
 
18
19
  const ProgressStep = (props: ProgressStepProps) => {
19
20
  const {
20
21
  className,
21
22
  children,
23
+ color,
22
24
  orientation = 'horizontal',
23
25
  icon = false,
24
26
  variant,
@@ -29,6 +31,7 @@ const ProgressStep = (props: ProgressStepProps) => {
29
31
  orientation,
30
32
  iconStyle,
31
33
  variant,
34
+ color,
32
35
  )
33
36
 
34
37
  return (
@@ -4,18 +4,17 @@
4
4
  @import "../tokens/opacity";
5
5
  @import "../tokens/typography";
6
6
 
7
+
8
+
7
9
  [class^=pb_progress_step_kit]{
8
10
  list-style:none;
9
11
  display: flex;
10
-
11
12
  [class*=pb_progress_step_item] {
12
13
  display:flex;
13
- flex-basis:100%;
14
14
  flex-direction:column;
15
- justify-content:space-between;
16
15
  position: relative;
17
- align-items: center;
18
-
16
+ flex-basis: 100%;
17
+
19
18
  .circle {
20
19
  height:14px;
21
20
  width:14px;
@@ -39,7 +38,6 @@
39
38
  height: 4px;
40
39
  position: absolute;
41
40
  top: 5px;
42
- left: -50%;
43
41
  width:100%;
44
42
  background-color:$border_light;
45
43
  }
@@ -58,7 +56,7 @@
58
56
  .circle{
59
57
  background-color: $white;
60
58
  border: solid 2px $primary;
61
- color: rgba($color: $primary, $alpha: 0)
59
+ color: rgba( $primary, 0)
62
60
  }
63
61
  &::before{
64
62
  background-color: $primary;
@@ -74,18 +72,163 @@
74
72
  }
75
73
  }
76
74
  }
77
-
75
+ // Start of Horizontal
78
76
  &[class*=horizontal]{
79
77
  flex-direction: row;
78
+ [class*=pb_progress_step_item]{
79
+ align-items: flex-end;
80
+ &::before{
81
+ width: calc(100% + .04em);
82
+ }
83
+ [class*=box]{
84
+ display: flex;
85
+ flex-direction: column;
86
+ align-items: center;
87
+ .content{
88
+ top: 16px;
89
+ position: absolute;
90
+ width: fit-content;
91
+ min-width: max-content;
92
+ }
93
+ }
94
+ &:first-child {
95
+ position: relative;
96
+ align-items: flex-start;
97
+ flex-basis: 0;
98
+ .box{
99
+ align-items: flex-start;
100
+ }
101
+ }
102
+ &:last-child{
103
+ .box{
104
+ align-items: flex-end;
105
+ }
106
+
107
+ }
108
+ }
109
+ // Start of Tracker
110
+ &[class*=tracker] {
111
+ background-color: $border_light;
112
+ border-radius: 1rem;
113
+ height:24px;
114
+ align-items: center;
115
+ [class*=box]{
116
+ .circle{
117
+ box-shadow: none;
118
+ height: 24px;
119
+ width: 24px;
120
+ border: $primary solid 4px;
121
+ }
122
+ .content{
123
+ top:-24px;
124
+ position: absolute;
125
+ }
126
+ }
127
+ li[class*=pb_progress_step_item]{
128
+ &::before{
129
+ background-color: $border_light;
130
+ height: 24px;
131
+ border-radius: 1rem;
132
+ top: 0;
133
+ width: calc(100% + 1.5em);
134
+ }
135
+ .box{
136
+ align-items: center;
137
+ }
138
+ &:first-child{
139
+ position: relative;
140
+ .box{
141
+ align-items: flex-start;
142
+ }
143
+ }
144
+ &:last-child{
145
+ .box{
146
+ align-items: flex-end;
147
+ }
148
+ }
149
+ }
150
+ li[class*=_active]{
151
+ .circle{
152
+ height: 24px;
153
+ width: 24px;
154
+ border: $primary solid 6px;
155
+ background-color: rgba($white, $opacity_8);
156
+ }
157
+ &::before {
158
+ background-color: $primary;
159
+ }
160
+ }
161
+ li[class*=_inactive]{
162
+ &::before {
163
+ display: none;
164
+ background-color: $border_light;
165
+ }
166
+ .circle{
167
+ background-color: darken($border_light,10%);
168
+ border: $border_light solid 6px;
169
+ }
170
+
171
+ }
172
+ li[class*=_complete]{
173
+ &::before {
174
+ background-color: $primary;
175
+ }
176
+ .circle{
177
+ background-color: darken($primary,25%);
178
+ }
179
+ }
180
+ li[class*=_hidden]{
181
+ &::before, .circle {
182
+ display: none;
183
+ }
184
+ }
185
+ li[class*=_hidden] ~ li[class*=_active],
186
+ li[class*=_hidden] ~ li[class*=_complete] {
187
+ &::before {
188
+ width: calc(200% + 1.5em);
189
+ }
190
+ }
191
+ &[class*=dark]{
192
+ background-color: tint($bg_dark,20%);
193
+ [class*=_inactive]{
194
+ .circle{
195
+ border-color: tint($bg_dark,20%);
196
+ }
197
+ }
198
+ }
199
+ &[class*=info]{
200
+ li[class*=inactive] .circle{
201
+ border-color: $border_light;
202
+ }
203
+ .box .circle , li[class*=_active] .circle{
204
+ border-color: $teal;
205
+ }
206
+ li[class*=_complete],li[class*=_active]{
207
+ &::before {
208
+ background-color: $teal;
209
+ }
210
+ }
211
+ li[class*=_complete] .circle{
212
+ background-color: darken($teal,25%);
213
+ }
214
+ }
215
+ }
216
+ //End of Tracker
217
+
80
218
  }
219
+ // End of Horizontal
81
220
 
221
+ // Start of Vertical
82
222
  &[class*=vertical]{
83
223
  flex-direction: column;
84
224
  [class*=pb_progress_step_item]{
225
+ [class*=box]{
226
+ display:flex;
85
227
  flex-direction: row;
86
228
  align-items: flex-start;
87
229
  justify-content: flex-start;
88
230
  margin: 8px;
231
+ }
89
232
  &::before {
90
233
  display: flex;
91
234
  flex-direction: column;
@@ -93,7 +236,7 @@
93
236
  height: 100%;
94
237
  position: absolute;
95
238
  top:14px;
96
- left: 13px;
239
+ left: 21px;
97
240
  width:4px;
98
241
  background-color:$border_light;
99
242
  }
@@ -105,47 +248,39 @@
105
248
  }
106
249
  }
107
250
  }
251
+ //End of Vertical
108
252
 
109
253
  &[class*=icon] [class*=_complete] svg{
110
254
  opacity: 1;
111
255
  }
112
256
 
113
257
  &[class*=dark] {
258
+ [class*=progress_step_item]{
259
+ &::before{
260
+ background-color: tint($bg_dark,20%);
261
+ }
262
+ }
114
263
  .circle{
115
- box-shadow: 0 0 0 2px $bg_dark;
264
+ box-shadow: 0 0 0 2px tint($bg_dark,10%);
116
265
  }
117
266
  [class*=active]{
118
267
  .circle{
119
- background-color: $bg_dark;
268
+ background-color: tint($bg_dark,10%);
269
+ }
270
+ &::before{
271
+ background-color: $primary;
120
272
  }
121
273
  }
122
274
  [class*=inactive]{
123
275
  .circle, &::before{
124
- background-color: tint($bg_dark,10%);
276
+ background-color: tint($bg_dark,20%);
125
277
  }
126
278
  }
127
- }
128
- &[class*=tracker] {
129
- .circle{
130
- box-shadow: none;
131
- }
132
- li[class*=pb_progress_step_item]{
133
- flex-direction: column-reverse;
134
- &::before{
135
- background-color: $border_light;
136
- top:auto;
137
- bottom: 5px;
138
- }
139
- }
140
- li[class*=active] .circle,li[class*=inactive] .circle{
141
- background-color: $border_light;
142
- border:none;
143
- }
144
- li[class*=complete]{
145
- .circle, &::before {
146
- background-color: $teal;
279
+ [class*=complete]{
280
+ .circle, &::before{
281
+ background-color: $primary;
147
282
  }
148
283
  }
149
284
  }
150
285
 
151
- }
286
+ }