@optimum-intelligence/opti-ui 0.5.0 → 0.5.2
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/app-shell/AppShell.js +139 -121
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/dialog/Dialog.d.ts +8 -2
- package/dist/components/dialog/Dialog.js +91 -76
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +4 -1
- package/dist/components/drawer/Drawer.js +136 -131
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components.json +40 -1
- package/dist/llms-full.txt +3 -0
- package/dist/opti-ui.css +16 -6
- package/package.json +1 -1
|
@@ -3,6 +3,8 @@ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
|
|
|
3
3
|
export type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
4
4
|
/** `center` is a modal; the edges turn the dialog into a sheet / drawer. */
|
|
5
5
|
export type DialogPlacement = 'center' | 'right' | 'left' | 'bottom';
|
|
6
|
+
/** Blur applied to the page behind a modal: none, 4px, 8px or 16px. */
|
|
7
|
+
export type DialogBackdropBlur = 'none' | 'sm' | 'md' | 'lg';
|
|
6
8
|
export interface DialogContentProps extends BaseDialog.Popup.Props {
|
|
7
9
|
/** Width of a centered dialog, or of a sheet. */
|
|
8
10
|
size?: DialogSize;
|
|
@@ -12,10 +14,12 @@ export interface DialogContentProps extends BaseDialog.Popup.Props {
|
|
|
12
14
|
showClose?: boolean;
|
|
13
15
|
/** Accessible name of the close button. */
|
|
14
16
|
closeLabel?: string;
|
|
17
|
+
/** How strongly the page behind the dialog is blurred. Override the radius with `--oui-backdrop-blur`. */
|
|
18
|
+
backdropBlur?: DialogBackdropBlur;
|
|
15
19
|
/** Props for the backdrop behind the dialog. */
|
|
16
20
|
backdropProps?: BaseDialog.Backdrop.Props;
|
|
17
21
|
}
|
|
18
|
-
declare function DialogContent({ size, placement, showClose, closeLabel, backdropProps, className, children, ref, ...props }: DialogContentProps): import("react").JSX.Element;
|
|
22
|
+
declare function DialogContent({ size, placement, showClose, closeLabel, backdropBlur, backdropProps, className, children, ref, ...props }: DialogContentProps): import("react").JSX.Element;
|
|
19
23
|
declare function DialogTitle({ className, ref, ...props }: BaseDialog.Title.Props): import("react").JSX.Element;
|
|
20
24
|
declare function DialogDescription({ className, ref, ...props }: BaseDialog.Description.Props): import("react").JSX.Element;
|
|
21
25
|
/**
|
|
@@ -47,8 +51,10 @@ export declare const Dialog: {
|
|
|
47
51
|
export interface AlertDialogContentProps extends BaseAlertDialog.Popup.Props {
|
|
48
52
|
/** Dialog width. */
|
|
49
53
|
size?: Exclude<DialogSize, 'full'>;
|
|
54
|
+
/** How strongly the page behind the dialog is blurred. Override the radius with `--oui-backdrop-blur`. */
|
|
55
|
+
backdropBlur?: DialogBackdropBlur;
|
|
50
56
|
}
|
|
51
|
-
declare function AlertDialogContent({ size, className, ref, ...props }: AlertDialogContentProps): import("react").JSX.Element;
|
|
57
|
+
declare function AlertDialogContent({ size, backdropBlur, className, ref, ...props }: AlertDialogContentProps): import("react").JSX.Element;
|
|
52
58
|
declare function AlertDialogTitle({ className, ref, ...props }: BaseAlertDialog.Title.Props): import("react").JSX.Element;
|
|
53
59
|
declare function AlertDialogDescription({ className, ref, ...props }: BaseAlertDialog.Description.Props): import("react").JSX.Element;
|
|
54
60
|
/** Confirmation dialog that requires an explicit choice (no outside-click dismissal). */
|
|
@@ -9,7 +9,7 @@ import { Dialog } from "@base-ui/react/dialog";
|
|
|
9
9
|
import { AlertDialog } from "@base-ui/react/alert-dialog";
|
|
10
10
|
//#region src/components/dialog/Dialog.tsx
|
|
11
11
|
function DialogContent(t0) {
|
|
12
|
-
const $ = c(
|
|
12
|
+
const $ = c(34);
|
|
13
13
|
let backdropProps;
|
|
14
14
|
let children;
|
|
15
15
|
let className;
|
|
@@ -19,8 +19,9 @@ function DialogContent(t0) {
|
|
|
19
19
|
let t2;
|
|
20
20
|
let t3;
|
|
21
21
|
let t4;
|
|
22
|
+
let t5;
|
|
22
23
|
if ($[0] !== t0) {
|
|
23
|
-
({size: t1, placement: t2, showClose: t3, closeLabel: t4, backdropProps, className, children, ref, ...props} = t0);
|
|
24
|
+
({size: t1, placement: t2, showClose: t3, closeLabel: t4, backdropBlur: t5, backdropProps, className, children, ref, ...props} = t0);
|
|
24
25
|
$[0] = t0;
|
|
25
26
|
$[1] = backdropProps;
|
|
26
27
|
$[2] = children;
|
|
@@ -31,6 +32,7 @@ function DialogContent(t0) {
|
|
|
31
32
|
$[7] = t2;
|
|
32
33
|
$[8] = t3;
|
|
33
34
|
$[9] = t4;
|
|
35
|
+
$[10] = t5;
|
|
34
36
|
} else {
|
|
35
37
|
backdropProps = $[1];
|
|
36
38
|
children = $[2];
|
|
@@ -41,77 +43,81 @@ function DialogContent(t0) {
|
|
|
41
43
|
t2 = $[7];
|
|
42
44
|
t3 = $[8];
|
|
43
45
|
t4 = $[9];
|
|
46
|
+
t5 = $[10];
|
|
44
47
|
}
|
|
45
48
|
const size = t1 === void 0 ? "md" : t1;
|
|
46
49
|
const placement = t2 === void 0 ? "center" : t2;
|
|
47
50
|
const showClose = t3 === void 0 ? true : t3;
|
|
48
51
|
const closeLabel = t4 === void 0 ? "Close" : t4;
|
|
52
|
+
const backdropBlur = t5 === void 0 ? "md" : t5;
|
|
49
53
|
const container = usePortalContainer();
|
|
50
|
-
const
|
|
51
|
-
let t6;
|
|
52
|
-
if ($[10] !== t5) {
|
|
53
|
-
t6 = withClass("oui-dialog__backdrop", t5);
|
|
54
|
-
$[10] = t5;
|
|
55
|
-
$[11] = t6;
|
|
56
|
-
} else t6 = $[11];
|
|
54
|
+
const t6 = backdropProps?.className;
|
|
57
55
|
let t7;
|
|
58
|
-
if ($[
|
|
59
|
-
t7 =
|
|
56
|
+
if ($[11] !== t6) {
|
|
57
|
+
t7 = withClass("oui-dialog__backdrop", t6);
|
|
58
|
+
$[11] = t6;
|
|
59
|
+
$[12] = t7;
|
|
60
|
+
} else t7 = $[12];
|
|
61
|
+
let t8;
|
|
62
|
+
if ($[13] !== backdropBlur || $[14] !== backdropProps || $[15] !== t7) {
|
|
63
|
+
t8 = /* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
64
|
+
"data-blur": backdropBlur,
|
|
60
65
|
...backdropProps,
|
|
61
|
-
className:
|
|
66
|
+
className: t7
|
|
62
67
|
});
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
66
|
-
} else t7 = $[14];
|
|
67
|
-
let t8;
|
|
68
|
-
if ($[15] !== className) {
|
|
69
|
-
t8 = withClass("oui-dialog", className);
|
|
70
|
-
$[15] = className;
|
|
68
|
+
$[13] = backdropBlur;
|
|
69
|
+
$[14] = backdropProps;
|
|
70
|
+
$[15] = t7;
|
|
71
71
|
$[16] = t8;
|
|
72
72
|
} else t8 = $[16];
|
|
73
73
|
let t9;
|
|
74
|
-
if ($[17] !==
|
|
75
|
-
t9 =
|
|
74
|
+
if ($[17] !== className) {
|
|
75
|
+
t9 = withClass("oui-dialog", className);
|
|
76
|
+
$[17] = className;
|
|
77
|
+
$[18] = t9;
|
|
78
|
+
} else t9 = $[18];
|
|
79
|
+
let t10;
|
|
80
|
+
if ($[19] !== closeLabel || $[20] !== showClose) {
|
|
81
|
+
t10 = showClose && /* @__PURE__ */ jsx(Dialog.Close, {
|
|
76
82
|
className: "oui-dialog__close",
|
|
77
83
|
"aria-label": closeLabel,
|
|
78
84
|
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
79
85
|
});
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
} else
|
|
84
|
-
let
|
|
85
|
-
if ($[
|
|
86
|
-
|
|
86
|
+
$[19] = closeLabel;
|
|
87
|
+
$[20] = showClose;
|
|
88
|
+
$[21] = t10;
|
|
89
|
+
} else t10 = $[21];
|
|
90
|
+
let t11;
|
|
91
|
+
if ($[22] !== children || $[23] !== placement || $[24] !== props || $[25] !== ref || $[26] !== size || $[27] !== t10 || $[28] !== t9) {
|
|
92
|
+
t11 = /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
87
93
|
ref,
|
|
88
|
-
className:
|
|
94
|
+
className: t9,
|
|
89
95
|
"data-size": size,
|
|
90
96
|
"data-placement": placement,
|
|
91
97
|
...props,
|
|
92
|
-
children: [children,
|
|
98
|
+
children: [children, t10]
|
|
93
99
|
});
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
$[25] = t8;
|
|
100
|
-
$[26] = t9;
|
|
100
|
+
$[22] = children;
|
|
101
|
+
$[23] = placement;
|
|
102
|
+
$[24] = props;
|
|
103
|
+
$[25] = ref;
|
|
104
|
+
$[26] = size;
|
|
101
105
|
$[27] = t10;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
$[28] = t9;
|
|
107
|
+
$[29] = t11;
|
|
108
|
+
} else t11 = $[29];
|
|
109
|
+
let t12;
|
|
110
|
+
if ($[30] !== container || $[31] !== t11 || $[32] !== t8) {
|
|
111
|
+
t12 = /* @__PURE__ */ jsxs(Dialog.Portal, {
|
|
106
112
|
container,
|
|
107
|
-
children: [
|
|
113
|
+
children: [t8, t11]
|
|
108
114
|
});
|
|
109
|
-
$[
|
|
110
|
-
$[29] = t10;
|
|
111
|
-
$[30] = t7;
|
|
115
|
+
$[30] = container;
|
|
112
116
|
$[31] = t11;
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
$[32] = t8;
|
|
118
|
+
$[33] = t12;
|
|
119
|
+
} else t12 = $[33];
|
|
120
|
+
return t12;
|
|
115
121
|
}
|
|
116
122
|
function DialogTitle(t0) {
|
|
117
123
|
const $ = c(10);
|
|
@@ -206,63 +212,72 @@ var Dialog$1 = {
|
|
|
206
212
|
createHandle: Dialog.createHandle
|
|
207
213
|
};
|
|
208
214
|
function AlertDialogContent(t0) {
|
|
209
|
-
const $ = c(
|
|
215
|
+
const $ = c(19);
|
|
210
216
|
let className;
|
|
211
217
|
let props;
|
|
212
218
|
let ref;
|
|
213
219
|
let t1;
|
|
220
|
+
let t2;
|
|
214
221
|
if ($[0] !== t0) {
|
|
215
|
-
({size: t1, className, ref, ...props} = t0);
|
|
222
|
+
({size: t1, backdropBlur: t2, className, ref, ...props} = t0);
|
|
216
223
|
$[0] = t0;
|
|
217
224
|
$[1] = className;
|
|
218
225
|
$[2] = props;
|
|
219
226
|
$[3] = ref;
|
|
220
227
|
$[4] = t1;
|
|
228
|
+
$[5] = t2;
|
|
221
229
|
} else {
|
|
222
230
|
className = $[1];
|
|
223
231
|
props = $[2];
|
|
224
232
|
ref = $[3];
|
|
225
233
|
t1 = $[4];
|
|
234
|
+
t2 = $[5];
|
|
226
235
|
}
|
|
227
236
|
const size = t1 === void 0 ? "sm" : t1;
|
|
237
|
+
const backdropBlur = t2 === void 0 ? "md" : t2;
|
|
228
238
|
const container = usePortalContainer();
|
|
229
|
-
let t2;
|
|
230
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
231
|
-
t2 = /* @__PURE__ */ jsx(AlertDialog.Backdrop, { className: "oui-dialog__backdrop" });
|
|
232
|
-
$[5] = t2;
|
|
233
|
-
} else t2 = $[5];
|
|
234
239
|
let t3;
|
|
235
|
-
if ($[6] !==
|
|
236
|
-
t3 =
|
|
237
|
-
|
|
240
|
+
if ($[6] !== backdropBlur) {
|
|
241
|
+
t3 = /* @__PURE__ */ jsx(AlertDialog.Backdrop, {
|
|
242
|
+
className: "oui-dialog__backdrop",
|
|
243
|
+
"data-blur": backdropBlur
|
|
244
|
+
});
|
|
245
|
+
$[6] = backdropBlur;
|
|
238
246
|
$[7] = t3;
|
|
239
247
|
} else t3 = $[7];
|
|
240
248
|
let t4;
|
|
241
|
-
if ($[8] !==
|
|
242
|
-
t4 =
|
|
249
|
+
if ($[8] !== className) {
|
|
250
|
+
t4 = withClass("oui-dialog", className);
|
|
251
|
+
$[8] = className;
|
|
252
|
+
$[9] = t4;
|
|
253
|
+
} else t4 = $[9];
|
|
254
|
+
let t5;
|
|
255
|
+
if ($[10] !== props || $[11] !== ref || $[12] !== size || $[13] !== t4) {
|
|
256
|
+
t5 = /* @__PURE__ */ jsx(AlertDialog.Popup, {
|
|
243
257
|
ref,
|
|
244
|
-
className:
|
|
258
|
+
className: t4,
|
|
245
259
|
"data-size": size,
|
|
246
260
|
"data-placement": "center",
|
|
247
261
|
...props
|
|
248
262
|
});
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
} else
|
|
255
|
-
let
|
|
256
|
-
if ($[
|
|
257
|
-
|
|
263
|
+
$[10] = props;
|
|
264
|
+
$[11] = ref;
|
|
265
|
+
$[12] = size;
|
|
266
|
+
$[13] = t4;
|
|
267
|
+
$[14] = t5;
|
|
268
|
+
} else t5 = $[14];
|
|
269
|
+
let t6;
|
|
270
|
+
if ($[15] !== container || $[16] !== t3 || $[17] !== t5) {
|
|
271
|
+
t6 = /* @__PURE__ */ jsxs(AlertDialog.Portal, {
|
|
258
272
|
container,
|
|
259
|
-
children: [
|
|
273
|
+
children: [t3, t5]
|
|
260
274
|
});
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
|
|
265
|
-
|
|
275
|
+
$[15] = container;
|
|
276
|
+
$[16] = t3;
|
|
277
|
+
$[17] = t5;
|
|
278
|
+
$[18] = t6;
|
|
279
|
+
} else t6 = $[18];
|
|
280
|
+
return t6;
|
|
266
281
|
}
|
|
267
282
|
function AlertDialogTitle(t0) {
|
|
268
283
|
const $ = c(10);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":["Dialog","BaseDialog","AlertDialog","BaseAlertDialog","withClass","createPrimitive","usePortalContainer","XIcon","DialogSize","DialogPlacement","DialogContentProps","Popup","Props","size","placement","showClose","closeLabel","backdropProps","Backdrop","DialogContent","t0","$","_c","children","className","props","ref","t1","t2","t3","t4","undefined","container","t5","t6","t7","t8","t9","t10","t11","DialogTitle","DialogDescription","DialogHeader","DialogBody","DialogFooter","Root","Trigger","Content","Header","Title","Description","Body","Footer","Close","createHandle","AlertDialogContentProps","Exclude","AlertDialogContent","Symbol","for","AlertDialogTitle","AlertDialogDescription","_c","BaseDialog","Dialog","BaseAlertDialog","AlertDialog"],"sources":["../../../src/components/dialog/Dialog.tsx"],"sourcesContent":["import { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';\nimport { withClass } from '../../utils/cx';\nimport { createPrimitive } from '../../utils/primitive';\nimport { usePortalContainer } from '../../utils/portal';\nimport { XIcon } from '../../icons';\n\nexport type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';\n/** `center` is a modal; the edges turn the dialog into a sheet / drawer. */\nexport type DialogPlacement = 'center' | 'right' | 'left' | 'bottom';\n\nexport interface DialogContentProps extends BaseDialog.Popup.Props {\n /** Width of a centered dialog, or of a sheet. */\n size?: DialogSize;\n /** `center` modal, or a sheet docked to an edge. */\n placement?: DialogPlacement;\n /** Render the corner close button. */\n showClose?: boolean;\n /** Accessible name of the close button. */\n closeLabel?: string;\n /** Props for the backdrop behind the dialog. */\n backdropProps?: BaseDialog.Backdrop.Props;\n}\n\nfunction DialogContent({\n size = 'md',\n placement = 'center',\n showClose = true,\n closeLabel = 'Close',\n backdropProps,\n className,\n children,\n ref,\n ...props\n}: DialogContentProps) {\n const container = usePortalContainer();\n return (\n <BaseDialog.Portal container={container}>\n <BaseDialog.Backdrop {...backdropProps} className={withClass('oui-dialog__backdrop', backdropProps?.className)} />\n <BaseDialog.Popup\n ref={ref}\n className={withClass('oui-dialog', className)}\n data-size={size}\n data-placement={placement}\n {...props}\n >\n {children}\n {showClose && (\n <BaseDialog.Close className=\"oui-dialog__close\" aria-label={closeLabel}>\n <XIcon />\n </BaseDialog.Close>\n )}\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n );\n}\n\nfunction DialogTitle({ className, ref, ...props }: BaseDialog.Title.Props) {\n return <BaseDialog.Title ref={ref} className={withClass('oui-dialog__title', className)} {...props} />;\n}\n\nfunction DialogDescription({ className, ref, ...props }: BaseDialog.Description.Props) {\n return <BaseDialog.Description ref={ref} className={withClass('oui-dialog__description', className)} {...props} />;\n}\n\nconst DialogHeader = createPrimitive('div', 'oui-dialog__header', 'DialogHeader');\nconst DialogBody = createPrimitive('div', 'oui-dialog__body', 'DialogBody');\nconst DialogFooter = createPrimitive('div', 'oui-dialog__footer', 'DialogFooter');\n\n/**\n * Modal dialog and side sheet. Compose:\n * `Dialog.Root` › `Dialog.Trigger` + `Dialog.Content` › `Dialog.Header` (`Title`, `Description`), `Dialog.Body`, `Dialog.Footer`.\n * Use `render={<Button />}` on `Dialog.Trigger` / `Dialog.Close` to style them as buttons.\n */\nexport const Dialog = {\n Root: BaseDialog.Root,\n Trigger: BaseDialog.Trigger,\n Content: DialogContent,\n Header: DialogHeader,\n Title: DialogTitle,\n Description: DialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n Close: BaseDialog.Close,\n createHandle: BaseDialog.createHandle,\n};\n\n// ─── Alert dialog ────────────────────────────────────────────────────────────\n\nexport interface AlertDialogContentProps extends BaseAlertDialog.Popup.Props {\n /** Dialog width. */\n size?: Exclude<DialogSize, 'full'>;\n}\n\nfunction AlertDialogContent({ size = 'sm', className, ref, ...props }: AlertDialogContentProps) {\n const container = usePortalContainer();\n return (\n <BaseAlertDialog.Portal container={container}>\n <BaseAlertDialog.Backdrop className=\"oui-dialog__backdrop\" />\n <BaseAlertDialog.Popup\n ref={ref}\n className={withClass('oui-dialog', className)}\n data-size={size}\n data-placement=\"center\"\n {...props}\n />\n </BaseAlertDialog.Portal>\n );\n}\n\nfunction AlertDialogTitle({ className, ref, ...props }: BaseAlertDialog.Title.Props) {\n return <BaseAlertDialog.Title ref={ref} className={withClass('oui-dialog__title', className)} {...props} />;\n}\n\nfunction AlertDialogDescription({ className, ref, ...props }: BaseAlertDialog.Description.Props) {\n return (\n <BaseAlertDialog.Description ref={ref} className={withClass('oui-dialog__description', className)} {...props} />\n );\n}\n\n/** Confirmation dialog that requires an explicit choice (no outside-click dismissal). */\nexport const AlertDialog = {\n Root: BaseAlertDialog.Root,\n Trigger: BaseAlertDialog.Trigger,\n Content: AlertDialogContent,\n Header: DialogHeader,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n Close: BaseAlertDialog.Close,\n};\n"],"mappings":";;;;;;;;;;AAwBA,SAAAmB,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAL;CAAA,IAAAM;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAT,EAAA,OAAAD,IAAA;EAAuB,CAAA,CAAAP,MAAAc,IAAAb,WAAAc,IAAAb,WAAAc,IAAAb,YAAAc,IAAAb,eAAAO,WAAAD,UAAAG,KAAA,GAAAD,SAAAL;EAUFC,EAAA,KAAAD;EAAAC,EAAA,KAAAJ;EAAAI,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;EAAAR,EAAA,KAAAS;CAAA,OAAA;EAAAb,gBAAAI,EAAA;EAAAE,WAAAF,EAAA;EAAAG,YAAAH,EAAA;EAAAI,QAAAJ,EAAA;EAAAK,MAAAL,EAAA;EAAAM,KAAAN,EAAA;EAAAO,KAAAP,EAAA;EAAAQ,KAAAR,EAAA;EAAAS,KAAAT,EAAA;CAAA;CATnB,MAAAR,OAAAc,OAAAI,KAAAA,IAAA,OAAAJ;CACA,MAAAb,Y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,OAAAD,IAAA;EAAgC,CAAA,CAAAI,WAAAE,KAAA,GAAAD,SAAAL;EAA+DC,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAA;EAAAF,YAAAH,EAAA;EAAAI,QAAAJ,EAAA;EAAAK,MAAAL,EAAA;CAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAG,WAAA;EAEzCG,KAAAvB,UAAU,2BAA2BoB,SAAS;EAACH,EAAA,KAAAG;EAAAH,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAI,SAAAJ,EAAA,OAAAK,OAAAL,EAAA,OAAAM,IAAA;EAAjGC,KAAA,oBAAAqC,YAAA,aAAA;GAAkCvC;GAAgB,WAAAC;GAA+C,GAAMF;EAAK,CAAA;EAAIJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAAhHO;AAAgH;;AAKpH,IAAa1B,gBAAc;CACzB2C,MAAM1C,YAAgB0C;CACtBC,SAAS3C,YAAgB2C;CACzBC,SAASU;CACTT,QAAQN;CACRO,OAAOW;CACPV,aAAaW;CACbV,MAAMR;CACNS,QAAQR;CACRS,OAAOlD,YAAgBkD;AACzB"}
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["Dialog","BaseDialog","AlertDialog","BaseAlertDialog","withClass","createPrimitive","usePortalContainer","XIcon","DialogSize","DialogPlacement","DialogBackdropBlur","DialogContentProps","Popup","Props","size","placement","showClose","closeLabel","backdropBlur","backdropProps","Backdrop","DialogContent","t0","$","_c","children","className","props","ref","t1","t2","t3","t4","t5","undefined","container","t6","t7","t8","t9","t10","t11","t12","DialogTitle","DialogDescription","DialogHeader","DialogBody","DialogFooter","Root","Trigger","Content","Header","Title","Description","Body","Footer","Close","createHandle","AlertDialogContentProps","Exclude","AlertDialogContent","AlertDialogTitle","AlertDialogDescription","_c","BaseDialog","Dialog","BaseAlertDialog","AlertDialog"],"sources":["../../../src/components/dialog/Dialog.tsx"],"sourcesContent":["import { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';\nimport { withClass } from '../../utils/cx';\nimport { createPrimitive } from '../../utils/primitive';\nimport { usePortalContainer } from '../../utils/portal';\nimport { XIcon } from '../../icons';\n\nexport type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';\n/** `center` is a modal; the edges turn the dialog into a sheet / drawer. */\nexport type DialogPlacement = 'center' | 'right' | 'left' | 'bottom';\n/** Blur applied to the page behind a modal: none, 4px, 8px or 16px. */\nexport type DialogBackdropBlur = 'none' | 'sm' | 'md' | 'lg';\n\nexport interface DialogContentProps extends BaseDialog.Popup.Props {\n /** Width of a centered dialog, or of a sheet. */\n size?: DialogSize;\n /** `center` modal, or a sheet docked to an edge. */\n placement?: DialogPlacement;\n /** Render the corner close button. */\n showClose?: boolean;\n /** Accessible name of the close button. */\n closeLabel?: string;\n /** How strongly the page behind the dialog is blurred. Override the radius with `--oui-backdrop-blur`. */\n backdropBlur?: DialogBackdropBlur;\n /** Props for the backdrop behind the dialog. */\n backdropProps?: BaseDialog.Backdrop.Props;\n}\n\nfunction DialogContent({\n size = 'md',\n placement = 'center',\n showClose = true,\n closeLabel = 'Close',\n backdropBlur = 'md',\n backdropProps,\n className,\n children,\n ref,\n ...props\n}: DialogContentProps) {\n const container = usePortalContainer();\n return (\n <BaseDialog.Portal container={container}>\n <BaseDialog.Backdrop\n data-blur={backdropBlur}\n {...backdropProps}\n className={withClass('oui-dialog__backdrop', backdropProps?.className)}\n />\n <BaseDialog.Popup\n ref={ref}\n className={withClass('oui-dialog', className)}\n data-size={size}\n data-placement={placement}\n {...props}\n >\n {children}\n {showClose && (\n <BaseDialog.Close className=\"oui-dialog__close\" aria-label={closeLabel}>\n <XIcon />\n </BaseDialog.Close>\n )}\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n );\n}\n\nfunction DialogTitle({ className, ref, ...props }: BaseDialog.Title.Props) {\n return <BaseDialog.Title ref={ref} className={withClass('oui-dialog__title', className)} {...props} />;\n}\n\nfunction DialogDescription({ className, ref, ...props }: BaseDialog.Description.Props) {\n return <BaseDialog.Description ref={ref} className={withClass('oui-dialog__description', className)} {...props} />;\n}\n\nconst DialogHeader = createPrimitive('div', 'oui-dialog__header', 'DialogHeader');\nconst DialogBody = createPrimitive('div', 'oui-dialog__body', 'DialogBody');\nconst DialogFooter = createPrimitive('div', 'oui-dialog__footer', 'DialogFooter');\n\n/**\n * Modal dialog and side sheet. Compose:\n * `Dialog.Root` › `Dialog.Trigger` + `Dialog.Content` › `Dialog.Header` (`Title`, `Description`), `Dialog.Body`, `Dialog.Footer`.\n * Use `render={<Button />}` on `Dialog.Trigger` / `Dialog.Close` to style them as buttons.\n */\nexport const Dialog = {\n Root: BaseDialog.Root,\n Trigger: BaseDialog.Trigger,\n Content: DialogContent,\n Header: DialogHeader,\n Title: DialogTitle,\n Description: DialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n Close: BaseDialog.Close,\n createHandle: BaseDialog.createHandle,\n};\n\n// ─── Alert dialog ────────────────────────────────────────────────────────────\n\nexport interface AlertDialogContentProps extends BaseAlertDialog.Popup.Props {\n /** Dialog width. */\n size?: Exclude<DialogSize, 'full'>;\n /** How strongly the page behind the dialog is blurred. Override the radius with `--oui-backdrop-blur`. */\n backdropBlur?: DialogBackdropBlur;\n}\n\nfunction AlertDialogContent({ size = 'sm', backdropBlur = 'md', className, ref, ...props }: AlertDialogContentProps) {\n const container = usePortalContainer();\n return (\n <BaseAlertDialog.Portal container={container}>\n <BaseAlertDialog.Backdrop className=\"oui-dialog__backdrop\" data-blur={backdropBlur} />\n <BaseAlertDialog.Popup\n ref={ref}\n className={withClass('oui-dialog', className)}\n data-size={size}\n data-placement=\"center\"\n {...props}\n />\n </BaseAlertDialog.Portal>\n );\n}\n\nfunction AlertDialogTitle({ className, ref, ...props }: BaseAlertDialog.Title.Props) {\n return <BaseAlertDialog.Title ref={ref} className={withClass('oui-dialog__title', className)} {...props} />;\n}\n\nfunction AlertDialogDescription({ className, ref, ...props }: BaseAlertDialog.Description.Props) {\n return (\n <BaseAlertDialog.Description ref={ref} className={withClass('oui-dialog__description', className)} {...props} />\n );\n}\n\n/** Confirmation dialog that requires an explicit choice (no outside-click dismissal). */\nexport const AlertDialog = {\n Root: BaseAlertDialog.Root,\n Trigger: BaseAlertDialog.Trigger,\n Content: AlertDialogContent,\n Header: DialogHeader,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n Close: BaseAlertDialog.Close,\n};\n"],"mappings":";;;;;;;;;;AA4BA,SAAAqB,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAL;CAAA,IAAAM;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAV,EAAA,OAAAD,IAAA;EAAuB,CAAA,CAAAR,MAAAe,IAAAd,WAAAe,IAAAd,WAAAe,IAAAd,YAAAe,IAAAd,cAAAe,IAAAd,eAAAO,WAAAD,UAAAG,KAAA,GAAAD,SAAAL;EAWFC,EAAA,KAAAD;EAAAC,EAAA,KAAAJ;EAAAI,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;EAAAR,EAAA,KAAAS;EAAAT,EAAA,MAAAU;CAAA,OAAA;EAAAd,gBAAAI,EAAA;EAAAE,WAAAF,EAAA;EAAAG,YAAAH,EAAA;EAAAI,QAAAJ,EAAA;EAAAK,MAAAL,EAAA;EAAAM,KAAA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AOS;CACPR,aAAaS;CACbR,MAAMR;CACNS,QAAQR;CACRS,OAAOrD,YAAgBqD;AACzB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { DialogBackdropBlur } from '../dialog/Dialog';
|
|
2
3
|
export type DrawerSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
3
4
|
export interface DrawerProps {
|
|
4
5
|
/** Ref to the drawer panel. */
|
|
@@ -32,6 +33,8 @@ export interface DrawerProps {
|
|
|
32
33
|
dismissible?: boolean;
|
|
33
34
|
/** `false` leaves the page behind interactive and drops the backdrop. */
|
|
34
35
|
modal?: boolean;
|
|
36
|
+
/** How strongly the page behind a modal drawer is blurred. Override the radius with `--oui-backdrop-blur`. */
|
|
37
|
+
backdropBlur?: DialogBackdropBlur;
|
|
35
38
|
/** Accessible name of the close button. */
|
|
36
39
|
closeLabel?: string;
|
|
37
40
|
/** Class name for the drawer panel. */
|
|
@@ -46,4 +49,4 @@ export interface DrawerProps {
|
|
|
46
49
|
* pinned header, scrolling body, optional pinned footer. For a free-form
|
|
47
50
|
* sheet use `Dialog.Content` with `placement`.
|
|
48
51
|
*/
|
|
49
|
-
export declare function Drawer({ open: openProp, defaultOpen, onOpenChange, trigger, title, eyebrow, description, actions, footer, side, size, dismissible, modal, closeLabel, className, bodyProps, children, ref, }: DrawerProps): React.JSX.Element;
|
|
52
|
+
export declare function Drawer({ open: openProp, defaultOpen, onOpenChange, trigger, title, eyebrow, description, actions, footer, side, size, dismissible, modal, backdropBlur, closeLabel, className, bodyProps, children, ref, }: DrawerProps): React.JSX.Element;
|