@moduix/react 2.3.0 → 2.5.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/angle-slider/AngleSlider_module.css +2 -2
- package/dist/components/json-tree-view/JsonTreeView.d.ts +8 -0
- package/dist/components/json-tree-view/JsonTreeView.js +41 -0
- package/dist/components/json-tree-view/JsonTreeView.module.js +6 -0
- package/dist/components/json-tree-view/JsonTreeView_module.css +147 -0
- package/dist/components/json-tree-view/index.d.ts +1 -0
- package/dist/components/json-tree-view/index.js +1 -0
- package/dist/components/navigation-menu/NavigationMenu.d.ts +18 -0
- package/dist/components/navigation-menu/NavigationMenu.js +139 -0
- package/dist/components/navigation-menu/NavigationMenu.module.js +36 -0
- package/dist/components/navigation-menu/NavigationMenu_module.css +469 -0
- package/dist/components/navigation-menu/index.d.ts +1 -0
- package/dist/components/navigation-menu/index.js +1 -0
- package/dist/components/sidebar/Sidebar.d.ts +0 -1
- package/dist/components/sidebar/Sidebar.js +9 -5
- package/dist/components/sidebar/Sidebar_module.css +20 -0
- package/dist/components/toc/Toc.d.ts +23 -0
- package/dist/components/toc/Toc.js +144 -0
- package/dist/components/toc/Toc.module.js +13 -0
- package/dist/components/toc/Toc_module.css +184 -0
- package/dist/components/toc/index.d.ts +1 -0
- package/dist/components/toc/index.js +1 -0
- package/dist/presets/contrast.css +63 -129
- package/dist/presets/dense.css +63 -129
- package/dist/presets/soft.css +62 -128
- package/dist/styles/animations.css +5 -7
- package/dist/styles/borders.css +2 -2
- package/dist/styles/colors.css +79 -163
- package/dist/styles/opacity.css +4 -5
- package/dist/styles/radius.css +6 -6
- package/dist/styles/reset.css +215 -104
- package/dist/styles/shadows.css +1 -2
- package/dist/styles/sizing.css +5 -2
- package/dist/styles/spacing.css +9 -7
- package/dist/styles/style.css +12 -12
- package/dist/styles/transforms.css +3 -4
- package/dist/styles/transitions.css +19 -15
- package/dist/styles/typography.css +16 -6
- package/dist/styles/z-index.css +2 -2
- package/package.json +32 -20
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
|
|
48
48
|
@media (hover: hover) {
|
|
49
49
|
.control-TKuxcQ:not([data-disabled], [data-readonly]):hover {
|
|
50
|
-
background-color: var(--moduix-angle-slider-track-bg-hover,
|
|
50
|
+
background-color: var(--moduix-angle-slider-track-bg-hover, var(--moduix-angle-slider-track-bg, var(--moduix-color-muted)));
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.control-TKuxcQ:not([data-disabled], [data-readonly]):active {
|
|
55
|
-
background-color: var(--moduix-angle-slider-track-bg-active,
|
|
55
|
+
background-color: var(--moduix-angle-slider-track-bg-active, var(--moduix-angle-slider-track-bg, var(--moduix-color-muted)));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.control-TKuxcQ:after {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JsonTreeView as JsonTreeViewPrimitive, useJsonTreeView } from '@ark-ui/react/json-tree-view';
|
|
2
|
+
declare const JsonTreeView: import("react").ForwardRefExoticComponent<Omit<JsonTreeViewPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
|
+
Root: import("react").ForwardRefExoticComponent<Omit<JsonTreeViewPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
RootProvider: import("react").ForwardRefExoticComponent<Omit<JsonTreeViewPrimitive.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
Tree: import("react").ForwardRefExoticComponent<Omit<JsonTreeViewPrimitive.TreeProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
};
|
|
7
|
+
export { JsonTreeView, useJsonTreeView };
|
|
8
|
+
export type { JsonTreeViewRootProps, JsonTreeViewRootProviderProps, JsonTreeViewTreeProps, UseJsonTreeViewProps, UseJsonTreeViewReturn, } from '@ark-ui/react/json-tree-view';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { JsonTreeView, useJsonTreeView } from "@ark-ui/react/json-tree-view";
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { ChevronRightIcon } from "../../internal/icons/ui/index.js";
|
|
7
|
+
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
8
|
+
import JsonTreeView_module from "./JsonTreeView.module.js";
|
|
9
|
+
const JsonTreeView_JsonTreeViewRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
10
|
+
return /*#__PURE__*/ jsx(JsonTreeView.Root, {
|
|
11
|
+
ref: ref,
|
|
12
|
+
className: clsx(JsonTreeView_module.root, normalizeClassName(className)),
|
|
13
|
+
...props,
|
|
14
|
+
"data-slot": "json-tree-view-root"
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
const JsonTreeView_JsonTreeViewRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
18
|
+
return /*#__PURE__*/ jsx(JsonTreeView.RootProvider, {
|
|
19
|
+
ref: ref,
|
|
20
|
+
className: clsx(JsonTreeView_module.root, normalizeClassName(className)),
|
|
21
|
+
...props,
|
|
22
|
+
"data-slot": "json-tree-view-root-provider"
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
const JsonTreeView_JsonTreeViewTree = /*#__PURE__*/ forwardRef(function({ arrow, className, ...props }, ref) {
|
|
26
|
+
return /*#__PURE__*/ jsx(JsonTreeView.Tree, {
|
|
27
|
+
ref: ref,
|
|
28
|
+
arrow: arrow ?? /*#__PURE__*/ jsx(ChevronRightIcon, {
|
|
29
|
+
"aria-hidden": "true"
|
|
30
|
+
}),
|
|
31
|
+
className: clsx(JsonTreeView_module.tree, normalizeClassName(className)),
|
|
32
|
+
...props,
|
|
33
|
+
"data-slot": "json-tree-view-tree"
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
const JsonTreeView_JsonTreeView = Object.assign(JsonTreeView_JsonTreeViewRoot, {
|
|
37
|
+
Root: JsonTreeView_JsonTreeViewRoot,
|
|
38
|
+
RootProvider: JsonTreeView_JsonTreeViewRootProvider,
|
|
39
|
+
Tree: JsonTreeView_JsonTreeViewTree
|
|
40
|
+
});
|
|
41
|
+
export { JsonTreeView_JsonTreeView as JsonTreeView, useJsonTreeView };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
@layer moduix.components {
|
|
2
|
+
.root-jp1ege {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
width: 100%;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
color: var(--moduix-color-foreground);
|
|
7
|
+
font-family: var(--moduix-font-mono);
|
|
8
|
+
font-size: var(--moduix-text-xs);
|
|
9
|
+
line-height: var(--moduix-line-height-text-xs);
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
display: flex;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.root-jp1ege[data-disabled] {
|
|
15
|
+
opacity: var(--moduix-opacity-disabled);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.tree-a99RSA, .root-jp1ege :where([data-scope="json-tree-view"][data-part="branch"]) {
|
|
19
|
+
gap: var(--moduix-spacing-1);
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
min-width: 0;
|
|
22
|
+
display: flex;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-control"], [data-scope="json-tree-view"][data-part="item"]) {
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
width: 100%;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
min-height: calc(var(--moduix-line-height-text-xs) + (var(--moduix-spacing-0-5) * 2));
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: var(--moduix-spacing-0-5);
|
|
32
|
+
border-radius: var(--moduix-radius-xs);
|
|
33
|
+
padding-block: var(--moduix-spacing-0-5);
|
|
34
|
+
color: inherit;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
font: inherit;
|
|
37
|
+
outline: var(--moduix-border-width-sm) solid transparent;
|
|
38
|
+
outline-offset: calc(var(--moduix-border-width-sm) * -1);
|
|
39
|
+
text-align: start;
|
|
40
|
+
transition: background-color var(--moduix-transition-default),
|
|
41
|
+
outline-color var(--moduix-transition-default);
|
|
42
|
+
-webkit-user-select: none;
|
|
43
|
+
user-select: none;
|
|
44
|
+
background-color: #0000;
|
|
45
|
+
border: 0;
|
|
46
|
+
padding-inline-start: calc(var(--moduix-spacing-1) + ((var(--depth, 1) - 1) * 1rem));
|
|
47
|
+
padding-inline-end: var(--moduix-spacing-1);
|
|
48
|
+
display: flex;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-control"], [data-scope="json-tree-view"][data-part="item"]):not([data-disabled]):hover, .root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-control"], [data-scope="json-tree-view"][data-part="item"])[data-selected] {
|
|
52
|
+
background-color: color-mix(in oklab,
|
|
53
|
+
var(--moduix-color-accent) 72%,
|
|
54
|
+
var(--moduix-color-background));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-control"], [data-scope="json-tree-view"][data-part="item"]):focus-visible, .root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-control"], [data-scope="json-tree-view"][data-part="item"])[data-focus] {
|
|
58
|
+
outline-color: var(--moduix-color-ring);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-control"], [data-scope="json-tree-view"][data-part="item"])[data-disabled] {
|
|
62
|
+
color: var(--moduix-color-muted-foreground);
|
|
63
|
+
cursor: default;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-indicator"]) {
|
|
67
|
+
width: var(--moduix-spacing-3);
|
|
68
|
+
height: var(--moduix-spacing-3);
|
|
69
|
+
flex: 0 0 var(--moduix-spacing-3);
|
|
70
|
+
color: color-mix(in oklab,
|
|
71
|
+
var(--moduix-color-muted-foreground) 42%,
|
|
72
|
+
var(--moduix-color-foreground));
|
|
73
|
+
transition: transform var(--moduix-transition-default);
|
|
74
|
+
justify-content: center;
|
|
75
|
+
align-items: center;
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-indicator"])[data-state="open"] {
|
|
80
|
+
transform: rotate(90deg);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-indicator"]) svg {
|
|
84
|
+
width: var(--moduix-spacing-3);
|
|
85
|
+
height: var(--moduix-spacing-3);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-text"], [data-scope="json-tree-view"][data-part="item-text"]) {
|
|
89
|
+
overflow-wrap: anywhere;
|
|
90
|
+
min-width: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.root-jp1ege :where([data-scope="json-tree-view"][data-part="branch-content"]) {
|
|
94
|
+
gap: var(--moduix-spacing-1);
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
min-width: 0;
|
|
97
|
+
display: flex;
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.root-jp1ege :where([data-kind="key"]) {
|
|
102
|
+
color: color-mix(in oklab, var(--moduix-color-chart-1) 72%, var(--moduix-color-foreground));
|
|
103
|
+
font-weight: var(--moduix-weight-medium);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.root-jp1ege :where([data-kind="colon"], [data-kind="brace"], [data-kind="preview-text"]) {
|
|
107
|
+
color: var(--moduix-color-muted-foreground);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.root-jp1ege :where([data-kind="brace"]) {
|
|
111
|
+
font-weight: var(--moduix-weight-medium);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.root-jp1ege :where([data-kind="preview"][data-type="string"]) {
|
|
115
|
+
color: color-mix(in oklab, var(--moduix-color-success) 78%, var(--moduix-color-foreground));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.root-jp1ege :where([data-kind="preview"][data-type="number"], [data-kind="preview"][data-type="bigint"]) {
|
|
119
|
+
color: color-mix(in oklab, var(--moduix-color-chart-3) 78%, var(--moduix-color-foreground));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.root-jp1ege :where([data-kind="preview"][data-type="boolean"]) {
|
|
123
|
+
color: color-mix(in oklab, var(--moduix-color-chart-4) 74%, var(--moduix-color-foreground));
|
|
124
|
+
font-weight: var(--moduix-weight-medium);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.root-jp1ege :where([data-kind="preview"][data-type="null"], [data-kind="preview"][data-type="undefined"]) {
|
|
128
|
+
color: var(--moduix-color-muted-foreground);
|
|
129
|
+
font-style: italic;
|
|
130
|
+
font-weight: var(--moduix-weight-medium);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.root-jp1ege :where([data-kind="preview"][data-type="error"], [data-kind="error-stack"], [data-kind="operator"]) {
|
|
134
|
+
color: var(--moduix-color-destructive);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.root-jp1ege :where([data-kind="preview"][data-type="function"], [data-kind="function-type"], [data-kind="function-body"]) {
|
|
138
|
+
color: color-mix(in oklab, var(--moduix-color-chart-5) 72%, var(--moduix-color-foreground));
|
|
139
|
+
font-style: italic;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.root-jp1ege :where([data-kind="constructor"]) {
|
|
143
|
+
color: var(--moduix-color-muted-foreground);
|
|
144
|
+
font-weight: var(--moduix-weight-medium);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './JsonTreeView.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./JsonTreeView.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NavigationMenu as NavigationMenuPrimitive, useNavigationMenu, useNavigationMenuContext } from '@ark-ui/react/navigation-menu';
|
|
2
|
+
declare const NavigationMenu: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.RootProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
|
|
3
|
+
Root: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.RootProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
4
|
+
RootProvider: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.RootProviderProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
5
|
+
Context: (props: NavigationMenuPrimitive.ContextProps) => import("react").ReactNode;
|
|
6
|
+
List: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.ListProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
Item: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.ItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.TriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
Content: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.ContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Link: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.LinkProps & import("react").RefAttributes<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
11
|
+
Indicator: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.IndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
ItemIndicator: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.ItemIndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Arrow: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.ArrowProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
ViewportPositioner: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.ViewportPositionerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Viewport: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.ViewportProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
useNavigationMenu: (props?: import("@ark-ui/react/navigation-menu").UseNavigationMenuProps) => import("@ark-ui/react/navigation-menu").UseNavigationMenuReturn;
|
|
17
|
+
};
|
|
18
|
+
export { NavigationMenu, useNavigationMenu, useNavigationMenuContext };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { NavigationMenu, useNavigationMenu, useNavigationMenuContext } from "@ark-ui/react/navigation-menu";
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
import { Children, forwardRef, isValidElement } from "react";
|
|
6
|
+
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
7
|
+
import NavigationMenu_module from "./NavigationMenu.module.js";
|
|
8
|
+
const NavigationMenu_NavigationMenuRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
9
|
+
return /*#__PURE__*/ jsx(NavigationMenu.Root, {
|
|
10
|
+
ref: ref,
|
|
11
|
+
"data-slot": "navigation-menu-root",
|
|
12
|
+
className: clsx(NavigationMenu_module.root, normalizeClassName(className)),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
const NavigationMenu_NavigationMenuRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
17
|
+
return /*#__PURE__*/ jsx(NavigationMenu.RootProvider, {
|
|
18
|
+
ref: ref,
|
|
19
|
+
"data-slot": "navigation-menu-root-provider",
|
|
20
|
+
className: clsx(NavigationMenu_module.root, normalizeClassName(className)),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
const NavigationMenu_NavigationMenuList = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
25
|
+
return /*#__PURE__*/ jsx(NavigationMenu.List, {
|
|
26
|
+
ref: ref,
|
|
27
|
+
"data-slot": "navigation-menu-list",
|
|
28
|
+
className: clsx(NavigationMenu_module.list, normalizeClassName(className)),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const NavigationMenu_NavigationMenuItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
33
|
+
return /*#__PURE__*/ jsx(NavigationMenu.Item, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
"data-slot": "navigation-menu-item",
|
|
36
|
+
className: clsx(NavigationMenu_module.item, normalizeClassName(className)),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
const NavigationMenu_NavigationMenuTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
|
|
41
|
+
return /*#__PURE__*/ jsx(NavigationMenu.Trigger, {
|
|
42
|
+
ref: ref,
|
|
43
|
+
asChild: asChild,
|
|
44
|
+
"data-slot": "navigation-menu-trigger",
|
|
45
|
+
className: clsx(!asChild && NavigationMenu_module.trigger, normalizeClassName(className)),
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
const NavigationMenu_NavigationMenuContent = /*#__PURE__*/ forwardRef(function({ asChild, className, children, ...props }, ref) {
|
|
50
|
+
if (asChild) return /*#__PURE__*/ jsx(NavigationMenu.Content, {
|
|
51
|
+
ref: ref,
|
|
52
|
+
asChild: true,
|
|
53
|
+
"data-slot": "navigation-menu-content",
|
|
54
|
+
className: clsx(NavigationMenu_module.content, normalizeClassName(className)),
|
|
55
|
+
...props,
|
|
56
|
+
children: children
|
|
57
|
+
});
|
|
58
|
+
const childrenArray = Children.toArray(children);
|
|
59
|
+
const indicators = childrenArray.filter((child)=>/*#__PURE__*/ isValidElement(child) && child.type === NavigationMenu_NavigationMenuIndicator);
|
|
60
|
+
const content = childrenArray.filter((child)=>!/*#__PURE__*/ isValidElement(child) || child.type !== NavigationMenu_NavigationMenuIndicator);
|
|
61
|
+
return /*#__PURE__*/ jsxs(NavigationMenu.Content, {
|
|
62
|
+
ref: ref,
|
|
63
|
+
"data-slot": "navigation-menu-content",
|
|
64
|
+
className: clsx(NavigationMenu_module.content, normalizeClassName(className)),
|
|
65
|
+
...props,
|
|
66
|
+
children: [
|
|
67
|
+
indicators,
|
|
68
|
+
/*#__PURE__*/ jsx("div", {
|
|
69
|
+
className: NavigationMenu_module.contentViewport,
|
|
70
|
+
children: content
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
const NavigationMenu_NavigationMenuLink = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
76
|
+
return /*#__PURE__*/ jsx(NavigationMenu.Link, {
|
|
77
|
+
ref: ref,
|
|
78
|
+
"data-slot": "navigation-menu-link",
|
|
79
|
+
className: clsx(NavigationMenu_module.link, normalizeClassName(className)),
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
const NavigationMenu_NavigationMenuIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
84
|
+
return /*#__PURE__*/ jsx(NavigationMenu.Indicator, {
|
|
85
|
+
ref: ref,
|
|
86
|
+
"data-slot": "navigation-menu-indicator",
|
|
87
|
+
className: clsx(NavigationMenu_module.indicator, normalizeClassName(className)),
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
const NavigationMenu_NavigationMenuItemIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
92
|
+
return /*#__PURE__*/ jsx(NavigationMenu.ItemIndicator, {
|
|
93
|
+
ref: ref,
|
|
94
|
+
"data-slot": "navigation-menu-item-indicator",
|
|
95
|
+
className: clsx(NavigationMenu_module.itemIndicator, normalizeClassName(className)),
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
const NavigationMenu_NavigationMenuArrow = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
100
|
+
return /*#__PURE__*/ jsx(NavigationMenu.Arrow, {
|
|
101
|
+
ref: ref,
|
|
102
|
+
"data-slot": "navigation-menu-arrow",
|
|
103
|
+
className: clsx(NavigationMenu_module.arrow, normalizeClassName(className)),
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
const NavigationMenu_NavigationMenuViewportPositioner = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
108
|
+
return /*#__PURE__*/ jsx(NavigationMenu.ViewportPositioner, {
|
|
109
|
+
ref: ref,
|
|
110
|
+
"data-slot": "navigation-menu-viewport-positioner",
|
|
111
|
+
className: clsx(NavigationMenu_module.viewportPositioner, normalizeClassName(className)),
|
|
112
|
+
...props
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
const NavigationMenu_NavigationMenuViewport = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
116
|
+
return /*#__PURE__*/ jsx(NavigationMenu.Viewport, {
|
|
117
|
+
ref: ref,
|
|
118
|
+
"data-slot": "navigation-menu-viewport",
|
|
119
|
+
className: clsx(NavigationMenu_module.viewport, normalizeClassName(className)),
|
|
120
|
+
...props
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
const NavigationMenu_NavigationMenu = Object.assign(NavigationMenu_NavigationMenuRoot, {
|
|
124
|
+
Root: NavigationMenu_NavigationMenuRoot,
|
|
125
|
+
RootProvider: NavigationMenu_NavigationMenuRootProvider,
|
|
126
|
+
Context: NavigationMenu.Context,
|
|
127
|
+
List: NavigationMenu_NavigationMenuList,
|
|
128
|
+
Item: NavigationMenu_NavigationMenuItem,
|
|
129
|
+
Trigger: NavigationMenu_NavigationMenuTrigger,
|
|
130
|
+
Content: NavigationMenu_NavigationMenuContent,
|
|
131
|
+
Link: NavigationMenu_NavigationMenuLink,
|
|
132
|
+
Indicator: NavigationMenu_NavigationMenuIndicator,
|
|
133
|
+
ItemIndicator: NavigationMenu_NavigationMenuItemIndicator,
|
|
134
|
+
Arrow: NavigationMenu_NavigationMenuArrow,
|
|
135
|
+
ViewportPositioner: NavigationMenu_NavigationMenuViewportPositioner,
|
|
136
|
+
Viewport: NavigationMenu_NavigationMenuViewport,
|
|
137
|
+
useNavigationMenu: useNavigationMenu
|
|
138
|
+
});
|
|
139
|
+
export { NavigationMenu_NavigationMenu as NavigationMenu, useNavigationMenu, useNavigationMenuContext };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "./NavigationMenu_module.css";
|
|
2
|
+
const NavigationMenu_module = {
|
|
3
|
+
root: "root-l1uCDR",
|
|
4
|
+
list: "list-vJ6fy3",
|
|
5
|
+
item: "item-LmKKOe",
|
|
6
|
+
viewportPositioner: "viewportPositioner-hUgOWA",
|
|
7
|
+
viewport: "viewport-Gtf85E",
|
|
8
|
+
trigger: "trigger-Qt8Wrp",
|
|
9
|
+
link: "link-HFA7O5",
|
|
10
|
+
content: "content-dvfEnJ",
|
|
11
|
+
"navigation-menu-content-in": "navigation-menu-content-in-z6oz3S",
|
|
12
|
+
navigationMenuContentIn: "navigation-menu-content-in-z6oz3S",
|
|
13
|
+
"navigation-menu-content-out": "navigation-menu-content-out-PRe3xI",
|
|
14
|
+
navigationMenuContentOut: "navigation-menu-content-out-PRe3xI",
|
|
15
|
+
contentViewport: "contentViewport-MCA9d7",
|
|
16
|
+
indicator: "indicator-f9Famp",
|
|
17
|
+
"navigation-menu-indicator-in": "navigation-menu-indicator-in-CVxbn2",
|
|
18
|
+
navigationMenuIndicatorIn: "navigation-menu-indicator-in-CVxbn2",
|
|
19
|
+
"navigation-menu-indicator-out": "navigation-menu-indicator-out-rEIfTV",
|
|
20
|
+
navigationMenuIndicatorOut: "navigation-menu-indicator-out-rEIfTV",
|
|
21
|
+
arrow: "arrow-oIu4Ws",
|
|
22
|
+
itemIndicator: "itemIndicator-EcfjBL",
|
|
23
|
+
"navigation-menu-viewport-in": "navigation-menu-viewport-in-GyosQZ",
|
|
24
|
+
navigationMenuViewportIn: "navigation-menu-viewport-in-GyosQZ",
|
|
25
|
+
"navigation-menu-viewport-out": "navigation-menu-viewport-out-Z8eoY1",
|
|
26
|
+
navigationMenuViewportOut: "navigation-menu-viewport-out-Z8eoY1",
|
|
27
|
+
"navigation-menu-viewport-content-from-start": "navigation-menu-viewport-content-from-start-pOKtKn",
|
|
28
|
+
navigationMenuViewportContentFromStart: "navigation-menu-viewport-content-from-start-pOKtKn",
|
|
29
|
+
"navigation-menu-viewport-content-from-end": "navigation-menu-viewport-content-from-end-USOntt",
|
|
30
|
+
navigationMenuViewportContentFromEnd: "navigation-menu-viewport-content-from-end-USOntt",
|
|
31
|
+
"navigation-menu-viewport-content-to-start": "navigation-menu-viewport-content-to-start-sbgu7Q",
|
|
32
|
+
navigationMenuViewportContentToStart: "navigation-menu-viewport-content-to-start-sbgu7Q",
|
|
33
|
+
"navigation-menu-viewport-content-to-end": "navigation-menu-viewport-content-to-end-f0My8W",
|
|
34
|
+
navigationMenuViewportContentToEnd: "navigation-menu-viewport-content-to-end-f0My8W"
|
|
35
|
+
};
|
|
36
|
+
export default NavigationMenu_module;
|