@clickhouse/click-ui 0.0.209 → 0.0.210
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/click-ui.bundled.es.js +147 -141
- package/dist/click-ui.bundled.umd.js +147 -141
- package/dist/click-ui.es.js +147 -141
- package/dist/click-ui.umd.js +147 -141
- package/dist/components/IconWrapper/IconWrapper.d.ts +3 -1
- package/dist/components/Select/CheckboxMultiSelect.d.ts +1 -0
- package/dist/components/Select/MultiSelect.d.ts +1 -0
- package/dist/components/Select/SingleSelect.d.ts +1 -0
- package/dist/components/Select/common/InternalSelect.d.ts +2 -1
- package/dist/components/Select/common/SelectStyled.d.ts +1 -0
- package/dist/components/Select/common/types.d.ts +5 -4
- package/dist/components/Toast/Toast.d.ts +8 -3
- package/dist/components/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/click-ui.umd.js
CHANGED
|
@@ -7766,6 +7766,80 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
7766
7766
|
const PopoverArrow = (props) => {
|
|
7767
7767
|
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" }) });
|
|
7768
7768
|
};
|
|
7769
|
+
const _Container = ({
|
|
7770
|
+
component,
|
|
7771
|
+
alignItems,
|
|
7772
|
+
children,
|
|
7773
|
+
fillWidth = true,
|
|
7774
|
+
gap = "none",
|
|
7775
|
+
grow,
|
|
7776
|
+
shrink,
|
|
7777
|
+
isResponsive,
|
|
7778
|
+
justifyContent = "start",
|
|
7779
|
+
maxWidth,
|
|
7780
|
+
minWidth,
|
|
7781
|
+
orientation = "horizontal",
|
|
7782
|
+
padding = "none",
|
|
7783
|
+
wrap = "nowrap",
|
|
7784
|
+
fillHeight,
|
|
7785
|
+
maxHeight,
|
|
7786
|
+
minHeight,
|
|
7787
|
+
overflow,
|
|
7788
|
+
...props
|
|
7789
|
+
}, ref) => {
|
|
7790
|
+
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 });
|
|
7791
|
+
};
|
|
7792
|
+
const Wrapper$d = styled.styled.div.withConfig({
|
|
7793
|
+
componentId: "sc-bcplth-0"
|
|
7794
|
+
})(["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:", ";}"], ({
|
|
7795
|
+
$grow,
|
|
7796
|
+
$shrink
|
|
7797
|
+
}) => `
|
|
7798
|
+
${$grow && `flex: ${$grow}`};
|
|
7799
|
+
${$shrink && `flex-shrink: ${$shrink}`};
|
|
7800
|
+
`, ({
|
|
7801
|
+
$fillHeight,
|
|
7802
|
+
$maxHeight,
|
|
7803
|
+
$minHeight
|
|
7804
|
+
}) => `
|
|
7805
|
+
${$fillHeight && "height: 100%"};
|
|
7806
|
+
${$maxHeight && `max-height: ${$maxHeight}`};
|
|
7807
|
+
${$minHeight && `min-height: ${$minHeight}`};
|
|
7808
|
+
`, ({
|
|
7809
|
+
$overflow
|
|
7810
|
+
}) => `
|
|
7811
|
+
${$overflow && `overflow: ${$overflow}`};
|
|
7812
|
+
`, ({
|
|
7813
|
+
$wrap = "nowrap"
|
|
7814
|
+
}) => $wrap, ({
|
|
7815
|
+
theme: theme2,
|
|
7816
|
+
$gapSize
|
|
7817
|
+
}) => theme2.click.container.gap[$gapSize], ({
|
|
7818
|
+
$maxWidth
|
|
7819
|
+
}) => $maxWidth ?? "none", ({
|
|
7820
|
+
$minWidth
|
|
7821
|
+
}) => $minWidth ?? "auto", ({
|
|
7822
|
+
theme: theme2,
|
|
7823
|
+
$paddingSize
|
|
7824
|
+
}) => theme2.click.container.space[$paddingSize], ({
|
|
7825
|
+
$fillWidth = true
|
|
7826
|
+
}) => $fillWidth === true ? "100%" : "auto", ({
|
|
7827
|
+
$orientation = "horizontal"
|
|
7828
|
+
}) => $orientation === "horizontal" ? "row" : "column", ({
|
|
7829
|
+
$alignItems = "center"
|
|
7830
|
+
}) => $alignItems, ({
|
|
7831
|
+
$justifyContent = "left"
|
|
7832
|
+
}) => $justifyContent === "start" ? "start" : `${$justifyContent}`, ({
|
|
7833
|
+
theme: theme2
|
|
7834
|
+
}) => theme2.breakpoint.sizes.md, ({
|
|
7835
|
+
$isResponsive = true,
|
|
7836
|
+
$fillWidth = true
|
|
7837
|
+
}) => $isResponsive === true ? "100%" : $fillWidth === true ? "100%" : "auto", ({
|
|
7838
|
+
$isResponsive = true
|
|
7839
|
+
}) => $isResponsive === true ? "none" : "auto", ({
|
|
7840
|
+
$isResponsive = true
|
|
7841
|
+
}) => $isResponsive === true ? "column" : "auto");
|
|
7842
|
+
const Container = React.forwardRef(_Container);
|
|
7769
7843
|
const mergeRefs = (refs) => (value) => {
|
|
7770
7844
|
refs.forEach((ref) => {
|
|
7771
7845
|
if (typeof ref === "function") {
|
|
@@ -7789,14 +7863,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
7789
7863
|
}]), ...props });
|
|
7790
7864
|
};
|
|
7791
7865
|
const EllipsisContent = React.forwardRef(_EllipsisContent);
|
|
7792
|
-
const LabelContainer$1 = styled.styled.div.withConfig({
|
|
7793
|
-
componentId: "sc-1likhxd-0"
|
|
7794
|
-
})(["display:grid;grid-template-columns:", ";align-items:center;justify-content:flex-start;width:100%;width:-webkit-fill-available;width:fill-available;width:stretch;gap:", ";"], ({
|
|
7795
|
-
$hasIcon,
|
|
7796
|
-
$iconDir
|
|
7797
|
-
}) => `${$hasIcon && $iconDir === "start" ? "auto " : ""}1fr${$hasIcon && $iconDir === "end" ? " auto" : ""}`, ({
|
|
7798
|
-
theme: theme2
|
|
7799
|
-
}) => theme2.click.sidebar.navigation.item.default.space.gap);
|
|
7800
7866
|
const IconWrapper$3 = ({
|
|
7801
7867
|
icon,
|
|
7802
7868
|
iconDir = "start",
|
|
@@ -7805,10 +7871,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
7805
7871
|
height,
|
|
7806
7872
|
children,
|
|
7807
7873
|
ellipsisContent = true,
|
|
7874
|
+
gap = "sm",
|
|
7808
7875
|
...props
|
|
7809
7876
|
}) => {
|
|
7810
7877
|
const TextWrapper2 = ellipsisContent ? EllipsisContent : "div";
|
|
7811
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7878
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Container, { orientation: "horizontal", gap, ...props, children: [
|
|
7812
7879
|
icon && iconDir === "start" && /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: size2, width, height }),
|
|
7813
7880
|
/* @__PURE__ */ jsxRuntime.jsx(TextWrapper2, { "data-testid": `${ellipsisContent ? "ellipsed" : "normal"}-icon-wrapper-text`, children }),
|
|
7814
7881
|
icon && iconDir === "end" && /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: size2, width, height })
|
|
@@ -8367,7 +8434,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
8367
8434
|
...delegated
|
|
8368
8435
|
}) => {
|
|
8369
8436
|
const [isVisible, setIsVisible] = React.useState(true);
|
|
8370
|
-
return isVisible ? /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$
|
|
8437
|
+
return isVisible ? /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$c, { $size: size2, $state: state, $type: type, "data-testid": "click-alert", ...delegated, children: [
|
|
8371
8438
|
dismissible && type === "banner" && /* @__PURE__ */ jsxRuntime.jsx(DismissWrapper$1, {}),
|
|
8372
8439
|
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] }) }),
|
|
8373
8440
|
/* @__PURE__ */ jsxRuntime.jsxs(TextWrapper, { $state: state, $size: size2, children: [
|
|
@@ -8377,7 +8444,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
8377
8444
|
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" }) })
|
|
8378
8445
|
] }) : null;
|
|
8379
8446
|
};
|
|
8380
|
-
const Wrapper$
|
|
8447
|
+
const Wrapper$c = styled.styled.div.withConfig({
|
|
8381
8448
|
componentId: "sc-1wvczk0-0"
|
|
8382
8449
|
})(["display:flex;border-radius:", ";justify-content:", ";overflow:hidden;background-color:", ";color:", ";width:100%;"], ({
|
|
8383
8450
|
$type,
|
|
@@ -9231,7 +9298,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
9231
9298
|
font: ${theme2.click.avatar.typography.label[$textSize].hover};
|
|
9232
9299
|
}
|
|
9233
9300
|
`);
|
|
9234
|
-
const Wrapper$
|
|
9301
|
+
const Wrapper$b = styled.styled.div.withConfig({
|
|
9235
9302
|
componentId: "sc-471xo0-0"
|
|
9236
9303
|
})(["display:inline-flex;", ""], ({
|
|
9237
9304
|
$state = "default",
|
|
@@ -9288,7 +9355,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
9288
9355
|
onClose,
|
|
9289
9356
|
ellipsisContent = true,
|
|
9290
9357
|
...props
|
|
9291
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(Wrapper$
|
|
9358
|
+
}) => /* @__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: [
|
|
9292
9359
|
/* @__PURE__ */ jsxRuntime.jsx(BadgeContent, { as: IconWrapper$3, icon, iconDir, size: size2, $state: state, ellipsisContent, children: text2 }),
|
|
9293
9360
|
dismissible && /* @__PURE__ */ jsxRuntime.jsx(SvgContainer, { name: "cross", $state: state, as: SvgImage, onClick: onClose, "aria-label": "close" })
|
|
9294
9361
|
] }) });
|
|
@@ -9303,11 +9370,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
9303
9370
|
state = "default",
|
|
9304
9371
|
title = "Title",
|
|
9305
9372
|
...props
|
|
9306
|
-
}) => /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$
|
|
9373
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(Wrapper$a, { $height: height, $order: order, $size: size2, $spacing: spacing, $state: state, $fillWidth: fillWidth, $maxWidth: maxWidth, ...props, children: [
|
|
9307
9374
|
/* @__PURE__ */ jsxRuntime.jsx(Label, { $state: state, $size: size2, children: label }),
|
|
9308
9375
|
/* @__PURE__ */ jsxRuntime.jsx(Title$3, { $state: state, $size: size2, children: title })
|
|
9309
9376
|
] });
|
|
9310
|
-
const Wrapper$
|
|
9377
|
+
const Wrapper$a = styled.styled.div.withConfig({
|
|
9311
9378
|
componentId: "sc-u5029o-0"
|
|
9312
9379
|
})(["display:flex;justify-content:center;box-sizing:border-box;", ""], ({
|
|
9313
9380
|
$fillWidth = false,
|
|
@@ -9534,7 +9601,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
9534
9601
|
})(["display:flex;flex-direction:column;align-self:start;gap:", ";flex:1;width:100%;"], ({
|
|
9535
9602
|
theme: theme2
|
|
9536
9603
|
}) => theme2.click.card.horizontal.space.gap);
|
|
9537
|
-
const Wrapper$
|
|
9604
|
+
const Wrapper$9 = styled.styled.div.withConfig({
|
|
9538
9605
|
componentId: "sc-1qnbjoa-2"
|
|
9539
9606
|
})(["display:inline-flex;width:100%;max-width:100%;align-items:center;justify-content:flex-start;", ""], ({
|
|
9540
9607
|
theme: theme2,
|
|
@@ -9640,7 +9707,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
9640
9707
|
window.open(infoUrl, "_blank");
|
|
9641
9708
|
}
|
|
9642
9709
|
};
|
|
9643
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$
|
|
9710
|
+
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: [
|
|
9644
9711
|
/* @__PURE__ */ jsxRuntime.jsxs(IconTextContentWrapper, { children: [
|
|
9645
9712
|
icon && /* @__PURE__ */ jsxRuntime.jsx(CardIcon$1, { name: icon, "aria-hidden": true }),
|
|
9646
9713
|
/* @__PURE__ */ jsxRuntime.jsxs(Container, { padding: "none", orientation: "vertical", children: [
|
|
@@ -9708,80 +9775,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
9708
9775
|
}) => $fillWidth && "width: 100%");
|
|
9709
9776
|
_Text.displayName = "Text";
|
|
9710
9777
|
const Text = React.forwardRef(_Text);
|
|
9711
|
-
const _Container = ({
|
|
9712
|
-
component,
|
|
9713
|
-
alignItems,
|
|
9714
|
-
children,
|
|
9715
|
-
fillWidth = true,
|
|
9716
|
-
gap = "none",
|
|
9717
|
-
grow,
|
|
9718
|
-
shrink,
|
|
9719
|
-
isResponsive,
|
|
9720
|
-
justifyContent = "start",
|
|
9721
|
-
maxWidth,
|
|
9722
|
-
minWidth,
|
|
9723
|
-
orientation = "horizontal",
|
|
9724
|
-
padding = "none",
|
|
9725
|
-
wrap = "nowrap",
|
|
9726
|
-
fillHeight,
|
|
9727
|
-
maxHeight,
|
|
9728
|
-
minHeight,
|
|
9729
|
-
overflow,
|
|
9730
|
-
...props
|
|
9731
|
-
}, ref) => {
|
|
9732
|
-
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 });
|
|
9733
|
-
};
|
|
9734
|
-
const Wrapper$9 = styled.styled.div.withConfig({
|
|
9735
|
-
componentId: "sc-bcplth-0"
|
|
9736
|
-
})(["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:", ";}"], ({
|
|
9737
|
-
$grow,
|
|
9738
|
-
$shrink
|
|
9739
|
-
}) => `
|
|
9740
|
-
${$grow && `flex: ${$grow}`};
|
|
9741
|
-
${$shrink && `flex-shrink: ${$shrink}`};
|
|
9742
|
-
`, ({
|
|
9743
|
-
$fillHeight,
|
|
9744
|
-
$maxHeight,
|
|
9745
|
-
$minHeight
|
|
9746
|
-
}) => `
|
|
9747
|
-
${$fillHeight && "height: 100%"};
|
|
9748
|
-
${$maxHeight && `max-height: ${$maxHeight}`};
|
|
9749
|
-
${$minHeight && `min-height: ${$minHeight}`};
|
|
9750
|
-
`, ({
|
|
9751
|
-
$overflow
|
|
9752
|
-
}) => `
|
|
9753
|
-
${$overflow && `overflow: ${$overflow}`};
|
|
9754
|
-
`, ({
|
|
9755
|
-
$wrap = "nowrap"
|
|
9756
|
-
}) => $wrap, ({
|
|
9757
|
-
theme: theme2,
|
|
9758
|
-
$gapSize
|
|
9759
|
-
}) => theme2.click.container.gap[$gapSize], ({
|
|
9760
|
-
$maxWidth
|
|
9761
|
-
}) => $maxWidth ?? "none", ({
|
|
9762
|
-
$minWidth
|
|
9763
|
-
}) => $minWidth ?? "auto", ({
|
|
9764
|
-
theme: theme2,
|
|
9765
|
-
$paddingSize
|
|
9766
|
-
}) => theme2.click.container.space[$paddingSize], ({
|
|
9767
|
-
$fillWidth = true
|
|
9768
|
-
}) => $fillWidth === true ? "100%" : "auto", ({
|
|
9769
|
-
$orientation = "horizontal"
|
|
9770
|
-
}) => $orientation === "horizontal" ? "row" : "column", ({
|
|
9771
|
-
$alignItems = "center"
|
|
9772
|
-
}) => $alignItems, ({
|
|
9773
|
-
$justifyContent = "left"
|
|
9774
|
-
}) => $justifyContent === "start" ? "start" : `${$justifyContent}`, ({
|
|
9775
|
-
theme: theme2
|
|
9776
|
-
}) => theme2.breakpoint.sizes.md, ({
|
|
9777
|
-
$isResponsive = true,
|
|
9778
|
-
$fillWidth = true
|
|
9779
|
-
}) => $isResponsive === true ? "100%" : $fillWidth === true ? "100%" : "auto", ({
|
|
9780
|
-
$isResponsive = true
|
|
9781
|
-
}) => $isResponsive === true ? "none" : "auto", ({
|
|
9782
|
-
$isResponsive = true
|
|
9783
|
-
}) => $isResponsive === true ? "column" : "auto");
|
|
9784
|
-
const Container = React.forwardRef(_Container);
|
|
9785
9778
|
const TopBadgeWrapper = styled.styled(Container).withConfig({
|
|
9786
9779
|
componentId: "sc-1d5pqpo-0"
|
|
9787
9780
|
})(["position:relative;"]);
|
|
@@ -34681,6 +34674,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
34681
34674
|
color: ${theme2.click.genericMenu.button.color.label.default};
|
|
34682
34675
|
cursor: ${$clickable ? "pointer" : "default"}
|
|
34683
34676
|
`);
|
|
34677
|
+
const SelectItemDescriptionText = styled.styled.div.withConfig({
|
|
34678
|
+
componentId: "sc-oudbwg-14"
|
|
34679
|
+
})(["white-space:normal;[data-disabled] &,[disabled] &{color:inherit;}", " &{display:none;}"], StyledSelectTrigger);
|
|
34684
34680
|
const OptionContext = React.createContext({
|
|
34685
34681
|
search: "",
|
|
34686
34682
|
selectedValues: [],
|
|
@@ -37966,7 +37962,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
37966
37962
|
children,
|
|
37967
37963
|
label
|
|
37968
37964
|
} = valueNode ?? {};
|
|
37969
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SelectValueContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, children: label ?? children ?? value }) });
|
|
37965
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectValueContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ?? children ?? value }) });
|
|
37970
37966
|
};
|
|
37971
37967
|
const useOption = () => {
|
|
37972
37968
|
const result = React.useContext(OptionContext);
|
|
@@ -38225,14 +38221,11 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38225
38221
|
options: itemList = [],
|
|
38226
38222
|
...groupProps
|
|
38227
38223
|
} = props2;
|
|
38228
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SelectGroup, { ...groupProps, children: itemList.map(({
|
|
38229
|
-
label: label2,
|
|
38230
|
-
...itemProps
|
|
38231
|
-
}, itemIndex) => {
|
|
38224
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectGroup, { ...groupProps, children: itemList.map((itemProps, itemIndex) => {
|
|
38232
38225
|
if (checkbox) {
|
|
38233
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MultiSelectCheckboxItem, { ...itemProps
|
|
38226
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MultiSelectCheckboxItem, { ...itemProps }, `select-${id}-group-${index2}-item-${itemIndex}`);
|
|
38234
38227
|
}
|
|
38235
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { ...itemProps
|
|
38228
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { ...itemProps }, `select-${id}-group-${index2}-item-${itemIndex}`);
|
|
38236
38229
|
}) }, `select-${id}-group-${index2}`);
|
|
38237
38230
|
} else {
|
|
38238
38231
|
if (checkbox) {
|
|
@@ -38279,6 +38272,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38279
38272
|
disabled = false,
|
|
38280
38273
|
children,
|
|
38281
38274
|
label,
|
|
38275
|
+
description,
|
|
38282
38276
|
separator,
|
|
38283
38277
|
onSelect: onSelectProp,
|
|
38284
38278
|
value = "",
|
|
@@ -38316,7 +38310,10 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38316
38310
|
const isChecked = selectedValues.includes(value);
|
|
38317
38311
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
38318
38312
|
/* @__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: [
|
|
38319
|
-
/* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, children: label
|
|
38313
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
38314
|
+
label,
|
|
38315
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(SelectItemDescription, { children: description })
|
|
38316
|
+
] }) : children }),
|
|
38320
38317
|
/* @__PURE__ */ jsxRuntime.jsx(CheckIcon$1, { as: SvgImage, name: "check", size: "sm", $showCheck: isChecked })
|
|
38321
38318
|
] }),
|
|
38322
38319
|
separator && /* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "sm" })
|
|
@@ -38329,6 +38326,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38329
38326
|
icon,
|
|
38330
38327
|
iconDir = "end",
|
|
38331
38328
|
label,
|
|
38329
|
+
description,
|
|
38332
38330
|
onMouseOver: onMouseOverProp,
|
|
38333
38331
|
onSelect: onSelectProp,
|
|
38334
38332
|
separator,
|
|
@@ -38343,7 +38341,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38343
38341
|
selectedValues,
|
|
38344
38342
|
onSelect
|
|
38345
38343
|
} = useOption();
|
|
38346
|
-
const
|
|
38344
|
+
const handleMenuItemClick = (evt) => {
|
|
38347
38345
|
if (!disabled) {
|
|
38348
38346
|
onSelect(value, void 0, evt);
|
|
38349
38347
|
if (typeof onSelectProp === "function") {
|
|
@@ -38351,15 +38349,6 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38351
38349
|
}
|
|
38352
38350
|
}
|
|
38353
38351
|
};
|
|
38354
|
-
const handleMenuItemClick = (evt) => {
|
|
38355
|
-
if (evt.target !== evt.currentTarget) {
|
|
38356
|
-
return;
|
|
38357
|
-
}
|
|
38358
|
-
handleSelect(evt);
|
|
38359
|
-
};
|
|
38360
|
-
const handleCheckboxClick = (evt) => {
|
|
38361
|
-
handleSelect(evt);
|
|
38362
|
-
};
|
|
38363
38352
|
const handleMenuItemMouseOver = (e) => {
|
|
38364
38353
|
if (onMouseOverProp) {
|
|
38365
38354
|
onMouseOverProp(e);
|
|
@@ -38373,27 +38362,24 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38373
38362
|
}
|
|
38374
38363
|
const isChecked = selectedValues.includes(value);
|
|
38375
38364
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
38376
|
-
/* @__PURE__ */ jsxRuntime.
|
|
38377
|
-
|
|
38378
|
-
|
|
38379
|
-
|
|
38380
|
-
|
|
38381
|
-
|
|
38382
|
-
|
|
38383
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
38384
|
-
display: "flex",
|
|
38385
|
-
justifyContent: "center"
|
|
38386
|
-
}, children: [
|
|
38387
|
-
/* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: "sm" }),
|
|
38388
|
-
children
|
|
38389
|
-
] }), onClick: handleCheckboxClick, variant: variant ?? "default" }),
|
|
38390
|
-
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" }) }),
|
|
38391
|
-
!icon && /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, label: label ?? children, onClick: handleCheckboxClick, variant: variant ?? "default" })
|
|
38392
|
-
] }),
|
|
38365
|
+
/* @__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: [
|
|
38366
|
+
/* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: isChecked, "data-testid": "multi-select-checkbox", disabled, variant: variant ?? "default" }),
|
|
38367
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconWrapper$3, { icon, iconDir, gap: "xxs", children: label ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
38368
|
+
label,
|
|
38369
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(SelectItemDescription, { children: description })
|
|
38370
|
+
] }) : children })
|
|
38371
|
+
] }) }),
|
|
38393
38372
|
separator && /* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "sm" })
|
|
38394
38373
|
] });
|
|
38395
38374
|
});
|
|
38396
38375
|
MultiSelectCheckboxItem.displayName = "Select.Item";
|
|
38376
|
+
const SelectItemDescription = React.forwardRef(({
|
|
38377
|
+
children,
|
|
38378
|
+
...props
|
|
38379
|
+
}) => {
|
|
38380
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Text, { component: SelectItemDescriptionText, color: "muted", ...props, children });
|
|
38381
|
+
});
|
|
38382
|
+
SelectItemDescription.displayName = "Select.ItemDescription";
|
|
38397
38383
|
const Select = ({
|
|
38398
38384
|
value: valueProp,
|
|
38399
38385
|
defaultValue,
|
|
@@ -38441,6 +38427,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38441
38427
|
};
|
|
38442
38428
|
Select.Group = SelectGroup;
|
|
38443
38429
|
Select.Item = SelectItem;
|
|
38430
|
+
Select.ItemDescription = SelectItemDescription;
|
|
38444
38431
|
const MultiSelect = ({
|
|
38445
38432
|
value: valueProp,
|
|
38446
38433
|
defaultValue,
|
|
@@ -38486,6 +38473,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38486
38473
|
};
|
|
38487
38474
|
MultiSelect.Group = SelectGroup;
|
|
38488
38475
|
MultiSelect.Item = SelectItem;
|
|
38476
|
+
MultiSelect.ItemDescription = SelectItemDescription;
|
|
38489
38477
|
const CheckboxMultiSelect = ({
|
|
38490
38478
|
value: valueProp,
|
|
38491
38479
|
defaultValue,
|
|
@@ -38532,6 +38520,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
38532
38520
|
};
|
|
38533
38521
|
CheckboxMultiSelect.Group = SelectGroup;
|
|
38534
38522
|
CheckboxMultiSelect.Item = MultiSelectCheckboxItem;
|
|
38523
|
+
CheckboxMultiSelect.ItemDescription = SelectItemDescription;
|
|
38535
38524
|
const $89eedd556c436f6a$var$DEFAULT_ORIENTATION = "horizontal";
|
|
38536
38525
|
const $89eedd556c436f6a$var$ORIENTATIONS = [
|
|
38537
38526
|
"horizontal",
|
|
@@ -41264,7 +41253,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
41264
41253
|
`);
|
|
41265
41254
|
const ToastDescriptionContainer = styled.styled.div.withConfig({
|
|
41266
41255
|
componentId: "sc-tmc8vl-3"
|
|
41267
|
-
})(["display:flex;justify-content:space-between;width:100%;align-items:flex-end;gap:inherit;", ""], ({
|
|
41256
|
+
})(["display:flex;flex-direction:column;justify-content:space-between;width:100%;align-items:flex-end;gap:inherit;", ""], ({
|
|
41268
41257
|
theme: theme2
|
|
41269
41258
|
}) => `
|
|
41270
41259
|
font: ${theme2.click.toast.typography.title.default};
|
|
@@ -41308,7 +41297,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
41308
41297
|
actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ToastDescriptionContent, { children: actions.map(({
|
|
41309
41298
|
altText,
|
|
41310
41299
|
...btnProps
|
|
41311
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx($054eb8030ebde76e$export$e19cd5f9376f8cee, { altText, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { ...btnProps }) })) })
|
|
41300
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx($054eb8030ebde76e$export$e19cd5f9376f8cee, { altText, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { ...btnProps }) }) }, altText)) })
|
|
41312
41301
|
] })
|
|
41313
41302
|
] });
|
|
41314
41303
|
};
|
|
@@ -41333,13 +41322,21 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
41333
41322
|
align = "end",
|
|
41334
41323
|
...props
|
|
41335
41324
|
}) => {
|
|
41336
|
-
const [toasts, setToasts] = React.useState(
|
|
41325
|
+
const [toasts, setToasts] = React.useState({
|
|
41326
|
+
start: /* @__PURE__ */ new Map(),
|
|
41327
|
+
end: /* @__PURE__ */ new Map()
|
|
41328
|
+
});
|
|
41337
41329
|
React.useEffect(() => {
|
|
41338
41330
|
const listener = (toast) => {
|
|
41339
41331
|
setToasts((currentToasts) => {
|
|
41340
|
-
const
|
|
41341
|
-
|
|
41342
|
-
|
|
41332
|
+
const alignment = toast.align ?? "end";
|
|
41333
|
+
const newToasts = {
|
|
41334
|
+
...currentToasts
|
|
41335
|
+
};
|
|
41336
|
+
const map2 = new Map(newToasts[alignment]);
|
|
41337
|
+
map2.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
|
|
41338
|
+
newToasts[alignment] = map2;
|
|
41339
|
+
return newToasts;
|
|
41343
41340
|
});
|
|
41344
41341
|
};
|
|
41345
41342
|
toastsEventEmitter.on(listener);
|
|
@@ -41348,28 +41345,36 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
41348
41345
|
const onClose = (id) => (open2) => {
|
|
41349
41346
|
if (!open2) {
|
|
41350
41347
|
setToasts((currentToasts) => {
|
|
41351
|
-
const
|
|
41352
|
-
|
|
41353
|
-
|
|
41348
|
+
const newToasts = {
|
|
41349
|
+
...currentToasts
|
|
41350
|
+
};
|
|
41351
|
+
const map2 = new Map(newToasts[align]);
|
|
41352
|
+
map2.delete(id);
|
|
41353
|
+
newToasts[align] = map2;
|
|
41354
|
+
return newToasts;
|
|
41354
41355
|
});
|
|
41355
41356
|
}
|
|
41356
41357
|
};
|
|
41357
41358
|
const value = {
|
|
41358
|
-
createToast: (toast) => {
|
|
41359
|
+
createToast: (toast, toastAlign = align) => {
|
|
41359
41360
|
setToasts((currentToasts) => {
|
|
41360
|
-
const
|
|
41361
|
-
|
|
41362
|
-
|
|
41361
|
+
const newToasts = {
|
|
41362
|
+
...currentToasts
|
|
41363
|
+
};
|
|
41364
|
+
const map2 = new Map(newToasts[toastAlign]);
|
|
41365
|
+
map2.set((toast == null ? void 0 : toast.id) ?? String(Date.now()), toast);
|
|
41366
|
+
newToasts[toastAlign] = map2;
|
|
41367
|
+
return newToasts;
|
|
41363
41368
|
});
|
|
41364
41369
|
}
|
|
41365
41370
|
};
|
|
41366
41371
|
return /* @__PURE__ */ jsxRuntime.jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: align === "start" ? "left" : "right", ...props, children: [
|
|
41367
41372
|
/* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
|
|
41368
41373
|
children,
|
|
41369
|
-
Array.from(toasts).map(([id, toast]) => /* @__PURE__ */ jsxRuntime.jsx(Toast, { ...toast, onClose: onClose(id) }, id))
|
|
41374
|
+
Array.from(toasts[align]).map(([id, toast]) => /* @__PURE__ */ jsxRuntime.jsx(Toast, { ...toast, onClose: onClose(id) }, id))
|
|
41370
41375
|
] }),
|
|
41371
41376
|
/* @__PURE__ */ jsxRuntime.jsx(Viewport, { $align: align })
|
|
41372
|
-
] });
|
|
41377
|
+
] }, `toast-provider-${align}`);
|
|
41373
41378
|
};
|
|
41374
41379
|
function listCacheClear$1() {
|
|
41375
41380
|
this.__data__ = [];
|
|
@@ -50901,6 +50906,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
50901
50906
|
exports2.TextAreaField = TextAreaField;
|
|
50902
50907
|
exports2.TextField = TextField;
|
|
50903
50908
|
exports2.Title = Title$2;
|
|
50909
|
+
exports2.Toast = Toast;
|
|
50904
50910
|
exports2.ToastProvider = ToastProvider;
|
|
50905
50911
|
exports2.Tooltip = Tooltip;
|
|
50906
50912
|
exports2.VerticalStepper = VerticalStepper;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { HorizontalDirection, IconName } from '..';
|
|
3
|
+
import { GapOptions } from '../Container/Container';
|
|
3
4
|
import { IconSize } from '../Icon/types';
|
|
4
5
|
|
|
5
6
|
interface IconWrapperProps {
|
|
@@ -10,6 +11,7 @@ interface IconWrapperProps {
|
|
|
10
11
|
height?: number | string;
|
|
11
12
|
children: ReactNode;
|
|
12
13
|
ellipsisContent?: boolean;
|
|
14
|
+
gap?: GapOptions;
|
|
13
15
|
}
|
|
14
|
-
declare const IconWrapper: ({ icon, iconDir, size, width, height, children, ellipsisContent, ...props }: IconWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const IconWrapper: ({ icon, iconDir, size, width, height, children, ellipsisContent, gap, ...props }: IconWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export default IconWrapper;
|
|
@@ -7,4 +7,5 @@ export declare const CheckboxMultiSelect: {
|
|
|
7
7
|
({ value: valueProp, defaultValue, onSelect: onSelectProp, options, children, onOpenChange: onOpenChangeProp, selectLabel, ...props }: CheckboxMultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
Group: import('react').ForwardRefExoticComponent<import('./common/types').SelectGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
9
|
Item: import('react').ForwardRefExoticComponent<import('./common/InternalSelect').MultiSelectCheckboxItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
+
ItemDescription: import('react').ForwardRefExoticComponent<import('..').TextProps<"p"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
11
|
};
|
|
@@ -12,4 +12,5 @@ export declare const MultiSelect: {
|
|
|
12
12
|
({ value: valueProp, defaultValue, onSelect: onSelectProp, options, children, onOpenChange: onOpenChangeProp, ...props }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
Group: import('react').ForwardRefExoticComponent<import('./common/types').SelectGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
14
|
Item: import('react').ForwardRefExoticComponent<import('./common/types').SelectItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
|
+
ItemDescription: import('react').ForwardRefExoticComponent<import('..').TextProps<"p"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
16
|
};
|
|
@@ -14,4 +14,5 @@ export declare const Select: {
|
|
|
14
14
|
({ value: valueProp, defaultValue, onSelect: onSelectProp, options, children, onOpenChange: onOpenChangeProp, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
Group: import('react').ForwardRefExoticComponent<import('./common/types').SelectGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
16
16
|
Item: import('react').ForwardRefExoticComponent<import('./common/types').SelectItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
|
+
ItemDescription: import('react').ForwardRefExoticComponent<import('..').TextProps<"p"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
18
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectContainerProps, SelectGroupProps, SelectItemProps } from './types';
|
|
2
|
-
import { CheckboxVariants } from '../..';
|
|
2
|
+
import { CheckboxVariants, TextProps } from '../..';
|
|
3
3
|
|
|
4
4
|
export declare const InternalSelect: ({ label, children, orientation, dir, disabled, id, error, value: selectedValues, onChange, onSelect, open, onOpenChange, name, form, allowCreateOption, customText, options, sortable, placeholder, multiple, checkbox, selectLabel, showSearch, container, useFullWidthItems, itemCharacterLimit, ...props }: SelectContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const SelectGroup: import('react').ForwardRefExoticComponent<SelectGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -8,3 +8,4 @@ export type MultiSelectCheckboxItemProps = SelectItemProps & {
|
|
|
8
8
|
variant?: CheckboxVariants;
|
|
9
9
|
};
|
|
10
10
|
export declare const MultiSelectCheckboxItem: import('react').ForwardRefExoticComponent<MultiSelectCheckboxItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export declare const SelectItemDescription: import('react').ForwardRefExoticComponent<TextProps<"p"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -29,3 +29,4 @@ export declare const SelectGroupContent: import('styled-components/dist/types').
|
|
|
29
29
|
export declare const SelectNoDataContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
30
30
|
$clickable: boolean;
|
|
31
31
|
}>> & string;
|
|
32
|
+
export declare const SelectItemDescriptionText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -14,10 +14,12 @@ interface SelectItemComponentProps extends Omit<DivProps, "disabled" | "onSelect
|
|
|
14
14
|
type SelectItemChildren = {
|
|
15
15
|
children: ReactNode;
|
|
16
16
|
label?: never;
|
|
17
|
+
description?: never;
|
|
17
18
|
};
|
|
18
19
|
type SelectItemLabel = {
|
|
19
20
|
children?: never;
|
|
20
21
|
label: ReactNode;
|
|
22
|
+
description?: ReactNode;
|
|
21
23
|
};
|
|
22
24
|
export type SelectItemProps = SelectItemComponentProps & (SelectItemChildren | SelectItemLabel);
|
|
23
25
|
export interface SelectGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "heading"> {
|
|
@@ -25,14 +27,13 @@ export interface SelectGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "
|
|
|
25
27
|
value?: never;
|
|
26
28
|
onSelect?: never;
|
|
27
29
|
}
|
|
28
|
-
export interface SelectOptionItem extends Omit<SelectItemProps, "children" | "label"> {
|
|
29
|
-
heading?: never;
|
|
30
|
+
export interface SelectOptionItem extends Omit<SelectItemProps, "children" | "label" | "description"> {
|
|
30
31
|
label: ReactNode;
|
|
32
|
+
description?: ReactNode;
|
|
31
33
|
[key: `data-${string}`]: string;
|
|
32
34
|
}
|
|
33
|
-
interface SelectGroupOptionItem extends Omit<SelectGroupProps, "children" | "label"> {
|
|
35
|
+
interface SelectGroupOptionItem extends Omit<SelectGroupProps, "children" | "label" | "description"> {
|
|
34
36
|
options: Array<SelectOptionItem>;
|
|
35
|
-
label?: never;
|
|
36
37
|
[key: `data-${string}`]: string;
|
|
37
38
|
}
|
|
38
39
|
export type SelectOptionListItem = SelectGroupOptionItem | SelectOptionItem;
|
|
@@ -3,9 +3,10 @@ import { ButtonProps } from '..';
|
|
|
3
3
|
|
|
4
4
|
import * as RadixUIToast from "@radix-ui/react-toast";
|
|
5
5
|
export interface ToastContextProps {
|
|
6
|
-
createToast: (toast: ToastProps) => void;
|
|
6
|
+
createToast: (toast: ToastProps, align?: ToastAlignment) => void;
|
|
7
7
|
}
|
|
8
8
|
export declare const ToastContext: import('react').Context<ToastContextProps>;
|
|
9
|
+
export type ToastAlignment = "start" | "end";
|
|
9
10
|
export type ToastType = "danger" | "warning" | "default" | "success";
|
|
10
11
|
export interface ToastProps {
|
|
11
12
|
id?: string;
|
|
@@ -17,8 +18,12 @@ export interface ToastProps {
|
|
|
17
18
|
actions?: Array<ButtonProps & {
|
|
18
19
|
altText: string;
|
|
19
20
|
}>;
|
|
21
|
+
align?: ToastAlignment;
|
|
20
22
|
}
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
+
export declare const Toast: ({ type, title, description, actions, duration, onClose, }: ToastProps & {
|
|
24
|
+
onClose: (open: boolean) => void;
|
|
25
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export interface ToastProviderProps extends RadixUIToast.ToastProviderProps {
|
|
27
|
+
align?: ToastAlignment;
|
|
23
28
|
}
|
|
24
29
|
export declare const ToastProvider: ({ children, align, ...props }: ToastProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -69,4 +69,4 @@ export { createToast } from './Toast/toastEmitter';
|
|
|
69
69
|
export { UserIcon as ProfileIcon } from './icons/UserIcon';
|
|
70
70
|
export { default as VerticalStepper } from './VerticalStepper/VerticalStepper';
|
|
71
71
|
export { MultiAccordion } from './MultiAccordion/MultiAccordion';
|
|
72
|
-
export { ToastProvider } from './Toast/Toast';
|
|
72
|
+
export { ToastProvider, Toast } from './Toast/Toast';
|