@stella-source/stellasource-dsl 0.1.4 → 0.1.5

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,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { StellaButtonProps } from "./types";
3
- declare const StellaButton: ({ disabled, variant, label, startIcon, endIcon, isLoading, className, id, htmlProps, onClick, }: StellaButtonProps) => React.JSX.Element;
3
+ declare const StellaButton: ({ disabled, variant, label, startIcon, endIcon, isLoading, className, id, htmlProps, onClick, preventDefault, type, }: StellaButtonProps) => React.JSX.Element;
4
4
  export default StellaButton;
@@ -2,7 +2,7 @@ import { StellaButtonVariant } from "./types";
2
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, }: StellaButtonProps) => import("react").JSX.Element;
5
+ component: ({ disabled, variant, label, startIcon, endIcon, isLoading, className, id, htmlProps, onClick, preventDefault, type, }: StellaButtonProps) => import("react").JSX.Element;
6
6
  tags: string[];
7
7
  parameters: {};
8
8
  argTypes: {
@@ -10,13 +10,15 @@ export declare enum StellaButtonVariant {
10
10
  }
11
11
  export interface StellaButtonProps {
12
12
  label: string;
13
- onClick: () => void;
13
+ onClick: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
14
14
  id?: string;
15
+ type?: "button" | "submit" | "reset";
15
16
  className?: string;
16
17
  isLoading?: boolean;
17
18
  startIcon?: `${StellaButtonIcons}`;
18
19
  endIcon?: `${StellaButtonIcons}`;
19
20
  disabled?: boolean;
21
+ preventDefault?: boolean;
20
22
  variant?: `${StellaButtonVariant}`;
21
23
  htmlProps?: HTMLAttributes<HTMLButtonElement>;
22
24
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React, { HTMLAttributes, ReactElement } from 'react';
1
+ import React$1, { HTMLAttributes, ReactElement } from 'react';
2
2
  import { TooltipProps as TooltipProps$1 } from 'antd';
3
3
 
4
4
  interface LabelProps {
@@ -24,7 +24,7 @@ interface LabelWithChildrenProps {
24
24
  htmlProps?: HTMLAttributes<HTMLLabelElement>;
25
25
  }
26
26
 
27
- declare const Label: ({ hideLabel, labelValue, required, tooltipText, children, htmlFor, htmlProps, id, className, }: LabelProps | LabelWithChildrenProps) => React.JSX.Element;
27
+ declare const Label: ({ hideLabel, labelValue, required, tooltipText, children, htmlFor, htmlProps, id, className, }: LabelProps | LabelWithChildrenProps) => React$1.JSX.Element;
28
28
 
29
29
  declare enum StellaButtonIcons {
30
30
  ADD = "add",
@@ -37,18 +37,20 @@ declare enum StellaButtonVariant {
37
37
  }
38
38
  interface StellaButtonProps {
39
39
  label: string;
40
- onClick: () => void;
40
+ onClick: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
41
41
  id?: string;
42
+ type?: "button" | "submit" | "reset";
42
43
  className?: string;
43
44
  isLoading?: boolean;
44
45
  startIcon?: `${StellaButtonIcons}`;
45
46
  endIcon?: `${StellaButtonIcons}`;
46
47
  disabled?: boolean;
48
+ preventDefault?: boolean;
47
49
  variant?: `${StellaButtonVariant}`;
48
50
  htmlProps?: HTMLAttributes<HTMLButtonElement>;
49
51
  }
50
52
 
51
- declare const StellaButton: ({ disabled, variant, label, startIcon, endIcon, isLoading, className, id, htmlProps, onClick, }: StellaButtonProps) => React.JSX.Element;
53
+ declare const StellaButton: ({ disabled, variant, label, startIcon, endIcon, isLoading, className, id, htmlProps, onClick, preventDefault, type, }: StellaButtonProps) => React$1.JSX.Element;
52
54
 
53
55
  interface LoaderProps {
54
56
  size?: number;
@@ -58,7 +60,7 @@ interface LoaderProps {
58
60
  id?: string;
59
61
  }
60
62
 
61
- declare const Loader: ({ size, dataTestId, color, className, id, }: LoaderProps) => React.JSX.Element;
63
+ declare const Loader: ({ size, dataTestId, color, className, id, }: LoaderProps) => React$1.JSX.Element;
62
64
 
63
65
  declare enum HelperTextType {
64
66
  ERROR = "error",
@@ -73,7 +75,7 @@ interface HelperTextProps {
73
75
  htmlProps?: HTMLAttributes<HTMLDivElement>;
74
76
  }
75
77
 
76
- declare const HelperText: ({ id, className, affectLayout, text, type, htmlProps, }: HelperTextProps) => React.JSX.Element;
78
+ declare const HelperText: ({ id, className, affectLayout, text, type, htmlProps, }: HelperTextProps) => React$1.JSX.Element;
77
79
 
78
80
  declare enum TooltipIconType {
79
81
  WARNING = "warning",
@@ -90,7 +92,7 @@ interface TooltipProps {
90
92
  htmlProps?: TooltipProps$1;
91
93
  }
92
94
 
93
- declare const Tooltip: ({ title, placement, type, ariaLabel, iconSize, htmlProps, className, id, }: TooltipProps) => React.JSX.Element;
95
+ declare const Tooltip: ({ title, placement, type, ariaLabel, iconSize, htmlProps, className, id, }: TooltipProps) => React$1.JSX.Element;
94
96
 
95
97
  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";
96
98
  interface StellaIconProps {
@@ -102,7 +104,7 @@ interface StellaIconProps {
102
104
  id?: string;
103
105
  }
104
106
 
105
- declare const StellaIcon: ({ iconName, size, color, className, id, dataTestId, }: StellaIconProps) => React.JSX.Element;
107
+ declare const StellaIcon: ({ iconName, size, color, className, id, dataTestId, }: StellaIconProps) => React$1.JSX.Element;
106
108
 
107
109
  interface IconButtonProps {
108
110
  iconName: `${StellaIconDefinition}`;
@@ -117,7 +119,7 @@ interface IconButtonProps {
117
119
  htmlProps?: HTMLAttributes<HTMLButtonElement>;
118
120
  }
119
121
 
120
- declare const IconButton: ({ iconName, onClick, disabled, variant, isLoading, ariaLabel, className, id, htmlProps, size, }: IconButtonProps) => React.JSX.Element;
122
+ declare const IconButton: ({ iconName, onClick, disabled, variant, isLoading, ariaLabel, className, id, htmlProps, size, }: IconButtonProps) => React$1.JSX.Element;
121
123
 
122
124
  declare enum TextFieldAlignments {
123
125
  LEFT = "left",
@@ -166,7 +168,7 @@ interface TextInputProps {
166
168
  htmlProps?: HTMLAttributes<HTMLInputElement>;
167
169
  }
168
170
 
169
- 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;
171
+ 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$1.JSX.Element;
170
172
 
171
173
  interface PasswordInputProps {
172
174
  id: string;
@@ -193,7 +195,7 @@ interface PasswordInputProps {
193
195
  htmlProps?: HTMLAttributes<HTMLInputElement>;
194
196
  }
195
197
 
196
- 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;
198
+ 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$1.JSX.Element;
197
199
 
198
200
  interface NumberInputProps {
199
201
  id: string;
@@ -227,7 +229,7 @@ interface NumberInputProps {
227
229
  htmlProps?: HTMLAttributes<HTMLInputElement>;
228
230
  }
229
231
 
230
- 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, allowNegativeNumbers, ariaDescribedBy, }: NumberInputProps) => React.JSX.Element;
232
+ 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, allowNegativeNumbers, ariaDescribedBy, }: NumberInputProps) => React$1.JSX.Element;
231
233
 
232
234
  declare const Styles: {
233
235
  color: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stella-source/stellasource-dsl",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Design System owned and operated by Stella Source.",
5
5
  "files": [
6
6
  "dist"