playbook_ui 7.14.0.pre.alpha1 → 7.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/playbook/pb_sample_helper.rb +1 -1
  3. data/app/pb_kits/playbook/pb_background/docs/_background_dark.html.erb +3 -0
  4. data/app/pb_kits/playbook/pb_background/docs/_background_dark.jsx +12 -0
  5. data/app/pb_kits/playbook/pb_background/docs/example.yml +2 -0
  6. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  7. data/app/pb_kits/playbook/pb_checkbox/_checkbox.html.erb +0 -1
  8. data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +10 -36
  9. data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +20 -26
  10. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +0 -5
  11. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx +1 -0
  12. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +0 -2
  13. data/app/pb_kits/playbook/pb_checkbox/docs/index.js +0 -1
  14. data/app/pb_kits/playbook/pb_date_range_stacked/docs/_date_range_stacked_dark.html.erb +1 -0
  15. data/app/pb_kits/playbook/pb_date_range_stacked/docs/_date_range_stacked_dark.jsx +15 -0
  16. data/app/pb_kits/playbook/pb_date_range_stacked/docs/example.yml +4 -0
  17. data/app/pb_kits/playbook/pb_date_range_stacked/docs/index.js +1 -0
  18. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_dark.html.erb +5 -0
  19. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_dark.jsx +26 -0
  20. data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +7 -0
  21. data/app/pb_kits/playbook/pb_date_stacked/docs/index.js +2 -0
  22. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_dark.html.erb +1 -0
  23. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_dark.jsx +14 -0
  24. data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +4 -0
  25. data/app/pb_kits/playbook/pb_date_time_stacked/docs/index.js +1 -0
  26. data/app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_dark.html.erb +5 -0
  27. data/app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_dark.jsx +28 -0
  28. data/app/pb_kits/playbook/pb_date_year_stacked/docs/example.yml +2 -0
  29. data/app/pb_kits/playbook/pb_date_year_stacked/docs/index.js +1 -0
  30. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.jsx +4 -9
  31. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.scss +7 -12
  32. data/app/pb_kits/playbook/pb_distribution_bar/distribution_bar.rb +1 -4
  33. data/app/pb_kits/playbook/pb_distribution_bar/docs/example.yml +0 -2
  34. data/app/pb_kits/playbook/pb_distribution_bar/docs/index.js +0 -1
  35. data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.jsx +1 -12
  36. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +0 -41
  37. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +37 -84
  38. data/app/pb_kits/playbook/pb_filter/templates/_core.html.erb +7 -18
  39. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_dark.html.erb +21 -0
  40. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_dark.jsx +43 -0
  41. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.html.erb +5 -0
  42. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.jsx +17 -0
  43. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +5 -0
  44. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +2 -0
  45. data/app/pb_kits/playbook/pb_flex/_flex.jsx +9 -25
  46. data/app/pb_kits/playbook/pb_flex/_flex.scss +7 -40
  47. data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +2 -6
  48. data/app/pb_kits/playbook/pb_flex/_flex_item.scss +0 -10
  49. data/app/pb_kits/playbook/pb_flex/docs/_description.md +0 -6
  50. data/app/pb_kits/playbook/pb_flex/docs/_flex_default.html.erb +15 -15
  51. data/app/pb_kits/playbook/pb_flex/docs/_flex_default.jsx +15 -17
  52. data/app/pb_kits/playbook/pb_flex/docs/_flex_default.md +1 -3
  53. data/app/pb_kits/playbook/pb_flex/docs/{_flex_justify.html.erb → _flex_horizontal.html.erb} +21 -19
  54. data/app/pb_kits/playbook/pb_flex/docs/{_flex_align.jsx → _flex_horizontal.jsx} +77 -71
  55. data/app/pb_kits/playbook/pb_flex/docs/_flex_inline.html.erb +8 -8
  56. data/app/pb_kits/playbook/pb_flex/docs/_flex_inline.md +1 -5
  57. data/app/pb_kits/playbook/pb_flex/docs/_flex_reverse.html.erb +9 -9
  58. data/app/pb_kits/playbook/pb_flex/docs/_flex_reverse.jsx +2 -2
  59. data/app/pb_kits/playbook/pb_flex/docs/_flex_spacing.html.erb +8 -23
  60. data/app/pb_kits/playbook/pb_flex/docs/_flex_spacing.jsx +4 -4
  61. data/app/pb_kits/playbook/pb_flex/docs/_flex_vertical.html.erb +68 -0
  62. data/app/pb_kits/playbook/pb_flex/docs/{_flex_justify.jsx → _flex_vertical.jsx} +99 -41
  63. data/app/pb_kits/playbook/pb_flex/docs/_flex_wrap.jsx +1 -1
  64. data/app/pb_kits/playbook/pb_flex/docs/example.yml +4 -9
  65. data/app/pb_kits/playbook/pb_flex/docs/index.js +2 -4
  66. data/app/pb_kits/playbook/pb_flex/flex.rb +12 -79
  67. data/app/pb_kits/playbook/pb_flex/flex_item.rb +1 -18
  68. data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +1 -7
  69. data/app/pb_kits/playbook/pb_icon/docs/_icon_default_dark.html.erb +3 -0
  70. data/app/pb_kits/playbook/pb_icon/docs/_icon_default_dark.jsx +18 -0
  71. data/app/pb_kits/playbook/pb_icon/docs/example.yml +2 -1
  72. data/app/pb_kits/playbook/pb_icon/docs/index.js +1 -0
  73. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color_dark.html.erb +42 -0
  74. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color_dark.jsx +66 -0
  75. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_dark.html.erb +4 -0
  76. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_dark.jsx +17 -0
  77. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes_dark.html.erb +29 -0
  78. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes_dark.jsx +38 -0
  79. data/app/pb_kits/playbook/pb_icon_circle/docs/example.yml +7 -0
  80. data/app/pb_kits/playbook/pb_icon_circle/docs/index.js +3 -0
  81. data/app/pb_kits/playbook/pb_icon_value/docs/_icon_value_align_dark.html.erb +23 -0
  82. data/app/pb_kits/playbook/pb_icon_value/docs/_icon_value_align_dark.jsx +37 -0
  83. data/app/pb_kits/playbook/pb_icon_value/docs/_icon_value_dark.html.erb +21 -0
  84. data/app/pb_kits/playbook/pb_icon_value/docs/_icon_value_dark.jsx +35 -0
  85. data/app/pb_kits/playbook/pb_icon_value/docs/example.yml +5 -0
  86. data/app/pb_kits/playbook/pb_icon_value/docs/index.js +2 -0
  87. data/app/pb_kits/playbook/pb_layout/_layout.scss +9 -9
  88. data/app/pb_kits/playbook/pb_layout/docs/_layout_sizes_dark.html.erb +32 -0
  89. data/app/pb_kits/playbook/pb_layout/docs/_layout_sizes_dark.jsx +97 -0
  90. data/app/pb_kits/playbook/pb_layout/docs/example.yml +4 -0
  91. data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
  92. data/app/pb_kits/playbook/pb_popover/docs/_popover_close_dark.html.erb +43 -0
  93. data/app/pb_kits/playbook/pb_popover/docs/_popover_close_dark.jsx +105 -0
  94. data/app/pb_kits/playbook/pb_popover/docs/_popover_dark.html.erb +25 -0
  95. data/app/pb_kits/playbook/pb_popover/docs/_popover_dark.jsx +51 -0
  96. data/app/pb_kits/playbook/pb_popover/docs/_popover_list_dark.html.erb +13 -0
  97. data/app/pb_kits/playbook/pb_popover/docs/_popover_list_dark.jsx +54 -0
  98. data/app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height_dark.html.erb +25 -0
  99. data/app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height_dark.jsx +57 -0
  100. data/app/pb_kits/playbook/pb_popover/docs/_popover_z_index_dark.html.erb +14 -0
  101. data/app/pb_kits/playbook/pb_popover/docs/_popover_z_index_dark.jsx +54 -0
  102. data/app/pb_kits/playbook/pb_popover/docs/example.yml +13 -0
  103. data/app/pb_kits/playbook/pb_popover/docs/index.js +5 -0
  104. data/app/pb_kits/playbook/pb_select/_select.scss +4 -6
  105. data/app/pb_kits/playbook/pb_table/_table.jsx +0 -8
  106. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table.html.erb +4 -56
  107. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table.jsx +3 -64
  108. data/app/pb_kits/playbook/pb_table/styles/_all.scss +0 -3
  109. data/app/pb_kits/playbook/pb_table/table.rb +1 -8
  110. data/app/pb_kits/playbook/pb_timestamp/_timestamp.html.erb +4 -6
  111. data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +16 -92
  112. data/app/pb_kits/playbook/pb_timestamp/_timestamp.scss +1 -12
  113. data/app/pb_kits/playbook/pb_timestamp/docs/_description.md +1 -1
  114. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx +18 -26
  115. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.html.erb +1 -21
  116. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx +8 -40
  117. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.jsx +4 -12
  118. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed_align.html.erb +54 -0
  119. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed_align.jsx +73 -0
  120. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx +18 -26
  121. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones_align.html.erb +177 -0
  122. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones_align.jsx +209 -0
  123. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.html.erb +21 -0
  124. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.jsx +28 -6
  125. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_align.html.erb +123 -0
  126. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_align.jsx +146 -0
  127. data/app/pb_kits/playbook/pb_timestamp/docs/example.yml +0 -8
  128. data/app/pb_kits/playbook/pb_timestamp/docs/index.js +0 -4
  129. data/app/pb_kits/playbook/pb_timestamp/timestamp.rb +1 -83
  130. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +4 -2
  131. data/app/pb_kits/playbook/pb_user_badge/docs/_user_badge_size_dark.html.erb +21 -0
  132. data/app/pb_kits/playbook/pb_user_badge/docs/_user_badge_size_dark.jsx +36 -0
  133. data/app/pb_kits/playbook/pb_user_badge/docs/index.js +1 -0
  134. data/lib/playbook/version.rb +1 -1
  135. metadata +57 -31
  136. data/app/pb_kits/playbook/pb_checkbox/checkbox.test.js +0 -51
  137. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +0 -77
  138. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.jsx +0 -78
  139. data/app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_custom_colors.html.erb +0 -4
  140. data/app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_custom_colors.jsx +0 -18
  141. data/app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_custom_colors.md +0 -1
  142. data/app/pb_kits/playbook/pb_flex/docs/_flex_align.html.erb +0 -101
  143. data/app/pb_kits/playbook/pb_flex/docs/_flex_align.md +0 -7
  144. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.html.erb +0 -33
  145. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.jsx +0 -75
  146. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.md +0 -9
  147. data/app/pb_kits/playbook/pb_flex/docs/_flex_item.html.erb +0 -49
  148. data/app/pb_kits/playbook/pb_flex/docs/_flex_item.md +0 -11
  149. data/app/pb_kits/playbook/pb_flex/docs/_flex_item_example.jsx +0 -113
  150. data/app/pb_kits/playbook/pb_flex/docs/_flex_justify.md +0 -7
  151. data/app/pb_kits/playbook/pb_flex/docs/_flex_reverse.md +0 -5
  152. data/app/pb_kits/playbook/pb_flex/docs/_flex_spacing.md +0 -7
  153. data/app/pb_kits/playbook/pb_flex/docs/_flex_wrap.md +0 -5
  154. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -135
  155. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -135
  156. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -135
@@ -2,6 +2,8 @@ examples:
2
2
 
3
3
  rails:
4
4
  - date_year_stacked_default: Default
5
+ - date_year_stacked_dark: Dark
5
6
 
6
7
  react:
7
8
  - date_year_stacked_default: Default
9
+ - date_year_stacked_dark: Dark
@@ -1 +1,2 @@
1
1
  export { default as DateYearStackedDefault } from './_date_year_stacked_default.jsx'
2
+ export { default as DateYearStackedDark } from './_date_year_stacked_dark.jsx'
@@ -6,7 +6,6 @@ import { globalProps } from '../utilities/globalProps.js'
6
6
 
7
7
  type DistributionBarProps = {
8
8
  className?: string,
9
- colors: array,
10
9
  data?: string,
11
10
  id?: string,
12
11
  size?: "lg" | "sm",
@@ -19,13 +18,13 @@ const normalizeCharacters = (widths) => {
19
18
  })
20
19
  }
21
20
 
22
- const barValues = (normalizedValues, colors) => {
21
+ const barValues = (normalizedValues) => {
23
22
  const arrSum = (value) => value.reduce((a, b) => a + b, 0)
24
23
  const widthSum = arrSum(normalizedValues)
25
24
  return normalizedValues.map((value, i) => {
26
25
  return (
27
26
  <div
28
- className={classnames('pb_distribution_width', colors[i] ? `color_${colors[i]}` : '')}
27
+ className="pb_distribution_width"
29
28
  key={i}
30
29
  style={{ width: `${(value * 100) / widthSum}%` }}
31
30
  />
@@ -34,16 +33,12 @@ const barValues = (normalizedValues, colors) => {
34
33
  }
35
34
 
36
35
  const DistributionBar = (props: DistributionBarProps) => {
37
- const {
38
- size = 'lg',
39
- widths = [1],
40
- colors = [],
41
- } = props
36
+ const { size = 'lg', widths = [1] } = props
42
37
  const normalizedValues = normalizeCharacters(widths)
43
38
 
44
39
  return (
45
40
  <div className={classnames(`pb_distribution_bar_${size}`, globalProps(props))}>
46
- {barValues(normalizedValues, colors)}
41
+ {barValues(normalizedValues)}
47
42
  </div>
48
43
  )
49
44
  }
@@ -5,26 +5,21 @@
5
5
  $small_bar: 8px;
6
6
  $large_bar: 36px;
7
7
  display: flex;
8
- border-radius: $large_bar;
9
- overflow: auto;
10
8
  .pb_distribution_width {
11
9
  height: 100%;
12
10
  display: inline-block;
13
- @each $name, $color in $data_colors {
14
- &:nth-child(#{length($data_colors)}n+#{index(($data_colors), ($name $color))}) {
15
- background-color: $color;
16
- }
17
- &.color_#{$name} {
18
- background-color: $color !important;
11
+ @for $i from 1 through length($bar_colors) {
12
+ &:nth-child(#{length($bar_colors)}n+#{$i}) {
13
+ background-color: nth($bar_colors, $i);
19
14
  }
20
15
  }
21
16
  &:first-child {
22
- border-top-left-radius: $large_bar;
23
- border-bottom-left-radius: $large_bar;
17
+ border-top-left-radius: 18px;
18
+ border-bottom-left-radius: 18px;
24
19
  }
25
20
  &:last-child {
26
- border-top-right-radius: $large_bar;
27
- border-bottom-right-radius: $large_bar;
21
+ border-top-right-radius: 18px;
22
+ border-bottom-right-radius: 18px;
28
23
  }
29
24
  }
30
25
  &[class*=_sm] {
@@ -11,9 +11,7 @@ module Playbook
11
11
  values: %w[lg sm],
12
12
  default: "lg"
13
13
  prop :widths, type: Playbook::Props::NumberArray,
14
- default: [1]
15
- prop :colors, type: Playbook::Props::Array,
16
- default: []
14
+ default: [1]
17
15
 
18
16
  def classname
19
17
  generate_classname("pb_distribution_bar", size)
@@ -29,7 +27,6 @@ module Playbook
29
27
  {
30
28
  size: size,
31
29
  widths: widths,
32
- colors: colors,
33
30
  }
34
31
  end
35
32
  end
@@ -2,10 +2,8 @@ examples:
2
2
 
3
3
  rails:
4
4
  - distribution_bar_default: Default
5
- - distribution_bar_custom_colors: Custom Colors
6
5
 
7
6
 
8
7
  react:
9
8
  - distribution_bar_default: Default
10
- - distribution_bar_custom_colors: Custom Colors
11
9
 
@@ -1,2 +1 @@
1
1
  export { default as DistributionBarDefault } from './_distribution_bar_default.jsx'
2
- export { default as DistributionBarCustomColors } from './_distribution_bar_custom_colors.jsx'
@@ -2,7 +2,7 @@
2
2
 
3
3
  import React from 'react'
4
4
  import { isEmpty, map, omitBy } from 'lodash'
5
- import { Body, Caption, Title } from '../../'
5
+ import { Caption, Title } from '../../'
6
6
 
7
7
  export type FilterDescription = {
8
8
  [key: string]: ?string | boolean,
@@ -20,17 +20,6 @@ const CurrentFilters = ({ dark, filters }: CurrentFiltersProps) => {
20
20
 
21
21
  return (
22
22
  <div className="maskContainer">
23
- <If condition={isEmpty(filters)}>
24
- <div className="filters">
25
- <Body
26
- color="light"
27
- paddingLeft="xs"
28
- size={4}
29
- tag="h4"
30
- text="No Filter Selected"
31
- />
32
- </div>
33
- </If>
34
23
  <If condition={!isEmpty(filters)}>
35
24
  <div className="filters">
36
25
  <div className="left_gradient" />
@@ -38,44 +38,3 @@
38
38
  <% end %>
39
39
  <% end %>
40
40
  <% end %>
41
-
42
- <br>
43
- <br>
44
-
45
- <%=
46
- pb_rails("filter", props: {
47
- id: "def2",
48
-
49
- sort_menu: [
50
- { item: "Popularity", link: "?q[sorts]=managers_popularity+asc", active: true, direction: "desc" },
51
- { item: "Mananger's Title", link: "?q[sorts]=managers_title+asc", active: false },
52
- { item: "Manager's Name", link: "?q[sorts]=managers_name+asc", active: false },
53
- ],
54
- template: "default",
55
- results: 0,
56
- }) do
57
- %>
58
- <%
59
- example_collection = [
60
- OpenStruct.new(name: "Alabama", value: 1),
61
- OpenStruct.new(name: "Alaska", value: 2),
62
- OpenStruct.new(name: "Arizona", value: 3),
63
- OpenStruct.new(name: "Arkansas", value: 4),
64
- OpenStruct.new(name: "California", value: 5),
65
- OpenStruct.new(name: "Colorado", value: 6),
66
- OpenStruct.new(name: "Connecticut", value: 7),
67
- OpenStruct.new(name: "Delaware", value: 8),
68
- OpenStruct.new(name: "Florida", value: 9),
69
- OpenStruct.new(name: "Georgia", value: 10),
70
- ]
71
- %>
72
- <%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
73
- <%= form.text_field :example_text_field, props: { label: true } %>
74
- <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
75
-
76
- <%= form.actions do |action| %>
77
- <%= action.submit props: { text: "Apply", data: { disable_with: "<i class='far fa-spinner fa-spin mr-3'></i>Searching...".html_safe },}%>
78
- <%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
79
- <% end %>
80
- <% end %>
81
- <% end %>
@@ -10,98 +10,51 @@ const FilterDefault = (props) => {
10
10
  { value: 'A Galaxy Far Far Away Like Really Far Away' },
11
11
  ]
12
12
  return (
13
-
14
- <>
15
- <Filter
16
- double
17
- filters={{
18
- 'Full Name': 'John Wick',
19
- 'City': 'San Francisco',
20
- }}
21
- results={1}
22
- sortOptions={{
23
- popularity: 'Popularity',
24
- // eslint-disable-next-line
25
- manager_title: 'Manager\'s Title',
26
- // eslint-disable-next-line
27
- manager_name: 'Manager\'s Name',
28
- }}
29
- sortValue={[{ name: 'popularity', dir: 'desc' }]}
13
+ <Filter
14
+ double
15
+ filters={{
16
+ 'Full Name': 'John Wick',
17
+ 'City': 'San Francisco',
18
+ }}
19
+ results={1}
20
+ sortOptions={{
21
+ popularity: 'Popularity',
22
+ // eslint-disable-next-line
23
+ manager_title: 'Manager\'s Title',
24
+ // eslint-disable-next-line
25
+ manager_name: 'Manager\'s Name',
26
+ }}
27
+ sortValue={[{ name: 'popularity', dir: 'desc' }]}
28
+ {...props}
29
+ >
30
+ <TextInput
31
+ label="Full Name"
32
+ placeholder="Enter name"
30
33
  {...props}
31
- >
32
- <TextInput
33
- label="Full Name"
34
- placeholder="Enter name"
35
- {...props}
36
- />
37
-
38
- <Select
39
- blankSelection="Select One..."
40
- label="Territory"
41
- name="location"
42
- options={options}
43
- {...props}
44
- />
45
- <Flex
46
- spacing="between"
47
- {...props}
48
- >
49
- <Button
50
- text="Apply"
51
- {...props}
52
- />
53
- <Button
54
- text="Clear"
55
- variant="secondary"
56
- {...props}
57
- />
58
- </Flex>
59
- </Filter>
60
-
61
- <br />
34
+ />
62
35
 
63
- <Filter
64
- double
65
- results={1}
66
- sortOptions={{
67
- popularity: 'Popularity',
68
- // eslint-disable-next-line
69
- manager_title: 'Manager\'s Title',
70
- // eslint-disable-next-line
71
- manager_name: 'Manager\'s Name',
72
- }}
73
- sortValue={[{ name: 'popularity', dir: 'desc' }]}
36
+ <Select
37
+ blankSelection="Select One..."
38
+ label="Territory"
39
+ name="location"
40
+ options={options}
41
+ {...props}
42
+ />
43
+ <Flex
44
+ spacing="between"
74
45
  {...props}
75
46
  >
76
- <TextInput
77
- label="Example Text Field"
78
- placeholder="Enter Text"
47
+ <Button
48
+ text="Apply"
79
49
  {...props}
80
50
  />
81
-
82
- <Select
83
- blankSelection="Select One..."
84
- label="Example Collection Select"
85
- name="Collection Select"
86
- options={options}
51
+ <Button
52
+ text="Clear"
53
+ variant="secondary"
87
54
  {...props}
88
55
  />
89
- <Flex
90
- spacing="between"
91
- {...props}
92
- >
93
- <Button
94
- text="Apply"
95
- {...props}
96
- />
97
- <Button
98
- text="Clear"
99
- variant="secondary"
100
- {...props}
101
- />
102
- </Flex>
103
- </Filter>
104
- </>
56
+ </Flex>
57
+ </Filter>
105
58
  )
106
59
  }
107
60
 
@@ -6,24 +6,12 @@
6
6
  <div class="maskContainer">
7
7
  <div class="filters">
8
8
  <div class="left_gradient"></div>
9
- <% object.filters.each do |filter| %>
10
- <% if filter[:name]== "" %>
11
- <div>
12
- <%= pb_rails("body", props: {
13
- color: "light",
14
- padding_left: "xs",
15
- size: 4,
16
- tag:"h4",
17
- text: "No Filter Selected"
18
- }) %>
19
- </div>
20
- <% else %>
21
- <div class="filter">
22
- <%= pb_rails("caption", props: { text: filter[:name]}) %>
23
- <%= pb_rails("title", props: { size: 4, tag:"h4", text: filter[:value]}) %>
24
- </div>
25
- <% end %>
26
- <% end %>
9
+ <% object.filters.each do |filter| %>
10
+ <div class="filter">
11
+ <%= pb_rails("caption", props: { text: filter[:name]}) %>
12
+ <%= pb_rails("title", props: { size: 4, tag:"h4", text: filter[:value]}) %>
13
+ </div>
14
+ <% end %>
27
15
  <div class="right_gradient"></div>
28
16
  </div>
29
17
  </div>
@@ -32,6 +20,7 @@
32
20
  <% end %>
33
21
  <% end %>
34
22
 
23
+
35
24
  <% if (object.template == "single" ) || (object.template == "sort_only") %>
36
25
  <% unless object.sort_menu == [{}] %>
37
26
  <%= pb_rails("button", props: {variant: "link",id: "sort-button#{object.id}",padding_right: "none"}) do %>
@@ -0,0 +1,21 @@
1
+ <%= pb_rails("fixed_confirmation_toast", props: {
2
+ dark: true,
3
+ text: "Error Message",
4
+ status: "error"
5
+ })%>
6
+
7
+ <br><br>
8
+
9
+ <%= pb_rails("fixed_confirmation_toast", props: {
10
+ dark: true,
11
+ text: "Items Successfully Moved",
12
+ status: "success"
13
+ })%>
14
+
15
+ <br><br>
16
+
17
+ <%= pb_rails("fixed_confirmation_toast", props: {
18
+ dark: true,
19
+ text: "Scan to Assign Selected Items",
20
+ status: "neutral"
21
+ })%>
@@ -0,0 +1,43 @@
1
+ import React from 'react'
2
+ import { FixedConfirmationToast } from '../..'
3
+
4
+ const FixedConfirmationToastDark = (props) => {
5
+ return (
6
+ <div>
7
+ <div>
8
+ <FixedConfirmationToast
9
+ dark
10
+ status="error"
11
+ text="Error Message"
12
+ {...props}
13
+ />
14
+ </div>
15
+
16
+ <br />
17
+ <br />
18
+
19
+ <div>
20
+ <FixedConfirmationToast
21
+ dark
22
+ status="success"
23
+ text="Items Successfully Moved"
24
+ {...props}
25
+ />
26
+ </div>
27
+
28
+ <br />
29
+ <br />
30
+
31
+ <div>
32
+ <FixedConfirmationToast
33
+ dark
34
+ status="neutral"
35
+ text="Scan to Assign Selected Items"
36
+ {...props}
37
+ />
38
+ </div>
39
+ </div>
40
+ )
41
+ }
42
+
43
+ export default FixedConfirmationToastDark
@@ -0,0 +1,5 @@
1
+ <%= pb_rails("fixed_confirmation_toast", props: {
2
+ dark: true,
3
+ text: "Scan to Assign Selected Items.\nClick here to generate report.",
4
+ status: "tip",
5
+ }) %>