@stella-source/stellasource-dsl 0.0.30 → 0.1.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.
Files changed (62) hide show
  1. package/dist/cjs/index.js +421 -124
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/IconButton/IconButton.stories.d.ts +2 -2
  4. package/dist/cjs/types/components/IconButton/styles.d.ts +1 -1
  5. package/dist/cjs/types/components/IconButton/types.d.ts +2 -2
  6. package/dist/cjs/types/components/StellaButton/StellaButton.d.ts +4 -0
  7. package/dist/{esm/types/components/Button/Button.stories.d.ts → cjs/types/components/StellaButton/StellaButton.stories.d.ts} +7 -7
  8. package/dist/{esm/types/components/Button → cjs/types/components/StellaButton}/styles.d.ts +3 -3
  9. package/dist/{esm/types/components/Button → cjs/types/components/StellaButton}/types.d.ts +6 -6
  10. package/dist/cjs/types/components/StellaIcon/types.d.ts +1 -1
  11. package/dist/cjs/types/components/TextField/NumberInput/NumberInput.d.ts +4 -0
  12. package/dist/cjs/types/components/TextField/NumberInput/NumberInput.stories.d.ts +6 -0
  13. package/dist/cjs/types/components/TextField/NumberInput/types.d.ts +33 -0
  14. package/dist/cjs/types/components/TextField/PasswordInput/PasswordInput.d.ts +4 -0
  15. package/dist/cjs/types/components/TextField/PasswordInput/PasswordInput.stories.d.ts +6 -0
  16. package/dist/cjs/types/components/TextField/PasswordInput/styles.d.ts +2 -0
  17. package/dist/cjs/types/components/TextField/PasswordInput/types.d.ts +26 -0
  18. package/dist/cjs/types/components/TextField/TextFieldContainer.d.ts +4 -0
  19. package/dist/cjs/types/components/TextField/TextInput/TextInput.d.ts +4 -0
  20. package/dist/cjs/types/components/TextField/TextInput/TextInput.stories.d.ts +6 -0
  21. package/dist/cjs/types/components/TextField/TextInput/types.d.ts +28 -0
  22. package/dist/cjs/types/components/TextField/styles.d.ts +11 -5
  23. package/dist/cjs/types/components/TextField/types.d.ts +13 -62
  24. package/dist/cjs/types/components/Tooltip/Tooltip.stories.d.ts +3 -3
  25. package/dist/cjs/types/index.d.ts +6 -3
  26. package/dist/cjs/types/shared/utils/numberHelpers.d.ts +1 -0
  27. package/dist/cjs/types/shared/utils/testing.d.ts +2 -1
  28. package/dist/esm/index.esm.js +856 -562
  29. package/dist/esm/index.esm.js.map +1 -1
  30. package/dist/esm/types/components/IconButton/IconButton.stories.d.ts +2 -2
  31. package/dist/esm/types/components/IconButton/styles.d.ts +1 -1
  32. package/dist/esm/types/components/IconButton/types.d.ts +2 -2
  33. package/dist/esm/types/components/StellaButton/StellaButton.d.ts +4 -0
  34. package/dist/{cjs/types/components/Button/Button.stories.d.ts → esm/types/components/StellaButton/StellaButton.stories.d.ts} +7 -7
  35. package/dist/{cjs/types/components/Button → esm/types/components/StellaButton}/styles.d.ts +3 -3
  36. package/dist/{cjs/types/components/Button → esm/types/components/StellaButton}/types.d.ts +6 -6
  37. package/dist/esm/types/components/StellaIcon/types.d.ts +1 -1
  38. package/dist/esm/types/components/TextField/NumberInput/NumberInput.d.ts +4 -0
  39. package/dist/esm/types/components/TextField/NumberInput/NumberInput.stories.d.ts +6 -0
  40. package/dist/esm/types/components/TextField/NumberInput/types.d.ts +33 -0
  41. package/dist/esm/types/components/TextField/PasswordInput/PasswordInput.d.ts +4 -0
  42. package/dist/esm/types/components/TextField/PasswordInput/PasswordInput.stories.d.ts +6 -0
  43. package/dist/esm/types/components/TextField/PasswordInput/styles.d.ts +2 -0
  44. package/dist/esm/types/components/TextField/PasswordInput/types.d.ts +26 -0
  45. package/dist/esm/types/components/TextField/TextFieldContainer.d.ts +4 -0
  46. package/dist/esm/types/components/TextField/TextInput/TextInput.d.ts +4 -0
  47. package/dist/esm/types/components/TextField/TextInput/TextInput.stories.d.ts +6 -0
  48. package/dist/esm/types/components/TextField/TextInput/types.d.ts +28 -0
  49. package/dist/esm/types/components/TextField/styles.d.ts +11 -5
  50. package/dist/esm/types/components/TextField/types.d.ts +13 -62
  51. package/dist/esm/types/components/Tooltip/Tooltip.stories.d.ts +3 -3
  52. package/dist/esm/types/index.d.ts +6 -3
  53. package/dist/esm/types/shared/utils/numberHelpers.d.ts +1 -0
  54. package/dist/esm/types/shared/utils/testing.d.ts +2 -1
  55. package/dist/index.d.ts +119 -10
  56. package/package.json +1 -2
  57. package/dist/cjs/types/components/Button/Button.d.ts +0 -4
  58. package/dist/cjs/types/components/TextField/TextField.d.ts +0 -4
  59. package/dist/cjs/types/components/TextField/TextField.stories.d.ts +0 -6
  60. package/dist/esm/types/components/Button/Button.d.ts +0 -4
  61. package/dist/esm/types/components/TextField/TextField.d.ts +0 -4
  62. package/dist/esm/types/components/TextField/TextField.stories.d.ts +0 -6
@@ -1,5 +1,5 @@
1
1
  import { IconButtonProps } from "./types";
2
- import { ButtonVariant } from "../Button/types";
2
+ import { StellaButtonVariant } from "../StellaButton/types";
3
3
  declare const _default: {
4
4
  title: string;
5
5
  component: ({ iconName, onClick, disabled, variant, isLoading, ariaLabel, className, id, htmlProps, size, }: IconButtonProps) => import("react").JSX.Element;
@@ -7,7 +7,7 @@ declare const _default: {
7
7
  parameters: {};
8
8
  argTypes: {
9
9
  variant: {
10
- options: ButtonVariant[];
10
+ options: StellaButtonVariant[];
11
11
  control: {
12
12
  type: string;
13
13
  };
@@ -1,3 +1,3 @@
1
- import { ButtonComponentStyles } from "../Button/styles";
1
+ import { ButtonComponentStyles } from "../StellaButton/styles";
2
2
  declare const IconButtonComponent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, never>, keyof ButtonComponentStyles> & ButtonComponentStyles, ButtonComponentStyles>> & string;
3
3
  export { IconButtonComponent };
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from "react";
2
- import { ButtonVariant } from "../Button/types";
2
+ import { StellaButtonVariant } from "../StellaButton/types";
3
3
  import { StellaIconDefinition } from "../StellaIcon/types";
4
4
  export interface IconButtonProps {
5
5
  iconName: `${StellaIconDefinition}`;
@@ -10,6 +10,6 @@ export interface IconButtonProps {
10
10
  className?: string;
11
11
  isLoading?: boolean;
12
12
  disabled?: boolean;
13
- variant?: `${ButtonVariant}`;
13
+ variant?: `${StellaButtonVariant}`;
14
14
  htmlProps?: HTMLAttributes<HTMLButtonElement>;
15
15
  }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { StellaButtonProps } from "./types";
3
+ declare const StellaButton: ({ disabled, variant, label, startIcon, endIcon, isLoading, className, id, htmlProps, onClick, }: StellaButtonProps) => React.JSX.Element;
4
+ export default StellaButton;
@@ -1,31 +1,31 @@
1
- import { ButtonVariant } from "./types";
2
- import { ButtonIcons, ButtonProps } from "./types";
1
+ import { StellaButtonVariant } from "./types";
2
+ import { StellaButtonIcons, StellaButtonProps } from "./types";
3
3
  declare const _default: {
4
4
  title: string;
5
- component: ({ disabled, variant, label, startIcon, endIcon, isLoading, className, id, htmlProps, onClick, }: ButtonProps) => import("react").JSX.Element;
5
+ component: ({ disabled, variant, label, startIcon, endIcon, isLoading, className, id, htmlProps, onClick, }: StellaButtonProps) => import("react").JSX.Element;
6
6
  tags: string[];
7
7
  parameters: {};
8
8
  argTypes: {
9
9
  variant: {
10
- options: ButtonVariant[];
10
+ options: StellaButtonVariant[];
11
11
  control: {
12
12
  type: string;
13
13
  };
14
14
  };
15
15
  startIcon: {
16
- options: (ButtonIcons | undefined)[];
16
+ options: (StellaButtonIcons | undefined)[];
17
17
  control: {
18
18
  type: string;
19
19
  };
20
20
  };
21
21
  endIcon: {
22
- options: (ButtonIcons | undefined)[];
22
+ options: (StellaButtonIcons | undefined)[];
23
23
  control: {
24
24
  type: string;
25
25
  };
26
26
  };
27
27
  };
28
- args: ButtonProps;
28
+ args: StellaButtonProps;
29
29
  };
30
30
  export default _default;
31
31
  export declare const Button: {};
@@ -1,7 +1,7 @@
1
- import { ButtonVariant } from "./types";
1
+ import { StellaButtonVariant } from "./types";
2
2
  export interface ButtonComponentStyles {
3
- $variant: `${ButtonVariant}`;
4
- $isLoading: boolean;
3
+ $variant: `${StellaButtonVariant}`;
4
+ $isLoading?: boolean;
5
5
  }
6
6
  declare const ButtonComponent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>, never>, ButtonComponentStyles>> & string;
7
7
  export { ButtonComponent };
@@ -1,22 +1,22 @@
1
1
  import { HTMLAttributes } from "react";
2
- export declare enum ButtonIcons {
2
+ export declare enum StellaButtonIcons {
3
3
  ADD = "add",
4
4
  CHEVRON_DOWN = "chevron-down"
5
5
  }
6
- export declare enum ButtonVariant {
6
+ export declare enum StellaButtonVariant {
7
7
  PRIMARY = "primary",
8
8
  SECONDARY = "secondary",
9
9
  TERTIARY = "tertiary"
10
10
  }
11
- export interface ButtonProps {
11
+ export interface StellaButtonProps {
12
12
  label: string;
13
13
  onClick: () => void;
14
14
  id?: string;
15
15
  className?: string;
16
16
  isLoading?: boolean;
17
- startIcon?: `${ButtonIcons}`;
18
- endIcon?: `${ButtonIcons}`;
17
+ startIcon?: `${StellaButtonIcons}`;
18
+ endIcon?: `${StellaButtonIcons}`;
19
19
  disabled?: boolean;
20
- variant?: `${ButtonVariant}`;
20
+ variant?: `${StellaButtonVariant}`;
21
21
  htmlProps?: HTMLAttributes<HTMLButtonElement>;
22
22
  }
@@ -1,4 +1,4 @@
1
- export type StellaIconDefinition = "search" | "required" | "help" | "info" | "kebab-menu" | "error" | "warning" | "filter" | "sort" | "close" | "add" | "stella-logo" | "chevron-right" | "chevron-down" | "caret-right" | "caret-down" | "success" | "in-progress" | "complete" | "calendar" | "unlocked" | "locked" | "settings" | "preferences" | "account-settings" | "user" | "company-details" | "collapse" | "expand" | "star-filled" | "star-outline" | "dashboard" | "shopping-cart" | "calculator" | "pricing-strategies" | "stella-finance" | "resource-center" | "line-item-pricing" | "basket-pricing" | "paperclip" | "thumbs-up" | "thumbs-down" | "send" | "palette";
1
+ export type StellaIconDefinition = "search" | "required" | "help" | "info" | "kebab-menu" | "error" | "warning" | "filter" | "sort" | "close" | "add" | "stella-logo" | "chevron-right" | "chevron-down" | "caret-right" | "caret-down" | "success" | "in-progress" | "complete" | "calendar" | "unlocked" | "locked" | "settings" | "preferences" | "account-settings" | "user" | "company-details" | "collapse" | "expand" | "star-filled" | "star-outline" | "dashboard" | "shopping-cart" | "calculator" | "pricing-strategies" | "stella-finance" | "resource-center" | "line-item-pricing" | "basket-pricing" | "paperclip" | "thumbs-up" | "thumbs-down" | "send" | "palette" | "eye" | "eye-slash";
2
2
  export interface StellaIconProps {
3
3
  iconName: StellaIconDefinition;
4
4
  size?: number;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { NumberInputProps } from "./types";
3
+ declare const NumberInput: ({ id, className, htmlProps, leftCategory, rightCategory, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder, textAlign, isTruncated, helperTextAffectLayout, hideLabel, disabled, isLoading, hasError, thousandSeparator, decimalPlaces, ariaDescribedBy, }: NumberInputProps) => React.JSX.Element;
4
+ export default NumberInput;
@@ -0,0 +1,6 @@
1
+ import NumberInputComponent from "./NumberInput";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ declare const meta: Meta<typeof NumberInputComponent>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof NumberInputComponent>;
6
+ export declare const NumberInput: Story;
@@ -0,0 +1,33 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { StellaIconDefinition } from "../../StellaIcon/types";
3
+ import { TextFieldAlignments, TextFieldLeftCategory, TextFieldRightCategory } from "../types";
4
+ export interface NumberInputProps {
5
+ id: string;
6
+ label: string;
7
+ onChange: (val: string) => void;
8
+ onBlur?: (val: string) => void;
9
+ onFocus?: (val: string) => void;
10
+ hideLabel?: boolean;
11
+ value?: number | string;
12
+ className?: string;
13
+ placeholder?: string;
14
+ isRequired?: boolean;
15
+ /** passing in disabled + value creates a readOnly look */
16
+ disabled?: boolean;
17
+ maxLength?: number;
18
+ tooltipText?: string;
19
+ isLoading?: boolean;
20
+ helperText?: string;
21
+ helperTextAffectLayout?: boolean;
22
+ isTruncated?: boolean;
23
+ endIcon?: `${StellaIconDefinition}`;
24
+ hasError?: boolean;
25
+ textAlign?: `${TextFieldAlignments}`;
26
+ leftCategory?: `${TextFieldLeftCategory}`;
27
+ rightCategory?: `${TextFieldRightCategory}`;
28
+ thousandSeparator?: boolean;
29
+ decimalPlaces?: number;
30
+ /** for any extra text elements that need to be associated */
31
+ ariaDescribedBy?: string;
32
+ htmlProps?: HTMLAttributes<HTMLInputElement>;
33
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { PasswordInputProps } from "./types";
3
+ declare const PasswordInput: ({ id, className, htmlProps, label, placeholder, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, textAlign, isHidden, helperTextAffectLayout, hideLabel, disabled, hasError, ariaDescribedBy, }: PasswordInputProps) => React.JSX.Element;
4
+ export default PasswordInput;
@@ -0,0 +1,6 @@
1
+ import PasswordInputComponent from "./PasswordInput";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ declare const meta: Meta<typeof PasswordInputComponent>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof PasswordInputComponent>;
6
+ export declare const PasswordInput: Story;
@@ -0,0 +1,2 @@
1
+ declare const CustomIconButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../../IconButton/types").IconButtonProps, never>> & string & Omit<({ iconName, onClick, disabled, variant, isLoading, ariaLabel, className, id, htmlProps, size, }: import("../../IconButton/types").IconButtonProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
2
+ export { CustomIconButton };
@@ -0,0 +1,26 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { TextFieldAlignments } from "../types";
3
+ export interface PasswordInputProps {
4
+ id: string;
5
+ label: string;
6
+ onChange: (val: string) => void;
7
+ onBlur?: (val: string) => void;
8
+ onFocus?: (val: string) => void;
9
+ hideLabel?: boolean;
10
+ value?: number | string;
11
+ className?: string;
12
+ placeholder?: string;
13
+ isRequired?: boolean;
14
+ /** passing in disabled + value creates a readOnly look */
15
+ disabled?: boolean;
16
+ maxLength?: number;
17
+ tooltipText?: string;
18
+ helperText?: string;
19
+ isHidden?: boolean;
20
+ helperTextAffectLayout?: boolean;
21
+ hasError?: boolean;
22
+ textAlign?: `${TextFieldAlignments}`;
23
+ /** for any extra text elements that need to be associated */
24
+ ariaDescribedBy?: string;
25
+ htmlProps?: HTMLAttributes<HTMLInputElement>;
26
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { TextFieldContainerProps } from "./types";
3
+ declare const TextFieldContainer: ({ id, label, children, tooltipText, endIcon, className, rightCategory, leftCategory, helperText, dataTestId, helperTextAffectLayout, disabled, hideLabel, isLoading, hasError, isRequired, }: TextFieldContainerProps) => React.JSX.Element;
4
+ export default TextFieldContainer;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { TextInputProps } from "./types";
3
+ declare const TextInput: ({ id, className, htmlProps, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder, textAlign, helperTextAffectLayout, hideLabel, disabled, hasError, isLoading, ariaDescribedBy, }: TextInputProps) => React.JSX.Element;
4
+ export default TextInput;
@@ -0,0 +1,6 @@
1
+ import TextInputComponent from "./TextInput";
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ declare const meta: Meta<typeof TextInputComponent>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TextInputComponent>;
6
+ export declare const TextInput: Story;
@@ -0,0 +1,28 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { TextFieldAlignments } from "../types";
3
+ import { StellaIconDefinition } from "../../StellaIcon/types";
4
+ export interface TextInputProps {
5
+ id: string;
6
+ label: string;
7
+ onChange: (val: string) => void;
8
+ onBlur?: (val: string) => void;
9
+ onFocus?: (val: string) => void;
10
+ hideLabel?: boolean;
11
+ isLoading?: boolean;
12
+ value?: number | string;
13
+ className?: string;
14
+ placeholder?: string;
15
+ isRequired?: boolean;
16
+ endIcon?: `${StellaIconDefinition}`;
17
+ /** passing in disabled + value creates a readOnly look */
18
+ disabled?: boolean;
19
+ maxLength?: number;
20
+ tooltipText?: string;
21
+ helperText?: string;
22
+ helperTextAffectLayout?: boolean;
23
+ hasError?: boolean;
24
+ textAlign?: `${TextFieldAlignments}`;
25
+ /** for any extra text elements that need to be associated */
26
+ ariaDescribedBy?: string;
27
+ htmlProps?: HTMLAttributes<HTMLInputElement>;
28
+ }
@@ -1,11 +1,17 @@
1
1
  interface TextFieldInputProps {
2
2
  $textAlign?: "left" | "center" | "right";
3
- $isTruncated: boolean;
3
+ $isTruncated?: boolean;
4
+ $isDisabled?: boolean;
5
+ $isLoading?: boolean;
6
+ }
7
+ interface TextFieldWrapperProps {
8
+ $isDisabled?: boolean;
9
+ $hasError?: boolean;
10
+ $isLoading?: boolean;
4
11
  }
5
12
  declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
- declare const TextFieldWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
+ declare const TextFieldWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, TextFieldWrapperProps>> & string;
7
14
  declare const TextFieldInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, TextFieldInputProps>> & string;
8
15
  declare const Category: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
9
- declare const CustomLoader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../Loader/types").LoaderProps, never>> & string & Omit<({ size, dataTestId, color, className, id, }: import("../Loader/types").LoaderProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
10
- declare const EndIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../StellaIcon/types").StellaIconProps, never>> & string & Omit<({ iconName, size, color, className, id, dataTestId, }: import("../StellaIcon/types").StellaIconProps) => import("react").JSX.Element, keyof import("react").Component<any, {}, any>>;
11
- export { Wrapper, TextFieldWrapper, TextFieldInput, Category, CustomLoader, EndIcon, };
16
+ declare const IconContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
17
+ export { Wrapper, TextFieldWrapper, TextFieldInput, Category, IconContainer };
@@ -1,4 +1,3 @@
1
- import { HTMLAttributes } from "react";
2
1
  import { StellaIconDefinition } from "../StellaIcon/types";
3
2
  export declare enum TextFieldAlignments {
4
3
  LEFT = "left",
@@ -20,69 +19,21 @@ export declare enum TextFieldRightCategory {
20
19
  MINUTES = "min",
21
20
  HOURS = "hr"
22
21
  }
23
- export declare enum TextFieldType {
24
- TEXT = "text",
25
- NUMBER = "number",
26
- PASSWORD = "password"
27
- }
28
- export declare enum TextFieldPasswordStrength {
29
- WEAK = "weak",
30
- MEDIUM = "medium",
31
- STRONG = "strong"
32
- }
33
- interface TextFieldPasswordProps {
34
- type: `${TextFieldType.PASSWORD}`;
35
- endIcon?: never;
36
- leftCategory?: never;
37
- rightCategory?: never;
38
- isTruncated?: never;
39
- textAlign?: never;
40
- }
41
- interface TextFieldNumberProps {
42
- type: `${TextFieldType.NUMBER}`;
43
- leftCategory?: `${TextFieldLeftCategory}`;
44
- rightCategory?: `${TextFieldRightCategory}`;
45
- isTruncated?: boolean;
46
- textAlign?: `${TextFieldAlignments}`;
47
- maxLength?: never;
48
- maxValue?: number;
49
- minValue?: number;
50
- thousandSeparator?: boolean;
51
- decimalPlaces?: number;
52
- }
53
- interface TextFieldTextProps {
54
- type: `${TextFieldType.TEXT}`;
55
- endIcon?: `${StellaIconDefinition}`;
56
- leftCategory?: `${TextFieldLeftCategory}`;
57
- rightCategory?: `${TextFieldRightCategory}`;
58
- isTruncated?: boolean;
59
- textAlign?: `${TextFieldAlignments}`;
60
- maxLength?: number;
61
- }
62
- export interface TextFieldBaseProps {
22
+ export interface TextFieldContainerProps {
23
+ children: React.ReactNode;
63
24
  id: string;
64
- className?: string;
65
25
  label: string;
66
- placeholder?: string;
67
- type?: `${TextFieldType}`;
68
- onChange: () => void;
69
- onBlur: () => void;
70
- isRequired: boolean;
71
- disabled: boolean;
72
- maxLength: number;
73
- tooltipText: string;
74
- isLoading: boolean;
26
+ hideLabel?: boolean;
27
+ disabled?: boolean;
28
+ dataTestId?: string;
29
+ rightCategory?: `${TextFieldRightCategory}`;
30
+ leftCategory?: `${TextFieldLeftCategory}`;
31
+ tooltipText?: string;
32
+ isRequired?: boolean;
75
33
  helperText?: string;
76
34
  helperTextAffectLayout?: boolean;
77
- isTruncated: boolean;
78
- endIcon: `${StellaIconDefinition}`;
79
- hasError: boolean;
80
- textAlign?: `${TextFieldAlignments}`;
81
- leftCategory?: `${TextFieldLeftCategory}`;
82
- rightCategory?: `${TextFieldRightCategory}`;
83
- ariaDescribedBy?: string;
84
- readOnly?: boolean;
85
- htmlProps?: HTMLAttributes<HTMLInputElement>;
35
+ isLoading?: boolean;
36
+ endIcon?: `${StellaIconDefinition}`;
37
+ hasError?: boolean;
38
+ className?: string;
86
39
  }
87
- export type TextFieldProps = TextFieldBaseProps & (TextFieldPasswordProps | TextFieldNumberProps | TextFieldTextProps);
88
- export {};
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
- import { TooltipIconType, StellaTooltipProps } from "./types";
2
+ import { TooltipIconType, TooltipProps } from "./types";
3
3
  declare const _default: {
4
4
  title: string;
5
- component: ({ title, placement, type, ariaLabel, iconSize, htmlProps, className, id, }: import("./types").TooltipProps) => React.JSX.Element;
5
+ component: ({ title, placement, type, ariaLabel, iconSize, htmlProps, className, id, }: TooltipProps) => React.JSX.Element;
6
6
  tags: string[];
7
7
  parameters: {
8
8
  layout: string;
@@ -15,7 +15,7 @@ declare const _default: {
15
15
  };
16
16
  };
17
17
  };
18
- args: StellaTooltipProps;
18
+ args: TooltipProps;
19
19
  };
20
20
  export default _default;
21
21
  export declare const Tooltip: {
@@ -1,15 +1,18 @@
1
1
  /** Components */
2
2
  import Label from "./components/Label/Label";
3
- import Button from "./components/Button/Button";
3
+ import StellaButton from "./components/StellaButton/StellaButton";
4
4
  import Loader from "./components/Loader/Loader";
5
5
  import HelperText from "./components/HelperText/HelperText";
6
6
  import Tooltip from "./components/Tooltip/Tooltip";
7
7
  import StellaIcon from "./components/StellaIcon/StellaIcon";
8
8
  import IconButton from "./components/IconButton/IconButton";
9
+ import TextInput from "./components/TextField/TextInput/TextInput";
10
+ import PasswordInput from "./components/TextField/PasswordInput/PasswordInput";
11
+ import NumberInput from "./components/TextField/NumberInput/NumberInput";
9
12
  /** Types */
10
- import { ButtonVariant } from "./components/Button/types";
13
+ import { StellaButtonVariant } from "./components/StellaButton/types";
11
14
  /** Tokens */
12
15
  import { Styles } from "./shared/tokens";
13
16
  import "./shared/tokens/tokens.css";
14
17
  export type { StellaIconDefinition } from "./components/StellaIcon/types";
15
- export { Label, Button, IconButton, Loader, HelperText, Tooltip, StellaIcon, ButtonVariant, Styles, };
18
+ export { Label, StellaButton, IconButton, Loader, HelperText, Tooltip, StellaIcon, TextInput, PasswordInput, NumberInput, StellaButtonVariant, Styles, };
@@ -0,0 +1 @@
1
+ export declare const formatDynamicNumbersWithCommas: (num: number | string, decimalPlaces: number) => string;
@@ -1,6 +1,7 @@
1
+ import React from "react";
1
2
  import { queries } from "@testing-library/react";
2
3
  import { Options } from "@testing-library/user-event";
3
- declare const setup: (jsx: JSX.Element, setupOptions?: Options) => {
4
+ declare const setup: (jsx: React.JSX.Element, setupOptions?: Options) => {
4
5
  container: HTMLElement;
5
6
  baseElement: HTMLElement;
6
7
  debug: (baseElement?: ReactDOMClient.Container | any | Array<ReactDOMClient.Container | any> | undefined, maxLength?: number | undefined, options?: import("pretty-format").OptionsReceived | undefined) => void;