@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
|
@@ -14,210 +14,215 @@ import { Dialog } from "@base-ui/react/dialog";
|
|
|
14
14
|
* sheet use `Dialog.Content` with `placement`.
|
|
15
15
|
*/
|
|
16
16
|
function Drawer(t0) {
|
|
17
|
-
const $ = c(
|
|
18
|
-
const { open: openProp, defaultOpen: t1, onOpenChange, trigger, title, eyebrow, description, actions, footer, side: t2, size: t3, dismissible: t4, modal: t5,
|
|
17
|
+
const $ = c(58);
|
|
18
|
+
const { open: openProp, defaultOpen: t1, onOpenChange, trigger, title, eyebrow, description, actions, footer, side: t2, size: t3, dismissible: t4, modal: t5, backdropBlur: t6, closeLabel: t7, className, bodyProps, children, ref } = t0;
|
|
19
19
|
const defaultOpen = t1 === void 0 ? false : t1;
|
|
20
20
|
const side = t2 === void 0 ? "right" : t2;
|
|
21
21
|
const size = t3 === void 0 ? "md" : t3;
|
|
22
22
|
const dismissible = t4 === void 0 ? true : t4;
|
|
23
23
|
const modal = t5 === void 0 ? true : t5;
|
|
24
|
-
const
|
|
24
|
+
const backdropBlur = t6 === void 0 ? "md" : t6;
|
|
25
|
+
const closeLabel = t7 === void 0 ? "Close" : t7;
|
|
25
26
|
const [inner, setInner] = React.useState(defaultOpen);
|
|
26
27
|
const open = openProp ?? inner;
|
|
27
28
|
const container = usePortalContainer();
|
|
28
|
-
let
|
|
29
|
+
let t8;
|
|
29
30
|
if ($[0] !== dismissible || $[1] !== onOpenChange) {
|
|
30
|
-
|
|
31
|
+
t8 = (next) => {
|
|
31
32
|
if (!next && !dismissible) return;
|
|
32
33
|
setInner(next);
|
|
33
34
|
onOpenChange?.(next);
|
|
34
35
|
};
|
|
35
36
|
$[0] = dismissible;
|
|
36
37
|
$[1] = onOpenChange;
|
|
37
|
-
$[2] =
|
|
38
|
-
} else
|
|
39
|
-
let
|
|
38
|
+
$[2] = t8;
|
|
39
|
+
} else t8 = $[2];
|
|
40
|
+
let t9;
|
|
40
41
|
if ($[3] !== trigger) {
|
|
41
|
-
|
|
42
|
+
t9 = trigger && /* @__PURE__ */ jsx(Dialog.Trigger, { render: trigger });
|
|
42
43
|
$[3] = trigger;
|
|
43
|
-
$[4] =
|
|
44
|
-
} else
|
|
45
|
-
let t9;
|
|
46
|
-
if ($[5] !== modal) {
|
|
47
|
-
t9 = modal && /* @__PURE__ */ jsx(Dialog.Backdrop, { className: "oui-dialog__backdrop" });
|
|
48
|
-
$[5] = modal;
|
|
49
|
-
$[6] = t9;
|
|
50
|
-
} else t9 = $[6];
|
|
44
|
+
$[4] = t9;
|
|
45
|
+
} else t9 = $[4];
|
|
51
46
|
let t10;
|
|
52
|
-
if ($[
|
|
53
|
-
t10 =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
if ($[5] !== backdropBlur || $[6] !== modal) {
|
|
48
|
+
t10 = modal && /* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
49
|
+
className: "oui-dialog__backdrop",
|
|
50
|
+
"data-blur": backdropBlur
|
|
51
|
+
});
|
|
52
|
+
$[5] = backdropBlur;
|
|
53
|
+
$[6] = modal;
|
|
54
|
+
$[7] = t10;
|
|
55
|
+
} else t10 = $[7];
|
|
57
56
|
let t11;
|
|
58
|
-
if ($[
|
|
59
|
-
t11 =
|
|
57
|
+
if ($[8] !== className) {
|
|
58
|
+
t11 = cx("oui-drawer", className);
|
|
59
|
+
$[8] = className;
|
|
60
|
+
$[9] = t11;
|
|
61
|
+
} else t11 = $[9];
|
|
62
|
+
let t12;
|
|
63
|
+
if ($[10] !== eyebrow) {
|
|
64
|
+
t12 = eyebrow && /* @__PURE__ */ jsx("div", {
|
|
60
65
|
className: "oui-drawer__eyebrow",
|
|
61
66
|
children: eyebrow
|
|
62
67
|
});
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
} else
|
|
66
|
-
let
|
|
67
|
-
if ($[
|
|
68
|
-
|
|
68
|
+
$[10] = eyebrow;
|
|
69
|
+
$[11] = t12;
|
|
70
|
+
} else t12 = $[11];
|
|
71
|
+
let t13;
|
|
72
|
+
if ($[12] !== title) {
|
|
73
|
+
t13 = /* @__PURE__ */ jsx(Dialog.Title, {
|
|
69
74
|
className: "oui-drawer__title",
|
|
70
75
|
children: title
|
|
71
76
|
});
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
74
|
-
} else
|
|
75
|
-
let
|
|
76
|
-
if ($[
|
|
77
|
-
|
|
77
|
+
$[12] = title;
|
|
78
|
+
$[13] = t13;
|
|
79
|
+
} else t13 = $[13];
|
|
80
|
+
let t14;
|
|
81
|
+
if ($[14] !== description) {
|
|
82
|
+
t14 = description && /* @__PURE__ */ jsx(Dialog.Description, {
|
|
78
83
|
className: "oui-drawer__description",
|
|
79
84
|
children: description
|
|
80
85
|
});
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
} else
|
|
84
|
-
let
|
|
85
|
-
if ($[
|
|
86
|
-
|
|
86
|
+
$[14] = description;
|
|
87
|
+
$[15] = t14;
|
|
88
|
+
} else t14 = $[15];
|
|
89
|
+
let t15;
|
|
90
|
+
if ($[16] !== t12 || $[17] !== t13 || $[18] !== t14) {
|
|
91
|
+
t15 = /* @__PURE__ */ jsxs("div", {
|
|
87
92
|
className: "oui-drawer__heading",
|
|
88
93
|
children: [
|
|
89
|
-
t11,
|
|
90
94
|
t12,
|
|
91
|
-
t13
|
|
95
|
+
t13,
|
|
96
|
+
t14
|
|
92
97
|
]
|
|
93
98
|
});
|
|
94
|
-
$[15] = t11;
|
|
95
99
|
$[16] = t12;
|
|
96
100
|
$[17] = t13;
|
|
97
101
|
$[18] = t14;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
$[19] = t15;
|
|
103
|
+
} else t15 = $[19];
|
|
104
|
+
const t16 = !dismissible;
|
|
105
|
+
let t17;
|
|
106
|
+
if ($[20] !== closeLabel || $[21] !== t16) {
|
|
107
|
+
t17 = /* @__PURE__ */ jsx(IconButton, {
|
|
103
108
|
"aria-label": closeLabel,
|
|
104
|
-
disabled:
|
|
109
|
+
disabled: t16
|
|
105
110
|
});
|
|
106
|
-
$[
|
|
107
|
-
$[20] = t15;
|
|
111
|
+
$[20] = closeLabel;
|
|
108
112
|
$[21] = t16;
|
|
109
|
-
} else t16 = $[21];
|
|
110
|
-
let t17;
|
|
111
|
-
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
112
|
-
t17 = /* @__PURE__ */ jsx(XIcon, {});
|
|
113
113
|
$[22] = t17;
|
|
114
114
|
} else t17 = $[22];
|
|
115
115
|
let t18;
|
|
116
|
-
if ($[23]
|
|
117
|
-
t18 = /* @__PURE__ */ jsx(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
});
|
|
121
|
-
$[23] = t16;
|
|
122
|
-
$[24] = t18;
|
|
123
|
-
} else t18 = $[24];
|
|
116
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
117
|
+
t18 = /* @__PURE__ */ jsx(XIcon, {});
|
|
118
|
+
$[23] = t18;
|
|
119
|
+
} else t18 = $[23];
|
|
124
120
|
let t19;
|
|
125
|
-
if ($[
|
|
126
|
-
t19 = /* @__PURE__ */
|
|
121
|
+
if ($[24] !== t17) {
|
|
122
|
+
t19 = /* @__PURE__ */ jsx(Dialog.Close, {
|
|
123
|
+
render: t17,
|
|
124
|
+
children: t18
|
|
125
|
+
});
|
|
126
|
+
$[24] = t17;
|
|
127
|
+
$[25] = t19;
|
|
128
|
+
} else t19 = $[25];
|
|
129
|
+
let t20;
|
|
130
|
+
if ($[26] !== actions || $[27] !== t19) {
|
|
131
|
+
t20 = /* @__PURE__ */ jsxs("div", {
|
|
127
132
|
className: "oui-drawer__actions",
|
|
128
|
-
children: [actions,
|
|
133
|
+
children: [actions, t19]
|
|
129
134
|
});
|
|
130
|
-
$[
|
|
131
|
-
$[26] = t18;
|
|
135
|
+
$[26] = actions;
|
|
132
136
|
$[27] = t19;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
$[28] = t20;
|
|
138
|
+
} else t20 = $[28];
|
|
139
|
+
let t21;
|
|
140
|
+
if ($[29] !== t15 || $[30] !== t20) {
|
|
141
|
+
t21 = /* @__PURE__ */ jsxs("header", {
|
|
137
142
|
className: "oui-drawer__header",
|
|
138
|
-
children: [
|
|
143
|
+
children: [t15, t20]
|
|
139
144
|
});
|
|
140
|
-
$[
|
|
141
|
-
$[29] = t19;
|
|
145
|
+
$[29] = t15;
|
|
142
146
|
$[30] = t20;
|
|
143
|
-
} else t20 = $[30];
|
|
144
|
-
const t21 = bodyProps?.className;
|
|
145
|
-
let t22;
|
|
146
|
-
if ($[31] !== t21) {
|
|
147
|
-
t22 = cx("oui-drawer__body", t21);
|
|
148
147
|
$[31] = t21;
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
} else t21 = $[31];
|
|
149
|
+
const t22 = bodyProps?.className;
|
|
151
150
|
let t23;
|
|
152
|
-
if ($[
|
|
153
|
-
t23 =
|
|
151
|
+
if ($[32] !== t22) {
|
|
152
|
+
t23 = cx("oui-drawer__body", t22);
|
|
153
|
+
$[32] = t22;
|
|
154
|
+
$[33] = t23;
|
|
155
|
+
} else t23 = $[33];
|
|
156
|
+
let t24;
|
|
157
|
+
if ($[34] !== bodyProps || $[35] !== children || $[36] !== t23) {
|
|
158
|
+
t24 = /* @__PURE__ */ jsx("div", {
|
|
154
159
|
...bodyProps,
|
|
155
|
-
className:
|
|
160
|
+
className: t23,
|
|
156
161
|
children
|
|
157
162
|
});
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[35] = t22;
|
|
163
|
+
$[34] = bodyProps;
|
|
164
|
+
$[35] = children;
|
|
161
165
|
$[36] = t23;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
$[37] = t24;
|
|
167
|
+
} else t24 = $[37];
|
|
168
|
+
let t25;
|
|
169
|
+
if ($[38] !== footer) {
|
|
170
|
+
t25 = footer && /* @__PURE__ */ jsx("footer", {
|
|
166
171
|
className: "oui-drawer__footer",
|
|
167
172
|
children: footer
|
|
168
173
|
});
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
} else
|
|
172
|
-
let
|
|
173
|
-
if ($[
|
|
174
|
-
|
|
174
|
+
$[38] = footer;
|
|
175
|
+
$[39] = t25;
|
|
176
|
+
} else t25 = $[39];
|
|
177
|
+
let t26;
|
|
178
|
+
if ($[40] !== ref || $[41] !== side || $[42] !== size || $[43] !== t11 || $[44] !== t21 || $[45] !== t24 || $[46] !== t25) {
|
|
179
|
+
t26 = /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
175
180
|
ref,
|
|
176
|
-
className:
|
|
181
|
+
className: t11,
|
|
177
182
|
"data-side": side,
|
|
178
183
|
"data-size": size,
|
|
179
184
|
children: [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
185
|
+
t21,
|
|
186
|
+
t24,
|
|
187
|
+
t25
|
|
183
188
|
]
|
|
184
189
|
});
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
190
|
-
$[44] = t23;
|
|
190
|
+
$[40] = ref;
|
|
191
|
+
$[41] = side;
|
|
192
|
+
$[42] = size;
|
|
193
|
+
$[43] = t11;
|
|
194
|
+
$[44] = t21;
|
|
191
195
|
$[45] = t24;
|
|
192
196
|
$[46] = t25;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
$[47] = t26;
|
|
198
|
+
} else t26 = $[47];
|
|
199
|
+
let t27;
|
|
200
|
+
if ($[48] !== container || $[49] !== t10 || $[50] !== t26) {
|
|
201
|
+
t27 = /* @__PURE__ */ jsxs(Dialog.Portal, {
|
|
197
202
|
container,
|
|
198
|
-
children: [
|
|
203
|
+
children: [t10, t26]
|
|
199
204
|
});
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[49] = t9;
|
|
205
|
+
$[48] = container;
|
|
206
|
+
$[49] = t10;
|
|
203
207
|
$[50] = t26;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
+
$[51] = t27;
|
|
209
|
+
} else t27 = $[51];
|
|
210
|
+
let t28;
|
|
211
|
+
if ($[52] !== modal || $[53] !== open || $[54] !== t27 || $[55] !== t8 || $[56] !== t9) {
|
|
212
|
+
t28 = /* @__PURE__ */ jsxs(Dialog.Root, {
|
|
208
213
|
open,
|
|
209
214
|
modal,
|
|
210
|
-
onOpenChange:
|
|
211
|
-
children: [
|
|
215
|
+
onOpenChange: t8,
|
|
216
|
+
children: [t9, t27]
|
|
212
217
|
});
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[54] = t7;
|
|
218
|
+
$[52] = modal;
|
|
219
|
+
$[53] = open;
|
|
220
|
+
$[54] = t27;
|
|
217
221
|
$[55] = t8;
|
|
218
|
-
$[56] =
|
|
219
|
-
|
|
220
|
-
|
|
222
|
+
$[56] = t9;
|
|
223
|
+
$[57] = t28;
|
|
224
|
+
} else t28 = $[57];
|
|
225
|
+
return t28;
|
|
221
226
|
}
|
|
222
227
|
//#endregion
|
|
223
228
|
export { Drawer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","names":["React","Dialog","BaseDialog","cx","usePortalContainer","XIcon","IconButton","DrawerSize","DrawerProps","ref","Ref","HTMLDivElement","open","defaultOpen","onOpenChange","trigger","ReactElement","title","ReactNode","eyebrow","description","actions","footer","side","size","dismissible","modal","closeLabel","className","bodyProps","HTMLAttributes","children","Drawer","t0","$","_c","openProp","t1","t2","t3","t4","t5","t6","undefined","inner","setInner","useState","container","
|
|
1
|
+
{"version":3,"file":"Drawer.js","names":["React","Dialog","BaseDialog","cx","usePortalContainer","XIcon","IconButton","DialogBackdropBlur","DrawerSize","DrawerProps","ref","Ref","HTMLDivElement","open","defaultOpen","onOpenChange","trigger","ReactElement","title","ReactNode","eyebrow","description","actions","footer","side","size","dismissible","modal","backdropBlur","closeLabel","className","bodyProps","HTMLAttributes","children","Drawer","t0","$","_c","openProp","t1","t2","t3","t4","t5","t6","t7","undefined","inner","setInner","useState","container","t8","next","t9","t10","t11","t12","t13","t14","t15","t16","t17","t18","Symbol","for","t19","t20","t21","t22","t23","t24","t25","t26","t27","t28","_c","BaseDialog"],"sources":["../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Dialog as BaseDialog } from '@base-ui/react/dialog';\nimport { cx } from '../../utils/cx';\nimport { usePortalContainer } from '../../utils/portal';\nimport { XIcon } from '../../icons';\nimport { IconButton } from '../button/Button';\nimport type { DialogBackdropBlur } from '../dialog/Dialog';\n\nexport type DrawerSize = 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface DrawerProps {\n /** Ref to the drawer panel. */\n ref?: React.Ref<HTMLDivElement>;\n /** Whether the drawer is open (controlled). */\n open?: boolean;\n /** Initial state when uncontrolled. */\n defaultOpen?: boolean;\n /** Called when the drawer opens or closes. */\n onOpenChange?: (open: boolean) => void;\n /** Element that opens the drawer, e.g. `<Button>Details</Button>`. Omit when `open` is controlled. */\n trigger?: React.ReactElement;\n /** Header title; also the drawer's accessible name. */\n title: React.ReactNode;\n /** Small label above the title, e.g. the record type. */\n eyebrow?: React.ReactNode;\n /** Supporting text under the title. */\n description?: React.ReactNode;\n /** Header content next to the close button (edit, delete, a menu…). */\n actions?: React.ReactNode;\n /** Pinned to the bottom, for form buttons. */\n footer?: React.ReactNode;\n /** Edge the drawer slides in from. */\n side?: 'right' | 'left';\n /** Width: sm 24rem, md 32rem (default), lg 48rem, xl 60rem. Override with `--oui-drawer-width`. */\n size?: DrawerSize;\n /**\n * Set to `false` to block Esc, outside clicks and the close button, e.g.\n * while a form inside is saving.\n */\n dismissible?: boolean;\n /** `false` leaves the page behind interactive and drops the backdrop. */\n modal?: boolean;\n /** How strongly the page behind a modal drawer is blurred. Override the radius with `--oui-backdrop-blur`. */\n backdropBlur?: DialogBackdropBlur;\n /** Accessible name of the close button. */\n closeLabel?: string;\n /** Class name for the drawer panel. */\n className?: string;\n /** Props for the scrolling content area. */\n bodyProps?: React.HTMLAttributes<HTMLDivElement>;\n /** Drawer body content. */\n children?: React.ReactNode;\n}\n\n/**\n * Side panel for inspecting or editing a record without leaving the page:\n * pinned header, scrolling body, optional pinned footer. For a free-form\n * sheet use `Dialog.Content` with `placement`.\n */\nexport function Drawer({\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n trigger,\n title,\n eyebrow,\n description,\n actions,\n footer,\n side = 'right',\n size = 'md',\n dismissible = true,\n modal = true,\n backdropBlur = 'md',\n closeLabel = 'Close',\n className,\n bodyProps,\n children,\n ref,\n}: DrawerProps) {\n const [inner, setInner] = React.useState(defaultOpen);\n const open = openProp ?? inner;\n const container = usePortalContainer();\n\n return (\n <BaseDialog.Root\n open={open}\n modal={modal}\n onOpenChange={(next) => {\n if (!next && !dismissible) return;\n setInner(next);\n onOpenChange?.(next);\n }}\n >\n {trigger && <BaseDialog.Trigger render={trigger} />}\n <BaseDialog.Portal container={container}>\n {modal && <BaseDialog.Backdrop className=\"oui-dialog__backdrop\" data-blur={backdropBlur} />}\n <BaseDialog.Popup ref={ref} className={cx('oui-drawer', className)} data-side={side} data-size={size}>\n <header className=\"oui-drawer__header\">\n <div className=\"oui-drawer__heading\">\n {eyebrow && <div className=\"oui-drawer__eyebrow\">{eyebrow}</div>}\n <BaseDialog.Title className=\"oui-drawer__title\">{title}</BaseDialog.Title>\n {description && (\n <BaseDialog.Description className=\"oui-drawer__description\">{description}</BaseDialog.Description>\n )}\n </div>\n <div className=\"oui-drawer__actions\">\n {actions}\n <BaseDialog.Close render={<IconButton aria-label={closeLabel} disabled={!dismissible} />}>\n <XIcon />\n </BaseDialog.Close>\n </div>\n </header>\n <div {...bodyProps} className={cx('oui-drawer__body', bodyProps?.className)}>\n {children}\n </div>\n {footer && <footer className=\"oui-drawer__footer\">{footer}</footer>}\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n </BaseDialog.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA2DA,SAAOkC,OAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAgB,MAAA,EAAAxB,MAAAyB,UAAAxB,aAAAyB,IAAAxB,cAAAC,SAAAE,OAAAE,SAAAC,aAAAC,SAAAC,QAAAC,MAAAgB,IAAAf,MAAAgB,IAAAf,aAAAgB,IAAAf,OAAAgB,IAAAf,cAAAgB,IAAAf,YAAAgB,IAAAf,WAAAC,WAAAE,UAAAvB,QAAAyB;CAErB,MAAArB,cAAAyB,OAAAO,KAAAA,IAAA,QAAAP;CAQA,MAAAf,OAAAgB,OAAAM,KAAAA,IAAA,UAAAN;CACA,MAAAf,OAAAgB,OAAAK,KAAAA,IAAA,OAAAL;CACA,MAAAf,cAAAgB,OAAAI,KAAAA,IAAA,OAAAJ;CACA,MAAAf,QAAAgB,OAAAG,KAAAA,IAAA,OAAAH;CACA,MAAAf,eAAAgB,OAAAE,KAAAA,IAAA,OAAAF;CACA,MAAAf,aAAAgB,OAAAC,KAAAA,IAAA,UAAAD;CAMA,MAAA,CAAAE,OAAAC,YAA0BhD,MAAKiD,SAAUnC,WAAW;CACpD,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version": "0.5.2",
|
|
4
4
|
"description": "Optimum's customizable React component library, built on Base UI.",
|
|
5
5
|
"categories": [
|
|
6
6
|
"Theme",
|
|
@@ -3091,6 +3091,19 @@
|
|
|
3091
3091
|
"required": false,
|
|
3092
3092
|
"description": "Dialog width.",
|
|
3093
3093
|
"default": "'sm'"
|
|
3094
|
+
},
|
|
3095
|
+
{
|
|
3096
|
+
"name": "backdropBlur",
|
|
3097
|
+
"type": "DialogBackdropBlur",
|
|
3098
|
+
"required": false,
|
|
3099
|
+
"values": [
|
|
3100
|
+
"none",
|
|
3101
|
+
"sm",
|
|
3102
|
+
"md",
|
|
3103
|
+
"lg"
|
|
3104
|
+
],
|
|
3105
|
+
"description": "How strongly the page behind the dialog is blurred. Override the radius with `--oui-backdrop-blur`.",
|
|
3106
|
+
"default": "'md'"
|
|
3094
3107
|
}
|
|
3095
3108
|
],
|
|
3096
3109
|
"extends": [
|
|
@@ -3325,6 +3338,19 @@
|
|
|
3325
3338
|
"description": "Accessible name of the close button.",
|
|
3326
3339
|
"default": "'Close'"
|
|
3327
3340
|
},
|
|
3341
|
+
{
|
|
3342
|
+
"name": "backdropBlur",
|
|
3343
|
+
"type": "DialogBackdropBlur",
|
|
3344
|
+
"required": false,
|
|
3345
|
+
"values": [
|
|
3346
|
+
"none",
|
|
3347
|
+
"sm",
|
|
3348
|
+
"md",
|
|
3349
|
+
"lg"
|
|
3350
|
+
],
|
|
3351
|
+
"description": "How strongly the page behind the dialog is blurred. Override the radius with `--oui-backdrop-blur`.",
|
|
3352
|
+
"default": "'md'"
|
|
3353
|
+
},
|
|
3328
3354
|
{
|
|
3329
3355
|
"name": "backdropProps",
|
|
3330
3356
|
"type": "BaseDialog.Backdrop.Props",
|
|
@@ -3477,6 +3503,19 @@
|
|
|
3477
3503
|
"description": "`false` leaves the page behind interactive and drops the backdrop.",
|
|
3478
3504
|
"default": "true"
|
|
3479
3505
|
},
|
|
3506
|
+
{
|
|
3507
|
+
"name": "backdropBlur",
|
|
3508
|
+
"type": "DialogBackdropBlur",
|
|
3509
|
+
"required": false,
|
|
3510
|
+
"values": [
|
|
3511
|
+
"none",
|
|
3512
|
+
"sm",
|
|
3513
|
+
"md",
|
|
3514
|
+
"lg"
|
|
3515
|
+
],
|
|
3516
|
+
"description": "How strongly the page behind a modal drawer is blurred. Override the radius with `--oui-backdrop-blur`.",
|
|
3517
|
+
"default": "'md'"
|
|
3518
|
+
},
|
|
3480
3519
|
{
|
|
3481
3520
|
"name": "closeLabel",
|
|
3482
3521
|
"type": "string",
|
package/dist/llms-full.txt
CHANGED
|
@@ -1610,6 +1610,7 @@ Base UI `AlertDialog.Trigger` re-exported unchanged. See https://base-ui.com/rea
|
|
|
1610
1610
|
| Prop | Type | Default | Description |
|
|
1611
1611
|
| --- | --- | --- | --- |
|
|
1612
1612
|
| `size?` | `Exclude<DialogSize, 'full'>` | `'sm'` | Dialog width. |
|
|
1613
|
+
| `backdropBlur?` | `'none' \| 'sm' \| 'md' \| 'lg'` | `'md'` | How strongly the page behind the dialog is blurred. Override the radius with `--oui-backdrop-blur`. |
|
|
1613
1614
|
|
|
1614
1615
|
Also accepts all props of: `BaseAlertDialog.Popup.Props`.
|
|
1615
1616
|
|
|
@@ -1705,6 +1706,7 @@ Base UI `Dialog.Trigger` re-exported unchanged. See https://base-ui.com/react/co
|
|
|
1705
1706
|
| `placement?` | `'center' \| 'right' \| 'left' \| 'bottom'` | `'center'` | `center` modal, or a sheet docked to an edge. |
|
|
1706
1707
|
| `showClose?` | `boolean` | `true` | Render the corner close button. |
|
|
1707
1708
|
| `closeLabel?` | `string` | `'Close'` | Accessible name of the close button. |
|
|
1709
|
+
| `backdropBlur?` | `'none' \| 'sm' \| 'md' \| 'lg'` | `'md'` | How strongly the page behind the dialog is blurred. Override the radius with `--oui-backdrop-blur`. |
|
|
1708
1710
|
| `backdropProps?` | `BaseDialog.Backdrop.Props` | | Props for the backdrop behind the dialog. |
|
|
1709
1711
|
|
|
1710
1712
|
Also accepts all props of: `BaseDialog.Popup.Props`.
|
|
@@ -1761,6 +1763,7 @@ import { Drawer } from '@optimum-intelligence/opti-ui';
|
|
|
1761
1763
|
| `size?` | `'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Width: sm 24rem, md 32rem (default), lg 48rem, xl 60rem. Override with `--oui-drawer-width`. |
|
|
1762
1764
|
| `dismissible?` | `boolean` | `true` | Set to `false` to block Esc, outside clicks and the close button, e.g. while a form inside is saving. |
|
|
1763
1765
|
| `modal?` | `boolean` | `true` | `false` leaves the page behind interactive and drops the backdrop. |
|
|
1766
|
+
| `backdropBlur?` | `'none' \| 'sm' \| 'md' \| 'lg'` | `'md'` | How strongly the page behind a modal drawer is blurred. Override the radius with `--oui-backdrop-blur`. |
|
|
1764
1767
|
| `closeLabel?` | `string` | `'Close'` | Accessible name of the close button. |
|
|
1765
1768
|
| `className?` | `string` | | Class name for the drawer panel. |
|
|
1766
1769
|
| `bodyProps?` | `React.HTMLAttributes<HTMLDivElement>` | | Props for the scrolling content area. |
|
package/dist/opti-ui.css
CHANGED
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
--oui-space-8: 1rem;
|
|
43
43
|
--oui-space-10: 1.25rem;
|
|
44
44
|
--oui-space-12: 1.5rem;
|
|
45
|
-
--oui-control-height-sm: 1.
|
|
46
|
-
--oui-control-height-md: 2.
|
|
47
|
-
--oui-control-height-lg: 2.
|
|
45
|
+
--oui-control-height-sm: 1.875rem;
|
|
46
|
+
--oui-control-height-md: 2.375rem;
|
|
47
|
+
--oui-control-height-lg: 2.875rem;
|
|
48
48
|
--oui-control-border-width: 2px;
|
|
49
49
|
--oui-control-disabled-opacity: 0.5;
|
|
50
50
|
--oui-duration-fast: 0.15s;
|
|
@@ -510,7 +510,7 @@
|
|
|
510
510
|
align-items: center;
|
|
511
511
|
gap: 0.7rem;
|
|
512
512
|
width: 100%;
|
|
513
|
-
padding: var(--oui-space-
|
|
513
|
+
padding: var(--oui-space-5) 0.7rem;
|
|
514
514
|
border: 0;
|
|
515
515
|
border-radius: var(--oui-radius-control);
|
|
516
516
|
background: transparent;
|
|
@@ -606,7 +606,7 @@
|
|
|
606
606
|
border-left: 1px solid var(--_border);
|
|
607
607
|
}
|
|
608
608
|
.oui-navbar__group-items .oui-navbar__item {
|
|
609
|
-
padding-block: var(--oui-space-
|
|
609
|
+
padding-block: var(--oui-space-4);
|
|
610
610
|
padding-left: calc(1.625rem - 1px - var(--oui-space-3));
|
|
611
611
|
font-size: var(--oui-font-size-sm);
|
|
612
612
|
}
|
|
@@ -2710,17 +2710,27 @@
|
|
|
2710
2710
|
}
|
|
2711
2711
|
@layer oui.components {
|
|
2712
2712
|
.oui-dialog__backdrop {
|
|
2713
|
+
--_blur: 8px;
|
|
2713
2714
|
position: fixed;
|
|
2714
2715
|
inset: 0;
|
|
2715
2716
|
z-index: var(--oui-z-dialog);
|
|
2716
2717
|
min-height: 100dvh;
|
|
2717
2718
|
background: var(--oui-color-overlay);
|
|
2718
|
-
backdrop-filter: blur(
|
|
2719
|
+
backdrop-filter: blur(var(--oui-backdrop-blur, var(--_blur)));
|
|
2719
2720
|
transition: opacity var(--oui-duration-normal) var(--oui-ease);
|
|
2720
2721
|
}
|
|
2721
2722
|
.oui-dialog__backdrop[data-starting-style], .oui-dialog__backdrop[data-ending-style] {
|
|
2722
2723
|
opacity: 0;
|
|
2723
2724
|
}
|
|
2725
|
+
.oui-dialog__backdrop[data-blur=none] {
|
|
2726
|
+
--_blur: 0px;
|
|
2727
|
+
}
|
|
2728
|
+
.oui-dialog__backdrop[data-blur=sm] {
|
|
2729
|
+
--_blur: 4px;
|
|
2730
|
+
}
|
|
2731
|
+
.oui-dialog__backdrop[data-blur=lg] {
|
|
2732
|
+
--_blur: 16px;
|
|
2733
|
+
}
|
|
2724
2734
|
.oui-dialog__backdrop[data-nested] {
|
|
2725
2735
|
display: none;
|
|
2726
2736
|
}
|
package/package.json
CHANGED