@pdg/react-form 1.2.7 → 1.2.9
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/PFormLayout/PFormBlock/PFormBlock.d.ts +1 -1
- package/dist/PFormLayout/PFormBlock/PFormBlock.types.d.ts +2 -1
- package/dist/PFormLayout/PFormDivider/PFormDivider.d.ts +1 -1
- package/dist/PFormLayout/PFormDivider/PFormDivider.types.d.ts +1 -0
- package/dist/index.esm.js +101 -83
- package/dist/index.js +100 -82
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PFormBlockProps as Props } from './PFormBlock.types';
|
|
3
|
-
declare const PFormBlock: ({ ref, variant: initVariant, size: initSize, color: initColor, spacing: initSpacing, focused: initFocused, labelShrink: initLabelShrink, fullWidth: initFullWidth, icon, label, line, lineVerticalMargin, error, warning, hidden, collapse, collapseIn: initCollapseIn, children, className, style: initStyle, sx, }: Props) => React.JSX.Element;
|
|
3
|
+
declare const PFormBlock: ({ ref, variant: initVariant, size: initSize, color: initColor, spacing: initSpacing, focused: initFocused, labelShrink: initLabelShrink, fullWidth: initFullWidth, icon, label, line, lineVerticalMargin, error, warning, endAdornment, hidden, collapse, collapseIn: initCollapseIn, children, className, style: initStyle, sx, }: Props) => React.JSX.Element;
|
|
4
4
|
export default PFormBlock;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { PartialPick, PCommonSxProps } from '../../@types';
|
|
3
3
|
import { PFormDividerProps } from '../PFormDivider';
|
|
4
4
|
import { PFormContextValue } from '../../PFormContext';
|
|
@@ -8,4 +8,5 @@ export interface PFormBlockProps extends PCommonSxProps, PartialPick<PFormContex
|
|
|
8
8
|
collapseIn?: boolean;
|
|
9
9
|
error?: boolean;
|
|
10
10
|
warning?: boolean;
|
|
11
|
+
endAdornment?: ReactNode;
|
|
11
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PFormDividerProps as Props } from './PFormDivider.types';
|
|
3
|
-
declare const PFormDivider: ({ ref, size: initSize, icon, label, line, lineVerticalMargin, hidden, collapse, collapseIn, error, warning, onCollapseChange, className, style: initStyle, sx, }: Props) => React.JSX.Element;
|
|
3
|
+
declare const PFormDivider: ({ ref, size: initSize, icon, label, line, lineVerticalMargin, hidden, collapse, collapseIn, error, warning, endAdornment, onCollapseChange, className, style: initStyle, sx, }: Props) => React.JSX.Element;
|
|
4
4
|
export default PFormDivider;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {c}from'react/compiler-runtime';import React,{createContext,useContext,useRef,useState,useId,useEffect}from'react';import classNames from'classnames';import {Box,styled,useTheme,InputLabel,Grid,Collapse,FormHelperText,TextField,InputAdornment,IconButton,Chip,Autocomplete,Icon,MenuItem,Checkbox,CircularProgress,Input,OutlinedInput,FilledInput,FormControl,Typography,FormControlLabel,Radio,RadioGroup,ToggleButton,ToggleButtonGroup,Rating,Skeleton,darken,Button,Tooltip,tooltipClasses,ClickAwayListener,DialogTitle,DialogContent,DialogActions,Dialog,Switch,Paper,Menu}from'@mui/material';import {empty,notEmpty,equal,ifEmpty}from'@pdg/compare';import dayjs from'dayjs';import {useAutoUpdateRef,useForwardRef,useFirstSkipChanged,useEventLayoutEffect,useEventEffect,useChanged,useFirstSkipEffect,useTimeoutRef,clearTimeoutRef}from'@pdg/react-hook';import {PButton,PIcon,PIconText}from'@pdg/react-component';import {useResizeDetector}from'react-resize-detector';import {formatTelNo,formatBusinessNo,formatPersonalNo}from'@pdg/formatting';import {NumericFormat}from'react-number-format';import {CheckBox,CheckBoxOutlineBlank,RadioButtonChecked,RadioButtonUnchecked}from'@mui/icons-material';import {Editor}from'@tinymce/tinymce-react';import {AdapterDayjs}from'@mui/x-date-pickers/AdapterDayjs';import {StaticDatePicker,PickersDay,DesktopDatePicker,LocalizationProvider,StaticDateTimePicker,DesktopDateTimePicker}from'@mui/x-date-pickers';import SimpleBar from'simplebar-react';import'dayjs/locale/ko';import {useLocation}from'react-router';function insertStyle(css) {
|
|
1
|
+
import {c}from'react/compiler-runtime';import React,{createContext,useContext,useRef,useState,useId,useEffect}from'react';import classNames from'classnames';import {Box,styled,useTheme,InputLabel,Grid,Collapse,FormHelperText,TextField,InputAdornment,IconButton,Chip,Autocomplete,Icon,MenuItem,Checkbox,CircularProgress,Input,OutlinedInput,FilledInput,FormControl,Typography,FormControlLabel,Radio,RadioGroup,ToggleButton,ToggleButtonGroup,Rating,Skeleton,darken,Button,Tooltip,tooltipClasses,ClickAwayListener,DialogTitle,DialogContent,DialogActions,Dialog,Switch,Paper,Menu}from'@mui/material';import {empty,notEmpty,equal,ifEmpty}from'@pdg/compare';import dayjs from'dayjs';import {useAutoUpdateRef,useForwardRef,useFirstSkipChanged,useEventLayoutEffect,useEventEffect,useChanged,useFirstSkipEffect,useTimeoutRef,clearTimeoutRef}from'@pdg/react-hook';import {PButton,PIcon,PStack,PIconButton,PIconText}from'@pdg/react-component';import {useResizeDetector}from'react-resize-detector';import {formatTelNo,formatBusinessNo,formatPersonalNo}from'@pdg/formatting';import {NumericFormat}from'react-number-format';import {CheckBox,CheckBoxOutlineBlank,RadioButtonChecked,RadioButtonUnchecked}from'@mui/icons-material';import {Editor}from'@tinymce/tinymce-react';import {AdapterDayjs}from'@mui/x-date-pickers/AdapterDayjs';import {StaticDatePicker,PickersDay,DesktopDatePicker,LocalizationProvider,StaticDateTimePicker,DesktopDateTimePicker}from'@mui/x-date-pickers';import SimpleBar from'simplebar-react';import'dayjs/locale/ko';import {useLocation}from'react-router';function insertStyle(css) {
|
|
2
2
|
if (!css || typeof window === 'undefined')
|
|
3
3
|
return;
|
|
4
4
|
const style = document.createElement('style');
|
|
@@ -1126,7 +1126,7 @@ var StyledWarningLineBox = styled(Box)(function (_ref2) {
|
|
|
1126
1126
|
position: 'relative'
|
|
1127
1127
|
};
|
|
1128
1128
|
var PFormDivider = function PFormDivider(t0) {
|
|
1129
|
-
var $ = c(
|
|
1129
|
+
var $ = c(48);
|
|
1130
1130
|
var ref = t0.ref,
|
|
1131
1131
|
initSize = t0.size,
|
|
1132
1132
|
icon = t0.icon,
|
|
@@ -1138,6 +1138,7 @@ var PFormDivider = function PFormDivider(t0) {
|
|
|
1138
1138
|
collapseIn = t0.collapseIn,
|
|
1139
1139
|
error = t0.error,
|
|
1140
1140
|
warning = t0.warning,
|
|
1141
|
+
endAdornment = t0.endAdornment,
|
|
1141
1142
|
onCollapseChange = t0.onCollapseChange,
|
|
1142
1143
|
className = t0.className,
|
|
1143
1144
|
initStyle = t0.style,
|
|
@@ -1280,40 +1281,51 @@ var PFormDivider = function PFormDivider(t0) {
|
|
|
1280
1281
|
t11 = $[28];
|
|
1281
1282
|
}
|
|
1282
1283
|
var t12;
|
|
1283
|
-
if ($[29] !== collapse || $[30] !== collapseIn || $[31] !==
|
|
1284
|
-
t12 = collapse && /*#__PURE__*/React.createElement(
|
|
1284
|
+
if ($[29] !== collapse || $[30] !== collapseIn || $[31] !== endAdornment || $[32] !== error || $[33] !== warning) {
|
|
1285
|
+
t12 = (endAdornment || collapse) && /*#__PURE__*/React.createElement(PStack, {
|
|
1286
|
+
row: true,
|
|
1287
|
+
center: true,
|
|
1288
|
+
sx: {
|
|
1289
|
+
ml: endAdornment && collapse ? 2 : 1
|
|
1290
|
+
}
|
|
1291
|
+
}, endAdornment && /*#__PURE__*/React.createElement(Box, {
|
|
1285
1292
|
sx: {
|
|
1286
|
-
|
|
1287
|
-
|
|
1293
|
+
my: -2
|
|
1294
|
+
},
|
|
1295
|
+
onClick: _temp$x
|
|
1296
|
+
}, endAdornment), collapse && /*#__PURE__*/React.createElement(PIconButton, {
|
|
1297
|
+
sx: {
|
|
1298
|
+
my: -2
|
|
1288
1299
|
},
|
|
1289
1300
|
color: error ? "error" : warning ? "warning" : undefined
|
|
1290
|
-
}, collapseIn ? "KeyboardDoubleArrowUp" : "KeyboardDoubleArrowDown");
|
|
1301
|
+
}, collapseIn ? "KeyboardDoubleArrowUp" : "KeyboardDoubleArrowDown"));
|
|
1291
1302
|
$[29] = collapse;
|
|
1292
1303
|
$[30] = collapseIn;
|
|
1293
|
-
$[31] =
|
|
1294
|
-
$[32] =
|
|
1295
|
-
$[33] =
|
|
1304
|
+
$[31] = endAdornment;
|
|
1305
|
+
$[32] = error;
|
|
1306
|
+
$[33] = warning;
|
|
1307
|
+
$[34] = t12;
|
|
1296
1308
|
} else {
|
|
1297
|
-
t12 = $[
|
|
1309
|
+
t12 = $[34];
|
|
1298
1310
|
}
|
|
1299
1311
|
var t13;
|
|
1300
|
-
if ($[
|
|
1312
|
+
if ($[35] !== handleClick || $[36] !== t10 || $[37] !== t11 || $[38] !== t12 || $[39] !== t8 || $[40] !== t9) {
|
|
1301
1313
|
t13 = /*#__PURE__*/React.createElement(Box, {
|
|
1302
1314
|
sx: t8,
|
|
1303
1315
|
onClick: handleClick
|
|
1304
1316
|
}, t9, t10, t11, t12);
|
|
1305
|
-
$[
|
|
1306
|
-
$[
|
|
1307
|
-
$[
|
|
1308
|
-
$[
|
|
1309
|
-
$[
|
|
1310
|
-
$[
|
|
1311
|
-
$[
|
|
1317
|
+
$[35] = handleClick;
|
|
1318
|
+
$[36] = t10;
|
|
1319
|
+
$[37] = t11;
|
|
1320
|
+
$[38] = t12;
|
|
1321
|
+
$[39] = t8;
|
|
1322
|
+
$[40] = t9;
|
|
1323
|
+
$[41] = t13;
|
|
1312
1324
|
} else {
|
|
1313
|
-
t13 = $[
|
|
1325
|
+
t13 = $[41];
|
|
1314
1326
|
}
|
|
1315
1327
|
var t14;
|
|
1316
|
-
if ($[
|
|
1328
|
+
if ($[42] !== ref || $[43] !== style || $[44] !== sx || $[45] !== t13 || $[46] !== t6) {
|
|
1317
1329
|
t14 = /*#__PURE__*/React.createElement(Grid, {
|
|
1318
1330
|
ref: ref,
|
|
1319
1331
|
size: t5,
|
|
@@ -1321,20 +1333,23 @@ var PFormDivider = function PFormDivider(t0) {
|
|
|
1321
1333
|
className: t6,
|
|
1322
1334
|
sx: sx
|
|
1323
1335
|
}, t13);
|
|
1324
|
-
$[
|
|
1325
|
-
$[
|
|
1326
|
-
$[
|
|
1327
|
-
$[
|
|
1328
|
-
$[
|
|
1329
|
-
$[
|
|
1336
|
+
$[42] = ref;
|
|
1337
|
+
$[43] = style;
|
|
1338
|
+
$[44] = sx;
|
|
1339
|
+
$[45] = t13;
|
|
1340
|
+
$[46] = t6;
|
|
1341
|
+
$[47] = t14;
|
|
1330
1342
|
} else {
|
|
1331
|
-
t14 = $[
|
|
1343
|
+
t14 = $[47];
|
|
1332
1344
|
}
|
|
1333
1345
|
return t14;
|
|
1334
|
-
};
|
|
1346
|
+
};
|
|
1347
|
+
function _temp$x(e) {
|
|
1348
|
+
e.stopPropagation();
|
|
1349
|
+
}var _templateObject$h;
|
|
1335
1350
|
var StyledWrapGrid$1 = styled(Grid)(_templateObject$h || (_templateObject$h = _taggedTemplateLiteral(["\n width: 100%;\n"])));var _excluded$B = ["variant", "size", "color", "spacing", "focused", "labelShrink", "fullWidth"];
|
|
1336
1351
|
var PFormBlock = function PFormBlock(t0) {
|
|
1337
|
-
var $ = c(
|
|
1352
|
+
var $ = c(67);
|
|
1338
1353
|
var ref = t0.ref,
|
|
1339
1354
|
initVariant = t0.variant,
|
|
1340
1355
|
initSize = t0.size,
|
|
@@ -1349,6 +1364,7 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1349
1364
|
lineVerticalMargin = t0.lineVerticalMargin,
|
|
1350
1365
|
error = t0.error,
|
|
1351
1366
|
warning = t0.warning,
|
|
1367
|
+
endAdornment = t0.endAdornment,
|
|
1352
1368
|
hidden = t0.hidden,
|
|
1353
1369
|
collapse = t0.collapse,
|
|
1354
1370
|
initCollapseIn = t0.collapseIn,
|
|
@@ -1491,7 +1507,7 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1491
1507
|
t8 = $[28];
|
|
1492
1508
|
}
|
|
1493
1509
|
var t9;
|
|
1494
|
-
if ($[29] !== collapse || $[30] !== collapseIn || $[31] !== color || $[32] !==
|
|
1510
|
+
if ($[29] !== collapse || $[30] !== collapseIn || $[31] !== color || $[32] !== endAdornment || $[33] !== error || $[34] !== hidden || $[35] !== icon || $[36] !== label || $[37] !== line || $[38] !== lineVerticalMargin || $[39] !== size || $[40] !== warning) {
|
|
1495
1511
|
t9 = (icon || label || line || collapse) && /*#__PURE__*/React.createElement(PFormDivider, {
|
|
1496
1512
|
className: "PFormBlock-header",
|
|
1497
1513
|
collapse: collapse,
|
|
@@ -1505,6 +1521,7 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1505
1521
|
warning: warning,
|
|
1506
1522
|
lineVerticalMargin: lineVerticalMargin,
|
|
1507
1523
|
hidden: hidden,
|
|
1524
|
+
endAdornment: endAdornment,
|
|
1508
1525
|
onCollapseChange: collapse ? function (newCollapseIn) {
|
|
1509
1526
|
return setCollapseIn(newCollapseIn);
|
|
1510
1527
|
} : undefined
|
|
@@ -1512,38 +1529,39 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1512
1529
|
$[29] = collapse;
|
|
1513
1530
|
$[30] = collapseIn;
|
|
1514
1531
|
$[31] = color;
|
|
1515
|
-
$[32] =
|
|
1516
|
-
$[33] =
|
|
1517
|
-
$[34] =
|
|
1518
|
-
$[35] =
|
|
1519
|
-
$[36] =
|
|
1520
|
-
$[37] =
|
|
1521
|
-
$[38] =
|
|
1522
|
-
$[39] =
|
|
1523
|
-
$[40] =
|
|
1532
|
+
$[32] = endAdornment;
|
|
1533
|
+
$[33] = error;
|
|
1534
|
+
$[34] = hidden;
|
|
1535
|
+
$[35] = icon;
|
|
1536
|
+
$[36] = label;
|
|
1537
|
+
$[37] = line;
|
|
1538
|
+
$[38] = lineVerticalMargin;
|
|
1539
|
+
$[39] = size;
|
|
1540
|
+
$[40] = warning;
|
|
1541
|
+
$[41] = t9;
|
|
1524
1542
|
} else {
|
|
1525
|
-
t9 = $[
|
|
1543
|
+
t9 = $[41];
|
|
1526
1544
|
}
|
|
1527
1545
|
var t10;
|
|
1528
|
-
if ($[
|
|
1546
|
+
if ($[42] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
1529
1547
|
t10 = {
|
|
1530
1548
|
xs: 12
|
|
1531
1549
|
};
|
|
1532
|
-
$[
|
|
1550
|
+
$[42] = t10;
|
|
1533
1551
|
} else {
|
|
1534
|
-
t10 = $[
|
|
1552
|
+
t10 = $[42];
|
|
1535
1553
|
}
|
|
1536
1554
|
var t11;
|
|
1537
|
-
if ($[
|
|
1555
|
+
if ($[43] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
1538
1556
|
t11 = {
|
|
1539
1557
|
xs: 12
|
|
1540
1558
|
};
|
|
1541
|
-
$[
|
|
1559
|
+
$[43] = t11;
|
|
1542
1560
|
} else {
|
|
1543
|
-
t11 = $[
|
|
1561
|
+
t11 = $[43];
|
|
1544
1562
|
}
|
|
1545
1563
|
var t12;
|
|
1546
|
-
if ($[
|
|
1564
|
+
if ($[44] !== children || $[45] !== spacing) {
|
|
1547
1565
|
t12 = /*#__PURE__*/React.createElement(StyledWrapGrid$1, {
|
|
1548
1566
|
size: t11,
|
|
1549
1567
|
className: "PFormBlock-body"
|
|
@@ -1552,51 +1570,51 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1552
1570
|
container: true,
|
|
1553
1571
|
spacing: spacing
|
|
1554
1572
|
}, children));
|
|
1555
|
-
$[
|
|
1556
|
-
$[
|
|
1557
|
-
$[
|
|
1573
|
+
$[44] = children;
|
|
1574
|
+
$[45] = spacing;
|
|
1575
|
+
$[46] = t12;
|
|
1558
1576
|
} else {
|
|
1559
|
-
t12 = $[
|
|
1577
|
+
t12 = $[46];
|
|
1560
1578
|
}
|
|
1561
1579
|
var t13;
|
|
1562
|
-
if ($[
|
|
1580
|
+
if ($[47] !== spacing || $[48] !== t12) {
|
|
1563
1581
|
t13 = /*#__PURE__*/React.createElement(Grid, {
|
|
1564
1582
|
container: true,
|
|
1565
1583
|
spacing: spacing
|
|
1566
1584
|
}, t12);
|
|
1567
|
-
$[
|
|
1568
|
-
$[
|
|
1569
|
-
$[
|
|
1585
|
+
$[47] = spacing;
|
|
1586
|
+
$[48] = t12;
|
|
1587
|
+
$[49] = t13;
|
|
1570
1588
|
} else {
|
|
1571
|
-
t13 = $[
|
|
1589
|
+
t13 = $[49];
|
|
1572
1590
|
}
|
|
1573
1591
|
var t14;
|
|
1574
|
-
if ($[
|
|
1592
|
+
if ($[50] !== Container || $[51] !== containerProps || $[52] !== t13) {
|
|
1575
1593
|
t14 = /*#__PURE__*/React.createElement(StyledWrapGrid$1, {
|
|
1576
1594
|
size: t10
|
|
1577
1595
|
}, /*#__PURE__*/React.createElement(Container, containerProps, t13));
|
|
1578
|
-
$[
|
|
1579
|
-
$[
|
|
1580
|
-
$[
|
|
1581
|
-
$[
|
|
1596
|
+
$[50] = Container;
|
|
1597
|
+
$[51] = containerProps;
|
|
1598
|
+
$[52] = t13;
|
|
1599
|
+
$[53] = t14;
|
|
1582
1600
|
} else {
|
|
1583
|
-
t14 = $[
|
|
1601
|
+
t14 = $[53];
|
|
1584
1602
|
}
|
|
1585
1603
|
var t15;
|
|
1586
|
-
if ($[
|
|
1604
|
+
if ($[54] !== spacing || $[55] !== t14 || $[56] !== t9) {
|
|
1587
1605
|
t15 = /*#__PURE__*/React.createElement(Grid, {
|
|
1588
1606
|
container: true,
|
|
1589
1607
|
spacing: spacing
|
|
1590
1608
|
}, t9, t14);
|
|
1591
|
-
$[
|
|
1592
|
-
$[
|
|
1593
|
-
$[
|
|
1594
|
-
$[
|
|
1609
|
+
$[54] = spacing;
|
|
1610
|
+
$[55] = t14;
|
|
1611
|
+
$[56] = t9;
|
|
1612
|
+
$[57] = t15;
|
|
1595
1613
|
} else {
|
|
1596
|
-
t15 = $[
|
|
1614
|
+
t15 = $[57];
|
|
1597
1615
|
}
|
|
1598
1616
|
var t16;
|
|
1599
|
-
if ($[
|
|
1617
|
+
if ($[58] !== ref || $[59] !== style || $[60] !== sx || $[61] !== t15 || $[62] !== t8) {
|
|
1600
1618
|
t16 = /*#__PURE__*/React.createElement(Grid, {
|
|
1601
1619
|
ref: ref,
|
|
1602
1620
|
size: t7,
|
|
@@ -1604,25 +1622,25 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1604
1622
|
style: style,
|
|
1605
1623
|
sx: sx
|
|
1606
1624
|
}, t15);
|
|
1607
|
-
$[
|
|
1608
|
-
$[
|
|
1609
|
-
$[
|
|
1610
|
-
$[
|
|
1611
|
-
$[
|
|
1612
|
-
$[
|
|
1625
|
+
$[58] = ref;
|
|
1626
|
+
$[59] = style;
|
|
1627
|
+
$[60] = sx;
|
|
1628
|
+
$[61] = t15;
|
|
1629
|
+
$[62] = t8;
|
|
1630
|
+
$[63] = t16;
|
|
1613
1631
|
} else {
|
|
1614
|
-
t16 = $[
|
|
1632
|
+
t16 = $[63];
|
|
1615
1633
|
}
|
|
1616
1634
|
var t17;
|
|
1617
|
-
if ($[
|
|
1635
|
+
if ($[64] !== t16 || $[65] !== t6) {
|
|
1618
1636
|
t17 = /*#__PURE__*/React.createElement(PFormContext.Provider, {
|
|
1619
1637
|
value: t6
|
|
1620
1638
|
}, t16);
|
|
1621
|
-
$[
|
|
1622
|
-
$[
|
|
1623
|
-
$[
|
|
1639
|
+
$[64] = t16;
|
|
1640
|
+
$[65] = t6;
|
|
1641
|
+
$[66] = t17;
|
|
1624
1642
|
} else {
|
|
1625
|
-
t17 = $[
|
|
1643
|
+
t17 = $[66];
|
|
1626
1644
|
}
|
|
1627
1645
|
return t17;
|
|
1628
1646
|
};var _templateObject$g;
|
|
@@ -2498,7 +2516,7 @@ var StyledContentDiv = styled('div')(_templateObject2$7 || (_templateObject2$7 =
|
|
|
2498
2516
|
t5 = $[12];
|
|
2499
2517
|
}
|
|
2500
2518
|
return t5;
|
|
2501
|
-
};insertStyle(".PFormTextField{min-width:200px}.PFormTextField .clear-icon-button-wrap{
|
|
2519
|
+
};insertStyle(".PFormTextField{min-width:200px}.PFormTextField .clear-icon-button-wrap{display:none}.PFormTextField.variant-filled .clear-icon-button-wrap{margin-top:9px;margin-bottom:-9px}.PFormTextField:hover .clear-icon-button-wrap.show,.PFormTextField .MuiInputBase-root.Mui-focused .clear-icon-button-wrap.show{display:block}");var _excluded$y = ["ref", "variant", "size", "color", "focused", "labelShrink", "fullWidth", "submitWhenReturnKey", "name", "required", "value", "data", "icon", "labelIcon", "label", "error", "helperText", "exceptValue", "readOnly", "tabIndex", "disabled", "placeholder", "maxLength", "clear", "width", "slotProps", "inputRef", "select", "multiline", "validPattern", "invalidPattern", "startAdornment", "endAdornment", "noFormValueItem", "hidden", "disableReturnKey", "onChange", "onValue", "onValidate", "onBlur", "onKeyDown", "className", "style"];
|
|
2502
2520
|
function PFormTextField(t0) {
|
|
2503
2521
|
var _initSlotProps, _initSlotProps4;
|
|
2504
2522
|
var $ = c(216);
|
package/dist/index.js
CHANGED
|
@@ -1126,7 +1126,7 @@ var StyledWarningLineBox = material.styled(material.Box)(function (_ref2) {
|
|
|
1126
1126
|
position: 'relative'
|
|
1127
1127
|
};
|
|
1128
1128
|
var PFormDivider = function PFormDivider(t0) {
|
|
1129
|
-
var $ = compilerRuntime.c(
|
|
1129
|
+
var $ = compilerRuntime.c(48);
|
|
1130
1130
|
var ref = t0.ref,
|
|
1131
1131
|
initSize = t0.size,
|
|
1132
1132
|
icon = t0.icon,
|
|
@@ -1138,6 +1138,7 @@ var PFormDivider = function PFormDivider(t0) {
|
|
|
1138
1138
|
collapseIn = t0.collapseIn,
|
|
1139
1139
|
error = t0.error,
|
|
1140
1140
|
warning = t0.warning,
|
|
1141
|
+
endAdornment = t0.endAdornment,
|
|
1141
1142
|
onCollapseChange = t0.onCollapseChange,
|
|
1142
1143
|
className = t0.className,
|
|
1143
1144
|
initStyle = t0.style,
|
|
@@ -1280,40 +1281,51 @@ var PFormDivider = function PFormDivider(t0) {
|
|
|
1280
1281
|
t11 = $[28];
|
|
1281
1282
|
}
|
|
1282
1283
|
var t12;
|
|
1283
|
-
if ($[29] !== collapse || $[30] !== collapseIn || $[31] !==
|
|
1284
|
-
t12 = collapse && /*#__PURE__*/React.createElement(reactComponent.
|
|
1284
|
+
if ($[29] !== collapse || $[30] !== collapseIn || $[31] !== endAdornment || $[32] !== error || $[33] !== warning) {
|
|
1285
|
+
t12 = (endAdornment || collapse) && /*#__PURE__*/React.createElement(reactComponent.PStack, {
|
|
1286
|
+
row: true,
|
|
1287
|
+
center: true,
|
|
1288
|
+
sx: {
|
|
1289
|
+
ml: endAdornment && collapse ? 2 : 1
|
|
1290
|
+
}
|
|
1291
|
+
}, endAdornment && /*#__PURE__*/React.createElement(material.Box, {
|
|
1285
1292
|
sx: {
|
|
1286
|
-
|
|
1287
|
-
|
|
1293
|
+
my: -2
|
|
1294
|
+
},
|
|
1295
|
+
onClick: _temp$x
|
|
1296
|
+
}, endAdornment), collapse && /*#__PURE__*/React.createElement(reactComponent.PIconButton, {
|
|
1297
|
+
sx: {
|
|
1298
|
+
my: -2
|
|
1288
1299
|
},
|
|
1289
1300
|
color: error ? "error" : warning ? "warning" : undefined
|
|
1290
|
-
}, collapseIn ? "KeyboardDoubleArrowUp" : "KeyboardDoubleArrowDown");
|
|
1301
|
+
}, collapseIn ? "KeyboardDoubleArrowUp" : "KeyboardDoubleArrowDown"));
|
|
1291
1302
|
$[29] = collapse;
|
|
1292
1303
|
$[30] = collapseIn;
|
|
1293
|
-
$[31] =
|
|
1294
|
-
$[32] =
|
|
1295
|
-
$[33] =
|
|
1304
|
+
$[31] = endAdornment;
|
|
1305
|
+
$[32] = error;
|
|
1306
|
+
$[33] = warning;
|
|
1307
|
+
$[34] = t12;
|
|
1296
1308
|
} else {
|
|
1297
|
-
t12 = $[
|
|
1309
|
+
t12 = $[34];
|
|
1298
1310
|
}
|
|
1299
1311
|
var t13;
|
|
1300
|
-
if ($[
|
|
1312
|
+
if ($[35] !== handleClick || $[36] !== t10 || $[37] !== t11 || $[38] !== t12 || $[39] !== t8 || $[40] !== t9) {
|
|
1301
1313
|
t13 = /*#__PURE__*/React.createElement(material.Box, {
|
|
1302
1314
|
sx: t8,
|
|
1303
1315
|
onClick: handleClick
|
|
1304
1316
|
}, t9, t10, t11, t12);
|
|
1305
|
-
$[
|
|
1306
|
-
$[
|
|
1307
|
-
$[
|
|
1308
|
-
$[
|
|
1309
|
-
$[
|
|
1310
|
-
$[
|
|
1311
|
-
$[
|
|
1317
|
+
$[35] = handleClick;
|
|
1318
|
+
$[36] = t10;
|
|
1319
|
+
$[37] = t11;
|
|
1320
|
+
$[38] = t12;
|
|
1321
|
+
$[39] = t8;
|
|
1322
|
+
$[40] = t9;
|
|
1323
|
+
$[41] = t13;
|
|
1312
1324
|
} else {
|
|
1313
|
-
t13 = $[
|
|
1325
|
+
t13 = $[41];
|
|
1314
1326
|
}
|
|
1315
1327
|
var t14;
|
|
1316
|
-
if ($[
|
|
1328
|
+
if ($[42] !== ref || $[43] !== style || $[44] !== sx || $[45] !== t13 || $[46] !== t6) {
|
|
1317
1329
|
t14 = /*#__PURE__*/React.createElement(material.Grid, {
|
|
1318
1330
|
ref: ref,
|
|
1319
1331
|
size: t5,
|
|
@@ -1321,20 +1333,23 @@ var PFormDivider = function PFormDivider(t0) {
|
|
|
1321
1333
|
className: t6,
|
|
1322
1334
|
sx: sx
|
|
1323
1335
|
}, t13);
|
|
1324
|
-
$[
|
|
1325
|
-
$[
|
|
1326
|
-
$[
|
|
1327
|
-
$[
|
|
1328
|
-
$[
|
|
1329
|
-
$[
|
|
1336
|
+
$[42] = ref;
|
|
1337
|
+
$[43] = style;
|
|
1338
|
+
$[44] = sx;
|
|
1339
|
+
$[45] = t13;
|
|
1340
|
+
$[46] = t6;
|
|
1341
|
+
$[47] = t14;
|
|
1330
1342
|
} else {
|
|
1331
|
-
t14 = $[
|
|
1343
|
+
t14 = $[47];
|
|
1332
1344
|
}
|
|
1333
1345
|
return t14;
|
|
1334
|
-
};
|
|
1346
|
+
};
|
|
1347
|
+
function _temp$x(e) {
|
|
1348
|
+
e.stopPropagation();
|
|
1349
|
+
}var _templateObject$h;
|
|
1335
1350
|
var StyledWrapGrid$1 = material.styled(material.Grid)(_templateObject$h || (_templateObject$h = _taggedTemplateLiteral(["\n width: 100%;\n"])));var _excluded$B = ["variant", "size", "color", "spacing", "focused", "labelShrink", "fullWidth"];
|
|
1336
1351
|
var PFormBlock = function PFormBlock(t0) {
|
|
1337
|
-
var $ = compilerRuntime.c(
|
|
1352
|
+
var $ = compilerRuntime.c(67);
|
|
1338
1353
|
var ref = t0.ref,
|
|
1339
1354
|
initVariant = t0.variant,
|
|
1340
1355
|
initSize = t0.size,
|
|
@@ -1349,6 +1364,7 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1349
1364
|
lineVerticalMargin = t0.lineVerticalMargin,
|
|
1350
1365
|
error = t0.error,
|
|
1351
1366
|
warning = t0.warning,
|
|
1367
|
+
endAdornment = t0.endAdornment,
|
|
1352
1368
|
hidden = t0.hidden,
|
|
1353
1369
|
collapse = t0.collapse,
|
|
1354
1370
|
initCollapseIn = t0.collapseIn,
|
|
@@ -1491,7 +1507,7 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1491
1507
|
t8 = $[28];
|
|
1492
1508
|
}
|
|
1493
1509
|
var t9;
|
|
1494
|
-
if ($[29] !== collapse || $[30] !== collapseIn || $[31] !== color || $[32] !==
|
|
1510
|
+
if ($[29] !== collapse || $[30] !== collapseIn || $[31] !== color || $[32] !== endAdornment || $[33] !== error || $[34] !== hidden || $[35] !== icon || $[36] !== label || $[37] !== line || $[38] !== lineVerticalMargin || $[39] !== size || $[40] !== warning) {
|
|
1495
1511
|
t9 = (icon || label || line || collapse) && /*#__PURE__*/React.createElement(PFormDivider, {
|
|
1496
1512
|
className: "PFormBlock-header",
|
|
1497
1513
|
collapse: collapse,
|
|
@@ -1505,6 +1521,7 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1505
1521
|
warning: warning,
|
|
1506
1522
|
lineVerticalMargin: lineVerticalMargin,
|
|
1507
1523
|
hidden: hidden,
|
|
1524
|
+
endAdornment: endAdornment,
|
|
1508
1525
|
onCollapseChange: collapse ? function (newCollapseIn) {
|
|
1509
1526
|
return setCollapseIn(newCollapseIn);
|
|
1510
1527
|
} : undefined
|
|
@@ -1512,38 +1529,39 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1512
1529
|
$[29] = collapse;
|
|
1513
1530
|
$[30] = collapseIn;
|
|
1514
1531
|
$[31] = color;
|
|
1515
|
-
$[32] =
|
|
1516
|
-
$[33] =
|
|
1517
|
-
$[34] =
|
|
1518
|
-
$[35] =
|
|
1519
|
-
$[36] =
|
|
1520
|
-
$[37] =
|
|
1521
|
-
$[38] =
|
|
1522
|
-
$[39] =
|
|
1523
|
-
$[40] =
|
|
1532
|
+
$[32] = endAdornment;
|
|
1533
|
+
$[33] = error;
|
|
1534
|
+
$[34] = hidden;
|
|
1535
|
+
$[35] = icon;
|
|
1536
|
+
$[36] = label;
|
|
1537
|
+
$[37] = line;
|
|
1538
|
+
$[38] = lineVerticalMargin;
|
|
1539
|
+
$[39] = size;
|
|
1540
|
+
$[40] = warning;
|
|
1541
|
+
$[41] = t9;
|
|
1524
1542
|
} else {
|
|
1525
|
-
t9 = $[
|
|
1543
|
+
t9 = $[41];
|
|
1526
1544
|
}
|
|
1527
1545
|
var t10;
|
|
1528
|
-
if ($[
|
|
1546
|
+
if ($[42] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
1529
1547
|
t10 = {
|
|
1530
1548
|
xs: 12
|
|
1531
1549
|
};
|
|
1532
|
-
$[
|
|
1550
|
+
$[42] = t10;
|
|
1533
1551
|
} else {
|
|
1534
|
-
t10 = $[
|
|
1552
|
+
t10 = $[42];
|
|
1535
1553
|
}
|
|
1536
1554
|
var t11;
|
|
1537
|
-
if ($[
|
|
1555
|
+
if ($[43] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
1538
1556
|
t11 = {
|
|
1539
1557
|
xs: 12
|
|
1540
1558
|
};
|
|
1541
|
-
$[
|
|
1559
|
+
$[43] = t11;
|
|
1542
1560
|
} else {
|
|
1543
|
-
t11 = $[
|
|
1561
|
+
t11 = $[43];
|
|
1544
1562
|
}
|
|
1545
1563
|
var t12;
|
|
1546
|
-
if ($[
|
|
1564
|
+
if ($[44] !== children || $[45] !== spacing) {
|
|
1547
1565
|
t12 = /*#__PURE__*/React.createElement(StyledWrapGrid$1, {
|
|
1548
1566
|
size: t11,
|
|
1549
1567
|
className: "PFormBlock-body"
|
|
@@ -1552,51 +1570,51 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1552
1570
|
container: true,
|
|
1553
1571
|
spacing: spacing
|
|
1554
1572
|
}, children));
|
|
1555
|
-
$[
|
|
1556
|
-
$[
|
|
1557
|
-
$[
|
|
1573
|
+
$[44] = children;
|
|
1574
|
+
$[45] = spacing;
|
|
1575
|
+
$[46] = t12;
|
|
1558
1576
|
} else {
|
|
1559
|
-
t12 = $[
|
|
1577
|
+
t12 = $[46];
|
|
1560
1578
|
}
|
|
1561
1579
|
var t13;
|
|
1562
|
-
if ($[
|
|
1580
|
+
if ($[47] !== spacing || $[48] !== t12) {
|
|
1563
1581
|
t13 = /*#__PURE__*/React.createElement(material.Grid, {
|
|
1564
1582
|
container: true,
|
|
1565
1583
|
spacing: spacing
|
|
1566
1584
|
}, t12);
|
|
1567
|
-
$[
|
|
1568
|
-
$[
|
|
1569
|
-
$[
|
|
1585
|
+
$[47] = spacing;
|
|
1586
|
+
$[48] = t12;
|
|
1587
|
+
$[49] = t13;
|
|
1570
1588
|
} else {
|
|
1571
|
-
t13 = $[
|
|
1589
|
+
t13 = $[49];
|
|
1572
1590
|
}
|
|
1573
1591
|
var t14;
|
|
1574
|
-
if ($[
|
|
1592
|
+
if ($[50] !== Container || $[51] !== containerProps || $[52] !== t13) {
|
|
1575
1593
|
t14 = /*#__PURE__*/React.createElement(StyledWrapGrid$1, {
|
|
1576
1594
|
size: t10
|
|
1577
1595
|
}, /*#__PURE__*/React.createElement(Container, containerProps, t13));
|
|
1578
|
-
$[
|
|
1579
|
-
$[
|
|
1580
|
-
$[
|
|
1581
|
-
$[
|
|
1596
|
+
$[50] = Container;
|
|
1597
|
+
$[51] = containerProps;
|
|
1598
|
+
$[52] = t13;
|
|
1599
|
+
$[53] = t14;
|
|
1582
1600
|
} else {
|
|
1583
|
-
t14 = $[
|
|
1601
|
+
t14 = $[53];
|
|
1584
1602
|
}
|
|
1585
1603
|
var t15;
|
|
1586
|
-
if ($[
|
|
1604
|
+
if ($[54] !== spacing || $[55] !== t14 || $[56] !== t9) {
|
|
1587
1605
|
t15 = /*#__PURE__*/React.createElement(material.Grid, {
|
|
1588
1606
|
container: true,
|
|
1589
1607
|
spacing: spacing
|
|
1590
1608
|
}, t9, t14);
|
|
1591
|
-
$[
|
|
1592
|
-
$[
|
|
1593
|
-
$[
|
|
1594
|
-
$[
|
|
1609
|
+
$[54] = spacing;
|
|
1610
|
+
$[55] = t14;
|
|
1611
|
+
$[56] = t9;
|
|
1612
|
+
$[57] = t15;
|
|
1595
1613
|
} else {
|
|
1596
|
-
t15 = $[
|
|
1614
|
+
t15 = $[57];
|
|
1597
1615
|
}
|
|
1598
1616
|
var t16;
|
|
1599
|
-
if ($[
|
|
1617
|
+
if ($[58] !== ref || $[59] !== style || $[60] !== sx || $[61] !== t15 || $[62] !== t8) {
|
|
1600
1618
|
t16 = /*#__PURE__*/React.createElement(material.Grid, {
|
|
1601
1619
|
ref: ref,
|
|
1602
1620
|
size: t7,
|
|
@@ -1604,25 +1622,25 @@ var PFormBlock = function PFormBlock(t0) {
|
|
|
1604
1622
|
style: style,
|
|
1605
1623
|
sx: sx
|
|
1606
1624
|
}, t15);
|
|
1607
|
-
$[
|
|
1608
|
-
$[
|
|
1609
|
-
$[
|
|
1610
|
-
$[
|
|
1611
|
-
$[
|
|
1612
|
-
$[
|
|
1625
|
+
$[58] = ref;
|
|
1626
|
+
$[59] = style;
|
|
1627
|
+
$[60] = sx;
|
|
1628
|
+
$[61] = t15;
|
|
1629
|
+
$[62] = t8;
|
|
1630
|
+
$[63] = t16;
|
|
1613
1631
|
} else {
|
|
1614
|
-
t16 = $[
|
|
1632
|
+
t16 = $[63];
|
|
1615
1633
|
}
|
|
1616
1634
|
var t17;
|
|
1617
|
-
if ($[
|
|
1635
|
+
if ($[64] !== t16 || $[65] !== t6) {
|
|
1618
1636
|
t17 = /*#__PURE__*/React.createElement(PFormContext.Provider, {
|
|
1619
1637
|
value: t6
|
|
1620
1638
|
}, t16);
|
|
1621
|
-
$[
|
|
1622
|
-
$[
|
|
1623
|
-
$[
|
|
1639
|
+
$[64] = t16;
|
|
1640
|
+
$[65] = t6;
|
|
1641
|
+
$[66] = t17;
|
|
1624
1642
|
} else {
|
|
1625
|
-
t17 = $[
|
|
1643
|
+
t17 = $[66];
|
|
1626
1644
|
}
|
|
1627
1645
|
return t17;
|
|
1628
1646
|
};var _templateObject$g;
|
|
@@ -2498,7 +2516,7 @@ var StyledContentDiv = material.styled('div')(_templateObject2$7 || (_templateOb
|
|
|
2498
2516
|
t5 = $[12];
|
|
2499
2517
|
}
|
|
2500
2518
|
return t5;
|
|
2501
|
-
};insertStyle(".PFormTextField{min-width:200px}.PFormTextField .clear-icon-button-wrap{
|
|
2519
|
+
};insertStyle(".PFormTextField{min-width:200px}.PFormTextField .clear-icon-button-wrap{display:none}.PFormTextField.variant-filled .clear-icon-button-wrap{margin-top:9px;margin-bottom:-9px}.PFormTextField:hover .clear-icon-button-wrap.show,.PFormTextField .MuiInputBase-root.Mui-focused .clear-icon-button-wrap.show{display:block}");var _excluded$y = ["ref", "variant", "size", "color", "focused", "labelShrink", "fullWidth", "submitWhenReturnKey", "name", "required", "value", "data", "icon", "labelIcon", "label", "error", "helperText", "exceptValue", "readOnly", "tabIndex", "disabled", "placeholder", "maxLength", "clear", "width", "slotProps", "inputRef", "select", "multiline", "validPattern", "invalidPattern", "startAdornment", "endAdornment", "noFormValueItem", "hidden", "disableReturnKey", "onChange", "onValue", "onValidate", "onBlur", "onKeyDown", "className", "style"];
|
|
2502
2520
|
function PFormTextField(t0) {
|
|
2503
2521
|
var _initSlotProps, _initSlotProps4;
|
|
2504
2522
|
var $ = compilerRuntime.c(216);
|
package/package.json
CHANGED