@scripso-homepad/ui 0.4.35 → 0.4.36
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/web/index.cjs +59 -1
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +17 -1
- package/dist/web/index.d.ts +17 -1
- package/dist/web/index.js +59 -3
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/src/web/icons/SidebarCollapseIcon.tsx +32 -0
- package/src/web/icons/SidebarExpandIcon.tsx +32 -0
- package/src/web/index.ts +2 -0
- package/src/web/layout/Sidebar.tsx +5 -3
package/dist/web/index.d.cts
CHANGED
|
@@ -169,6 +169,22 @@ type BuildingIconProps = {
|
|
|
169
169
|
};
|
|
170
170
|
declare function BuildingIcon({ className }: BuildingIconProps): react.JSX.Element;
|
|
171
171
|
|
|
172
|
+
type SidebarCollapseIconProps = {
|
|
173
|
+
className?: string;
|
|
174
|
+
size?: number | string;
|
|
175
|
+
strokeWidth?: number | string;
|
|
176
|
+
};
|
|
177
|
+
/** Shown when the sidebar is open — click collapses it. */
|
|
178
|
+
declare function SidebarCollapseIcon({ className, size, strokeWidth, }: SidebarCollapseIconProps): react.JSX.Element;
|
|
179
|
+
|
|
180
|
+
type SidebarExpandIconProps = {
|
|
181
|
+
className?: string;
|
|
182
|
+
size?: number | string;
|
|
183
|
+
strokeWidth?: number | string;
|
|
184
|
+
};
|
|
185
|
+
/** Shown when the sidebar is closed — click expands it. */
|
|
186
|
+
declare function SidebarExpandIcon({ className, size, strokeWidth, }: SidebarExpandIconProps): react.JSX.Element;
|
|
187
|
+
|
|
172
188
|
type TableMoreIconProps = {
|
|
173
189
|
className?: string;
|
|
174
190
|
};
|
|
@@ -533,4 +549,4 @@ declare function useOnClickOutside<T extends HTMLElement>(ref: OutsideTarget<T>,
|
|
|
533
549
|
|
|
534
550
|
declare function cn(...inputs: ClassValue[]): string;
|
|
535
551
|
|
|
536
|
-
export { type AdminBuildingOption, type AdminHeaderLabels, type AdminLayoutLabels, type AdminNavItem, type AdminSidebarBranding, type AdminSidebarLabels, type AdminSidebarUser, AppHeader, type AppHeaderProps, Badge, type BadgeProps, type BadgeVariant, BellIcon, BuildingIcon, BuildingSelect, type BuildingSelectProps, ConfirmModal, type ConfirmModalProps, DEFAULT_TABLE_BODY_MIN_HEIGHT, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableClassNames, type DataTableProps, Drawer, type DrawerProps, HistoryTimeline, type HistoryTimelineItem, type HistoryTimelineProps, type HomepadToasterProps, Modal, type ModalFooterAlign, type ModalFooterLayout, type ModalProps, type MutationToastMessages, type MutationToastResult, Pagination, type PaginationLabels, type PaginationProps, type PaginationVariant, type RunMutationWithToastOptions, Sidebar, SidebarMobileHeader, type SidebarMobileHeaderProps, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarUserCard, type SidebarUserCardProps, StatusBadge, type StatusBadgeProps, type StatusBadgeTone, Table, TableActionButton, type TableActionButtonProps, type TableActionButtonVariant, TableActionsCell, type TableActionsCellProps, TableActionsMenu, type TableActionsMenuItem, type TableActionsMenuItemTone, type TableActionsMenuProps, TableBody, type TableBodyProps, TableCell, type TableCellProps, type TableCellVariant, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TableIconText, type TableIconTextProps, TableMenuActivateIcon, TableMenuCheckIcon, TableMenuCloseIcon, TableMenuEditIcon, TableMenuInfoIcon, TableMenuRefreshIcon, TableMenuSuspendIcon, TableMenuTrashIcon, TableMoreIcon, type TableProps, TableRow, type TableRowActionsConfig, type TableRowProps, TableRowStatusActions, type TableRowStatusActionsProps, TableScrollArea, type TableScrollAreaProps, type TableSortDirection, TableSortIcon, TableStatusActionsCell, type TableStatusActionsCellProps, Toaster, ToasterProvider, cn, getPaginationRange, getTotalPages, getVisiblePageNumbers, isNavItemActive, runMutationWithToast, tableRowDisabledCellClassName, useMediaQuery, useOnClickOutside };
|
|
552
|
+
export { type AdminBuildingOption, type AdminHeaderLabels, type AdminLayoutLabels, type AdminNavItem, type AdminSidebarBranding, type AdminSidebarLabels, type AdminSidebarUser, AppHeader, type AppHeaderProps, Badge, type BadgeProps, type BadgeVariant, BellIcon, BuildingIcon, BuildingSelect, type BuildingSelectProps, ConfirmModal, type ConfirmModalProps, DEFAULT_TABLE_BODY_MIN_HEIGHT, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableClassNames, type DataTableProps, Drawer, type DrawerProps, HistoryTimeline, type HistoryTimelineItem, type HistoryTimelineProps, type HomepadToasterProps, Modal, type ModalFooterAlign, type ModalFooterLayout, type ModalProps, type MutationToastMessages, type MutationToastResult, Pagination, type PaginationLabels, type PaginationProps, type PaginationVariant, type RunMutationWithToastOptions, Sidebar, SidebarCollapseIcon, SidebarExpandIcon, SidebarMobileHeader, type SidebarMobileHeaderProps, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarUserCard, type SidebarUserCardProps, StatusBadge, type StatusBadgeProps, type StatusBadgeTone, Table, TableActionButton, type TableActionButtonProps, type TableActionButtonVariant, TableActionsCell, type TableActionsCellProps, TableActionsMenu, type TableActionsMenuItem, type TableActionsMenuItemTone, type TableActionsMenuProps, TableBody, type TableBodyProps, TableCell, type TableCellProps, type TableCellVariant, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TableIconText, type TableIconTextProps, TableMenuActivateIcon, TableMenuCheckIcon, TableMenuCloseIcon, TableMenuEditIcon, TableMenuInfoIcon, TableMenuRefreshIcon, TableMenuSuspendIcon, TableMenuTrashIcon, TableMoreIcon, type TableProps, TableRow, type TableRowActionsConfig, type TableRowProps, TableRowStatusActions, type TableRowStatusActionsProps, TableScrollArea, type TableScrollAreaProps, type TableSortDirection, TableSortIcon, TableStatusActionsCell, type TableStatusActionsCellProps, Toaster, ToasterProvider, cn, getPaginationRange, getTotalPages, getVisiblePageNumbers, isNavItemActive, runMutationWithToast, tableRowDisabledCellClassName, useMediaQuery, useOnClickOutside };
|
package/dist/web/index.d.ts
CHANGED
|
@@ -169,6 +169,22 @@ type BuildingIconProps = {
|
|
|
169
169
|
};
|
|
170
170
|
declare function BuildingIcon({ className }: BuildingIconProps): react.JSX.Element;
|
|
171
171
|
|
|
172
|
+
type SidebarCollapseIconProps = {
|
|
173
|
+
className?: string;
|
|
174
|
+
size?: number | string;
|
|
175
|
+
strokeWidth?: number | string;
|
|
176
|
+
};
|
|
177
|
+
/** Shown when the sidebar is open — click collapses it. */
|
|
178
|
+
declare function SidebarCollapseIcon({ className, size, strokeWidth, }: SidebarCollapseIconProps): react.JSX.Element;
|
|
179
|
+
|
|
180
|
+
type SidebarExpandIconProps = {
|
|
181
|
+
className?: string;
|
|
182
|
+
size?: number | string;
|
|
183
|
+
strokeWidth?: number | string;
|
|
184
|
+
};
|
|
185
|
+
/** Shown when the sidebar is closed — click expands it. */
|
|
186
|
+
declare function SidebarExpandIcon({ className, size, strokeWidth, }: SidebarExpandIconProps): react.JSX.Element;
|
|
187
|
+
|
|
172
188
|
type TableMoreIconProps = {
|
|
173
189
|
className?: string;
|
|
174
190
|
};
|
|
@@ -533,4 +549,4 @@ declare function useOnClickOutside<T extends HTMLElement>(ref: OutsideTarget<T>,
|
|
|
533
549
|
|
|
534
550
|
declare function cn(...inputs: ClassValue[]): string;
|
|
535
551
|
|
|
536
|
-
export { type AdminBuildingOption, type AdminHeaderLabels, type AdminLayoutLabels, type AdminNavItem, type AdminSidebarBranding, type AdminSidebarLabels, type AdminSidebarUser, AppHeader, type AppHeaderProps, Badge, type BadgeProps, type BadgeVariant, BellIcon, BuildingIcon, BuildingSelect, type BuildingSelectProps, ConfirmModal, type ConfirmModalProps, DEFAULT_TABLE_BODY_MIN_HEIGHT, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableClassNames, type DataTableProps, Drawer, type DrawerProps, HistoryTimeline, type HistoryTimelineItem, type HistoryTimelineProps, type HomepadToasterProps, Modal, type ModalFooterAlign, type ModalFooterLayout, type ModalProps, type MutationToastMessages, type MutationToastResult, Pagination, type PaginationLabels, type PaginationProps, type PaginationVariant, type RunMutationWithToastOptions, Sidebar, SidebarMobileHeader, type SidebarMobileHeaderProps, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarUserCard, type SidebarUserCardProps, StatusBadge, type StatusBadgeProps, type StatusBadgeTone, Table, TableActionButton, type TableActionButtonProps, type TableActionButtonVariant, TableActionsCell, type TableActionsCellProps, TableActionsMenu, type TableActionsMenuItem, type TableActionsMenuItemTone, type TableActionsMenuProps, TableBody, type TableBodyProps, TableCell, type TableCellProps, type TableCellVariant, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TableIconText, type TableIconTextProps, TableMenuActivateIcon, TableMenuCheckIcon, TableMenuCloseIcon, TableMenuEditIcon, TableMenuInfoIcon, TableMenuRefreshIcon, TableMenuSuspendIcon, TableMenuTrashIcon, TableMoreIcon, type TableProps, TableRow, type TableRowActionsConfig, type TableRowProps, TableRowStatusActions, type TableRowStatusActionsProps, TableScrollArea, type TableScrollAreaProps, type TableSortDirection, TableSortIcon, TableStatusActionsCell, type TableStatusActionsCellProps, Toaster, ToasterProvider, cn, getPaginationRange, getTotalPages, getVisiblePageNumbers, isNavItemActive, runMutationWithToast, tableRowDisabledCellClassName, useMediaQuery, useOnClickOutside };
|
|
552
|
+
export { type AdminBuildingOption, type AdminHeaderLabels, type AdminLayoutLabels, type AdminNavItem, type AdminSidebarBranding, type AdminSidebarLabels, type AdminSidebarUser, AppHeader, type AppHeaderProps, Badge, type BadgeProps, type BadgeVariant, BellIcon, BuildingIcon, BuildingSelect, type BuildingSelectProps, ConfirmModal, type ConfirmModalProps, DEFAULT_TABLE_BODY_MIN_HEIGHT, DashboardLayout, type DashboardLayoutProps, DataTable, type DataTableClassNames, type DataTableProps, Drawer, type DrawerProps, HistoryTimeline, type HistoryTimelineItem, type HistoryTimelineProps, type HomepadToasterProps, Modal, type ModalFooterAlign, type ModalFooterLayout, type ModalProps, type MutationToastMessages, type MutationToastResult, Pagination, type PaginationLabels, type PaginationProps, type PaginationVariant, type RunMutationWithToastOptions, Sidebar, SidebarCollapseIcon, SidebarExpandIcon, SidebarMobileHeader, type SidebarMobileHeaderProps, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarUserCard, type SidebarUserCardProps, StatusBadge, type StatusBadgeProps, type StatusBadgeTone, Table, TableActionButton, type TableActionButtonProps, type TableActionButtonVariant, TableActionsCell, type TableActionsCellProps, TableActionsMenu, type TableActionsMenuItem, type TableActionsMenuItemTone, type TableActionsMenuProps, TableBody, type TableBodyProps, TableCell, type TableCellProps, type TableCellVariant, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TableIconText, type TableIconTextProps, TableMenuActivateIcon, TableMenuCheckIcon, TableMenuCloseIcon, TableMenuEditIcon, TableMenuInfoIcon, TableMenuRefreshIcon, TableMenuSuspendIcon, TableMenuTrashIcon, TableMoreIcon, type TableProps, TableRow, type TableRowActionsConfig, type TableRowProps, TableRowStatusActions, type TableRowStatusActionsProps, TableScrollArea, type TableScrollAreaProps, type TableSortDirection, TableSortIcon, TableStatusActionsCell, type TableStatusActionsCellProps, Toaster, ToasterProvider, cn, getPaginationRange, getTotalPages, getVisiblePageNumbers, isNavItemActive, runMutationWithToast, tableRowDisabledCellClassName, useMediaQuery, useOnClickOutside };
|
package/dist/web/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __commonJS, __require, __toESM, Input, Button } from '../chunk-AOBKWDGW.js';
|
|
2
|
-
import { ChevronsUpDown, Search, LogOut,
|
|
2
|
+
import { ChevronsUpDown, Search, LogOut, X, Menu, ChevronLeft, ChevronRight } from 'lucide-react';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -28887,6 +28887,62 @@ function AppHeader({
|
|
|
28887
28887
|
}
|
|
28888
28888
|
);
|
|
28889
28889
|
}
|
|
28890
|
+
function SidebarCollapseIcon({
|
|
28891
|
+
className,
|
|
28892
|
+
size = 20,
|
|
28893
|
+
strokeWidth = 2
|
|
28894
|
+
}) {
|
|
28895
|
+
return /* @__PURE__ */ jsx(
|
|
28896
|
+
"svg",
|
|
28897
|
+
{
|
|
28898
|
+
width: size,
|
|
28899
|
+
height: size,
|
|
28900
|
+
viewBox: "0 0 20 20",
|
|
28901
|
+
fill: "none",
|
|
28902
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28903
|
+
"aria-hidden": true,
|
|
28904
|
+
className,
|
|
28905
|
+
children: /* @__PURE__ */ jsx(
|
|
28906
|
+
"path",
|
|
28907
|
+
{
|
|
28908
|
+
d: "M12.5 2.5V17.5M8.33333 12.5L5.83333 10L8.33333 7.5M4.16667 2.5H15.8333C16.7538 2.5 17.5 3.24619 17.5 4.16667V15.8333C17.5 16.7538 16.7538 17.5 15.8333 17.5H4.16667C3.24619 17.5 2.5 16.7538 2.5 15.8333V4.16667C2.5 3.24619 3.24619 2.5 4.16667 2.5Z",
|
|
28909
|
+
stroke: "currentColor",
|
|
28910
|
+
strokeWidth,
|
|
28911
|
+
strokeLinecap: "round",
|
|
28912
|
+
strokeLinejoin: "round"
|
|
28913
|
+
}
|
|
28914
|
+
)
|
|
28915
|
+
}
|
|
28916
|
+
);
|
|
28917
|
+
}
|
|
28918
|
+
function SidebarExpandIcon({
|
|
28919
|
+
className,
|
|
28920
|
+
size = 20,
|
|
28921
|
+
strokeWidth = 2
|
|
28922
|
+
}) {
|
|
28923
|
+
return /* @__PURE__ */ jsx(
|
|
28924
|
+
"svg",
|
|
28925
|
+
{
|
|
28926
|
+
width: size,
|
|
28927
|
+
height: size,
|
|
28928
|
+
viewBox: "0 0 20 20",
|
|
28929
|
+
fill: "none",
|
|
28930
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28931
|
+
"aria-hidden": true,
|
|
28932
|
+
className,
|
|
28933
|
+
children: /* @__PURE__ */ jsx(
|
|
28934
|
+
"path",
|
|
28935
|
+
{
|
|
28936
|
+
d: "M12.5 2.5V17.5M6.66667 7.5L9.16667 10L6.66667 12.5M4.16667 2.5H15.8333C16.7538 2.5 17.5 3.24619 17.5 4.16667V15.8333C17.5 16.7538 16.7538 17.5 15.8333 17.5H4.16667C3.24619 17.5 2.5 16.7538 2.5 15.8333V4.16667C2.5 3.24619 3.24619 2.5 4.16667 2.5Z",
|
|
28937
|
+
stroke: "currentColor",
|
|
28938
|
+
strokeWidth,
|
|
28939
|
+
strokeLinecap: "round",
|
|
28940
|
+
strokeLinejoin: "round"
|
|
28941
|
+
}
|
|
28942
|
+
)
|
|
28943
|
+
}
|
|
28944
|
+
);
|
|
28945
|
+
}
|
|
28890
28946
|
function useMediaQuery(query) {
|
|
28891
28947
|
const [matches, setMatches] = useState(() => {
|
|
28892
28948
|
if (typeof window === "undefined") {
|
|
@@ -29235,7 +29291,7 @@ function Sidebar({
|
|
|
29235
29291
|
onClick: handleHeaderAction,
|
|
29236
29292
|
className: "shrink-0 cursor-pointer text-white transition-[opacity,transform] duration-200 hover:opacity-80 active:scale-95",
|
|
29237
29293
|
"aria-label": isDesktop ? isExpanded ? labels.collapse : labels.expand : labels.closeMenu,
|
|
29238
|
-
children: isDesktop ? isExpanded ? collapseIcon ?? /* @__PURE__ */ jsx(
|
|
29294
|
+
children: isDesktop ? isExpanded ? collapseIcon ?? /* @__PURE__ */ jsx(SidebarCollapseIcon, {}) : expandIcon ?? /* @__PURE__ */ jsx(SidebarExpandIcon, {}) : closeIcon ?? /* @__PURE__ */ jsx(X, { size: 20, strokeWidth: 1.75 })
|
|
29239
29295
|
}
|
|
29240
29296
|
)
|
|
29241
29297
|
]
|
|
@@ -31074,6 +31130,6 @@ react-dom/cjs/react-dom.development.js:
|
|
|
31074
31130
|
*)
|
|
31075
31131
|
*/
|
|
31076
31132
|
|
|
31077
|
-
export { AppHeader, Badge, BellIcon, BuildingIcon, BuildingSelect, ConfirmModal, DEFAULT_TABLE_BODY_MIN_HEIGHT, DashboardLayout, DataTable, Drawer, HistoryTimeline, Modal, Pagination, Sidebar, SidebarMobileHeader, SidebarNavItem, SidebarUserCard, StatusBadge, Table, TableActionButton, TableActionsCell, TableActionsMenu, TableBody, TableCell, TableHead, TableHeader, TableIconText, TableMenuActivateIcon, TableMenuCheckIcon, TableMenuCloseIcon, TableMenuEditIcon, TableMenuInfoIcon, TableMenuRefreshIcon, TableMenuSuspendIcon, TableMenuTrashIcon, TableMoreIcon, TableRow, TableRowStatusActions, TableScrollArea, TableSortIcon, TableStatusActionsCell, Toaster, ToasterProvider, cn, getPaginationRange, getTotalPages, getVisiblePageNumbers, isNavItemActive, runMutationWithToast, tableRowDisabledCellClassName, useMediaQuery, useOnClickOutside };
|
|
31133
|
+
export { AppHeader, Badge, BellIcon, BuildingIcon, BuildingSelect, ConfirmModal, DEFAULT_TABLE_BODY_MIN_HEIGHT, DashboardLayout, DataTable, Drawer, HistoryTimeline, Modal, Pagination, Sidebar, SidebarCollapseIcon, SidebarExpandIcon, SidebarMobileHeader, SidebarNavItem, SidebarUserCard, StatusBadge, Table, TableActionButton, TableActionsCell, TableActionsMenu, TableBody, TableCell, TableHead, TableHeader, TableIconText, TableMenuActivateIcon, TableMenuCheckIcon, TableMenuCloseIcon, TableMenuEditIcon, TableMenuInfoIcon, TableMenuRefreshIcon, TableMenuSuspendIcon, TableMenuTrashIcon, TableMoreIcon, TableRow, TableRowStatusActions, TableScrollArea, TableSortIcon, TableStatusActionsCell, Toaster, ToasterProvider, cn, getPaginationRange, getTotalPages, getVisiblePageNumbers, isNavItemActive, runMutationWithToast, tableRowDisabledCellClassName, useMediaQuery, useOnClickOutside };
|
|
31078
31134
|
//# sourceMappingURL=index.js.map
|
|
31079
31135
|
//# sourceMappingURL=index.js.map
|