@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.
@@ -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;"]);
@@ -15547,7 +15540,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
15547
15540
  };
15548
15541
  const ActionsWrapper = pt.div.withConfig({
15549
15542
  componentId: "sc-6eozxy-0"
15550
- })(["display:flex;justify-content:flex-end;gap:", ";"], (props) => props.theme.click.dialog.space.gap);
15543
+ })(["display:flex;justify-content:flex-end;gap:", ";@media (max-width:", "){flex-direction:column;}"], (props) => props.theme.click.dialog.space.gap, ({
15544
+ theme: theme2
15545
+ }) => theme2.breakpoint.sizes.sm);
15551
15546
  const DialogContent$1 = pt.div.withConfig({
15552
15547
  componentId: "sc-6eozxy-1"
15553
15548
  })(["overflow:hidden;display:flex;flex-direction:column;"]);
@@ -17712,19 +17707,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
17712
17707
  }) => theme2.click.dialog.color.opaqueBackground.default, overlayShow);
17713
17708
  const ContentArea = pt($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2).withConfig({
17714
17709
  componentId: "sc-1wr6otn-2"
17715
- })(["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;"], ({
17710
+ })(["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%;}"], ({
17716
17711
  theme: theme2
17717
17712
  }) => theme2.click.dialog.color.background.default, ({
17718
17713
  theme: theme2
17719
17714
  }) => theme2.click.dialog.radii.all, ({
17720
17715
  theme: theme2
17721
- }) => theme2.click.dialog.space.y, ({
17722
- theme: theme2
17723
- }) => theme2.click.dialog.space.x, ({
17716
+ }) => `${theme2.click.dialog.space.y} ${theme2.click.dialog.space.x}`, ({
17724
17717
  theme: theme2
17725
17718
  }) => theme2.click.dialog.shadow.default, ({
17726
17719
  theme: theme2
17727
- }) => theme2.click.global.color.stroke.default, contentShow);
17720
+ }) => theme2.click.global.color.stroke.default, contentShow, ({
17721
+ theme: theme2
17722
+ }) => theme2.breakpoint.sizes.sm);
17728
17723
  const TitleArea = pt.div.withConfig({
17729
17724
  componentId: "sc-1wr6otn-3"
17730
17725
  })(["display:flex;justify-content:space-between;align-items:center;min-height:", ";"], ({
@@ -35848,6 +35843,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
35848
35843
  color: ${theme2.click.genericMenu.button.color.label.default};
35849
35844
  cursor: ${$clickable ? "pointer" : "default"}
35850
35845
  `);
35846
+ const SelectItemDescriptionText = pt.div.withConfig({
35847
+ componentId: "sc-oudbwg-14"
35848
+ })(["white-space:normal;[data-disabled] &,[disabled] &{color:inherit;}", " &{display:none;}"], StyledSelectTrigger);
35851
35849
  const OptionContext = React.createContext({
35852
35850
  search: "",
35853
35851
  selectedValues: [],
@@ -39133,7 +39131,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39133
39131
  children,
39134
39132
  label
39135
39133
  } = valueNode ?? {};
39136
- 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 }) });
39137
39135
  };
39138
39136
  const useOption = () => {
39139
39137
  const result = React.useContext(OptionContext);
@@ -39392,14 +39390,11 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39392
39390
  options: itemList = [],
39393
39391
  ...groupProps
39394
39392
  } = props2;
39395
- return /* @__PURE__ */ jsxRuntime.jsx(SelectGroup, { ...groupProps, children: itemList.map(({
39396
- label: label2,
39397
- ...itemProps
39398
- }, itemIndex) => {
39393
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectGroup, { ...groupProps, children: itemList.map((itemProps, itemIndex) => {
39399
39394
  if (checkbox) {
39400
- 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}`);
39401
39396
  }
39402
- 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}`);
39403
39398
  }) }, `select-${id}-group-${index2}`);
39404
39399
  } else {
39405
39400
  if (checkbox) {
@@ -39446,6 +39441,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39446
39441
  disabled = false,
39447
39442
  children,
39448
39443
  label,
39444
+ description,
39449
39445
  separator,
39450
39446
  onSelect: onSelectProp,
39451
39447
  value = "",
@@ -39483,7 +39479,10 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39483
39479
  const isChecked = selectedValues.includes(value);
39484
39480
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
39485
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: [
39486
- /* @__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 }),
39487
39486
  /* @__PURE__ */ jsxRuntime.jsx(CheckIcon$1, { as: SvgImage, name: "check", size: "sm", $showCheck: isChecked })
39488
39487
  ] }),
39489
39488
  separator && /* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "sm" })
@@ -39496,6 +39495,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39496
39495
  icon,
39497
39496
  iconDir = "end",
39498
39497
  label,
39498
+ description,
39499
39499
  onMouseOver: onMouseOverProp,
39500
39500
  onSelect: onSelectProp,
39501
39501
  separator,
@@ -39510,7 +39510,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39510
39510
  selectedValues,
39511
39511
  onSelect
39512
39512
  } = useOption();
39513
- const handleSelect = (evt) => {
39513
+ const handleMenuItemClick = (evt) => {
39514
39514
  if (!disabled) {
39515
39515
  onSelect(value, void 0, evt);
39516
39516
  if (typeof onSelectProp === "function") {
@@ -39518,15 +39518,6 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39518
39518
  }
39519
39519
  }
39520
39520
  };
39521
- const handleMenuItemClick = (evt) => {
39522
- if (evt.target !== evt.currentTarget) {
39523
- return;
39524
- }
39525
- handleSelect(evt);
39526
- };
39527
- const handleCheckboxClick = (evt) => {
39528
- handleSelect(evt);
39529
- };
39530
39521
  const handleMenuItemMouseOver = (e) => {
39531
39522
  if (onMouseOverProp) {
39532
39523
  onMouseOverProp(e);
@@ -39540,27 +39531,24 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39540
39531
  }
39541
39532
  const isChecked = selectedValues.includes(value);
39542
39533
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
39543
- /* @__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: [
39544
- icon && iconDir === "start" && /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
39545
- display: "flex",
39546
- justifyContent: "center"
39547
- }, children: [
39548
- /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: "sm" }),
39549
- label
39550
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
39551
- display: "flex",
39552
- justifyContent: "center"
39553
- }, children: [
39554
- /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: "sm" }),
39555
- children
39556
- ] }), onClick: handleCheckboxClick, variant: variant ?? "default" }),
39557
- 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" }) }),
39558
- !icon && /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" })
39559
- ] }),
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
+ ] }) }),
39560
39541
  separator && /* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "sm" })
39561
39542
  ] });
39562
39543
  });
39563
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";
39564
39552
  const Select = ({
39565
39553
  value: valueProp,
39566
39554
  defaultValue,
@@ -39608,6 +39596,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39608
39596
  };
39609
39597
  Select.Group = SelectGroup;
39610
39598
  Select.Item = SelectItem;
39599
+ Select.ItemDescription = SelectItemDescription;
39611
39600
  const MultiSelect = ({
39612
39601
  value: valueProp,
39613
39602
  defaultValue,
@@ -39653,6 +39642,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39653
39642
  };
39654
39643
  MultiSelect.Group = SelectGroup;
39655
39644
  MultiSelect.Item = SelectItem;
39645
+ MultiSelect.ItemDescription = SelectItemDescription;
39656
39646
  const CheckboxMultiSelect = ({
39657
39647
  value: valueProp,
39658
39648
  defaultValue,
@@ -39699,6 +39689,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
39699
39689
  };
39700
39690
  CheckboxMultiSelect.Group = SelectGroup;
39701
39691
  CheckboxMultiSelect.Item = MultiSelectCheckboxItem;
39692
+ CheckboxMultiSelect.ItemDescription = SelectItemDescription;
39702
39693
  const $89eedd556c436f6a$var$DEFAULT_ORIENTATION = "horizontal";
39703
39694
  const $89eedd556c436f6a$var$ORIENTATIONS = [
39704
39695
  "horizontal",
@@ -42431,7 +42422,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
42431
42422
  `);
42432
42423
  const ToastDescriptionContainer = pt.div.withConfig({
42433
42424
  componentId: "sc-tmc8vl-3"
42434
- })(["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;", ""], ({
42435
42426
  theme: theme2
42436
42427
  }) => `
42437
42428
  font: ${theme2.click.toast.typography.title.default};
@@ -42475,28 +42466,46 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
42475
42466
  actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ToastDescriptionContent, { children: actions.map(({
42476
42467
  altText,
42477
42468
  ...btnProps
42478
- }) => /* @__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)) })
42479
42470
  ] })
42480
42471
  ] });
42481
42472
  };
42482
42473
  const Viewport = pt($054eb8030ebde76e$export$d5c6c08dc2d3ca7).withConfig({
42483
42474
  componentId: "sc-tmc8vl-6"
42484
- })(["--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;"], ({
42475
+ })(["--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;"], ({
42476
+ $align
42477
+ }) => {
42478
+ if ($align === "start") {
42479
+ return "left: 0";
42480
+ }
42481
+ return `
42482
+ right: 0;
42483
+ `;
42484
+ }, ({
42485
42485
  theme: theme2
42486
42486
  }) => theme2.click.toast.space.gap, ({
42487
42487
  theme: theme2
42488
42488
  }) => theme2.click.toast.size.width);
42489
42489
  const ToastProvider = ({
42490
42490
  children,
42491
+ align = "end",
42491
42492
  ...props
42492
42493
  }) => {
42493
- 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
+ });
42494
42498
  React.useEffect(() => {
42495
42499
  const listener = (toast) => {
42496
42500
  setToasts((currentToasts) => {
42497
- const newMap = new Map(currentToasts);
42498
- newMap.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42499
- 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;
42500
42509
  });
42501
42510
  };
42502
42511
  toastsEventEmitter.on(listener);
@@ -42505,28 +42514,36 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
42505
42514
  const onClose = (id) => (open2) => {
42506
42515
  if (!open2) {
42507
42516
  setToasts((currentToasts) => {
42508
- const newMap = new Map(currentToasts);
42509
- newMap.delete(id);
42510
- 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;
42511
42524
  });
42512
42525
  }
42513
42526
  };
42514
42527
  const value = {
42515
- createToast: (toast) => {
42528
+ createToast: (toast, toastAlign = align) => {
42516
42529
  setToasts((currentToasts) => {
42517
- const newMap = new Map(currentToasts);
42518
- newMap.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
42519
- 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;
42520
42537
  });
42521
42538
  }
42522
42539
  };
42523
- return /* @__PURE__ */ jsxRuntime.jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", ...props, children: [
42540
+ return /* @__PURE__ */ jsxRuntime.jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: align === "start" ? "left" : "right", ...props, children: [
42524
42541
  /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
42525
42542
  children,
42526
- 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))
42527
42544
  ] }),
42528
- /* @__PURE__ */ jsxRuntime.jsx(Viewport, {})
42529
- ] });
42545
+ /* @__PURE__ */ jsxRuntime.jsx(Viewport, { $align: align })
42546
+ ] }, `toast-provider-${align}`);
42530
42547
  };
42531
42548
  function listCacheClear$1() {
42532
42549
  this.__data__ = [];
@@ -52058,6 +52075,8 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
52058
52075
  exports2.TextAreaField = TextAreaField;
52059
52076
  exports2.TextField = TextField;
52060
52077
  exports2.Title = Title$2;
52078
+ exports2.Toast = Toast;
52079
+ exports2.ToastProvider = ToastProvider;
52061
52080
  exports2.Tooltip = Tooltip;
52062
52081
  exports2.VerticalStepper = VerticalStepper;
52063
52082
  exports2.WarningAlert = WarningAlert;