@prokodo/ui 0.0.43 → 0.0.44

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.
@@ -1,8 +1,17 @@
1
1
  import type { ButtonProps } from "../button";
2
2
  import type { InputProps } from "../input";
3
3
  import type { LabelProps } from "../label";
4
+ import type { SelectProps } from "../select";
4
5
  import type { MouseEvent } from "react";
5
- export type DynamicListField = InputProps;
6
+ export type DynamicListFieldInput = Omit<InputProps, "id"> & {
7
+ fieldType?: "input";
8
+ id?: string;
9
+ };
10
+ export type DynamicListFieldSelect = Omit<SelectProps, "id"> & {
11
+ fieldType?: "select";
12
+ id?: string;
13
+ };
14
+ export type DynamicListField = DynamicListFieldInput | DynamicListFieldSelect;
6
15
  export type DynamicListDefault = {
7
16
  id?: string;
8
17
  name: string;
@@ -1,12 +1,10 @@
1
1
  import { type ButtonProps } from "../button";
2
- import { type InputProps } from "../input";
3
2
  import type { DynamicListProps } from "./DynamicList.model";
4
3
  import type { ReactNode } from "react";
5
4
  type DynamicListViewProps = Omit<DynamicListProps, "onChange" | "buttonAddProps" | "buttonDeleteProps"> & {
6
- fieldProps?: Omit<InputProps, "fieldType" | "multiline" | "rows" | "minRows" | "maxRows" | "type" | "name">;
7
5
  buttonAddProps?: Omit<ButtonProps, "title">;
8
6
  buttonDeleteProps?: Omit<ButtonProps, "title">;
9
7
  readOnly?: boolean;
10
8
  };
11
- export declare function DynamicListView({ id, label, labelProps, disabled, required, className, classNameList, fields, value, fieldProps, buttonAddProps, buttonDeleteProps, name, errorText, helperText, }: DynamicListViewProps): ReactNode;
9
+ export declare function DynamicListView({ id, label, labelProps, disabled, required, className, classNameList, fields, value, buttonAddProps, buttonDeleteProps, name, errorText, helperText, }: DynamicListViewProps): ReactNode;
12
10
  export {};
@@ -1,6 +1,10 @@
1
1
  import type { LabelProps } from "../label";
2
2
  import type { ChangeEvent, RefObject, ReactNode, Ref, MouseEventHandler, KeyboardEventHandler } from "react";
3
- export type SelectEvent = ChangeEvent<HTMLSelectElement> | null;
3
+ export type SelectEvent = {
4
+ target: {
5
+ dataset?: Record<string, unknown>;
6
+ };
7
+ } | ChangeEvent<HTMLSelectElement> | null;
4
8
  export interface SelectItem<Value extends string = string> {
5
9
  value: Value;
6
10
  label: string;
@@ -12,6 +16,7 @@ export interface SelectProps<Value extends string = string> {
12
16
  id: string;
13
17
  name?: string;
14
18
  items: SelectItem<Value>[];
19
+ fullWidth?: boolean;
15
20
  multiple?: boolean;
16
21
  disabled?: boolean;
17
22
  required?: boolean;
@@ -1,3 +1,3 @@
1
1
  import { type JSX } from "react";
2
2
  import type { SelectViewProps } from "./Select.model";
3
- export declare function SelectView<Value extends string = string>({ id, disabled, name, label, hideLabel, iconVisible, placeholder, helperText, errorText, className, fieldClassName, labelProps, required, multiple, value, items, _clientState, }: SelectViewProps<Value>): JSX.Element | null;
3
+ export declare function SelectView<Value extends string = string>({ id, disabled, name, label, fullWidth, hideLabel, iconVisible, placeholder, helperText, errorText, className, fieldClassName, labelProps, required, multiple, value, items, _clientState, }: SelectViewProps<Value>): JSX.Element | null;