@grasp-labs/ds-react-components 1.0.0 → 1.1.1
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/baseButton/BaseButton.styles.d.ts +1 -1
- package/dist/components/iconButton/IconButton.d.ts +4 -3
- package/dist/components/sidebar/Sidebar.d.ts +1 -1
- package/dist/components/table/components/Pagination.d.ts +3 -3
- package/dist/components/table/types.d.ts +0 -2
- package/dist/icons/iconsComponents.d.ts +3 -0
- package/dist/icons/iconsLazy.d.ts +18 -0
- package/dist/{index-DbrsXeBO.js → index-DoGqwfY0.js} +5481 -5456
- package/dist/index.css +1 -1
- package/dist/{index.esm-C32CGj2t.js → index.esm-DOdrC2fW.js} +1 -1
- package/dist/index.js +115 -112
- package/dist/tailwind-styles.css +112 -49
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type Variant = "primary" | "secondary" | "text" | "danger";
|
|
2
2
|
export declare const baseClasses: "\n inline-flex cursor-pointer items-center justify-center select-none transition-colors leading-none\n focus-visible:outline-primary focus-visible:outline-1 focus-visible:outline-offset-1\n";
|
|
3
3
|
export declare const variantClasses: Record<Variant, string>;
|
|
4
|
-
export declare const disabledClasses: "
|
|
4
|
+
export declare const disabledClasses: "disabled:cursor-not-allowed";
|
|
5
5
|
export declare const getBaseButtonClassName: (variant: Variant, className?: string) => string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ComponentType, SVGProps } from 'react';
|
|
2
|
-
import { BaseButtonProps } from '../baseButton';
|
|
3
|
-
export type IconButtonProps = Omit<BaseButtonProps, "children"> & {
|
|
2
|
+
import { BaseButtonProps, Variant } from '../baseButton';
|
|
3
|
+
export type IconButtonProps = Omit<BaseButtonProps, "children" | "variant"> & {
|
|
4
4
|
size?: "small" | "medium";
|
|
5
5
|
icon: ComponentType<SVGProps<SVGSVGElement>>;
|
|
6
6
|
"aria-label"?: string;
|
|
7
|
+
variant?: Variant | "raw";
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
9
10
|
* A circular icon-only button component for actions requiring minimal visual footprint.
|
|
@@ -12,4 +13,4 @@ export type IconButtonProps = Omit<BaseButtonProps, "children"> & {
|
|
|
12
13
|
* @param props - The props for the IconButton component.
|
|
13
14
|
* @returns The rendered circular icon button.
|
|
14
15
|
*/
|
|
15
|
-
export declare const IconButton: ({ size, icon: Icon, className, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const IconButton: ({ size, icon: Icon, className, variant, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -39,7 +39,7 @@ export type SidebarProps = {
|
|
|
39
39
|
* ```tsx
|
|
40
40
|
* <Sidebar
|
|
41
41
|
* logo={<MyLogo />}
|
|
42
|
-
* footerContent="©
|
|
42
|
+
* footerContent="© 2026 My Company"
|
|
43
43
|
* routes={[
|
|
44
44
|
* { path: "/dashboard", title: "Dashboard", icon: <DashboardIcon /> },
|
|
45
45
|
* { path: "/settings", title: "Settings", icon: <SettingsIcon />, permissions: ["admin"] }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type PaginationProps = HTMLAttributes<HTMLDivElement> & {
|
|
2
3
|
currentPage: number;
|
|
3
4
|
totalPages: number;
|
|
4
5
|
totalItems: number;
|
|
@@ -8,7 +9,6 @@ export type PaginationProps = {
|
|
|
8
9
|
onItemsPerPageChange: (itemsPerPage: number) => void;
|
|
9
10
|
className?: string;
|
|
10
11
|
selectClassName?: string;
|
|
11
|
-
itemsPerPageText?: string;
|
|
12
12
|
fromText?: string;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
@@ -18,4 +18,4 @@ export type PaginationProps = {
|
|
|
18
18
|
* @param props - The props for the Pagination component.
|
|
19
19
|
* @returns The rendered pagination controls with navigation buttons and page info.
|
|
20
20
|
*/
|
|
21
|
-
export declare const Pagination: ({ currentPage, totalPages, totalItems, itemsPerPage, itemsPerPageOptions, onPageChange, onItemsPerPageChange, className,
|
|
21
|
+
export declare const Pagination: ({ currentPage, totalPages, totalItems, itemsPerPage, itemsPerPageOptions, onPageChange, onItemsPerPageChange, className, fromText, ...rest }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -38,13 +38,11 @@ export type TableProps<T> = Omit<TableOptions<T>, "getCoreRowModel" | "getSorted
|
|
|
38
38
|
paginationProps?: {
|
|
39
39
|
mode?: "client";
|
|
40
40
|
itemsPerPageOptions?: number[];
|
|
41
|
-
itemsPerPageText?: string;
|
|
42
41
|
fromText?: string;
|
|
43
42
|
totalItems?: never;
|
|
44
43
|
} | {
|
|
45
44
|
mode: "server";
|
|
46
45
|
itemsPerPageOptions?: number[];
|
|
47
|
-
itemsPerPageText?: string;
|
|
48
46
|
fromText?: string;
|
|
49
47
|
totalItems: number;
|
|
50
48
|
};
|
|
@@ -5,6 +5,7 @@ export declare const ArrowLeftIcon: IconComponent;
|
|
|
5
5
|
export declare const ArrowRightIcon: IconComponent;
|
|
6
6
|
export declare const ArrowUpIcon: IconComponent;
|
|
7
7
|
export declare const BellIcon: IconComponent;
|
|
8
|
+
export declare const BriefcaseIcon: IconComponent;
|
|
8
9
|
export declare const CalendarIcon: IconComponent;
|
|
9
10
|
export declare const CautionIcon: IconComponent;
|
|
10
11
|
export declare const CheckIcon: IconComponent;
|
|
@@ -31,6 +32,7 @@ export declare const EyeIcon: IconComponent;
|
|
|
31
32
|
export declare const FileIcon: IconComponent;
|
|
32
33
|
export declare const EyeOffIcon: IconComponent;
|
|
33
34
|
export declare const FilterIcon: IconComponent;
|
|
35
|
+
export declare const GlobeIcon: IconComponent;
|
|
34
36
|
export declare const HourglassIcon: IconComponent;
|
|
35
37
|
export declare const IdeaIcon: IconComponent;
|
|
36
38
|
export declare const InfoIcon: IconComponent;
|
|
@@ -52,4 +54,5 @@ export declare const ServerIcon: IconComponent;
|
|
|
52
54
|
export declare const SuccessIcon: IconComponent;
|
|
53
55
|
export declare const TableIcon: IconComponent;
|
|
54
56
|
export declare const UpIcon: IconComponent;
|
|
57
|
+
export declare const UserIcon: IconComponent;
|
|
55
58
|
export declare const WarningIcon: IconComponent;
|
|
@@ -35,6 +35,12 @@ export declare const icons: {
|
|
|
35
35
|
desc?: string;
|
|
36
36
|
descId?: string;
|
|
37
37
|
}>>;
|
|
38
|
+
readonly briefcase: import('react').LazyExoticComponent<import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
39
|
+
title?: string;
|
|
40
|
+
titleId?: string;
|
|
41
|
+
desc?: string;
|
|
42
|
+
descId?: string;
|
|
43
|
+
}>>;
|
|
38
44
|
readonly calendar: import('react').LazyExoticComponent<import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
39
45
|
title?: string;
|
|
40
46
|
titleId?: string;
|
|
@@ -191,6 +197,12 @@ export declare const icons: {
|
|
|
191
197
|
desc?: string;
|
|
192
198
|
descId?: string;
|
|
193
199
|
}>>;
|
|
200
|
+
readonly globe: import('react').LazyExoticComponent<import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
201
|
+
title?: string;
|
|
202
|
+
titleId?: string;
|
|
203
|
+
desc?: string;
|
|
204
|
+
descId?: string;
|
|
205
|
+
}>>;
|
|
194
206
|
readonly hourglass: import('react').LazyExoticComponent<import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
195
207
|
title?: string;
|
|
196
208
|
titleId?: string;
|
|
@@ -317,6 +329,12 @@ export declare const icons: {
|
|
|
317
329
|
desc?: string;
|
|
318
330
|
descId?: string;
|
|
319
331
|
}>>;
|
|
332
|
+
readonly user: import('react').LazyExoticComponent<import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
333
|
+
title?: string;
|
|
334
|
+
titleId?: string;
|
|
335
|
+
desc?: string;
|
|
336
|
+
descId?: string;
|
|
337
|
+
}>>;
|
|
320
338
|
readonly warning: import('react').LazyExoticComponent<import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
321
339
|
title?: string;
|
|
322
340
|
titleId?: string;
|