@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.
@@ -8947,6 +8947,80 @@ const GenericMenuItem = pt.div.withConfig({
8947
8947
  const PopoverArrow = (props) => {
8948
8948
  return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "10", viewBox: "0 0 30 10", fill: "none", ...props, children: /* @__PURE__ */ jsx("path", { d: "M0 -1L15 9L30 -1", strokeWidth: "1.5", strokeLinejoin: "round" }) });
8949
8949
  };
8950
+ const _Container = ({
8951
+ component,
8952
+ alignItems,
8953
+ children,
8954
+ fillWidth = true,
8955
+ gap = "none",
8956
+ grow,
8957
+ shrink,
8958
+ isResponsive,
8959
+ justifyContent = "start",
8960
+ maxWidth,
8961
+ minWidth,
8962
+ orientation = "horizontal",
8963
+ padding = "none",
8964
+ wrap = "nowrap",
8965
+ fillHeight,
8966
+ maxHeight,
8967
+ minHeight,
8968
+ overflow,
8969
+ ...props
8970
+ }, ref) => {
8971
+ return /* @__PURE__ */ 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 });
8972
+ };
8973
+ const Wrapper$d = pt.div.withConfig({
8974
+ componentId: "sc-bcplth-0"
8975
+ })(["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:", ";}"], ({
8976
+ $grow,
8977
+ $shrink
8978
+ }) => `
8979
+ ${$grow && `flex: ${$grow}`};
8980
+ ${$shrink && `flex-shrink: ${$shrink}`};
8981
+ `, ({
8982
+ $fillHeight,
8983
+ $maxHeight,
8984
+ $minHeight
8985
+ }) => `
8986
+ ${$fillHeight && "height: 100%"};
8987
+ ${$maxHeight && `max-height: ${$maxHeight}`};
8988
+ ${$minHeight && `min-height: ${$minHeight}`};
8989
+ `, ({
8990
+ $overflow
8991
+ }) => `
8992
+ ${$overflow && `overflow: ${$overflow}`};
8993
+ `, ({
8994
+ $wrap = "nowrap"
8995
+ }) => $wrap, ({
8996
+ theme: theme2,
8997
+ $gapSize
8998
+ }) => theme2.click.container.gap[$gapSize], ({
8999
+ $maxWidth
9000
+ }) => $maxWidth ?? "none", ({
9001
+ $minWidth
9002
+ }) => $minWidth ?? "auto", ({
9003
+ theme: theme2,
9004
+ $paddingSize
9005
+ }) => theme2.click.container.space[$paddingSize], ({
9006
+ $fillWidth = true
9007
+ }) => $fillWidth === true ? "100%" : "auto", ({
9008
+ $orientation = "horizontal"
9009
+ }) => $orientation === "horizontal" ? "row" : "column", ({
9010
+ $alignItems = "center"
9011
+ }) => $alignItems, ({
9012
+ $justifyContent = "left"
9013
+ }) => $justifyContent === "start" ? "start" : `${$justifyContent}`, ({
9014
+ theme: theme2
9015
+ }) => theme2.breakpoint.sizes.md, ({
9016
+ $isResponsive = true,
9017
+ $fillWidth = true
9018
+ }) => $isResponsive === true ? "100%" : $fillWidth === true ? "100%" : "auto", ({
9019
+ $isResponsive = true
9020
+ }) => $isResponsive === true ? "none" : "auto", ({
9021
+ $isResponsive = true
9022
+ }) => $isResponsive === true ? "column" : "auto");
9023
+ const Container = forwardRef(_Container);
8950
9024
  const mergeRefs = (refs) => (value) => {
8951
9025
  refs.forEach((ref) => {
8952
9026
  if (typeof ref === "function") {
@@ -8970,14 +9044,6 @@ const _EllipsisContent = ({
8970
9044
  }]), ...props });
8971
9045
  };
8972
9046
  const EllipsisContent = forwardRef(_EllipsisContent);
8973
- const LabelContainer$1 = pt.div.withConfig({
8974
- componentId: "sc-1likhxd-0"
8975
- })(["display:grid;grid-template-columns:", ";align-items:center;justify-content:flex-start;width:100%;width:-webkit-fill-available;width:fill-available;width:stretch;gap:", ";"], ({
8976
- $hasIcon,
8977
- $iconDir
8978
- }) => `${$hasIcon && $iconDir === "start" ? "auto " : ""}1fr${$hasIcon && $iconDir === "end" ? " auto" : ""}`, ({
8979
- theme: theme2
8980
- }) => theme2.click.sidebar.navigation.item.default.space.gap);
8981
9047
  const IconWrapper$3 = ({
8982
9048
  icon,
8983
9049
  iconDir = "start",
@@ -8986,10 +9052,11 @@ const IconWrapper$3 = ({
8986
9052
  height,
8987
9053
  children,
8988
9054
  ellipsisContent = true,
9055
+ gap = "sm",
8989
9056
  ...props
8990
9057
  }) => {
8991
9058
  const TextWrapper2 = ellipsisContent ? EllipsisContent : "div";
8992
- return /* @__PURE__ */ jsxs(LabelContainer$1, { $hasIcon: typeof icon === "string", $iconDir: iconDir, ...props, children: [
9059
+ return /* @__PURE__ */ jsxs(Container, { orientation: "horizontal", gap, ...props, children: [
8993
9060
  icon && iconDir === "start" && /* @__PURE__ */ jsx(SvgImage, { name: icon, size: size2, width, height }),
8994
9061
  /* @__PURE__ */ jsx(TextWrapper2, { "data-testid": `${ellipsisContent ? "ellipsed" : "normal"}-icon-wrapper-text`, children }),
8995
9062
  icon && iconDir === "end" && /* @__PURE__ */ jsx(SvgImage, { name: icon, size: size2, width, height })
@@ -9548,7 +9615,7 @@ const Alert = ({
9548
9615
  ...delegated
9549
9616
  }) => {
9550
9617
  const [isVisible, setIsVisible] = useState(true);
9551
- return isVisible ? /* @__PURE__ */ jsxs(Wrapper$d, { $size: size2, $state: state, $type: type, "data-testid": "click-alert", ...delegated, children: [
9618
+ return isVisible ? /* @__PURE__ */ jsxs(Wrapper$c, { $size: size2, $state: state, $type: type, "data-testid": "click-alert", ...delegated, children: [
9552
9619
  dismissible && type === "banner" && /* @__PURE__ */ jsx(DismissWrapper$1, {}),
9553
9620
  showIcon && /* @__PURE__ */ jsx(IconWrapper$2, { $state: state, $size: size2, $type: type, children: /* @__PURE__ */ jsx(StyledIcon, { $size: size2, size: "sm", "aria-hidden": true, name: customIcon || stateIconMap[state] }) }),
9554
9621
  /* @__PURE__ */ jsxs(TextWrapper, { $state: state, $size: size2, children: [
@@ -9558,7 +9625,7 @@ const Alert = ({
9558
9625
  dismissible && /* @__PURE__ */ jsx(DismissWrapper$1, { "data-testid": "click-alert-dismiss-button", onClick: () => setIsVisible(false), children: /* @__PURE__ */ jsx(SvgImage, { name: "cross", "aria-label": "close" }) })
9559
9626
  ] }) : null;
9560
9627
  };
9561
- const Wrapper$d = pt.div.withConfig({
9628
+ const Wrapper$c = pt.div.withConfig({
9562
9629
  componentId: "sc-1wvczk0-0"
9563
9630
  })(["display:flex;border-radius:", ";justify-content:", ";overflow:hidden;background-color:", ";color:", ";width:100%;"], ({
9564
9631
  $type,
@@ -10412,7 +10479,7 @@ const StyledFallback = pt($cddcb0b647441e34$export$fb8d7f40caaeea67).withConfig(
10412
10479
  font: ${theme2.click.avatar.typography.label[$textSize].hover};
10413
10480
  }
10414
10481
  `);
10415
- const Wrapper$c = pt.div.withConfig({
10482
+ const Wrapper$b = pt.div.withConfig({
10416
10483
  componentId: "sc-471xo0-0"
10417
10484
  })(["display:inline-flex;", ""], ({
10418
10485
  $state = "default",
@@ -10469,7 +10536,7 @@ const Badge = ({
10469
10536
  onClose,
10470
10537
  ellipsisContent = true,
10471
10538
  ...props
10472
- }) => /* @__PURE__ */ jsx(Wrapper$c, { $state: state, $size: size2, $type: type, ...props, children: /* @__PURE__ */ jsxs(Content$4, { "data-testid": `${ellipsisContent ? "ellipsed" : "normal"}-badge-content`, children: [
10539
+ }) => /* @__PURE__ */ jsx(Wrapper$b, { $state: state, $size: size2, $type: type, ...props, children: /* @__PURE__ */ jsxs(Content$4, { "data-testid": `${ellipsisContent ? "ellipsed" : "normal"}-badge-content`, children: [
10473
10540
  /* @__PURE__ */ jsx(BadgeContent, { as: IconWrapper$3, icon, iconDir, size: size2, $state: state, ellipsisContent, children: text2 }),
10474
10541
  dismissible && /* @__PURE__ */ jsx(SvgContainer, { name: "cross", $state: state, as: SvgImage, onClick: onClose, "aria-label": "close" })
10475
10542
  ] }) });
@@ -10484,11 +10551,11 @@ const BigStat = ({
10484
10551
  state = "default",
10485
10552
  title = "Title",
10486
10553
  ...props
10487
- }) => /* @__PURE__ */ jsxs(Wrapper$b, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, ...props, children: [
10554
+ }) => /* @__PURE__ */ jsxs(Wrapper$a, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, ...props, children: [
10488
10555
  /* @__PURE__ */ jsx(Label, { $state: state, $size: size2, children: label }),
10489
10556
  /* @__PURE__ */ jsx(Title$3, { $state: state, $size: size2, children: title })
10490
10557
  ] });
10491
- const Wrapper$b = pt.div.withConfig({
10558
+ const Wrapper$a = pt.div.withConfig({
10492
10559
  componentId: "sc-u5029o-0"
10493
10560
  })(["display:flex;justify-content:center;box-sizing:border-box;", ""], ({
10494
10561
  $fillWidth = false,
@@ -10715,7 +10782,7 @@ const Description = pt.div.withConfig({
10715
10782
  })(["display:flex;flex-direction:column;align-self:start;gap:", ";flex:1;width:100%;"], ({
10716
10783
  theme: theme2
10717
10784
  }) => theme2.click.card.horizontal.space.gap);
10718
- const Wrapper$a = pt.div.withConfig({
10785
+ const Wrapper$9 = pt.div.withConfig({
10719
10786
  componentId: "sc-1qnbjoa-2"
10720
10787
  })(["display:inline-flex;width:100%;max-width:100%;align-items:center;justify-content:flex-start;", ""], ({
10721
10788
  theme: theme2,
@@ -10821,7 +10888,7 @@ const CardHorizontal = ({
10821
10888
  window.open(infoUrl, "_blank");
10822
10889
  }
10823
10890
  };
10824
- return /* @__PURE__ */ jsx(Wrapper$a, { $disabled: disabled, $isSelected: isSelected, $isSelectable: isSelectable, $color: color, tabIndex: 0, onClick: handleClick, ...props, children: /* @__PURE__ */ jsxs(ContentWrapper, { children: [
10891
+ return /* @__PURE__ */ jsx(Wrapper$9, { $disabled: disabled, $isSelected: isSelected, $isSelectable: isSelectable, $color: color, tabIndex: 0, onClick: handleClick, ...props, children: /* @__PURE__ */ jsxs(ContentWrapper, { children: [
10825
10892
  /* @__PURE__ */ jsxs(IconTextContentWrapper, { children: [
10826
10893
  icon && /* @__PURE__ */ jsx(CardIcon$1, { name: icon, "aria-hidden": true }),
10827
10894
  /* @__PURE__ */ jsxs(Container, { padding: "none", orientation: "vertical", children: [
@@ -10889,80 +10956,6 @@ const CuiText = pt.p.withConfig({
10889
10956
  }) => $fillWidth && "width: 100%");
10890
10957
  _Text.displayName = "Text";
10891
10958
  const Text = forwardRef(_Text);
10892
- const _Container = ({
10893
- component,
10894
- alignItems,
10895
- children,
10896
- fillWidth = true,
10897
- gap = "none",
10898
- grow,
10899
- shrink,
10900
- isResponsive,
10901
- justifyContent = "start",
10902
- maxWidth,
10903
- minWidth,
10904
- orientation = "horizontal",
10905
- padding = "none",
10906
- wrap = "nowrap",
10907
- fillHeight,
10908
- maxHeight,
10909
- minHeight,
10910
- overflow,
10911
- ...props
10912
- }, ref) => {
10913
- return /* @__PURE__ */ 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 });
10914
- };
10915
- const Wrapper$9 = pt.div.withConfig({
10916
- componentId: "sc-bcplth-0"
10917
- })(["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:", ";}"], ({
10918
- $grow,
10919
- $shrink
10920
- }) => `
10921
- ${$grow && `flex: ${$grow}`};
10922
- ${$shrink && `flex-shrink: ${$shrink}`};
10923
- `, ({
10924
- $fillHeight,
10925
- $maxHeight,
10926
- $minHeight
10927
- }) => `
10928
- ${$fillHeight && "height: 100%"};
10929
- ${$maxHeight && `max-height: ${$maxHeight}`};
10930
- ${$minHeight && `min-height: ${$minHeight}`};
10931
- `, ({
10932
- $overflow
10933
- }) => `
10934
- ${$overflow && `overflow: ${$overflow}`};
10935
- `, ({
10936
- $wrap = "nowrap"
10937
- }) => $wrap, ({
10938
- theme: theme2,
10939
- $gapSize
10940
- }) => theme2.click.container.gap[$gapSize], ({
10941
- $maxWidth
10942
- }) => $maxWidth ?? "none", ({
10943
- $minWidth
10944
- }) => $minWidth ?? "auto", ({
10945
- theme: theme2,
10946
- $paddingSize
10947
- }) => theme2.click.container.space[$paddingSize], ({
10948
- $fillWidth = true
10949
- }) => $fillWidth === true ? "100%" : "auto", ({
10950
- $orientation = "horizontal"
10951
- }) => $orientation === "horizontal" ? "row" : "column", ({
10952
- $alignItems = "center"
10953
- }) => $alignItems, ({
10954
- $justifyContent = "left"
10955
- }) => $justifyContent === "start" ? "start" : `${$justifyContent}`, ({
10956
- theme: theme2
10957
- }) => theme2.breakpoint.sizes.md, ({
10958
- $isResponsive = true,
10959
- $fillWidth = true
10960
- }) => $isResponsive === true ? "100%" : $fillWidth === true ? "100%" : "auto", ({
10961
- $isResponsive = true
10962
- }) => $isResponsive === true ? "none" : "auto", ({
10963
- $isResponsive = true
10964
- }) => $isResponsive === true ? "column" : "auto");
10965
- const Container = forwardRef(_Container);
10966
10959
  const TopBadgeWrapper = pt(Container).withConfig({
10967
10960
  componentId: "sc-1d5pqpo-0"
10968
10961
  })(["position:relative;"]);
@@ -35834,6 +35827,9 @@ const SelectNoDataContainer = pt.div.withConfig({
35834
35827
  color: ${theme2.click.genericMenu.button.color.label.default};
35835
35828
  cursor: ${$clickable ? "pointer" : "default"}
35836
35829
  `);
35830
+ const SelectItemDescriptionText = pt.div.withConfig({
35831
+ componentId: "sc-oudbwg-14"
35832
+ })(["white-space:normal;[data-disabled] &,[disabled] &{color:inherit;}", " &{display:none;}"], StyledSelectTrigger);
35837
35833
  const OptionContext = createContext({
35838
35834
  search: "",
35839
35835
  selectedValues: [],
@@ -39119,7 +39115,7 @@ const SingleSelectValue = ({
39119
39115
  children,
39120
39116
  label
39121
39117
  } = valueNode ?? {};
39122
- return /* @__PURE__ */ jsx(SelectValueContainer, { children: /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, children: label ?? children ?? value }) });
39118
+ return /* @__PURE__ */ jsx(SelectValueContainer, { children: /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ?? children ?? value }) });
39123
39119
  };
39124
39120
  const useOption = () => {
39125
39121
  const result = useContext(OptionContext);
@@ -39378,14 +39374,11 @@ const InternalSelect = ({
39378
39374
  options: itemList = [],
39379
39375
  ...groupProps
39380
39376
  } = props2;
39381
- return /* @__PURE__ */ jsx(SelectGroup, { ...groupProps, children: itemList.map(({
39382
- label: label2,
39383
- ...itemProps
39384
- }, itemIndex) => {
39377
+ return /* @__PURE__ */ jsx(SelectGroup, { ...groupProps, children: itemList.map((itemProps, itemIndex) => {
39385
39378
  if (checkbox) {
39386
- return /* @__PURE__ */ jsx(MultiSelectCheckboxItem, { ...itemProps, children: label2 }, `select-${id}-group-${index2}-item-${itemIndex}`);
39379
+ return /* @__PURE__ */ jsx(MultiSelectCheckboxItem, { ...itemProps }, `select-${id}-group-${index2}-item-${itemIndex}`);
39387
39380
  }
39388
- return /* @__PURE__ */ jsx(SelectItem, { ...itemProps, children: label2 }, `select-${id}-group-${index2}-item-${itemIndex}`);
39381
+ return /* @__PURE__ */ jsx(SelectItem, { ...itemProps }, `select-${id}-group-${index2}-item-${itemIndex}`);
39389
39382
  }) }, `select-${id}-group-${index2}`);
39390
39383
  } else {
39391
39384
  if (checkbox) {
@@ -39432,6 +39425,7 @@ const SelectItem = forwardRef(({
39432
39425
  disabled = false,
39433
39426
  children,
39434
39427
  label,
39428
+ description,
39435
39429
  separator,
39436
39430
  onSelect: onSelectProp,
39437
39431
  value = "",
@@ -39469,7 +39463,10 @@ const SelectItem = forwardRef(({
39469
39463
  const isChecked = selectedValues.includes(value);
39470
39464
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
39471
39465
  /* @__PURE__ */ 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: [
39472
- /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, children: label ?? children }),
39466
+ /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
39467
+ label,
39468
+ description && /* @__PURE__ */ jsx(SelectItemDescription, { children: description })
39469
+ ] }) : children }),
39473
39470
  /* @__PURE__ */ jsx(CheckIcon$1, { as: SvgImage, name: "check", size: "sm", $showCheck: isChecked })
39474
39471
  ] }),
39475
39472
  separator && /* @__PURE__ */ jsx(Separator, { size: "sm" })
@@ -39482,6 +39479,7 @@ const MultiSelectCheckboxItem = forwardRef(({
39482
39479
  icon,
39483
39480
  iconDir = "end",
39484
39481
  label,
39482
+ description,
39485
39483
  onMouseOver: onMouseOverProp,
39486
39484
  onSelect: onSelectProp,
39487
39485
  separator,
@@ -39496,7 +39494,7 @@ const MultiSelectCheckboxItem = forwardRef(({
39496
39494
  selectedValues,
39497
39495
  onSelect
39498
39496
  } = useOption();
39499
- const handleSelect = (evt) => {
39497
+ const handleMenuItemClick = (evt) => {
39500
39498
  if (!disabled) {
39501
39499
  onSelect(value, void 0, evt);
39502
39500
  if (typeof onSelectProp === "function") {
@@ -39504,15 +39502,6 @@ const MultiSelectCheckboxItem = forwardRef(({
39504
39502
  }
39505
39503
  }
39506
39504
  };
39507
- const handleMenuItemClick = (evt) => {
39508
- if (evt.target !== evt.currentTarget) {
39509
- return;
39510
- }
39511
- handleSelect(evt);
39512
- };
39513
- const handleCheckboxClick = (evt) => {
39514
- handleSelect(evt);
39515
- };
39516
39505
  const handleMenuItemMouseOver = (e) => {
39517
39506
  if (onMouseOverProp) {
39518
39507
  onMouseOverProp(e);
@@ -39526,27 +39515,24 @@ const MultiSelectCheckboxItem = forwardRef(({
39526
39515
  }
39527
39516
  const isChecked = selectedValues.includes(value);
39528
39517
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
39529
- /* @__PURE__ */ 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: [
39530
- icon && iconDir === "start" && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ? /* @__PURE__ */ jsxs("div", { style: {
39531
- display: "flex",
39532
- justifyContent: "center"
39533
- }, children: [
39534
- /* @__PURE__ */ jsx(SvgImage, { name: icon, size: "sm" }),
39535
- label
39536
- ] }) : /* @__PURE__ */ jsxs("div", { style: {
39537
- display: "flex",
39538
- justifyContent: "center"
39539
- }, children: [
39540
- /* @__PURE__ */ jsx(SvgImage, { name: icon, size: "sm" }),
39541
- children
39542
- ] }), onClick: handleCheckboxClick, variant: variant ?? "default" }),
39543
- icon && iconDir === "end" && /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir: "end", children: /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" }) }),
39544
- !icon && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" })
39545
- ] }),
39518
+ /* @__PURE__ */ 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__ */ jsxs(Container, { orientation: "horizontal", gap: "xs", children: [
39519
+ /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, variant: variant ?? "default" }),
39520
+ /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
39521
+ label,
39522
+ description && /* @__PURE__ */ jsx(SelectItemDescription, { children: description })
39523
+ ] }) : children })
39524
+ ] }) }),
39546
39525
  separator && /* @__PURE__ */ jsx(Separator, { size: "sm" })
39547
39526
  ] });
39548
39527
  });
39549
39528
  MultiSelectCheckboxItem.displayName = "Select.Item";
39529
+ const SelectItemDescription = forwardRef(({
39530
+ children,
39531
+ ...props
39532
+ }) => {
39533
+ return /* @__PURE__ */ jsx(Text, { component: SelectItemDescriptionText, color: "muted", ...props, children });
39534
+ });
39535
+ SelectItemDescription.displayName = "Select.ItemDescription";
39550
39536
  const Select = ({
39551
39537
  value: valueProp,
39552
39538
  defaultValue,
@@ -39594,6 +39580,7 @@ const Select = ({
39594
39580
  };
39595
39581
  Select.Group = SelectGroup;
39596
39582
  Select.Item = SelectItem;
39583
+ Select.ItemDescription = SelectItemDescription;
39597
39584
  const MultiSelect = ({
39598
39585
  value: valueProp,
39599
39586
  defaultValue,
@@ -39639,6 +39626,7 @@ const MultiSelect = ({
39639
39626
  };
39640
39627
  MultiSelect.Group = SelectGroup;
39641
39628
  MultiSelect.Item = SelectItem;
39629
+ MultiSelect.ItemDescription = SelectItemDescription;
39642
39630
  const CheckboxMultiSelect = ({
39643
39631
  value: valueProp,
39644
39632
  defaultValue,
@@ -39685,6 +39673,7 @@ const CheckboxMultiSelect = ({
39685
39673
  };
39686
39674
  CheckboxMultiSelect.Group = SelectGroup;
39687
39675
  CheckboxMultiSelect.Item = MultiSelectCheckboxItem;
39676
+ CheckboxMultiSelect.ItemDescription = SelectItemDescription;
39688
39677
  const $89eedd556c436f6a$var$DEFAULT_ORIENTATION = "horizontal";
39689
39678
  const $89eedd556c436f6a$var$ORIENTATIONS = [
39690
39679
  "horizontal",
@@ -42417,7 +42406,7 @@ const ToastHeader = pt($054eb8030ebde76e$export$f99233281efd08a0).withConfig({
42417
42406
  `);
42418
42407
  const ToastDescriptionContainer = pt.div.withConfig({
42419
42408
  componentId: "sc-tmc8vl-3"
42420
- })(["display:flex;justify-content:space-between;width:100%;align-items:flex-end;gap:inherit;", ""], ({
42409
+ })(["display:flex;flex-direction:column;justify-content:space-between;width:100%;align-items:flex-end;gap:inherit;", ""], ({
42421
42410
  theme: theme2
42422
42411
  }) => `
42423
42412
  font: ${theme2.click.toast.typography.title.default};
@@ -42461,7 +42450,7 @@ const Toast = ({
42461
42450
  actions.length > 0 && /* @__PURE__ */ jsx(ToastDescriptionContent, { children: actions.map(({
42462
42451
  altText,
42463
42452
  ...btnProps
42464
- }) => /* @__PURE__ */ jsx($054eb8030ebde76e$export$e19cd5f9376f8cee, { altText, children: /* @__PURE__ */ jsx(Button, { ...btnProps }) })) })
42453
+ }) => /* @__PURE__ */ jsx($054eb8030ebde76e$export$e19cd5f9376f8cee, { altText, asChild: true, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { ...btnProps }) }) }, altText)) })
42465
42454
  ] })
42466
42455
  ] });
42467
42456
  };
@@ -42486,13 +42475,21 @@ const ToastProvider = ({
42486
42475
  align = "end",
42487
42476
  ...props
42488
42477
  }) => {
42489
- const [toasts, setToasts] = useState(/* @__PURE__ */ new Map());
42478
+ const [toasts, setToasts] = useState({
42479
+ start: /* @__PURE__ */ new Map(),
42480
+ end: /* @__PURE__ */ new Map()
42481
+ });
42490
42482
  useEffect(() => {
42491
42483
  const listener = (toast) => {
42492
42484
  setToasts((currentToasts) => {
42493
- const newMap = new Map(currentToasts);
42494
- newMap.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42495
- return newMap;
42485
+ const alignment = toast.align ?? "end";
42486
+ const newToasts = {
42487
+ ...currentToasts
42488
+ };
42489
+ const map2 = new Map(newToasts[alignment]);
42490
+ map2.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42491
+ newToasts[alignment] = map2;
42492
+ return newToasts;
42496
42493
  });
42497
42494
  };
42498
42495
  toastsEventEmitter.on(listener);
@@ -42501,28 +42498,36 @@ const ToastProvider = ({
42501
42498
  const onClose = (id) => (open2) => {
42502
42499
  if (!open2) {
42503
42500
  setToasts((currentToasts) => {
42504
- const newMap = new Map(currentToasts);
42505
- newMap.delete(id);
42506
- return newMap;
42501
+ const newToasts = {
42502
+ ...currentToasts
42503
+ };
42504
+ const map2 = new Map(newToasts[align]);
42505
+ map2.delete(id);
42506
+ newToasts[align] = map2;
42507
+ return newToasts;
42507
42508
  });
42508
42509
  }
42509
42510
  };
42510
42511
  const value = {
42511
- createToast: (toast) => {
42512
+ createToast: (toast, toastAlign = align) => {
42512
42513
  setToasts((currentToasts) => {
42513
- const newMap = new Map(currentToasts);
42514
- newMap.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42515
- return newMap;
42514
+ const newToasts = {
42515
+ ...currentToasts
42516
+ };
42517
+ const map2 = new Map(newToasts[toastAlign]);
42518
+ map2.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42519
+ newToasts[toastAlign] = map2;
42520
+ return newToasts;
42516
42521
  });
42517
42522
  }
42518
42523
  };
42519
42524
  return /* @__PURE__ */ jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: align === "start" ? "left" : "right", ...props, children: [
42520
42525
  /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
42521
42526
  children,
42522
- Array.from(toasts).map(([id, toast]) => /* @__PURE__ */ jsx(Toast, { ...toast, onClose: onClose(id) }, id))
42527
+ Array.from(toasts[align]).map(([id, toast]) => /* @__PURE__ */ jsx(Toast, { ...toast, onClose: onClose(id) }, id))
42523
42528
  ] }),
42524
42529
  /* @__PURE__ */ jsx(Viewport, { $align: align })
42525
- ] });
42530
+ ] }, `toast-provider-${align}`);
42526
42531
  };
42527
42532
  function listCacheClear$1() {
42528
42533
  this.__data__ = [];
@@ -52055,6 +52060,7 @@ export {
52055
52060
  TextAreaField,
52056
52061
  TextField,
52057
52062
  Title$2 as Title,
52063
+ Toast,
52058
52064
  ToastProvider,
52059
52065
  Tooltip,
52060
52066
  VerticalStepper,