@primer/components 0.0.0-202196173426 → 0.0.0-202196184858
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/CHANGELOG.md +4 -14
- package/lib/ActionList/List.d.ts +1 -2
- package/lib/SelectMenu/SelectMenu.d.ts +10 -10
- package/lib/TextInput.d.ts +1 -2
- package/lib/Token/IssueLabelToken.d.ts +14 -0
- package/lib/Token/IssueLabelToken.js +144 -0
- package/lib/Token/ProfileToken.d.ts +7 -0
- package/lib/Token/ProfileToken.js +53 -0
- package/lib/Token/Token.d.ts +15 -0
- package/lib/Token/Token.js +94 -0
- package/lib/Token/TokenBase.d.ts +17 -0
- package/lib/Token/TokenBase.js +108 -0
- package/lib/Token/_RemoveTokenButton.d.ts +12 -0
- package/lib/Token/_RemoveTokenButton.js +77 -0
- package/lib/Token/_TokenTextContainer.d.ts +3 -0
- package/lib/Token/_TokenTextContainer.js +34 -0
- package/lib/Token/index.d.ts +3 -0
- package/lib/Token/index.js +31 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +20 -0
- package/lib/utils/{types/AriaRole.d.ts → types.d.ts} +13 -0
- package/lib/utils/{types/AriaRole.js → types.js} +0 -0
- package/lib-esm/ActionList/List.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenu.d.ts +10 -10
- package/lib-esm/TextInput.d.ts +1 -2
- package/lib-esm/Token/IssueLabelToken.d.ts +14 -0
- package/lib-esm/Token/IssueLabelToken.js +124 -0
- package/lib-esm/Token/ProfileToken.d.ts +7 -0
- package/lib-esm/Token/ProfileToken.js +33 -0
- package/lib-esm/Token/Token.d.ts +15 -0
- package/lib-esm/Token/Token.js +73 -0
- package/lib-esm/Token/TokenBase.d.ts +17 -0
- package/lib-esm/Token/TokenBase.js +87 -0
- package/lib-esm/Token/_RemoveTokenButton.d.ts +12 -0
- package/lib-esm/Token/_RemoveTokenButton.js +60 -0
- package/lib-esm/Token/_TokenTextContainer.d.ts +3 -0
- package/lib-esm/Token/_TokenTextContainer.js +21 -0
- package/lib-esm/Token/index.d.ts +3 -0
- package/lib-esm/Token/index.js +3 -0
- package/lib-esm/index.d.ts +1 -0
- package/lib-esm/index.js +1 -0
- package/lib-esm/utils/{types/AriaRole.d.ts → types.d.ts} +13 -0
- package/lib-esm/utils/{types/AriaRole.js → types.js} +0 -0
- package/package.json +2 -1
- package/dist/browser.esm.js +0 -2142
- package/dist/browser.esm.js.map +0 -1
- package/dist/browser.umd.js +0 -2142
- package/dist/browser.umd.js.map +0 -1
- package/lib/utils/types/ComponentProps.d.ts +0 -9
- package/lib/utils/types/ComponentProps.js +0 -1
- package/lib/utils/types/Flatten.d.ts +0 -4
- package/lib/utils/types/Flatten.js +0 -1
- package/lib/utils/types/Merge.d.ts +0 -19
- package/lib/utils/types/Merge.js +0 -1
- package/lib/utils/types/index.d.ts +0 -4
- package/lib/utils/types/index.js +0 -57
- package/lib-esm/utils/types/ComponentProps.d.ts +0 -9
- package/lib-esm/utils/types/ComponentProps.js +0 -1
- package/lib-esm/utils/types/Flatten.d.ts +0 -4
- package/lib-esm/utils/types/Flatten.js +0 -1
- package/lib-esm/utils/types/Merge.d.ts +0 -19
- package/lib-esm/utils/types/Merge.js +0 -1
- package/lib-esm/utils/types/index.d.ts +0 -4
- package/lib-esm/utils/types/index.js +0 -4
@@ -1,9 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
/**
|
3
|
-
* Extract a component's props
|
4
|
-
*
|
5
|
-
* Source: https://react-typescript-cheatsheet.netlify.app/docs/advanced/patterns_by_usecase#wrappingmirroring-a-component
|
6
|
-
*
|
7
|
-
* @example ComponentProps<typeof MyComponent>
|
8
|
-
*/
|
9
|
-
export declare type ComponentProps<T> = T extends React.ComponentType<infer Props> ? Props extends object ? Props : never : never;
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";
|
@@ -1,19 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Given two object types A and B, return a type with all the properties of A that aren't also
|
3
|
-
* properties of B, and all the properties of B.
|
4
|
-
*
|
5
|
-
* Useful when we have a component that spreads a "rest" of its props on a subcomponent:
|
6
|
-
*
|
7
|
-
* ```ts
|
8
|
-
* interface OwnProps {
|
9
|
-
* foo: string
|
10
|
-
* }
|
11
|
-
*
|
12
|
-
* type MyComponentProps = Merge<SubcomponentProps, OwnProps>
|
13
|
-
* const MyComponent = ({foo, ...rest}: MyComponentProps) => {
|
14
|
-
* // ...
|
15
|
-
* return <SubComponent {...rest} />
|
16
|
-
* }
|
17
|
-
* ```
|
18
|
-
*/
|
19
|
-
export declare type Merge<A = {}, B = {}> = Omit<A, keyof B> & B;
|
package/lib/utils/types/Merge.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";
|
package/lib/utils/types/index.js
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
|
7
|
-
var _AriaRole = require("./AriaRole");
|
8
|
-
|
9
|
-
Object.keys(_AriaRole).forEach(function (key) {
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
11
|
-
if (key in exports && exports[key] === _AriaRole[key]) return;
|
12
|
-
Object.defineProperty(exports, key, {
|
13
|
-
enumerable: true,
|
14
|
-
get: function () {
|
15
|
-
return _AriaRole[key];
|
16
|
-
}
|
17
|
-
});
|
18
|
-
});
|
19
|
-
|
20
|
-
var _ComponentProps = require("./ComponentProps");
|
21
|
-
|
22
|
-
Object.keys(_ComponentProps).forEach(function (key) {
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
24
|
-
if (key in exports && exports[key] === _ComponentProps[key]) return;
|
25
|
-
Object.defineProperty(exports, key, {
|
26
|
-
enumerable: true,
|
27
|
-
get: function () {
|
28
|
-
return _ComponentProps[key];
|
29
|
-
}
|
30
|
-
});
|
31
|
-
});
|
32
|
-
|
33
|
-
var _Flatten = require("./Flatten");
|
34
|
-
|
35
|
-
Object.keys(_Flatten).forEach(function (key) {
|
36
|
-
if (key === "default" || key === "__esModule") return;
|
37
|
-
if (key in exports && exports[key] === _Flatten[key]) return;
|
38
|
-
Object.defineProperty(exports, key, {
|
39
|
-
enumerable: true,
|
40
|
-
get: function () {
|
41
|
-
return _Flatten[key];
|
42
|
-
}
|
43
|
-
});
|
44
|
-
});
|
45
|
-
|
46
|
-
var _Merge = require("./Merge");
|
47
|
-
|
48
|
-
Object.keys(_Merge).forEach(function (key) {
|
49
|
-
if (key === "default" || key === "__esModule") return;
|
50
|
-
if (key in exports && exports[key] === _Merge[key]) return;
|
51
|
-
Object.defineProperty(exports, key, {
|
52
|
-
enumerable: true,
|
53
|
-
get: function () {
|
54
|
-
return _Merge[key];
|
55
|
-
}
|
56
|
-
});
|
57
|
-
});
|
@@ -1,9 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
/**
|
3
|
-
* Extract a component's props
|
4
|
-
*
|
5
|
-
* Source: https://react-typescript-cheatsheet.netlify.app/docs/advanced/patterns_by_usecase#wrappingmirroring-a-component
|
6
|
-
*
|
7
|
-
* @example ComponentProps<typeof MyComponent>
|
8
|
-
*/
|
9
|
-
export declare type ComponentProps<T> = T extends React.ComponentType<infer Props> ? Props extends object ? Props : never : never;
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Given two object types A and B, return a type with all the properties of A that aren't also
|
3
|
-
* properties of B, and all the properties of B.
|
4
|
-
*
|
5
|
-
* Useful when we have a component that spreads a "rest" of its props on a subcomponent:
|
6
|
-
*
|
7
|
-
* ```ts
|
8
|
-
* interface OwnProps {
|
9
|
-
* foo: string
|
10
|
-
* }
|
11
|
-
*
|
12
|
-
* type MyComponentProps = Merge<SubcomponentProps, OwnProps>
|
13
|
-
* const MyComponent = ({foo, ...rest}: MyComponentProps) => {
|
14
|
-
* // ...
|
15
|
-
* return <SubComponent {...rest} />
|
16
|
-
* }
|
17
|
-
* ```
|
18
|
-
*/
|
19
|
-
export declare type Merge<A = {}, B = {}> = Omit<A, keyof B> & B;
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|