playbook_ui 12.26.1.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown831 → 12.26.1.pre.alpha.play716popoverkitcloseonclickissue833
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +0 -26
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +95 -102
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -18
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +4 -15
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +1 -84
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +4 -38
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -3
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_calendar_input_icon.scss +2 -3
- data/app/pb_kits/playbook/pb_nav/_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_nav/_subtle_mixin.scss +1 -1
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +5 -3
- data/app/pb_kits/playbook/pb_popover/index.ts +5 -2
- data/dist/playbook-rails.js +7 -279
- data/lib/playbook/version.rb +1 -1
- metadata +2 -11
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.html.erb +0 -12
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.md +0 -3
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_range_limit.html.erb +0 -12
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_range_limit.jsx +0 -18
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_range_limit.md +0 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.jsx +0 -17
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.md +0 -1
- data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +0 -168
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_quick_pick_styles.scss +0 -75
@@ -171,17 +171,19 @@ const PbReactPopover = (props: PbPopoverProps) => {
|
|
171
171
|
|
172
172
|
switch (closeOnClick) {
|
173
173
|
case "outside":
|
174
|
-
if (!targetIsPopover
|
174
|
+
if (!targetIsPopover && !targetIsReference) {
|
175
175
|
shouldClosePopover(true);
|
176
176
|
}
|
177
177
|
break;
|
178
178
|
case "inside":
|
179
|
-
if (targetIsPopover
|
179
|
+
if (targetIsPopover) {
|
180
180
|
shouldClosePopover(true);
|
181
181
|
}
|
182
182
|
break;
|
183
183
|
case "any":
|
184
|
-
|
184
|
+
if (targetIsPopover || !targetIsPopover && !targetIsReference) {
|
185
|
+
shouldClosePopover(true);
|
186
|
+
}
|
185
187
|
break;
|
186
188
|
}
|
187
189
|
},
|
@@ -49,13 +49,16 @@ export default class PbPopover extends PbEnhancedElement {
|
|
49
49
|
checkCloseTooltip() {
|
50
50
|
document.querySelector('body').addEventListener('click', ({ target } ) => {
|
51
51
|
const isTooltipElement = (target as HTMLElement).closest(`#${this.tooltipId}`) !== null
|
52
|
+
const isTriggerElement = (target as HTMLElement).closest(`#${this.triggerElementId}`) !== null
|
52
53
|
|
53
54
|
switch (this.closeOnClick) {
|
54
55
|
case 'any':
|
55
|
-
|
56
|
+
if (isTooltipElement || !isTooltipElement && !isTriggerElement) {
|
57
|
+
this.hideTooltip()
|
58
|
+
}
|
56
59
|
break
|
57
60
|
case 'outside':
|
58
|
-
if (!isTooltipElement) {
|
61
|
+
if (!isTooltipElement && !isTriggerElement) {
|
59
62
|
this.hideTooltip()
|
60
63
|
}
|
61
64
|
break
|