brd-ui-kit 0.1.31 → 0.1.33

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.
@@ -3,14 +3,24 @@ export type SelectGroupsData = {
3
3
  label?: string;
4
4
  items: string[];
5
5
  };
6
+ export type SelectGroupsItem = SelectGroupsData | string;
6
7
  export type SelectGroupsProps = {
7
- groups: SelectGroupsData[];
8
+ groups: SelectGroupsData[] | SelectGroupsData | string[];
9
+ label?: string;
10
+ description?: string;
11
+ disabled?: boolean;
12
+ isValid?: boolean;
8
13
  placeholder?: string;
9
14
  value?: string;
10
15
  defaultValue?: string;
11
16
  onChange?: (value: string) => void;
12
17
  showSeparators?: boolean;
13
18
  classNames?: {
19
+ fieldSet?: string;
20
+ fieldGroup?: string;
21
+ field?: string;
22
+ fieldLabel?: string;
23
+ description?: string;
14
24
  trigger?: string;
15
25
  content?: string;
16
26
  group?: string;
@@ -19,4 +29,4 @@ export type SelectGroupsProps = {
19
29
  separator?: string;
20
30
  };
21
31
  } & Omit<React.ComponentProps<typeof Select>, "value" | "defaultValue" | "onValueChange" | "children">;
22
- export declare const SelectGroups: ({ groups, placeholder, value, defaultValue, onChange, showSeparators, classNames, ...rest }: SelectGroupsProps) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const SelectGroups: ({ groups, label, description, disabled, isValid, placeholder, value, defaultValue, onChange, showSeparators, classNames, ...rest }: SelectGroupsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,30 +1,42 @@
1
1
  import { StoryObj } from '@storybook/react-vite';
2
- type GroupsPreset = "labeled" | "mixed";
2
+ type GroupsPreset = "labeled" | "mixed" | "flat";
3
+ type SelectGroupsState = "default" | "success" | "error" | "disabled";
3
4
  type SelectGroupsPlaygroundProps = {
5
+ label?: string;
6
+ description?: string;
4
7
  placeholder?: string;
5
8
  showSeparators?: boolean;
6
- disabled?: boolean;
9
+ state?: SelectGroupsState;
7
10
  groupsPreset?: GroupsPreset;
8
11
  };
9
- declare function SelectGroupsPlayground({ placeholder, showSeparators, disabled, groupsPreset, }: SelectGroupsPlaygroundProps): import("react/jsx-runtime").JSX.Element;
12
+ declare function SelectGroupsPlayground({ label, description, placeholder, showSeparators, state, groupsPreset, }: SelectGroupsPlaygroundProps): import("react/jsx-runtime").JSX.Element;
10
13
  declare const meta: {
11
14
  title: string;
12
15
  component: typeof SelectGroupsPlayground;
13
16
  args: {
17
+ label: string;
18
+ description: string;
14
19
  placeholder: string;
15
20
  showSeparators: true;
16
- disabled: false;
21
+ state: "default";
17
22
  groupsPreset: "labeled";
18
23
  };
19
24
  argTypes: {
25
+ label: {
26
+ control: "text";
27
+ };
28
+ description: {
29
+ control: "text";
30
+ };
20
31
  placeholder: {
21
32
  control: "text";
22
33
  };
23
34
  showSeparators: {
24
35
  control: "boolean";
25
36
  };
26
- disabled: {
27
- control: "boolean";
37
+ state: {
38
+ control: "inline-radio";
39
+ options: string[];
28
40
  };
29
41
  groupsPreset: {
30
42
  control: "inline-radio";