playbook_ui 14.4.0.pre.alpha.stephenagreerpatch13910 → 14.4.0.pre.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/SortIconButton.tsx +4 -23
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
  5. data/app/pb_kits/playbook/pb_button/_button.tsx +2 -6
  6. data/app/pb_kits/playbook/pb_collapsible/_helper_functions.ts +0 -4
  7. data/app/pb_kits/playbook/pb_contact/_contact.tsx +5 -17
  8. data/app/pb_kits/playbook/pb_contact/contact.html.erb +6 -14
  9. data/app/pb_kits/playbook/pb_contact/contact.rb +0 -4
  10. data/app/pb_kits/playbook/pb_contact/contact.test.js +1 -1
  11. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +6 -2
  12. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +7 -2
  13. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +3 -4
  14. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +1 -1
  15. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -4
  16. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +3 -6
  17. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +1 -1
  18. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_flatpickr_styles.scss +3 -2
  19. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_header_styles.scss +2 -6
  20. data/app/pb_kits/playbook/pb_dialog/_dialog.scss +0 -2
  21. data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +1 -1
  22. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +2 -10
  23. data/app/pb_kits/playbook/pb_filter/docs/_filter_max_height.html.erb +1 -5
  24. data/app/pb_kits/playbook/pb_filter/docs/_filter_max_width.html.erb +1 -5
  25. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +1 -5
  26. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_sort.html.erb +1 -5
  27. data/app/pb_kits/playbook/pb_filter/docs/_filter_only.html.erb +1 -5
  28. data/app/pb_kits/playbook/pb_filter/docs/_filter_placement.html.erb +1 -5
  29. data/app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb +1 -5
  30. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +23 -245
  31. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
  32. data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +0 -2
  33. data/app/pb_kits/playbook/pb_form_pill/docs/index.js +0 -1
  34. data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +1 -1
  35. data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.tsx +0 -3
  36. data/app/pb_kits/playbook/pb_icon/icon.rb +1 -1
  37. data/app/pb_kits/playbook/pb_map/_map_controls.tsx +1 -7
  38. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +5 -20
  39. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -2
  40. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +0 -1
  41. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +0 -4
  42. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +21 -97
  43. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.test.js +0 -166
  44. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +6 -45
  45. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +0 -2
  46. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js +0 -1
  47. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +2 -6
  48. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb +1 -21
  49. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx +1 -12
  50. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md +1 -3
  51. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +2 -10
  52. data/app/pb_kits/playbook/pb_popover/docs/_popover_list.html.erb +13 -14
  53. data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +4 -4
  54. data/app/pb_kits/playbook/pb_radio/_radio.tsx +32 -41
  55. data/app/pb_kits/playbook/pb_radio/docs/{_radio_custom_children.jsx → _radio_children.jsx} +2 -5
  56. data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -2
  57. data/app/pb_kits/playbook/pb_radio/docs/index.js +1 -1
  58. data/app/pb_kits/playbook/pb_radio/radio.html.erb +13 -35
  59. data/app/pb_kits/playbook/pb_radio/radio.rb +1 -3
  60. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +5 -12
  61. data/app/pb_kits/playbook/pb_select/_select.tsx +2 -5
  62. data/app/pb_kits/playbook/pb_select/select.html.erb +1 -1
  63. data/app/pb_kits/playbook/pb_select/select.rb +0 -4
  64. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +1 -0
  65. data/app/pb_kits/playbook/pb_textarea/textarea.html.erb +1 -0
  66. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +13 -17
  67. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +1 -0
  68. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +1 -18
  69. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +6 -6
  70. data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +23 -17
  71. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +18 -26
  72. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.html.erb +1 -1
  73. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx +1 -1
  74. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
  75. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
  76. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +3 -7
  77. data/app/pb_kits/playbook/tokens/_colors.scss +0 -2
  78. data/app/pb_kits/playbook/utilities/icons/allicons.tsx +13 -136
  79. data/dist/chunks/_typeahead-es44Ih6G.js +22 -0
  80. data/dist/chunks/_weekday_stacked-DWJJPUPQ.js +45 -0
  81. data/dist/chunks/lib-D9uVVKnh.js +16 -0
  82. data/dist/chunks/{pb_form_validation-D9zkwt2b.js → pb_form_validation-u2wnZ3oe.js} +1 -1
  83. data/dist/chunks/vendor.js +1 -1
  84. data/dist/menu.yml +1 -3
  85. data/dist/playbook-doc.js +1 -1
  86. data/dist/playbook-rails-react-bindings.js +1 -1
  87. data/dist/playbook-rails.js +1 -1
  88. data/dist/playbook.css +1 -1
  89. data/lib/playbook/pagination_renderer.rb +2 -10
  90. data/lib/playbook/version.rb +2 -2
  91. metadata +7 -40
  92. data/app/pb_kits/playbook/pb_drawer/_close_icon.tsx +0 -25
  93. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +0 -465
  94. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +0 -195
  95. data/app/pb_kits/playbook/pb_drawer/_drawer_context.tsx +0 -3
  96. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +0 -117
  97. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +0 -43
  98. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb +0 -1
  99. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +0 -63
  100. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +0 -55
  101. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +0 -113
  102. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +0 -12
  103. data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -5
  104. data/app/pb_kits/playbook/pb_drawer/drawer.html.erb +0 -12
  105. data/app/pb_kits/playbook/pb_drawer/drawer.rb +0 -8
  106. data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +0 -77
  107. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.html.erb +0 -117
  108. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.jsx +0 -227
  109. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.md +0 -1
  110. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.html.erb +0 -72
  111. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.jsx +0 -91
  112. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_rails.md +0 -1
  113. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_react.md +0 -1
  114. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_bubble.html.erb +0 -73
  115. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_bubble.jsx +0 -86
  116. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.html.erb +0 -50
  117. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.md +0 -1
  118. data/app/pb_kits/playbook/pb_radio/index.js +0 -17
  119. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.html.erb +0 -31
  120. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.jsx +0 -26
  121. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_rails.md +0 -1
  122. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_react.md +0 -1
  123. data/app/pb_kits/playbook/utilities/icons/angle-down.svg +0 -3
  124. data/app/pb_kits/playbook/utilities/icons/envelope.svg +0 -3
  125. data/dist/chunks/_typeahead-BYw0HEgO.js +0 -22
  126. data/dist/chunks/_weekday_stacked-DY64Tj7E.js +0 -45
  127. data/dist/chunks/lib-CEpcaI8y.js +0 -29
@@ -3,25 +3,8 @@
3
3
  @import "../tokens/opacity";
4
4
  @import "../pb_avatar/avatar";
5
5
 
6
- @mixin avatar-size($size) {
7
- height: $size;
8
- width: $size;
9
- .avatar_wrapper {
10
- width: $size;
11
- height: $size;
12
- }
13
- }
14
-
15
- @mixin position($position) {
16
- position: absolute;
17
- @each $pos, $val in $position {
18
- #{$pos}: $val;
19
- }
20
- }
21
-
22
6
  [class^=pb_multiple_users_stacked_kit] {
23
7
  $container_size: map-get($avatar-sizes, "xs");
24
- $bubble_container_size: map-get($avatar-sizes, "sm");
25
8
  $overlap: -15px;
26
9
  $border_size: 1px;
27
10
  $stacked_size: 18px;
@@ -34,24 +17,34 @@
34
17
  flex-shrink: 0;
35
18
  flex-grow: 0;
36
19
  [class^=pb_avatar_kit].pb_multiple_users_stacked_item {
37
- @include avatar-size($stacked_size);
38
- &.dark {
20
+ height: $stacked_size;
21
+ width: $stacked_size;
22
+ &.dark {
23
+ .avatar_wrapper {
24
+ border: $pb_multiple_users_border_size solid $bg_dark;
25
+ }
26
+ }
39
27
  .avatar_wrapper {
40
- border: $border_size solid $bg_dark;
28
+ border: $border_size solid $white;
29
+ height: $stacked_size;
30
+ width: $stacked_size;
31
+ img {
32
+ z-index: 0;
33
+ }
41
34
  }
42
35
  }
36
+ &[class*=_single] .pb_multiple_users_stacked_item {
37
+ width: $container_size;
38
+ height: $container_size;
43
39
  .avatar_wrapper {
44
- border: $border_size solid $white;
45
- img {
46
- z-index: 0;
47
- }
40
+ width: $container_size;
41
+ height: $container_size;
48
42
  }
49
43
  }
50
- &[class*=_single] .pb_multiple_users_stacked_item {
51
- @include avatar-size($container_size);
52
- }
53
44
  [class^=pb_avatar_kit].second_item, [class^=pb_badge_kit].second_item {
54
- @include position((bottom: 0, right: 0));
45
+ position: absolute;
46
+ bottom: 0;
47
+ right: 0;
55
48
  z-index: 2;
56
49
  background: tint($primary, 90%);
57
50
  border-radius: $border_rad_mega;
@@ -70,73 +63,4 @@
70
63
  font-size: 0;
71
64
  color: transparent;
72
65
  }
73
-
74
- &[class*=_bubble] {
75
- @include avatar-size($bubble_container_size);
76
- background-color: $bg_light;
77
- border-radius: 50%;
78
-
79
- &.dark {
80
- background-color: $card_dark;
81
- }
82
-
83
- [class^=pb_avatar_kit].pb_multiple_users_stacked_item {
84
- &.dark {
85
- .avatar_wrapper {
86
- border: $border_size solid $border_dark;
87
- }
88
- }
89
- }
90
-
91
- [class^=pb_avatar_kit] {
92
- &.first_item {
93
- @include position((top: 4px, left: 3px));
94
- @include avatar-size(20px);
95
-
96
- &.triple_bubble {
97
- @include position((top: 4px, left: 4px));
98
- @include avatar-size(16px);
99
- }
100
-
101
- &.quadruple_bubble {
102
- @include position((top: 5px, left: 3px));
103
- @include avatar-size(16px);
104
- }
105
- }
106
-
107
- &.second_item {
108
- @include position((bottom: 5px, right: 4px));
109
- @include avatar-size(12px);
110
-
111
- &.triple_bubble {
112
- @include position((top: 13px, right: 2px));
113
- }
114
-
115
- &.quadruple_bubble {
116
- @include position((bottom: 9px, right: 4px));
117
- }
118
- }
119
-
120
- &.third_item {
121
- @include position((bottom: 3px, left: 11px));
122
- @include avatar-size(10px);
123
-
124
- &.quadruple_bubble {
125
- @include position((bottom: 3px, left: 9px));
126
- }
127
- }
128
-
129
- &.fourth_item {
130
- @include position((top: 5px, right: 6px));
131
- @include avatar-size(8px);
132
- }
133
- }
134
- }
135
-
136
- &[class*=_single_bubble] {
137
- [class^=pb_avatar_kit].first_item {
138
- @include position((top: 0, left: 0));
139
- @include avatar-size($bubble_container_size);
140
- }
141
- }
142
66
  }
@@ -58,170 +58,4 @@ test('should pass aria prop', () => {
58
58
  render(<MultipleUsersStackedDefault />)
59
59
  const kit = screen.getByTestId(testId)
60
60
  expect(kit).toHaveAttribute('aria-label', testId)
61
- })
62
-
63
- const MultipleUsersStackedSingleBubble = () => {
64
- return (
65
- <MultipleUsersStacked
66
- aria={{ label: testId }}
67
- className={className}
68
- data={{ testid: testId }}
69
- users={[
70
- {
71
- name: "user1",
72
- imageUrl: "imageUser1",
73
- imageAlt: "nameUser1",
74
- }
75
- ]}
76
- variant="bubble"
77
- />
78
- )
79
- }
80
-
81
- test('should have a single bubble', () => {
82
- render(<MultipleUsersStackedSingleBubble />)
83
- const kit = screen.getByTestId(testId)
84
- expect(kit).toHaveClass("pb_multiple_users_stacked_kit_single_bubble")
85
-
86
- const firstItem = kit.querySelector('.first_item');
87
- expect(firstItem).toBeInTheDocument();
88
- })
89
-
90
- const MultipleUsersStackedDoubleBubble = () => {
91
- return (
92
- <MultipleUsersStacked
93
- aria={{ label: testId }}
94
- className={className}
95
- data={{ testid: testId }}
96
- users={[
97
- {
98
- name: "user1",
99
- imageUrl: "imageUser1",
100
- imageAlt: "nameUser1",
101
- },
102
- {
103
- name: "user2",
104
- imageUrl: "imageUser2",
105
- imageAlt: "nameUser2",
106
- },
107
- ]}
108
- variant="bubble"
109
- />
110
- )
111
- }
112
-
113
- test('should have a double bubble', () => {
114
- render(<MultipleUsersStackedDoubleBubble />)
115
- const kit = screen.getByTestId(testId)
116
- expect(kit).toHaveClass("pb_multiple_users_stacked_kit_bubble")
117
-
118
- const firstItem = kit.querySelector('.first_item');
119
- expect(firstItem).toBeInTheDocument();
120
-
121
- const secondItem = kit.querySelector('.second_item');
122
- expect(secondItem).toBeInTheDocument();
123
- })
124
-
125
- const MultipleUsersStackedTripleBubble = () => {
126
- return (
127
- <MultipleUsersStacked
128
- aria={{ label: testId }}
129
- className={className}
130
- data={{ testid: testId }}
131
- users={[
132
- {
133
- name: "user1",
134
- imageUrl: "imageUser1",
135
- imageAlt: "nameUser1",
136
- },
137
- {
138
- name: "user2",
139
- imageUrl: "imageUser2",
140
- imageAlt: "nameUser2",
141
- },
142
- {
143
- name: "user3",
144
- imageUrl: "imageUser3",
145
- imageAlt: "nameUser3",
146
- },
147
- ]}
148
- variant="bubble"
149
- />
150
- )
151
- }
152
-
153
- test('should have a triple bubble', () => {
154
- render(<MultipleUsersStackedTripleBubble />)
155
- const kit = screen.getByTestId(testId)
156
- expect(kit).toHaveClass("pb_multiple_users_stacked_kit_bubble")
157
-
158
- const firstItem = kit.querySelector('.first_item');
159
- expect(firstItem).toBeInTheDocument();
160
- expect(firstItem).toHaveClass("triple_bubble")
161
-
162
- const secondItem = kit.querySelector('.second_item');
163
- expect(secondItem).toBeInTheDocument();
164
- expect(secondItem).toHaveClass("triple_bubble")
165
-
166
- const thirdItem = kit.querySelector('.third_item');
167
- expect(thirdItem).toBeInTheDocument();
168
- })
169
-
170
- const MultipleUsersStackedQuadrupleBubble = () => {
171
- return (
172
- <MultipleUsersStacked
173
- aria={{ label: testId }}
174
- className={className}
175
- data={{ testid: testId }}
176
- users={[
177
- {
178
- name: "user1",
179
- imageUrl: "imageUser1",
180
- imageAlt: "nameUser1",
181
- },
182
- {
183
- name: "user2",
184
- imageUrl: "imageUser2",
185
- imageAlt: "nameUser2",
186
- },
187
- {
188
- name: "user3",
189
- imageUrl: "imageUser3",
190
- imageAlt: "nameUser3",
191
- },
192
- {
193
- name: "user4",
194
- imageUrl: "imageUser4",
195
- imageAlt: "nameUser4",
196
- },
197
- {
198
- name: "user5",
199
- imageUrl: "imageUser5",
200
- imageAlt: "nameUser5",
201
- },
202
- ]}
203
- variant="bubble"
204
- />
205
- )
206
- }
207
-
208
- test('should have a quadruple bubble', () => {
209
- render(<MultipleUsersStackedQuadrupleBubble />)
210
- const kit = screen.getByTestId(testId)
211
- expect(kit).toHaveClass("pb_multiple_users_stacked_kit_bubble")
212
-
213
- const firstItem = kit.querySelector('.first_item');
214
- expect(firstItem).toBeInTheDocument();
215
- expect(firstItem).toHaveClass("quadruple_bubble")
216
-
217
- const secondItem = kit.querySelector('.second_item');
218
- expect(secondItem).toBeInTheDocument();
219
- expect(secondItem).toHaveClass("quadruple_bubble")
220
-
221
- const thirdItem = kit.querySelector('.third_item');
222
- expect(thirdItem).toBeInTheDocument();
223
- expect(thirdItem).toHaveClass("quadruple_bubble")
224
-
225
- const fourthItem = kit.querySelector('.fourth_item');
226
- expect(fourthItem).toBeInTheDocument();
227
61
  })
@@ -15,7 +15,6 @@ type MultipleUsersStackedProps = {
15
15
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
16
16
  id?: string,
17
17
  users: Array<{ [key: string]: string }>,
18
- variant: "default" | "bubble",
19
18
  }
20
19
 
21
20
  const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
@@ -27,14 +26,10 @@ const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
27
26
  htmlOptions = {},
28
27
  id,
29
28
  users,
30
- variant = "default",
31
29
  } = props
32
30
 
33
31
  const moreThanTwo = users.length > 2
34
32
  const onlyOne = users.length == 1
35
- const isBubble = variant === "bubble"
36
- const tripleBubble = isBubble && users.length === 3
37
- const quadrupleBubble = isBubble && users.length > 3
38
33
  const displayCount = () => {
39
34
  return moreThanTwo ? 1 : users.length
40
35
  }
@@ -43,61 +38,29 @@ const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
43
38
  const htmlProps = buildHtmlProps(htmlOptions)
44
39
  const classes = classnames(buildCss(
45
40
  'pb_multiple_users_stacked_kit',
46
- { single: onlyOne, bubble: isBubble }), globalProps(props), className)
41
+ { single: onlyOne }), globalProps(props), className)
47
42
 
48
43
  const firstUser = () => {
49
44
  return users.slice(0, 1).map((userObject, index) => {
50
45
  return (
51
46
  <Avatar
52
47
  {...userObject}
53
- className={`pb_multiple_users_stacked_item first_item${tripleBubble ? " triple_bubble" : ""}${quadrupleBubble ? " quadruple_bubble" : ""}`}
48
+ className="pb_multiple_users_stacked_item"
54
49
  dark={dark}
55
50
  key={index}
56
- size={isBubble ? "sm" : "xs"}
51
+ size="xs"
57
52
  />
58
53
  )
59
54
  })
60
55
  }
61
56
 
62
57
  const secondUser = () => {
63
- if (!moreThanTwo || (isBubble && users.length > 1)) {
58
+ if (moreThanTwo === false) {
64
59
  return users.slice(1, 2).map((userObject, index) => {
65
60
  return (
66
61
  <Avatar
67
62
  {...userObject}
68
- className={`pb_multiple_users_stacked_item second_item${tripleBubble ? " triple_bubble" : ""}${quadrupleBubble ? " quadruple_bubble" : ""}`}
69
- dark={dark}
70
- key={index}
71
- size="xs"
72
- />
73
- )
74
- })
75
- }
76
- }
77
-
78
- const thirdUser = () => {
79
- if (isBubble && users.length > 2) {
80
- return users.slice(2, 3).map((userObject, index) => {
81
- return (
82
- <Avatar
83
- {...userObject}
84
- className={`pb_multiple_users_stacked_item third_item${quadrupleBubble ? " quadruple_bubble" : ""}`}
85
- dark={dark}
86
- key={index}
87
- size="xs"
88
- />
89
- )
90
- })
91
- }
92
- }
93
-
94
- const fourthUser = () => {
95
- if (isBubble && users.length > 3) {
96
- return users.slice(3, 4).map((userObject, index) => {
97
- return (
98
- <Avatar
99
- {...userObject}
100
- className="pb_multiple_users_stacked_item fourth_item"
63
+ className="pb_multiple_users_stacked_item second_item"
101
64
  dark={dark}
102
65
  key={index}
103
66
  size="xs"
@@ -108,7 +71,7 @@ const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
108
71
  }
109
72
 
110
73
  const plusUsers = () => {
111
- if (moreThanTwo && !isBubble) {
74
+ if (moreThanTwo === true) {
112
75
  return (
113
76
  <Badge
114
77
  className="pb_multiple_users_stacked_item second_item"
@@ -131,8 +94,6 @@ const MultipleUsersStacked = (props: MultipleUsersStackedProps) => {
131
94
  >
132
95
  {firstUser()}
133
96
  {secondUser()}
134
- {thirdUser()}
135
- {fourthUser()}
136
97
  {plusUsers()}
137
98
  </div>
138
99
  )
@@ -2,12 +2,10 @@ examples:
2
2
 
3
3
  rails:
4
4
  - multiple_users_stacked_default: Default
5
- - multiple_users_stacked_bubble: Bubble
6
5
 
7
6
 
8
7
  react:
9
8
  - multiple_users_stacked_default: Default
10
- - multiple_users_stacked_bubble: Bubble
11
9
 
12
10
  swift:
13
11
  - multiple_users_stacked_default_swift: Default
@@ -1,2 +1 @@
1
1
  export { default as MultipleUsersStackedDefault } from './_multiple_users_stacked_default.jsx'
2
- export { default as MultipleUsersStackedBubble } from './_multiple_users_stacked_bubble.jsx'
@@ -1,18 +1,14 @@
1
1
  <%= pb_content_tag do %>
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}) ) %>
2
+ <%= pb_rails("avatar", props: object.users[0].merge({size: "xs", classname: "pb_multiple_users_stacked_item", dark: object.dark}) ) %>
3
3
 
4
4
  <% unless object.only_one %>
5
- <% if object.more_than_two && !object.bubble %>
5
+ <% if object.more_than_two %>
6
6
  <%= pb_rails("badge", props: {
7
7
  dark: object.dark,
8
8
  text: "+#{object.users.count - object.display_count}",
9
9
  variant: "primary",
10
10
  rounded: true,
11
11
  classname: "pb_multiple_users_stacked_item second_item" }) %>
12
- <% elsif object.bubble %>
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}) ) %>
15
- <% end %>
16
12
  <% else %>
17
13
  <%= pb_rails("avatar", props: object.users[1].merge({size: "xs", classname: "pb_multiple_users_stacked_item second_item", dark: object.dark}) ) %>
18
14
  <% end %>
@@ -5,10 +5,6 @@ module Playbook
5
5
  class MultipleUsersStacked < Playbook::KitBase
6
6
  prop :users, type: Playbook::Props::HashArray, required: true
7
7
 
8
- prop :variant, type: Playbook::Props::Enum,
9
- values: %w[default bubble],
10
- default: "default"
11
-
12
8
  def more_than_two
13
9
  users.count > 2
14
10
  end
@@ -21,20 +17,8 @@ module Playbook
21
17
  more_than_two ? 1 : users.count
22
18
  end
23
19
 
24
- def bubble
25
- variant == "bubble"
26
- end
27
-
28
- def triple_bubble
29
- bubble && users.count === 3
30
- end
31
-
32
- def quadruple_bubble
33
- bubble && users.count > 3
34
- end
35
-
36
20
  def classname
37
- generate_classname("pb_multiple_users_stacked_kit", single_class, bubble_class)
21
+ generate_classname("pb_multiple_users_stacked_kit", single_class)
38
22
  end
39
23
 
40
24
  private
@@ -42,10 +26,6 @@ module Playbook
42
26
  def single_class
43
27
  only_one ? "single" : nil
44
28
  end
45
-
46
- def bubble_class
47
- bubble ? "bubble" : nil
48
- end
49
29
  end
50
30
  end
51
31
  end
@@ -22,16 +22,6 @@ const PaginationPageChange = (props) => {
22
22
 
23
23
  return (
24
24
  <div className="App">
25
- <Pagination
26
- current={activePage}
27
- key={`pagination-top-${activePage}`}
28
- marginBottom="xs"
29
- onChange={onPageChange}
30
- range={5}
31
- total={totalPages}
32
- {...props}
33
- />
34
-
35
25
  <Table
36
26
  marginBottom="xs"
37
27
  responsive="none"
@@ -59,8 +49,7 @@ const PaginationPageChange = (props) => {
59
49
  </Table>
60
50
 
61
51
  <Pagination
62
- current={activePage}
63
- key={`pagination-bottom-${activePage}`}
52
+ current={1}
64
53
  onChange={onPageChange}
65
54
  range={5}
66
55
  total={totalPages}
@@ -1,3 +1 @@
1
- You can use the `onChange` prop to control the data of your table. This prop is callback function that will allow you control the state.
2
-
3
- To ensure synchronization between multiple pagination components on a single page, use unique, dynamic keys for each pagination instance. Each Pagination component should have its own dynamic key that reflects the current active page: this example uses `pagination-top-${activePage}` and `pagination-bottom-${activePage}`.
1
+ You can use the `onChange` prop to control the data of your table. This prop is callback function that will allow you control the state.
@@ -12,7 +12,6 @@ import Icon from '../pb_icon/_icon'
12
12
  import PbReactPopover from '../pb_popover/_popover'
13
13
  import TextInput from '../pb_text_input/_text_input'
14
14
  import { GenericObject } from "../types"
15
- import { getAllIcons } from "../utilities/icons/allicons"
16
15
 
17
16
  type PassphraseProps = {
18
17
  aria?: { [key: string]: string },
@@ -97,9 +96,6 @@ const Passphrase = (props: PassphraseProps): React.ReactElement => {
97
96
  />
98
97
  )
99
98
 
100
- const shieldIcon = getAllIcons()["shieldCheck"]
101
- const eyeIcon = getAllIcons()["eye"]
102
-
103
99
  return (
104
100
  <div
105
101
  {...ariaProps}
@@ -139,8 +135,7 @@ const Passphrase = (props: PassphraseProps): React.ReactElement => {
139
135
  size="xs"
140
136
  >
141
137
  <Icon
142
- className="svg-inline--fa"
143
- customIcon={shieldIcon.icon as unknown as { [key: string]: SVGElement }}
138
+ icon="shield-check"
144
139
  marginRight="xs"
145
140
  />
146
141
  {tip}
@@ -178,10 +173,7 @@ const Passphrase = (props: PassphraseProps): React.ReactElement => {
178
173
  color="light"
179
174
  dark={dark}
180
175
  >
181
- <Icon
182
- className="svg-inline--fa"
183
- customIcon={eyeIcon.icon as unknown as { [key: string]: SVGElement }}
184
- />
176
+ <Icon icon="eye" />
185
177
  </Body>
186
178
  </span>
187
179
  </div>
@@ -1,10 +1,8 @@
1
1
  <%= pb_rails("button", props: { variant: "secondary", id: 'list' }) do %>
2
2
  <%= pb_rails("flex", props: {align: "center"}) do %>
3
- Filter By
3
+ Filter By
4
4
  <%= pb_rails("flex/flex_item", props: {margin_left: "xxs"}) do %>
5
- <div id="arrow-icon" style="display: flex">
6
- <%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true }) %>
7
- </div>
5
+ <div id="arrow-icon" style="display: flex"></div>
8
6
  <% end %>
9
7
  <% end %>
10
8
  <% end %>
@@ -20,17 +18,18 @@
20
18
 
21
19
 
22
20
  <script type="text/javascript">
23
- const popoverButton = document.querySelector("#list")
24
- let buttonClicked = false
21
+ const button = document.querySelector("#list")
22
+ let buttonClicked = false
25
23
 
26
- const arrowDiv = document.querySelector("#arrow-icon")
24
+ const arrowDiv = document.querySelector("#arrow-icon")
25
+ arrowDiv.innerHTML = '<i class="far fa-angle-down"></i>'
27
26
 
28
- popoverButton.onclick = () => {
29
- buttonClicked = !buttonClicked
30
- if (buttonClicked) {
31
- arrowDiv.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="auto" height="auto" viewBox="0 0 31 25" fill="none" class="pb_custom_icon svg-inline--fa pb_icon_kit svg_fw" id="" data="{}" aria="{}" tabindex=""><path d="M14.2031 5.70312C14.625 5.28125 15.3281 5.28125 15.75 5.70312L24.7969 14.7031C25.2188 15.1719 25.2188 15.875 24.7969 16.2969C24.3281 16.7656 23.625 16.7656 23.2031 16.2969L15 8.09375L6.79688 16.2969C6.32812 16.7656 5.625 16.7656 5.20312 16.2969C4.73438 15.875 4.73438 15.1719 5.20312 14.75L14.2031 5.70312Z" fill="currentColor"/></svg>'
32
- } else {
33
- arrowDiv.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="auto" height="auto" viewBox="0 0 31 25" fill="none" class="pb_custom_icon svg-inline--fa pb_icon_kit svg_fw" id="" data="{}" aria="{}" tabindex=""><path d="M14.2031 19.2969L5.20312 10.2969C4.73438 9.875 4.73438 9.17188 5.20312 8.70312C5.625 8.28125 6.32812 8.28125 6.79688 8.70312L15 16.9531L23.2031 8.75C23.625 8.28125 24.3281 8.28125 24.7969 8.75C25.2188 9.17188 25.2188 9.875 24.7969 10.2969L15.75 19.2969C15.3281 19.7656 14.625 19.7656 14.2031 19.2969Z" fill="currentColor"/></svg>'
34
- }
27
+ button.onclick = () => {
28
+ buttonClicked = !buttonClicked
29
+ if (buttonClicked) {
30
+ arrowDiv.innerHTML = '<i class="far fa-angle-up"></i>'
31
+ } else {
32
+ arrowDiv.innerHTML = '<i class="far fa-angle-down"></i>'
35
33
  }
34
+ }
36
35
  </script>
@@ -26,10 +26,10 @@ const PopoverWithButton = (props) => {
26
26
  className={showPopover ? "fa-flip-vertical" : ""}
27
27
  display="inline_flex"
28
28
  >
29
- <Icon
30
- fixedWidth
31
- icon="angle-down"
32
- margin-left="xxs"
29
+ <Icon
30
+ fixedWidth
31
+ icon="angle-down"
32
+ margin-left="xxs"
33
33
  />
34
34
  </Flex>
35
35
  </Flex>