@aurora-ds/components 1.1.0 → 1.1.2

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/esm/index.js CHANGED
@@ -559,11 +559,11 @@ const ICON_SIZE$2 = {
559
559
  /**
560
560
  * Theme-aware button built on `createVariants`.
561
561
  *
562
- * @example <Button onClick={save}>Save</Button>
563
- * @example <Button variant='outlined' color='error' startIcon={IconRegistry.CloseIcon}>Delete</Button>
564
- * @example <Button color='success' isLoading width='100%'>Submitting…</Button>
562
+ * @example <Button label='Save' onClick={save} />
563
+ * @example <Button label='Delete' variant='outlined' color='error' startIcon={IconRegistry.CloseIcon} />
564
+ * @example <Button label='Submitting…' color='success' isLoading width='100%' />
565
565
  */
566
- const Button = ({ ref, variant = 'contained', color = 'primary', size = 'md', width, flexGrow, flexShrink, isLoading = false, startIcon: StartIcon, endIcon: EndIcon, children, className, type = 'button', disabled, style, ...rest }) => {
566
+ const Button = ({ ref, variant = 'contained', color = 'primary', size = 'md', width, flexGrow, flexShrink, isLoading = false, startIcon: StartIcon, endIcon: EndIcon, label, className, type = 'button', disabled, style, ...rest }) => {
567
567
  const isDisabled = disabled || isLoading;
568
568
  const iconSize = ICON_SIZE$2[size];
569
569
  const rootClassName = BUTTON_VARIANTS({ variant, color, size }, className);
@@ -573,7 +573,7 @@ const Button = ({ ref, variant = 'contained', color = 'primary', size = 'md', wi
573
573
  ...(flexGrow !== undefined ? { flexGrow } : {}),
574
574
  ...(flexShrink !== undefined ? { flexShrink } : {}),
575
575
  };
576
- return (jsxs("button", { ref: ref, type: type, className: rootClassName, disabled: isDisabled, "aria-busy": isLoading || undefined, style: mergedStyle, ...rest, children: [isLoading && (jsx("span", { className: BUTTON_STYLES.spinnerWrap, children: jsx(Icon, { icon: SpinnerIcon, size: iconSize, className: BUTTON_STYLES.spinnerIcon }) })), jsxs("span", { className: cx(BUTTON_STYLES.content, isLoading && BUTTON_STYLES.contentHidden), children: [StartIcon && (jsx(Icon, { icon: StartIcon, size: iconSize })), children !== undefined && children !== null && (jsx(Text, { variant: 'span', fontSize: LABEL_FONT_SIZE$1[size], fontWeight: 'medium', lineHeight: 'none', children: children })), EndIcon && (jsx(Icon, { icon: EndIcon, size: iconSize }))] })] }));
576
+ return (jsxs("button", { ref: ref, type: type, className: rootClassName, disabled: isDisabled, "aria-busy": isLoading || undefined, style: mergedStyle, ...rest, children: [isLoading && (jsx("span", { className: BUTTON_STYLES.spinnerWrap, children: jsx(Icon, { icon: SpinnerIcon, size: iconSize, className: BUTTON_STYLES.spinnerIcon }) })), jsxs("span", { className: cx(BUTTON_STYLES.content, isLoading && BUTTON_STYLES.contentHidden), children: [StartIcon && (jsx(Icon, { icon: StartIcon, size: iconSize })), label && (jsx(Text, { variant: 'span', fontSize: LABEL_FONT_SIZE$1[size], fontWeight: 'medium', lineHeight: 'none', children: label })), EndIcon && (jsx(Icon, { icon: EndIcon, size: iconSize }))] })] }));
577
577
  };
578
578
  Button.displayName = 'Button';
579
579
 
@@ -2289,9 +2289,8 @@ const CardBody = ({ children, py = 'md', px = 'md', }) => {
2289
2289
  };
2290
2290
  CardBody.displayName = 'Card.Body';
2291
2291
 
2292
- const CardBase = ({ ref, variant = 'outlined', padding, className, style, children, ...rest }) => {
2293
- const theme = useTheme();
2294
- return (jsx("div", { ref: ref, className: cx(CARD_VARIANTS({ variant }), className), style: padding !== undefined ? { padding: theme.spacing[padding], ...style } : style, ...rest, children: children }));
2292
+ const CardBase = ({ ref, variant = 'outlined', className, children, ...rest }) => {
2293
+ return (jsx(Box, { ref: ref, className: cx(CARD_VARIANTS({ variant }), className), ...rest, children: children }));
2295
2294
  };
2296
2295
  CardBase.displayName = 'Card';
2297
2296
  const Card = CardBase;