@gusarov-studio/rubik-ui 29.2.0 → 29.3.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.
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import type { GroupBase } from "react-select";
3
+ import ReactAsyncSelect, { type AsyncProps } from "react-select/async";
4
+ import type { BaseSelectProps, Option } from "./types";
5
+ type AsyncSelectRef = React.ElementRef<typeof ReactAsyncSelect<Option, boolean, GroupBase<Option>>>;
6
+ type AsyncSelectProps = BaseSelectProps & AsyncProps<Option, boolean, GroupBase<Option>>;
7
+ type AsyncSelectAnnotation = React.ForwardRefExoticComponent<AsyncSelectProps & React.RefAttributes<AsyncSelectRef>>;
8
+ declare const AsyncSelect: AsyncSelectAnnotation;
9
+ export { AsyncSelect, type AsyncSelectProps };
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import type { GroupBase } from "react-select";
3
+ import ReactCreatableSelect, { type CreatableProps } from "react-select/creatable";
4
+ import type { BaseSelectProps, Option } from "./types";
5
+ type CreatableSelectRef = React.ElementRef<typeof ReactCreatableSelect<Option, boolean, GroupBase<Option>>>;
6
+ type CreatableSelectProps = BaseSelectProps & CreatableProps<Option, boolean, GroupBase<Option>>;
7
+ type CreatableSelectAnnotation = React.ForwardRefExoticComponent<CreatableSelectProps & React.RefAttributes<CreatableSelectRef>>;
8
+ declare const CreatableSelect: CreatableSelectAnnotation;
9
+ export { CreatableSelect, type CreatableSelectProps };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import ReactSelect, { type Props } from "react-select";
3
+ import type { BaseSelectProps } from "./types";
4
+ type SelectRef = React.ElementRef<typeof ReactSelect>;
5
+ type SelectProps = BaseSelectProps & Props;
6
+ type SelectAnnotation = React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<SelectRef>>;
7
+ declare const Select: SelectAnnotation;
8
+ export { Select, type SelectProps };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { type ClearIndicatorProps } from "react-select";
3
+ declare const SelectClearIndicator: (props: ClearIndicatorProps) => React.JSX.Element;
4
+ export { SelectClearIndicator };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { type DropdownIndicatorProps } from "react-select";
3
+ declare const SelectDropdownIndicator: (props: DropdownIndicatorProps) => React.JSX.Element;
4
+ export { SelectDropdownIndicator };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { type OptionProps } from "react-select";
3
+ declare const SelectOption: (props: OptionProps) => React.JSX.Element;
4
+ export { SelectOption };
@@ -0,0 +1,12 @@
1
+ import { components as selectComponents, type ControlProps, type DropdownIndicatorProps, type ClearIndicatorProps, type OptionProps, type GroupBase, type SingleValue, type MultiValue } from "react-select";
2
+ import "./Select.scss";
3
+ declare const customSelectComponents: {
4
+ RDropdownIndicator: (props: DropdownIndicatorProps) => import("react").JSX.Element;
5
+ RClearIndicator: (props: ClearIndicatorProps) => import("react").JSX.Element;
6
+ ROption: (props: OptionProps) => import("react").JSX.Element;
7
+ };
8
+ export * from "./types";
9
+ export { selectComponents, customSelectComponents, type ControlProps, type DropdownIndicatorProps, type ClearIndicatorProps, type OptionProps, type GroupBase, type SingleValue, type MultiValue, };
10
+ export * from "./Select";
11
+ export * from "./AsyncSelect";
12
+ export * from "./CreatableSelect";
@@ -0,0 +1,17 @@
1
+ import type React from "react";
2
+ export type SelectSize = "32" | "36" | "40" | "44" | "48";
3
+ export interface Option {
4
+ label: string;
5
+ value: string;
6
+ isDisabled?: boolean;
7
+ prefix?: React.ReactNode;
8
+ suffix?: React.ReactNode;
9
+ group?: string;
10
+ }
11
+ export interface BaseSelectProps {
12
+ appearance?: "fill" | "outline";
13
+ size?: SelectSize | `${SelectSize}`;
14
+ quiet?: boolean;
15
+ invalid?: boolean;
16
+ options: Option[];
17
+ }
package/dist/index.d.ts CHANGED
@@ -24,6 +24,7 @@ export * from "./Popover";
24
24
  export * from "./Progress";
25
25
  export * from "./RadioButton";
26
26
  export * from "./Resizable";
27
+ export * from "./Select";
27
28
  export * from "./Skeleton";
28
29
  export * from "./Stack";
29
30
  export * from "./Switch";