@vezham/react 26.0.0-alpha.9 → 26.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/components/command/index.js +2 -2
- package/dist/lib/components/menu/index.js +2 -2
- package/dist/lib/components/panel/footer/ai/message-actions.js +2 -2
- package/dist/lib/components/panel/footer/ai/mock-result.js +2 -2
- package/dist/lib/components/panel/footer/control-center/appearance.d.ts +2 -1
- package/dist/lib/components/panel/footer/control-center/appearance.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/appearance.js +4 -3
- package/dist/lib/components/panel/footer/control-center/control-center.js +11 -8
- package/dist/lib/components/panel/footer/control-center/direction.d.ts +2 -1
- package/dist/lib/components/panel/footer/control-center/direction.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/direction.js +6 -4
- package/dist/lib/components/panel/footer/control-center/editor.d.ts +3 -1
- package/dist/lib/components/panel/footer/control-center/editor.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/editor.js +24 -6
- package/dist/lib/components/panel/footer/control-center/preview.d.ts +4 -2
- package/dist/lib/components/panel/footer/control-center/preview.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/preview.js +4 -2
- package/dist/lib/components/panel/footer/control-center/tile.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/tile.js +12 -7
- package/dist/lib/components/panel/footer/control-center/variant.d.ts +27 -0
- package/dist/lib/components/panel/footer/control-center/variant.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/variant.js +30 -9
- package/dist/lib/components/panel/footer/index.js +2 -2
- package/dist/lib/components/panel/footer/notification-center/index.js +2 -2
- package/dist/lib/components/panel/footer/notification-center/widget-tiles.d.ts +88 -3
- package/dist/lib/components/panel/footer/notification-center/widget-tiles.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/notification-center/widget-tiles.js +63 -25
- package/dist/lib/components/panel/footer/user-menu.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/user-menu.js +258 -230
- package/dist/lib/components/panel/header/application-menu-sheet.js +5 -5
- package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/index.js +1 -1
- package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/variants.js +1 -1
- package/dist/lib/components/panel/header/bookmarks/favorites/grid-list.js +2 -2
- package/dist/lib/components/panel/header/bookmarks/index.js +2 -1
- package/dist/lib/components/panel/header/bookmarks/shortcut-context-menu.js +2 -1
- package/dist/lib/components/panel/header/bookmarks/tree-data.js +2 -1
- package/dist/lib/components/panel/header/bookmarks/types.d.ts +0 -5
- package/dist/lib/components/panel/header/bookmarks/types.d.ts.map +1 -1
- package/dist/lib/components/panel/header/index.js +5 -5
- package/dist/lib/components/panel/header/storage/types.d.ts +1 -1
- package/dist/lib/components/panel/info-panel/container.module.js +4 -2
- package/dist/lib/components/panel/menu/index.js +2 -2
- package/dist/lib/components/panel/menu/types.d.ts +2 -11
- package/dist/lib/components/panel/menu/types.d.ts.map +1 -1
- package/dist/lib/layouts/menu-layout/index-md.js +3 -3
- package/dist/lib/layouts/menu-layout/index-sm.js +2 -2
- package/dist/lib/layouts/section/index.d.ts.map +1 -1
- package/dist/lib/layouts/section/index.js +54 -69
- package/dist/lib/layouts/section/sidebar.js +2 -2
- package/dist/lib/layouts/section/tab-navigation.d.ts +12 -0
- package/dist/lib/layouts/section/tab-navigation.d.ts.map +1 -0
- package/dist/lib/layouts/section/tab-navigation.js +32 -0
- package/dist/lib/layouts/section/toolbar-more-sheet.js +3 -3
- package/dist/lib/layouts/section/toolbar.d.ts +3 -0
- package/dist/lib/layouts/section/toolbar.d.ts.map +1 -1
- package/dist/lib/layouts/section/toolbar.js +14 -17
- package/dist/lib/pages/settings/index.d.ts.map +1 -1
- package/dist/lib/pages/settings/index.js +72 -27
- package/dist/lib/pages/settings/navigation.d.ts +1 -1
- package/dist/lib/pages/settings/navigation.d.ts.map +1 -1
- package/dist/lib/pages/settings/settings-content.js +1 -1
- package/dist/lib/pages/settings/tile-gallery.d.ts +6 -1
- package/dist/lib/pages/settings/tile-gallery.d.ts.map +1 -1
- package/dist/lib/pages/settings/tile-gallery.js +175 -100
- package/dist/lib/store/useBookmarks/index.js +2 -2
- package/dist/lib/store/useStorage/index.js +1 -1
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ import { BookmarksTrigger } from "./bookmarks/index.js";
|
|
|
9
9
|
import { StorageTrigger } from "./storage/index.js";
|
|
10
10
|
import { useCallback, useState } from "react";
|
|
11
11
|
import { Avatar, Button, Dropdown, Label, Separator, Surface, Tooltip, useMediaQuery } from "@vezham/react-v3";
|
|
12
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { AltArrowDown, Archive, Bookmark, Magnifier, SidebarMinimalistic } from "@vezham/icons-react";
|
|
14
14
|
//#region src/lib/components/panel/header/index.tsx
|
|
15
15
|
var Header = ({ users, showSearch = false, showBookamarks = false, showStorage = false, onAvatarClick, onSearchClick, isDockHidden = false, onToggleDock, isSidebarOpen = false, onToggleSidebar, extraActions, className, compact = false, hideSeparator = false, showMenuUtilities = true }) => {
|
|
@@ -95,7 +95,7 @@ var Header = ({ users, showSearch = false, showBookamarks = false, showStorage =
|
|
|
95
95
|
})]
|
|
96
96
|
})]
|
|
97
97
|
});
|
|
98
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Surface, {
|
|
98
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Surface, {
|
|
99
99
|
variant: "transparent",
|
|
100
100
|
className: `flex flex-row items-center gap-1 md:flex-col md:gap-3 ${className ?? ""}`,
|
|
101
101
|
"data-vx": "header",
|
|
@@ -190,7 +190,7 @@ var HeaderApplicationMenuContent = ({ onClose, onSearch, navigationLabel, onTogg
|
|
|
190
190
|
onPress: onClose,
|
|
191
191
|
children: /* @__PURE__ */ jsx(Label, { children: "Back to home" })
|
|
192
192
|
}),
|
|
193
|
-
showHistoryNavigation && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Dropdown.Item, {
|
|
193
|
+
showHistoryNavigation && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Dropdown.Item, {
|
|
194
194
|
id: "back",
|
|
195
195
|
textValue: "Back",
|
|
196
196
|
"aria-keyshortcuts": "Meta+ArrowLeft",
|
|
@@ -252,7 +252,7 @@ var HeaderApplicationMenuContent = ({ onClose, onSearch, navigationLabel, onTogg
|
|
|
252
252
|
})
|
|
253
253
|
]
|
|
254
254
|
}),
|
|
255
|
-
showMenuUtilities && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Separator, {}), /* @__PURE__ */ jsxs(Dropdown.Item, {
|
|
255
|
+
showMenuUtilities && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Separator, {}), /* @__PURE__ */ jsxs(Dropdown.Item, {
|
|
256
256
|
id: "search",
|
|
257
257
|
textValue: "Search",
|
|
258
258
|
"aria-label": "Open command palette",
|
|
@@ -319,7 +319,7 @@ var HeaderApplicationMenuContent = ({ onClose, onSearch, navigationLabel, onTogg
|
|
|
319
319
|
};
|
|
320
320
|
var HeaderPanelMenuItems = ({ showBookamarks, showStorage, onClose }) => {
|
|
321
321
|
const { toggleInfoPanel, activeInfoPanel, isOpen } = useInfoPanel();
|
|
322
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [showBookamarks && /* @__PURE__ */ jsxs(Dropdown.Item, {
|
|
322
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [showBookamarks && /* @__PURE__ */ jsxs(Dropdown.Item, {
|
|
323
323
|
id: "bookmarks",
|
|
324
324
|
textValue: "Bookmarks",
|
|
325
325
|
"aria-label": "Bookmarks",
|
|
@@ -341,7 +341,7 @@ declare const useProps: (originalProps: Props) => {
|
|
|
341
341
|
variant?: "dark" | "light" | "default" | "glass" | undefined;
|
|
342
342
|
} & import('tailwind-variants').ClassProp<import('tailwind-variants').ClassValue>) | undefined) => string;
|
|
343
343
|
};
|
|
344
|
-
classNames: Partial<Record<"tabs" | "base" | "search_input" | "search_input_wrapper" | "search_icon" | "empty_container" | "empty_icon" | "empty_title" | "empty_description" | "item" | "tabs_list_container" | "tabs_list" | "tab_archive" | "tab_trash" | "tab_indicator" | "
|
|
344
|
+
classNames: Partial<Record<"tabs" | "base" | "container" | "search_input" | "search_input_wrapper" | "search_icon" | "empty_container" | "empty_icon" | "empty_title" | "empty_description" | "item" | "tabs_list_container" | "tabs_list" | "tab_archive" | "tab_trash" | "tab_indicator" | "actions_bar" | "actions_bar_with_gap" | "clear_all_button" | "restore_all_button" | "items_container" | "date_group" | "date_header" | "date_label" | "date_divider" | "items_list" | "item_favicon" | "item_fallback_icon" | "item_content" | "item_title" | "item_url" | "item_actions" | "unarchive_button" | "restore_button" | "delete_button" | "delete_permanent_button" | "action_icon" | "action_icon_success" | "action_icon_danger" | "action_icon_default", string>> | undefined;
|
|
345
345
|
children: ReactNode;
|
|
346
346
|
getTabsProps: () => {
|
|
347
347
|
className: string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
//#region src/lib/components/panel/info-panel/container.module.css
|
|
2
|
+
var panel = "_panel_inr1p_1";
|
|
1
3
|
var container_module_default = {
|
|
2
|
-
panel
|
|
4
|
+
panel,
|
|
3
5
|
"panel-enter": "_panel-enter_inr1p_1",
|
|
4
6
|
"panel-exit": "_panel-exit_inr1p_1",
|
|
5
7
|
"panel-reduced": "_panel-reduced_inr1p_1"
|
|
6
8
|
};
|
|
7
9
|
//#endregion
|
|
8
|
-
export { container_module_default as default };
|
|
10
|
+
export { container_module_default as default, panel };
|
|
@@ -3,7 +3,7 @@ import { useProps } from "./types.js";
|
|
|
3
3
|
import { useNavigate } from "@tanstack/react-router";
|
|
4
4
|
import { forwardRef, useState } from "react";
|
|
5
5
|
import { Drawer, ScrollShadow, Tooltip, cn } from "@vezham/react-v3";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/lib/components/panel/menu/index.tsx
|
|
8
8
|
var Menu = forwardRef((props, ref) => {
|
|
9
9
|
const navigate = useNavigate();
|
|
@@ -75,7 +75,7 @@ var Menu = forwardRef((props, ref) => {
|
|
|
75
75
|
children: item.submenu?.map((subItem) => renderSubMenuItem(subItem, depth + 1))
|
|
76
76
|
})] }, item.key);
|
|
77
77
|
};
|
|
78
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Component, {
|
|
78
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Component, {
|
|
79
79
|
...getBaseProps(),
|
|
80
80
|
children: /* @__PURE__ */ jsx(ScrollShadow, {
|
|
81
81
|
...getScrollProps(),
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
|
|
2
2
|
import { tvProps, tvSlots } from './variant';
|
|
3
|
-
type SubMenuItem = {
|
|
4
|
-
key: string;
|
|
5
|
-
title: string;
|
|
6
|
-
href?: string;
|
|
7
|
-
icon?: string;
|
|
8
|
-
iconActive?: string;
|
|
9
|
-
endContent?: ReactNode;
|
|
10
|
-
submenu?: SubMenuItem[];
|
|
11
|
-
};
|
|
12
3
|
type MenuItem = {
|
|
13
4
|
key: string;
|
|
14
5
|
title: string;
|
|
@@ -186,7 +177,7 @@ declare const useProps: (originalProps: Props) => {
|
|
|
186
177
|
itemRadius?: "none" | "lg" | "sm" | "md" | "full" | undefined;
|
|
187
178
|
} & import('tailwind-variants').ClassProp<import('tailwind-variants').ClassValue>) | undefined) => string;
|
|
188
179
|
};
|
|
189
|
-
classNames: Partial<Record<"label" | "icon" | "scroll" | "base" | "align" | "
|
|
180
|
+
classNames: Partial<Record<"label" | "icon" | "scroll" | "base" | "align" | "container" | "item" | "icon_wrapper" | "tooltip_trigger" | "tooltip_content", string>> | undefined;
|
|
190
181
|
children: ReactNode;
|
|
191
182
|
getBaseProps: () => {
|
|
192
183
|
color?: string | undefined | undefined;
|
|
@@ -518,5 +509,5 @@ declare const useProps: (originalProps: Props) => {
|
|
|
518
509
|
onSubmenuChange: ((state: SubmenuState) => void) | undefined;
|
|
519
510
|
};
|
|
520
511
|
export { useProps };
|
|
521
|
-
export type { Props, MenuItem
|
|
512
|
+
export type { Props, MenuItem };
|
|
522
513
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/panel/menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAI/E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAO,MAAM,WAAW,CAAA;AAEjD,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/panel/menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAI/E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAO,MAAM,WAAW,CAAA;AAEjD,KAAK,QAAQ,GAAG;IACd,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,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E,QAAQ,EAAE,OAAO,CAAA;KAAE;;;;;;;;;;;kCAgBpB;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE;;;;;;;;;;qBApFzC,MAAM,KAAK,IAAI;8BAEN,YAAY,KAAK,IAAI;CA+GhD,CAAA;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA;AACnB,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -16,7 +16,7 @@ import { HomeNavigationBubble } from "./home-navigation-bubble.js";
|
|
|
16
16
|
import { useLocation } from "@tanstack/react-router";
|
|
17
17
|
import { useState } from "react";
|
|
18
18
|
import { Surface } from "@vezham/react-v3";
|
|
19
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
20
20
|
//#region src/lib/layouts/menu-layout/index-md.tsx
|
|
21
21
|
var headerUsers = {
|
|
22
22
|
id: "1",
|
|
@@ -47,7 +47,7 @@ var MenuMD = ({ items, controlCenter }) => {
|
|
|
47
47
|
useSidebarShortcut(toggleDock, isHome);
|
|
48
48
|
const selectedKey = getSelectedMenuKey(location.pathname, items);
|
|
49
49
|
const { user } = useUser();
|
|
50
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
50
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
51
51
|
/* @__PURE__ */ jsx(NavigationPanel, {
|
|
52
52
|
collapsed: isNavigationCollapsed,
|
|
53
53
|
footerUser: {
|
|
@@ -93,7 +93,7 @@ var NavigationPanel = ({ collapsed, footerUser, items, controlCenter, navigation
|
|
|
93
93
|
variant: "transparent",
|
|
94
94
|
className: `border-default-300 sticky top-0 left-0 z-[10] flex h-[100dvh] shrink-0 flex-col overflow-hidden transition-[width,padding,gap] duration-300 ease-out ${navigationWidth} ${collapsed ? "border-0 p-0" : "gap-6 px-4 pt-3 pb-4"}`,
|
|
95
95
|
"data-vx": "menu-layout",
|
|
96
|
-
children: !collapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
96
|
+
children: !collapsed && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
97
97
|
/* @__PURE__ */ jsx(Header, {
|
|
98
98
|
users: headerUsers,
|
|
99
99
|
showSearch: true,
|
|
@@ -18,7 +18,7 @@ import { getNavigationToolbar } from "../../navigation-toolbar.js";
|
|
|
18
18
|
import { useLocation } from "@tanstack/react-router";
|
|
19
19
|
import React, { useState } from "react";
|
|
20
20
|
import { Surface, toast } from "@vezham/react-v3";
|
|
21
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
22
22
|
//#region src/lib/layouts/menu-layout/index-sm.tsx
|
|
23
23
|
var MenuSM = ({ items, controlCenter }) => {
|
|
24
24
|
const [selectedKey, setSelectedKey] = React.useState(items[0]?.key ?? "");
|
|
@@ -49,7 +49,7 @@ var MenuSM = ({ items, controlCenter }) => {
|
|
|
49
49
|
avatar: "https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg"
|
|
50
50
|
};
|
|
51
51
|
const { user } = useUser();
|
|
52
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
53
53
|
/* @__PURE__ */ jsxs("div", {
|
|
54
54
|
className: "pointer-events-none fixed top-3 right-3 left-3 z-40 flex items-center justify-between gap-2",
|
|
55
55
|
children: [/* @__PURE__ */ jsx(Surface, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/section/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAWd,OAAO,EAAE,KAAK,iBAAiB,EAAsB,MAAM,kBAAkB,CAAA;AAI7E,OAAO,KAAK,EAAE,WAAW,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,EAAE,CAAA;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAA;AAEjE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -6,37 +6,21 @@ import { ShortcutButton } from "../../components/shortcut-key/index.js";
|
|
|
6
6
|
import { useSectionPreferences } from "./preferences.js";
|
|
7
7
|
import { useSectionSidebarState } from "./sidebar-state.js";
|
|
8
8
|
import { SectionSidebar } from "./sidebar.js";
|
|
9
|
+
import { SectionTabNavigation } from "./tab-navigation.js";
|
|
9
10
|
import { useMobileToolbarNavigation } from "./toolbar-more-sheet.js";
|
|
10
11
|
import { SectionActiveFilters, SectionToolbar } from "./toolbar.js";
|
|
11
12
|
import { SectionToolbarContentProvider, useRegisteredSectionToolbarContent, useSectionToolbarContent } from "./toolbar-content.js";
|
|
12
13
|
import { useLocation, useNavigate, useRouter } from "@tanstack/react-router";
|
|
13
14
|
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
14
|
-
import { Drawer, Surface,
|
|
15
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { Drawer, Surface, useMediaQuery } from "@vezham/react-v3";
|
|
16
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
16
17
|
import { useHotkey } from "@tanstack/react-hotkeys";
|
|
17
18
|
//#region src/lib/layouts/section/index.tsx
|
|
18
19
|
var EMPTY_SIDEBAR_ITEMS = [];
|
|
19
20
|
var EMPTY_MENU_ACTIONS = [];
|
|
20
21
|
var EMPTY_VIEW_ACTIONS = [];
|
|
21
22
|
var matchesPath = (pathname, href) => Boolean(href && (pathname === href || pathname.startsWith(`${href}/`)));
|
|
22
|
-
var
|
|
23
|
-
className: `scrollbar-hide order-2 mb-3 w-fit min-w-0 self-center overflow-x-auto rounded-full ${search && primaryAction ? "max-w-[calc(100%-9rem)]" : "max-w-[calc(100%-1.5rem)]"}`,
|
|
24
|
-
children: /* @__PURE__ */ jsx(Tabs.List, {
|
|
25
|
-
"aria-label": `${title} tabs`,
|
|
26
|
-
className: "flex min-w-max flex-nowrap *:whitespace-nowrap",
|
|
27
|
-
children: displayTabs.map((tab) => /* @__PURE__ */ jsxs(Tabs.Tab, {
|
|
28
|
-
id: tab.key,
|
|
29
|
-
className: "whitespace-nowrap",
|
|
30
|
-
children: [tab.title, /* @__PURE__ */ jsx(Tabs.Indicator, {})]
|
|
31
|
-
}, tab.key))
|
|
32
|
-
})
|
|
33
|
-
}, JSON.stringify(displayTabs.map((tab) => tab.key))) });
|
|
34
|
-
var SectionPanels = ({ displayTabs, selectedTab, children }) => /* @__PURE__ */ jsxs(Fragment, { children: [displayTabs.length === 0 && children, displayTabs.map((tab) => /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
35
|
-
id: tab.key,
|
|
36
|
-
className: "m-0 flex min-h-0 flex-1 flex-col p-0",
|
|
37
|
-
children: tab.key === selectedTab?.key && children
|
|
38
|
-
}, tab.key))] });
|
|
39
|
-
var SectionBody = ({ hasSidebar, isNavigationCollapsed, sidebarId, sidebar, filter, selectedFilters, setSelectedFilters, displayTabs, selectedTab, children }) => /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
var SectionBody = ({ hasSidebar, isNavigationCollapsed, sidebarId, sidebar, filter, selectedFilters, setSelectedFilters, panelId, selectedTab, children }) => /* @__PURE__ */ jsxs("div", {
|
|
40
24
|
className: "order-1 flex min-h-0 min-w-0 flex-1",
|
|
41
25
|
children: [hasSidebar && !isNavigationCollapsed && /* @__PURE__ */ jsx("aside", {
|
|
42
26
|
id: sidebarId,
|
|
@@ -49,9 +33,12 @@ var SectionBody = ({ hasSidebar, isNavigationCollapsed, sidebarId, sidebar, filt
|
|
|
49
33
|
onSelectedFiltersChange: setSelectedFilters
|
|
50
34
|
}), /* @__PURE__ */ jsx(Surface, {
|
|
51
35
|
className: "relative flex min-h-0 flex-1 flex-col rounded-lg p-4 sm:p-5",
|
|
52
|
-
children: /* @__PURE__ */ jsx(
|
|
53
|
-
|
|
54
|
-
selectedTab,
|
|
36
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
37
|
+
id: panelId,
|
|
38
|
+
role: selectedTab ? "tabpanel" : void 0,
|
|
39
|
+
"aria-label": selectedTab?.title,
|
|
40
|
+
tabIndex: selectedTab ? 0 : void 0,
|
|
41
|
+
className: "m-0 flex min-h-0 flex-1 flex-col p-0",
|
|
55
42
|
children
|
|
56
43
|
})
|
|
57
44
|
})]
|
|
@@ -59,7 +46,7 @@ var SectionBody = ({ hasSidebar, isNavigationCollapsed, sidebarId, sidebar, filt
|
|
|
59
46
|
});
|
|
60
47
|
var SectionNavigationControls = ({ isNavigationCollapsed, sidebarId, toggleNavigation }) => {
|
|
61
48
|
const router = useRouter();
|
|
62
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
49
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
63
50
|
!isNavigationCollapsed && /* @__PURE__ */ jsx(ShortcutButton, {
|
|
64
51
|
className: "h-9 w-9 min-w-9 p-0",
|
|
65
52
|
label: "Hide Sidebar",
|
|
@@ -166,15 +153,6 @@ var SectionDrawer = ({ title, navigation, children }) => {
|
|
|
166
153
|
})
|
|
167
154
|
});
|
|
168
155
|
};
|
|
169
|
-
var SectionTabs = ({ displayTabs, selectedTab, navigate, children }) => /* @__PURE__ */ jsx(Tabs, {
|
|
170
|
-
selectedKey: selectedTab?.key ?? "",
|
|
171
|
-
onSelectionChange: (key) => {
|
|
172
|
-
const tab = displayTabs.find((item) => item.key === key);
|
|
173
|
-
if (tab?.href) navigate({ to: tab.href });
|
|
174
|
-
},
|
|
175
|
-
className: "flex min-h-0 min-w-0 flex-1 flex-col gap-0",
|
|
176
|
-
children
|
|
177
|
-
});
|
|
178
156
|
var useSectionSearch = (search) => {
|
|
179
157
|
const inputRef = useRef(null);
|
|
180
158
|
const [isOpen, onOpenChange] = useState(false);
|
|
@@ -185,7 +163,7 @@ var useSectionSearch = (search) => {
|
|
|
185
163
|
onOpenChange
|
|
186
164
|
} : void 0;
|
|
187
165
|
};
|
|
188
|
-
var SectionLayoutToolbar = ({ options, navigation, preferences, displayTabs, isCompactToolbar, hideCompactControls }) => {
|
|
166
|
+
var SectionLayoutToolbar = ({ options, navigation, preferences, displayTabs, selectedTab, onPanelIdChange, onTabChange, isCompactToolbar, hideCompactControls }) => {
|
|
189
167
|
const { title, toolbar, search, sync = true, filter = false, sort = false, view = EMPTY_VIEW_ACTIONS, onSync, menuActions = EMPTY_MENU_ACTIONS, primaryAction } = options;
|
|
190
168
|
const { selectedFilters, setSelectedFilters, sortValue, handleSortChange } = preferences;
|
|
191
169
|
const registeredToolbarContent = useRegisteredSectionToolbarContent();
|
|
@@ -207,12 +185,15 @@ var SectionLayoutToolbar = ({ options, navigation, preferences, displayTabs, isC
|
|
|
207
185
|
viewMode,
|
|
208
186
|
onViewModeChange: setViewMode,
|
|
209
187
|
tabs: isCompactToolbar ? [] : displayTabs,
|
|
188
|
+
selectedTabKey: selectedTab?.key,
|
|
189
|
+
onPanelIdChange,
|
|
190
|
+
onTabChange,
|
|
210
191
|
isMenuOpen,
|
|
211
192
|
onMenuOpenChange: setIsMenuOpen,
|
|
212
193
|
search: toolbarSearch,
|
|
213
194
|
menuActions,
|
|
214
195
|
primaryAction: hideCompactControls ? void 0 : primaryAction,
|
|
215
|
-
toolbar: /* @__PURE__ */ jsxs(Fragment, { children: [toolbar, registeredToolbarContent.desktop] }),
|
|
196
|
+
toolbar: /* @__PURE__ */ jsxs(Fragment$1, { children: [toolbar, registeredToolbarContent.desktop] }),
|
|
216
197
|
mobileToolbar: registeredToolbarContent.mobile,
|
|
217
198
|
onSync: handleSync,
|
|
218
199
|
navigationControls: /* @__PURE__ */ jsx(SectionNavigationControls, {
|
|
@@ -230,6 +211,11 @@ var SectionLayoutContent = (props) => {
|
|
|
230
211
|
const shouldHideCompactControls = isCompactToolbar && isFooterHidden;
|
|
231
212
|
const preferences = useSectionPreferences(getStateScope(sectionKey, navigation.pathname, sidebarItems, tabs, title), onSortChange);
|
|
232
213
|
const { displayTabs, selectedTab } = getSectionTabs(navigation.pathname, sidebarItems, tabs);
|
|
214
|
+
const [panelId, setPanelId] = useState(useId());
|
|
215
|
+
const handleTabChange = useCallback((key) => {
|
|
216
|
+
const tab = displayTabs.find((item) => item.key === String(key));
|
|
217
|
+
if (tab?.href) navigation.navigate({ to: tab.href });
|
|
218
|
+
}, [displayTabs, navigation]);
|
|
233
219
|
const sidebar = /* @__PURE__ */ jsx(SectionSidebar, {
|
|
234
220
|
items: sidebarItems,
|
|
235
221
|
pathname: navigation.pathname,
|
|
@@ -238,42 +224,41 @@ var SectionLayoutContent = (props) => {
|
|
|
238
224
|
onExpandedChange: navigation.setExpandedSidebarKeys,
|
|
239
225
|
onNavigate: () => navigation.setIsDrawerOpen(false)
|
|
240
226
|
});
|
|
241
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
242
|
-
/* @__PURE__ */ jsx(SectionLayoutToolbar, {
|
|
243
|
-
options: props,
|
|
244
|
-
navigation,
|
|
245
|
-
preferences,
|
|
246
|
-
displayTabs,
|
|
247
|
-
isCompactToolbar,
|
|
248
|
-
hideCompactControls: shouldHideCompactControls
|
|
249
|
-
}),
|
|
250
|
-
isCompactToolbar && !shouldHideCompactControls && /* @__PURE__ */ jsx(CompactTabs, {
|
|
251
|
-
title,
|
|
252
|
-
displayTabs,
|
|
253
|
-
search,
|
|
254
|
-
primaryAction
|
|
255
|
-
}),
|
|
256
|
-
/* @__PURE__ */ jsx(SectionBody, {
|
|
257
|
-
hasSidebar: navigation.hasSidebar,
|
|
258
|
-
isNavigationCollapsed: navigation.isNavigationCollapsed,
|
|
259
|
-
sidebarId: navigation.sidebarId,
|
|
260
|
-
sidebar,
|
|
261
|
-
filter,
|
|
262
|
-
selectedFilters: preferences.selectedFilters,
|
|
263
|
-
setSelectedFilters: preferences.setSelectedFilters,
|
|
264
|
-
displayTabs,
|
|
265
|
-
selectedTab,
|
|
266
|
-
children
|
|
267
|
-
})
|
|
268
|
-
] });
|
|
269
227
|
return /* @__PURE__ */ jsxs("div", {
|
|
270
228
|
className: "bg-background flex h-full min-h-0 min-w-0 flex-1 flex-col",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
229
|
+
children: [/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
230
|
+
/* @__PURE__ */ jsx(SectionLayoutToolbar, {
|
|
231
|
+
options: props,
|
|
232
|
+
navigation,
|
|
233
|
+
preferences,
|
|
234
|
+
displayTabs,
|
|
235
|
+
selectedTab,
|
|
236
|
+
onPanelIdChange: setPanelId,
|
|
237
|
+
onTabChange: handleTabChange,
|
|
238
|
+
isCompactToolbar,
|
|
239
|
+
hideCompactControls: shouldHideCompactControls
|
|
240
|
+
}),
|
|
241
|
+
isCompactToolbar && !shouldHideCompactControls && /* @__PURE__ */ jsx(SectionTabNavigation, {
|
|
242
|
+
title,
|
|
243
|
+
tabs: displayTabs,
|
|
244
|
+
selectedTabKey: selectedTab?.key,
|
|
245
|
+
onPanelIdChange: setPanelId,
|
|
246
|
+
onTabChange: handleTabChange,
|
|
247
|
+
className: `order-2 mb-3 w-fit min-w-0 self-center ${search && primaryAction ? "max-w-[calc(100%-9rem)]" : "max-w-[calc(100%-1.5rem)]"}`
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ jsx(SectionBody, {
|
|
250
|
+
hasSidebar: navigation.hasSidebar,
|
|
251
|
+
isNavigationCollapsed: navigation.isNavigationCollapsed,
|
|
252
|
+
sidebarId: navigation.sidebarId,
|
|
253
|
+
sidebar,
|
|
254
|
+
filter,
|
|
255
|
+
selectedFilters: preferences.selectedFilters,
|
|
256
|
+
setSelectedFilters: preferences.setSelectedFilters,
|
|
257
|
+
panelId,
|
|
258
|
+
selectedTab,
|
|
259
|
+
children
|
|
260
|
+
})
|
|
261
|
+
] }), /* @__PURE__ */ jsx(SectionDrawer, {
|
|
277
262
|
title,
|
|
278
263
|
navigation,
|
|
279
264
|
children: sidebar
|
|
@@ -3,7 +3,7 @@ import { getSelectedMenuKey } from "../../navigation.js";
|
|
|
3
3
|
import { useSectionSidebarState } from "./sidebar-state.js";
|
|
4
4
|
import { Link } from "@tanstack/react-router";
|
|
5
5
|
import { useId } from "react";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { AltArrowDown } from "@vezham/icons-react";
|
|
8
8
|
//#region src/lib/layouts/section/sidebar.tsx
|
|
9
9
|
var getEntryAppearance = (pathname, item) => {
|
|
@@ -15,7 +15,7 @@ var getEntryAppearance = (pathname, item) => {
|
|
|
15
15
|
href: item.href ?? item.children?.[0]?.href ?? "/"
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
var SidebarEntryLabel = ({ item }) => /* @__PURE__ */ jsxs(Fragment, { children: [item.icon && /* @__PURE__ */ jsx(AppIcon, {
|
|
18
|
+
var SidebarEntryLabel = ({ item }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [item.icon && /* @__PURE__ */ jsx(AppIcon, {
|
|
19
19
|
icon: item.icon,
|
|
20
20
|
size: 18,
|
|
21
21
|
className: "shrink-0",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AppNavigationItem } from '../../navigation';
|
|
2
|
+
type Props = {
|
|
3
|
+
title: string;
|
|
4
|
+
tabs: AppNavigationItem[];
|
|
5
|
+
selectedTabKey?: string;
|
|
6
|
+
onPanelIdChange?: (id: string) => void;
|
|
7
|
+
onTabChange?: (key: string) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const SectionTabNavigation: ({ title, tabs, selectedTabKey, onPanelIdChange, onTabChange, className }: Props) => import("react").JSX.Element | null;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=tab-navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-navigation.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/section/tab-navigation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,iBAAiB,EAAE,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,0EAOlC,KAAK,uCAqCP,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { Tabs } from "@vezham/react-v3";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/lib/layouts/section/tab-navigation.tsx
|
|
5
|
+
var SectionTabNavigation = ({ title, tabs, selectedTabKey, onPanelIdChange, onTabChange, className }) => {
|
|
6
|
+
const handleSelectedTabRef = useCallback((element) => {
|
|
7
|
+
const panelId = element?.getAttribute("aria-controls");
|
|
8
|
+
if (panelId) onPanelIdChange?.(panelId);
|
|
9
|
+
}, [onPanelIdChange]);
|
|
10
|
+
if (tabs.length === 0) return null;
|
|
11
|
+
return /* @__PURE__ */ jsx(Tabs, {
|
|
12
|
+
selectedKey: selectedTabKey,
|
|
13
|
+
className: "contents",
|
|
14
|
+
variant: "primary",
|
|
15
|
+
onSelectionChange: (key) => onTabChange?.(String(key)),
|
|
16
|
+
children: /* @__PURE__ */ jsx(Tabs.ListContainer, {
|
|
17
|
+
className: `max-w-full ${className ?? ""}`,
|
|
18
|
+
children: /* @__PURE__ */ jsx(Tabs.List, {
|
|
19
|
+
"aria-label": `${title} tabs`,
|
|
20
|
+
className: "min-w-max flex-nowrap",
|
|
21
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs(Tabs.Tab, {
|
|
22
|
+
id: tab.key,
|
|
23
|
+
ref: tab.key === selectedTabKey ? handleSelectedTabRef : void 0,
|
|
24
|
+
className: "whitespace-nowrap",
|
|
25
|
+
children: [tab.title, /* @__PURE__ */ jsx(Tabs.Indicator, {})]
|
|
26
|
+
}, tab.key))
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { SectionTabNavigation };
|
|
@@ -3,7 +3,7 @@ import { MenuSheet } from "../../components/menu/sheet.js";
|
|
|
3
3
|
import { sortDirections, sortFields } from "./sort-menu.js";
|
|
4
4
|
import { createContext, useContext, useMemo, useState } from "react";
|
|
5
5
|
import { Button, Label, Separator } from "@vezham/react-v3";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { AltArrowLeft, AltArrowRight, CheckCircle, MenuDots, SortFromBottomToTop, SortFromTopToBottom } from "@vezham/icons-react";
|
|
8
8
|
//#region src/lib/layouts/section/toolbar-more-sheet.tsx
|
|
9
9
|
var MobileToolbarNavigationContext = createContext(null);
|
|
@@ -48,7 +48,7 @@ var SheetFilters = ({ filterGroups, selectedFilters, onToggleFilter }) => {
|
|
|
48
48
|
]
|
|
49
49
|
}, group.label));
|
|
50
50
|
};
|
|
51
|
-
var SheetSort = ({ sortValue, onSortChange }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
51
|
+
var SheetSort = ({ sortValue, onSortChange }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
52
52
|
/* @__PURE__ */ jsx(Label, {
|
|
53
53
|
className: "text-muted px-3 pt-2",
|
|
54
54
|
children: "Sort by"
|
|
@@ -107,7 +107,7 @@ var SheetHome = ({ sync, onSync, filterAction, sort, sortValue, viewModeActions,
|
|
|
107
107
|
menuActions,
|
|
108
108
|
mobileToolbar
|
|
109
109
|
});
|
|
110
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
110
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
111
111
|
mobileToolbar,
|
|
112
112
|
separators.afterMobile && /* @__PURE__ */ jsx(Separator, { className: "my-1" }),
|
|
113
113
|
sync && renderActions([{
|
|
@@ -30,6 +30,9 @@ type ToolbarSearch = SectionSearch & {
|
|
|
30
30
|
type Props = {
|
|
31
31
|
title: string;
|
|
32
32
|
tabs: AppNavigationItem[];
|
|
33
|
+
selectedTabKey?: string;
|
|
34
|
+
onPanelIdChange?: (id: string) => void;
|
|
35
|
+
onTabChange?: (key: string) => void;
|
|
33
36
|
navigationControls: ReactNode;
|
|
34
37
|
isNavigationCollapsed?: boolean;
|
|
35
38
|
toolbar?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/section/toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../../src/lib/layouts/section/toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EAKf,MAAM,OAAO,CAAA;AAoBd,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAgB,KAAK,WAAW,EAAY,MAAM,aAAa,CAAA;AAItE,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,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/B,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,WAAW,EAAE,aAAa,EAAE,CAAA;IAC5B,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,WAAW,CAAA;IACvB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;IAC3C,IAAI,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC1B,eAAe,EAAE,gBAAgB,EAAE,CAAA;IACnC,uBAAuB,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAA;IAC9D,QAAQ,EAAE,eAAe,CAAA;IACzB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAA;IACrD,UAAU,EAAE,OAAO,CAAA;IACnB,gBAAgB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;CAC5C,CAAA;AA2GD,QAAA,MAAM,oBAAoB,GAAI,8CAG3B;IACD,eAAe,EAAE,gBAAgB,EAAE,CAAA;IACnC,uBAAuB,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAA;CAC/D,uCA8BA,CAAA;AA+WD,QAAA,MAAM,cAAc,GAAI,OAAO,KAAK,gCAsInC,CAAA;AAED,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -3,10 +3,11 @@ import "../../components/panel/responsive.js";
|
|
|
3
3
|
import { useResponsiveToolbarAction } from "../../components/responsive-toolbar-action/index.js";
|
|
4
4
|
import { ShortcutButton } from "../../components/shortcut-key/index.js";
|
|
5
5
|
import { DEFAULT_SORT, SortMenu } from "./sort-menu.js";
|
|
6
|
+
import { SectionTabNavigation } from "./tab-navigation.js";
|
|
6
7
|
import { ToolbarMoreSheet } from "./toolbar-more-sheet.js";
|
|
7
8
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
8
|
-
import { Button, Chip, CloseButton, Dropdown, Label, Popover, SearchField, Separator,
|
|
9
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Button, Chip, CloseButton, Dropdown, Label, Popover, SearchField, Separator, Tooltip, useMediaQuery } from "@vezham/react-v3";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { SortFromBottomToTop, SortFromTopToBottom } from "@vezham/icons-react";
|
|
11
12
|
//#region src/lib/layouts/section/toolbar.tsx
|
|
12
13
|
var iconButtonClassName = "h-9 w-9 min-w-9 p-0";
|
|
@@ -241,7 +242,7 @@ var SectionSearchField = ({ search }) => {
|
|
|
241
242
|
/* @__PURE__ */ jsx(SearchField.ClearButton, { "aria-label": `Clear ${label.toLowerCase()}` })
|
|
242
243
|
] })
|
|
243
244
|
});
|
|
244
|
-
if (search.onSearch) return /* @__PURE__ */ jsxs(Fragment, { children: [input(true), /* @__PURE__ */ jsxs(Tooltip, {
|
|
245
|
+
if (search.onSearch) return /* @__PURE__ */ jsxs(Fragment$1, { children: [input(true), /* @__PURE__ */ jsxs(Tooltip, {
|
|
245
246
|
delay: 0,
|
|
246
247
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
247
248
|
isIconOnly: true,
|
|
@@ -257,7 +258,7 @@ var SectionSearchField = ({ search }) => {
|
|
|
257
258
|
})
|
|
258
259
|
}), /* @__PURE__ */ jsx(Tooltip.Content, { children: "Search" })]
|
|
259
260
|
})] });
|
|
260
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [input(true), /* @__PURE__ */ jsxs(Popover, {
|
|
261
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [input(true), /* @__PURE__ */ jsxs(Popover, {
|
|
261
262
|
isOpen: search.isOpen,
|
|
262
263
|
onOpenChange: search.onOpenChange,
|
|
263
264
|
children: [/* @__PURE__ */ jsxs(Tooltip, {
|
|
@@ -352,7 +353,7 @@ var ToolbarActions = ({ search, toolbar, sync = true, onSync, filterAction, hasF
|
|
|
352
353
|
onChange: onSortChange
|
|
353
354
|
})
|
|
354
355
|
})] }),
|
|
355
|
-
viewModeActions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [(filterAction || sort) && /* @__PURE__ */ jsx(Separator, {
|
|
356
|
+
viewModeActions.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [(filterAction || sort) && /* @__PURE__ */ jsx(Separator, {
|
|
356
357
|
orientation: "vertical",
|
|
357
358
|
className: "h-8"
|
|
358
359
|
}), /* @__PURE__ */ jsx("div", {
|
|
@@ -476,18 +477,14 @@ var SectionToolbar = (props) => {
|
|
|
476
477
|
children: [/* @__PURE__ */ jsx("div", {
|
|
477
478
|
className: "col-start-1 row-start-1 hidden min-w-0 items-center gap-1 md:flex",
|
|
478
479
|
children: navigationControls
|
|
479
|
-
}),
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
children: [tab.title, /* @__PURE__ */ jsx(Tabs.Indicator, {})]
|
|
488
|
-
}, tab.key))
|
|
489
|
-
})
|
|
490
|
-
}, JSON.stringify(tabs.map((tab) => tab.key)))]
|
|
480
|
+
}), /* @__PURE__ */ jsx(SectionTabNavigation, {
|
|
481
|
+
title,
|
|
482
|
+
tabs,
|
|
483
|
+
selectedTabKey: props.selectedTabKey,
|
|
484
|
+
onPanelIdChange: props.onPanelIdChange,
|
|
485
|
+
onTabChange: props.onTabChange,
|
|
486
|
+
className: "col-span-2 row-start-2 mt-2 w-fit max-w-full min-w-0 justify-self-center sm:mt-0 sm:max-w-fit sm:flex-1"
|
|
487
|
+
})]
|
|
491
488
|
}), /* @__PURE__ */ jsx(ToolbarActions, {
|
|
492
489
|
...props,
|
|
493
490
|
isMobile,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/settings/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/settings/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAA;AAa7F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AA6BnD,eAAO,MAAM,cAAc,GACzB,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B;IAAE,OAAO,EAAE,eAAe,CAAA;CAI3B,CAAA;AAEF,eAAO,MAAM,aAAa,GAAI,mBAE3B;IACD,aAAa,CAAC,EAAE,mBAAmB,CAAA;CACpC,gCAcA,CAAA;AAoID,eAAO,MAAM,YAAY,GAAI,qDAK1B;IACD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAA;IACpD,aAAa,CAAC,EAAE,mBAAmB,CAAA;CACpC,gCA8JA,CAAA;AAED,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA"}
|