@clickhouse/click-ui 0.0.208 → 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;"]);
@@ -15531,7 +15524,9 @@ const CodeBlock = ({
15531
15524
  };
15532
15525
  const ActionsWrapper = pt.div.withConfig({
15533
15526
  componentId: "sc-6eozxy-0"
15534
- })(["display:flex;justify-content:flex-end;gap:", ";"], (props) => props.theme.click.dialog.space.gap);
15527
+ })(["display:flex;justify-content:flex-end;gap:", ";@media (max-width:", "){flex-direction:column;}"], (props) => props.theme.click.dialog.space.gap, ({
15528
+ theme: theme2
15529
+ }) => theme2.breakpoint.sizes.sm);
15535
15530
  const DialogContent$1 = pt.div.withConfig({
15536
15531
  componentId: "sc-6eozxy-1"
15537
15532
  })(["overflow:hidden;display:flex;flex-direction:column;"]);
@@ -17696,19 +17691,19 @@ const DialogOverlay = pt($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff).withConfig({
17696
17691
  }) => theme2.click.dialog.color.opaqueBackground.default, overlayShow);
17697
17692
  const ContentArea = pt($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2).withConfig({
17698
17693
  componentId: "sc-1wr6otn-2"
17699
- })(["background:", ";border-radius:", ";padding:", " ", ";box-shadow:", ";border:1px solid ", ";width:75%;max-width:670px;position:fixed;top:50%;left:50%;max-height:75%;overflow:auto;transform:translate(-50%,-50%);animation:", " 150ms cubic-bezier(0.16,1,0.3,1);outline:none;"], ({
17694
+ })(["background:", ";border-radius:", ";padding:", ";box-shadow:", ";border:1px solid ", ";width:75%;max-width:670px;position:fixed;top:50%;left:50%;max-height:75%;overflow:auto;transform:translate(-50%,-50%);animation:", " 150ms cubic-bezier(0.16,1,0.3,1);outline:none;@media (max-width:", "){max-height:100%;border-radius:0;width:100%;}"], ({
17700
17695
  theme: theme2
17701
17696
  }) => theme2.click.dialog.color.background.default, ({
17702
17697
  theme: theme2
17703
17698
  }) => theme2.click.dialog.radii.all, ({
17704
17699
  theme: theme2
17705
- }) => theme2.click.dialog.space.y, ({
17706
- theme: theme2
17707
- }) => theme2.click.dialog.space.x, ({
17700
+ }) => `${theme2.click.dialog.space.y} ${theme2.click.dialog.space.x}`, ({
17708
17701
  theme: theme2
17709
17702
  }) => theme2.click.dialog.shadow.default, ({
17710
17703
  theme: theme2
17711
- }) => theme2.click.global.color.stroke.default, contentShow);
17704
+ }) => theme2.click.global.color.stroke.default, contentShow, ({
17705
+ theme: theme2
17706
+ }) => theme2.breakpoint.sizes.sm);
17712
17707
  const TitleArea = pt.div.withConfig({
17713
17708
  componentId: "sc-1wr6otn-3"
17714
17709
  })(["display:flex;justify-content:space-between;align-items:center;min-height:", ";"], ({
@@ -35832,6 +35827,9 @@ const SelectNoDataContainer = pt.div.withConfig({
35832
35827
  color: ${theme2.click.genericMenu.button.color.label.default};
35833
35828
  cursor: ${$clickable ? "pointer" : "default"}
35834
35829
  `);
35830
+ const SelectItemDescriptionText = pt.div.withConfig({
35831
+ componentId: "sc-oudbwg-14"
35832
+ })(["white-space:normal;[data-disabled] &,[disabled] &{color:inherit;}", " &{display:none;}"], StyledSelectTrigger);
35835
35833
  const OptionContext = createContext({
35836
35834
  search: "",
35837
35835
  selectedValues: [],
@@ -39117,7 +39115,7 @@ const SingleSelectValue = ({
39117
39115
  children,
39118
39116
  label
39119
39117
  } = valueNode ?? {};
39120
- 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 }) });
39121
39119
  };
39122
39120
  const useOption = () => {
39123
39121
  const result = useContext(OptionContext);
@@ -39376,14 +39374,11 @@ const InternalSelect = ({
39376
39374
  options: itemList = [],
39377
39375
  ...groupProps
39378
39376
  } = props2;
39379
- return /* @__PURE__ */ jsx(SelectGroup, { ...groupProps, children: itemList.map(({
39380
- label: label2,
39381
- ...itemProps
39382
- }, itemIndex) => {
39377
+ return /* @__PURE__ */ jsx(SelectGroup, { ...groupProps, children: itemList.map((itemProps, itemIndex) => {
39383
39378
  if (checkbox) {
39384
- 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}`);
39385
39380
  }
39386
- 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}`);
39387
39382
  }) }, `select-${id}-group-${index2}`);
39388
39383
  } else {
39389
39384
  if (checkbox) {
@@ -39430,6 +39425,7 @@ const SelectItem = forwardRef(({
39430
39425
  disabled = false,
39431
39426
  children,
39432
39427
  label,
39428
+ description,
39433
39429
  separator,
39434
39430
  onSelect: onSelectProp,
39435
39431
  value = "",
@@ -39467,7 +39463,10 @@ const SelectItem = forwardRef(({
39467
39463
  const isChecked = selectedValues.includes(value);
39468
39464
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
39469
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: [
39470
- /* @__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 }),
39471
39470
  /* @__PURE__ */ jsx(CheckIcon$1, { as: SvgImage, name: "check", size: "sm", $showCheck: isChecked })
39472
39471
  ] }),
39473
39472
  separator && /* @__PURE__ */ jsx(Separator, { size: "sm" })
@@ -39480,6 +39479,7 @@ const MultiSelectCheckboxItem = forwardRef(({
39480
39479
  icon,
39481
39480
  iconDir = "end",
39482
39481
  label,
39482
+ description,
39483
39483
  onMouseOver: onMouseOverProp,
39484
39484
  onSelect: onSelectProp,
39485
39485
  separator,
@@ -39494,7 +39494,7 @@ const MultiSelectCheckboxItem = forwardRef(({
39494
39494
  selectedValues,
39495
39495
  onSelect
39496
39496
  } = useOption();
39497
- const handleSelect = (evt) => {
39497
+ const handleMenuItemClick = (evt) => {
39498
39498
  if (!disabled) {
39499
39499
  onSelect(value, void 0, evt);
39500
39500
  if (typeof onSelectProp === "function") {
@@ -39502,15 +39502,6 @@ const MultiSelectCheckboxItem = forwardRef(({
39502
39502
  }
39503
39503
  }
39504
39504
  };
39505
- const handleMenuItemClick = (evt) => {
39506
- if (evt.target !== evt.currentTarget) {
39507
- return;
39508
- }
39509
- handleSelect(evt);
39510
- };
39511
- const handleCheckboxClick = (evt) => {
39512
- handleSelect(evt);
39513
- };
39514
39505
  const handleMenuItemMouseOver = (e) => {
39515
39506
  if (onMouseOverProp) {
39516
39507
  onMouseOverProp(e);
@@ -39524,27 +39515,24 @@ const MultiSelectCheckboxItem = forwardRef(({
39524
39515
  }
39525
39516
  const isChecked = selectedValues.includes(value);
39526
39517
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
39527
- /* @__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: [
39528
- icon && iconDir === "start" && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ? /* @__PURE__ */ jsxs("div", { style: {
39529
- display: "flex",
39530
- justifyContent: "center"
39531
- }, children: [
39532
- /* @__PURE__ */ jsx(SvgImage, { name: icon, size: "sm" }),
39533
- label
39534
- ] }) : /* @__PURE__ */ jsxs("div", { style: {
39535
- display: "flex",
39536
- justifyContent: "center"
39537
- }, children: [
39538
- /* @__PURE__ */ jsx(SvgImage, { name: icon, size: "sm" }),
39539
- children
39540
- ] }), onClick: handleCheckboxClick, variant: variant ?? "default" }),
39541
- 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" }) }),
39542
- !icon && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" })
39543
- ] }),
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
+ ] }) }),
39544
39525
  separator && /* @__PURE__ */ jsx(Separator, { size: "sm" })
39545
39526
  ] });
39546
39527
  });
39547
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";
39548
39536
  const Select = ({
39549
39537
  value: valueProp,
39550
39538
  defaultValue,
@@ -39592,6 +39580,7 @@ const Select = ({
39592
39580
  };
39593
39581
  Select.Group = SelectGroup;
39594
39582
  Select.Item = SelectItem;
39583
+ Select.ItemDescription = SelectItemDescription;
39595
39584
  const MultiSelect = ({
39596
39585
  value: valueProp,
39597
39586
  defaultValue,
@@ -39637,6 +39626,7 @@ const MultiSelect = ({
39637
39626
  };
39638
39627
  MultiSelect.Group = SelectGroup;
39639
39628
  MultiSelect.Item = SelectItem;
39629
+ MultiSelect.ItemDescription = SelectItemDescription;
39640
39630
  const CheckboxMultiSelect = ({
39641
39631
  value: valueProp,
39642
39632
  defaultValue,
@@ -39683,6 +39673,7 @@ const CheckboxMultiSelect = ({
39683
39673
  };
39684
39674
  CheckboxMultiSelect.Group = SelectGroup;
39685
39675
  CheckboxMultiSelect.Item = MultiSelectCheckboxItem;
39676
+ CheckboxMultiSelect.ItemDescription = SelectItemDescription;
39686
39677
  const $89eedd556c436f6a$var$DEFAULT_ORIENTATION = "horizontal";
39687
39678
  const $89eedd556c436f6a$var$ORIENTATIONS = [
39688
39679
  "horizontal",
@@ -42415,7 +42406,7 @@ const ToastHeader = pt($054eb8030ebde76e$export$f99233281efd08a0).withConfig({
42415
42406
  `);
42416
42407
  const ToastDescriptionContainer = pt.div.withConfig({
42417
42408
  componentId: "sc-tmc8vl-3"
42418
- })(["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;", ""], ({
42419
42410
  theme: theme2
42420
42411
  }) => `
42421
42412
  font: ${theme2.click.toast.typography.title.default};
@@ -42459,28 +42450,46 @@ const Toast = ({
42459
42450
  actions.length > 0 && /* @__PURE__ */ jsx(ToastDescriptionContent, { children: actions.map(({
42460
42451
  altText,
42461
42452
  ...btnProps
42462
- }) => /* @__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)) })
42463
42454
  ] })
42464
42455
  ] });
42465
42456
  };
42466
42457
  const Viewport = pt($054eb8030ebde76e$export$d5c6c08dc2d3ca7).withConfig({
42467
42458
  componentId: "sc-tmc8vl-6"
42468
- })(["--viewport-padding:25px;position:fixed;bottom:0;right:0;display:flex;flex-direction:column;padding:var(--viewport-padding);gap:", ";width:", ";max-width:100vw;margin:0;list-style:none;z-index:2147483647;outline:none;"], ({
42459
+ })(["--viewport-padding:25px;position:fixed;bottom:0;", ";display:flex;flex-direction:column;padding:var(--viewport-padding);gap:", ";width:", ";max-width:100vw;margin:0;list-style:none;z-index:2147483647;outline:none;"], ({
42460
+ $align
42461
+ }) => {
42462
+ if ($align === "start") {
42463
+ return "left: 0";
42464
+ }
42465
+ return `
42466
+ right: 0;
42467
+ `;
42468
+ }, ({
42469
42469
  theme: theme2
42470
42470
  }) => theme2.click.toast.space.gap, ({
42471
42471
  theme: theme2
42472
42472
  }) => theme2.click.toast.size.width);
42473
42473
  const ToastProvider = ({
42474
42474
  children,
42475
+ align = "end",
42475
42476
  ...props
42476
42477
  }) => {
42477
- const [toasts, setToasts] = useState(/* @__PURE__ */ new Map());
42478
+ const [toasts, setToasts] = useState({
42479
+ start: /* @__PURE__ */ new Map(),
42480
+ end: /* @__PURE__ */ new Map()
42481
+ });
42478
42482
  useEffect(() => {
42479
42483
  const listener = (toast) => {
42480
42484
  setToasts((currentToasts) => {
42481
- const newMap = new Map(currentToasts);
42482
- newMap.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42483
- 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;
42484
42493
  });
42485
42494
  };
42486
42495
  toastsEventEmitter.on(listener);
@@ -42489,28 +42498,36 @@ const ToastProvider = ({
42489
42498
  const onClose = (id) => (open2) => {
42490
42499
  if (!open2) {
42491
42500
  setToasts((currentToasts) => {
42492
- const newMap = new Map(currentToasts);
42493
- newMap.delete(id);
42494
- 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;
42495
42508
  });
42496
42509
  }
42497
42510
  };
42498
42511
  const value = {
42499
- createToast: (toast) => {
42512
+ createToast: (toast, toastAlign = align) => {
42500
42513
  setToasts((currentToasts) => {
42501
- const newMap = new Map(currentToasts);
42502
- newMap.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42503
- 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;
42504
42521
  });
42505
42522
  }
42506
42523
  };
42507
- return /* @__PURE__ */ jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", ...props, children: [
42524
+ return /* @__PURE__ */ jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: align === "start" ? "left" : "right", ...props, children: [
42508
42525
  /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
42509
42526
  children,
42510
- 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))
42511
42528
  ] }),
42512
- /* @__PURE__ */ jsx(Viewport, {})
42513
- ] });
42529
+ /* @__PURE__ */ jsx(Viewport, { $align: align })
42530
+ ] }, `toast-provider-${align}`);
42514
42531
  };
42515
42532
  function listCacheClear$1() {
42516
42533
  this.__data__ = [];
@@ -52043,6 +52060,8 @@ export {
52043
52060
  TextAreaField,
52044
52061
  TextField,
52045
52062
  Title$2 as Title,
52063
+ Toast,
52064
+ ToastProvider,
52046
52065
  Tooltip,
52047
52066
  VerticalStepper,
52048
52067
  WarningAlert,