@mackin.com/styleguide 11.0.11 → 11.1.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 +188 -162
- package/index.esm.js +1248 -1153
- package/index.js +1248 -1152
- 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
|
|
|
@@ -751,8 +838,37 @@ declare const SearchBox: React.ForwardRefExoticComponent<Omit<SearchBoxProps, "r
|
|
|
751
838
|
|
|
752
839
|
type Alignment = 'left' | 'right' | 'center';
|
|
753
840
|
|
|
841
|
+
/** Converts an enum to an array of entities with id and name. The enum can be an integer or string enum.*/
|
|
842
|
+
declare const enumToEntities: <T extends {
|
|
843
|
+
[key: string]: string | number;
|
|
844
|
+
}>(enumObj: T) => {
|
|
845
|
+
id: string | number;
|
|
846
|
+
name: string;
|
|
847
|
+
}[];
|
|
848
|
+
|
|
849
|
+
/** Displays the value in American dollars. */
|
|
850
|
+
declare const getCurrencyDisplay: (value: number, isCents?: boolean, denomination?: string) => string;
|
|
851
|
+
|
|
754
852
|
declare const GlobalStyles: () => null;
|
|
755
853
|
|
|
854
|
+
declare enum StyleGuideLanguage {
|
|
855
|
+
English = 0,
|
|
856
|
+
Spanish = 1,
|
|
857
|
+
French = 2
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
declare const LocalizationProvider: (p: {
|
|
861
|
+
children: React__default.ReactNode;
|
|
862
|
+
language: StyleGuideLanguage;
|
|
863
|
+
__debug?: boolean;
|
|
864
|
+
}) => React__default.JSX.Element;
|
|
865
|
+
|
|
866
|
+
/** Add to fixed positioned elements so their contents do not jump around when scrolling is disabled. */
|
|
867
|
+
declare const modalScrollFixClassName = "modal-scroll-fix";
|
|
868
|
+
|
|
869
|
+
/** Resets certain styles so there is more consistancy between browsers. */
|
|
870
|
+
declare const NormalizeCss: () => null;
|
|
871
|
+
|
|
756
872
|
interface MackinTheme {
|
|
757
873
|
colors: {
|
|
758
874
|
primary: string;
|
|
@@ -870,14 +986,45 @@ declare const ThemeProvider: <T extends MackinTheme>(p: {
|
|
|
870
986
|
theme: T;
|
|
871
987
|
}) => React__default.JSX.Element;
|
|
872
988
|
|
|
989
|
+
interface ThemeRendererProps extends MackinTheme {
|
|
990
|
+
backgroundColor?: string;
|
|
991
|
+
color?: string;
|
|
992
|
+
}
|
|
993
|
+
declare const ThemeRenderer: (p: ThemeRendererProps) => React.JSX.Element;
|
|
994
|
+
|
|
995
|
+
/** Allows for status notificaiton methods for screen readers.
|
|
996
|
+
* This hook does not have any dependencies, so it can be used in projects that don't important anything else from the style_guide. */
|
|
997
|
+
declare function useAriaLiveRegion(): {
|
|
998
|
+
/**
|
|
999
|
+
* @param message - The text to be read by the screen reader.
|
|
1000
|
+
* @param clearTimeoutMs - Milliseconds to wait before the message is cleared. Defaults to `2000`.
|
|
1001
|
+
*/
|
|
1002
|
+
notify: (message: string, clearTimoutMs?: number) => void;
|
|
1003
|
+
clearNotification: () => void;
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
/** useEffect but it will only fire when the actual truthiness of the value changes.
|
|
1007
|
+
* Use for comparing previous states to next states without all the bullshit around useEffect and component mounting.
|
|
1008
|
+
*/
|
|
1009
|
+
declare const useBooleanChanged: (effect: (current: boolean, previous: boolean) => void, dep: boolean | undefined) => void;
|
|
1010
|
+
|
|
1011
|
+
/** useEffect but ignores the first call on component mount. */
|
|
1012
|
+
declare const useIgnoreMount: (effect: React__default.EffectCallback, deps?: React__default.DependencyList | undefined) => void;
|
|
1013
|
+
|
|
873
1014
|
/** React wrapper around window resizing and window.matchMedia.
|
|
874
1015
|
* https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
|
|
875
1016
|
*/
|
|
876
1017
|
declare const useMediaQuery: (query: string) => boolean;
|
|
877
1018
|
|
|
1019
|
+
/** Tells you actual width of the scroll bar. This can vary by browser. */
|
|
1020
|
+
declare const useScrollbarSize: (recalc?: boolean) => number;
|
|
1021
|
+
|
|
878
1022
|
/** Returns a user-provided theme if ThemeProvider was used correctly, or the default theme. */
|
|
879
1023
|
declare const useThemeSafely: () => MackinTheme;
|
|
880
1024
|
|
|
1025
|
+
/** Provides stateful notifications around async calls. */
|
|
1026
|
+
declare const useWaiting: <TArgs extends unknown[], TReturn>(func: (...args: TArgs) => Promise<TReturn>) => [boolean, (...args: TArgs) => Promise<TReturn>];
|
|
1027
|
+
|
|
881
1028
|
type SliderValue = number | [number, number];
|
|
882
1029
|
interface SliderProps<T extends SliderValue> {
|
|
883
1030
|
min: number;
|
|
@@ -916,6 +1063,35 @@ interface SliderProps<T extends SliderValue> {
|
|
|
916
1063
|
}
|
|
917
1064
|
declare const Slider: <T extends SliderValue>(p: SliderProps<T>) => React__default.JSX.Element;
|
|
918
1065
|
|
|
1066
|
+
interface TabContainerProps {
|
|
1067
|
+
/** Required for generating element IDs for ARIA. */
|
|
1068
|
+
id: string;
|
|
1069
|
+
ariaLabel: string;
|
|
1070
|
+
tabs: {
|
|
1071
|
+
name: string | JSX.Element;
|
|
1072
|
+
/** The HTML title of the tab button. Defaults to 'name' prop. */
|
|
1073
|
+
title?: string;
|
|
1074
|
+
getContent: () => JSX.Element;
|
|
1075
|
+
}[];
|
|
1076
|
+
/** Defaults to 10rem. */
|
|
1077
|
+
maxTabWidth?: string;
|
|
1078
|
+
/** Defaults to 'tab'. */
|
|
1079
|
+
variant?: 'tab' | 'button';
|
|
1080
|
+
contentClassName?: string;
|
|
1081
|
+
/** This is applied to the `containerClassName` prop of TabHeader. */
|
|
1082
|
+
tabHeaderClassName?: string;
|
|
1083
|
+
/** This is applied to the `tabClassName` prop of TabHeader. */
|
|
1084
|
+
tabClassName?: string;
|
|
1085
|
+
/** This is applied to the `tabHeaderDividerClassName` prop of TabHeader. */
|
|
1086
|
+
tabHeaderDividerClassName?: string;
|
|
1087
|
+
/** Defaults to 0. */
|
|
1088
|
+
startingIndex?: number;
|
|
1089
|
+
onTabChanged?: (tabIndex: number) => void;
|
|
1090
|
+
/** If present, tab change will be delayed until this method resolves. */
|
|
1091
|
+
onBeforeTabChanged?: (tabIndex: number) => Promise<void>;
|
|
1092
|
+
}
|
|
1093
|
+
declare const TabContainer: (p: TabContainerProps) => React.JSX.Element;
|
|
1094
|
+
|
|
919
1095
|
interface TabHeaderTabProps {
|
|
920
1096
|
name: string | JSX.Element;
|
|
921
1097
|
/** The HTML title of the tab button. Defaults to 'name' prop. */
|
|
@@ -1092,154 +1268,4 @@ declare const WaitingIndicator: (p: {
|
|
|
1092
1268
|
__debug?: boolean;
|
|
1093
1269
|
}) => React__default.JSX.Element;
|
|
1094
1270
|
|
|
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 };
|
|
1271
|
+
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 };
|