sy-ui-lib 1.0.13 → 1.0.15
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.stories.d.ts +3 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +13 -16
- package/dist/components/Dropdown/Dropdown.stories.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.types.d.ts +2 -2
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.component.d.ts +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.stories.d.ts +9 -6
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +2 -2
- package/dist/index.cjs +20 -11
- package/dist/index.css +1 -1
- package/dist/index.js +1334 -1312
- package/package.json +1 -1
|
@@ -5,5 +5,8 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<DatePickerProps>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const CustomTitle: Story;
|
|
8
|
+
export declare const Sizes: Story;
|
|
9
|
+
export declare const Heights: Story;
|
|
8
10
|
export declare const MaxPastDays: Story;
|
|
9
11
|
export declare const Range: Story;
|
|
12
|
+
export declare const RangeFull: Story;
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
import { ButtonSize } from '../Button';
|
|
2
|
-
/** "single": For selecting a single date. "range": For selecting a date range*/
|
|
3
1
|
export type DatePickerMode = "single" | "range";
|
|
4
|
-
|
|
2
|
+
export type DatePickerSize = "sm" | "lg" | "full";
|
|
5
3
|
export interface DatePickerProps {
|
|
6
|
-
/**
|
|
4
|
+
/** Label / placeholder */
|
|
7
5
|
title?: string;
|
|
8
|
-
/**
|
|
6
|
+
/** Mode */
|
|
9
7
|
variant?: DatePickerMode;
|
|
10
|
-
/**
|
|
8
|
+
/** Single date */
|
|
11
9
|
value?: Date;
|
|
12
|
-
/**
|
|
10
|
+
/** Single change */
|
|
13
11
|
onChange?: (date: Date | undefined) => void;
|
|
14
|
-
/**
|
|
12
|
+
/** Range: from */
|
|
15
13
|
fromDate?: Date;
|
|
16
|
-
/**
|
|
14
|
+
/** Range: to */
|
|
17
15
|
toDate?: Date;
|
|
18
|
-
/**
|
|
16
|
+
/** Range handlers */
|
|
19
17
|
onFromChange?: (date: Date | undefined) => void;
|
|
20
|
-
/** Callback when "to" date changes */
|
|
21
18
|
onToChange?: (date: Date | undefined) => void;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
size?: DatePickerSize;
|
|
20
|
+
/** 👇 NEW: height controlled from parent */
|
|
21
|
+
height?: "sm" | "lg";
|
|
22
|
+
/** Constraints */
|
|
25
23
|
maxPastDays?: number;
|
|
26
|
-
/** Maximum selectable past days */
|
|
27
24
|
maxRangeDays?: number;
|
|
28
|
-
/**
|
|
25
|
+
/** Default select */
|
|
29
26
|
currentSelected?: boolean;
|
|
30
27
|
}
|
|
@@ -6,5 +6,5 @@ type Story = StoryObj<DropdownProps>;
|
|
|
6
6
|
export declare const SmallDropdown: Story;
|
|
7
7
|
export declare const LargeDropdown: Story;
|
|
8
8
|
export declare const SelectedOption: Story;
|
|
9
|
-
/** Stateless dropdown for downloads (doesn’t store selected)*/
|
|
10
9
|
export declare const StatelessDropdown: Story;
|
|
10
|
+
export declare const FullWidthDropdown: Story;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ButtonSize } from '../Button';
|
|
2
1
|
/**
|
|
3
2
|
* Represents an individual option in the dropdown.
|
|
4
3
|
*/
|
|
@@ -10,10 +9,11 @@ export interface DropdownOptionValues {
|
|
|
10
9
|
}
|
|
11
10
|
/** Props associated with Dropdown component*/
|
|
12
11
|
export interface DropdownProps {
|
|
12
|
+
variant?: "small" | "large";
|
|
13
13
|
/** The fallback label to display when no option is selected. */
|
|
14
14
|
label: string;
|
|
15
15
|
/** Defines the size of the dropdown button and options. default value is "sm" */
|
|
16
|
-
size?:
|
|
16
|
+
size?: "sm" | "lg" | "full";
|
|
17
17
|
/** List of dropdown options available for selection. */
|
|
18
18
|
options: DropdownOptionValues[];
|
|
19
19
|
/** Currently selected option. Must be one of the items from `options`. */
|
|
@@ -18,5 +18,5 @@ import { MultiSelectDropdownProps } from './MultiSelectDropdown.types';
|
|
|
18
18
|
* onSelect={(items) => console.log(items)}
|
|
19
19
|
* />
|
|
20
20
|
*/
|
|
21
|
-
declare const MultiSelectDropdown: ({ label, size, options, selected, onSelect, }: MultiSelectDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare const MultiSelectDropdown: ({ label, size, variant, options, selected, onSelect, }: MultiSelectDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export default MultiSelectDropdown;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<
|
|
2
|
+
import { MultiSelectDropdownProps } from './MultiSelectDropdown.types';
|
|
3
|
+
declare const meta: Meta<MultiSelectDropdownProps>;
|
|
4
4
|
export default meta;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/** Default story for the MultiSelectDropdown component.*/
|
|
5
|
+
type Story = StoryObj<MultiSelectDropdownProps>;
|
|
6
|
+
/** Default */
|
|
8
7
|
export declare const Default: Story;
|
|
9
|
-
/**
|
|
8
|
+
/** With Pre-selected */
|
|
10
9
|
export declare const Selected: Story;
|
|
10
|
+
/** Small Variant */
|
|
11
|
+
export declare const SmallVariant: Story;
|
|
12
|
+
/** Full Width */
|
|
13
|
+
export declare const FullWidth: Story;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ButtonSize } from '../Button';
|
|
2
1
|
export interface MultiSelectOptionValues {
|
|
3
2
|
/** The visible label shown in the dropdown list and selected state */
|
|
4
3
|
label: string;
|
|
@@ -7,10 +6,11 @@ export interface MultiSelectOptionValues {
|
|
|
7
6
|
}
|
|
8
7
|
/** Props associated with Dropdown component*/
|
|
9
8
|
export interface MultiSelectDropdownProps {
|
|
9
|
+
variant?: "small" | "large";
|
|
10
10
|
/** The fallback label to display when no option is selected. */
|
|
11
11
|
label: string;
|
|
12
12
|
/** Defines the size of the dropdown button and options. default value is "sm" */
|
|
13
|
-
size?:
|
|
13
|
+
size?: "sm" | "lg" | "full";
|
|
14
14
|
/** List of dropdown options available for selection. */
|
|
15
15
|
options: MultiSelectOptionValues[];
|
|
16
16
|
/** Currently selected option. Must be one of the items from `options`. */
|