@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.
Files changed (66) hide show
  1. package/dist/components/Breadcrumb/Breadcrumb.d.ts +146 -4
  2. package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  3. package/dist/components/Breadcrumb/Breadcrumb.js +241 -84
  4. package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +4 -0
  5. package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
  6. package/dist/components/Breadcrumb/index.js +10 -7
  7. package/dist/components/Card/Card.d.ts +36 -27
  8. package/dist/components/Card/Card.d.ts.map +1 -1
  9. package/dist/components/Card/Card.js +41 -40
  10. package/dist/components/Carousel/Carousel.d.ts +16 -0
  11. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  12. package/dist/components/Carousel/Carousel.js +56 -55
  13. package/dist/components/CarouselSection/CarouselSection.examples.d.ts +15 -6
  14. package/dist/components/CarouselSection/CarouselSection.examples.d.ts.map +1 -1
  15. package/dist/components/CarouselSection/CarouselSection.stories.d.ts +2 -0
  16. package/dist/components/CarouselSection/CarouselSection.stories.d.ts.map +1 -1
  17. package/dist/components/CategoryIcon/CategoryIcon.d.ts.map +1 -1
  18. package/dist/components/CategoryIcon/CategoryIcon.js +25 -23
  19. package/dist/components/Dialog/Dialog.d.ts +19 -6
  20. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  21. package/dist/components/Dialog/Dialog.js +148 -112
  22. package/dist/components/Dialog/Dialog.stories.d.ts +3 -0
  23. package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
  24. package/dist/components/ExpandableTable/ExpandableTable.d.ts +1 -1
  25. package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
  26. package/dist/components/Flex/Flex.d.ts +42 -25
  27. package/dist/components/Flex/Flex.d.ts.map +1 -1
  28. package/dist/components/Flex/Flex.js +52 -53
  29. package/dist/components/OfferCard/OfferCard.d.ts +19 -5
  30. package/dist/components/OfferCard/OfferCard.d.ts.map +1 -1
  31. package/dist/components/OfferCard/OfferCard.js +181 -150
  32. package/dist/components/OfferCard/OfferCard.stories.d.ts +1 -0
  33. package/dist/components/OfferCard/OfferCard.stories.d.ts.map +1 -1
  34. package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts +1 -1
  35. package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts.map +1 -1
  36. package/dist/components/internal/CardCompactShell.d.ts +7 -1
  37. package/dist/components/internal/CardCompactShell.d.ts.map +1 -1
  38. package/dist/components/internal/CardCompactShell.js +57 -51
  39. package/dist/components/internal/CardImageSlot.d.ts.map +1 -1
  40. package/dist/components/internal/CardImageSlot.js +36 -37
  41. package/dist/hooks/use-is-breakpoint.d.ts +1 -4
  42. package/dist/hooks/use-is-breakpoint.d.ts.map +1 -1
  43. package/dist/index.js +448 -437
  44. package/dist/muza-ui.css +1 -1
  45. package/dist/styles/breakpoints.css +1 -0
  46. package/dist/translations/locales/cs.d.ts.map +1 -1
  47. package/dist/translations/locales/cs.js +3 -0
  48. package/dist/translations/locales/en.d.ts.map +1 -1
  49. package/dist/translations/locales/en.js +3 -0
  50. package/dist/translations/locales/sk.d.ts.map +1 -1
  51. package/dist/translations/locales/sk.js +3 -0
  52. package/dist/translations/types.d.ts +8 -0
  53. package/dist/translations/types.d.ts.map +1 -1
  54. package/dist/utils/breakpoints.d.ts +43 -0
  55. package/dist/utils/breakpoints.d.ts.map +1 -0
  56. package/dist/utils/breakpoints.js +65 -0
  57. package/dist/utils/index.d.ts +3 -0
  58. package/dist/utils/index.d.ts.map +1 -1
  59. package/dist/utils/index.js +19 -11
  60. package/dist/utils/polymorphic.d.ts +44 -0
  61. package/dist/utils/polymorphic.d.ts.map +1 -0
  62. package/dist/utils/polymorphic.js +7 -0
  63. package/dist/utils/warnOnce.d.ts +37 -0
  64. package/dist/utils/warnOnce.d.ts.map +1 -0
  65. package/dist/utils/warnOnce.js +6 -0
  66. package/package.json +2 -2
@@ -1,9 +1,10 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import * as g from "react";
3
- import { cva as l } from "class-variance-authority";
4
- import p from "color";
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
- const d = l(
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
- ), f = (t) => {
19
+ ), z = (e) => {
19
20
  try {
20
- return p(t);
21
+ return l(e);
21
22
  } catch {
22
23
  return null;
23
24
  }
24
- }, a = /* @__PURE__ */ new Set(), z = g.forwardRef(
25
- ({ className: t, color: e, icon: c, size: i, style: r, ...n }, s) => {
26
- const o = f(e);
27
- return !o && process.env.NODE_ENV !== "production" && !a.has(e) && (a.add(e), console.warn(
28
- `[CategoryIcon] Invalid color "${e}". Falling back to neutral styling.`
29
- )), /* @__PURE__ */ m(
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: s,
34
+ ref: n,
33
35
  "data-slot": "category-icon",
34
36
  className: y(
35
- d({ size: i }),
37
+ f({ size: c }),
36
38
  o && "bg-(--category-icon-bg) text-(--category-icon-fg)",
37
- t
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
- ...r
43
- } : r,
44
- ...n,
45
- children: c
44
+ ...t
45
+ } : t,
46
+ ...a,
47
+ children: i
46
48
  }
47
49
  );
48
50
  }
49
51
  );
50
- z.displayName = "CategoryIcon";
52
+ d.displayName = "CategoryIcon";
51
53
  export {
52
- z as CategoryIcon,
53
- d as categoryIconVariants
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<Omit<DialogPrimitive.DialogContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
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,CAAC,EAAE,OAAO,CAAA;IACd,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qCAAqC;IACrC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,4FAA4F;IAC5F,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,kHAAkH;AAClH,MAAM,WAAW,kBACf,SAAQ,wBAAwB,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC;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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 p, Fragment as N } from "react/jsx-runtime";
2
- import { forwardRef as n, Children as L, isValidElement as w } from "react";
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 D } from "../../translations/TranslationContext.js";
5
- import { cn as r } from "../../utils/cn.js";
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 T } from "../Icons/CustomIcons.js";
8
- import { typographyVariants as z } from "../Typography/Typography.js";
9
- const q = e.Root, G = e.Title, I = e.Description, k = ({
10
- className: i,
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: r(
15
+ className: i(
16
16
  "cursor-pointer text-icon-dark-primary-def focus-visible-default transition-opacity disabled:pointer-events-none",
17
- i
17
+ t
18
18
  ),
19
19
  "aria-label": o,
20
- children: /* @__PURE__ */ a(T, { className: "size-icon-medium" })
20
+ children: /* @__PURE__ */ a(z, { className: "size-icon-medium" })
21
21
  }
22
- ), F = n(
22
+ ), j = b(
23
23
  ({
24
- className: i,
24
+ className: t,
25
25
  icon: o,
26
- children: t,
27
- title: s,
28
- hideCloseButton: m = !1,
29
- closeAriaLabel: g,
30
- ...b
31
- }, f) => {
32
- const y = D(), c = g ?? y.dialog.closeAriaLabel;
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: f,
37
- className: r(
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
- i
39
+ t
40
40
  ),
41
- ...b,
42
- children: /* @__PURE__ */ p("div", { className: "flex items-center gap-comp-dialog-gap", children: [
43
- /* @__PURE__ */ p("div", { className: "flex min-w-0 flex-1 items-center gap-sm", children: [
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: r(
48
+ className: i(
49
49
  "min-w-0 flex-1 text-text-dark-primary-def",
50
- z({
50
+ H({
51
51
  variant: "title",
52
52
  size: "md",
53
53
  weight: "medium",
54
54
  fixY: !0
55
55
  })
56
56
  ),
57
- children: s ?? t
57
+ children: m ?? r
58
58
  }
59
59
  )
60
60
  ] }),
61
- !m && /* @__PURE__ */ a(
62
- k,
61
+ !d && /* @__PURE__ */ a(
62
+ w,
63
63
  {
64
64
  className: "shrink-0",
65
- ariaLabel: c
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
- F.displayName = "DialogHeader";
74
- const H = n(
75
- ({ className: i, children: o, ...t }, s) => /* @__PURE__ */ a(
73
+ j.displayName = "DialogHeader";
74
+ const P = b(
75
+ ({ className: t, children: o, ...r }, m) => /* @__PURE__ */ a(
76
76
  "div",
77
77
  {
78
- ref: s,
79
- className: r(
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
- i
81
+ t
82
82
  ),
83
- ...t,
83
+ ...r,
84
84
  children: o
85
85
  }
86
86
  )
87
87
  );
88
- H.displayName = "DialogFooter";
89
- const J = e.Trigger, j = e.Portal, K = e.Close, C = n(({ className: i, ...o }, t) => /* @__PURE__ */ a(
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: t,
93
- className: r(
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
- i
95
+ t
96
96
  ),
97
97
  ...o
98
98
  }
99
99
  ));
100
- C.displayName = e.Overlay.displayName;
101
- const O = n(
100
+ L.displayName = e.Overlay.displayName;
101
+ const V = b(
102
102
  ({
103
- className: i,
103
+ className: t,
104
104
  children: o,
105
- size: t = "medium",
106
- closeAriaLabel: s,
107
- smallerContentYpadding: m = !1,
108
- ...g
109
- }, b) => {
110
- const f = D(), y = s ?? f.dialog.closeAriaLabel, c = L.toArray(o), u = c.find(
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 d;
113
- return w(l) && ((d = l.type) == null ? void 0 : d.displayName) === "DialogHeader";
113
+ var p;
114
+ return k(l) && ((p = l.type) == null ? void 0 : p.displayName) === "DialogHeader";
114
115
  }
115
- ), h = c.find(
116
+ ), N = u.find(
116
117
  (l) => {
117
- var d;
118
- return w(l) && ((d = l.type) == null ? void 0 : d.displayName) === "DialogFooter";
118
+ var p;
119
+ return k(l) && ((p = l.type) == null ? void 0 : p.displayName) === "DialogFooter";
119
120
  }
120
- ), A = c.filter(
121
- (l) => l !== u && l !== h
122
- ), x = !!u, v = !!h;
123
- return /* @__PURE__ */ a(j, { children: /* @__PURE__ */ a(C, { children: /* @__PURE__ */ a(
124
- e.Content,
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
- ref: b,
127
- className: r(
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
- ...g,
142
- children: x || v ? /* @__PURE__ */ p(N, { children: [
143
- u,
144
- /* @__PURE__ */ a(
145
- "div",
146
- {
147
- className: r(
148
- "-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",
149
- m ? "py-comp-dialog-p-hor-sm" : "py-comp-dialog-p"
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
- children: /* @__PURE__ */ a("div", { children: A })
152
- }
153
- ),
154
- h
155
- ] }) : /* @__PURE__ */ p(N, { children: [
156
- o,
157
- /* @__PURE__ */ a(
158
- k,
159
- {
160
- className: "absolute top-4 right-4",
161
- ariaLabel: y
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
- O.displayName = e.Content.displayName;
205
+ V.displayName = e.Content.displayName;
170
206
  export {
171
- q as Dialog,
172
- K as DialogClose,
173
- O as DialogContent,
174
- I as DialogDescription,
175
- H as DialogFooter,
176
- F as DialogHeader,
177
- C as DialogOverlay,
178
- j as DialogPortal,
179
- G as DialogTitle,
180
- J as DialogTrigger
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,CAA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AA;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,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { ResponsiveBreakpoint } from '../../hooks/use-is-breakpoint';
2
+ import { ResponsiveBreakpoint } from '../../utils/breakpoints';
3
3
  export type { ResponsiveBreakpoint };
4
4
  /**
5
5
  * Column definition for the ExpandableTable.
@@ -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;AAEd,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,2BAA2B,CAAA;AAclC,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,OAAO,EAAE,MAAM,CAAC,CAAA;IAChB,iDAAiD;IACjD,KAAK,EAAE,SAAS,CAAA;IAChB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,C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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
+ {"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,OAAO,EAAE,MAAM,CAAC,CAAA;IAChB,iDAAiD;IACjD,KAAK,EAAE,SAAS,CAAA;IAChB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,SAAS,CAAA;IACrD;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAA;IAC3C;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,uBAA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,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 { VariantProps } from 'class-variance-authority';
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?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
377
- gapX?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
378
- gapY?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
379
- p?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
380
- px?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
381
- py?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
382
- pt?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
383
- pr?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
384
- pb?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
385
- pl?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
386
- m?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
387
- mx?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
388
- my?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
389
- mt?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
390
- mr?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
391
- mb?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
392
- ml?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
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
- * Props for the Flex layout component.
402
- * Extends CSS Flexbox with design system spacing tokens and semantic HTML support.
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 FlexProps extends Omit<VariantProps<typeof flexVariants>, 'gap' | 'gapX' | 'gapY' | 'p' | 'px' | 'py' | 'pt' | 'pr' | 'pb' | 'pl' | 'm' | 'mx' | 'my' | 'mt' | 'mr' | 'mb' | 'ml' | 'direction' | 'wrap' | 'justify' | 'align' | 'flex'>, SpacingProps {
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
- declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLElement>>;
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;AAC9B,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,iBAAiB,CAAA;AAExB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC9B,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAA;AAEV,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;8E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