@superdispatch/ui 0.14.0 → 0.15.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/dist-node/index.js +16 -23
- package/dist-node/index.js.map +1 -1
- package/dist-src/info-card/InfoCard.js +1 -11
- package/dist-src/utils/mergeRefs.js +10 -7
- package/dist-types/index.d.ts +2 -1
- package/dist-web/index.js +16 -24
- package/dist-web/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,18 +6,8 @@ import { Card, CardContent } from '@material-ui/core';
|
|
|
6
6
|
import { makeStyles } from '@material-ui/styles';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { forwardRef, useState } from 'react';
|
|
9
|
+
import { assignRef } from "../utils/mergeRefs.js";
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
|
|
11
|
-
function assignRef(ref, value) {
|
|
12
|
-
if (ref) {
|
|
13
|
-
if (typeof ref === 'object') {
|
|
14
|
-
ref.current = value;
|
|
15
|
-
} else {
|
|
16
|
-
ref(value);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
11
|
var useStyles = /*#__PURE__*/makeStyles(theme => ({
|
|
22
12
|
root: {
|
|
23
13
|
'&$fullWidth': {
|
|
@@ -5,13 +5,16 @@ export function mergeRefs() {
|
|
|
5
5
|
|
|
6
6
|
return node => {
|
|
7
7
|
refs.forEach(ref => {
|
|
8
|
-
|
|
9
|
-
if (typeof ref === 'function') {
|
|
10
|
-
ref(node);
|
|
11
|
-
} else {
|
|
12
|
-
ref.current = node;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
8
|
+
assignRef(ref, node);
|
|
15
9
|
});
|
|
16
10
|
};
|
|
11
|
+
}
|
|
12
|
+
export function assignRef(ref, value) {
|
|
13
|
+
if (ref) {
|
|
14
|
+
if (typeof ref === 'function') {
|
|
15
|
+
ref(value);
|
|
16
|
+
} else {
|
|
17
|
+
ref.current = value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
17
20
|
}
|
package/dist-types/index.d.ts
CHANGED
|
@@ -383,6 +383,7 @@ declare const Tiles: ForwardRefExoticComponent<TilesProps & RefAttributes<HTMLDi
|
|
|
383
383
|
declare function isEmptyReactNode(node: ReactNode): node is null | undefined | boolean | string;
|
|
384
384
|
|
|
385
385
|
declare function mergeRefs<T>(...refs: Array<null | undefined | Ref<T>>): (node: T) => void;
|
|
386
|
+
declare function assignRef<T>(ref: Ref<T> | undefined, value: T): void;
|
|
386
387
|
|
|
387
388
|
declare function renderChildren(node: ReactNode): null | ReactElement;
|
|
388
389
|
|
|
@@ -407,4 +408,4 @@ interface VisibilityObserverProps extends VisibilityObserverOptions {
|
|
|
407
408
|
}
|
|
408
409
|
declare function VisibilityObserver({ render, onChange, ...options }: VisibilityObserverProps): null | ReactElement;
|
|
409
410
|
|
|
410
|
-
export { AdaptiveToolbar, AdaptiveToolbarItem, AdaptiveToolbarProps, AvatarButton, AvatarButtonClassKey, AvatarButtonProps, Button, ButtonProps, CardButton, CardButtonClassKey, CardButtonProps, CheckboxField, CheckboxFieldProps, CheckboxGroupField, CheckboxGroupFieldProps, CollapseBreakpoint, CollapseProp, Color, ColorProp, ColorVariant, Column, ColumnProps, ColumnWidth, Columns, ColumnsProps, DescriptionList, DescriptionListItem, DescriptionListItemProps, DescriptionListProps, DrawerActions, DrawerActionsProps, DrawerContent, DrawerContentProps, DrawerList, DrawerListProps, DrawerTitle, DrawerTitleProps, ElementVisibility, GridStack, GridStackProps, HorizontalAlign, InfoCard, InfoCardClassKey, InfoCardProps, Inline, InlineGrid, InlineGridProps, InlineProps, NegativeSpaceProp, OverflowText, OverflowTextProps, PartialResponsivePropRecord, RadioField, RadioFieldProps, RadioGroupField, RadioGroupFieldProps, ResponsiveContext, ResponsiveContextProvider, ResponsiveContextProviderProps, ResponsiveProp, ResponsivePropPrimitive, ResponsivePropRecord, ResponsivePropTuple, ResponsivePropTupleInit, Snackbar, SnackbarCloseReason, SnackbarContent, SnackbarContentProps, SnackbarProps, SnackbarStack, SnackbarStackConsumer, SnackbarStackOptions, SnackbarStackProvider, SnackbarStackProviderProps, SnackbarVariant, SpaceProp, Stack, StackProps, SuperDispatchTheme, Tag, TagClassKey, TagProps, ThemeProvider, ThemeProviderProps, Tiles, TilesColumns, TilesProps, TilesSpace, VerticalAlign, VisibilityObserver, VisibilityObserverOptions, VisibilityObserverProps, VisibilityObserverRenderProps, isColorProp, isEmptyReactNode, mergeRefs, parseAlignProp, parseCollapsedBelow, parseResponsiveProp, parseSpaceProp, renderChildren, useCollapseBreakpoint, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
|
|
411
|
+
export { AdaptiveToolbar, AdaptiveToolbarItem, AdaptiveToolbarProps, AvatarButton, AvatarButtonClassKey, AvatarButtonProps, Button, ButtonProps, CardButton, CardButtonClassKey, CardButtonProps, CheckboxField, CheckboxFieldProps, CheckboxGroupField, CheckboxGroupFieldProps, CollapseBreakpoint, CollapseProp, Color, ColorProp, ColorVariant, Column, ColumnProps, ColumnWidth, Columns, ColumnsProps, DescriptionList, DescriptionListItem, DescriptionListItemProps, DescriptionListProps, DrawerActions, DrawerActionsProps, DrawerContent, DrawerContentProps, DrawerList, DrawerListProps, DrawerTitle, DrawerTitleProps, ElementVisibility, GridStack, GridStackProps, HorizontalAlign, InfoCard, InfoCardClassKey, InfoCardProps, Inline, InlineGrid, InlineGridProps, InlineProps, NegativeSpaceProp, OverflowText, OverflowTextProps, PartialResponsivePropRecord, RadioField, RadioFieldProps, RadioGroupField, RadioGroupFieldProps, ResponsiveContext, ResponsiveContextProvider, ResponsiveContextProviderProps, ResponsiveProp, ResponsivePropPrimitive, ResponsivePropRecord, ResponsivePropTuple, ResponsivePropTupleInit, Snackbar, SnackbarCloseReason, SnackbarContent, SnackbarContentProps, SnackbarProps, SnackbarStack, SnackbarStackConsumer, SnackbarStackOptions, SnackbarStackProvider, SnackbarStackProviderProps, SnackbarVariant, SpaceProp, Stack, StackProps, SuperDispatchTheme, Tag, TagClassKey, TagProps, ThemeProvider, ThemeProviderProps, Tiles, TilesColumns, TilesProps, TilesSpace, VerticalAlign, VisibilityObserver, VisibilityObserverOptions, VisibilityObserverProps, VisibilityObserverRenderProps, assignRef, isColorProp, isEmptyReactNode, mergeRefs, parseAlignProp, parseCollapsedBelow, parseResponsiveProp, parseSpaceProp, renderChildren, useCollapseBreakpoint, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
|
package/dist-web/index.js
CHANGED
|
@@ -1339,19 +1339,29 @@ var InlineGrid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1339
1339
|
});
|
|
1340
1340
|
if (process.env.NODE_ENV !== "production") InlineGrid.displayName = "InlineGrid";
|
|
1341
1341
|
|
|
1342
|
-
|
|
1343
|
-
|
|
1342
|
+
function mergeRefs() {
|
|
1343
|
+
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1344
|
+
refs[_key] = arguments[_key];
|
|
1345
|
+
}
|
|
1344
1346
|
|
|
1347
|
+
return node => {
|
|
1348
|
+
refs.forEach(ref => {
|
|
1349
|
+
assignRef(ref, node);
|
|
1350
|
+
});
|
|
1351
|
+
};
|
|
1352
|
+
}
|
|
1345
1353
|
function assignRef(ref, value) {
|
|
1346
1354
|
if (ref) {
|
|
1347
|
-
if (typeof ref === '
|
|
1348
|
-
ref.current = value;
|
|
1349
|
-
} else {
|
|
1355
|
+
if (typeof ref === 'function') {
|
|
1350
1356
|
ref(value);
|
|
1357
|
+
} else {
|
|
1358
|
+
ref.current = value;
|
|
1351
1359
|
}
|
|
1352
1360
|
}
|
|
1353
1361
|
}
|
|
1354
1362
|
|
|
1363
|
+
var _excluded$f = ["size", "square", "classes", "children", "className", "CardContentProps"],
|
|
1364
|
+
_excluded2$2 = ["content", "sizeLarge", "fullWidth"];
|
|
1355
1365
|
var useStyles$9 = /*#__PURE__*/makeStyles(theme => ({
|
|
1356
1366
|
root: {
|
|
1357
1367
|
'&$fullWidth': {
|
|
@@ -3423,23 +3433,5 @@ var Tiles = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3423
3433
|
});
|
|
3424
3434
|
if (process.env.NODE_ENV !== "production") Tiles.displayName = "Tiles";
|
|
3425
3435
|
|
|
3426
|
-
|
|
3427
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3428
|
-
refs[_key] = arguments[_key];
|
|
3429
|
-
}
|
|
3430
|
-
|
|
3431
|
-
return node => {
|
|
3432
|
-
refs.forEach(ref => {
|
|
3433
|
-
if (ref) {
|
|
3434
|
-
if (typeof ref === 'function') {
|
|
3435
|
-
ref(node);
|
|
3436
|
-
} else {
|
|
3437
|
-
ref.current = node;
|
|
3438
|
-
}
|
|
3439
|
-
}
|
|
3440
|
-
});
|
|
3441
|
-
};
|
|
3442
|
-
}
|
|
3443
|
-
|
|
3444
|
-
export { AdaptiveToolbar, AvatarButton, Button, CardButton, CheckboxField, CheckboxGroupField, Color, Column, Columns, DescriptionList, DescriptionListItem, DrawerActions, DrawerContent, DrawerList, DrawerTitle, GridStack, InfoCard, Inline, InlineGrid, OverflowText, RadioField, RadioGroupField, ResponsiveContextProvider, Snackbar, SnackbarContent, SnackbarStackConsumer, SnackbarStackProvider, Stack, Tag, ThemeProvider, Tiles, VisibilityObserver, isColorProp, isEmptyReactNode, mergeRefs, parseAlignProp, parseCollapsedBelow, parseResponsiveProp, parseSpaceProp, renderChildren, useCollapseBreakpoint, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
|
|
3436
|
+
export { AdaptiveToolbar, AvatarButton, Button, CardButton, CheckboxField, CheckboxGroupField, Color, Column, Columns, DescriptionList, DescriptionListItem, DrawerActions, DrawerContent, DrawerList, DrawerTitle, GridStack, InfoCard, Inline, InlineGrid, OverflowText, RadioField, RadioGroupField, ResponsiveContextProvider, Snackbar, SnackbarContent, SnackbarStackConsumer, SnackbarStackProvider, Stack, Tag, ThemeProvider, Tiles, VisibilityObserver, assignRef, isColorProp, isEmptyReactNode, mergeRefs, parseAlignProp, parseCollapsedBelow, parseResponsiveProp, parseSpaceProp, renderChildren, useCollapseBreakpoint, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
|
|
3445
3437
|
//# sourceMappingURL=index.js.map
|