playbook_ui 7.0.1.pre.alpha15 → 7.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/data/menu.yml +3 -4
  3. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +1 -0
  4. data/app/pb_kits/playbook/pb_body/body.rb +1 -1
  5. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +0 -1
  6. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +3 -3
  7. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +90 -82
  8. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.rb +2 -4
  9. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.html.erb +7 -17
  10. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx +9 -32
  11. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.html.erb +7 -18
  12. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.jsx +9 -37
  13. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.html.erb +11 -0
  14. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.jsx +29 -0
  15. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.html.erb +11 -0
  16. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.jsx +34 -0
  17. data/app/pb_kits/playbook/pb_button_toolbar/docs/example.yml +7 -3
  18. data/app/pb_kits/playbook/pb_button_toolbar/docs/index.js +2 -0
  19. data/app/pb_kits/playbook/pb_caption/_caption.html.erb +5 -7
  20. data/app/pb_kits/playbook/pb_caption/docs/example.yml +0 -2
  21. data/app/pb_kits/playbook/pb_caption/docs/index.js +0 -1
  22. data/app/pb_kits/playbook/pb_date_picker/_date_picker.html.erb +2 -1
  23. data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +3 -1
  24. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +2 -3
  25. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +32 -34
  26. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.html.erb +4 -0
  27. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx +13 -0
  28. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md +1 -0
  29. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.html.erb +4 -0
  30. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.jsx +13 -0
  31. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb +2 -1
  32. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx +2 -1
  33. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.html.erb +0 -4
  34. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.jsx +0 -4
  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 +1 -3
  38. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb +0 -1
  39. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx +0 -1
  40. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +4 -0
  41. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -0
  42. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.html.erb +14 -8
  43. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +39 -122
  44. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +2 -33
  45. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.rb +9 -44
  46. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.html.erb +1 -14
  47. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx +1 -45
  48. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.html.erb +2 -3
  49. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +15 -29
  50. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +0 -10
  51. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.html.erb +1 -2
  52. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.jsx +2 -1
  53. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +1 -1
  54. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +1 -1
  55. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.html.erb +1 -1
  56. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.jsx +1 -1
  57. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -2
  58. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +0 -1
  59. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -7
  60. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
  61. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  62. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form.html.erb +3 -3
  63. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form_validate.html.erb +3 -3
  64. data/app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb +0 -1
  65. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +1 -0
  66. data/app/pb_kits/playbook/pb_popover/_popover.scss +4 -6
  67. data/app/pb_kits/playbook/pb_popover/index.js +1 -3
  68. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +0 -3
  69. data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +33 -168
  70. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.html.erb +1 -3
  71. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.jsx +8 -10
  72. data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -1
  73. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +16 -14
  74. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +3 -6
  75. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.html.erb +1 -17
  76. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.jsx +1 -17
  77. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.jsx +3 -10
  78. data/app/pb_kits/playbook/pb_progress_step/progress_step.rb +1 -11
  79. data/app/pb_kits/playbook/pb_progress_step/progress_step_item.rb +1 -1
  80. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -12
  81. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -6
  82. data/app/pb_kits/playbook/pb_time/_time.html.erb +20 -17
  83. data/app/pb_kits/playbook/pb_time/_time.jsx +27 -40
  84. data/app/pb_kits/playbook/pb_time/_time.scss +24 -4
  85. data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +1 -4
  86. data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +11 -11
  87. data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +1 -13
  88. data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +1 -4
  89. data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +1 -3
  90. data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +2 -7
  91. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +5 -5
  92. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +0 -1
  93. data/app/pb_kits/playbook/pb_toggle/toggle.rb +1 -4
  94. data/app/pb_kits/playbook/pb_typeahead/_typeahead.html.erb +20 -24
  95. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +1 -19
  96. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +1 -8
  97. data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +13 -21
  98. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb +1 -1
  99. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_context_dark.html.erb +1 -1
  100. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +3 -0
  101. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_summary.jsx +45 -0
  102. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +3 -0
  103. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_summary.jsx +27 -0
  104. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -3
  105. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -24
  106. data/app/pb_kits/playbook/react_rails_kits.js +0 -1
  107. data/app/pb_kits/playbook/vendor.js +0 -3
  108. data/lib/playbook/version.rb +1 -1
  109. metadata +15 -35
  110. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_dark.scss +0 -57
  111. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +0 -27
  112. data/app/pb_kits/playbook/pb_caption/docs/_caption_block.html.erb +0 -11
  113. data/app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx +0 -28
  114. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +0 -1
  115. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.html.erb +0 -21
  116. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.jsx +0 -38
  117. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +0 -18
  118. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.html.erb +0 -34
  119. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx +0 -68
  120. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.md +0 -2
  121. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.html.erb +0 -61
  122. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.jsx +0 -89
  123. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.md +0 -1
  124. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.html.erb +0 -34
  125. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.jsx +0 -68
  126. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.md +0 -2
  127. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.html.erb +0 -43
  128. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.jsx +0 -80
  129. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.md +0 -1
  130. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.html.erb +0 -34
  131. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.jsx +0 -63
  132. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.md +0 -1
  133. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_options.html.erb +0 -10
  134. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb +0 -25
  135. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.md +0 -8
  136. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.html.erb +0 -30
  137. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md +0 -11
  138. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.html.erb +0 -25
  139. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.md +0 -1
  140. data/lib/tasks/changelog.rake +0 -14
@@ -3,7 +3,6 @@
3
3
  id: object.id,
4
4
  data: object.data,
5
5
  class: object.classname) do %>
6
- <%= pb_rails("icon", props: { icon: object.icon_value, classname: "pb_icon", fixed_width: true }) %>
7
- <%= pb_rails("title", props: { text: object.text, size: 4, classname: "pb_fixed_confirmation_toast_text" }) if object.show_text? %>
8
- <%= pb_rails("icon", props: { icon: "times", classname: "pb_icon" }) if object.closeable %>
6
+ <%= pb_rails("icon", props: { icon: object.icon_value, classname: "pb_icon" }) %>
7
+ <%= pb_rails("title", props: { text: object.text, size: 4, classname: "pb_fixed_confirmation_toast_text" }) if object.show_text?%>
9
8
  <% end %>
@@ -1,6 +1,6 @@
1
1
  /* @flow */
2
2
 
3
- import React, { useState } from 'react'
3
+ import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { Icon, Title } from '../'
6
6
  import { globalProps } from '../utilities/globalProps.js'
@@ -14,7 +14,6 @@ const iconMap = {
14
14
 
15
15
  type FixedConfirmationToastProps = {
16
16
  className?: string,
17
- closeable?: boolean,
18
17
  data?: string,
19
18
  id?: string,
20
19
  status?: "success" | "error" | "neutral" | "tip",
@@ -22,8 +21,7 @@ type FixedConfirmationToastProps = {
22
21
  }
23
22
 
24
23
  const FixedConfirmationToast = (props: FixedConfirmationToastProps) => {
25
- const [showToast, toggleToast] = useState(true)
26
- const { className, closeable = false, status = 'neutral', text } = props
24
+ const { className, status = 'neutral', text } = props
27
25
  const css = classnames(
28
26
  `pb_fixed_confirmation_toast_kit_${status}`,
29
27
  globalProps(props),
@@ -32,32 +30,20 @@ const FixedConfirmationToast = (props: FixedConfirmationToastProps) => {
32
30
  const icon = iconMap[status]
33
31
 
34
32
  return (
35
- <If condition={showToast}>
36
- <div
37
- className={css}
38
- onClick={closeable && (() => toggleToast(false))}
39
- >
40
- <If condition={icon}>
41
- <Icon
42
- className="pb_icon"
43
- fixedWidth
44
- icon={icon}
45
- />
46
- </If>
47
- <Title
48
- className="pb_fixed_confirmation_toast_text"
49
- size={4}
50
- text={text}
33
+ <div className={css}>
34
+ <If condition={icon}>
35
+ <Icon
36
+ className="pb_icon"
37
+ fixed_width
38
+ icon={icon}
51
39
  />
52
- <If condition={closeable}>
53
- <Icon
54
- className="pb_icon"
55
- fixedWidth={false}
56
- icon="times"
57
- />
58
- </If>
59
- </div>
60
- </If>
40
+ </If>
41
+ <Title
42
+ className="pb_fixed_confirmation_toast_text"
43
+ size={4}
44
+ text={text}
45
+ />
46
+ </div>
61
47
  )
62
48
  }
63
49
 
@@ -20,16 +20,6 @@ $confirmation_toast_colors: (
20
20
  border-radius: $border_rad_mega;
21
21
  box-shadow: $shadow_deeper;
22
22
 
23
- .fa-times {
24
- cursor: pointer;
25
- opacity: 0.5;
26
- position: relative;
27
- right: -8px;
28
- }
29
- &:hover .fa-times {
30
- opacity: 1;
31
- }
32
-
33
23
  @each $color_name, $color_value in $confirmation_toast_colors {
34
24
  &[class*=_#{$color_name}] {
35
25
  background: $color_value;
@@ -1,7 +1,6 @@
1
1
  <%= pb_rails("fixed_confirmation_toast", props: {
2
2
  text: "Error Message",
3
- status: "error",
4
- closeable: true
3
+ status: "error"
5
4
  })%>
6
5
 
7
6
  <br><br>
@@ -6,12 +6,12 @@ const FixedConfirmationToastDefault = () => {
6
6
  <div>
7
7
  <div>
8
8
  <FixedConfirmationToast
9
- closeable
10
9
  status="error"
11
10
  text="Error Message"
12
11
  />
13
12
  </div>
14
13
 
14
+ <br />
15
15
  <br />
16
16
 
17
17
  <div>
@@ -21,6 +21,7 @@ const FixedConfirmationToastDefault = () => {
21
21
  />
22
22
  </div>
23
23
 
24
+ <br />
24
25
  <br />
25
26
 
26
27
  <div>
@@ -1,4 +1,4 @@
1
1
  <%= pb_rails("fixed_confirmation_toast", props: {
2
- text: "Scan to Assign Selected Items.\nClick here to generate report",
2
+ text: "Scan to Assign Selected Items.\nClick X to close at any time",
3
3
  status: "tip",
4
4
  }) %>
@@ -6,7 +6,7 @@ const FixedConfirmationToastMultiLine = () => {
6
6
  <div>
7
7
  <FixedConfirmationToast
8
8
  status="tip"
9
- text={'Scan to Assign Selected Items.\n Click here to generate report'}
9
+ text={'Scan to Assign Selected Items.\n Click X to close at any time'}
10
10
  />
11
11
  </div>
12
12
  )
@@ -1,5 +1,5 @@
1
1
  <%= pb_rails("fixed_confirmation_toast", props: {
2
2
  dark: true,
3
- text: "Scan to Assign Selected Items.\nClick here to generate report.",
3
+ text: "Scan to Assign Selected Items.\nClick X to close at any time",
4
4
  status: "tip",
5
5
  }) %>
@@ -7,7 +7,7 @@ const FixedConfirmationToastMultiLineDark = () => {
7
7
  <FixedConfirmationToast
8
8
  dark
9
9
  status="tip"
10
- text={'Scan to Assign Selected Items.\n Click here to generate report'}
10
+ text={'Scan to Assign Selected Items.\n Click X to close at any time'}
11
11
  />
12
12
  </div>
13
13
  )
@@ -3,14 +3,12 @@ examples:
3
3
  rails:
4
4
  - fixed_confirmation_toast_default: Default
5
5
  - fixed_confirmation_toast_multi_line: Multi Line
6
- - fixed_confirmation_toast_close: Click to Close
7
6
  - fixed_confirmation_toast_dark: Dark
8
7
  - fixed_confirmation_toast_multi_line_dark: Multi Line Dark
9
8
 
10
9
  react:
11
10
  - fixed_confirmation_toast_default: Default
12
11
  - fixed_confirmation_toast_multi_line: Multi Line
13
- - fixed_confirmation_toast_close: Click to Close
14
12
  - fixed_confirmation_toast_dark: Dark
15
13
  - fixed_confirmation_toast_multi_line_dark: Multi Line Dark
16
14
 
@@ -1,5 +1,4 @@
1
1
  export { default as FixedConfirmationToastDefault } from './_fixed_confirmation_toast_default.jsx'
2
2
  export { default as FixedConfirmationToastMultiLine } from './_fixed_confirmation_toast_multi_line.jsx'
3
- export { default as FixedConfirmationToastClose } from './_fixed_confirmation_toast_close.jsx'
4
3
  export { default as FixedConfirmationToastDark } from './_fixed_confirmation_toast_dark.jsx'
5
4
  export { default as FixedConfirmationToastMultiLineDark } from './_fixed_confirmation_toast_multi_line_dark.jsx'
@@ -11,17 +11,11 @@ module Playbook
11
11
  values: %w[success error neutral tip],
12
12
  default: "neutral"
13
13
  prop :text, type: Playbook::Props::String
14
- prop :closeable, type: Playbook::Props::Boolean,
15
- default: false
16
14
 
17
15
  def show_text?
18
16
  text.present?
19
17
  end
20
18
 
21
- def close_class
22
- closeable.present? ? " remove_toast" : ""
23
- end
24
-
25
19
  def icon_value
26
20
  case status
27
21
  when "success"
@@ -36,7 +30,7 @@ module Playbook
36
30
  end
37
31
 
38
32
  def classname
39
- generate_classname("pb_fixed_confirmation_toast_kit", status) + close_class
33
+ generate_classname("pb_fixed_confirmation_toast_kit", status)
40
34
  end
41
35
  end
42
36
  end
@@ -33,7 +33,7 @@
33
33
  name: "checkbox-name",
34
34
  class: "checkbox-class"
35
35
  %>
36
- <%= form.date_picker :example_date_picker_1, props: { default_date: "blank", label: true } %>
36
+ <%= form.date_picker :example_date_picker1, props: { default_date: "blank" } %>
37
37
 
38
38
  <%= form.actions do |action| %>
39
39
  <%= action.submit %>
@@ -28,7 +28,7 @@
28
28
  <%= form.select :example_select, [ ["Yes", 1], ["No", 2] ], props: { label: true, blank_selection: "Select One...", required: true } %>
29
29
  <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true, blank_selection: "Select One...", required: true } %>
30
30
  <%= form.check_box :example_checkbox, props: { text: "Example Checkbox", label: true, required: true } %>
31
- <%= form.date_picker :example_date_picker_2, props: { default_date: 'blank', label: true, required: true } %>
31
+ <%= form.date_picker :example_date_picker2, props: { default_date: 'blank', required: true } %>
32
32
 
33
33
  <%= form.actions do |action| %>
34
34
  <%= action.submit %>
@@ -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_field_1
17
+ :example_checkbox_field
18
+ :example_date_picker_field1
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: { label: true } %>
53
53
  <%= form.collection_select :example_collection_select_field, example_collection, :value, :name, props: { label: true } %>
54
54
  <%= form.check_box :example_checkbox_field, props: { text: "Example Checkbox", label: true } %>
55
- <%= form.date_picker :example_date_picker_field_1, props: { default_date: 'blank', label: true } %>
55
+ <%= form.date_picker :example_date_picker_field1, props: { default_date: 'blank' } %>
56
56
 
57
57
  <%= form.actions do |action| %>
58
58
  <%= action.submit %>
@@ -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_field_2
17
+ :example_checkbox_field
18
+ :example_date_picker_field2
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_field_2, props: { default_date: 'blank', label: true, required: true } %>
55
+ <%= form.date_picker :example_date_picker_field2, props: { default_date: 'blank', required: true } %>
56
56
 
57
57
  <%= form.actions do |action| %>
58
58
  <%= action.submit %>
@@ -8,7 +8,6 @@ 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
12
11
 
13
12
  props[:name] = html_attribute_name
14
13
  props[:picker_id] = html_id
@@ -32,6 +32,7 @@ module Playbook
32
32
  def chart_options
33
33
  {
34
34
  id: id,
35
+ className: classname,
35
36
  chartData: chart_data,
36
37
  type: chart_type,
37
38
  title: title,
@@ -31,14 +31,12 @@
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;
34
38
  visibility: hidden;
35
39
  pointer-events: none;
36
- &.hide {
37
- animation-name: fadeOut;
38
- animation-duration: 150ms;
39
- animation-timing-function: linear;
40
- animation-fill-mode: forwards;
41
- }
42
40
  &.show {
43
41
  animation-name: fadeIn;
44
42
  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.toggleTooltip()
40
+ this.tooltip.classList.toggle('show')
41
41
  }, 0)
42
42
  })
43
43
  }
@@ -71,12 +71,10 @@ export default class PbPopover extends PbEnhancedElement {
71
71
 
72
72
  hideTooltip() {
73
73
  this.tooltip.classList.remove('show')
74
- this.tooltip.classList.add('hide')
75
74
  }
76
75
 
77
76
  toggleTooltip() {
78
77
  this.tooltip.classList.toggle('show')
79
- this.tooltip.classList.toggle('hide')
80
78
  }
81
79
 
82
80
  get triggerElement() {
@@ -13,14 +13,12 @@ type ProgressStepProps = {
13
13
  orientation?: "horizontal" | "vertical",
14
14
  icon?: boolean,
15
15
  variant?: string,
16
- color?: string,
17
16
  }
18
17
 
19
18
  const ProgressStep = (props: ProgressStepProps) => {
20
19
  const {
21
20
  className,
22
21
  children,
23
- color,
24
22
  orientation = 'horizontal',
25
23
  icon = false,
26
24
  variant,
@@ -31,7 +29,6 @@ const ProgressStep = (props: ProgressStepProps) => {
31
29
  orientation,
32
30
  iconStyle,
33
31
  variant,
34
- color,
35
32
  )
36
33
 
37
34
  return (
@@ -4,17 +4,18 @@
4
4
  @import "../tokens/opacity";
5
5
  @import "../tokens/typography";
6
6
 
7
-
8
-
9
7
  [class^=pb_progress_step_kit]{
10
8
  list-style:none;
11
9
  display: flex;
10
+
12
11
  [class*=pb_progress_step_item] {
13
12
  display:flex;
13
+ flex-basis:100%;
14
14
  flex-direction:column;
15
+ justify-content:space-between;
15
16
  position: relative;
16
- flex-basis: 100%;
17
-
17
+ align-items: center;
18
+
18
19
  .circle {
19
20
  height:14px;
20
21
  width:14px;
@@ -38,6 +39,7 @@
38
39
  height: 4px;
39
40
  position: absolute;
40
41
  top: 5px;
42
+ left: -50%;
41
43
  width:100%;
42
44
  background-color:$border_light;
43
45
  }
@@ -56,7 +58,7 @@
56
58
  .circle{
57
59
  background-color: $white;
58
60
  border: solid 2px $primary;
59
- color: rgba( $primary, 0)
61
+ color: rgba($color: $primary, $alpha: 0)
60
62
  }
61
63
  &::before{
62
64
  background-color: $primary;
@@ -72,163 +74,18 @@
72
74
  }
73
75
  }
74
76
  }
75
- // Start of Horizontal
77
+
76
78
  &[class*=horizontal]{
77
79
  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
-
218
80
  }
219
- // End of Horizontal
220
81
 
221
- // Start of Vertical
222
82
  &[class*=vertical]{
223
83
  flex-direction: column;
224
84
  [class*=pb_progress_step_item]{
225
- [class*=box]{
226
- display:flex;
227
85
  flex-direction: row;
228
86
  align-items: flex-start;
229
87
  justify-content: flex-start;
230
88
  margin: 8px;
231
- }
232
89
  &::before {
233
90
  display: flex;
234
91
  flex-direction: column;
@@ -236,7 +93,7 @@
236
93
  height: 100%;
237
94
  position: absolute;
238
95
  top:14px;
239
- left: 21px;
96
+ left: 13px;
240
97
  width:4px;
241
98
  background-color:$border_light;
242
99
  }
@@ -248,39 +105,47 @@
248
105
  }
249
106
  }
250
107
  }
251
- //End of Vertical
252
108
 
253
109
  &[class*=icon] [class*=_complete] svg{
254
110
  opacity: 1;
255
111
  }
256
112
 
257
113
  &[class*=dark] {
258
- [class*=progress_step_item]{
259
- &::before{
260
- background-color: tint($bg_dark,20%);
261
- }
262
- }
263
114
  .circle{
264
- box-shadow: 0 0 0 2px tint($bg_dark,10%);
115
+ box-shadow: 0 0 0 2px $bg_dark;
265
116
  }
266
117
  [class*=active]{
267
118
  .circle{
268
- background-color: tint($bg_dark,10%);
269
- }
270
- &::before{
271
- background-color: $primary;
119
+ background-color: $bg_dark;
272
120
  }
273
121
  }
274
122
  [class*=inactive]{
275
123
  .circle, &::before{
276
- background-color: tint($bg_dark,20%);
124
+ background-color: tint($bg_dark,10%);
277
125
  }
278
126
  }
279
- [class*=complete]{
280
- .circle, &::before{
281
- background-color: $primary;
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;
282
147
  }
283
148
  }
284
149
  }
285
150
 
286
- }
151
+ }