@vkzstudio/muza-ui 1.7.0 → 1.9.0
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/components/Breadcrumb/Breadcrumb.d.ts +146 -4
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +241 -84
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +4 -0
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.js +10 -7
- package/dist/components/Card/Card.d.ts +36 -27
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +41 -40
- package/dist/components/Carousel/Carousel.d.ts +16 -0
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.js +56 -55
- package/dist/components/CarouselSection/CarouselSection.examples.d.ts +15 -6
- package/dist/components/CarouselSection/CarouselSection.examples.d.ts.map +1 -1
- package/dist/components/CarouselSection/CarouselSection.stories.d.ts +2 -0
- package/dist/components/CarouselSection/CarouselSection.stories.d.ts.map +1 -1
- package/dist/components/CategoryIcon/CategoryIcon.d.ts.map +1 -1
- package/dist/components/CategoryIcon/CategoryIcon.js +25 -23
- package/dist/components/Dialog/Dialog.d.ts +19 -6
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +148 -112
- package/dist/components/Dialog/Dialog.stories.d.ts +3 -0
- package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
- package/dist/components/Flex/Flex.d.ts +42 -25
- package/dist/components/Flex/Flex.d.ts.map +1 -1
- package/dist/components/Flex/Flex.js +52 -53
- package/dist/components/OfferCard/OfferCard.d.ts +19 -5
- package/dist/components/OfferCard/OfferCard.d.ts.map +1 -1
- package/dist/components/OfferCard/OfferCard.js +181 -150
- package/dist/components/OfferCard/OfferCard.stories.d.ts +1 -0
- package/dist/components/OfferCard/OfferCard.stories.d.ts.map +1 -1
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts +1 -1
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts.map +1 -1
- package/dist/components/internal/CardCompactShell.d.ts +7 -1
- package/dist/components/internal/CardCompactShell.d.ts.map +1 -1
- package/dist/components/internal/CardCompactShell.js +57 -51
- package/dist/components/internal/CardImageSlot.d.ts.map +1 -1
- package/dist/components/internal/CardImageSlot.js +36 -37
- package/dist/hooks/use-is-breakpoint.d.ts +1 -4
- package/dist/hooks/use-is-breakpoint.d.ts.map +1 -1
- package/dist/index.js +448 -437
- package/dist/muza-ui.css +1 -1
- package/dist/styles/breakpoints.css +1 -0
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +3 -0
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +3 -0
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +3 -0
- package/dist/translations/types.d.ts +8 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/dist/utils/breakpoints.d.ts +43 -0
- package/dist/utils/breakpoints.d.ts.map +1 -0
- package/dist/utils/breakpoints.js +65 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +19 -11
- package/dist/utils/polymorphic.d.ts +44 -0
- package/dist/utils/polymorphic.d.ts.map +1 -0
- package/dist/utils/polymorphic.js +7 -0
- package/dist/utils/warnOnce.d.ts +37 -0
- package/dist/utils/warnOnce.d.ts.map +1 -0
- package/dist/utils/warnOnce.js +6 -0
- package/package.json +2 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { cva as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { cva as g } from "class-variance-authority";
|
|
4
|
+
import l from "color";
|
|
5
5
|
import { cn as y } from "../../utils/cn.js";
|
|
6
|
-
|
|
6
|
+
import { warnOnce as p } from "../../utils/warnOnce.js";
|
|
7
|
+
const f = g(
|
|
7
8
|
"inline-flex shrink-0 items-center justify-center rounded-full [&>svg]:pointer-events-none",
|
|
8
9
|
{
|
|
9
10
|
variants: {
|
|
@@ -15,40 +16,41 @@ const d = l(
|
|
|
15
16
|
},
|
|
16
17
|
defaultVariants: { size: "sm" }
|
|
17
18
|
}
|
|
18
|
-
),
|
|
19
|
+
), z = (e) => {
|
|
19
20
|
try {
|
|
20
|
-
return
|
|
21
|
+
return l(e);
|
|
21
22
|
} catch {
|
|
22
23
|
return null;
|
|
23
24
|
}
|
|
24
|
-
},
|
|
25
|
-
({ className:
|
|
26
|
-
const o =
|
|
27
|
-
return
|
|
28
|
-
`
|
|
29
|
-
|
|
25
|
+
}, d = m.forwardRef(
|
|
26
|
+
({ className: e, color: r, icon: i, size: c, style: t, ...a }, n) => {
|
|
27
|
+
const o = z(r);
|
|
28
|
+
return o || p(
|
|
29
|
+
`CategoryIcon:invalid-color:${r}`,
|
|
30
|
+
`[CategoryIcon] Invalid color "${r}". Falling back to neutral styling.`
|
|
31
|
+
), /* @__PURE__ */ s(
|
|
30
32
|
"span",
|
|
31
33
|
{
|
|
32
|
-
ref:
|
|
34
|
+
ref: n,
|
|
33
35
|
"data-slot": "category-icon",
|
|
34
36
|
className: y(
|
|
35
|
-
|
|
37
|
+
f({ size: c }),
|
|
36
38
|
o && "bg-(--category-icon-bg) text-(--category-icon-fg)",
|
|
37
|
-
|
|
39
|
+
e
|
|
38
40
|
),
|
|
39
41
|
style: o ? {
|
|
40
42
|
"--category-icon-bg": o.alpha(0.2).toString(),
|
|
41
43
|
"--category-icon-fg": o.toString(),
|
|
42
|
-
...
|
|
43
|
-
} :
|
|
44
|
-
...
|
|
45
|
-
children:
|
|
44
|
+
...t
|
|
45
|
+
} : t,
|
|
46
|
+
...a,
|
|
47
|
+
children: i
|
|
46
48
|
}
|
|
47
49
|
);
|
|
48
50
|
}
|
|
49
51
|
);
|
|
50
|
-
|
|
52
|
+
d.displayName = "CategoryIcon";
|
|
51
53
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
d as CategoryIcon,
|
|
55
|
+
f as categoryIconVariants
|
|
54
56
|
};
|
|
@@ -20,11 +20,28 @@ export interface DialogContentProps extends ComponentPropsWithoutRef<typeof Dial
|
|
|
20
20
|
/**
|
|
21
21
|
* Shrinks the content region's top and bottom padding to
|
|
22
22
|
* `--spacing-comp-dialog-p-hor-sm` for a more compact dialog. Header and
|
|
23
|
-
* footer keep their own padding and stay flush to the edges.
|
|
23
|
+
* footer keep their own padding and stay flush to the edges. Combined with
|
|
24
|
+
* `isFullscreenOnMobile`, a bare-content dialog keeps this compact bottom
|
|
25
|
+
* padding at fullscreen too.
|
|
24
26
|
*
|
|
25
27
|
* @default false
|
|
26
28
|
*/
|
|
27
29
|
smallerContentYpadding?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Below the `md` breakpoint (768px), renders the dialog edge-to-edge over
|
|
32
|
+
* the whole viewport: the overlay gutter, the `max-w-*` cap and the corner
|
|
33
|
+
* radius all come off. Above `md` the dialog is unchanged.
|
|
34
|
+
*
|
|
35
|
+
* A bare-content dialog moves its close button in-flow to the top right and
|
|
36
|
+
* scrolls as a whole. A dialog with a `DialogHeader` / `DialogFooter` is
|
|
37
|
+
* pinned to the full screen height with the content region scrolling
|
|
38
|
+
* between them. Without a `DialogHeader` a close button is rendered at the
|
|
39
|
+
* top of the content region, because at fullscreen there is no overlay to
|
|
40
|
+
* tap; with `DialogHeader hideCloseButton` provide your own `DialogClose`.
|
|
41
|
+
*
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
isFullscreenOnMobile?: boolean;
|
|
28
45
|
}
|
|
29
46
|
declare const Dialog: React.FC<DialogProps>;
|
|
30
47
|
declare const DialogTitle: import('react').ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
@@ -48,10 +65,6 @@ declare const DialogTrigger: import('react').ForwardRefExoticComponent<DialogPri
|
|
|
48
65
|
declare const DialogPortal: import('react').FC<DialogPrimitive.DialogPortalProps>;
|
|
49
66
|
declare const DialogClose: import('react').ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
50
67
|
declare const DialogOverlay: import('react').ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
51
|
-
declare const DialogContent: import('react').ForwardRefExoticComponent<
|
|
52
|
-
size?: "small" | "medium" | "large";
|
|
53
|
-
closeAriaLabel?: string;
|
|
54
|
-
smallerContentYpadding?: boolean;
|
|
55
|
-
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
68
|
+
declare const DialogContent: import('react').ForwardRefExoticComponent<DialogContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
56
69
|
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
57
70
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EAGf,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAMzD,6EAA6E;AAC7E,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC;IACzD,2CAA2C;IAC3C,IAAI,C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B,CAAC,EAAE,OAAO,CAAA;IAChC;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAwB,CAAA;AAC1D,QAAA,MAAM,WAAW,iIAAwB,CAAA;AACzC,QAAA,MAAM,iBAAiB,yIAA8B,CAAA;AAsBrD,iHAAiH;AACjH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACtD,wDAAwD;IACxD,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,sEAAsE;IACtE,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,QAAA,MAAM,YAAY,8GAyDjB,CAAA;AAGD,6IAA6I;AAC7I,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAE/D,QAAA,MAAM,YAAY,2MAejB,CAAA;AAGD,QAAA,MAAM,aAAa,kIAA0B,CAAA;AAC7C,QAAA,MAAM,YAAY,uDAAyB,CAAA;AAC3C,QAAA,MAAM,WAAW,gIAAwB,CAAA;AAEzC,QAAA,MAAM,aAAa,4LAYjB,CAAA;AAGF,QAAA,MAAM,aAAa,+GA+HlB,CAAA;AAGD,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAA"}
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as a, jsxs as n, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b, Children as T, isValidElement as k } from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
|
4
|
-
import { useMuzaTranslations as
|
|
5
|
-
import { cn as
|
|
4
|
+
import { useMuzaTranslations as C } from "../../translations/TranslationContext.js";
|
|
5
|
+
import { cn as i } from "../../utils/cn.js";
|
|
6
6
|
import "@solar-icons/react-perf";
|
|
7
|
-
import { XClose as
|
|
8
|
-
import { typographyVariants as
|
|
9
|
-
const
|
|
10
|
-
className:
|
|
7
|
+
import { XClose as z } from "../Icons/CustomIcons.js";
|
|
8
|
+
import { typographyVariants as H } from "../Typography/Typography.js";
|
|
9
|
+
const J = e.Root, K = e.Title, Q = e.Description, w = ({
|
|
10
|
+
className: t,
|
|
11
11
|
ariaLabel: o
|
|
12
12
|
}) => /* @__PURE__ */ a(
|
|
13
13
|
e.Close,
|
|
14
14
|
{
|
|
15
|
-
className:
|
|
15
|
+
className: i(
|
|
16
16
|
"cursor-pointer text-icon-dark-primary-def focus-visible-default transition-opacity disabled:pointer-events-none",
|
|
17
|
-
|
|
17
|
+
t
|
|
18
18
|
),
|
|
19
19
|
"aria-label": o,
|
|
20
|
-
children: /* @__PURE__ */ a(
|
|
20
|
+
children: /* @__PURE__ */ a(z, { className: "size-icon-medium" })
|
|
21
21
|
}
|
|
22
|
-
),
|
|
22
|
+
), j = b(
|
|
23
23
|
({
|
|
24
|
-
className:
|
|
24
|
+
className: t,
|
|
25
25
|
icon: o,
|
|
26
|
-
children:
|
|
27
|
-
title:
|
|
28
|
-
hideCloseButton:
|
|
29
|
-
closeAriaLabel:
|
|
30
|
-
...
|
|
31
|
-
},
|
|
32
|
-
const y =
|
|
26
|
+
children: r,
|
|
27
|
+
title: m,
|
|
28
|
+
hideCloseButton: d = !1,
|
|
29
|
+
closeAriaLabel: s,
|
|
30
|
+
...f
|
|
31
|
+
}, h) => {
|
|
32
|
+
const y = C(), g = s ?? y.dialog.closeAriaLabel;
|
|
33
33
|
return /* @__PURE__ */ a(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
|
-
ref:
|
|
37
|
-
className:
|
|
36
|
+
ref: h,
|
|
37
|
+
className: i(
|
|
38
38
|
"-mx-comp-dialog-p -mt-comp-dialog-p border-b border-stroke-base-primary px-comp-dialog-p py-comp-dialog-p-hor-def",
|
|
39
|
-
|
|
39
|
+
t
|
|
40
40
|
),
|
|
41
|
-
...
|
|
42
|
-
children: /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
41
|
+
...f,
|
|
42
|
+
children: /* @__PURE__ */ n("div", { className: "flex items-center gap-comp-dialog-gap", children: [
|
|
43
|
+
/* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1 items-center gap-sm", children: [
|
|
44
44
|
o && /* @__PURE__ */ a("span", { className: "text-icon-brand-def [&>svg]:size-icon-medium", children: o }),
|
|
45
45
|
/* @__PURE__ */ a(
|
|
46
46
|
e.Title,
|
|
47
47
|
{
|
|
48
|
-
className:
|
|
48
|
+
className: i(
|
|
49
49
|
"min-w-0 flex-1 text-text-dark-primary-def",
|
|
50
|
-
|
|
50
|
+
H({
|
|
51
51
|
variant: "title",
|
|
52
52
|
size: "md",
|
|
53
53
|
weight: "medium",
|
|
54
54
|
fixY: !0
|
|
55
55
|
})
|
|
56
56
|
),
|
|
57
|
-
children:
|
|
57
|
+
children: m ?? r
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
] }),
|
|
61
|
-
!
|
|
62
|
-
|
|
61
|
+
!d && /* @__PURE__ */ a(
|
|
62
|
+
w,
|
|
63
63
|
{
|
|
64
64
|
className: "shrink-0",
|
|
65
|
-
ariaLabel:
|
|
65
|
+
ariaLabel: g
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
68
|
] })
|
|
@@ -70,112 +70,148 @@ const q = e.Root, G = e.Title, I = e.Description, k = ({
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
({ className:
|
|
73
|
+
j.displayName = "DialogHeader";
|
|
74
|
+
const P = b(
|
|
75
|
+
({ className: t, children: o, ...r }, m) => /* @__PURE__ */ a(
|
|
76
76
|
"div",
|
|
77
77
|
{
|
|
78
|
-
ref:
|
|
79
|
-
className:
|
|
78
|
+
ref: m,
|
|
79
|
+
className: i(
|
|
80
80
|
"-mx-comp-dialog-p -mb-comp-dialog-p flex items-center justify-end gap-sm border-t border-stroke-base-primary px-comp-dialog-p py-comp-dialog-p-hor-sm",
|
|
81
|
-
|
|
81
|
+
t
|
|
82
82
|
),
|
|
83
|
-
...
|
|
83
|
+
...r,
|
|
84
84
|
children: o
|
|
85
85
|
}
|
|
86
86
|
)
|
|
87
87
|
);
|
|
88
|
-
|
|
89
|
-
const
|
|
88
|
+
P.displayName = "DialogFooter";
|
|
89
|
+
const S = e.Trigger, R = e.Portal, U = e.Close, L = b(({ className: t, ...o }, r) => /* @__PURE__ */ a(
|
|
90
90
|
e.Overlay,
|
|
91
91
|
{
|
|
92
|
-
ref:
|
|
93
|
-
className:
|
|
92
|
+
ref: r,
|
|
93
|
+
className: i(
|
|
94
94
|
"fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-surface-base-overlay px-layout-p-standard py-comp-dialog-p-hor-overlay data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
95
|
-
|
|
95
|
+
t
|
|
96
96
|
),
|
|
97
97
|
...o
|
|
98
98
|
}
|
|
99
99
|
));
|
|
100
|
-
|
|
101
|
-
const
|
|
100
|
+
L.displayName = e.Overlay.displayName;
|
|
101
|
+
const V = b(
|
|
102
102
|
({
|
|
103
|
-
className:
|
|
103
|
+
className: t,
|
|
104
104
|
children: o,
|
|
105
|
-
size:
|
|
106
|
-
closeAriaLabel:
|
|
107
|
-
smallerContentYpadding:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
size: r = "medium",
|
|
106
|
+
closeAriaLabel: m,
|
|
107
|
+
smallerContentYpadding: d = !1,
|
|
108
|
+
isFullscreenOnMobile: s = !1,
|
|
109
|
+
...f
|
|
110
|
+
}, h) => {
|
|
111
|
+
const y = C(), g = m ?? y.dialog.closeAriaLabel, u = T.toArray(o), v = u.find(
|
|
111
112
|
(l) => {
|
|
112
|
-
var
|
|
113
|
-
return
|
|
113
|
+
var p;
|
|
114
|
+
return k(l) && ((p = l.type) == null ? void 0 : p.displayName) === "DialogHeader";
|
|
114
115
|
}
|
|
115
|
-
),
|
|
116
|
+
), N = u.find(
|
|
116
117
|
(l) => {
|
|
117
|
-
var
|
|
118
|
-
return
|
|
118
|
+
var p;
|
|
119
|
+
return k(l) && ((p = l.type) == null ? void 0 : p.displayName) === "DialogFooter";
|
|
119
120
|
}
|
|
120
|
-
), A =
|
|
121
|
-
(l) => l !==
|
|
122
|
-
),
|
|
123
|
-
return /* @__PURE__ */ a(
|
|
124
|
-
|
|
121
|
+
), A = u.filter(
|
|
122
|
+
(l) => l !== v && l !== N
|
|
123
|
+
), c = !!v, x = !!N;
|
|
124
|
+
return /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(
|
|
125
|
+
L,
|
|
125
126
|
{
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"relative flex w-full flex-col rounded-comp-dialog-radius bg-surface-base-secondary px-comp-dialog-p duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
129
|
-
{
|
|
130
|
-
"max-w-comp-dialog-w-sm": t === "small",
|
|
131
|
-
"max-w-comp-dialog-w-md": t === "medium",
|
|
132
|
-
"max-w-comp-dialog-w-lg": t === "large",
|
|
133
|
-
"max-h-[calc(100vh-var(--spacing-comp-dialog-p-hor-overlay)*2)]": v || x
|
|
134
|
-
},
|
|
135
|
-
// Header/footer bleed to the edges via negative margins that cancel
|
|
136
|
-
// the root vertical padding, so it stays standard when either is
|
|
137
|
-
// present. A bare content dialog is padded directly by the root.
|
|
138
|
-
x || v ? "py-comp-dialog-p" : m ? "py-comp-dialog-p-hor-sm" : "pt-5xl pb-comp-dialog-p",
|
|
139
|
-
i
|
|
127
|
+
className: i(
|
|
128
|
+
s && "max-md:place-items-stretch max-md:px-0 max-md:py-0"
|
|
140
129
|
),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"-
|
|
149
|
-
|
|
130
|
+
children: /* @__PURE__ */ a(
|
|
131
|
+
e.Content,
|
|
132
|
+
{
|
|
133
|
+
ref: h,
|
|
134
|
+
className: i(
|
|
135
|
+
"relative flex w-full flex-col rounded-comp-dialog-radius bg-surface-base-secondary px-comp-dialog-p duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
136
|
+
{
|
|
137
|
+
"max-w-comp-dialog-w-sm": r === "small",
|
|
138
|
+
"max-w-comp-dialog-w-md": r === "medium",
|
|
139
|
+
"max-w-comp-dialog-w-lg": r === "large",
|
|
140
|
+
"max-h-[calc(100vh-var(--spacing-comp-dialog-p-hor-overlay)*2)]": x || c
|
|
141
|
+
},
|
|
142
|
+
// Header/footer bleed to the edges via negative margins that cancel
|
|
143
|
+
// the root vertical padding, so it stays standard when either is
|
|
144
|
+
// present. A bare content dialog is padded directly by the root.
|
|
145
|
+
c || x ? "py-comp-dialog-p" : d ? "py-comp-dialog-p-hor-sm" : "pt-5xl pb-comp-dialog-p",
|
|
146
|
+
// `max-w-none` is unusable: the design system defines
|
|
147
|
+
// `--spacing-none`, so Tailwind resolves it to `0px`.
|
|
148
|
+
s && "max-md:max-w-[none] max-md:rounded-none",
|
|
149
|
+
s && (c || x ? (
|
|
150
|
+
// The overlay's grid row is auto-sized, so the column needs
|
|
151
|
+
// a definite height for the `flex-1` middle to scroll in.
|
|
152
|
+
"max-md:h-dvh max-md:max-h-dvh"
|
|
153
|
+
) : (
|
|
154
|
+
// Tokens follow the design's fullscreen frame, which binds
|
|
155
|
+
// the primitives rather than the dialog tokens.
|
|
156
|
+
[
|
|
157
|
+
"max-md:px-layout-p-standard max-md:pt-xl",
|
|
158
|
+
!d && "max-md:pb-3xl"
|
|
159
|
+
]
|
|
160
|
+
)),
|
|
161
|
+
t
|
|
162
|
+
),
|
|
163
|
+
...f,
|
|
164
|
+
children: c || x ? /* @__PURE__ */ n(D, { children: [
|
|
165
|
+
v,
|
|
166
|
+
/* @__PURE__ */ n(
|
|
167
|
+
"div",
|
|
168
|
+
{
|
|
169
|
+
className: i(
|
|
170
|
+
"-mr-[calc(var(--spacing-comp-dialog-p)-8px)] min-h-0 flex-1 overflow-y-auto pr-[calc(var(--spacing-comp-dialog-p)-8px-5px)] [&::-webkit-scrollbar]:w-[5px] [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-stroke-base-secondary hover:[&::-webkit-scrollbar-thumb]:bg-stroke-base-primary [&::-webkit-scrollbar-track]:bg-transparent",
|
|
171
|
+
d ? "py-comp-dialog-p-hor-sm" : "py-comp-dialog-p"
|
|
172
|
+
),
|
|
173
|
+
children: [
|
|
174
|
+
s && !c && /* @__PURE__ */ a(
|
|
175
|
+
w,
|
|
176
|
+
{
|
|
177
|
+
className: "mb-xl ml-auto block md:hidden",
|
|
178
|
+
ariaLabel: g
|
|
179
|
+
}
|
|
180
|
+
),
|
|
181
|
+
/* @__PURE__ */ a("div", { children: A })
|
|
182
|
+
]
|
|
183
|
+
}
|
|
150
184
|
),
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
185
|
+
N
|
|
186
|
+
] }) : /* @__PURE__ */ n(D, { children: [
|
|
187
|
+
o,
|
|
188
|
+
/* @__PURE__ */ a(
|
|
189
|
+
w,
|
|
190
|
+
{
|
|
191
|
+
className: i(
|
|
192
|
+
"absolute top-4 right-4",
|
|
193
|
+
s && "max-md:static max-md:order-first max-md:mb-xl max-md:self-end"
|
|
194
|
+
),
|
|
195
|
+
ariaLabel: g
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
] })
|
|
199
|
+
}
|
|
200
|
+
)
|
|
165
201
|
}
|
|
166
|
-
) })
|
|
202
|
+
) });
|
|
167
203
|
}
|
|
168
204
|
);
|
|
169
|
-
|
|
205
|
+
V.displayName = e.Content.displayName;
|
|
170
206
|
export {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
207
|
+
J as Dialog,
|
|
208
|
+
U as DialogClose,
|
|
209
|
+
V as DialogContent,
|
|
210
|
+
Q as DialogDescription,
|
|
211
|
+
P as DialogFooter,
|
|
212
|
+
j as DialogHeader,
|
|
213
|
+
L as DialogOverlay,
|
|
214
|
+
R as DialogPortal,
|
|
215
|
+
K as DialogTitle,
|
|
216
|
+
S as DialogTrigger
|
|
181
217
|
};
|
|
@@ -17,4 +17,7 @@ export declare const OverflowContent: Story;
|
|
|
17
17
|
export declare const WithHeaderAndFooter: Story;
|
|
18
18
|
export declare const SmallerContentYPadding: Story;
|
|
19
19
|
export declare const WithHeaderAndFooterLongContent: Story;
|
|
20
|
+
export declare const FullscreenOnMobile: Story;
|
|
21
|
+
export declare const FullscreenOnMobileWithHeaderAndFooter: Story;
|
|
22
|
+
export declare const FullscreenOnMobileFooterOnly: Story;
|
|
20
23
|
//# sourceMappingURL=Dialog.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,OAAO,EACL,MAAM,EAOP,MAAM,UAAU,CAAA;AAEjB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAiD7B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAA;AAEtC,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAoDnB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KA+BvB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAkBpB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAkBnB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAkB7B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KA2CjC,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,KAuCpC,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,KAiK5C,CAAA"}
|
|
1
|
+
{"version":3,"file":"Dialog.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,OAAO,EACL,MAAM,EAOP,MAAM,UAAU,CAAA;AAEjB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAiD7B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAA;AAEtC,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAoDnB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KA+BvB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAkBpB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAkBnB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAkB7B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KA2CjC,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,KAuCpC,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,KAiK5C,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KA6HhC,CAAA;AAED,eAAO,MAAM,qCAAqC,EAAE,KAwCnD,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,KAiD1C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableTable.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandableTable/ExpandableTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ExpandableTable.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandableTable/ExpandableTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAId,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAa/D,YAAY,EAAE,oBAAoB,EAAE,CAAA;AAEpC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;IACxD,wDAAwD;IACxD,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,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IACrB;;;;;;;;;;;;;;;;;OAiBG;IACH,qBAAqB,CAAC,EAClB,0BAA0B,CAAC,CAAC,CAAC,EAAE,GAC/B,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACjD;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;QACnB,0GAA0G;QAC1G,mBAAmB,EAAE,MAAM,CAAA;QAC3B,yFAAyF;QACzF,YAAY,EAAE,MAAM,CAAA;QACpB,0GAA0G;QAC1G,SAAS,EAAE,MAAM,CAAA;KAClB,CAAC,CAAA;CACH;AA4CD,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,uDAKhE,oBAAoB,CAAC,CAAC,CAAC,4CAgYzB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HTMLElementTag } from '../../utils/polymorphic';
|
|
2
2
|
import { SpacingProps } from '../../utils/spacing';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
/**
|
|
@@ -373,39 +373,39 @@ export declare const flexLayoutDefaults: {
|
|
|
373
373
|
readonly align: "stretch";
|
|
374
374
|
};
|
|
375
375
|
declare const flexVariants: (props?: ({
|
|
376
|
-
gap?: "
|
|
377
|
-
gapX?: "
|
|
378
|
-
gapY?: "
|
|
379
|
-
p?: "
|
|
380
|
-
px?: "
|
|
381
|
-
py?: "
|
|
382
|
-
pt?: "
|
|
383
|
-
pr?: "
|
|
384
|
-
pb?: "
|
|
385
|
-
pl?: "
|
|
386
|
-
m?: "
|
|
387
|
-
mx?: "
|
|
388
|
-
my?: "
|
|
389
|
-
mt?: "
|
|
390
|
-
mr?: "
|
|
391
|
-
mb?: "
|
|
392
|
-
ml?: "
|
|
376
|
+
gap?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
377
|
+
gapX?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
378
|
+
gapY?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
379
|
+
p?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
380
|
+
px?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
381
|
+
py?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
382
|
+
pt?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
383
|
+
pr?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
384
|
+
pb?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
385
|
+
pl?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
386
|
+
m?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
387
|
+
mx?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
388
|
+
my?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
389
|
+
mt?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
390
|
+
mr?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
391
|
+
mb?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
392
|
+
ml?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "none" | "2xs" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
393
393
|
direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
|
|
394
394
|
wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
|
|
395
395
|
justify?: "end" | "start" | "center" | "stretch" | "between" | "around" | "evenly" | null | undefined;
|
|
396
396
|
align?: "end" | "start" | "center" | "baseline" | "stretch" | null | undefined;
|
|
397
397
|
flex?: 1 | "none" | "auto" | "initial" | null | undefined;
|
|
398
398
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
399
|
-
type HTMLElementTag = keyof React.JSX.IntrinsicElements & keyof HTMLElementTagNameMap;
|
|
400
399
|
/**
|
|
401
|
-
*
|
|
402
|
-
*
|
|
400
|
+
* Flex's own layout props, independent of which element it renders as.
|
|
401
|
+
*
|
|
402
|
+
* Split out from `FlexProps` so composing components can subtract these keys
|
|
403
|
+
* from an element's native attributes — the two sets overlap on names like
|
|
404
|
+
* `wrap` and `align`, and Flex's meaning has to win.
|
|
403
405
|
*/
|
|
404
|
-
export interface
|
|
406
|
+
export interface FlexOwnProps extends SpacingProps {
|
|
405
407
|
/** Content to display inside the flex container. */
|
|
406
408
|
children?: React.ReactNode;
|
|
407
|
-
/** HTML element to render for semantic markup. @default 'div' */
|
|
408
|
-
component?: HTMLElementTag;
|
|
409
409
|
/** Additional CSS classes for custom styling. */
|
|
410
410
|
className?: string;
|
|
411
411
|
/** Inline styles for escape-hatch customizations not covered by tokens. */
|
|
@@ -452,6 +452,23 @@ export interface FlexProps extends Omit<VariantProps<typeof flexVariants>, 'gap'
|
|
|
452
452
|
*/
|
|
453
453
|
margin?: SpacingProps['margin'];
|
|
454
454
|
}
|
|
455
|
-
|
|
455
|
+
/**
|
|
456
|
+
* Props for the Flex layout component.
|
|
457
|
+
* Extends CSS Flexbox with design system spacing tokens and semantic HTML support.
|
|
458
|
+
*
|
|
459
|
+
* Includes the standard HTML attributes (`id`, `onClick`, `role`, `aria-*`, …)
|
|
460
|
+
* typed against `HTMLElement`, since the rendered tag is not known here. Name
|
|
461
|
+
* a `component` at the call site and its own attributes come along too —
|
|
462
|
+
* `href` on an `a`, `htmlFor` on a `label` — with `ref` typed as that element.
|
|
463
|
+
*
|
|
464
|
+
* @example
|
|
465
|
+
* <Flex id="filters" onClick={handleClick} gap="sm" />
|
|
466
|
+
* <Flex component="a" href="/account" gap="sm" />
|
|
467
|
+
*/
|
|
468
|
+
export interface FlexProps extends FlexOwnProps, Omit<React.HTMLAttributes<HTMLElement>, keyof FlexOwnProps | 'color'> {
|
|
469
|
+
/** HTML element to render for semantic markup. @default 'div' */
|
|
470
|
+
component?: HTMLElementTag;
|
|
471
|
+
}
|
|
472
|
+
declare const Flex: import('../../utils').PolymorphicComponent<FlexOwnProps, FlexProps>;
|
|
456
473
|
export { Flex, flexVariants };
|
|
457
474
|
//# sourceMappingURL=Flex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../src/components/Flex/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../src/components/Flex/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,qBAAqB,CAAA;AAChF,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,iBAAiB,CAAA;AAExB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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