@connectif/ui-components 9.0.0 → 9.0.1

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,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [9.0.1] - 2026-05-28
4
+
5
+ ### Added
6
+
7
+ - Added `minMenuWidth` prop to `Select` component to set a minimum width for the dropdown menu.
8
+ - Added `maxMenuWidth` prop to `Select` component to cap the dropdown menu's natural width.
9
+ - Added `view-week-outline` icon.
10
+
11
+ ### Changed
12
+
13
+ - `Select` dropdown menu no longer matches the trigger element's width. The menu now sizes to its content, constrained by `minMenuWidth` and `maxMenuWidth`
14
+
3
15
  ## [9.0.0] - 2026-05-21
4
16
 
5
17
  ### Added
@@ -1860,6 +1860,7 @@ export declare const icons: {
1860
1860
  'view-sequential': string;
1861
1861
  'view-stream': string;
1862
1862
  'view-week': string;
1863
+ 'view-week-outline': string;
1863
1864
  vimeo: string;
1864
1865
  vine: string;
1865
1866
  violin: string;
@@ -75,6 +75,17 @@ export type SelectProps<T extends string | number | undefined, Multiple extends
75
75
  * The max height of the menu when open
76
76
  */
77
77
  menuMaxHeight?: string;
78
+ /**
79
+ * The minimum width (in px) of the dropdown menu.
80
+ * Defaults to 200.
81
+ */
82
+ minMenuWidth?: number;
83
+ /**
84
+ * The maximum width (in px) of the dropdown menu. Defaults to 400.
85
+ * When `virtualized=true`, the menu width is fixed to `minMenuWidth` by default,
86
+ * but `maxMenuWidth` still acts as an upper cap if `virtualizedProps.width` exceeds it.
87
+ */
88
+ maxMenuWidth?: number;
78
89
  /**
79
90
  * Ref to inner HTMLSelectElement
80
91
  */
package/dist/index.js CHANGED
@@ -2638,7 +2638,8 @@ import {
2638
2638
  mdiDatabaseExport,
2639
2639
  mdiBrain,
2640
2640
  mdiTools,
2641
- mdiSitemapOutline
2641
+ mdiSitemapOutline,
2642
+ mdiViewWeekOutline
2642
2643
  } from "@mdi/js";
2643
2644
  var icons = {
2644
2645
  "abx-testing": "M 18.00108644,11.0000004 L 18.00108644,8.00000044 L 22.00108644,12.0000004 L 18.00108644,16.0000004 L 18.00108644,13.0000004 L 13.57108644,13.0000004 C 13.1110864,12.2500004 12.5410864,11.5800004 11.8810864,11.0000004 L 18.00108644,11.0000004 Z M 12.0010864,22.0000004 L 16.00108644,18.0000004 L 13.0010864,18.0000004 C 13.1510864,14.3900004 10.4310864,11.3100004 6.8310864,11.0000004 C 6.2810864,9.44000044 4.5610864,8.62000044 3.0010864,9.17000044 C 1.4410864,9.72000044 0.6210864,11.4400004 1.1710864,13.0000004 C 1.7310864,14.5600004 3.4410864,15.3800004 5.0010864,14.8300004 C 5.8610864,14.5300004 6.5310864,13.8500004 6.8310864,13.0000004 C 10.8310864,13.4700004 11.0310864,17.4700004 11.0310864,17.9500004 L 8.0310864,17.9500004 L 12.0010864,22.0000004 Z M 11.4110864,10.6300004 C 12.4310864,9.30000044 13.0010864,7.67000044 13.0010864,6.00000044 L 16.00108644,6.00000044 L 12.0010864,2.00000044 L 8.0010864,6.00000044 L 11.0010864,6.00000044 C 10.9710864,7.34000044 10.5010864,8.63000044 9.6010864,9.64000044 C 10.2410864,9.89000044 10.8510864,10.22000044 11.4110864,10.6300004 Z",
@@ -4542,6 +4543,7 @@ var icons = {
4542
4543
  "view-sequential": mdiViewSequential,
4543
4544
  "view-stream": mdiViewStream,
4544
4545
  "view-week": mdiViewWeek,
4546
+ "view-week-outline": mdiViewWeekOutline,
4545
4547
  vimeo: "M22,7.42C21.91,9.37 20.55,12.04 17.92,15.44C15.2,19 12.9,20.75 11,20.75C9.85,20.75 8.86,19.67 8.05,17.5C7.5,15.54 7,13.56 6.44,11.58C5.84,9.42 5.2,8.34 4.5,8.34C4.36,8.34 3.84,8.66 2.94,9.29L2,8.07C3,7.2 3.96,6.33 4.92,5.46C6.24,4.32 7.23,3.72 7.88,3.66C9.44,3.5 10.4,4.58 10.76,6.86C11.15,9.33 11.42,10.86 11.57,11.46C12,13.5 12.5,14.5 13.05,14.5C13.47,14.5 14.1,13.86 14.94,12.53C15.78,11.21 16.23,10.2 16.29,9.5C16.41,8.36 15.96,7.79 14.94,7.79C14.46,7.79 13.97,7.9 13.46,8.12C14.44,4.89 16.32,3.32 19.09,3.41C21.15,3.47 22.12,4.81 22,7.42Z",
4546
4548
  vine: "M19.89,11.95C19.43,12.06 19,12.1 18.57,12.1C16.3,12.1 14.55,10.5 14.55,7.76C14.55,6.41 15.08,5.7 15.82,5.7C16.5,5.7 17,6.33 17,7.61C17,8.34 16.79,9.14 16.65,9.61C16.65,9.61 17.35,10.83 19.26,10.46C19.67,9.56 19.89,8.39 19.89,7.36C19.89,4.6 18.5,3 15.91,3C13.26,3 11.71,5.04 11.71,7.72C11.71,10.38 12.95,12.67 15,13.71C14.14,15.43 13.04,16.95 11.9,18.1C9.82,15.59 7.94,12.24 7.17,5.7H4.11C5.53,16.59 9.74,20.05 10.86,20.72C11.5,21.1 12.03,21.08 12.61,20.75C13.5,20.24 16.23,17.5 17.74,14.34C18.37,14.33 19.13,14.26 19.89,14.09V11.95Z",
4547
4549
  violin: mdiViolin,
@@ -22051,6 +22053,8 @@ var Select = function Select2({
22051
22053
  menuZIndex,
22052
22054
  menuColors,
22053
22055
  menuMaxHeight,
22056
+ minMenuWidth = 200,
22057
+ maxMenuWidth = 400,
22054
22058
  "data-testid": dataTestId,
22055
22059
  open,
22056
22060
  onOpen,
@@ -22063,9 +22067,6 @@ var Select = function Select2({
22063
22067
  const paperRef = React64.useRef(null);
22064
22068
  const selectRef = React64.useRef(null);
22065
22069
  const [measuredPaperHeight, setMeasuredPaperHeight] = React64.useState(void 0);
22066
- const [selectWidth, setSelectWidth] = React64.useState(
22067
- void 0
22068
- );
22069
22070
  const [highlightedIndex, setHighlightedIndex] = React64.useState(-1);
22070
22071
  const currentValue = React64.useMemo(
22071
22072
  () => value ?? (multiple ? [] : ""),
@@ -22121,7 +22122,7 @@ var Select = function Select2({
22121
22122
  return () => document.removeEventListener("keydown", handleKeyDown);
22122
22123
  }, [isOpen, virtualized, highlightedIndex, options, onChange, onClose]);
22123
22124
  const defaultVirtualizedProps = {
22124
- width: selectWidth ?? 250,
22125
+ width: minMenuWidth,
22125
22126
  overscanCount: 3,
22126
22127
  itemSize: 44
22127
22128
  };
@@ -22216,7 +22217,6 @@ var Select = function Select2({
22216
22217
  IconComponent: () => /* @__PURE__ */ jsx120(ChevronIcon, { disabled: rest.disabled, isOpen }),
22217
22218
  input: /* @__PURE__ */ jsx120(BootstrapInput, { ref: selectRef, placeholder }),
22218
22219
  onOpen: () => {
22219
- setSelectWidth(selectRef.current?.clientWidth);
22220
22220
  setOpen(true);
22221
22221
  onOpen && onOpen();
22222
22222
  },
@@ -22254,7 +22254,8 @@ var Select = function Select2({
22254
22254
  border: `1px solid ${menuColors.borderColor}`
22255
22255
  },
22256
22256
  maxHeight: menuMaxHeight,
22257
- maxWidth: selectWidth
22257
+ minWidth: minMenuWidth,
22258
+ maxWidth: maxMenuWidth
22258
22259
  },
22259
22260
  className: paperClassName
22260
22261
  },
@@ -22272,7 +22273,7 @@ var Select = function Select2({
22272
22273
  style: {
22273
22274
  maxHeight: measuredPaperHeight ? measuredPaperHeight - 16 : menuMaxHeight ? `calc(${menuMaxHeight} - 16px)` : "90vh",
22274
22275
  height: options.length * itemSize,
22275
- maxWidth: selectWidth ?? "90vw",
22276
+ maxWidth: maxMenuWidth,
22276
22277
  flex: "1 1 auto"
22277
22278
  }
22278
22279
  }
@@ -22340,7 +22341,6 @@ var Select = function Select2({
22340
22341
  open,
22341
22342
  input: /* @__PURE__ */ jsx120(BootstrapInput, { ref: selectRef, placeholder }),
22342
22343
  onOpen: () => {
22343
- setSelectWidth(selectRef.current?.clientWidth);
22344
22344
  setOpen(true);
22345
22345
  onOpen && onOpen();
22346
22346
  },
@@ -22384,7 +22384,8 @@ var Select = function Select2({
22384
22384
  border: `1px solid ${menuColors.borderColor}`
22385
22385
  },
22386
22386
  maxHeight: menuMaxHeight,
22387
- maxWidth: selectWidth
22387
+ minWidth: minMenuWidth,
22388
+ maxWidth: maxMenuWidth
22388
22389
  },
22389
22390
  className: `${paperClassName} Slim-Vertical-Scroll`
22390
22391
  }