@appcorp/app-corp-vista 0.0.18 → 0.0.20
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/atoms/vista-dashboard-notification-v1/vista-dashboard-notification-v1.js +1 -1
- package/atoms/vista-vertical-divider-v1/vista-vertical-divider-v1.js +1 -1
- package/molecules/vista-dashboard-profile-v1/vista-dashboard-profile-v1.js +4 -4
- package/molecules/vista-dashboard-sidebar-v1/vista-dashboard-sidebar-v1.js +18 -16
- package/molecules/vista-dashboard-topbar-v1/vista-dashboard-topbar-v1.js +7 -8
- package/package.json +1 -1
- package/type/vista-dashboard-sidebar-type.d.ts +1 -6
|
@@ -8,7 +8,7 @@ exports.VistaDashboardNotificationV1 = void 0;
|
|
|
8
8
|
var react_1 = __importDefault(require("react"));
|
|
9
9
|
var outline_1 = require("@heroicons/react/24/outline");
|
|
10
10
|
var VistaDashboardNotificationV1 = function () {
|
|
11
|
-
return (react_1.default.createElement("button", { type: "button", className: "-m-2.5 p-2.5 text-gray-
|
|
11
|
+
return (react_1.default.createElement("button", { type: "button", className: "-m-2.5 p-2.5 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300" },
|
|
12
12
|
react_1.default.createElement("span", { className: "sr-only" }, "View notifications"),
|
|
13
13
|
react_1.default.createElement(outline_1.BellIcon, { "aria-hidden": "true", className: "size-6" })));
|
|
14
14
|
};
|
|
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.VistaVerticalDividerV1 = void 0;
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var VistaVerticalDividerV1 = function () {
|
|
9
|
-
return (react_1.default.createElement("div", { "aria-hidden": "true", className: "hidden h-6 w-px bg-gray-
|
|
9
|
+
return (react_1.default.createElement("div", { "aria-hidden": "true", className: "hidden h-6 w-px bg-gray-500 lg:flex" }));
|
|
10
10
|
};
|
|
11
11
|
exports.VistaVerticalDividerV1 = VistaVerticalDividerV1;
|
|
@@ -17,12 +17,12 @@ var VistaDashboardProfileV1 = function (_a) {
|
|
|
17
17
|
react_1.default.createElement(vista_avatar_v1_1.VistaAvatarV1, { alt: avatarAlt, initial: avatarInitials, rounded: vista_avatar_type_1.VISTA_AVATAR_ROUNDED.FULL, size: vista_avatar_type_1.VISTA_AVATAR_SIZE.SM, src: avatarUrl }),
|
|
18
18
|
react_1.default.createElement("span", { className: "sr-only" }, "Open user menu"),
|
|
19
19
|
react_1.default.createElement("span", { className: "hidden lg:flex lg:items-center" },
|
|
20
|
-
react_1.default.createElement("span", { "aria-hidden": "true", className: "ml-4 text-sm/6 font-semibold text-gray-
|
|
21
|
-
react_1.default.createElement(solid_1.ChevronDownIcon, { "aria-hidden": "true", className: "ml-2 size-5 text-gray-
|
|
22
|
-
react_1.default.createElement(react_2.MenuItems, { transition: true, className: "absolute right-0 z-10 mt-2.5 w-32 origin-top-right rounded-md bg-white py-2 shadow-lg ring-1 ring-gray-900/5 transition focus:outline-none data-[closed]:scale-95 data-[closed]:transform data-[closed]:opacity-0 data-[enter]:duration-100 data-[leave]:duration-75 data-[enter]:ease-out data-[leave]:ease-in" }, profileMenuItems.map(function (_a) {
|
|
20
|
+
react_1.default.createElement("span", { "aria-hidden": "true", className: "ml-4 text-sm/6 font-semibold text-gray-500 hover:text-gray-700 dark:hover:text-gray-300" }, name),
|
|
21
|
+
react_1.default.createElement(solid_1.ChevronDownIcon, { "aria-hidden": "true", className: "ml-2 size-5 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300" }))),
|
|
22
|
+
react_1.default.createElement(react_2.MenuItems, { transition: true, className: "absolute right-0 z-10 mt-2.5 w-32 origin-top-right rounded-md bg-white dark:bg-gray-800 py-2 shadow-lg ring-1 ring-gray-900/5 transition focus:outline-none data-[closed]:scale-95 data-[closed]:transform data-[closed]:opacity-0 data-[enter]:duration-100 data-[leave]:duration-75 data-[enter]:ease-out data-[leave]:ease-in" }, profileMenuItems.map(function (_a) {
|
|
23
23
|
var name = _a.name, handleOnClick = _a.handleOnClick;
|
|
24
24
|
return (react_1.default.createElement(react_2.MenuItem, { key: name },
|
|
25
|
-
react_1.default.createElement("button", { onClick: handleOnClick, className: "block px-3 py-1 text-sm/6 text-gray-900 data-[focus]:bg-gray-50 data-[focus]:outline-none" }, name)));
|
|
25
|
+
react_1.default.createElement("button", { onClick: handleOnClick, className: "block px-3 py-1 text-sm/6 text-gray-900 dark:text-white text-left data-[focus]:bg-gray-50 data-[focus]:outline-none w-full" }, name)));
|
|
26
26
|
}))));
|
|
27
27
|
};
|
|
28
28
|
exports.VistaDashboardProfileV1 = VistaDashboardProfileV1;
|
|
@@ -38,8 +38,14 @@ exports.VistaDashboardSidebarV1 = void 0;
|
|
|
38
38
|
var react_1 = __importStar(require("react"));
|
|
39
39
|
var class_names_1 = require("../../utils/class-names");
|
|
40
40
|
var VistaDashboardSidebarV1 = function (_a) {
|
|
41
|
-
var appName = _a.appName, apps = _a.apps, logo = _a.logo, navigation = _a.navigation
|
|
42
|
-
|
|
41
|
+
var appName = _a.appName, apps = _a.apps, logo = _a.logo, navigation = _a.navigation;
|
|
42
|
+
var filteredApps = (0, react_1.useMemo)(function () {
|
|
43
|
+
return apps.filter(function (_a) {
|
|
44
|
+
var enabled = _a.enabled;
|
|
45
|
+
return enabled;
|
|
46
|
+
});
|
|
47
|
+
}, [apps]);
|
|
48
|
+
return (react_1.default.createElement("div", { className: "flex grow flex-col gap-y-5 overflow-y-auto bg-gray-100 dark:bg-gray-900 px-6 ring-1 ring-white/10" },
|
|
43
49
|
react_1.default.createElement("div", { className: "flex h-16 shrink-0 items-center" },
|
|
44
50
|
react_1.default.createElement("img", { alt: appName, src: logo, className: "h-8 w-auto" })),
|
|
45
51
|
react_1.default.createElement("nav", { className: "flex flex-1 flex-col" },
|
|
@@ -52,33 +58,29 @@ var VistaDashboardSidebarV1 = function (_a) {
|
|
|
52
58
|
})
|
|
53
59
|
.map(function (item) { return (react_1.default.createElement("li", { key: item.label },
|
|
54
60
|
react_1.default.createElement("button", { onClick: item.handleOnClick, className: (0, class_names_1.classNames)(item.isActive
|
|
55
|
-
? 'bg-gray-
|
|
56
|
-
: 'text-gray-
|
|
61
|
+
? 'text-gray-700 bg-gray-300 dark:bg-gray-700 dark:text-white'
|
|
62
|
+
: 'text-gray-700 hover:bg-gray-300 dark:text-gray-400 dark:hover:bg-gray-800', 'group flex w-full gap-x-3 rounded-md p-2 text-sm/6 font-semibold') },
|
|
57
63
|
(0, react_1.createElement)(item.icon, {
|
|
58
64
|
'aria-hidden': 'true',
|
|
59
65
|
className: 'size-6 shrink-0',
|
|
60
66
|
}),
|
|
61
67
|
item.label))); }))),
|
|
62
68
|
react_1.default.createElement("li", null,
|
|
63
|
-
react_1.default.createElement("div", { className: "text-xs/6 font-semibold text-gray-400" }, "Your Apps"),
|
|
64
|
-
react_1.default.createElement("ul", { role: "list", className: "-mx-2 mt-2 space-y-1" },
|
|
65
|
-
.filter(function (_a) {
|
|
66
|
-
var enabled = _a.enabled;
|
|
67
|
-
return enabled;
|
|
68
|
-
})
|
|
69
|
+
filteredApps.length > 1 && (react_1.default.createElement("div", { className: "text-xs/6 font-semibold text-gray-400" }, "Your Apps")),
|
|
70
|
+
react_1.default.createElement("ul", { role: "list", className: "-mx-2 mt-2 space-y-1" }, filteredApps
|
|
69
71
|
.map(function (_a) {
|
|
70
72
|
var initial = _a.initial, isActive = _a.isActive, label = _a.label;
|
|
71
73
|
return (react_1.default.createElement("li", { key: label },
|
|
72
74
|
react_1.default.createElement("a", { href: "", className: (0, class_names_1.classNames)(isActive
|
|
73
|
-
? 'bg-gray-
|
|
74
|
-
: 'text-gray-
|
|
75
|
+
? 'text-gray-700 bg-gray-300 dark:bg-gray-700 dark:text-white'
|
|
76
|
+
: 'text-gray-700 hover:bg-gray-300 dark:text-gray-400 dark:hover:bg-gray-800', 'group flex gap-x-3 rounded-md p-2 text-sm/6 font-semibold') },
|
|
75
77
|
react_1.default.createElement("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-lg border border-gray-700 bg-gray-800 text-[0.625rem] font-medium text-gray-400 group-hover:text-white" }, initial),
|
|
76
78
|
react_1.default.createElement("span", { className: "truncate" }, label))));
|
|
77
79
|
}))),
|
|
78
80
|
react_1.default.createElement("li", { className: "-mx-6 mt-auto" },
|
|
79
|
-
react_1.default.createElement("
|
|
80
|
-
react_1.default.createElement("
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
react_1.default.createElement("div", { className: 'flex justify-center items-center text-gray-900 dark:text-white w-full p-4 text-xs ' },
|
|
82
|
+
react_1.default.createElement("p", null,
|
|
83
|
+
"by our Tech Partners",
|
|
84
|
+
react_1.default.createElement("a", { href: 'https://appcorp.org', target: '_blank', className: 'hover:text-primary' }, " App Corp \uD83D\uDE80"))))))));
|
|
83
85
|
};
|
|
84
86
|
exports.VistaDashboardSidebarV1 = VistaDashboardSidebarV1;
|
|
@@ -14,20 +14,19 @@ var vista_dashboard_topbar_type_1 = require("../../type/vista-dashboard-topbar-t
|
|
|
14
14
|
var solid_2 = require("@heroicons/react/24/solid");
|
|
15
15
|
var VistaDashboardTopBarV1 = function (_a) {
|
|
16
16
|
var avatarAlt = _a.avatarAlt, avatarInitials = _a.avatarInitials, avatarUrl = _a.avatarUrl, handleOnClick = _a.handleOnClick, handleTheme = _a.handleTheme, name = _a.name, profileMenuItems = _a.profileMenuItems, _b = _a.theme, theme = _b === void 0 ? vista_dashboard_topbar_type_1.VISTA_THEME.LIGHT : _b;
|
|
17
|
-
return (react_1.default.createElement("div", { className: "sticky top-0 z-10 flex h-16 shrink-0 items-center gap-x-6 border-b border-
|
|
17
|
+
return (react_1.default.createElement("div", { className: "sticky top-0 z-10 flex h-16 shrink-0 items-center gap-x-6 border-b border-black/10 bg-gray-100 dark:bg-gray-900 px-4 shadow-sm sm:px-6 lg:px-8" },
|
|
18
18
|
react_1.default.createElement("button", { type: "button", onClick: function () { return handleOnClick(true); }, className: "-m-2.5 p-2.5 text-white xl:hidden" },
|
|
19
19
|
react_1.default.createElement("span", { className: "sr-only" }, "Open sidebar"),
|
|
20
20
|
react_1.default.createElement(solid_1.Bars3Icon, { "aria-hidden": "true", className: "size-5" })),
|
|
21
21
|
react_1.default.createElement("div", { className: "flex flex-1 gap-x-4 self-stretch lg:gap-x-6" },
|
|
22
|
-
react_1.default.createElement("
|
|
23
|
-
|
|
24
|
-
react_1.default.createElement("
|
|
25
|
-
|
|
26
|
-
react_1.default.createElement("input", { id: "search-field", name: "search", type: "search", placeholder: "Search...", className: "block size-full border-0 bg-transparent py-0 pl-8 pr-0 text-white focus:ring-0 sm:text-sm" })))),
|
|
22
|
+
react_1.default.createElement("label", { htmlFor: "search-field", className: "sr-only" }, "Search"),
|
|
23
|
+
react_1.default.createElement("div", { className: "relative w-full" },
|
|
24
|
+
react_1.default.createElement(solid_1.MagnifyingGlassIcon, { "aria-hidden": "true", className: "pointer-events-none absolute inset-y-0 left-0 h-full w-5 text-gray-500" }),
|
|
25
|
+
react_1.default.createElement("input", { id: "search-field", name: "search", type: "search", placeholder: "Search...", className: "block size-full border-0 bg-transparent py-0 pl-8 pr-0 text-white focus:ring-0 sm:text-sm" }))),
|
|
27
26
|
react_1.default.createElement(vista_vertical_divider_v1_1.VistaVerticalDividerV1, null),
|
|
28
27
|
theme === vista_dashboard_topbar_type_1.VISTA_THEME.LIGHT ? (react_1.default.createElement("button", { onClick: handleTheme },
|
|
29
|
-
react_1.default.createElement(solid_2.SunIcon, { className: 'size-5 text-gray-
|
|
30
|
-
react_1.default.createElement(solid_2.MoonIcon, { className: 'size-5 text-gray-
|
|
28
|
+
react_1.default.createElement(solid_2.SunIcon, { className: 'size-5 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300' }))) : (react_1.default.createElement("button", { onClick: handleTheme },
|
|
29
|
+
react_1.default.createElement(solid_2.MoonIcon, { className: 'size-5 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300' }))),
|
|
31
30
|
react_1.default.createElement(vista_vertical_divider_v1_1.VistaVerticalDividerV1, null),
|
|
32
31
|
react_1.default.createElement(vista_dashboard_notification_v1_1.VistaDashboardNotificationV1, null),
|
|
33
32
|
react_1.default.createElement(vista_vertical_divider_v1_1.VistaVerticalDividerV1, null),
|
package/package.json
CHANGED
|
@@ -20,14 +20,9 @@ export interface VistaDashboardSideBarAppItemVariant1Props {
|
|
|
20
20
|
label: string;
|
|
21
21
|
order: number;
|
|
22
22
|
}
|
|
23
|
-
export interface VistaDashboardSideBarProfileVariant1Props {
|
|
24
|
-
avatar: string;
|
|
25
|
-
name: string;
|
|
26
|
-
}
|
|
27
23
|
export interface VistaDashboardSideBarV1Props {
|
|
28
24
|
appName: string;
|
|
25
|
+
apps: VistaDashboardSideBarAppItemVariant1Props[];
|
|
29
26
|
logo: string;
|
|
30
27
|
navigation: VistaDashboardSideBarNavigationItemVariant1Props[];
|
|
31
|
-
apps: VistaDashboardSideBarAppItemVariant1Props[];
|
|
32
|
-
profile: VistaDashboardSideBarProfileVariant1Props;
|
|
33
28
|
}
|