@mtes-mct/monitor-ui 2.9.4 → 2.10.0

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## [2.9.5](https://github.com/MTES-MCT/monitor-ui/compare/v2.9.4...v2.9.5) (2023-01-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **fields:** fix searchable Select toggling behavior ([f3b3eca](https://github.com/MTES-MCT/monitor-ui/commit/f3b3eca41b6f2d3d48f21f2b388cf5dc7f6d24d1))
7
+
8
+ ## [2.9.4](https://github.com/MTES-MCT/monitor-ui/compare/v2.9.3...v2.9.4) (2023-01-27)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **elements:** make Fieldset width 100% of parent width ([63d10c6](https://github.com/MTES-MCT/monitor-ui/commit/63d10c60ab12ebe437ea236ea5cde12fa13fd6ff))
14
+ * **fields:** fix MultiSelect placeholder alignment ([8c335b2](https://github.com/MTES-MCT/monitor-ui/commit/8c335b2d26208f2b7faecc9434ef1e0c201698e3))
15
+ * **fields:** improve MultiZoneEditor alignments ([b7d5784](https://github.com/MTES-MCT/monitor-ui/commit/b7d5784edefba4bf6e294f5cdf6cf27b79c309db))
16
+
1
17
  ## [2.9.3](https://github.com/MTES-MCT/monitor-ui/compare/v2.9.2...v2.9.3) (2023-01-27)
2
18
 
3
19
 
package/index.js CHANGED
@@ -5300,8 +5300,19 @@ searchable = false, ...originalProps }) {
5300
5300
  onChange(normalizedNextValue);
5301
5301
  }
5302
5302
  }, [close, onChange]);
5303
- const toggle = useCallback(() => {
5304
- setIsOpen(!isOpen);
5303
+ const toggle = useCallback((event) => {
5304
+ let targetElement = event.target;
5305
+ if (targetElement.tagName === 'path') {
5306
+ if (targetElement.parentElement) {
5307
+ targetElement = targetElement.parentElement;
5308
+ }
5309
+ }
5310
+ if (targetElement.classList.contains('rs-picker-toggle') ||
5311
+ targetElement.classList.contains('rs-stack-item') ||
5312
+ targetElement.classList.contains('rs-picker-toggle-caret') ||
5313
+ targetElement.classList.contains('rs-picker-toggle-placeholder')) {
5314
+ setIsOpen(!isOpen);
5315
+ }
5305
5316
  }, [isOpen]);
5306
5317
  useClickOutside(boxRef, close, baseContainer);
5307
5318
  useEffect(() => {
@@ -5495,5 +5506,7 @@ function FormikTextInput({ name, ...originalProps }) {
5495
5506
  return jsx(TextInput, { defaultValue: defaultValue, name: name, onChange: helpers.setValue, ...originalProps });
5496
5507
  }
5497
5508
 
5498
- export { Accent, AutoComplete, Button, Checkbox, DatePicker, DateRangePicker, Dropdown, Field$2 as Field, Fieldset, FormikAutoComplete, FormikCheckbox, FormikDatePicker, FormikDateRangePicker, FormikEffect, FormikMultiCheckbox, FormikMultiRadio, FormikMultiSelect, FormikNumberInput, FormikSelect, FormikTextInput, FormikTextarea, GlobalStyle, index as Icon, IconButton, Label, Legend, MultiCheckbox, MultiRadio, MultiSelect, MultiZoneEditor, NumberInput, OnlyFontGlobalStyle, Select, Size, THEME, Tag$1 as Tag, TagGroup, TextInput, Textarea, ThemeProvider, useClickOutside, useForceUpdate };
5509
+ const noop = () => { };
5510
+
5511
+ export { Accent, AutoComplete, Button, Checkbox, DatePicker, DateRangePicker, Dropdown, Field$2 as Field, Fieldset, FormikAutoComplete, FormikCheckbox, FormikDatePicker, FormikDateRangePicker, FormikEffect, FormikMultiCheckbox, FormikMultiRadio, FormikMultiSelect, FormikNumberInput, FormikSelect, FormikTextInput, FormikTextarea, GlobalStyle, index as Icon, IconButton, Label, Legend, MultiCheckbox, MultiRadio, MultiSelect, MultiZoneEditor, NumberInput, OnlyFontGlobalStyle, Select, Size, THEME, Tag$1 as Tag, TagGroup, TextInput, Textarea, ThemeProvider, dayjs, getLocalizedDayjs, getUtcizedDayjs, noop, stopMouseEventPropagation, useClickOutside, useForceUpdate };
5499
5512
  //# sourceMappingURL=index.js.map