design-zystem 1.0.258 → 1.0.260
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/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +12 -19
- package/dist/index.mjs +12 -19
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -235,6 +235,7 @@ interface BubbleProps {
|
|
|
235
235
|
borderRadius?: string;
|
|
236
236
|
width?: string;
|
|
237
237
|
style?: CSSProperties;
|
|
238
|
+
onClick?: () => void;
|
|
238
239
|
}
|
|
239
240
|
declare const Bubble: ({ children, ...otherProps }: BubbleProps) => react_jsx_runtime.JSX.Element;
|
|
240
241
|
|
|
@@ -295,6 +296,7 @@ interface LinkProps {
|
|
|
295
296
|
underline?: boolean;
|
|
296
297
|
style?: CSSProperties;
|
|
297
298
|
className?: string;
|
|
299
|
+
onClick?: () => void;
|
|
298
300
|
}
|
|
299
301
|
declare const Link: ({ children, url, newTab, download, size, variant, ...rest }: LinkProps) => react_jsx_runtime.JSX.Element;
|
|
300
302
|
|
|
@@ -316,8 +318,8 @@ declare const Avatar: ({ name, src, backgroundColor, textColor, size, shape, bad
|
|
|
316
318
|
interface ButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
317
319
|
label?: string;
|
|
318
320
|
children?: ReactNode;
|
|
319
|
-
iconLeft?:
|
|
320
|
-
iconRight?:
|
|
321
|
+
iconLeft?: ReactNode;
|
|
322
|
+
iconRight?: ReactNode;
|
|
321
323
|
iconColor?: string;
|
|
322
324
|
variant?: string;
|
|
323
325
|
outline?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -235,6 +235,7 @@ interface BubbleProps {
|
|
|
235
235
|
borderRadius?: string;
|
|
236
236
|
width?: string;
|
|
237
237
|
style?: CSSProperties;
|
|
238
|
+
onClick?: () => void;
|
|
238
239
|
}
|
|
239
240
|
declare const Bubble: ({ children, ...otherProps }: BubbleProps) => react_jsx_runtime.JSX.Element;
|
|
240
241
|
|
|
@@ -295,6 +296,7 @@ interface LinkProps {
|
|
|
295
296
|
underline?: boolean;
|
|
296
297
|
style?: CSSProperties;
|
|
297
298
|
className?: string;
|
|
299
|
+
onClick?: () => void;
|
|
298
300
|
}
|
|
299
301
|
declare const Link: ({ children, url, newTab, download, size, variant, ...rest }: LinkProps) => react_jsx_runtime.JSX.Element;
|
|
300
302
|
|
|
@@ -316,8 +318,8 @@ declare const Avatar: ({ name, src, backgroundColor, textColor, size, shape, bad
|
|
|
316
318
|
interface ButtonProps extends HTMLAttributes<HTMLButtonElement> {
|
|
317
319
|
label?: string;
|
|
318
320
|
children?: ReactNode;
|
|
319
|
-
iconLeft?:
|
|
320
|
-
iconRight?:
|
|
321
|
+
iconLeft?: ReactNode;
|
|
322
|
+
iconRight?: ReactNode;
|
|
321
323
|
iconColor?: string;
|
|
322
324
|
variant?: string;
|
|
323
325
|
outline?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1021,6 +1021,15 @@ var Button = (_a) => {
|
|
|
1021
1021
|
]);
|
|
1022
1022
|
const ref = (0, import_react3.useRef)(null);
|
|
1023
1023
|
const sizeConfig = defaultSizes[size];
|
|
1024
|
+
const renderIconSlot = (icon) => typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1025
|
+
Icon,
|
|
1026
|
+
{
|
|
1027
|
+
name: icon,
|
|
1028
|
+
size,
|
|
1029
|
+
family: "regular",
|
|
1030
|
+
color: outline ? variant : iconColor
|
|
1031
|
+
}
|
|
1032
|
+
) : icon;
|
|
1024
1033
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1025
1034
|
StyledButton,
|
|
1026
1035
|
__spreadProps(__spreadValues({
|
|
@@ -1035,20 +1044,12 @@ var Button = (_a) => {
|
|
|
1035
1044
|
sizeConfig,
|
|
1036
1045
|
disabled: disabled || isLoading,
|
|
1037
1046
|
"aria-busy": isLoading ? "true" : void 0,
|
|
1038
|
-
iconOnly: (iconLeft || iconRight) && !label
|
|
1047
|
+
iconOnly: Boolean(iconLeft || iconRight) && !label
|
|
1039
1048
|
}, rest), {
|
|
1040
1049
|
children: [
|
|
1041
1050
|
isLoading && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Loader, {}),
|
|
1042
1051
|
!isLoading && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Row, { gap: "8", fullwidth: true, justifyContent: "center", alignItems: "center", children: [
|
|
1043
|
-
iconLeft &&
|
|
1044
|
-
Icon,
|
|
1045
|
-
{
|
|
1046
|
-
name: iconLeft,
|
|
1047
|
-
size,
|
|
1048
|
-
family: "regular",
|
|
1049
|
-
color: outline ? variant : iconColor
|
|
1050
|
-
}
|
|
1051
|
-
),
|
|
1052
|
+
iconLeft && renderIconSlot(iconLeft),
|
|
1052
1053
|
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1053
1054
|
Text,
|
|
1054
1055
|
{
|
|
@@ -1058,15 +1059,7 @@ var Button = (_a) => {
|
|
|
1058
1059
|
children: label
|
|
1059
1060
|
}
|
|
1060
1061
|
),
|
|
1061
|
-
iconRight &&
|
|
1062
|
-
Icon,
|
|
1063
|
-
{
|
|
1064
|
-
name: iconRight,
|
|
1065
|
-
size,
|
|
1066
|
-
family: "regular",
|
|
1067
|
-
color: outline ? variant : iconColor
|
|
1068
|
-
}
|
|
1069
|
-
),
|
|
1062
|
+
iconRight && renderIconSlot(iconRight),
|
|
1070
1063
|
!label && children
|
|
1071
1064
|
] })
|
|
1072
1065
|
]
|
package/dist/index.mjs
CHANGED
|
@@ -889,6 +889,15 @@ var Button = (_a) => {
|
|
|
889
889
|
]);
|
|
890
890
|
const ref = useRef2(null);
|
|
891
891
|
const sizeConfig = defaultSizes[size];
|
|
892
|
+
const renderIconSlot = (icon) => typeof icon === "string" ? /* @__PURE__ */ jsx11(
|
|
893
|
+
Icon,
|
|
894
|
+
{
|
|
895
|
+
name: icon,
|
|
896
|
+
size,
|
|
897
|
+
family: "regular",
|
|
898
|
+
color: outline ? variant : iconColor
|
|
899
|
+
}
|
|
900
|
+
) : icon;
|
|
892
901
|
return /* @__PURE__ */ jsxs2(
|
|
893
902
|
StyledButton,
|
|
894
903
|
__spreadProps(__spreadValues({
|
|
@@ -903,20 +912,12 @@ var Button = (_a) => {
|
|
|
903
912
|
sizeConfig,
|
|
904
913
|
disabled: disabled || isLoading,
|
|
905
914
|
"aria-busy": isLoading ? "true" : void 0,
|
|
906
|
-
iconOnly: (iconLeft || iconRight) && !label
|
|
915
|
+
iconOnly: Boolean(iconLeft || iconRight) && !label
|
|
907
916
|
}, rest), {
|
|
908
917
|
children: [
|
|
909
918
|
isLoading && /* @__PURE__ */ jsx11(Loader, {}),
|
|
910
919
|
!isLoading && /* @__PURE__ */ jsxs2(Row, { gap: "8", fullwidth: true, justifyContent: "center", alignItems: "center", children: [
|
|
911
|
-
iconLeft &&
|
|
912
|
-
Icon,
|
|
913
|
-
{
|
|
914
|
-
name: iconLeft,
|
|
915
|
-
size,
|
|
916
|
-
family: "regular",
|
|
917
|
-
color: outline ? variant : iconColor
|
|
918
|
-
}
|
|
919
|
-
),
|
|
920
|
+
iconLeft && renderIconSlot(iconLeft),
|
|
920
921
|
label && /* @__PURE__ */ jsx11(
|
|
921
922
|
Text,
|
|
922
923
|
{
|
|
@@ -926,15 +927,7 @@ var Button = (_a) => {
|
|
|
926
927
|
children: label
|
|
927
928
|
}
|
|
928
929
|
),
|
|
929
|
-
iconRight &&
|
|
930
|
-
Icon,
|
|
931
|
-
{
|
|
932
|
-
name: iconRight,
|
|
933
|
-
size,
|
|
934
|
-
family: "regular",
|
|
935
|
-
color: outline ? variant : iconColor
|
|
936
|
-
}
|
|
937
|
-
),
|
|
930
|
+
iconRight && renderIconSlot(iconRight),
|
|
938
931
|
!label && children
|
|
939
932
|
] })
|
|
940
933
|
]
|