playbook_ui 14.5.0.pre.rc.3 → 14.5.0.pre.rc.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '083ad248c1cd517b5c07e07a78869bd821647a2f2ce56639eb3f1a70f5dfa505'
4
- data.tar.gz: 188a7a944b5cbf20cc3caf1440b2507afa6ca34396c2130756fc4920add09192
3
+ metadata.gz: 8bb4fc0b70639490033875fbbf734462b07c72cdf35a2b9b9ca5f670dd5cd433
4
+ data.tar.gz: e26233f28c5914392ddc16a87a3107bd39b4943e14d002c409a54a9bc1d4b06f
5
5
  SHA512:
6
- metadata.gz: 356fc851d3550acb895a6b48f98a8b9e598e7f33bcacd9e12bdbf0702b689adb50595eb24864adfaf8fe4fd0fcdb1a6b7140ce981962ffe694116aa0ff8bf239
7
- data.tar.gz: 5561e611de275821882f3a30a934c382c9b188ea1bc09e4960a3ac4f570057e9b761590fbb9a641311c75e8c3dc4ed4b73f28477bbea05d7abb429911f9b9a83
6
+ metadata.gz: 10e77672d5309d7cbed79807fea62086fa30b40f268209342163a79d6eb1ac66050961070543d5077ba8f87af8d6f30dfe65e797c83761aade59d23f3acef79e
7
+ data.tar.gz: b442a063e7fd932c3bac853e9033cff26c1d2118e43d2c1ef2badde4aa0ddad302a9ae7d912a4f43b02dc176039c818b5e47e3fc67749d2135f89f9cb6acaf80
@@ -187,6 +187,8 @@
187
187
 
188
188
  &_close_icon {
189
189
  cursor: pointer;
190
+ font-size: $font_base;
191
+ line-height: $lh_normal;
190
192
  }
191
193
 
192
194
  &_overlay {
@@ -2,7 +2,7 @@
2
2
  <%= pb_rails("flex", props: {classname:object.classname, spacing:"between", padding:"sm", align:"center"}) do %>
3
3
  <%= content.presence || object.title %>
4
4
 
5
- <button class="dialog-button-class" type="button" data-close-dialog= <%= object.id %> >
5
+ <button class="dialog-button-class pb_dialog_close_icon" type="button" data-close-dialog= <%= object.id %> >
6
6
  <%= pb_rails("icon", props: { custom_icon: Playbook::Engine::root.join(times_icon) }) %>
7
7
  </button>
8
8
  <% end %>
@@ -88,6 +88,9 @@ const MultiLevelSelect = (props: MultiLevelSelectProps) => {
88
88
  item: []
89
89
  })
90
90
 
91
+ const arrowDownElementId = `arrow_down_${id}`
92
+ const arrowUpElementId = `arrow_up_${id}`
93
+
91
94
  const modifyRecursive = (tree: { [key: string]: any }[], check: boolean) => {
92
95
  if (!Array.isArray(tree)) {
93
96
  return
@@ -173,7 +176,12 @@ const MultiLevelSelect = (props: MultiLevelSelectProps) => {
173
176
  useEffect(() => {
174
177
  // Function to handle clicks outside the dropdown
175
178
  const handleClickOutside = (event: any) => {
176
- if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
179
+ if (
180
+ dropdownRef.current &&
181
+ !dropdownRef.current.contains(event.target) &&
182
+ event.target.id !== arrowDownElementId &&
183
+ event.target.id !== arrowUpElementId
184
+ ) {
177
185
  setIsDropdownClosed(true)
178
186
  }
179
187
  }
@@ -260,7 +268,6 @@ const MultiLevelSelect = (props: MultiLevelSelectProps) => {
260
268
 
261
269
  // Handle click on input wrapper(entire div with pills, typeahead, etc) so it doesn't close when input or form pill is clicked
262
270
  const handleInputWrapperClick = (e: any) => {
263
- e.stopPropagation()
264
271
  if (
265
272
  e.target.id === "multiselect_input" ||
266
273
  e.target.classList.contains("pb_form_pill_tag")
@@ -518,16 +525,20 @@ const MultiLevelSelect = (props: MultiLevelSelectProps) => {
518
525
  </div>
519
526
 
520
527
  {isDropdownClosed ? (
521
- <div key="chevron-down">
528
+ <div id={arrowDownElementId}
529
+ key="chevron-down">
522
530
  <Icon
523
531
  icon="chevron-down"
532
+ id={arrowDownElementId}
524
533
  size="xs"
525
534
  />
526
535
  </div>
527
536
  ) : (
528
- <div key="chevron-up">
537
+ <div id={arrowUpElementId}
538
+ key="chevron-up">
529
539
  <Icon
530
540
  icon="chevron-up"
541
+ id={arrowUpElementId}
531
542
  size="xs"
532
543
  />
533
544
  </div>