@companycam/slab-web 1.16.2-beta.1 → 1.16.2-beta.3

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.
@@ -22,6 +22,7 @@ export type BaseButtonProps = {
22
22
  ccMargin?: StyledButtonBaseProps['$ccMargin'];
23
23
  color?: StyledButtonBaseProps['$color'];
24
24
  design?: StyledButtonBaseProps['$design'];
25
+ disabled?: boolean;
25
26
  icon?: {
26
27
  component?: IconComponentProps;
27
28
  name?: string;
@@ -30,11 +31,10 @@ export type BaseButtonProps = {
30
31
  loading?: boolean;
31
32
  size?: StyledButtonBaseProps['$size'];
32
33
  };
33
- export type ButtonPolymorphicProps<C extends React.ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, BaseButtonProps>;
34
- export type ButtonAsAnchorProps = Omit<ButtonPolymorphicProps<'a'>, 'as' | 'href'> & {
34
+ export type ButtonProps<C extends React.ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, BaseButtonProps>;
35
+ export type ButtonAsAnchorProps = Omit<ButtonProps<'a'>, 'component' | 'href'> & {
35
36
  href: string;
36
37
  };
37
- export type ButtonProps<C extends React.ElementType = 'button'> = ButtonPolymorphicProps<C> | ButtonAsAnchorProps;
38
38
  /**
39
39
  * A versatile button component that can be rendered as any HTML element or React component.
40
40
  * Automatically renders as an anchor tag when an href prop is provided.
@@ -1,11 +1,10 @@
1
1
  import { BaseButtonProps } from '../Button/Button';
2
2
  import { PolymorphicComponentPropsWithRef } from '../shared/types';
3
3
  type BaseButtonCondensedProps = Omit<BaseButtonProps, 'design'>;
4
- export type ButtonCondensedPolymorphicProps<C extends React.ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, BaseButtonCondensedProps>;
5
- export type ButtonCondensedAsAnchorProps = Omit<ButtonCondensedPolymorphicProps<'a'>, 'as' | 'href'> & {
4
+ export type ButtonCondensedProps<C extends React.ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, BaseButtonCondensedProps>;
5
+ export type ButtonCondensedAsAnchorProps = Omit<ButtonCondensedProps<'a'>, 'component' | 'href'> & {
6
6
  href: string;
7
7
  };
8
- export type ButtonCondensedProps<C extends React.ElementType = 'button'> = ButtonCondensedPolymorphicProps<C> | ButtonCondensedPolymorphicProps;
9
8
  /**
10
9
  A minimal [Button](/docs/button--docs) with styles for situations where you don't need padding, such as inside a table cell.
11
10
 
@@ -12,11 +12,10 @@ export type BaseButtonIconProps<C extends ElementType> = FilteredBaseButtonProps
12
12
  size?: Size;
13
13
  design?: 'solid' | 'minimal';
14
14
  };
15
- export type ButtonIconPolymorphicProps<C extends ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, BaseButtonIconProps<C>>;
16
- export type ButtonIconAsAnchorProps = Omit<ButtonIconPolymorphicProps<'a'>, 'as' | 'href'> & {
15
+ export type ButtonIconProps<C extends ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, BaseButtonIconProps<C>>;
16
+ export type ButtonIconAsAnchorProps = Omit<ButtonIconProps<'a'>, 'component' | 'href'> & {
17
17
  href: string;
18
18
  };
19
- export type ButtonIconProps<C extends React.ElementType = 'button'> = ButtonIconPolymorphicProps<C> | ButtonIconAsAnchorProps;
20
19
  /**
21
20
  A [Button](/docs/button--docs) styled to have the same width and height, and to only display an icon. ButtonIcon accepts all of the same props as [Button](/docs/button--docs), but does not accept `children`.
22
21
 
@@ -1,10 +1,9 @@
1
1
  import { BaseButtonIconProps } from '../ButtonIcon/ButtonIcon';
2
2
  import { PolymorphicComponentPropsWithRef } from '../shared/types';
3
3
  type BaseButtonIconCondensedProps<C extends React.ElementType = 'button'> = Omit<BaseButtonIconProps<C>, 'design'>;
4
- export type ButtonIconCondensedPolymorphicProps<C extends React.ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, BaseButtonIconCondensedProps<C>>;
5
- export type ButtonIconCondensedAsAnchorProps = Omit<ButtonIconCondensedPolymorphicProps<'a'>, 'as' | 'href'> & {
4
+ export type ButtonIconCondensedProps<C extends React.ElementType = 'button'> = PolymorphicComponentPropsWithRef<C, BaseButtonIconCondensedProps<C>>;
5
+ export type ButtonIconCondensedAsAnchorProps = Omit<ButtonIconCondensedProps<'a'>, 'component' | 'href'> & {
6
6
  href: string;
7
7
  };
8
- export type ButtonIconCondensedProps<C extends React.ElementType = 'button'> = ButtonIconCondensedPolymorphicProps<C> | ButtonIconCondensedAsAnchorProps;
9
8
  export declare const ButtonIconCondensed: <C extends React.ElementType>(p: ButtonIconCondensedProps<C>) => React.ReactNode;
10
9
  export default ButtonIconCondensed;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companycam/slab-web",
3
- "version": "1.16.2-beta.1",
3
+ "version": "1.16.2-beta.3",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {