@noxickon/onyx 6.2.0 → 6.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/dist/components/Accordion/Accordion.styles.js +1 -1
- package/dist/components/Alert/Alert.styles.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.d.ts +2 -2
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.styles.js +1 -1
- package/dist/components/Button/Button.styles.d.ts +9 -0
- package/dist/components/Button/Button.styles.js +2 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +34 -33
- package/dist/components/Card/Card.styles.js +3 -3
- package/dist/components/Card/Card.types.d.ts +4 -1
- package/dist/components/Command/Command.styles.js +1 -1
- package/dist/components/CopyInput/CopyInput.d.ts +3 -0
- package/dist/components/CopyInput/CopyInput.js +46 -0
- package/dist/components/CopyInput/CopyInput.styles.d.ts +25 -0
- package/dist/components/CopyInput/CopyInput.styles.js +8 -0
- package/dist/components/CopyInput/CopyInput.types.d.ts +9 -0
- package/dist/components/CopyInput/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.d.ts +2 -2
- package/dist/components/Dialog/Dialog.types.d.ts +1 -1
- package/dist/components/HoldToDelete/HoldToDelete.styles.js +1 -1
- package/dist/components/Pagination/Pagination.styles.js +1 -1
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.d.ts +9 -0
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.js +228 -0
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.styles.d.ts +78 -0
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.styles.js +36 -0
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.types.d.ts +45 -0
- package/dist/components/ResponsiveOverlay/index.d.ts +11 -0
- package/dist/components/ResponsiveOverlay/index.js +12 -0
- package/dist/components/Sidebar/Sidebar.styles.js +13 -6
- package/dist/components/Sidebar/Sidebar2.js +288 -287
- package/dist/components/SidebarRail/SidebarRail.styles.js +2 -2
- package/dist/components/TabBar/TabBar.styles.js +1 -1
- package/dist/components/Tabs/Tabs.styles.js +2 -2
- package/dist/components/Toggle/Toggle.styles.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/hooks.js +3 -3
- package/dist/index.js +44 -42
- package/dist/internal/styles/controlStyles.d.ts +1 -1
- package/dist/internal/styles/controlStyles.js +1 -1
- package/dist/internal/styles/menuSurfaceStyles.js +4 -4
- package/dist/internal/styles/overlayFrameStyles.d.ts +5 -0
- package/dist/internal/styles/overlayFrameStyles.js +8 -0
- package/dist/internal/styles/triggerSurfaceStyles.js +1 -1
- package/dist/internal/utils/getInertActivationProps/getInertActivationProps.d.ts +7 -0
- package/dist/internal/utils/getInertActivationProps/getInertActivationProps.js +12 -0
- package/dist/internal/utils/getInertActivationProps/index.d.ts +1 -0
- package/dist/internal/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/code-block/onyxHighlighter.test.d.ts +0 -1
- package/dist/components/Command/commandScore.test.d.ts +0 -1
- package/dist/graphql/executors/apolloMutationExecutor.test.d.ts +0 -1
- package/dist/graphql/executors/apolloQueryExecutor.test.d.ts +0 -1
- package/dist/hooks/useForm/standardSchemaResolver.test.d.ts +0 -1
- package/dist/internal/utils/getFieldControlAttributes/getFieldControlAttributes.test.d.ts +0 -1
- package/dist/rest/executors/restExecutor.test.d.ts +0 -1
- package/dist/utils/cn.test.d.ts +0 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { VariantProps } from '../../internal/tv';
|
|
2
|
+
export declare const responsiveOverlayVariants: import('tailwind-variants').TVReturnType<{
|
|
3
|
+
root: {
|
|
4
|
+
dialog: {
|
|
5
|
+
content: string;
|
|
6
|
+
};
|
|
7
|
+
alertDialog: {
|
|
8
|
+
content: string;
|
|
9
|
+
};
|
|
10
|
+
drawer: {};
|
|
11
|
+
};
|
|
12
|
+
fullScreen: {
|
|
13
|
+
true: {
|
|
14
|
+
content: string[];
|
|
15
|
+
};
|
|
16
|
+
false: {};
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
content: string;
|
|
20
|
+
header: string;
|
|
21
|
+
title: string;
|
|
22
|
+
headerExtra: string;
|
|
23
|
+
description: string;
|
|
24
|
+
body: string;
|
|
25
|
+
footer: string[];
|
|
26
|
+
drawerFooter: string;
|
|
27
|
+
}, undefined, {
|
|
28
|
+
root: {
|
|
29
|
+
dialog: {
|
|
30
|
+
content: string;
|
|
31
|
+
};
|
|
32
|
+
alertDialog: {
|
|
33
|
+
content: string;
|
|
34
|
+
};
|
|
35
|
+
drawer: {};
|
|
36
|
+
};
|
|
37
|
+
fullScreen: {
|
|
38
|
+
true: {
|
|
39
|
+
content: string[];
|
|
40
|
+
};
|
|
41
|
+
false: {};
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
content: string;
|
|
45
|
+
header: string;
|
|
46
|
+
title: string;
|
|
47
|
+
headerExtra: string;
|
|
48
|
+
description: string;
|
|
49
|
+
body: string;
|
|
50
|
+
footer: string[];
|
|
51
|
+
drawerFooter: string;
|
|
52
|
+
}, import('tailwind-variants').TVReturnType<{
|
|
53
|
+
root: {
|
|
54
|
+
dialog: {
|
|
55
|
+
content: string;
|
|
56
|
+
};
|
|
57
|
+
alertDialog: {
|
|
58
|
+
content: string;
|
|
59
|
+
};
|
|
60
|
+
drawer: {};
|
|
61
|
+
};
|
|
62
|
+
fullScreen: {
|
|
63
|
+
true: {
|
|
64
|
+
content: string[];
|
|
65
|
+
};
|
|
66
|
+
false: {};
|
|
67
|
+
};
|
|
68
|
+
}, {
|
|
69
|
+
content: string;
|
|
70
|
+
header: string;
|
|
71
|
+
title: string;
|
|
72
|
+
headerExtra: string;
|
|
73
|
+
description: string;
|
|
74
|
+
body: string;
|
|
75
|
+
footer: string[];
|
|
76
|
+
drawerFooter: string;
|
|
77
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
78
|
+
export type ResponsiveOverlayVariants = VariantProps<typeof responsiveOverlayVariants>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { tv as e } from "../../internal/tv.js";
|
|
2
|
+
import { overlayBody as t, overlayDescription as n, overlayFooter as r, overlayFullWidthActions as i, overlayHeader as a } from "../../internal/styles/overlayFrameStyles.js";
|
|
3
|
+
//#region src/components/ResponsiveOverlay/ResponsiveOverlay.styles.ts
|
|
4
|
+
var o = e({
|
|
5
|
+
slots: {
|
|
6
|
+
content: "flex flex-col",
|
|
7
|
+
header: a,
|
|
8
|
+
title: "min-w-0 flex-1",
|
|
9
|
+
headerExtra: "shrink-0",
|
|
10
|
+
description: n,
|
|
11
|
+
body: t,
|
|
12
|
+
footer: r,
|
|
13
|
+
drawerFooter: i
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
root: {
|
|
17
|
+
dialog: { content: "p-0" },
|
|
18
|
+
alertDialog: { content: "p-0" },
|
|
19
|
+
drawer: {}
|
|
20
|
+
},
|
|
21
|
+
fullScreen: {
|
|
22
|
+
true: { content: [
|
|
23
|
+
"rounded-none border-0",
|
|
24
|
+
"pointer-coarse:h-dvh pointer-coarse:w-dvw",
|
|
25
|
+
"pointer-coarse:max-h-none pointer-coarse:max-w-none"
|
|
26
|
+
] },
|
|
27
|
+
false: {}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
root: "dialog",
|
|
32
|
+
fullScreen: !1
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { o as responsiveOverlayVariants };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DrawerSide } from '../Drawer';
|
|
3
|
+
import { OxBreakpoint } from '../../hooks/useBreakpoint/useBreakpoint.types';
|
|
4
|
+
type ResponsiveOverlayRoot = 'dialog' | 'alertDialog' | 'drawer';
|
|
5
|
+
type ResponsiveOverlayTone = 'danger' | 'warning';
|
|
6
|
+
type ResponsiveOverlayMobileMode = 'sheet' | 'fullscreen';
|
|
7
|
+
interface ResponsiveOverlayOpenChangeDetails {
|
|
8
|
+
reason: string;
|
|
9
|
+
}
|
|
10
|
+
interface OxResponsiveOverlayProps {
|
|
11
|
+
below?: OxBreakpoint;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
headerExtra?: ReactNode;
|
|
15
|
+
mobile?: ResponsiveOverlayMobileMode;
|
|
16
|
+
mobileSide?: DrawerSide;
|
|
17
|
+
onOpenChange?: (open: boolean, details: ResponsiveOverlayOpenChangeDetails) => void;
|
|
18
|
+
open?: boolean;
|
|
19
|
+
tone?: ResponsiveOverlayTone;
|
|
20
|
+
}
|
|
21
|
+
interface OxResponsiveOverlayTriggerProps {
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
interface OxResponsiveOverlayContentProps {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
interface OxResponsiveOverlayTitleProps {
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
interface OxResponsiveOverlayDescriptionProps {
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
interface OxResponsiveOverlayBodyProps {
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
interface OxResponsiveOverlayActionsProps {
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
export type { OxResponsiveOverlayActionsProps, OxResponsiveOverlayBodyProps, OxResponsiveOverlayContentProps, OxResponsiveOverlayDescriptionProps, OxResponsiveOverlayProps, OxResponsiveOverlayTitleProps, OxResponsiveOverlayTriggerProps, ResponsiveOverlayMobileMode, ResponsiveOverlayOpenChangeDetails, ResponsiveOverlayRoot, ResponsiveOverlayTone, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OxResponsiveOverlayActions, OxResponsiveOverlayBody, OxResponsiveOverlayContent, OxResponsiveOverlayDescription, OxResponsiveOverlayRoot, OxResponsiveOverlayTitle, OxResponsiveOverlayTrigger } from './ResponsiveOverlay';
|
|
2
|
+
declare const OxResponsiveOverlay: typeof OxResponsiveOverlayRoot & {
|
|
3
|
+
Trigger: typeof OxResponsiveOverlayTrigger;
|
|
4
|
+
Content: typeof OxResponsiveOverlayContent;
|
|
5
|
+
Title: typeof OxResponsiveOverlayTitle;
|
|
6
|
+
Description: typeof OxResponsiveOverlayDescription;
|
|
7
|
+
Body: typeof OxResponsiveOverlayBody;
|
|
8
|
+
Actions: typeof OxResponsiveOverlayActions;
|
|
9
|
+
};
|
|
10
|
+
export { OxResponsiveOverlay };
|
|
11
|
+
export type { OxResponsiveOverlayActionsProps, OxResponsiveOverlayBodyProps, OxResponsiveOverlayContentProps, OxResponsiveOverlayDescriptionProps, OxResponsiveOverlayProps, OxResponsiveOverlayTitleProps, OxResponsiveOverlayTriggerProps, ResponsiveOverlayMobileMode, ResponsiveOverlayOpenChangeDetails, ResponsiveOverlayTone, } from './ResponsiveOverlay.types';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OxResponsiveOverlayActions as e, OxResponsiveOverlayBody as t, OxResponsiveOverlayContent as n, OxResponsiveOverlayDescription as r, OxResponsiveOverlayRoot as i, OxResponsiveOverlayTitle as a, OxResponsiveOverlayTrigger as o } from "./ResponsiveOverlay.js";
|
|
2
|
+
//#region src/components/ResponsiveOverlay/index.ts
|
|
3
|
+
var s = Object.assign(i, {
|
|
4
|
+
Trigger: o,
|
|
5
|
+
Content: n,
|
|
6
|
+
Title: a,
|
|
7
|
+
Description: r,
|
|
8
|
+
Body: t,
|
|
9
|
+
Actions: e
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { s as OxResponsiveOverlay };
|
|
@@ -12,9 +12,9 @@ var r = "focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:o
|
|
|
12
12
|
"border-0 bg-transparent text-body text-fg-muted",
|
|
13
13
|
"rounded-control ox-console:rounded-sm",
|
|
14
14
|
"transition-colors ease-out-quint",
|
|
15
|
-
"ox-
|
|
15
|
+
"ox-engaged:[&:not([data-active])]:bg-surface-raised ox-engaged:text-fg",
|
|
16
16
|
r,
|
|
17
|
-
"ox-disabled:opacity-50 ox-disabled:cursor-not-allowed
|
|
17
|
+
"ox-disabled:opacity-50 ox-disabled:cursor-not-allowed",
|
|
18
18
|
"data-[active]:bg-primary-soft data-[active]:font-medium data-[active]:text-fg"
|
|
19
19
|
], o = n({
|
|
20
20
|
slots: {
|
|
@@ -22,12 +22,18 @@ var r = "focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:o
|
|
|
22
22
|
header: [
|
|
23
23
|
"flex items-center shrink-0 gap-2 overflow-hidden",
|
|
24
24
|
"h-[var(--topbar-h)] px-4.5 ox-console:px-4",
|
|
25
|
+
"has-[[data-ox-slot=sidebar-menu]]:px-0",
|
|
25
26
|
"border-b border-line"
|
|
26
27
|
],
|
|
27
|
-
content: [
|
|
28
|
+
content: [
|
|
29
|
+
"flex flex-col flex-1 min-h-0 overflow-y-auto overflow-x-hidden",
|
|
30
|
+
"[&>[data-ox-slot=sidebar-menu]]:py-1.5 ox-console:[&>[data-ox-slot=sidebar-menu]]:py-1.25",
|
|
31
|
+
"[&>[data-ox-slot=sidebar-menu]:not(:first-child)]:border-t [&>[data-ox-slot=sidebar-menu]:not(:first-child)]:border-line"
|
|
32
|
+
],
|
|
28
33
|
footer: [
|
|
29
34
|
"flex items-center shrink-0 overflow-hidden mt-auto",
|
|
30
35
|
"p-3 ox-console:p-2.5",
|
|
36
|
+
"has-[[data-ox-slot=sidebar-menu]]:px-0",
|
|
31
37
|
"border-t border-line"
|
|
32
38
|
],
|
|
33
39
|
separator: "mx-2 my-1 h-px border-0 bg-line shrink-0",
|
|
@@ -48,7 +54,8 @@ var r = "focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:o
|
|
|
48
54
|
menuIcon: [
|
|
49
55
|
"inline-flex items-center justify-center shrink-0 size-4 opacity-60",
|
|
50
56
|
"transition-opacity ease-out-quint",
|
|
51
|
-
"group-hover/menu-button:opacity-100 group-data-[active]/menu-button:opacity-100",
|
|
57
|
+
"group-[&:not([data-disabled]):hover]/menu-button:opacity-100 group-data-[active]/menu-button:opacity-100",
|
|
58
|
+
"group-data-[popup-open]/menu-button:opacity-100",
|
|
52
59
|
"[&>svg]:size-full [&>svg]:shrink-0"
|
|
53
60
|
],
|
|
54
61
|
menuLabel: "flex-1 truncate min-w-0",
|
|
@@ -101,9 +108,9 @@ var r = "focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:o
|
|
|
101
108
|
"inline-flex items-center justify-center shrink-0 size-5 rounded-sm cursor-pointer",
|
|
102
109
|
"border-0 bg-transparent text-fg-subtle",
|
|
103
110
|
"transition-colors ease-out-quint",
|
|
104
|
-
"hover:text-fg hover:bg-[color-mix(in_oklab,var(--fg)_8%,transparent)]",
|
|
111
|
+
"ox-interactive:hover:text-fg ox-interactive:hover:bg-[color-mix(in_oklab,var(--fg)_8%,transparent)]",
|
|
105
112
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-ink",
|
|
106
|
-
"ox-disabled:
|
|
113
|
+
"ox-disabled:cursor-not-allowed ox-disabled:opacity-50",
|
|
107
114
|
"[&>svg]:size-3.5"
|
|
108
115
|
]
|
|
109
116
|
},
|