@youngonesworks/ui 0.1.103 → 0.1.104

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.
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { KebabMenu } from './index';
3
+ declare const meta: Meta<typeof KebabMenu>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof KebabMenu>;
6
+ export declare const Default: Story;
7
+ export declare const Small: Story;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ export interface KebabMenuProps {
2
+ title?: string;
3
+ disabled?: boolean;
4
+ content: {
5
+ key: number;
6
+ onClick: () => void;
7
+ title: string;
8
+ disabled?: boolean;
9
+ tooltip?: string;
10
+ }[];
11
+ styleVariant?: 'default' | 'small';
12
+ }
13
+ export declare const KebabMenu: {
14
+ ({ title, content, disabled, styleVariant }: KebabMenuProps): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
@@ -4,3 +4,9 @@ declare const meta: Meta<typeof Select>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Select>;
6
6
  export declare const Default: Story;
7
+ export declare const WithLabel: Story;
8
+ export declare const WithError: Story;
9
+ export declare const Disabled: Story;
10
+ export declare const Clearable: Story;
11
+ export declare const MultiSelect: Story;
12
+ export declare const Localized: Story;
@@ -1,27 +1,28 @@
1
- import * as React from 'react';
2
- import { type ReactElement } from 'react';
3
- import { type ActionMeta, type GroupBase, type Props, type PropsValue, type SingleValue } from 'react-select';
4
- interface CustomSelectProps<T> extends Props<T, false, GroupBase<T>> {
5
- small?: boolean;
6
- error?: string;
7
- icon?: ReactElement;
8
- showLangFlags?: boolean;
9
- hideErrorText?: boolean;
10
- fullWidth?: boolean;
11
- isClearable?: boolean;
12
- width?: string;
13
- options: readonly (T | GroupBase<T>)[];
14
- defaultValue?: PropsValue<T> | undefined;
15
- value?: PropsValue<T>;
16
- onChange?: ((newValue: SingleValue<T>, actionMeta: ActionMeta<T>) => void) | undefined;
17
- isDisabled?: boolean;
1
+ import { ComponentPropsWithoutRef, Ref } from 'react';
2
+ interface Option {
3
+ value: string;
4
+ label: string;
18
5
  }
19
- interface ISelectNewProps<T> extends CustomSelectProps<T> {
20
- placeholder: string;
21
- label?: string | ReactElement;
22
- className?: string;
6
+ interface SelectProps extends ComponentPropsWithoutRef<'div'> {
7
+ ref?: Ref<HTMLDivElement>;
23
8
  id: string;
24
- labelClassNames?: string;
9
+ options: Option[];
10
+ placeholder: string;
11
+ label?: string;
12
+ errorText?: string;
13
+ hideError?: boolean;
14
+ isClearable?: boolean;
15
+ disabled?: boolean;
16
+ multiSelect?: boolean;
17
+ searchable?: boolean;
18
+ value?: string | string[];
19
+ defaultValue?: string | string[];
20
+ onValueChange?: (value: string | string[] | undefined) => void;
21
+ searchPlaceholder?: string;
22
+ noResultsText: string;
23
+ }
24
+ export declare function Select({ id, options, placeholder, label, errorText, hideError, isClearable, disabled, multiSelect, searchable, value, defaultValue, onValueChange, className, searchPlaceholder, noResultsText, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare namespace Select {
26
+ var displayName: string;
25
27
  }
26
- export declare const Select: React.ForwardRefExoticComponent<ISelectNewProps<unknown> & React.RefAttributes<HTMLDivElement>>;
27
28
  export {};
@@ -0,0 +1 @@
1
+ export declare function useDebouncedValue<T>(value: T, delay?: number): T;
@@ -0,0 +1,2 @@
1
+ import { Ref, RefCallback } from 'react';
2
+ export declare function useMergeRefs<T>(...refs: (Ref<T> | undefined)[]): RefCallback<T>;