@clickhouse/click-ui 0.0.213 → 0.0.215

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 }),
@@ -51909,8 +51911,8 @@ const MultiAccordionItem = ({
51909
51911
  /* @__PURE__ */ jsx(AccordionIconWrapper, { children: /* @__PURE__ */ jsx(SvgImage, { name: "chevron-right", size: iconSize ?? customSize, "aria-label": "accordion icon" }) }),
51910
51912
  icon ? /* @__PURE__ */ jsx(SvgImage, { name: icon, size: iconSize ?? customSize }) : null
51911
51913
  ] }),
51912
- /* @__PURE__ */ jsxs(Container, { isResponsive: false, gap: "sm", alignItems: "center", fillWidth: true, justifyContent: "space-between", component: "span", children: [
51913
- /* @__PURE__ */ jsx(Text, { component: "span", size: customSize, fillWidth, children: title }),
51914
+ /* @__PURE__ */ jsxs(Container, { isResponsive: false, gap: "sm", alignItems: "center", fillWidth: true, justifyContent: "space-between", component: "span", overflow: "hidden", children: [
51915
+ /* @__PURE__ */ jsx(AccordionItemTitle, { component: "span", size: customSize, fillWidth, children: title }),
51914
51916
  showCheck && /* @__PURE__ */ jsx(CustomIcon, { name: isCompleted ? "check-in-circle" : "circle", $isCompleted: isCompleted, size: iconSize ?? customSize, "aria-label": "accordion icon status", onClick: onClickStatus, "data-icon": "accordion-status", "data-testid": "accordion-status-icon" })
51915
51917
  ] })
51916
51918
  ] }),
@@ -52001,6 +52003,9 @@ const AccordionContent = pt($1bf158f521e1b1b4$export$7c6e2c02157bb7d2).withConfi
52001
52003
  theme: theme2,
52002
52004
  $padding
52003
52005
  }) => theme2.click.container.space[$padding]);
52006
+ const AccordionItemTitle = pt(Text).withConfig({
52007
+ componentId: "sc-1lb3204-7"
52008
+ })(["overflow:hidden;"]);
52004
52009
  export {
52005
52010
  AccordionToExport as Accordion,
52006
52011
  Alert,
@@ -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 }),
@@ -51925,8 +51927,8 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
51925
51927
  /* @__PURE__ */ jsxRuntime.jsx(AccordionIconWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "chevron-right", size: iconSize ?? customSize, "aria-label": "accordion icon" }) }),
51926
51928
  icon ? /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: iconSize ?? customSize }) : null
51927
51929
  ] }),
51928
- /* @__PURE__ */ jsxRuntime.jsxs(Container, { isResponsive: false, gap: "sm", alignItems: "center", fillWidth: true, justifyContent: "space-between", component: "span", children: [
51929
- /* @__PURE__ */ jsxRuntime.jsx(Text, { component: "span", size: customSize, fillWidth, children: title }),
51930
+ /* @__PURE__ */ jsxRuntime.jsxs(Container, { isResponsive: false, gap: "sm", alignItems: "center", fillWidth: true, justifyContent: "space-between", component: "span", overflow: "hidden", children: [
51931
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionItemTitle, { component: "span", size: customSize, fillWidth, children: title }),
51930
51932
  showCheck && /* @__PURE__ */ jsxRuntime.jsx(CustomIcon, { name: isCompleted ? "check-in-circle" : "circle", $isCompleted: isCompleted, size: iconSize ?? customSize, "aria-label": "accordion icon status", onClick: onClickStatus, "data-icon": "accordion-status", "data-testid": "accordion-status-icon" })
51931
51933
  ] })
51932
51934
  ] }),
@@ -52017,6 +52019,9 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
52017
52019
  theme: theme2,
52018
52020
  $padding
52019
52021
  }) => theme2.click.container.space[$padding]);
52022
+ const AccordionItemTitle = pt(Text).withConfig({
52023
+ componentId: "sc-1lb3204-7"
52024
+ })(["overflow:hidden;"]);
52020
52025
  exports2.Accordion = AccordionToExport;
52021
52026
  exports2.Alert = Alert;
52022
52027
  exports2.AutoComplete = AutoComplete;
@@ -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 }),
@@ -50741,8 +50743,8 @@ const MultiAccordionItem = ({
50741
50743
  /* @__PURE__ */ jsx(AccordionIconWrapper, { children: /* @__PURE__ */ jsx(SvgImage, { name: "chevron-right", size: iconSize ?? customSize, "aria-label": "accordion icon" }) }),
50742
50744
  icon ? /* @__PURE__ */ jsx(SvgImage, { name: icon, size: iconSize ?? customSize }) : null
50743
50745
  ] }),
50744
- /* @__PURE__ */ jsxs(Container, { isResponsive: false, gap: "sm", alignItems: "center", fillWidth: true, justifyContent: "space-between", component: "span", children: [
50745
- /* @__PURE__ */ jsx(Text, { component: "span", size: customSize, fillWidth, children: title }),
50746
+ /* @__PURE__ */ jsxs(Container, { isResponsive: false, gap: "sm", alignItems: "center", fillWidth: true, justifyContent: "space-between", component: "span", overflow: "hidden", children: [
50747
+ /* @__PURE__ */ jsx(AccordionItemTitle, { component: "span", size: customSize, fillWidth, children: title }),
50746
50748
  showCheck && /* @__PURE__ */ jsx(CustomIcon, { name: isCompleted ? "check-in-circle" : "circle", $isCompleted: isCompleted, size: iconSize ?? customSize, "aria-label": "accordion icon status", onClick: onClickStatus, "data-icon": "accordion-status", "data-testid": "accordion-status-icon" })
50747
50749
  ] })
50748
50750
  ] }),
@@ -50833,6 +50835,9 @@ const AccordionContent = styled($1bf158f521e1b1b4$export$7c6e2c02157bb7d2).withC
50833
50835
  theme: theme2,
50834
50836
  $padding
50835
50837
  }) => theme2.click.container.space[$padding]);
50838
+ const AccordionItemTitle = styled(Text).withConfig({
50839
+ componentId: "sc-1lb3204-7"
50840
+ })(["overflow:hidden;"]);
50836
50841
  export {
50837
50842
  AccordionToExport as Accordion,
50838
50843
  Alert,
@@ -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 }),
@@ -50756,8 +50758,8 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
50756
50758
  /* @__PURE__ */ jsxRuntime.jsx(AccordionIconWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: "chevron-right", size: iconSize ?? customSize, "aria-label": "accordion icon" }) }),
50757
50759
  icon ? /* @__PURE__ */ jsxRuntime.jsx(SvgImage, { name: icon, size: iconSize ?? customSize }) : null
50758
50760
  ] }),
50759
- /* @__PURE__ */ jsxRuntime.jsxs(Container, { isResponsive: false, gap: "sm", alignItems: "center", fillWidth: true, justifyContent: "space-between", component: "span", children: [
50760
- /* @__PURE__ */ jsxRuntime.jsx(Text, { component: "span", size: customSize, fillWidth, children: title }),
50761
+ /* @__PURE__ */ jsxRuntime.jsxs(Container, { isResponsive: false, gap: "sm", alignItems: "center", fillWidth: true, justifyContent: "space-between", component: "span", overflow: "hidden", children: [
50762
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionItemTitle, { component: "span", size: customSize, fillWidth, children: title }),
50761
50763
  showCheck && /* @__PURE__ */ jsxRuntime.jsx(CustomIcon, { name: isCompleted ? "check-in-circle" : "circle", $isCompleted: isCompleted, size: iconSize ?? customSize, "aria-label": "accordion icon status", onClick: onClickStatus, "data-icon": "accordion-status", "data-testid": "accordion-status-icon" })
50762
50764
  ] })
50763
50765
  ] }),
@@ -50848,6 +50850,9 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
50848
50850
  theme: theme2,
50849
50851
  $padding
50850
50852
  }) => theme2.click.container.space[$padding]);
50853
+ const AccordionItemTitle = styled.styled(Text).withConfig({
50854
+ componentId: "sc-1lb3204-7"
50855
+ })(["overflow:hidden;"]);
50851
50856
  exports2.Accordion = AccordionToExport;
50852
50857
  exports2.Alert = Alert;
50853
50858
  exports2.AutoComplete = AutoComplete;
@@ -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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickhouse/click-ui",
3
- "version": "0.0.213",
3
+ "version": "0.0.215",
4
4
  "description": "Official ClickHouse design system react library",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",