@superdispatch/ui 0.19.0 → 0.20.4
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 -0
- package/dist-node/index.js.map +1 -1
- package/dist-src/index.js +1 -0
- package/dist-src/responsive/MinBreakpoint.js +15 -0
- package/dist-types/index.d.ts +4 -1
- package/dist-web/index.js +16 -1
- package/dist-web/index.js.map +1 -1
- package/package.json +2 -2
package/dist-src/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export * from "./props/SpaceProp.js";
|
|
|
25
25
|
export * from "./radio/RadioField.js";
|
|
26
26
|
export * from "./radio/RadioGroupField.js";
|
|
27
27
|
export * from "./responsive/CollapseBreakpoint.js";
|
|
28
|
+
export * from "./responsive/MinBreakpoint.js";
|
|
28
29
|
export * from "./responsive/ResponsiveContext.js";
|
|
29
30
|
export * from "./snackbar/Snackbar.js";
|
|
30
31
|
export * from "./snackbar/SnackbarContent.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useResponsiveContext } from "./ResponsiveContext.js";
|
|
2
|
+
var BREAKPOINTS = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
3
|
+
export function useMinBreakpoint(minBreakpoint) {
|
|
4
|
+
var {
|
|
5
|
+
breakpoint = 'xs'
|
|
6
|
+
} = useResponsiveContext();
|
|
7
|
+
|
|
8
|
+
if (minBreakpoint == null) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var breakpointIDX = BREAKPOINTS.indexOf(breakpoint);
|
|
13
|
+
var minBreakpointIDX = BREAKPOINTS.indexOf(minBreakpoint);
|
|
14
|
+
return minBreakpointIDX < breakpointIDX;
|
|
15
|
+
}
|
package/dist-types/index.d.ts
CHANGED
|
@@ -251,6 +251,9 @@ declare const RadioGroupField: ForwardRefExoticComponent<RadioGroupFieldProps>;
|
|
|
251
251
|
declare type CollapseBreakpoint = 'sm' | 'md' | 'lg' | 'xl';
|
|
252
252
|
declare function useCollapseBreakpoint(collapseBreakpoint: undefined | CollapseBreakpoint): boolean;
|
|
253
253
|
|
|
254
|
+
declare type MinBreakpoint = 'sm' | 'md' | 'lg' | 'xl';
|
|
255
|
+
declare function useMinBreakpoint(minBreakpoint: undefined | MinBreakpoint): boolean;
|
|
256
|
+
|
|
254
257
|
interface ResponsiveContext {
|
|
255
258
|
breakpoint?: Breakpoint;
|
|
256
259
|
}
|
|
@@ -448,4 +451,4 @@ interface VisibilityObserverProps extends VisibilityObserverOptions {
|
|
|
448
451
|
}
|
|
449
452
|
declare function VisibilityObserver({ render, onChange, ...options }: VisibilityObserverProps): null | ReactElement;
|
|
450
453
|
|
|
451
|
-
export { AdaptiveToolbar, AdaptiveToolbarDropdownItem, AdaptiveToolbarItem, AdaptiveToolbarProps, AdaptiveVerticalToolbar, AdaptiveVerticalToolbarItem, AdaptiveVerticalToolbarProps, 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, DropdownButton, ElementVisibility, ExitTransitionPlaceholder, 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, useResizeObserver, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
|
|
454
|
+
export { AdaptiveToolbar, AdaptiveToolbarDropdownItem, AdaptiveToolbarItem, AdaptiveToolbarProps, AdaptiveVerticalToolbar, AdaptiveVerticalToolbarItem, AdaptiveVerticalToolbarProps, 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, DropdownButton, ElementVisibility, ExitTransitionPlaceholder, GridStack, GridStackProps, HorizontalAlign, InfoCard, InfoCardClassKey, InfoCardProps, Inline, InlineGrid, InlineGridProps, InlineProps, MinBreakpoint, 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, useMinBreakpoint, useResizeObserver, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
|
package/dist-web/index.js
CHANGED
|
@@ -1782,6 +1782,21 @@ function useCollapseBreakpoint(collapseBreakpoint) {
|
|
|
1782
1782
|
return breakpointIDX < collapseBreakpointIDX;
|
|
1783
1783
|
}
|
|
1784
1784
|
|
|
1785
|
+
var BREAKPOINTS$1 = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
1786
|
+
function useMinBreakpoint(minBreakpoint) {
|
|
1787
|
+
var {
|
|
1788
|
+
breakpoint = 'xs'
|
|
1789
|
+
} = useResponsiveContext();
|
|
1790
|
+
|
|
1791
|
+
if (minBreakpoint == null) {
|
|
1792
|
+
return false;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
var breakpointIDX = BREAKPOINTS$1.indexOf(breakpoint);
|
|
1796
|
+
var minBreakpointIDX = BREAKPOINTS$1.indexOf(minBreakpoint);
|
|
1797
|
+
return minBreakpointIDX < breakpointIDX;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1785
1800
|
var _excluded$j = ["action", "children", "onClose", "className", "classes", "variant"],
|
|
1786
1801
|
_excluded2$3 = ["icon", "closeButton", "variantError", "variantSuccess"];
|
|
1787
1802
|
var useStyles$b = /*#__PURE__*/makeStyles(theme => ({
|
|
@@ -3679,5 +3694,5 @@ function ExitTransitionPlaceholder(_ref) {
|
|
|
3679
3694
|
return renderChildren(children);
|
|
3680
3695
|
}
|
|
3681
3696
|
|
|
3682
|
-
export { AdaptiveToolbar, AdaptiveVerticalToolbar, AvatarButton, Button, CardButton, CheckboxField, CheckboxGroupField, Color, Column, Columns, DescriptionList, DescriptionListItem, DrawerActions, DrawerContent, DrawerList, DrawerTitle, DropdownButton, ExitTransitionPlaceholder, 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, useResizeObserver, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
|
|
3697
|
+
export { AdaptiveToolbar, AdaptiveVerticalToolbar, AvatarButton, Button, CardButton, CheckboxField, CheckboxGroupField, Color, Column, Columns, DescriptionList, DescriptionListItem, DrawerActions, DrawerContent, DrawerList, DrawerTitle, DropdownButton, ExitTransitionPlaceholder, 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, useMinBreakpoint, useResizeObserver, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
|
|
3683
3698
|
//# sourceMappingURL=index.js.map
|