@stenajs-webui/forms 19.0.0-next.43 → 19.0.0-next.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.
@@ -10,6 +10,10 @@ interface ExtraContent {
10
10
  contentLeft?: React.ReactNode;
11
11
  /** React node to put to the right. Right icon is ignored if this is set. */
12
12
  contentRight?: React.ReactNode;
13
+ /** TextInputButton to the left. Left icon and content is ignored if this is set. */
14
+ buttonLeft?: React.ReactNode;
15
+ /** React node to put to the right. Right icon and content is ignored if this is set. */
16
+ buttonRight?: React.ReactNode;
13
17
  /** If true, there will be no padding between contentLeft/contentRight and the border. */
14
18
  disableContentPadding?: boolean;
15
19
  /** If true, there will be no padding between contentLeft and the border. */
@@ -20,10 +24,6 @@ interface ExtraContent {
20
24
  iconLeft?: IconDefinition;
21
25
  /** Icon on the right side. */
22
26
  iconRight?: IconDefinition;
23
- /** On click left. */
24
- onClickLeft?: () => void;
25
- /** On click right. */
26
- onClickRight?: () => void;
27
27
  }
28
28
  export interface TextInputProps extends FullOnChangeProps<string, ChangeEvent<HTMLInputElement>>, InputProps, ExtraContent {
29
29
  wrapperStyle?: CSSProperties;
@@ -1,7 +1,13 @@
1
1
  import * as React from "react";
2
2
  import { ReactNode } from "react";
3
3
  import { TextInputProps } from "./TextInput";
4
- export interface TextInputBoxProps extends Pick<TextInputProps, "variant" | "wrapperClassName" | "disabled" | "wrapperStyle" | "contentLeft" | "contentRight" | "disableContentPadding" | "disableContentPaddingLeft" | "disableContentPaddingRight" | "iconRight" | "iconLeft" | "onClickLeft" | "onClickRight"> {
4
+ import { ButtonElementProps } from "@stenajs-webui/core";
5
+ import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
6
+ export interface TextInputBoxProps extends Pick<TextInputProps, "variant" | "wrapperClassName" | "disabled" | "wrapperStyle" | "contentLeft" | "contentRight" | "disableContentPadding" | "disableContentPaddingLeft" | "disableContentPaddingRight"> {
5
7
  children?: ReactNode;
8
+ iconRight?: IconDefinition;
9
+ iconLeft?: IconDefinition;
10
+ onClickLeft?: ButtonElementProps["onClick"];
11
+ onClickRight?: ButtonElementProps["onClick"];
6
12
  }
7
13
  export declare const TextInputBox: React.FC<TextInputBoxProps>;
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { ButtonElementProps } from "@stenajs-webui/core";
3
+ import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
4
+ export declare type TextInputButtonVariant = "normal" | "danger";
5
+ export interface TextInputButtonProps extends ButtonElementProps {
6
+ variant?: TextInputButtonVariant;
7
+ icon: IconDefinition;
8
+ }
9
+ export declare const TextInputButton: React.FC<TextInputButtonProps>;
@@ -3,12 +3,12 @@ import * as React from "react";
3
3
  export interface TextInputIconProps {
4
4
  iconClassName?: string;
5
5
  content?: React.ReactNode;
6
+ button?: React.ReactNode;
6
7
  icon?: IconDefinition;
7
8
  spaceOnRight?: boolean;
8
9
  spaceOnLeft?: boolean;
9
10
  disableContentPadding?: boolean;
10
11
  disableContentPaddingLeft?: boolean;
11
12
  disableContentPaddingRight?: boolean;
12
- onClick?: () => void;
13
13
  }
14
14
  export declare const TextInputIcon: React.FC<TextInputIconProps>;
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export * from "./components/ui/input-label/InputLabelText";
13
13
  export * from "./components/ui/labelled-text-input/LabelledTextInput";
14
14
  export * from "./components/ui/text-input/TextInput";
15
15
  export * from "./components/ui/text-input/TextInputBox";
16
+ export * from "./components/ui/text-input/TextInputButton";
16
17
  export * from "./components/ui/text-area/TextArea";
17
18
  export * from "./components/ui/types";
18
19
  export * from "./hooks/UseKeyboardNavigation";