bootstrap-rn 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap-rn.cjs.js +316 -224
- package/dist/bootstrap-rn.esm.js +316 -224
- package/dist/bootstrap-rn.umd.js +318 -226
- package/dist/bootstrap-rn.umd.min.js +1 -1
- package/package.json +58 -58
package/dist/bootstrap-rn.esm.js
CHANGED
|
@@ -2793,7 +2793,7 @@ function useViewport(initialViewport) {
|
|
|
2793
2793
|
return viewport;
|
|
2794
2794
|
}
|
|
2795
2795
|
|
|
2796
|
-
var propTypes$
|
|
2796
|
+
var propTypes$1q = {
|
|
2797
2797
|
children: PropTypes.node.isRequired,
|
|
2798
2798
|
// eslint-disable-next-line react/forbid-prop-types,
|
|
2799
2799
|
utilities: PropTypes.object,
|
|
@@ -2827,7 +2827,7 @@ function Provider(props) {
|
|
|
2827
2827
|
}, /*#__PURE__*/React.createElement(OverlayProvider, null, children));
|
|
2828
2828
|
}
|
|
2829
2829
|
|
|
2830
|
-
Provider.propTypes = propTypes$
|
|
2830
|
+
Provider.propTypes = propTypes$1q;
|
|
2831
2831
|
|
|
2832
2832
|
var TextStyleContext = /*#__PURE__*/React.createContext();
|
|
2833
2833
|
TextStyleContext.displayName = 'TextStyleContext';
|
|
@@ -2911,7 +2911,7 @@ function useStyle(style, styleName) {
|
|
|
2911
2911
|
}
|
|
2912
2912
|
|
|
2913
2913
|
var _excluded$1r = ["children", "style", "textStyle", "styleName"];
|
|
2914
|
-
var propTypes$
|
|
2914
|
+
var propTypes$1p = {
|
|
2915
2915
|
children: PropTypes.node,
|
|
2916
2916
|
// eslint-disable-next-line react/forbid-prop-types
|
|
2917
2917
|
style: PropTypes.any,
|
|
@@ -2947,12 +2947,12 @@ var View = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2947
2947
|
}, children) : children);
|
|
2948
2948
|
});
|
|
2949
2949
|
View.displayName = 'View';
|
|
2950
|
-
View.propTypes = propTypes$
|
|
2950
|
+
View.propTypes = propTypes$1p;
|
|
2951
2951
|
|
|
2952
2952
|
var _excluded$1q = ["children", "color", "dismissible", "style", "textStyle"];
|
|
2953
2953
|
|
|
2954
2954
|
var _templateObject$19, _templateObject2$L, _templateObject3$q;
|
|
2955
|
-
var propTypes$
|
|
2955
|
+
var propTypes$1o = {
|
|
2956
2956
|
children: PropTypes.node.isRequired,
|
|
2957
2957
|
color: PropTypes.oneOf(Object.keys(THEME_COLORS)),
|
|
2958
2958
|
dismissible: PropTypes.bool,
|
|
@@ -2997,12 +2997,12 @@ var Alert = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2997
2997
|
}), children);
|
|
2998
2998
|
});
|
|
2999
2999
|
Alert.displayName = 'Alert';
|
|
3000
|
-
Alert.propTypes = propTypes$
|
|
3000
|
+
Alert.propTypes = propTypes$1o;
|
|
3001
3001
|
|
|
3002
3002
|
var _excluded$1p = ["color", "bold", "italic", "mark", "small", "style", "styleName"];
|
|
3003
3003
|
|
|
3004
|
-
var _templateObject$18, _templateObject2$K, _templateObject3$p, _templateObject4$
|
|
3005
|
-
var propTypes$
|
|
3004
|
+
var _templateObject$18, _templateObject2$K, _templateObject3$p, _templateObject4$l, _templateObject5$j;
|
|
3005
|
+
var propTypes$1n = {
|
|
3006
3006
|
color: PropTypes.oneOf([].concat(_toConsumableArray(Object.keys(THEME_COLORS)), ['muted', 'black-50', 'white-50'])),
|
|
3007
3007
|
small: PropTypes.bool,
|
|
3008
3008
|
mark: PropTypes.bool,
|
|
@@ -3017,8 +3017,8 @@ var styles$17 = StyleSheet.create({
|
|
|
3017
3017
|
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
3018
|
strong: css(_templateObject2$K || (_templateObject2$K = _taggedTemplateLiteral(["\n font-weight: $font-weight-bolder;\n "]))),
|
|
3019
3019
|
italic: css(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteral(["\n font-style: italic;\n "]))),
|
|
3020
|
-
small: css(_templateObject4$
|
|
3021
|
-
mark: css(_templateObject5$
|
|
3020
|
+
small: css(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteral(["\n font-size: $small-font-size;\n line-height: $small-font-size * $line-height-base;\n "]))),
|
|
3021
|
+
mark: css(_templateObject5$j || (_templateObject5$j = _taggedTemplateLiteral(["\n padding: $mark-padding;\n background-color: $mark-bg;\n "])))
|
|
3022
3022
|
});
|
|
3023
3023
|
|
|
3024
3024
|
var getStyleName = function getStyleName(styleName, color) {
|
|
@@ -3071,12 +3071,12 @@ var Text = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3071
3071
|
}, element);
|
|
3072
3072
|
});
|
|
3073
3073
|
Text.displayName = 'Text';
|
|
3074
|
-
Text.propTypes = propTypes$
|
|
3074
|
+
Text.propTypes = propTypes$1n;
|
|
3075
3075
|
|
|
3076
3076
|
var _excluded$1o = ["children", "style"];
|
|
3077
3077
|
|
|
3078
3078
|
var _templateObject$17, _templateObject2$J;
|
|
3079
|
-
var propTypes$
|
|
3079
|
+
var propTypes$1m = {
|
|
3080
3080
|
children: PropTypes.node.isRequired,
|
|
3081
3081
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3082
3082
|
style: PropTypes.any
|
|
@@ -3097,12 +3097,12 @@ var Badge = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3097
3097
|
}), children);
|
|
3098
3098
|
});
|
|
3099
3099
|
Badge.displayName = 'Badge';
|
|
3100
|
-
Badge.propTypes = propTypes$
|
|
3100
|
+
Badge.propTypes = propTypes$1m;
|
|
3101
3101
|
|
|
3102
3102
|
var _excluded$1n = ["children", "active", "style", "textStyle"];
|
|
3103
3103
|
|
|
3104
3104
|
var _templateObject$16, _templateObject2$I, _templateObject3$o;
|
|
3105
|
-
var propTypes$
|
|
3105
|
+
var propTypes$1l = {
|
|
3106
3106
|
children: PropTypes.node.isRequired,
|
|
3107
3107
|
active: PropTypes.bool,
|
|
3108
3108
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -3132,7 +3132,7 @@ var BreadcrumbItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3132
3132
|
}), children);
|
|
3133
3133
|
});
|
|
3134
3134
|
BreadcrumbItem.displayName = 'BreadcrumbItem';
|
|
3135
|
-
BreadcrumbItem.propTypes = propTypes$
|
|
3135
|
+
BreadcrumbItem.propTypes = propTypes$1l;
|
|
3136
3136
|
/*
|
|
3137
3137
|
$breadcrumb-font-size: null;
|
|
3138
3138
|
$breadcrumb-padding-y: 0;
|
|
@@ -3150,7 +3150,7 @@ $breadcrumb-border-radius: null;
|
|
|
3150
3150
|
var _excluded$1m = ["children", "style"];
|
|
3151
3151
|
|
|
3152
3152
|
var _templateObject$15;
|
|
3153
|
-
var propTypes$
|
|
3153
|
+
var propTypes$1k = {
|
|
3154
3154
|
children: PropTypes.node.isRequired,
|
|
3155
3155
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3156
3156
|
style: PropTypes.any
|
|
@@ -3170,7 +3170,7 @@ var Breadcrumb = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3170
3170
|
}), makeListChildren(children));
|
|
3171
3171
|
});
|
|
3172
3172
|
Breadcrumb.displayName = 'Breadcrumb';
|
|
3173
|
-
Breadcrumb.propTypes = propTypes$
|
|
3173
|
+
Breadcrumb.propTypes = propTypes$1k;
|
|
3174
3174
|
Breadcrumb.Item = BreadcrumbItem;
|
|
3175
3175
|
/*
|
|
3176
3176
|
$breadcrumb-font-size: null;
|
|
@@ -3192,7 +3192,7 @@ ButtonGroupContext.displayName = 'ButtonGroupContext';
|
|
|
3192
3192
|
var _excluded$1l = ["children", "size", "style"];
|
|
3193
3193
|
|
|
3194
3194
|
var _templateObject$14;
|
|
3195
|
-
var propTypes$
|
|
3195
|
+
var propTypes$1j = {
|
|
3196
3196
|
children: PropTypes.node.isRequired,
|
|
3197
3197
|
size: PropTypes.oneOf(['lg', 'sm']),
|
|
3198
3198
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -3221,12 +3221,12 @@ var ButtonGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3221
3221
|
}, makeListChildren(children)));
|
|
3222
3222
|
});
|
|
3223
3223
|
ButtonGroup.displayName = 'ButtonGroup';
|
|
3224
|
-
ButtonGroup.propTypes = propTypes$
|
|
3224
|
+
ButtonGroup.propTypes = propTypes$1j;
|
|
3225
3225
|
|
|
3226
3226
|
var _excluded$1k = ["children", "style"];
|
|
3227
3227
|
|
|
3228
3228
|
var _templateObject$13;
|
|
3229
|
-
var propTypes$
|
|
3229
|
+
var propTypes$1i = {
|
|
3230
3230
|
children: PropTypes.node.isRequired,
|
|
3231
3231
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3232
3232
|
style: PropTypes.any
|
|
@@ -3247,7 +3247,7 @@ var ButtonToolbar = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3247
3247
|
}), children);
|
|
3248
3248
|
});
|
|
3249
3249
|
ButtonToolbar.displayName = 'ButtonToolbar';
|
|
3250
|
-
ButtonToolbar.propTypes = propTypes$
|
|
3250
|
+
ButtonToolbar.propTypes = propTypes$1i;
|
|
3251
3251
|
|
|
3252
3252
|
function useForcedContext(Context) {
|
|
3253
3253
|
var context = useContext(Context);
|
|
@@ -3309,7 +3309,7 @@ function useAction(props, ref) {
|
|
|
3309
3309
|
}
|
|
3310
3310
|
|
|
3311
3311
|
var _excluded$1h = ["children", "active", "style", "activeStyle", "textStyle", "activeTextStyle", "styleName"];
|
|
3312
|
-
var propTypes$
|
|
3312
|
+
var propTypes$1h = {
|
|
3313
3313
|
children: PropTypes.node,
|
|
3314
3314
|
active: PropTypes.bool,
|
|
3315
3315
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -3398,7 +3398,7 @@ var Pressable = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3398
3398
|
} : children);
|
|
3399
3399
|
});
|
|
3400
3400
|
Pressable.displayName = 'Pressable';
|
|
3401
|
-
Pressable.propTypes = propTypes$
|
|
3401
|
+
Pressable.propTypes = propTypes$1h;
|
|
3402
3402
|
|
|
3403
3403
|
var _excluded$1g = ["active", "handlePress"];
|
|
3404
3404
|
function useToggleButton(props) {
|
|
@@ -3425,8 +3425,8 @@ function useToggleButton(props) {
|
|
|
3425
3425
|
|
|
3426
3426
|
var _excluded$1f = ["children", "color", "size", "outline", "first", "last", "active", "disabled", "style", "activeStyle", "textStyle", "activeTextStyle"];
|
|
3427
3427
|
|
|
3428
|
-
var _templateObject$12, _templateObject2$H, _templateObject3$n, _templateObject4$
|
|
3429
|
-
var propTypes$
|
|
3428
|
+
var _templateObject$12, _templateObject2$H, _templateObject3$n, _templateObject4$k, _templateObject5$i, _templateObject6$g, _templateObject7$c, _templateObject8$b, _templateObject9$7, _templateObject10$7, _templateObject11$5, _templateObject12$4, _templateObject13$4, _templateObject14$3, _templateObject15$2, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20$1, _templateObject21, _templateObject22, _templateObject23;
|
|
3429
|
+
var propTypes$1g = {
|
|
3430
3430
|
children: PropTypes.node.isRequired,
|
|
3431
3431
|
color: PropTypes.oneOf([].concat(_toConsumableArray(Object.keys(THEME_COLORS)), ['link'])),
|
|
3432
3432
|
size: PropTypes.oneOf(['lg', 'sm']),
|
|
@@ -3451,7 +3451,7 @@ var styles$11 = StyleSheet.create(_objectSpread2(_objectSpread2({
|
|
|
3451
3451
|
}, each(THEME_COLORS, function (color, value) {
|
|
3452
3452
|
var _ref;
|
|
3453
3453
|
|
|
3454
|
-
return _ref = {}, _defineProperty(_ref, ".btn-".concat(color), css(_templateObject4$
|
|
3454
|
+
return _ref = {}, _defineProperty(_ref, ".btn-".concat(color), css(_templateObject4$k || (_templateObject4$k = _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
3455
|
return t['btn-hover-bg-shade-amount'];
|
|
3456
3456
|
}, value), shadeColor(function (t) {
|
|
3457
3457
|
return t['btn-hover-border-shade-amount'];
|
|
@@ -3463,11 +3463,11 @@ var styles$11 = StyleSheet.create(_objectSpread2(_objectSpread2({
|
|
|
3463
3463
|
return t['btn-active-bg-shade-amount'];
|
|
3464
3464
|
}, value), shadeColor(function (t) {
|
|
3465
3465
|
return t['btn-active-border-shade-amount'];
|
|
3466
|
-
}, value))), _defineProperty(_ref, ".btn-".concat(color, "-text"), css(_templateObject5$
|
|
3466
|
+
}, value))), _defineProperty(_ref, ".btn-".concat(color, "-text"), css(_templateObject5$i || (_templateObject5$i = _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
3467
|
return t['btn-active-bg-shade-amount'];
|
|
3468
3468
|
}, value), shadeColor(function (t) {
|
|
3469
3469
|
return t['btn-active-border-shade-amount'];
|
|
3470
|
-
}, value))), _defineProperty(_ref, ".btn-".concat(color, "-active-text"), css(_templateObject7$
|
|
3470
|
+
}, 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$7 || (_templateObject9$7 = _taggedTemplateLiteral(["\n $disabled-color: ", ";\n\n color: $disabled-color;\n "])), colorContrast(value))), _defineProperty(_ref, ".btn-outline-".concat(color), css(_templateObject10$7 || (_templateObject10$7 = _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$5 || (_templateObject11$5 = _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$4 || (_templateObject12$4 = _taggedTemplateLiteral(["\n background-color: transparent;\n "])))), _defineProperty(_ref, ".btn-outline-".concat(color, "-disabled-text"), css(_templateObject13$4 || (_templateObject13$4 = _taggedTemplateLiteral(["\n color: ", ";\n "])), value)), _ref;
|
|
3471
3471
|
})), {}, {
|
|
3472
3472
|
'.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
3473
|
'.btn-link-text-disabled': css(_templateObject15$2 || (_templateObject15$2 = _taggedTemplateLiteral(["\n color: $btn-link-disabled-color;\n "]))),
|
|
@@ -3539,13 +3539,13 @@ var Button = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3539
3539
|
}), children);
|
|
3540
3540
|
});
|
|
3541
3541
|
Button.displayName = 'Button';
|
|
3542
|
-
Button.propTypes = propTypes$
|
|
3542
|
+
Button.propTypes = propTypes$1g;
|
|
3543
3543
|
Button.useToggle = useToggleButton;
|
|
3544
3544
|
|
|
3545
3545
|
var _excluded$1e = ["children", "style", "textStyle"];
|
|
3546
3546
|
|
|
3547
3547
|
var _templateObject$11, _templateObject2$G;
|
|
3548
|
-
var propTypes$
|
|
3548
|
+
var propTypes$1f = {
|
|
3549
3549
|
children: PropTypes.node.isRequired,
|
|
3550
3550
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3551
3551
|
style: PropTypes.any,
|
|
@@ -3574,12 +3574,12 @@ var Blockquote = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3574
3574
|
}), children);
|
|
3575
3575
|
});
|
|
3576
3576
|
Blockquote.displayName = 'Blockquote';
|
|
3577
|
-
Blockquote.propTypes = propTypes$
|
|
3577
|
+
Blockquote.propTypes = propTypes$1f;
|
|
3578
3578
|
|
|
3579
3579
|
var _excluded$1d = ["children", "style", "textStyle"];
|
|
3580
3580
|
|
|
3581
3581
|
var _templateObject$10, _templateObject2$F;
|
|
3582
|
-
var propTypes$
|
|
3582
|
+
var propTypes$1e = {
|
|
3583
3583
|
children: PropTypes.node.isRequired,
|
|
3584
3584
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3585
3585
|
style: PropTypes.any,
|
|
@@ -3605,12 +3605,12 @@ var Body = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3605
3605
|
}), children);
|
|
3606
3606
|
});
|
|
3607
3607
|
Body.displayName = 'Body';
|
|
3608
|
-
Body.propTypes = propTypes$
|
|
3608
|
+
Body.propTypes = propTypes$1e;
|
|
3609
3609
|
|
|
3610
3610
|
var _excluded$1c = ["children", "style", "textStyle"];
|
|
3611
3611
|
|
|
3612
3612
|
var _templateObject$$, _templateObject2$E;
|
|
3613
|
-
var propTypes$
|
|
3613
|
+
var propTypes$1d = {
|
|
3614
3614
|
children: PropTypes.node.isRequired,
|
|
3615
3615
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3616
3616
|
style: PropTypes.any,
|
|
@@ -3636,12 +3636,12 @@ var CardBody = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3636
3636
|
}), children);
|
|
3637
3637
|
});
|
|
3638
3638
|
CardBody.displayName = 'CardBody';
|
|
3639
|
-
CardBody.propTypes = propTypes$
|
|
3639
|
+
CardBody.propTypes = propTypes$1d;
|
|
3640
3640
|
|
|
3641
3641
|
var _excluded$1b = ["children", "style", "textStyle"];
|
|
3642
3642
|
|
|
3643
3643
|
var _templateObject$_, _templateObject2$D;
|
|
3644
|
-
var propTypes$
|
|
3644
|
+
var propTypes$1c = {
|
|
3645
3645
|
children: PropTypes.node.isRequired,
|
|
3646
3646
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3647
3647
|
style: PropTypes.any,
|
|
@@ -3667,12 +3667,12 @@ var CardHeader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3667
3667
|
}), children);
|
|
3668
3668
|
});
|
|
3669
3669
|
CardHeader.displayName = 'CardHeader';
|
|
3670
|
-
CardHeader.propTypes = propTypes$
|
|
3670
|
+
CardHeader.propTypes = propTypes$1c;
|
|
3671
3671
|
|
|
3672
3672
|
var _excluded$1a = ["children", "style", "textStyle"];
|
|
3673
3673
|
|
|
3674
3674
|
var _templateObject$Z, _templateObject2$C;
|
|
3675
|
-
var propTypes$
|
|
3675
|
+
var propTypes$1b = {
|
|
3676
3676
|
children: PropTypes.node.isRequired,
|
|
3677
3677
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3678
3678
|
style: PropTypes.any,
|
|
@@ -3698,12 +3698,12 @@ var CardFooter = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3698
3698
|
}), children);
|
|
3699
3699
|
});
|
|
3700
3700
|
CardFooter.displayName = 'CardFooter';
|
|
3701
|
-
CardFooter.propTypes = propTypes$
|
|
3701
|
+
CardFooter.propTypes = propTypes$1b;
|
|
3702
3702
|
|
|
3703
3703
|
var _excluded$19 = ["children", "style"];
|
|
3704
3704
|
|
|
3705
3705
|
var _templateObject$Y;
|
|
3706
|
-
var propTypes$
|
|
3706
|
+
var propTypes$1a = {
|
|
3707
3707
|
children: PropTypes.node.isRequired,
|
|
3708
3708
|
// eslint-disable-next-line react/forbid-prop-types
|
|
3709
3709
|
style: PropTypes.any
|
|
@@ -3723,7 +3723,7 @@ var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3723
3723
|
}), children);
|
|
3724
3724
|
});
|
|
3725
3725
|
Card.displayName = 'Card';
|
|
3726
|
-
Card.propTypes = propTypes$
|
|
3726
|
+
Card.propTypes = propTypes$1a;
|
|
3727
3727
|
Card.Header = CardHeader;
|
|
3728
3728
|
Card.Body = CardBody;
|
|
3729
3729
|
Card.Footer = CardFooter;
|
|
@@ -3731,7 +3731,7 @@ Card.Footer = CardFooter;
|
|
|
3731
3731
|
var _excluded$18 = ["children", "disabled", "style", "textStyle"];
|
|
3732
3732
|
|
|
3733
3733
|
var _templateObject$X, _templateObject2$B, _templateObject3$m;
|
|
3734
|
-
var propTypes$
|
|
3734
|
+
var propTypes$19 = {
|
|
3735
3735
|
children: PropTypes.node,
|
|
3736
3736
|
disabled: PropTypes.bool,
|
|
3737
3737
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -3762,7 +3762,7 @@ var CloseButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3762
3762
|
}), StyleSheet.value('btn-close-bg'));
|
|
3763
3763
|
});
|
|
3764
3764
|
CloseButton.displayName = 'CloseButton';
|
|
3765
|
-
CloseButton.propTypes = propTypes$
|
|
3765
|
+
CloseButton.propTypes = propTypes$19;
|
|
3766
3766
|
|
|
3767
3767
|
var CollapseContext = /*#__PURE__*/React.createContext();
|
|
3768
3768
|
CollapseContext.displayName = 'CollapseContext';
|
|
@@ -3821,7 +3821,7 @@ function useCollapse(defaultVisible, controlledVisible, onToggle) {
|
|
|
3821
3821
|
}, [visible]);
|
|
3822
3822
|
}
|
|
3823
3823
|
|
|
3824
|
-
var propTypes$
|
|
3824
|
+
var propTypes$18 = {
|
|
3825
3825
|
children: PropTypes.node.isRequired,
|
|
3826
3826
|
defaultVisible: PropTypes.bool,
|
|
3827
3827
|
visible: PropTypes.bool,
|
|
@@ -3841,7 +3841,7 @@ var CollapseProvider = function CollapseProvider(props) {
|
|
|
3841
3841
|
};
|
|
3842
3842
|
|
|
3843
3843
|
CollapseProvider.displayName = 'CollapseProvider';
|
|
3844
|
-
CollapseProvider.propTypes = propTypes$
|
|
3844
|
+
CollapseProvider.propTypes = propTypes$18;
|
|
3845
3845
|
|
|
3846
3846
|
var _excluded$17 = ["onPress"];
|
|
3847
3847
|
function useToggleCollapse(props) {
|
|
@@ -3863,7 +3863,7 @@ function useToggleCollapse(props) {
|
|
|
3863
3863
|
}
|
|
3864
3864
|
|
|
3865
3865
|
var _excluded$16 = ["children"];
|
|
3866
|
-
var propTypes$
|
|
3866
|
+
var propTypes$17 = {
|
|
3867
3867
|
children: PropTypes.node
|
|
3868
3868
|
};
|
|
3869
3869
|
var Collapse = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -3884,7 +3884,7 @@ var Collapse = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3884
3884
|
}), children);
|
|
3885
3885
|
});
|
|
3886
3886
|
Collapse.displayName = 'Collapse';
|
|
3887
|
-
Collapse.propTypes = propTypes$
|
|
3887
|
+
Collapse.propTypes = propTypes$17;
|
|
3888
3888
|
Collapse.Provider = CollapseProvider;
|
|
3889
3889
|
Collapse.useToggle = useToggleCollapse;
|
|
3890
3890
|
|
|
@@ -3911,8 +3911,8 @@ NavbarContext.displayName = 'NavbarContext';
|
|
|
3911
3911
|
|
|
3912
3912
|
var _excluded$15 = ["fluid", "style"];
|
|
3913
3913
|
|
|
3914
|
-
var _templateObject$W, _templateObject2$A, _templateObject3$l, _templateObject4$
|
|
3915
|
-
var propTypes$
|
|
3914
|
+
var _templateObject$W, _templateObject2$A, _templateObject3$l, _templateObject4$j, _templateObject5$h, _templateObject6$f, _templateObject7$b, _templateObject8$a;
|
|
3915
|
+
var propTypes$16 = {
|
|
3916
3916
|
children: PropTypes.node.isRequired,
|
|
3917
3917
|
fluid: PropTypes.oneOf([true].concat(_toConsumableArray(Object.keys(CONTAINER_MAX_WIDTHS)))),
|
|
3918
3918
|
// eslint-disable-next-line react/forbid-prop-types
|
|
@@ -3940,25 +3940,25 @@ var styles$V = StyleSheet.create(_objectSpread2({
|
|
|
3940
3940
|
}, function (t) {
|
|
3941
3941
|
return t['container-max-widths'].xxl;
|
|
3942
3942
|
}),
|
|
3943
|
-
'.container-lg': css(_templateObject4$
|
|
3943
|
+
'.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
3944
|
return t['container-max-widths'].lg;
|
|
3945
3945
|
}, function (t) {
|
|
3946
3946
|
return t['container-max-widths'].xl;
|
|
3947
3947
|
}, function (t) {
|
|
3948
3948
|
return t['container-max-widths'].xxl;
|
|
3949
3949
|
}),
|
|
3950
|
-
'.container-xl': css(_templateObject5$
|
|
3950
|
+
'.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
3951
|
return t['container-max-widths'].xl;
|
|
3952
3952
|
}, function (t) {
|
|
3953
3953
|
return t['container-max-widths'].xxl;
|
|
3954
3954
|
}),
|
|
3955
|
-
'.container-xxl': css(_templateObject6$
|
|
3955
|
+
'.container-xxl': css(_templateObject6$f || (_templateObject6$f = _taggedTemplateLiteral(["\n @include media-breakpoint-up(xxl) {\n max-width: ", ";\n }\n "])), function (t) {
|
|
3956
3956
|
return t['container-max-widths'].xxl;
|
|
3957
3957
|
}),
|
|
3958
3958
|
// Navbar styles
|
|
3959
|
-
'.navbar .container': css(_templateObject7$
|
|
3959
|
+
'.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
3960
|
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
3961
|
-
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .container"), css(_templateObject8$
|
|
3961
|
+
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
3962
|
})));
|
|
3963
3963
|
var Container = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
3964
3964
|
var _props$fluid = props.fluid,
|
|
@@ -3976,12 +3976,12 @@ var Container = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
3976
3976
|
}));
|
|
3977
3977
|
});
|
|
3978
3978
|
Container.displayName = 'Container';
|
|
3979
|
-
Container.propTypes = propTypes$
|
|
3979
|
+
Container.propTypes = propTypes$16;
|
|
3980
3980
|
|
|
3981
3981
|
var _excluded$14 = ["children", "type", "value", "onChange", "onPress", "label", "disabled", "valid", "invalid", "style", "inputStyle", "labelStyle"];
|
|
3982
3982
|
|
|
3983
|
-
var _templateObject$V, _templateObject2$z, _templateObject3$k, _templateObject4$
|
|
3984
|
-
var propTypes$
|
|
3983
|
+
var _templateObject$V, _templateObject2$z, _templateObject3$k, _templateObject4$i, _templateObject5$g, _templateObject6$e, _templateObject7$a, _templateObject8$9, _templateObject9$6, _templateObject10$6, _templateObject11$4, _templateObject12$3, _templateObject13$3;
|
|
3984
|
+
var propTypes$15 = {
|
|
3985
3985
|
children: PropTypes.node,
|
|
3986
3986
|
type: PropTypes.oneOf(['checkbox', 'radio', 'switch']).isRequired,
|
|
3987
3987
|
value: PropTypes.bool.isRequired,
|
|
@@ -4002,13 +4002,13 @@ var styles$U = StyleSheet.create(_objectSpread2({
|
|
|
4002
4002
|
'.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
4003
|
'.form-check-disabled': css(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteral(["\n opacity: $form-check-label-disabled-opacity;\n "]))),
|
|
4004
4004
|
'.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$
|
|
4005
|
+
'.form-check-input-checkbox': css(_templateObject4$i || (_templateObject4$i = _taggedTemplateLiteral(["\n border-radius: $form-check-input-border-radius;\n "]))),
|
|
4006
|
+
'.form-check-input-radio': css(_templateObject5$g || (_templateObject5$g = _taggedTemplateLiteral(["\n border-radius: $form-check-radio-border-radius;\n "]))),
|
|
4007
|
+
'.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 "]))),
|
|
4008
|
+
'.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 "]))),
|
|
4009
|
+
'.form-switch': css(_templateObject8$9 || (_templateObject8$9 = _taggedTemplateLiteral(["\n padding-left: $form-switch-padding-start;\n "]))),
|
|
4010
|
+
'.form-check-input-switch': css(_templateObject9$6 || (_templateObject9$6 = _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 "]))),
|
|
4011
|
+
'.form-check-input-switch-checked': css(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteral(["\n align-items: flex-end; // added for bootstrap-rn\n justify-content: center; // added for bootstrap-rn\n "])))
|
|
4012
4012
|
}, each(FORM_VALIDATION_STATES, function (state, data) {
|
|
4013
4013
|
var _ref;
|
|
4014
4014
|
|
|
@@ -4086,7 +4086,7 @@ var CheckInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4086
4086
|
}, children));
|
|
4087
4087
|
});
|
|
4088
4088
|
CheckInput.displayName = 'CheckInput';
|
|
4089
|
-
CheckInput.propTypes = propTypes$
|
|
4089
|
+
CheckInput.propTypes = propTypes$15;
|
|
4090
4090
|
|
|
4091
4091
|
var Checkbox = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4092
4092
|
var elementProps = _extends({}, props);
|
|
@@ -4100,11 +4100,11 @@ Checkbox.displayName = 'Checkbox';
|
|
|
4100
4100
|
|
|
4101
4101
|
var _excluded$13 = ["children", "size", "sizeSm", "sizeMd", "sizeLg", "sizeXl", "style"];
|
|
4102
4102
|
|
|
4103
|
-
var _templateObject$U, _templateObject2$y, _templateObject3$j, _templateObject4$
|
|
4103
|
+
var _templateObject$U, _templateObject2$y, _templateObject3$j, _templateObject4$h, _templateObject5$f;
|
|
4104
4104
|
var sizes = makeArray(GRID_COLUMNS).map(function (v) {
|
|
4105
4105
|
return v + 1;
|
|
4106
4106
|
});
|
|
4107
|
-
var propTypes$
|
|
4107
|
+
var propTypes$14 = {
|
|
4108
4108
|
children: PropTypes.node.isRequired,
|
|
4109
4109
|
size: PropTypes.oneOf(['auto'].concat(_toConsumableArray(sizes))),
|
|
4110
4110
|
sizeSm: PropTypes.oneOf(['auto'].concat(_toConsumableArray(sizes))),
|
|
@@ -4115,14 +4115,14 @@ var propTypes$13 = {
|
|
|
4115
4115
|
style: PropTypes.any
|
|
4116
4116
|
};
|
|
4117
4117
|
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 "])))
|
|
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 @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
4119
|
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
4120
4120
|
var _objectSpread2$1;
|
|
4121
4121
|
|
|
4122
4122
|
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
4123
|
var _ref;
|
|
4124
4124
|
|
|
4125
|
-
return _ref = {}, _defineProperty(_ref, ".col".concat(infix(breakpoint), "-").concat(i + 1), css(_templateObject4$
|
|
4125
|
+
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
4126
|
})));
|
|
4127
4127
|
})));
|
|
4128
4128
|
var Col = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -4142,12 +4142,12 @@ var Col = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4142
4142
|
}), children);
|
|
4143
4143
|
});
|
|
4144
4144
|
Col.displayName = 'Col';
|
|
4145
|
-
Col.propTypes = propTypes$
|
|
4145
|
+
Col.propTypes = propTypes$14;
|
|
4146
4146
|
|
|
4147
4147
|
var _excluded$12 = ["children", "style"];
|
|
4148
4148
|
|
|
4149
4149
|
var _templateObject$T;
|
|
4150
|
-
var propTypes$
|
|
4150
|
+
var propTypes$13 = {
|
|
4151
4151
|
children: PropTypes.node.isRequired,
|
|
4152
4152
|
// eslint-disable-next-line react/forbid-prop-types
|
|
4153
4153
|
style: PropTypes.any
|
|
@@ -4170,11 +4170,44 @@ var Code = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4170
4170
|
}), children);
|
|
4171
4171
|
});
|
|
4172
4172
|
Code.displayName = 'Code';
|
|
4173
|
-
Code.propTypes = propTypes$
|
|
4173
|
+
Code.propTypes = propTypes$13;
|
|
4174
4174
|
|
|
4175
4175
|
var DropdownContext = /*#__PURE__*/React.createContext();
|
|
4176
4176
|
DropdownContext.displayName = 'DropdownContext';
|
|
4177
4177
|
|
|
4178
|
+
var _excluded$11 = ["onPress"];
|
|
4179
|
+
function useToggleDropdown(props) {
|
|
4180
|
+
var context = useForcedContext(DropdownContext);
|
|
4181
|
+
|
|
4182
|
+
var handlePress = props.onPress,
|
|
4183
|
+
restProps = _objectWithoutProperties(props, _excluded$11);
|
|
4184
|
+
|
|
4185
|
+
return _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
4186
|
+
nativeID: context.identifier,
|
|
4187
|
+
ref: context.toggleRef,
|
|
4188
|
+
onPress: function onPress(event) {
|
|
4189
|
+
if (handlePress) handlePress(event);
|
|
4190
|
+
context.setVisible(function (value) {
|
|
4191
|
+
return !value;
|
|
4192
|
+
});
|
|
4193
|
+
},
|
|
4194
|
+
accessibilityHasPopup: true,
|
|
4195
|
+
accessibilityExpanded: context.visible
|
|
4196
|
+
});
|
|
4197
|
+
}
|
|
4198
|
+
|
|
4199
|
+
var propTypes$12 = {
|
|
4200
|
+
children: PropTypes.func.isRequired
|
|
4201
|
+
};
|
|
4202
|
+
|
|
4203
|
+
var DropdownToggle = function DropdownToggle(props) {
|
|
4204
|
+
var children = props.children;
|
|
4205
|
+
return children(useToggleDropdown({}));
|
|
4206
|
+
};
|
|
4207
|
+
|
|
4208
|
+
DropdownToggle.displayName = 'DropdownToggle';
|
|
4209
|
+
DropdownToggle.propTypes = propTypes$12;
|
|
4210
|
+
|
|
4178
4211
|
var propTypes$11 = {
|
|
4179
4212
|
children: PropTypes.func.isRequired,
|
|
4180
4213
|
placement: PropTypes.string.isRequired,
|
|
@@ -4225,37 +4258,64 @@ Overlay.propTypes = propTypes$11;
|
|
|
4225
4258
|
|
|
4226
4259
|
var _templateObject$S;
|
|
4227
4260
|
var propTypes$10 = {
|
|
4261
|
+
toggleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
4228
4262
|
dialogRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
4229
4263
|
onClose: PropTypes.func,
|
|
4264
|
+
autoClose: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['inside', 'outside'])]),
|
|
4230
4265
|
backdrop: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['static'])])
|
|
4231
4266
|
};
|
|
4232
4267
|
var styles$R = StyleSheet.create({
|
|
4233
4268
|
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
4269
|
});
|
|
4270
|
+
var initialState = {
|
|
4271
|
+
waitingForMouseUp: false,
|
|
4272
|
+
isDialogClick: false
|
|
4273
|
+
};
|
|
4235
4274
|
|
|
4236
4275
|
var BackdropHandler = function BackdropHandler(props) {
|
|
4237
|
-
var
|
|
4276
|
+
var toggleRef = props.toggleRef,
|
|
4277
|
+
dialogRef = props.dialogRef,
|
|
4238
4278
|
handleClose = props.onClose,
|
|
4239
4279
|
_props$backdrop = props.backdrop,
|
|
4240
|
-
backdrop = _props$backdrop === void 0 ? true : _props$backdrop
|
|
4280
|
+
backdrop = _props$backdrop === void 0 ? true : _props$backdrop,
|
|
4281
|
+
_props$autoClose = props.autoClose,
|
|
4282
|
+
autoClose = _props$autoClose === void 0 ? 'outside' : _props$autoClose;
|
|
4241
4283
|
|
|
4242
4284
|
if (Platform.OS === 'web') {
|
|
4243
|
-
var
|
|
4244
|
-
|
|
4285
|
+
var state = useMemo(function () {
|
|
4286
|
+
return initialState;
|
|
4287
|
+
}, []);
|
|
4245
4288
|
useEffect(function () {
|
|
4289
|
+
var toggle = toggleRef ? findNodeHandle(toggleRef.current) : undefined;
|
|
4246
4290
|
var dialog = findNodeHandle(dialogRef.current);
|
|
4247
4291
|
|
|
4248
4292
|
var handleDialogMouseDown = function handleDialogMouseDown() {
|
|
4249
|
-
waitingForMouseUp
|
|
4293
|
+
state.waitingForMouseUp = true;
|
|
4250
4294
|
};
|
|
4251
4295
|
|
|
4252
|
-
var handleDocumentClick = function handleDocumentClick() {
|
|
4253
|
-
|
|
4296
|
+
var handleDocumentClick = function handleDocumentClick(_ref) {
|
|
4297
|
+
var target = _ref.target;
|
|
4298
|
+
|
|
4299
|
+
if (backdrop === 'static' || autoClose === false) {
|
|
4254
4300
|
return;
|
|
4255
|
-
}
|
|
4301
|
+
} // Click outside -> return if autoClose is inside.
|
|
4302
|
+
|
|
4256
4303
|
|
|
4257
|
-
if (
|
|
4258
|
-
|
|
4304
|
+
if (!state.isDialogClick && autoClose === 'inside') {
|
|
4305
|
+
return;
|
|
4306
|
+
} // Click inside / on dialog -> return if autoClose is outside.
|
|
4307
|
+
|
|
4308
|
+
|
|
4309
|
+
if (state.isDialogClick) {
|
|
4310
|
+
state.isDialogClick = false;
|
|
4311
|
+
|
|
4312
|
+
if (autoClose === 'outside') {
|
|
4313
|
+
return;
|
|
4314
|
+
}
|
|
4315
|
+
} // Click on toggle -> return always.
|
|
4316
|
+
|
|
4317
|
+
|
|
4318
|
+
if (toggle && (target === toggle || toggle.contains(target))) {
|
|
4259
4319
|
return;
|
|
4260
4320
|
}
|
|
4261
4321
|
|
|
@@ -4263,22 +4323,23 @@ var BackdropHandler = function BackdropHandler(props) {
|
|
|
4263
4323
|
};
|
|
4264
4324
|
|
|
4265
4325
|
var handleDocumentMouseUp = function handleDocumentMouseUp() {
|
|
4266
|
-
if (waitingForMouseUp
|
|
4267
|
-
|
|
4326
|
+
if (state.waitingForMouseUp) {
|
|
4327
|
+
state.isDialogClick = true;
|
|
4268
4328
|
}
|
|
4269
4329
|
|
|
4270
|
-
waitingForMouseUp
|
|
4330
|
+
state.waitingForMouseUp = false;
|
|
4271
4331
|
};
|
|
4272
4332
|
|
|
4273
|
-
dialog.addEventListener('mousedown', handleDialogMouseDown);
|
|
4274
|
-
|
|
4275
|
-
document.addEventListener('
|
|
4333
|
+
dialog.addEventListener('mousedown', handleDialogMouseDown); // See https://github.com/necolas/react-native-web/issues/2115
|
|
4334
|
+
|
|
4335
|
+
document.addEventListener('click', handleDocumentClick, true);
|
|
4336
|
+
document.addEventListener('mouseup', handleDocumentMouseUp, true);
|
|
4276
4337
|
return function () {
|
|
4277
4338
|
dialog.addEventListener('mousedown', handleDialogMouseDown);
|
|
4278
|
-
document.removeEventListener('click', handleDocumentClick);
|
|
4279
|
-
document.removeEventListener('mouseup', handleDocumentMouseUp);
|
|
4339
|
+
document.removeEventListener('click', handleDocumentClick, true);
|
|
4340
|
+
document.removeEventListener('mouseup', handleDocumentMouseUp, true);
|
|
4280
4341
|
};
|
|
4281
|
-
}, [backdrop]);
|
|
4342
|
+
}, [backdrop, autoClose]);
|
|
4282
4343
|
return null;
|
|
4283
4344
|
}
|
|
4284
4345
|
|
|
@@ -4299,9 +4360,9 @@ var BackdropHandler = function BackdropHandler(props) {
|
|
|
4299
4360
|
BackdropHandler.displayName = 'BackdropHandler';
|
|
4300
4361
|
BackdropHandler.propTypes = propTypes$10;
|
|
4301
4362
|
|
|
4302
|
-
var _excluded$
|
|
4363
|
+
var _excluded$10 = ["children", "start", "end", "style", "textStyle"];
|
|
4303
4364
|
|
|
4304
|
-
var _templateObject$R, _templateObject2$x, _templateObject3$i;
|
|
4365
|
+
var _templateObject$R, _templateObject2$x, _templateObject3$i, _templateObject4$g, _templateObject5$e, _templateObject6$d, _templateObject7$9, _templateObject8$8, _templateObject9$5, _templateObject10$5;
|
|
4305
4366
|
var ALIGNMENT_BREAKPOINTS = [true, 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
4306
4367
|
var propTypes$$ = {
|
|
4307
4368
|
children: PropTypes.node.isRequired,
|
|
@@ -4312,11 +4373,23 @@ var propTypes$$ = {
|
|
|
4312
4373
|
// eslint-disable-next-line react/forbid-prop-types
|
|
4313
4374
|
textStyle: PropTypes.any
|
|
4314
4375
|
};
|
|
4315
|
-
var styles$Q = StyleSheet.create({
|
|
4376
|
+
var styles$Q = StyleSheet.create(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
4316
4377
|
'.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
|
-
|
|
4378
|
+
'.dropdown-menu[data-bs-popper]': css(_templateObject2$x || (_templateObject2$x = _taggedTemplateLiteral(["\n top: 100%;\n left: 0;\n margin-top: $dropdown-spacer;\n "])))
|
|
4379
|
+
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
4380
|
+
var _ref;
|
|
4381
|
+
|
|
4382
|
+
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;
|
|
4383
|
+
})), {}, {
|
|
4384
|
+
'.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 "]))),
|
|
4385
|
+
'.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 "]))),
|
|
4386
|
+
'.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 "]))),
|
|
4387
|
+
'.navbar-nav .dropdown-menu': css(_templateObject8$8 || (_templateObject8$8 = _taggedTemplateLiteral(["\n position: relative; // static;\n "])))
|
|
4388
|
+
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
4389
|
+
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .navbar-nav .dropdown-menu"), css(_templateObject9$5 || (_templateObject9$5 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n position: absolute;\n }\n "])), next(breakpoint)));
|
|
4390
|
+
})), {}, {
|
|
4391
|
+
'.dropdown-menu-text': css(_templateObject10$5 || (_templateObject10$5 = _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 "])))
|
|
4392
|
+
}));
|
|
4320
4393
|
|
|
4321
4394
|
var getAlignment = function getAlignment(media, start, end) {
|
|
4322
4395
|
var alignStart = typeof start === 'boolean' ? start : media.up(start);
|
|
@@ -4351,39 +4424,68 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4351
4424
|
end = _props$end === void 0 ? false : _props$end,
|
|
4352
4425
|
style = props.style,
|
|
4353
4426
|
textStyle = props.textStyle,
|
|
4354
|
-
elementProps = _objectWithoutProperties(props, _excluded$
|
|
4427
|
+
elementProps = _objectWithoutProperties(props, _excluded$10);
|
|
4355
4428
|
|
|
4356
|
-
var
|
|
4429
|
+
var navbar = useContext(NavbarContext);
|
|
4357
4430
|
var media = useMedia();
|
|
4431
|
+
var dialogRef = useRef();
|
|
4432
|
+
var dropdown = useForcedContext(DropdownContext);
|
|
4358
4433
|
var identifier = dropdown.identifier,
|
|
4359
|
-
|
|
4360
|
-
triggerRef = dropdown.triggerRef,
|
|
4434
|
+
toggleRef = dropdown.toggleRef,
|
|
4361
4435
|
visible = dropdown.visible,
|
|
4362
|
-
setVisible = dropdown.setVisible
|
|
4436
|
+
setVisible = dropdown.setVisible,
|
|
4437
|
+
direction = dropdown.direction,
|
|
4438
|
+
display = dropdown.display,
|
|
4439
|
+
autoClose = dropdown.autoClose;
|
|
4363
4440
|
|
|
4364
4441
|
if (!visible) {
|
|
4365
4442
|
return null;
|
|
4366
4443
|
}
|
|
4367
4444
|
|
|
4368
|
-
var
|
|
4445
|
+
var isStatic = Platform.OS === 'web' && display === 'static';
|
|
4446
|
+
var isCollapsedNavbar = navbar && !(navbar.expand && (navbar.expand === true || media.up(navbar.expand)));
|
|
4447
|
+
var hasStaticStyle = isStatic && !isCollapsedNavbar;
|
|
4448
|
+
var classes = getStyles(styles$Q, ['.dropdown-menu', // Non-Popper styles
|
|
4449
|
+
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
|
|
4450
|
+
navbar && '.navbar-nav .dropdown-menu', navbar && navbar.expand && ".navbar-expand".concat(navbar.expand === true ? '' : "-".concat(navbar.expand), " .navbar-nav .dropdown-menu")]);
|
|
4369
4451
|
var textClasses = getStyles(styles$Q, ['.dropdown-menu-text']);
|
|
4452
|
+
|
|
4453
|
+
if (isStatic || isCollapsedNavbar) {
|
|
4454
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !isCollapsedNavbar && /*#__PURE__*/React.createElement(BackdropHandler, {
|
|
4455
|
+
toggleRef: toggleRef,
|
|
4456
|
+
dialogRef: dialogRef,
|
|
4457
|
+
onClose: function onClose() {
|
|
4458
|
+
setVisible(false);
|
|
4459
|
+
},
|
|
4460
|
+
autoClose: autoClose
|
|
4461
|
+
}), /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
4462
|
+
ref: concatRefs(dialogRef, ref),
|
|
4463
|
+
accessibilityLabelledBy: identifier,
|
|
4464
|
+
style: [classes, style],
|
|
4465
|
+
textStyle: [textClasses, textStyle]
|
|
4466
|
+
}), children));
|
|
4467
|
+
}
|
|
4468
|
+
|
|
4370
4469
|
return /*#__PURE__*/React.createElement(OverlayContainer, null, /*#__PURE__*/React.createElement(Overlay, {
|
|
4371
4470
|
placement: transformPlacement(media, direction, start, end),
|
|
4372
|
-
targetRef:
|
|
4471
|
+
targetRef: toggleRef,
|
|
4373
4472
|
offset: convertToNumber(StyleSheet.value('dropdown-spacer')),
|
|
4374
4473
|
visible: visible
|
|
4375
4474
|
}, function (overlay, overlayRef) {
|
|
4376
4475
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BackdropHandler, {
|
|
4476
|
+
toggleRef: toggleRef,
|
|
4377
4477
|
dialogRef: overlayRef,
|
|
4378
4478
|
onClose: function onClose() {
|
|
4379
4479
|
setVisible(false);
|
|
4380
|
-
}
|
|
4480
|
+
},
|
|
4481
|
+
autoClose: autoClose
|
|
4381
4482
|
}), /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
4382
4483
|
ref: concatRefs(overlayRef, ref),
|
|
4383
4484
|
accessibilityLabelledBy: identifier,
|
|
4384
|
-
style: [classes, {
|
|
4485
|
+
style: [classes, overlay.overlayProps.style, {
|
|
4486
|
+
maxHeight: 'auto',
|
|
4385
4487
|
opacity: overlay.rendered ? 1 : 0
|
|
4386
|
-
},
|
|
4488
|
+
}, style],
|
|
4387
4489
|
textStyle: [textClasses, textStyle]
|
|
4388
4490
|
}), /*#__PURE__*/React.createElement(DropdownContext.Provider, {
|
|
4389
4491
|
value: dropdown
|
|
@@ -4393,10 +4495,69 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4393
4495
|
DropdownMenu.displayName = 'DropdownMenu';
|
|
4394
4496
|
DropdownMenu.propTypes = propTypes$$;
|
|
4395
4497
|
|
|
4396
|
-
var _excluded
|
|
4498
|
+
var _excluded$$ = ["children", "size", "style"];
|
|
4397
4499
|
|
|
4398
|
-
var _templateObject$Q, _templateObject2$w
|
|
4500
|
+
var _templateObject$Q, _templateObject2$w;
|
|
4399
4501
|
var propTypes$_ = {
|
|
4502
|
+
children: PropTypes.node.isRequired,
|
|
4503
|
+
size: PropTypes.oneOf(Object.keys(FONT_SIZES).map(function (k) {
|
|
4504
|
+
return Number(k);
|
|
4505
|
+
})).isRequired,
|
|
4506
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
4507
|
+
style: PropTypes.any
|
|
4508
|
+
};
|
|
4509
|
+
var styles$P = StyleSheet.create(_objectSpread2({
|
|
4510
|
+
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 "])))
|
|
4511
|
+
}, each(FONT_SIZES, function (size, value) {
|
|
4512
|
+
return _defineProperty({}, ".h".concat(size), css(_templateObject2$w || (_templateObject2$w = _taggedTemplateLiteral(["\n font-size: ", ";\n line-height: ", " * $headings-line-height;\n "])), value, value));
|
|
4513
|
+
})));
|
|
4514
|
+
var Heading$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4515
|
+
var children = props.children,
|
|
4516
|
+
size = props.size,
|
|
4517
|
+
style = props.style,
|
|
4518
|
+
elementProps = _objectWithoutProperties(props, _excluded$$);
|
|
4519
|
+
|
|
4520
|
+
var classes = getStyles(styles$P, ['heading', ".h".concat(size)]);
|
|
4521
|
+
return /*#__PURE__*/React.createElement(Text, _extends({}, elementProps, {
|
|
4522
|
+
ref: ref,
|
|
4523
|
+
accessibilityRole: "header",
|
|
4524
|
+
accessibilityLevel: size,
|
|
4525
|
+
style: [classes, style]
|
|
4526
|
+
}), children);
|
|
4527
|
+
});
|
|
4528
|
+
Heading$1.displayName = 'Heading';
|
|
4529
|
+
Heading$1.propTypes = propTypes$_;
|
|
4530
|
+
|
|
4531
|
+
var _excluded$_ = ["children", "style"];
|
|
4532
|
+
|
|
4533
|
+
var _templateObject$P;
|
|
4534
|
+
var propTypes$Z = {
|
|
4535
|
+
children: PropTypes.node.isRequired,
|
|
4536
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
4537
|
+
style: PropTypes.any
|
|
4538
|
+
};
|
|
4539
|
+
var styles$O = StyleSheet.create({
|
|
4540
|
+
'.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 "])))
|
|
4541
|
+
});
|
|
4542
|
+
var DropdownHeader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4543
|
+
var children = props.children,
|
|
4544
|
+
style = props.style,
|
|
4545
|
+
elementProps = _objectWithoutProperties(props, _excluded$_);
|
|
4546
|
+
|
|
4547
|
+
var classes = getStyles(styles$O, ['.dropdown-header']);
|
|
4548
|
+
return /*#__PURE__*/React.createElement(Heading$1, _extends({}, elementProps, {
|
|
4549
|
+
ref: ref,
|
|
4550
|
+
size: 6,
|
|
4551
|
+
style: [classes, style]
|
|
4552
|
+
}), children);
|
|
4553
|
+
});
|
|
4554
|
+
DropdownHeader.displayName = 'DropdownHeader';
|
|
4555
|
+
DropdownHeader.propTypes = propTypes$Z;
|
|
4556
|
+
|
|
4557
|
+
var _excluded$Z = ["children", "onPress", "active", "disabled", "style", "textStyle"];
|
|
4558
|
+
|
|
4559
|
+
var _templateObject$O, _templateObject2$v, _templateObject3$h, _templateObject4$f, _templateObject5$d, _templateObject6$c;
|
|
4560
|
+
var propTypes$Y = {
|
|
4400
4561
|
children: PropTypes.node.isRequired,
|
|
4401
4562
|
onPress: PropTypes.func,
|
|
4402
4563
|
active: PropTypes.bool,
|
|
@@ -4406,9 +4567,9 @@ var propTypes$_ = {
|
|
|
4406
4567
|
// eslint-disable-next-line react/forbid-prop-types
|
|
4407
4568
|
textStyle: PropTypes.any
|
|
4408
4569
|
};
|
|
4409
|
-
var styles$
|
|
4410
|
-
'.dropdown-item': css(_templateObject$
|
|
4411
|
-
'.dropdown-item-text': css(_templateObject2$
|
|
4570
|
+
var styles$N = StyleSheet.create({
|
|
4571
|
+
'.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 "]))),
|
|
4572
|
+
'.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
4573
|
'.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
4574
|
'.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
4575
|
'.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 +4585,11 @@ var DropdownItem = function DropdownItem(props) {
|
|
|
4424
4585
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
4425
4586
|
style = props.style,
|
|
4426
4587
|
textStyle = props.textStyle,
|
|
4427
|
-
elementProps = _objectWithoutProperties(props, _excluded$
|
|
4588
|
+
elementProps = _objectWithoutProperties(props, _excluded$Z);
|
|
4428
4589
|
|
|
4429
4590
|
var dropdown = useForcedContext(DropdownContext);
|
|
4430
|
-
var classes = getStyles(styles$
|
|
4431
|
-
var textClasses = getStyles(styles$
|
|
4591
|
+
var classes = getStyles(styles$N, ['.dropdown-item', active && '.dropdown-item-active', disabled && '.dropdown-item-disabled']);
|
|
4592
|
+
var textClasses = getStyles(styles$N, ['.dropdown-item-text', active && '.dropdown-item-active-text', disabled && '.dropdown-item-disabled-text']);
|
|
4432
4593
|
return /*#__PURE__*/React.createElement(Pressable, _extends({}, elementProps, {
|
|
4433
4594
|
onPress: concatFns(function () {
|
|
4434
4595
|
dropdown.setVisible(false);
|
|
@@ -4440,67 +4601,9 @@ var DropdownItem = function DropdownItem(props) {
|
|
|
4440
4601
|
};
|
|
4441
4602
|
|
|
4442
4603
|
DropdownItem.displayName = 'DropdownItem';
|
|
4443
|
-
DropdownItem.propTypes = propTypes$
|
|
4604
|
+
DropdownItem.propTypes = propTypes$Y;
|
|
4444
4605
|
|
|
4445
|
-
var _excluded
|
|
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;
|
|
4469
|
-
|
|
4470
|
-
var _excluded$_ = ["children", "size", "style"];
|
|
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"];
|
|
4606
|
+
var _excluded$Y = ["children", "style"];
|
|
4504
4607
|
|
|
4505
4608
|
var _templateObject$N;
|
|
4506
4609
|
var propTypes$X = {
|
|
@@ -4509,24 +4612,23 @@ var propTypes$X = {
|
|
|
4509
4612
|
style: PropTypes.any
|
|
4510
4613
|
};
|
|
4511
4614
|
var styles$M = StyleSheet.create({
|
|
4512
|
-
'.dropdown-
|
|
4615
|
+
'.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
4616
|
});
|
|
4514
|
-
var
|
|
4617
|
+
var DropdownTextItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4515
4618
|
var children = props.children,
|
|
4516
4619
|
style = props.style,
|
|
4517
|
-
elementProps = _objectWithoutProperties(props, _excluded$
|
|
4620
|
+
elementProps = _objectWithoutProperties(props, _excluded$Y);
|
|
4518
4621
|
|
|
4519
|
-
var classes = getStyles(styles$M, ['.dropdown-
|
|
4520
|
-
return /*#__PURE__*/React.createElement(
|
|
4622
|
+
var classes = getStyles(styles$M, ['.dropdown-item-text']);
|
|
4623
|
+
return /*#__PURE__*/React.createElement(Text, _extends({}, elementProps, {
|
|
4521
4624
|
ref: ref,
|
|
4522
|
-
size: 6,
|
|
4523
4625
|
style: [classes, style]
|
|
4524
4626
|
}), children);
|
|
4525
4627
|
});
|
|
4526
|
-
|
|
4527
|
-
|
|
4628
|
+
DropdownTextItem.displayName = 'DropdownTextItem';
|
|
4629
|
+
DropdownTextItem.propTypes = propTypes$X;
|
|
4528
4630
|
|
|
4529
|
-
var _excluded$
|
|
4631
|
+
var _excluded$X = ["style"];
|
|
4530
4632
|
|
|
4531
4633
|
var _templateObject$M;
|
|
4532
4634
|
var propTypes$W = {
|
|
@@ -4538,7 +4640,7 @@ var styles$L = StyleSheet.create({
|
|
|
4538
4640
|
});
|
|
4539
4641
|
var DropdownDivider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4540
4642
|
var style = props.style,
|
|
4541
|
-
elementProps = _objectWithoutProperties(props, _excluded$
|
|
4643
|
+
elementProps = _objectWithoutProperties(props, _excluded$X);
|
|
4542
4644
|
|
|
4543
4645
|
var classes = getStyles(styles$L, ['.dropdown-divider']);
|
|
4544
4646
|
return /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
@@ -4549,9 +4651,9 @@ var DropdownDivider = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4549
4651
|
DropdownDivider.displayName = 'DropdownDivider';
|
|
4550
4652
|
DropdownDivider.propTypes = propTypes$W;
|
|
4551
4653
|
|
|
4552
|
-
function useDropdown(defaultVisible, controlledVisible, onToggle, direction) {
|
|
4654
|
+
function useDropdown(defaultVisible, controlledVisible, onToggle, direction, display, autoClose) {
|
|
4553
4655
|
var identifier = useIdentifier('dropdown');
|
|
4554
|
-
var
|
|
4656
|
+
var toggleRef = useRef();
|
|
4555
4657
|
|
|
4556
4658
|
var _useControlledState = useControlledState(defaultVisible, controlledVisible, onToggle),
|
|
4557
4659
|
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
@@ -4563,18 +4665,20 @@ function useDropdown(defaultVisible, controlledVisible, onToggle, direction) {
|
|
|
4563
4665
|
identifier: identifier,
|
|
4564
4666
|
visible: visible,
|
|
4565
4667
|
setVisible: setVisible,
|
|
4566
|
-
|
|
4567
|
-
direction: direction
|
|
4668
|
+
toggleRef: toggleRef,
|
|
4669
|
+
direction: direction,
|
|
4670
|
+
display: display,
|
|
4671
|
+
autoClose: autoClose
|
|
4568
4672
|
};
|
|
4569
4673
|
}, [visible]);
|
|
4570
4674
|
}
|
|
4571
4675
|
|
|
4572
|
-
var _excluded$
|
|
4676
|
+
var _excluded$W = ["onPress"];
|
|
4573
4677
|
function useDismissDropdown(props) {
|
|
4574
4678
|
var context = useForcedContext(DropdownContext);
|
|
4575
4679
|
|
|
4576
4680
|
var handlePress = props.onPress,
|
|
4577
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
4681
|
+
restProps = _objectWithoutProperties(props, _excluded$W);
|
|
4578
4682
|
|
|
4579
4683
|
return _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
4580
4684
|
onPress: function onPress(event) {
|
|
@@ -4584,28 +4688,7 @@ function useDismissDropdown(props) {
|
|
|
4584
4688
|
});
|
|
4585
4689
|
}
|
|
4586
4690
|
|
|
4587
|
-
var _excluded$
|
|
4588
|
-
function useToggleDropdown(props) {
|
|
4589
|
-
var context = useForcedContext(DropdownContext);
|
|
4590
|
-
|
|
4591
|
-
var handlePress = props.onPress,
|
|
4592
|
-
restProps = _objectWithoutProperties(props, _excluded$W);
|
|
4593
|
-
|
|
4594
|
-
return _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
4595
|
-
nativeID: context.identifier,
|
|
4596
|
-
ref: context.triggerRef,
|
|
4597
|
-
onPress: function onPress(event) {
|
|
4598
|
-
if (handlePress) handlePress(event);
|
|
4599
|
-
context.setVisible(function (value) {
|
|
4600
|
-
return !value;
|
|
4601
|
-
});
|
|
4602
|
-
},
|
|
4603
|
-
accessibilityHasPopup: true,
|
|
4604
|
-
accessibilityExpanded: context.visible
|
|
4605
|
-
});
|
|
4606
|
-
}
|
|
4607
|
-
|
|
4608
|
-
var _excluded$V = ["children", "defaultVisible", "visible", "onToggle", "direction", "style"];
|
|
4691
|
+
var _excluded$V = ["children", "defaultVisible", "visible", "onToggle", "direction", "display", "autoClose", "style"];
|
|
4609
4692
|
|
|
4610
4693
|
var _templateObject$L;
|
|
4611
4694
|
var DIRECTIONS = ['top', 'bottom', 'start', 'end'];
|
|
@@ -4615,6 +4698,8 @@ var propTypes$V = {
|
|
|
4615
4698
|
visible: PropTypes.bool,
|
|
4616
4699
|
onToggle: PropTypes.func,
|
|
4617
4700
|
direction: PropTypes.oneOf(DIRECTIONS),
|
|
4701
|
+
display: PropTypes.oneOf(['dynamic', 'static']),
|
|
4702
|
+
autoClose: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['inside', 'outside'])]),
|
|
4618
4703
|
// eslint-disable-next-line react/forbid-prop-types
|
|
4619
4704
|
style: PropTypes.any
|
|
4620
4705
|
};
|
|
@@ -4629,10 +4714,14 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4629
4714
|
onToggle = props.onToggle,
|
|
4630
4715
|
_props$direction = props.direction,
|
|
4631
4716
|
direction = _props$direction === void 0 ? 'bottom' : _props$direction,
|
|
4717
|
+
_props$display = props.display,
|
|
4718
|
+
display = _props$display === void 0 ? 'dynamic' : _props$display,
|
|
4719
|
+
_props$autoClose = props.autoClose,
|
|
4720
|
+
autoClose = _props$autoClose === void 0 ? 'outside' : _props$autoClose,
|
|
4632
4721
|
style = props.style,
|
|
4633
4722
|
elementProps = _objectWithoutProperties(props, _excluded$V);
|
|
4634
4723
|
|
|
4635
|
-
var dropdown = useDropdown(defaultVisible, visible, onToggle, direction);
|
|
4724
|
+
var dropdown = useDropdown(defaultVisible, visible, onToggle, direction, display, autoClose);
|
|
4636
4725
|
var classes = getStyles(styles$K, ['.dropdown']);
|
|
4637
4726
|
return /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
4638
4727
|
ref: ref,
|
|
@@ -4644,10 +4733,11 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
4644
4733
|
Dropdown.displayName = 'Dropdown';
|
|
4645
4734
|
Dropdown.propTypes = propTypes$V;
|
|
4646
4735
|
Dropdown.Context = DropdownContext;
|
|
4647
|
-
Dropdown.
|
|
4648
|
-
Dropdown.Header = DropdownHeader;
|
|
4736
|
+
Dropdown.Toggle = DropdownToggle;
|
|
4649
4737
|
Dropdown.Menu = DropdownMenu;
|
|
4738
|
+
Dropdown.Header = DropdownHeader;
|
|
4650
4739
|
Dropdown.Item = DropdownItem;
|
|
4740
|
+
Dropdown.TextItem = DropdownTextItem;
|
|
4651
4741
|
Dropdown.Divider = DropdownDivider;
|
|
4652
4742
|
Dropdown.useDismiss = useDismissDropdown;
|
|
4653
4743
|
Dropdown.useToggle = useToggleDropdown;
|
|
@@ -5180,9 +5270,10 @@ function injectPopover(Target) {
|
|
|
5180
5270
|
ref: overlayRef,
|
|
5181
5271
|
placement: overlay.placement,
|
|
5182
5272
|
popper: overlay.rendered,
|
|
5183
|
-
style: [{
|
|
5273
|
+
style: [overlay.overlayProps.style, {
|
|
5274
|
+
maxHeight: 'auto',
|
|
5184
5275
|
opacity: overlay.rendered ? 1 : 0
|
|
5185
|
-
}
|
|
5276
|
+
}],
|
|
5186
5277
|
arrowStyle: overlay.arrowProps.style
|
|
5187
5278
|
}), /*#__PURE__*/React.createElement(Popover.Arrow, null), title && /*#__PURE__*/React.createElement(Popover.Header, null, title), /*#__PURE__*/React.createElement(Popover.Body, null, content));
|
|
5188
5279
|
})));
|
|
@@ -5354,9 +5445,10 @@ function injectTooltip(Target) {
|
|
|
5354
5445
|
ref: overlayRef,
|
|
5355
5446
|
placement: overlay.placement,
|
|
5356
5447
|
popper: overlay.rendered,
|
|
5357
|
-
style: [{
|
|
5448
|
+
style: [overlay.overlayProps.style, {
|
|
5449
|
+
maxHeight: 'auto',
|
|
5358
5450
|
opacity: overlay.rendered ? 1 : 0
|
|
5359
|
-
}
|
|
5451
|
+
}],
|
|
5360
5452
|
arrowStyle: overlay.arrowProps.style
|
|
5361
5453
|
}), /*#__PURE__*/React.createElement(Tooltip.Arrow, null), /*#__PURE__*/React.createElement(Tooltip.Inner, null, title));
|
|
5362
5454
|
})));
|
|
@@ -6047,7 +6139,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6047
6139
|
dialogRef: dialogRef,
|
|
6048
6140
|
onClose: handleToggle,
|
|
6049
6141
|
backdrop: backdrop
|
|
6050
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
6142
|
+
}), /*#__PURE__*/React.createElement(OverlayProvider, null, /*#__PURE__*/React.createElement(View, {
|
|
6051
6143
|
ref: dialogRef,
|
|
6052
6144
|
style: dialogClasses
|
|
6053
6145
|
}, /*#__PURE__*/React.createElement(View, _extends({}, elementProps, {
|
|
@@ -6056,7 +6148,7 @@ var Modal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6056
6148
|
textStyle: [contentTextClasses, textStyle]
|
|
6057
6149
|
}), /*#__PURE__*/React.createElement(ModalContext.Provider, {
|
|
6058
6150
|
value: modal
|
|
6059
|
-
}, children)))));
|
|
6151
|
+
}, children))))));
|
|
6060
6152
|
});
|
|
6061
6153
|
Modal.displayName = 'Modal';
|
|
6062
6154
|
Modal.propTypes = propTypes$u;
|
|
@@ -6397,7 +6489,7 @@ function useNavbar(variant, defaultExpanded, controlledExpanded, onToggle, expan
|
|
|
6397
6489
|
setExpanded: setExpanded,
|
|
6398
6490
|
expand: expand
|
|
6399
6491
|
};
|
|
6400
|
-
}, [variant, expanded]);
|
|
6492
|
+
}, [variant, expanded, expand]);
|
|
6401
6493
|
}
|
|
6402
6494
|
|
|
6403
6495
|
var _excluded$m = ["onPress"];
|
|
@@ -6625,7 +6717,7 @@ var Offcanvas = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
6625
6717
|
ref: concatRefs(offcanvasRef, ref),
|
|
6626
6718
|
style: [classes, style],
|
|
6627
6719
|
textStyle: [textClasses, textStyle]
|
|
6628
|
-
}), children));
|
|
6720
|
+
}), /*#__PURE__*/React.createElement(OverlayProvider, null, children)));
|
|
6629
6721
|
});
|
|
6630
6722
|
Offcanvas.displayName = 'Offcanvas';
|
|
6631
6723
|
Offcanvas.propTypes = propTypes$j;
|