formik-form-components 0.2.21 → 0.2.22

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/index.d.ts CHANGED
@@ -332,7 +332,6 @@ interface AppPhoneNoInputProps {
332
332
  labelSx?: SxProps<Theme>;
333
333
  inputSx?: React__default.CSSProperties;
334
334
  errorSx?: SxProps<Theme>;
335
- [key: string]: unknown;
336
335
  }
337
336
  declare const AppPhoneNoInput: React__default.FC<AppPhoneNoInputProps>;
338
337
 
package/dist/index.js CHANGED
@@ -1513,87 +1513,92 @@ var AppPhoneNoInput = ({
1513
1513
  containerSx,
1514
1514
  labelSx,
1515
1515
  inputSx,
1516
- errorSx,
1517
- ...otherProps
1516
+ errorSx
1518
1517
  }) => {
1519
1518
  const { values, errors, touched, setFieldValue, setFieldTouched } = formik.useFormikContext();
1520
1519
  const fieldError = react.useMemo(() => _19__default.default.get(errors, name), [errors, name]);
1521
1520
  const isTouched = react.useMemo(() => _19__default.default.get(touched, name), [touched, name]);
1522
- return /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: [{ mb: 2 }, containerSx, sx], children: [
1523
- label && /* @__PURE__ */ jsxRuntime.jsxs(
1524
- material.Typography,
1525
- {
1526
- variant: "subtitle2",
1527
- sx: [
1521
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1522
+ material.Box,
1523
+ {
1524
+ sx: [{ mb: 2 }, containerSx, sx],
1525
+ "data-testid": `phone-input-${name}`,
1526
+ children: [
1527
+ label && /* @__PURE__ */ jsxRuntime.jsxs(
1528
+ material.Typography,
1528
1529
  {
1529
- mb: 0.5,
1530
- color: isTouched && fieldError ? "error.main" : "text.primary"
1531
- },
1532
- labelSx
1533
- ],
1534
- children: [
1535
- label,
1536
- required && /* @__PURE__ */ jsxRuntime.jsx(
1537
- material.Typography,
1538
- {
1539
- component: "span",
1540
- sx: {
1541
- color: "error.main",
1542
- ml: 0.3
1530
+ variant: "subtitle2",
1531
+ sx: [
1532
+ {
1533
+ mb: 0.5,
1534
+ color: isTouched && fieldError ? "error.main" : "text.primary"
1543
1535
  },
1544
- children: "*"
1545
- }
1546
- )
1547
- ]
1548
- }
1549
- ),
1550
- /* @__PURE__ */ jsxRuntime.jsx(
1551
- PhoneInput__default.default,
1552
- {
1553
- country: defaultCountry,
1554
- specialLabel: "",
1555
- placeholder,
1556
- inputProps: {
1557
- name,
1558
- id: name,
1559
- required,
1560
- "aria-describedby": fieldError ? `${name}-error` : void 0,
1561
- "aria-invalid": !!fieldError,
1562
- "aria-required": required
1563
- },
1564
- inputStyle: {
1565
- width: "100%",
1566
- border: isTouched && fieldError ? "1px solid #f44336" : "1px solid #ccc",
1567
- padding: "10px",
1568
- borderRadius: "4px",
1569
- ...inputSx
1570
- },
1571
- containerStyle: {
1572
- width: "100%"
1573
- },
1574
- ...otherProps,
1575
- value: values[name],
1576
- onChange: (value) => setFieldValue(name, value),
1577
- onBlur: () => setFieldTouched(name, true)
1578
- }
1579
- ),
1580
- isTouched && fieldError && /* @__PURE__ */ jsxRuntime.jsx(
1581
- material.Typography,
1582
- {
1583
- variant: "caption",
1584
- id: `${name}-error`,
1585
- sx: [
1536
+ labelSx
1537
+ ],
1538
+ children: [
1539
+ label,
1540
+ required && /* @__PURE__ */ jsxRuntime.jsx(
1541
+ material.Typography,
1542
+ {
1543
+ component: "span",
1544
+ sx: {
1545
+ color: "error.main",
1546
+ ml: 0.3
1547
+ },
1548
+ children: "*"
1549
+ }
1550
+ )
1551
+ ]
1552
+ }
1553
+ ),
1554
+ /* @__PURE__ */ jsxRuntime.jsx(
1555
+ PhoneInput__default.default,
1586
1556
  {
1587
- mt: 0.5,
1588
- display: "block",
1589
- color: "error.main"
1590
- },
1591
- errorSx
1592
- ],
1593
- children: String(fieldError)
1594
- }
1595
- )
1596
- ] });
1557
+ country: defaultCountry,
1558
+ specialLabel: "",
1559
+ placeholder,
1560
+ inputProps: {
1561
+ name,
1562
+ id: name,
1563
+ required,
1564
+ "aria-describedby": fieldError ? `${name}-error` : void 0,
1565
+ "aria-invalid": !!fieldError,
1566
+ "aria-required": required
1567
+ },
1568
+ inputStyle: {
1569
+ width: "100%",
1570
+ border: isTouched && fieldError ? "1px solid #f44336" : "1px solid #ccc",
1571
+ padding: "10px",
1572
+ borderRadius: "4px",
1573
+ ...inputSx
1574
+ },
1575
+ containerStyle: {
1576
+ width: "100%"
1577
+ },
1578
+ value: values[name],
1579
+ onChange: (value) => setFieldValue(name, value),
1580
+ onBlur: () => setFieldTouched(name, true)
1581
+ }
1582
+ ),
1583
+ isTouched && fieldError && /* @__PURE__ */ jsxRuntime.jsx(
1584
+ material.Typography,
1585
+ {
1586
+ variant: "caption",
1587
+ id: `${name}-error`,
1588
+ sx: [
1589
+ {
1590
+ mt: 0.5,
1591
+ display: "block",
1592
+ color: "error.main"
1593
+ },
1594
+ errorSx
1595
+ ],
1596
+ children: String(fieldError)
1597
+ }
1598
+ )
1599
+ ]
1600
+ }
1601
+ );
1597
1602
  };
1598
1603
  var AppPhoneNoInput_default = AppPhoneNoInput;
1599
1604
  var AppRadioGroup = react.forwardRef(({