@mackin.com/styleguide 10.0.0 → 10.0.1
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/index.d.ts +12 -27
- package/index.esm.js +181 -207
- package/index.js +181 -207
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -234,8 +234,6 @@ declare const Header: (props: {
|
|
|
234
234
|
className?: string;
|
|
235
235
|
leftElements?: JSX.Element;
|
|
236
236
|
rightElements?: JSX.Element;
|
|
237
|
-
/** @deprecated Elements will appear in the center of the header and slightly below. */
|
|
238
|
-
centerOffsetElements?: JSX.Element;
|
|
239
237
|
noMenu?: boolean;
|
|
240
238
|
/** Will fill the title center aligned with wrapping. */
|
|
241
239
|
fillTitle?: boolean;
|
|
@@ -264,13 +262,15 @@ interface ImageProps extends Omit<React.DetailedHTMLProps<React.ImgHTMLAttribute
|
|
|
264
262
|
}
|
|
265
263
|
declare const Image: React.ForwardRefExoticComponent<Omit<ImageProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
266
264
|
|
|
265
|
+
type InfoPanelVariant = 'info' | 'warning' | 'error' | 'negative' | 'positive';
|
|
266
|
+
type InfoPanelTag = 'p' | 'div';
|
|
267
267
|
declare const InfoPanel: (props: {
|
|
268
268
|
children: React.ReactNode;
|
|
269
|
-
variant?:
|
|
269
|
+
variant?: InfoPanelVariant;
|
|
270
270
|
className?: string;
|
|
271
271
|
style?: React.CSSProperties;
|
|
272
272
|
/** Defaults to 'p'. */
|
|
273
|
-
tag?:
|
|
273
|
+
tag?: InfoPanelTag;
|
|
274
274
|
}) => React.JSX.Element;
|
|
275
275
|
|
|
276
276
|
interface InfoTipProps {
|
|
@@ -423,9 +423,6 @@ declare const Nav: (props: {
|
|
|
423
423
|
toggle: (show: boolean) => void;
|
|
424
424
|
id?: string;
|
|
425
425
|
children?: React.ReactNode;
|
|
426
|
-
/** @deprecated Going foward, implement the nav visibility based on screen size in the consuming application.
|
|
427
|
-
* If true, the nav and backdrop will hide when the screen is larger. Defaults to `theme.breakpoints.desktop`. */
|
|
428
|
-
responsive?: boolean;
|
|
429
426
|
className?: string;
|
|
430
427
|
/** Duration of the slide animation in ms. Defaults to `theme.timings.nav.slideMs`. */
|
|
431
428
|
slideMs?: number;
|
|
@@ -452,10 +449,6 @@ interface PagedResultDto<T> {
|
|
|
452
449
|
/** A page of data with helpers props. */
|
|
453
450
|
declare class PagedResult<T> {
|
|
454
451
|
constructor(items?: T[], total?: number, page?: number, limit?: number);
|
|
455
|
-
/** @deprecated Use fromPagedResultDto going forward. */
|
|
456
|
-
static fromDto<T>(dto: {
|
|
457
|
-
[key: string]: any;
|
|
458
|
-
}): PagedResult<T>;
|
|
459
452
|
static fromPagedResultDto<TDto, TDomain>(dto: PagedResultDto<TDto>, convert?: (dto: TDto) => TDomain): PagedResult<TDomain>;
|
|
460
453
|
total: number;
|
|
461
454
|
/** The zero-based page index. */
|
|
@@ -706,7 +699,7 @@ declare const SearchBox: React.ForwardRefExoticComponent<Omit<SearchBoxProps, "r
|
|
|
706
699
|
|
|
707
700
|
type Alignment = 'left' | 'right' | 'center';
|
|
708
701
|
|
|
709
|
-
declare const GlobalStyles: (
|
|
702
|
+
declare const GlobalStyles: () => null;
|
|
710
703
|
|
|
711
704
|
interface MackinTheme {
|
|
712
705
|
colors: {
|
|
@@ -715,8 +708,6 @@ interface MackinTheme {
|
|
|
715
708
|
primary2: string;
|
|
716
709
|
primary2Font: string;
|
|
717
710
|
secondary: string;
|
|
718
|
-
/** @deprecated Bad name. Use 'secondaryFont'. */
|
|
719
|
-
secondary2Font: string;
|
|
720
711
|
secondaryFont: string;
|
|
721
712
|
info: string;
|
|
722
713
|
infoFont: string;
|
|
@@ -895,7 +886,7 @@ declare const TabHeader: (p: TabHeaderProps) => React.JSX.Element;
|
|
|
895
886
|
|
|
896
887
|
declare const Table: (props: {
|
|
897
888
|
caption?: string | JSX.Element;
|
|
898
|
-
children?:
|
|
889
|
+
children?: React.ReactNode;
|
|
899
890
|
noCellBorder?: boolean;
|
|
900
891
|
/** Styles applied to the table element. */
|
|
901
892
|
className?: string;
|
|
@@ -906,17 +897,17 @@ declare const Table: (props: {
|
|
|
906
897
|
}) => React.JSX.Element;
|
|
907
898
|
declare const Tr: (props: {
|
|
908
899
|
className?: string;
|
|
909
|
-
children?:
|
|
900
|
+
children?: React.ReactNode;
|
|
910
901
|
}) => React.JSX.Element;
|
|
911
902
|
declare const Th: (props: {
|
|
912
|
-
children?:
|
|
903
|
+
children?: React.ReactNode;
|
|
913
904
|
align?: Alignment;
|
|
914
905
|
width?: string;
|
|
915
906
|
style?: React.CSSProperties;
|
|
916
907
|
className?: string;
|
|
917
908
|
}) => React.JSX.Element;
|
|
918
909
|
declare const Td: (props: {
|
|
919
|
-
children?:
|
|
910
|
+
children?: React.ReactNode;
|
|
920
911
|
align?: Alignment;
|
|
921
912
|
style?: React.CSSProperties;
|
|
922
913
|
colSpan?: number;
|
|
@@ -950,7 +941,7 @@ declare const TabLocker: (props: {
|
|
|
950
941
|
|
|
951
942
|
type SupportedTags = 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'span' | 'div';
|
|
952
943
|
interface TextProps {
|
|
953
|
-
children:
|
|
944
|
+
children: React.ReactNode;
|
|
954
945
|
/** Defaults to 'p'. */
|
|
955
946
|
tag?: SupportedTags;
|
|
956
947
|
align?: Alignment;
|
|
@@ -997,10 +988,6 @@ type ToggleButtonVariant = 'primary' | 'secondary' | 'omg' | 'primary2' | 'posit
|
|
|
997
988
|
type PartialButtonProps = Omit<ButtonProps, 'variant' | 'rightIcon' | 'leftIcon' | 'children'>;
|
|
998
989
|
interface ToggleButtonProps extends PartialButtonProps {
|
|
999
990
|
checked: boolean;
|
|
1000
|
-
/** @deprecated Use 'checkedChildren' */
|
|
1001
|
-
checkedText?: string;
|
|
1002
|
-
/** @deprecated Use 'uncheckedChildren' */
|
|
1003
|
-
uncheckedText?: string;
|
|
1004
991
|
checkedChildren?: React.ReactNode;
|
|
1005
992
|
uncheckedChildren?: React.ReactNode;
|
|
1006
993
|
variant?: ToggleButtonVariant;
|
|
@@ -1047,17 +1034,15 @@ declare const WaitingIndicator: (p: {
|
|
|
1047
1034
|
declare const useScrollbarSize: (recalc?: boolean) => number;
|
|
1048
1035
|
|
|
1049
1036
|
/** Provides stateful notifications around async calls. */
|
|
1050
|
-
declare const useWaiting: <TArgs extends
|
|
1037
|
+
declare const useWaiting: <TArgs extends unknown[], TReturn>(func: (...args: TArgs) => Promise<TReturn>) => [boolean, (...args: TArgs) => Promise<TReturn>];
|
|
1051
1038
|
|
|
1052
1039
|
/** useEffect but it will only fire when the actual truthiness of the value changes.
|
|
1053
1040
|
* Use for comparing previous states to next states without all the bullshit around useEffect and component mounting.
|
|
1054
1041
|
*/
|
|
1055
1042
|
declare const useBooleanChanged: (effect: (current: boolean, previous: boolean) => void, dep: boolean | undefined) => void;
|
|
1056
1043
|
|
|
1057
|
-
interface NormalizeCssProps {
|
|
1058
|
-
}
|
|
1059
1044
|
/** Resets certain styles so there is more consistancy between browsers. */
|
|
1060
|
-
declare const NormalizeCss: (
|
|
1045
|
+
declare const NormalizeCss: () => null;
|
|
1061
1046
|
|
|
1062
1047
|
/** Displays the value in American dollars. */
|
|
1063
1048
|
declare const getCurrencyDisplay: (value: number, isCents?: boolean, denomination?: string) => string;
|