@clickhouse/click-ui 0.0.208 → 0.0.209
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/click-ui.bundled.es.js +22 -9
- package/dist/click-ui.bundled.umd.js +22 -9
- package/dist/click-ui.es.js +22 -9
- package/dist/click-ui.umd.js +22 -9
- package/dist/components/ClickUIProvider/ClickUIProvider.d.ts +2 -2
- package/dist/components/Toast/Toast.d.ts +4 -1
- package/dist/components/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -15531,7 +15531,9 @@ const CodeBlock = ({
|
|
|
15531
15531
|
};
|
|
15532
15532
|
const ActionsWrapper = pt.div.withConfig({
|
|
15533
15533
|
componentId: "sc-6eozxy-0"
|
|
15534
|
-
})(["display:flex;justify-content:flex-end;gap:", ";"], (props) => props.theme.click.dialog.space.gap
|
|
15534
|
+
})(["display:flex;justify-content:flex-end;gap:", ";@media (max-width:", "){flex-direction:column;}"], (props) => props.theme.click.dialog.space.gap, ({
|
|
15535
|
+
theme: theme2
|
|
15536
|
+
}) => theme2.breakpoint.sizes.sm);
|
|
15535
15537
|
const DialogContent$1 = pt.div.withConfig({
|
|
15536
15538
|
componentId: "sc-6eozxy-1"
|
|
15537
15539
|
})(["overflow:hidden;display:flex;flex-direction:column;"]);
|
|
@@ -17696,19 +17698,19 @@ const DialogOverlay = pt($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff).withConfig({
|
|
|
17696
17698
|
}) => theme2.click.dialog.color.opaqueBackground.default, overlayShow);
|
|
17697
17699
|
const ContentArea = pt($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2).withConfig({
|
|
17698
17700
|
componentId: "sc-1wr6otn-2"
|
|
17699
|
-
})(["background:", ";border-radius:", ";padding:", "
|
|
17701
|
+
})(["background:", ";border-radius:", ";padding:", ";box-shadow:", ";border:1px solid ", ";width:75%;max-width:670px;position:fixed;top:50%;left:50%;max-height:75%;overflow:auto;transform:translate(-50%,-50%);animation:", " 150ms cubic-bezier(0.16,1,0.3,1);outline:none;@media (max-width:", "){max-height:100%;border-radius:0;width:100%;}"], ({
|
|
17700
17702
|
theme: theme2
|
|
17701
17703
|
}) => theme2.click.dialog.color.background.default, ({
|
|
17702
17704
|
theme: theme2
|
|
17703
17705
|
}) => theme2.click.dialog.radii.all, ({
|
|
17704
17706
|
theme: theme2
|
|
17705
|
-
}) => theme2.click.dialog.space.y
|
|
17706
|
-
theme: theme2
|
|
17707
|
-
}) => theme2.click.dialog.space.x, ({
|
|
17707
|
+
}) => `${theme2.click.dialog.space.y} ${theme2.click.dialog.space.x}`, ({
|
|
17708
17708
|
theme: theme2
|
|
17709
17709
|
}) => theme2.click.dialog.shadow.default, ({
|
|
17710
17710
|
theme: theme2
|
|
17711
|
-
}) => theme2.click.global.color.stroke.default, contentShow
|
|
17711
|
+
}) => theme2.click.global.color.stroke.default, contentShow, ({
|
|
17712
|
+
theme: theme2
|
|
17713
|
+
}) => theme2.breakpoint.sizes.sm);
|
|
17712
17714
|
const TitleArea = pt.div.withConfig({
|
|
17713
17715
|
componentId: "sc-1wr6otn-3"
|
|
17714
17716
|
})(["display:flex;justify-content:space-between;align-items:center;min-height:", ";"], ({
|
|
@@ -42465,13 +42467,23 @@ const Toast = ({
|
|
|
42465
42467
|
};
|
|
42466
42468
|
const Viewport = pt($054eb8030ebde76e$export$d5c6c08dc2d3ca7).withConfig({
|
|
42467
42469
|
componentId: "sc-tmc8vl-6"
|
|
42468
|
-
})(["--viewport-padding:25px;position:fixed;bottom:0;
|
|
42470
|
+
})(["--viewport-padding:25px;position:fixed;bottom:0;", ";display:flex;flex-direction:column;padding:var(--viewport-padding);gap:", ";width:", ";max-width:100vw;margin:0;list-style:none;z-index:2147483647;outline:none;"], ({
|
|
42471
|
+
$align
|
|
42472
|
+
}) => {
|
|
42473
|
+
if ($align === "start") {
|
|
42474
|
+
return "left: 0";
|
|
42475
|
+
}
|
|
42476
|
+
return `
|
|
42477
|
+
right: 0;
|
|
42478
|
+
`;
|
|
42479
|
+
}, ({
|
|
42469
42480
|
theme: theme2
|
|
42470
42481
|
}) => theme2.click.toast.space.gap, ({
|
|
42471
42482
|
theme: theme2
|
|
42472
42483
|
}) => theme2.click.toast.size.width);
|
|
42473
42484
|
const ToastProvider = ({
|
|
42474
42485
|
children,
|
|
42486
|
+
align = "end",
|
|
42475
42487
|
...props
|
|
42476
42488
|
}) => {
|
|
42477
42489
|
const [toasts, setToasts] = useState(/* @__PURE__ */ new Map());
|
|
@@ -42504,12 +42516,12 @@ const ToastProvider = ({
|
|
|
42504
42516
|
});
|
|
42505
42517
|
}
|
|
42506
42518
|
};
|
|
42507
|
-
return /* @__PURE__ */ jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", ...props, children: [
|
|
42519
|
+
return /* @__PURE__ */ jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: align === "start" ? "left" : "right", ...props, children: [
|
|
42508
42520
|
/* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
|
|
42509
42521
|
children,
|
|
42510
42522
|
Array.from(toasts).map(([id, toast]) => /* @__PURE__ */ jsx(Toast, { ...toast, onClose: onClose(id) }, id))
|
|
42511
42523
|
] }),
|
|
42512
|
-
/* @__PURE__ */ jsx(Viewport, {})
|
|
42524
|
+
/* @__PURE__ */ jsx(Viewport, { $align: align })
|
|
42513
42525
|
] });
|
|
42514
42526
|
};
|
|
42515
42527
|
function listCacheClear$1() {
|
|
@@ -52043,6 +52055,7 @@ export {
|
|
|
52043
52055
|
TextAreaField,
|
|
52044
52056
|
TextField,
|
|
52045
52057
|
Title$2 as Title,
|
|
52058
|
+
ToastProvider,
|
|
52046
52059
|
Tooltip,
|
|
52047
52060
|
VerticalStepper,
|
|
52048
52061
|
WarningAlert,
|
|
@@ -15547,7 +15547,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
15547
15547
|
};
|
|
15548
15548
|
const ActionsWrapper = pt.div.withConfig({
|
|
15549
15549
|
componentId: "sc-6eozxy-0"
|
|
15550
|
-
})(["display:flex;justify-content:flex-end;gap:", ";"], (props) => props.theme.click.dialog.space.gap
|
|
15550
|
+
})(["display:flex;justify-content:flex-end;gap:", ";@media (max-width:", "){flex-direction:column;}"], (props) => props.theme.click.dialog.space.gap, ({
|
|
15551
|
+
theme: theme2
|
|
15552
|
+
}) => theme2.breakpoint.sizes.sm);
|
|
15551
15553
|
const DialogContent$1 = pt.div.withConfig({
|
|
15552
15554
|
componentId: "sc-6eozxy-1"
|
|
15553
15555
|
})(["overflow:hidden;display:flex;flex-direction:column;"]);
|
|
@@ -17712,19 +17714,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
17712
17714
|
}) => theme2.click.dialog.color.opaqueBackground.default, overlayShow);
|
|
17713
17715
|
const ContentArea = pt($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2).withConfig({
|
|
17714
17716
|
componentId: "sc-1wr6otn-2"
|
|
17715
|
-
})(["background:", ";border-radius:", ";padding:", "
|
|
17717
|
+
})(["background:", ";border-radius:", ";padding:", ";box-shadow:", ";border:1px solid ", ";width:75%;max-width:670px;position:fixed;top:50%;left:50%;max-height:75%;overflow:auto;transform:translate(-50%,-50%);animation:", " 150ms cubic-bezier(0.16,1,0.3,1);outline:none;@media (max-width:", "){max-height:100%;border-radius:0;width:100%;}"], ({
|
|
17716
17718
|
theme: theme2
|
|
17717
17719
|
}) => theme2.click.dialog.color.background.default, ({
|
|
17718
17720
|
theme: theme2
|
|
17719
17721
|
}) => theme2.click.dialog.radii.all, ({
|
|
17720
17722
|
theme: theme2
|
|
17721
|
-
}) => theme2.click.dialog.space.y
|
|
17722
|
-
theme: theme2
|
|
17723
|
-
}) => theme2.click.dialog.space.x, ({
|
|
17723
|
+
}) => `${theme2.click.dialog.space.y} ${theme2.click.dialog.space.x}`, ({
|
|
17724
17724
|
theme: theme2
|
|
17725
17725
|
}) => theme2.click.dialog.shadow.default, ({
|
|
17726
17726
|
theme: theme2
|
|
17727
|
-
}) => theme2.click.global.color.stroke.default, contentShow
|
|
17727
|
+
}) => theme2.click.global.color.stroke.default, contentShow, ({
|
|
17728
|
+
theme: theme2
|
|
17729
|
+
}) => theme2.breakpoint.sizes.sm);
|
|
17728
17730
|
const TitleArea = pt.div.withConfig({
|
|
17729
17731
|
componentId: "sc-1wr6otn-3"
|
|
17730
17732
|
})(["display:flex;justify-content:space-between;align-items:center;min-height:", ";"], ({
|
|
@@ -42481,13 +42483,23 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
42481
42483
|
};
|
|
42482
42484
|
const Viewport = pt($054eb8030ebde76e$export$d5c6c08dc2d3ca7).withConfig({
|
|
42483
42485
|
componentId: "sc-tmc8vl-6"
|
|
42484
|
-
})(["--viewport-padding:25px;position:fixed;bottom:0;
|
|
42486
|
+
})(["--viewport-padding:25px;position:fixed;bottom:0;", ";display:flex;flex-direction:column;padding:var(--viewport-padding);gap:", ";width:", ";max-width:100vw;margin:0;list-style:none;z-index:2147483647;outline:none;"], ({
|
|
42487
|
+
$align
|
|
42488
|
+
}) => {
|
|
42489
|
+
if ($align === "start") {
|
|
42490
|
+
return "left: 0";
|
|
42491
|
+
}
|
|
42492
|
+
return `
|
|
42493
|
+
right: 0;
|
|
42494
|
+
`;
|
|
42495
|
+
}, ({
|
|
42485
42496
|
theme: theme2
|
|
42486
42497
|
}) => theme2.click.toast.space.gap, ({
|
|
42487
42498
|
theme: theme2
|
|
42488
42499
|
}) => theme2.click.toast.size.width);
|
|
42489
42500
|
const ToastProvider = ({
|
|
42490
42501
|
children,
|
|
42502
|
+
align = "end",
|
|
42491
42503
|
...props
|
|
42492
42504
|
}) => {
|
|
42493
42505
|
const [toasts, setToasts] = React.useState(/* @__PURE__ */ new Map());
|
|
@@ -42520,12 +42532,12 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
42520
42532
|
});
|
|
42521
42533
|
}
|
|
42522
42534
|
};
|
|
42523
|
-
return /* @__PURE__ */ jsxRuntime.jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", ...props, children: [
|
|
42535
|
+
return /* @__PURE__ */ jsxRuntime.jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: align === "start" ? "left" : "right", ...props, children: [
|
|
42524
42536
|
/* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
|
|
42525
42537
|
children,
|
|
42526
42538
|
Array.from(toasts).map(([id, toast]) => /* @__PURE__ */ jsxRuntime.jsx(Toast, { ...toast, onClose: onClose(id) }, id))
|
|
42527
42539
|
] }),
|
|
42528
|
-
/* @__PURE__ */ jsxRuntime.jsx(Viewport, {})
|
|
42540
|
+
/* @__PURE__ */ jsxRuntime.jsx(Viewport, { $align: align })
|
|
42529
42541
|
] });
|
|
42530
42542
|
};
|
|
42531
42543
|
function listCacheClear$1() {
|
|
@@ -52058,6 +52070,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
52058
52070
|
exports2.TextAreaField = TextAreaField;
|
|
52059
52071
|
exports2.TextField = TextField;
|
|
52060
52072
|
exports2.Title = Title$2;
|
|
52073
|
+
exports2.ToastProvider = ToastProvider;
|
|
52061
52074
|
exports2.Tooltip = Tooltip;
|
|
52062
52075
|
exports2.VerticalStepper = VerticalStepper;
|
|
52063
52076
|
exports2.WarningAlert = WarningAlert;
|
package/dist/click-ui.es.js
CHANGED
|
@@ -14363,7 +14363,9 @@ const CodeBlock = ({
|
|
|
14363
14363
|
};
|
|
14364
14364
|
const ActionsWrapper = styled.div.withConfig({
|
|
14365
14365
|
componentId: "sc-6eozxy-0"
|
|
14366
|
-
})(["display:flex;justify-content:flex-end;gap:", ";"], (props) => props.theme.click.dialog.space.gap
|
|
14366
|
+
})(["display:flex;justify-content:flex-end;gap:", ";@media (max-width:", "){flex-direction:column;}"], (props) => props.theme.click.dialog.space.gap, ({
|
|
14367
|
+
theme: theme2
|
|
14368
|
+
}) => theme2.breakpoint.sizes.sm);
|
|
14367
14369
|
const DialogContent$1 = styled.div.withConfig({
|
|
14368
14370
|
componentId: "sc-6eozxy-1"
|
|
14369
14371
|
})(["overflow:hidden;display:flex;flex-direction:column;"]);
|
|
@@ -16528,19 +16530,19 @@ const DialogOverlay = styled($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff).withConf
|
|
|
16528
16530
|
}) => theme2.click.dialog.color.opaqueBackground.default, overlayShow);
|
|
16529
16531
|
const ContentArea = styled($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2).withConfig({
|
|
16530
16532
|
componentId: "sc-1wr6otn-2"
|
|
16531
|
-
})(["background:", ";border-radius:", ";padding:", "
|
|
16533
|
+
})(["background:", ";border-radius:", ";padding:", ";box-shadow:", ";border:1px solid ", ";width:75%;max-width:670px;position:fixed;top:50%;left:50%;max-height:75%;overflow:auto;transform:translate(-50%,-50%);animation:", " 150ms cubic-bezier(0.16,1,0.3,1);outline:none;@media (max-width:", "){max-height:100%;border-radius:0;width:100%;}"], ({
|
|
16532
16534
|
theme: theme2
|
|
16533
16535
|
}) => theme2.click.dialog.color.background.default, ({
|
|
16534
16536
|
theme: theme2
|
|
16535
16537
|
}) => theme2.click.dialog.radii.all, ({
|
|
16536
16538
|
theme: theme2
|
|
16537
|
-
}) => theme2.click.dialog.space.y
|
|
16538
|
-
theme: theme2
|
|
16539
|
-
}) => theme2.click.dialog.space.x, ({
|
|
16539
|
+
}) => `${theme2.click.dialog.space.y} ${theme2.click.dialog.space.x}`, ({
|
|
16540
16540
|
theme: theme2
|
|
16541
16541
|
}) => theme2.click.dialog.shadow.default, ({
|
|
16542
16542
|
theme: theme2
|
|
16543
|
-
}) => theme2.click.global.color.stroke.default, contentShow
|
|
16543
|
+
}) => theme2.click.global.color.stroke.default, contentShow, ({
|
|
16544
|
+
theme: theme2
|
|
16545
|
+
}) => theme2.breakpoint.sizes.sm);
|
|
16544
16546
|
const TitleArea = styled.div.withConfig({
|
|
16545
16547
|
componentId: "sc-1wr6otn-3"
|
|
16546
16548
|
})(["display:flex;justify-content:space-between;align-items:center;min-height:", ";"], ({
|
|
@@ -41297,13 +41299,23 @@ const Toast = ({
|
|
|
41297
41299
|
};
|
|
41298
41300
|
const Viewport = styled($054eb8030ebde76e$export$d5c6c08dc2d3ca7).withConfig({
|
|
41299
41301
|
componentId: "sc-tmc8vl-6"
|
|
41300
|
-
})(["--viewport-padding:25px;position:fixed;bottom:0;
|
|
41302
|
+
})(["--viewport-padding:25px;position:fixed;bottom:0;", ";display:flex;flex-direction:column;padding:var(--viewport-padding);gap:", ";width:", ";max-width:100vw;margin:0;list-style:none;z-index:2147483647;outline:none;"], ({
|
|
41303
|
+
$align
|
|
41304
|
+
}) => {
|
|
41305
|
+
if ($align === "start") {
|
|
41306
|
+
return "left: 0";
|
|
41307
|
+
}
|
|
41308
|
+
return `
|
|
41309
|
+
right: 0;
|
|
41310
|
+
`;
|
|
41311
|
+
}, ({
|
|
41301
41312
|
theme: theme2
|
|
41302
41313
|
}) => theme2.click.toast.space.gap, ({
|
|
41303
41314
|
theme: theme2
|
|
41304
41315
|
}) => theme2.click.toast.size.width);
|
|
41305
41316
|
const ToastProvider = ({
|
|
41306
41317
|
children,
|
|
41318
|
+
align = "end",
|
|
41307
41319
|
...props
|
|
41308
41320
|
}) => {
|
|
41309
41321
|
const [toasts, setToasts] = useState(/* @__PURE__ */ new Map());
|
|
@@ -41336,12 +41348,12 @@ const ToastProvider = ({
|
|
|
41336
41348
|
});
|
|
41337
41349
|
}
|
|
41338
41350
|
};
|
|
41339
|
-
return /* @__PURE__ */ jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", ...props, children: [
|
|
41351
|
+
return /* @__PURE__ */ jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: align === "start" ? "left" : "right", ...props, children: [
|
|
41340
41352
|
/* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
|
|
41341
41353
|
children,
|
|
41342
41354
|
Array.from(toasts).map(([id, toast]) => /* @__PURE__ */ jsx(Toast, { ...toast, onClose: onClose(id) }, id))
|
|
41343
41355
|
] }),
|
|
41344
|
-
/* @__PURE__ */ jsx(Viewport, {})
|
|
41356
|
+
/* @__PURE__ */ jsx(Viewport, { $align: align })
|
|
41345
41357
|
] });
|
|
41346
41358
|
};
|
|
41347
41359
|
function listCacheClear$1() {
|
|
@@ -50875,6 +50887,7 @@ export {
|
|
|
50875
50887
|
TextAreaField,
|
|
50876
50888
|
TextField,
|
|
50877
50889
|
Title$2 as Title,
|
|
50890
|
+
ToastProvider,
|
|
50878
50891
|
Tooltip,
|
|
50879
50892
|
VerticalStepper,
|
|
50880
50893
|
WarningAlert,
|
package/dist/click-ui.umd.js
CHANGED
|
@@ -14378,7 +14378,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
14378
14378
|
};
|
|
14379
14379
|
const ActionsWrapper = styled.styled.div.withConfig({
|
|
14380
14380
|
componentId: "sc-6eozxy-0"
|
|
14381
|
-
})(["display:flex;justify-content:flex-end;gap:", ";"], (props) => props.theme.click.dialog.space.gap
|
|
14381
|
+
})(["display:flex;justify-content:flex-end;gap:", ";@media (max-width:", "){flex-direction:column;}"], (props) => props.theme.click.dialog.space.gap, ({
|
|
14382
|
+
theme: theme2
|
|
14383
|
+
}) => theme2.breakpoint.sizes.sm);
|
|
14382
14384
|
const DialogContent$1 = styled.styled.div.withConfig({
|
|
14383
14385
|
componentId: "sc-6eozxy-1"
|
|
14384
14386
|
})(["overflow:hidden;display:flex;flex-direction:column;"]);
|
|
@@ -16543,19 +16545,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
16543
16545
|
}) => theme2.click.dialog.color.opaqueBackground.default, overlayShow);
|
|
16544
16546
|
const ContentArea = styled.styled($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2).withConfig({
|
|
16545
16547
|
componentId: "sc-1wr6otn-2"
|
|
16546
|
-
})(["background:", ";border-radius:", ";padding:", "
|
|
16548
|
+
})(["background:", ";border-radius:", ";padding:", ";box-shadow:", ";border:1px solid ", ";width:75%;max-width:670px;position:fixed;top:50%;left:50%;max-height:75%;overflow:auto;transform:translate(-50%,-50%);animation:", " 150ms cubic-bezier(0.16,1,0.3,1);outline:none;@media (max-width:", "){max-height:100%;border-radius:0;width:100%;}"], ({
|
|
16547
16549
|
theme: theme2
|
|
16548
16550
|
}) => theme2.click.dialog.color.background.default, ({
|
|
16549
16551
|
theme: theme2
|
|
16550
16552
|
}) => theme2.click.dialog.radii.all, ({
|
|
16551
16553
|
theme: theme2
|
|
16552
|
-
}) => theme2.click.dialog.space.y
|
|
16553
|
-
theme: theme2
|
|
16554
|
-
}) => theme2.click.dialog.space.x, ({
|
|
16554
|
+
}) => `${theme2.click.dialog.space.y} ${theme2.click.dialog.space.x}`, ({
|
|
16555
16555
|
theme: theme2
|
|
16556
16556
|
}) => theme2.click.dialog.shadow.default, ({
|
|
16557
16557
|
theme: theme2
|
|
16558
|
-
}) => theme2.click.global.color.stroke.default, contentShow
|
|
16558
|
+
}) => theme2.click.global.color.stroke.default, contentShow, ({
|
|
16559
|
+
theme: theme2
|
|
16560
|
+
}) => theme2.breakpoint.sizes.sm);
|
|
16559
16561
|
const TitleArea = styled.styled.div.withConfig({
|
|
16560
16562
|
componentId: "sc-1wr6otn-3"
|
|
16561
16563
|
})(["display:flex;justify-content:space-between;align-items:center;min-height:", ";"], ({
|
|
@@ -41312,13 +41314,23 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
41312
41314
|
};
|
|
41313
41315
|
const Viewport = styled.styled($054eb8030ebde76e$export$d5c6c08dc2d3ca7).withConfig({
|
|
41314
41316
|
componentId: "sc-tmc8vl-6"
|
|
41315
|
-
})(["--viewport-padding:25px;position:fixed;bottom:0;
|
|
41317
|
+
})(["--viewport-padding:25px;position:fixed;bottom:0;", ";display:flex;flex-direction:column;padding:var(--viewport-padding);gap:", ";width:", ";max-width:100vw;margin:0;list-style:none;z-index:2147483647;outline:none;"], ({
|
|
41318
|
+
$align
|
|
41319
|
+
}) => {
|
|
41320
|
+
if ($align === "start") {
|
|
41321
|
+
return "left: 0";
|
|
41322
|
+
}
|
|
41323
|
+
return `
|
|
41324
|
+
right: 0;
|
|
41325
|
+
`;
|
|
41326
|
+
}, ({
|
|
41316
41327
|
theme: theme2
|
|
41317
41328
|
}) => theme2.click.toast.space.gap, ({
|
|
41318
41329
|
theme: theme2
|
|
41319
41330
|
}) => theme2.click.toast.size.width);
|
|
41320
41331
|
const ToastProvider = ({
|
|
41321
41332
|
children,
|
|
41333
|
+
align = "end",
|
|
41322
41334
|
...props
|
|
41323
41335
|
}) => {
|
|
41324
41336
|
const [toasts, setToasts] = React.useState(/* @__PURE__ */ new Map());
|
|
@@ -41351,12 +41363,12 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
41351
41363
|
});
|
|
41352
41364
|
}
|
|
41353
41365
|
};
|
|
41354
|
-
return /* @__PURE__ */ jsxRuntime.jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: "right", ...props, children: [
|
|
41366
|
+
return /* @__PURE__ */ jsxRuntime.jsxs($054eb8030ebde76e$export$2881499e37b75b9a, { swipeDirection: align === "start" ? "left" : "right", ...props, children: [
|
|
41355
41367
|
/* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
|
|
41356
41368
|
children,
|
|
41357
41369
|
Array.from(toasts).map(([id, toast]) => /* @__PURE__ */ jsxRuntime.jsx(Toast, { ...toast, onClose: onClose(id) }, id))
|
|
41358
41370
|
] }),
|
|
41359
|
-
/* @__PURE__ */ jsxRuntime.jsx(Viewport, {})
|
|
41371
|
+
/* @__PURE__ */ jsxRuntime.jsx(Viewport, { $align: align })
|
|
41360
41372
|
] });
|
|
41361
41373
|
};
|
|
41362
41374
|
function listCacheClear$1() {
|
|
@@ -50889,6 +50901,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
50889
50901
|
exports2.TextAreaField = TextAreaField;
|
|
50890
50902
|
exports2.TextField = TextField;
|
|
50891
50903
|
exports2.Title = Title$2;
|
|
50904
|
+
exports2.ToastProvider = ToastProvider;
|
|
50892
50905
|
exports2.Tooltip = Tooltip;
|
|
50893
50906
|
exports2.VerticalStepper = VerticalStepper;
|
|
50894
50907
|
exports2.WarningAlert = WarningAlert;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TooltipProviderProps } from '@radix-ui/react-tooltip';
|
|
2
|
-
import {
|
|
2
|
+
import { ToastProviderProps } from '../Toast/Toast';
|
|
3
3
|
import { ThemeName } from '../../theme';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
7
|
config?: {
|
|
8
8
|
tooltip?: Omit<TooltipProviderProps, "children">;
|
|
9
|
-
toast?: Omit<
|
|
9
|
+
toast?: Omit<ToastProviderProps, "children">;
|
|
10
10
|
};
|
|
11
11
|
theme: ThemeName;
|
|
12
12
|
children: ReactNode;
|
|
@@ -18,4 +18,7 @@ export interface ToastProps {
|
|
|
18
18
|
altText: string;
|
|
19
19
|
}>;
|
|
20
20
|
}
|
|
21
|
-
export
|
|
21
|
+
export interface ToastProviderProps extends RadixUIToast.ToastProps {
|
|
22
|
+
align?: "start" | "end";
|
|
23
|
+
}
|
|
24
|
+
export declare const ToastProvider: ({ children, align, ...props }: ToastProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -69,3 +69,4 @@ export { createToast } from './Toast/toastEmitter';
|
|
|
69
69
|
export { UserIcon as ProfileIcon } from './icons/UserIcon';
|
|
70
70
|
export { default as VerticalStepper } from './VerticalStepper/VerticalStepper';
|
|
71
71
|
export { MultiAccordion } from './MultiAccordion/MultiAccordion';
|
|
72
|
+
export { ToastProvider } from './Toast/Toast';
|