@mindlogic-ai/logician-ui 2.0.0-alpha.21 → 2.0.0-alpha.22
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 +37 -4
- package/dist/index.d.ts +37 -4
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +35 -0
- package/src/components/SegmentedControl/SegmentedControl.types.ts +2 -1
- package/src/components/Toast/Toast.stories.tsx +16 -6
- package/src/components/Toast/Toast.styles.ts +14 -7
- package/src/components/Toast/Toast.types.ts +1 -1
- package/src/components/Toast/ToastIcon/ToastIcon.tsx +8 -2
- package/src/components/Toast/useToast.tsx +7 -1
package/dist/index.mjs
CHANGED
|
@@ -2252,9 +2252,10 @@ var CopyableCode = ({
|
|
|
2252
2252
|
};
|
|
2253
2253
|
var ToastIcon = ({ status }) => {
|
|
2254
2254
|
const iconProps = {
|
|
2255
|
+
info: /* @__PURE__ */ jsx(LuInfo, { boxSize: "md", color: "primary.main" }),
|
|
2256
|
+
warning: /* @__PURE__ */ jsx(IoWarning, { boxSize: "lg", color: "warning.main" }),
|
|
2255
2257
|
success: /* @__PURE__ */ jsx(IoIosCheckmarkCircle, { boxSize: "lg", color: "success.main" }),
|
|
2256
|
-
error: /* @__PURE__ */ jsx(MdError, { boxSize: "lg", color: "danger.main" })
|
|
2257
|
-
info: /* @__PURE__ */ jsx(LuInfo, { boxSize: "md", color: "primary.main" })
|
|
2258
|
+
error: /* @__PURE__ */ jsx(MdError, { boxSize: "lg", color: "danger.main" })
|
|
2258
2259
|
};
|
|
2259
2260
|
return iconProps[status];
|
|
2260
2261
|
};
|
|
@@ -2295,16 +2296,21 @@ var Toast = ({
|
|
|
2295
2296
|
|
|
2296
2297
|
// src/components/Toast/Toast.styles.ts
|
|
2297
2298
|
var toastStyles = {
|
|
2298
|
-
success: {
|
|
2299
|
-
bg: "success.lighter",
|
|
2300
|
-
color: "success.dark",
|
|
2301
|
-
borderColor: "success.light"
|
|
2302
|
-
},
|
|
2303
2299
|
info: {
|
|
2304
2300
|
bg: "primary.light",
|
|
2305
2301
|
color: "primary.dark",
|
|
2306
2302
|
borderColor: "primary.lighter"
|
|
2307
2303
|
},
|
|
2304
|
+
warning: {
|
|
2305
|
+
bg: "warning.lighter",
|
|
2306
|
+
color: "warning.dark",
|
|
2307
|
+
borderColor: "warning.light"
|
|
2308
|
+
},
|
|
2309
|
+
success: {
|
|
2310
|
+
bg: "success.lighter",
|
|
2311
|
+
color: "success.dark",
|
|
2312
|
+
borderColor: "success.light"
|
|
2313
|
+
},
|
|
2308
2314
|
error: {
|
|
2309
2315
|
bg: "danger.lighter",
|
|
2310
2316
|
color: "danger.dark",
|
|
@@ -2359,7 +2365,13 @@ var useToast = (props) => {
|
|
|
2359
2365
|
activeToasts.current.push(toastId);
|
|
2360
2366
|
return toastId;
|
|
2361
2367
|
};
|
|
2362
|
-
return showToast
|
|
2368
|
+
return Object.assign(showToast, {
|
|
2369
|
+
close: toast.close,
|
|
2370
|
+
closeAll: toast.closeAll,
|
|
2371
|
+
update: toast.update,
|
|
2372
|
+
isActive: toast.isActive,
|
|
2373
|
+
promise: toast.promise
|
|
2374
|
+
});
|
|
2363
2375
|
};
|
|
2364
2376
|
|
|
2365
2377
|
// src/components/CrossPageToasts/CrossPageToasts.tsx
|