bootstrap-rn 0.1.3 → 0.1.5
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/bootstrap-rn.cjs.js +446 -317
- package/dist/bootstrap-rn.esm.js +447 -318
- package/dist/bootstrap-rn.umd.js +571 -444
- package/dist/bootstrap-rn.umd.min.js +2 -2
- package/package.json +5 -6
package/dist/bootstrap-rn.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OverlayProvider, useOverlayPosition, OverlayContainer } from '@react-native-aria/overlays';
|
|
2
2
|
export { PortalProvider } from '@react-native-aria/overlays';
|
|
3
|
-
import { Platform, PixelRatio, StyleSheet as StyleSheet$1, I18nManager, Dimensions, View as View$1, Text as Text$1, Pressable as Pressable$1, findNodeHandle, TextInput as TextInput$1, Image as Image$1, ImageBackground as ImageBackground$1, ScrollView as ScrollView$1, Modal as Modal$1, Picker as Picker$1, Animated, Easing } from 'react-native';
|
|
3
|
+
import { Platform, PixelRatio, StyleSheet as StyleSheet$1, I18nManager, Dimensions, View as View$1, Text as Text$1, Pressable as Pressable$1, findNodeHandle, TextInput as TextInput$1, Image as Image$1, ImageBackground as ImageBackground$1, ScrollView as ScrollView$1, Modal as Modal$1, SafeAreaView, Picker as Picker$1, Animated, Easing } from 'react-native';
|
|
4
4
|
import { getStylesForProperty, getPropertyName } from 'css-to-react-native';
|
|
5
5
|
import { rgba as rgba$1, mix, parseToRgb } from 'polished';
|
|
6
6
|
import React, { useState, useEffect, useRef, useContext, useMemo, createContext } from 'react';
|
|
@@ -830,6 +830,13 @@ function transform(children, theme) {
|
|
|
830
830
|
order: value
|
|
831
831
|
});
|
|
832
832
|
}
|
|
833
|
+
} else if (child.name === 'margin-horizontal' && value === 'auto') {
|
|
834
|
+
// Workaround for react-native issue #350
|
|
835
|
+
// https://github.com/facebook/react-native/issues/350#issuecomment-375238958
|
|
836
|
+
Object.assign(definitions[0].declarations, {
|
|
837
|
+
marginLeft: value,
|
|
838
|
+
marginRight: value
|
|
839
|
+
});
|
|
833
840
|
} else if (child.name === 'border-color' && value.split(' ').length === 1) {
|
|
834
841
|
// Workaround for react-native issue #19981
|
|
835
842
|
// https://github.com/facebook/react-native/issues/19981
|
|
@@ -2785,15 +2792,15 @@ function useViewport(initialViewport) {
|
|
|
2785
2792
|
});
|
|
2786
2793
|
}, []);
|
|
2787
2794
|
useEffect(function () {
|
|
2788
|
-
Dimensions.addEventListener('change', handleChange);
|
|
2795
|
+
var subscription = Dimensions.addEventListener('change', handleChange);
|
|
2789
2796
|
return function () {
|
|
2790
|
-
|
|
2797
|
+
subscription.remove();
|
|
2791
2798
|
};
|
|
2792
2799
|
}, [viewport]);
|
|
2793
2800
|
return viewport;
|
|
2794
2801
|
}
|
|
2795
2802
|
|
|
2796
|
-
var propTypes$
|
|
2803
|
+
var propTypes$1q = {
|
|
2797
2804
|
children: PropTypes.node.isRequired,
|
|
2798
2805
|
// eslint-disable-next-line react/forbid-prop-types,
|
|
2799
2806
|
utilities: PropTypes.object,
|
|
@@ -2827,7 +2834,7 @@ function Provider(props) {
|
|
|
2827
2834
|
}, /*#__PURE__*/React.createElement(OverlayProvider, null, children));
|
|
2828
2835
|
}
|
|
2829
2836
|
|
|
2830
|
-
Provider.propTypes = propTypes$
|
|
2837
|
+
Provider.propTypes = propTypes$1q;
|
|
2831
2838
|
|
|
2832
2839
|
var TextStyleContext = /*#__PURE__*/React.createContext();
|
|
2833
2840
|
TextStyleContext.displayName = 'TextStyleContext';
|
|
@@ -2911,7 +2918,7 @@ function useStyle(style, styleName) {
|
|
|
2911
2918
|
}
|
|
2912
2919
|
|
|
2913
2920
|
var _excluded$1r = ["children", "style", "textStyle", "styleName"];
|
|
2914
|
-
var propTypes$
|
|
2921
|
+
var propTypes$1p = {
|
|
2915
2922
|
children: PropTypes.node,
|
|
2916
2923
|
// eslint-disable-next-line react/forbid-prop-types
|
|
2917
2924
|
style: PropTypes.any,
|
|
@@ -2947,12 +2954,12 @@ var View = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2947
2954
|
}, children) : children);
|
|
2948
2955
|
});
|
|
2949
2956
|
View.displayName = 'View';
|
|
2950
|
-
View.propTypes = propTypes$
|
|
2957
|
+
View.propTypes = propTypes$1p;
|
|
2951
2958
|
|
|
2952
2959
|
var _excluded$1q = ["children", "color", "dismissible", "style", "textStyle"];
|
|
2953
2960
|
|
|
2954
2961
|
var _templateObject$19, _templateObject2$L, _templateObject3$q;
|
|
2955
|
-
var propTypes$
|
|
2962
|
+
var propTypes$1o = {
|
|
2956
2963
|
children: PropTypes.node.isRequired,
|
|
2957
2964
|
color: PropTypes.oneOf(Object.keys(THEME_COLORS)),
|
|
2958
2965
|
dismissible: PropTypes.bool,
|
|
@@ -2997,12 +3004,12 @@ var Alert = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2997
3004
|
}), children);
|
|
2998
3005
|
});
|
|
2999
3006
|
Alert.displayName = 'Alert';
|
|
3000
|
-
Alert.propTypes = propTypes$
|
|
3007
|
+
Alert.propTypes = propTypes$1o;
|
|
3001
3008
|
|
|
3002
3009
|
var _excluded$1p = ["color", "bold", "italic", "mark", "small", "style", "styleName"];
|
|
3003
3010
|
|
|
3004
|
-
var _templateObject$18, _templateObject2$K, _templateObject3$p, _templateObject4$
|
|
3005
|
-
var propTypes$
|
|
3011
|
+
var _templateObject$18, _templateObject2$K, _templateObject3$p, _templateObject4$m, _templateObject5$k;
|
|
3012
|
+
var propTypes$1n = {
|
|
3006
3013
|
color: PropTypes.oneOf([].concat(_toConsumableArray(Object.keys(THEME_COLORS)), ['muted', 'black-50', 'white-50'])),
|
|
3007
3014
|
small: PropTypes.bool,
|
|
3008
3015
|
mark: PropTypes.bool,
|
|
@@ -3017,8 +3024,8 @@ var styles$17 = StyleSheet.create({
|
|
|
3017
3024
|
text: css(_templateObject$18 || (_templateObject$18 = _taggedTemplateLiteral(["\n font-family: $font-family-base;\n font-size: $font-size-base;\n font-weight: $font-weight-base;\n line-height: $font-size-base * $line-height-base;\n "]))),
|
|
3018
3025
|
strong: css(_templateObject2$K || (_templateObject2$K = _taggedTemplateLiteral(["\n font-weight: $font-weight-bolder;\n "]))),
|
|
3019
3026
|
italic: css(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteral(["\n font-style: italic;\n "]))),
|
|
3020
|
-
small: css(_templateObject4$
|
|
3021
|
-
mark: css(_templateObject5$
|
|
3027
|
+
small: css(_templateObject4$m || (_templateObject4$m = _taggedTemplateLiteral(["\n font-size: $small-font-size;\n line-height: $small-font-size * $line-height-base;\n "]))),
|
|
3028
|
+
mark: css(_templateObject5$k || (_templateObject5$k = _taggedTemplateLiteral(["\n padding: $mark-padding;\n background-color: $mark-bg;\n "])))
|
|
3022
3029
|
});
|
|
3023
3030
|
|
|
3024
3031
|
var getStyleName = function getStyleName(styleName, color) {
|
|
@@ -3071,12 +3078,12 @@ var Text = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3071
3078
|
}, element);
|
|
3072
3079
|
});
|
|
3073
3080
|
Text.displayName = 'Text';
|
|
3074
|
-
Text.propTypes = propTypes$
|
|
3081
|
+
Text.propTypes = propTypes$1n;
|
|
3075
3082
|
|
|
3076
3083
|
var _excluded$1o = ["children", "style"];
|
|
3077
3084
|
|
|
3078
3085
|
var _templateObject$17, _templateObject2$J;
|
|
3079
|
-
var propTypes$
|
|
3086
|
+
var propTypes$1m = {
|
|
3080
3087
|
children: PropTypes.node.isRequired,
|
|
3081
3088
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3082
3089
|
style: PropTypes.any
|
|
@@ -3097,12 +3104,12 @@ var Badge = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3097
3104
|
}), children);
|
|
3098
3105
|
});
|
|
3099
3106
|
Badge.displayName = 'Badge';
|
|
3100
|
-
Badge.propTypes = propTypes$
|
|
3107
|
+
Badge.propTypes = propTypes$1m;
|
|
3101
3108
|
|
|
3102
3109
|
var _excluded$1n = ["children", "active", "style", "textStyle"];
|
|
3103
3110
|
|
|
3104
3111
|
var _templateObject$16, _templateObject2$I, _templateObject3$o;
|
|
3105
|
-
var propTypes$
|
|
3112
|
+
var propTypes$1l = {
|
|
3106
3113
|
children: PropTypes.node.isRequired,
|
|
3107
3114
|
active: PropTypes.bool,
|
|
3108
3115
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -3132,7 +3139,7 @@ var BreadcrumbItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3132
3139
|
}), children);
|
|
3133
3140
|
});
|
|
3134
3141
|
BreadcrumbItem.displayName = 'BreadcrumbItem';
|
|
3135
|
-
BreadcrumbItem.propTypes = propTypes$
|
|
3142
|
+
BreadcrumbItem.propTypes = propTypes$1l;
|
|
3136
3143
|
/*
|
|
3137
3144
|
$breadcrumb-font-size: null;
|
|
3138
3145
|
$breadcrumb-padding-y: 0;
|
|
@@ -3150,7 +3157,7 @@ $breadcrumb-border-radius: null;
|
|
|
3150
3157
|
var _excluded$1m = ["children", "style"];
|
|
3151
3158
|
|
|
3152
3159
|
var _templateObject$15;
|
|
3153
|
-
var propTypes$
|
|
3160
|
+
var propTypes$1k = {
|
|
3154
3161
|
children: PropTypes.node.isRequired,
|
|
3155
3162
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3156
3163
|
style: PropTypes.any
|
|
@@ -3170,7 +3177,7 @@ var Breadcrumb = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3170
3177
|
}), makeListChildren(children));
|
|
3171
3178
|
});
|
|
3172
3179
|
Breadcrumb.displayName = 'Breadcrumb';
|
|
3173
|
-
Breadcrumb.propTypes = propTypes$
|
|
3180
|
+
Breadcrumb.propTypes = propTypes$1k;
|
|
3174
3181
|
Breadcrumb.Item = BreadcrumbItem;
|
|
3175
3182
|
/*
|
|
3176
3183
|
$breadcrumb-font-size: null;
|
|
@@ -3192,7 +3199,7 @@ ButtonGroupContext.displayName = 'ButtonGroupContext';
|
|
|
3192
3199
|
var _excluded$1l = ["children", "size", "style"];
|
|
3193
3200
|
|
|
3194
3201
|
var _templateObject$14;
|
|
3195
|
-
var propTypes$
|
|
3202
|
+
var propTypes$1j = {
|
|
3196
3203
|
children: PropTypes.node.isRequired,
|
|
3197
3204
|
size: PropTypes.oneOf(['lg', 'sm']),
|
|
3198
3205
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -3221,12 +3228,12 @@ var ButtonGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3221
3228
|
}, makeListChildren(children)));
|
|
3222
3229
|
});
|
|
3223
3230
|
ButtonGroup.displayName = 'ButtonGroup';
|
|
3224
|
-
ButtonGroup.propTypes = propTypes$
|
|
3231
|
+
ButtonGroup.propTypes = propTypes$1j;
|
|
3225
3232
|
|
|
3226
3233
|
var _excluded$1k = ["children", "style"];
|
|
3227
3234
|
|
|
3228
3235
|
var _templateObject$13;
|
|
3229
|
-
var propTypes$
|
|
3236
|
+
var propTypes$1i = {
|
|
3230
3237
|
children: PropTypes.node.isRequired,
|
|
3231
3238
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3232
3239
|
style: PropTypes.any
|
|
@@ -3247,7 +3254,7 @@ var ButtonToolbar = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3247
3254
|
}), children);
|
|
3248
3255
|
});
|
|
3249
3256
|
ButtonToolbar.displayName = 'ButtonToolbar';
|
|
3250
|
-
ButtonToolbar.propTypes = propTypes$
|
|
3257
|
+
ButtonToolbar.propTypes = propTypes$1i;
|
|
3251
3258
|
|
|
3252
3259
|
function useForcedContext(Context) {
|
|
3253
3260
|
var context = useContext(Context);
|
|
@@ -3309,7 +3316,7 @@ function useAction(props, ref) {
|
|
|
3309
3316
|
}
|
|
3310
3317
|
|
|
3311
3318
|
var _excluded$1h = ["children", "active", "style", "activeStyle", "textStyle", "activeTextStyle", "styleName"];
|
|
3312
|
-
var propTypes$
|
|
3319
|
+
var propTypes$1h = {
|
|
3313
3320
|
children: PropTypes.node,
|
|
3314
3321
|
active: PropTypes.bool,
|
|
3315
3322
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -3398,7 +3405,7 @@ var Pressable = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3398
3405
|
} : children);
|
|
3399
3406
|
});
|
|
3400
3407
|
Pressable.displayName = 'Pressable';
|
|
3401
|
-
Pressable.propTypes = propTypes$
|
|
3408
|
+
Pressable.propTypes = propTypes$1h;
|
|
3402
3409
|
|
|
3403
3410
|
var _excluded$1g = ["active", "handlePress"];
|
|
3404
3411
|
function useToggleButton(props) {
|
|
@@ -3425,8 +3432,8 @@ function useToggleButton(props) {
|
|
|
3425
3432
|
|
|
3426
3433
|
var _excluded$1f = ["children", "color", "size", "outline", "first", "last", "active", "disabled", "style", "activeStyle", "textStyle", "activeTextStyle"];
|
|
3427
3434
|
|
|
3428
|
-
var _templateObject$12, _templateObject2$H, _templateObject3$n, _templateObject4$
|
|
3429
|
-
var propTypes$
|
|
3435
|
+
var _templateObject$12, _templateObject2$H, _templateObject3$n, _templateObject4$l, _templateObject5$j, _templateObject6$g, _templateObject7$c, _templateObject8$b, _templateObject9$8, _templateObject10$8, _templateObject11$6, _templateObject12$5, _templateObject13$5, _templateObject14$3, _templateObject15$2, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20$1, _templateObject21, _templateObject22, _templateObject23;
|
|
3436
|
+
var propTypes$1g = {
|
|
3430
3437
|
children: PropTypes.node.isRequired,
|
|
3431
3438
|
color: PropTypes.oneOf([].concat(_toConsumableArray(Object.keys(THEME_COLORS)), ['link'])),
|
|
3432
3439
|
size: PropTypes.oneOf(['lg', 'sm']),
|
|
@@ -3451,7 +3458,7 @@ var styles$11 = StyleSheet.create(_objectSpread2(_objectSpread2({
|
|
|
3451
3458
|
}, each(THEME_COLORS, function (color, value) {
|
|
3452
3459
|
var _ref;
|
|
3453
3460
|
|
|
3454
|
-
return _ref = {}, _defineProperty(_ref, ".btn-".concat(color), css(_templateObject4$
|
|
3461
|
+
return _ref = {}, _defineProperty(_ref, ".btn-".concat(color), css(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteral(["\n background-color: ", ";\n border-color: ", ";\n // @include box-shadow($btn-box-shadow);\n\n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n\n &:focus {\n background-color: ", ";\n border-color: ", ";\n /* @if $enable-shadows {\n @include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));\n } @else {\n // Avoid using mixin so we can pass custom focus shadow properly\n box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);\n } */\n }\n\n &:active {\n background-color: ", ";\n // Remove CSS gradients if they're enabled\n // background-image: if($enable-gradients, none, null);\n border-color: ", ";\n }\n "])), value, value, shadeColor(function (t) {
|
|
3455
3462
|
return t['btn-hover-bg-shade-amount'];
|
|
3456
3463
|
}, value), shadeColor(function (t) {
|
|
3457
3464
|
return t['btn-hover-border-shade-amount'];
|
|
@@ -3463,11 +3470,11 @@ var styles$11 = StyleSheet.create(_objectSpread2(_objectSpread2({
|
|
|
3463
3470
|
return t['btn-active-bg-shade-amount'];
|
|
3464
3471
|
}, value), shadeColor(function (t) {
|
|
3465
3472
|
return t['btn-active-border-shade-amount'];
|
|
3466
|
-
}, value))), _defineProperty(_ref, ".btn-".concat(color, "-text"), css(_templateObject5$
|
|
3473
|
+
}, value))), _defineProperty(_ref, ".btn-".concat(color, "-text"), css(_templateObject5$j || (_templateObject5$j = _taggedTemplateLiteral(["\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &:focus {\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n "])), colorContrast(value), colorContrast(value), colorContrast(value), colorContrast(value))), _defineProperty(_ref, ".btn-".concat(color, "-active"), css(_templateObject6$g || (_templateObject6$g = _taggedTemplateLiteral(["\n background-color: ", ";\n // Remove CSS gradients if they're enabled\n // background-image: if($enable-gradients, none, null);\n border-color: ", ";\n "])), shadeColor(function (t) {
|
|
3467
3474
|
return t['btn-active-bg-shade-amount'];
|
|
3468
3475
|
}, value), shadeColor(function (t) {
|
|
3469
3476
|
return t['btn-active-border-shade-amount'];
|
|
3470
|
-
}, value))), _defineProperty(_ref, ".btn-".concat(color, "-active-text"), css(_templateObject7$
|
|
3477
|
+
}, value))), _defineProperty(_ref, ".btn-".concat(color, "-active-text"), css(_templateObject7$c || (_templateObject7$c = _taggedTemplateLiteral(["\n color: ", ";\n "])), colorContrast(value))), _defineProperty(_ref, ".btn-".concat(color, "-disabled"), css(_templateObject8$b || (_templateObject8$b = _taggedTemplateLiteral(["\n $disabled-background: ", ";\n $disabled-border: ", ";\n\n background-color: $disabled-background;\n // Remove CSS gradients if they're enabled\n // background-image: if($enable-gradients, none, null);\n border-color: $disabled-border;\n "])), value, value)), _defineProperty(_ref, ".btn-".concat(color, "-disabled-text"), css(_templateObject9$8 || (_templateObject9$8 = _taggedTemplateLiteral(["\n $disabled-color: ", ";\n\n color: $disabled-color;\n "])), colorContrast(value))), _defineProperty(_ref, ".btn-outline-".concat(color), css(_templateObject10$8 || (_templateObject10$8 = _taggedTemplateLiteral(["\n border-color: ", ";\n\n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n\n &:focus {\n // box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);\n }\n\n &:active {\n background-color: ", ";\n border-color: ", ";\n\n /* &:focus {\n @if $enable-shadows {\n @include box-shadow(\n $btn-active-box-shadow,\n 0 0 0 $btn-focus-width rgba($color, 0.5)\n );\n } @else {\n // Avoid using mixin so we can pass custom focus shadow properly\n box-shadow: 0 0 0 $btn-focus-width rgba($color, 0.5);\n }\n } */\n }\n "])), value, value, value, value, value)), _defineProperty(_ref, ".btn-outline-".concat(color, "-text"), css(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteral(["\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &:active {\n color: ", ";\n }\n "])), value, colorContrast(value), colorContrast(value))), _defineProperty(_ref, ".btn-outline-".concat(color, "-disabled"), css(_templateObject12$5 || (_templateObject12$5 = _taggedTemplateLiteral(["\n background-color: transparent;\n "])))), _defineProperty(_ref, ".btn-outline-".concat(color, "-disabled-text"), css(_templateObject13$5 || (_templateObject13$5 = _taggedTemplateLiteral(["\n color: ", ";\n "])), value)), _ref;
|
|
3471
3478
|
})), {}, {
|
|
3472
3479
|
'.btn-link-text': css(_templateObject14$3 || (_templateObject14$3 = _taggedTemplateLiteral(["\n font-weight: $font-weight-normal;\n color: $btn-link-color;\n text-decoration-color: $btn-link-color; // added for bootstrap-rn\n text-decoration-line: $link-decoration;\n\n &:hover {\n color: $btn-link-hover-color;\n text-decoration-color: $btn-link-hover-color; // added for bootstrap-rn\n text-decoration-line: $link-hover-decoration;\n }\n\n &:focus {\n text-decoration-line: $link-hover-decoration;\n }\n\n // No need for an active state here\n "]))),
|
|
3473
3480
|
'.btn-link-text-disabled': css(_templateObject15$2 || (_templateObject15$2 = _taggedTemplateLiteral(["\n color: $btn-link-disabled-color;\n "]))),
|
|
@@ -3475,7 +3482,7 @@ var styles$11 = StyleSheet.create(_objectSpread2(_objectSpread2({
|
|
|
3475
3482
|
'.btn-lg-text': css(_templateObject17$1 || (_templateObject17$1 = _taggedTemplateLiteral(["\n line-height: $btn-font-size-lg * $btn-line-height;\n font-size: $btn-font-size-lg;\n "]))),
|
|
3476
3483
|
'.btn-sm': css(_templateObject18$1 || (_templateObject18$1 = _taggedTemplateLiteral(["\n padding: $btn-padding-y-sm $btn-padding-x-sm;\n // Manually declare to provide an override to the browser default\n border-radius: $btn-border-radius-sm;\n "]))),
|
|
3477
3484
|
'.btn-sm-text': css(_templateObject19$1 || (_templateObject19$1 = _taggedTemplateLiteral(["\n line-height: $btn-font-size-sm * $btn-line-height;\n font-size: $btn-font-size-sm;\n "]))),
|
|
3478
|
-
'.btn-group > .btn': css(_templateObject20$1 || (_templateObject20$1 = _taggedTemplateLiteral(["\n position: relative;\n flex: 1 1 auto;\n\n &:hover {\n z-index: 1;\n }\n &:focus {\n z-index: 1;\n }\n &:active {\n z-index: 1;\n }\n "]))),
|
|
3485
|
+
'.btn-group > .btn': css(_templateObject20$1 || (_templateObject20$1 = _taggedTemplateLiteral(["\n position: relative;\n // flex: 1 1 auto;\n\n &:hover {\n z-index: 1;\n }\n &:focus {\n z-index: 1;\n }\n &:active {\n z-index: 1;\n }\n "]))),
|
|
3479
3486
|
'.btn-group > .btn-active': css(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n z-index: 2; // 1;\n "]))),
|
|
3480
3487
|
'.btn-group > .btn-not-first': css(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n margin-left: -$btn-border-width;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n "]))),
|
|
3481
3488
|
'.btn-group > .btn-not-last': css(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n "])))
|
|
@@ -3539,13 +3546,13 @@ var Button = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3539
3546
|
}), children);
|
|
3540
3547
|
});
|
|
3541
3548
|
Button.displayName = 'Button';
|
|
3542
|
-
Button.propTypes = propTypes$
|
|
3549
|
+
Button.propTypes = propTypes$1g;
|
|
3543
3550
|
Button.useToggle = useToggleButton;
|
|
3544
3551
|
|
|
3545
3552
|
var _excluded$1e = ["children", "style", "textStyle"];
|
|
3546
3553
|
|
|
3547
3554
|
var _templateObject$11, _templateObject2$G;
|
|
3548
|
-
var propTypes$
|
|
3555
|
+
var propTypes$1f = {
|
|
3549
3556
|
children: PropTypes.node.isRequired,
|
|
3550
3557
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3551
3558
|
style: PropTypes.any,
|
|
@@ -3574,12 +3581,12 @@ var Blockquote = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3574
3581
|
}), children);
|
|
3575
3582
|
});
|
|
3576
3583
|
Blockquote.displayName = 'Blockquote';
|
|
3577
|
-
Blockquote.propTypes = propTypes$
|
|
3584
|
+
Blockquote.propTypes = propTypes$1f;
|
|
3578
3585
|
|
|
3579
3586
|
var _excluded$1d = ["children", "style", "textStyle"];
|
|
3580
3587
|
|
|
3581
3588
|
var _templateObject$10, _templateObject2$F;
|
|
3582
|
-
var propTypes$
|
|
3589
|
+
var propTypes$1e = {
|
|
3583
3590
|
children: PropTypes.node.isRequired,
|
|
3584
3591
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3585
3592
|
style: PropTypes.any,
|
|
@@ -3587,7 +3594,7 @@ var propTypes$1d = {
|
|
|
3587
3594
|
textStyle: PropTypes.any
|
|
3588
3595
|
};
|
|
3589
3596
|
var styles$$ = StyleSheet.create({
|
|
3590
|
-
body: css(_templateObject$10 || (_templateObject$10 = _taggedTemplateLiteral(["\n background-color: $body-bg;\n "]))),
|
|
3597
|
+
body: css(_templateObject$10 || (_templateObject$10 = _taggedTemplateLiteral(["\n background-color: $body-bg;\n height: 100%; // added for bootstrap-rn\n "]))),
|
|
3591
3598
|
'body-text': css(_templateObject2$F || (_templateObject2$F = _taggedTemplateLiteral(["\n color: $body-color;\n text-align: $body-text-align;\n "])))
|
|
3592
3599
|
});
|
|
3593
3600
|
var Body = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -3605,12 +3612,12 @@ var Body = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3605
3612
|
}), children);
|
|
3606
3613
|
});
|
|
3607
3614
|
Body.displayName = 'Body';
|
|
3608
|
-
Body.propTypes = propTypes$
|
|
3615
|
+
Body.propTypes = propTypes$1e;
|
|
3609
3616
|
|
|
3610
3617
|
var _excluded$1c = ["children", "style", "textStyle"];
|
|
3611
3618
|
|
|
3612
3619
|
var _templateObject$$, _templateObject2$E;
|
|
3613
|
-
var propTypes$
|
|
3620
|
+
var propTypes$1d = {
|
|
3614
3621
|
children: PropTypes.node.isRequired,
|
|
3615
3622
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3616
3623
|
style: PropTypes.any,
|
|
@@ -3636,12 +3643,12 @@ var CardBody = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3636
3643
|
}), children);
|
|
3637
3644
|
});
|
|
3638
3645
|
CardBody.displayName = 'CardBody';
|
|
3639
|
-
CardBody.propTypes = propTypes$
|
|
3646
|
+
CardBody.propTypes = propTypes$1d;
|
|
3640
3647
|
|
|
3641
3648
|
var _excluded$1b = ["children", "style", "textStyle"];
|
|
3642
3649
|
|
|
3643
3650
|
var _templateObject$_, _templateObject2$D;
|
|
3644
|
-
var propTypes$
|
|
3651
|
+
var propTypes$1c = {
|
|
3645
3652
|
children: PropTypes.node.isRequired,
|
|
3646
3653
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3647
3654
|
style: PropTypes.any,
|
|
@@ -3667,12 +3674,12 @@ var CardHeader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3667
3674
|
}), children);
|
|
3668
3675
|
});
|
|
3669
3676
|
CardHeader.displayName = 'CardHeader';
|
|
3670
|
-
CardHeader.propTypes = propTypes$
|
|
3677
|
+
CardHeader.propTypes = propTypes$1c;
|
|
3671
3678
|
|
|
3672
3679
|
var _excluded$1a = ["children", "style", "textStyle"];
|
|
3673
3680
|
|
|
3674
3681
|
var _templateObject$Z, _templateObject2$C;
|
|
3675
|
-
var propTypes$
|
|
3682
|
+
var propTypes$1b = {
|
|
3676
3683
|
children: PropTypes.node.isRequired,
|
|
3677
3684
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3678
3685
|
style: PropTypes.any,
|
|
@@ -3698,12 +3705,12 @@ var CardFooter = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3698
3705
|
}), children);
|
|
3699
3706
|
});
|
|
3700
3707
|
CardFooter.displayName = 'CardFooter';
|
|
3701
|
-
CardFooter.propTypes = propTypes$
|
|
3708
|
+
CardFooter.propTypes = propTypes$1b;
|
|
3702
3709
|
|
|
3703
3710
|
var _excluded$19 = ["children", "style"];
|
|
3704
3711
|
|
|
3705
3712
|
var _templateObject$Y;
|
|
3706
|
-
var propTypes$
|
|
3713
|
+
var propTypes$1a = {
|
|
3707
3714
|
children: PropTypes.node.isRequired,
|
|
3708
3715
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3709
3716
|
style: PropTypes.any
|
|
@@ -3723,15 +3730,21 @@ var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3723
3730
|
}), children);
|
|
3724
3731
|
});
|
|
3725
3732
|
Card.displayName = 'Card';
|
|
3726
|
-
Card.propTypes = propTypes$
|
|
3733
|
+
Card.propTypes = propTypes$1a;
|
|
3727
3734
|
Card.Header = CardHeader;
|
|
3728
3735
|
Card.Body = CardBody;
|
|
3729
3736
|
Card.Footer = CardFooter;
|
|
3730
3737
|
|
|
3738
|
+
var ModalContext = /*#__PURE__*/React.createContext();
|
|
3739
|
+
ModalContext.displayName = 'ModalContext';
|
|
3740
|
+
|
|
3741
|
+
var OffcanvasContext = /*#__PURE__*/React.createContext();
|
|
3742
|
+
OffcanvasContext.displayName = 'OffcanvasContext';
|
|
3743
|
+
|
|
3731
3744
|
var _excluded$18 = ["children", "disabled", "style", "textStyle"];
|
|
3732
3745
|
|
|
3733
|
-
var _templateObject$X, _templateObject2$B, _templateObject3$m;
|
|
3734
|
-
var propTypes$
|
|
3746
|
+
var _templateObject$X, _templateObject2$B, _templateObject3$m, _templateObject4$k, _templateObject5$i;
|
|
3747
|
+
var propTypes$19 = {
|
|
3735
3748
|
children: PropTypes.node,
|
|
3736
3749
|
disabled: PropTypes.bool,
|
|
3737
3750
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -3742,7 +3755,11 @@ var propTypes$18 = {
|
|
|
3742
3755
|
var styles$W = StyleSheet.create({
|
|
3743
3756
|
'.btn-close': css(_templateObject$X || (_templateObject$X = _taggedTemplateLiteral(["\n // Workaround for missing box-sizing in react native.\n $additional-width: $btn-close-padding-x * 2;\n $additional-height: $btn-close-padding-y * 2;\n\n // box-sizing: content-box;\n width: $btn-close-width + $additional-width;\n height: $btn-close-height + $additional-height;\n padding: $btn-close-padding-y $btn-close-padding-x;\n background: transparent;\n border-width: 0; // for button elements\n // @include border-radius();\n opacity: $btn-close-opacity;\n\n &:hover {\n opacity: $btn-close-hover-opacity;\n }\n\n &:focus {\n // outline: 0;\n // box-shadow: $btn-close-focus-shadow;\n opacity: $btn-close-focus-opacity;\n }\n "]))),
|
|
3744
3757
|
'.btn-close-text': css(_templateObject2$B || (_templateObject2$B = _taggedTemplateLiteral(["\n color: $btn-close-color;\n\n // Override <a>'s hover style\n &:hover {\n color: $btn-close-color;\n text-decoration: none;\n }\n "]))),
|
|
3745
|
-
'.btn-close-disabled': css(_templateObject3$m || (_templateObject3$m = _taggedTemplateLiteral(["\n // pointer-events: none;\n // user-select: none;\n opacity: $btn-close-disabled-opacity;\n "])))
|
|
3758
|
+
'.btn-close-disabled': css(_templateObject3$m || (_templateObject3$m = _taggedTemplateLiteral(["\n // pointer-events: none;\n // user-select: none;\n opacity: $btn-close-disabled-opacity;\n "]))),
|
|
3759
|
+
// Modal styles
|
|
3760
|
+
'.modal-header .btn-close': css(_templateObject4$k || (_templateObject4$k = _taggedTemplateLiteral(["\n padding: $modal-header-padding-y * 0.5 $modal-header-padding-x * 0.5;\n margin: -0.5 * $modal-header-padding-y -0.5 * $modal-header-padding-x -0.5 *\n $modal-header-padding-y auto;\n\n // Workaround for missing box-sizing in react native.\n width: $btn-close-width + $modal-header-padding-x;\n height: $btn-close-height + $modal-header-padding-y;\n "]))),
|
|
3761
|
+
// Offcanvas styles
|
|
3762
|
+
'.offcanvas-header .btn-close': css(_templateObject5$i || (_templateObject5$i = _taggedTemplateLiteral(["\n padding: $offcanvas-padding-y * 0.5 $offcanvas-padding-x * 0.5;\n margin-top: -0.5 * $offcanvas-padding-y;\n margin-right: -0.5 * $offcanvas-padding-x;\n margin-bottom: -0.5 * $offcanvas-padding-y;\n\n // Workaround for missing box-sizing in react native.\n width: $btn-close-width + $offcanvas-padding-x;\n height: $btn-close-height + $offcanvas-padding-y;\n "])))
|
|
3746
3763
|
});
|
|
3747
3764
|
var CloseButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
3748
3765
|
props.children;
|
|
@@ -3752,7 +3769,11 @@ var CloseButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3752
3769
|
textStyle = props.textStyle,
|
|
3753
3770
|
elementProps = _objectWithoutProperties(props, _excluded$18);
|
|
3754
3771
|
|
|
3755
|
-
var
|
|
3772
|
+
var modal = useContext(ModalContext);
|
|
3773
|
+
var offcanvas = useContext(OffcanvasContext);
|
|
3774
|
+
var classes = getStyles(styles$W, ['.btn-close', disabled && '.btn-close-disabled', // Modal styles
|
|
3775
|
+
modal && '.modal-header .btn-close', // Offcanvas styles
|
|
3776
|
+
offcanvas && '.offcanvas-header .btn-close']);
|
|
3756
3777
|
var textClasses = getStyles(styles$W, ['.btn-close-text']);
|
|
3757
3778
|
return /*#__PURE__*/React.createElement(Pressable, _extends({}, elementProps, {
|
|
3758
3779
|
ref: ref,
|
|
@@ -3762,7 +3783,7 @@ var CloseButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3762
3783
|
}), StyleSheet.value('btn-close-bg'));
|
|
3763
3784
|
});
|
|
3764
3785
|
CloseButton.displayName = 'CloseButton';
|
|
3765
|
-
CloseButton.propTypes = propTypes$
|
|
3786
|
+
CloseButton.propTypes = propTypes$19;
|
|
3766
3787
|
|
|
3767
3788
|
var CollapseContext = /*#__PURE__*/React.createContext();
|
|
3768
3789
|
CollapseContext.displayName = 'CollapseContext';
|
|
@@ -3821,7 +3842,7 @@ function useCollapse(defaultVisible, controlledVisible, onToggle) {
|
|
|
3821
3842
|
}, [visible]);
|
|
3822
3843
|
}
|
|
3823
3844
|
|
|
3824
|
-
var propTypes$
|
|
3845
|
+
var propTypes$18 = {
|
|
3825
3846
|
children: PropTypes.node.isRequired,
|
|
3826
3847
|
defaultVisible: PropTypes.bool,
|
|
3827
3848
|
visible: PropTypes.bool,
|
|
@@ -3841,7 +3862,7 @@ var CollapseProvider = function CollapseProvider(props) {
|
|
|
3841
3862
|
};
|
|
3842
3863
|
|
|
3843
3864
|
CollapseProvider.displayName = 'CollapseProvider';
|
|
3844
|
-
CollapseProvider.propTypes = propTypes$
|
|
3865
|
+
CollapseProvider.propTypes = propTypes$18;
|
|
3845
3866
|
|
|
3846
3867
|
var _excluded$17 = ["onPress"];
|
|
3847
3868
|
function useToggleCollapse(props) {
|
|
@@ -3863,7 +3884,7 @@ function useToggleCollapse(props) {
|
|
|
3863
3884
|
}
|
|
3864
3885
|
|
|
3865
3886
|
var _excluded$16 = ["children"];
|
|
3866
|
-
var propTypes$
|
|
3887
|
+
var propTypes$17 = {
|
|
3867
3888
|
children: PropTypes.node
|
|
3868
3889
|
};
|
|
3869
3890
|
var Collapse = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -3884,7 +3905,7 @@ var Collapse = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3884
3905
|
}), children);
|
|
3885
3906
|
});
|
|
3886
3907
|
Collapse.displayName = 'Collapse';
|
|
3887
|
-
Collapse.propTypes = propTypes$
|
|
3908
|
+
Collapse.propTypes = propTypes$17;
|
|
3888
3909
|
Collapse.Provider = CollapseProvider;
|
|
3889
3910
|
Collapse.useToggle = useToggleCollapse;
|
|
3890
3911
|
|
|
@@ -3911,8 +3932,8 @@ NavbarContext.displayName = 'NavbarContext';
|
|
|
3911
3932
|
|
|
3912
3933
|
var _excluded$15 = ["fluid", "style"];
|
|
3913
3934
|
|
|
3914
|
-
var _templateObject$W, _templateObject2$A, _templateObject3$l, _templateObject4$
|
|
3915
|
-
var propTypes$
|
|
3935
|
+
var _templateObject$W, _templateObject2$A, _templateObject3$l, _templateObject4$j, _templateObject5$h, _templateObject6$f, _templateObject7$b, _templateObject8$a;
|
|
3936
|
+
var propTypes$16 = {
|
|
3916
3937
|
children: PropTypes.node.isRequired,
|
|
3917
3938
|
fluid: PropTypes.oneOf([true].concat(_toConsumableArray(Object.keys(CONTAINER_MAX_WIDTHS)))),
|
|
3918
3939
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -3940,25 +3961,25 @@ var styles$V = StyleSheet.create(_objectSpread2({
|
|
|
3940
3961
|
}, function (t) {
|
|
3941
3962
|
return t['container-max-widths'].xxl;
|
|
3942
3963
|
}),
|
|
3943
|
-
'.container-lg': css(_templateObject4$
|
|
3964
|
+
'.container-lg': css(_templateObject4$j || (_templateObject4$j = _taggedTemplateLiteral(["\n @include media-breakpoint-up(lg) {\n max-width: ", ";\n }\n @include media-breakpoint-up(xl) {\n max-width: ", ";\n }\n @include media-breakpoint-up(xxl) {\n max-width: ", ";\n }\n "])), function (t) {
|
|
3944
3965
|
return t['container-max-widths'].lg;
|
|
3945
3966
|
}, function (t) {
|
|
3946
3967
|
return t['container-max-widths'].xl;
|
|
3947
3968
|
}, function (t) {
|
|
3948
3969
|
return t['container-max-widths'].xxl;
|
|
3949
3970
|
}),
|
|
3950
|
-
'.container-xl': css(_templateObject5$
|
|
3971
|
+
'.container-xl': css(_templateObject5$h || (_templateObject5$h = _taggedTemplateLiteral(["\n @include media-breakpoint-up(xl) {\n max-width: ", ";\n }\n @include media-breakpoint-up(xxl) {\n max-width: ", ";\n }\n "])), function (t) {
|
|
3951
3972
|
return t['container-max-widths'].xl;
|
|
3952
3973
|
}, function (t) {
|
|
3953
3974
|
return t['container-max-widths'].xxl;
|
|
3954
3975
|
}),
|
|
3955
|
-
'.container-xxl': css(_templateObject6$
|
|
3976
|
+
'.container-xxl': css(_templateObject6$f || (_templateObject6$f = _taggedTemplateLiteral(["\n @include media-breakpoint-up(xxl) {\n max-width: ", ";\n }\n "])), function (t) {
|
|
3956
3977
|
return t['container-max-widths'].xxl;
|
|
3957
3978
|
}),
|
|
3958
3979
|
// Navbar styles
|
|
3959
|
-
'.navbar .container': css(_templateObject7$
|
|
3980
|
+
'.navbar .container': css(_templateObject7$b || (_templateObject7$b = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row; // added for bootstrap-rn\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n "])))
|
|
3960
3981
|
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
3961
|
-
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .container"), css(_templateObject8$
|
|
3982
|
+
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .container"), css(_templateObject8$a || (_templateObject8$a = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n flex-wrap: nowrap;\n }\n "])), next(breakpoint)));
|
|
3962
3983
|
})));
|
|
3963
3984
|
var Container = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
3964
3985
|
var _props$fluid = props.fluid,
|
|
@@ -3976,12 +3997,12 @@ var Container = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3976
3997
|
}));
|
|
3977
3998
|
});
|
|
3978
3999
|
Container.displayName = 'Container';
|
|
3979
|
-
Container.propTypes = propTypes$
|
|
4000
|
+
Container.propTypes = propTypes$16;
|
|
3980
4001
|
|
|
3981
|
-
var _excluded$14 = ["children", "type", "value", "onChange", "onPress", "label", "disabled", "valid", "invalid", "style", "inputStyle", "labelStyle"];
|
|
4002
|
+
var _excluded$14 = ["children", "type", "value", "onChange", "onPress", "label", "disabled", "valid", "invalid", "style", "inputStyle", "labelStyle", "labelTextStyle"];
|
|
3982
4003
|
|
|
3983
|
-
var _templateObject$V, _templateObject2$z, _templateObject3$k, _templateObject4$
|
|
3984
|
-
var propTypes$
|
|
4004
|
+
var _templateObject$V, _templateObject2$z, _templateObject3$k, _templateObject4$i, _templateObject5$g, _templateObject6$e, _templateObject7$a, _templateObject8$9, _templateObject9$7, _templateObject10$7, _templateObject11$5, _templateObject12$4, _templateObject13$4;
|
|
4005
|
+
var propTypes$15 = {
|
|
3985
4006
|
children: PropTypes.node,
|
|
3986
4007
|
type: PropTypes.oneOf(['checkbox', 'radio', 'switch']).isRequired,
|
|
3987
4008
|
value: PropTypes.bool.isRequired,
|
|
@@ -3996,27 +4017,29 @@ var propTypes$14 = {
|
|
|
3996
4017
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3997
4018
|
inputStyle: PropTypes.any,
|
|
3998
4019
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3999
|
-
labelStyle: PropTypes.any
|
|
4020
|
+
labelStyle: PropTypes.any,
|
|
4021
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
4022
|
+
labelTextStyle: PropTypes.any
|
|
4000
4023
|
};
|
|
4001
4024
|
var styles$U = StyleSheet.create(_objectSpread2({
|
|
4002
4025
|
'.form-check': css(_templateObject$V || (_templateObject$V = _taggedTemplateLiteral(["\n // display: block;\n flex-direction: row; // added for bootstrap-rn\n min-height: $form-check-min-height;\n padding-left: $form-check-padding-start;\n margin-bottom: $form-check-margin-bottom;\n "]))),
|
|
4003
4026
|
'.form-check-disabled': css(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteral(["\n opacity: $form-check-label-disabled-opacity;\n "]))),
|
|
4004
4027
|
'.form-check-input': css(_templateObject3$k || (_templateObject3$k = _taggedTemplateLiteral(["\n // Use additional variables instead of brackets, because brackets not supported yet.\n $lineHeight: $line-height-base * 1rem;\n $rawMarginTop: $lineHeight - $form-check-input-width;\n\n // float: left;\n margin-left: $form-check-padding-start * -1;\n margin-right: $form-check-padding-start - $form-check-input-width; // added for bootstrap-rn\n\n width: $form-check-input-width;\n height: $form-check-input-width;\n margin-top: $rawMarginTop * 0.5; // line-height minus check height\n // vertical-align: top;\n background-color: $form-check-input-bg;\n // background-repeat: no-repeat;\n // background-position: center;\n // background-size: contain;\n border: $form-check-input-border;\n @include platform(web) {\n appearance: none;\n user-select: none; // added for bootstrap-rn\n }\n // color-adjust: exact; // Keep themed appearance for print\n // @include transition($form-check-transition);\n\n &:active {\n // filter: $form-check-input-active-filter;\n }\n\n &:focus {\n border-color: $form-check-input-focus-border;\n // outline: 0;\n // box-shadow: $form-check-input-focus-box-shadow;\n }\n "]))),
|
|
4005
|
-
'.form-check-input-checkbox': css(_templateObject4$
|
|
4006
|
-
'.form-check-input-radio': css(_templateObject5$
|
|
4007
|
-
'.form-check-input-checked': css(_templateObject6$
|
|
4008
|
-
'.form-check-label': css(_templateObject7$
|
|
4009
|
-
'.form-switch': css(_templateObject8$
|
|
4010
|
-
'.form-check-input-switch': css(_templateObject9$
|
|
4011
|
-
'.form-check-input-switch-checked': css(_templateObject10$
|
|
4028
|
+
'.form-check-input-checkbox': css(_templateObject4$i || (_templateObject4$i = _taggedTemplateLiteral(["\n border-radius: $form-check-input-border-radius;\n "]))),
|
|
4029
|
+
'.form-check-input-radio': css(_templateObject5$g || (_templateObject5$g = _taggedTemplateLiteral(["\n border-radius: $form-check-radio-border-radius;\n "]))),
|
|
4030
|
+
'.form-check-input-checked': css(_templateObject6$e || (_templateObject6$e = _taggedTemplateLiteral(["\n background-color: $form-check-input-checked-bg-color;\n border-color: $form-check-input-checked-border-color;\n "]))),
|
|
4031
|
+
'.form-check-label': css(_templateObject7$a || (_templateObject7$a = _taggedTemplateLiteral(["\n color: $form-check-label-color;\n @include platform(web) {\n cursor: $form-check-label-cursor;\n }\n "]))),
|
|
4032
|
+
'.form-switch': css(_templateObject8$9 || (_templateObject8$9 = _taggedTemplateLiteral(["\n padding-left: $form-switch-padding-start;\n "]))),
|
|
4033
|
+
'.form-check-input-switch': css(_templateObject9$7 || (_templateObject9$7 = _taggedTemplateLiteral(["\n width: $form-switch-width;\n margin-left: $form-switch-padding-start * -1;\n margin-right: $form-switch-padding-start - $form-switch-width; // added for bootstrap-rn\n border-radius: $form-switch-border-radius;\n // @include transition($form-switch-transition);\n align-items: flex-start; // added for bootstrap-rn\n justify-content: center; // added for bootstrap-rn\n "]))),
|
|
4034
|
+
'.form-check-input-switch-checked': css(_templateObject10$7 || (_templateObject10$7 = _taggedTemplateLiteral(["\n align-items: flex-end; // added for bootstrap-rn\n justify-content: center; // added for bootstrap-rn\n "])))
|
|
4012
4035
|
}, each(FORM_VALIDATION_STATES, function (state, data) {
|
|
4013
4036
|
var _ref;
|
|
4014
4037
|
|
|
4015
|
-
return _ref = {}, _defineProperty(_ref, ".form-check-input.is-".concat(state), css(_templateObject11$
|
|
4038
|
+
return _ref = {}, _defineProperty(_ref, ".form-check-input.is-".concat(state), css(_templateObject11$5 || (_templateObject11$5 = _taggedTemplateLiteral(["\n border: ", ";\n\n &:focus {\n // box-shadow: $focus-box-shadow;\n }\n "])), function (t) {
|
|
4016
4039
|
return data(t).color;
|
|
4017
|
-
})), _defineProperty(_ref, ".form-check-input-checked.is-".concat(state), css(_templateObject12$
|
|
4040
|
+
})), _defineProperty(_ref, ".form-check-input-checked.is-".concat(state), css(_templateObject12$4 || (_templateObject12$4 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (t) {
|
|
4018
4041
|
return data(t).color;
|
|
4019
|
-
})), _defineProperty(_ref, ".form-check-label.is-".concat(state), css(_templateObject13$
|
|
4042
|
+
})), _defineProperty(_ref, ".form-check-label.is-".concat(state), css(_templateObject13$4 || (_templateObject13$4 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (t) {
|
|
4020
4043
|
return data(t).color;
|
|
4021
4044
|
})), _ref;
|
|
4022
4045
|
})));
|
|
@@ -4058,6 +4081,7 @@ var CheckInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4058
4081
|
style = modifierProps.style,
|
|
4059
4082
|
inputStyle = modifierProps.inputStyle,
|
|
4060
4083
|
labelStyle = modifierProps.labelStyle,
|
|
4084
|
+
labelTextStyle = modifierProps.labelTextStyle,
|
|
4061
4085
|
elementProps = _objectWithoutProperties(modifierProps, _excluded$14);
|
|
4062
4086
|
|
|
4063
4087
|
if (!children && !label) {
|
|
@@ -4067,7 +4091,7 @@ var CheckInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4067
4091
|
|
|
4068
4092
|
var classes = getStyles(styles$U, ['.form-check', type === 'switch' && '.form-switch', disabled && '.form-check-disabled']);
|
|
4069
4093
|
var inputClasses = getStyles(styles$U, ['.form-check-input', type === 'checkbox' && '.form-check-input-checkbox', type === 'radio' && '.form-check-input-radio', type === 'switch' && '.form-check-input-switch', value && '.form-check-input-checked', type === 'switch' && value && '.form-check-input-switch-checked', valid && '.form-check-input.is-valid', valid && value && '.form-check-input-checked.is-valid', invalid && '.form-check-input.is-invalid', invalid && value && '.form-check-input-checked.is-invalid']);
|
|
4070
|
-
var
|
|
4094
|
+
var labelTextClasses = getStyles(styles$U, ['.form-check-label', valid && '.form-check-label.is-valid', invalid && '.form-check-label.is-invalid']); // TODO &:focus, &:active
|
|
4071
4095
|
|
|
4072
4096
|
return /*#__PURE__*/React.createElement(Pressable, _extends({}, elementProps, {
|
|
4073
4097
|
ref: modifierRef,
|
|
@@ -4081,12 +4105,13 @@ var CheckInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4081
4105
|
style: [classes, style]
|
|
4082
4106
|
}), /*#__PURE__*/React.createElement(View, {
|
|
4083
4107
|
style: [inputClasses, inputStyle]
|
|
4084
|
-
}, getSvg(type, value)), children && /*#__PURE__*/React.createElement(
|
|
4085
|
-
style:
|
|
4108
|
+
}, getSvg(type, value)), children && /*#__PURE__*/React.createElement(View, {
|
|
4109
|
+
style: labelStyle,
|
|
4110
|
+
textStyle: [labelTextClasses, labelTextStyle]
|
|
4086
4111
|
}, children));
|
|
4087
4112
|
});
|
|
4088
4113
|
CheckInput.displayName = 'CheckInput';
|
|
4089
|
-
CheckInput.propTypes = propTypes$
|
|
4114
|
+
CheckInput.propTypes = propTypes$15;
|
|
4090
4115
|
|
|
4091
4116
|
var Checkbox = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4092
4117
|
var elementProps = _extends({}, props);
|
|
@@ -4100,11 +4125,11 @@ Checkbox.displayName = 'Checkbox';
|
|
|
4100
4125
|
|
|
4101
4126
|
var _excluded$13 = ["children", "size", "sizeSm", "sizeMd", "sizeLg", "sizeXl", "style"];
|
|
4102
4127
|
|
|
4103
|
-
var _templateObject$U, _templateObject2$y, _templateObject3$j, _templateObject4$
|
|
4128
|
+
var _templateObject$U, _templateObject2$y, _templateObject3$j, _templateObject4$h, _templateObject5$f;
|
|
4104
4129
|
var sizes = makeArray(GRID_COLUMNS).map(function (v) {
|
|
4105
4130
|
return v + 1;
|
|
4106
4131
|
});
|
|
4107
|
-
var propTypes$
|
|
4132
|
+
var propTypes$14 = {
|
|
4108
4133
|
children: PropTypes.node.isRequired,
|
|
4109
4134
|
size: PropTypes.oneOf(['auto'].concat(_toConsumableArray(sizes))),
|
|
4110
4135
|
sizeSm: PropTypes.oneOf(['auto'].concat(_toConsumableArray(sizes))),
|
|
@@ -4115,14 +4140,14 @@ var propTypes$13 = {
|
|
|
4115
4140
|
style: PropTypes.any
|
|
4116
4141
|
};
|
|
4117
4142
|
var styles$T = StyleSheet.create(_objectSpread2({
|
|
4118
|
-
'*': css(_templateObject$U || (_templateObject$U = _taggedTemplateLiteral(["\n // Add box sizing if only the grid is loaded\n /* box-sizing: if(\n variable-exists(include-column-box-sizing) and $include-column-box-sizing,\n border-box,\n null\n ); */\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting \"width: 100%;\". This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent \".col-auto\", \".col\" (& responsive variants) from breaking out the grid\n padding-right: $grid-gutter-width * 0.5;\n padding-left: $grid-gutter-width * 0.5;\n margin-top: 0;\n "])))
|
|
4143
|
+
'*': css(_templateObject$U || (_templateObject$U = _taggedTemplateLiteral(["\n // Add box sizing if only the grid is loaded\n /* box-sizing: if(\n variable-exists(include-column-box-sizing) and $include-column-box-sizing,\n border-box,\n null\n ); */\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting \"width: 100%;\". This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n @include platform(web) {\n max-width: 100%; // Prevent \".col-auto\", \".col\" (& responsive variants) from breaking out the grid\n }\n padding-right: $grid-gutter-width * 0.5;\n padding-left: $grid-gutter-width * 0.5;\n margin-top: 0;\n "])))
|
|
4119
4144
|
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
4120
4145
|
var _objectSpread2$1;
|
|
4121
4146
|
|
|
4122
4147
|
return _objectSpread2((_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, ".col".concat(infix(breakpoint)), css(_templateObject2$y || (_templateObject2$y = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n "])), breakpoint)), _defineProperty(_objectSpread2$1, ".col".concat(infix(breakpoint), "-auto"), css(_templateObject3$j || (_templateObject3$j = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n flex: 0 0 auto;\n width: auto;\n }\n "])), breakpoint)), _objectSpread2$1), normalize$1(makeArray(GRID_COLUMNS - 1, function (i) {
|
|
4123
4148
|
var _ref;
|
|
4124
4149
|
|
|
4125
|
-
return _ref = {}, _defineProperty(_ref, ".col".concat(infix(breakpoint), "-").concat(i + 1), css(_templateObject4$
|
|
4150
|
+
return _ref = {}, _defineProperty(_ref, ".col".concat(infix(breakpoint), "-").concat(i + 1), css(_templateObject4$h || (_templateObject4$h = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n flex: 0 0 auto;\n width: ", "%;\n }\n "])), breakpoint, (i + 1) / GRID_COLUMNS * 100)), _defineProperty(_ref, ".offset".concat(infix(breakpoint), "-").concat(i), css(_templateObject5$f || (_templateObject5$f = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n margin-left: ", "%;\n }\n "])), breakpoint, i / GRID_COLUMNS * 100)), _ref;
|
|
4126
4151
|
})));
|
|
4127
4152
|
})));
|
|
4128
4153
|
var Col = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -4142,12 +4167,12 @@ var Col = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4142
4167
|
}), children);
|
|
4143
4168
|
});
|
|
4144
4169
|
Col.displayName = 'Col';
|
|
4145
|
-
Col.propTypes = propTypes$
|
|
4170
|
+
Col.propTypes = propTypes$14;
|
|
4146
4171
|
|
|
4147
4172
|
var _excluded$12 = ["children", "style"];
|
|
4148
4173
|
|
|
4149
4174
|
var _templateObject$T;
|
|
4150
|
-
var propTypes$
|
|
4175
|
+
var propTypes$13 = {
|
|
4151
4176
|
children: PropTypes.node.isRequired,
|
|
4152
4177
|
// eslint-disable-next-line react/forbid-prop-types
|
|
4153
4178
|
style: PropTypes.any
|
|
@@ -4170,11 +4195,44 @@ var Code = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4170
4195
|
}), children);
|
|
4171
4196
|
});
|
|
4172
4197
|
Code.displayName = 'Code';
|
|
4173
|
-
Code.propTypes = propTypes$
|
|
4198
|
+
Code.propTypes = propTypes$13;
|
|
4174
4199
|
|
|
4175
4200
|
var DropdownContext = /*#__PURE__*/React.createContext();
|
|
4176
4201
|
DropdownContext.displayName = 'DropdownContext';
|
|
4177
4202
|
|
|
4203
|
+
var _excluded$11 = ["onPress"];
|
|
4204
|
+
function useToggleDropdown(props) {
|
|
4205
|
+
var context = useForcedContext(DropdownContext);
|
|
4206
|
+
|
|
4207
|
+
var handlePress = props.onPress,
|
|
4208
|
+
restProps = _objectWithoutProperties(props, _excluded$11);
|
|
4209
|
+
|
|
4210
|
+
return _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
4211
|
+
nativeID: context.identifier,
|
|
4212
|
+
ref: context.toggleRef,
|
|
4213
|
+
onPress: function onPress(event) {
|
|
4214
|
+
if (handlePress) handlePress(event);
|
|
4215
|
+
context.setVisible(function (value) {
|
|
4216
|
+
return !value;
|
|
4217
|
+
});
|
|
4218
|
+
},
|
|
4219
|
+
accessibilityHasPopup: true,
|
|
4220
|
+
accessibilityExpanded: context.visible
|
|
4221
|
+
});
|
|
4222
|
+
}
|
|
4223
|
+
|
|
4224
|
+
var propTypes$12 = {
|
|
4225
|
+
children: PropTypes.func.isRequired
|
|
4226
|
+
};
|
|
4227
|
+
|
|
4228
|
+
var DropdownToggle = function DropdownToggle(props) {
|
|
4229
|
+
var children = props.children;
|
|
4230
|
+
return children(useToggleDropdown({}));
|
|
4231
|
+
};
|
|
4232
|
+
|
|
4233
|
+
DropdownToggle.displayName = 'DropdownToggle';
|
|
4234
|
+
DropdownToggle.propTypes = propTypes$12;
|
|
4235
|
+
|
|
4178
4236
|
var propTypes$11 = {
|
|
4179
4237
|
children: PropTypes.func.isRequired,
|
|
4180
4238
|
placement: PropTypes.string.isRequired,
|
|
@@ -4225,37 +4283,64 @@ Overlay.propTypes = propTypes$11;
|
|
|
4225
4283
|
|
|
4226
4284
|
var _templateObject$S;
|
|
4227
4285
|
var propTypes$10 = {
|
|
4286
|
+
toggleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
4228
4287
|
dialogRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
4229
4288
|
onClose: PropTypes.func,
|
|
4289
|
+
autoClose: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['inside', 'outside'])]),
|
|
4230
4290
|
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])])
|
|
4231
4291
|
};
|
|
4232
4292
|
var styles$R = StyleSheet.create({
|
|
4233
4293
|
handler: css(_templateObject$S || (_templateObject$S = _taggedTemplateLiteral(["\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n position: absolute;\n flex-grow: 1;\n "])))
|
|
4234
4294
|
});
|
|
4295
|
+
var initialState = {
|
|
4296
|
+
waitingForMouseUp: false,
|
|
4297
|
+
isDialogClick: false
|
|
4298
|
+
};
|
|
4235
4299
|
|
|
4236
4300
|
var BackdropHandler = function BackdropHandler(props) {
|
|
4237
|
-
var
|
|
4301
|
+
var toggleRef = props.toggleRef,
|
|
4302
|
+
dialogRef = props.dialogRef,
|
|
4238
4303
|
handleClose = props.onClose,
|
|
4239
4304
|
_props$backdrop = props.backdrop,
|
|
4240
|
-
backdrop = _props$backdrop === void 0 ? true : _props$backdrop
|
|
4305
|
+
backdrop = _props$backdrop === void 0 ? true : _props$backdrop,
|
|
4306
|
+
_props$autoClose = props.autoClose,
|
|
4307
|
+
autoClose = _props$autoClose === void 0 ? 'outside' : _props$autoClose;
|
|
4241
4308
|
|
|
4242
4309
|
if (Platform.OS === 'web') {
|
|
4243
|
-
var
|
|
4244
|
-
|
|
4310
|
+
var state = useMemo(function () {
|
|
4311
|
+
return initialState;
|
|
4312
|
+
}, []);
|
|
4245
4313
|
useEffect(function () {
|
|
4314
|
+
var toggle = toggleRef ? findNodeHandle(toggleRef.current) : undefined;
|
|
4246
4315
|
var dialog = findNodeHandle(dialogRef.current);
|
|
4247
4316
|
|
|
4248
4317
|
var handleDialogMouseDown = function handleDialogMouseDown() {
|
|
4249
|
-
waitingForMouseUp
|
|
4318
|
+
state.waitingForMouseUp = true;
|
|
4250
4319
|
};
|
|
4251
4320
|
|
|
4252
|
-
var handleDocumentClick = function handleDocumentClick() {
|
|
4253
|
-
|
|
4321
|
+
var handleDocumentClick = function handleDocumentClick(_ref) {
|
|
4322
|
+
var target = _ref.target;
|
|
4323
|
+
|
|
4324
|
+
if (backdrop === 'static' || autoClose === false) {
|
|
4254
4325
|
return;
|
|
4255
|
-
}
|
|
4326
|
+
} // Click outside -> return if autoClose is inside.
|
|
4256
4327
|
|
|
4257
|
-
|
|
4258
|
-
|
|
4328
|
+
|
|
4329
|
+
if (!state.isDialogClick && autoClose === 'inside') {
|
|
4330
|
+
return;
|
|
4331
|
+
} // Click inside / on dialog -> return if autoClose is outside.
|
|
4332
|
+
|
|
4333
|
+
|
|
4334
|
+
if (state.isDialogClick) {
|
|
4335
|
+
state.isDialogClick = false;
|
|
4336
|
+
|
|
4337
|
+
if (autoClose === 'outside') {
|
|
4338
|
+
return;
|
|
4339
|
+
}
|
|
4340
|
+
} // Click on toggle -> return always.
|
|
4341
|
+
|
|
4342
|
+
|
|
4343
|
+
if (toggle && (target === toggle || toggle.contains(target))) {
|
|
4259
4344
|
return;
|
|
4260
4345
|
}
|
|
4261
4346
|
|
|
@@ -4263,22 +4348,23 @@ var BackdropHandler = function BackdropHandler(props) {
|
|
|
4263
4348
|
};
|
|
4264
4349
|
|
|
4265
4350
|
var handleDocumentMouseUp = function handleDocumentMouseUp() {
|
|
4266
|
-
if (waitingForMouseUp
|
|
4267
|
-
|
|
4351
|
+
if (state.waitingForMouseUp) {
|
|
4352
|
+
state.isDialogClick = true;
|
|
4268
4353
|
}
|
|
4269
4354
|
|
|
4270
|
-
waitingForMouseUp
|
|
4355
|
+
state.waitingForMouseUp = false;
|
|
4271
4356
|
};
|
|
4272
4357
|
|
|
4273
|
-
dialog.addEventListener('mousedown', handleDialogMouseDown);
|
|
4274
|
-
|
|
4275
|
-
document.addEventListener('
|
|
4358
|
+
dialog.addEventListener('mousedown', handleDialogMouseDown); // See https://github.com/necolas/react-native-web/issues/2115
|
|
4359
|
+
|
|
4360
|
+
document.addEventListener('click', handleDocumentClick, true);
|
|
4361
|
+
document.addEventListener('mouseup', handleDocumentMouseUp, true);
|
|
4276
4362
|
return function () {
|
|
4277
4363
|
dialog.addEventListener('mousedown', handleDialogMouseDown);
|
|
4278
|
-
document.removeEventListener('click', handleDocumentClick);
|
|
4279
|
-
document.removeEventListener('mouseup', handleDocumentMouseUp);
|
|
4364
|
+
document.removeEventListener('click', handleDocumentClick, true);
|
|
4365
|
+
document.removeEventListener('mouseup', handleDocumentMouseUp, true);
|
|
4280
4366
|
};
|
|
4281
|
-
}, [backdrop]);
|
|
4367
|
+
}, [backdrop, autoClose]);
|
|
4282
4368
|
return null;
|
|
4283
4369
|
}
|
|
4284
4370
|
|
|
@@ -4299,9 +4385,9 @@ var BackdropHandler = function BackdropHandler(props) {
|
|
|
4299
4385
|
BackdropHandler.displayName = 'BackdropHandler';
|
|
4300
4386
|
BackdropHandler.propTypes = propTypes$10;
|
|
4301
4387
|
|
|
4302
|
-
var _excluded$
|
|
4388
|
+
var _excluded$10 = ["children", "start", "end", "style", "textStyle"];
|
|
4303
4389
|
|
|
4304
|
-
var _templateObject$R, _templateObject2$x, _templateObject3$i;
|
|
4390
|
+
var _templateObject$R, _templateObject2$x, _templateObject3$i, _templateObject4$g, _templateObject5$e, _templateObject6$d, _templateObject7$9, _templateObject8$8, _templateObject9$6, _templateObject10$6;
|
|
4305
4391
|
var ALIGNMENT_BREAKPOINTS = [true, 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
4306
4392
|
var propTypes$$ = {
|
|
4307
4393
|
children: PropTypes.node.isRequired,
|
|
@@ -4312,11 +4398,23 @@ var propTypes$$ = {
|
|
|
4312
4398
|
// eslint-disable-next-line react/forbid-prop-types
|
|
4313
4399
|
textStyle: PropTypes.any
|
|
4314
4400
|
};
|
|
4315
|
-
var styles$Q = StyleSheet.create({
|
|
4401
|
+
var styles$Q = StyleSheet.create(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
4316
4402
|
'.dropdown-menu': css(_templateObject$R || (_templateObject$R = _taggedTemplateLiteral(["\n position: absolute;\n z-index: $zindex-dropdown;\n // display: none; // none by default, but block on \"open\" of the menu\n min-width: $dropdown-min-width;\n padding: $dropdown-padding-y $dropdown-padding-x;\n margin: 0; // Override default margin of ul\n // list-style: none;\n background-color: $dropdown-bg;\n // background-clip: padding-box;\n border: $dropdown-border-width solid $dropdown-border-color;\n border-radius: $dropdown-border-radius;\n // @include box-shadow($dropdown-box-shadow);\n "]))),
|
|
4317
|
-
'.dropdown-menu-
|
|
4318
|
-
|
|
4319
|
-
|
|
4403
|
+
'.dropdown-menu[data-bs-popper]': css(_templateObject2$x || (_templateObject2$x = _taggedTemplateLiteral(["\n top: 100%;\n left: 0;\n margin-top: $dropdown-spacer;\n "])))
|
|
4404
|
+
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
4405
|
+
var _ref;
|
|
4406
|
+
|
|
4407
|
+
return _ref = {}, _defineProperty(_ref, ".dropdown-menu".concat(infix(breakpoint), "-start[data-bs-popper]"), css(_templateObject3$i || (_templateObject3$i = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n right: auto;\n left: 0;\n }\n "])), breakpoint)), _defineProperty(_ref, ".dropdown-menu".concat(infix(breakpoint), "-end[data-bs-popper]"), css(_templateObject4$g || (_templateObject4$g = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n right: 0;\n left: auto;\n }\n "])), breakpoint)), _ref;
|
|
4408
|
+
})), {}, {
|
|
4409
|
+
'.dropup .dropdown-menu[data-bs-popper]': css(_templateObject5$e || (_templateObject5$e = _taggedTemplateLiteral(["\n top: auto;\n bottom: 100%;\n margin-top: 0;\n margin-bottom: $dropdown-spacer;\n "]))),
|
|
4410
|
+
'.dropend .dropdown-menu[data-bs-popper]': css(_templateObject6$d || (_templateObject6$d = _taggedTemplateLiteral(["\n top: 0;\n right: auto;\n left: 100%;\n margin-top: 0;\n margin-left: $dropdown-spacer;\n "]))),
|
|
4411
|
+
'.dropstart .dropdown-menu[data-bs-popper]': css(_templateObject7$9 || (_templateObject7$9 = _taggedTemplateLiteral(["\n top: 0;\n right: 100%;\n left: auto;\n margin-top: 0;\n margin-right: $dropdown-spacer;\n "]))),
|
|
4412
|
+
'.navbar-nav .dropdown-menu': css(_templateObject8$8 || (_templateObject8$8 = _taggedTemplateLiteral(["\n position: relative; // static;\n "])))
|
|
4413
|
+
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
4414
|
+
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .navbar-nav .dropdown-menu"), css(_templateObject9$6 || (_templateObject9$6 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n position: absolute;\n }\n "])), next(breakpoint)));
|
|
4415
|
+
})), {}, {
|
|
4416
|
+
'.dropdown-menu-text': css(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteral(["\n font-size: $dropdown-font-size;\n color: $dropdown-color;\n text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n "])))
|
|
4417
|
+
}));
|
|
4320
4418
|
|
|
4321
4419
|
var getAlignment = function getAlignment(media, start, end) {
|
|
4322
4420
|
var alignStart = typeof start === 'boolean' ? start : media.up(start);
|
|
@@ -4351,39 +4449,68 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4351
4449
|
end = _props$end === void 0 ? false : _props$end,
|
|
4352
4450
|
style = props.style,
|
|
4353
4451
|
textStyle = props.textStyle,
|
|
4354
|
-
elementProps = _objectWithoutProperties(props, _excluded$
|
|
4452
|
+
elementProps = _objectWithoutProperties(props, _excluded$10);
|
|
4355
4453
|
|
|
4356
|
-
var
|
|
4454
|
+
var navbar = useContext(NavbarContext);
|
|
4357
4455
|
var media = useMedia();
|
|
4456
|
+
var dialogRef = useRef();
|
|
4457
|
+
var dropdown = useForcedContext(DropdownContext);
|
|
4358
4458
|
var identifier = dropdown.identifier,
|
|
4359
|
-
|
|
4360
|
-
triggerRef = dropdown.triggerRef,
|
|
4459
|
+
toggleRef = dropdown.toggleRef,
|
|
4361
4460
|
visible = dropdown.visible,
|
|
4362
|
-
setVisible = dropdown.setVisible
|
|
4461
|
+
setVisible = dropdown.setVisible,
|
|
4462
|
+
direction = dropdown.direction,
|
|
4463
|
+
display = dropdown.display,
|
|
4464
|
+
autoClose = dropdown.autoClose;
|
|
4363
4465
|
|
|
4364
4466
|
if (!visible) {
|
|
4365
4467
|
return null;
|
|
4366
4468
|
}
|
|
4367
4469
|
|
|
4368
|
-
var
|
|
4470
|
+
var isStatic = Platform.OS === 'web' && display === 'static';
|
|
4471
|
+
var isCollapsedNavbar = navbar && !(navbar.expand && (navbar.expand === true || media.up(navbar.expand)));
|
|
4472
|
+
var hasStaticStyle = isStatic && !isCollapsedNavbar;
|
|
4473
|
+
var classes = getStyles(styles$Q, ['.dropdown-menu', // Non-Popper styles
|
|
4474
|
+
hasStaticStyle && '.dropdown-menu[data-bs-popper]', hasStaticStyle && start && ".dropdown-menu".concat(start === true ? '' : "-".concat(start), "-start[data-bs-popper]"), hasStaticStyle && end && ".dropdown-menu".concat(end === true ? '' : "-".concat(end), "-end[data-bs-popper]"), hasStaticStyle && direction === 'up' && '.dropup .dropdown-menu[data-bs-popper]', hasStaticStyle && direction === 'end' && '.dropend .dropdown-menu[data-bs-popper]', hasStaticStyle && direction === 'start' && '.dropstart .dropdown-menu[data-bs-popper]', // Navbar styles
|
|
4475
|
+
navbar && '.navbar-nav .dropdown-menu', navbar && navbar.expand && ".navbar-expand".concat(navbar.expand === true ? '' : "-".concat(navbar.expand), " .navbar-nav .dropdown-menu")]);
|
|
4369
4476
|
var textClasses = getStyles(styles$Q, ['.dropdown-menu-text']);
|
|
4477
|
+
|
|
4478
|
+
if (isStatic || isCollapsedNavbar) {
|
|
4479
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !isCollapsedNavbar && /*#__PURE__*/React.createElement(BackdropHandler, {
|
|
4480
|
+
toggleRef: toggleRef,
|
|
4481
|
+
dialogRef: dialogRef,
|
|
4482
|
+
onClose: function onClose() {
|
|
4483
|
+
setVisible(false);
|
|
4484
|
+
},
|
|
4485
|
+
autoClose: autoClose
|
|
4486
|
+
}), /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
4487
|
+
ref: concatRefs(dialogRef, ref),
|
|
4488
|
+
accessibilityLabelledBy: identifier,
|
|
4489
|
+
style: [classes, style],
|
|
4490
|
+
textStyle: [textClasses, textStyle]
|
|
4491
|
+
}), children));
|
|
4492
|
+
}
|
|
4493
|
+
|
|
4370
4494
|
return /*#__PURE__*/React.createElement(OverlayContainer, null, /*#__PURE__*/React.createElement(Overlay, {
|
|
4371
4495
|
placement: transformPlacement(media, direction, start, end),
|
|
4372
|
-
targetRef:
|
|
4496
|
+
targetRef: toggleRef,
|
|
4373
4497
|
offset: convertToNumber(StyleSheet.value('dropdown-spacer')),
|
|
4374
4498
|
visible: visible
|
|
4375
4499
|
}, function (overlay, overlayRef) {
|
|
4376
4500
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BackdropHandler, {
|
|
4501
|
+
toggleRef: toggleRef,
|
|
4377
4502
|
dialogRef: overlayRef,
|
|
4378
4503
|
onClose: function onClose() {
|
|
4379
4504
|
setVisible(false);
|
|
4380
|
-
}
|
|
4505
|
+
},
|
|
4506
|
+
autoClose: autoClose
|
|
4381
4507
|
}), /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
4382
4508
|
ref: concatRefs(overlayRef, ref),
|
|
4383
4509
|
accessibilityLabelledBy: identifier,
|
|
4384
|
-
style: [classes, {
|
|
4510
|
+
style: [classes, overlay.overlayProps.style, {
|
|
4511
|
+
maxHeight: 'auto',
|
|
4385
4512
|
opacity: overlay.rendered ? 1 : 0
|
|
4386
|
-
},
|
|
4513
|
+
}, style],
|
|
4387
4514
|
textStyle: [textClasses, textStyle]
|
|
4388
4515
|
}), /*#__PURE__*/React.createElement(DropdownContext.Provider, {
|
|
4389
4516
|
value: dropdown
|
|
@@ -4393,10 +4520,69 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4393
4520
|
DropdownMenu.displayName = 'DropdownMenu';
|
|
4394
4521
|
DropdownMenu.propTypes = propTypes$$;
|
|
4395
4522
|
|
|
4396
|
-
var _excluded
|
|
4523
|
+
var _excluded$$ = ["children", "size", "style"];
|
|
4397
4524
|
|
|
4398
|
-
var _templateObject$Q, _templateObject2$w
|
|
4525
|
+
var _templateObject$Q, _templateObject2$w;
|
|
4399
4526
|
var propTypes$_ = {
|
|
4527
|
+
children: PropTypes.node.isRequired,
|
|
4528
|
+
size: PropTypes.oneOf(Object.keys(FONT_SIZES).map(function (k) {
|
|
4529
|
+
return Number(k);
|
|
4530
|
+
})).isRequired,
|
|
4531
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
4532
|
+
style: PropTypes.any
|
|
4533
|
+
};
|
|
4534
|
+
var styles$P = StyleSheet.create(_objectSpread2({
|
|
4535
|
+
heading: css(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteral(["\n margin-top: 0; // 1\n margin-bottom: $headings-margin-bottom;\n font-family: $headings-font-family;\n font-style: $headings-font-style;\n font-weight: $headings-font-weight;\n color: $headings-color;\n "])))
|
|
4536
|
+
}, each(FONT_SIZES, function (size, value) {
|
|
4537
|
+
return _defineProperty({}, ".h".concat(size), css(_templateObject2$w || (_templateObject2$w = _taggedTemplateLiteral(["\n font-size: ", ";\n line-height: ", " * $headings-line-height;\n "])), value, value));
|
|
4538
|
+
})));
|
|
4539
|
+
var Heading$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4540
|
+
var children = props.children,
|
|
4541
|
+
size = props.size,
|
|
4542
|
+
style = props.style,
|
|
4543
|
+
elementProps = _objectWithoutProperties(props, _excluded$$);
|
|
4544
|
+
|
|
4545
|
+
var classes = getStyles(styles$P, ['heading', ".h".concat(size)]);
|
|
4546
|
+
return /*#__PURE__*/React.createElement(Text, _extends({}, elementProps, {
|
|
4547
|
+
ref: ref,
|
|
4548
|
+
accessibilityRole: "header",
|
|
4549
|
+
accessibilityLevel: size,
|
|
4550
|
+
style: [classes, style]
|
|
4551
|
+
}), children);
|
|
4552
|
+
});
|
|
4553
|
+
Heading$1.displayName = 'Heading';
|
|
4554
|
+
Heading$1.propTypes = propTypes$_;
|
|
4555
|
+
|
|
4556
|
+
var _excluded$_ = ["children", "style"];
|
|
4557
|
+
|
|
4558
|
+
var _templateObject$P;
|
|
4559
|
+
var propTypes$Z = {
|
|
4560
|
+
children: PropTypes.node.isRequired,
|
|
4561
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
4562
|
+
style: PropTypes.any
|
|
4563
|
+
};
|
|
4564
|
+
var styles$O = StyleSheet.create({
|
|
4565
|
+
'.dropdown-header': css(_templateObject$P || (_templateObject$P = _taggedTemplateLiteral(["\n // display: block;\n padding: $dropdown-header-padding;\n margin-bottom: 0; // for use with heading elements\n font-size: $font-size-sm;\n color: $dropdown-header-color;\n // white-space: nowrap; // as with > li > a\n "])))
|
|
4566
|
+
});
|
|
4567
|
+
var DropdownHeader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4568
|
+
var children = props.children,
|
|
4569
|
+
style = props.style,
|
|
4570
|
+
elementProps = _objectWithoutProperties(props, _excluded$_);
|
|
4571
|
+
|
|
4572
|
+
var classes = getStyles(styles$O, ['.dropdown-header']);
|
|
4573
|
+
return /*#__PURE__*/React.createElement(Heading$1, _extends({}, elementProps, {
|
|
4574
|
+
ref: ref,
|
|
4575
|
+
size: 6,
|
|
4576
|
+
style: [classes, style]
|
|
4577
|
+
}), children);
|
|
4578
|
+
});
|
|
4579
|
+
DropdownHeader.displayName = 'DropdownHeader';
|
|
4580
|
+
DropdownHeader.propTypes = propTypes$Z;
|
|
4581
|
+
|
|
4582
|
+
var _excluded$Z = ["children", "onPress", "active", "disabled", "style", "textStyle"];
|
|
4583
|
+
|
|
4584
|
+
var _templateObject$O, _templateObject2$v, _templateObject3$h, _templateObject4$f, _templateObject5$d, _templateObject6$c;
|
|
4585
|
+
var propTypes$Y = {
|
|
4400
4586
|
children: PropTypes.node.isRequired,
|
|
4401
4587
|
onPress: PropTypes.func,
|
|
4402
4588
|
active: PropTypes.bool,
|
|
@@ -4406,9 +4592,9 @@ var propTypes$_ = {
|
|
|
4406
4592
|
// eslint-disable-next-line react/forbid-prop-types
|
|
4407
4593
|
textStyle: PropTypes.any
|
|
4408
4594
|
};
|
|
4409
|
-
var styles$
|
|
4410
|
-
'.dropdown-item': css(_templateObject$
|
|
4411
|
-
'.dropdown-item-text': css(_templateObject2$
|
|
4595
|
+
var styles$N = StyleSheet.create({
|
|
4596
|
+
'.dropdown-item': css(_templateObject$O || (_templateObject$O = _taggedTemplateLiteral(["\n width: 100%;\n padding: $dropdown-item-padding-y $dropdown-item-padding-x;\n // clear: both;\n background-color: transparent;\n border: 0;\n\n &:hover {\n // @include gradient-bg($dropdown-link-hover-bg);\n background-color: $dropdown-link-hover-bg;\n }\n &:focus {\n // @include gradient-bg($dropdown-link-hover-bg);\n background-color: $dropdown-link-hover-bg;\n }\n "]))),
|
|
4597
|
+
'.dropdown-item-text': css(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteral(["\n font-weight: $font-weight-normal;\n color: $dropdown-link-color;\n // text-align: inherit;\n text-decoration: none; // if($link-decoration == none, null, none);\n // white-space: nowrap;\n\n &:hover {\n color: $dropdown-link-hover-color;\n text-decoration: none; // if($link-hover-decoration == underline, none, null);\n }\n &:focus {\n color: $dropdown-link-hover-color;\n text-decoration: none; // if($link-hover-decoration == underline, none, null);\n }\n "]))),
|
|
4412
4598
|
'.dropdown-item-active': css(_templateObject3$h || (_templateObject3$h = _taggedTemplateLiteral(["\n // @include gradient-bg($dropdown-link-active-bg);\n background-color: $dropdown-link-active-bg;\n\n &:hover {\n background-color: $dropdown-link-active-bg;\n }\n &:focus {\n background-color: $dropdown-link-active-bg;\n }\n "]))),
|
|
4413
4599
|
'.dropdown-item-active-text': css(_templateObject4$f || (_templateObject4$f = _taggedTemplateLiteral(["\n color: $dropdown-link-active-color;\n text-decoration: none;\n\n &:hover {\n color: $dropdown-link-active-color;\n }\n &:focus {\n color: $dropdown-link-active-color;\n }\n "]))),
|
|
4414
4600
|
'.dropdown-item-disabled': css(_templateObject5$d || (_templateObject5$d = _taggedTemplateLiteral(["\n // pointer-events: none;\n background-color: transparent;\n // Remove CSS gradients if they're enabled\n // background-image: if($enable-gradients, none, null);\n\n &:hover {\n background-color: transparent;\n }\n &:focus {\n background-color: transparent;\n }\n "]))),
|
|
@@ -4424,11 +4610,11 @@ var DropdownItem = function DropdownItem(props) {
|
|
|
4424
4610
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
4425
4611
|
style = props.style,
|
|
4426
4612
|
textStyle = props.textStyle,
|
|
4427
|
-
elementProps = _objectWithoutProperties(props, _excluded$
|
|
4613
|
+
elementProps = _objectWithoutProperties(props, _excluded$Z);
|
|
4428
4614
|
|
|
4429
4615
|
var dropdown = useForcedContext(DropdownContext);
|
|
4430
|
-
var classes = getStyles(styles$
|
|
4431
|
-
var textClasses = getStyles(styles$
|
|
4616
|
+
var classes = getStyles(styles$N, ['.dropdown-item', active && '.dropdown-item-active', disabled && '.dropdown-item-disabled']);
|
|
4617
|
+
var textClasses = getStyles(styles$N, ['.dropdown-item-text', active && '.dropdown-item-active-text', disabled && '.dropdown-item-disabled-text']);
|
|
4432
4618
|
return /*#__PURE__*/React.createElement(Pressable, _extends({}, elementProps, {
|
|
4433
4619
|
onPress: concatFns(function () {
|
|
4434
4620
|
dropdown.setVisible(false);
|
|
@@ -4440,67 +4626,9 @@ var DropdownItem = function DropdownItem(props) {
|
|
|
4440
4626
|
};
|
|
4441
4627
|
|
|
4442
4628
|
DropdownItem.displayName = 'DropdownItem';
|
|
4443
|
-
DropdownItem.propTypes = propTypes$
|
|
4444
|
-
|
|
4445
|
-
var _excluded$$ = ["children", "style"];
|
|
4446
|
-
|
|
4447
|
-
var _templateObject$P;
|
|
4448
|
-
var propTypes$Z = {
|
|
4449
|
-
children: PropTypes.node.isRequired,
|
|
4450
|
-
// eslint-disable-next-line react/forbid-prop-types
|
|
4451
|
-
style: PropTypes.any
|
|
4452
|
-
};
|
|
4453
|
-
var styles$O = StyleSheet.create({
|
|
4454
|
-
'.dropdown-item-text': css(_templateObject$P || (_templateObject$P = _taggedTemplateLiteral(["\n // display: block;\n padding: $dropdown-item-padding-y $dropdown-item-padding-x;\n color: $dropdown-link-color;\n "])))
|
|
4455
|
-
});
|
|
4456
|
-
var DropdownTextItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4457
|
-
var children = props.children,
|
|
4458
|
-
style = props.style,
|
|
4459
|
-
elementProps = _objectWithoutProperties(props, _excluded$$);
|
|
4460
|
-
|
|
4461
|
-
var classes = getStyles(styles$O, ['.dropdown-item-text']);
|
|
4462
|
-
return /*#__PURE__*/React.createElement(Text, _extends({}, elementProps, {
|
|
4463
|
-
ref: ref,
|
|
4464
|
-
style: [classes, style]
|
|
4465
|
-
}), children);
|
|
4466
|
-
});
|
|
4467
|
-
DropdownTextItem.displayName = 'DropdownTextItem';
|
|
4468
|
-
DropdownTextItem.propTypes = propTypes$Z;
|
|
4629
|
+
DropdownItem.propTypes = propTypes$Y;
|
|
4469
4630
|
|
|
4470
|
-
var _excluded$
|
|
4471
|
-
|
|
4472
|
-
var _templateObject$O, _templateObject2$v;
|
|
4473
|
-
var propTypes$Y = {
|
|
4474
|
-
children: PropTypes.node.isRequired,
|
|
4475
|
-
size: PropTypes.oneOf(Object.keys(FONT_SIZES).map(function (k) {
|
|
4476
|
-
return Number(k);
|
|
4477
|
-
})).isRequired,
|
|
4478
|
-
// eslint-disable-next-line react/forbid-prop-types
|
|
4479
|
-
style: PropTypes.any
|
|
4480
|
-
};
|
|
4481
|
-
var styles$N = StyleSheet.create(_objectSpread2({
|
|
4482
|
-
heading: css(_templateObject$O || (_templateObject$O = _taggedTemplateLiteral(["\n margin-top: 0; // 1\n margin-bottom: $headings-margin-bottom;\n font-family: $headings-font-family;\n font-style: $headings-font-style;\n font-weight: $headings-font-weight;\n color: $headings-color;\n "])))
|
|
4483
|
-
}, each(FONT_SIZES, function (size, value) {
|
|
4484
|
-
return _defineProperty({}, ".h".concat(size), css(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteral(["\n font-size: ", ";\n line-height: ", " * $headings-line-height;\n "])), value, value));
|
|
4485
|
-
})));
|
|
4486
|
-
var Heading$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4487
|
-
var children = props.children,
|
|
4488
|
-
size = props.size,
|
|
4489
|
-
style = props.style,
|
|
4490
|
-
elementProps = _objectWithoutProperties(props, _excluded$_);
|
|
4491
|
-
|
|
4492
|
-
var classes = getStyles(styles$N, ['heading', ".h".concat(size)]);
|
|
4493
|
-
return /*#__PURE__*/React.createElement(Text, _extends({}, elementProps, {
|
|
4494
|
-
ref: ref,
|
|
4495
|
-
accessibilityRole: "header",
|
|
4496
|
-
accessibilityLevel: size,
|
|
4497
|
-
style: [classes, style]
|
|
4498
|
-
}), children);
|
|
4499
|
-
});
|
|
4500
|
-
Heading$1.displayName = 'Heading';
|
|
4501
|
-
Heading$1.propTypes = propTypes$Y;
|
|
4502
|
-
|
|
4503
|
-
var _excluded$Z = ["children", "style"];
|
|
4631
|
+
var _excluded$Y = ["children", "style"];
|
|
4504
4632
|
|
|
4505
4633
|
var _templateObject$N;
|
|
4506
4634
|
var propTypes$X = {
|
|
@@ -4509,24 +4637,23 @@ var propTypes$X = {
|
|
|
4509
4637
|
style: PropTypes.any
|
|
4510
4638
|
};
|
|
4511
4639
|
var styles$M = StyleSheet.create({
|
|
4512
|
-
'.dropdown-
|
|
4640
|
+
'.dropdown-item-text': css(_templateObject$N || (_templateObject$N = _taggedTemplateLiteral(["\n // display: block;\n padding: $dropdown-item-padding-y $dropdown-item-padding-x;\n color: $dropdown-link-color;\n "])))
|
|
4513
4641
|
});
|
|
4514
|
-
var
|
|
4642
|
+
var DropdownItemText = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4515
4643
|
var children = props.children,
|
|
4516
4644
|
style = props.style,
|
|
4517
|
-
elementProps = _objectWithoutProperties(props, _excluded$
|
|
4645
|
+
elementProps = _objectWithoutProperties(props, _excluded$Y);
|
|
4518
4646
|
|
|
4519
|
-
var classes = getStyles(styles$M, ['.dropdown-
|
|
4520
|
-
return /*#__PURE__*/React.createElement(
|
|
4647
|
+
var classes = getStyles(styles$M, ['.dropdown-item-text']);
|
|
4648
|
+
return /*#__PURE__*/React.createElement(Text, _extends({}, elementProps, {
|
|
4521
4649
|
ref: ref,
|
|
4522
|
-
size: 6,
|
|
4523
4650
|
style: [classes, style]
|
|
4524
4651
|
}), children);
|
|
4525
4652
|
});
|
|
4526
|
-
|
|
4527
|
-
|
|
4653
|
+
DropdownItemText.displayName = 'DropdownItemText';
|
|
4654
|
+
DropdownItemText.propTypes = propTypes$X;
|
|
4528
4655
|
|
|
4529
|
-
var _excluded$
|
|
4656
|
+
var _excluded$X = ["style"];
|
|
4530
4657
|
|
|
4531
4658
|
var _templateObject$M;
|
|
4532
4659
|
var propTypes$W = {
|
|
@@ -4538,7 +4665,7 @@ var styles$L = StyleSheet.create({
|
|
|
4538
4665
|
});
|
|
4539
4666
|
var DropdownDivider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4540
4667
|
var style = props.style,
|
|
4541
|
-
elementProps = _objectWithoutProperties(props, _excluded$
|
|
4668
|
+
elementProps = _objectWithoutProperties(props, _excluded$X);
|
|
4542
4669
|
|
|
4543
4670
|
var classes = getStyles(styles$L, ['.dropdown-divider']);
|
|
4544
4671
|
return /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
@@ -4549,9 +4676,9 @@ var DropdownDivider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4549
4676
|
DropdownDivider.displayName = 'DropdownDivider';
|
|
4550
4677
|
DropdownDivider.propTypes = propTypes$W;
|
|
4551
4678
|
|
|
4552
|
-
function useDropdown(defaultVisible, controlledVisible, onToggle, direction) {
|
|
4679
|
+
function useDropdown(defaultVisible, controlledVisible, onToggle, direction, display, autoClose) {
|
|
4553
4680
|
var identifier = useIdentifier('dropdown');
|
|
4554
|
-
var
|
|
4681
|
+
var toggleRef = useRef();
|
|
4555
4682
|
|
|
4556
4683
|
var _useControlledState = useControlledState(defaultVisible, controlledVisible, onToggle),
|
|
4557
4684
|
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
@@ -4563,49 +4690,30 @@ function useDropdown(defaultVisible, controlledVisible, onToggle, direction) {
|
|
|
4563
4690
|
identifier: identifier,
|
|
4564
4691
|
visible: visible,
|
|
4565
4692
|
setVisible: setVisible,
|
|
4566
|
-
|
|
4567
|
-
direction: direction
|
|
4693
|
+
toggleRef: toggleRef,
|
|
4694
|
+
direction: direction,
|
|
4695
|
+
display: display,
|
|
4696
|
+
autoClose: autoClose
|
|
4568
4697
|
};
|
|
4569
4698
|
}, [visible]);
|
|
4570
4699
|
}
|
|
4571
4700
|
|
|
4572
|
-
var _excluded$X = ["onPress"];
|
|
4573
|
-
function useDismissDropdown(props) {
|
|
4574
|
-
var context = useForcedContext(DropdownContext);
|
|
4575
|
-
|
|
4576
|
-
var handlePress = props.onPress,
|
|
4577
|
-
restProps = _objectWithoutProperties(props, _excluded$X);
|
|
4578
|
-
|
|
4579
|
-
return _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
4580
|
-
onPress: function onPress(event) {
|
|
4581
|
-
if (handlePress) handlePress(event);
|
|
4582
|
-
context.setExpanded(false);
|
|
4583
|
-
}
|
|
4584
|
-
});
|
|
4585
|
-
}
|
|
4586
|
-
|
|
4587
4701
|
var _excluded$W = ["onPress"];
|
|
4588
|
-
function
|
|
4702
|
+
function useDismissDropdown(props) {
|
|
4589
4703
|
var context = useForcedContext(DropdownContext);
|
|
4590
4704
|
|
|
4591
4705
|
var handlePress = props.onPress,
|
|
4592
4706
|
restProps = _objectWithoutProperties(props, _excluded$W);
|
|
4593
4707
|
|
|
4594
4708
|
return _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
4595
|
-
nativeID: context.identifier,
|
|
4596
|
-
ref: context.triggerRef,
|
|
4597
4709
|
onPress: function onPress(event) {
|
|
4598
4710
|
if (handlePress) handlePress(event);
|
|
4599
|
-
context.setVisible(
|
|
4600
|
-
|
|
4601
|
-
});
|
|
4602
|
-
},
|
|
4603
|
-
accessibilityHasPopup: true,
|
|
4604
|
-
accessibilityExpanded: context.visible
|
|
4711
|
+
context.setVisible(false);
|
|
4712
|
+
}
|
|
4605
4713
|
});
|
|
4606
4714
|
}
|
|
4607
4715
|
|
|
4608
|
-
var _excluded$V = ["children", "defaultVisible", "visible", "onToggle", "direction", "style"];
|
|
4716
|
+
var _excluded$V = ["children", "defaultVisible", "visible", "onToggle", "direction", "display", "autoClose", "style"];
|
|
4609
4717
|
|
|
4610
4718
|
var _templateObject$L;
|
|
4611
4719
|
var DIRECTIONS = ['top', 'bottom', 'start', 'end'];
|
|
@@ -4615,6 +4723,8 @@ var propTypes$V = {
|
|
|
4615
4723
|
visible: PropTypes.bool,
|
|
4616
4724
|
onToggle: PropTypes.func,
|
|
4617
4725
|
direction: PropTypes.oneOf(DIRECTIONS),
|
|
4726
|
+
display: PropTypes.oneOf(['dynamic', 'static']),
|
|
4727
|
+
autoClose: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['inside', 'outside'])]),
|
|
4618
4728
|
// eslint-disable-next-line react/forbid-prop-types
|
|
4619
4729
|
style: PropTypes.any
|
|
4620
4730
|
};
|
|
@@ -4629,10 +4739,14 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4629
4739
|
onToggle = props.onToggle,
|
|
4630
4740
|
_props$direction = props.direction,
|
|
4631
4741
|
direction = _props$direction === void 0 ? 'bottom' : _props$direction,
|
|
4742
|
+
_props$display = props.display,
|
|
4743
|
+
display = _props$display === void 0 ? 'dynamic' : _props$display,
|
|
4744
|
+
_props$autoClose = props.autoClose,
|
|
4745
|
+
autoClose = _props$autoClose === void 0 ? 'outside' : _props$autoClose,
|
|
4632
4746
|
style = props.style,
|
|
4633
4747
|
elementProps = _objectWithoutProperties(props, _excluded$V);
|
|
4634
4748
|
|
|
4635
|
-
var dropdown = useDropdown(defaultVisible, visible, onToggle, direction);
|
|
4749
|
+
var dropdown = useDropdown(defaultVisible, visible, onToggle, direction, display, autoClose);
|
|
4636
4750
|
var classes = getStyles(styles$K, ['.dropdown']);
|
|
4637
4751
|
return /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
4638
4752
|
ref: ref,
|
|
@@ -4644,10 +4758,11 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4644
4758
|
Dropdown.displayName = 'Dropdown';
|
|
4645
4759
|
Dropdown.propTypes = propTypes$V;
|
|
4646
4760
|
Dropdown.Context = DropdownContext;
|
|
4647
|
-
Dropdown.
|
|
4648
|
-
Dropdown.Header = DropdownHeader;
|
|
4761
|
+
Dropdown.Toggle = DropdownToggle;
|
|
4649
4762
|
Dropdown.Menu = DropdownMenu;
|
|
4763
|
+
Dropdown.Header = DropdownHeader;
|
|
4650
4764
|
Dropdown.Item = DropdownItem;
|
|
4765
|
+
Dropdown.ItemText = DropdownItemText;
|
|
4651
4766
|
Dropdown.Divider = DropdownDivider;
|
|
4652
4767
|
Dropdown.useDismiss = useDismissDropdown;
|
|
4653
4768
|
Dropdown.useToggle = useToggleDropdown;
|
|
@@ -4798,13 +4913,13 @@ var propTypes$Q = {
|
|
|
4798
4913
|
style: PropTypes.any
|
|
4799
4914
|
};
|
|
4800
4915
|
var styles$G = StyleSheet.create(_objectSpread2({
|
|
4801
|
-
'.form-control': css(_templateObject$H || (_templateObject$H = _taggedTemplateLiteral(["\n // display: block;\n width: 100%;\n padding: $input-padding-y $input-padding-x;\n font-family: $input-font-family;\n font-size: $input-font-size;\n font-weight: $input-font-weight;\n line-height: $input-font-size * $input-line-height;\n color: $input-color;\n
|
|
4916
|
+
'.form-control': css(_templateObject$H || (_templateObject$H = _taggedTemplateLiteral(["\n // display: block;\n width: 100%;\n padding: $input-padding-y $input-padding-x;\n font-family: $input-font-family;\n font-size: $input-font-size;\n font-weight: $input-font-weight;\n line-height: $input-font-size * $input-line-height;\n color: $input-color;\n background-color: $input-bg;\n // background-clip: padding-box;\n border: $input-border-width solid $input-border-color;\n @include platform(web) {\n appearance: none; // Fix appearance for date inputs in Safari\n }\n\n // Note: This has no effect on <select>s in some browsers, due to the limited stylability of \"<select>\"s in CSS.\n border-radius: $input-border-radius;\n\n // @include box-shadow($input-box-shadow);\n // @include transition($input-transition);\n\n // Customize the \":focus\" state to imitate native WebKit styles.\n &:focus {\n color: $input-focus-color;\n background-color: $input-focus-bg;\n border-color: $input-focus-border-color;\n @include platform(web) {\n outline-width: 0; // outline: 0;\n }\n /* @if $enable-shadows {\n @include box-shadow($input-box-shadow, $input-focus-box-shadow);\n } @else {\n // Avoid using mixin so we can pass custom focus shadow properly\n box-shadow: $input-focus-box-shadow;\n } */\n }\n "]))),
|
|
4802
4917
|
'.form-control-disabled': css(_templateObject2$u || (_templateObject2$u = _taggedTemplateLiteral(["\n background-color: $input-disabled-bg;\n border-color: $input-disabled-border-color;\n // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.\n opacity: 1;\n "]))),
|
|
4803
4918
|
'.form-control-sm': css(_templateObject3$g || (_templateObject3$g = _taggedTemplateLiteral(["\n min-height: $input-height-sm;\n padding: $input-padding-y-sm $input-padding-x-sm;\n font-size: $input-font-size-sm;\n border-radius: $input-border-radius-sm;\n "]))),
|
|
4804
4919
|
'.form-control-lg': css(_templateObject4$e || (_templateObject4$e = _taggedTemplateLiteral(["\n min-height: $input-height-lg;\n padding: $input-padding-y-lg $input-padding-x-lg;\n font-size: $input-font-size-lg;\n border-radius: $input-border-radius-lg;\n "]))),
|
|
4805
|
-
'.form-control-multiline': css(_templateObject5$c || (_templateObject5$c = _taggedTemplateLiteral(["\n min-height: $input-height;\n "]))),
|
|
4806
|
-
'.form-control-multiline-sm': css(_templateObject6$b || (_templateObject6$b = _taggedTemplateLiteral(["\n min-height: $input-height-sm;\n "]))),
|
|
4807
|
-
'.form-control-multiline-lg': css(_templateObject7$8 || (_templateObject7$8 = _taggedTemplateLiteral(["\n min-height: $input-height-lg;\n "])))
|
|
4920
|
+
'.form-control-multiline': css(_templateObject5$c || (_templateObject5$c = _taggedTemplateLiteral(["\n text-align-vertical: top; // added for bootstrap-rn\n min-height: $input-height;\n\n @include platform(ios) {\n min-height: $input-height-sm + 8rem; // added for bootstrap-rn\n }\n "]))),
|
|
4921
|
+
'.form-control-multiline-sm': css(_templateObject6$b || (_templateObject6$b = _taggedTemplateLiteral(["\n min-height: $input-height-sm;\n\n @include platform(ios) {\n // TODO: Adjust ios height to sm size\n min-height: $input-height-sm + 8rem; // added for bootstrap-rn\n }\n "]))),
|
|
4922
|
+
'.form-control-multiline-lg': css(_templateObject7$8 || (_templateObject7$8 = _taggedTemplateLiteral(["\n min-height: $input-height-lg;\n\n @include platform(ios) {\n // TODO: Adjust ios height to lg size\n min-height: $input-height-sm + 8rem; // added for bootstrap-rn\n }\n "])))
|
|
4808
4923
|
}, each(FORM_VALIDATION_STATES, function (state, data) {
|
|
4809
4924
|
return _defineProperty({}, ".form-control.is-".concat(state), css(_templateObject8$7 || (_templateObject8$7 = _taggedTemplateLiteral(["\n border-color: ", ";\n\n &:focus {\n border-color: ", ";\n // box-shadow: $focus-box-shadow;\n }\n "])), function (t) {
|
|
4810
4925
|
return data(t).color;
|
|
@@ -4837,6 +4952,8 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4837
4952
|
placeholderTextColor: placeholderTextColor || StyleSheet.value('input-placeholder-color'),
|
|
4838
4953
|
multiline: multiline,
|
|
4839
4954
|
disabled: disabled,
|
|
4955
|
+
editable: !disabled,
|
|
4956
|
+
selectTextOnFocus: !disabled,
|
|
4840
4957
|
style: [classes, style]
|
|
4841
4958
|
}));
|
|
4842
4959
|
});
|
|
@@ -4968,7 +5085,7 @@ PopoverContext.displayName = 'PopoverContext';
|
|
|
4968
5085
|
|
|
4969
5086
|
var _excluded$P = ["style"];
|
|
4970
5087
|
|
|
4971
|
-
var _templateObject$G, _templateObject2$t, _templateObject3$f, _templateObject4$d, _templateObject5$b, _templateObject6$a, _templateObject7$7, _templateObject8$6, _templateObject9$
|
|
5088
|
+
var _templateObject$G, _templateObject2$t, _templateObject3$f, _templateObject4$d, _templateObject5$b, _templateObject6$a, _templateObject7$7, _templateObject8$6, _templateObject9$5, _templateObject10$5, _templateObject11$4, _templateObject12$3, _templateObject13$3, _templateObject14$2, _templateObject15$1;
|
|
4972
5089
|
var propTypes$P = {
|
|
4973
5090
|
// eslint-disable-next-line react/forbid-prop-types
|
|
4974
5091
|
style: PropTypes.any
|
|
@@ -4990,15 +5107,15 @@ var styles$F = StyleSheet.create({
|
|
|
4990
5107
|
return t['popover-border-width'];
|
|
4991
5108
|
})),
|
|
4992
5109
|
'.bs-popover-end .popover-arrow::before': css(_templateObject8$6 || (_templateObject8$6 = _taggedTemplateLiteral(["\n left: 0;\n border-top-width: $popover-arrow-width * 0.5;\n border-right-width: $popover-arrow-height;\n border-left-width: 0;\n border-bottom-width: $popover-arrow-width * 0.5;\n border-right-color: $popover-arrow-outer-color;\n "]))),
|
|
4993
|
-
'.bs-popover-end .popover-arrow::after': css(_templateObject9$
|
|
4994
|
-
'.bs-popover-bottom .popover-arrow': css(_templateObject10$
|
|
5110
|
+
'.bs-popover-end .popover-arrow::after': css(_templateObject9$5 || (_templateObject9$5 = _taggedTemplateLiteral(["\n left: $popover-border-width;\n border-top-width: $popover-arrow-width * 0.5;\n border-right-width: $popover-arrow-height;\n border-left-width: 0;\n border-bottom-width: $popover-arrow-width * 0.5;\n border-right-color: $popover-arrow-color;\n "]))),
|
|
5111
|
+
'.bs-popover-bottom .popover-arrow': css(_templateObject10$5 || (_templateObject10$5 = _taggedTemplateLiteral(["\n top: ", ";\n "])), subtract(function (t) {
|
|
4995
5112
|
return "-".concat(t['popover-arrow-height']);
|
|
4996
5113
|
}, function (t) {
|
|
4997
5114
|
return t['popover-border-width'];
|
|
4998
5115
|
})),
|
|
4999
|
-
'.bs-popover-bottom .popover-arrow::before': css(_templateObject11$
|
|
5000
|
-
'.bs-popover-bottom .popover-arrow::after': css(_templateObject12$
|
|
5001
|
-
'.bs-popover-start .popover-arrow': css(_templateObject13$
|
|
5116
|
+
'.bs-popover-bottom .popover-arrow::before': css(_templateObject11$4 || (_templateObject11$4 = _taggedTemplateLiteral(["\n top: 0;\n border-top-width: 0;\n border-right-width: $popover-arrow-width * 0.5;\n border-left-width: $popover-arrow-width * 0.5;\n border-bottom-width: $popover-arrow-height;\n border-bottom-color: $popover-arrow-outer-color;\n "]))),
|
|
5117
|
+
'.bs-popover-bottom .popover-arrow::after': css(_templateObject12$3 || (_templateObject12$3 = _taggedTemplateLiteral(["\n top: $popover-border-width;\n border-top-width: 0;\n border-right-width: $popover-arrow-width * 0.5;\n border-left-width: $popover-arrow-width * 0.5;\n border-bottom-width: $popover-arrow-height;\n border-bottom-color: $popover-arrow-color;\n "]))),
|
|
5118
|
+
'.bs-popover-start .popover-arrow': css(_templateObject13$3 || (_templateObject13$3 = _taggedTemplateLiteral(["\n right: ", ";\n width: $popover-arrow-height;\n height: $popover-arrow-width;\n "])), subtract(function (t) {
|
|
5002
5119
|
return "-".concat(t['popover-arrow-height']);
|
|
5003
5120
|
}, function (t) {
|
|
5004
5121
|
return t['popover-border-width'];
|
|
@@ -5180,9 +5297,10 @@ function injectPopover(Target) {
|
|
|
5180
5297
|
ref: overlayRef,
|
|
5181
5298
|
placement: overlay.placement,
|
|
5182
5299
|
popper: overlay.rendered,
|
|
5183
|
-
style: [{
|
|
5300
|
+
style: [overlay.overlayProps.style, {
|
|
5301
|
+
maxHeight: 'auto',
|
|
5184
5302
|
opacity: overlay.rendered ? 1 : 0
|
|
5185
|
-
}
|
|
5303
|
+
}],
|
|
5186
5304
|
arrowStyle: overlay.arrowProps.style
|
|
5187
5305
|
}), /*#__PURE__*/React.createElement(Popover.Arrow, null), title && /*#__PURE__*/React.createElement(Popover.Header, null, title), /*#__PURE__*/React.createElement(Popover.Body, null, content));
|
|
5188
5306
|
})));
|
|
@@ -5197,7 +5315,7 @@ TooltipContext.displayName = 'TooltipContext';
|
|
|
5197
5315
|
|
|
5198
5316
|
var _excluded$K = ["style"];
|
|
5199
5317
|
|
|
5200
|
-
var _templateObject$C, _templateObject2$q, _templateObject3$e, _templateObject4$c, _templateObject5$a, _templateObject6$9, _templateObject7$6, _templateObject8$5, _templateObject9$
|
|
5318
|
+
var _templateObject$C, _templateObject2$q, _templateObject3$e, _templateObject4$c, _templateObject5$a, _templateObject6$9, _templateObject7$6, _templateObject8$5, _templateObject9$4, _templateObject10$4;
|
|
5201
5319
|
var propTypes$K = {
|
|
5202
5320
|
// eslint-disable-next-line react/forbid-prop-types
|
|
5203
5321
|
style: PropTypes.any
|
|
@@ -5211,8 +5329,8 @@ var styles$B = StyleSheet.create({
|
|
|
5211
5329
|
'.bs-tooltip-end .tooltip-arrow::before': css(_templateObject6$9 || (_templateObject6$9 = _taggedTemplateLiteral(["\n right: -1px;\n border-top-width: $tooltip-arrow-width * 0.5;\n border-right-width: $tooltip-arrow-height;\n border-left-width: 0;\n border-bottom-width: $tooltip-arrow-width * 0.5;\n border-right-color: $tooltip-arrow-color;\n "]))),
|
|
5212
5330
|
'.bs-tooltip-bottom .tooltip-arrow': css(_templateObject7$6 || (_templateObject7$6 = _taggedTemplateLiteral(["\n top: 0;\n "]))),
|
|
5213
5331
|
'.bs-tooltip-bottom .tooltip-arrow::before': css(_templateObject8$5 || (_templateObject8$5 = _taggedTemplateLiteral(["\n bottom: -1px;\n border-top-width: 0;\n border-right-width: $tooltip-arrow-width * 0.5;\n border-left-width: $tooltip-arrow-width * 0.5;\n border-bottom-width: $tooltip-arrow-height;\n border-bottom-color: $tooltip-arrow-color;\n "]))),
|
|
5214
|
-
'.bs-tooltip-start .tooltip-arrow': css(_templateObject9$
|
|
5215
|
-
'.bs-tooltip-start .tooltip-arrow::before': css(_templateObject10$
|
|
5332
|
+
'.bs-tooltip-start .tooltip-arrow': css(_templateObject9$4 || (_templateObject9$4 = _taggedTemplateLiteral(["\n right: 0;\n width: $tooltip-arrow-height;\n height: $tooltip-arrow-width;\n "]))),
|
|
5333
|
+
'.bs-tooltip-start .tooltip-arrow::before': css(_templateObject10$4 || (_templateObject10$4 = _taggedTemplateLiteral(["\n left: -1px;\n border-top-width: $tooltip-arrow-width * 0.5;\n border-right-width: 0;\n border-left-width: $tooltip-arrow-height;\n border-bottom-width: $tooltip-arrow-width * 0.5;\n border-left-color: $tooltip-arrow-color;\n "])))
|
|
5216
5334
|
});
|
|
5217
5335
|
var TooltipArrow = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5218
5336
|
var style = props.style,
|
|
@@ -5354,9 +5472,10 @@ function injectTooltip(Target) {
|
|
|
5354
5472
|
ref: overlayRef,
|
|
5355
5473
|
placement: overlay.placement,
|
|
5356
5474
|
popper: overlay.rendered,
|
|
5357
|
-
style: [{
|
|
5475
|
+
style: [overlay.overlayProps.style, {
|
|
5476
|
+
maxHeight: 'auto',
|
|
5358
5477
|
opacity: overlay.rendered ? 1 : 0
|
|
5359
|
-
}
|
|
5478
|
+
}],
|
|
5360
5479
|
arrowStyle: overlay.arrowProps.style
|
|
5361
5480
|
}), /*#__PURE__*/React.createElement(Tooltip.Arrow, null), /*#__PURE__*/React.createElement(Tooltip.Inner, null, title));
|
|
5362
5481
|
})));
|
|
@@ -5444,7 +5563,7 @@ ListGroupContext.displayName = 'ListGroupContext';
|
|
|
5444
5563
|
|
|
5445
5564
|
var _excluded$D = ["children", "color", "active", "first", "last", "disabled", "style", "textStyle"];
|
|
5446
5565
|
|
|
5447
|
-
var _templateObject$y, _templateObject2$o, _templateObject3$c, _templateObject4$a, _templateObject5$8, _templateObject6$7, _templateObject7$5, _templateObject8$4, _templateObject9$
|
|
5566
|
+
var _templateObject$y, _templateObject2$o, _templateObject3$c, _templateObject4$a, _templateObject5$8, _templateObject6$7, _templateObject7$5, _templateObject8$4, _templateObject9$3, _templateObject10$3, _templateObject11$3, _templateObject12$2, _templateObject13$2, _templateObject14$1;
|
|
5448
5567
|
var propTypes$D = {
|
|
5449
5568
|
children: PropTypes.node.isRequired,
|
|
5450
5569
|
color: PropTypes.oneOf(Object.keys(THEME_COLORS)),
|
|
@@ -5466,14 +5585,14 @@ var styles$x = StyleSheet.create(_objectSpread2({
|
|
|
5466
5585
|
'.list-group-item-disabled-text': css(_templateObject6$7 || (_templateObject6$7 = _taggedTemplateLiteral(["\n color: $list-group-disabled-color;\n "]))),
|
|
5467
5586
|
'.list-group-item-active': css(_templateObject7$5 || (_templateObject7$5 = _taggedTemplateLiteral(["\n z-index: 2; // Place active items above their siblings for proper border styling\n background-color: $list-group-active-bg;\n border-color: $list-group-active-border-color;\n "]))),
|
|
5468
5587
|
'.list-group-item-active-text': css(_templateObject8$4 || (_templateObject8$4 = _taggedTemplateLiteral(["\n color: $list-group-active-color;\n "]))),
|
|
5469
|
-
'.list-group-item-not-first': css(_templateObject9$
|
|
5470
|
-
'.list-group-item-not-first-active': css(_templateObject10$
|
|
5471
|
-
'.list-group-item-flush': css(_templateObject11$
|
|
5472
|
-
'.list-group-item-flush-last': css(_templateObject12$
|
|
5588
|
+
'.list-group-item-not-first': css(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteral(["\n border-top-width: 0;\n "]))),
|
|
5589
|
+
'.list-group-item-not-first-active': css(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteral(["\n margin-top: -$list-group-border-width;\n border-top-width: $list-group-border-width;\n "]))),
|
|
5590
|
+
'.list-group-item-flush': css(_templateObject11$3 || (_templateObject11$3 = _taggedTemplateLiteral(["\n border-top-left-radius: 0; // added for bootstrap-rn\n border-top-right-radius: 0; // added for bootstrap-rn\n border-bottom-left-radius: 0; // added for bootstrap-rn\n border-bottom-right-radius: 0; // added for bootstrap-rn\n border-top-width: 0;\n border-right-width: 0;\n border-bottom-width: $list-group-border-width;\n border-left-width: 0;\n "]))),
|
|
5591
|
+
'.list-group-item-flush-last': css(_templateObject12$2 || (_templateObject12$2 = _taggedTemplateLiteral(["\n border-bottom-width: 0;\n "])))
|
|
5473
5592
|
}, each(THEME_COLORS, function (state, value) {
|
|
5474
5593
|
var _ref;
|
|
5475
5594
|
|
|
5476
|
-
return _ref = {}, _defineProperty(_ref, ".list-group-item-".concat(state), css(_templateObject13$
|
|
5595
|
+
return _ref = {}, _defineProperty(_ref, ".list-group-item-".concat(state), css(_templateObject13$2 || (_templateObject13$2 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), shiftColor(function (t) {
|
|
5477
5596
|
return t['list-group-item-bg-scale'];
|
|
5478
5597
|
}, value))), _defineProperty(_ref, ".list-group-item-".concat(state, "-text"), css(_templateObject14$1 || (_templateObject14$1 = _taggedTemplateLiteral(["\n color: ", ";\n "])), shiftColor(function (t) {
|
|
5479
5598
|
return t['list-group-item-color-scale'];
|
|
@@ -5787,9 +5906,7 @@ var computeScrollbarWidth = function computeScrollbarWidth() {
|
|
|
5787
5906
|
};
|
|
5788
5907
|
|
|
5789
5908
|
function useScrollbarEffects(_ref) {
|
|
5790
|
-
var
|
|
5791
|
-
keepBodyScroll = _ref.keepBodyScroll,
|
|
5792
|
-
centered = _ref.centered,
|
|
5909
|
+
var keepBodyScroll = _ref.keepBodyScroll,
|
|
5793
5910
|
visible = _ref.visible;
|
|
5794
5911
|
|
|
5795
5912
|
if (Platform.OS !== 'web' || keepBodyScroll) {
|
|
@@ -5804,9 +5921,9 @@ function useScrollbarEffects(_ref) {
|
|
|
5804
5921
|
|
|
5805
5922
|
if (!scrollbarWidth.current) {
|
|
5806
5923
|
scrollbarWidth.current = computeScrollbarWidth();
|
|
5807
|
-
}
|
|
5924
|
+
} // const element = findNodeHandle(ref.current);
|
|
5925
|
+
|
|
5808
5926
|
|
|
5809
|
-
var element = findNodeHandle(ref.current);
|
|
5810
5927
|
var rect = document.body.getBoundingClientRect();
|
|
5811
5928
|
var isBodyOverflowing = rect.left + rect.right < window.innerWidth; // Set body and fixed elements padding adjustments.
|
|
5812
5929
|
|
|
@@ -5821,21 +5938,6 @@ function useScrollbarEffects(_ref) {
|
|
|
5821
5938
|
// eslint-disable-next-line no-param-reassign
|
|
5822
5939
|
el.style.width = "calc(100% - ".concat(scrollbarWidth.current, "px)");
|
|
5823
5940
|
});
|
|
5824
|
-
}
|
|
5825
|
-
|
|
5826
|
-
var isModalOverflowing = element.scrollHeight > document.documentElement.clientHeight;
|
|
5827
|
-
|
|
5828
|
-
if (centered) {
|
|
5829
|
-
// Set dialog padding adjustments.
|
|
5830
|
-
if (!isBodyOverflowing && isModalOverflowing) {
|
|
5831
|
-
// eslint-disable-next-line no-param-reassign
|
|
5832
|
-
element.style.paddingLeft = "".concat(scrollbarWidth.current, "px");
|
|
5833
|
-
}
|
|
5834
|
-
|
|
5835
|
-
if (isBodyOverflowing && !isModalOverflowing) {
|
|
5836
|
-
// eslint-disable-next-line no-param-reassign
|
|
5837
|
-
element.style.paddingRight = "".concat(scrollbarWidth.current, "px");
|
|
5838
|
-
}
|
|
5839
5941
|
} // Add "overflow: hidden" to body element.
|
|
5840
5942
|
|
|
5841
5943
|
|
|
@@ -5860,9 +5962,6 @@ function useModal(scrollable) {
|
|
|
5860
5962
|
}, [scrollable]);
|
|
5861
5963
|
}
|
|
5862
5964
|
|
|
5863
|
-
var ModalContext = /*#__PURE__*/React.createContext();
|
|
5864
|
-
ModalContext.displayName = 'ModalContext';
|
|
5865
|
-
|
|
5866
5965
|
var _excluded$y = ["children", "style"];
|
|
5867
5966
|
|
|
5868
5967
|
var _templateObject$u;
|
|
@@ -5915,13 +6014,15 @@ var ModalTitle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
5915
6014
|
ModalTitle.displayName = 'ModalTitle';
|
|
5916
6015
|
ModalTitle.propTypes = propTypes$x;
|
|
5917
6016
|
|
|
5918
|
-
var _excluded$w = ["children", "style"];
|
|
6017
|
+
var _excluded$w = ["children", "style", "contentContainerStyle"];
|
|
5919
6018
|
|
|
5920
6019
|
var _templateObject$s;
|
|
5921
6020
|
var propTypes$w = {
|
|
5922
6021
|
children: PropTypes.node.isRequired,
|
|
5923
6022
|
// eslint-disable-next-line react/forbid-prop-types
|
|
5924
|
-
style: PropTypes.any
|
|
6023
|
+
style: PropTypes.any,
|
|
6024
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
6025
|
+
contentContainerStyle: PropTypes.any
|
|
5925
6026
|
};
|
|
5926
6027
|
var styles$s = StyleSheet.create({
|
|
5927
6028
|
'.modal-body': css(_templateObject$s || (_templateObject$s = _taggedTemplateLiteral(["\n position: relative;\n // Enable \"flex-grow: 1\" so that the body take up as much space as possible\n // when there should be a fixed height on \".modal-dialog\".\n // Note from bootstrap-rn: Centered modals do not work with this style, but\n // everything just works fine without this style.\n // flex: 1 1 auto;\n padding: $modal-inner-padding;\n "])))
|
|
@@ -5929,6 +6030,7 @@ var styles$s = StyleSheet.create({
|
|
|
5929
6030
|
var ModalBody = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5930
6031
|
var children = props.children,
|
|
5931
6032
|
style = props.style,
|
|
6033
|
+
contentContainerStyle = props.contentContainerStyle,
|
|
5932
6034
|
elementProps = _objectWithoutProperties(props, _excluded$w);
|
|
5933
6035
|
|
|
5934
6036
|
var _useForcedContext = useForcedContext(ModalContext),
|
|
@@ -5938,8 +6040,8 @@ var ModalBody = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
5938
6040
|
var FlexView = scrollable ? ScrollView : View;
|
|
5939
6041
|
return /*#__PURE__*/React.createElement(FlexView, _extends({}, elementProps, {
|
|
5940
6042
|
ref: ref,
|
|
5941
|
-
style: scrollable ?
|
|
5942
|
-
contentContainerStyle: scrollable ? [classes,
|
|
6043
|
+
style: scrollable ? style : [classes, style],
|
|
6044
|
+
contentContainerStyle: scrollable ? [classes, contentContainerStyle] : undefined
|
|
5943
6045
|
}), children);
|
|
5944
6046
|
});
|
|
5945
6047
|
ModalBody.displayName = 'ModalBody';
|
|
@@ -5972,7 +6074,7 @@ ModalFooter.propTypes = propTypes$v;
|
|
|
5972
6074
|
|
|
5973
6075
|
var _excluded$u = ["children", "visible", "size", "backdrop", "scrollable", "centered", "onToggle", "style", "textStyle"];
|
|
5974
6076
|
|
|
5975
|
-
var _templateObject$q, _templateObject2$l, _templateObject3$a, _templateObject4$8, _templateObject5$6, _templateObject6$5, _templateObject7$4, _templateObject8$3, _templateObject9$
|
|
6077
|
+
var _templateObject$q, _templateObject2$l, _templateObject3$a, _templateObject4$8, _templateObject5$6, _templateObject6$5, _templateObject7$4, _templateObject8$3, _templateObject9$2, _templateObject10$2, _templateObject11$2;
|
|
5976
6078
|
var MODAL_SIZES = ['sm', 'lg', 'xl'];
|
|
5977
6079
|
var propTypes$u = {
|
|
5978
6080
|
children: PropTypes.node.isRequired,
|
|
@@ -5989,16 +6091,16 @@ var propTypes$u = {
|
|
|
5989
6091
|
};
|
|
5990
6092
|
var styles$q = StyleSheet.create({
|
|
5991
6093
|
'.modal': css(_templateObject$q || (_templateObject$q = _taggedTemplateLiteral(["\n position: absolute; // fixed;\n top: 0;\n left: 0;\n z-index: $zindex-modal;\n // display: none;\n width: 100%;\n height: 100%;\n // overflow-x: hidden;\n // overflow-y: auto;\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n @include platform(web) {\n outline-width: 0; // outline: 0;\n }\n // We deliberately don't use \"-webkit-overflow-scrolling: touch;\" due to a\n // gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342\n // See also https://github.com/twbs/bootstrap/issues/17695\n "]))),
|
|
5992
|
-
'.modal-dialog': css(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteral(["\n position: relative;\n width: auto;\n margin: $modal-dialog-margin;\n // allow clicks to pass through for custom click handling to close modal\n // pointer-events: none;\n
|
|
6094
|
+
'.modal-dialog': css(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteral(["\n position: relative;\n width: auto;\n margin: $modal-dialog-margin;\n // allow clicks to pass through for custom click handling to close modal\n // pointer-events: none;\n\n @include media-breakpoint-up(sm) {\n width: 100%; // added for bootstrap-rn\n max-width: $modal-md;\n margin-right: auto;\n margin-left: auto;\n }\n "]))),
|
|
5993
6095
|
'.modal-dialog-scrollable': css(_templateObject3$a || (_templateObject3$a = _taggedTemplateLiteral(["\n flex-shrink: 1; // added for bootstrap-rn\n // height: calc(100% - var(--#{$prefix}modal-margin) * 2);\n "]))),
|
|
5994
6096
|
'.modal-dialog-scrollable .modal-content': css(_templateObject4$8 || (_templateObject4$8 = _taggedTemplateLiteral(["\n max-height: 100%;\n overflow: hidden;\n "]))),
|
|
5995
6097
|
'.modal-dialog-centered': css(_templateObject5$6 || (_templateObject5$6 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row; // added for bootstrap-rn\n flex-grow: 1; // added for bootstrap-rn\n align-items: center;\n // min-height: calc(100% - var(--#{$prefix}modal-margin) * 2);\n "]))),
|
|
5996
6098
|
'.modal-content': css(_templateObject6$5 || (_templateObject6$5 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%; // Ensure \".modal-content\" extends the full width of the parent \".modal-dialog\"\n // counteract the pointer-events: none; in the .modal-dialog\n // pointer-events: auto;\n background-color: $modal-content-bg;\n // background-clip: padding-box;\n border: $modal-content-border-width solid $modal-content-border-color;\n border-radius: $modal-content-border-radius;\n // @include box-shadow($modal-content-box-shadow-xs);\n // Remove focus outline from opened modal\n // outline: 0;\n\n @include media-breakpoint-up(sm) {\n // @include box-shadow($modal-content-box-shadow-sm-up);\n }\n "]))),
|
|
5997
6099
|
'.modal-content-text': css(_templateObject7$4 || (_templateObject7$4 = _taggedTemplateLiteral(["\n color: $modal-content-color;\n "]))),
|
|
5998
6100
|
'.modal-backdrop': css(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n z-index: $zindex-modal-backdrop;\n width: 100%;\n height: 100%;\n background-color: $modal-backdrop-bg;\n opacity: $modal-backdrop-opacity;\n "]))),
|
|
5999
|
-
'.modal-sm': css(_templateObject9$
|
|
6000
|
-
'.modal-lg': css(_templateObject10$
|
|
6001
|
-
'.modal-xl': css(_templateObject11$
|
|
6101
|
+
'.modal-sm': css(_templateObject9$2 || (_templateObject9$2 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(sm) {\n max-width: $modal-sm;\n }\n "]))),
|
|
6102
|
+
'.modal-lg': css(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(lg) {\n max-width: $modal-lg;\n }\n @include media-breakpoint-up(xl) {\n max-width: $modal-xl;\n }\n "]))),
|
|
6103
|
+
'.modal-xl': css(_templateObject11$2 || (_templateObject11$2 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(xl) {\n max-width: $modal-xl;\n }\n "])))
|
|
6002
6104
|
});
|
|
6003
6105
|
var Modal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
6004
6106
|
var children = props.children,
|
|
@@ -6015,13 +6117,10 @@ var Modal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6015
6117
|
textStyle = props.textStyle,
|
|
6016
6118
|
elementProps = _objectWithoutProperties(props, _excluded$u);
|
|
6017
6119
|
|
|
6018
|
-
var modalRef = useRef();
|
|
6019
6120
|
var dialogRef = useRef();
|
|
6020
6121
|
var modal = useModal(scrollable);
|
|
6021
6122
|
useScrollbarEffects({
|
|
6022
|
-
ref: modalRef,
|
|
6023
6123
|
keepBodyScroll: false,
|
|
6024
|
-
centered: true,
|
|
6025
6124
|
visible: visible
|
|
6026
6125
|
});
|
|
6027
6126
|
var backdropClasses = getStyles(styles$q, ['.modal-backdrop']);
|
|
@@ -6038,7 +6137,6 @@ var Modal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6038
6137
|
}, backdrop && /*#__PURE__*/React.createElement(View, {
|
|
6039
6138
|
style: backdropClasses
|
|
6040
6139
|
}), /*#__PURE__*/React.createElement(FlexView, {
|
|
6041
|
-
ref: modalRef,
|
|
6042
6140
|
style: classes,
|
|
6043
6141
|
contentContainerStyle: scrollable ? undefined : {
|
|
6044
6142
|
flexGrow: 1
|
|
@@ -6047,7 +6145,11 @@ var Modal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6047
6145
|
dialogRef: dialogRef,
|
|
6048
6146
|
onClose: handleToggle,
|
|
6049
6147
|
backdrop: backdrop
|
|
6050
|
-
}), /*#__PURE__*/React.createElement(
|
|
6148
|
+
}), /*#__PURE__*/React.createElement(SafeAreaView, {
|
|
6149
|
+
style: {
|
|
6150
|
+
flexShrink: 1
|
|
6151
|
+
}
|
|
6152
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
6051
6153
|
ref: dialogRef,
|
|
6052
6154
|
style: dialogClasses
|
|
6053
6155
|
}, /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
@@ -6056,7 +6158,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6056
6158
|
textStyle: [contentTextClasses, textStyle]
|
|
6057
6159
|
}), /*#__PURE__*/React.createElement(ModalContext.Provider, {
|
|
6058
6160
|
value: modal
|
|
6059
|
-
}, children)))));
|
|
6161
|
+
}, /*#__PURE__*/React.createElement(OverlayProvider, null, children)))))));
|
|
6060
6162
|
});
|
|
6061
6163
|
Modal.displayName = 'Modal';
|
|
6062
6164
|
Modal.propTypes = propTypes$u;
|
|
@@ -6071,7 +6173,7 @@ NavContext.displayName = 'NavContext';
|
|
|
6071
6173
|
|
|
6072
6174
|
var _excluded$t = ["children", "active", "disabled", "style", "activeStyle", "textStyle", "activeTextStyle"];
|
|
6073
6175
|
|
|
6074
|
-
var _templateObject$p, _templateObject2$k, _templateObject3$9, _templateObject4$7, _templateObject5$5, _templateObject6$4, _templateObject7$3, _templateObject8$2, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
|
|
6176
|
+
var _templateObject$p, _templateObject2$k, _templateObject3$9, _templateObject4$7, _templateObject5$5, _templateObject6$4, _templateObject7$3, _templateObject8$2, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
|
|
6075
6177
|
var propTypes$t = {
|
|
6076
6178
|
children: PropTypes.node.isRequired,
|
|
6077
6179
|
active: PropTypes.bool,
|
|
@@ -6094,12 +6196,12 @@ var styles$p = StyleSheet.create(_objectSpread2(_objectSpread2({
|
|
|
6094
6196
|
'.nav-tabs .nav-link-disabled': css(_templateObject6$4 || (_templateObject6$4 = _taggedTemplateLiteral(["\n background-color: transparent;\n border-color: transparent;\n "]))),
|
|
6095
6197
|
'.nav-tabs .nav-link-disabled-text': css(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteral(["\n color: $nav-link-disabled-color;\n "]))),
|
|
6096
6198
|
'.nav-tabs .nav-link-active': css(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteral(["\n background-color: $nav-tabs-link-active-bg;\n border-color: $nav-tabs-link-active-border-color;\n\n &:hover {\n background-color: $nav-tabs-link-active-bg; // added for bootstrap-rn\n border-color: $nav-tabs-link-active-border-color; // added for bootstrap-rn\n }\n &:focus {\n background-color: $nav-tabs-link-active-bg; // added for bootstrap-rn\n border-color: $nav-tabs-link-active-border-color; // added for bootstrap-rn\n }\n "]))),
|
|
6097
|
-
'.nav-tabs .nav-link-active-text': css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: $nav-tabs-link-active-color;\n\n &:hover {\n color: $nav-tabs-link-active-color; // added for bootstrap-rn\n }\n &:focus {\n color: $nav-tabs-link-active-color; // added for bootstrap-rn\n }\n "]))),
|
|
6098
|
-
'.nav-pills .nav-link': css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background: transparent; // none;\n border: 0;\n border-radius: $nav-pills-border-radius;\n "]))),
|
|
6099
|
-
'.nav-pills .nav-link-active': css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n // @include gradient-bg($nav-pills-link-active-bg);\n background-color: $nav-pills-link-active-bg; // added for bootstrap-rn\n\n &:hover {\n background-color: $nav-pills-link-active-bg; // added for bootstrap-rn\n }\n &:focus {\n background-color: $nav-pills-link-active-bg; // added for bootstrap-rn\n }\n "]))),
|
|
6100
|
-
'.nav-pills .nav-link-active-text': css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n color: $nav-pills-link-active-color;\n\n &:hover {\n color: $nav-pills-link-active-color; // added for bootstrap-rn\n }\n &:focus {\n color: $nav-pills-link-active-color; // added for bootstyl\n }\n "]))),
|
|
6199
|
+
'.nav-tabs .nav-link-active-text': css(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteral(["\n color: $nav-tabs-link-active-color;\n\n &:hover {\n color: $nav-tabs-link-active-color; // added for bootstrap-rn\n }\n &:focus {\n color: $nav-tabs-link-active-color; // added for bootstrap-rn\n }\n "]))),
|
|
6200
|
+
'.nav-pills .nav-link': css(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteral(["\n background: transparent; // none;\n border: 0;\n border-radius: $nav-pills-border-radius;\n "]))),
|
|
6201
|
+
'.nav-pills .nav-link-active': css(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteral(["\n // @include gradient-bg($nav-pills-link-active-bg);\n background-color: $nav-pills-link-active-bg; // added for bootstrap-rn\n\n &:hover {\n background-color: $nav-pills-link-active-bg; // added for bootstrap-rn\n }\n &:focus {\n background-color: $nav-pills-link-active-bg; // added for bootstrap-rn\n }\n "]))),
|
|
6202
|
+
'.nav-pills .nav-link-active-text': css(_templateObject12$1 || (_templateObject12$1 = _taggedTemplateLiteral(["\n color: $nav-pills-link-active-color;\n\n &:hover {\n color: $nav-pills-link-active-color; // added for bootstrap-rn\n }\n &:focus {\n color: $nav-pills-link-active-color; // added for bootstyl\n }\n "]))),
|
|
6101
6203
|
// Navbar styles
|
|
6102
|
-
'.navbar-nav .nav-link': css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n padding-right: 0;\n padding-left: 0;\n "])))
|
|
6204
|
+
'.navbar-nav .nav-link': css(_templateObject13$1 || (_templateObject13$1 = _taggedTemplateLiteral(["\n padding-right: 0;\n padding-left: 0;\n "])))
|
|
6103
6205
|
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
6104
6206
|
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .navbar-nav .nav-link"), css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n padding-right: $navbar-nav-link-padding-x;\n padding-left: $navbar-nav-link-padding-x;\n }\n "])), next(breakpoint)));
|
|
6105
6207
|
})), {}, {
|
|
@@ -6397,7 +6499,7 @@ function useNavbar(variant, defaultExpanded, controlledExpanded, onToggle, expan
|
|
|
6397
6499
|
setExpanded: setExpanded,
|
|
6398
6500
|
expand: expand
|
|
6399
6501
|
};
|
|
6400
|
-
}, [variant, expanded]);
|
|
6502
|
+
}, [variant, expanded, expand]);
|
|
6401
6503
|
}
|
|
6402
6504
|
|
|
6403
6505
|
var _excluded$m = ["onPress"];
|
|
@@ -6464,6 +6566,12 @@ Navbar.Toggler = NavbarToggler;
|
|
|
6464
6566
|
Navbar.useDismiss = useDismissNavbar;
|
|
6465
6567
|
Navbar.useToggle = useToggleNavbar;
|
|
6466
6568
|
|
|
6569
|
+
function useOffcanvas() {
|
|
6570
|
+
return useMemo(function () {
|
|
6571
|
+
return {};
|
|
6572
|
+
}, []);
|
|
6573
|
+
}
|
|
6574
|
+
|
|
6467
6575
|
var _excluded$k = ["children", "style"];
|
|
6468
6576
|
|
|
6469
6577
|
var _templateObject$i, _templateObject2$d;
|
|
@@ -6519,29 +6627,33 @@ var OffcanvasTitle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6519
6627
|
OffcanvasTitle.displayName = 'OffcanvasTitle';
|
|
6520
6628
|
OffcanvasTitle.propTypes = propTypes$l;
|
|
6521
6629
|
|
|
6522
|
-
var _excluded$i = ["children", "style"];
|
|
6630
|
+
var _excluded$i = ["children", "style", "contentContainerStyle"];
|
|
6523
6631
|
|
|
6524
6632
|
var _templateObject$g, _templateObject2$c;
|
|
6525
6633
|
var propTypes$k = {
|
|
6526
6634
|
children: PropTypes.node.isRequired,
|
|
6527
6635
|
// eslint-disable-next-line react/forbid-prop-types
|
|
6528
|
-
style: PropTypes.any
|
|
6636
|
+
style: PropTypes.any,
|
|
6637
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
6638
|
+
contentContainerStyle: PropTypes.any
|
|
6529
6639
|
};
|
|
6530
6640
|
var styles$g = StyleSheet.create(_objectSpread2({
|
|
6531
|
-
'.offcanvas-body': css(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n flex-grow: 1;\n padding: $offcanvas-padding-y $offcanvas-padding-x;\n // overflow-y: auto;\n "])))
|
|
6641
|
+
'.offcanvas-body': css(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n // flex-grow: 1;\n padding: $offcanvas-padding-y $offcanvas-padding-x;\n // overflow-y: auto;\n "])))
|
|
6532
6642
|
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
6533
6643
|
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .offcanvas-body"), css(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n display: flex;\n flex-grow: 0;\n padding: 0;\n // overflow-y: visible;\n }\n "])), next(breakpoint)));
|
|
6534
6644
|
})));
|
|
6535
6645
|
var OffcanvasBody = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
6536
6646
|
var children = props.children,
|
|
6537
6647
|
style = props.style,
|
|
6648
|
+
contentContainerStyle = props.contentContainerStyle,
|
|
6538
6649
|
elementProps = _objectWithoutProperties(props, _excluded$i);
|
|
6539
6650
|
|
|
6540
6651
|
var navbar = useContext(NavbarContext);
|
|
6541
|
-
var
|
|
6542
|
-
return /*#__PURE__*/React.createElement(
|
|
6652
|
+
var contentContainerClasses = getStyles(styles$g, ['.offcanvas-body', navbar && navbar.expand && ".navbar-expand".concat(navbar.expand === true ? '' : "-".concat(navbar.expand), " .offcanvas-body")]);
|
|
6653
|
+
return /*#__PURE__*/React.createElement(ScrollView, _extends({}, elementProps, {
|
|
6543
6654
|
ref: ref,
|
|
6544
|
-
style:
|
|
6655
|
+
style: style,
|
|
6656
|
+
contentContainerStyle: [contentContainerClasses, contentContainerStyle]
|
|
6545
6657
|
}), children);
|
|
6546
6658
|
});
|
|
6547
6659
|
OffcanvasBody.displayName = 'OffcanvasBody';
|
|
@@ -6549,7 +6661,7 @@ OffcanvasBody.propTypes = propTypes$k;
|
|
|
6549
6661
|
|
|
6550
6662
|
var _excluded$h = ["children", "visible", "placement", "backdrop", "scroll", "onToggle", "style", "textStyle"];
|
|
6551
6663
|
|
|
6552
|
-
var _templateObject$f, _templateObject2$b, _templateObject3$4, _templateObject4$3, _templateObject5$3, _templateObject6$2, _templateObject7$1, _templateObject8;
|
|
6664
|
+
var _templateObject$f, _templateObject2$b, _templateObject3$4, _templateObject4$3, _templateObject5$3, _templateObject6$2, _templateObject7$1, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
6553
6665
|
var PLACEMENTS = ['top', 'bottom', 'start', 'end']; // , 'auto'
|
|
6554
6666
|
|
|
6555
6667
|
var propTypes$j = {
|
|
@@ -6566,15 +6678,23 @@ var propTypes$j = {
|
|
|
6566
6678
|
textStyle: PropTypes.any
|
|
6567
6679
|
};
|
|
6568
6680
|
var styles$f = StyleSheet.create(_objectSpread2({
|
|
6569
|
-
'.offcanvas': css(_templateObject$f || (_templateObject$f = _taggedTemplateLiteral(["\n position: absolute; // fixed;\n bottom: 0;\n z-index: $zindex-offcanvas;\n display: flex;\n flex-direction: column;\n max-width: 100%;\n // visibility: hidden;\n background-color: $offcanvas-bg-color;\n // background-clip: padding-box;\n @include platform(web) {\n outline-width: 0; // outline: 0;\n }\n // @include box-shadow($offcanvas-box-shadow);\n // @include transition(transform $offcanvas-transition-duration ease-in-out);\n "]))),
|
|
6681
|
+
'.offcanvas': css(_templateObject$f || (_templateObject$f = _taggedTemplateLiteral(["\n position: absolute; // fixed;\n // bottom: 0;\n z-index: $zindex-offcanvas;\n display: flex;\n flex-direction: column;\n max-width: 100%;\n // visibility: hidden;\n background-color: $offcanvas-bg-color;\n // background-clip: padding-box;\n @include platform(web) {\n outline-width: 0; // outline: 0;\n }\n // @include box-shadow($offcanvas-box-shadow);\n // @include transition(transform $offcanvas-transition-duration ease-in-out);\n "]))),
|
|
6570
6682
|
'.offcanvas-text': css(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteral(["\n color: $offcanvas-color;\n "]))),
|
|
6571
6683
|
'.offcanvas-backdrop': css(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n z-index: $zindex-offcanvas-backdrop;\n width: 100%;\n height: 100%;\n background-color: $offcanvas-backdrop-bg;\n opacity: $offcanvas-backdrop-opacity;\n "]))),
|
|
6572
|
-
'.offcanvas-start': css(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteral(["\n top: 0;\n left: 0;\n width: $offcanvas-horizontal-width;\n border-right-width: $offcanvas-border-width;\n border-style: solid;\n border-color: $offcanvas-border-color;\n // transform: translateX(-100%);\n "]))),
|
|
6573
|
-
'.offcanvas-end': css(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteral(["\n top: 0;\n right: 0;\n width: $offcanvas-horizontal-width;\n border-left-width: $offcanvas-border-width;\n border-style: solid;\n border-color: $offcanvas-border-color;\n // transform: translateX(100%);\n "]))),
|
|
6574
|
-
'.offcanvas-top': css(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral(["\n top: 0;\n right: 0;\n left: 0;\n height: $offcanvas-vertical-height;\n max-height: 100%;\n border-bottom-width: $offcanvas-border-width;\n border-style: solid;\n border-color: $offcanvas-border-color;\n // transform: translateY(-100%);\n "]))),
|
|
6575
|
-
'.offcanvas-bottom': css(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteral(["\n right: 0;\n left: 0;\n height: $offcanvas-vertical-height;\n max-height: 100%;\n width: 100%;\n border-top-width: $offcanvas-border-width;\n border-style: solid;\n border-color: $offcanvas-border-color;\n // transform: translateY(100%);\n "])))
|
|
6684
|
+
'.offcanvas-start': css(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteral(["\n top: 0;\n bottom: 0; // added for bootstrap-rn\n left: 0;\n // width: $offcanvas-horizontal-width;\n border-right-width: $offcanvas-border-width;\n border-style: solid;\n border-color: $offcanvas-border-color;\n // transform: translateX(-100%);\n "]))),
|
|
6685
|
+
'.offcanvas-end': css(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteral(["\n top: 0;\n bottom: 0; // added for bootstrap-rn\n right: 0;\n // width: $offcanvas-horizontal-width;\n border-left-width: $offcanvas-border-width;\n border-style: solid;\n border-color: $offcanvas-border-color;\n // transform: translateX(100%);\n "]))),
|
|
6686
|
+
'.offcanvas-top': css(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral(["\n top: 0;\n right: 0;\n left: 0;\n // height: $offcanvas-vertical-height;\n max-height: 100%;\n border-bottom-width: $offcanvas-border-width;\n border-style: solid;\n border-color: $offcanvas-border-color;\n // transform: translateY(-100%);\n "]))),
|
|
6687
|
+
'.offcanvas-bottom': css(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteral(["\n bottom: 0; // added for bootstrap-rn\n right: 0;\n left: 0;\n // height: $offcanvas-vertical-height;\n max-height: 100%;\n width: 100%;\n border-top-width: $offcanvas-border-width;\n border-style: solid;\n border-color: $offcanvas-border-color;\n // transform: translateY(100%);\n "]))),
|
|
6688
|
+
// The following .offcanvas-dialog classes are added for bootstrap-rn,
|
|
6689
|
+
// because otherwise the text would exceed a width of 100% on native
|
|
6690
|
+
// and also additional width by SafeAreaView would not be applied.
|
|
6691
|
+
'.offcanvas-dialog': css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n max-width: 100%;\n max-height: 100%;\n "]))),
|
|
6692
|
+
'.offcanvas-dialog-start': css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: $offcanvas-horizontal-width;\n "]))),
|
|
6693
|
+
'.offcanvas-dialog-end': css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: $offcanvas-horizontal-width;\n "]))),
|
|
6694
|
+
'.offcanvas-dialog-top': css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n height: $offcanvas-vertical-height;\n "]))),
|
|
6695
|
+
'.offcanvas-dialog-bottom': css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n height: $offcanvas-vertical-height;\n "])))
|
|
6576
6696
|
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
6577
|
-
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .offcanvas"), css(
|
|
6697
|
+
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .offcanvas"), css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n position: relative; // inherit;\n bottom: 0;\n // z-index: auto;\n flex-grow: 1;\n // visibility: visible !important; // stylelint-disable-line declaration-no-important\n background-color: transparent;\n border-right-width: 0;\n border-left-width: 0;\n // @include box-shadow(none);\n // @include transition(none);\n // transform: none;\n }\n "])), next(breakpoint)));
|
|
6578
6698
|
})));
|
|
6579
6699
|
var Offcanvas = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
6580
6700
|
var children = props.children,
|
|
@@ -6593,14 +6713,14 @@ var Offcanvas = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6593
6713
|
var media = useMedia();
|
|
6594
6714
|
var navbar = useContext(NavbarContext);
|
|
6595
6715
|
var offcanvasRef = useRef();
|
|
6716
|
+
var offcanvas = useOffcanvas();
|
|
6596
6717
|
useScrollbarEffects({
|
|
6597
|
-
ref: offcanvasRef,
|
|
6598
6718
|
keepBodyScroll: scroll,
|
|
6599
|
-
centered: false,
|
|
6600
6719
|
visible: visible
|
|
6601
6720
|
});
|
|
6602
6721
|
var backdropClasses = getStyles(styles$f, ['.offcanvas-backdrop']);
|
|
6603
6722
|
var classes = getStyles(styles$f, ['.offcanvas', ".offcanvas-".concat(placement), navbar && navbar.expand && ".navbar-expand".concat(navbar.expand === true ? '' : "-".concat(navbar.expand), " .offcanvas")]);
|
|
6723
|
+
var dialogClasses = getStyles(styles$f, ['.offcanvas-dialog', ".offcanvas-dialog-".concat(placement)]);
|
|
6604
6724
|
var textClasses = getStyles(styles$f, ['.offcanvas-content-text']); // Render children without modal for navbar.
|
|
6605
6725
|
|
|
6606
6726
|
if (navbar && navbar.expand && (navbar.expand === true || media.up(navbar.expand))) {
|
|
@@ -6621,14 +6741,23 @@ var Offcanvas = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6621
6741
|
dialogRef: offcanvasRef,
|
|
6622
6742
|
onClose: handleToggle,
|
|
6623
6743
|
backdrop: backdrop
|
|
6624
|
-
})), /*#__PURE__*/React.createElement(
|
|
6744
|
+
})), /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
6625
6745
|
ref: concatRefs(offcanvasRef, ref),
|
|
6626
6746
|
style: [classes, style],
|
|
6627
6747
|
textStyle: [textClasses, textStyle]
|
|
6628
|
-
}),
|
|
6748
|
+
}), /*#__PURE__*/React.createElement(SafeAreaView, {
|
|
6749
|
+
style: {
|
|
6750
|
+
flexShrink: 1
|
|
6751
|
+
}
|
|
6752
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
6753
|
+
style: dialogClasses
|
|
6754
|
+
}, /*#__PURE__*/React.createElement(OffcanvasContext.Provider, {
|
|
6755
|
+
value: offcanvas
|
|
6756
|
+
}, /*#__PURE__*/React.createElement(OverlayProvider, null, children))))));
|
|
6629
6757
|
});
|
|
6630
6758
|
Offcanvas.displayName = 'Offcanvas';
|
|
6631
6759
|
Offcanvas.propTypes = propTypes$j;
|
|
6760
|
+
Offcanvas.Context = OffcanvasContext;
|
|
6632
6761
|
Offcanvas.Header = OffcanvasHeader;
|
|
6633
6762
|
Offcanvas.Title = OffcanvasTitle;
|
|
6634
6763
|
Offcanvas.Body = OffcanvasBody;
|