@allxsmith/bestax-bulma 5.1.2 → 5.2.0
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/README.md +57 -34
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/types/elements/Button.d.ts +1 -1
- package/dist/types/elements/Link.d.ts +1 -0
- package/package.json +1 -1
- package/src/scss/CLAUDE.md +55 -0
package/dist/index.esm.js
CHANGED
|
@@ -2237,7 +2237,7 @@ const DialogContainer = () => {
|
|
|
2237
2237
|
};
|
|
2238
2238
|
|
|
2239
2239
|
const validButtonColors = [...validColors, 'text', 'ghost'];
|
|
2240
|
-
const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWidth, isOutlined, isInverted, isFocused, isActive, isHovered, isDisabled, className, children, textColor, bgColor, as = 'button', href, onClick, target, rel, ...props }) => {
|
|
2240
|
+
const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWidth, isOutlined, isInverted, isFocused, isActive, isHovered, isDisabled, className, children, textColor, bgColor, as: Component = 'button', href, onClick, target, rel, ...props }) => {
|
|
2241
2241
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2242
2242
|
color: textColor,
|
|
2243
2243
|
backgroundColor: bgColor,
|
|
@@ -2260,9 +2260,9 @@ const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWi
|
|
|
2260
2260
|
'is-fullwidth': isFullWidth,
|
|
2261
2261
|
});
|
|
2262
2262
|
const buttonClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
2263
|
-
if (
|
|
2263
|
+
if (Component !== 'button') {
|
|
2264
2264
|
const { type: _type, disabled: _disabled, form: _form, formAction: _formAction, formEncType: _formEncType, formMethod: _formMethod, formNoValidate: _formNoValidate, formTarget: _formTarget, name: _name, value: _value, autoFocus: _autoFocus, ...anchorRest } = rest;
|
|
2265
|
-
return (jsx(
|
|
2265
|
+
return (jsx(Component, { className: buttonClasses, href: href, target: target, rel: rel, "aria-disabled": isDisabled, tabIndex: isDisabled ? -1 : undefined, onClick: isDisabled
|
|
2266
2266
|
? (e) => e.preventDefault()
|
|
2267
2267
|
: onClick, ...anchorRest, children: children }));
|
|
2268
2268
|
}
|
|
@@ -2675,7 +2675,7 @@ const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, s
|
|
|
2675
2675
|
return (jsx(Tag, { className: imageClasses, ...rest, children: content }));
|
|
2676
2676
|
};
|
|
2677
2677
|
|
|
2678
|
-
const Link = ({ className, textColor, bgColor, isActive, children, ...props }) => {
|
|
2678
|
+
const Link = ({ className, textColor, bgColor, isActive, as: Component = 'a', children, ...props }) => {
|
|
2679
2679
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2680
2680
|
color: textColor,
|
|
2681
2681
|
backgroundColor: bgColor,
|
|
@@ -2685,7 +2685,7 @@ const Link = ({ className, textColor, bgColor, isActive, children, ...props }) =
|
|
|
2685
2685
|
'is-active': isActive,
|
|
2686
2686
|
});
|
|
2687
2687
|
const linkClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
2688
|
-
return (jsx(
|
|
2688
|
+
return (jsx(Component, { className: linkClasses || undefined, ...rest, children: children }));
|
|
2689
2689
|
};
|
|
2690
2690
|
|
|
2691
2691
|
const ListItem = ({ className, textColor, bgColor, children, ...props }) => {
|