@ornikar/kitt-universal 25.45.4-canary.1fa8dd864c345808028f3e3165c5c7fcf9bc9e2a.0 → 25.46.1-canary.9950f4eb84cbfcf1d45de4e6c9ad226210c5404f.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/CHANGELOG.md +14 -2
- package/dist/definitions/BottomSheet/BottomSheet.d.ts +3 -2
- package/dist/definitions/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModal.d.ts +3 -2
- package/dist/definitions/CardModal/CardModal.d.ts.map +1 -1
- package/dist/definitions/FullscreenModal/FullscreenModal.d.ts +3 -2
- package/dist/definitions/FullscreenModal/FullscreenModal.d.ts.map +1 -1
- package/dist/definitions/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +1 -1
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/native-base/CurrentBreakpointContext.d.ts +19 -0
- package/dist/definitions/native-base/CurrentBreakpointContext.d.ts.map +1 -0
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/native-base/utils.d.ts +11 -12
- package/dist/definitions/native-base/utils.d.ts.map +1 -1
- package/dist/definitions/utils/windowSize/MatchWindowSize.d.ts +3 -2
- package/dist/definitions/utils/windowSize/MatchWindowSize.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +173 -97
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +173 -97
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +169 -93
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.js +161 -82
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +170 -95
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.mjs +162 -84
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +175 -95
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +166 -85
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/definitions/utils/windowSize/useCurrentBreakpointName.d.ts +0 -3
- package/dist/definitions/utils/windowSize/useCurrentBreakpointName.d.ts.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import React, { useContext, createContext, forwardRef, cloneElement, useRef, useEffect, useState,
|
|
3
|
+
import React, { useContext, createContext, forwardRef, useMemo, cloneElement, useRef, useEffect, useState, Children, useReducer, Fragment as Fragment$1, useCallback } from 'react';
|
|
4
4
|
import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, Image as Image$1, FlatList as FlatList$1, SectionList as SectionList$1, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Center as Center$1, useBreakpointValue as useBreakpointValue$1, useSx, Text, Input, NativeBaseProvider, extendTheme, useMediaQuery } from 'native-base';
|
|
5
5
|
export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
|
|
6
6
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
@@ -2716,8 +2716,129 @@ var VStack = VStack$1;
|
|
|
2716
2716
|
var HStack = HStack$1;
|
|
2717
2717
|
var Center = Center$1;
|
|
2718
2718
|
|
|
2719
|
+
var KittBreakpoints = {
|
|
2720
|
+
/**
|
|
2721
|
+
* min-width: 0
|
|
2722
|
+
*/
|
|
2723
|
+
BASE: 0,
|
|
2724
|
+
/**
|
|
2725
|
+
* min-width: 480px
|
|
2726
|
+
*/
|
|
2727
|
+
SMALL: 480,
|
|
2728
|
+
/**
|
|
2729
|
+
* min-width: 768px
|
|
2730
|
+
*/
|
|
2731
|
+
MEDIUM: 768,
|
|
2732
|
+
/**
|
|
2733
|
+
* min-width: 1024px
|
|
2734
|
+
*/
|
|
2735
|
+
LARGE: 1024,
|
|
2736
|
+
/**
|
|
2737
|
+
* min-width: 1280px
|
|
2738
|
+
*/
|
|
2739
|
+
WIDE: 1280
|
|
2740
|
+
};
|
|
2741
|
+
var KittBreakpointsMax = {
|
|
2742
|
+
/**
|
|
2743
|
+
* max-width: 479px
|
|
2744
|
+
*/
|
|
2745
|
+
BASE: KittBreakpoints.SMALL - 1,
|
|
2746
|
+
/**
|
|
2747
|
+
* max-width: 767px
|
|
2748
|
+
*/
|
|
2749
|
+
SMALL: KittBreakpoints.MEDIUM - 1,
|
|
2750
|
+
/**
|
|
2751
|
+
* max-width: 1023px
|
|
2752
|
+
*/
|
|
2753
|
+
MEDIUM: KittBreakpoints.LARGE - 1,
|
|
2754
|
+
/**
|
|
2755
|
+
* max-width: 1279px
|
|
2756
|
+
*/
|
|
2757
|
+
LARGE: KittBreakpoints.WIDE - 1
|
|
2758
|
+
};
|
|
2759
|
+
var KittBreakpointNameEnum = /*#__PURE__*/function (KittBreakpointNameEnum) {
|
|
2760
|
+
KittBreakpointNameEnum["BASE"] = "base";
|
|
2761
|
+
KittBreakpointNameEnum["SMALL"] = "small";
|
|
2762
|
+
KittBreakpointNameEnum["MEDIUM"] = "medium";
|
|
2763
|
+
KittBreakpointNameEnum["LARGE"] = "large";
|
|
2764
|
+
KittBreakpointNameEnum["WIDE"] = "wide";
|
|
2765
|
+
return KittBreakpointNameEnum;
|
|
2766
|
+
}({});
|
|
2767
|
+
|
|
2719
2768
|
// eslint-disable-next-line no-restricted-imports
|
|
2720
|
-
var
|
|
2769
|
+
var CurrentBreakpointContext = /*#__PURE__*/createContext(undefined);
|
|
2770
|
+
/**
|
|
2771
|
+
* Provider that uses the native-base breakpoint system to detect the current viewport size and maps it to Kitt's breakpoint names.
|
|
2772
|
+
*/
|
|
2773
|
+
function CurrentBreakpointProvider(_ref) {
|
|
2774
|
+
var children = _ref.children;
|
|
2775
|
+
var breakpoint = useBreakpointValue$1({
|
|
2776
|
+
base: KittBreakpointNameEnum.BASE,
|
|
2777
|
+
small: KittBreakpointNameEnum.SMALL,
|
|
2778
|
+
medium: KittBreakpointNameEnum.MEDIUM,
|
|
2779
|
+
large: KittBreakpointNameEnum.LARGE,
|
|
2780
|
+
wide: KittBreakpointNameEnum.WIDE
|
|
2781
|
+
});
|
|
2782
|
+
var value = useMemo(function () {
|
|
2783
|
+
return {
|
|
2784
|
+
breakpoint: breakpoint
|
|
2785
|
+
};
|
|
2786
|
+
}, [breakpoint]);
|
|
2787
|
+
return /*#__PURE__*/jsx(CurrentBreakpointContext.Provider, {
|
|
2788
|
+
value: value,
|
|
2789
|
+
children: children
|
|
2790
|
+
});
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2793
|
+
/**
|
|
2794
|
+
* React hook that provides information about the current breakpoint.
|
|
2795
|
+
* Unlike the native-base counterpart, this hook does not trigger a re-render on every viewport size change.
|
|
2796
|
+
*/
|
|
2797
|
+
function useCurrentBreakpointName() {
|
|
2798
|
+
var context = useContext(CurrentBreakpointContext);
|
|
2799
|
+
if (context === undefined) {
|
|
2800
|
+
throw new Error('useCurrentBreakpoint must be used within an CurrentBreakpointProvider');
|
|
2801
|
+
}
|
|
2802
|
+
return context;
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
/**
|
|
2806
|
+
* Retrieves the appropriate value for the given breakpoint with fallback to smaller breakpoints.
|
|
2807
|
+
* Mimics Native Base's logic.
|
|
2808
|
+
*/
|
|
2809
|
+
function getValueForBreakpoint(breakpoint, _ref) {
|
|
2810
|
+
var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
|
|
2811
|
+
var base = _ref.base,
|
|
2812
|
+
small = _ref.small,
|
|
2813
|
+
medium = _ref.medium,
|
|
2814
|
+
large = _ref.large,
|
|
2815
|
+
wide = _ref.wide;
|
|
2816
|
+
switch (breakpoint) {
|
|
2817
|
+
case KittBreakpointNameEnum.WIDE:
|
|
2818
|
+
return (_ref2 = (_ref3 = (_ref4 = wide !== null && wide !== void 0 ? wide : large) !== null && _ref4 !== void 0 ? _ref4 : medium) !== null && _ref3 !== void 0 ? _ref3 : small) !== null && _ref2 !== void 0 ? _ref2 : base;
|
|
2819
|
+
case KittBreakpointNameEnum.LARGE:
|
|
2820
|
+
return (_ref5 = (_ref6 = large !== null && large !== void 0 ? large : medium) !== null && _ref6 !== void 0 ? _ref6 : small) !== null && _ref5 !== void 0 ? _ref5 : base;
|
|
2821
|
+
case KittBreakpointNameEnum.MEDIUM:
|
|
2822
|
+
return (_ref7 = medium !== null && medium !== void 0 ? medium : small) !== null && _ref7 !== void 0 ? _ref7 : base;
|
|
2823
|
+
case KittBreakpointNameEnum.SMALL:
|
|
2824
|
+
return small !== null && small !== void 0 ? small : base;
|
|
2825
|
+
case KittBreakpointNameEnum.BASE:
|
|
2826
|
+
default:
|
|
2827
|
+
return base;
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
/**
|
|
2832
|
+
* A hook that returns a value based on the current breakpoint.
|
|
2833
|
+
* Mimics the behavior of Native Base's useBreakpointValue, but uses our custom context for better performance.
|
|
2834
|
+
*/
|
|
2835
|
+
function useBreakpointValue(values) {
|
|
2836
|
+
var _useCurrentBreakpoint = useCurrentBreakpointName(),
|
|
2837
|
+
breakpoint = _useCurrentBreakpoint.breakpoint;
|
|
2838
|
+
return useMemo(function () {
|
|
2839
|
+
return getValueForBreakpoint(breakpoint, values);
|
|
2840
|
+
}, [breakpoint, values]);
|
|
2841
|
+
}
|
|
2721
2842
|
|
|
2722
2843
|
function createResponsiveStyleFromProp(responsiveBooleanValue, valueIfTrue, valueIfFalse) {
|
|
2723
2844
|
// Handles simple boolean values
|
|
@@ -2787,55 +2908,6 @@ function AnimatedContainer$2(_ref) {
|
|
|
2787
2908
|
});
|
|
2788
2909
|
}
|
|
2789
2910
|
|
|
2790
|
-
var KittBreakpoints = {
|
|
2791
|
-
/**
|
|
2792
|
-
* min-width: 0
|
|
2793
|
-
*/
|
|
2794
|
-
BASE: 0,
|
|
2795
|
-
/**
|
|
2796
|
-
* min-width: 480px
|
|
2797
|
-
*/
|
|
2798
|
-
SMALL: 480,
|
|
2799
|
-
/**
|
|
2800
|
-
* min-width: 768px
|
|
2801
|
-
*/
|
|
2802
|
-
MEDIUM: 768,
|
|
2803
|
-
/**
|
|
2804
|
-
* min-width: 1024px
|
|
2805
|
-
*/
|
|
2806
|
-
LARGE: 1024,
|
|
2807
|
-
/**
|
|
2808
|
-
* min-width: 1280px
|
|
2809
|
-
*/
|
|
2810
|
-
WIDE: 1280
|
|
2811
|
-
};
|
|
2812
|
-
var KittBreakpointsMax = {
|
|
2813
|
-
/**
|
|
2814
|
-
* max-width: 479px
|
|
2815
|
-
*/
|
|
2816
|
-
BASE: KittBreakpoints.SMALL - 1,
|
|
2817
|
-
/**
|
|
2818
|
-
* max-width: 767px
|
|
2819
|
-
*/
|
|
2820
|
-
SMALL: KittBreakpoints.MEDIUM - 1,
|
|
2821
|
-
/**
|
|
2822
|
-
* max-width: 1023px
|
|
2823
|
-
*/
|
|
2824
|
-
MEDIUM: KittBreakpoints.LARGE - 1,
|
|
2825
|
-
/**
|
|
2826
|
-
* max-width: 1279px
|
|
2827
|
-
*/
|
|
2828
|
-
LARGE: KittBreakpoints.WIDE - 1
|
|
2829
|
-
};
|
|
2830
|
-
var KittBreakpointNameEnum = /*#__PURE__*/function (KittBreakpointNameEnum) {
|
|
2831
|
-
KittBreakpointNameEnum["BASE"] = "base";
|
|
2832
|
-
KittBreakpointNameEnum["SMALL"] = "small";
|
|
2833
|
-
KittBreakpointNameEnum["MEDIUM"] = "medium";
|
|
2834
|
-
KittBreakpointNameEnum["LARGE"] = "large";
|
|
2835
|
-
KittBreakpointNameEnum["WIDE"] = "wide";
|
|
2836
|
-
return KittBreakpointNameEnum;
|
|
2837
|
-
}({});
|
|
2838
|
-
|
|
2839
2911
|
var typographyColors = ['black', 'black-anthracite', 'black-disabled', 'black-light', 'white', 'white-light', 'primary', 'primary-light', 'accent', 'success', 'danger', 'warning'];
|
|
2840
2912
|
|
|
2841
2913
|
function getNBThemeColorFromColorProps(colorName) {
|
|
@@ -3769,7 +3841,7 @@ function Avatar(_ref2) {
|
|
|
3769
3841
|
});
|
|
3770
3842
|
}
|
|
3771
3843
|
|
|
3772
|
-
var _excluded$M = ["children", "hasScrollView", "hasBackdrop", "hasHandle", "enableDynamicSizing", "snapPoints"];
|
|
3844
|
+
var _excluded$M = ["children", "hasScrollView", "hasBackdrop", "hasHandle", "enableDynamicSizing", "snapPoints", "contentContainer"];
|
|
3773
3845
|
function BottomSheetComp(_ref, ref) {
|
|
3774
3846
|
var Content = _ref.children,
|
|
3775
3847
|
_ref$hasScrollView = _ref.hasScrollView,
|
|
@@ -3782,6 +3854,11 @@ function BottomSheetComp(_ref, ref) {
|
|
|
3782
3854
|
enableDynamicSizing = _ref$enableDynamicSiz === void 0 ? true : _ref$enableDynamicSiz,
|
|
3783
3855
|
_ref$snapPoints = _ref.snapPoints,
|
|
3784
3856
|
snapPoints = _ref$snapPoints === void 0 ? ['100%'] : _ref$snapPoints,
|
|
3857
|
+
_ref$contentContainer = _ref.contentContainer,
|
|
3858
|
+
ContentContainer = _ref$contentContainer === void 0 ? function (_ref2) {
|
|
3859
|
+
var children = _ref2.children;
|
|
3860
|
+
return children;
|
|
3861
|
+
} : _ref$contentContainer,
|
|
3785
3862
|
rest = _objectWithoutProperties(_ref, _excluded$M);
|
|
3786
3863
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
3787
3864
|
top = _useSafeAreaInsets.top;
|
|
@@ -3814,7 +3891,9 @@ function BottomSheetComp(_ref, ref) {
|
|
|
3814
3891
|
topInset: top,
|
|
3815
3892
|
children: function children(props) {
|
|
3816
3893
|
return /*#__PURE__*/jsx(Wrapper, {
|
|
3817
|
-
children:
|
|
3894
|
+
children: /*#__PURE__*/jsx(ContentContainer, {
|
|
3895
|
+
children: typeof Content === 'function' ? /*#__PURE__*/jsx(Content, _objectSpread({}, props === null || props === void 0 ? void 0 : props.data)) : Content
|
|
3896
|
+
})
|
|
3818
3897
|
});
|
|
3819
3898
|
}
|
|
3820
3899
|
}));
|
|
@@ -4219,7 +4298,7 @@ function CardModalHeader(_ref) {
|
|
|
4219
4298
|
}));
|
|
4220
4299
|
}
|
|
4221
4300
|
|
|
4222
|
-
var _excluded$H = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
4301
|
+
var _excluded$H = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer", "contentContainer"];
|
|
4223
4302
|
function CardModal(_ref) {
|
|
4224
4303
|
var _ref$backgroundColor = _ref.backgroundColor,
|
|
4225
4304
|
backgroundColor = _ref$backgroundColor === void 0 ? 'kitt.uiBackgroundLight' : _ref$backgroundColor,
|
|
@@ -4230,6 +4309,11 @@ function CardModal(_ref) {
|
|
|
4230
4309
|
header = _ref.header,
|
|
4231
4310
|
body = _ref.body,
|
|
4232
4311
|
footer = _ref.footer,
|
|
4312
|
+
_ref$contentContainer = _ref.contentContainer,
|
|
4313
|
+
ContentContainer = _ref$contentContainer === void 0 ? function (_ref2) {
|
|
4314
|
+
var originalChildren = _ref2.children;
|
|
4315
|
+
return originalChildren;
|
|
4316
|
+
} : _ref$contentContainer,
|
|
4233
4317
|
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4234
4318
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4235
4319
|
overflow: "hidden",
|
|
@@ -4240,8 +4324,10 @@ function CardModal(_ref) {
|
|
|
4240
4324
|
maxHeight: "100%",
|
|
4241
4325
|
maxWidth: maxWidth,
|
|
4242
4326
|
minHeight: "kitt.cardModal.minHeight",
|
|
4243
|
-
children:
|
|
4244
|
-
children:
|
|
4327
|
+
children: /*#__PURE__*/jsx(ContentContainer, {
|
|
4328
|
+
children: children || /*#__PURE__*/jsxs(Fragment, {
|
|
4329
|
+
children: [header || null, body || null, footer || null]
|
|
4330
|
+
})
|
|
4245
4331
|
})
|
|
4246
4332
|
}));
|
|
4247
4333
|
}
|
|
@@ -8239,24 +8325,31 @@ function FullscreenModal(_ref) {
|
|
|
8239
8325
|
var body = _ref.body,
|
|
8240
8326
|
header = _ref.header,
|
|
8241
8327
|
footer = _ref.footer,
|
|
8242
|
-
backgroundColor = _ref.backgroundColor
|
|
8243
|
-
|
|
8328
|
+
backgroundColor = _ref.backgroundColor,
|
|
8329
|
+
_ref$contentContainer = _ref.contentContainer,
|
|
8330
|
+
ContentContainer = _ref$contentContainer === void 0 ? function (_ref2) {
|
|
8331
|
+
var children = _ref2.children;
|
|
8332
|
+
return children;
|
|
8333
|
+
} : _ref$contentContainer;
|
|
8334
|
+
return /*#__PURE__*/jsx(FullscreenModalContainer, {
|
|
8244
8335
|
backgroundColor: backgroundColor,
|
|
8245
|
-
children:
|
|
8246
|
-
children: header
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8336
|
+
children: /*#__PURE__*/jsxs(ContentContainer, {
|
|
8337
|
+
children: [header ? /*#__PURE__*/jsx(View, {
|
|
8338
|
+
children: header
|
|
8339
|
+
}) : null, /*#__PURE__*/jsxs(View, {
|
|
8340
|
+
flexGrow: 1,
|
|
8341
|
+
flexShrink: 1,
|
|
8342
|
+
justifyContent: "space-between",
|
|
8343
|
+
children: [/*#__PURE__*/jsx(ScrollView$2, {
|
|
8344
|
+
bounces: false,
|
|
8345
|
+
contentContainerStyle: {
|
|
8346
|
+
flexGrow: 1,
|
|
8347
|
+
position: 'relative'
|
|
8348
|
+
},
|
|
8349
|
+
children: body
|
|
8350
|
+
}), footer || null]
|
|
8351
|
+
})]
|
|
8352
|
+
})
|
|
8260
8353
|
});
|
|
8261
8354
|
}
|
|
8262
8355
|
FullscreenModal.Header = FullscreenModalHeader;
|
|
@@ -11623,7 +11716,9 @@ function KittNativeBaseProvider(_ref) {
|
|
|
11623
11716
|
isSSR: isSSR,
|
|
11624
11717
|
children: /*#__PURE__*/jsx(KittThemeContext.Provider, {
|
|
11625
11718
|
value: kittInternalTheme,
|
|
11626
|
-
children:
|
|
11719
|
+
children: /*#__PURE__*/jsx(CurrentBreakpointProvider, {
|
|
11720
|
+
children: children
|
|
11721
|
+
})
|
|
11627
11722
|
})
|
|
11628
11723
|
});
|
|
11629
11724
|
}
|
|
@@ -13561,13 +13656,6 @@ function Tooltip(_ref) {
|
|
|
13561
13656
|
placement = _useFloating.placement;
|
|
13562
13657
|
var tooltipY = Math.round(y !== null && y !== void 0 ? y : 0) || 0;
|
|
13563
13658
|
var tooltipX = Math.round(x !== null && x !== void 0 ? x : 0) || 0;
|
|
13564
|
-
console.log({
|
|
13565
|
-
tooltipY: tooltipY,
|
|
13566
|
-
tooltipX: tooltipX,
|
|
13567
|
-
placement: placement,
|
|
13568
|
-
currentFloatingPadding: currentFloatingPadding,
|
|
13569
|
-
floatingWidth: floatingWidth
|
|
13570
|
-
});
|
|
13571
13659
|
useEffect(function () {
|
|
13572
13660
|
if (!onUpdate) return;
|
|
13573
13661
|
onUpdate({
|
|
@@ -13603,7 +13691,6 @@ function Tooltip(_ref) {
|
|
|
13603
13691
|
children: renderPressable({
|
|
13604
13692
|
ref: getPressableRect,
|
|
13605
13693
|
onPress: function handlePress() {
|
|
13606
|
-
console.log('handlePress', pressed.value);
|
|
13607
13694
|
if (onToggle) onToggle(!!pressed.value);
|
|
13608
13695
|
pressed.value = !pressed.value;
|
|
13609
13696
|
},
|
|
@@ -13854,21 +13941,14 @@ function MatchWindowSize(_ref) {
|
|
|
13854
13941
|
}
|
|
13855
13942
|
/**
|
|
13856
13943
|
* Display based on current breakpoint
|
|
13944
|
+
* Mimics the behavior of Native Base's SwitchBreakpoints, but uses our custom context for better performance.
|
|
13857
13945
|
*
|
|
13858
13946
|
* WARNING: Currently not SSR friendly (but could be).
|
|
13859
13947
|
*/
|
|
13860
|
-
function SwitchBreakpoints(
|
|
13861
|
-
|
|
13862
|
-
|
|
13863
|
-
|
|
13864
|
-
function useCurrentBreakpointName() {
|
|
13865
|
-
return useBreakpointValue({
|
|
13866
|
-
base: KittBreakpointNameEnum.BASE,
|
|
13867
|
-
small: KittBreakpointNameEnum.SMALL,
|
|
13868
|
-
medium: KittBreakpointNameEnum.MEDIUM,
|
|
13869
|
-
large: KittBreakpointNameEnum.LARGE,
|
|
13870
|
-
wide: KittBreakpointNameEnum.WIDE
|
|
13871
|
-
});
|
|
13948
|
+
function SwitchBreakpoints(values) {
|
|
13949
|
+
var _useCurrentBreakpoint = useCurrentBreakpointName(),
|
|
13950
|
+
breakpoint = _useCurrentBreakpoint.breakpoint;
|
|
13951
|
+
return getValueForBreakpoint(breakpoint, values);
|
|
13872
13952
|
}
|
|
13873
13953
|
|
|
13874
13954
|
function useStepAnimations(_ref) {
|
|
@@ -14130,5 +14210,5 @@ function VerticalSteps(_ref) {
|
|
|
14130
14210
|
VerticalSteps.Step = Step;
|
|
14131
14211
|
VerticalSteps.BorderlessStep = BorderlessStep;
|
|
14132
14212
|
|
|
14133
|
-
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
|
|
14213
|
+
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
|
|
14134
14214
|
//# sourceMappingURL=index.es.js.map
|