@mackin.com/styleguide 8.5.0 → 8.6.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 +25 -2
- package/index.js +23 -1
- package/package.json +28 -28
package/index.d.ts
CHANGED
|
@@ -484,7 +484,7 @@ declare const OmniLink: (props: OmniLinkProps) => JSX.Element;
|
|
|
484
484
|
|
|
485
485
|
declare type SortDirection = 'asc' | 'desc';
|
|
486
486
|
interface PagerSortOption<TItem> {
|
|
487
|
-
id: string;
|
|
487
|
+
id: string | number;
|
|
488
488
|
name?: string;
|
|
489
489
|
sort: (items: TItem[]) => TItem[];
|
|
490
490
|
}
|
|
@@ -495,6 +495,7 @@ interface PagerOptions<TItem> {
|
|
|
495
495
|
limitOptions?: number[];
|
|
496
496
|
sort?: string;
|
|
497
497
|
sortOptions?: PagerSortOption<TItem>[];
|
|
498
|
+
/** Will copy over this pagers options, filters, and state. */
|
|
498
499
|
previous?: ItemPager<TItem>;
|
|
499
500
|
}
|
|
500
501
|
/** In-memory pager. */
|
|
@@ -1079,4 +1080,26 @@ interface ThemeRendererProps extends MackinTheme {
|
|
|
1079
1080
|
}
|
|
1080
1081
|
declare const ThemeRenderer: (p: ThemeRendererProps) => JSX.Element;
|
|
1081
1082
|
|
|
1082
|
-
|
|
1083
|
+
interface TabContainerProps {
|
|
1084
|
+
tabs: {
|
|
1085
|
+
name: string;
|
|
1086
|
+
getContent: () => JSX.Element;
|
|
1087
|
+
}[];
|
|
1088
|
+
id?: string;
|
|
1089
|
+
/** Defaults to 10rem. */
|
|
1090
|
+
maxTabWidth?: string;
|
|
1091
|
+
/** Defaults to 'tab'. */
|
|
1092
|
+
variant?: 'tab' | 'button';
|
|
1093
|
+
contentClassName?: string;
|
|
1094
|
+
tabHeaderClassName?: string;
|
|
1095
|
+
tabClassName?: string;
|
|
1096
|
+
tabHeaderDividerClassName?: string;
|
|
1097
|
+
/** Defaults to 0. */
|
|
1098
|
+
startingIndex?: number;
|
|
1099
|
+
onTabChanged?: (tabIndex: number) => void;
|
|
1100
|
+
/** If present, tab change will be delayed until this method resolves. */
|
|
1101
|
+
onBeforeTabChanged?: (tabIndex: number) => Promise<void>;
|
|
1102
|
+
}
|
|
1103
|
+
declare const TabContainer: (p: TabContainerProps) => JSX.Element;
|
|
1104
|
+
|
|
1105
|
+
export { Accordian, AccordianProps, Alignment, Autocomplete, AutocompleteProps, AutocompleteValue, Backdrop$1 as Backdrop, Backdrop as Backdrop2, BoundMemoryPager, BoundStaticPager, Button, ButtonProps, Calendar, CalendarProps, Checkbox, CheckboxProps, ConfirmModal, ConfirmModalProps, CopyButton, DateInput, DateInputProps, Divider, ErrorModal, FileUploader, Form, FormColumnRow, FormFlexRow, FormProps, GlobalStyles, Header, Highlight, ICONS, Icon, Image, ImageProps, InfoPanel, InfoTip, InfoTipProps, Input, InputProps, ItemPager, Label, LabelProps, Link, LinkProps, List, ListItem, ListItemProps, ListProps, MackinTheme, Modal, ModalProps, Nav, NormalizeCss, NumberInput, NumberInputProps, OmniLink, OmniLinkProps, PagedResult, Pager, PagerProps, Picker, PickerOption, PickerProps, PickerValue, Popover, ProgressBar, ProgressBarProps, SearchBox, SearchBoxProps, Slider, TabContainer, TabContainerProps, TabHeader, TabHeaderProps, TabLocker, Table, Td, TdCurrency, TdNumber, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, Th, ThSort, ThemeProvider, ThemeRenderer, ToggleButton, ToggleButtonGroup, ToggleButtonGroupProps, ToggleButtonProps, TogglePasswordInput, Tr, WaitingIndicator, calcDynamicThemeProps, defaultTheme, enumToEntities, getCurrencyDisplay, getFileSizeDisplay, useAccordianState, useBooleanChanged, useIgnoreMount, useMediaQuery, useScrollbarSize, useThemeSafely, useWaiting };
|
package/index.js
CHANGED
|
@@ -4113,7 +4113,7 @@ const TextArea = React__namespace.forwardRef((props, ref) => {
|
|
|
4113
4113
|
const [localValue, setLocalValue] = React__namespace.useState(props.value);
|
|
4114
4114
|
const inputRef = (ref !== null && ref !== void 0 ? ref : React__namespace.useRef(null));
|
|
4115
4115
|
const [validationError, updateErrorMessage] = useInputValidationMessage(inputRef, props);
|
|
4116
|
-
const nativeProps = __rest(props, ["onValueChange", "customError", "reportValueOnError"]);
|
|
4116
|
+
const nativeProps = __rest(props, ["onValueChange", "customError", "reportValueOnError", "showErrorDisplay"]);
|
|
4117
4117
|
const theme = useThemeSafely();
|
|
4118
4118
|
React__namespace.useEffect(() => {
|
|
4119
4119
|
updateErrorMessage();
|
|
@@ -4732,6 +4732,27 @@ const flatten = (obj, parent, path = 'theme') => {
|
|
|
4732
4732
|
return flatObj;
|
|
4733
4733
|
};
|
|
4734
4734
|
|
|
4735
|
+
const TabContainer = (p) => {
|
|
4736
|
+
var _a;
|
|
4737
|
+
const [tabIndex, setTabIndex] = React__namespace.useState((_a = p.startingIndex) !== null && _a !== void 0 ? _a : 0);
|
|
4738
|
+
const theme = useThemeSafely();
|
|
4739
|
+
return (React__namespace.createElement("div", { className: css.css({
|
|
4740
|
+
label: 'TabContainer'
|
|
4741
|
+
}) },
|
|
4742
|
+
React__namespace.createElement(TabHeader, { tabs: p.tabs, maxTabWidth: p.maxTabWidth, variant: p.variant, containerClassName: p.tabHeaderClassName, tabClassName: p.tabClassName, tabHeaderDividerClassName: p.tabHeaderDividerClassName, startingIndex: tabIndex, onBeforeTabChanged: p.onBeforeTabChanged, onTabChanged: newIndex => {
|
|
4743
|
+
var _a;
|
|
4744
|
+
setTabIndex(newIndex);
|
|
4745
|
+
(_a = p.onTabChanged) === null || _a === void 0 ? void 0 : _a.call(p, newIndex);
|
|
4746
|
+
} }),
|
|
4747
|
+
React__namespace.createElement("div", { className: css.cx(css.css({
|
|
4748
|
+
label: 'TabContainerContent',
|
|
4749
|
+
padding: '1rem',
|
|
4750
|
+
borderLeft: theme.controls.border,
|
|
4751
|
+
borderRight: theme.controls.border,
|
|
4752
|
+
borderBottom: theme.controls.border,
|
|
4753
|
+
}), p.contentClassName) }, p.tabs[tabIndex].getContent())));
|
|
4754
|
+
};
|
|
4755
|
+
|
|
4735
4756
|
exports.Accordian = Accordian;
|
|
4736
4757
|
exports.Autocomplete = Autocomplete;
|
|
4737
4758
|
exports.Backdrop = Backdrop$1;
|
|
@@ -4776,6 +4797,7 @@ exports.Popover = Popover;
|
|
|
4776
4797
|
exports.ProgressBar = ProgressBar;
|
|
4777
4798
|
exports.SearchBox = SearchBox;
|
|
4778
4799
|
exports.Slider = Slider;
|
|
4800
|
+
exports.TabContainer = TabContainer;
|
|
4779
4801
|
exports.TabHeader = TabHeader;
|
|
4780
4802
|
exports.TabLocker = TabLocker;
|
|
4781
4803
|
exports.Table = Table;
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@mackin.com/styleguide",
|
|
3
|
+
"version": "8.6.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"scripts": {},
|
|
8
|
+
"author": "Mackin",
|
|
9
|
+
"license": "ISC",
|
|
10
|
+
"devDependencies": {},
|
|
11
|
+
"dependencies": {},
|
|
12
|
+
"optionalDependencies": {
|
|
13
|
+
"react-router-dom": "^5.3.0",
|
|
14
|
+
"react-tiny-popover": "^7.0.1",
|
|
15
|
+
"react-slider": "^1.3.1"
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"nanoid": "^3.1.23",
|
|
19
|
+
"date-fns": "^2.13.0",
|
|
20
|
+
"lodash": "^4.17.15",
|
|
21
|
+
"react": "^17.0.2",
|
|
22
|
+
"@emotion/css": "^11.1.3",
|
|
23
|
+
"@fortawesome/fontawesome-svg-core": "^1.2.35",
|
|
24
|
+
"@fortawesome/pro-light-svg-icons": "^5.15.3",
|
|
25
|
+
"@fortawesome/pro-regular-svg-icons": "^5.15.3",
|
|
26
|
+
"@fortawesome/pro-solid-svg-icons": "^5.15.3",
|
|
27
|
+
"@fortawesome/react-fontawesome": "^0.1.14"
|
|
28
|
+
}
|
|
29
29
|
}
|