@databricks/design-system 1.5.0 → 1.5.1

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.
@@ -3,12 +3,13 @@ import type { SerializedStyles } from '@emotion/react';
3
3
  import type { ButtonProps as AntDButtonProps } from 'antd';
4
4
  import type { ComponentTheme } from '../../theme';
5
5
  import type { DangerouslySetAntdProps, HTMLDataAttributes } from '../types';
6
- export declare const getButtonEmotionStyles: ({ theme, classNamePrefix, loading, withIcon, onlyIcon, enableAnimation, size, type, isFlex, }: {
6
+ export declare const getButtonEmotionStyles: ({ theme, classNamePrefix, loading, withIcon, onlyIcon, isAnchor, enableAnimation, size, type, isFlex, }: {
7
7
  theme: ComponentTheme;
8
8
  classNamePrefix: string;
9
9
  loading?: boolean | undefined;
10
10
  withIcon?: boolean | undefined;
11
11
  onlyIcon?: boolean | undefined;
12
+ isAnchor?: boolean | undefined;
12
13
  danger?: boolean | undefined;
13
14
  enableAnimation: boolean;
14
15
  size: ButtonSize;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/design-system/Button/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAa,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAK3D,OAAO,KAAK,EAAE,cAAc,EAAS,MAAM,aAAa,CAAC;AAGzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAgB5E,eAAO,MAAM,sBAAsB;WAW1B,cAAc;qBACJ,MAAM;;;;;qBAKN,OAAO;UAClB,UAAU;WACT,WAAW,CAAC,MAAM,CAAC;;MAExB,gBA8OH,CAAC;AAEF,oBAAY,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC,EAChE,kBAAkB,EAClB,uBAAuB,CAAC,eAAe,CAAC;IAC1C,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;IACvC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,2GA8CjB,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/design-system/Button/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAa,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAK3D,OAAO,KAAK,EAAE,cAAc,EAAS,MAAM,aAAa,CAAC;AAGzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAgB5E,eAAO,MAAM,sBAAsB;WAY1B,cAAc;qBACJ,MAAM;;;;;;qBAMN,OAAO;UAClB,UAAU;WACT,WAAW,CAAC,MAAM,CAAC;;MAExB,gBAsPH,CAAC;AAEF,oBAAY,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5C,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC,EAChE,kBAAkB,EAClB,uBAAuB,CAAC,eAAe,CAAC;IAC1C,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;IACvC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,2GA+CjB,CAAC"}
package/dist/index.js CHANGED
@@ -54403,6 +54403,7 @@ const getButtonEmotionStyles = _ref => {
54403
54403
  loading,
54404
54404
  withIcon,
54405
54405
  onlyIcon,
54406
+ isAnchor,
54406
54407
  enableAnimation,
54407
54408
  size,
54408
54409
  type,
@@ -54575,10 +54576,16 @@ const getButtonEmotionStyles = _ref => {
54575
54576
  },
54576
54577
  ["&".concat(clsIconOnly)]: {
54577
54578
  border: 'none',
54578
- //
54579
54579
  ["&:enabled:not(".concat(classLink, ")")]: { ...tertiaryColors,
54580
54580
  color: theme.colors.textSecondary
54581
54581
  },
54582
+ ...(isAnchor && {
54583
+ lineHeight: "".concat(theme.general.heightSm, "px"),
54584
+ ...getLinkStyles$1(theme),
54585
+ '&:disabled': {
54586
+ color: theme.colors.actionDisabledText
54587
+ }
54588
+ }),
54582
54589
  '&[disabled]:hover': {
54583
54590
  backgroundColor: 'transparent'
54584
54591
  }
@@ -54628,6 +54635,7 @@ _ref2, ref) {
54628
54635
  loading: Boolean(props.loading),
54629
54636
  withIcon: Boolean(props.icon),
54630
54637
  onlyIcon: Boolean((props.icon || endIcon) && !children),
54638
+ isAnchor: Boolean(props.href && !type),
54631
54639
  danger: Boolean(props.danger),
54632
54640
  enableAnimation: theme.options.enableAnimation,
54633
54641
  size: size || 'middle',