@tpc-mare/mare-ui-components-react 0.1.8 → 0.1.10
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/accordion/index.js +1 -1
- package/dist/banner/index.js +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/confirm-dialog/ConfirmDialog.d.ts +2 -0
- package/dist/confirm-dialog/ConfirmDialog.types.d.ts +21 -0
- package/dist/confirm-dialog/index.d.ts +2 -0
- package/dist/confirm-dialog/index.js +4 -0
- package/dist/date-picker/index.js +1 -1
- package/dist/dialog/index.js +5 -4
- package/dist/drawer/index.js +1 -1
- package/dist/image-item/ImageItem.d.ts +2 -0
- package/dist/image-item/ImageItem.types.d.ts +7 -0
- package/dist/image-item/index.d.ts +2 -0
- package/dist/image-item/index.js +4 -0
- package/dist/image-slider/ImageSlider.d.ts +2 -0
- package/dist/image-slider/ImageSlider.types.d.ts +6 -0
- package/dist/image-slider/index.d.ts +2 -0
- package/dist/image-slider/index.js +4 -0
- package/dist/index/index.d.ts +6 -0
- package/dist/index/index.js +46 -39
- package/dist/paginator/index.js +1 -1
- package/dist/panel-menu/index.js +1 -1
- package/dist/password/index.js +1 -1
- package/dist/search-field/index.js +1 -1
- package/dist/select-field/index.js +1 -1
- package/dist/shared/{Accordion-Cbs8KQ5v.js → Accordion-Dhs7EeM6.js} +1 -1
- package/dist/shared/{Banner-BWyV9K8e.js → Banner-B41NQS5P.js} +1 -1
- package/dist/shared/{Checkbox-D17WWbSe.js → Checkbox-B7vM1mxP.js} +1 -1
- package/dist/shared/{Combobox-CBa1lnAd.js → Combobox-oSS0Rlbv.js} +1 -1
- package/dist/shared/ConfirmDialog-Bvk8KZ0M.js +79 -0
- package/dist/shared/{DatePicker-BQulFC2D.js → DatePicker-GYH3uorm.js} +1 -1
- package/dist/shared/DialogFooter-DyltZzK-.js +106 -0
- package/dist/shared/DialogHeader-CZ5OrC8_.js +57 -0
- package/dist/shared/{DrawerFooter-CpO7chLC.js → DrawerFooter-OFrTFvy2.js} +1 -1
- package/dist/shared/ImageItem-BBy5fOl3.js +17 -0
- package/dist/shared/ImageSlider-CdBVmAYC.js +65 -0
- package/dist/shared/{Paginator-Da0XKfF3.js → Paginator-BndcA6Ax.js} +2 -2
- package/dist/shared/{PanelMenu-CYbr6cvz.js → PanelMenu-Bz-fg6px.js} +1 -1
- package/dist/shared/{Password-vADi8ZJz.js → Password-cqTK9OlT.js} +1 -1
- package/dist/shared/{SearchField-9bL2s8zj.js → SearchField-CgZV2Am-.js} +1 -1
- package/dist/shared/{SelectField-dNCMdSYU.js → SelectField-CGbdf8C2.js} +4 -4
- package/dist/shared/{Stepper-DApoMP1U.js → Stepper-BpKdB3ip.js} +1 -1
- package/dist/shared/{icons-bQxPPV8R.js → icons-BFOFrum4.js} +5 -5
- package/dist/stepper/index.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/shared/DialogFooter-0gaMdpXV.js +0 -154
package/dist/accordion/index.js
CHANGED
package/dist/banner/index.js
CHANGED
package/dist/checkbox/index.js
CHANGED
package/dist/combobox/index.js
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ConfirmDialogProperties } from './ConfirmDialog.types';
|
|
2
|
+
export declare function ConfirmDialog({ open, onOpenChange, header, message, severity, layout, icon, acceptLabel, rejectLabel, onAccept, onReject, portalContainer, }: ConfirmDialogProperties): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { ConfirmDialogSeverity, ConfirmDialogLayout } from '@tpc-development/mare-ui-components-core/confirm-dialog';
|
|
3
|
+
export type { ConfirmDialogSeverity, ConfirmDialogLayout, } from '@tpc-development/mare-ui-components-core/confirm-dialog';
|
|
4
|
+
export interface ConfirmDialogProperties {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
header: string;
|
|
8
|
+
message: string;
|
|
9
|
+
/** @default 'none' — 'warning' also swaps the accept button to `danger` severity. */
|
|
10
|
+
severity?: ConfirmDialogSeverity;
|
|
11
|
+
/** @default 'row' */
|
|
12
|
+
layout?: ConfirmDialogLayout;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/** @default 'Confirm' */
|
|
15
|
+
acceptLabel?: string;
|
|
16
|
+
/** @default 'Cancel' */
|
|
17
|
+
rejectLabel?: string;
|
|
18
|
+
onAccept?: () => void;
|
|
19
|
+
onReject?: () => void;
|
|
20
|
+
portalContainer?: RefObject<HTMLElement | null>;
|
|
21
|
+
}
|
package/dist/dialog/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { D as
|
|
1
|
+
import { D as r, a as e } from "../shared/DialogFooter-DyltZzK-.js";
|
|
2
|
+
import { D as g } from "../shared/DialogHeader-CZ5OrC8_.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
r as Dialog,
|
|
5
|
+
e as DialogFooter,
|
|
6
|
+
g as DialogHeader
|
|
6
7
|
};
|
package/dist/drawer/index.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ImageItemRatio } from '@tpc-development/mare-ui-components-core/image-item';
|
|
3
|
+
export type { ImageItemRatio } from '@tpc-development/mare-ui-components-core/image-item';
|
|
4
|
+
export interface ImageItemProperties {
|
|
5
|
+
ratio?: ImageItemRatio;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
package/dist/index/index.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export { Switch } from '../switch';
|
|
|
38
38
|
export type { SwitchProperties, SwitchSize } from '../switch';
|
|
39
39
|
export { Dialog, DialogHeader, DialogFooter } from '../dialog';
|
|
40
40
|
export type { DialogProperties, DialogSize, DialogHeaderProperties, DialogFooterProperties, DialogFooterLayout, } from '../dialog';
|
|
41
|
+
export { ConfirmDialog } from '../confirm-dialog';
|
|
42
|
+
export type { ConfirmDialogProperties, ConfirmDialogSeverity, ConfirmDialogLayout, } from '../confirm-dialog';
|
|
41
43
|
export { Drawer, DrawerHeader, DrawerFooter } from '../drawer';
|
|
42
44
|
export type { DrawerProperties, DrawerPosition, DrawerHeaderProperties, DrawerFooterProperties, } from '../drawer';
|
|
43
45
|
export { Menu } from '../menu';
|
|
@@ -52,3 +54,7 @@ export { DatePicker } from '../date-picker';
|
|
|
52
54
|
export type { DatePickerProperties, DatePickerSelectionMode, DatePickerValue, DatePriceData, } from '../date-picker';
|
|
53
55
|
export { Paginator } from '../paginator';
|
|
54
56
|
export type { PaginatorProperties } from '../paginator';
|
|
57
|
+
export { ImageItem } from '../image-item';
|
|
58
|
+
export type { ImageItemProperties, ImageItemRatio, } from '../image-item';
|
|
59
|
+
export { ImageSlider } from '../image-slider';
|
|
60
|
+
export type { ImageSliderProperties } from '../image-slider';
|
package/dist/index/index.js
CHANGED
|
@@ -1,68 +1,75 @@
|
|
|
1
|
-
import { A as a } from "../shared/Accordion-
|
|
1
|
+
import { A as a } from "../shared/Accordion-Dhs7EeM6.js";
|
|
2
2
|
import { A as t } from "../shared/Avatar-D3QlO3Tz.js";
|
|
3
3
|
import { B as p } from "../shared/Badge-WC6my4Aw.js";
|
|
4
|
-
import { T as
|
|
5
|
-
import { B as n } from "../shared/Banner-
|
|
6
|
-
import { B as
|
|
7
|
-
import { S } from "../shared/SelectField-
|
|
8
|
-
import { C as
|
|
9
|
-
import { T as
|
|
10
|
-
import { P
|
|
11
|
-
import { I as
|
|
4
|
+
import { T as x } from "../shared/Tag-BtbmgIwL.js";
|
|
5
|
+
import { B as n } from "../shared/Banner-B41NQS5P.js";
|
|
6
|
+
import { B as l } from "../shared/Button-AfMqNCme.js";
|
|
7
|
+
import { S as I } from "../shared/SelectField-CGbdf8C2.js";
|
|
8
|
+
import { C as d } from "../shared/Combobox-oSS0Rlbv.js";
|
|
9
|
+
import { T as g } from "../shared/Tabs-BqIorZYD.js";
|
|
10
|
+
import { P } from "../shared/ProgressSpinner-B-lrS-tu.js";
|
|
11
|
+
import { I as u, a as C } from "../shared/IconField-Dh6j6SL1.js";
|
|
12
12
|
import { C as w, F as B, a as h, H as k } from "../shared/HelperText-CVWWvLCI.js";
|
|
13
13
|
import { T as H } from "../shared/Textarea-iJhYTZos.js";
|
|
14
|
-
import { S as R } from "../shared/SearchField-
|
|
15
|
-
import { P as G, a as L } from "../shared/Password-
|
|
14
|
+
import { S as R } from "../shared/SearchField-CgZV2Am-.js";
|
|
15
|
+
import { P as G, a as L } from "../shared/Password-cqTK9OlT.js";
|
|
16
16
|
import { I as O } from "../shared/InputNumber-D48wsE-o.js";
|
|
17
17
|
import { I as q } from "../shared/InputOtp-CUXXVP2E.js";
|
|
18
|
-
import { C as z } from "../shared/Checkbox-
|
|
18
|
+
import { C as z } from "../shared/Checkbox-B7vM1mxP.js";
|
|
19
19
|
import { R as J } from "../shared/RadioGroup-lw27DCoV.js";
|
|
20
20
|
import { S as Q } from "../shared/Switch-D6E2OmgE.js";
|
|
21
|
-
import { D as V, a as W
|
|
22
|
-
import { D as
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
21
|
+
import { D as V, a as W } from "../shared/DialogFooter-DyltZzK-.js";
|
|
22
|
+
import { D as Y } from "../shared/DialogHeader-CZ5OrC8_.js";
|
|
23
|
+
import { C as _ } from "../shared/ConfirmDialog-Bvk8KZ0M.js";
|
|
24
|
+
import { D as rr, a as or, b as ar } from "../shared/DrawerFooter-OFrTFvy2.js";
|
|
25
|
+
import { M as tr } from "../shared/Menu-Cv9dU1iA.js";
|
|
26
|
+
import { P as pr } from "../shared/PanelMenu-Bz-fg6px.js";
|
|
27
|
+
import { S as xr, c as fr } from "../shared/Snackbar-C29nLHO9.js";
|
|
28
|
+
import { S as ir } from "../shared/Stepper-BpKdB3ip.js";
|
|
29
|
+
import { D as cr } from "../shared/DatePicker-GYH3uorm.js";
|
|
30
|
+
import { P as Sr } from "../shared/Paginator-BndcA6Ax.js";
|
|
31
|
+
import { I as Dr } from "../shared/ImageItem-BBy5fOl3.js";
|
|
32
|
+
import { I as Fr } from "../shared/ImageSlider-CdBVmAYC.js";
|
|
29
33
|
export {
|
|
30
34
|
a as Accordion,
|
|
31
35
|
t as Avatar,
|
|
32
36
|
p as Badge,
|
|
33
37
|
n as Banner,
|
|
34
|
-
|
|
38
|
+
l as Button,
|
|
35
39
|
w as CharacterCount,
|
|
36
40
|
z as Checkbox,
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
d as Combobox,
|
|
42
|
+
_ as ConfirmDialog,
|
|
43
|
+
cr as DatePicker,
|
|
39
44
|
V as Dialog,
|
|
40
45
|
W as DialogFooter,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
Y as DialogHeader,
|
|
47
|
+
rr as Drawer,
|
|
48
|
+
or as DrawerFooter,
|
|
49
|
+
ar as DrawerHeader,
|
|
45
50
|
B as FloatLabel,
|
|
46
51
|
h as FormField,
|
|
47
52
|
k as HelperText,
|
|
48
|
-
|
|
53
|
+
u as IconField,
|
|
54
|
+
Dr as ImageItem,
|
|
55
|
+
Fr as ImageSlider,
|
|
49
56
|
O as InputNumber,
|
|
50
57
|
q as InputOtp,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
C as InputText,
|
|
59
|
+
tr as Menu,
|
|
60
|
+
Sr as Paginator,
|
|
61
|
+
pr as PanelMenu,
|
|
55
62
|
G as Password,
|
|
56
63
|
L as PasswordFooterItem,
|
|
57
|
-
|
|
64
|
+
P as ProgressSpinner,
|
|
58
65
|
J as RadioGroup,
|
|
59
66
|
R as SearchField,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
I as SelectField,
|
|
68
|
+
xr as Snackbar,
|
|
69
|
+
ir as Stepper,
|
|
63
70
|
Q as Switch,
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
g as Tabs,
|
|
72
|
+
x as Tag,
|
|
66
73
|
H as Textarea,
|
|
67
|
-
|
|
74
|
+
fr as createSnackbar
|
|
68
75
|
};
|
package/dist/paginator/index.js
CHANGED
package/dist/panel-menu/index.js
CHANGED
package/dist/password/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { Accordion as r } from "@ark-ui/react/accordion";
|
|
3
|
-
import {
|
|
3
|
+
import { a as c } from "./icons-BFOFrum4.js";
|
|
4
4
|
const d = "mare:w-full", u = (t) => `
|
|
5
5
|
mare:flex mare:flex-col
|
|
6
6
|
${t ? "mare:border-b mare:border-default" : ""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { B as d } from "./Button-AfMqNCme.js";
|
|
3
|
-
import {
|
|
3
|
+
import { C as o } from "./icons-BFOFrum4.js";
|
|
4
4
|
const c = `
|
|
5
5
|
mare:w-full mare:max-w-md mare:rounded-tpc-container-s mare:p-4
|
|
6
6
|
mare:flex mare:items-start mare:justify-between mare:gap-4
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Checkbox as a } from "@ark-ui/react/checkbox";
|
|
3
|
-
import { b as f, M as x } from "./icons-
|
|
3
|
+
import { b as f, M as x } from "./icons-BFOFrum4.js";
|
|
4
4
|
const v = `
|
|
5
5
|
mare:group/checkbox
|
|
6
6
|
mare:relative mare:inline-flex mare:items-center mare:gap-2
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as T, useMemo as b } from "react";
|
|
3
3
|
import { createListCollection as V, ComboboxRoot as _, ComboboxLabel as j, ComboboxControl as $, ComboboxTrigger as q, ComboboxClearTrigger as D, ComboboxPositioner as E, ComboboxContent as M, ComboboxInput as O, ComboboxEmpty as P, ComboboxItem as Q, ComboboxItemText as R, ComboboxItemIndicator as z } from "@ark-ui/react/combobox";
|
|
4
|
-
import { c as A,
|
|
4
|
+
import { c as A, a as B, S as F, b as G } from "./icons-BFOFrum4.js";
|
|
5
5
|
const H = {
|
|
6
6
|
small: "mare:h-10",
|
|
7
7
|
medium: "mare:h-12"
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { D as g, a as h } from "./DialogFooter-DyltZzK-.js";
|
|
3
|
+
import { B as n } from "./Button-AfMqNCme.js";
|
|
4
|
+
const u = (e) => `
|
|
5
|
+
mare:w-full mare:h-full
|
|
6
|
+
${e === "column" ? "mare:pt-10 mare:pb-4" : "mare:pt-8"}
|
|
7
|
+
`, v = (e) => e === "column" ? "mare:flex mare:flex-col mare:items-center mare:gap-4" : "mare:flex mare:flex-col mare:sm:flex-row mare:items-center mare:sm:items-start mare:gap-4 mare:sm:gap-6", w = (e) => `mare:flex-1 mare:flex mare:flex-col mare:gap-2 ${e === "column" ? "mare:items-center mare:text-center" : "mare:items-center mare:sm:items-start mare:text-center mare:sm:text-left"}`, y = "mare:tpc-typography-title-s mare:text-default", k = "mare:overflow-y-auto mare:tpc-typography-body-m mare:text-weak", N = (e) => `
|
|
8
|
+
mare:size-10 mare:shrink-0 mare:rounded-full
|
|
9
|
+
mare:flex mare:items-center mare:justify-center
|
|
10
|
+
mare:[&>svg]:size-5
|
|
11
|
+
${e === "warning" ? "mare:bg-danger-weak mare:text-danger" : ""}
|
|
12
|
+
${e === "positive" ? "mare:bg-positive-weak mare:text-positive" : ""}
|
|
13
|
+
`;
|
|
14
|
+
function D({
|
|
15
|
+
open: e,
|
|
16
|
+
onOpenChange: m,
|
|
17
|
+
header: s,
|
|
18
|
+
message: c,
|
|
19
|
+
severity: l = "none",
|
|
20
|
+
layout: a = "row",
|
|
21
|
+
icon: i,
|
|
22
|
+
acceptLabel: o = "Confirm",
|
|
23
|
+
rejectLabel: f = "Cancel",
|
|
24
|
+
onAccept: d,
|
|
25
|
+
onReject: p,
|
|
26
|
+
portalContainer: x
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ r(
|
|
29
|
+
g,
|
|
30
|
+
{
|
|
31
|
+
open: e,
|
|
32
|
+
onOpenChange: m,
|
|
33
|
+
size: "small",
|
|
34
|
+
portalContainer: x,
|
|
35
|
+
"aria-label": s,
|
|
36
|
+
footer: /* @__PURE__ */ t(h, { layout: a, children: [
|
|
37
|
+
/* @__PURE__ */ r(
|
|
38
|
+
n,
|
|
39
|
+
{
|
|
40
|
+
severity: "secondary",
|
|
41
|
+
size: "large",
|
|
42
|
+
onClick: () => {
|
|
43
|
+
p?.(), m?.(!1);
|
|
44
|
+
},
|
|
45
|
+
children: f
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
|
+
n,
|
|
50
|
+
{
|
|
51
|
+
severity: l === "warning" ? "danger" : "primary",
|
|
52
|
+
size: "large",
|
|
53
|
+
onClick: () => {
|
|
54
|
+
d?.(), m?.(!1);
|
|
55
|
+
},
|
|
56
|
+
children: o
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] }),
|
|
60
|
+
children: /* @__PURE__ */ r("div", { className: u(a), children: /* @__PURE__ */ t("div", { className: v(a), children: [
|
|
61
|
+
i && /* @__PURE__ */ r(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
className: N(l),
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
children: i
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ t("div", { className: w(a), children: [
|
|
70
|
+
/* @__PURE__ */ r("span", { className: y, children: s }),
|
|
71
|
+
/* @__PURE__ */ r("div", { className: k, children: c })
|
|
72
|
+
] })
|
|
73
|
+
] }) })
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
D as C
|
|
79
|
+
};
|
|
@@ -2,7 +2,7 @@ import { jsxs as u, jsx as l, Fragment as ne } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as er, useEffect as rr, useMemo as oe } from "react";
|
|
3
3
|
import { DatePickerRoot as ar, DatePickerLabel as tr, DatePickerControl as nr, DatePickerTrigger as or, DatePickerContext as le, DatePickerClearTrigger as lr, DatePickerPositioner as ir, DatePickerContent as cr, DatePickerView as j, DatePickerViewControl as sr, DatePickerPrevTrigger as mr, DatePickerViewTrigger as dr, DatePickerRangeText as ie, DatePickerNextTrigger as ur, DatePickerTable as $e, DatePickerTableHead as hr, DatePickerTableRow as G, DatePickerTableHeader as fr, DatePickerTableBody as ge, DatePickerTableCell as be, DatePickerTableCellTrigger as xe } from "@ark-ui/react/date-picker";
|
|
4
4
|
import { Portal as yr } from "@ark-ui/react/portal";
|
|
5
|
-
import { i as pr, c as $r,
|
|
5
|
+
import { i as pr, c as $r, d as gr, e as br } from "./icons-BFOFrum4.js";
|
|
6
6
|
function O(e, r) {
|
|
7
7
|
return e - r * Math.floor(e / r);
|
|
8
8
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog as r } from "@ark-ui/react/dialog";
|
|
3
|
+
import { Portal as b } from "@ark-ui/react/portal";
|
|
4
|
+
const w = (e) => `
|
|
5
|
+
mare:fixed mare:inset-0 mare:z-40
|
|
6
|
+
${e ?? "mare:bg-overlay"}
|
|
7
|
+
mare:ark-open:[animation:mare-dialog-backdrop-enter_300ms_ease-out]
|
|
8
|
+
mare:ark-closed:[animation:mare-dialog-backdrop-exit_200ms_ease-in]
|
|
9
|
+
`, h = `
|
|
10
|
+
mare:fixed mare:inset-0 mare:z-50
|
|
11
|
+
mare:flex mare:items-center mare:justify-center
|
|
12
|
+
mare:overflow-y-auto mare:px-0 mare:sm:px-10
|
|
13
|
+
`, _ = {
|
|
14
|
+
small: "mare:sm:w-[28rem] mare:sm:max-w-[28rem]",
|
|
15
|
+
medium: "mare:sm:w-[42rem] mare:sm:max-w-[42rem]",
|
|
16
|
+
large: "mare:sm:w-[64rem] mare:sm:max-w-[64rem]"
|
|
17
|
+
}, k = (e) => `
|
|
18
|
+
mare:group/dialog mare:flex mare:flex-col
|
|
19
|
+
mare:w-full mare:max-w-full mare:max-w-screen ${_[e.size]}
|
|
20
|
+
mare:bg-default mare:text-default
|
|
21
|
+
mare:shadow-[0px_10px_15px_-3px_rgba(0,0,0,0.10),0px_4px_6px_-2px_rgba(0,0,0,0.05)]
|
|
22
|
+
mare:fixed mare:sm:relative mare:bottom-0 mare:sm:bottom-auto mare:left-0 mare:sm:left-auto mare:right-0 mare:sm:right-auto
|
|
23
|
+
mare:rounded-t-tpc-sheet mare:sm:rounded-tpc-dialog
|
|
24
|
+
mare:max-h-[calc(100%-32px)] mare:sm:max-h-[calc(100%-80px)]
|
|
25
|
+
mare:outline-none
|
|
26
|
+
mare:ark-open:[animation:mare-dialog-enter-mobile_300ms_ease-out]
|
|
27
|
+
mare:ark-closed:[animation:mare-dialog-exit-mobile_200ms_ease-in]
|
|
28
|
+
mare:sm:ark-open:[animation:mare-dialog-enter-desktop_300ms_ease-out]
|
|
29
|
+
mare:sm:ark-closed:[animation:mare-dialog-exit-desktop_200ms_ease-in]
|
|
30
|
+
${e.fullScreen ? "mare:top-0 mare:rounded-t-none! mare:sm:rounded-tpc-dialog! mare:sm:top-auto mare:max-h-full mare:sm:max-h-[calc(100%-80px)]" : ""}
|
|
31
|
+
`, y = (e) => `
|
|
32
|
+
mare:overflow-y-auto mare:px-6 mare:pb-6
|
|
33
|
+
${e ? "mare:grow" : ""}
|
|
34
|
+
`, N = (e) => `
|
|
35
|
+
mare:flex mare:w-full mare:items-center mare:justify-between mare:shrink-0
|
|
36
|
+
mare:h-14 mare:sm:h-16 mare:px-6
|
|
37
|
+
${e ? "mare:border-b mare:border-default" : ""}
|
|
38
|
+
`, z = "mare:-ml-1.5", O = "mare:-mr-1.5", I = (e) => `
|
|
39
|
+
mare:grow mare:w-full mare:truncate mare:text-center
|
|
40
|
+
mare:tpc-typography-label-m mare:text-default
|
|
41
|
+
${e.hasRightIcon ? "" : "mare:mr-6.5"}
|
|
42
|
+
${e.hasLeftIcon ? "" : "mare:ml-6.5"}
|
|
43
|
+
`, $ = (e) => `
|
|
44
|
+
mare:flex mare:flex-col-reverse mare:gap-3 mare:justify-end mare:w-full
|
|
45
|
+
mare:px-6 mare:pb-4 mare:sm:pb-6
|
|
46
|
+
${e.layout === "row" ? "mare:sm:flex-row" : ""}
|
|
47
|
+
${e.border ? "mare:pt-3 mare:sm:pt-6 mare:border-t mare:border-t-default" : "mare:pt-0"}
|
|
48
|
+
`;
|
|
49
|
+
function C({
|
|
50
|
+
open: e,
|
|
51
|
+
onOpenChange: m,
|
|
52
|
+
size: t = "medium",
|
|
53
|
+
fullScreen: o = !1,
|
|
54
|
+
modal: s = !0,
|
|
55
|
+
closeOnEscape: i = !0,
|
|
56
|
+
dismissableMask: n = !0,
|
|
57
|
+
maskColor: d,
|
|
58
|
+
portalContainer: p,
|
|
59
|
+
header: u,
|
|
60
|
+
footer: x,
|
|
61
|
+
children: c,
|
|
62
|
+
"aria-label": f
|
|
63
|
+
}) {
|
|
64
|
+
return /* @__PURE__ */ a(
|
|
65
|
+
r.Root,
|
|
66
|
+
{
|
|
67
|
+
open: e,
|
|
68
|
+
onOpenChange: (g) => m?.(g.open),
|
|
69
|
+
modal: s,
|
|
70
|
+
closeOnEscape: i,
|
|
71
|
+
closeOnInteractOutside: n,
|
|
72
|
+
"aria-label": f,
|
|
73
|
+
lazyMount: !0,
|
|
74
|
+
unmountOnExit: !0,
|
|
75
|
+
children: /* @__PURE__ */ l(b, { container: p, children: [
|
|
76
|
+
/* @__PURE__ */ a(r.Backdrop, { className: w(d) }),
|
|
77
|
+
/* @__PURE__ */ a(r.Positioner, { className: h, children: /* @__PURE__ */ l(
|
|
78
|
+
r.Content,
|
|
79
|
+
{
|
|
80
|
+
className: k({ size: t, fullScreen: o }),
|
|
81
|
+
children: [
|
|
82
|
+
u,
|
|
83
|
+
/* @__PURE__ */ a("div", { className: y(o), children: c }),
|
|
84
|
+
x
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
) })
|
|
88
|
+
] })
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
function P({
|
|
93
|
+
layout: e = "row",
|
|
94
|
+
border: m = !1,
|
|
95
|
+
children: t
|
|
96
|
+
}) {
|
|
97
|
+
return /* @__PURE__ */ a("div", { className: $({ layout: e, border: m }), children: t });
|
|
98
|
+
}
|
|
99
|
+
export {
|
|
100
|
+
C as D,
|
|
101
|
+
P as a,
|
|
102
|
+
I as i,
|
|
103
|
+
z as l,
|
|
104
|
+
O as n,
|
|
105
|
+
N as s
|
|
106
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog as a } from "@ark-ui/react/dialog";
|
|
3
|
+
import { l as h, i as o, n as d, s as u } from "./DialogFooter-DyltZzK-.js";
|
|
4
|
+
import { B as r } from "./Button-AfMqNCme.js";
|
|
5
|
+
import { C as p } from "./icons-BFOFrum4.js";
|
|
6
|
+
function N({
|
|
7
|
+
title: l,
|
|
8
|
+
leftIcon: i = /* @__PURE__ */ s(p, {}),
|
|
9
|
+
rightIcon: e,
|
|
10
|
+
onLeftIconClick: n,
|
|
11
|
+
onRightIconClick: m,
|
|
12
|
+
border: c = !1
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ t("div", { className: u(c), children: [
|
|
15
|
+
i ? /* @__PURE__ */ s("div", { className: h, children: /* @__PURE__ */ s(a.CloseTrigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
16
|
+
r,
|
|
17
|
+
{
|
|
18
|
+
severity: "ghost",
|
|
19
|
+
iconOnly: !0,
|
|
20
|
+
size: "xsmall",
|
|
21
|
+
icon: i,
|
|
22
|
+
onClick: n
|
|
23
|
+
}
|
|
24
|
+
) }) }) : null,
|
|
25
|
+
l ? /* @__PURE__ */ s(
|
|
26
|
+
a.Title,
|
|
27
|
+
{
|
|
28
|
+
className: o({
|
|
29
|
+
hasLeftIcon: !!i,
|
|
30
|
+
hasRightIcon: !!e
|
|
31
|
+
}),
|
|
32
|
+
children: l
|
|
33
|
+
}
|
|
34
|
+
) : /* @__PURE__ */ s(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
className: o({
|
|
38
|
+
hasLeftIcon: !!i,
|
|
39
|
+
hasRightIcon: !!e
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
e ? /* @__PURE__ */ s("div", { className: d, children: /* @__PURE__ */ s(
|
|
44
|
+
r,
|
|
45
|
+
{
|
|
46
|
+
severity: "ghost",
|
|
47
|
+
iconOnly: !0,
|
|
48
|
+
size: "xsmall",
|
|
49
|
+
icon: e,
|
|
50
|
+
onClick: m
|
|
51
|
+
}
|
|
52
|
+
) }) : null
|
|
53
|
+
] });
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
N as D
|
|
57
|
+
};
|
|
@@ -2,7 +2,7 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { Dialog as t } from "@ark-ui/react/dialog";
|
|
3
3
|
import { Portal as g } from "@ark-ui/react/portal";
|
|
4
4
|
import { B as d } from "./Button-AfMqNCme.js";
|
|
5
|
-
import {
|
|
5
|
+
import { C as y } from "./icons-BFOFrum4.js";
|
|
6
6
|
const _ = (e) => {
|
|
7
7
|
switch (e) {
|
|
8
8
|
case "left":
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
const r = {
|
|
3
|
+
"4:3": "mare:aspect-[4/3]",
|
|
4
|
+
"1:1": "mare:aspect-square",
|
|
5
|
+
"5:4": "mare:aspect-[5/4]",
|
|
6
|
+
"3:2": "mare:aspect-[3/2]",
|
|
7
|
+
free: "mare:aspect-auto"
|
|
8
|
+
}, t = (e) => `
|
|
9
|
+
mare:w-full mare:[&_img]:h-full mare:[&_img]:w-full mare:[&_img]:object-cover
|
|
10
|
+
${r[e]}
|
|
11
|
+
`;
|
|
12
|
+
function c({ ratio: e = "4:3", children: a }) {
|
|
13
|
+
return /* @__PURE__ */ m("div", { className: t(e), children: a });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
c as I
|
|
17
|
+
};
|