@yusr_systems/ui 3.0.0 → 3.1.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/index.d.ts +36 -0
- package/dist/yusr-ui.js +334 -279
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { ClassValue } from 'clsx';
|
|
|
13
13
|
import { ColumnName } from '@yusr_systems/core';
|
|
14
14
|
import { Combobox as Combobox_2 } from '@base-ui/react/combobox';
|
|
15
15
|
import { Command as Command_2 } from 'cmdk';
|
|
16
|
+
import { Context } from 'react';
|
|
16
17
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
17
18
|
import { DayButton } from 'react-day-picker';
|
|
18
19
|
import { DayPicker } from 'react-day-picker';
|
|
@@ -28,6 +29,7 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
|
28
29
|
import { FilterCondition } from '@yusr_systems/core';
|
|
29
30
|
import { FilterResult } from '@yusr_systems/core';
|
|
30
31
|
import { JSX } from 'react/jsx-runtime';
|
|
32
|
+
import { JSX as JSX_2 } from 'react';
|
|
31
33
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
32
34
|
import { Locale } from 'react-day-picker';
|
|
33
35
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
@@ -991,6 +993,8 @@ export declare function SideBarCompanyData({ company }: {
|
|
|
991
993
|
|
|
992
994
|
export declare function SidebarContent({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
993
995
|
|
|
996
|
+
export declare const SidebarContext: Context<YusrSidBarProps | null>;
|
|
997
|
+
|
|
994
998
|
declare type SidebarContextProps = {
|
|
995
999
|
state: "expanded" | "collapsed";
|
|
996
1000
|
open: boolean;
|
|
@@ -1298,6 +1302,13 @@ declare interface UsernameObject {
|
|
|
1298
1302
|
|
|
1299
1303
|
export declare function useSidebar(): SidebarContextProps;
|
|
1300
1304
|
|
|
1305
|
+
/**
|
|
1306
|
+
* Returns the props of the nearest SidebarProvider.
|
|
1307
|
+
* Must be used within a SidebarProvider.
|
|
1308
|
+
* @returns {YusrSidBarProps} The props of the nearest SidebarProvider.
|
|
1309
|
+
*/
|
|
1310
|
+
export declare const useSidebarContext: () => YusrSidBarProps;
|
|
1311
|
+
|
|
1301
1312
|
export declare function useStorageFile<T>(setFormData: React.Dispatch<React.SetStateAction<T>>, fieldName: keyof T): {
|
|
1302
1313
|
fileInputRef: RefObject<HTMLInputElement | null>;
|
|
1303
1314
|
handleFileChange: (event: React.ChangeEvent<HTMLInputElement>) => Promise<void>;
|
|
@@ -1311,6 +1322,31 @@ export declare const useTheme: () => ThemeProviderState;
|
|
|
1311
1322
|
|
|
1312
1323
|
export declare function YusrBusBackground(): JSX.Element;
|
|
1313
1324
|
|
|
1325
|
+
export declare type YusrSidBarProps = {
|
|
1326
|
+
LinkComponent?: React.ElementType;
|
|
1327
|
+
logos: {
|
|
1328
|
+
logoFullDark: string;
|
|
1329
|
+
logoFullLight: string;
|
|
1330
|
+
logoOnlyDark: string;
|
|
1331
|
+
logoOnlyLight: string;
|
|
1332
|
+
};
|
|
1333
|
+
displayCompany?: {
|
|
1334
|
+
name: string;
|
|
1335
|
+
logo: string;
|
|
1336
|
+
};
|
|
1337
|
+
navMain?: {
|
|
1338
|
+
title: string;
|
|
1339
|
+
url: string;
|
|
1340
|
+
icon: JSX_2.Element;
|
|
1341
|
+
hasAuth: boolean;
|
|
1342
|
+
}[];
|
|
1343
|
+
navSecondary?: {
|
|
1344
|
+
title: string;
|
|
1345
|
+
url: string;
|
|
1346
|
+
icon: JSX_2.Element;
|
|
1347
|
+
}[];
|
|
1348
|
+
};
|
|
1349
|
+
|
|
1314
1350
|
export declare function YusrSideBarMainMenu({ items, LinkComponent, }: {
|
|
1315
1351
|
items: {
|
|
1316
1352
|
title: string;
|