@app-studio/web 0.8.6 → 0.8.8

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/web.esm.js CHANGED
@@ -2,7 +2,7 @@ import React, { useRef, useState, useEffect, useCallback, useMemo, createContext
2
2
  import { View as View$1, Element, Typography, Image, useTheme, Input, Form } from 'app-studio';
3
3
  import { Link as Link$1 } from 'react-router-dom';
4
4
  import format from 'date-fns/format';
5
- import { useFormikContext } from 'formik';
5
+ import { useFormikContext, getIn } from 'formik';
6
6
  import { create } from 'zustand';
7
7
 
8
8
  var Top = function Top(props) {
@@ -1857,7 +1857,7 @@ var LabelComponent = function LabelComponent(props) {
1857
1857
  var Label = LabelComponent;
1858
1858
  // Export the 'LabelComponent' as 'Label' to be reused throughout the project.
1859
1859
 
1860
- var _excluded$p = ["children", "size", "error", "color", "styles"];
1860
+ var _excluded$p = ["children", "size", "error", "color", "styles", "helperText"];
1861
1861
  var FieldLabel = function FieldLabel(_ref) {
1862
1862
  var children = _ref.children,
1863
1863
  _ref$size = _ref.size,
@@ -2409,7 +2409,7 @@ var SliderPadding = {
2409
2409
  }
2410
2410
  };
2411
2411
 
2412
- var _excluded$s = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "on", "setOn", "onChange", "setValue", "setIsHovered", "styles"];
2412
+ var _excluded$s = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "on", "setOn", "onChange", "setValue", "setIsHovered", "helperText", "styles"];
2413
2413
  var SwitchContent = function SwitchContent(props) {
2414
2414
  return React.createElement(Input, Object.assign({
2415
2415
  type: "checkbox"
@@ -2966,7 +2966,7 @@ var IconSizes$3 = {
2966
2966
  '6xl': 60
2967
2967
  };
2968
2968
 
2969
- var _excluded$v = ["id", "icon", "name", "label", "isChecked", "onChange", "onValueChange", "shadow", "labelPosition", "size", "colorScheme", "error", "isSelected", "isHovered", "isDisabled", "isReadOnly", "isIndeterminate", "defaultIsSelected", "setIsSelected", "setIsHovered", "styles", "infoText"];
2969
+ var _excluded$v = ["id", "icon", "name", "label", "isChecked", "onChange", "onValueChange", "shadow", "labelPosition", "size", "colorScheme", "error", "isSelected", "isHovered", "isDisabled", "isReadOnly", "isIndeterminate", "defaultIsSelected", "setIsSelected", "setIsHovered", "styles", "infoText", "helperText"];
2970
2970
  var CheckboxView = function CheckboxView(_ref) {
2971
2971
  var id = _ref.id,
2972
2972
  icon = _ref.icon,
@@ -5133,7 +5133,6 @@ var useFormikInput = function useFormikInput(_ref) {
5133
5133
  values = _useFormikContext.values,
5134
5134
  setFieldTouched = _useFormikContext.setFieldTouched,
5135
5135
  setFieldValue = _useFormikContext.setFieldValue;
5136
- var error = touched[name] || submitCount > 0 ? errors[name] : undefined;
5137
5136
  var onChangeText = function onChangeText(text) {
5138
5137
  setFieldValue(name, text);
5139
5138
  props.onChangeText == null || props.onChangeText(text);
@@ -5154,8 +5153,10 @@ var useFormikInput = function useFormikInput(_ref) {
5154
5153
  }
5155
5154
  };
5156
5155
  var isText = ['text', 'password', 'email', 'digits'].includes(type);
5156
+ var error = getIn(touched, name) || submitCount > 0 ? getIn(errors, name) : undefined;
5157
+ var value = getIn(values, name);
5157
5158
  return _extends({}, getInputTypeProps(type), props, {
5158
- value: values[name],
5159
+ value: value,
5159
5160
  error: error,
5160
5161
  onBlur: handleBlur,
5161
5162
  onKeyPress: handleKeyPress