@stella-source/stellasource-dsl 0.1.3 → 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.
- package/dist/cjs/index.js +8 -6
- 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 +8 -6
- 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 +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -17751,13 +17751,15 @@ const Loader = ({ size = 14, dataTestId, color, className, id, }) => {
|
|
|
17751
17751
|
return (a$i.createElement(CustomLoader, { "data-testid": dataTestId, size: size, weight: "bold", color: color ?? "var(--primary)", className: className, id: id }));
|
|
17752
17752
|
};
|
|
17753
17753
|
|
|
17754
|
-
const StellaButton = ({ disabled, variant = "primary", label, startIcon, endIcon, isLoading = false, className, id, htmlProps, onClick, }) => {
|
|
17754
|
+
const StellaButton = ({ disabled, variant = "primary", label, startIcon, endIcon, isLoading = false, className, id, htmlProps, onClick, preventDefault = true, type = "button", }) => {
|
|
17755
17755
|
const getIcon = (iconType, dataTestId) => {
|
|
17756
17756
|
return a$i.createElement(StellaIcon, { iconName: iconType, dataTestId: dataTestId, size: 14 });
|
|
17757
17757
|
};
|
|
17758
|
-
|
|
17759
|
-
|
|
17760
|
-
|
|
17758
|
+
const handleClick = (e) => {
|
|
17759
|
+
preventDefault && e.preventDefault();
|
|
17760
|
+
onClick?.(e);
|
|
17761
|
+
};
|
|
17762
|
+
return (a$i.createElement(ButtonComponent, { "$variant": variant, "$isLoading": isLoading, type: type, disabled: disabled, className: className, id: id, onClick: handleClick, ...htmlProps },
|
|
17761
17763
|
startIcon && getIcon(startIcon, "start-icon"),
|
|
17762
17764
|
label.toUpperCase(),
|
|
17763
17765
|
isLoading && a$i.createElement(Loader, { dataTestId: "loader", size: 14 }),
|
|
@@ -17881,9 +17883,9 @@ const IconContainer = dt.div `
|
|
|
17881
17883
|
`;
|
|
17882
17884
|
|
|
17883
17885
|
const TextFieldContainer = ({ id, label, children, tooltipText, endIcon, className, rightCategory, leftCategory, helperText, dataTestId, helperTextAffectLayout = true, disabled = false, hideLabel = false, isLoading = false, hasError = false, isRequired = false, }) => {
|
|
17884
|
-
return (a$i.createElement(Wrapper, { "data-testId": dataTestId },
|
|
17886
|
+
return (a$i.createElement(Wrapper, { "data-testId": dataTestId, className: className },
|
|
17885
17887
|
a$i.createElement(Label, { tooltipText: tooltipText, required: isRequired, labelValue: label, hideLabel: hideLabel, id: `${id}-label`, htmlFor: `${id}-text-field` }),
|
|
17886
|
-
a$i.createElement(TextFieldWrapper, { id: id,
|
|
17888
|
+
a$i.createElement(TextFieldWrapper, { id: id, "$hasError": hasError, "$isDisabled": disabled, "$isLoading": isLoading, "data-testid": "text-input-wrapper" },
|
|
17887
17889
|
leftCategory && a$i.createElement(Category, null, leftCategory),
|
|
17888
17890
|
children,
|
|
17889
17891
|
isLoading && (a$i.createElement(IconContainer, null,
|