playbook_ui 14.5.0.pre.alpha.PBNTR595popoverwidthpropfilterpopoverprop4158 → 14.5.0.pre.alpha.PBNTR600reactfilterdisplayzeroresults4068

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +4 -20
  3. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -1
  4. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +0 -1
  5. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +1 -1
  6. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +2 -2
  7. data/app/pb_kits/playbook/pb_filter/Filter/FilterDouble.tsx +0 -2
  8. data/app/pb_kits/playbook/pb_filter/Filter/FilterSingle.tsx +0 -2
  9. data/app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.tsx +1 -4
  10. data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -3
  11. data/app/pb_kits/playbook/pb_filter/docs/index.js +0 -1
  12. data/app/pb_kits/playbook/pb_filter/filter.html.erb +2 -2
  13. data/app/pb_kits/playbook/pb_filter/filter.rb +0 -2
  14. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +0 -17
  15. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -1
  16. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +65 -169
  17. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.test.js +5 -5
  18. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +9 -15
  19. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +0 -2
  20. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js +0 -1
  21. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +6 -28
  22. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb +1 -31
  23. data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -5
  24. data/app/pb_kits/playbook/pb_popover/docs/_popover_default.html.erb +1 -1
  25. data/app/pb_kits/playbook/pb_popover/popover.rb +1 -3
  26. data/dist/chunks/{_typeahead-BKndSDgc.js → _typeahead-CT2ByCBK.js} +1 -1
  27. data/dist/chunks/_weekday_stacked-BFqyoTft.js +45 -0
  28. data/dist/chunks/vendor.js +1 -1
  29. data/dist/playbook-doc.js +1 -1
  30. data/dist/playbook-rails-react-bindings.js +1 -1
  31. data/dist/playbook-rails.js +1 -1
  32. data/dist/playbook.css +1 -1
  33. data/lib/playbook/version.rb +1 -1
  34. metadata +4 -14
  35. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx +0 -45
  36. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md +0 -1
  37. data/app/pb_kits/playbook/pb_filter/docs/_filter_custom_width.html.erb +0 -41
  38. data/app/pb_kits/playbook/pb_filter/docs/_filter_custom_width.jsx +0 -71
  39. data/app/pb_kits/playbook/pb_filter/docs/_filter_custom_width_rails.md +0 -1
  40. data/app/pb_kits/playbook/pb_filter/docs/_filter_custom_width_react.md +0 -1
  41. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.html.erb +0 -93
  42. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.md +0 -1
  43. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.html.erb +0 -336
  44. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.jsx +0 -97
  45. data/dist/chunks/_weekday_stacked-DBH_rF_4.js +0 -45
@@ -3,13 +3,11 @@ examples:
3
3
  rails:
4
4
  - multiple_users_stacked_default: Default
5
5
  - multiple_users_stacked_bubble: Bubble
6
- - multiple_users_stacked_size: Sizes
7
6
 
8
7
 
9
8
  react:
10
9
  - multiple_users_stacked_default: Default
11
10
  - multiple_users_stacked_bubble: Bubble
12
- - multiple_users_stacked_size: Sizes
13
11
 
14
12
  swift:
15
13
  - multiple_users_stacked_default_swift: Default
@@ -1,3 +1,2 @@
1
1
  export { default as MultipleUsersStackedDefault } from './_multiple_users_stacked_default.jsx'
2
2
  export { default as MultipleUsersStackedBubble } from './_multiple_users_stacked_bubble.jsx'
3
- export { default as MultipleUsersStackedSize } from './_multiple_users_stacked_size.jsx'
@@ -1,15 +1,5 @@
1
1
  <%= pb_content_tag do %>
2
- <%= pb_rails(
3
- "avatar",
4
- props: object.users[0].merge({
5
- classname: "pb_multiple_users_stacked_item first_item" +
6
- (object.double_bubble ? " double_bubble" : "") +
7
- (object.triple_bubble ? " triple_bubble" : "") +
8
- (object.quadruple_bubble ? " quadruple_bubble" : ""),
9
- dark: object.dark,
10
- size: 'xs'
11
- })
12
- ) %>
2
+ <%= pb_rails("avatar", props: object.users[0].merge({size: object.bubble ? "sm" : "xs", classname: "pb_multiple_users_stacked_item first_item#{object.triple_bubble ? " triple_bubble" : ""}#{object.quadruple_bubble ? " quadruple_bubble" : ""}", dark: object.dark}) ) %>
13
3
 
14
4
  <% unless object.only_one %>
15
5
  <% if object.more_than_two && !object.bubble %>
@@ -18,26 +8,14 @@
18
8
  text: "+#{object.users.count - object.display_count}",
19
9
  variant: "primary",
20
10
  rounded: true,
21
- classname: "pb_multiple_users_stacked_item second_item"
22
- }) %>
11
+ classname: "pb_multiple_users_stacked_item second_item" }) %>
23
12
  <% elsif object.bubble %>
24
- <% object.users.slice(1, 3).each_with_index do |item, idx| %>
25
- <%= pb_rails(
26
- "avatar",
27
- props: item.merge({
28
- classname: object.bubble_classname(idx),
29
- dark: object.dark
30
- })
31
- ) %>
13
+ <% object.users.slice(1,3).each_with_index do |item, idx| %>
14
+ <%= pb_rails("avatar", props: item.merge({size: "xs", classname: "pb_multiple_users_stacked_item #{idx == 0 ? "second_item#{object.triple_bubble ? " triple_bubble" : ""}#{object.quadruple_bubble ? " quadruple_bubble" : ""}" : idx == 1 ? "third_item#{object.quadruple_bubble ? " quadruple_bubble" : ""}" : "fourth_item"}", dark: object.dark}) ) %>
32
15
  <% end %>
33
16
  <% else %>
34
- <%= pb_rails(
35
- "avatar",
36
- props: object.users[1].merge({
37
- classname: "pb_multiple_users_stacked_item second_item",
38
- dark: object.dark
39
- })
40
- ) %>
17
+ <%= pb_rails("avatar", props: object.users[1].merge({size: "xs", classname: "pb_multiple_users_stacked_item second_item", dark: object.dark}) ) %>
41
18
  <% end %>
42
19
  <% end %>
20
+
43
21
  <% end %>
@@ -4,9 +4,6 @@ module Playbook
4
4
  module PbMultipleUsersStacked
5
5
  class MultipleUsersStacked < Playbook::KitBase
6
6
  prop :users, type: Playbook::Props::HashArray, required: true
7
- prop :size, type: Playbook::Props::Enum,
8
- values: %w[sm md lg xl],
9
- default: "sm"
10
7
 
11
8
  prop :variant, type: Playbook::Props::Enum,
12
9
  values: %w[default bubble],
@@ -28,10 +25,6 @@ module Playbook
28
25
  variant == "bubble"
29
26
  end
30
27
 
31
- def double_bubble
32
- bubble && users.count === 2
33
- end
34
-
35
28
  def triple_bubble
36
29
  bubble && users.count === 3
37
30
  end
@@ -40,31 +33,8 @@ module Playbook
40
33
  bubble && users.count > 3
41
34
  end
42
35
 
43
- def size_class
44
- "size_#{size}" if bubble
45
- end
46
-
47
36
  def classname
48
- generate_classname("pb_multiple_users_stacked_kit", single_class, bubble_class, size_class)
49
- end
50
-
51
- def bubble_classname(index)
52
- base_classname = "pb_multiple_users_stacked_item "
53
-
54
- case index
55
- when 0
56
- base_classname += "second_item"
57
- base_classname += " double_bubble" if double_bubble
58
- base_classname += " triple_bubble" if triple_bubble
59
- base_classname += " quadruple_bubble" if quadruple_bubble
60
- when 1
61
- base_classname += "third_item"
62
- base_classname += " quadruple_bubble" if quadruple_bubble
63
- else
64
- base_classname += "fourth_item"
65
- end
66
-
67
- base_classname
37
+ generate_classname("pb_multiple_users_stacked_kit", single_class, bubble_class)
68
38
  end
69
39
 
70
40
  private
@@ -79,7 +79,6 @@ const Popover = (props: PbPopoverProps) => {
79
79
  maxWidth,
80
80
  minHeight,
81
81
  minWidth,
82
- width,
83
82
  targetId,
84
83
  } = props;
85
84
 
@@ -98,8 +97,7 @@ const Popover = (props: PbPopoverProps) => {
98
97
  maxHeight ? { maxHeight: maxHeight } : {},
99
98
  maxWidth ? { maxWidth: maxWidth } : {},
100
99
  minHeight ? { minHeight: minHeight } : {},
101
- minWidth ? { minWidth: minWidth } : {},
102
- width ? { width: width } : {}
100
+ minWidth ? { minWidth: minWidth } : {}
103
101
  );
104
102
  };
105
103
  const ariaProps = buildAriaProps(aria);
@@ -169,7 +167,6 @@ const PbReactPopover = (props: PbPopoverProps): React.ReactElement => {
169
167
  maxWidth,
170
168
  minHeight,
171
169
  minWidth,
172
- width,
173
170
  } = props;
174
171
 
175
172
  useEffect(() => {
@@ -219,7 +216,6 @@ const PbReactPopover = (props: PbPopoverProps): React.ReactElement => {
219
216
  placement={placement}
220
217
  referenceElement={referenceElement}
221
218
  targetId={targetId}
222
- width={width}
223
219
  zIndex={zIndex}
224
220
  {...props}
225
221
  >
@@ -14,7 +14,7 @@
14
14
  trigger_element_id: "regular-popover-1",
15
15
  tooltip_id: "tooltip-1",
16
16
  offset: true,
17
- position: "top",
17
+ position: "top"
18
18
  }) do %>
19
19
  I'm a popover. I can show content of any size.
20
20
  <% end %>
@@ -12,7 +12,6 @@ module Playbook
12
12
  prop :max_width
13
13
  prop :min_width
14
14
  prop :min_height
15
- prop :width
16
15
  prop :z_index, type: Playbook::Props::String
17
16
  prop :offset, type: Playbook::Props::Boolean, default: false
18
17
  prop :close_on_click, type: Playbook::Props::Enum,
@@ -37,12 +36,11 @@ module Playbook
37
36
  out += "max-width: #{max_width}; " if max_width.present?
38
37
  out += "min-height: #{min_height}; " if min_height.present?
39
38
  out += "min-width: #{min_width};" if min_width.present?
40
- out += "width: #{width};" if width.present?
41
39
  out
42
40
  end
43
41
 
44
42
  def width_height_class_helper
45
- "overflow_handling" if max_height || max_width || width
43
+ "overflow_handling" if max_height || max_width
46
44
  end
47
45
 
48
46
  def data