@primer/components 0.0.0-2021828195214 → 0.0.0-2021828205354
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 +2 -4
- package/dist/browser.esm.js +175 -186
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +177 -188
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Item.d.ts +4 -17
- package/lib/ActionList/Item.js +6 -8
- package/lib/ActionList/List.d.ts +7 -11
- package/lib/ActionList/List.js +2 -2
- package/lib/ActionList/index.d.ts +2 -1
- package/lib/Button/Button.d.ts +2 -3
- package/lib/Button/Button.js +2 -6
- package/lib/Button/ButtonBase.d.ts +5 -8
- package/lib/Button/ButtonBase.js +1 -5
- package/lib/Button/ButtonClose.d.ts +2 -45
- package/lib/Button/ButtonClose.js +1 -1
- package/lib/Button/ButtonDanger.d.ts +2 -3
- package/lib/Button/ButtonDanger.js +2 -6
- package/lib/Button/ButtonInvisible.d.ts +2 -3
- package/lib/Button/ButtonInvisible.js +2 -6
- package/lib/Button/ButtonOutline.d.ts +2 -3
- package/lib/Button/ButtonOutline.js +2 -6
- package/lib/Button/ButtonPrimary.d.ts +2 -3
- package/lib/Button/ButtonPrimary.js +2 -6
- package/lib/Button/ButtonTableList.d.ts +1 -2
- package/lib/Button/ButtonTableList.js +1 -1
- package/lib/Dropdown.d.ts +2 -90
- package/lib/DropdownMenu/DropdownButton.d.ts +2 -46
- package/lib-esm/ActionList/Item.d.ts +4 -17
- package/lib-esm/ActionList/Item.js +5 -8
- package/lib-esm/ActionList/List.d.ts +7 -11
- package/lib-esm/ActionList/List.js +2 -2
- package/lib-esm/ActionList/index.d.ts +2 -1
- package/lib-esm/Button/Button.d.ts +2 -3
- package/lib-esm/Button/Button.js +2 -2
- package/lib-esm/Button/ButtonBase.d.ts +5 -8
- package/lib-esm/Button/ButtonBase.js +1 -3
- package/lib-esm/Button/ButtonClose.d.ts +2 -45
- package/lib-esm/Button/ButtonClose.js +2 -2
- package/lib-esm/Button/ButtonDanger.d.ts +2 -3
- package/lib-esm/Button/ButtonDanger.js +2 -2
- package/lib-esm/Button/ButtonInvisible.d.ts +2 -3
- package/lib-esm/Button/ButtonInvisible.js +2 -2
- package/lib-esm/Button/ButtonOutline.d.ts +2 -3
- package/lib-esm/Button/ButtonOutline.js +2 -2
- package/lib-esm/Button/ButtonPrimary.d.ts +2 -3
- package/lib-esm/Button/ButtonPrimary.js +2 -2
- package/lib-esm/Button/ButtonTableList.d.ts +1 -2
- package/lib-esm/Button/ButtonTableList.js +2 -2
- package/lib-esm/Dropdown.d.ts +2 -90
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +2 -46
- package/package.json +1 -2
package/lib/Dropdown.d.ts
CHANGED
@@ -617,38 +617,13 @@ declare const _default: {
|
|
617
617
|
Item: import("styled-components").StyledComponent<"li", any, SxProp, never>;
|
618
618
|
Button: {
|
619
619
|
({ children, ...rest }: {
|
620
|
-
|
621
|
-
color?: (string & import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>) | undefined;
|
622
|
-
display?: import("styled-system").ResponsiveValue<import("csstype").Property.Display, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
623
|
-
fontSize?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
624
|
-
height?: import("styled-system").ResponsiveValue<import("csstype").Property.Height<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
625
|
-
marginBottom?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
626
|
-
marginLeft?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
627
|
-
marginRight?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
628
|
-
marginTop?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
629
|
-
maxHeight?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxHeight<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
630
|
-
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
631
|
-
minHeight?: import("styled-system").ResponsiveValue<import("csstype").Property.MinHeight<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
632
|
-
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
633
|
-
opacity?: import("styled-system").ResponsiveValue<import("csstype").Property.Opacity, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
634
|
-
overflowX?: import("styled-system").ResponsiveValue<import("csstype").Property.OverflowX, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
635
|
-
overflowY?: import("styled-system").ResponsiveValue<import("csstype").Property.OverflowY, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
636
|
-
paddingBottom?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
637
|
-
paddingLeft?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
638
|
-
paddingRight?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
639
|
-
paddingTop?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
620
|
+
color?: string | undefined;
|
640
621
|
translate?: "yes" | "no" | undefined;
|
641
|
-
verticalAlign?: import("styled-system").ResponsiveValue<import("csstype").Property.VerticalAlign<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
642
|
-
width?: import("styled-system").ResponsiveValue<import("csstype").Property.Width<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
643
|
-
margin?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
644
|
-
overflow?: import("styled-system").ResponsiveValue<import("csstype").Property.Overflow, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
645
|
-
padding?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
646
622
|
hidden?: boolean | undefined;
|
647
623
|
children?: React.ReactNode;
|
648
624
|
value?: string | number | readonly string[] | undefined;
|
649
625
|
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
650
626
|
form?: string | undefined;
|
651
|
-
p?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
652
627
|
slot?: string | undefined;
|
653
628
|
style?: React.CSSProperties | undefined;
|
654
629
|
title?: string | undefined;
|
@@ -904,25 +879,6 @@ declare const _default: {
|
|
904
879
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
|
905
880
|
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
906
881
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
907
|
-
bg?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
908
|
-
m?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
909
|
-
mt?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
910
|
-
mr?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
911
|
-
mb?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
912
|
-
ml?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
913
|
-
mx?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
914
|
-
marginX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
915
|
-
my?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
916
|
-
marginY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
917
|
-
pt?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
918
|
-
pr?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
919
|
-
pb?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
920
|
-
pl?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
921
|
-
px?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
922
|
-
paddingX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
923
|
-
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
924
|
-
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
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
882
|
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
927
883
|
autoFocus?: boolean | undefined;
|
928
884
|
disabled?: boolean | undefined;
|
@@ -937,38 +893,13 @@ declare const _default: {
|
|
937
893
|
theme?: any;
|
938
894
|
}): JSX.Element;
|
939
895
|
defaultProps: Partial<{
|
940
|
-
|
941
|
-
color?: (string & import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>) | undefined;
|
942
|
-
display?: import("styled-system").ResponsiveValue<import("csstype").Property.Display, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
943
|
-
fontSize?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
944
|
-
height?: import("styled-system").ResponsiveValue<import("csstype").Property.Height<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
945
|
-
marginBottom?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
946
|
-
marginLeft?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
947
|
-
marginRight?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
948
|
-
marginTop?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
949
|
-
maxHeight?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxHeight<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
950
|
-
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
951
|
-
minHeight?: import("styled-system").ResponsiveValue<import("csstype").Property.MinHeight<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
952
|
-
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
953
|
-
opacity?: import("styled-system").ResponsiveValue<import("csstype").Property.Opacity, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
954
|
-
overflowX?: import("styled-system").ResponsiveValue<import("csstype").Property.OverflowX, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
955
|
-
overflowY?: import("styled-system").ResponsiveValue<import("csstype").Property.OverflowY, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
956
|
-
paddingBottom?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
957
|
-
paddingLeft?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
958
|
-
paddingRight?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
959
|
-
paddingTop?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
896
|
+
color?: string | undefined;
|
960
897
|
translate?: "yes" | "no" | undefined;
|
961
|
-
verticalAlign?: import("styled-system").ResponsiveValue<import("csstype").Property.VerticalAlign<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
962
|
-
width?: import("styled-system").ResponsiveValue<import("csstype").Property.Width<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
963
|
-
margin?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
964
|
-
overflow?: import("styled-system").ResponsiveValue<import("csstype").Property.Overflow, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
965
|
-
padding?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
966
898
|
hidden?: boolean | undefined;
|
967
899
|
children?: React.ReactNode;
|
968
900
|
value?: string | number | readonly string[] | undefined;
|
969
901
|
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
970
902
|
form?: string | undefined;
|
971
|
-
p?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
972
903
|
slot?: string | undefined;
|
973
904
|
style?: React.CSSProperties | undefined;
|
974
905
|
title?: string | undefined;
|
@@ -1224,25 +1155,6 @@ declare const _default: {
|
|
1224
1155
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
|
1225
1156
|
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
1226
1157
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
1227
|
-
bg?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1228
|
-
m?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1229
|
-
mt?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1230
|
-
mr?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1231
|
-
mb?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1232
|
-
ml?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1233
|
-
mx?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1234
|
-
marginX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1235
|
-
my?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1236
|
-
marginY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1237
|
-
pt?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1238
|
-
pr?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1239
|
-
pb?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1240
|
-
pl?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1241
|
-
px?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1242
|
-
paddingX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1243
|
-
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
1244
|
-
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
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
1158
|
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
1247
1159
|
autoFocus?: boolean | undefined;
|
1248
1160
|
disabled?: boolean | undefined;
|
@@ -2,38 +2,13 @@ import React from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button/Button';
|
3
3
|
export declare type DropdownButtonProps = ButtonProps;
|
4
4
|
export declare const DropdownButton: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<{
|
5
|
-
|
6
|
-
color?: (string & import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>>) | undefined;
|
7
|
-
display?: import("styled-system").ResponsiveValue<import("csstype").Property.Display, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
8
|
-
fontSize?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
9
|
-
height?: import("styled-system").ResponsiveValue<import("csstype").Property.Height<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
10
|
-
marginBottom?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
11
|
-
marginLeft?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
12
|
-
marginRight?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
13
|
-
marginTop?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
14
|
-
maxHeight?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxHeight<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
15
|
-
maxWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
16
|
-
minHeight?: import("styled-system").ResponsiveValue<import("csstype").Property.MinHeight<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
17
|
-
minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
18
|
-
opacity?: import("styled-system").ResponsiveValue<import("csstype").Property.Opacity, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
19
|
-
overflowX?: import("styled-system").ResponsiveValue<import("csstype").Property.OverflowX, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
20
|
-
overflowY?: import("styled-system").ResponsiveValue<import("csstype").Property.OverflowY, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
21
|
-
paddingBottom?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
22
|
-
paddingLeft?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
23
|
-
paddingRight?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
24
|
-
paddingTop?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
5
|
+
color?: string | undefined;
|
25
6
|
translate?: "yes" | "no" | undefined;
|
26
|
-
verticalAlign?: import("styled-system").ResponsiveValue<import("csstype").Property.VerticalAlign<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
27
|
-
width?: import("styled-system").ResponsiveValue<import("csstype").Property.Width<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
28
|
-
margin?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
29
|
-
overflow?: import("styled-system").ResponsiveValue<import("csstype").Property.Overflow, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
30
|
-
padding?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
31
7
|
hidden?: boolean | undefined;
|
32
8
|
children?: React.ReactNode;
|
33
9
|
value?: string | number | readonly string[] | undefined;
|
34
10
|
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
35
11
|
form?: string | undefined;
|
36
|
-
p?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
37
12
|
slot?: string | undefined;
|
38
13
|
style?: React.CSSProperties | undefined;
|
39
14
|
title?: string | undefined;
|
@@ -289,25 +264,6 @@ export declare const DropdownButton: React.ForwardRefExoticComponent<Pick<React.
|
|
289
264
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement> | undefined;
|
290
265
|
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
291
266
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
292
|
-
bg?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
293
|
-
m?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
294
|
-
mt?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
295
|
-
mr?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
296
|
-
mb?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
297
|
-
ml?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
298
|
-
mx?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
299
|
-
marginX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
300
|
-
my?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
301
|
-
marginY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
302
|
-
pt?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
303
|
-
pr?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
304
|
-
pb?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
305
|
-
pl?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
306
|
-
px?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
307
|
-
paddingX?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
308
|
-
py?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
309
|
-
paddingY?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
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
267
|
sx?: import("@styled-system/css").SystemStyleObject | undefined;
|
312
268
|
autoFocus?: boolean | undefined;
|
313
269
|
disabled?: boolean | undefined;
|
@@ -320,4 +276,4 @@ export declare const DropdownButton: React.ForwardRefExoticComponent<Pick<React.
|
|
320
276
|
variant?: "large" | "medium" | "small" | undefined;
|
321
277
|
} & {
|
322
278
|
theme?: any;
|
323
|
-
}>, "
|
279
|
+
}>, "color" | "translate" | "hidden" | "children" | "theme" | "value" | "form" | "slot" | "style" | "title" | "type" | "name" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "as" | "variant"> & React.RefAttributes<HTMLElement>>;
|
@@ -2,12 +2,10 @@ import { IconProps } from '@primer/octicons-react';
|
|
2
2
|
import React from 'react';
|
3
3
|
import { SxProp } from '../sx';
|
4
4
|
import { ItemInput } from './List';
|
5
|
-
import { ForwardRefComponent as PolymorphicForwardRefComponent } from '@radix-ui/react-polymorphic';
|
6
|
-
import { AriaRole } from '../utils/types';
|
7
5
|
/**
|
8
6
|
* Contract for props passed to the `Item` component.
|
9
7
|
*/
|
10
|
-
export interface ItemProps extends SxProp {
|
8
|
+
export interface ItemProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'id'>, SxProp {
|
11
9
|
/**
|
12
10
|
* Primary text which names an `Item`.
|
13
11
|
*/
|
@@ -70,18 +68,6 @@ export interface ItemProps extends SxProp {
|
|
70
68
|
* An id associated with this item. Should be unique between items
|
71
69
|
*/
|
72
70
|
id?: number | string;
|
73
|
-
/**
|
74
|
-
* Node to be included inside the item before the text.
|
75
|
-
*/
|
76
|
-
children?: React.ReactNode;
|
77
|
-
/**
|
78
|
-
* The ARIA role describing the function of `List` component. `option` is a common value.
|
79
|
-
*/
|
80
|
-
role?: AriaRole;
|
81
|
-
/**
|
82
|
-
* An item to pass back in the `onAction` callback, meant as
|
83
|
-
*/
|
84
|
-
item?: ItemInput;
|
85
71
|
}
|
86
72
|
export declare const TextContainer: import("styled-components").StyledComponent<"span", any, {
|
87
73
|
dangerouslySetInnerHtml?: React.DOMAttributes<HTMLDivElement>['dangerouslySetInnerHTML'];
|
@@ -89,5 +75,6 @@ export declare const TextContainer: import("styled-components").StyledComponent<
|
|
89
75
|
/**
|
90
76
|
* An actionable or selectable `Item` with an optional icon and description.
|
91
77
|
*/
|
92
|
-
declare
|
93
|
-
|
78
|
+
export declare function Item(itemProps: Partial<ItemProps> & {
|
79
|
+
item?: ItemInput;
|
80
|
+
}): JSX.Element;
|
@@ -11,10 +11,10 @@ import { StyledDivider } from './Divider';
|
|
11
11
|
import { useColorSchemeVar, useTheme } from '../ThemeProvider';
|
12
12
|
import { activeDescendantActivatedDirectly, activeDescendantActivatedIndirectly, isActiveDescendantAttribute } from '../behaviors/focusZone';
|
13
13
|
import { useSSRSafeId } from '@react-aria/ssr';
|
14
|
-
|
15
14
|
/**
|
16
15
|
* These colors are not yet in our default theme. Need to remove this once they are added.
|
17
16
|
*/
|
17
|
+
|
18
18
|
const customItemThemes = {
|
19
19
|
default: {
|
20
20
|
hover: {
|
@@ -85,7 +85,7 @@ const MainContent = styled.div.withConfig({
|
|
85
85
|
const StyledItem = styled.div.withConfig({
|
86
86
|
displayName: "Item__StyledItem",
|
87
87
|
componentId: "jqpvy8-2"
|
88
|
-
})(["padding:6px ", ";display:flex;border-radius:", ";color:", ";transition:background 33.333ms linear
|
88
|
+
})(["padding:6px ", ";display:flex;border-radius:", ";color:", ";transition:background 33.333ms linear;@media (hover:hover) and (pointer:fine){:hover{background:var(--item-hover-bg-override,", ");cursor:", ";}}:not(:first-of-type):not(", " + &):not(", " + &){margin-top:", ";", "::before{content:' ';display:block;position:absolute;width:100%;top:-7px;border:0 solid ", ";border-top-width:", ";}}&:hover ", "::before,:hover + * ", "::before{border-color:var(--item-hover-divider-border-color-override,transparent) !important;}&:focus ", "::before,:focus + * ", "::before,&[", "] ", "::before,[", "] + & ", "::before{border-color:transparent !important;}&[", "='", "']{background:", ";}&[", "='", "']{background:", ";}&:focus{background:", ";outline:none;}&:active{background:", ";}", ""], get('space.2'), get('radii.2'), ({
|
89
89
|
variant,
|
90
90
|
item
|
91
91
|
}) => getItemVariant(variant, item === null || item === void 0 ? void 0 : item.disabled).color, ({
|
@@ -144,9 +144,8 @@ const MultiSelectInput = styled.input.withConfig({
|
|
144
144
|
* An actionable or selectable `Item` with an optional icon and description.
|
145
145
|
*/
|
146
146
|
|
147
|
-
|
147
|
+
export function Item(itemProps) {
|
148
148
|
const {
|
149
|
-
as: Component,
|
150
149
|
text,
|
151
150
|
description,
|
152
151
|
descriptionVariant = 'inline',
|
@@ -202,8 +201,6 @@ const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
202
201
|
theme
|
203
202
|
} = useTheme();
|
204
203
|
return /*#__PURE__*/React.createElement(StyledItem, _extends({
|
205
|
-
ref: ref,
|
206
|
-
as: Component,
|
207
204
|
tabIndex: disabled ? undefined : -1,
|
208
205
|
variant: variant,
|
209
206
|
showDivider: showDivider,
|
@@ -249,5 +246,5 @@ const Item = /*#__PURE__*/React.forwardRef((itemProps, ref) => {
|
|
249
246
|
variant: variant,
|
250
247
|
disabled: disabled
|
251
248
|
}, trailingText, TrailingIcon && /*#__PURE__*/React.createElement(TrailingIcon, null)) : null));
|
252
|
-
}
|
253
|
-
|
249
|
+
}
|
250
|
+
Item.displayName = "Item";
|
@@ -1,12 +1,9 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import type { AriaRole } from '../utils/types';
|
3
3
|
import { Group, GroupProps } from './Group';
|
4
|
-
import { ItemProps } from './Item';
|
5
|
-
declare type
|
6
|
-
|
7
|
-
renderItem: RenderItemFn;
|
8
|
-
}) & {
|
9
|
-
key?: Key;
|
4
|
+
import { Item, ItemProps } from './Item';
|
5
|
+
export declare type ItemInput = ItemProps | (Partial<ItemProps> & {
|
6
|
+
renderItem: typeof Item;
|
10
7
|
});
|
11
8
|
/**
|
12
9
|
* Contract for props passed to the `List` component.
|
@@ -29,7 +26,7 @@ export interface ListPropsBase {
|
|
29
26
|
* without a `Group`-level or `Item`-level custom `Item` renderer will be
|
30
27
|
* rendered using this function component.
|
31
28
|
*/
|
32
|
-
renderItem?:
|
29
|
+
renderItem?: typeof Item;
|
33
30
|
/**
|
34
31
|
* A `List`-level custom `Group` renderer. Every `Group` within this `List`
|
35
32
|
* without a `Group`-level custom `Item` renderer will be rendered using
|
@@ -61,7 +58,7 @@ export interface GroupedListProps extends ListPropsBase {
|
|
61
58
|
* and `Group`-level custom `Item` or `Group` renderers.
|
62
59
|
*/
|
63
60
|
groupMetadata: ((Omit<GroupProps, 'items'> | Omit<Partial<GroupProps> & {
|
64
|
-
renderItem?:
|
61
|
+
renderItem?: typeof Item;
|
65
62
|
renderGroup?: typeof Group;
|
66
63
|
}, 'items'>) & {
|
67
64
|
groupId: string;
|
@@ -71,7 +68,7 @@ export interface GroupedListProps extends ListPropsBase {
|
|
71
68
|
* and `Item`-level custom `Item` renderers.
|
72
69
|
*/
|
73
70
|
items: ((ItemProps | (Partial<ItemProps> & {
|
74
|
-
renderItem:
|
71
|
+
renderItem: typeof Item;
|
75
72
|
})) & {
|
76
73
|
groupId: string;
|
77
74
|
})[];
|
@@ -84,4 +81,3 @@ export declare type ListProps = ListPropsBase | GroupedListProps;
|
|
84
81
|
* Lists `Item`s, either grouped or ungrouped, with a `Divider` between each `Group`.
|
85
82
|
*/
|
86
83
|
export declare const List: React.ForwardRefExoticComponent<ListProps & React.RefAttributes<HTMLDivElement>>;
|
87
|
-
export {};
|
@@ -90,11 +90,11 @@ export const List = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
90
90
|
|
91
91
|
|
92
92
|
const renderItem = (itemProps, item, itemIndex) => {
|
93
|
-
var _ref2,
|
93
|
+
var _ref2, _itemProps$key, _itemProps$id;
|
94
94
|
|
95
95
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
96
96
|
const ItemComponent = 'renderItem' in itemProps && itemProps.renderItem || props.renderItem || Item;
|
97
|
-
const key = (_ref2 = (
|
97
|
+
const key = (_ref2 = (_itemProps$key = itemProps.key) !== null && _itemProps$key !== void 0 ? _itemProps$key : (_itemProps$id = itemProps.id) === null || _itemProps$id === void 0 ? void 0 : _itemProps$id.toString()) !== null && _ref2 !== void 0 ? _ref2 : itemIndex.toString();
|
98
98
|
return /*#__PURE__*/React.createElement(ItemComponent, _extends({
|
99
99
|
showDivider: props.showItemDividers,
|
100
100
|
selectionVariant: props.selectionVariant
|
@@ -1,5 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Group } from './Group';
|
3
|
+
import { Item } from './Item';
|
3
4
|
import { Divider } from './Divider';
|
4
5
|
export type { ListProps as ActionListProps } from './List';
|
5
6
|
export type { GroupProps } from './Group';
|
@@ -11,7 +12,7 @@ export declare const ActionList: import("react").ForwardRefExoticComponent<impor
|
|
11
12
|
/** Collects related `Items` in an `ActionList`. */
|
12
13
|
Group: typeof Group;
|
13
14
|
/** An actionable or selectable `Item` with an optional icon and description. */
|
14
|
-
Item:
|
15
|
+
Item: typeof Item;
|
15
16
|
/** Visually separates `Item`s or `Group`s in an `ActionList`. */
|
16
17
|
Divider: typeof Divider;
|
17
18
|
};
|
@@ -4,9 +4,8 @@ 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
6
|
variant?: "large" | "medium" | "small" | undefined;
|
7
|
-
} &
|
7
|
+
} & {
|
8
8
|
color?: string | undefined;
|
9
|
-
fontSize?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
|
10
9
|
translate?: "yes" | "no" | undefined;
|
11
10
|
hidden?: boolean | undefined;
|
12
11
|
children?: import("react").ReactNode;
|
@@ -279,6 +278,6 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
|
|
279
278
|
variant?: "large" | "medium" | "small" | undefined;
|
280
279
|
} & {
|
281
280
|
theme?: any;
|
282
|
-
} &
|
281
|
+
} & SxProp, never>;
|
283
282
|
export declare type ButtonProps = ComponentProps<typeof Button>;
|
284
283
|
export default Button;
|
package/lib-esm/Button/Button.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
2
|
import { get } from '../constants';
|
3
3
|
import sx from '../sx';
|
4
|
-
import ButtonBase
|
4
|
+
import ButtonBase from './ButtonBase';
|
5
5
|
const Button = styled(ButtonBase).withConfig({
|
6
6
|
displayName: "Button",
|
7
7
|
componentId: "xjtz72-0"
|
8
|
-
})(["color:", ";background-color:", ";border:1px solid ", ";box-shadow:", ",", "};&:hover{background-color:", ";border-color:", ";}&:focus{border-color:", ";box-shadow:", ";}&:active{background-color:", ";box-shadow:", ";}&:disabled{color:", ";background-color:", ";border-color:", ";}", ";"
|
8
|
+
})(["color:", ";background-color:", ";border:1px solid ", ";box-shadow:", ",", "};&:hover{background-color:", ";border-color:", ";}&:focus{border-color:", ";box-shadow:", ";}&:active{background-color:", ";box-shadow:", ";}&:disabled{color:", ";background-color:", ";border-color:", ";}", ";"], get('colors.btn.text'), get('colors.btn.bg'), get('colors.btn.border'), get('shadows.btn.shadow'), get('shadows.btn.insetShadow'), get('colors.btn.hoverBg'), get('colors.btn.hoverBorder'), get('colors.btn.focusBorder'), get('shadows.btn.focusShadow'), get('colors.btn.selectedBg'), get('shadows.btn.shadowActive'), get('colors.fg.muted'), get('colors.btn.bg'), get('colors.btn.border'), sx);
|
9
9
|
export default Button;
|
@@ -1,12 +1,9 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { FontSizeProps } from 'styled-system';
|
3
|
-
import { SystemCommonProps, SystemLayoutProps } from '../constants';
|
4
2
|
import { ComponentProps } from '../utils/types';
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
} & FontSizeProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, never>;
|
3
|
+
declare type StyledButtonBaseProps = {
|
4
|
+
as?: 'button' | 'a' | 'summary' | 'input' | string | React.ReactType;
|
5
|
+
variant?: 'small' | 'medium' | 'large';
|
6
|
+
};
|
7
|
+
declare const ButtonBase: import("styled-components").StyledComponent<"button", any, StyledButtonBaseProps, never>;
|
11
8
|
export declare type ButtonBaseProps = ComponentProps<typeof ButtonBase>;
|
12
9
|
export default ButtonBase;
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
|
-
import {
|
3
|
-
import { COMMON, LAYOUT } from '../constants';
|
2
|
+
import { variant } from 'styled-system';
|
4
3
|
import buttonBaseStyles from './ButtonStyles';
|
5
|
-
export const buttonSystemProps = compose(fontSize, COMMON, LAYOUT);
|
6
4
|
const variants = variant({
|
7
5
|
variants: {
|
8
6
|
small: {
|