@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.
@@ -7751,6 +7751,80 @@ const GenericMenuItem = styled.div.withConfig({
7751
7751
  const PopoverArrow = (props) => {
7752
7752
  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" }) });
7753
7753
  };
7754
+ const _Container = ({
7755
+ component,
7756
+ alignItems,
7757
+ children,
7758
+ fillWidth = true,
7759
+ gap = "none",
7760
+ grow,
7761
+ shrink,
7762
+ isResponsive,
7763
+ justifyContent = "start",
7764
+ maxWidth,
7765
+ minWidth,
7766
+ orientation = "horizontal",
7767
+ padding = "none",
7768
+ wrap = "nowrap",
7769
+ fillHeight,
7770
+ maxHeight,
7771
+ minHeight,
7772
+ overflow,
7773
+ ...props
7774
+ }, ref) => {
7775
+ 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 });
7776
+ };
7777
+ const Wrapper$d = styled.div.withConfig({
7778
+ componentId: "sc-bcplth-0"
7779
+ })(["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:", ";}"], ({
7780
+ $grow,
7781
+ $shrink
7782
+ }) => `
7783
+ ${$grow && `flex: ${$grow}`};
7784
+ ${$shrink && `flex-shrink: ${$shrink}`};
7785
+ `, ({
7786
+ $fillHeight,
7787
+ $maxHeight,
7788
+ $minHeight
7789
+ }) => `
7790
+ ${$fillHeight && "height: 100%"};
7791
+ ${$maxHeight && `max-height: ${$maxHeight}`};
7792
+ ${$minHeight && `min-height: ${$minHeight}`};
7793
+ `, ({
7794
+ $overflow
7795
+ }) => `
7796
+ ${$overflow && `overflow: ${$overflow}`};
7797
+ `, ({
7798
+ $wrap = "nowrap"
7799
+ }) => $wrap, ({
7800
+ theme: theme2,
7801
+ $gapSize
7802
+ }) => theme2.click.container.gap[$gapSize], ({
7803
+ $maxWidth
7804
+ }) => $maxWidth ?? "none", ({
7805
+ $minWidth
7806
+ }) => $minWidth ?? "auto", ({
7807
+ theme: theme2,
7808
+ $paddingSize
7809
+ }) => theme2.click.container.space[$paddingSize], ({
7810
+ $fillWidth = true
7811
+ }) => $fillWidth === true ? "100%" : "auto", ({
7812
+ $orientation = "horizontal"
7813
+ }) => $orientation === "horizontal" ? "row" : "column", ({
7814
+ $alignItems = "center"
7815
+ }) => $alignItems, ({
7816
+ $justifyContent = "left"
7817
+ }) => $justifyContent === "start" ? "start" : `${$justifyContent}`, ({
7818
+ theme: theme2
7819
+ }) => theme2.breakpoint.sizes.md, ({
7820
+ $isResponsive = true,
7821
+ $fillWidth = true
7822
+ }) => $isResponsive === true ? "100%" : $fillWidth === true ? "100%" : "auto", ({
7823
+ $isResponsive = true
7824
+ }) => $isResponsive === true ? "none" : "auto", ({
7825
+ $isResponsive = true
7826
+ }) => $isResponsive === true ? "column" : "auto");
7827
+ const Container = forwardRef(_Container);
7754
7828
  const mergeRefs = (refs) => (value) => {
7755
7829
  refs.forEach((ref) => {
7756
7830
  if (typeof ref === "function") {
@@ -7774,14 +7848,6 @@ const _EllipsisContent = ({
7774
7848
  }]), ...props });
7775
7849
  };
7776
7850
  const EllipsisContent = forwardRef(_EllipsisContent);
7777
- const LabelContainer$1 = styled.div.withConfig({
7778
- componentId: "sc-1likhxd-0"
7779
- })(["display:grid;grid-template-columns:", ";align-items:center;justify-content:flex-start;width:100%;width:-webkit-fill-available;width:fill-available;width:stretch;gap:", ";"], ({
7780
- $hasIcon,
7781
- $iconDir
7782
- }) => `${$hasIcon && $iconDir === "start" ? "auto " : ""}1fr${$hasIcon && $iconDir === "end" ? " auto" : ""}`, ({
7783
- theme: theme2
7784
- }) => theme2.click.sidebar.navigation.item.default.space.gap);
7785
7851
  const IconWrapper$3 = ({
7786
7852
  icon,
7787
7853
  iconDir = "start",
@@ -7790,10 +7856,11 @@ const IconWrapper$3 = ({
7790
7856
  height,
7791
7857
  children,
7792
7858
  ellipsisContent = true,
7859
+ gap = "sm",
7793
7860
  ...props
7794
7861
  }) => {
7795
7862
  const TextWrapper2 = ellipsisContent ? EllipsisContent : "div";
7796
- return /* @__PURE__ */ jsxs(LabelContainer$1, { $hasIcon: typeof icon === "string", $iconDir: iconDir, ...props, children: [
7863
+ return /* @__PURE__ */ jsxs(Container, { orientation: "horizontal", gap, ...props, children: [
7797
7864
  icon && iconDir === "start" && /* @__PURE__ */ jsx(SvgImage, { name: icon, size: size2, width, height }),
7798
7865
  /* @__PURE__ */ jsx(TextWrapper2, { "data-testid": `${ellipsisContent ? "ellipsed" : "normal"}-icon-wrapper-text`, children }),
7799
7866
  icon && iconDir === "end" && /* @__PURE__ */ jsx(SvgImage, { name: icon, size: size2, width, height })
@@ -8352,7 +8419,7 @@ const Alert = ({
8352
8419
  ...delegated
8353
8420
  }) => {
8354
8421
  const [isVisible, setIsVisible] = useState(true);
8355
- return isVisible ? /* @__PURE__ */ jsxs(Wrapper$d, { $size: size2, $state: state, $type: type, "data-testid": "click-alert", ...delegated, children: [
8422
+ return isVisible ? /* @__PURE__ */ jsxs(Wrapper$c, { $size: size2, $state: state, $type: type, "data-testid": "click-alert", ...delegated, children: [
8356
8423
  dismissible && type === "banner" && /* @__PURE__ */ jsx(DismissWrapper$1, {}),
8357
8424
  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] }) }),
8358
8425
  /* @__PURE__ */ jsxs(TextWrapper, { $state: state, $size: size2, children: [
@@ -8362,7 +8429,7 @@ const Alert = ({
8362
8429
  dismissible && /* @__PURE__ */ jsx(DismissWrapper$1, { "data-testid": "click-alert-dismiss-button", onClick: () => setIsVisible(false), children: /* @__PURE__ */ jsx(SvgImage, { name: "cross", "aria-label": "close" }) })
8363
8430
  ] }) : null;
8364
8431
  };
8365
- const Wrapper$d = styled.div.withConfig({
8432
+ const Wrapper$c = styled.div.withConfig({
8366
8433
  componentId: "sc-1wvczk0-0"
8367
8434
  })(["display:flex;border-radius:", ";justify-content:", ";overflow:hidden;background-color:", ";color:", ";width:100%;"], ({
8368
8435
  $type,
@@ -9216,7 +9283,7 @@ const StyledFallback = styled($cddcb0b647441e34$export$fb8d7f40caaeea67).withCon
9216
9283
  font: ${theme2.click.avatar.typography.label[$textSize].hover};
9217
9284
  }
9218
9285
  `);
9219
- const Wrapper$c = styled.div.withConfig({
9286
+ const Wrapper$b = styled.div.withConfig({
9220
9287
  componentId: "sc-471xo0-0"
9221
9288
  })(["display:inline-flex;", ""], ({
9222
9289
  $state = "default",
@@ -9273,7 +9340,7 @@ const Badge = ({
9273
9340
  onClose,
9274
9341
  ellipsisContent = true,
9275
9342
  ...props
9276
- }) => /* @__PURE__ */ jsx(Wrapper$c, { $state: state, $size: size2, $type: type, ...props, children: /* @__PURE__ */ jsxs(Content$4, { "data-testid": `${ellipsisContent ? "ellipsed" : "normal"}-badge-content`, children: [
9343
+ }) => /* @__PURE__ */ jsx(Wrapper$b, { $state: state, $size: size2, $type: type, ...props, children: /* @__PURE__ */ jsxs(Content$4, { "data-testid": `${ellipsisContent ? "ellipsed" : "normal"}-badge-content`, children: [
9277
9344
  /* @__PURE__ */ jsx(BadgeContent, { as: IconWrapper$3, icon, iconDir, size: size2, $state: state, ellipsisContent, children: text2 }),
9278
9345
  dismissible && /* @__PURE__ */ jsx(SvgContainer, { name: "cross", $state: state, as: SvgImage, onClick: onClose, "aria-label": "close" })
9279
9346
  ] }) });
@@ -9288,11 +9355,11 @@ const BigStat = ({
9288
9355
  state = "default",
9289
9356
  title = "Title",
9290
9357
  ...props
9291
- }) => /* @__PURE__ */ jsxs(Wrapper$b, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, ...props, children: [
9358
+ }) => /* @__PURE__ */ jsxs(Wrapper$a, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, ...props, children: [
9292
9359
  /* @__PURE__ */ jsx(Label, { $state: state, $size: size2, children: label }),
9293
9360
  /* @__PURE__ */ jsx(Title$3, { $state: state, $size: size2, children: title })
9294
9361
  ] });
9295
- const Wrapper$b = styled.div.withConfig({
9362
+ const Wrapper$a = styled.div.withConfig({
9296
9363
  componentId: "sc-u5029o-0"
9297
9364
  })(["display:flex;justify-content:center;box-sizing:border-box;", ""], ({
9298
9365
  $fillWidth = false,
@@ -9519,7 +9586,7 @@ const Description = styled.div.withConfig({
9519
9586
  })(["display:flex;flex-direction:column;align-self:start;gap:", ";flex:1;width:100%;"], ({
9520
9587
  theme: theme2
9521
9588
  }) => theme2.click.card.horizontal.space.gap);
9522
- const Wrapper$a = styled.div.withConfig({
9589
+ const Wrapper$9 = styled.div.withConfig({
9523
9590
  componentId: "sc-1qnbjoa-2"
9524
9591
  })(["display:inline-flex;width:100%;max-width:100%;align-items:center;justify-content:flex-start;", ""], ({
9525
9592
  theme: theme2,
@@ -9625,7 +9692,7 @@ const CardHorizontal = ({
9625
9692
  window.open(infoUrl, "_blank");
9626
9693
  }
9627
9694
  };
9628
- return /* @__PURE__ */ jsx(Wrapper$a, { $disabled: disabled, $isSelected: isSelected, $isSelectable: isSelectable, $color: color, tabIndex: 0, onClick: handleClick, ...props, children: /* @__PURE__ */ jsxs(ContentWrapper, { children: [
9695
+ return /* @__PURE__ */ jsx(Wrapper$9, { $disabled: disabled, $isSelected: isSelected, $isSelectable: isSelectable, $color: color, tabIndex: 0, onClick: handleClick, ...props, children: /* @__PURE__ */ jsxs(ContentWrapper, { children: [
9629
9696
  /* @__PURE__ */ jsxs(IconTextContentWrapper, { children: [
9630
9697
  icon && /* @__PURE__ */ jsx(CardIcon$1, { name: icon, "aria-hidden": true }),
9631
9698
  /* @__PURE__ */ jsxs(Container, { padding: "none", orientation: "vertical", children: [
@@ -9693,80 +9760,6 @@ const CuiText = styled.p.withConfig({
9693
9760
  }) => $fillWidth && "width: 100%");
9694
9761
  _Text.displayName = "Text";
9695
9762
  const Text = forwardRef(_Text);
9696
- const _Container = ({
9697
- component,
9698
- alignItems,
9699
- children,
9700
- fillWidth = true,
9701
- gap = "none",
9702
- grow,
9703
- shrink,
9704
- isResponsive,
9705
- justifyContent = "start",
9706
- maxWidth,
9707
- minWidth,
9708
- orientation = "horizontal",
9709
- padding = "none",
9710
- wrap = "nowrap",
9711
- fillHeight,
9712
- maxHeight,
9713
- minHeight,
9714
- overflow,
9715
- ...props
9716
- }, ref) => {
9717
- 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 });
9718
- };
9719
- const Wrapper$9 = styled.div.withConfig({
9720
- componentId: "sc-bcplth-0"
9721
- })(["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:", ";}"], ({
9722
- $grow,
9723
- $shrink
9724
- }) => `
9725
- ${$grow && `flex: ${$grow}`};
9726
- ${$shrink && `flex-shrink: ${$shrink}`};
9727
- `, ({
9728
- $fillHeight,
9729
- $maxHeight,
9730
- $minHeight
9731
- }) => `
9732
- ${$fillHeight && "height: 100%"};
9733
- ${$maxHeight && `max-height: ${$maxHeight}`};
9734
- ${$minHeight && `min-height: ${$minHeight}`};
9735
- `, ({
9736
- $overflow
9737
- }) => `
9738
- ${$overflow && `overflow: ${$overflow}`};
9739
- `, ({
9740
- $wrap = "nowrap"
9741
- }) => $wrap, ({
9742
- theme: theme2,
9743
- $gapSize
9744
- }) => theme2.click.container.gap[$gapSize], ({
9745
- $maxWidth
9746
- }) => $maxWidth ?? "none", ({
9747
- $minWidth
9748
- }) => $minWidth ?? "auto", ({
9749
- theme: theme2,
9750
- $paddingSize
9751
- }) => theme2.click.container.space[$paddingSize], ({
9752
- $fillWidth = true
9753
- }) => $fillWidth === true ? "100%" : "auto", ({
9754
- $orientation = "horizontal"
9755
- }) => $orientation === "horizontal" ? "row" : "column", ({
9756
- $alignItems = "center"
9757
- }) => $alignItems, ({
9758
- $justifyContent = "left"
9759
- }) => $justifyContent === "start" ? "start" : `${$justifyContent}`, ({
9760
- theme: theme2
9761
- }) => theme2.breakpoint.sizes.md, ({
9762
- $isResponsive = true,
9763
- $fillWidth = true
9764
- }) => $isResponsive === true ? "100%" : $fillWidth === true ? "100%" : "auto", ({
9765
- $isResponsive = true
9766
- }) => $isResponsive === true ? "none" : "auto", ({
9767
- $isResponsive = true
9768
- }) => $isResponsive === true ? "column" : "auto");
9769
- const Container = forwardRef(_Container);
9770
9763
  const TopBadgeWrapper = styled(Container).withConfig({
9771
9764
  componentId: "sc-1d5pqpo-0"
9772
9765
  })(["position:relative;"]);
@@ -14363,7 +14356,9 @@ const CodeBlock = ({
14363
14356
  };
14364
14357
  const ActionsWrapper = styled.div.withConfig({
14365
14358
  componentId: "sc-6eozxy-0"
14366
- })(["display:flex;justify-content:flex-end;gap:", ";"], (props) => props.theme.click.dialog.space.gap);
14359
+ })(["display:flex;justify-content:flex-end;gap:", ";@media (max-width:", "){flex-direction:column;}"], (props) => props.theme.click.dialog.space.gap, ({
14360
+ theme: theme2
14361
+ }) => theme2.breakpoint.sizes.sm);
14367
14362
  const DialogContent$1 = styled.div.withConfig({
14368
14363
  componentId: "sc-6eozxy-1"
14369
14364
  })(["overflow:hidden;display:flex;flex-direction:column;"]);
@@ -16528,19 +16523,19 @@ const DialogOverlay = styled($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff).withConf
16528
16523
  }) => theme2.click.dialog.color.opaqueBackground.default, overlayShow);
16529
16524
  const ContentArea = styled($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2).withConfig({
16530
16525
  componentId: "sc-1wr6otn-2"
16531
- })(["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;"], ({
16526
+ })(["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%;}"], ({
16532
16527
  theme: theme2
16533
16528
  }) => theme2.click.dialog.color.background.default, ({
16534
16529
  theme: theme2
16535
16530
  }) => theme2.click.dialog.radii.all, ({
16536
16531
  theme: theme2
16537
- }) => theme2.click.dialog.space.y, ({
16538
- theme: theme2
16539
- }) => theme2.click.dialog.space.x, ({
16532
+ }) => `${theme2.click.dialog.space.y} ${theme2.click.dialog.space.x}`, ({
16540
16533
  theme: theme2
16541
16534
  }) => theme2.click.dialog.shadow.default, ({
16542
16535
  theme: theme2
16543
- }) => theme2.click.global.color.stroke.default, contentShow);
16536
+ }) => theme2.click.global.color.stroke.default, contentShow, ({
16537
+ theme: theme2
16538
+ }) => theme2.breakpoint.sizes.sm);
16544
16539
  const TitleArea = styled.div.withConfig({
16545
16540
  componentId: "sc-1wr6otn-3"
16546
16541
  })(["display:flex;justify-content:space-between;align-items:center;min-height:", ";"], ({
@@ -34664,6 +34659,9 @@ const SelectNoDataContainer = styled.div.withConfig({
34664
34659
  color: ${theme2.click.genericMenu.button.color.label.default};
34665
34660
  cursor: ${$clickable ? "pointer" : "default"}
34666
34661
  `);
34662
+ const SelectItemDescriptionText = styled.div.withConfig({
34663
+ componentId: "sc-oudbwg-14"
34664
+ })(["white-space:normal;[data-disabled] &,[disabled] &{color:inherit;}", " &{display:none;}"], StyledSelectTrigger);
34667
34665
  const OptionContext = createContext({
34668
34666
  search: "",
34669
34667
  selectedValues: [],
@@ -37949,7 +37947,7 @@ const SingleSelectValue = ({
37949
37947
  children,
37950
37948
  label
37951
37949
  } = valueNode ?? {};
37952
- return /* @__PURE__ */ jsx(SelectValueContainer, { children: /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, children: label ?? children ?? value }) });
37950
+ return /* @__PURE__ */ jsx(SelectValueContainer, { children: /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ?? children ?? value }) });
37953
37951
  };
37954
37952
  const useOption = () => {
37955
37953
  const result = useContext(OptionContext);
@@ -38208,14 +38206,11 @@ const InternalSelect = ({
38208
38206
  options: itemList = [],
38209
38207
  ...groupProps
38210
38208
  } = props2;
38211
- return /* @__PURE__ */ jsx(SelectGroup, { ...groupProps, children: itemList.map(({
38212
- label: label2,
38213
- ...itemProps
38214
- }, itemIndex) => {
38209
+ return /* @__PURE__ */ jsx(SelectGroup, { ...groupProps, children: itemList.map((itemProps, itemIndex) => {
38215
38210
  if (checkbox) {
38216
- return /* @__PURE__ */ jsx(MultiSelectCheckboxItem, { ...itemProps, children: label2 }, `select-${id}-group-${index2}-item-${itemIndex}`);
38211
+ return /* @__PURE__ */ jsx(MultiSelectCheckboxItem, { ...itemProps }, `select-${id}-group-${index2}-item-${itemIndex}`);
38217
38212
  }
38218
- return /* @__PURE__ */ jsx(SelectItem, { ...itemProps, children: label2 }, `select-${id}-group-${index2}-item-${itemIndex}`);
38213
+ return /* @__PURE__ */ jsx(SelectItem, { ...itemProps }, `select-${id}-group-${index2}-item-${itemIndex}`);
38219
38214
  }) }, `select-${id}-group-${index2}`);
38220
38215
  } else {
38221
38216
  if (checkbox) {
@@ -38262,6 +38257,7 @@ const SelectItem = forwardRef(({
38262
38257
  disabled = false,
38263
38258
  children,
38264
38259
  label,
38260
+ description,
38265
38261
  separator,
38266
38262
  onSelect: onSelectProp,
38267
38263
  value = "",
@@ -38299,7 +38295,10 @@ const SelectItem = forwardRef(({
38299
38295
  const isChecked = selectedValues.includes(value);
38300
38296
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
38301
38297
  /* @__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: [
38302
- /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, children: label ?? children }),
38298
+ /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
38299
+ label,
38300
+ description && /* @__PURE__ */ jsx(SelectItemDescription, { children: description })
38301
+ ] }) : children }),
38303
38302
  /* @__PURE__ */ jsx(CheckIcon$1, { as: SvgImage, name: "check", size: "sm", $showCheck: isChecked })
38304
38303
  ] }),
38305
38304
  separator && /* @__PURE__ */ jsx(Separator, { size: "sm" })
@@ -38312,6 +38311,7 @@ const MultiSelectCheckboxItem = forwardRef(({
38312
38311
  icon,
38313
38312
  iconDir = "end",
38314
38313
  label,
38314
+ description,
38315
38315
  onMouseOver: onMouseOverProp,
38316
38316
  onSelect: onSelectProp,
38317
38317
  separator,
@@ -38326,7 +38326,7 @@ const MultiSelectCheckboxItem = forwardRef(({
38326
38326
  selectedValues,
38327
38327
  onSelect
38328
38328
  } = useOption();
38329
- const handleSelect = (evt) => {
38329
+ const handleMenuItemClick = (evt) => {
38330
38330
  if (!disabled) {
38331
38331
  onSelect(value, void 0, evt);
38332
38332
  if (typeof onSelectProp === "function") {
@@ -38334,15 +38334,6 @@ const MultiSelectCheckboxItem = forwardRef(({
38334
38334
  }
38335
38335
  }
38336
38336
  };
38337
- const handleMenuItemClick = (evt) => {
38338
- if (evt.target !== evt.currentTarget) {
38339
- return;
38340
- }
38341
- handleSelect(evt);
38342
- };
38343
- const handleCheckboxClick = (evt) => {
38344
- handleSelect(evt);
38345
- };
38346
38337
  const handleMenuItemMouseOver = (e) => {
38347
38338
  if (onMouseOverProp) {
38348
38339
  onMouseOverProp(e);
@@ -38356,27 +38347,24 @@ const MultiSelectCheckboxItem = forwardRef(({
38356
38347
  }
38357
38348
  const isChecked = selectedValues.includes(value);
38358
38349
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
38359
- /* @__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: [
38360
- icon && iconDir === "start" && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ? /* @__PURE__ */ jsxs("div", { style: {
38361
- display: "flex",
38362
- justifyContent: "center"
38363
- }, children: [
38364
- /* @__PURE__ */ jsx(SvgImage, { name: icon, size: "sm" }),
38365
- label
38366
- ] }) : /* @__PURE__ */ jsxs("div", { style: {
38367
- display: "flex",
38368
- justifyContent: "center"
38369
- }, children: [
38370
- /* @__PURE__ */ jsx(SvgImage, { name: icon, size: "sm" }),
38371
- children
38372
- ] }), onClick: handleCheckboxClick, variant: variant ?? "default" }),
38373
- 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" }) }),
38374
- !icon && /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" })
38375
- ] }),
38350
+ /* @__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: [
38351
+ /* @__PURE__ */ jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, variant: variant ?? "default" }),
38352
+ /* @__PURE__ */ jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
38353
+ label,
38354
+ description && /* @__PURE__ */ jsx(SelectItemDescription, { children: description })
38355
+ ] }) : children })
38356
+ ] }) }),
38376
38357
  separator && /* @__PURE__ */ jsx(Separator, { size: "sm" })
38377
38358
  ] });
38378
38359
  });
38379
38360
  MultiSelectCheckboxItem.displayName = "Select.Item";
38361
+ const SelectItemDescription = forwardRef(({
38362
+ children,
38363
+ ...props
38364
+ }) => {
38365
+ return /* @__PURE__ */ jsx(Text, { component: SelectItemDescriptionText, color: "muted", ...props, children });
38366
+ });
38367
+ SelectItemDescription.displayName = "Select.ItemDescription";
38380
38368
  const Select = ({
38381
38369
  value: valueProp,
38382
38370
  defaultValue,
@@ -38424,6 +38412,7 @@ const Select = ({
38424
38412
  };
38425
38413
  Select.Group = SelectGroup;
38426
38414
  Select.Item = SelectItem;
38415
+ Select.ItemDescription = SelectItemDescription;
38427
38416
  const MultiSelect = ({
38428
38417
  value: valueProp,
38429
38418
  defaultValue,
@@ -38469,6 +38458,7 @@ const MultiSelect = ({
38469
38458
  };
38470
38459
  MultiSelect.Group = SelectGroup;
38471
38460
  MultiSelect.Item = SelectItem;
38461
+ MultiSelect.ItemDescription = SelectItemDescription;
38472
38462
  const CheckboxMultiSelect = ({
38473
38463
  value: valueProp,
38474
38464
  defaultValue,
@@ -38515,6 +38505,7 @@ const CheckboxMultiSelect = ({
38515
38505
  };
38516
38506
  CheckboxMultiSelect.Group = SelectGroup;
38517
38507
  CheckboxMultiSelect.Item = MultiSelectCheckboxItem;
38508
+ CheckboxMultiSelect.ItemDescription = SelectItemDescription;
38518
38509
  const $89eedd556c436f6a$var$DEFAULT_ORIENTATION = "horizontal";
38519
38510
  const $89eedd556c436f6a$var$ORIENTATIONS = [
38520
38511
  "horizontal",
@@ -41247,7 +41238,7 @@ const ToastHeader = styled($054eb8030ebde76e$export$f99233281efd08a0).withConfig
41247
41238
  `);
41248
41239
  const ToastDescriptionContainer = styled.div.withConfig({
41249
41240
  componentId: "sc-tmc8vl-3"
41250
- })(["display:flex;justify-content:space-between;width:100%;align-items:flex-end;gap:inherit;", ""], ({
41241
+ })(["display:flex;flex-direction:column;justify-content:space-between;width:100%;align-items:flex-end;gap:inherit;", ""], ({
41251
41242
  theme: theme2
41252
41243
  }) => `
41253
41244
  font: ${theme2.click.toast.typography.title.default};
@@ -41291,28 +41282,46 @@ const Toast = ({
41291
41282
  actions.length > 0 && /* @__PURE__ */ jsx(ToastDescriptionContent, { children: actions.map(({
41292
41283
  altText,
41293
41284
  ...btnProps
41294
- }) => /* @__PURE__ */ jsx($054eb8030ebde76e$export$e19cd5f9376f8cee, { altText, children: /* @__PURE__ */ jsx(Button, { ...btnProps }) })) })
41285
+ }) => /* @__PURE__ */ jsx($054eb8030ebde76e$export$e19cd5f9376f8cee, { altText, asChild: true, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { ...btnProps }) }) }, altText)) })
41295
41286
  ] })
41296
41287
  ] });
41297
41288
  };
41298
41289
  const Viewport = styled($054eb8030ebde76e$export$d5c6c08dc2d3ca7).withConfig({
41299
41290
  componentId: "sc-tmc8vl-6"
41300
- })(["--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;"], ({
41291
+ })(["--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;"], ({
41292
+ $align
41293
+ }) => {
41294
+ if ($align === "start") {
41295
+ return "left: 0";
41296
+ }
41297
+ return `
41298
+ right: 0;
41299
+ `;
41300
+ }, ({
41301
41301
  theme: theme2
41302
41302
  }) => theme2.click.toast.space.gap, ({
41303
41303
  theme: theme2
41304
41304
  }) => theme2.click.toast.size.width);
41305
41305
  const ToastProvider = ({
41306
41306
  children,
41307
+ align = "end",
41307
41308
  ...props
41308
41309
  }) => {
41309
- const [toasts, setToasts] = useState(/* @__PURE__ */ new Map());
41310
+ const [toasts, setToasts] = useState({
41311
+ start: /* @__PURE__ */ new Map(),
41312
+ end: /* @__PURE__ */ new Map()
41313
+ });
41310
41314
  useEffect(() => {
41311
41315
  const listener = (toast) => {
41312
41316
  setToasts((currentToasts) => {
41313
- const newMap = new Map(currentToasts);
41314
- newMap.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
41315
- return newMap;
41317
+ const alignment = toast.align ?? "end";
41318
+ const newToasts = {
41319
+ ...currentToasts
41320
+ };
41321
+ const map2 = new Map(newToasts[alignment]);
41322
+ map2.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
41323
+ newToasts[alignment] = map2;
41324
+ return newToasts;
41316
41325
  });
41317
41326
  };
41318
41327
  toastsEventEmitter.on(listener);
@@ -41321,28 +41330,36 @@ const ToastProvider = ({
41321
41330
  const onClose = (id) => (open2) => {
41322
41331
  if (!open2) {
41323
41332
  setToasts((currentToasts) => {
41324
- const newMap = new Map(currentToasts);
41325
- newMap.delete(id);
41326
- return newMap;
41333
+ const newToasts = {
41334
+ ...currentToasts
41335
+ };
41336
+ const map2 = new Map(newToasts[align]);
41337
+ map2.delete(id);
41338
+ newToasts[align] = map2;
41339
+ return newToasts;
41327
41340
  });
41328
41341
  }
41329
41342
  };
41330
41343
  const value = {
41331
- createToast: (toast) => {
41344
+ createToast: (toast, toastAlign = align) => {
41332
41345
  setToasts((currentToasts) => {
41333
- const newMap = new Map(currentToasts);
41334
- newMap.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
41335
- return newMap;
41346
+ const newToasts = {
41347
+ ...currentToasts
41348
+ };
41349
+ const map2 = new Map(newToasts[toastAlign]);
41350
+ map2.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
41351
+ newToasts[toastAlign] = map2;
41352
+ return newToasts;
41336
41353
  });
41337
41354
  }
41338
41355
  };
41339
- return /* @__PURE__ */ jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", ...props, children: [
41356
+ return /* @__PURE__ */ jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: align === "start" ? "left" : "right", ...props, children: [
41340
41357
  /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
41341
41358
  children,
41342
- Array.from(toasts).map(([id, toast]) => /* @__PURE__ */ jsx(Toast, { ...toast, onClose: onClose(id) }, id))
41359
+ Array.from(toasts[align]).map(([id, toast]) => /* @__PURE__ */ jsx(Toast, { ...toast, onClose: onClose(id) }, id))
41343
41360
  ] }),
41344
- /* @__PURE__ */ jsx(Viewport, {})
41345
- ] });
41361
+ /* @__PURE__ */ jsx(Viewport, { $align: align })
41362
+ ] }, `toast-provider-${align}`);
41346
41363
  };
41347
41364
  function listCacheClear$1() {
41348
41365
  this.__data__ = [];
@@ -50875,6 +50892,8 @@ export {
50875
50892
  TextAreaField,
50876
50893
  TextField,
50877
50894
  Title$2 as Title,
50895
+ Toast,
50896
+ ToastProvider,
50878
50897
  Tooltip,
50879
50898
  VerticalStepper,
50880
50899
  WarningAlert,