@mackin.com/styleguide 11.0.12 → 11.2.0
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 +192 -162
- package/index.esm.js +1202 -1068
- package/index.js +1202 -1067
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -65,6 +65,44 @@ interface AutocompleteProps extends BaseInputProps$1 {
|
|
|
65
65
|
}
|
|
66
66
|
declare const Autocomplete: (p: AutocompleteProps) => React.JSX.Element;
|
|
67
67
|
|
|
68
|
+
interface AutoCompleteConfig {
|
|
69
|
+
/** Number of characters entered before getOptions is called. Defaults to 3. */
|
|
70
|
+
minChars?: number;
|
|
71
|
+
/** Number of ms to debounce prior to calling getOptions on change. Defaults to no debounce. */
|
|
72
|
+
debounceMs?: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare class AutocompleteController {
|
|
76
|
+
constructor(getOptions: (value: string | undefined) => Promise<string[]>, config?: AutoCompleteConfig);
|
|
77
|
+
get value(): string | undefined;
|
|
78
|
+
get options(): string[];
|
|
79
|
+
onChange(newValue: string | undefined): Promise<void>;
|
|
80
|
+
onPick(newValue: string | undefined): void;
|
|
81
|
+
private readonly getOptions;
|
|
82
|
+
private readonly _minChars;
|
|
83
|
+
private _value;
|
|
84
|
+
private _options;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Extracted logic around autocomplete functionality for Autocomplete.tsx that supports Entity (id/name) mapping. */
|
|
88
|
+
declare class AutocompleteEntityController<T extends string | number> {
|
|
89
|
+
constructor(getOptions: (value: string | undefined) => Promise<Entity<T>[]>, config?: AutoCompleteConfig);
|
|
90
|
+
get entity(): Entity<T> | undefined;
|
|
91
|
+
get entities(): Entity<T>[];
|
|
92
|
+
get value(): string | undefined;
|
|
93
|
+
get options(): string[];
|
|
94
|
+
onChange(newValue: string | undefined): Promise<void>;
|
|
95
|
+
onPick(newValue: string | undefined): void;
|
|
96
|
+
private _ctrl;
|
|
97
|
+
private _pickedEntity;
|
|
98
|
+
private _options;
|
|
99
|
+
private trySyncCtrlOptions;
|
|
100
|
+
}
|
|
101
|
+
interface Entity<T extends string | number> {
|
|
102
|
+
id: T;
|
|
103
|
+
name: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
68
106
|
/** @deprecated Use Backdrop2 going forward. */
|
|
69
107
|
declare const Backdrop$1: (props: {
|
|
70
108
|
show: boolean;
|
|
@@ -375,9 +413,6 @@ interface TextInputProps extends BaseProps$2 {
|
|
|
375
413
|
}
|
|
376
414
|
declare const TextInput: React.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
377
415
|
|
|
378
|
-
/** useEffect but ignores the first call on component mount. */
|
|
379
|
-
declare const useIgnoreMount: (effect: React__default.EffectCallback, deps?: React__default.DependencyList | undefined) => void;
|
|
380
|
-
|
|
381
416
|
interface LabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {
|
|
382
417
|
text: string | JSX.Element;
|
|
383
418
|
/** Displays the label NOT using a label element. */
|
|
@@ -397,6 +432,39 @@ interface LabelProps extends React.DetailedHTMLProps<React.LabelHTMLAttributes<H
|
|
|
397
432
|
}
|
|
398
433
|
declare const Label: (props: LabelProps) => React.JSX.Element;
|
|
399
434
|
|
|
435
|
+
interface LinkContentProps {
|
|
436
|
+
rightIcon?: JSX.Element;
|
|
437
|
+
leftIcon?: JSX.Element;
|
|
438
|
+
children?: ReactNode;
|
|
439
|
+
waiting?: boolean;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
interface LinkProps extends LinkContentProps, React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> {
|
|
443
|
+
href: string;
|
|
444
|
+
block?: boolean;
|
|
445
|
+
/** Full width with max space between the text and the icon */
|
|
446
|
+
iconBlock?: boolean;
|
|
447
|
+
/** Corresponds to the button variants of the same name. */
|
|
448
|
+
variant?: 'button' | 'label' | 'icon' | 'circle' | 'primary' | 'secondary' | 'omg' | 'primary2' | 'positive' | 'negative' | 'text';
|
|
449
|
+
/** Only for button variants. */
|
|
450
|
+
round?: boolean;
|
|
451
|
+
/** Only for button variants. */
|
|
452
|
+
small?: boolean;
|
|
453
|
+
/** Only for button variants. */
|
|
454
|
+
waiting?: boolean;
|
|
455
|
+
disabled?: boolean;
|
|
456
|
+
/** Overrides the `theme.colors.link` for non-button variants or `theme.colors.font` for the `button` variant. Does not apply to themed button variants like `primary`. */
|
|
457
|
+
colorOverride?: string;
|
|
458
|
+
}
|
|
459
|
+
declare const Link: (props: LinkProps) => React.JSX.Element;
|
|
460
|
+
|
|
461
|
+
interface OmniLinkProps extends LinkProps {
|
|
462
|
+
noRouter?: boolean;
|
|
463
|
+
/** Ignored if 'noRouter' is false */
|
|
464
|
+
target?: string;
|
|
465
|
+
}
|
|
466
|
+
declare const OmniLink: (props: OmniLinkProps) => React.JSX.Element;
|
|
467
|
+
|
|
400
468
|
interface ListProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement> {
|
|
401
469
|
altRowColor?: boolean;
|
|
402
470
|
noLines?: boolean;
|
|
@@ -455,13 +523,6 @@ declare const Nav: (props: {
|
|
|
455
523
|
__debug?: boolean;
|
|
456
524
|
}) => React.JSX.Element;
|
|
457
525
|
|
|
458
|
-
interface OmniLinkProps extends LinkProps {
|
|
459
|
-
noRouter?: boolean;
|
|
460
|
-
/** Ignored if 'noRouter' is false */
|
|
461
|
-
target?: string;
|
|
462
|
-
}
|
|
463
|
-
declare const OmniLink: (props: OmniLinkProps) => React.JSX.Element;
|
|
464
|
-
|
|
465
526
|
interface PagedResultDto<T> {
|
|
466
527
|
total: number;
|
|
467
528
|
/** The zero-based page index. */
|
|
@@ -640,11 +701,35 @@ interface Props<T> extends PagerStyleProps {
|
|
|
640
701
|
declare const BoundStaticPager: <T>(p: Props<T>) => React.JSX.Element;
|
|
641
702
|
|
|
642
703
|
type PickerValue = string | number;
|
|
704
|
+
|
|
643
705
|
type PickerOption<T> = T | {
|
|
644
706
|
id: T;
|
|
645
707
|
name?: string;
|
|
646
708
|
};
|
|
647
|
-
|
|
709
|
+
|
|
710
|
+
interface SelectProps$1 extends Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, 'value' | 'options' | 'string' | 'multiple'> {
|
|
711
|
+
}
|
|
712
|
+
interface MultiPickerProps<T extends PickerValue> extends SelectProps$1 {
|
|
713
|
+
value: T[];
|
|
714
|
+
options: PickerOption<T>[];
|
|
715
|
+
onValueChange: (values: T[]) => void;
|
|
716
|
+
readOnly?: boolean;
|
|
717
|
+
/** If true, bottom spacing will be added to account for other inputs having space for error messages.
|
|
718
|
+
* If you plan on using 'error', make sure this is also set to true so the spacing is not added and removed when the error message is toggled.
|
|
719
|
+
*/
|
|
720
|
+
controlAlign?: boolean;
|
|
721
|
+
/** An error message to display below the input. If set, 'controlAlign' will be ignored and default to 'true'. */
|
|
722
|
+
error?: string;
|
|
723
|
+
/** This will be applied to the select element. */
|
|
724
|
+
className?: string;
|
|
725
|
+
/** Applies to the outer wrapper which contains the select and other elements. */
|
|
726
|
+
wrapperClassName?: string;
|
|
727
|
+
/** Applied to each option. */
|
|
728
|
+
optionClassName?: string;
|
|
729
|
+
}
|
|
730
|
+
declare const MultiPicker: <T extends PickerValue>(props: MultiPickerProps<T>) => React.JSX.Element;
|
|
731
|
+
|
|
732
|
+
interface SelectProps extends Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, 'value' | 'options' | 'string' | 'multiple'> {
|
|
648
733
|
}
|
|
649
734
|
interface PickerProps<T extends PickerValue> extends SelectProps {
|
|
650
735
|
value: T;
|
|
@@ -664,6 +749,8 @@ interface PickerProps<T extends PickerValue> extends SelectProps {
|
|
|
664
749
|
wrapperClassName?: string;
|
|
665
750
|
/** Applies to the custom down arrow. */
|
|
666
751
|
iconClassName?: string;
|
|
752
|
+
/** Applied to each option. */
|
|
753
|
+
optionClassName?: string;
|
|
667
754
|
}
|
|
668
755
|
declare const Picker: <T extends PickerValue>(props: PickerProps<T>) => React.JSX.Element;
|
|
669
756
|
|
|
@@ -746,13 +833,46 @@ interface SearchBoxProps extends BaseProps$1 {
|
|
|
746
833
|
noSubmitWhenEmpty?: boolean;
|
|
747
834
|
/** The submit button will change to clear if present and there is a value. */
|
|
748
835
|
onClear?: () => void;
|
|
836
|
+
/** Not localized. Defaults to 'Search'. */
|
|
837
|
+
searchButtonAriaLabel?: string;
|
|
838
|
+
/** Not localized. Defaults to 'Clear'. */
|
|
839
|
+
clearButtonAriaLabel?: string;
|
|
749
840
|
}
|
|
750
841
|
declare const SearchBox: React.ForwardRefExoticComponent<Omit<SearchBoxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
751
842
|
|
|
752
843
|
type Alignment = 'left' | 'right' | 'center';
|
|
753
844
|
|
|
845
|
+
/** Converts an enum to an array of entities with id and name. The enum can be an integer or string enum.*/
|
|
846
|
+
declare const enumToEntities: <T extends {
|
|
847
|
+
[key: string]: string | number;
|
|
848
|
+
}>(enumObj: T) => {
|
|
849
|
+
id: string | number;
|
|
850
|
+
name: string;
|
|
851
|
+
}[];
|
|
852
|
+
|
|
853
|
+
/** Displays the value in American dollars. */
|
|
854
|
+
declare const getCurrencyDisplay: (value: number, isCents?: boolean, denomination?: string) => string;
|
|
855
|
+
|
|
754
856
|
declare const GlobalStyles: () => null;
|
|
755
857
|
|
|
858
|
+
declare enum StyleGuideLanguage {
|
|
859
|
+
English = 0,
|
|
860
|
+
Spanish = 1,
|
|
861
|
+
French = 2
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
declare const LocalizationProvider: (p: {
|
|
865
|
+
children: React__default.ReactNode;
|
|
866
|
+
language: StyleGuideLanguage;
|
|
867
|
+
__debug?: boolean;
|
|
868
|
+
}) => React__default.JSX.Element;
|
|
869
|
+
|
|
870
|
+
/** Add to fixed positioned elements so their contents do not jump around when scrolling is disabled. */
|
|
871
|
+
declare const modalScrollFixClassName = "modal-scroll-fix";
|
|
872
|
+
|
|
873
|
+
/** Resets certain styles so there is more consistancy between browsers. */
|
|
874
|
+
declare const NormalizeCss: () => null;
|
|
875
|
+
|
|
756
876
|
interface MackinTheme {
|
|
757
877
|
colors: {
|
|
758
878
|
primary: string;
|
|
@@ -870,14 +990,45 @@ declare const ThemeProvider: <T extends MackinTheme>(p: {
|
|
|
870
990
|
theme: T;
|
|
871
991
|
}) => React__default.JSX.Element;
|
|
872
992
|
|
|
993
|
+
interface ThemeRendererProps extends MackinTheme {
|
|
994
|
+
backgroundColor?: string;
|
|
995
|
+
color?: string;
|
|
996
|
+
}
|
|
997
|
+
declare const ThemeRenderer: (p: ThemeRendererProps) => React.JSX.Element;
|
|
998
|
+
|
|
999
|
+
/** Allows for status notificaiton methods for screen readers.
|
|
1000
|
+
* This hook does not have any dependencies, so it can be used in projects that don't important anything else from the style_guide. */
|
|
1001
|
+
declare function useAriaLiveRegion(): {
|
|
1002
|
+
/**
|
|
1003
|
+
* @param message - The text to be read by the screen reader.
|
|
1004
|
+
* @param clearTimeoutMs - Milliseconds to wait before the message is cleared. Defaults to `2000`.
|
|
1005
|
+
*/
|
|
1006
|
+
notify: (message: string, clearTimoutMs?: number) => void;
|
|
1007
|
+
clearNotification: () => void;
|
|
1008
|
+
};
|
|
1009
|
+
|
|
1010
|
+
/** useEffect but it will only fire when the actual truthiness of the value changes.
|
|
1011
|
+
* Use for comparing previous states to next states without all the bullshit around useEffect and component mounting.
|
|
1012
|
+
*/
|
|
1013
|
+
declare const useBooleanChanged: (effect: (current: boolean, previous: boolean) => void, dep: boolean | undefined) => void;
|
|
1014
|
+
|
|
1015
|
+
/** useEffect but ignores the first call on component mount. */
|
|
1016
|
+
declare const useIgnoreMount: (effect: React__default.EffectCallback, deps?: React__default.DependencyList | undefined) => void;
|
|
1017
|
+
|
|
873
1018
|
/** React wrapper around window resizing and window.matchMedia.
|
|
874
1019
|
* https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
|
|
875
1020
|
*/
|
|
876
1021
|
declare const useMediaQuery: (query: string) => boolean;
|
|
877
1022
|
|
|
1023
|
+
/** Tells you actual width of the scroll bar. This can vary by browser. */
|
|
1024
|
+
declare const useScrollbarSize: (recalc?: boolean) => number;
|
|
1025
|
+
|
|
878
1026
|
/** Returns a user-provided theme if ThemeProvider was used correctly, or the default theme. */
|
|
879
1027
|
declare const useThemeSafely: () => MackinTheme;
|
|
880
1028
|
|
|
1029
|
+
/** Provides stateful notifications around async calls. */
|
|
1030
|
+
declare const useWaiting: <TArgs extends unknown[], TReturn>(func: (...args: TArgs) => Promise<TReturn>) => [boolean, (...args: TArgs) => Promise<TReturn>];
|
|
1031
|
+
|
|
881
1032
|
type SliderValue = number | [number, number];
|
|
882
1033
|
interface SliderProps<T extends SliderValue> {
|
|
883
1034
|
min: number;
|
|
@@ -916,6 +1067,35 @@ interface SliderProps<T extends SliderValue> {
|
|
|
916
1067
|
}
|
|
917
1068
|
declare const Slider: <T extends SliderValue>(p: SliderProps<T>) => React__default.JSX.Element;
|
|
918
1069
|
|
|
1070
|
+
interface TabContainerProps {
|
|
1071
|
+
/** Required for generating element IDs for ARIA. */
|
|
1072
|
+
id: string;
|
|
1073
|
+
ariaLabel: string;
|
|
1074
|
+
tabs: {
|
|
1075
|
+
name: string | JSX.Element;
|
|
1076
|
+
/** The HTML title of the tab button. Defaults to 'name' prop. */
|
|
1077
|
+
title?: string;
|
|
1078
|
+
getContent: () => JSX.Element;
|
|
1079
|
+
}[];
|
|
1080
|
+
/** Defaults to 10rem. */
|
|
1081
|
+
maxTabWidth?: string;
|
|
1082
|
+
/** Defaults to 'tab'. */
|
|
1083
|
+
variant?: 'tab' | 'button';
|
|
1084
|
+
contentClassName?: string;
|
|
1085
|
+
/** This is applied to the `containerClassName` prop of TabHeader. */
|
|
1086
|
+
tabHeaderClassName?: string;
|
|
1087
|
+
/** This is applied to the `tabClassName` prop of TabHeader. */
|
|
1088
|
+
tabClassName?: string;
|
|
1089
|
+
/** This is applied to the `tabHeaderDividerClassName` prop of TabHeader. */
|
|
1090
|
+
tabHeaderDividerClassName?: string;
|
|
1091
|
+
/** Defaults to 0. */
|
|
1092
|
+
startingIndex?: number;
|
|
1093
|
+
onTabChanged?: (tabIndex: number) => void;
|
|
1094
|
+
/** If present, tab change will be delayed until this method resolves. */
|
|
1095
|
+
onBeforeTabChanged?: (tabIndex: number) => Promise<void>;
|
|
1096
|
+
}
|
|
1097
|
+
declare const TabContainer: (p: TabContainerProps) => React.JSX.Element;
|
|
1098
|
+
|
|
919
1099
|
interface TabHeaderTabProps {
|
|
920
1100
|
name: string | JSX.Element;
|
|
921
1101
|
/** The HTML title of the tab button. Defaults to 'name' prop. */
|
|
@@ -1092,154 +1272,4 @@ declare const WaitingIndicator: (p: {
|
|
|
1092
1272
|
__debug?: boolean;
|
|
1093
1273
|
}) => React__default.JSX.Element;
|
|
1094
1274
|
|
|
1095
|
-
|
|
1096
|
-
declare const useScrollbarSize: (recalc?: boolean) => number;
|
|
1097
|
-
|
|
1098
|
-
/** Provides stateful notifications around async calls. */
|
|
1099
|
-
declare const useWaiting: <TArgs extends unknown[], TReturn>(func: (...args: TArgs) => Promise<TReturn>) => [boolean, (...args: TArgs) => Promise<TReturn>];
|
|
1100
|
-
|
|
1101
|
-
/** useEffect but it will only fire when the actual truthiness of the value changes.
|
|
1102
|
-
* Use for comparing previous states to next states without all the bullshit around useEffect and component mounting.
|
|
1103
|
-
*/
|
|
1104
|
-
declare const useBooleanChanged: (effect: (current: boolean, previous: boolean) => void, dep: boolean | undefined) => void;
|
|
1105
|
-
|
|
1106
|
-
/** Resets certain styles so there is more consistancy between browsers. */
|
|
1107
|
-
declare const NormalizeCss: () => null;
|
|
1108
|
-
|
|
1109
|
-
/** Displays the value in American dollars. */
|
|
1110
|
-
declare const getCurrencyDisplay: (value: number, isCents?: boolean, denomination?: string) => string;
|
|
1111
|
-
|
|
1112
|
-
/** Converts an enum to an array of entities with id and name. The enum can be an integer or string enum.*/
|
|
1113
|
-
declare const enumToEntities: <T extends {
|
|
1114
|
-
[key: string]: string | number;
|
|
1115
|
-
}>(enumObj: T) => {
|
|
1116
|
-
id: string | number;
|
|
1117
|
-
name: string;
|
|
1118
|
-
}[];
|
|
1119
|
-
|
|
1120
|
-
interface LinkContentProps {
|
|
1121
|
-
rightIcon?: JSX.Element;
|
|
1122
|
-
leftIcon?: JSX.Element;
|
|
1123
|
-
children?: ReactNode;
|
|
1124
|
-
waiting?: boolean;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
interface LinkProps extends LinkContentProps, React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> {
|
|
1128
|
-
href: string;
|
|
1129
|
-
block?: boolean;
|
|
1130
|
-
/** Full width with max space between the text and the icon */
|
|
1131
|
-
iconBlock?: boolean;
|
|
1132
|
-
/** Corresponds to the button variants of the same name. */
|
|
1133
|
-
variant?: 'button' | 'label' | 'icon' | 'circle' | 'primary' | 'secondary' | 'omg' | 'primary2' | 'positive' | 'negative' | 'text';
|
|
1134
|
-
/** Only for button variants. */
|
|
1135
|
-
round?: boolean;
|
|
1136
|
-
/** Only for button variants. */
|
|
1137
|
-
small?: boolean;
|
|
1138
|
-
/** Only for button variants. */
|
|
1139
|
-
waiting?: boolean;
|
|
1140
|
-
disabled?: boolean;
|
|
1141
|
-
/** Overrides the `theme.colors.link` for non-button variants or `theme.colors.font` for the `button` variant. Does not apply to themed button variants like `primary`. */
|
|
1142
|
-
colorOverride?: string;
|
|
1143
|
-
}
|
|
1144
|
-
declare const Link: (props: LinkProps) => React.JSX.Element;
|
|
1145
|
-
|
|
1146
|
-
interface ThemeRendererProps extends MackinTheme {
|
|
1147
|
-
backgroundColor?: string;
|
|
1148
|
-
color?: string;
|
|
1149
|
-
}
|
|
1150
|
-
declare const ThemeRenderer: (p: ThemeRendererProps) => React.JSX.Element;
|
|
1151
|
-
|
|
1152
|
-
interface TabContainerProps {
|
|
1153
|
-
/** Required for generating element IDs for ARIA. */
|
|
1154
|
-
id: string;
|
|
1155
|
-
ariaLabel: string;
|
|
1156
|
-
tabs: {
|
|
1157
|
-
name: string | JSX.Element;
|
|
1158
|
-
/** The HTML title of the tab button. Defaults to 'name' prop. */
|
|
1159
|
-
title?: string;
|
|
1160
|
-
getContent: () => JSX.Element;
|
|
1161
|
-
}[];
|
|
1162
|
-
/** Defaults to 10rem. */
|
|
1163
|
-
maxTabWidth?: string;
|
|
1164
|
-
/** Defaults to 'tab'. */
|
|
1165
|
-
variant?: 'tab' | 'button';
|
|
1166
|
-
contentClassName?: string;
|
|
1167
|
-
/** This is applied to the `containerClassName` prop of TabHeader. */
|
|
1168
|
-
tabHeaderClassName?: string;
|
|
1169
|
-
/** This is applied to the `tabClassName` prop of TabHeader. */
|
|
1170
|
-
tabClassName?: string;
|
|
1171
|
-
/** This is applied to the `tabHeaderDividerClassName` prop of TabHeader. */
|
|
1172
|
-
tabHeaderDividerClassName?: string;
|
|
1173
|
-
/** Defaults to 0. */
|
|
1174
|
-
startingIndex?: number;
|
|
1175
|
-
onTabChanged?: (tabIndex: number) => void;
|
|
1176
|
-
/** If present, tab change will be delayed until this method resolves. */
|
|
1177
|
-
onBeforeTabChanged?: (tabIndex: number) => Promise<void>;
|
|
1178
|
-
}
|
|
1179
|
-
declare const TabContainer: (p: TabContainerProps) => React.JSX.Element;
|
|
1180
|
-
|
|
1181
|
-
/** Add to fixed positioned elements so their contents do not jump around when scrolling is disabled. */
|
|
1182
|
-
declare const modalScrollFixClassName = "modal-scroll-fix";
|
|
1183
|
-
|
|
1184
|
-
interface AutoCompleteConfig {
|
|
1185
|
-
/** Number of characters entered before getOptions is called. Defaults to 3. */
|
|
1186
|
-
minChars?: number;
|
|
1187
|
-
/** Number of ms to debounce prior to calling getOptions on change. Defaults to no debounce. */
|
|
1188
|
-
debounceMs?: number;
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
declare class AutocompleteController {
|
|
1192
|
-
constructor(getOptions: (value: string | undefined) => Promise<string[]>, config?: AutoCompleteConfig);
|
|
1193
|
-
get value(): string | undefined;
|
|
1194
|
-
get options(): string[];
|
|
1195
|
-
onChange(newValue: string | undefined): Promise<void>;
|
|
1196
|
-
onPick(newValue: string | undefined): void;
|
|
1197
|
-
private readonly getOptions;
|
|
1198
|
-
private readonly _minChars;
|
|
1199
|
-
private _value;
|
|
1200
|
-
private _options;
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
/** Extracted logic around autocomplete functionality for Autocomplete.tsx that supports Entity (id/name) mapping. */
|
|
1204
|
-
declare class AutocompleteEntityController<T extends string | number> {
|
|
1205
|
-
constructor(getOptions: (value: string | undefined) => Promise<Entity<T>[]>, config?: AutoCompleteConfig);
|
|
1206
|
-
get entity(): Entity<T> | undefined;
|
|
1207
|
-
get entities(): Entity<T>[];
|
|
1208
|
-
get value(): string | undefined;
|
|
1209
|
-
get options(): string[];
|
|
1210
|
-
onChange(newValue: string | undefined): Promise<void>;
|
|
1211
|
-
onPick(newValue: string | undefined): void;
|
|
1212
|
-
private _ctrl;
|
|
1213
|
-
private _pickedEntity;
|
|
1214
|
-
private _options;
|
|
1215
|
-
private trySyncCtrlOptions;
|
|
1216
|
-
}
|
|
1217
|
-
interface Entity<T extends string | number> {
|
|
1218
|
-
id: T;
|
|
1219
|
-
name: string;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
declare enum StyleGuideLanguage {
|
|
1223
|
-
English = 0,
|
|
1224
|
-
Spanish = 1,
|
|
1225
|
-
French = 2
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
declare const LocalizationProvider: (p: {
|
|
1229
|
-
children: React__default.ReactNode;
|
|
1230
|
-
language: StyleGuideLanguage;
|
|
1231
|
-
__debug?: boolean;
|
|
1232
|
-
}) => React__default.JSX.Element;
|
|
1233
|
-
|
|
1234
|
-
/** Allows for status notificaiton methods for screen readers.
|
|
1235
|
-
* This hook does not have any dependencies, so it can be used in projects that don't important anything else from the style_guide. */
|
|
1236
|
-
declare function useAriaLiveRegion(): {
|
|
1237
|
-
/**
|
|
1238
|
-
* @param message - The text to be read by the screen reader.
|
|
1239
|
-
* @param clearTimeoutMs - Milliseconds to wait before the message is cleared. Defaults to `2000`.
|
|
1240
|
-
*/
|
|
1241
|
-
notify: (message: string, clearTimoutMs?: number) => void;
|
|
1242
|
-
clearNotification: () => void;
|
|
1243
|
-
};
|
|
1244
|
-
|
|
1245
|
-
export { Accordion, type AccordionProps, type Alignment, Autocomplete, AutocompleteController, AutocompleteEntityController, type AutocompleteProps, Backdrop$1 as Backdrop, Backdrop as Backdrop2, BoundMemoryPager, BoundStaticPager, Button, type ButtonProps, Calendar, type CalendarProps, Checkbox, type CheckboxProps, ConfirmModal, type ConfirmModalProps, CopyButton, DateInput, type DateInputProps, DialogPopover, type DialogPopoverProps, Divider, ErrorModal, FileUploader, Form, FormColumnRow, FormFlexRow, type FormProps, GlobalStyles, Header, Highlight, ICONS, Icon, Image, type ImageProps, InfoPanel, InfoTip, type InfoTipProps, ItemPager, Label, type LabelProps, Link, type LinkProps, List, ListItem, type ListItemProps, type ListProps, LocalizationProvider, type MackinTheme, Modal, type ModalProps, Nav, NormalizeCss, NumberInput, type NumberInputProps, OmniLink, type OmniLinkProps, PagedResult, type PagedResultDto, Pager, type PagerProps, Picker, type PickerOption, type PickerProps, type PickerValue, ProgressBar, type ProgressBarProps, SearchBox, type SearchBoxProps, Slider, type SliderProps, type SliderValue, StyleGuideLanguage, TabContainer, type TabContainerProps, TabHeader, type TabHeaderProps, TabLocker, Table, Td, TdCurrency, TdNumber, Text, TextArea, type TextAreaProps, TextInput, type TextInputProps, type TextProps, Th, ThSort, ThemeProvider, ThemeRenderer, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, TogglePasswordInput, TooltipPopover, type TooltipPopoverProps, Tr, WaitingIndicator, calcDynamicThemeProps, defaultTheme, enumToEntities, getCurrencyDisplay, getFileSizeDisplay, modalScrollFixClassName, useAccordionState, useAriaLiveRegion, useBooleanChanged, useIgnoreMount, useMediaQuery, useScrollbarSize, useThemeSafely, useWaiting };
|
|
1275
|
+
export { Accordion, type AccordionProps, type Alignment, Autocomplete, AutocompleteController, AutocompleteEntityController, type AutocompleteProps, Backdrop$1 as Backdrop, Backdrop as Backdrop2, BoundMemoryPager, BoundStaticPager, Button, type ButtonProps, Calendar, type CalendarProps, Checkbox, type CheckboxProps, ConfirmModal, type ConfirmModalProps, CopyButton, DateInput, type DateInputProps, DialogPopover, type DialogPopoverProps, Divider, ErrorModal, FileUploader, Form, FormColumnRow, FormFlexRow, type FormProps, GlobalStyles, Header, Highlight, ICONS, Icon, Image, type ImageProps, InfoPanel, InfoTip, type InfoTipProps, ItemPager, Label, type LabelProps, Link, type LinkProps, List, ListItem, type ListItemProps, type ListProps, LocalizationProvider, type MackinTheme, Modal, type ModalProps, MultiPicker, type MultiPickerProps, Nav, NormalizeCss, NumberInput, type NumberInputProps, OmniLink, type OmniLinkProps, PagedResult, type PagedResultDto, Pager, type PagerProps, Picker, type PickerOption, type PickerProps, type PickerValue, ProgressBar, type ProgressBarProps, SearchBox, type SearchBoxProps, Slider, type SliderProps, type SliderValue, StyleGuideLanguage, TabContainer, type TabContainerProps, TabHeader, type TabHeaderProps, TabLocker, Table, Td, TdCurrency, TdNumber, Text, TextArea, type TextAreaProps, TextInput, type TextInputProps, type TextProps, Th, ThSort, ThemeProvider, ThemeRenderer, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, TogglePasswordInput, TooltipPopover, type TooltipPopoverProps, Tr, WaitingIndicator, calcDynamicThemeProps, defaultTheme, enumToEntities, getCurrencyDisplay, getFileSizeDisplay, modalScrollFixClassName, useAccordionState, useAriaLiveRegion, useBooleanChanged, useIgnoreMount, useMediaQuery, useScrollbarSize, useThemeSafely, useWaiting };
|