@primer/components 0.0.0-202198182941 → 0.0.0-202198201647

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.
@@ -5,11 +5,25 @@ export declare const tokenSizes: Record<TokenSizeKeys, string>;
5
5
  export declare const defaultTokenSize: TokenSizeKeys;
6
6
  export interface TokenBaseProps extends Omit<React.HTMLProps<HTMLSpanElement | HTMLButtonElement | HTMLAnchorElement>, 'size' | 'id'> {
7
7
  as?: 'button' | 'a' | 'span';
8
+ /**
9
+ * The function that gets called when a user clicks the remove button, or keys "Backspace" or "Delete" when focused on the token
10
+ */
8
11
  onRemove?: () => void;
12
+ /**
13
+ * Whether the token is selected
14
+ */
9
15
  isSelected?: boolean;
10
- tabIndex?: number;
16
+ /**
17
+ * The text label inside the token
18
+ */
11
19
  text: string;
20
+ /**
21
+ * A unique identifier that can be associated with the token
22
+ */
12
23
  id?: number | string;
24
+ /**
25
+ * Which size the token will be rendered at
26
+ */
13
27
  size?: TokenSizeKeys;
14
28
  }
15
29
  export declare const isTokenInteractive: ({ as, onClick, onFocus, tabIndex }: TokenBaseProps) => boolean;
@@ -5,11 +5,25 @@ export declare const tokenSizes: Record<TokenSizeKeys, string>;
5
5
  export declare const defaultTokenSize: TokenSizeKeys;
6
6
  export interface TokenBaseProps extends Omit<React.HTMLProps<HTMLSpanElement | HTMLButtonElement | HTMLAnchorElement>, 'size' | 'id'> {
7
7
  as?: 'button' | 'a' | 'span';
8
+ /**
9
+ * The function that gets called when a user clicks the remove button, or keys "Backspace" or "Delete" when focused on the token
10
+ */
8
11
  onRemove?: () => void;
12
+ /**
13
+ * Whether the token is selected
14
+ */
9
15
  isSelected?: boolean;
10
- tabIndex?: number;
16
+ /**
17
+ * The text label inside the token
18
+ */
11
19
  text: string;
20
+ /**
21
+ * A unique identifier that can be associated with the token
22
+ */
12
23
  id?: number | string;
24
+ /**
25
+ * Which size the token will be rendered at
26
+ */
13
27
  size?: TokenSizeKeys;
14
28
  }
15
29
  export declare const isTokenInteractive: ({ as, onClick, onFocus, tabIndex }: TokenBaseProps) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/components",
3
- "version": "0.0.0-202198182941",
3
+ "version": "0.0.0-202198201647",
4
4
  "description": "Primer react components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",