@pdg/react-form 1.2.16 → 1.2.17
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/PFormItemCustom/PFormRadioGroup/PFormRadioGroup.d.ts +1 -0
- package/dist/index.esm.js +144 -149
- package/dist/index.js +144 -149
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PFormRadioGroupProps, PFormRadioGroupSingleValue, PFormRadioGroupItems } from './PFormRadioGroup.types';
|
|
3
|
+
import './PFormRadioGroup.scss';
|
|
3
4
|
declare function PFormRadioGroup<BaseValue extends PFormRadioGroupSingleValue, Items extends PFormRadioGroupItems<BaseValue> = PFormRadioGroupItems<BaseValue>>({ ref,
|
|
4
5
|
/********************************************************************************************************************/
|
|
5
6
|
variant: initVariant, size: initSize, color: initColor, focused: initFocused, fullWidth: initFullWidth, hidden: initHidden, startAdornment, endAdornment,
|
package/dist/index.esm.js
CHANGED
|
@@ -7385,7 +7385,7 @@ var PFormCheckbox = function PFormCheckbox(t0) {
|
|
|
7385
7385
|
};
|
|
7386
7386
|
function _temp$q() {
|
|
7387
7387
|
return "PFormCheckbox";
|
|
7388
|
-
}var _excluded$g = ["ref", "variant", "size", "color", "focused", "fullWidth", "hidden", "startAdornment", "endAdornment", "name", "width", "labelIcon", "label", "inline", "loading", "nowrap", "items", "value", "data", "error", "helperText", "disabled", "readOnly", "required", "exceptValue", "onLoadItems", "onChange", "onValue", "onValidate", "className", "style", "sx"];
|
|
7388
|
+
}insertStyle(".PFormRadioGroup .PFormRadioGroup-Item.PFormRadioGroup-Item--error .MuiTypography-root{color:var(--error-color) !important}");var _excluded$g = ["ref", "variant", "size", "color", "focused", "fullWidth", "hidden", "startAdornment", "endAdornment", "name", "width", "labelIcon", "label", "inline", "loading", "nowrap", "items", "value", "data", "error", "helperText", "disabled", "readOnly", "required", "exceptValue", "onLoadItems", "onChange", "onValue", "onValidate", "className", "style", "sx"];
|
|
7389
7389
|
var PADDING_LEFT = 3;
|
|
7390
7390
|
function PFormRadioGroup(t0) {
|
|
7391
7391
|
var $ = c(272);
|
|
@@ -7528,6 +7528,7 @@ function PFormRadioGroup(t0) {
|
|
|
7528
7528
|
}
|
|
7529
7529
|
var inline = t1 === undefined ? true : t1;
|
|
7530
7530
|
var id = useId();
|
|
7531
|
+
var theme = useTheme();
|
|
7531
7532
|
var _useFormState = useFormState(),
|
|
7532
7533
|
formVariant = _useFormState.variant,
|
|
7533
7534
|
formSize = _useFormState.size,
|
|
@@ -7544,7 +7545,6 @@ function PFormRadioGroup(t0) {
|
|
|
7544
7545
|
var size = initSize !== null && initSize !== void 0 ? initSize : formSize;
|
|
7545
7546
|
var color = initColor !== null && initColor !== void 0 ? initColor : formColor;
|
|
7546
7547
|
var focused = initFocused !== null && initFocused !== void 0 ? initFocused : formFocused;
|
|
7547
|
-
var theme = useTheme();
|
|
7548
7548
|
var initValueRef = useAutoUpdateRef(initValue);
|
|
7549
7549
|
var baseRef = useRef(null);
|
|
7550
7550
|
var firstInputRef = useRef(null);
|
|
@@ -8336,6 +8336,7 @@ function PFormRadioGroup(t0) {
|
|
|
8336
8336
|
itemDisabled_0 = t57.disabled;
|
|
8337
8337
|
return /*#__PURE__*/React.createElement(FormControlLabel, {
|
|
8338
8338
|
key: idx_0,
|
|
8339
|
+
className: classNames("PFormRadioGroup-Item", error && "PFormRadioGroup-Item--error"),
|
|
8339
8340
|
control: /*#__PURE__*/React.createElement(Radio, {
|
|
8340
8341
|
icon: /*#__PURE__*/React.createElement(RadioButtonUnchecked, {
|
|
8341
8342
|
color: error ? "error" : undefined
|
|
@@ -8353,10 +8354,11 @@ function PFormRadioGroup(t0) {
|
|
|
8353
8354
|
}),
|
|
8354
8355
|
label: label_1,
|
|
8355
8356
|
style: {
|
|
8356
|
-
color: error ? theme.palette.error.main : "",
|
|
8357
8357
|
whiteSpace: "nowrap",
|
|
8358
8358
|
marginTop: -5,
|
|
8359
|
-
marginBottom: -5
|
|
8359
|
+
marginBottom: -5,
|
|
8360
|
+
color: error ? theme.palette.error.main : undefined,
|
|
8361
|
+
opacity: error && (disabled || readOnly || itemDisabled_0) ? 0.5 : 1
|
|
8360
8362
|
},
|
|
8361
8363
|
value: value_4,
|
|
8362
8364
|
disabled: disabled || readOnly || itemDisabled_0
|
|
@@ -8679,7 +8681,7 @@ function PFormRadioGroup(t0) {
|
|
|
8679
8681
|
function _temp$p() {
|
|
8680
8682
|
return "PFormRadioGroup";
|
|
8681
8683
|
}insertStyle(".PFormToggleButtonGroup.loading .PFormItemBase-Control-wrap .PFormItemBase-Control{align-items:center !important}.PFormToggleButtonGroup .ToggleButton{display:inline-flex;padding:0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:center}.PFormToggleButtonGroup .ToggleButton .__label__{height:0;line-height:0 !important;overflow:visible !important}.PFormToggleButtonGroup.type-checkbox .ToggleButton,.PFormToggleButtonGroup.type-radio .ToggleButton{padding-left:3px;padding-right:5px;border:0 !important;margin-left:0 !important;justify-content:flex-start;display:flex;background-color:rgba(0,0,0,0) !important}.PFormToggleButtonGroup.type-checkbox .ToggleButton:not(:last-child),.PFormToggleButtonGroup.type-radio .ToggleButton:not(:last-child){margin-right:5px}.PFormToggleButtonGroup.type-checkbox .ToggleButton .__checkbox-checked__,.PFormToggleButtonGroup.type-checkbox .ToggleButton .__checkbox-unchecked__,.PFormToggleButtonGroup.type-radio .ToggleButton .__checkbox-checked__,.PFormToggleButtonGroup.type-radio .ToggleButton .__checkbox-unchecked__{margin-right:3px}.PFormToggleButtonGroup.type-checkbox .ToggleButton .__checkbox-checked__,.PFormToggleButtonGroup.type-radio .ToggleButton .__checkbox-checked__{display:none}.PFormToggleButtonGroup.type-checkbox .ToggleButton.Mui-selected.Mui-disabled,.PFormToggleButtonGroup.type-radio .ToggleButton.Mui-selected.Mui-disabled{opacity:.5}.PFormToggleButtonGroup.type-checkbox .ToggleButton.Mui-selected .__checkbox-checked__,.PFormToggleButtonGroup.type-radio .ToggleButton.Mui-selected .__checkbox-checked__{display:block}.PFormToggleButtonGroup.type-checkbox .ToggleButton.Mui-selected .__checkbox-unchecked__,.PFormToggleButtonGroup.type-radio .ToggleButton.Mui-selected .__checkbox-unchecked__{display:none}.PFormToggleButtonGroup:not(.with-label).variant-outlined .PFormItemBase-Control-wrap{margin-top:15px;margin-bottom:-15px}.PFormToggleButtonGroup:not(.with-label).variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PFormToggleButtonGroup:not(.with-label).variant-filled .PFormItemBase-Control-wrap{margin-top:15px;margin-bottom:-15px}.PFormToggleButtonGroup:not(.with-label).variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PFormToggleButtonGroup:not(.with-label).variant-standard .PFormItemBase-Control-wrap{margin-top:0px;margin-bottom:0px}.PFormToggleButtonGroup:not(.with-label).variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:28px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-outlined .PFormItemBase-Control-wrap{margin-top:13px;margin-bottom:-13px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:24px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-filled .PFormItemBase-Control-wrap{margin-top:13px;margin-bottom:-13px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:31px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-standard .PFormItemBase-Control-wrap{margin-top:0px;margin-bottom:0px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:26px}.PFormToggleButtonGroup.with-label.variant-outlined .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PFormToggleButtonGroup.with-label.variant-filled .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PFormToggleButtonGroup.with-label.variant-standard .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:28px}.PFormToggleButtonGroup.with-label.size-small.variant-outlined .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.size-small.variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:24px}.PFormToggleButtonGroup.with-label.size-small.variant-filled .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.size-small.variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:31px}.PFormToggleButtonGroup.with-label.size-small.variant-standard .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.size-small.variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:26px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-outlined .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-filled .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-standard .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:28px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-outlined .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:24px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-filled .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:31px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-standard .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:26px}");function PFormToggleButtonGroup(t0) {
|
|
8682
|
-
var $ = c(
|
|
8684
|
+
var $ = c(236);
|
|
8683
8685
|
var ref = t0.ref,
|
|
8684
8686
|
initVariant = t0.variant,
|
|
8685
8687
|
initSize = t0.size,
|
|
@@ -9595,30 +9597,18 @@ function _temp$p() {
|
|
|
9595
9597
|
finalItemWidth = itemWidth || "auto";
|
|
9596
9598
|
}
|
|
9597
9599
|
}
|
|
9598
|
-
var t60 = error ? theme.palette.error.main :
|
|
9599
|
-
var t61
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
t62 = {
|
|
9600
|
+
var t60 = error ? theme.palette.error.main : undefined;
|
|
9601
|
+
var t61;
|
|
9602
|
+
if ($[160] !== color || $[161] !== disabled || $[162] !== error || $[163] !== finalItemWidth || $[164] !== initFocused || $[165] !== items || $[166] !== readOnly || $[167] !== refForButtonResizeHeightDetect || $[168] !== size || $[169] !== t60 || $[170] !== theme || $[171] !== type) {
|
|
9603
|
+
var buttonStyle = {
|
|
9603
9604
|
borderColor: t60,
|
|
9604
|
-
color: t61,
|
|
9605
9605
|
width: finalItemWidth
|
|
9606
9606
|
};
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
t62 = $[163];
|
|
9613
|
-
}
|
|
9614
|
-
var buttonStyle = t62;
|
|
9615
|
-
var t63;
|
|
9616
|
-
if ($[164] !== buttonStyle || $[165] !== color || $[166] !== disabled || $[167] !== initFocused || $[168] !== items || $[169] !== readOnly || $[170] !== refForButtonResizeHeightDetect || $[171] !== size || $[172] !== type) {
|
|
9617
|
-
t63 = items && items.map(function (t64, idx) {
|
|
9618
|
-
var value_3 = t64.value,
|
|
9619
|
-
label_0 = t64.label,
|
|
9620
|
-
itemDisabled = t64.disabled,
|
|
9621
|
-
itemColor = t64.color;
|
|
9607
|
+
t61 = items && items.map(function (t62, idx) {
|
|
9608
|
+
var value_3 = t62.value,
|
|
9609
|
+
label_0 = t62.label,
|
|
9610
|
+
itemDisabled = t62.disabled,
|
|
9611
|
+
itemColor = t62.color;
|
|
9622
9612
|
return /*#__PURE__*/React.createElement(ToggleButton, {
|
|
9623
9613
|
ref: function ref(ref_0) {
|
|
9624
9614
|
if (idx === 0) {
|
|
@@ -9631,7 +9621,9 @@ function _temp$p() {
|
|
|
9631
9621
|
value: value_3,
|
|
9632
9622
|
color: itemColor || color,
|
|
9633
9623
|
disabled: disabled || readOnly || itemDisabled,
|
|
9634
|
-
style: buttonStyle,
|
|
9624
|
+
style: _objectSpread2(_objectSpread2({}, buttonStyle), {}, {
|
|
9625
|
+
color: disabled || readOnly || itemDisabled ? error ? theme.alpha(theme.palette.error.main, 0.5) : undefined : error ? theme.palette.error.main : undefined
|
|
9626
|
+
}),
|
|
9635
9627
|
onFocus: function onFocus() {
|
|
9636
9628
|
return setFocused(initFocused || true);
|
|
9637
9629
|
},
|
|
@@ -9650,24 +9642,27 @@ function _temp$p() {
|
|
|
9650
9642
|
className: "__label__"
|
|
9651
9643
|
}, label_0));
|
|
9652
9644
|
});
|
|
9653
|
-
$[
|
|
9654
|
-
$[
|
|
9655
|
-
$[
|
|
9656
|
-
$[
|
|
9657
|
-
$[
|
|
9658
|
-
$[
|
|
9659
|
-
$[
|
|
9660
|
-
$[
|
|
9661
|
-
$[
|
|
9662
|
-
$[
|
|
9645
|
+
$[160] = color;
|
|
9646
|
+
$[161] = disabled;
|
|
9647
|
+
$[162] = error;
|
|
9648
|
+
$[163] = finalItemWidth;
|
|
9649
|
+
$[164] = initFocused;
|
|
9650
|
+
$[165] = items;
|
|
9651
|
+
$[166] = readOnly;
|
|
9652
|
+
$[167] = refForButtonResizeHeightDetect;
|
|
9653
|
+
$[168] = size;
|
|
9654
|
+
$[169] = t60;
|
|
9655
|
+
$[170] = theme;
|
|
9656
|
+
$[171] = type;
|
|
9657
|
+
$[172] = t61;
|
|
9663
9658
|
} else {
|
|
9664
|
-
|
|
9659
|
+
t61 = $[172];
|
|
9665
9660
|
}
|
|
9666
|
-
var buttons =
|
|
9661
|
+
var buttons = t61;
|
|
9667
9662
|
var newRealValue = value_2 == null ? null : value_2;
|
|
9668
9663
|
if (items && value_2 != null) {
|
|
9669
9664
|
if (Array.isArray(newRealValue)) {
|
|
9670
|
-
if ($[
|
|
9665
|
+
if ($[173] !== items || $[174] !== multiple || $[175] !== newRealValue) {
|
|
9671
9666
|
var stringRealValues = newRealValue.map(_temp3$1);
|
|
9672
9667
|
if (multiple) {
|
|
9673
9668
|
var foundItems = items.filter(function (v_2) {
|
|
@@ -9675,42 +9670,42 @@ function _temp$p() {
|
|
|
9675
9670
|
});
|
|
9676
9671
|
newRealValue = foundItems.map(_temp4$1);
|
|
9677
9672
|
}
|
|
9678
|
-
$[
|
|
9679
|
-
$[
|
|
9673
|
+
$[173] = items;
|
|
9674
|
+
$[174] = multiple;
|
|
9675
|
+
$[175] = newRealValue;
|
|
9680
9676
|
$[176] = newRealValue;
|
|
9681
|
-
$[177] = newRealValue;
|
|
9682
9677
|
} else {
|
|
9683
|
-
newRealValue = $[
|
|
9678
|
+
newRealValue = $[176];
|
|
9684
9679
|
}
|
|
9685
9680
|
} else {
|
|
9686
9681
|
if (newRealValue != null) {
|
|
9687
9682
|
var _t3;
|
|
9688
|
-
if ($[
|
|
9683
|
+
if ($[177] !== newRealValue) {
|
|
9689
9684
|
_t3 = newRealValue.toString();
|
|
9690
|
-
$[
|
|
9691
|
-
$[
|
|
9685
|
+
$[177] = newRealValue;
|
|
9686
|
+
$[178] = _t3;
|
|
9692
9687
|
} else {
|
|
9693
|
-
_t3 = $[
|
|
9688
|
+
_t3 = $[178];
|
|
9694
9689
|
}
|
|
9695
9690
|
var stringRealValue = _t3;
|
|
9696
9691
|
var _t4;
|
|
9697
|
-
if ($[
|
|
9692
|
+
if ($[179] !== items || $[180] !== stringRealValue) {
|
|
9698
9693
|
var _t5;
|
|
9699
|
-
if ($[
|
|
9694
|
+
if ($[182] !== stringRealValue) {
|
|
9700
9695
|
_t5 = function _t5(v_4) {
|
|
9701
9696
|
return v_4.value.toString() === stringRealValue;
|
|
9702
9697
|
};
|
|
9703
|
-
$[
|
|
9704
|
-
$[
|
|
9698
|
+
$[182] = stringRealValue;
|
|
9699
|
+
$[183] = _t5;
|
|
9705
9700
|
} else {
|
|
9706
|
-
_t5 = $[
|
|
9701
|
+
_t5 = $[183];
|
|
9707
9702
|
}
|
|
9708
9703
|
_t4 = items.find(_t5);
|
|
9709
|
-
$[
|
|
9710
|
-
$[
|
|
9711
|
-
$[
|
|
9704
|
+
$[179] = items;
|
|
9705
|
+
$[180] = stringRealValue;
|
|
9706
|
+
$[181] = _t4;
|
|
9712
9707
|
} else {
|
|
9713
|
-
_t4 = $[
|
|
9708
|
+
_t4 = $[181];
|
|
9714
9709
|
}
|
|
9715
9710
|
var foundItem = _t4;
|
|
9716
9711
|
if (foundItem) {
|
|
@@ -9720,9 +9715,9 @@ function _temp$p() {
|
|
|
9720
9715
|
}
|
|
9721
9716
|
}
|
|
9722
9717
|
var realValue_1 = newRealValue;
|
|
9723
|
-
var
|
|
9724
|
-
if ($[
|
|
9725
|
-
|
|
9718
|
+
var t62;
|
|
9719
|
+
if ($[184] !== buttons || $[185] !== disabled || $[186] !== endAdornment || $[187] !== formColWidth || $[188] !== fullWidth || $[189] !== handleChange || $[190] !== isOnGetItemLoading || $[191] !== items || $[192] !== label || $[193] !== labelId || $[194] !== loading || $[195] !== multiple || $[196] !== readOnly || $[197] !== realValue_1 || $[198] !== refForButtonResizeHeightDetect || $[199] !== refForButtonsResizeHeightDetect || $[200] !== refForLoadingResizeHeightDetect || $[201] !== refForResizeWidthDetect || $[202] !== size || $[203] !== startAdornment || $[204] !== type || $[205] !== width) {
|
|
9720
|
+
t62 = isOnGetItemLoading || loading ? /*#__PURE__*/React.createElement("div", {
|
|
9726
9721
|
style: {
|
|
9727
9722
|
opacity: 0.54
|
|
9728
9723
|
},
|
|
@@ -9774,84 +9769,84 @@ function _temp$p() {
|
|
|
9774
9769
|
visibility: "hidden"
|
|
9775
9770
|
}
|
|
9776
9771
|
}) : buttons)), endAdornment && /*#__PURE__*/React.createElement("div", null, endAdornment));
|
|
9777
|
-
$[
|
|
9778
|
-
$[
|
|
9779
|
-
$[
|
|
9780
|
-
$[
|
|
9781
|
-
$[
|
|
9782
|
-
$[
|
|
9783
|
-
$[
|
|
9784
|
-
$[
|
|
9785
|
-
$[
|
|
9786
|
-
$[
|
|
9787
|
-
$[
|
|
9788
|
-
$[
|
|
9789
|
-
$[
|
|
9790
|
-
$[
|
|
9791
|
-
$[
|
|
9792
|
-
$[
|
|
9793
|
-
$[
|
|
9794
|
-
$[
|
|
9795
|
-
$[
|
|
9796
|
-
$[
|
|
9797
|
-
$[
|
|
9798
|
-
$[
|
|
9799
|
-
$[
|
|
9800
|
-
} else {
|
|
9801
|
-
|
|
9802
|
-
}
|
|
9803
|
-
var control =
|
|
9772
|
+
$[184] = buttons;
|
|
9773
|
+
$[185] = disabled;
|
|
9774
|
+
$[186] = endAdornment;
|
|
9775
|
+
$[187] = formColWidth;
|
|
9776
|
+
$[188] = fullWidth;
|
|
9777
|
+
$[189] = handleChange;
|
|
9778
|
+
$[190] = isOnGetItemLoading;
|
|
9779
|
+
$[191] = items;
|
|
9780
|
+
$[192] = label;
|
|
9781
|
+
$[193] = labelId;
|
|
9782
|
+
$[194] = loading;
|
|
9783
|
+
$[195] = multiple;
|
|
9784
|
+
$[196] = readOnly;
|
|
9785
|
+
$[197] = realValue_1;
|
|
9786
|
+
$[198] = refForButtonResizeHeightDetect;
|
|
9787
|
+
$[199] = refForButtonsResizeHeightDetect;
|
|
9788
|
+
$[200] = refForLoadingResizeHeightDetect;
|
|
9789
|
+
$[201] = refForResizeWidthDetect;
|
|
9790
|
+
$[202] = size;
|
|
9791
|
+
$[203] = startAdornment;
|
|
9792
|
+
$[204] = type;
|
|
9793
|
+
$[205] = width;
|
|
9794
|
+
$[206] = t62;
|
|
9795
|
+
} else {
|
|
9796
|
+
t62 = $[206];
|
|
9797
|
+
}
|
|
9798
|
+
var control = t62;
|
|
9804
9799
|
var controlHeight = height || 0;
|
|
9805
9800
|
var isMultiline = controlHeight <= (realHeight !== null && realHeight !== void 0 ? realHeight : 0);
|
|
9806
|
-
var
|
|
9807
|
-
var
|
|
9808
|
-
var
|
|
9809
|
-
var
|
|
9810
|
-
var
|
|
9811
|
-
var
|
|
9801
|
+
var t63 = "variant-".concat(variant);
|
|
9802
|
+
var t64 = "size-".concat(size);
|
|
9803
|
+
var t65 = !!label && "with-label";
|
|
9804
|
+
var t66 = !!fullWidth && "full-width";
|
|
9805
|
+
var t67 = "type-".concat(type);
|
|
9806
|
+
var t68 = (isOnGetItemLoading || loading) && "loading";
|
|
9807
|
+
var t69;
|
|
9808
|
+
if ($[207] !== className || $[208] !== t63 || $[209] !== t64 || $[210] !== t65 || $[211] !== t66 || $[212] !== t67 || $[213] !== t68) {
|
|
9809
|
+
t69 = classNames(className, "PFormValueItem", "PFormToggleButtonGroup", t63, t64, t65, t66, t67, t68);
|
|
9810
|
+
$[207] = className;
|
|
9811
|
+
$[208] = t63;
|
|
9812
|
+
$[209] = t64;
|
|
9813
|
+
$[210] = t65;
|
|
9814
|
+
$[211] = t66;
|
|
9815
|
+
$[212] = t67;
|
|
9816
|
+
$[213] = t68;
|
|
9817
|
+
$[214] = t69;
|
|
9818
|
+
} else {
|
|
9819
|
+
t69 = $[214];
|
|
9820
|
+
}
|
|
9821
|
+
var t70 = error ? errorHelperText : helperText;
|
|
9812
9822
|
var t71;
|
|
9813
|
-
if ($[
|
|
9814
|
-
t71 =
|
|
9815
|
-
$[208] = className;
|
|
9816
|
-
$[209] = t65;
|
|
9817
|
-
$[210] = t66;
|
|
9818
|
-
$[211] = t67;
|
|
9819
|
-
$[212] = t68;
|
|
9820
|
-
$[213] = t69;
|
|
9821
|
-
$[214] = t70;
|
|
9822
|
-
$[215] = t71;
|
|
9823
|
-
} else {
|
|
9824
|
-
t71 = $[215];
|
|
9825
|
-
}
|
|
9826
|
-
var t72 = error ? errorHelperText : helperText;
|
|
9827
|
-
var t73;
|
|
9828
|
-
if ($[216] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
9829
|
-
t73 = {
|
|
9823
|
+
if ($[215] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
9824
|
+
t71 = {
|
|
9830
9825
|
style: {
|
|
9831
9826
|
marginLeft: 2
|
|
9832
9827
|
}
|
|
9833
9828
|
};
|
|
9834
|
-
$[
|
|
9829
|
+
$[215] = t71;
|
|
9835
9830
|
} else {
|
|
9836
|
-
|
|
9831
|
+
t71 = $[215];
|
|
9837
9832
|
}
|
|
9838
|
-
var
|
|
9839
|
-
if ($[
|
|
9840
|
-
|
|
9833
|
+
var t72;
|
|
9834
|
+
if ($[216] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
9835
|
+
t72 = {
|
|
9841
9836
|
style: {
|
|
9842
9837
|
marginLeft: 2
|
|
9843
9838
|
}
|
|
9844
9839
|
};
|
|
9845
|
-
$[
|
|
9840
|
+
$[216] = t72;
|
|
9846
9841
|
} else {
|
|
9847
|
-
|
|
9842
|
+
t72 = $[216];
|
|
9848
9843
|
}
|
|
9849
|
-
var
|
|
9850
|
-
var
|
|
9851
|
-
var
|
|
9852
|
-
if ($[
|
|
9853
|
-
|
|
9854
|
-
className:
|
|
9844
|
+
var t73 = realHeight ? realHeight + (isMultiline ? 13 : 0) : controlHeight;
|
|
9845
|
+
var t74 = isMultiline ? false : isOnGetItemLoading || loading;
|
|
9846
|
+
var t75;
|
|
9847
|
+
if ($[217] !== color || $[218] !== control || $[219] !== error || $[220] !== errorHelperText || $[221] !== formControlBaseProps || $[222] !== fullWidth || $[223] !== hidden || $[224] !== label || $[225] !== labelIcon || $[226] !== required || $[227] !== size || $[228] !== style || $[229] !== sx || $[230] !== t69 || $[231] !== t70 || $[232] !== t73 || $[233] !== t74 || $[234] !== variant) {
|
|
9848
|
+
t75 = /*#__PURE__*/React.createElement(PFormItemBase, _extends({}, formControlBaseProps, {
|
|
9849
|
+
className: t69,
|
|
9855
9850
|
variant: variant,
|
|
9856
9851
|
size: size,
|
|
9857
9852
|
color: color,
|
|
@@ -9860,41 +9855,41 @@ function _temp$p() {
|
|
|
9860
9855
|
required: required,
|
|
9861
9856
|
fullWidth: fullWidth,
|
|
9862
9857
|
error: error,
|
|
9863
|
-
helperText:
|
|
9864
|
-
helperTextProps:
|
|
9858
|
+
helperText: t70,
|
|
9859
|
+
helperTextProps: t71,
|
|
9865
9860
|
errorHelperText: errorHelperText,
|
|
9866
|
-
errorHelperTextProps:
|
|
9861
|
+
errorHelperTextProps: t72,
|
|
9867
9862
|
style: style,
|
|
9868
9863
|
sx: sx,
|
|
9869
9864
|
hidden: hidden,
|
|
9870
9865
|
autoSize: true,
|
|
9871
|
-
controlHeight:
|
|
9872
|
-
controlVerticalCenter:
|
|
9866
|
+
controlHeight: t73,
|
|
9867
|
+
controlVerticalCenter: t74,
|
|
9873
9868
|
control: control
|
|
9874
9869
|
}));
|
|
9875
|
-
$[
|
|
9876
|
-
$[
|
|
9877
|
-
$[
|
|
9878
|
-
$[
|
|
9879
|
-
$[
|
|
9880
|
-
$[
|
|
9881
|
-
$[
|
|
9882
|
-
$[
|
|
9883
|
-
$[
|
|
9884
|
-
$[
|
|
9885
|
-
$[
|
|
9886
|
-
$[
|
|
9887
|
-
$[
|
|
9888
|
-
$[
|
|
9889
|
-
$[
|
|
9890
|
-
$[
|
|
9891
|
-
$[
|
|
9892
|
-
$[
|
|
9893
|
-
$[
|
|
9870
|
+
$[217] = color;
|
|
9871
|
+
$[218] = control;
|
|
9872
|
+
$[219] = error;
|
|
9873
|
+
$[220] = errorHelperText;
|
|
9874
|
+
$[221] = formControlBaseProps;
|
|
9875
|
+
$[222] = fullWidth;
|
|
9876
|
+
$[223] = hidden;
|
|
9877
|
+
$[224] = label;
|
|
9878
|
+
$[225] = labelIcon;
|
|
9879
|
+
$[226] = required;
|
|
9880
|
+
$[227] = size;
|
|
9881
|
+
$[228] = style;
|
|
9882
|
+
$[229] = sx;
|
|
9883
|
+
$[230] = t69;
|
|
9884
|
+
$[231] = t70;
|
|
9885
|
+
$[232] = t73;
|
|
9886
|
+
$[233] = t74;
|
|
9887
|
+
$[234] = variant;
|
|
9888
|
+
$[235] = t75;
|
|
9894
9889
|
} else {
|
|
9895
|
-
|
|
9890
|
+
t75 = $[235];
|
|
9896
9891
|
}
|
|
9897
|
-
return
|
|
9892
|
+
return t75;
|
|
9898
9893
|
}
|
|
9899
9894
|
function _temp4$1(v_3) {
|
|
9900
9895
|
return v_3.value;
|
package/dist/index.js
CHANGED
|
@@ -7385,7 +7385,7 @@ var PFormCheckbox = function PFormCheckbox(t0) {
|
|
|
7385
7385
|
};
|
|
7386
7386
|
function _temp$q() {
|
|
7387
7387
|
return "PFormCheckbox";
|
|
7388
|
-
}var _excluded$g = ["ref", "variant", "size", "color", "focused", "fullWidth", "hidden", "startAdornment", "endAdornment", "name", "width", "labelIcon", "label", "inline", "loading", "nowrap", "items", "value", "data", "error", "helperText", "disabled", "readOnly", "required", "exceptValue", "onLoadItems", "onChange", "onValue", "onValidate", "className", "style", "sx"];
|
|
7388
|
+
}insertStyle(".PFormRadioGroup .PFormRadioGroup-Item.PFormRadioGroup-Item--error .MuiTypography-root{color:var(--error-color) !important}");var _excluded$g = ["ref", "variant", "size", "color", "focused", "fullWidth", "hidden", "startAdornment", "endAdornment", "name", "width", "labelIcon", "label", "inline", "loading", "nowrap", "items", "value", "data", "error", "helperText", "disabled", "readOnly", "required", "exceptValue", "onLoadItems", "onChange", "onValue", "onValidate", "className", "style", "sx"];
|
|
7389
7389
|
var PADDING_LEFT = 3;
|
|
7390
7390
|
function PFormRadioGroup(t0) {
|
|
7391
7391
|
var $ = compilerRuntime.c(272);
|
|
@@ -7528,6 +7528,7 @@ function PFormRadioGroup(t0) {
|
|
|
7528
7528
|
}
|
|
7529
7529
|
var inline = t1 === undefined ? true : t1;
|
|
7530
7530
|
var id = React.useId();
|
|
7531
|
+
var theme = material.useTheme();
|
|
7531
7532
|
var _useFormState = useFormState(),
|
|
7532
7533
|
formVariant = _useFormState.variant,
|
|
7533
7534
|
formSize = _useFormState.size,
|
|
@@ -7544,7 +7545,6 @@ function PFormRadioGroup(t0) {
|
|
|
7544
7545
|
var size = initSize !== null && initSize !== void 0 ? initSize : formSize;
|
|
7545
7546
|
var color = initColor !== null && initColor !== void 0 ? initColor : formColor;
|
|
7546
7547
|
var focused = initFocused !== null && initFocused !== void 0 ? initFocused : formFocused;
|
|
7547
|
-
var theme = material.useTheme();
|
|
7548
7548
|
var initValueRef = reactHook.useAutoUpdateRef(initValue);
|
|
7549
7549
|
var baseRef = React.useRef(null);
|
|
7550
7550
|
var firstInputRef = React.useRef(null);
|
|
@@ -8336,6 +8336,7 @@ function PFormRadioGroup(t0) {
|
|
|
8336
8336
|
itemDisabled_0 = t57.disabled;
|
|
8337
8337
|
return /*#__PURE__*/React.createElement(material.FormControlLabel, {
|
|
8338
8338
|
key: idx_0,
|
|
8339
|
+
className: classNames("PFormRadioGroup-Item", error && "PFormRadioGroup-Item--error"),
|
|
8339
8340
|
control: /*#__PURE__*/React.createElement(material.Radio, {
|
|
8340
8341
|
icon: /*#__PURE__*/React.createElement(iconsMaterial.RadioButtonUnchecked, {
|
|
8341
8342
|
color: error ? "error" : undefined
|
|
@@ -8353,10 +8354,11 @@ function PFormRadioGroup(t0) {
|
|
|
8353
8354
|
}),
|
|
8354
8355
|
label: label_1,
|
|
8355
8356
|
style: {
|
|
8356
|
-
color: error ? theme.palette.error.main : "",
|
|
8357
8357
|
whiteSpace: "nowrap",
|
|
8358
8358
|
marginTop: -5,
|
|
8359
|
-
marginBottom: -5
|
|
8359
|
+
marginBottom: -5,
|
|
8360
|
+
color: error ? theme.palette.error.main : undefined,
|
|
8361
|
+
opacity: error && (disabled || readOnly || itemDisabled_0) ? 0.5 : 1
|
|
8360
8362
|
},
|
|
8361
8363
|
value: value_4,
|
|
8362
8364
|
disabled: disabled || readOnly || itemDisabled_0
|
|
@@ -8679,7 +8681,7 @@ function PFormRadioGroup(t0) {
|
|
|
8679
8681
|
function _temp$p() {
|
|
8680
8682
|
return "PFormRadioGroup";
|
|
8681
8683
|
}insertStyle(".PFormToggleButtonGroup.loading .PFormItemBase-Control-wrap .PFormItemBase-Control{align-items:center !important}.PFormToggleButtonGroup .ToggleButton{display:inline-flex;padding:0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-items:center}.PFormToggleButtonGroup .ToggleButton .__label__{height:0;line-height:0 !important;overflow:visible !important}.PFormToggleButtonGroup.type-checkbox .ToggleButton,.PFormToggleButtonGroup.type-radio .ToggleButton{padding-left:3px;padding-right:5px;border:0 !important;margin-left:0 !important;justify-content:flex-start;display:flex;background-color:rgba(0,0,0,0) !important}.PFormToggleButtonGroup.type-checkbox .ToggleButton:not(:last-child),.PFormToggleButtonGroup.type-radio .ToggleButton:not(:last-child){margin-right:5px}.PFormToggleButtonGroup.type-checkbox .ToggleButton .__checkbox-checked__,.PFormToggleButtonGroup.type-checkbox .ToggleButton .__checkbox-unchecked__,.PFormToggleButtonGroup.type-radio .ToggleButton .__checkbox-checked__,.PFormToggleButtonGroup.type-radio .ToggleButton .__checkbox-unchecked__{margin-right:3px}.PFormToggleButtonGroup.type-checkbox .ToggleButton .__checkbox-checked__,.PFormToggleButtonGroup.type-radio .ToggleButton .__checkbox-checked__{display:none}.PFormToggleButtonGroup.type-checkbox .ToggleButton.Mui-selected.Mui-disabled,.PFormToggleButtonGroup.type-radio .ToggleButton.Mui-selected.Mui-disabled{opacity:.5}.PFormToggleButtonGroup.type-checkbox .ToggleButton.Mui-selected .__checkbox-checked__,.PFormToggleButtonGroup.type-radio .ToggleButton.Mui-selected .__checkbox-checked__{display:block}.PFormToggleButtonGroup.type-checkbox .ToggleButton.Mui-selected .__checkbox-unchecked__,.PFormToggleButtonGroup.type-radio .ToggleButton.Mui-selected .__checkbox-unchecked__{display:none}.PFormToggleButtonGroup:not(.with-label).variant-outlined .PFormItemBase-Control-wrap{margin-top:15px;margin-bottom:-15px}.PFormToggleButtonGroup:not(.with-label).variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PFormToggleButtonGroup:not(.with-label).variant-filled .PFormItemBase-Control-wrap{margin-top:15px;margin-bottom:-15px}.PFormToggleButtonGroup:not(.with-label).variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PFormToggleButtonGroup:not(.with-label).variant-standard .PFormItemBase-Control-wrap{margin-top:0px;margin-bottom:0px}.PFormToggleButtonGroup:not(.with-label).variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:28px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-outlined .PFormItemBase-Control-wrap{margin-top:13px;margin-bottom:-13px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:24px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-filled .PFormItemBase-Control-wrap{margin-top:13px;margin-bottom:-13px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:31px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-standard .PFormItemBase-Control-wrap{margin-top:0px;margin-bottom:0px}.PFormToggleButtonGroup:not(.with-label).size-small.variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:26px}.PFormToggleButtonGroup.with-label.variant-outlined .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PFormToggleButtonGroup.with-label.variant-filled .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PFormToggleButtonGroup.with-label.variant-standard .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:28px}.PFormToggleButtonGroup.with-label.size-small.variant-outlined .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.size-small.variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:24px}.PFormToggleButtonGroup.with-label.size-small.variant-filled .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.size-small.variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:31px}.PFormToggleButtonGroup.with-label.size-small.variant-standard .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PFormToggleButtonGroup.with-label.size-small.variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:26px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-outlined .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-filled .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:37px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-standard .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:28px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-outlined .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-outlined .PFormItemBase-Control-wrap .ToggleButton{height:24px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-filled .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-filled .PFormItemBase-Control-wrap .ToggleButton{height:31px}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-standard .PFormItemBase-Control-wrap{margin-top:0;margin-bottom:0}.PForm .PFormCol.with-label .PFormToggleButtonGroup.size-small.variant-standard .PFormItemBase-Control-wrap .ToggleButton{height:26px}");function PFormToggleButtonGroup(t0) {
|
|
8682
|
-
var $ = compilerRuntime.c(
|
|
8684
|
+
var $ = compilerRuntime.c(236);
|
|
8683
8685
|
var ref = t0.ref,
|
|
8684
8686
|
initVariant = t0.variant,
|
|
8685
8687
|
initSize = t0.size,
|
|
@@ -9595,30 +9597,18 @@ function _temp$p() {
|
|
|
9595
9597
|
finalItemWidth = itemWidth || "auto";
|
|
9596
9598
|
}
|
|
9597
9599
|
}
|
|
9598
|
-
var t60 = error ? theme.palette.error.main :
|
|
9599
|
-
var t61
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
t62 = {
|
|
9600
|
+
var t60 = error ? theme.palette.error.main : undefined;
|
|
9601
|
+
var t61;
|
|
9602
|
+
if ($[160] !== color || $[161] !== disabled || $[162] !== error || $[163] !== finalItemWidth || $[164] !== initFocused || $[165] !== items || $[166] !== readOnly || $[167] !== refForButtonResizeHeightDetect || $[168] !== size || $[169] !== t60 || $[170] !== theme || $[171] !== type) {
|
|
9603
|
+
var buttonStyle = {
|
|
9603
9604
|
borderColor: t60,
|
|
9604
|
-
color: t61,
|
|
9605
9605
|
width: finalItemWidth
|
|
9606
9606
|
};
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
t62 = $[163];
|
|
9613
|
-
}
|
|
9614
|
-
var buttonStyle = t62;
|
|
9615
|
-
var t63;
|
|
9616
|
-
if ($[164] !== buttonStyle || $[165] !== color || $[166] !== disabled || $[167] !== initFocused || $[168] !== items || $[169] !== readOnly || $[170] !== refForButtonResizeHeightDetect || $[171] !== size || $[172] !== type) {
|
|
9617
|
-
t63 = items && items.map(function (t64, idx) {
|
|
9618
|
-
var value_3 = t64.value,
|
|
9619
|
-
label_0 = t64.label,
|
|
9620
|
-
itemDisabled = t64.disabled,
|
|
9621
|
-
itemColor = t64.color;
|
|
9607
|
+
t61 = items && items.map(function (t62, idx) {
|
|
9608
|
+
var value_3 = t62.value,
|
|
9609
|
+
label_0 = t62.label,
|
|
9610
|
+
itemDisabled = t62.disabled,
|
|
9611
|
+
itemColor = t62.color;
|
|
9622
9612
|
return /*#__PURE__*/React.createElement(material.ToggleButton, {
|
|
9623
9613
|
ref: function ref(ref_0) {
|
|
9624
9614
|
if (idx === 0) {
|
|
@@ -9631,7 +9621,9 @@ function _temp$p() {
|
|
|
9631
9621
|
value: value_3,
|
|
9632
9622
|
color: itemColor || color,
|
|
9633
9623
|
disabled: disabled || readOnly || itemDisabled,
|
|
9634
|
-
style: buttonStyle,
|
|
9624
|
+
style: _objectSpread2(_objectSpread2({}, buttonStyle), {}, {
|
|
9625
|
+
color: disabled || readOnly || itemDisabled ? error ? theme.alpha(theme.palette.error.main, 0.5) : undefined : error ? theme.palette.error.main : undefined
|
|
9626
|
+
}),
|
|
9635
9627
|
onFocus: function onFocus() {
|
|
9636
9628
|
return setFocused(initFocused || true);
|
|
9637
9629
|
},
|
|
@@ -9650,24 +9642,27 @@ function _temp$p() {
|
|
|
9650
9642
|
className: "__label__"
|
|
9651
9643
|
}, label_0));
|
|
9652
9644
|
});
|
|
9653
|
-
$[
|
|
9654
|
-
$[
|
|
9655
|
-
$[
|
|
9656
|
-
$[
|
|
9657
|
-
$[
|
|
9658
|
-
$[
|
|
9659
|
-
$[
|
|
9660
|
-
$[
|
|
9661
|
-
$[
|
|
9662
|
-
$[
|
|
9645
|
+
$[160] = color;
|
|
9646
|
+
$[161] = disabled;
|
|
9647
|
+
$[162] = error;
|
|
9648
|
+
$[163] = finalItemWidth;
|
|
9649
|
+
$[164] = initFocused;
|
|
9650
|
+
$[165] = items;
|
|
9651
|
+
$[166] = readOnly;
|
|
9652
|
+
$[167] = refForButtonResizeHeightDetect;
|
|
9653
|
+
$[168] = size;
|
|
9654
|
+
$[169] = t60;
|
|
9655
|
+
$[170] = theme;
|
|
9656
|
+
$[171] = type;
|
|
9657
|
+
$[172] = t61;
|
|
9663
9658
|
} else {
|
|
9664
|
-
|
|
9659
|
+
t61 = $[172];
|
|
9665
9660
|
}
|
|
9666
|
-
var buttons =
|
|
9661
|
+
var buttons = t61;
|
|
9667
9662
|
var newRealValue = value_2 == null ? null : value_2;
|
|
9668
9663
|
if (items && value_2 != null) {
|
|
9669
9664
|
if (Array.isArray(newRealValue)) {
|
|
9670
|
-
if ($[
|
|
9665
|
+
if ($[173] !== items || $[174] !== multiple || $[175] !== newRealValue) {
|
|
9671
9666
|
var stringRealValues = newRealValue.map(_temp3$1);
|
|
9672
9667
|
if (multiple) {
|
|
9673
9668
|
var foundItems = items.filter(function (v_2) {
|
|
@@ -9675,42 +9670,42 @@ function _temp$p() {
|
|
|
9675
9670
|
});
|
|
9676
9671
|
newRealValue = foundItems.map(_temp4$1);
|
|
9677
9672
|
}
|
|
9678
|
-
$[
|
|
9679
|
-
$[
|
|
9673
|
+
$[173] = items;
|
|
9674
|
+
$[174] = multiple;
|
|
9675
|
+
$[175] = newRealValue;
|
|
9680
9676
|
$[176] = newRealValue;
|
|
9681
|
-
$[177] = newRealValue;
|
|
9682
9677
|
} else {
|
|
9683
|
-
newRealValue = $[
|
|
9678
|
+
newRealValue = $[176];
|
|
9684
9679
|
}
|
|
9685
9680
|
} else {
|
|
9686
9681
|
if (newRealValue != null) {
|
|
9687
9682
|
var _t3;
|
|
9688
|
-
if ($[
|
|
9683
|
+
if ($[177] !== newRealValue) {
|
|
9689
9684
|
_t3 = newRealValue.toString();
|
|
9690
|
-
$[
|
|
9691
|
-
$[
|
|
9685
|
+
$[177] = newRealValue;
|
|
9686
|
+
$[178] = _t3;
|
|
9692
9687
|
} else {
|
|
9693
|
-
_t3 = $[
|
|
9688
|
+
_t3 = $[178];
|
|
9694
9689
|
}
|
|
9695
9690
|
var stringRealValue = _t3;
|
|
9696
9691
|
var _t4;
|
|
9697
|
-
if ($[
|
|
9692
|
+
if ($[179] !== items || $[180] !== stringRealValue) {
|
|
9698
9693
|
var _t5;
|
|
9699
|
-
if ($[
|
|
9694
|
+
if ($[182] !== stringRealValue) {
|
|
9700
9695
|
_t5 = function _t5(v_4) {
|
|
9701
9696
|
return v_4.value.toString() === stringRealValue;
|
|
9702
9697
|
};
|
|
9703
|
-
$[
|
|
9704
|
-
$[
|
|
9698
|
+
$[182] = stringRealValue;
|
|
9699
|
+
$[183] = _t5;
|
|
9705
9700
|
} else {
|
|
9706
|
-
_t5 = $[
|
|
9701
|
+
_t5 = $[183];
|
|
9707
9702
|
}
|
|
9708
9703
|
_t4 = items.find(_t5);
|
|
9709
|
-
$[
|
|
9710
|
-
$[
|
|
9711
|
-
$[
|
|
9704
|
+
$[179] = items;
|
|
9705
|
+
$[180] = stringRealValue;
|
|
9706
|
+
$[181] = _t4;
|
|
9712
9707
|
} else {
|
|
9713
|
-
_t4 = $[
|
|
9708
|
+
_t4 = $[181];
|
|
9714
9709
|
}
|
|
9715
9710
|
var foundItem = _t4;
|
|
9716
9711
|
if (foundItem) {
|
|
@@ -9720,9 +9715,9 @@ function _temp$p() {
|
|
|
9720
9715
|
}
|
|
9721
9716
|
}
|
|
9722
9717
|
var realValue_1 = newRealValue;
|
|
9723
|
-
var
|
|
9724
|
-
if ($[
|
|
9725
|
-
|
|
9718
|
+
var t62;
|
|
9719
|
+
if ($[184] !== buttons || $[185] !== disabled || $[186] !== endAdornment || $[187] !== formColWidth || $[188] !== fullWidth || $[189] !== handleChange || $[190] !== isOnGetItemLoading || $[191] !== items || $[192] !== label || $[193] !== labelId || $[194] !== loading || $[195] !== multiple || $[196] !== readOnly || $[197] !== realValue_1 || $[198] !== refForButtonResizeHeightDetect || $[199] !== refForButtonsResizeHeightDetect || $[200] !== refForLoadingResizeHeightDetect || $[201] !== refForResizeWidthDetect || $[202] !== size || $[203] !== startAdornment || $[204] !== type || $[205] !== width) {
|
|
9720
|
+
t62 = isOnGetItemLoading || loading ? /*#__PURE__*/React.createElement("div", {
|
|
9726
9721
|
style: {
|
|
9727
9722
|
opacity: 0.54
|
|
9728
9723
|
},
|
|
@@ -9774,84 +9769,84 @@ function _temp$p() {
|
|
|
9774
9769
|
visibility: "hidden"
|
|
9775
9770
|
}
|
|
9776
9771
|
}) : buttons)), endAdornment && /*#__PURE__*/React.createElement("div", null, endAdornment));
|
|
9777
|
-
$[
|
|
9778
|
-
$[
|
|
9779
|
-
$[
|
|
9780
|
-
$[
|
|
9781
|
-
$[
|
|
9782
|
-
$[
|
|
9783
|
-
$[
|
|
9784
|
-
$[
|
|
9785
|
-
$[
|
|
9786
|
-
$[
|
|
9787
|
-
$[
|
|
9788
|
-
$[
|
|
9789
|
-
$[
|
|
9790
|
-
$[
|
|
9791
|
-
$[
|
|
9792
|
-
$[
|
|
9793
|
-
$[
|
|
9794
|
-
$[
|
|
9795
|
-
$[
|
|
9796
|
-
$[
|
|
9797
|
-
$[
|
|
9798
|
-
$[
|
|
9799
|
-
$[
|
|
9800
|
-
} else {
|
|
9801
|
-
|
|
9802
|
-
}
|
|
9803
|
-
var control =
|
|
9772
|
+
$[184] = buttons;
|
|
9773
|
+
$[185] = disabled;
|
|
9774
|
+
$[186] = endAdornment;
|
|
9775
|
+
$[187] = formColWidth;
|
|
9776
|
+
$[188] = fullWidth;
|
|
9777
|
+
$[189] = handleChange;
|
|
9778
|
+
$[190] = isOnGetItemLoading;
|
|
9779
|
+
$[191] = items;
|
|
9780
|
+
$[192] = label;
|
|
9781
|
+
$[193] = labelId;
|
|
9782
|
+
$[194] = loading;
|
|
9783
|
+
$[195] = multiple;
|
|
9784
|
+
$[196] = readOnly;
|
|
9785
|
+
$[197] = realValue_1;
|
|
9786
|
+
$[198] = refForButtonResizeHeightDetect;
|
|
9787
|
+
$[199] = refForButtonsResizeHeightDetect;
|
|
9788
|
+
$[200] = refForLoadingResizeHeightDetect;
|
|
9789
|
+
$[201] = refForResizeWidthDetect;
|
|
9790
|
+
$[202] = size;
|
|
9791
|
+
$[203] = startAdornment;
|
|
9792
|
+
$[204] = type;
|
|
9793
|
+
$[205] = width;
|
|
9794
|
+
$[206] = t62;
|
|
9795
|
+
} else {
|
|
9796
|
+
t62 = $[206];
|
|
9797
|
+
}
|
|
9798
|
+
var control = t62;
|
|
9804
9799
|
var controlHeight = height || 0;
|
|
9805
9800
|
var isMultiline = controlHeight <= (realHeight !== null && realHeight !== void 0 ? realHeight : 0);
|
|
9806
|
-
var
|
|
9807
|
-
var
|
|
9808
|
-
var
|
|
9809
|
-
var
|
|
9810
|
-
var
|
|
9811
|
-
var
|
|
9801
|
+
var t63 = "variant-".concat(variant);
|
|
9802
|
+
var t64 = "size-".concat(size);
|
|
9803
|
+
var t65 = !!label && "with-label";
|
|
9804
|
+
var t66 = !!fullWidth && "full-width";
|
|
9805
|
+
var t67 = "type-".concat(type);
|
|
9806
|
+
var t68 = (isOnGetItemLoading || loading) && "loading";
|
|
9807
|
+
var t69;
|
|
9808
|
+
if ($[207] !== className || $[208] !== t63 || $[209] !== t64 || $[210] !== t65 || $[211] !== t66 || $[212] !== t67 || $[213] !== t68) {
|
|
9809
|
+
t69 = classNames(className, "PFormValueItem", "PFormToggleButtonGroup", t63, t64, t65, t66, t67, t68);
|
|
9810
|
+
$[207] = className;
|
|
9811
|
+
$[208] = t63;
|
|
9812
|
+
$[209] = t64;
|
|
9813
|
+
$[210] = t65;
|
|
9814
|
+
$[211] = t66;
|
|
9815
|
+
$[212] = t67;
|
|
9816
|
+
$[213] = t68;
|
|
9817
|
+
$[214] = t69;
|
|
9818
|
+
} else {
|
|
9819
|
+
t69 = $[214];
|
|
9820
|
+
}
|
|
9821
|
+
var t70 = error ? errorHelperText : helperText;
|
|
9812
9822
|
var t71;
|
|
9813
|
-
if ($[
|
|
9814
|
-
t71 =
|
|
9815
|
-
$[208] = className;
|
|
9816
|
-
$[209] = t65;
|
|
9817
|
-
$[210] = t66;
|
|
9818
|
-
$[211] = t67;
|
|
9819
|
-
$[212] = t68;
|
|
9820
|
-
$[213] = t69;
|
|
9821
|
-
$[214] = t70;
|
|
9822
|
-
$[215] = t71;
|
|
9823
|
-
} else {
|
|
9824
|
-
t71 = $[215];
|
|
9825
|
-
}
|
|
9826
|
-
var t72 = error ? errorHelperText : helperText;
|
|
9827
|
-
var t73;
|
|
9828
|
-
if ($[216] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
9829
|
-
t73 = {
|
|
9823
|
+
if ($[215] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
9824
|
+
t71 = {
|
|
9830
9825
|
style: {
|
|
9831
9826
|
marginLeft: 2
|
|
9832
9827
|
}
|
|
9833
9828
|
};
|
|
9834
|
-
$[
|
|
9829
|
+
$[215] = t71;
|
|
9835
9830
|
} else {
|
|
9836
|
-
|
|
9831
|
+
t71 = $[215];
|
|
9837
9832
|
}
|
|
9838
|
-
var
|
|
9839
|
-
if ($[
|
|
9840
|
-
|
|
9833
|
+
var t72;
|
|
9834
|
+
if ($[216] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
9835
|
+
t72 = {
|
|
9841
9836
|
style: {
|
|
9842
9837
|
marginLeft: 2
|
|
9843
9838
|
}
|
|
9844
9839
|
};
|
|
9845
|
-
$[
|
|
9840
|
+
$[216] = t72;
|
|
9846
9841
|
} else {
|
|
9847
|
-
|
|
9842
|
+
t72 = $[216];
|
|
9848
9843
|
}
|
|
9849
|
-
var
|
|
9850
|
-
var
|
|
9851
|
-
var
|
|
9852
|
-
if ($[
|
|
9853
|
-
|
|
9854
|
-
className:
|
|
9844
|
+
var t73 = realHeight ? realHeight + (isMultiline ? 13 : 0) : controlHeight;
|
|
9845
|
+
var t74 = isMultiline ? false : isOnGetItemLoading || loading;
|
|
9846
|
+
var t75;
|
|
9847
|
+
if ($[217] !== color || $[218] !== control || $[219] !== error || $[220] !== errorHelperText || $[221] !== formControlBaseProps || $[222] !== fullWidth || $[223] !== hidden || $[224] !== label || $[225] !== labelIcon || $[226] !== required || $[227] !== size || $[228] !== style || $[229] !== sx || $[230] !== t69 || $[231] !== t70 || $[232] !== t73 || $[233] !== t74 || $[234] !== variant) {
|
|
9848
|
+
t75 = /*#__PURE__*/React.createElement(PFormItemBase, _extends({}, formControlBaseProps, {
|
|
9849
|
+
className: t69,
|
|
9855
9850
|
variant: variant,
|
|
9856
9851
|
size: size,
|
|
9857
9852
|
color: color,
|
|
@@ -9860,41 +9855,41 @@ function _temp$p() {
|
|
|
9860
9855
|
required: required,
|
|
9861
9856
|
fullWidth: fullWidth,
|
|
9862
9857
|
error: error,
|
|
9863
|
-
helperText:
|
|
9864
|
-
helperTextProps:
|
|
9858
|
+
helperText: t70,
|
|
9859
|
+
helperTextProps: t71,
|
|
9865
9860
|
errorHelperText: errorHelperText,
|
|
9866
|
-
errorHelperTextProps:
|
|
9861
|
+
errorHelperTextProps: t72,
|
|
9867
9862
|
style: style,
|
|
9868
9863
|
sx: sx,
|
|
9869
9864
|
hidden: hidden,
|
|
9870
9865
|
autoSize: true,
|
|
9871
|
-
controlHeight:
|
|
9872
|
-
controlVerticalCenter:
|
|
9866
|
+
controlHeight: t73,
|
|
9867
|
+
controlVerticalCenter: t74,
|
|
9873
9868
|
control: control
|
|
9874
9869
|
}));
|
|
9875
|
-
$[
|
|
9876
|
-
$[
|
|
9877
|
-
$[
|
|
9878
|
-
$[
|
|
9879
|
-
$[
|
|
9880
|
-
$[
|
|
9881
|
-
$[
|
|
9882
|
-
$[
|
|
9883
|
-
$[
|
|
9884
|
-
$[
|
|
9885
|
-
$[
|
|
9886
|
-
$[
|
|
9887
|
-
$[
|
|
9888
|
-
$[
|
|
9889
|
-
$[
|
|
9890
|
-
$[
|
|
9891
|
-
$[
|
|
9892
|
-
$[
|
|
9893
|
-
$[
|
|
9870
|
+
$[217] = color;
|
|
9871
|
+
$[218] = control;
|
|
9872
|
+
$[219] = error;
|
|
9873
|
+
$[220] = errorHelperText;
|
|
9874
|
+
$[221] = formControlBaseProps;
|
|
9875
|
+
$[222] = fullWidth;
|
|
9876
|
+
$[223] = hidden;
|
|
9877
|
+
$[224] = label;
|
|
9878
|
+
$[225] = labelIcon;
|
|
9879
|
+
$[226] = required;
|
|
9880
|
+
$[227] = size;
|
|
9881
|
+
$[228] = style;
|
|
9882
|
+
$[229] = sx;
|
|
9883
|
+
$[230] = t69;
|
|
9884
|
+
$[231] = t70;
|
|
9885
|
+
$[232] = t73;
|
|
9886
|
+
$[233] = t74;
|
|
9887
|
+
$[234] = variant;
|
|
9888
|
+
$[235] = t75;
|
|
9894
9889
|
} else {
|
|
9895
|
-
|
|
9890
|
+
t75 = $[235];
|
|
9896
9891
|
}
|
|
9897
|
-
return
|
|
9892
|
+
return t75;
|
|
9898
9893
|
}
|
|
9899
9894
|
function _temp4$1(v_3) {
|
|
9900
9895
|
return v_3.value;
|
package/package.json
CHANGED