@clickhouse/click-ui 0.0.209 → 0.0.210

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.
@@ -8963,6 +8963,80 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
8963
8963
  const PopoverArrow = (props) => {
8964
8964
  return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "10", viewBox: "0 0 30 10", fill: "none", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 -1L15 9L30 -1", strokeWidth: "1.5", strokeLinejoin: "round" }) });
8965
8965
  };
8966
+ const _Container = ({
8967
+ component,
8968
+ alignItems,
8969
+ children,
8970
+ fillWidth = true,
8971
+ gap = "none",
8972
+ grow,
8973
+ shrink,
8974
+ isResponsive,
8975
+ justifyContent = "start",
8976
+ maxWidth,
8977
+ minWidth,
8978
+ orientation = "horizontal",
8979
+ padding = "none",
8980
+ wrap = "nowrap",
8981
+ fillHeight,
8982
+ maxHeight,
8983
+ minHeight,
8984
+ overflow,
8985
+ ...props
8986
+ }, ref) => {
8987
+ return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$d, { ref, as: component ?? "div", $alignItems: alignItems ?? (orientation === "vertical" ? "start" : "center"), $fillWidth: fillWidth, $gapSize: gap, $grow: grow, $shrink: shrink, $isResponsive: isResponsive, $justifyContent: justifyContent, $maxWidth: maxWidth, $minWidth: minWidth, $orientation: orientation, $paddingSize: padding, $wrap: wrap, $fillHeight: fillHeight, $maxHeight: maxHeight, $minHeight: minHeight, $overflow: overflow, "data-testid": "container", ...props, children });
8988
+ };
8989
+ const Wrapper$d = pt.div.withConfig({
8990
+ componentId: "sc-bcplth-0"
8991
+ })(["display:flex;", " ", " ", " flex-wrap:", ";gap:", ";max-width:", ";min-width:", ";padding:", ";width:", ";flex-direction:", ";align-items:", ";justify-content:", ";@media (max-width:", "){width:", ";max-width:", ";flex-direction:", ";}"], ({
8992
+ $grow,
8993
+ $shrink
8994
+ }) => `
8995
+ ${$grow && `flex: ${$grow}`};
8996
+ ${$shrink && `flex-shrink: ${$shrink}`};
8997
+ `, ({
8998
+ $fillHeight,
8999
+ $maxHeight,
9000
+ $minHeight
9001
+ }) => `
9002
+ ${$fillHeight && "height: 100%"};
9003
+ ${$maxHeight && `max-height: ${$maxHeight}`};
9004
+ ${$minHeight && `min-height: ${$minHeight}`};
9005
+ `, ({
9006
+ $overflow
9007
+ }) => `
9008
+ ${$overflow && `overflow: ${$overflow}`};
9009
+ `, ({
9010
+ $wrap = "nowrap"
9011
+ }) => $wrap, ({
9012
+ theme: theme2,
9013
+ $gapSize
9014
+ }) => theme2.click.container.gap[$gapSize], ({
9015
+ $maxWidth
9016
+ }) => $maxWidth ?? "none", ({
9017
+ $minWidth
9018
+ }) => $minWidth ?? "auto", ({
9019
+ theme: theme2,
9020
+ $paddingSize
9021
+ }) => theme2.click.container.space[$paddingSize], ({
9022
+ $fillWidth = true
9023
+ }) => $fillWidth === true ? "100%" : "auto", ({
9024
+ $orientation = "horizontal"
9025
+ }) => $orientation === "horizontal" ? "row" : "column", ({
9026
+ $alignItems = "center"
9027
+ }) => $alignItems, ({
9028
+ $justifyContent = "left"
9029
+ }) => $justifyContent === "start" ? "start" : `${$justifyContent}`, ({
9030
+ theme: theme2
9031
+ }) => theme2.breakpoint.sizes.md, ({
9032
+ $isResponsive = true,
9033
+ $fillWidth = true
9034
+ }) => $isResponsive === true ? "100%" : $fillWidth === true ? "100%" : "auto", ({
9035
+ $isResponsive = true
9036
+ }) => $isResponsive === true ? "none" : "auto", ({
9037
+ $isResponsive = true
9038
+ }) => $isResponsive === true ? "column" : "auto");
9039
+ const Container = React.forwardRef(_Container);
8966
9040
  const mergeRefs = (refs) => (value) => {
8967
9041
  refs.forEach((ref) => {
8968
9042
  if (typeof ref === "function") {
@@ -8986,14 +9060,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
8986
9060
  }]), ...props });
8987
9061
  };
8988
9062
  const EllipsisContent = React.forwardRef(_EllipsisContent);
8989
- const LabelContainer$1 = pt.div.withConfig({
8990
- componentId: "sc-1likhxd-0"
8991
- })(["display:grid;grid-template-columns:", ";align-items:center;justify-content:flex-start;width:100%;width:-webkit-fill-available;width:fill-available;width:stretch;gap:", ";"], ({
8992
- $hasIcon,
8993
- $iconDir
8994
- }) => `${$hasIcon && $iconDir === "start" ? "auto " : ""}1fr${$hasIcon && $iconDir === "end" ? " auto" : ""}`, ({
8995
- theme: theme2
8996
- }) => theme2.click.sidebar.navigation.item.default.space.gap);
8997
9063
  const IconWrapper$3 = ({
8998
9064
  icon,
8999
9065
  iconDir = "start",
@@ -9002,10 +9068,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
9002
9068
  height,
9003
9069
  children,
9004
9070
  ellipsisContent = true,
9071
+ gap = "sm",
9005
9072
  ...props
9006
9073
  }) => {
9007
9074
  const TextWrapper2 = ellipsisContent ? EllipsisContent : "div";
9008
- return /* @__PURE__ */ jsxRuntime.jsxs(LabelContainer$1, { $hasIcon: typeof icon === "string", $iconDir: iconDir, ...props, children: [
9075
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container, { orientation: "horizontal", gap, ...props, children: [
9009
9076
  icon && iconDir === "start" && /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: size2, width, height }),
9010
9077
  /* @__PURE__ */ jsxRuntime.jsx(TextWrapper2, { "data-testid": `${ellipsisContent ? "ellipsed" : "normal"}-icon-wrapper-text`, children }),
9011
9078
  icon && iconDir === "end" && /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: size2, width, height })
@@ -9564,7 +9631,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
9564
9631
  ...delegated
9565
9632
  }) => {
9566
9633
  const [isVisible, setIsVisible] = React.useState(true);
9567
- return isVisible ? /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$d, { $size: size2, $state: state, $type: type, "data-testid": "click-alert", ...delegated, children: [
9634
+ return isVisible ? /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$c, { $size: size2, $state: state, $type: type, "data-testid": "click-alert", ...delegated, children: [
9568
9635
  dismissible && type === "banner" && /* @__PURE__ */ jsxRuntime.jsx(DismissWrapper$1, {}),
9569
9636
  showIcon && /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$2, { $state: state, $size: size2, $type: type, children: /* @__PURE__ */ jsxRuntime.jsx(StyledIcon, { $size: size2, size: "sm", "aria-hidden": true, name: customIcon || stateIconMap[state] }) }),
9570
9637
  /* @__PURE__ */ jsxRuntime.jsxs(TextWrapper, { $state: state, $size: size2, children: [
@@ -9574,7 +9641,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
9574
9641
  dismissible && /* @__PURE__ */ jsxRuntime.jsx(DismissWrapper$1, { "data-testid": "click-alert-dismiss-button", onClick: () => setIsVisible(false), children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "cross", "aria-label": "close" }) })
9575
9642
  ] }) : null;
9576
9643
  };
9577
- const Wrapper$d = pt.div.withConfig({
9644
+ const Wrapper$c = pt.div.withConfig({
9578
9645
  componentId: "sc-1wvczk0-0"
9579
9646
  })(["display:flex;border-radius:", ";justify-content:", ";overflow:hidden;background-color:", ";color:", ";width:100%;"], ({
9580
9647
  $type,
@@ -10428,7 +10495,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
10428
10495
  font: ${theme2.click.avatar.typography.label[$textSize].hover};
10429
10496
  }
10430
10497
  `);
10431
- const Wrapper$c = pt.div.withConfig({
10498
+ const Wrapper$b = pt.div.withConfig({
10432
10499
  componentId: "sc-471xo0-0"
10433
10500
  })(["display:inline-flex;", ""], ({
10434
10501
  $state = "default",
@@ -10485,7 +10552,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
10485
10552
  onClose,
10486
10553
  ellipsisContent = true,
10487
10554
  ...props
10488
- }) => /* @__PURE__ */ jsxRuntime.jsx(Wrapper$c, { $state: state, $size: size2, $type: type, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(Content$4, { "data-testid": `${ellipsisContent ? "ellipsed" : "normal"}-badge-content`, children: [
10555
+ }) => /* @__PURE__ */ jsxRuntime.jsx(Wrapper$b, { $state: state, $size: size2, $type: type, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(Content$4, { "data-testid": `${ellipsisContent ? "ellipsed" : "normal"}-badge-content`, children: [
10489
10556
  /* @__PURE__ */ jsxRuntime.jsx(BadgeContent, { as: IconWrapper$3, icon, iconDir, size: size2, $state: state, ellipsisContent, children: text2 }),
10490
10557
  dismissible && /* @__PURE__ */ jsxRuntime.jsx(SvgContainer, { name: "cross", $state: state, as: SvgImage, onClick: onClose, "aria-label": "close" })
10491
10558
  ] }) });
@@ -10500,11 +10567,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
10500
10567
  state = "default",
10501
10568
  title = "Title",
10502
10569
  ...props
10503
- }) => /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$b, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, ...props, children: [
10570
+ }) => /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$a, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, ...props, children: [
10504
10571
  /* @__PURE__ */ jsxRuntime.jsx(Label, { $state: state, $size: size2, children: label }),
10505
10572
  /* @__PURE__ */ jsxRuntime.jsx(Title$3, { $state: state, $size: size2, children: title })
10506
10573
  ] });
10507
- const Wrapper$b = pt.div.withConfig({
10574
+ const Wrapper$a = pt.div.withConfig({
10508
10575
  componentId: "sc-u5029o-0"
10509
10576
  })(["display:flex;justify-content:center;box-sizing:border-box;", ""], ({
10510
10577
  $fillWidth = false,
@@ -10731,7 +10798,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
10731
10798
  })(["display:flex;flex-direction:column;align-self:start;gap:", ";flex:1;width:100%;"], ({
10732
10799
  theme: theme2
10733
10800
  }) => theme2.click.card.horizontal.space.gap);
10734
- const Wrapper$a = pt.div.withConfig({
10801
+ const Wrapper$9 = pt.div.withConfig({
10735
10802
  componentId: "sc-1qnbjoa-2"
10736
10803
  })(["display:inline-flex;width:100%;max-width:100%;align-items:center;justify-content:flex-start;", ""], ({
10737
10804
  theme: theme2,
@@ -10837,7 +10904,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
10837
10904
  window.open(infoUrl, "_blank");
10838
10905
  }
10839
10906
  };
10840
- return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$a, { $disabled: disabled, $isSelected: isSelected, $isSelectable: isSelectable, $color: color, tabIndex: 0, onClick: handleClick, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(ContentWrapper, { children: [
10907
+ return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$9, { $disabled: disabled, $isSelected: isSelected, $isSelectable: isSelectable, $color: color, tabIndex: 0, onClick: handleClick, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(ContentWrapper, { children: [
10841
10908
  /* @__PURE__ */ jsxRuntime.jsxs(IconTextContentWrapper, { children: [
10842
10909
  icon && /* @__PURE__ */ jsxRuntime.jsx(CardIcon$1, { name: icon, "aria-hidden": true }),
10843
10910
  /* @__PURE__ */ jsxRuntime.jsxs(Container, { padding: "none", orientation: "vertical", children: [
@@ -10905,80 +10972,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
10905
10972
  }) => $fillWidth && "width: 100%");
10906
10973
  _Text.displayName = "Text";
10907
10974
  const Text = React.forwardRef(_Text);
10908
- const _Container = ({
10909
- component,
10910
- alignItems,
10911
- children,
10912
- fillWidth = true,
10913
- gap = "none",
10914
- grow,
10915
- shrink,
10916
- isResponsive,
10917
- justifyContent = "start",
10918
- maxWidth,
10919
- minWidth,
10920
- orientation = "horizontal",
10921
- padding = "none",
10922
- wrap = "nowrap",
10923
- fillHeight,
10924
- maxHeight,
10925
- minHeight,
10926
- overflow,
10927
- ...props
10928
- }, ref) => {
10929
- return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$9, { ref, as: component ?? "div", $alignItems: alignItems ?? (orientation === "vertical" ? "start" : "center"), $fillWidth: fillWidth, $gapSize: gap, $grow: grow, $shrink: shrink, $isResponsive: isResponsive, $justifyContent: justifyContent, $maxWidth: maxWidth, $minWidth: minWidth, $orientation: orientation, $paddingSize: padding, $wrap: wrap, $fillHeight: fillHeight, $maxHeight: maxHeight, $minHeight: minHeight, $overflow: overflow, "data-testid": "container", ...props, children });
10930
- };
10931
- const Wrapper$9 = pt.div.withConfig({
10932
- componentId: "sc-bcplth-0"
10933
- })(["display:flex;", " ", " ", " flex-wrap:", ";gap:", ";max-width:", ";min-width:", ";padding:", ";width:", ";flex-direction:", ";align-items:", ";justify-content:", ";@media (max-width:", "){width:", ";max-width:", ";flex-direction:", ";}"], ({
10934
- $grow,
10935
- $shrink
10936
- }) => `
10937
- ${$grow && `flex: ${$grow}`};
10938
- ${$shrink && `flex-shrink: ${$shrink}`};
10939
- `, ({
10940
- $fillHeight,
10941
- $maxHeight,
10942
- $minHeight
10943
- }) => `
10944
- ${$fillHeight && "height: 100%"};
10945
- ${$maxHeight && `max-height: ${$maxHeight}`};
10946
- ${$minHeight && `min-height: ${$minHeight}`};
10947
- `, ({
10948
- $overflow
10949
- }) => `
10950
- ${$overflow && `overflow: ${$overflow}`};
10951
- `, ({
10952
- $wrap = "nowrap"
10953
- }) => $wrap, ({
10954
- theme: theme2,
10955
- $gapSize
10956
- }) => theme2.click.container.gap[$gapSize], ({
10957
- $maxWidth
10958
- }) => $maxWidth ?? "none", ({
10959
- $minWidth
10960
- }) => $minWidth ?? "auto", ({
10961
- theme: theme2,
10962
- $paddingSize
10963
- }) => theme2.click.container.space[$paddingSize], ({
10964
- $fillWidth = true
10965
- }) => $fillWidth === true ? "100%" : "auto", ({
10966
- $orientation = "horizontal"
10967
- }) => $orientation === "horizontal" ? "row" : "column", ({
10968
- $alignItems = "center"
10969
- }) => $alignItems, ({
10970
- $justifyContent = "left"
10971
- }) => $justifyContent === "start" ? "start" : `${$justifyContent}`, ({
10972
- theme: theme2
10973
- }) => theme2.breakpoint.sizes.md, ({
10974
- $isResponsive = true,
10975
- $fillWidth = true
10976
- }) => $isResponsive === true ? "100%" : $fillWidth === true ? "100%" : "auto", ({
10977
- $isResponsive = true
10978
- }) => $isResponsive === true ? "none" : "auto", ({
10979
- $isResponsive = true
10980
- }) => $isResponsive === true ? "column" : "auto");
10981
- const Container = React.forwardRef(_Container);
10982
10975
  const TopBadgeWrapper = pt(Container).withConfig({
10983
10976
  componentId: "sc-1d5pqpo-0"
10984
10977
  })(["position:relative;"]);
@@ -35850,6 +35843,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
35850
35843
  color: ${theme2.click.genericMenu.button.color.label.default};
35851
35844
  cursor: ${$clickable ? "pointer" : "default"}
35852
35845
  `);
35846
+ const SelectItemDescriptionText = pt.div.withConfig({
35847
+ componentId: "sc-oudbwg-14"
35848
+ })(["white-space:normal;[data-disabled] &,[disabled] &{color:inherit;}", " &{display:none;}"], StyledSelectTrigger);
35853
35849
  const OptionContext = React.createContext({
35854
35850
  search: "",
35855
35851
  selectedValues: [],
@@ -39135,7 +39131,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39135
39131
  children,
39136
39132
  label
39137
39133
  } = valueNode ?? {};
39138
- return /* @__PURE__ */ jsxRuntime.jsx(SelectValueContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, children: label ?? children ?? value }) });
39134
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectValueContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ?? children ?? value }) });
39139
39135
  };
39140
39136
  const useOption = () => {
39141
39137
  const result = React.useContext(OptionContext);
@@ -39394,14 +39390,11 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39394
39390
  options: itemList = [],
39395
39391
  ...groupProps
39396
39392
  } = props2;
39397
- return /* @__PURE__ */ jsxRuntime.jsx(SelectGroup, { ...groupProps, children: itemList.map(({
39398
- label: label2,
39399
- ...itemProps
39400
- }, itemIndex) => {
39393
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectGroup, { ...groupProps, children: itemList.map((itemProps, itemIndex) => {
39401
39394
  if (checkbox) {
39402
- return /* @__PURE__ */ jsxRuntime.jsx(MultiSelectCheckboxItem, { ...itemProps, children: label2 }, `select-${id}-group-${index2}-item-${itemIndex}`);
39395
+ return /* @__PURE__ */ jsxRuntime.jsx(MultiSelectCheckboxItem, { ...itemProps }, `select-${id}-group-${index2}-item-${itemIndex}`);
39403
39396
  }
39404
- return /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { ...itemProps, children: label2 }, `select-${id}-group-${index2}-item-${itemIndex}`);
39397
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { ...itemProps }, `select-${id}-group-${index2}-item-${itemIndex}`);
39405
39398
  }) }, `select-${id}-group-${index2}`);
39406
39399
  } else {
39407
39400
  if (checkbox) {
@@ -39448,6 +39441,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39448
39441
  disabled = false,
39449
39442
  children,
39450
39443
  label,
39444
+ description,
39451
39445
  separator,
39452
39446
  onSelect: onSelectProp,
39453
39447
  value = "",
@@ -39485,7 +39479,10 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39485
39479
  const isChecked = selectedValues.includes(value);
39486
39480
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
39487
39481
  /* @__PURE__ */ jsxRuntime.jsxs(GenericMenuItem, { ...props, "data-value": value, onClick: onSelectValue, onMouseOver, ref: forwardedRef, "data-state": isChecked ? "checked" : "unchecked", "data-disabled": disabled ? true : void 0, "data-highlighted": highlighted == value ? "true" : void 0, "cui-select-item": "", children: [
39488
- /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, children: label ?? children }),
39482
+ /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
39483
+ label,
39484
+ description && /* @__PURE__ */ jsxRuntime.jsx(SelectItemDescription, { children: description })
39485
+ ] }) : children }),
39489
39486
  /* @__PURE__ */ jsxRuntime.jsx(CheckIcon$1, { as: SvgImage, name: "check", size: "sm", $showCheck: isChecked })
39490
39487
  ] }),
39491
39488
  separator && /* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "sm" })
@@ -39498,6 +39495,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39498
39495
  icon,
39499
39496
  iconDir = "end",
39500
39497
  label,
39498
+ description,
39501
39499
  onMouseOver: onMouseOverProp,
39502
39500
  onSelect: onSelectProp,
39503
39501
  separator,
@@ -39512,7 +39510,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39512
39510
  selectedValues,
39513
39511
  onSelect
39514
39512
  } = useOption();
39515
- const handleSelect = (evt) => {
39513
+ const handleMenuItemClick = (evt) => {
39516
39514
  if (!disabled) {
39517
39515
  onSelect(value, void 0, evt);
39518
39516
  if (typeof onSelectProp === "function") {
@@ -39520,15 +39518,6 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39520
39518
  }
39521
39519
  }
39522
39520
  };
39523
- const handleMenuItemClick = (evt) => {
39524
- if (evt.target !== evt.currentTarget) {
39525
- return;
39526
- }
39527
- handleSelect(evt);
39528
- };
39529
- const handleCheckboxClick = (evt) => {
39530
- handleSelect(evt);
39531
- };
39532
39521
  const handleMenuItemMouseOver = (e) => {
39533
39522
  if (onMouseOverProp) {
39534
39523
  onMouseOverProp(e);
@@ -39542,27 +39531,24 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39542
39531
  }
39543
39532
  const isChecked = selectedValues.includes(value);
39544
39533
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
39545
- /* @__PURE__ */ jsxRuntime.jsxs(GenericMenuItem, { ...props, "data-value": value, onClick: handleMenuItemClick, onMouseOver: handleMenuItemMouseOver, ref: forwardedRef, "data-disabled": disabled ? true : void 0, "data-highlighted": highlighted == value ? "true" : void 0, "data-testid": `multi-select-checkbox-${value}`, "cui-select-item": "", children: [
39546
- icon && iconDir === "start" && /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
39547
- display: "flex",
39548
- justifyContent: "center"
39549
- }, children: [
39550
- /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: "sm" }),
39551
- label
39552
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
39553
- display: "flex",
39554
- justifyContent: "center"
39555
- }, children: [
39556
- /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: "sm" }),
39557
- children
39558
- ] }), onClick: handleCheckboxClick, variant: variant ?? "default" }),
39559
- icon && iconDir === "end" && /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir: "end", children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" }) }),
39560
- !icon && /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" })
39561
- ] }),
39534
+ /* @__PURE__ */ jsxRuntime.jsx(GenericMenuItem, { ...props, "data-value": value, onClick: handleMenuItemClick, onMouseOver: handleMenuItemMouseOver, ref: forwardedRef, "data-disabled": disabled ? true : void 0, "data-highlighted": highlighted == value ? "true" : void 0, "data-testid": `multi-select-checkbox-${value}`, "cui-select-item": "", children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { orientation: "horizontal", gap: "xs", children: [
39535
+ /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, variant: variant ?? "default" }),
39536
+ /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
39537
+ label,
39538
+ description && /* @__PURE__ */ jsxRuntime.jsx(SelectItemDescription, { children: description })
39539
+ ] }) : children })
39540
+ ] }) }),
39562
39541
  separator && /* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "sm" })
39563
39542
  ] });
39564
39543
  });
39565
39544
  MultiSelectCheckboxItem.displayName = "Select.Item";
39545
+ const SelectItemDescription = React.forwardRef(({
39546
+ children,
39547
+ ...props
39548
+ }) => {
39549
+ return /* @__PURE__ */ jsxRuntime.jsx(Text, { component: SelectItemDescriptionText, color: "muted", ...props, children });
39550
+ });
39551
+ SelectItemDescription.displayName = "Select.ItemDescription";
39566
39552
  const Select = ({
39567
39553
  value: valueProp,
39568
39554
  defaultValue,
@@ -39610,6 +39596,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39610
39596
  };
39611
39597
  Select.Group = SelectGroup;
39612
39598
  Select.Item = SelectItem;
39599
+ Select.ItemDescription = SelectItemDescription;
39613
39600
  const MultiSelect = ({
39614
39601
  value: valueProp,
39615
39602
  defaultValue,
@@ -39655,6 +39642,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39655
39642
  };
39656
39643
  MultiSelect.Group = SelectGroup;
39657
39644
  MultiSelect.Item = SelectItem;
39645
+ MultiSelect.ItemDescription = SelectItemDescription;
39658
39646
  const CheckboxMultiSelect = ({
39659
39647
  value: valueProp,
39660
39648
  defaultValue,
@@ -39701,6 +39689,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39701
39689
  };
39702
39690
  CheckboxMultiSelect.Group = SelectGroup;
39703
39691
  CheckboxMultiSelect.Item = MultiSelectCheckboxItem;
39692
+ CheckboxMultiSelect.ItemDescription = SelectItemDescription;
39704
39693
  const $89eedd556c436f6a$var$DEFAULT_ORIENTATION = "horizontal";
39705
39694
  const $89eedd556c436f6a$var$ORIENTATIONS = [
39706
39695
  "horizontal",
@@ -42433,7 +42422,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
42433
42422
  `);
42434
42423
  const ToastDescriptionContainer = pt.div.withConfig({
42435
42424
  componentId: "sc-tmc8vl-3"
42436
- })(["display:flex;justify-content:space-between;width:100%;align-items:flex-end;gap:inherit;", ""], ({
42425
+ })(["display:flex;flex-direction:column;justify-content:space-between;width:100%;align-items:flex-end;gap:inherit;", ""], ({
42437
42426
  theme: theme2
42438
42427
  }) => `
42439
42428
  font: ${theme2.click.toast.typography.title.default};
@@ -42477,7 +42466,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
42477
42466
  actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ToastDescriptionContent, { children: actions.map(({
42478
42467
  altText,
42479
42468
  ...btnProps
42480
- }) => /* @__PURE__ */ jsxRuntime.jsx($054eb8030ebde76e$export$e19cd5f9376f8cee, { altText, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { ...btnProps }) })) })
42469
+ }) => /* @__PURE__ */ jsxRuntime.jsx($054eb8030ebde76e$export$e19cd5f9376f8cee, { altText, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { ...btnProps }) }) }, altText)) })
42481
42470
  ] })
42482
42471
  ] });
42483
42472
  };
@@ -42502,13 +42491,21 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
42502
42491
  align = "end",
42503
42492
  ...props
42504
42493
  }) => {
42505
- const [toasts, setToasts] = React.useState(/* @__PURE__ */ new Map());
42494
+ const [toasts, setToasts] = React.useState({
42495
+ start: /* @__PURE__ */ new Map(),
42496
+ end: /* @__PURE__ */ new Map()
42497
+ });
42506
42498
  React.useEffect(() => {
42507
42499
  const listener = (toast) => {
42508
42500
  setToasts((currentToasts) => {
42509
- const newMap = new Map(currentToasts);
42510
- newMap.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42511
- return newMap;
42501
+ const alignment = toast.align ?? "end";
42502
+ const newToasts = {
42503
+ ...currentToasts
42504
+ };
42505
+ const map2 = new Map(newToasts[alignment]);
42506
+ map2.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42507
+ newToasts[alignment] = map2;
42508
+ return newToasts;
42512
42509
  });
42513
42510
  };
42514
42511
  toastsEventEmitter.on(listener);
@@ -42517,28 +42514,36 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
42517
42514
  const onClose = (id) => (open2) => {
42518
42515
  if (!open2) {
42519
42516
  setToasts((currentToasts) => {
42520
- const newMap = new Map(currentToasts);
42521
- newMap.delete(id);
42522
- return newMap;
42517
+ const newToasts = {
42518
+ ...currentToasts
42519
+ };
42520
+ const map2 = new Map(newToasts[align]);
42521
+ map2.delete(id);
42522
+ newToasts[align] = map2;
42523
+ return newToasts;
42523
42524
  });
42524
42525
  }
42525
42526
  };
42526
42527
  const value = {
42527
- createToast: (toast) => {
42528
+ createToast: (toast, toastAlign = align) => {
42528
42529
  setToasts((currentToasts) => {
42529
- const newMap = new Map(currentToasts);
42530
- newMap.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42531
- return newMap;
42530
+ const newToasts = {
42531
+ ...currentToasts
42532
+ };
42533
+ const map2 = new Map(newToasts[toastAlign]);
42534
+ map2.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42535
+ newToasts[toastAlign] = map2;
42536
+ return newToasts;
42532
42537
  });
42533
42538
  }
42534
42539
  };
42535
42540
  return /* @__PURE__ */ jsxRuntime.jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: align === "start" ? "left" : "right", ...props, children: [
42536
42541
  /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
42537
42542
  children,
42538
- Array.from(toasts).map(([id, toast]) => /* @__PURE__ */ jsxRuntime.jsx(Toast, { ...toast, onClose: onClose(id) }, id))
42543
+ Array.from(toasts[align]).map(([id, toast]) => /* @__PURE__ */ jsxRuntime.jsx(Toast, { ...toast, onClose: onClose(id) }, id))
42539
42544
  ] }),
42540
42545
  /* @__PURE__ */ jsxRuntime.jsx(Viewport, { $align: align })
42541
- ] });
42546
+ ] }, `toast-provider-${align}`);
42542
42547
  };
42543
42548
  function listCacheClear$1() {
42544
42549
  this.__data__ = [];
@@ -52070,6 +52075,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
52070
52075
  exports2.TextAreaField = TextAreaField;
52071
52076
  exports2.TextField = TextField;
52072
52077
  exports2.Title = Title$2;
52078
+ exports2.Toast = Toast;
52073
52079
  exports2.ToastProvider = ToastProvider;
52074
52080
  exports2.Tooltip = Tooltip;
52075
52081
  exports2.VerticalStepper = VerticalStepper;