@optimum-intelligence/opti-ui 0.0.0-stage → 0.3.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/LICENSE +23 -0
- package/README.md +244 -2
- package/dist/components/accordion/Accordion.d.ts +17 -0
- package/dist/components/accordion/Accordion.js +204 -0
- package/dist/components/accordion/Accordion.js.map +1 -0
- package/dist/components/alert/Alert.d.ts +18 -0
- package/dist/components/alert/Alert.js +164 -0
- package/dist/components/alert/Alert.js.map +1 -0
- package/dist/components/app-shell/AppShell.d.ts +97 -0
- package/dist/components/app-shell/AppShell.js +689 -0
- package/dist/components/app-shell/AppShell.js.map +1 -0
- package/dist/components/avatar/Avatar.d.ts +21 -0
- package/dist/components/avatar/Avatar.js +190 -0
- package/dist/components/avatar/Avatar.js.map +1 -0
- package/dist/components/badge/Badge.d.ts +16 -0
- package/dist/components/badge/Badge.js +94 -0
- package/dist/components/badge/Badge.js.map +1 -0
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +18 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +154 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js.map +1 -0
- package/dist/components/button/Button.d.ts +23 -0
- package/dist/components/button/Button.js +159 -0
- package/dist/components/button/Button.js.map +1 -0
- package/dist/components/calendar/Calendar.d.ts +59 -0
- package/dist/components/calendar/Calendar.js +709 -0
- package/dist/components/calendar/Calendar.js.map +1 -0
- package/dist/components/calendar/date-utils.d.ts +32 -0
- package/dist/components/calendar/date-utils.js +112 -0
- package/dist/components/calendar/date-utils.js.map +1 -0
- package/dist/components/card/Card.d.ts +42 -0
- package/dist/components/card/Card.js +82 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/choice/Choice.d.ts +32 -0
- package/dist/components/choice/Choice.js +371 -0
- package/dist/components/choice/Choice.js.map +1 -0
- package/dist/components/collapsible/Collapsible.d.ts +15 -0
- package/dist/components/collapsible/Collapsible.js +155 -0
- package/dist/components/collapsible/Collapsible.js.map +1 -0
- package/dist/components/combobox/Combobox.d.ts +68 -0
- package/dist/components/combobox/Combobox.js +752 -0
- package/dist/components/combobox/Combobox.js.map +1 -0
- package/dist/components/command-palette/CommandPalette.d.ts +52 -0
- package/dist/components/command-palette/CommandPalette.js +328 -0
- package/dist/components/command-palette/CommandPalette.js.map +1 -0
- package/dist/components/data-table/DataTable.d.ts +73 -0
- package/dist/components/data-table/DataTable.js +478 -0
- package/dist/components/data-table/DataTable.js.map +1 -0
- package/dist/components/data-table/DataTableContent.d.ts +35 -0
- package/dist/components/data-table/DataTableContent.js +550 -0
- package/dist/components/data-table/DataTableContent.js.map +1 -0
- package/dist/components/data-table/DataTableFilters.d.ts +15 -0
- package/dist/components/data-table/DataTableFilters.js +284 -0
- package/dist/components/data-table/DataTableFilters.js.map +1 -0
- package/dist/components/data-table/DataTableRow.d.ts +33 -0
- package/dist/components/data-table/DataTableRow.js +552 -0
- package/dist/components/data-table/DataTableRow.js.map +1 -0
- package/dist/components/data-table/context.d.ts +5 -0
- package/dist/components/data-table/context.js +14 -0
- package/dist/components/data-table/context.js.map +1 -0
- package/dist/components/data-table/layout.d.ts +60 -0
- package/dist/components/data-table/layout.js +272 -0
- package/dist/components/data-table/layout.js.map +1 -0
- package/dist/components/data-table/types.d.ts +319 -0
- package/dist/components/data-table/useDataTable.d.ts +9 -0
- package/dist/components/data-table/useDataTable.js +666 -0
- package/dist/components/data-table/useDataTable.js.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +50 -0
- package/dist/components/date-picker/DatePicker.js +485 -0
- package/dist/components/date-picker/DatePicker.js.map +1 -0
- package/dist/components/date-picker/DateRangePicker.d.ts +39 -0
- package/dist/components/date-picker/DateRangePicker.js +339 -0
- package/dist/components/date-picker/DateRangePicker.js.map +1 -0
- package/dist/components/date-picker/PickerField.d.ts +38 -0
- package/dist/components/date-picker/PickerField.js +238 -0
- package/dist/components/date-picker/PickerField.js.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +70 -0
- package/dist/components/dialog/Dialog.js +354 -0
- package/dist/components/dialog/Dialog.js.map +1 -0
- package/dist/components/drawer/Drawer.d.ts +39 -0
- package/dist/components/drawer/Drawer.js +225 -0
- package/dist/components/drawer/Drawer.js.map +1 -0
- package/dist/components/empty-state/EmptyState.d.ts +12 -0
- package/dist/components/empty-state/EmptyState.js +116 -0
- package/dist/components/empty-state/EmptyState.js.map +1 -0
- package/dist/components/field/Field.d.ts +36 -0
- package/dist/components/field/Field.js +337 -0
- package/dist/components/field/Field.js.map +1 -0
- package/dist/components/file-upload/FileUpload.d.ts +91 -0
- package/dist/components/file-upload/FileUpload.js +714 -0
- package/dist/components/file-upload/FileUpload.js.map +1 -0
- package/dist/components/input/Input.d.ts +49 -0
- package/dist/components/input/Input.js +538 -0
- package/dist/components/input/Input.js.map +1 -0
- package/dist/components/link/Link.d.ts +17 -0
- package/dist/components/link/Link.js +91 -0
- package/dist/components/link/Link.js.map +1 -0
- package/dist/components/menu/Menu.d.ts +79 -0
- package/dist/components/menu/Menu.js +615 -0
- package/dist/components/menu/Menu.js.map +1 -0
- package/dist/components/number-field/NumberField.d.ts +16 -0
- package/dist/components/number-field/NumberField.js +188 -0
- package/dist/components/number-field/NumberField.js.map +1 -0
- package/dist/components/pagination/Pagination.d.ts +34 -0
- package/dist/components/pagination/Pagination.js +244 -0
- package/dist/components/pagination/Pagination.js.map +1 -0
- package/dist/components/popover/Popover.d.ts +22 -0
- package/dist/components/popover/Popover.js +186 -0
- package/dist/components/popover/Popover.js.map +1 -0
- package/dist/components/preview-card/PreviewCard.d.ts +20 -0
- package/dist/components/preview-card/PreviewCard.js +114 -0
- package/dist/components/preview-card/PreviewCard.js.map +1 -0
- package/dist/components/progress/Progress.d.ts +20 -0
- package/dist/components/progress/Progress.js +169 -0
- package/dist/components/progress/Progress.js.map +1 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +8 -0
- package/dist/components/scroll-area/ScrollArea.js +112 -0
- package/dist/components/scroll-area/ScrollArea.js.map +1 -0
- package/dist/components/search-input/SearchInput.d.ts +14 -0
- package/dist/components/search-input/SearchInput.js +114 -0
- package/dist/components/search-input/SearchInput.js.map +1 -0
- package/dist/components/select/Select.d.ts +66 -0
- package/dist/components/select/Select.js +601 -0
- package/dist/components/select/Select.js.map +1 -0
- package/dist/components/separator/Separator.d.ts +4 -0
- package/dist/components/separator/Separator.js +46 -0
- package/dist/components/separator/Separator.js.map +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +16 -0
- package/dist/components/skeleton/Skeleton.js +135 -0
- package/dist/components/skeleton/Skeleton.js.map +1 -0
- package/dist/components/slider/Slider.d.ts +11 -0
- package/dist/components/slider/Slider.js +107 -0
- package/dist/components/slider/Slider.js.map +1 -0
- package/dist/components/spinner/Spinner.d.ts +9 -0
- package/dist/components/spinner/Spinner.js +78 -0
- package/dist/components/spinner/Spinner.js.map +1 -0
- package/dist/components/stack/Stack.d.ts +23 -0
- package/dist/components/stack/Stack.js +79 -0
- package/dist/components/stack/Stack.js.map +1 -0
- package/dist/components/stat-card/StatCard.d.ts +22 -0
- package/dist/components/stat-card/StatCard.js +153 -0
- package/dist/components/stat-card/StatCard.js.map +1 -0
- package/dist/components/stepper/Stepper.d.ts +30 -0
- package/dist/components/stepper/Stepper.js +131 -0
- package/dist/components/stepper/Stepper.js.map +1 -0
- package/dist/components/table/Table.d.ts +53 -0
- package/dist/components/table/Table.js +221 -0
- package/dist/components/table/Table.js.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +19 -0
- package/dist/components/tabs/Tabs.js +183 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/components/tag/Tag.d.ts +22 -0
- package/dist/components/tag/Tag.js +121 -0
- package/dist/components/tag/Tag.js.map +1 -0
- package/dist/components/toast/Toast.d.ts +34 -0
- package/dist/components/toast/Toast.js +187 -0
- package/dist/components/toast/Toast.js.map +1 -0
- package/dist/components/toggle/Toggle.d.ts +31 -0
- package/dist/components/toggle/Toggle.js +197 -0
- package/dist/components/toggle/Toggle.js.map +1 -0
- package/dist/components/toolbar/Toolbar.d.ts +21 -0
- package/dist/components/toolbar/Toolbar.js +239 -0
- package/dist/components/toolbar/Toolbar.js.map +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +33 -0
- package/dist/components/tooltip/Tooltip.js +182 -0
- package/dist/components/tooltip/Tooltip.js.map +1 -0
- package/dist/components/typography/Typography.d.ts +32 -0
- package/dist/components/typography/Typography.js +183 -0
- package/dist/components/typography/Typography.js.map +1 -0
- package/dist/fonts.css +3 -0
- package/dist/icons/index.d.ts +133 -0
- package/dist/icons/index.js +182 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +58 -0
- package/dist/opti-ui.css +5692 -0
- package/dist/theme/ThemeProvider.d.ts +22 -0
- package/dist/theme/ThemeProvider.js +115 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/utils/cx.d.ts +10 -0
- package/dist/utils/cx.js +18 -0
- package/dist/utils/cx.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/portal.d.ts +8 -0
- package/dist/utils/portal.js +16 -0
- package/dist/utils/portal.js.map +1 -0
- package/dist/utils/primitive.d.ts +13 -0
- package/dist/utils/primitive.js +61 -0
- package/dist/utils/primitive.js.map +1 -0
- package/dist/utils/search.d.ts +4 -0
- package/dist/utils/search.js +15 -0
- package/dist/utils/search.js.map +1 -0
- package/package.json +71 -4
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { usePortalContainer } from "../../utils/portal.js";
|
|
3
|
+
import { cx } from "../../utils/cx.js";
|
|
4
|
+
import { XIcon } from "../../icons/index.js";
|
|
5
|
+
import { IconButton } from "../button/Button.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
10
|
+
//#region src/components/drawer/Drawer.tsx
|
|
11
|
+
/**
|
|
12
|
+
* Side panel for inspecting or editing a record without leaving the page:
|
|
13
|
+
* pinned header, scrolling body, optional pinned footer. For a free-form
|
|
14
|
+
* sheet use `Dialog.Content` with `placement`.
|
|
15
|
+
*/
|
|
16
|
+
function Drawer(t0) {
|
|
17
|
+
const $ = c(57);
|
|
18
|
+
const { open: openProp, defaultOpen: t1, onOpenChange, trigger, title, eyebrow, description, actions, footer, side: t2, size: t3, dismissible: t4, modal: t5, closeLabel: t6, className, bodyProps, children, ref } = t0;
|
|
19
|
+
const defaultOpen = t1 === void 0 ? false : t1;
|
|
20
|
+
const side = t2 === void 0 ? "right" : t2;
|
|
21
|
+
const size = t3 === void 0 ? "md" : t3;
|
|
22
|
+
const dismissible = t4 === void 0 ? true : t4;
|
|
23
|
+
const modal = t5 === void 0 ? true : t5;
|
|
24
|
+
const closeLabel = t6 === void 0 ? "Close" : t6;
|
|
25
|
+
const [inner, setInner] = React.useState(defaultOpen);
|
|
26
|
+
const open = openProp ?? inner;
|
|
27
|
+
const container = usePortalContainer();
|
|
28
|
+
let t7;
|
|
29
|
+
if ($[0] !== dismissible || $[1] !== onOpenChange) {
|
|
30
|
+
t7 = (next) => {
|
|
31
|
+
if (!next && !dismissible) return;
|
|
32
|
+
setInner(next);
|
|
33
|
+
onOpenChange?.(next);
|
|
34
|
+
};
|
|
35
|
+
$[0] = dismissible;
|
|
36
|
+
$[1] = onOpenChange;
|
|
37
|
+
$[2] = t7;
|
|
38
|
+
} else t7 = $[2];
|
|
39
|
+
let t8;
|
|
40
|
+
if ($[3] !== trigger) {
|
|
41
|
+
t8 = trigger && /* @__PURE__ */ jsx(Dialog.Trigger, { render: trigger });
|
|
42
|
+
$[3] = trigger;
|
|
43
|
+
$[4] = t8;
|
|
44
|
+
} else t8 = $[4];
|
|
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];
|
|
51
|
+
let t10;
|
|
52
|
+
if ($[7] !== className) {
|
|
53
|
+
t10 = cx("oui-drawer", className);
|
|
54
|
+
$[7] = className;
|
|
55
|
+
$[8] = t10;
|
|
56
|
+
} else t10 = $[8];
|
|
57
|
+
let t11;
|
|
58
|
+
if ($[9] !== eyebrow) {
|
|
59
|
+
t11 = eyebrow && /* @__PURE__ */ jsx("div", {
|
|
60
|
+
className: "oui-drawer__eyebrow",
|
|
61
|
+
children: eyebrow
|
|
62
|
+
});
|
|
63
|
+
$[9] = eyebrow;
|
|
64
|
+
$[10] = t11;
|
|
65
|
+
} else t11 = $[10];
|
|
66
|
+
let t12;
|
|
67
|
+
if ($[11] !== title) {
|
|
68
|
+
t12 = /* @__PURE__ */ jsx(Dialog.Title, {
|
|
69
|
+
className: "oui-drawer__title",
|
|
70
|
+
children: title
|
|
71
|
+
});
|
|
72
|
+
$[11] = title;
|
|
73
|
+
$[12] = t12;
|
|
74
|
+
} else t12 = $[12];
|
|
75
|
+
let t13;
|
|
76
|
+
if ($[13] !== description) {
|
|
77
|
+
t13 = description && /* @__PURE__ */ jsx(Dialog.Description, {
|
|
78
|
+
className: "oui-drawer__description",
|
|
79
|
+
children: description
|
|
80
|
+
});
|
|
81
|
+
$[13] = description;
|
|
82
|
+
$[14] = t13;
|
|
83
|
+
} else t13 = $[14];
|
|
84
|
+
let t14;
|
|
85
|
+
if ($[15] !== t11 || $[16] !== t12 || $[17] !== t13) {
|
|
86
|
+
t14 = /* @__PURE__ */ jsxs("div", {
|
|
87
|
+
className: "oui-drawer__heading",
|
|
88
|
+
children: [
|
|
89
|
+
t11,
|
|
90
|
+
t12,
|
|
91
|
+
t13
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
$[15] = t11;
|
|
95
|
+
$[16] = t12;
|
|
96
|
+
$[17] = t13;
|
|
97
|
+
$[18] = t14;
|
|
98
|
+
} else t14 = $[18];
|
|
99
|
+
const t15 = !dismissible;
|
|
100
|
+
let t16;
|
|
101
|
+
if ($[19] !== closeLabel || $[20] !== t15) {
|
|
102
|
+
t16 = /* @__PURE__ */ jsx(IconButton, {
|
|
103
|
+
"aria-label": closeLabel,
|
|
104
|
+
disabled: t15
|
|
105
|
+
});
|
|
106
|
+
$[19] = closeLabel;
|
|
107
|
+
$[20] = t15;
|
|
108
|
+
$[21] = t16;
|
|
109
|
+
} else t16 = $[21];
|
|
110
|
+
let t17;
|
|
111
|
+
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
112
|
+
t17 = /* @__PURE__ */ jsx(XIcon, {});
|
|
113
|
+
$[22] = t17;
|
|
114
|
+
} else t17 = $[22];
|
|
115
|
+
let t18;
|
|
116
|
+
if ($[23] !== t16) {
|
|
117
|
+
t18 = /* @__PURE__ */ jsx(Dialog.Close, {
|
|
118
|
+
render: t16,
|
|
119
|
+
children: t17
|
|
120
|
+
});
|
|
121
|
+
$[23] = t16;
|
|
122
|
+
$[24] = t18;
|
|
123
|
+
} else t18 = $[24];
|
|
124
|
+
let t19;
|
|
125
|
+
if ($[25] !== actions || $[26] !== t18) {
|
|
126
|
+
t19 = /* @__PURE__ */ jsxs("div", {
|
|
127
|
+
className: "oui-drawer__actions",
|
|
128
|
+
children: [actions, t18]
|
|
129
|
+
});
|
|
130
|
+
$[25] = actions;
|
|
131
|
+
$[26] = t18;
|
|
132
|
+
$[27] = t19;
|
|
133
|
+
} else t19 = $[27];
|
|
134
|
+
let t20;
|
|
135
|
+
if ($[28] !== t14 || $[29] !== t19) {
|
|
136
|
+
t20 = /* @__PURE__ */ jsxs("header", {
|
|
137
|
+
className: "oui-drawer__header",
|
|
138
|
+
children: [t14, t19]
|
|
139
|
+
});
|
|
140
|
+
$[28] = t14;
|
|
141
|
+
$[29] = t19;
|
|
142
|
+
$[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
|
+
$[31] = t21;
|
|
149
|
+
$[32] = t22;
|
|
150
|
+
} else t22 = $[32];
|
|
151
|
+
let t23;
|
|
152
|
+
if ($[33] !== bodyProps || $[34] !== children || $[35] !== t22) {
|
|
153
|
+
t23 = /* @__PURE__ */ jsx("div", {
|
|
154
|
+
...bodyProps,
|
|
155
|
+
className: t22,
|
|
156
|
+
children
|
|
157
|
+
});
|
|
158
|
+
$[33] = bodyProps;
|
|
159
|
+
$[34] = children;
|
|
160
|
+
$[35] = t22;
|
|
161
|
+
$[36] = t23;
|
|
162
|
+
} else t23 = $[36];
|
|
163
|
+
let t24;
|
|
164
|
+
if ($[37] !== footer) {
|
|
165
|
+
t24 = footer && /* @__PURE__ */ jsx("footer", {
|
|
166
|
+
className: "oui-drawer__footer",
|
|
167
|
+
children: footer
|
|
168
|
+
});
|
|
169
|
+
$[37] = footer;
|
|
170
|
+
$[38] = t24;
|
|
171
|
+
} else t24 = $[38];
|
|
172
|
+
let t25;
|
|
173
|
+
if ($[39] !== ref || $[40] !== side || $[41] !== size || $[42] !== t10 || $[43] !== t20 || $[44] !== t23 || $[45] !== t24) {
|
|
174
|
+
t25 = /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
175
|
+
ref,
|
|
176
|
+
className: t10,
|
|
177
|
+
"data-side": side,
|
|
178
|
+
"data-size": size,
|
|
179
|
+
children: [
|
|
180
|
+
t20,
|
|
181
|
+
t23,
|
|
182
|
+
t24
|
|
183
|
+
]
|
|
184
|
+
});
|
|
185
|
+
$[39] = ref;
|
|
186
|
+
$[40] = side;
|
|
187
|
+
$[41] = size;
|
|
188
|
+
$[42] = t10;
|
|
189
|
+
$[43] = t20;
|
|
190
|
+
$[44] = t23;
|
|
191
|
+
$[45] = t24;
|
|
192
|
+
$[46] = t25;
|
|
193
|
+
} else t25 = $[46];
|
|
194
|
+
let t26;
|
|
195
|
+
if ($[47] !== container || $[48] !== t25 || $[49] !== t9) {
|
|
196
|
+
t26 = /* @__PURE__ */ jsxs(Dialog.Portal, {
|
|
197
|
+
container,
|
|
198
|
+
children: [t9, t25]
|
|
199
|
+
});
|
|
200
|
+
$[47] = container;
|
|
201
|
+
$[48] = t25;
|
|
202
|
+
$[49] = t9;
|
|
203
|
+
$[50] = t26;
|
|
204
|
+
} else t26 = $[50];
|
|
205
|
+
let t27;
|
|
206
|
+
if ($[51] !== modal || $[52] !== open || $[53] !== t26 || $[54] !== t7 || $[55] !== t8) {
|
|
207
|
+
t27 = /* @__PURE__ */ jsxs(Dialog.Root, {
|
|
208
|
+
open,
|
|
209
|
+
modal,
|
|
210
|
+
onOpenChange: t7,
|
|
211
|
+
children: [t8, t26]
|
|
212
|
+
});
|
|
213
|
+
$[51] = modal;
|
|
214
|
+
$[52] = open;
|
|
215
|
+
$[53] = t26;
|
|
216
|
+
$[54] = t7;
|
|
217
|
+
$[55] = t8;
|
|
218
|
+
$[56] = t27;
|
|
219
|
+
} else t27 = $[56];
|
|
220
|
+
return t27;
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
export { Drawer };
|
|
224
|
+
|
|
225
|
+
//# sourceMappingURL=Drawer.js.map
|
|
@@ -0,0 +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","t7","next","t8","t9","t10","t11","t12","t13","t14","t15","t16","t17","Symbol","for","t18","t19","t20","t21","t22","t23","t24","t25","t26","t27","_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';\n\nexport type DrawerSize = 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface DrawerProps {\n ref?: React.Ref<HTMLDivElement>;\n open?: boolean;\n defaultOpen?: boolean;\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 title: React.ReactNode;\n /** Small label above the title, e.g. the record type. */\n eyebrow?: React.ReactNode;\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 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 closeLabel?: string;\n className?: string;\n /** Props for the scrolling content area. */\n bodyProps?: React.HTMLAttributes<HTMLDivElement>;\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 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\" />}\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":";;;;;;;;;;;;;;;AA8CA,SAAOgC,OAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAgB,MAAA,EAAAvB,MAAAwB,UAAAvB,aAAAwB,IAAAvB,cAAAC,SAAAE,OAAAE,SAAAC,aAAAC,SAAAC,QAAAC,MAAAe,IAAAd,MAAAe,IAAAd,aAAAe,IAAAd,OAAAe,IAAAd,YAAAe,IAAAd,WAAAC,WAAAE,UAAAtB,QAAAwB;CAErB,MAAApB,cAAAwB,OAAAM,KAAAA,IAAA,QAAAN;CAQA,MAAAd,OAAAe,OAAAK,KAAAA,IAAA,UAAAL;CACA,MAAAd,OAAAe,OAAAI,KAAAA,IAAA,OAAAJ;CACA,MAAAd,cAAAe,OAAAG,KAAAA,IAAA,OAAAH;CACA,MAAAd,QAAAe,OA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 'react';
|
|
2
|
+
export interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
actions?: React.ReactNode;
|
|
8
|
+
/** Center content (default) or align to start. */
|
|
9
|
+
align?: 'center' | 'start';
|
|
10
|
+
}
|
|
11
|
+
/** Placeholder for empty lists, searches without results and first-run screens. */
|
|
12
|
+
export declare function EmptyState({ icon, title, description, actions, align, className, children, ref, ...props }: EmptyStateProps): React.JSX.Element;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../../utils/cx.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/empty-state/EmptyState.tsx
|
|
7
|
+
/** Placeholder for empty lists, searches without results and first-run screens. */
|
|
8
|
+
function EmptyState(t0) {
|
|
9
|
+
const $ = c(30);
|
|
10
|
+
let actions;
|
|
11
|
+
let children;
|
|
12
|
+
let className;
|
|
13
|
+
let description;
|
|
14
|
+
let icon;
|
|
15
|
+
let props;
|
|
16
|
+
let ref;
|
|
17
|
+
let t1;
|
|
18
|
+
let title;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({icon, title, description, actions, align: t1, className, children, ref, ...props} = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = actions;
|
|
23
|
+
$[2] = children;
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = description;
|
|
26
|
+
$[5] = icon;
|
|
27
|
+
$[6] = props;
|
|
28
|
+
$[7] = ref;
|
|
29
|
+
$[8] = t1;
|
|
30
|
+
$[9] = title;
|
|
31
|
+
} else {
|
|
32
|
+
actions = $[1];
|
|
33
|
+
children = $[2];
|
|
34
|
+
className = $[3];
|
|
35
|
+
description = $[4];
|
|
36
|
+
icon = $[5];
|
|
37
|
+
props = $[6];
|
|
38
|
+
ref = $[7];
|
|
39
|
+
t1 = $[8];
|
|
40
|
+
title = $[9];
|
|
41
|
+
}
|
|
42
|
+
const align = t1 === void 0 ? "center" : t1;
|
|
43
|
+
let t2;
|
|
44
|
+
if ($[10] !== className) {
|
|
45
|
+
t2 = cx("oui-empty", className);
|
|
46
|
+
$[10] = className;
|
|
47
|
+
$[11] = t2;
|
|
48
|
+
} else t2 = $[11];
|
|
49
|
+
let t3;
|
|
50
|
+
if ($[12] !== icon) {
|
|
51
|
+
t3 = icon && /* @__PURE__ */ jsx("div", {
|
|
52
|
+
className: "oui-empty__icon",
|
|
53
|
+
children: icon
|
|
54
|
+
});
|
|
55
|
+
$[12] = icon;
|
|
56
|
+
$[13] = t3;
|
|
57
|
+
} else t3 = $[13];
|
|
58
|
+
let t4;
|
|
59
|
+
if ($[14] !== title) {
|
|
60
|
+
t4 = /* @__PURE__ */ jsx("p", {
|
|
61
|
+
className: "oui-empty__title",
|
|
62
|
+
children: title
|
|
63
|
+
});
|
|
64
|
+
$[14] = title;
|
|
65
|
+
$[15] = t4;
|
|
66
|
+
} else t4 = $[15];
|
|
67
|
+
let t5;
|
|
68
|
+
if ($[16] !== description) {
|
|
69
|
+
t5 = description && /* @__PURE__ */ jsx("p", {
|
|
70
|
+
className: "oui-empty__description",
|
|
71
|
+
children: description
|
|
72
|
+
});
|
|
73
|
+
$[16] = description;
|
|
74
|
+
$[17] = t5;
|
|
75
|
+
} else t5 = $[17];
|
|
76
|
+
let t6;
|
|
77
|
+
if ($[18] !== actions) {
|
|
78
|
+
t6 = actions && /* @__PURE__ */ jsx("div", {
|
|
79
|
+
className: "oui-empty__actions",
|
|
80
|
+
children: actions
|
|
81
|
+
});
|
|
82
|
+
$[18] = actions;
|
|
83
|
+
$[19] = t6;
|
|
84
|
+
} else t6 = $[19];
|
|
85
|
+
let t7;
|
|
86
|
+
if ($[20] !== align || $[21] !== children || $[22] !== props || $[23] !== ref || $[24] !== t2 || $[25] !== t3 || $[26] !== t4 || $[27] !== t5 || $[28] !== t6) {
|
|
87
|
+
t7 = /* @__PURE__ */ jsxs("div", {
|
|
88
|
+
ref,
|
|
89
|
+
className: t2,
|
|
90
|
+
"data-align": align,
|
|
91
|
+
...props,
|
|
92
|
+
children: [
|
|
93
|
+
t3,
|
|
94
|
+
t4,
|
|
95
|
+
t5,
|
|
96
|
+
children,
|
|
97
|
+
t6
|
|
98
|
+
]
|
|
99
|
+
});
|
|
100
|
+
$[20] = align;
|
|
101
|
+
$[21] = children;
|
|
102
|
+
$[22] = props;
|
|
103
|
+
$[23] = ref;
|
|
104
|
+
$[24] = t2;
|
|
105
|
+
$[25] = t3;
|
|
106
|
+
$[26] = t4;
|
|
107
|
+
$[27] = t5;
|
|
108
|
+
$[28] = t6;
|
|
109
|
+
$[29] = t7;
|
|
110
|
+
} else t7 = $[29];
|
|
111
|
+
return t7;
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
export { EmptyState };
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","names":["React","cx","EmptyStateProps","Omit","HTMLAttributes","HTMLDivElement","ref","Ref","icon","ReactNode","title","description","actions","align","EmptyState","t0","$","_c","children","className","props","t1","undefined","t2","t3","t4","t5","t6","t7","_c"],"sources":["../../../src/components/empty-state/EmptyState.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../utils/cx';\n\nexport interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n ref?: React.Ref<HTMLDivElement>;\n icon?: React.ReactNode;\n title: React.ReactNode;\n description?: React.ReactNode;\n actions?: React.ReactNode;\n /** Center content (default) or align to start. */\n align?: 'center' | 'start';\n}\n\n/** Placeholder for empty lists, searches without results and first-run screens. */\nexport function EmptyState({\n icon,\n title,\n description,\n actions,\n align = 'center',\n className,\n children,\n ref,\n ...props\n}: EmptyStateProps) {\n return (\n <div ref={ref} className={cx('oui-empty', className)} data-align={align} {...props}>\n {icon && <div className=\"oui-empty__icon\">{icon}</div>}\n <p className=\"oui-empty__title\">{title}</p>\n {description && <p className=\"oui-empty__description\">{description}</p>}\n {children}\n {actions && <div className=\"oui-empty__actions\">{actions}</div>}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAcA,SAAOc,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAL;CAAA,IAAAM;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAH;CAAA,IAAAY;CAAA,IAAAd;CAAA,IAAAe;CAAA,IAAAX;CAAA,IAAAM,EAAA,OAAAD,IAAA;EAAoB,CAAA,CAAAP,MAAAE,OAAAC,aAAAC,SAAAC,OAAAQ,IAAAF,WAAAD,UAAAZ,KAAA,GAAAc,SAAAL;EAUTC,EAAA,KAAAD;EAAAC,EAAA,KAAAJ;EAAAI,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAL;EAAAK,EAAA,KAAAR;EAAAQ,EAAA,KAAAI;EAAAJ,EAAA,KAAAV;EAAAU,EAAA,KAAAK;EAAAL,EAAA,KAAAN;CAAA,OAAA;EAAAE,UAAAI,EAAA;EAAAE,WAAAF,EAAA;EAAAG,YAAAH,EAAA;EAAAL,cAAAK,EAAA;EAAAR,OAAAQ,EAAA;EAAAI,QAAAJ,EAAA;EAAAV,MAAAU,EAAA;EAAAK,KAAAL,EAAA;EAAAN,QAAAM,EAAA;CAAA;CALhB,MAAAH,QAAAQ,OAAAC,KAAAA,IAAA,WAAAD;CAAgB,IAAAE;CAAA,IAAAP,EAAA,QAAAG,WAAA;EAOYI,KAAAtB,GAAG,aAAakB,SAAS;EAACH,EAAA,MAAAG;EAAAH,EAAA,MAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,IAAAQ;CAAA,IA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MAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OANNY;AAMM"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Field as BaseField } from '@base-ui/react/field';
|
|
2
|
+
import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset';
|
|
3
|
+
import { Form as BaseForm } from '@base-ui/react/form';
|
|
4
|
+
declare function FieldRoot({ className, ref, ...props }: BaseField.Root.Props): import("react").JSX.Element;
|
|
5
|
+
export interface FieldLabelProps extends BaseField.Label.Props {
|
|
6
|
+
/** Appends a required marker. */
|
|
7
|
+
required?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function FieldLabel({ className, required, children, ref, ...props }: FieldLabelProps): import("react").JSX.Element;
|
|
10
|
+
declare function FieldDescription({ className, ref, ...props }: BaseField.Description.Props): import("react").JSX.Element;
|
|
11
|
+
declare function FieldError({ className, ref, ...props }: BaseField.Error.Props): import("react").JSX.Element;
|
|
12
|
+
declare function FieldItem({ className, ref, ...props }: BaseField.Item.Props): import("react").JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Field parts wire up labels, descriptions and validation for any control
|
|
15
|
+
* inside (Input, Select, Checkbox, Switch, NumberField…).
|
|
16
|
+
*/
|
|
17
|
+
export declare const Field: {
|
|
18
|
+
Root: typeof FieldRoot;
|
|
19
|
+
Label: typeof FieldLabel;
|
|
20
|
+
Description: typeof FieldDescription;
|
|
21
|
+
Error: typeof FieldError;
|
|
22
|
+
Item: typeof FieldItem;
|
|
23
|
+
Validity: import("react").FC<import("@base-ui/react").FieldValidityProps>;
|
|
24
|
+
};
|
|
25
|
+
declare function FieldsetRoot({ className, ref, ...props }: BaseFieldset.Root.Props): import("react").JSX.Element;
|
|
26
|
+
declare function FieldsetLegend({ className, ref, ...props }: BaseFieldset.Legend.Props): import("react").JSX.Element;
|
|
27
|
+
/** Groups related fields under a legend. */
|
|
28
|
+
export declare const Fieldset: {
|
|
29
|
+
Root: typeof FieldsetRoot;
|
|
30
|
+
Legend: typeof FieldsetLegend;
|
|
31
|
+
};
|
|
32
|
+
export interface FormProps extends BaseForm.Props {
|
|
33
|
+
}
|
|
34
|
+
/** Form with Base UI validation wiring and vertical field spacing. */
|
|
35
|
+
export declare function Form({ className, ref, ...props }: FormProps): import("react").JSX.Element;
|
|
36
|
+
export {};
|