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.
@@ -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
- /** Props for the reusable DatePicker component. */
2
+ export type DatePickerSize = "sm" | "lg" | "full";
5
3
  export interface DatePickerProps {
6
- /** Optional title/label to show above the date picker, default value "Select Date" */
4
+ /** Label / placeholder */
7
5
  title?: string;
8
- /** Defines picker behavior */
6
+ /** Mode */
9
7
  variant?: DatePickerMode;
10
- /** Selected date (controlled) */
8
+ /** Single date */
11
9
  value?: Date;
12
- /** Callback when single date changes */
10
+ /** Single change */
13
11
  onChange?: (date: Date | undefined) => void;
14
- /** Selected "from" date */
12
+ /** Range: from */
15
13
  fromDate?: Date;
16
- /** Selected "to" date */
14
+ /** Range: to */
17
15
  toDate?: Date;
18
- /** Callback when "from" date changes */
16
+ /** Range handlers */
19
17
  onFromChange?: (date: Date | undefined) => void;
20
- /** Callback when "to" date changes */
21
18
  onToChange?: (date: Date | undefined) => void;
22
- /** Size of the picker */
23
- size?: ButtonSize;
24
- /** Maximum selectable past days */
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
- /** If true, today is pre-selected on mount. */
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?: ButtonSize;
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 { default as MultiSelectDropdown } from './MultiSelectDropdown.component';
3
- declare const meta: Meta<typeof MultiSelectDropdown>;
2
+ import { MultiSelectDropdownProps } from './MultiSelectDropdown.types';
3
+ declare const meta: Meta<MultiSelectDropdownProps>;
4
4
  export default meta;
5
- /** Type alias for a story object of Multiselect Dropdown.*/
6
- type Story = StoryObj<typeof MultiSelectDropdown>;
7
- /** Default story for the MultiSelectDropdown component.*/
5
+ type Story = StoryObj<MultiSelectDropdownProps>;
6
+ /** Default */
8
7
  export declare const Default: Story;
9
- /** Story example to showing a default selected value.*/
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?: ButtonSize;
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`. */