@primer/components 0.0.0-202192724324 → 0.0.0-2021928152548
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/dist/browser.esm.js +806 -803
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +450 -447
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Item.d.ts +0 -6
- package/lib/ActionList/Item.js +1 -5
- package/lib/ActionList2/Description.d.ts +6 -0
- package/lib/ActionList2/Description.js +53 -0
- package/lib/ActionList2/Divider.d.ts +5 -0
- package/lib/ActionList2/Divider.js +33 -0
- package/lib/ActionList2/Group.d.ts +5 -0
- package/lib/ActionList2/Group.js +46 -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 +204 -0
- package/lib/ActionList2/List.d.ts +26 -0
- package/lib/ActionList2/List.js +56 -0
- package/lib/ActionList2/Selection.d.ts +5 -0
- package/lib/ActionList2/Selection.js +64 -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 +25 -0
- package/lib/ActionList2/index.js +36 -0
- package/lib/ActionMenu.js +2 -2
- package/lib/Autocomplete/Autocomplete.d.ts +9 -9
- package/lib/Autocomplete/AutocompleteInput.d.ts +9 -9
- package/lib/Button/Button.d.ts +11 -11
- package/lib/Button/ButtonBase.d.ts +1 -1
- package/lib/Button/ButtonClose.d.ts +29 -29
- package/lib/Button/ButtonDanger.d.ts +11 -11
- package/lib/Button/ButtonInvisible.d.ts +11 -11
- package/lib/Button/ButtonOutline.d.ts +11 -11
- package/lib/Button/ButtonPrimary.d.ts +11 -11
- package/lib/Button/ButtonStyles.js +1 -1
- package/lib/CircleBadge.d.ts +2 -2
- package/lib/CircleOcticon.d.ts +33 -33
- package/lib/Dialog/Dialog.d.ts +5 -5
- package/lib/Dialog/Dialog.js +22 -13
- package/lib/Dialog.d.ts +35 -35
- package/lib/Dropdown.d.ts +692 -60
- package/lib/Dropdown.js +5 -6
- package/lib/DropdownMenu/DropdownButton.d.ts +30 -30
- package/lib/FilterList.d.ts +26 -26
- package/lib/Label.d.ts +1 -1
- package/lib/Position.d.ts +4 -4
- package/lib/ProgressBar.d.ts +1 -1
- package/lib/SelectMenu/SelectMenu.d.ts +149 -149
- package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib/TextInputWithTokens.d.ts +9 -9
- package/lib/Timeline.d.ts +33 -33
- package/lib/Token/AvatarToken.d.ts +1 -1
- package/lib/Token/IssueLabelToken.d.ts +1 -1
- package/lib/Token/Token.d.ts +1 -1
- package/lib/_TextInputWrapper.d.ts +1 -1
- package/lib/constants.js +1 -3
- package/lib/index.d.ts +1 -0
- package/lib/index.js +8 -0
- package/lib/sx.d.ts +2 -0
- package/lib/sx.js +8 -0
- package/lib/utils/create-slots.d.ts +17 -0
- package/lib/utils/create-slots.js +105 -0
- package/lib/utils/testing.d.ts +1 -1
- package/lib/utils/use-force-update.d.ts +1 -0
- package/lib/utils/use-force-update.js +19 -0
- package/lib-esm/ActionList/Item.d.ts +0 -6
- package/lib-esm/ActionList/Item.js +1 -5
- package/lib-esm/ActionList2/Description.d.ts +6 -0
- package/lib-esm/ActionList2/Description.js +37 -0
- package/lib-esm/ActionList2/Divider.d.ts +5 -0
- package/lib-esm/ActionList2/Divider.js +21 -0
- package/lib-esm/ActionList2/Group.d.ts +5 -0
- package/lib-esm/ActionList2/Group.js +32 -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 +176 -0
- package/lib-esm/ActionList2/List.d.ts +26 -0
- package/lib-esm/ActionList2/List.js +38 -0
- package/lib-esm/ActionList2/Selection.d.ts +5 -0
- package/lib-esm/ActionList2/Selection.js +48 -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 +25 -0
- package/lib-esm/ActionList2/index.js +23 -0
- package/lib-esm/ActionMenu.js +2 -2
- package/lib-esm/Autocomplete/Autocomplete.d.ts +9 -9
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +9 -9
- package/lib-esm/Button/Button.d.ts +11 -11
- package/lib-esm/Button/ButtonBase.d.ts +1 -1
- package/lib-esm/Button/ButtonClose.d.ts +29 -29
- package/lib-esm/Button/ButtonDanger.d.ts +11 -11
- package/lib-esm/Button/ButtonInvisible.d.ts +11 -11
- package/lib-esm/Button/ButtonOutline.d.ts +11 -11
- package/lib-esm/Button/ButtonPrimary.d.ts +11 -11
- package/lib-esm/Button/ButtonStyles.js +1 -1
- package/lib-esm/CircleBadge.d.ts +2 -2
- package/lib-esm/CircleOcticon.d.ts +33 -33
- package/lib-esm/Dialog/Dialog.d.ts +5 -5
- package/lib-esm/Dialog/Dialog.js +21 -13
- package/lib-esm/Dialog.d.ts +35 -35
- package/lib-esm/Dropdown.d.ts +692 -60
- package/lib-esm/Dropdown.js +3 -4
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +30 -30
- package/lib-esm/FilterList.d.ts +26 -26
- package/lib-esm/Label.d.ts +1 -1
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/ProgressBar.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenu.d.ts +149 -149
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib-esm/TextInputWithTokens.d.ts +9 -9
- package/lib-esm/Timeline.d.ts +33 -33
- package/lib-esm/Token/AvatarToken.d.ts +1 -1
- package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/_TextInputWrapper.d.ts +1 -1
- package/lib-esm/constants.js +1 -3
- package/lib-esm/index.d.ts +1 -0
- package/lib-esm/index.js +1 -0
- package/lib-esm/sx.d.ts +2 -0
- package/lib-esm/sx.js +3 -1
- package/lib-esm/utils/create-slots.d.ts +17 -0
- package/lib-esm/utils/create-slots.js +84 -0
- package/lib-esm/utils/testing.d.ts +1 -1
- package/lib-esm/utils/use-force-update.d.ts +1 -0
- package/lib-esm/utils/use-force-update.js +6 -0
- package/package.json +6 -6
- package/lib/NewButton/button.d.ts +0 -24
- package/lib/NewButton/button.js +0 -292
- package/lib/NewButton/counter.d.ts +0 -6
- package/lib/NewButton/counter.js +0 -33
- package/lib/NewButton/index.d.ts +0 -4
- package/lib/NewButton/index.js +0 -21
- package/lib-esm/NewButton/button.d.ts +0 -24
- package/lib-esm/NewButton/button.js +0 -268
- package/lib-esm/NewButton/counter.d.ts +0 -6
- package/lib-esm/NewButton/counter.js +0 -21
- package/lib-esm/NewButton/index.d.ts +0 -4
- package/lib-esm/NewButton/index.js +0 -3
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { SxProp } from '../sx';
|
3
|
+
declare type VisualProps = SxProp & {
|
4
|
+
children: React.ReactNode;
|
5
|
+
};
|
6
|
+
export declare const LeadingVisualContainer: React.FC<SxProp>;
|
7
|
+
export declare type LeadingVisualProps = VisualProps;
|
8
|
+
export declare const LeadingVisual: React.FC<VisualProps>;
|
9
|
+
export declare type TrailingVisualProps = VisualProps;
|
10
|
+
export declare const TrailingVisual: React.FC<VisualProps>;
|
11
|
+
export {};
|
@@ -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,25 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { Divider } from './Divider';
|
3
|
+
export type { ListProps as ActionListProps } from './List';
|
4
|
+
export type { GroupProps } from './Group';
|
5
|
+
export type { ItemProps } from './Item';
|
6
|
+
export type { DescriptionProps } from './Description';
|
7
|
+
export type { LeadingVisualProps, TrailingVisualProps } from './Visuals';
|
8
|
+
/**
|
9
|
+
* Collection of list-related components.
|
10
|
+
*/
|
11
|
+
export declare const ActionList: import("@radix-ui/react-polymorphic").ForwardRefComponent<"ul", import("./List").ListProps> & {
|
12
|
+
/** Collects related `Items` in an `ActionList`. */
|
13
|
+
Group: import("react").FC<import("./Group").GroupProps>;
|
14
|
+
/** An actionable or selectable `Item` with an optional icon and description. */
|
15
|
+
Item: import("@radix-ui/react-polymorphic").ForwardRefComponent<"li", import("./Item").ItemProps>;
|
16
|
+
/** Visually separates `Item`s or `Group`s in an `ActionList`. */
|
17
|
+
Divider: typeof Divider;
|
18
|
+
Description: import("react").FC<import("./Description").DescriptionProps>;
|
19
|
+
LeadingVisual: import("react").FC<import("../sx").SxProp & {
|
20
|
+
children: import("react").ReactNode;
|
21
|
+
}>;
|
22
|
+
TrailingVisual: import("react").FC<import("../sx").SxProp & {
|
23
|
+
children: import("react").ReactNode;
|
24
|
+
}>;
|
25
|
+
};
|
@@ -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;
|
package/lib/ActionMenu.js
CHANGED
@@ -11,7 +11,7 @@ var _Item = require("./ActionList/Item");
|
|
11
11
|
|
12
12
|
var _Divider = require("./ActionList/Divider");
|
13
13
|
|
14
|
-
var
|
14
|
+
var _Button = _interopRequireDefault(require("./Button"));
|
15
15
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
17
17
|
|
@@ -38,7 +38,7 @@ ActionMenuItem.displayName = 'ActionMenu.Item';
|
|
38
38
|
|
39
39
|
const ActionMenuBase = ({
|
40
40
|
anchorContent,
|
41
|
-
renderAnchor = props => /*#__PURE__*/_react.default.createElement(
|
41
|
+
renderAnchor = props => /*#__PURE__*/_react.default.createElement(_Button.default, props),
|
42
42
|
anchorRef: externalAnchorRef,
|
43
43
|
onAction,
|
44
44
|
open,
|
@@ -31,10 +31,12 @@ declare const _default: React.FC<{
|
|
31
31
|
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
32
32
|
translate?: "yes" | "no" | undefined;
|
33
33
|
width?: import("styled-system").ResponsiveValue<import("csstype").Property.Width<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
34
|
+
hidden?: boolean | undefined;
|
35
|
+
children?: React.ReactNode;
|
36
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
34
37
|
slot?: string | undefined;
|
35
38
|
style?: React.CSSProperties | undefined;
|
36
39
|
title?: string | undefined;
|
37
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
38
40
|
key?: React.Key | null | undefined;
|
39
41
|
defaultChecked?: boolean | undefined;
|
40
42
|
defaultValue?: string | number | readonly string[] | undefined;
|
@@ -42,11 +44,10 @@ declare const _default: React.FC<{
|
|
42
44
|
suppressHydrationWarning?: boolean | undefined;
|
43
45
|
accessKey?: string | undefined;
|
44
46
|
className?: string | undefined;
|
45
|
-
contentEditable?: (boolean | "true" | "false") |
|
47
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
46
48
|
contextMenu?: string | undefined;
|
47
49
|
dir?: string | undefined;
|
48
50
|
draggable?: (boolean | "true" | "false") | undefined;
|
49
|
-
hidden?: boolean | undefined;
|
50
51
|
id?: string | undefined;
|
51
52
|
lang?: string | undefined;
|
52
53
|
placeholder?: string | undefined;
|
@@ -73,11 +74,11 @@ declare const _default: React.FC<{
|
|
73
74
|
results?: number | undefined;
|
74
75
|
security?: string | undefined;
|
75
76
|
unselectable?: "on" | "off" | undefined;
|
76
|
-
inputMode?: "none" | "
|
77
|
+
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
77
78
|
is?: string | undefined;
|
78
79
|
'aria-activedescendant'?: string | undefined;
|
79
80
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
80
|
-
'aria-autocomplete'?: "
|
81
|
+
'aria-autocomplete'?: "none" | "list" | "inline" | "both" | undefined;
|
81
82
|
'aria-busy'?: boolean | "true" | "false" | undefined;
|
82
83
|
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
|
83
84
|
'aria-colcount'?: number | undefined;
|
@@ -88,12 +89,12 @@ declare const _default: React.FC<{
|
|
88
89
|
'aria-describedby'?: string | undefined;
|
89
90
|
'aria-details'?: string | undefined;
|
90
91
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
91
|
-
'aria-dropeffect'?: "
|
92
|
+
'aria-dropeffect'?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
92
93
|
'aria-errormessage'?: string | undefined;
|
93
94
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
94
95
|
'aria-flowto'?: string | undefined;
|
95
96
|
'aria-grabbed'?: boolean | "true" | "false" | undefined;
|
96
|
-
'aria-haspopup'?: boolean | "grid" | "dialog" | "
|
97
|
+
'aria-haspopup'?: boolean | "grid" | "dialog" | "menu" | "listbox" | "tree" | "true" | "false" | undefined;
|
97
98
|
'aria-hidden'?: boolean | "true" | "false" | undefined;
|
98
99
|
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
99
100
|
'aria-keyshortcuts'?: string | undefined;
|
@@ -123,7 +124,6 @@ declare const _default: React.FC<{
|
|
123
124
|
'aria-valuemin'?: number | undefined;
|
124
125
|
'aria-valuenow'?: number | undefined;
|
125
126
|
'aria-valuetext'?: string | undefined;
|
126
|
-
children?: React.ReactNode;
|
127
127
|
dangerouslySetInnerHTML?: {
|
128
128
|
__html: string;
|
129
129
|
} | undefined;
|
@@ -290,7 +290,7 @@ declare const _default: React.FC<{
|
|
290
290
|
block?: boolean | undefined;
|
291
291
|
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
292
292
|
disabled?: boolean | undefined;
|
293
|
-
variant?: "
|
293
|
+
variant?: "large" | "small" | undefined;
|
294
294
|
hasIcon?: boolean | undefined;
|
295
295
|
contrast?: boolean | undefined;
|
296
296
|
} & {
|
@@ -23,10 +23,12 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
23
23
|
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
24
24
|
translate?: "yes" | "no" | undefined;
|
25
25
|
width?: import("styled-system").ResponsiveValue<import("csstype").Property.Width<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
26
|
+
hidden?: boolean | undefined;
|
27
|
+
children?: React.ReactNode;
|
28
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
26
29
|
slot?: string | undefined;
|
27
30
|
style?: React.CSSProperties | undefined;
|
28
31
|
title?: string | undefined;
|
29
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
30
32
|
key?: React.Key | null | undefined;
|
31
33
|
defaultChecked?: boolean | undefined;
|
32
34
|
defaultValue?: string | number | readonly string[] | undefined;
|
@@ -34,11 +36,10 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
34
36
|
suppressHydrationWarning?: boolean | undefined;
|
35
37
|
accessKey?: string | undefined;
|
36
38
|
className?: string | undefined;
|
37
|
-
contentEditable?: (boolean | "true" | "false") |
|
39
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
38
40
|
contextMenu?: string | undefined;
|
39
41
|
dir?: string | undefined;
|
40
42
|
draggable?: (boolean | "true" | "false") | undefined;
|
41
|
-
hidden?: boolean | undefined;
|
42
43
|
id?: string | undefined;
|
43
44
|
lang?: string | undefined;
|
44
45
|
placeholder?: string | undefined;
|
@@ -65,11 +66,11 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
65
66
|
results?: number | undefined;
|
66
67
|
security?: string | undefined;
|
67
68
|
unselectable?: "on" | "off" | undefined;
|
68
|
-
inputMode?: "none" | "
|
69
|
+
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
69
70
|
is?: string | undefined;
|
70
71
|
'aria-activedescendant'?: string | undefined;
|
71
72
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
72
|
-
'aria-autocomplete'?: "
|
73
|
+
'aria-autocomplete'?: "none" | "list" | "inline" | "both" | undefined;
|
73
74
|
'aria-busy'?: boolean | "true" | "false" | undefined;
|
74
75
|
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
|
75
76
|
'aria-colcount'?: number | undefined;
|
@@ -80,12 +81,12 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
80
81
|
'aria-describedby'?: string | undefined;
|
81
82
|
'aria-details'?: string | undefined;
|
82
83
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
83
|
-
'aria-dropeffect'?: "
|
84
|
+
'aria-dropeffect'?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
84
85
|
'aria-errormessage'?: string | undefined;
|
85
86
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
86
87
|
'aria-flowto'?: string | undefined;
|
87
88
|
'aria-grabbed'?: boolean | "true" | "false" | undefined;
|
88
|
-
'aria-haspopup'?: boolean | "grid" | "dialog" | "
|
89
|
+
'aria-haspopup'?: boolean | "grid" | "dialog" | "menu" | "listbox" | "tree" | "true" | "false" | undefined;
|
89
90
|
'aria-hidden'?: boolean | "true" | "false" | undefined;
|
90
91
|
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
91
92
|
'aria-keyshortcuts'?: string | undefined;
|
@@ -115,7 +116,6 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
115
116
|
'aria-valuemin'?: number | undefined;
|
116
117
|
'aria-valuenow'?: number | undefined;
|
117
118
|
'aria-valuetext'?: string | undefined;
|
118
|
-
children?: React.ReactNode;
|
119
119
|
dangerouslySetInnerHTML?: {
|
120
120
|
__html: string;
|
121
121
|
} | undefined;
|
@@ -282,7 +282,7 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
282
282
|
block?: boolean | undefined;
|
283
283
|
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
284
284
|
disabled?: boolean | undefined;
|
285
|
-
variant?: "
|
285
|
+
variant?: "large" | "small" | undefined;
|
286
286
|
hasIcon?: boolean | undefined;
|
287
287
|
contrast?: boolean | undefined;
|
288
288
|
} & {
|
package/lib/Button/Button.d.ts
CHANGED
@@ -3,16 +3,19 @@ import { SxProp } from '../sx';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
4
4
|
declare const Button: import("styled-components").StyledComponent<"button", any, {
|
5
5
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
6
|
-
variant?: "
|
6
|
+
variant?: "large" | "medium" | "small" | undefined;
|
7
7
|
} & import("styled-system").FontSizeProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
8
8
|
color?: string | undefined;
|
9
9
|
fontSize?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
10
10
|
translate?: "yes" | "no" | undefined;
|
11
|
+
hidden?: boolean | undefined;
|
12
|
+
children?: import("react").ReactNode;
|
13
|
+
value?: string | number | readonly string[] | undefined;
|
14
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
11
15
|
form?: string | undefined;
|
12
16
|
slot?: string | undefined;
|
13
17
|
style?: import("react").CSSProperties | undefined;
|
14
18
|
title?: string | undefined;
|
15
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
16
19
|
type?: "button" | "reset" | "submit" | undefined;
|
17
20
|
name?: string | undefined;
|
18
21
|
key?: import("react").Key | null | undefined;
|
@@ -22,11 +25,10 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
22
25
|
suppressHydrationWarning?: boolean | undefined;
|
23
26
|
accessKey?: string | undefined;
|
24
27
|
className?: string | undefined;
|
25
|
-
contentEditable?: (boolean | "true" | "false") |
|
28
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
26
29
|
contextMenu?: string | undefined;
|
27
30
|
dir?: string | undefined;
|
28
31
|
draggable?: (boolean | "true" | "false") | undefined;
|
29
|
-
hidden?: boolean | undefined;
|
30
32
|
id?: string | undefined;
|
31
33
|
lang?: string | undefined;
|
32
34
|
placeholder?: string | undefined;
|
@@ -53,11 +55,11 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
53
55
|
results?: number | undefined;
|
54
56
|
security?: string | undefined;
|
55
57
|
unselectable?: "on" | "off" | undefined;
|
56
|
-
inputMode?: "none" | "
|
58
|
+
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
57
59
|
is?: string | undefined;
|
58
60
|
'aria-activedescendant'?: string | undefined;
|
59
61
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
60
|
-
'aria-autocomplete'?: "
|
62
|
+
'aria-autocomplete'?: "none" | "list" | "inline" | "both" | undefined;
|
61
63
|
'aria-busy'?: boolean | "true" | "false" | undefined;
|
62
64
|
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
|
63
65
|
'aria-colcount'?: number | undefined;
|
@@ -68,12 +70,12 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
68
70
|
'aria-describedby'?: string | undefined;
|
69
71
|
'aria-details'?: string | undefined;
|
70
72
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
71
|
-
'aria-dropeffect'?: "
|
73
|
+
'aria-dropeffect'?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
72
74
|
'aria-errormessage'?: string | undefined;
|
73
75
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
74
76
|
'aria-flowto'?: string | undefined;
|
75
77
|
'aria-grabbed'?: boolean | "true" | "false" | undefined;
|
76
|
-
'aria-haspopup'?: boolean | "grid" | "dialog" | "
|
78
|
+
'aria-haspopup'?: boolean | "grid" | "dialog" | "menu" | "listbox" | "tree" | "true" | "false" | undefined;
|
77
79
|
'aria-hidden'?: boolean | "true" | "false" | undefined;
|
78
80
|
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
79
81
|
'aria-keyshortcuts'?: string | undefined;
|
@@ -103,7 +105,6 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
103
105
|
'aria-valuemin'?: number | undefined;
|
104
106
|
'aria-valuenow'?: number | undefined;
|
105
107
|
'aria-valuetext'?: string | undefined;
|
106
|
-
children?: import("react").ReactNode;
|
107
108
|
dangerouslySetInnerHTML?: {
|
108
109
|
__html: string;
|
109
110
|
} | undefined;
|
@@ -267,7 +268,6 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
267
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
268
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
269
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
|
-
value?: string | number | readonly string[] | undefined;
|
271
271
|
autoFocus?: boolean | undefined;
|
272
272
|
disabled?: boolean | undefined;
|
273
273
|
formAction?: string | undefined;
|
@@ -275,8 +275,8 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
275
275
|
formMethod?: string | undefined;
|
276
276
|
formNoValidate?: boolean | undefined;
|
277
277
|
formTarget?: string | undefined;
|
278
|
-
variant?: "small" | "large" | "medium" | undefined;
|
279
278
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
279
|
+
variant?: "large" | "medium" | "small" | undefined;
|
280
280
|
} & {
|
281
281
|
theme?: any;
|
282
282
|
} & import("styled-system").FontSizeProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("../constants").SystemCommonProps & import("../constants").SystemLayoutProps & SxProp, never>;
|
@@ -6,7 +6,7 @@ export declare const buttonSystemProps: import("styled-system").styleFn;
|
|
6
6
|
export declare type ButtonSystemProps = FontSizeProps & SystemCommonProps & SystemLayoutProps;
|
7
7
|
declare const ButtonBase: import("styled-components").StyledComponent<"button", any, {
|
8
8
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
9
|
-
variant?: "
|
9
|
+
variant?: "large" | "medium" | "small" | undefined;
|
10
10
|
} & FontSizeProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, never>;
|
11
11
|
export declare type ButtonBaseProps = ComponentProps<typeof ButtonBase>;
|
12
12
|
export default ButtonBase;
|