@primer/components 0.0.0-202110343939 → 0.0.0-20211040245
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 +25 -1
- package/dist/browser.esm.js +52 -48
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +37 -33
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Header.js +1 -1
- package/lib/ActionList/Item.d.ts +6 -0
- package/lib/ActionList/Item.js +5 -1
- package/lib/AnchoredOverlay/AnchoredOverlay.js +8 -6
- package/lib/Autocomplete/Autocomplete.d.ts +4 -4
- package/lib/Autocomplete/AutocompleteInput.d.ts +4 -4
- package/lib/Button/Button.d.ts +5 -5
- package/lib/Button/ButtonBase.d.ts +1 -1
- package/lib/Button/ButtonClose.d.ts +3 -3
- package/lib/Button/ButtonDanger.d.ts +5 -5
- package/lib/Button/ButtonInvisible.d.ts +5 -5
- package/lib/Button/ButtonOutline.d.ts +5 -5
- package/lib/Button/ButtonPrimary.d.ts +5 -5
- package/lib/CircleBadge.d.ts +2 -2
- package/lib/CircleOcticon.d.ts +4 -4
- package/lib/DatePicker/DatePicker.d.ts +5 -1
- package/lib/DatePicker/DatePicker.js +1 -1
- package/lib/DatePicker/DatePickerOverlay.js +5 -3
- package/lib/DatePicker/DatePickerPanel.js +134 -3
- package/lib/DatePicker/Day.js +17 -8
- package/lib/DatePicker/useDatePicker.js +24 -151
- package/lib/Dialog.d.ts +4 -4
- package/lib/Dropdown.d.ts +16 -16
- package/lib/DropdownMenu/DropdownButton.d.ts +6 -6
- package/lib/FilterList.d.ts +3 -3
- package/lib/Flash.d.ts +1 -1
- 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 +24 -24
- package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib/TextInputWithTokens.d.ts +8 -4
- package/lib/TextInputWithTokens.js +102 -29
- package/lib/Timeline.d.ts +4 -4
- 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/Token/Token.js +13 -2
- package/lib/Token/TokenBase.js +0 -4
- package/lib/Token/_RemoveTokenButton.js +15 -2
- package/lib/_TextInputWrapper.d.ts +1 -1
- package/lib/_TextInputWrapper.js +1 -1
- package/lib/sx.d.ts +8 -2
- package/lib/theme.d.ts +78 -0
- package/lib/theme.js +3 -1
- package/lib/utils/types/KeyPaths.d.ts +3 -0
- package/lib/utils/types/KeyPaths.js +1 -0
- package/lib-esm/ActionList/Header.js +1 -1
- package/lib-esm/ActionList/Item.d.ts +6 -0
- package/lib-esm/ActionList/Item.js +5 -1
- package/lib-esm/AnchoredOverlay/AnchoredOverlay.js +7 -6
- package/lib-esm/Autocomplete/Autocomplete.d.ts +4 -4
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +4 -4
- package/lib-esm/Button/Button.d.ts +5 -5
- package/lib-esm/Button/ButtonBase.d.ts +1 -1
- package/lib-esm/Button/ButtonClose.d.ts +3 -3
- package/lib-esm/Button/ButtonDanger.d.ts +5 -5
- package/lib-esm/Button/ButtonInvisible.d.ts +5 -5
- package/lib-esm/Button/ButtonOutline.d.ts +5 -5
- package/lib-esm/Button/ButtonPrimary.d.ts +5 -5
- package/lib-esm/CircleBadge.d.ts +2 -2
- package/lib-esm/CircleOcticon.d.ts +4 -4
- package/lib-esm/DatePicker/DatePicker.d.ts +5 -1
- package/lib-esm/DatePicker/DatePicker.js +1 -1
- package/lib-esm/DatePicker/DatePickerOverlay.js +5 -3
- package/lib-esm/DatePicker/DatePickerPanel.js +135 -4
- package/lib-esm/DatePicker/Day.js +17 -9
- package/lib-esm/DatePicker/useDatePicker.js +25 -152
- package/lib-esm/Dialog.d.ts +4 -4
- package/lib-esm/Dropdown.d.ts +16 -16
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +6 -6
- package/lib-esm/FilterList.d.ts +3 -3
- package/lib-esm/Flash.d.ts +1 -1
- 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 +24 -24
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib-esm/TextInputWithTokens.d.ts +8 -4
- package/lib-esm/TextInputWithTokens.js +101 -30
- package/lib-esm/Timeline.d.ts +4 -4
- 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/Token/Token.js +13 -2
- package/lib-esm/Token/TokenBase.js +0 -4
- package/lib-esm/Token/_RemoveTokenButton.js +11 -2
- package/lib-esm/_TextInputWrapper.d.ts +1 -1
- package/lib-esm/_TextInputWrapper.js +1 -1
- package/lib-esm/sx.d.ts +8 -2
- package/lib-esm/theme.d.ts +78 -0
- package/lib-esm/theme.js +2 -1
- package/lib-esm/utils/types/KeyPaths.d.ts +3 -0
- package/lib-esm/utils/types/KeyPaths.js +1 -0
- package/package.json +8 -6
package/lib/ActionList/Header.js
CHANGED
@@ -45,7 +45,7 @@ function Header({
|
|
45
45
|
return /*#__PURE__*/_react.default.createElement(StyledHeader, _extends({
|
46
46
|
role: "heading",
|
47
47
|
variant: variant
|
48
|
-
}, props), title, auxiliaryText && /*#__PURE__*/_react.default.createElement("span", null,
|
48
|
+
}, props), title, auxiliaryText && /*#__PURE__*/_react.default.createElement("span", null, auxiliaryText));
|
49
49
|
}
|
50
50
|
|
51
51
|
Header.displayName = "Header";
|
package/lib/ActionList/Item.d.ts
CHANGED
@@ -28,13 +28,19 @@ export interface ItemProps extends SxProp {
|
|
28
28
|
*/
|
29
29
|
leadingVisual?: React.FunctionComponent<IconProps>;
|
30
30
|
/**
|
31
|
+
* @deprecated Use `trailingVisual` instead
|
31
32
|
* Icon (or similar) positioned after `Item` text.
|
32
33
|
*/
|
33
34
|
trailingIcon?: React.FunctionComponent<IconProps>;
|
34
35
|
/**
|
36
|
+
* @deprecated Use `trailingVisual` instead
|
35
37
|
* Text positioned after `Item` text and optional trailing icon.
|
36
38
|
*/
|
37
39
|
trailingText?: string;
|
40
|
+
/**
|
41
|
+
* Icon or text positioned after `Item` text.
|
42
|
+
*/
|
43
|
+
trailingVisual?: React.ReactNode;
|
38
44
|
/**
|
39
45
|
* Style variations associated with various `Item` types.
|
40
46
|
*
|
package/lib/ActionList/Item.js
CHANGED
@@ -187,6 +187,7 @@ const Item = /*#__PURE__*/_react.default.forwardRef((itemProps, ref) => {
|
|
187
187
|
selectionVariant,
|
188
188
|
leadingVisual: LeadingVisual,
|
189
189
|
trailingIcon: TrailingIcon,
|
190
|
+
trailingVisual: TrailingVisual,
|
190
191
|
trailingText,
|
191
192
|
variant = 'default',
|
192
193
|
showDivider,
|
@@ -278,7 +279,10 @@ const Item = /*#__PURE__*/_react.default.forwardRef((itemProps, ref) => {
|
|
278
279
|
title: description,
|
279
280
|
inline: true,
|
280
281
|
maxWidth: "100%"
|
281
|
-
}, description)) : null),
|
282
|
+
}, description)) : null), TrailingVisual ? /*#__PURE__*/_react.default.createElement(TrailingContent, {
|
283
|
+
variant: variant,
|
284
|
+
disabled: disabled
|
285
|
+
}, typeof TrailingVisual === 'function' ? /*#__PURE__*/_react.default.createElement(TrailingVisual, null) : TrailingVisual) : TrailingIcon || trailingText ? /*#__PURE__*/_react.default.createElement(TrailingContent, {
|
282
286
|
variant: variant,
|
283
287
|
disabled: disabled
|
284
288
|
}, trailingText, TrailingIcon && /*#__PURE__*/_react.default.createElement(TrailingIcon, null)) : null));
|
@@ -11,6 +11,8 @@ var _Overlay = _interopRequireDefault(require("../Overlay"));
|
|
11
11
|
|
12
12
|
var _useFocusTrap = require("../hooks/useFocusTrap");
|
13
13
|
|
14
|
+
var _useFocusZone = require("../hooks/useFocusZone");
|
15
|
+
|
14
16
|
var _hooks = require("../hooks");
|
15
17
|
|
16
18
|
var _ssr = require("@react-aria/ssr");
|
@@ -79,12 +81,12 @@ const AnchoredOverlay = ({
|
|
79
81
|
if (!open && overlayRef.current) {
|
80
82
|
updateOverlayRef(null);
|
81
83
|
}
|
82
|
-
}, [open, overlayRef, updateOverlayRef]);
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
84
|
+
}, [open, overlayRef, updateOverlayRef]);
|
85
|
+
(0, _useFocusZone.useFocusZone)({
|
86
|
+
containerRef: overlayRef,
|
87
|
+
disabled: !open || !position,
|
88
|
+
...focusZoneSettings
|
89
|
+
});
|
88
90
|
(0, _useFocusTrap.useFocusTrap)({
|
89
91
|
containerRef: overlayRef,
|
90
92
|
disabled: !open || !position,
|
@@ -76,7 +76,7 @@ declare const _default: React.FC<{
|
|
76
76
|
results?: number | undefined;
|
77
77
|
security?: string | undefined;
|
78
78
|
unselectable?: "on" | "off" | undefined;
|
79
|
-
inputMode?: "
|
79
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
80
80
|
is?: string | undefined;
|
81
81
|
'aria-activedescendant'?: string | undefined;
|
82
82
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
@@ -91,7 +91,7 @@ declare const _default: React.FC<{
|
|
91
91
|
'aria-describedby'?: string | undefined;
|
92
92
|
'aria-details'?: string | undefined;
|
93
93
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
94
|
-
'aria-dropeffect'?: "
|
94
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
95
95
|
'aria-errormessage'?: string | undefined;
|
96
96
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
97
97
|
'aria-flowto'?: string | undefined;
|
@@ -290,9 +290,9 @@ declare const _default: React.FC<{
|
|
290
290
|
onTransitionEnd?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
291
291
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
292
292
|
block?: boolean | undefined;
|
293
|
-
sx?: import("
|
293
|
+
sx?: import("../sx").BetterSystemStyleObject | undefined;
|
294
294
|
disabled?: boolean | undefined;
|
295
|
-
variant?: "
|
295
|
+
variant?: "small" | "large" | undefined;
|
296
296
|
hasIcon?: boolean | undefined;
|
297
297
|
contrast?: boolean | undefined;
|
298
298
|
} & {
|
@@ -68,7 +68,7 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
68
68
|
results?: number | undefined;
|
69
69
|
security?: string | undefined;
|
70
70
|
unselectable?: "on" | "off" | undefined;
|
71
|
-
inputMode?: "
|
71
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
72
72
|
is?: string | undefined;
|
73
73
|
'aria-activedescendant'?: string | undefined;
|
74
74
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
@@ -83,7 +83,7 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
83
83
|
'aria-describedby'?: string | undefined;
|
84
84
|
'aria-details'?: string | undefined;
|
85
85
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
86
|
-
'aria-dropeffect'?: "
|
86
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
87
87
|
'aria-errormessage'?: string | undefined;
|
88
88
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
89
89
|
'aria-flowto'?: string | undefined;
|
@@ -282,9 +282,9 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
|
|
282
282
|
onTransitionEnd?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
283
283
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
|
284
284
|
block?: boolean | undefined;
|
285
|
-
sx?: import("
|
285
|
+
sx?: import("../sx").BetterSystemStyleObject | undefined;
|
286
286
|
disabled?: boolean | undefined;
|
287
|
-
variant?: "
|
287
|
+
variant?: "small" | "large" | undefined;
|
288
288
|
hasIcon?: boolean | undefined;
|
289
289
|
contrast?: boolean | undefined;
|
290
290
|
} & {
|
package/lib/Button/Button.d.ts
CHANGED
@@ -3,7 +3,7 @@ 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?: "small" | "medium" | "large" | 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;
|
@@ -55,7 +55,7 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
55
55
|
results?: number | undefined;
|
56
56
|
security?: string | undefined;
|
57
57
|
unselectable?: "on" | "off" | undefined;
|
58
|
-
inputMode?: "
|
58
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
59
59
|
is?: string | undefined;
|
60
60
|
'aria-activedescendant'?: string | undefined;
|
61
61
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
@@ -70,7 +70,7 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
70
70
|
'aria-describedby'?: string | undefined;
|
71
71
|
'aria-details'?: string | undefined;
|
72
72
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
73
|
-
'aria-dropeffect'?: "
|
73
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
74
74
|
'aria-errormessage'?: string | undefined;
|
75
75
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
76
76
|
'aria-flowto'?: string | undefined;
|
@@ -268,6 +268,7 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
268
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
|
+
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
271
272
|
autoFocus?: boolean | undefined;
|
272
273
|
disabled?: boolean | undefined;
|
273
274
|
formAction?: string | undefined;
|
@@ -275,8 +276,7 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
275
276
|
formMethod?: string | undefined;
|
276
277
|
formNoValidate?: boolean | undefined;
|
277
278
|
formTarget?: string | undefined;
|
278
|
-
|
279
|
-
variant?: "large" | "medium" | "small" | undefined;
|
279
|
+
variant?: "small" | "medium" | "large" | 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?: "small" | "medium" | "large" | 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;
|
@@ -74,7 +74,7 @@ declare const ButtonClose: React.ForwardRefExoticComponent<Pick<{
|
|
74
74
|
results?: number | undefined;
|
75
75
|
security?: string | undefined;
|
76
76
|
unselectable?: "on" | "off" | undefined;
|
77
|
-
inputMode?: "
|
77
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
78
78
|
is?: string | undefined;
|
79
79
|
'aria-activedescendant'?: string | undefined;
|
80
80
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
@@ -89,7 +89,7 @@ declare const ButtonClose: React.ForwardRefExoticComponent<Pick<{
|
|
89
89
|
'aria-describedby'?: string | undefined;
|
90
90
|
'aria-details'?: string | undefined;
|
91
91
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
92
|
-
'aria-dropeffect'?: "
|
92
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
93
93
|
'aria-errormessage'?: string | undefined;
|
94
94
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
95
95
|
'aria-flowto'?: string | 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("../sx").BetterSystemStyleObject | undefined;
|
310
310
|
autoFocus?: boolean | undefined;
|
311
311
|
disabled?: boolean | undefined;
|
312
312
|
formAction?: string | undefined;
|
@@ -3,7 +3,7 @@ import { SxProp } from '../sx';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
4
4
|
declare const ButtonDanger: import("styled-components").StyledComponent<"button", any, {
|
5
5
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
6
|
-
variant?: "
|
6
|
+
variant?: "small" | "medium" | "large" | 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;
|
@@ -55,7 +55,7 @@ declare const ButtonDanger: import("styled-components").StyledComponent<"button"
|
|
55
55
|
results?: number | undefined;
|
56
56
|
security?: string | undefined;
|
57
57
|
unselectable?: "on" | "off" | undefined;
|
58
|
-
inputMode?: "
|
58
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
59
59
|
is?: string | undefined;
|
60
60
|
'aria-activedescendant'?: string | undefined;
|
61
61
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
@@ -70,7 +70,7 @@ declare const ButtonDanger: import("styled-components").StyledComponent<"button"
|
|
70
70
|
'aria-describedby'?: string | undefined;
|
71
71
|
'aria-details'?: string | undefined;
|
72
72
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
73
|
-
'aria-dropeffect'?: "
|
73
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
74
74
|
'aria-errormessage'?: string | undefined;
|
75
75
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
76
76
|
'aria-flowto'?: string | undefined;
|
@@ -268,6 +268,7 @@ declare const ButtonDanger: import("styled-components").StyledComponent<"button"
|
|
268
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
|
+
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
271
272
|
autoFocus?: boolean | undefined;
|
272
273
|
disabled?: boolean | undefined;
|
273
274
|
formAction?: string | undefined;
|
@@ -275,8 +276,7 @@ declare const ButtonDanger: import("styled-components").StyledComponent<"button"
|
|
275
276
|
formMethod?: string | undefined;
|
276
277
|
formNoValidate?: boolean | undefined;
|
277
278
|
formTarget?: string | undefined;
|
278
|
-
|
279
|
-
variant?: "large" | "medium" | "small" | undefined;
|
279
|
+
variant?: "small" | "medium" | "large" | 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>;
|
@@ -3,7 +3,7 @@ import { SxProp } from '../sx';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
4
4
|
declare const ButtonInvisible: import("styled-components").StyledComponent<"button", any, {
|
5
5
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
6
|
-
variant?: "
|
6
|
+
variant?: "small" | "medium" | "large" | 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;
|
@@ -55,7 +55,7 @@ declare const ButtonInvisible: import("styled-components").StyledComponent<"butt
|
|
55
55
|
results?: number | undefined;
|
56
56
|
security?: string | undefined;
|
57
57
|
unselectable?: "on" | "off" | undefined;
|
58
|
-
inputMode?: "
|
58
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
59
59
|
is?: string | undefined;
|
60
60
|
'aria-activedescendant'?: string | undefined;
|
61
61
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
@@ -70,7 +70,7 @@ declare const ButtonInvisible: import("styled-components").StyledComponent<"butt
|
|
70
70
|
'aria-describedby'?: string | undefined;
|
71
71
|
'aria-details'?: string | undefined;
|
72
72
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
73
|
-
'aria-dropeffect'?: "
|
73
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
74
74
|
'aria-errormessage'?: string | undefined;
|
75
75
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
76
76
|
'aria-flowto'?: string | undefined;
|
@@ -268,6 +268,7 @@ declare const ButtonInvisible: import("styled-components").StyledComponent<"butt
|
|
268
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
|
+
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
271
272
|
autoFocus?: boolean | undefined;
|
272
273
|
disabled?: boolean | undefined;
|
273
274
|
formAction?: string | undefined;
|
@@ -275,8 +276,7 @@ declare const ButtonInvisible: import("styled-components").StyledComponent<"butt
|
|
275
276
|
formMethod?: string | undefined;
|
276
277
|
formNoValidate?: boolean | undefined;
|
277
278
|
formTarget?: string | undefined;
|
278
|
-
|
279
|
-
variant?: "large" | "medium" | "small" | undefined;
|
279
|
+
variant?: "small" | "medium" | "large" | 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>;
|
@@ -3,7 +3,7 @@ import { SxProp } from '../sx';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
4
4
|
declare const ButtonOutline: import("styled-components").StyledComponent<"button", any, {
|
5
5
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
6
|
-
variant?: "
|
6
|
+
variant?: "small" | "medium" | "large" | 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;
|
@@ -55,7 +55,7 @@ declare const ButtonOutline: import("styled-components").StyledComponent<"button
|
|
55
55
|
results?: number | undefined;
|
56
56
|
security?: string | undefined;
|
57
57
|
unselectable?: "on" | "off" | undefined;
|
58
|
-
inputMode?: "
|
58
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
59
59
|
is?: string | undefined;
|
60
60
|
'aria-activedescendant'?: string | undefined;
|
61
61
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
@@ -70,7 +70,7 @@ declare const ButtonOutline: import("styled-components").StyledComponent<"button
|
|
70
70
|
'aria-describedby'?: string | undefined;
|
71
71
|
'aria-details'?: string | undefined;
|
72
72
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
73
|
-
'aria-dropeffect'?: "
|
73
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
74
74
|
'aria-errormessage'?: string | undefined;
|
75
75
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
76
76
|
'aria-flowto'?: string | undefined;
|
@@ -268,6 +268,7 @@ declare const ButtonOutline: import("styled-components").StyledComponent<"button
|
|
268
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
|
+
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
271
272
|
autoFocus?: boolean | undefined;
|
272
273
|
disabled?: boolean | undefined;
|
273
274
|
formAction?: string | undefined;
|
@@ -275,8 +276,7 @@ declare const ButtonOutline: import("styled-components").StyledComponent<"button
|
|
275
276
|
formMethod?: string | undefined;
|
276
277
|
formNoValidate?: boolean | undefined;
|
277
278
|
formTarget?: string | undefined;
|
278
|
-
|
279
|
-
variant?: "large" | "medium" | "small" | undefined;
|
279
|
+
variant?: "small" | "medium" | "large" | 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>;
|
@@ -3,7 +3,7 @@ import { SxProp } from '../sx';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
4
4
|
export declare const ButtonPrimary: import("styled-components").StyledComponent<"button", any, {
|
5
5
|
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
6
|
-
variant?: "
|
6
|
+
variant?: "small" | "medium" | "large" | 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;
|
@@ -55,7 +55,7 @@ export declare const ButtonPrimary: import("styled-components").StyledComponent<
|
|
55
55
|
results?: number | undefined;
|
56
56
|
security?: string | undefined;
|
57
57
|
unselectable?: "on" | "off" | undefined;
|
58
|
-
inputMode?: "
|
58
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
59
59
|
is?: string | undefined;
|
60
60
|
'aria-activedescendant'?: string | undefined;
|
61
61
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
@@ -70,7 +70,7 @@ export declare const ButtonPrimary: import("styled-components").StyledComponent<
|
|
70
70
|
'aria-describedby'?: string | undefined;
|
71
71
|
'aria-details'?: string | undefined;
|
72
72
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
73
|
-
'aria-dropeffect'?: "
|
73
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
74
74
|
'aria-errormessage'?: string | undefined;
|
75
75
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
76
76
|
'aria-flowto'?: string | undefined;
|
@@ -268,6 +268,7 @@ export declare const ButtonPrimary: import("styled-components").StyledComponent<
|
|
268
268
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
|
269
269
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
270
270
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
|
271
|
+
as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
|
271
272
|
autoFocus?: boolean | undefined;
|
272
273
|
disabled?: boolean | undefined;
|
273
274
|
formAction?: string | undefined;
|
@@ -275,8 +276,7 @@ export declare const ButtonPrimary: import("styled-components").StyledComponent<
|
|
275
276
|
formMethod?: string | undefined;
|
276
277
|
formNoValidate?: boolean | undefined;
|
277
278
|
formTarget?: string | undefined;
|
278
|
-
|
279
|
-
variant?: "large" | "medium" | "small" | undefined;
|
279
|
+
variant?: "small" | "medium" | "large" | 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>;
|
package/lib/CircleBadge.d.ts
CHANGED
@@ -5,7 +5,7 @@ import { SxProp } from './sx';
|
|
5
5
|
import { ComponentProps } from './utils/types';
|
6
6
|
declare const CircleBadge: import("styled-components").StyledComponent<"div", any, {
|
7
7
|
inline?: boolean | undefined;
|
8
|
-
variant?: "
|
8
|
+
variant?: "small" | "medium" | "large" | undefined;
|
9
9
|
size?: number | undefined;
|
10
10
|
} & SystemCommonProps & SxProp, never>;
|
11
11
|
declare const CircleBadgeIcon: import("styled-components").StyledComponent<({ icon: IconComponent, ...rest }: {
|
@@ -15,7 +15,7 @@ export declare type CircleBadgeProps = ComponentProps<typeof CircleBadge>;
|
|
15
15
|
export declare type CircleBadgeIconProps = ComponentProps<typeof CircleBadgeIcon>;
|
16
16
|
declare const _default: string & import("styled-components").StyledComponentBase<"div", any, {
|
17
17
|
inline?: boolean | undefined;
|
18
|
-
variant?: "
|
18
|
+
variant?: "small" | "medium" | "large" | undefined;
|
19
19
|
size?: number | undefined;
|
20
20
|
} & SystemCommonProps & SxProp, never> & import("hoist-non-react-statics").NonReactStatics<never, {}> & {
|
21
21
|
Icon: import("styled-components").StyledComponent<({ icon: IconComponent, ...rest }: {
|
package/lib/CircleOcticon.d.ts
CHANGED
@@ -13,6 +13,7 @@ declare namespace CircleOcticon {
|
|
13
13
|
var defaultProps: {
|
14
14
|
size: number;
|
15
15
|
lineHeight?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
16
|
+
border?: import("styled-system").ResponsiveValue<import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
16
17
|
alignContent?: import("styled-system").ResponsiveValue<import("csstype").Property.AlignContent, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
17
18
|
alignItems?: import("styled-system").ResponsiveValue<import("csstype").Property.AlignItems, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
18
19
|
alignSelf?: import("styled-system").ResponsiveValue<import("csstype").Property.AlignSelf, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
@@ -88,7 +89,6 @@ declare namespace CircleOcticon {
|
|
88
89
|
zIndex?: import("styled-system").ResponsiveValue<import("csstype").Property.ZIndex, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
89
90
|
background?: import("styled-system").ResponsiveValue<import("csstype").Property.Background<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
90
91
|
backgroundPosition?: import("styled-system").ResponsiveValue<import("csstype").Property.BackgroundPosition<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
91
|
-
border?: import("styled-system").ResponsiveValue<import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
92
92
|
borderBottom?: import("styled-system").ResponsiveValue<import("csstype").Property.BorderBottom<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
93
93
|
borderColor?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
94
94
|
borderLeft?: import("styled-system").ResponsiveValue<import("csstype").Property.BorderLeft<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
@@ -151,7 +151,7 @@ declare namespace CircleOcticon {
|
|
151
151
|
results?: number | undefined;
|
152
152
|
security?: string | undefined;
|
153
153
|
unselectable?: "on" | "off" | undefined;
|
154
|
-
inputMode?: "
|
154
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
155
155
|
is?: string | undefined;
|
156
156
|
'aria-activedescendant'?: string | undefined;
|
157
157
|
'aria-atomic'?: boolean | "true" | "false" | undefined;
|
@@ -166,7 +166,7 @@ declare namespace CircleOcticon {
|
|
166
166
|
'aria-describedby'?: string | undefined;
|
167
167
|
'aria-details'?: string | undefined;
|
168
168
|
'aria-disabled'?: boolean | "true" | "false" | undefined;
|
169
|
-
'aria-dropeffect'?: "
|
169
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
170
170
|
'aria-errormessage'?: string | undefined;
|
171
171
|
'aria-expanded'?: boolean | "true" | "false" | undefined;
|
172
172
|
'aria-flowto'?: string | undefined;
|
@@ -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("./sx").BetterSystemStyleObject | undefined;
|
388
388
|
theme?: any;
|
389
389
|
};
|
390
390
|
}
|
@@ -41,8 +41,12 @@ export interface DatePickerProps extends DatePickerConfiguration {
|
|
41
41
|
* A custom function component used to render the anchor element.
|
42
42
|
* Will receive the selected text as `children` prop when an item is activated.
|
43
43
|
*/
|
44
|
-
renderAnchor
|
44
|
+
renderAnchor?: <T extends React.HTMLAttributes<HTMLElement>>(props: T) => JSX.Element;
|
45
45
|
value?: Selection;
|
46
|
+
/**
|
47
|
+
* Minimum date to select
|
48
|
+
*/
|
49
|
+
minDate?: Date | null;
|
46
50
|
}
|
47
51
|
export declare const DatePicker: React.FC<DatePickerProps>;
|
48
52
|
export {};
|
@@ -37,12 +37,14 @@ const DatePickerOverlay = ({
|
|
37
37
|
}
|
38
38
|
};
|
39
39
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(_AnchoredOverlay.AnchoredOverlay, _extends({
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_AnchoredOverlay.AnchoredOverlay, _extends({}, rest, {
|
41
41
|
onClose: onOverlayClose,
|
42
|
+
focusTrapSettings: {
|
43
|
+
restoreFocusOnCleanUp: true
|
44
|
+
},
|
42
45
|
focusZoneSettings: {
|
43
46
|
disabled: true
|
44
|
-
}
|
45
|
-
}, rest, {
|
47
|
+
},
|
46
48
|
"aria-modal": "true",
|
47
49
|
"aria-labelledby": `${currentViewingDate.getMonth()} ${currentViewingDate.getFullYear()}`,
|
48
50
|
"aria-live": "polite"
|