@primer/components 0.0.0-202192701132 → 0.0.0-202192711181
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 +1 -1
- package/dist/browser.esm.js +615 -615
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +176 -176
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList2/Description.d.ts +6 -0
- package/lib/ActionList2/Description.js +53 -0
- package/lib/ActionList2/Divider.d.ts +8 -0
- package/lib/ActionList2/Divider.js +42 -0
- package/lib/ActionList2/Group.d.ts +8 -0
- package/lib/ActionList2/Group.js +39 -0
- package/lib/ActionList2/Header.d.ts +26 -0
- package/lib/ActionList2/Header.js +55 -0
- package/lib/ActionList2/Item.d.ts +48 -0
- package/lib/ActionList2/Item.js +205 -0
- package/lib/ActionList2/List.d.ts +12 -0
- package/lib/ActionList2/List.js +55 -0
- package/lib/ActionList2/Selection.d.ts +5 -0
- package/lib/ActionList2/Selection.js +67 -0
- package/lib/ActionList2/Visuals.d.ts +11 -0
- package/lib/ActionList2/Visuals.js +90 -0
- package/lib/ActionList2/hacks.d.ts +30 -0
- package/lib/ActionList2/hacks.js +38 -0
- package/lib/ActionList2/index.d.ts +26 -0
- package/lib/ActionList2/index.js +36 -0
- package/lib/Autocomplete/Autocomplete.d.ts +1 -1
- package/lib/Autocomplete/AutocompleteInput.d.ts +1 -1
- package/lib/Button/ButtonClose.d.ts +1 -1
- package/lib/CircleOcticon.d.ts +1 -1
- package/lib/Dialog.d.ts +1 -1
- package/lib/Dropdown.d.ts +4 -4
- package/lib/DropdownMenu/DropdownButton.d.ts +1 -1
- package/lib/FilterList.d.ts +1 -1
- package/lib/SelectMenu/SelectMenu.d.ts +5 -5
- package/lib/TextInputWithTokens.d.ts +1 -1
- package/lib/Timeline.d.ts +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +8 -0
- package/lib/sx.d.ts +4 -8
- package/lib/sx.js +8 -0
- package/lib/theme.d.ts +0 -4
- package/lib/theme.js +1 -96
- package/lib/utils/create-slots.d.ts +17 -0
- package/lib/utils/create-slots.js +105 -0
- package/lib/utils/use-force-update.d.ts +1 -0
- package/lib/utils/use-force-update.js +19 -0
- package/lib-esm/ActionList2/Description.d.ts +6 -0
- package/lib-esm/ActionList2/Description.js +37 -0
- package/lib-esm/ActionList2/Divider.d.ts +8 -0
- package/lib-esm/ActionList2/Divider.js +30 -0
- package/lib-esm/ActionList2/Group.d.ts +8 -0
- package/lib-esm/ActionList2/Group.js +29 -0
- package/lib-esm/ActionList2/Header.d.ts +26 -0
- package/lib-esm/ActionList2/Header.js +45 -0
- package/lib-esm/ActionList2/Item.d.ts +48 -0
- package/lib-esm/ActionList2/Item.js +198 -0
- package/lib-esm/ActionList2/List.d.ts +12 -0
- package/lib-esm/ActionList2/List.js +37 -0
- package/lib-esm/ActionList2/Selection.d.ts +5 -0
- package/lib-esm/ActionList2/Selection.js +50 -0
- package/lib-esm/ActionList2/Visuals.d.ts +11 -0
- package/lib-esm/ActionList2/Visuals.js +68 -0
- package/lib-esm/ActionList2/hacks.d.ts +30 -0
- package/lib-esm/ActionList2/hacks.js +30 -0
- package/lib-esm/ActionList2/index.d.ts +26 -0
- package/lib-esm/ActionList2/index.js +23 -0
- package/lib-esm/Autocomplete/Autocomplete.d.ts +1 -1
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +1 -1
- package/lib-esm/Button/ButtonClose.d.ts +1 -1
- package/lib-esm/CircleOcticon.d.ts +1 -1
- package/lib-esm/Dialog.d.ts +1 -1
- package/lib-esm/Dropdown.d.ts +4 -4
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +1 -1
- package/lib-esm/FilterList.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenu.d.ts +5 -5
- package/lib-esm/TextInputWithTokens.d.ts +1 -1
- package/lib-esm/Timeline.d.ts +1 -1
- package/lib-esm/index.d.ts +1 -0
- package/lib-esm/index.js +1 -0
- package/lib-esm/sx.d.ts +4 -8
- package/lib-esm/sx.js +3 -1
- package/lib-esm/theme.d.ts +0 -4
- package/lib-esm/theme.js +1 -95
- package/lib-esm/utils/create-slots.d.ts +17 -0
- package/lib-esm/utils/create-slots.js +84 -0
- package/lib-esm/utils/use-force-update.d.ts +1 -0
- package/lib-esm/utils/use-force-update.js +6 -0
- package/package.json +1 -1
@@ -0,0 +1,90 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.TrailingVisual = exports.LeadingVisual = exports.LeadingVisualContainer = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _Box = _interopRequireDefault(require("../Box"));
|
11
|
+
|
12
|
+
var _sx = require("../sx");
|
13
|
+
|
14
|
+
var _constants = require("../constants");
|
15
|
+
|
16
|
+
var _Item = require("./Item");
|
17
|
+
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
|
+
|
20
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
21
|
+
|
22
|
+
const LeadingVisualContainer = ({
|
23
|
+
sx = {},
|
24
|
+
...props
|
25
|
+
}) => {
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_Box.default, _extends({
|
27
|
+
as: "span",
|
28
|
+
sx: (0, _sx.merge)({
|
29
|
+
height: '20px',
|
30
|
+
// match height of text row
|
31
|
+
minWidth: (0, _constants.get)('space.3'),
|
32
|
+
maxWidth: '20px',
|
33
|
+
// square (same as height)
|
34
|
+
display: 'flex',
|
35
|
+
justifyContent: 'center',
|
36
|
+
alignItems: 'center',
|
37
|
+
flexShrink: 0,
|
38
|
+
marginRight: 2
|
39
|
+
}, sx)
|
40
|
+
}, props));
|
41
|
+
};
|
42
|
+
|
43
|
+
exports.LeadingVisualContainer = LeadingVisualContainer;
|
44
|
+
LeadingVisualContainer.displayName = "LeadingVisualContainer";
|
45
|
+
|
46
|
+
const LeadingVisual = ({
|
47
|
+
sx = {},
|
48
|
+
...props
|
49
|
+
}) => {
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_Item.Slot, {
|
51
|
+
name: "LeadingVisual"
|
52
|
+
}, ({
|
53
|
+
variant,
|
54
|
+
disabled
|
55
|
+
}) => /*#__PURE__*/_react.default.createElement(LeadingVisualContainer, _extends({
|
56
|
+
sx: (0, _sx.merge)({
|
57
|
+
color: (0, _Item.getVariantStyles)(variant, disabled).iconColor,
|
58
|
+
svg: {
|
59
|
+
fontSize: 0
|
60
|
+
}
|
61
|
+
}, sx)
|
62
|
+
}, props), props.children));
|
63
|
+
};
|
64
|
+
|
65
|
+
exports.LeadingVisual = LeadingVisual;
|
66
|
+
LeadingVisual.displayName = "LeadingVisual";
|
67
|
+
|
68
|
+
const TrailingVisual = ({
|
69
|
+
sx = {},
|
70
|
+
...props
|
71
|
+
}) => {
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_Item.Slot, {
|
73
|
+
name: "TrailingVisual"
|
74
|
+
}, ({
|
75
|
+
variant,
|
76
|
+
disabled
|
77
|
+
}) => /*#__PURE__*/_react.default.createElement(_Box.default, _extends({
|
78
|
+
as: "span",
|
79
|
+
sx: (0, _sx.merge)({
|
80
|
+
height: '20px',
|
81
|
+
// match height of text row
|
82
|
+
flexShrink: 0,
|
83
|
+
color: (0, _Item.getVariantStyles)(variant, disabled).annotationColor,
|
84
|
+
marginLeft: 2
|
85
|
+
}, sx)
|
86
|
+
}, props), props.children));
|
87
|
+
};
|
88
|
+
|
89
|
+
exports.TrailingVisual = TrailingVisual;
|
90
|
+
TrailingVisual.displayName = "TrailingVisual";
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/**
|
2
|
+
* These colors are not yet in our default theme.
|
3
|
+
* TODO: Need to remove this once they are added.
|
4
|
+
*/
|
5
|
+
export declare const customItemThemes: {
|
6
|
+
default: {
|
7
|
+
hover: {
|
8
|
+
light: string;
|
9
|
+
dark: string;
|
10
|
+
dark_dimmed: string;
|
11
|
+
};
|
12
|
+
focus: {
|
13
|
+
light: string;
|
14
|
+
dark: string;
|
15
|
+
dark_dimmed: string;
|
16
|
+
};
|
17
|
+
};
|
18
|
+
danger: {
|
19
|
+
hover: {
|
20
|
+
light: string;
|
21
|
+
dark: string;
|
22
|
+
dark_dimmed: string;
|
23
|
+
};
|
24
|
+
focus: {
|
25
|
+
light: string;
|
26
|
+
dark: string;
|
27
|
+
dark_dimmed: string;
|
28
|
+
};
|
29
|
+
};
|
30
|
+
};
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.customItemThemes = void 0;
|
7
|
+
|
8
|
+
/**
|
9
|
+
* These colors are not yet in our default theme.
|
10
|
+
* TODO: Need to remove this once they are added.
|
11
|
+
*/
|
12
|
+
const customItemThemes = {
|
13
|
+
default: {
|
14
|
+
hover: {
|
15
|
+
light: 'rgba(46, 77, 108, 0.06)',
|
16
|
+
dark: 'rgba(201, 206, 212, 0.12)',
|
17
|
+
dark_dimmed: 'rgba(201, 206, 212, 0.12)'
|
18
|
+
},
|
19
|
+
focus: {
|
20
|
+
light: 'rgba(54, 77, 100, 0.16)',
|
21
|
+
dark: 'rgba(201, 206, 212, 0.24)',
|
22
|
+
dark_dimmed: 'rgba(201, 206, 212, 0.24)'
|
23
|
+
}
|
24
|
+
},
|
25
|
+
danger: {
|
26
|
+
hover: {
|
27
|
+
light: 'rgba(234, 74, 90, 0.08)',
|
28
|
+
dark: 'rgba(248, 81, 73, 0.16)',
|
29
|
+
dark_dimmed: 'rgba(248, 81, 73, 0.16)'
|
30
|
+
},
|
31
|
+
focus: {
|
32
|
+
light: 'rgba(234, 74, 90, 0.14)',
|
33
|
+
dark: 'rgba(248, 81, 73, 0.24)',
|
34
|
+
dark_dimmed: 'rgba(248, 81, 73, 0.24)'
|
35
|
+
}
|
36
|
+
}
|
37
|
+
};
|
38
|
+
exports.customItemThemes = customItemThemes;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { Group } from './Group';
|
3
|
+
import { Divider } from './Divider';
|
4
|
+
export type { ListProps as ActionListProps } from './List';
|
5
|
+
export type { GroupProps } from './Group';
|
6
|
+
export type { ItemProps } from './Item';
|
7
|
+
export type { DescriptionProps } from './Description';
|
8
|
+
export type { LeadingVisualProps, TrailingVisualProps } from './Visuals';
|
9
|
+
/**
|
10
|
+
* Collection of list-related components.
|
11
|
+
*/
|
12
|
+
export declare const ActionList: import("@radix-ui/react-polymorphic").ForwardRefComponent<"ul", import("./List").ListProps> & {
|
13
|
+
/** Collects related `Items` in an `ActionList`. */
|
14
|
+
Group: typeof Group;
|
15
|
+
/** An actionable or selectable `Item` with an optional icon and description. */
|
16
|
+
Item: import("@radix-ui/react-polymorphic").ForwardRefComponent<"li", import("./Item").ItemProps>;
|
17
|
+
/** Visually separates `Item`s or `Group`s in an `ActionList`. */
|
18
|
+
Divider: typeof Divider;
|
19
|
+
Description: import("react").FC<import("./Description").DescriptionProps>;
|
20
|
+
LeadingVisual: import("react").FC<import("../sx").SxProp & {
|
21
|
+
children: import("react").ReactNode;
|
22
|
+
}>;
|
23
|
+
TrailingVisual: import("react").FC<import("../sx").SxProp & {
|
24
|
+
children: import("react").ReactNode;
|
25
|
+
}>;
|
26
|
+
};
|
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.ActionList = void 0;
|
7
|
+
|
8
|
+
var _List = require("./List");
|
9
|
+
|
10
|
+
var _Group = require("./Group");
|
11
|
+
|
12
|
+
var _Item = require("./Item");
|
13
|
+
|
14
|
+
var _Divider = require("./Divider");
|
15
|
+
|
16
|
+
var _Description = require("./Description");
|
17
|
+
|
18
|
+
var _Visuals = require("./Visuals");
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Collection of list-related components.
|
22
|
+
*/
|
23
|
+
const ActionList = Object.assign(_List.List, {
|
24
|
+
/** Collects related `Items` in an `ActionList`. */
|
25
|
+
Group: _Group.Group,
|
26
|
+
|
27
|
+
/** An actionable or selectable `Item` with an optional icon and description. */
|
28
|
+
Item: _Item.Item,
|
29
|
+
|
30
|
+
/** Visually separates `Item`s or `Group`s in an `ActionList`. */
|
31
|
+
Divider: _Divider.Divider,
|
32
|
+
Description: _Description.Description,
|
33
|
+
LeadingVisual: _Visuals.LeadingVisual,
|
34
|
+
TrailingVisual: _Visuals.TrailingVisual
|
35
|
+
});
|
36
|
+
exports.ActionList = ActionList;
|
@@ -288,7 +288,7 @@ declare const _default: React.FC<{
|
|
288
288
|
onTransitionEnd?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
289
289
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
290
290
|
block?: boolean | undefined;
|
291
|
-
sx?: import("
|
291
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
292
292
|
disabled?: boolean | undefined;
|
293
293
|
variant?: "large" | "small" | undefined;
|
294
294
|
hasIcon?: boolean | undefined;
|
@@ -280,7 +280,7 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
280
280
|
onTransitionEnd?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
281
281
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
282
282
|
block?: boolean | undefined;
|
283
|
-
sx?: import("
|
283
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
284
284
|
disabled?: boolean | undefined;
|
285
285
|
variant?: "large" | "small" | undefined;
|
286
286
|
hasIcon?: boolean | undefined;
|
@@ -306,7 +306,7 @@ declare const ButtonClose: React.ForwardRefExoticComponent<Pick<{
|
|
306
306
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
307
307
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
308
308
|
size?: import("styled-system").ResponsiveValue<import("csstype").Property.Height<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
309
|
-
sx?: import("
|
309
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
310
310
|
autoFocus?: boolean | undefined;
|
311
311
|
disabled?: boolean | undefined;
|
312
312
|
formAction?: string | undefined;
|
package/lib/CircleOcticon.d.ts
CHANGED
@@ -384,7 +384,7 @@ declare namespace CircleOcticon {
|
|
384
384
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
385
385
|
borderX?: import("styled-system").ResponsiveValue<import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
386
386
|
borderY?: import("styled-system").ResponsiveValue<import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
387
|
-
sx?: import("
|
387
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
388
388
|
theme?: any;
|
389
389
|
};
|
390
390
|
}
|
package/lib/Dialog.d.ts
CHANGED
@@ -387,7 +387,7 @@ declare namespace DialogHeader {
|
|
387
387
|
size?: React.Validator<import("styled-system").ResponsiveValue<import("csstype").Property.Height<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined> | undefined;
|
388
388
|
borderX?: React.Validator<import("styled-system").ResponsiveValue<import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined> | undefined;
|
389
389
|
borderY?: React.Validator<import("styled-system").ResponsiveValue<import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined> | undefined;
|
390
|
-
sx?: React.Validator<import("
|
390
|
+
sx?: React.Validator<import("@styled-system/css").SystemStyleObject | undefined> | undefined;
|
391
391
|
theme?: React.Validator<any> | undefined;
|
392
392
|
};
|
393
393
|
var displayName: string;
|
package/lib/Dropdown.d.ts
CHANGED
@@ -307,7 +307,7 @@ declare const _default: {
|
|
307
307
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
308
308
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
309
309
|
open?: boolean | undefined;
|
310
|
-
sx?: import("
|
310
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
311
311
|
onToggle?: React.ReactEventHandler<HTMLElement> | undefined;
|
312
312
|
} & {
|
313
313
|
theme?: any;
|
@@ -604,7 +604,7 @@ declare const _default: {
|
|
604
604
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
605
605
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
606
606
|
open?: boolean | undefined;
|
607
|
-
sx?: import("
|
607
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
608
608
|
onToggle?: React.ReactEventHandler<HTMLElement> | undefined;
|
609
609
|
} & {
|
610
610
|
theme?: any;
|
@@ -923,7 +923,7 @@ declare const _default: {
|
|
923
923
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
924
924
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
925
925
|
size?: import("styled-system").ResponsiveValue<import("csstype").Property.Height<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
926
|
-
sx?: import("
|
926
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
927
927
|
autoFocus?: boolean | undefined;
|
928
928
|
disabled?: boolean | undefined;
|
929
929
|
formAction?: string | undefined;
|
@@ -1243,7 +1243,7 @@ declare const _default: {
|
|
1243
1243
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1244
1244
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1245
1245
|
size?: import("styled-system").ResponsiveValue<import("csstype").Property.Height<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1246
|
-
sx?: import("
|
1246
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
1247
1247
|
autoFocus?: boolean | undefined;
|
1248
1248
|
disabled?: boolean | undefined;
|
1249
1249
|
formAction?: string | undefined;
|
@@ -308,7 +308,7 @@ export declare const DropdownButton: React.ForwardRefExoticComponent<Pick<React.
|
|
308
308
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
309
309
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
310
310
|
size?: import("styled-system").ResponsiveValue<import("csstype").Property.Height<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
311
|
-
sx?: import("
|
311
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
312
312
|
autoFocus?: boolean | undefined;
|
313
313
|
disabled?: boolean | undefined;
|
314
314
|
formAction?: string | undefined;
|
package/lib/FilterList.d.ts
CHANGED
@@ -307,7 +307,7 @@ declare const _default: {
|
|
307
307
|
paddingX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
308
308
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
309
309
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
310
|
-
sx?: import("
|
310
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
311
311
|
} & {
|
312
312
|
theme?: any;
|
313
313
|
}>): JSX.Element;
|
@@ -308,7 +308,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<SelectMenuInternalP
|
|
308
308
|
onTransitionEnd?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
309
309
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
310
310
|
block?: boolean | undefined;
|
311
|
-
sx?: import("
|
311
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
312
312
|
disabled?: boolean | undefined;
|
313
313
|
variant?: "large" | "small" | undefined;
|
314
314
|
hasIcon?: boolean | undefined;
|
@@ -612,7 +612,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<SelectMenuInternalP
|
|
612
612
|
paddingX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
613
613
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
614
614
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
615
|
-
sx?: import("
|
615
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
616
616
|
media?: string | undefined;
|
617
617
|
target?: string | undefined;
|
618
618
|
href?: string | undefined;
|
@@ -917,7 +917,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<SelectMenuInternalP
|
|
917
917
|
paddingX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
918
918
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
919
919
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
920
|
-
sx?: import("
|
920
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
921
921
|
align?: "left" | "right" | undefined;
|
922
922
|
} & {
|
923
923
|
theme?: any;
|
@@ -1214,7 +1214,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<SelectMenuInternalP
|
|
1214
1214
|
paddingX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1215
1215
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1216
1216
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1217
|
-
sx?: import("
|
1217
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
1218
1218
|
} & {
|
1219
1219
|
theme?: any;
|
1220
1220
|
}): JSX.Element;
|
@@ -1528,7 +1528,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<SelectMenuInternalP
|
|
1528
1528
|
paddingX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1529
1529
|
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1530
1530
|
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1531
|
-
sx?: import("
|
1531
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
1532
1532
|
} & {
|
1533
1533
|
theme?: any;
|
1534
1534
|
}): JSX.Element;
|
@@ -308,7 +308,7 @@ declare const TextInputWithTokens: React.ForwardRefExoticComponent<Pick<{
|
|
308
308
|
onTransitionEnd?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
309
309
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
310
310
|
block?: boolean | undefined;
|
311
|
-
sx?: import("
|
311
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
312
312
|
disabled?: boolean | undefined;
|
313
313
|
variant?: "large" | "small" | undefined;
|
314
314
|
hasIcon?: boolean | undefined;
|
package/lib/Timeline.d.ts
CHANGED
@@ -395,7 +395,7 @@ declare const _default: string & import("styled-components").StyledComponentBase
|
|
395
395
|
size?: import("styled-system").ResponsiveValue<import("csstype").Property.Height<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
396
396
|
borderX?: import("styled-system").ResponsiveValue<import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
397
397
|
borderY?: import("styled-system").ResponsiveValue<import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
398
|
-
sx?: import("
|
398
|
+
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
399
399
|
} & {
|
400
400
|
theme?: any;
|
401
401
|
}): JSX.Element;
|
package/lib/index.d.ts
CHANGED
@@ -22,6 +22,7 @@ export { useOnEscapePress } from './hooks/useOnEscapePress';
|
|
22
22
|
export { useOverlay } from './hooks/useOverlay';
|
23
23
|
export { useConfirm } from './Dialog/ConfirmationDialog';
|
24
24
|
export { ActionList } from './ActionList';
|
25
|
+
export { ActionList as ActionList2 } from './ActionList2';
|
25
26
|
export { ActionMenu } from './ActionMenu';
|
26
27
|
export type { ActionMenuProps } from './ActionMenu';
|
27
28
|
export { default as Autocomplete } from './Autocomplete';
|
package/lib/index.js
CHANGED
@@ -147,6 +147,12 @@ Object.defineProperty(exports, "ActionList", {
|
|
147
147
|
return _ActionList.ActionList;
|
148
148
|
}
|
149
149
|
});
|
150
|
+
Object.defineProperty(exports, "ActionList2", {
|
151
|
+
enumerable: true,
|
152
|
+
get: function () {
|
153
|
+
return _ActionList2.ActionList;
|
154
|
+
}
|
155
|
+
});
|
150
156
|
Object.defineProperty(exports, "ActionMenu", {
|
151
157
|
enumerable: true,
|
152
158
|
get: function () {
|
@@ -536,6 +542,8 @@ var _ConfirmationDialog = require("./Dialog/ConfirmationDialog");
|
|
536
542
|
|
537
543
|
var _ActionList = require("./ActionList");
|
538
544
|
|
545
|
+
var _ActionList2 = require("./ActionList2");
|
546
|
+
|
539
547
|
var _ActionMenu = require("./ActionMenu");
|
540
548
|
|
541
549
|
var _Autocomplete = _interopRequireDefault(require("./Autocomplete"));
|
package/lib/sx.d.ts
CHANGED
@@ -1,12 +1,8 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
import { ColorProps, ShadowProps } from 'styled-system';
|
4
|
-
export declare type BetterCssProperties = {
|
5
|
-
[K in keyof SystemCssProperties]: K extends keyof ColorProps ? ThemeColorPaths | SystemCssProperties[K] : K extends keyof ShadowProps ? ThemeShadowPaths | SystemCssProperties[K] : SystemCssProperties[K];
|
6
|
-
};
|
7
|
-
export declare type BetterSystemStyleObject = BetterCssProperties | SystemStyleObject;
|
1
|
+
import { SystemStyleObject } from '@styled-system/css';
|
2
|
+
import merge from 'deepmerge';
|
8
3
|
export interface SxProp {
|
9
|
-
sx?:
|
4
|
+
sx?: SystemStyleObject;
|
10
5
|
}
|
11
6
|
declare const sx: (props: SxProp) => import("@styled-system/css").CssFunctionReturnType;
|
12
7
|
export default sx;
|
8
|
+
export { merge };
|
package/lib/sx.js
CHANGED
@@ -3,10 +3,18 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
+
Object.defineProperty(exports, "merge", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function () {
|
9
|
+
return _deepmerge.default;
|
10
|
+
}
|
11
|
+
});
|
6
12
|
exports.default = void 0;
|
7
13
|
|
8
14
|
var _css = _interopRequireDefault(require("@styled-system/css"));
|
9
15
|
|
16
|
+
var _deepmerge = _interopRequireDefault(require("deepmerge"));
|
17
|
+
|
10
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
19
|
|
12
20
|
const sx = props => (0, _css.default)(props.sx);
|
package/lib/theme.d.ts
CHANGED
@@ -1,6 +1,2 @@
|
|
1
1
|
import { theme } from './theme-preval';
|
2
2
|
export default theme;
|
3
|
-
export interface Theme {
|
4
|
-
}
|
5
|
-
export declare type ThemeColorPaths = 'fg.default' | 'fg.muted' | 'fg.subtle' | 'fg.onEmphasis' | 'canvas.default' | 'canvas.overlay' | 'canvas.inset' | 'canvas.subtle' | 'border.default' | 'border.muted' | 'border.subtle' | 'neutral.emphasisPlus' | 'neutral.emphasis' | 'neutral.muted' | 'neutral.subtle' | 'accent.fg' | 'accent.emphasis' | 'accent.muted' | 'accent.subtle' | 'success.fg' | 'success.emphasis' | 'success.muted' | 'success.subtle' | 'attention.fg' | 'attention.emphasis' | 'attention.muted' | 'attention.subtle' | 'severe.fg' | 'severe.emphasis' | 'severe.muted' | 'severe.subtle' | 'danger.fg' | 'danger.emphasis' | 'danger.muted' | 'danger.subtle' | 'done.fg' | 'done.emphasis' | 'done.muted' | 'done.subtle' | 'sponsors.fg' | 'sponsors.emphasis' | 'sponsors.muted' | 'sponsors.subtle' | 'primer.fg.disabled' | 'primer.canvas.backdrop' | 'primer.canvas.sticky' | 'primer.border.active' | 'primer.border.contrast';
|
6
|
-
export declare type ThemeShadowPaths = 'shadow.small' | 'shadow.medium' | 'shadow.large' | 'shadow.extraLarge' | 'primer.shadow.highlight' | 'primer.shadow.inset' | 'primer.shadow.focus';
|
package/lib/theme.js
CHANGED
@@ -7,100 +7,5 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _themePreval = require("./theme-preval");
|
9
9
|
|
10
|
-
var _default = _themePreval.theme;
|
11
|
-
// theme as Theme
|
12
|
-
// type ThemeColors = {
|
13
|
-
// fg: {
|
14
|
-
// default: 'XXXXXXXXXXX',
|
15
|
-
// muted: 'XXXXXXXXXXX',
|
16
|
-
// subtle: 'XXXXXXXXXXX',
|
17
|
-
// onEmphasis: 'XXXXXXXXXXX'
|
18
|
-
// },
|
19
|
-
// canvas: {
|
20
|
-
// default: 'XXXXXXXXXXX',
|
21
|
-
// overlay: 'XXXXXXXXXXX',
|
22
|
-
// inset: 'XXXXXXXXXXX',
|
23
|
-
// subtle: 'XXXXXXXXXXX'
|
24
|
-
// },
|
25
|
-
// border: {
|
26
|
-
// default: 'XXXXXXXXXXX',
|
27
|
-
// muted: 'XXXXXXXXXXX',
|
28
|
-
// subtle: 'XXXXXXXXXXX'
|
29
|
-
// },
|
30
|
-
// shadow: {
|
31
|
-
// small: 'XXXXXXXXXXX',
|
32
|
-
// medium: 'XXXXXXXXXXX',
|
33
|
-
// large: 'XXXXXXXXXXX',
|
34
|
-
// extraLarge: 'XXXXXXXXXXX'
|
35
|
-
// },
|
36
|
-
// // Roles
|
37
|
-
// neutral: {
|
38
|
-
// emphasisPlus: string,
|
39
|
-
// emphasis: string,
|
40
|
-
// muted: string,
|
41
|
-
// subtle: string
|
42
|
-
// },
|
43
|
-
// accent: {
|
44
|
-
// fg: string,
|
45
|
-
// emphasis: string,
|
46
|
-
// muted: string,
|
47
|
-
// subtle: string
|
48
|
-
// },
|
49
|
-
// success: {
|
50
|
-
// fg: string,
|
51
|
-
// emphasis: string,
|
52
|
-
// muted: string,
|
53
|
-
// subtle: string
|
54
|
-
// },
|
55
|
-
// attention: {
|
56
|
-
// fg: string,
|
57
|
-
// emphasis: string,
|
58
|
-
// muted: string,
|
59
|
-
// subtle: string
|
60
|
-
// },
|
61
|
-
// severe: {
|
62
|
-
// fg: string,
|
63
|
-
// emphasis: string,
|
64
|
-
// muted: string,
|
65
|
-
// subtle: string
|
66
|
-
// },
|
67
|
-
// danger: {
|
68
|
-
// fg: string,
|
69
|
-
// emphasis: string,
|
70
|
-
// muted: string,
|
71
|
-
// subtle: string
|
72
|
-
// },
|
73
|
-
// done: {
|
74
|
-
// fg: string,
|
75
|
-
// emphasis: string,
|
76
|
-
// muted: string,
|
77
|
-
// subtle: string
|
78
|
-
// },
|
79
|
-
// sponsors: {
|
80
|
-
// fg: string,
|
81
|
-
// emphasis: string,
|
82
|
-
// muted: string,
|
83
|
-
// subtle: string
|
84
|
-
// },
|
85
|
-
// // Only meant for Primer components
|
86
|
-
// primer: {
|
87
|
-
// fg: {
|
88
|
-
// disabled: string
|
89
|
-
// },
|
90
|
-
// canvas: {
|
91
|
-
// backdrop: string,
|
92
|
-
// sticky: string
|
93
|
-
// },
|
94
|
-
// border: {
|
95
|
-
// active: string,
|
96
|
-
// contrast: string
|
97
|
-
// },
|
98
|
-
// shadow: {
|
99
|
-
// highlight: string,
|
100
|
-
// inset: string,
|
101
|
-
// focus: string
|
102
|
-
// }
|
103
|
-
// }
|
104
|
-
// }
|
105
|
-
|
10
|
+
var _default = _themePreval.theme;
|
106
11
|
exports.default = _default;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
/** createSlots is a factory that can create a
|
3
|
+
* typesafe Slots + Slot pair to use in a component definition
|
4
|
+
* For example: ActionList.Item uses createSlots to get a Slots wrapper
|
5
|
+
* + Slot component that is used by LeadingVisual, Description
|
6
|
+
*/
|
7
|
+
declare const createSlots: <SlotNames extends string>(slotNames: SlotNames[]) => {
|
8
|
+
Slots: React.FC<{
|
9
|
+
context: Record<string, unknown>;
|
10
|
+
children: (slots: { [key in SlotNames]?: React.ReactNode; }) => React.ReactNode;
|
11
|
+
}>;
|
12
|
+
Slot: React.FC<{
|
13
|
+
name: SlotNames;
|
14
|
+
children: React.ReactNode | ((context: Record<string, unknown>) => React.ReactNode);
|
15
|
+
}>;
|
16
|
+
};
|
17
|
+
export default createSlots;
|