@grasp-labs/ds-react-components 0.15.1 → 0.17.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/components/datePicker/datePicker.d.ts +35 -0
- package/dist/components/datePicker/index.d.ts +2 -0
- package/dist/components/menu/Menu.d.ts +4 -4
- package/dist/index-CTQbH0dg.js +11518 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/{index.esm-BKoMny5G.js → index.esm-B4HiWhze.js} +1 -1
- package/dist/index.js +76 -75
- package/package.json +6 -4
- package/dist/components/menu/MenuFooter.d.ts +0 -23
- package/dist/index-BniEfEoN.js +0 -8529
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { DayPicker, Locale } from 'react-day-picker';
|
|
3
|
+
type DayPickerClassNamesConfig = Pick<ComponentProps<typeof DayPicker>, "classNames" | "modifiersClassNames">;
|
|
4
|
+
export type DatePickerProps = {
|
|
5
|
+
/** Label text displayed nex to the trigger button */
|
|
6
|
+
labelText: string;
|
|
7
|
+
/** Text displayed in trigger button, when date is not selected */
|
|
8
|
+
placeholderText: string;
|
|
9
|
+
/** Date displayed in trigger button, when date is selected */
|
|
10
|
+
selectedDate: Date | null;
|
|
11
|
+
/** Locale used to display texts of date-picker in correct language and present date with correct format */
|
|
12
|
+
locale?: Locale;
|
|
13
|
+
/** Min date available to select */
|
|
14
|
+
minDate?: Date;
|
|
15
|
+
/** Max date available to select */
|
|
16
|
+
maxDate?: Date;
|
|
17
|
+
/** Default month shown when date-picker is open */
|
|
18
|
+
defaultMonth?: Date;
|
|
19
|
+
/** Class name used to override default styles of component wrapper */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Config for class names used to override default styles of calendar */
|
|
22
|
+
dayPickerClassNames?: DayPickerClassNamesConfig;
|
|
23
|
+
/** Aria label added to the button, when date is selected */
|
|
24
|
+
nonEmptyButtonAriaLabel: string;
|
|
25
|
+
/** Callback function called when the date is changed */
|
|
26
|
+
onSelectedDateChange: (selectedDate: Date | null) => void;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* A flexible date-picker component
|
|
30
|
+
*
|
|
31
|
+
* @param props - The props for the DatePicker component
|
|
32
|
+
* @returns The rendered date-picker
|
|
33
|
+
*/
|
|
34
|
+
export declare const DatePicker: ({ labelText, placeholderText, selectedDate, locale, minDate, maxDate, defaultMonth, className, dayPickerClassNames, nonEmptyButtonAriaLabel, onSelectedDateChange, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export {};
|
|
@@ -22,8 +22,8 @@ export type MenuRoute = {
|
|
|
22
22
|
export type MenuProps = {
|
|
23
23
|
/** React element to display as the menu logo (e.g. an SVG component or img element) */
|
|
24
24
|
logo: ReactElement;
|
|
25
|
-
/**
|
|
26
|
-
|
|
25
|
+
/** Content to display in the footer */
|
|
26
|
+
footerContent: React.ReactNode;
|
|
27
27
|
/** Array of routes to display in the menu */
|
|
28
28
|
routes: MenuRoute[];
|
|
29
29
|
/** Current user permissions used to filter routes */
|
|
@@ -39,7 +39,7 @@ export type MenuProps = {
|
|
|
39
39
|
* ```tsx
|
|
40
40
|
* <Menu
|
|
41
41
|
* logo={<MyLogo />}
|
|
42
|
-
*
|
|
42
|
+
* footerContent="© 2025 My Company"
|
|
43
43
|
* routes={[
|
|
44
44
|
* { path: "/dashboard", title: "Dashboard", icon: <DashboardIcon /> },
|
|
45
45
|
* { path: "/settings", title: "Settings", icon: <SettingsIcon />, permissions: ["admin"] }
|
|
@@ -48,4 +48,4 @@ export type MenuProps = {
|
|
|
48
48
|
* />
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
|
-
export declare const Menu: ({ logo,
|
|
51
|
+
export declare const Menu: ({ logo, footerContent, routes, permissions, className, }: MenuProps) => JSX.Element;
|