@vertesia/ui 1.1.0-dev.20260427.060440Z → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/ui",
3
- "version": "1.1.0-dev.20260427.060440Z",
3
+ "version": "1.1.0",
4
4
  "description": "Vertesia UI components and and hooks",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -86,10 +86,10 @@
86
86
  "vega": "^6.2.0",
87
87
  "vega-embed": "^7.1.0",
88
88
  "vega-lite": "^6.4.1",
89
- "@vertesia/client": "1.1.0-dev.20260427.060440Z",
90
- "@vertesia/fusion-ux": "1.1.0-dev.20260427.060440Z",
91
- "@vertesia/common": "1.1.0-dev.20260427.060440Z",
92
- "@vertesia/json": "1.1.0-dev.20260427.060440Z"
89
+ "@vertesia/fusion-ux": "1.1.0",
90
+ "@vertesia/json": "1.1.0",
91
+ "@vertesia/common": "1.1.0",
92
+ "@vertesia/client": "1.1.0"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@eslint/compat": "^2.0.2",
@@ -13,12 +13,14 @@ export const SelectionCombobox = ({
13
13
  setFilterValues,
14
14
  options,
15
15
  labelRenderer,
16
+ multiple = true,
16
17
  }: {
17
18
  filterType: string;
18
19
  filterValues: FilterOption[];
19
20
  setFilterValues: (filterValues: FilterOption[]) => void;
20
21
  options: FilterGroupOption[];
21
22
  labelRenderer?: (value: string) => React.ReactNode | Promise<React.ReactNode>;
23
+ multiple?: boolean;
22
24
  }) => {
23
25
  const [open, setOpen] = useState(false);
24
26
  const [commandInput, setCommandInput] = useState("");
@@ -88,7 +90,9 @@ export const SelectionCombobox = ({
88
90
  setOpen(false);
89
91
  }}
90
92
  >
91
- <input type="checkbox" checked={true} onChange={() => {}} />
93
+ {multiple && (
94
+ <input type="checkbox" checked={true} onChange={() => {}} />
95
+ )}
92
96
  <DynamicLabel
93
97
  value={value.value || ''}
94
98
  labelRenderer={labelRenderer}
@@ -112,20 +116,23 @@ export const SelectionCombobox = ({
112
116
  key={filter.value}
113
117
  value={String(filter.label || filter.value)}
114
118
  onSelect={() => {
115
- setFilterValues([...filterValues, {
119
+ const next = {
116
120
  value: filter.value,
117
121
  label: filter.label
118
- }]);
122
+ };
123
+ setFilterValues(multiple ? [...filterValues, next] : [next]);
119
124
  setTimeout(() => {
120
125
  setCommandInput("");
121
126
  }, 200);
122
127
  setOpen(false);
123
128
  }}
124
129
  >
125
- <Checkbox
126
- checked={false}
127
- className="opacity-0 group-data-[selected=true]:opacity-100"
128
- />
130
+ {multiple && (
131
+ <Checkbox
132
+ checked={false}
133
+ className="opacity-0 group-data-[selected=true]:opacity-100"
134
+ />
135
+ )}
129
136
  <span className="text-muted">
130
137
  <DynamicLabel
131
138
  value={filter.value || ''}
@@ -97,6 +97,7 @@ function generateComboboxOptions(
97
97
  }}
98
98
  options={filterGroup?.options || []}
99
99
  labelRenderer={filterGroup?.labelRenderer}
100
+ multiple={filter.multiple ?? filterGroup?.multiple}
100
101
  />
101
102
  );
102
103
  }