@clickhouse/click-ui 0.0.213 → 0.0.214
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.
|
@@ -15567,7 +15567,7 @@ const ConfirmationDialog = ({
|
|
|
15567
15567
|
/* @__PURE__ */ jsx(Separator, { size: "xl" }),
|
|
15568
15568
|
/* @__PURE__ */ jsxs(ActionsWrapper, { children: [
|
|
15569
15569
|
/* @__PURE__ */ jsx(Dialog.Close, { label: secondaryActionLabel, "data-testid": "cancel-action-button" }),
|
|
15570
|
-
/* @__PURE__ */ jsx(Dialog.Close, { loading: !!loading, disabled: !!disabled || !!loading, type: primaryActionType, label: primaryActionLabel, onClick: () => {
|
|
15570
|
+
/* @__PURE__ */ jsx(Dialog.Close, { loading: !!loading, disabled: !!disabled || !!loading, type: primaryActionType, label: primaryActionLabel, autoFocus: open2, onClick: () => {
|
|
15571
15571
|
if (onConfirm) {
|
|
15572
15572
|
onConfirm();
|
|
15573
15573
|
}
|
|
@@ -42437,11 +42437,13 @@ const Title = pt.div.withConfig({
|
|
|
42437
42437
|
})(["flex:1;"]);
|
|
42438
42438
|
const Toast = ({
|
|
42439
42439
|
type,
|
|
42440
|
+
toastType = "foreground",
|
|
42440
42441
|
title,
|
|
42441
42442
|
description,
|
|
42442
42443
|
actions = [],
|
|
42443
42444
|
duration: duration2,
|
|
42444
|
-
onClose
|
|
42445
|
+
onClose,
|
|
42446
|
+
...props
|
|
42445
42447
|
}) => {
|
|
42446
42448
|
let iconName = "";
|
|
42447
42449
|
if (type === "default") {
|
|
@@ -42451,7 +42453,7 @@ const Toast = ({
|
|
|
42451
42453
|
} else if (type && ["danger", "warning"].includes(type)) {
|
|
42452
42454
|
iconName = "warning";
|
|
42453
42455
|
}
|
|
42454
|
-
return /* @__PURE__ */ jsxs(ToastRoot, { onOpenChange: onClose, duration: duration2, children: [
|
|
42456
|
+
return /* @__PURE__ */ jsxs(ToastRoot, { onOpenChange: onClose, duration: duration2, type: toastType, ...props, children: [
|
|
42455
42457
|
/* @__PURE__ */ jsxs(ToastHeader, { children: [
|
|
42456
42458
|
iconName.length > 0 && /* @__PURE__ */ jsx(ToastIcon, { name: iconName, $type: type }),
|
|
42457
42459
|
/* @__PURE__ */ jsx(Title, { children: title }),
|
|
@@ -15583,7 +15583,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
15583
15583
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "xl" }),
|
|
15584
15584
|
/* @__PURE__ */ jsxRuntime.jsxs(ActionsWrapper, { children: [
|
|
15585
15585
|
/* @__PURE__ */ jsxRuntime.jsx(Dialog.Close, { label: secondaryActionLabel, "data-testid": "cancel-action-button" }),
|
|
15586
|
-
/* @__PURE__ */ jsxRuntime.jsx(Dialog.Close, { loading: !!loading, disabled: !!disabled || !!loading, type: primaryActionType, label: primaryActionLabel, onClick: () => {
|
|
15586
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog.Close, { loading: !!loading, disabled: !!disabled || !!loading, type: primaryActionType, label: primaryActionLabel, autoFocus: open2, onClick: () => {
|
|
15587
15587
|
if (onConfirm) {
|
|
15588
15588
|
onConfirm();
|
|
15589
15589
|
}
|
|
@@ -42453,11 +42453,13 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
42453
42453
|
})(["flex:1;"]);
|
|
42454
42454
|
const Toast = ({
|
|
42455
42455
|
type,
|
|
42456
|
+
toastType = "foreground",
|
|
42456
42457
|
title,
|
|
42457
42458
|
description,
|
|
42458
42459
|
actions = [],
|
|
42459
42460
|
duration: duration2,
|
|
42460
|
-
onClose
|
|
42461
|
+
onClose,
|
|
42462
|
+
...props
|
|
42461
42463
|
}) => {
|
|
42462
42464
|
let iconName = "";
|
|
42463
42465
|
if (type === "default") {
|
|
@@ -42467,7 +42469,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
42467
42469
|
} else if (type && ["danger", "warning"].includes(type)) {
|
|
42468
42470
|
iconName = "warning";
|
|
42469
42471
|
}
|
|
42470
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(ToastRoot, { onOpenChange: onClose, duration: duration2, children: [
|
|
42472
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ToastRoot, { onOpenChange: onClose, duration: duration2, type: toastType, ...props, children: [
|
|
42471
42473
|
/* @__PURE__ */ jsxRuntime.jsxs(ToastHeader, { children: [
|
|
42472
42474
|
iconName.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ToastIcon, { name: iconName, $type: type }),
|
|
42473
42475
|
/* @__PURE__ */ jsxRuntime.jsx(Title, { children: title }),
|
package/dist/click-ui.es.js
CHANGED
|
@@ -14399,7 +14399,7 @@ const ConfirmationDialog = ({
|
|
|
14399
14399
|
/* @__PURE__ */ jsx(Separator, { size: "xl" }),
|
|
14400
14400
|
/* @__PURE__ */ jsxs(ActionsWrapper, { children: [
|
|
14401
14401
|
/* @__PURE__ */ jsx(Dialog.Close, { label: secondaryActionLabel, "data-testid": "cancel-action-button" }),
|
|
14402
|
-
/* @__PURE__ */ jsx(Dialog.Close, { loading: !!loading, disabled: !!disabled || !!loading, type: primaryActionType, label: primaryActionLabel, onClick: () => {
|
|
14402
|
+
/* @__PURE__ */ jsx(Dialog.Close, { loading: !!loading, disabled: !!disabled || !!loading, type: primaryActionType, label: primaryActionLabel, autoFocus: open2, onClick: () => {
|
|
14403
14403
|
if (onConfirm) {
|
|
14404
14404
|
onConfirm();
|
|
14405
14405
|
}
|
|
@@ -41269,11 +41269,13 @@ const Title = styled.div.withConfig({
|
|
|
41269
41269
|
})(["flex:1;"]);
|
|
41270
41270
|
const Toast = ({
|
|
41271
41271
|
type,
|
|
41272
|
+
toastType = "foreground",
|
|
41272
41273
|
title,
|
|
41273
41274
|
description,
|
|
41274
41275
|
actions = [],
|
|
41275
41276
|
duration: duration2,
|
|
41276
|
-
onClose
|
|
41277
|
+
onClose,
|
|
41278
|
+
...props
|
|
41277
41279
|
}) => {
|
|
41278
41280
|
let iconName = "";
|
|
41279
41281
|
if (type === "default") {
|
|
@@ -41283,7 +41285,7 @@ const Toast = ({
|
|
|
41283
41285
|
} else if (type && ["danger", "warning"].includes(type)) {
|
|
41284
41286
|
iconName = "warning";
|
|
41285
41287
|
}
|
|
41286
|
-
return /* @__PURE__ */ jsxs(ToastRoot, { onOpenChange: onClose, duration: duration2, children: [
|
|
41288
|
+
return /* @__PURE__ */ jsxs(ToastRoot, { onOpenChange: onClose, duration: duration2, type: toastType, ...props, children: [
|
|
41287
41289
|
/* @__PURE__ */ jsxs(ToastHeader, { children: [
|
|
41288
41290
|
iconName.length > 0 && /* @__PURE__ */ jsx(ToastIcon, { name: iconName, $type: type }),
|
|
41289
41291
|
/* @__PURE__ */ jsx(Title, { children: title }),
|
package/dist/click-ui.umd.js
CHANGED
|
@@ -14414,7 +14414,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
14414
14414
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "xl" }),
|
|
14415
14415
|
/* @__PURE__ */ jsxRuntime.jsxs(ActionsWrapper, { children: [
|
|
14416
14416
|
/* @__PURE__ */ jsxRuntime.jsx(Dialog.Close, { label: secondaryActionLabel, "data-testid": "cancel-action-button" }),
|
|
14417
|
-
/* @__PURE__ */ jsxRuntime.jsx(Dialog.Close, { loading: !!loading, disabled: !!disabled || !!loading, type: primaryActionType, label: primaryActionLabel, onClick: () => {
|
|
14417
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog.Close, { loading: !!loading, disabled: !!disabled || !!loading, type: primaryActionType, label: primaryActionLabel, autoFocus: open2, onClick: () => {
|
|
14418
14418
|
if (onConfirm) {
|
|
14419
14419
|
onConfirm();
|
|
14420
14420
|
}
|
|
@@ -41284,11 +41284,13 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
41284
41284
|
})(["flex:1;"]);
|
|
41285
41285
|
const Toast = ({
|
|
41286
41286
|
type,
|
|
41287
|
+
toastType = "foreground",
|
|
41287
41288
|
title,
|
|
41288
41289
|
description,
|
|
41289
41290
|
actions = [],
|
|
41290
41291
|
duration: duration2,
|
|
41291
|
-
onClose
|
|
41292
|
+
onClose,
|
|
41293
|
+
...props
|
|
41292
41294
|
}) => {
|
|
41293
41295
|
let iconName = "";
|
|
41294
41296
|
if (type === "default") {
|
|
@@ -41298,7 +41300,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
41298
41300
|
} else if (type && ["danger", "warning"].includes(type)) {
|
|
41299
41301
|
iconName = "warning";
|
|
41300
41302
|
}
|
|
41301
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(ToastRoot, { onOpenChange: onClose, duration: duration2, children: [
|
|
41303
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ToastRoot, { onOpenChange: onClose, duration: duration2, type: toastType, ...props, children: [
|
|
41302
41304
|
/* @__PURE__ */ jsxRuntime.jsxs(ToastHeader, { children: [
|
|
41303
41305
|
iconName.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ToastIcon, { name: iconName, $type: type }),
|
|
41304
41306
|
/* @__PURE__ */ jsxRuntime.jsx(Title, { children: title }),
|
|
@@ -8,9 +8,10 @@ export interface ToastContextProps {
|
|
|
8
8
|
export declare const ToastContext: import('react').Context<ToastContextProps>;
|
|
9
9
|
export type ToastAlignment = "start" | "end";
|
|
10
10
|
export type ToastType = "danger" | "warning" | "default" | "success";
|
|
11
|
-
export interface ToastProps {
|
|
11
|
+
export interface ToastProps extends Omit<RadixUIToast.ToastProps, "type"> {
|
|
12
12
|
id?: string;
|
|
13
13
|
type?: ToastType;
|
|
14
|
+
toastType?: "foreground" | "background";
|
|
14
15
|
title: string;
|
|
15
16
|
description?: ReactNode;
|
|
16
17
|
/** Time in milliseconds the toast will be visible */
|
|
@@ -20,7 +21,7 @@ export interface ToastProps {
|
|
|
20
21
|
}>;
|
|
21
22
|
align?: ToastAlignment;
|
|
22
23
|
}
|
|
23
|
-
export declare const Toast: ({ type, title, description, actions, duration, onClose, }: ToastProps & {
|
|
24
|
+
export declare const Toast: ({ type, toastType, title, description, actions, duration, onClose, ...props }: ToastProps & {
|
|
24
25
|
onClose: (open: boolean) => void;
|
|
25
26
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
27
|
export interface ToastProviderProps extends RadixUIToast.ToastProviderProps {
|