@clickhouse/click-ui 0.0.192 → 0.0.193
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/dist/click-ui.es.js +6 -6
- package/dist/click-ui.umd.js +6 -6
- package/package.json +1 -1
package/dist/click-ui.es.js
CHANGED
|
@@ -38232,15 +38232,15 @@ const SingleSelectValue = ({
|
|
|
38232
38232
|
valueNode,
|
|
38233
38233
|
value
|
|
38234
38234
|
}) => {
|
|
38235
|
+
if (value === void 0 || value === null) {
|
|
38236
|
+
return null;
|
|
38237
|
+
}
|
|
38235
38238
|
const {
|
|
38236
38239
|
icon,
|
|
38237
38240
|
iconDir,
|
|
38238
38241
|
children,
|
|
38239
38242
|
label
|
|
38240
38243
|
} = valueNode ?? {};
|
|
38241
|
-
if (!value) {
|
|
38242
|
-
return null;
|
|
38243
|
-
}
|
|
38244
38244
|
return /* @__PURE__ */ jsx(SelectValueContainer, { children: /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, children: label ?? children ?? value }) });
|
|
38245
38245
|
};
|
|
38246
38246
|
const useOption = () => {
|
|
@@ -38672,7 +38672,7 @@ const Select = ({
|
|
|
38672
38672
|
onOpenChange: onOpenChangeProp,
|
|
38673
38673
|
...props
|
|
38674
38674
|
}) => {
|
|
38675
|
-
const [selectedValues, setSelectedValues] = useState(valueProp ? [valueProp] : defaultValue ? [defaultValue] : []);
|
|
38675
|
+
const [selectedValues, setSelectedValues] = useState(typeof valueProp === "string" ? [valueProp] : typeof defaultValue === "string" ? [defaultValue] : []);
|
|
38676
38676
|
const [open2, setOpen] = useState(false);
|
|
38677
38677
|
const onOpenChange = useCallback((open22) => {
|
|
38678
38678
|
setOpen(open22);
|
|
@@ -38698,7 +38698,7 @@ const Select = ({
|
|
|
38698
38698
|
}
|
|
38699
38699
|
}, [selectedValues, onSelect]);
|
|
38700
38700
|
useUpdateEffect(() => {
|
|
38701
|
-
setSelectedValues(valueProp ? [valueProp] : []);
|
|
38701
|
+
setSelectedValues(typeof valueProp === "string" ? [valueProp] : []);
|
|
38702
38702
|
}, [valueProp]);
|
|
38703
38703
|
const conditionalProps = {};
|
|
38704
38704
|
if (options) {
|
|
@@ -38706,7 +38706,7 @@ const Select = ({
|
|
|
38706
38706
|
} else {
|
|
38707
38707
|
conditionalProps.children = children;
|
|
38708
38708
|
}
|
|
38709
|
-
return /* @__PURE__ */ jsx(InternalSelect, { onChange, value: valueProp ? [valueProp] : selectedValues, open: open2, onOpenChange, onSelect, ...conditionalProps, ...props });
|
|
38709
|
+
return /* @__PURE__ */ jsx(InternalSelect, { onChange, value: typeof valueProp === "string" ? [valueProp] : selectedValues, open: open2, onOpenChange, onSelect, ...conditionalProps, ...props });
|
|
38710
38710
|
};
|
|
38711
38711
|
Select.Group = SelectGroup;
|
|
38712
38712
|
Select.Item = SelectItem;
|
package/dist/click-ui.umd.js
CHANGED
|
@@ -38247,15 +38247,15 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38247
38247
|
valueNode,
|
|
38248
38248
|
value
|
|
38249
38249
|
}) => {
|
|
38250
|
+
if (value === void 0 || value === null) {
|
|
38251
|
+
return null;
|
|
38252
|
+
}
|
|
38250
38253
|
const {
|
|
38251
38254
|
icon,
|
|
38252
38255
|
iconDir,
|
|
38253
38256
|
children,
|
|
38254
38257
|
label
|
|
38255
38258
|
} = valueNode ?? {};
|
|
38256
|
-
if (!value) {
|
|
38257
|
-
return null;
|
|
38258
|
-
}
|
|
38259
38259
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectValueContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, children: label ?? children ?? value }) });
|
|
38260
38260
|
};
|
|
38261
38261
|
const useOption = () => {
|
|
@@ -38687,7 +38687,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38687
38687
|
onOpenChange: onOpenChangeProp,
|
|
38688
38688
|
...props
|
|
38689
38689
|
}) => {
|
|
38690
|
-
const [selectedValues, setSelectedValues] = React.useState(valueProp ? [valueProp] : defaultValue ? [defaultValue] : []);
|
|
38690
|
+
const [selectedValues, setSelectedValues] = React.useState(typeof valueProp === "string" ? [valueProp] : typeof defaultValue === "string" ? [defaultValue] : []);
|
|
38691
38691
|
const [open2, setOpen] = React.useState(false);
|
|
38692
38692
|
const onOpenChange = React.useCallback((open22) => {
|
|
38693
38693
|
setOpen(open22);
|
|
@@ -38713,7 +38713,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38713
38713
|
}
|
|
38714
38714
|
}, [selectedValues, onSelect]);
|
|
38715
38715
|
useUpdateEffect(() => {
|
|
38716
|
-
setSelectedValues(valueProp ? [valueProp] : []);
|
|
38716
|
+
setSelectedValues(typeof valueProp === "string" ? [valueProp] : []);
|
|
38717
38717
|
}, [valueProp]);
|
|
38718
38718
|
const conditionalProps = {};
|
|
38719
38719
|
if (options2) {
|
|
@@ -38721,7 +38721,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38721
38721
|
} else {
|
|
38722
38722
|
conditionalProps.children = children;
|
|
38723
38723
|
}
|
|
38724
|
-
return /* @__PURE__ */ jsxRuntime.jsx(InternalSelect, { onChange, value: valueProp ? [valueProp] : selectedValues, open: open2, onOpenChange, onSelect, ...conditionalProps, ...props });
|
|
38724
|
+
return /* @__PURE__ */ jsxRuntime.jsx(InternalSelect, { onChange, value: typeof valueProp === "string" ? [valueProp] : selectedValues, open: open2, onOpenChange, onSelect, ...conditionalProps, ...props });
|
|
38725
38725
|
};
|
|
38726
38726
|
Select.Group = SelectGroup;
|
|
38727
38727
|
Select.Item = SelectItem;
|