@overmap-ai/blocks 1.0.40-TableStyling.1 → 1.0.40-TableStyling.2

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.
@@ -6103,8 +6103,11 @@
6103
6103
  });
6104
6104
  TextArea.displayName = "TextArea";
6105
6105
  const CustomToast = react.memo((props) => {
6106
- const { toastId, title, description, icon, accentColor } = props;
6106
+ const { toastId, title, description, icon, accentColor, closeButton, action } = props;
6107
6107
  const { radius } = useProvider();
6108
+ const handleAction = react.useCallback(() => {
6109
+ sonner.toast.dismiss(toastId);
6110
+ }, [toastId]);
6108
6111
  const handleClose = react.useCallback(() => {
6109
6112
  sonner.toast.dismiss(toastId);
6110
6113
  }, [toastId]);
@@ -6112,7 +6115,7 @@
6112
6115
  "div",
6113
6116
  {
6114
6117
  className: classVarianceAuthority.cx(
6115
- "flex items-center gap-2 bg-(--base-2) p-4 ring ring-(--base-6) shadow-md max-w-full max-h-full",
6118
+ "flex items-center gap-2 bg-(--base-2) p-4 ring ring-(--base-6) shadow-md max-w-full max-h-full",
6116
6119
  radiusCva({ radius, maxLarge: true })
6117
6120
  ),
6118
6121
  "data-accent-color": accentColor,
@@ -6124,7 +6127,8 @@
6124
6127
  description && /* @__PURE__ */ jsxRuntime.jsx(Text, { accentColor: "base", size: "sm", weight: "regular", children: description })
6125
6128
  ] })
6126
6129
  ] }),
6127
- /* @__PURE__ */ jsxRuntime.jsx(
6130
+ /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { onClick: handleAction, children: action }),
6131
+ closeButton && /* @__PURE__ */ jsxRuntime.jsx(
6128
6132
  IconButton,
6129
6133
  {
6130
6134
  type: "button",
@@ -6132,7 +6136,7 @@
6132
6136
  "aria-label": "Close",
6133
6137
  accentColor: "base",
6134
6138
  variant: "ghost",
6135
- size: "sm",
6139
+ size: "xs",
6136
6140
  children: /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.X })
6137
6141
  }
6138
6142
  )
@@ -6141,37 +6145,119 @@
6141
6145
  );
6142
6146
  });
6143
6147
  const basic = (options) => {
6144
- const { icon, description, title, ...rest } = options;
6148
+ const { icon, description, title, closeButton, action, ...rest } = options;
6145
6149
  return sonner.toast.custom(
6146
- (id) => /* @__PURE__ */ jsxRuntime.jsx(CustomToast, { toastId: id, icon, description, title }),
6150
+ (id) => /* @__PURE__ */ jsxRuntime.jsx(
6151
+ CustomToast,
6152
+ {
6153
+ toastId: id,
6154
+ icon,
6155
+ description,
6156
+ title,
6157
+ closeButton,
6158
+ action
6159
+ }
6160
+ ),
6147
6161
  rest
6148
6162
  );
6149
6163
  };
6150
6164
  const success = (options) => {
6151
- const { icon = /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.Check, color: "var(--accent-9)" }), description, title, ...rest } = options;
6165
+ const {
6166
+ icon = /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.Check, color: "var(--accent-9)" }),
6167
+ description,
6168
+ title,
6169
+ closeButton,
6170
+ action,
6171
+ ...rest
6172
+ } = options;
6152
6173
  return sonner.toast.custom(
6153
- (id) => /* @__PURE__ */ jsxRuntime.jsx(CustomToast, { accentColor: "success", toastId: id, icon, description, title }),
6174
+ (id) => /* @__PURE__ */ jsxRuntime.jsx(
6175
+ CustomToast,
6176
+ {
6177
+ accentColor: "success",
6178
+ toastId: id,
6179
+ icon,
6180
+ description,
6181
+ title,
6182
+ closeButton,
6183
+ action
6184
+ }
6185
+ ),
6154
6186
  rest
6155
6187
  );
6156
6188
  };
6157
6189
  const info = (options) => {
6158
- const { icon = /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.InfoIcon, color: "var(--base-11)" }), description, title, ...rest } = options;
6190
+ const {
6191
+ icon = /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.InfoIcon, color: "var(--base-11)" }),
6192
+ description,
6193
+ title,
6194
+ closeButton,
6195
+ action,
6196
+ ...rest
6197
+ } = options;
6159
6198
  return sonner.toast.custom(
6160
- (id) => /* @__PURE__ */ jsxRuntime.jsx(CustomToast, { toastId: id, icon, description, title }),
6199
+ (id) => /* @__PURE__ */ jsxRuntime.jsx(
6200
+ CustomToast,
6201
+ {
6202
+ accentColor: "base",
6203
+ toastId: id,
6204
+ icon,
6205
+ description,
6206
+ title,
6207
+ closeButton,
6208
+ action
6209
+ }
6210
+ ),
6161
6211
  rest
6162
6212
  );
6163
6213
  };
6164
6214
  const warning = (options) => {
6165
- const { icon = /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.TriangleAlertIcon, color: "var(--accent-9)" }), description, title, ...rest } = options;
6215
+ const {
6216
+ icon = /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.TriangleAlertIcon, color: "var(--accent-9)" }),
6217
+ description,
6218
+ title,
6219
+ closeButton,
6220
+ action,
6221
+ ...rest
6222
+ } = options;
6166
6223
  return sonner.toast.custom(
6167
- (id) => /* @__PURE__ */ jsxRuntime.jsx(CustomToast, { accentColor: "warning", toastId: id, icon, description, title }),
6224
+ (id) => /* @__PURE__ */ jsxRuntime.jsx(
6225
+ CustomToast,
6226
+ {
6227
+ accentColor: "warning",
6228
+ toastId: id,
6229
+ icon,
6230
+ description,
6231
+ title,
6232
+ closeButton,
6233
+ action
6234
+ }
6235
+ ),
6168
6236
  rest
6169
6237
  );
6170
6238
  };
6171
6239
  const error = (options) => {
6172
- const { icon = /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.CircleAlertIcon, color: "var(--accent-9)" }), description, title, ...rest } = options;
6240
+ const {
6241
+ icon = /* @__PURE__ */ jsxRuntime.jsx(LuIcon, { icon: lucideReact.CircleAlertIcon, color: "var(--accent-9)" }),
6242
+ description,
6243
+ title,
6244
+ closeButton,
6245
+ action,
6246
+ ...rest
6247
+ } = options;
6173
6248
  return sonner.toast.custom(
6174
- (id) => /* @__PURE__ */ jsxRuntime.jsx(CustomToast, { accentColor: "danger", toastId: id, icon, description, title }),
6249
+ (id) => /* @__PURE__ */ jsxRuntime.jsx(
6250
+ CustomToast,
6251
+ {
6252
+ accentColor: "danger",
6253
+ toastId: id,
6254
+ icon,
6255
+ description,
6256
+ title,
6257
+ closeButton,
6258
+ action
6259
+ }
6260
+ ),
6175
6261
  rest
6176
6262
  );
6177
6263
  };