bootstrap-rn 0.2.1 → 0.2.3
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 +157 -85
- package/dist/bootstrap-rn.esm.js +157 -85
- package/dist/bootstrap-rn.umd.js +157 -85
- package/dist/bootstrap-rn.umd.min.js +3 -3
- package/package.json +1 -1
package/dist/bootstrap-rn.cjs.js
CHANGED
|
@@ -2555,21 +2555,21 @@ var variables = css(_templateObject$1d || (_templateObject$1d = _taggedTemplateL
|
|
|
2555
2555
|
}, function (t) {
|
|
2556
2556
|
return calculate(t['input-padding-y'], '*', 0.5);
|
|
2557
2557
|
}), add(function (t) {
|
|
2558
|
-
return calculate(t['input-line-height'], '*',
|
|
2558
|
+
return calculate(t['input-line-height'], '*', t['input-font-size']);
|
|
2559
2559
|
}, // 1em
|
|
2560
2560
|
add(function (t) {
|
|
2561
2561
|
return calculate(t['input-padding-y'], '*', 2);
|
|
2562
2562
|
}, function (t) {
|
|
2563
2563
|
return t['input-height-border'];
|
|
2564
2564
|
})), add(function (t) {
|
|
2565
|
-
return calculate(t['input-line-height'], '*',
|
|
2565
|
+
return calculate(t['input-line-height'], '*', t['input-font-size-sm']);
|
|
2566
2566
|
}, // 1em
|
|
2567
2567
|
add(function (t) {
|
|
2568
2568
|
return calculate(t['input-padding-y-sm'], '*', 2);
|
|
2569
2569
|
}, function (t) {
|
|
2570
2570
|
return t['input-height-border'];
|
|
2571
2571
|
})), add(function (t) {
|
|
2572
|
-
return calculate(t['input-line-height'], '*',
|
|
2572
|
+
return calculate(t['input-line-height'], '*', t['input-font-size-lg']);
|
|
2573
2573
|
}, // 1em
|
|
2574
2574
|
add(function (t) {
|
|
2575
2575
|
return calculate(t['input-padding-y-lg'], '*', 2);
|
|
@@ -3510,7 +3510,7 @@ function useToggleButton(props) {
|
|
|
3510
3510
|
|
|
3511
3511
|
var _excluded$1l = ["children", "color", "size", "outline", "active", "disabled", "style", "activeStyle", "textStyle", "activeTextStyle"];
|
|
3512
3512
|
|
|
3513
|
-
var _templateObject$15, _templateObject2$P, _templateObject3$p, _templateObject4$m, _templateObject5$j, _templateObject6$g, _templateObject7$b, _templateObject8$b, _templateObject9$
|
|
3513
|
+
var _templateObject$15, _templateObject2$P, _templateObject3$p, _templateObject4$m, _templateObject5$j, _templateObject6$g, _templateObject7$b, _templateObject8$b, _templateObject9$a, _templateObject10$a, _templateObject11$7, _templateObject12$5, _templateObject13$5, _templateObject14$4, _templateObject15$3, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20$1, _templateObject21, _templateObject22, _templateObject23;
|
|
3514
3514
|
var propTypes$1p = {
|
|
3515
3515
|
children: PropTypes__default["default"].node.isRequired,
|
|
3516
3516
|
color: PropTypes__default["default"].oneOf([].concat(_toConsumableArray(Object.keys(THEME_COLORS)), ['link'])),
|
|
@@ -3550,7 +3550,7 @@ var styles$17 = StyleSheet.create(_objectSpread2(_objectSpread2({
|
|
|
3550
3550
|
return t['btn-active-bg-shade-amount'];
|
|
3551
3551
|
}, value), shadeColor(function (t) {
|
|
3552
3552
|
return t['btn-active-border-shade-amount'];
|
|
3553
|
-
}, value))), _defineProperty(_ref, ".btn-".concat(color, ".active --text"), css(_templateObject7$b || (_templateObject7$b = _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$
|
|
3553
|
+
}, value))), _defineProperty(_ref, ".btn-".concat(color, ".active --text"), css(_templateObject7$b || (_templateObject7$b = _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$a || (_templateObject9$a = _taggedTemplateLiteral(["\n $disabled-color: ", ";\n\n color: $disabled-color;\n "])), colorContrast(value))), _defineProperty(_ref, ".btn-outline-".concat(color), css(_templateObject10$a || (_templateObject10$a = _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$7 || (_templateObject11$7 = _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;
|
|
3554
3554
|
})), {}, {
|
|
3555
3555
|
'.btn-link --text': css(_templateObject14$4 || (_templateObject14$4 = _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 "]))),
|
|
3556
3556
|
'.btn-link.disabled --text': css(_templateObject15$3 || (_templateObject15$3 = _taggedTemplateLiteral(["\n color: $btn-link-disabled-color;\n "]))),
|
|
@@ -3669,7 +3669,7 @@ var propTypes$1n = {
|
|
|
3669
3669
|
styleName: PropTypes__default["default"].any
|
|
3670
3670
|
};
|
|
3671
3671
|
var styles$15 = StyleSheet.create({
|
|
3672
|
-
body: css(_templateObject$13 || (_templateObject$13 = _taggedTemplateLiteral(["\n background-color: $body-bg;\n
|
|
3672
|
+
body: css(_templateObject$13 || (_templateObject$13 = _taggedTemplateLiteral(["\n background-color: $body-bg;\n height: 100%; // added for bootstrap-rn\n "]))),
|
|
3673
3673
|
'body --text': css(_templateObject2$N || (_templateObject2$N = _taggedTemplateLiteral(["\n color: $body-color;\n text-align: $body-text-align;\n "])))
|
|
3674
3674
|
});
|
|
3675
3675
|
var Body = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
@@ -4262,26 +4262,28 @@ function useIdentifier(prefix) {
|
|
|
4262
4262
|
}
|
|
4263
4263
|
|
|
4264
4264
|
function useControlledState(defaultValue, controlledValue) {
|
|
4265
|
-
var
|
|
4265
|
+
var handleChange = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
|
|
4266
4266
|
|
|
4267
4267
|
var _useState = React.useState(defaultValue),
|
|
4268
4268
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4269
4269
|
stateValue = _useState2[0],
|
|
4270
4270
|
setStateValue = _useState2[1];
|
|
4271
4271
|
|
|
4272
|
-
var isControlled =
|
|
4272
|
+
var isControlled = controlledValue !== undefined && controlledValue !== null;
|
|
4273
4273
|
var value = isControlled ? controlledValue : stateValue;
|
|
4274
4274
|
|
|
4275
|
-
var setValue = function setValue(
|
|
4275
|
+
var setValue = function setValue(next) {
|
|
4276
|
+
var nextValue = typeof next === 'function' ? next(value) : next;
|
|
4277
|
+
|
|
4276
4278
|
if (value === nextValue) {
|
|
4277
4279
|
return;
|
|
4278
4280
|
}
|
|
4279
4281
|
|
|
4280
4282
|
if (!isControlled) {
|
|
4281
|
-
setStateValue(
|
|
4283
|
+
setStateValue(next);
|
|
4282
4284
|
}
|
|
4283
4285
|
|
|
4284
|
-
|
|
4286
|
+
handleChange(nextValue);
|
|
4285
4287
|
};
|
|
4286
4288
|
|
|
4287
4289
|
return [value, setValue];
|
|
@@ -4570,7 +4572,7 @@ FormCheckInputNative.propTypes = propTypes$1d;
|
|
|
4570
4572
|
|
|
4571
4573
|
var _excluded$19 = ["type", "value", "onFocus", "onBlur", "disabled", "valid", "invalid", "useNativeComponent", "style"];
|
|
4572
4574
|
|
|
4573
|
-
var _templateObject$Y, _templateObject2$H, _templateObject3$m, _templateObject4$j, _templateObject5$g, _templateObject6$e, _templateObject7$9, _templateObject8$9, _templateObject9$
|
|
4575
|
+
var _templateObject$Y, _templateObject2$H, _templateObject3$m, _templateObject4$j, _templateObject5$g, _templateObject6$e, _templateObject7$9, _templateObject8$9, _templateObject9$9, _templateObject10$9, _templateObject11$6, _templateObject12$4, _templateObject13$4, _templateObject14$3, _templateObject15$2;
|
|
4574
4576
|
/* eslint-disable react/no-unused-prop-types */
|
|
4575
4577
|
|
|
4576
4578
|
var propTypes$1c = {
|
|
@@ -4601,17 +4603,17 @@ var styles$X = StyleSheet.create(_objectSpread2(_objectSpread2({
|
|
|
4601
4603
|
'.form-check-input[type="radio"]:checked': css(_templateObject8$9 || (_templateObject8$9 = _taggedTemplateLiteral(["\n // @if $enable-gradients {\n // background-image: escape-svg($form-check-radio-checked-bg-image), var(--#{$variable-prefix}gradient);\n // } @else {\n background-image: ", ";\n // }\n "])), function (t) {
|
|
4602
4604
|
return escapeSvg(t['form-check-radio-checked-bg-image']);
|
|
4603
4605
|
}),
|
|
4604
|
-
'.form-check-input:disabled': css(_templateObject9$
|
|
4606
|
+
'.form-check-input:disabled': css(_templateObject9$9 || (_templateObject9$9 = _taggedTemplateLiteral(["\n @include platform(web) {\n pointer-events: none;\n filter: none;\n }\n opacity: $form-check-label-disabled-opacity;\n "])))
|
|
4605
4607
|
}, each(FORM_VALIDATION_STATES, function (state, data) {
|
|
4606
4608
|
var _ref;
|
|
4607
4609
|
|
|
4608
|
-
return _ref = {}, _defineProperty(_ref, ".form-check-input:".concat(state), css(_templateObject10$
|
|
4610
|
+
return _ref = {}, _defineProperty(_ref, ".form-check-input:".concat(state), css(_templateObject10$9 || (_templateObject10$9 = _taggedTemplateLiteral(["\n border-color: ", ";\n\n &:focus {\n border-color: ", "; // added for bootstrap-rn\n @include platform(web) {\n box-shadow: 0 0 $input-btn-focus-blur $input-focus-width\n rgba(", ", $input-btn-focus-color-opacity);\n }\n }\n "])), function (t) {
|
|
4609
4611
|
return data(t).color;
|
|
4610
4612
|
}, function (t) {
|
|
4611
4613
|
return data(t).color;
|
|
4612
4614
|
}, function (t) {
|
|
4613
4615
|
return data(t).color;
|
|
4614
|
-
})), _defineProperty(_ref, ".form-check-input:".concat(state, ":checked"), css(_templateObject11$
|
|
4616
|
+
})), _defineProperty(_ref, ".form-check-input:".concat(state, ":checked"), css(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteral(["\n background-color: ", ";\n "])), function (t) {
|
|
4615
4617
|
return data(t).color;
|
|
4616
4618
|
})), _ref;
|
|
4617
4619
|
})), {}, {
|
|
@@ -4981,7 +4983,7 @@ BackdropHandler.propTypes = propTypes$17;
|
|
|
4981
4983
|
|
|
4982
4984
|
var _excluded$15 = ["children", "start", "right", "end", "style", "textStyle"];
|
|
4983
4985
|
|
|
4984
|
-
var _templateObject$U, _templateObject2$F, _templateObject3$k, _templateObject4$h, _templateObject5$e, _templateObject6$d, _templateObject7$8, _templateObject8$8, _templateObject9$
|
|
4986
|
+
var _templateObject$U, _templateObject2$F, _templateObject3$k, _templateObject4$h, _templateObject5$e, _templateObject6$d, _templateObject7$8, _templateObject8$8, _templateObject9$8, _templateObject10$8;
|
|
4985
4987
|
var ALIGNMENT_BREAKPOINTS = [true, 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
4986
4988
|
var propTypes$16 = {
|
|
4987
4989
|
children: PropTypes__default["default"].node.isRequired,
|
|
@@ -5006,9 +5008,9 @@ var styles$T = StyleSheet.create(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
|
5006
5008
|
'.dropstart .dropdown-menu[data-bs-popper]': css(_templateObject7$8 || (_templateObject7$8 = _taggedTemplateLiteral(["\n top: 0;\n right: 100%;\n left: auto;\n margin-top: 0;\n margin-right: $dropdown-spacer;\n "]))),
|
|
5007
5009
|
'.navbar-nav .dropdown-menu': css(_templateObject8$8 || (_templateObject8$8 = _taggedTemplateLiteral(["\n position: relative; // static;\n "])))
|
|
5008
5010
|
}, each(GRID_BREAKPOINTS, function (breakpoint) {
|
|
5009
|
-
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .navbar-nav .dropdown-menu"), css(_templateObject9$
|
|
5011
|
+
return _defineProperty({}, ".navbar-expand".concat(infix(next(breakpoint)), " .navbar-nav .dropdown-menu"), css(_templateObject9$8 || (_templateObject9$8 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(", ") {\n position: absolute;\n }\n "])), next(breakpoint)));
|
|
5010
5012
|
})), {}, {
|
|
5011
|
-
'.dropdown-menu --text': css(_templateObject10$
|
|
5013
|
+
'.dropdown-menu --text': css(_templateObject10$8 || (_templateObject10$8 = _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 "])))
|
|
5012
5014
|
}));
|
|
5013
5015
|
|
|
5014
5016
|
var getAlignment = function getAlignment(media, start, end) {
|
|
@@ -5674,7 +5676,7 @@ TextInput.propTypes = propTypes$U;
|
|
|
5674
5676
|
|
|
5675
5677
|
var _excluded$R = ["size", "placeholderTextColor", "multiline", "disabled", "valid", "invalid", "editable", "selectTextOnFocus", "style"];
|
|
5676
5678
|
|
|
5677
|
-
var _templateObject$H, _templateObject2$w, _templateObject3$g, _templateObject4$e, _templateObject5$c, _templateObject6$b, _templateObject7$7, _templateObject8$7;
|
|
5679
|
+
var _templateObject$H, _templateObject2$w, _templateObject3$g, _templateObject4$e, _templateObject5$c, _templateObject6$b, _templateObject7$7, _templateObject8$7, _templateObject9$7, _templateObject10$7, _templateObject11$5;
|
|
5678
5680
|
var propTypes$T = {
|
|
5679
5681
|
size: PropTypes__default["default"].oneOf(['sm', 'lg']),
|
|
5680
5682
|
placeholderTextColor: PropTypes__default["default"].string,
|
|
@@ -5686,17 +5688,36 @@ var propTypes$T = {
|
|
|
5686
5688
|
selectTextOnFocus: PropTypes__default["default"].bool,
|
|
5687
5689
|
// eslint-disable-next-line react/forbid-prop-types
|
|
5688
5690
|
style: PropTypes__default["default"].any
|
|
5689
|
-
};
|
|
5691
|
+
}; // Known issues:
|
|
5692
|
+
//
|
|
5693
|
+
// line-height (iOS)
|
|
5694
|
+
// If a line height is defined on iOS the text will be displayed on the bottom
|
|
5695
|
+
// of the line. As a workaround the line height is only defined for multi line
|
|
5696
|
+
// inputs.
|
|
5697
|
+
//
|
|
5698
|
+
// multi line height (iOS)
|
|
5699
|
+
// A multi line input on iOS has only the height of a single line input. As a
|
|
5700
|
+
// workaround we added a height of $input-height-sm + 8rem for multi line
|
|
5701
|
+
// inputs on iOS.
|
|
5702
|
+
//
|
|
5703
|
+
// single line height (Android)
|
|
5704
|
+
// If no height is defined, Android sets a text line height of 28px auto-
|
|
5705
|
+
// matically, which leads to a larger height than min height for the default
|
|
5706
|
+
// and sm size. As a workaround we set a height for single line inputs.
|
|
5707
|
+
|
|
5690
5708
|
var styles$G = StyleSheet.create(_objectSpread2({
|
|
5691
|
-
'.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 // @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 }\n "]))),
|
|
5709
|
+
'.form-control': css(_templateObject$H || (_templateObject$H = _taggedTemplateLiteral(["\n // display: block;\n width: 100%;\n min-height: $input-height; // added for bootstrap-rn\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 @include platform(web) {\n line-height: $input-font-size * $input-line-height;\n }\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 // @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 }\n "]))),
|
|
5692
5710
|
'.form-control.disabled': css(_templateObject2$w || (_templateObject2$w = _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 "]))),
|
|
5693
|
-
'.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 line-height: $input-font-size-sm * $line-height-base; // added for bootstrap-rn\n border-radius: $input-border-radius-sm;\n "]))),
|
|
5694
|
-
'.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 line-height: $input-font-size-lg * $line-height-base; // added for bootstrap-rn\n border-radius: $input-border-radius-lg;\n "]))),
|
|
5695
|
-
'.form-control
|
|
5696
|
-
'.form-control-
|
|
5697
|
-
'.form-control-
|
|
5711
|
+
'.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 @include platform(web) {\n line-height: $input-font-size-sm * $line-height-base; // added for bootstrap-rn\n }\n border-radius: $input-border-radius-sm;\n "]))),
|
|
5712
|
+
'.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 @include platform(web) {\n line-height: $input-font-size-lg * $line-height-base; // added for bootstrap-rn\n }\n border-radius: $input-border-radius-lg;\n "]))),
|
|
5713
|
+
'.form-control:not(textarea)': css(_templateObject5$c || (_templateObject5$c = _taggedTemplateLiteral(["\n @include platform(android) {\n height: $input-height; // added for bootstrap-rn\n }\n "]))),
|
|
5714
|
+
'.form-control-sm:not(textarea)': css(_templateObject6$b || (_templateObject6$b = _taggedTemplateLiteral(["\n @include platform(android) {\n height: $input-height-sm; // added for bootstrap-rn\n }\n "]))),
|
|
5715
|
+
'.form-control-lg:not(textarea)': css(_templateObject7$7 || (_templateObject7$7 = _taggedTemplateLiteral(["\n @include platform(android) {\n height: $input-height-lg; // added for bootstrap-rn\n }\n "]))),
|
|
5716
|
+
'textarea.form-control': css(_templateObject8$7 || (_templateObject8$7 = _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 @include platform(native) {\n line-height: $input-font-size * $input-line-height; // added for bootstrap-rn\n }\n "]))),
|
|
5717
|
+
'textarea.form-control-sm': css(_templateObject9$7 || (_templateObject9$7 = _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 @include platform(native) {\n line-height: $input-font-size-sm * $line-height-base; // added for bootstrap-rn\n }\n "]))),
|
|
5718
|
+
'textarea.form-control-lg': css(_templateObject10$7 || (_templateObject10$7 = _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 @include platform(native) {\n line-height: $input-font-size-sm * $line-height-base; // added for bootstrap-rn\n }\n "])))
|
|
5698
5719
|
}, each(FORM_VALIDATION_STATES, function (state, data) {
|
|
5699
|
-
return _defineProperty({}, ".form-control:".concat(state), css(
|
|
5720
|
+
return _defineProperty({}, ".form-control:".concat(state), css(_templateObject11$5 || (_templateObject11$5 = _taggedTemplateLiteral(["\n border-color: ", ";\n\n &:focus {\n border-color: ", ";\n @include platform(web) {\n box-shadow: 0 0 $input-btn-focus-blur $input-focus-width\n rgba(", ", $input-btn-focus-color-opacity);\n }\n }\n "])), function (t) {
|
|
5700
5721
|
return data(t).color;
|
|
5701
5722
|
}, function (t) {
|
|
5702
5723
|
return data(t).color;
|
|
@@ -5728,7 +5749,7 @@ var Input = /*#__PURE__*/React__default["default"].forwardRef(function (props, r
|
|
|
5728
5749
|
style = modifierProps.style,
|
|
5729
5750
|
elementProps = _objectWithoutProperties(modifierProps, _excluded$R);
|
|
5730
5751
|
|
|
5731
|
-
var classes = getStyles(styles$G, ['.form-control', disabled && '.form-control.disabled', size === 'sm' && '.form-control-sm', size === 'lg' && '.form-control-lg', multiline && '.form-control
|
|
5752
|
+
var classes = getStyles(styles$G, ['.form-control', disabled && '.form-control.disabled', size === 'sm' && '.form-control-sm', size === 'lg' && '.form-control-lg', !multiline && '.form-control:not(textarea)', !multiline && size === 'sm' && '.form-control-sm:not(textarea)', !multiline && size === 'lg' && '.form-control-lg:not(textarea)', multiline && 'textarea.form-control', multiline && size === 'sm' && 'textarea.form-control-sm', multiline && size === 'lg' && 'textarea.form-control-lg', valid && '.form-control:valid', invalid && '.form-control:invalid']);
|
|
5732
5753
|
return /*#__PURE__*/React__default["default"].createElement(TextInput, _extends({}, elementProps, {
|
|
5733
5754
|
ref: modifierRef,
|
|
5734
5755
|
placeholderTextColor: placeholderTextColor,
|
|
@@ -6833,7 +6854,7 @@ var ModalTitle = /*#__PURE__*/React__default["default"].forwardRef(function (pro
|
|
|
6833
6854
|
ModalTitle.displayName = 'ModalTitle';
|
|
6834
6855
|
ModalTitle.propTypes = propTypes$B;
|
|
6835
6856
|
|
|
6836
|
-
var _excluded$y = ["children", "style", "
|
|
6857
|
+
var _excluded$y = ["children", "style", "innerStyle"];
|
|
6837
6858
|
|
|
6838
6859
|
var _templateObject$t;
|
|
6839
6860
|
var propTypes$A = {
|
|
@@ -6841,7 +6862,7 @@ var propTypes$A = {
|
|
|
6841
6862
|
// eslint-disable-next-line react/forbid-prop-types
|
|
6842
6863
|
style: PropTypes__default["default"].any,
|
|
6843
6864
|
// eslint-disable-next-line react/forbid-prop-types
|
|
6844
|
-
|
|
6865
|
+
innerStyle: PropTypes__default["default"].any
|
|
6845
6866
|
};
|
|
6846
6867
|
var styles$t = StyleSheet.create({
|
|
6847
6868
|
'.modal-body': css(_templateObject$t || (_templateObject$t = _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 "])))
|
|
@@ -6849,7 +6870,7 @@ var styles$t = StyleSheet.create({
|
|
|
6849
6870
|
var ModalBody = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
6850
6871
|
var children = props.children,
|
|
6851
6872
|
style = props.style,
|
|
6852
|
-
|
|
6873
|
+
innerStyle = props.innerStyle,
|
|
6853
6874
|
elementProps = _objectWithoutProperties(props, _excluded$y);
|
|
6854
6875
|
|
|
6855
6876
|
var _useForcedContext = useForcedContext(ModalContext),
|
|
@@ -6860,7 +6881,7 @@ var ModalBody = /*#__PURE__*/React__default["default"].forwardRef(function (prop
|
|
|
6860
6881
|
return /*#__PURE__*/React__default["default"].createElement(FlexView, _extends({}, elementProps, {
|
|
6861
6882
|
ref: ref,
|
|
6862
6883
|
style: scrollable ? style : [classes, style],
|
|
6863
|
-
contentContainerStyle: scrollable ? [classes,
|
|
6884
|
+
contentContainerStyle: scrollable ? [classes, innerStyle] : undefined
|
|
6864
6885
|
}), children);
|
|
6865
6886
|
});
|
|
6866
6887
|
ModalBody.displayName = 'ModalBody';
|
|
@@ -6891,7 +6912,7 @@ var ModalFooter = /*#__PURE__*/React__default["default"].forwardRef(function (pr
|
|
|
6891
6912
|
ModalFooter.displayName = 'ModalFooter';
|
|
6892
6913
|
ModalFooter.propTypes = propTypes$z;
|
|
6893
6914
|
|
|
6894
|
-
var _excluded$w = ["children", "visible", "size", "backdrop", "scrollable", "centered", "onToggle", "style", "textStyle"];
|
|
6915
|
+
var _excluded$w = ["children", "visible", "size", "backdrop", "scrollable", "centered", "onToggle", "style", "innerStyle", "dialogStyle", "contentStyle", "textStyle", "dialogTextStyle", "contentTextStyle"];
|
|
6895
6916
|
|
|
6896
6917
|
var _templateObject$r, _templateObject2$l, _templateObject3$a, _templateObject4$8, _templateObject5$6, _templateObject6$5, _templateObject7$3, _templateObject8$3, _templateObject9$3, _templateObject10$3, _templateObject11$2;
|
|
6897
6918
|
var MODAL_SIZES = ['sm', 'lg', 'xl'];
|
|
@@ -6906,7 +6927,17 @@ var propTypes$y = {
|
|
|
6906
6927
|
// eslint-disable-next-line react/forbid-prop-types
|
|
6907
6928
|
style: PropTypes__default["default"].any,
|
|
6908
6929
|
// eslint-disable-next-line react/forbid-prop-types
|
|
6909
|
-
|
|
6930
|
+
innerStyle: PropTypes__default["default"].any,
|
|
6931
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
6932
|
+
dialogStyle: PropTypes__default["default"].any,
|
|
6933
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
6934
|
+
contentStyle: PropTypes__default["default"].any,
|
|
6935
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
6936
|
+
textStyle: PropTypes__default["default"].any,
|
|
6937
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
6938
|
+
dialogTextStyle: PropTypes__default["default"].any,
|
|
6939
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
6940
|
+
contentTextStyle: PropTypes__default["default"].any
|
|
6910
6941
|
};
|
|
6911
6942
|
var styles$r = StyleSheet.create({
|
|
6912
6943
|
'.modal': css(_templateObject$r || (_templateObject$r = _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 "]))),
|
|
@@ -6918,8 +6949,8 @@ var styles$r = StyleSheet.create({
|
|
|
6918
6949
|
'.modal-content --text': css(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteral(["\n color: $modal-content-color;\n "]))),
|
|
6919
6950
|
'.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 "]))),
|
|
6920
6951
|
'.modal-sm': css(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(sm) {\n max-width: $modal-sm;\n }\n "]))),
|
|
6921
|
-
'.modal-lg': css(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(lg) {\n max-width: $modal-lg;\n }\n
|
|
6922
|
-
'.modal-xl': css(_templateObject11$2 || (_templateObject11$2 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(xl) {\n max-width: $modal-xl;\n }\n "])))
|
|
6952
|
+
'.modal-lg': css(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteral(["\n @include media-breakpoint-up(lg) {\n max-width: $modal-lg;\n }\n "]))),
|
|
6953
|
+
'.modal-xl': css(_templateObject11$2 || (_templateObject11$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 "])))
|
|
6923
6954
|
});
|
|
6924
6955
|
var Modal = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
6925
6956
|
var children = props.children,
|
|
@@ -6933,7 +6964,12 @@ var Modal = /*#__PURE__*/React__default["default"].forwardRef(function (props, r
|
|
|
6933
6964
|
centered = _props$centered === void 0 ? false : _props$centered,
|
|
6934
6965
|
handleToggle = props.onToggle,
|
|
6935
6966
|
style = props.style,
|
|
6967
|
+
innerStyle = props.innerStyle,
|
|
6968
|
+
dialogStyle = props.dialogStyle,
|
|
6969
|
+
contentStyle = props.contentStyle,
|
|
6936
6970
|
textStyle = props.textStyle,
|
|
6971
|
+
dialogTextStyle = props.dialogTextStyle,
|
|
6972
|
+
contentTextStyle = props.contentTextStyle,
|
|
6937
6973
|
elementProps = _objectWithoutProperties(props, _excluded$w);
|
|
6938
6974
|
|
|
6939
6975
|
var dialogRef = React.useRef();
|
|
@@ -6956,10 +6992,11 @@ var Modal = /*#__PURE__*/React__default["default"].forwardRef(function (props, r
|
|
|
6956
6992
|
}, backdrop && /*#__PURE__*/React__default["default"].createElement(View, {
|
|
6957
6993
|
style: backdropClasses
|
|
6958
6994
|
}), /*#__PURE__*/React__default["default"].createElement(FlexView, {
|
|
6959
|
-
style: classes,
|
|
6960
|
-
|
|
6995
|
+
style: [classes, style],
|
|
6996
|
+
textStyle: textStyle,
|
|
6997
|
+
contentContainerStyle: [scrollable ? undefined : {
|
|
6961
6998
|
flexGrow: 1
|
|
6962
|
-
}
|
|
6999
|
+
}, innerStyle]
|
|
6963
7000
|
}, /*#__PURE__*/React__default["default"].createElement(BackdropHandler, {
|
|
6964
7001
|
dialogRef: dialogRef,
|
|
6965
7002
|
onClose: handleToggle,
|
|
@@ -6970,11 +7007,12 @@ var Modal = /*#__PURE__*/React__default["default"].forwardRef(function (props, r
|
|
|
6970
7007
|
}
|
|
6971
7008
|
}, /*#__PURE__*/React__default["default"].createElement(View, {
|
|
6972
7009
|
ref: dialogRef,
|
|
6973
|
-
style: dialogClasses
|
|
7010
|
+
style: [dialogClasses, dialogStyle],
|
|
7011
|
+
textStyle: dialogTextStyle
|
|
6974
7012
|
}, /*#__PURE__*/React__default["default"].createElement(View, _extends({}, elementProps, {
|
|
6975
7013
|
ref: ref,
|
|
6976
|
-
style: [contentClasses,
|
|
6977
|
-
textStyle: [contentTextClasses,
|
|
7014
|
+
style: [contentClasses, contentStyle],
|
|
7015
|
+
textStyle: [contentTextClasses, contentTextStyle]
|
|
6978
7016
|
}), /*#__PURE__*/React__default["default"].createElement(ModalContext.Provider, {
|
|
6979
7017
|
value: modal
|
|
6980
7018
|
}, /*#__PURE__*/React__default["default"].createElement(overlays.OverlayProvider, null, children)))))));
|
|
@@ -7497,7 +7535,7 @@ var OffcanvasBody = /*#__PURE__*/React__default["default"].forwardRef(function (
|
|
|
7497
7535
|
OffcanvasBody.displayName = 'OffcanvasBody';
|
|
7498
7536
|
OffcanvasBody.propTypes = propTypes$o;
|
|
7499
7537
|
|
|
7500
|
-
var _excluded$j = ["children", "visible", "placement", "backdrop", "scroll", "onToggle", "style", "textStyle"];
|
|
7538
|
+
var _excluded$j = ["children", "visible", "placement", "backdrop", "scroll", "onToggle", "style", "dialogStyle", "textStyle", "dialogTextStyle"];
|
|
7501
7539
|
|
|
7502
7540
|
var _templateObject$g, _templateObject2$b, _templateObject3$4, _templateObject4$3, _templateObject5$3, _templateObject6$2, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
7503
7541
|
var PLACEMENTS = ['top', 'bottom', 'start', 'end']; // , 'auto'
|
|
@@ -7513,7 +7551,11 @@ var propTypes$n = {
|
|
|
7513
7551
|
// eslint-disable-next-line react/forbid-prop-types
|
|
7514
7552
|
style: PropTypes__default["default"].any,
|
|
7515
7553
|
// eslint-disable-next-line react/forbid-prop-types
|
|
7516
|
-
|
|
7554
|
+
dialogStyle: PropTypes__default["default"].any,
|
|
7555
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
7556
|
+
textStyle: PropTypes__default["default"].any,
|
|
7557
|
+
// eslint-disable-next-line react/forbid-prop-types
|
|
7558
|
+
dialogTextStyle: PropTypes__default["default"].any
|
|
7517
7559
|
};
|
|
7518
7560
|
var styles$g = StyleSheet.create(_objectSpread2({
|
|
7519
7561
|
'.offcanvas': css(_templateObject$g || (_templateObject$g = _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 "]))),
|
|
@@ -7545,7 +7587,9 @@ var Offcanvas = /*#__PURE__*/React__default["default"].forwardRef(function (prop
|
|
|
7545
7587
|
scroll = _props$scroll === void 0 ? false : _props$scroll,
|
|
7546
7588
|
handleToggle = props.onToggle,
|
|
7547
7589
|
style = props.style,
|
|
7590
|
+
dialogStyle = props.dialogStyle,
|
|
7548
7591
|
textStyle = props.textStyle,
|
|
7592
|
+
dialogTextStyle = props.dialogTextStyle,
|
|
7549
7593
|
elementProps = _objectWithoutProperties(props, _excluded$j);
|
|
7550
7594
|
|
|
7551
7595
|
var media = useMedia();
|
|
@@ -7588,7 +7632,8 @@ var Offcanvas = /*#__PURE__*/React__default["default"].forwardRef(function (prop
|
|
|
7588
7632
|
flexShrink: 1
|
|
7589
7633
|
}
|
|
7590
7634
|
}, /*#__PURE__*/React__default["default"].createElement(View, {
|
|
7591
|
-
style: dialogClasses
|
|
7635
|
+
style: [dialogClasses, dialogStyle],
|
|
7636
|
+
textStyle: dialogTextStyle
|
|
7592
7637
|
}, /*#__PURE__*/React__default["default"].createElement(OffcanvasContext.Provider, {
|
|
7593
7638
|
value: offcanvas
|
|
7594
7639
|
}, /*#__PURE__*/React__default["default"].createElement(overlays.OverlayProvider, null, children))))));
|
|
@@ -7669,7 +7714,7 @@ PickerWeb.propTypes = propTypes$m;
|
|
|
7669
7714
|
var PickerNativeContext = /*#__PURE__*/React__default["default"].createContext();
|
|
7670
7715
|
PickerNativeContext.displayName = 'PickerNativeContext';
|
|
7671
7716
|
|
|
7672
|
-
var _excluded$h = ["children", "selectedValue", "onValueChange", "onFocus", "onBlur", "placeholder", "placeholderTextColor", "disabled", "style"];
|
|
7717
|
+
var _excluded$h = ["children", "selectedValue", "onValueChange", "onFocus", "onBlur", "placeholder", "placeholderTextColor", "disabled", "MenuComponent", "style"];
|
|
7673
7718
|
|
|
7674
7719
|
var _templateObject$f;
|
|
7675
7720
|
var propTypes$l = {
|
|
@@ -7681,6 +7726,7 @@ var propTypes$l = {
|
|
|
7681
7726
|
placeholder: PropTypes__default["default"].string,
|
|
7682
7727
|
placeholderTextColor: PropTypes__default["default"].string,
|
|
7683
7728
|
disabled: PropTypes__default["default"].bool,
|
|
7729
|
+
MenuComponent: PropTypes__default["default"].elementType,
|
|
7684
7730
|
// eslint-disable-next-line react/forbid-prop-types
|
|
7685
7731
|
style: PropTypes__default["default"].any
|
|
7686
7732
|
};
|
|
@@ -7704,20 +7750,59 @@ var extractTextStyles = function extractTextStyles(style) {
|
|
|
7704
7750
|
return textStyles;
|
|
7705
7751
|
};
|
|
7706
7752
|
|
|
7753
|
+
var getText = function getText(_ref3) {
|
|
7754
|
+
var children = _ref3.children,
|
|
7755
|
+
selectedValue = _ref3.selectedValue;
|
|
7756
|
+
var items = React__default["default"].Children.map(children, function (child) {
|
|
7757
|
+
return {
|
|
7758
|
+
label: child.props.label,
|
|
7759
|
+
value: child.props.value
|
|
7760
|
+
};
|
|
7761
|
+
});
|
|
7762
|
+
var selectedItem = items.find(function (item) {
|
|
7763
|
+
return item.value === selectedValue;
|
|
7764
|
+
});
|
|
7765
|
+
return selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.label;
|
|
7766
|
+
};
|
|
7767
|
+
/* eslint-disable react/prop-types */
|
|
7768
|
+
|
|
7769
|
+
|
|
7770
|
+
var DefaultMenuComponent = function DefaultMenuComponent(_ref4) {
|
|
7771
|
+
var children = _ref4.children,
|
|
7772
|
+
selectedValue = _ref4.selectedValue,
|
|
7773
|
+
handleValueChange = _ref4.onValueChange,
|
|
7774
|
+
handleClose = _ref4.onClose;
|
|
7775
|
+
return /*#__PURE__*/React__default["default"].createElement(Offcanvas, {
|
|
7776
|
+
placement: "bottom",
|
|
7777
|
+
visible: true,
|
|
7778
|
+
onToggle: handleClose
|
|
7779
|
+
}, /*#__PURE__*/React__default["default"].createElement(Offcanvas.Body, {
|
|
7780
|
+
contentContainerStyle: styles$f.menu
|
|
7781
|
+
}, /*#__PURE__*/React__default["default"].createElement(PickerNativeContext.Provider, {
|
|
7782
|
+
value: {
|
|
7783
|
+
selectedValue: selectedValue,
|
|
7784
|
+
handleValueChange: handleValueChange
|
|
7785
|
+
}
|
|
7786
|
+
}, children)));
|
|
7787
|
+
};
|
|
7788
|
+
/* eslint-enable */
|
|
7789
|
+
|
|
7790
|
+
|
|
7707
7791
|
var PickerNative = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
7708
7792
|
var children = props.children,
|
|
7709
7793
|
selectedValue = props.selectedValue,
|
|
7710
7794
|
_props$onValueChange = props.onValueChange,
|
|
7711
|
-
|
|
7795
|
+
onValueChange = _props$onValueChange === void 0 ? function () {} : _props$onValueChange,
|
|
7712
7796
|
_props$onFocus = props.onFocus,
|
|
7713
7797
|
onFocus = _props$onFocus === void 0 ? function () {} : _props$onFocus,
|
|
7714
7798
|
_props$onBlur = props.onBlur,
|
|
7715
7799
|
onBlur = _props$onBlur === void 0 ? function () {} : _props$onBlur,
|
|
7716
7800
|
placeholder = props.placeholder,
|
|
7717
|
-
|
|
7718
|
-
placeholderTextColor = _props$placeholderTex === void 0 ? StyleSheet.value('input-placeholder-color') : _props$placeholderTex,
|
|
7801
|
+
placeholderTextColor = props.placeholderTextColor,
|
|
7719
7802
|
_props$disabled = props.disabled,
|
|
7720
7803
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
7804
|
+
_props$MenuComponent = props.MenuComponent,
|
|
7805
|
+
MenuComponent = _props$MenuComponent === void 0 ? DefaultMenuComponent : _props$MenuComponent,
|
|
7721
7806
|
style = props.style,
|
|
7722
7807
|
elementProps = _objectWithoutProperties(props, _excluded$h);
|
|
7723
7808
|
|
|
@@ -7725,29 +7810,26 @@ var PickerNative = /*#__PURE__*/React__default["default"].forwardRef(function (p
|
|
|
7725
7810
|
|
|
7726
7811
|
var _useState = React.useState(false),
|
|
7727
7812
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7728
|
-
|
|
7729
|
-
|
|
7813
|
+
visible = _useState2[0],
|
|
7814
|
+
setVisible = _useState2[1];
|
|
7730
7815
|
|
|
7731
|
-
var items = React__default["default"].Children.map(children, function (child) {
|
|
7732
|
-
return {
|
|
7733
|
-
label: child.props.label,
|
|
7734
|
-
value: child.props.value
|
|
7735
|
-
};
|
|
7736
|
-
});
|
|
7737
|
-
var selectedItem = items.find(function (item) {
|
|
7738
|
-
return item.value === selectedValue;
|
|
7739
|
-
});
|
|
7740
7816
|
var textStyle = extractTextStyles(background.style);
|
|
7741
7817
|
var showPlaceholder = placeholder && (selectedValue === undefined || selectedValue === null);
|
|
7818
|
+
|
|
7819
|
+
var handleValueChange = function handleValueChange(nextValue) {
|
|
7820
|
+
onValueChange(nextValue);
|
|
7821
|
+
setVisible(false);
|
|
7822
|
+
};
|
|
7823
|
+
|
|
7824
|
+
var handleClose = function handleClose() {
|
|
7825
|
+
setVisible(false);
|
|
7826
|
+
};
|
|
7827
|
+
|
|
7742
7828
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Pressable, _extends({}, elementProps, {
|
|
7743
7829
|
ref: ref,
|
|
7744
7830
|
accessibilityRole: "combobox",
|
|
7745
|
-
accessibilityDisabled: disabled,
|
|
7746
|
-
accessible: true,
|
|
7747
|
-
focusable: !disabled,
|
|
7748
|
-
selectable: false,
|
|
7749
7831
|
onPress: function onPress() {
|
|
7750
|
-
|
|
7832
|
+
setVisible(true);
|
|
7751
7833
|
},
|
|
7752
7834
|
onFocus: onFocus,
|
|
7753
7835
|
onBlur: onBlur,
|
|
@@ -7758,24 +7840,14 @@ var PickerNative = /*#__PURE__*/React__default["default"].forwardRef(function (p
|
|
|
7758
7840
|
style: [textStyle, showPlaceholder && {
|
|
7759
7841
|
color: placeholderTextColor
|
|
7760
7842
|
}]
|
|
7761
|
-
},
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
}, /*#__PURE__*/React__default["default"].createElement(PickerNativeContext.Provider, {
|
|
7770
|
-
value: {
|
|
7771
|
-
selectedValue: selectedValue,
|
|
7772
|
-
onValueChange: function onValueChange(nextValue) {
|
|
7773
|
-
_onValueChange(nextValue);
|
|
7774
|
-
|
|
7775
|
-
setOpen(false);
|
|
7776
|
-
}
|
|
7777
|
-
}
|
|
7778
|
-
}, children))));
|
|
7843
|
+
}, showPlaceholder ? placeholder : getText({
|
|
7844
|
+
children: children,
|
|
7845
|
+
selectedValue: selectedValue
|
|
7846
|
+
}))), visible && /*#__PURE__*/React__default["default"].createElement(MenuComponent, {
|
|
7847
|
+
selectedValue: selectedValue,
|
|
7848
|
+
onValueChange: handleValueChange,
|
|
7849
|
+
onClose: handleClose
|
|
7850
|
+
}, children));
|
|
7779
7851
|
});
|
|
7780
7852
|
PickerNative.propTypes = propTypes$l;
|
|
7781
7853
|
|
|
@@ -7825,7 +7897,7 @@ var PickerNativeItem = /*#__PURE__*/React__default["default"].forwardRef(functio
|
|
|
7825
7897
|
|
|
7826
7898
|
var _useForcedContext = useForcedContext(PickerNativeContext),
|
|
7827
7899
|
selectedValue = _useForcedContext.selectedValue,
|
|
7828
|
-
|
|
7900
|
+
handleValueChange = _useForcedContext.handleValueChange;
|
|
7829
7901
|
|
|
7830
7902
|
var media = useMedia();
|
|
7831
7903
|
var classes = getStyles(styles$e, ['item', disabled && 'itemDisabled']);
|
|
@@ -7834,7 +7906,7 @@ var PickerNativeItem = /*#__PURE__*/React__default["default"].forwardRef(functio
|
|
|
7834
7906
|
return /*#__PURE__*/React__default["default"].createElement(Pressable, {
|
|
7835
7907
|
ref: ref,
|
|
7836
7908
|
onPress: function onPress() {
|
|
7837
|
-
|
|
7909
|
+
handleValueChange(value);
|
|
7838
7910
|
},
|
|
7839
7911
|
accessibilitySelected: selected,
|
|
7840
7912
|
disabled: disabled,
|