@noxickon/onyx 6.6.0 → 6.7.1
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/code-block/CodeBlock.styles.d.ts +2 -2
- package/dist/code-block/CodeBlock2.js +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion.styles.d.ts +2 -2
- package/dist/components/Alert/Alert.js +16 -14
- package/dist/components/Alert/Alert.styles.d.ts +2 -2
- package/dist/components/AlertDialog/AlertDialog.styles.d.ts +2 -2
- package/dist/components/AnimatedGradientText/AnimatedGradientText.styles.d.ts +2 -2
- package/dist/components/AnimatedGradientText/AnimatedGradientText2.js +1 -1
- package/dist/components/AppLayout/AppLayout.js +1 -1
- package/dist/components/AppLayout/AppLayout.styles.d.ts +26 -26
- package/dist/components/Autocomplete/Autocomplete.js +2 -2
- package/dist/components/Autocomplete/Autocomplete.styles.d.ts +64 -64
- package/dist/components/Avatar/Avatar.styles.d.ts +4 -4
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Badge/Badge.styles.d.ts +2 -2
- package/dist/components/BlurSwitch/BlurSwitch.styles.d.ts +2 -2
- package/dist/components/BlurSwitch/BlurSwitch.styles.js +4 -3
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.styles.d.ts +29 -29
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.styles.d.ts +2 -2
- package/dist/components/Card/Card.styles.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.styles.d.ts +14 -14
- package/dist/components/Checkbox/Checkbox.types.d.ts +4 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.styles.d.ts +8 -8
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Chip/Chip.styles.d.ts +2 -2
- package/dist/components/Collapsible/Collapsible.js +2 -2
- package/dist/components/Collapsible/Collapsible.styles.d.ts +20 -20
- package/dist/components/Combobox/Combobox.js +4 -4
- package/dist/components/Combobox/Combobox.styles.d.ts +16 -16
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/Command.styles.d.ts +2 -2
- package/dist/components/ContextMenu/ContextMenu.styles.d.ts +2 -2
- package/dist/components/CopyButton/CopyButton.js +1 -1
- package/dist/components/CopyButton/CopyButton.styles.d.ts +2 -2
- package/dist/components/CopyInput/CopyInput.js +1 -1
- package/dist/components/CopyInput/CopyInput.styles.d.ts +2 -2
- package/dist/components/DataTable/DataTable.d.ts +1 -1
- package/dist/components/DataTable/DataTable.js +737 -531
- package/dist/components/DataTable/DataTable.styles.d.ts +53 -5
- package/dist/components/DataTable/DataTable.styles.js +24 -7
- package/dist/components/DataTable/DataTable.types.d.ts +13 -1
- package/dist/components/DataTable/DataTable.utils.js +1 -1
- package/dist/components/DescriptionList/DescriptionList.js +1 -1
- package/dist/components/DescriptionList/DescriptionList.styles.d.ts +14 -14
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dialog/Dialog.styles.d.ts +2 -2
- package/dist/components/Drawer/Drawer.styles.d.ts +2 -2
- package/dist/components/Drawer/Drawer.styles.js +2 -2
- package/dist/components/Drawer/Drawer2.js +4 -4
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Dropdown/Dropdown.styles.d.ts +2 -2
- package/dist/components/Field/Field.styles.d.ts +29 -29
- package/dist/components/Fieldset/Fieldset.styles.d.ts +11 -11
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Footer/Footer.styles.d.ts +2 -2
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Header/Header.styles.d.ts +2 -2
- package/dist/components/Header/Header.styles.js +1 -1
- package/dist/components/HoldToDelete/HoldToDelete.css +1 -1
- package/dist/components/HoldToDelete/HoldToDelete.styles.d.ts +48 -21
- package/dist/components/HoldToDelete/HoldToDelete.styles.js +32 -17
- package/dist/components/HoldToDelete/HoldToDelete2.js +97 -85
- package/dist/components/IconTile/IconTile.styles.d.ts +8 -8
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.styles.d.ts +26 -26
- package/dist/components/Kbd/Kbd.styles.d.ts +1 -1
- package/dist/components/Main/Main.styles.d.ts +1 -1
- package/dist/components/Meter/Meter.styles.d.ts +20 -20
- package/dist/components/NavigationMenu/NavigationMenu.js +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.styles.d.ts +2 -2
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/NumberInput/NumberInput.styles.d.ts +32 -32
- package/dist/components/OtpField/OtpField.styles.d.ts +14 -14
- package/dist/components/PageProgress/PageProgress.styles.d.ts +14 -14
- package/dist/components/PageProgress/PageProgress.styles.js +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Pagination/Pagination.styles.d.ts +2 -2
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/Popover.styles.d.ts +26 -26
- package/dist/components/Popover/Popover.styles.js +1 -1
- package/dist/components/Progress/Progress.styles.d.ts +20 -20
- package/dist/components/Radio/Radio.styles.d.ts +19 -19
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.d.ts +1 -1
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.js +193 -157
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.styles.d.ts +11 -2
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.styles.js +2 -1
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.types.d.ts +9 -2
- package/dist/components/ResponsiveOverlay/index.d.ts +1 -1
- package/dist/components/ScrollArea/ScrollArea.styles.d.ts +23 -23
- package/dist/components/ScrollArea/ScrollArea2.js +2 -2
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/Select.styles.d.ts +38 -38
- package/dist/components/Separator/Separator.styles.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.styles.d.ts +15 -15
- package/dist/components/Sidebar/Sidebar2.js +19 -19
- package/dist/components/SidebarRail/SidebarRail.js +1 -1
- package/dist/components/SidebarRail/SidebarRail.styles.d.ts +17 -17
- package/dist/components/Skeleton/Skeleton.styles.d.ts +11 -11
- package/dist/components/Slider/Slider.styles.d.ts +20 -20
- package/dist/components/Spinner/Spinner.styles.d.ts +2 -2
- package/dist/components/StatusDisplay/StatusDisplay.styles.d.ts +2 -2
- package/dist/components/Switch/Switch.styles.d.ts +11 -11
- package/dist/components/TabBar/TabBar.js +1 -1
- package/dist/components/TabBar/TabBar.styles.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.js +69 -63
- package/dist/components/Table/Table.styles.d.ts +8 -8
- package/dist/components/Table/Table.styles.js +11 -11
- package/dist/components/Table/Table.types.d.ts +7 -1
- package/dist/components/Tabs/Tabs.js +4 -4
- package/dist/components/Tabs/Tabs.styles.d.ts +2 -2
- package/dist/components/Textarea/Textarea.js +2 -2
- package/dist/components/Textarea/Textarea.styles.d.ts +39 -39
- package/dist/components/Toast/Toast.css +1 -1
- package/dist/components/Toast/Toast.styles.d.ts +2 -2
- package/dist/components/Toast/Toast.styles.js +1 -1
- package/dist/components/Toast/Toast2.js +16 -14
- package/dist/components/Toggle/Toggle.js +2 -2
- package/dist/components/Toggle/Toggle.styles.d.ts +6 -6
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/Tooltip.styles.d.ts +17 -17
- package/dist/components/Tooltip/Tooltip.styles.js +1 -1
- package/dist/components/Typewriter/Typewriter.styles.d.ts +14 -14
- package/dist/components/Typewriter/Typewriter2.js +4 -4
- package/dist/components/VirtualList/VirtualList.styles.d.ts +14 -14
- package/dist/context/Auth/Auth.types.d.ts +3 -1
- package/dist/context/Theme/Theme.js +1 -1
- package/dist/hooks/useCommandShortcut/useCommandShortcut.js +1 -1
- package/dist/hooks/useFilter/useFilter.js +1 -1
- package/dist/hooks/useMediaQuery/useMediaQuery.js +1 -1
- package/dist/hooks/useVirtualizer/useVirtualizer.js +2 -2
- package/dist/hooks.js +3 -3
- package/dist/index.js +24 -24
- package/dist/internal/hooks/useControllableState/useControllableState.types.d.ts +1 -1
- package/dist/internal/hooks/useFormState/useFormState.js +81 -81
- package/dist/internal/styles/addonStyles.d.ts +28 -28
- package/dist/internal/styles/dialogSurfaceStyles.d.ts +1 -1
- package/dist/internal/styles/dialogSurfaceStyles.js +2 -2
- package/dist/internal/styles/menuSurfaceStyles.d.ts +1 -1
- package/dist/internal/styles/menuSurfaceStyles.js +1 -1
- package/dist/internal/styles/stackedLayerStyles.d.ts +1 -0
- package/dist/internal/styles/stackedLayerStyles.js +4 -0
- package/dist/internal/styles/tableCellStyles.d.ts +5 -0
- package/dist/internal/styles/tableCellStyles.js +7 -0
- package/dist/rest/executors/restExecutor.js +1 -1
- package/dist/rich-editor/RichEditor.styles.d.ts +36 -36
- package/dist/rich-editor/RichEditor2.js +3 -3
- package/dist/rich-editor/useOxRichEditor.js +1 -1
- package/dist/tokens/shared.css +5 -0
- package/package.json +17 -11
|
@@ -1,228 +1,264 @@
|
|
|
1
1
|
import { createCompoundContext as e } from "../../internal/context/createCompoundContext/createCompoundContext.js";
|
|
2
2
|
import { OxAlertDialog as t } from "../AlertDialog/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { OxPopover as n } from "../Popover/index.js";
|
|
4
|
+
import { OxDialog as r } from "../Dialog/index.js";
|
|
5
|
+
import { OxDrawer as i } from "../Drawer/index.js";
|
|
6
|
+
import { useOxBreakpointUp as a } from "../../hooks/useBreakpoint/useBreakpoint.js";
|
|
7
|
+
import { responsiveOverlayVariants as o } from "./ResponsiveOverlay.styles.js";
|
|
8
|
+
import { c as s } from "react/compiler-runtime";
|
|
9
|
+
import { useState as c } from "react";
|
|
10
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
11
|
//#region src/components/ResponsiveOverlay/ResponsiveOverlay.tsx
|
|
11
|
-
var { Provider:
|
|
12
|
+
var { Provider: d, useRequiredContext: f } = e("OxResponsiveOverlay"), p = /* @__PURE__ */ new Set([
|
|
12
13
|
"close-press",
|
|
13
14
|
"imperative-action",
|
|
14
15
|
"none"
|
|
15
16
|
]);
|
|
16
|
-
function
|
|
17
|
-
return e ? "drawer" :
|
|
17
|
+
function m(e, t, n, r) {
|
|
18
|
+
return e ? "drawer" : r ? "alertDialog" : t && n === "popover" ? "popover" : "dialog";
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
!e &&
|
|
25
|
-
},
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
function h(e) {
|
|
21
|
+
let o = s(46), { below: u, children: f, defaultOpen: h, desktop: g, desktopAlign: _, desktopSide: v, headerExtra: y, mobile: b, mobileSide: x, onOpenChange: S, open: C, tone: w } = e, T = u === void 0 ? "md" : u, E = g === void 0 ? "dialog" : g, D = _ === void 0 ? "center" : _, O = v === void 0 ? "bottom" : v, k = b === void 0 ? "sheet" : b, A = x === void 0 ? "bottom" : x, j = a(T), M = C !== void 0, [N, P] = c(h ?? !1), F = M ? C : N, I = !j && k === "sheet", L;
|
|
22
|
+
o[0] !== E || o[1] !== j || o[2] !== I || o[3] !== w ? (L = m(I, j, E, w), o[0] = E, o[1] = j, o[2] = I, o[3] = w, o[4] = L) : L = o[4];
|
|
23
|
+
let R = L, z = !j && k === "fullscreen", B = R === "drawer" && w !== void 0, V;
|
|
24
|
+
o[5] !== M || o[6] !== B || o[7] !== S ? (V = (e, t) => {
|
|
25
|
+
!e && B && !p.has(t.reason) || (M || P(e), S?.(e, t));
|
|
26
|
+
}, o[5] = M, o[6] = B, o[7] = S, o[8] = V) : V = o[8];
|
|
27
|
+
let H = V, U;
|
|
28
|
+
o[9] !== D || o[10] !== O || o[11] !== y || o[12] !== z || o[13] !== R || o[14] !== w ? (U = {
|
|
29
|
+
desktopAlign: D,
|
|
30
|
+
desktopSide: O,
|
|
31
|
+
fullScreen: z,
|
|
32
|
+
headerExtra: y,
|
|
33
|
+
root: R,
|
|
34
|
+
tone: w
|
|
35
|
+
}, o[9] = D, o[10] = O, o[11] = y, o[12] = z, o[13] = R, o[14] = w, o[15] = U) : U = o[15];
|
|
36
|
+
let W = U, G;
|
|
37
|
+
o[16] !== f || o[17] !== W ? (G = /* @__PURE__ */ l(d, {
|
|
38
|
+
value: W,
|
|
39
|
+
children: f
|
|
40
|
+
}), o[16] = f, o[17] = W, o[18] = G) : G = o[18];
|
|
41
|
+
let K = G;
|
|
42
|
+
if (R === "drawer") {
|
|
40
43
|
let e;
|
|
41
|
-
|
|
44
|
+
o[19] === H ? e = o[20] : (e = (e, t) => H(e, { reason: t.reason }), o[19] = H, o[20] = e);
|
|
42
45
|
let t;
|
|
43
|
-
return
|
|
44
|
-
disablePointerDismissal:
|
|
45
|
-
open:
|
|
46
|
-
side:
|
|
46
|
+
return o[21] !== F || o[22] !== K || o[23] !== B || o[24] !== A || o[25] !== e ? (t = /* @__PURE__ */ l(i, {
|
|
47
|
+
disablePointerDismissal: B,
|
|
48
|
+
open: F,
|
|
49
|
+
side: A,
|
|
47
50
|
onOpenChange: e,
|
|
48
|
-
children:
|
|
49
|
-
}),
|
|
51
|
+
children: K
|
|
52
|
+
}), o[21] = F, o[22] = K, o[23] = B, o[24] = A, o[25] = e, o[26] = t) : t = o[26], t;
|
|
50
53
|
}
|
|
51
|
-
if (
|
|
54
|
+
if (R === "alertDialog") {
|
|
52
55
|
let e;
|
|
53
|
-
|
|
56
|
+
o[27] === H ? e = o[28] : (e = (e, t) => H(e, { reason: t.reason }), o[27] = H, o[28] = e);
|
|
54
57
|
let n;
|
|
55
|
-
return
|
|
56
|
-
open:
|
|
57
|
-
tone:
|
|
58
|
+
return o[29] !== F || o[30] !== K || o[31] !== e || o[32] !== w ? (n = /* @__PURE__ */ l(t, {
|
|
59
|
+
open: F,
|
|
60
|
+
tone: w,
|
|
61
|
+
onOpenChange: e,
|
|
62
|
+
children: K
|
|
63
|
+
}), o[29] = F, o[30] = K, o[31] = e, o[32] = w, o[33] = n) : n = o[33], n;
|
|
64
|
+
}
|
|
65
|
+
if (R === "popover") {
|
|
66
|
+
let e;
|
|
67
|
+
o[34] === H ? e = o[35] : (e = (e, t) => H(e, { reason: t.reason }), o[34] = H, o[35] = e);
|
|
68
|
+
let t;
|
|
69
|
+
return o[36] !== F || o[37] !== K || o[38] !== e ? (t = /* @__PURE__ */ l(n, {
|
|
70
|
+
open: F,
|
|
58
71
|
onOpenChange: e,
|
|
59
|
-
children:
|
|
60
|
-
}),
|
|
72
|
+
children: K
|
|
73
|
+
}), o[36] = F, o[37] = K, o[38] = e, o[39] = t) : t = o[39], t;
|
|
61
74
|
}
|
|
62
|
-
let
|
|
63
|
-
|
|
64
|
-
let
|
|
65
|
-
return
|
|
66
|
-
open:
|
|
67
|
-
onOpenChange:
|
|
68
|
-
children:
|
|
69
|
-
}),
|
|
75
|
+
let q;
|
|
76
|
+
o[40] === H ? q = o[41] : (q = (e, t) => H(e, { reason: t.reason }), o[40] = H, o[41] = q);
|
|
77
|
+
let J;
|
|
78
|
+
return o[42] !== F || o[43] !== K || o[44] !== q ? (J = /* @__PURE__ */ l(r, {
|
|
79
|
+
open: F,
|
|
80
|
+
onOpenChange: q,
|
|
81
|
+
children: K
|
|
82
|
+
}), o[42] = F, o[43] = K, o[44] = q, o[45] = J) : J = o[45], J;
|
|
70
83
|
}
|
|
71
|
-
function
|
|
72
|
-
let
|
|
73
|
-
if (
|
|
84
|
+
function g(e) {
|
|
85
|
+
let a = s(12), { children: o, className: c } = e, { root: u } = f();
|
|
86
|
+
if (u === "drawer") {
|
|
74
87
|
let e;
|
|
75
|
-
return
|
|
76
|
-
className:
|
|
77
|
-
children:
|
|
78
|
-
}),
|
|
88
|
+
return a[0] !== o || a[1] !== c ? (e = /* @__PURE__ */ l(i.Trigger, {
|
|
89
|
+
className: c,
|
|
90
|
+
children: o
|
|
91
|
+
}), a[0] = o, a[1] = c, a[2] = e) : e = a[2], e;
|
|
79
92
|
}
|
|
80
|
-
if (
|
|
93
|
+
if (u === "alertDialog") {
|
|
81
94
|
let e;
|
|
82
|
-
return
|
|
83
|
-
className:
|
|
84
|
-
children:
|
|
85
|
-
}),
|
|
95
|
+
return a[3] !== o || a[4] !== c ? (e = /* @__PURE__ */ l(t.Trigger, {
|
|
96
|
+
className: c,
|
|
97
|
+
children: o
|
|
98
|
+
}), a[3] = o, a[4] = c, a[5] = e) : e = a[5], e;
|
|
86
99
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
100
|
+
if (u === "popover") {
|
|
101
|
+
let e;
|
|
102
|
+
return a[6] !== o || a[7] !== c ? (e = /* @__PURE__ */ l(n.Trigger, {
|
|
103
|
+
className: c,
|
|
104
|
+
children: o
|
|
105
|
+
}), a[6] = o, a[7] = c, a[8] = e) : e = a[8], e;
|
|
106
|
+
}
|
|
107
|
+
let d;
|
|
108
|
+
return a[9] !== o || a[10] !== c ? (d = /* @__PURE__ */ l(r.Trigger, {
|
|
109
|
+
className: c,
|
|
110
|
+
children: o
|
|
111
|
+
}), a[9] = o, a[10] = c, a[11] = d) : d = a[11], d;
|
|
92
112
|
}
|
|
93
|
-
function
|
|
94
|
-
let
|
|
95
|
-
if (
|
|
96
|
-
|
|
113
|
+
function _(e) {
|
|
114
|
+
let a = s(16), { children: c, className: d } = e, { desktopAlign: p, desktopSide: m, fullScreen: h, root: g, tone: _ } = f(), v, y, b;
|
|
115
|
+
if (a[0] !== c || a[1] !== d || a[2] !== p || a[3] !== m || a[4] !== h || a[5] !== g || a[6] !== _) {
|
|
116
|
+
b = Symbol.for("react.early_return_sentinel");
|
|
97
117
|
bb0: {
|
|
98
|
-
let e =
|
|
99
|
-
fullScreen:
|
|
100
|
-
root:
|
|
118
|
+
let e = o({
|
|
119
|
+
fullScreen: h,
|
|
120
|
+
root: g
|
|
101
121
|
});
|
|
102
|
-
if (
|
|
122
|
+
if (g === "drawer") {
|
|
103
123
|
let t;
|
|
104
|
-
|
|
105
|
-
className: e.content({ class:
|
|
106
|
-
children: [t,
|
|
124
|
+
a[10] === _ ? t = a[11] : (t = _ === void 0 && /* @__PURE__ */ l(i.Handle, {}), a[10] = _, a[11] = t), b = /* @__PURE__ */ u(i.Content, {
|
|
125
|
+
className: e.content({ class: d }),
|
|
126
|
+
children: [t, c]
|
|
107
127
|
});
|
|
108
128
|
break bb0;
|
|
109
129
|
}
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
className: e.content({ class:
|
|
130
|
+
if (g === "alertDialog") {
|
|
131
|
+
b = /* @__PURE__ */ l(t.Content, {
|
|
132
|
+
className: e.content({ class: d }),
|
|
113
133
|
scroll: "inside",
|
|
114
|
-
children:
|
|
134
|
+
children: c
|
|
135
|
+
});
|
|
136
|
+
break bb0;
|
|
137
|
+
}
|
|
138
|
+
if (g === "popover") {
|
|
139
|
+
b = /* @__PURE__ */ l(n.Content, {
|
|
140
|
+
align: p,
|
|
141
|
+
className: e.content({ class: d }),
|
|
142
|
+
side: m,
|
|
143
|
+
children: c
|
|
115
144
|
});
|
|
116
145
|
break bb0;
|
|
117
146
|
}
|
|
118
|
-
|
|
147
|
+
v = r.Content, y = e.content({ class: d });
|
|
119
148
|
}
|
|
120
|
-
|
|
121
|
-
} else
|
|
122
|
-
if (
|
|
123
|
-
let
|
|
124
|
-
return
|
|
125
|
-
className:
|
|
149
|
+
a[0] = c, a[1] = d, a[2] = p, a[3] = m, a[4] = h, a[5] = g, a[6] = _, a[7] = v, a[8] = y, a[9] = b;
|
|
150
|
+
} else v = a[7], y = a[8], b = a[9];
|
|
151
|
+
if (b !== Symbol.for("react.early_return_sentinel")) return b;
|
|
152
|
+
let x;
|
|
153
|
+
return a[12] !== v || a[13] !== c || a[14] !== y ? (x = /* @__PURE__ */ l(v, {
|
|
154
|
+
className: y,
|
|
126
155
|
scroll: "inside",
|
|
127
|
-
children:
|
|
128
|
-
}),
|
|
156
|
+
children: c
|
|
157
|
+
}), a[12] = v, a[13] = c, a[14] = y, a[15] = x) : x = a[15], x;
|
|
129
158
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
132
|
-
className:
|
|
133
|
-
children:
|
|
159
|
+
function v(e, a, o) {
|
|
160
|
+
return l(e === "drawer" ? i.Title : e === "alertDialog" ? t.Title : e === "popover" ? n.Title : r.Title, {
|
|
161
|
+
className: a,
|
|
162
|
+
children: o
|
|
134
163
|
});
|
|
135
164
|
}
|
|
136
|
-
function
|
|
137
|
-
let t =
|
|
138
|
-
if (t[0] !== n || t[1] !== r || t[2] !== i || t[3] !==
|
|
139
|
-
let e =
|
|
140
|
-
|
|
165
|
+
function y(e) {
|
|
166
|
+
let t = s(13), { children: n, className: r } = e, { headerExtra: i, root: a } = f(), c, d, p, m;
|
|
167
|
+
if (t[0] !== n || t[1] !== r || t[2] !== i || t[3] !== a) {
|
|
168
|
+
let e = o();
|
|
169
|
+
c = e.header(), d = "responsive-overlay-header", p = v(a, e.title({ class: r }), n), m = i ? /* @__PURE__ */ l("div", {
|
|
141
170
|
className: e.headerExtra(),
|
|
142
171
|
"data-ox-slot": "responsive-overlay-header-extra",
|
|
143
172
|
children: i
|
|
144
|
-
}) : null, t[0] = n, t[1] = r, t[2] = i, t[3] =
|
|
145
|
-
} else
|
|
173
|
+
}) : null, t[0] = n, t[1] = r, t[2] = i, t[3] = a, t[4] = c, t[5] = d, t[6] = p, t[7] = m;
|
|
174
|
+
} else c = t[4], d = t[5], p = t[6], m = t[7];
|
|
146
175
|
let h;
|
|
147
|
-
return t[8] !==
|
|
148
|
-
className:
|
|
149
|
-
"data-ox-slot":
|
|
176
|
+
return t[8] !== c || t[9] !== d || t[10] !== p || t[11] !== m ? (h = /* @__PURE__ */ u("div", {
|
|
177
|
+
className: c,
|
|
178
|
+
"data-ox-slot": d,
|
|
150
179
|
children: [p, m]
|
|
151
|
-
}), t[8] =
|
|
180
|
+
}), t[8] = c, t[9] = d, t[10] = p, t[11] = m, t[12] = h) : h = t[12], h;
|
|
152
181
|
}
|
|
153
|
-
function
|
|
154
|
-
let
|
|
155
|
-
if (
|
|
156
|
-
|
|
182
|
+
function b(e) {
|
|
183
|
+
let a = s(10), { children: c, className: u } = e, { root: d } = f(), p, m, h;
|
|
184
|
+
if (a[0] !== c || a[1] !== u || a[2] !== d) {
|
|
185
|
+
h = Symbol.for("react.early_return_sentinel");
|
|
157
186
|
bb0: {
|
|
158
|
-
let e =
|
|
159
|
-
if (
|
|
160
|
-
|
|
161
|
-
className: e.description({ class:
|
|
162
|
-
children:
|
|
187
|
+
let e = o();
|
|
188
|
+
if (d === "drawer") {
|
|
189
|
+
h = /* @__PURE__ */ l(i.Description, {
|
|
190
|
+
className: e.description({ class: u }),
|
|
191
|
+
children: c
|
|
192
|
+
});
|
|
193
|
+
break bb0;
|
|
194
|
+
}
|
|
195
|
+
if (d === "alertDialog") {
|
|
196
|
+
h = /* @__PURE__ */ l(t.Description, {
|
|
197
|
+
className: e.description({ class: u }),
|
|
198
|
+
children: c
|
|
163
199
|
});
|
|
164
200
|
break bb0;
|
|
165
201
|
}
|
|
166
|
-
if (
|
|
167
|
-
|
|
168
|
-
className: e.description({ class:
|
|
169
|
-
children:
|
|
202
|
+
if (d === "popover") {
|
|
203
|
+
h = /* @__PURE__ */ l(n.Description, {
|
|
204
|
+
className: e.description({ class: u }),
|
|
205
|
+
children: c
|
|
170
206
|
});
|
|
171
207
|
break bb0;
|
|
172
208
|
}
|
|
173
|
-
|
|
209
|
+
p = r.Description, m = e.description({ class: u });
|
|
174
210
|
}
|
|
175
|
-
|
|
176
|
-
} else
|
|
177
|
-
if (
|
|
178
|
-
let
|
|
179
|
-
return
|
|
180
|
-
className:
|
|
181
|
-
children:
|
|
182
|
-
}),
|
|
211
|
+
a[0] = c, a[1] = u, a[2] = d, a[3] = p, a[4] = m, a[5] = h;
|
|
212
|
+
} else p = a[3], m = a[4], h = a[5];
|
|
213
|
+
if (h !== Symbol.for("react.early_return_sentinel")) return h;
|
|
214
|
+
let g;
|
|
215
|
+
return a[6] !== p || a[7] !== c || a[8] !== m ? (g = /* @__PURE__ */ l(p, {
|
|
216
|
+
className: m,
|
|
217
|
+
children: c
|
|
218
|
+
}), a[6] = p, a[7] = c, a[8] = m, a[9] = g) : g = a[9], g;
|
|
183
219
|
}
|
|
184
|
-
function
|
|
185
|
-
let t =
|
|
186
|
-
if (
|
|
220
|
+
function x(e) {
|
|
221
|
+
let t = s(8), { children: n, className: r } = e, { root: a } = f();
|
|
222
|
+
if (a === "drawer") {
|
|
187
223
|
let e;
|
|
188
|
-
return t[0] !== n || t[1] !==
|
|
189
|
-
className:
|
|
224
|
+
return t[0] !== n || t[1] !== r ? (e = /* @__PURE__ */ l(i.Body, {
|
|
225
|
+
className: r,
|
|
190
226
|
children: n
|
|
191
|
-
}), t[0] = n, t[1] =
|
|
227
|
+
}), t[0] = n, t[1] = r, t[2] = e) : e = t[2], e;
|
|
192
228
|
}
|
|
193
|
-
let
|
|
194
|
-
t[3] ===
|
|
229
|
+
let c;
|
|
230
|
+
t[3] === r ? c = t[4] : (c = o().body({ class: r }), t[3] = r, t[4] = c);
|
|
195
231
|
let u;
|
|
196
|
-
return t[5] !== n || t[6] !==
|
|
197
|
-
className:
|
|
232
|
+
return t[5] !== n || t[6] !== c ? (u = /* @__PURE__ */ l("div", {
|
|
233
|
+
className: c,
|
|
198
234
|
"data-ox-slot": "responsive-overlay-body",
|
|
199
235
|
children: n
|
|
200
|
-
}), t[5] = n, t[6] =
|
|
236
|
+
}), t[5] = n, t[6] = c, t[7] = u) : u = t[7], u;
|
|
201
237
|
}
|
|
202
|
-
function
|
|
203
|
-
let t =
|
|
204
|
-
if (t[0] !== n || t[1] !==
|
|
238
|
+
function S(e) {
|
|
239
|
+
let t = s(8), { children: n, className: r } = e, { root: a } = f(), c, u;
|
|
240
|
+
if (t[0] !== n || t[1] !== r || t[2] !== a) {
|
|
205
241
|
u = Symbol.for("react.early_return_sentinel");
|
|
206
242
|
bb0: {
|
|
207
|
-
let e =
|
|
208
|
-
if (
|
|
209
|
-
u = /* @__PURE__ */
|
|
210
|
-
className: e.drawerFooter({ class:
|
|
243
|
+
let e = o();
|
|
244
|
+
if (a === "drawer") {
|
|
245
|
+
u = /* @__PURE__ */ l(i.Footer, {
|
|
246
|
+
className: e.drawerFooter({ class: r }),
|
|
211
247
|
children: n
|
|
212
248
|
});
|
|
213
249
|
break bb0;
|
|
214
250
|
}
|
|
215
|
-
|
|
251
|
+
c = e.footer({ class: r });
|
|
216
252
|
}
|
|
217
|
-
t[0] = n, t[1] =
|
|
218
|
-
} else
|
|
253
|
+
t[0] = n, t[1] = r, t[2] = a, t[3] = c, t[4] = u;
|
|
254
|
+
} else c = t[3], u = t[4];
|
|
219
255
|
if (u !== Symbol.for("react.early_return_sentinel")) return u;
|
|
220
|
-
let
|
|
221
|
-
return t[5] !== n || t[6] !==
|
|
222
|
-
className:
|
|
256
|
+
let d;
|
|
257
|
+
return t[5] !== n || t[6] !== c ? (d = /* @__PURE__ */ l("div", {
|
|
258
|
+
className: c,
|
|
223
259
|
"data-ox-slot": "responsive-overlay-actions",
|
|
224
260
|
children: n
|
|
225
|
-
}), t[5] = n, t[6] =
|
|
261
|
+
}), t[5] = n, t[6] = c, t[7] = d) : d = t[7], d;
|
|
226
262
|
}
|
|
227
263
|
//#endregion
|
|
228
|
-
export {
|
|
264
|
+
export { S as OxResponsiveOverlayActions, x as OxResponsiveOverlayBody, _ as OxResponsiveOverlayContent, b as OxResponsiveOverlayDescription, h as OxResponsiveOverlayRoot, y as OxResponsiveOverlayTitle, g as OxResponsiveOverlayTrigger };
|
|
@@ -8,6 +8,9 @@ export declare const responsiveOverlayVariants: import('tailwind-variants').TVRe
|
|
|
8
8
|
content: string;
|
|
9
9
|
};
|
|
10
10
|
drawer: {};
|
|
11
|
+
popover: {
|
|
12
|
+
content: string[];
|
|
13
|
+
};
|
|
11
14
|
};
|
|
12
15
|
fullScreen: {
|
|
13
16
|
true: {
|
|
@@ -33,6 +36,9 @@ export declare const responsiveOverlayVariants: import('tailwind-variants').TVRe
|
|
|
33
36
|
content: string;
|
|
34
37
|
};
|
|
35
38
|
drawer: {};
|
|
39
|
+
popover: {
|
|
40
|
+
content: string[];
|
|
41
|
+
};
|
|
36
42
|
};
|
|
37
43
|
fullScreen: {
|
|
38
44
|
true: {
|
|
@@ -49,7 +55,7 @@ export declare const responsiveOverlayVariants: import('tailwind-variants').TVRe
|
|
|
49
55
|
body: string;
|
|
50
56
|
footer: string[];
|
|
51
57
|
drawerFooter: string;
|
|
52
|
-
}, import('tailwind-variants').
|
|
58
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
53
59
|
root: {
|
|
54
60
|
dialog: {
|
|
55
61
|
content: string;
|
|
@@ -58,6 +64,9 @@ export declare const responsiveOverlayVariants: import('tailwind-variants').TVRe
|
|
|
58
64
|
content: string;
|
|
59
65
|
};
|
|
60
66
|
drawer: {};
|
|
67
|
+
popover: {
|
|
68
|
+
content: string[];
|
|
69
|
+
};
|
|
61
70
|
};
|
|
62
71
|
fullScreen: {
|
|
63
72
|
true: {
|
|
@@ -74,5 +83,5 @@ export declare const responsiveOverlayVariants: import('tailwind-variants').TVRe
|
|
|
74
83
|
body: string;
|
|
75
84
|
footer: string[];
|
|
76
85
|
drawerFooter: string;
|
|
77
|
-
}
|
|
86
|
+
}>>;
|
|
78
87
|
export type ResponsiveOverlayVariants = VariantProps<typeof responsiveOverlayVariants>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DrawerSide } from '../Drawer';
|
|
3
|
+
import { OxPopoverContentProps } from '../Popover';
|
|
3
4
|
import { OxBreakpoint } from '../../hooks/useBreakpoint/useBreakpoint.types';
|
|
4
|
-
type ResponsiveOverlayRoot = 'dialog' | 'alertDialog' | 'drawer';
|
|
5
|
+
type ResponsiveOverlayRoot = 'dialog' | 'alertDialog' | 'drawer' | 'popover';
|
|
5
6
|
type ResponsiveOverlayTone = 'danger' | 'warning';
|
|
6
7
|
type ResponsiveOverlayMobileMode = 'sheet' | 'fullscreen';
|
|
8
|
+
type ResponsiveOverlayDesktopMode = 'dialog' | 'popover';
|
|
9
|
+
type ResponsiveOverlayDesktopSide = NonNullable<OxPopoverContentProps['side']>;
|
|
10
|
+
type ResponsiveOverlayDesktopAlign = NonNullable<OxPopoverContentProps['align']>;
|
|
7
11
|
interface ResponsiveOverlayOpenChangeDetails {
|
|
8
12
|
reason: string;
|
|
9
13
|
}
|
|
@@ -11,6 +15,9 @@ interface OxResponsiveOverlayProps {
|
|
|
11
15
|
below?: OxBreakpoint;
|
|
12
16
|
children?: ReactNode;
|
|
13
17
|
defaultOpen?: boolean;
|
|
18
|
+
desktop?: ResponsiveOverlayDesktopMode;
|
|
19
|
+
desktopAlign?: ResponsiveOverlayDesktopAlign;
|
|
20
|
+
desktopSide?: ResponsiveOverlayDesktopSide;
|
|
14
21
|
headerExtra?: ReactNode;
|
|
15
22
|
mobile?: ResponsiveOverlayMobileMode;
|
|
16
23
|
mobileSide?: DrawerSide;
|
|
@@ -42,4 +49,4 @@ interface OxResponsiveOverlayActionsProps {
|
|
|
42
49
|
children: ReactNode;
|
|
43
50
|
className?: string;
|
|
44
51
|
}
|
|
45
|
-
export type { OxResponsiveOverlayActionsProps, OxResponsiveOverlayBodyProps, OxResponsiveOverlayContentProps, OxResponsiveOverlayDescriptionProps, OxResponsiveOverlayProps, OxResponsiveOverlayTitleProps, OxResponsiveOverlayTriggerProps, ResponsiveOverlayMobileMode, ResponsiveOverlayOpenChangeDetails, ResponsiveOverlayRoot, ResponsiveOverlayTone, };
|
|
52
|
+
export type { OxResponsiveOverlayActionsProps, OxResponsiveOverlayBodyProps, OxResponsiveOverlayContentProps, OxResponsiveOverlayDescriptionProps, OxResponsiveOverlayProps, OxResponsiveOverlayTitleProps, OxResponsiveOverlayTriggerProps, ResponsiveOverlayDesktopAlign, ResponsiveOverlayDesktopMode, ResponsiveOverlayDesktopSide, ResponsiveOverlayMobileMode, ResponsiveOverlayOpenChangeDetails, ResponsiveOverlayRoot, ResponsiveOverlayTone, };
|
|
@@ -8,4 +8,4 @@ declare const OxResponsiveOverlay: typeof OxResponsiveOverlayRoot & {
|
|
|
8
8
|
Actions: typeof OxResponsiveOverlayActions;
|
|
9
9
|
};
|
|
10
10
|
export { OxResponsiveOverlay };
|
|
11
|
-
export type { OxResponsiveOverlayActionsProps, OxResponsiveOverlayBodyProps, OxResponsiveOverlayContentProps, OxResponsiveOverlayDescriptionProps, OxResponsiveOverlayProps, OxResponsiveOverlayTitleProps, OxResponsiveOverlayTriggerProps, ResponsiveOverlayMobileMode, ResponsiveOverlayOpenChangeDetails, ResponsiveOverlayTone, } from './ResponsiveOverlay.types';
|
|
11
|
+
export type { OxResponsiveOverlayActionsProps, OxResponsiveOverlayBodyProps, OxResponsiveOverlayContentProps, OxResponsiveOverlayDescriptionProps, OxResponsiveOverlayProps, OxResponsiveOverlayTitleProps, OxResponsiveOverlayTriggerProps, ResponsiveOverlayDesktopAlign, ResponsiveOverlayDesktopMode, ResponsiveOverlayDesktopSide, ResponsiveOverlayMobileMode, ResponsiveOverlayOpenChangeDetails, ResponsiveOverlayTone, } from './ResponsiveOverlay.types';
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export declare const scrollAreaVariants: import('tailwind-variants').TVReturnType<{
|
|
2
2
|
[key: string]: {
|
|
3
|
-
[key: string]: import('tailwind-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
scrollbar?: import('tailwind-
|
|
7
|
-
viewport?: import('tailwind-
|
|
8
|
-
corner?: import('tailwind-
|
|
9
|
-
thumb?: import('tailwind-
|
|
3
|
+
[key: string]: import('tailwind-variants').ClassValue | {
|
|
4
|
+
root?: import('tailwind-variants').ClassValue;
|
|
5
|
+
content?: import('tailwind-variants').ClassValue;
|
|
6
|
+
scrollbar?: import('tailwind-variants').ClassValue;
|
|
7
|
+
viewport?: import('tailwind-variants').ClassValue;
|
|
8
|
+
corner?: import('tailwind-variants').ClassValue;
|
|
9
|
+
thumb?: import('tailwind-variants').ClassValue;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
} | {
|
|
13
13
|
[x: string]: {
|
|
14
|
-
[x: string]: import('tailwind-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
scrollbar?: import('tailwind-
|
|
18
|
-
viewport?: import('tailwind-
|
|
19
|
-
corner?: import('tailwind-
|
|
20
|
-
thumb?: import('tailwind-
|
|
14
|
+
[x: string]: import('tailwind-variants').ClassValue | {
|
|
15
|
+
root?: import('tailwind-variants').ClassValue;
|
|
16
|
+
content?: import('tailwind-variants').ClassValue;
|
|
17
|
+
scrollbar?: import('tailwind-variants').ClassValue;
|
|
18
|
+
viewport?: import('tailwind-variants').ClassValue;
|
|
19
|
+
corner?: import('tailwind-variants').ClassValue;
|
|
20
|
+
thumb?: import('tailwind-variants').ClassValue;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
} | {}, {
|
|
@@ -29,13 +29,13 @@ export declare const scrollAreaVariants: import('tailwind-variants').TVReturnTyp
|
|
|
29
29
|
corner: string;
|
|
30
30
|
}, undefined, {
|
|
31
31
|
[key: string]: {
|
|
32
|
-
[key: string]: import('tailwind-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
scrollbar?: import('tailwind-
|
|
36
|
-
viewport?: import('tailwind-
|
|
37
|
-
corner?: import('tailwind-
|
|
38
|
-
thumb?: import('tailwind-
|
|
32
|
+
[key: string]: import('tailwind-variants').ClassValue | {
|
|
33
|
+
root?: import('tailwind-variants').ClassValue;
|
|
34
|
+
content?: import('tailwind-variants').ClassValue;
|
|
35
|
+
scrollbar?: import('tailwind-variants').ClassValue;
|
|
36
|
+
viewport?: import('tailwind-variants').ClassValue;
|
|
37
|
+
corner?: import('tailwind-variants').ClassValue;
|
|
38
|
+
thumb?: import('tailwind-variants').ClassValue;
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
} | {}, {
|
|
@@ -45,11 +45,11 @@ export declare const scrollAreaVariants: import('tailwind-variants').TVReturnTyp
|
|
|
45
45
|
scrollbar: string[];
|
|
46
46
|
thumb: string[];
|
|
47
47
|
corner: string;
|
|
48
|
-
}, import('tailwind-variants').
|
|
48
|
+
}, import('tailwind-variants').TVReturnTypeLike<unknown, {
|
|
49
49
|
root: string;
|
|
50
50
|
viewport: string[];
|
|
51
51
|
content: string;
|
|
52
52
|
scrollbar: string[];
|
|
53
53
|
thumb: string[];
|
|
54
54
|
corner: string;
|
|
55
|
-
}
|
|
55
|
+
}>>;
|
|
@@ -7,13 +7,13 @@ import { ScrollArea as i } from "@base-ui/react/scroll-area";
|
|
|
7
7
|
function a(a) {
|
|
8
8
|
let o = t(28), s, c, l, u, d, f, p, m, h, g, _, v;
|
|
9
9
|
o[0] === a ? (s = o[1], c = o[2], l = o[3], u = o[4], d = o[5], f = o[6], p = o[7], m = o[8], h = o[9], g = o[10], _ = o[11], v = o[12]) : ({children: s, className: c, contentClassName: l, cornerClassName: u, fade: p, keepMounted: m, orientation: h, scrollbarClassName: f, thumbClassName: g, viewportClassName: _, viewportRef: v, ...d} = a, o[0] = a, o[1] = s, o[2] = c, o[3] = l, o[4] = u, o[5] = d, o[6] = f, o[7] = p, o[8] = m, o[9] = h, o[10] = g, o[11] = _, o[12] = v);
|
|
10
|
-
let y = p
|
|
10
|
+
let y = p !== void 0 && p, b = m !== void 0 && m, x = h === void 0 ? "vertical" : h, S = x === "vertical" || x === "both", C = x === "horizontal" || x === "both", w = y ? x : void 0, T;
|
|
11
11
|
if (o[13] !== s || o[14] !== c || o[15] !== l || o[16] !== u || o[17] !== w || o[18] !== C || o[19] !== S || o[20] !== b || o[21] !== x || o[22] !== d || o[23] !== f || o[24] !== g || o[25] !== _ || o[26] !== v) {
|
|
12
12
|
let t = e();
|
|
13
13
|
T = /* @__PURE__ */ r(i.Root, {
|
|
14
|
+
"data-ox-slot": "scroll-area",
|
|
14
15
|
...d,
|
|
15
16
|
className: t.root({ class: c }),
|
|
16
|
-
"data-ox-slot": "scroll-area",
|
|
17
17
|
children: [
|
|
18
18
|
/* @__PURE__ */ n(i.Viewport, {
|
|
19
19
|
className: t.viewport({ class: _ }),
|
|
@@ -19,7 +19,7 @@ function u(e) {
|
|
|
19
19
|
function d(e) {
|
|
20
20
|
let t = n(16), r, a, u, d, f;
|
|
21
21
|
t[0] === e ? (r = t[1], a = t[2], u = t[3], d = t[4], f = t[5]) : ({children: r, className: a, icon: u, showIcon: f, ...d} = e, t[0] = e, t[1] = r, t[2] = a, t[3] = u, t[4] = d, t[5] = f);
|
|
22
|
-
let p = f === void 0
|
|
22
|
+
let p = f === void 0 || f, m;
|
|
23
23
|
t[6] === a ? m = t[7] : (m = l.trigger({ class: a }), t[6] = a, t[7] = m);
|
|
24
24
|
let h;
|
|
25
25
|
t[8] !== u || t[9] !== p ? (h = p ? /* @__PURE__ */ o(c.Icon, {
|