@stella-source/stellasource-dsl 0.1.4 → 0.1.6
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.
- package/dist/cjs/index.js +36 -948
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/StellaButton/StellaButton.d.ts +1 -1
- package/dist/cjs/types/components/StellaButton/StellaButton.stories.d.ts +1 -1
- package/dist/cjs/types/components/StellaButton/types.d.ts +3 -1
- package/dist/esm/index.esm.js +37 -949
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/types/components/StellaButton/StellaButton.d.ts +1 -1
- package/dist/esm/types/components/StellaButton/StellaButton.stories.d.ts +1 -1
- package/dist/esm/types/components/StellaButton/types.d.ts +3 -1
- package/dist/index.d.ts +14 -12
- package/package.json +6 -3
|
@@ -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.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Design System owned and operated by Stella Source.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -41,7 +41,11 @@
|
|
|
41
41
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
42
42
|
"rollup-plugin-postcss": "^4.0.2",
|
|
43
43
|
"storybook": "^8.4.2",
|
|
44
|
-
"typescript": "^5.4.5"
|
|
44
|
+
"typescript": "^5.4.5",
|
|
45
|
+
"styled-components": "^6.1.11"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"styled-components": "^6.1.11"
|
|
45
49
|
},
|
|
46
50
|
"dependencies": {
|
|
47
51
|
"@phosphor-icons/react": "^2.1.7",
|
|
@@ -51,7 +55,6 @@
|
|
|
51
55
|
"@testing-library/react": "^16.0.0",
|
|
52
56
|
"@vitejs/plugin-react": "^4.3.1",
|
|
53
57
|
"antd": "^5.20.0",
|
|
54
|
-
"styled-components": "^6.1.11",
|
|
55
58
|
"tslib": "^2.6.3",
|
|
56
59
|
"vite-plugin-svgr": "^4.2.0",
|
|
57
60
|
"vitest": "^1.6.0"
|