@rabex-kit/rabex-ui 0.1.55 → 0.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/dist/hooks/useResponsive.d.ts +3 -0
- package/dist/rabex-ui.cjs.development.js +21 -1
- package/dist/rabex-ui.cjs.development.js.map +1 -1
- package/dist/rabex-ui.cjs.production.min.js +1 -1
- package/dist/rabex-ui.cjs.production.min.js.map +1 -1
- package/dist/rabex-ui.esm.js +21 -1
- package/dist/rabex-ui.esm.js.map +1 -1
- package/package.json +1 -1
@@ -652,6 +652,12 @@ function useResponsive() {
|
|
652
652
|
var isXL = useMediaQuery(function (theme) {
|
653
653
|
return "(min-width:" + theme.breakpoints.values.xl + "px)";
|
654
654
|
});
|
655
|
+
var isXXL = useMediaQuery(function (theme) {
|
656
|
+
return "(min-width:" + theme.breakpoints.values.xxl + "px)";
|
657
|
+
});
|
658
|
+
var isXXXL = useMediaQuery(function (theme) {
|
659
|
+
return "(min-width:" + theme.breakpoints.values.xxxl + "px)";
|
660
|
+
});
|
655
661
|
function matches(props) {
|
656
662
|
var result = _handleDefaultValue(props);
|
657
663
|
if (_hasValue(props.xs) && isXS) result = props.xs;
|
@@ -659,10 +665,24 @@ function useResponsive() {
|
|
659
665
|
if (_hasValue(props.md) && isMD) result = props.md;
|
660
666
|
if (_hasValue(props.lg) && isLG) result = props.lg;
|
661
667
|
if (_hasValue(props.xl) && isXL) result = props.xl;
|
668
|
+
if (_hasValue(props.xxl) && isXXL) result = props.xxl;
|
669
|
+
if (_hasValue(props.xxxl) && isXXXL) result = props.xxxl;
|
662
670
|
return result;
|
663
671
|
}
|
672
|
+
// Determine current breakpoint from media queries
|
673
|
+
var getCurrentBreakpoint = function getCurrentBreakpoint() {
|
674
|
+
if (isXXXL) return 'xxxl';
|
675
|
+
if (isXXL) return 'xxl';
|
676
|
+
if (isXL) return 'xl';
|
677
|
+
if (isLG) return 'lg';
|
678
|
+
if (isMD) return 'md';
|
679
|
+
if (isSM) return 'sm';
|
680
|
+
return 'xs';
|
681
|
+
};
|
682
|
+
var currentBreakpoint = getCurrentBreakpoint();
|
664
683
|
return {
|
665
|
-
matches: matches
|
684
|
+
matches: matches,
|
685
|
+
currentBreakpoint: currentBreakpoint
|
666
686
|
};
|
667
687
|
}
|
668
688
|
|