@app-studio/web 0.7.17 → 0.8.0

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
@@ -1,8 +1,6 @@
1
1
  import React, { useRef, useState, useEffect, useCallback, useMemo, createContext, useContext, Fragment } from 'react';
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
- import { Horizontal as Horizontal$1 } from 'src/components/Layout/Horizontal/Horizontal';
5
- import { Vertical as Vertical$1 } from 'src/components/Layout/Vertical/Vertical';
6
4
  import format from 'date-fns/format';
7
5
  import { useFormikContext } from 'formik';
8
6
  import { create } from 'zustand';
@@ -714,7 +712,7 @@ var AlertView = function AlertView(_ref) {
714
712
  borderWidth: 1,
715
713
  borderStyle: "solid",
716
714
  padding: 16,
717
- wrap: "nowrap",
715
+ flexWrap: "nowrap",
718
716
  borderColor: Themes[variant].container.border
719
717
  }, styles == null ? void 0 : styles.container), React.createElement(View, {
720
718
  alignSelf: 'center'
@@ -1077,7 +1075,7 @@ var LinkView = function LinkView(_ref) {
1077
1075
  }, styles.text, props), React.createElement(Horizontal, {
1078
1076
  gap: 3,
1079
1077
  alignItems: "center",
1080
- wrap: "nowrap"
1078
+ flexWrap: "nowrap"
1081
1079
  }, children, isExternal && React.createElement(ExternalLinkSvg, {
1082
1080
  size: IconSizes[iconSize],
1083
1081
  style: styles.icon
@@ -1442,6 +1440,11 @@ var ButtonView = function ButtonView(_ref) {
1442
1440
  _ref$setIsHovered = _ref.setIsHovered,
1443
1441
  setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
1444
1442
  props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
1443
+ console.log({
1444
+ button: props,
1445
+ size: size,
1446
+ isDisabled: isDisabled
1447
+ });
1445
1448
  var _useTheme = useTheme(),
1446
1449
  getColor = _useTheme.getColor;
1447
1450
  var handleHover = function handleHover() {
@@ -1745,7 +1748,7 @@ var FieldContent = function FieldContent(_ref) {
1745
1748
  gap: 10,
1746
1749
  width: "100%",
1747
1750
  display: "flex",
1748
- wrap: "nowrap",
1751
+ flexWrap: "nowrap",
1749
1752
  borderStyle: "solid",
1750
1753
  alignItems: "center",
1751
1754
  borderColor: color,
@@ -1767,7 +1770,7 @@ var FieldIcons = function FieldIcons(_ref) {
1767
1770
  gap: 10,
1768
1771
  right: 16,
1769
1772
  zIndex: 500,
1770
- wrap: "nowrap",
1773
+ flexWrap: "nowrap",
1771
1774
  position: "absolute"
1772
1775
  }, props), children);
1773
1776
  };
@@ -3045,9 +3048,9 @@ var CheckboxView = function CheckboxView(_ref) {
3045
3048
  onMouseEnter: handleHover,
3046
3049
  onMouseLeave: handleHover,
3047
3050
  size: Typography.fontSizes[size]
3048
- }, checkboxStyle.container, props), React.createElement(Vertical$1, {
3051
+ }, checkboxStyle.container, props), React.createElement(Vertical, {
3049
3052
  gap: 8
3050
- }, React.createElement(Horizontal$1, {
3053
+ }, React.createElement(Horizontal, {
3051
3054
  gap: 10,
3052
3055
  alignItems: "center"
3053
3056
  }, labelPosition === 'left' && label && React.createElement(Text, Object.assign({
@@ -4566,8 +4569,11 @@ var IconSizes$4 = {
4566
4569
  xl: 16
4567
4570
  };
4568
4571
 
4569
- var _excluded$w = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isHovered", "isFocused", "isAutoFocus", "isDisabled", "isReadOnly", "shadow", "newOptions", "size", "variant", "shape", "colorScheme", "onChange", "onBlur", "setHide", "setNewOptions", "setIsHovered", "setIsFocused", "setValue", "styles"];
4570
- var CountryList = function CountryList(props) {
4572
+ var _excluded$w = ["size"],
4573
+ _excluded2$3 = ["size"],
4574
+ _excluded3$2 = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isHovered", "isFocused", "isAutoFocus", "isDisabled", "isReadOnly", "shadow", "newOptions", "size", "variant", "shape", "colorScheme", "onChange", "onBlur", "setHide", "setNewOptions", "setIsHovered", "setIsFocused", "setValue", "styles"];
4575
+ var CountryList = function CountryList(_ref) {
4576
+ var props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
4571
4577
  return React.createElement(Element, Object.assign({
4572
4578
  as: "ul"
4573
4579
  }, props));
@@ -4577,21 +4583,22 @@ var CountrySelector = function CountrySelector(props) {
4577
4583
  type: "country"
4578
4584
  }, props));
4579
4585
  };
4580
- var CountryItem = function CountryItem(props) {
4586
+ var CountryItem = function CountryItem(_ref2) {
4587
+ var props = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
4581
4588
  return React.createElement(Element, Object.assign({
4582
4589
  as: "li"
4583
4590
  }, props));
4584
4591
  };
4585
- var DropDownItem = function DropDownItem(_ref) {
4586
- var option = _ref.option,
4587
- _ref$size = _ref.size,
4588
- size = _ref$size === void 0 ? 'md' : _ref$size,
4589
- _ref$callback = _ref.callback,
4590
- callback = _ref$callback === void 0 ? function () {} : _ref$callback,
4591
- _ref$styles = _ref.styles,
4592
- styles = _ref$styles === void 0 ? {
4592
+ var DropDownItem = function DropDownItem(_ref3) {
4593
+ var option = _ref3.option,
4594
+ _ref3$size = _ref3.size,
4595
+ size = _ref3$size === void 0 ? 'md' : _ref3$size,
4596
+ _ref3$callback = _ref3.callback,
4597
+ callback = _ref3$callback === void 0 ? function () {} : _ref3$callback,
4598
+ _ref3$styles = _ref3.styles,
4599
+ styles = _ref3$styles === void 0 ? {
4593
4600
  text: {}
4594
- } : _ref$styles;
4601
+ } : _ref3$styles;
4595
4602
  var _useState = useState(false),
4596
4603
  isHovered = _useState[0],
4597
4604
  setIsHovered = _useState[1];
@@ -4615,15 +4622,15 @@ var DropDownItem = function DropDownItem(_ref) {
4615
4622
  backgroundColor: isHovered ? 'trueGray.100' : 'transparent'
4616
4623
  }, styles['text']), option);
4617
4624
  };
4618
- var DropDown$1 = function DropDown(_ref2) {
4619
- var size = _ref2.size,
4620
- _ref2$styles = _ref2.styles,
4621
- styles = _ref2$styles === void 0 ? {
4625
+ var DropDown$1 = function DropDown(_ref4) {
4626
+ var size = _ref4.size,
4627
+ _ref4$styles = _ref4.styles,
4628
+ styles = _ref4$styles === void 0 ? {
4622
4629
  dropDown: {}
4623
- } : _ref2$styles,
4624
- options = _ref2.options,
4625
- _ref2$callback = _ref2.callback,
4626
- callback = _ref2$callback === void 0 ? function () {} : _ref2$callback;
4630
+ } : _ref4$styles,
4631
+ options = _ref4.options,
4632
+ _ref4$callback = _ref4.callback,
4633
+ callback = _ref4$callback === void 0 ? function () {} : _ref4$callback;
4627
4634
  var handleCallback = function handleCallback(option) {
4628
4635
  return callback(option);
4629
4636
  };
@@ -4651,62 +4658,62 @@ var DropDown$1 = function DropDown(_ref2) {
4651
4658
  }, styles['text']));
4652
4659
  }));
4653
4660
  };
4654
- var CountryPickerView = function CountryPickerView(_ref3) {
4655
- var id = _ref3.id,
4656
- name = _ref3.name,
4657
- label = _ref3.label,
4658
- value = _ref3.value,
4659
- placeholder = _ref3.placeholder,
4660
- helperText = _ref3.helperText,
4661
- _ref3$hide = _ref3.hide,
4662
- hide = _ref3$hide === void 0 ? false : _ref3$hide,
4663
- _ref3$error = _ref3.error,
4664
- error = _ref3$error === void 0 ? false : _ref3$error,
4665
- _ref3$isHovered = _ref3.isHovered,
4666
- isHovered = _ref3$isHovered === void 0 ? false : _ref3$isHovered,
4667
- _ref3$isFocused = _ref3.isFocused,
4668
- isFocused = _ref3$isFocused === void 0 ? false : _ref3$isFocused,
4669
- _ref3$isAutoFocus = _ref3.isAutoFocus,
4670
- isAutoFocus = _ref3$isAutoFocus === void 0 ? false : _ref3$isAutoFocus,
4671
- _ref3$isDisabled = _ref3.isDisabled,
4672
- isDisabled = _ref3$isDisabled === void 0 ? false : _ref3$isDisabled,
4673
- _ref3$isReadOnly = _ref3.isReadOnly,
4674
- isReadOnly = _ref3$isReadOnly === void 0 ? false : _ref3$isReadOnly,
4675
- _ref3$shadow = _ref3.shadow,
4676
- shadow = _ref3$shadow === void 0 ? {} : _ref3$shadow,
4677
- _ref3$newOptions = _ref3.newOptions,
4678
- newOptions = _ref3$newOptions === void 0 ? [] : _ref3$newOptions,
4679
- _ref3$size = _ref3.size,
4680
- size = _ref3$size === void 0 ? 'md' : _ref3$size,
4681
- _ref3$variant = _ref3.variant,
4682
- variant = _ref3$variant === void 0 ? 'default' : _ref3$variant,
4683
- _ref3$shape = _ref3.shape,
4684
- shape = _ref3$shape === void 0 ? 'default' : _ref3$shape,
4685
- _ref3$colorScheme = _ref3.colorScheme,
4686
- colorScheme = _ref3$colorScheme === void 0 ? 'theme.primary' : _ref3$colorScheme,
4687
- onChange = _ref3.onChange,
4688
- _ref3$onBlur = _ref3.onBlur,
4689
- onBlur = _ref3$onBlur === void 0 ? function () {} : _ref3$onBlur,
4690
- _ref3$setHide = _ref3.setHide,
4691
- setHide = _ref3$setHide === void 0 ? function () {} : _ref3$setHide,
4692
- _ref3$setNewOptions = _ref3.setNewOptions,
4693
- setNewOptions = _ref3$setNewOptions === void 0 ? function () {} : _ref3$setNewOptions,
4694
- _ref3$setIsHovered = _ref3.setIsHovered,
4695
- setIsHovered = _ref3$setIsHovered === void 0 ? function () {} : _ref3$setIsHovered,
4696
- _ref3$setIsFocused = _ref3.setIsFocused,
4697
- setIsFocused = _ref3$setIsFocused === void 0 ? function () {} : _ref3$setIsFocused,
4698
- _ref3$setValue = _ref3.setValue,
4699
- setValue = _ref3$setValue === void 0 ? function () {} : _ref3$setValue,
4700
- _ref3$styles = _ref3.styles,
4701
- styles = _ref3$styles === void 0 ? {
4661
+ var CountryPickerView = function CountryPickerView(_ref5) {
4662
+ var id = _ref5.id,
4663
+ name = _ref5.name,
4664
+ label = _ref5.label,
4665
+ value = _ref5.value,
4666
+ placeholder = _ref5.placeholder,
4667
+ helperText = _ref5.helperText,
4668
+ _ref5$hide = _ref5.hide,
4669
+ hide = _ref5$hide === void 0 ? false : _ref5$hide,
4670
+ _ref5$error = _ref5.error,
4671
+ error = _ref5$error === void 0 ? false : _ref5$error,
4672
+ _ref5$isHovered = _ref5.isHovered,
4673
+ isHovered = _ref5$isHovered === void 0 ? false : _ref5$isHovered,
4674
+ _ref5$isFocused = _ref5.isFocused,
4675
+ isFocused = _ref5$isFocused === void 0 ? false : _ref5$isFocused,
4676
+ _ref5$isAutoFocus = _ref5.isAutoFocus,
4677
+ isAutoFocus = _ref5$isAutoFocus === void 0 ? false : _ref5$isAutoFocus,
4678
+ _ref5$isDisabled = _ref5.isDisabled,
4679
+ isDisabled = _ref5$isDisabled === void 0 ? false : _ref5$isDisabled,
4680
+ _ref5$isReadOnly = _ref5.isReadOnly,
4681
+ isReadOnly = _ref5$isReadOnly === void 0 ? false : _ref5$isReadOnly,
4682
+ _ref5$shadow = _ref5.shadow,
4683
+ shadow = _ref5$shadow === void 0 ? {} : _ref5$shadow,
4684
+ _ref5$newOptions = _ref5.newOptions,
4685
+ newOptions = _ref5$newOptions === void 0 ? [] : _ref5$newOptions,
4686
+ _ref5$size = _ref5.size,
4687
+ size = _ref5$size === void 0 ? 'md' : _ref5$size,
4688
+ _ref5$variant = _ref5.variant,
4689
+ variant = _ref5$variant === void 0 ? 'default' : _ref5$variant,
4690
+ _ref5$shape = _ref5.shape,
4691
+ shape = _ref5$shape === void 0 ? 'default' : _ref5$shape,
4692
+ _ref5$colorScheme = _ref5.colorScheme,
4693
+ colorScheme = _ref5$colorScheme === void 0 ? 'theme.primary' : _ref5$colorScheme,
4694
+ onChange = _ref5.onChange,
4695
+ _ref5$onBlur = _ref5.onBlur,
4696
+ onBlur = _ref5$onBlur === void 0 ? function () {} : _ref5$onBlur,
4697
+ _ref5$setHide = _ref5.setHide,
4698
+ setHide = _ref5$setHide === void 0 ? function () {} : _ref5$setHide,
4699
+ _ref5$setNewOptions = _ref5.setNewOptions,
4700
+ setNewOptions = _ref5$setNewOptions === void 0 ? function () {} : _ref5$setNewOptions,
4701
+ _ref5$setIsHovered = _ref5.setIsHovered,
4702
+ setIsHovered = _ref5$setIsHovered === void 0 ? function () {} : _ref5$setIsHovered,
4703
+ _ref5$setIsFocused = _ref5.setIsFocused,
4704
+ setIsFocused = _ref5$setIsFocused === void 0 ? function () {} : _ref5$setIsFocused,
4705
+ _ref5$setValue = _ref5.setValue,
4706
+ setValue = _ref5$setValue === void 0 ? function () {} : _ref5$setValue,
4707
+ _ref5$styles = _ref5.styles,
4708
+ styles = _ref5$styles === void 0 ? {
4702
4709
  text: {},
4703
4710
  icon: {},
4704
4711
  label: {},
4705
4712
  dropDown: {},
4706
4713
  helperText: {},
4707
4714
  box: {}
4708
- } : _ref3$styles,
4709
- props = _objectWithoutPropertiesLoose(_ref3, _excluded$w);
4715
+ } : _ref5$styles,
4716
+ props = _objectWithoutPropertiesLoose(_ref5, _excluded3$2);
4710
4717
  var _useTheme = useTheme(),
4711
4718
  getColor = _useTheme.getColor;
4712
4719
  var IconColor = getColor('color.blueGray.700');
@@ -4987,7 +4994,7 @@ var usePasswordState = function usePasswordState(props) {
4987
4994
  };
4988
4995
 
4989
4996
  var _excluded$y = ["visibleIcon", "hiddenIcon"],
4990
- _excluded2$3 = ["isVisible", "setIsVisible"];
4997
+ _excluded2$4 = ["isVisible", "setIsVisible"];
4991
4998
  var PasswordComponent = function PasswordComponent(_ref) {
4992
4999
  var _ref$visibleIcon = _ref.visibleIcon,
4993
5000
  visibleIcon = _ref$visibleIcon === void 0 ? React.createElement(OpenEyeSvg, {
@@ -5001,7 +5008,7 @@ var PasswordComponent = function PasswordComponent(_ref) {
5001
5008
  var _usePasswordState = usePasswordState(props),
5002
5009
  isVisible = _usePasswordState.isVisible,
5003
5010
  setIsVisible = _usePasswordState.setIsVisible,
5004
- passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$3);
5011
+ passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$4);
5005
5012
  return React.createElement(TextFieldView, Object.assign({}, passwordProps, {
5006
5013
  type: isVisible ? 'text' : 'password',
5007
5014
  isClearable: false,
@@ -5238,7 +5245,7 @@ var TextFieldComponent$1 = function TextFieldComponent(props) {
5238
5245
  var FormikTextField = TextFieldComponent$1;
5239
5246
 
5240
5247
  var _excluded$C = ["visibleIcon", "hiddenIcon"],
5241
- _excluded2$4 = ["isVisible", "setIsVisible"];
5248
+ _excluded2$5 = ["isVisible", "setIsVisible"];
5242
5249
  var PasswordComponent$1 = function PasswordComponent(_ref) {
5243
5250
  var _ref$visibleIcon = _ref.visibleIcon,
5244
5251
  visibleIcon = _ref$visibleIcon === void 0 ? React.createElement(OpenEyeSvg, {
@@ -5253,7 +5260,7 @@ var PasswordComponent$1 = function PasswordComponent(_ref) {
5253
5260
  var _usePasswordState = usePasswordState(formProps),
5254
5261
  isVisible = _usePasswordState.isVisible,
5255
5262
  setIsVisible = _usePasswordState.setIsVisible,
5256
- passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$4);
5263
+ passwordProps = _objectWithoutPropertiesLoose(_usePasswordState, _excluded2$5);
5257
5264
  return React.createElement(TextFieldView, Object.assign({}, passwordProps, {
5258
5265
  type: isVisible ? 'text' : 'password',
5259
5266
  isClearable: false,
@@ -5439,7 +5446,7 @@ var ComboBoxView = function ComboBoxView(_ref) {
5439
5446
  // Starts the JSX returned by the component representing the combobox.
5440
5447
  return React.createElement(Horizontal, Object.assign({
5441
5448
  role: "combobox",
5442
- wrap: "nowrap",
5449
+ flexWrap: "nowrap",
5443
5450
  gap: 15,
5444
5451
  alignItems: "center",
5445
5452
  width: "100%"
@@ -5458,7 +5465,7 @@ var ComboBoxView = function ComboBoxView(_ref) {
5458
5465
  borderRadius: "4px",
5459
5466
  justifyContent: "space-between",
5460
5467
  minWidth: 300,
5461
- wrap: "nowrap"
5468
+ flexWrap: "nowrap"
5462
5469
  }, styles == null ? void 0 : styles.container), React.createElement(Horizontal, Object.assign({
5463
5470
  gap: 15,
5464
5471
  alignItems: "center",
@@ -5731,7 +5738,7 @@ var MessageView = function MessageView(_ref) {
5731
5738
  gap: 16,
5732
5739
  width: 400,
5733
5740
  // safe={true}
5734
- wrap: "nowrap",
5741
+ flexWrap: "nowrap",
5735
5742
  position: 'relative',
5736
5743
  alignItems: "center",
5737
5744
  padding: "14px 24px 14px 14px",
@@ -5913,8 +5920,8 @@ var HeaderIconSizes = {
5913
5920
  };
5914
5921
 
5915
5922
  var _excluded$H = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position"],
5916
- _excluded2$5 = ["children", "shadow", "isFullScreen", "shape"],
5917
- _excluded3$2 = ["children", "buttonColor", "iconSize", "buttonPosition"],
5923
+ _excluded2$6 = ["children", "shadow", "isFullScreen", "shape"],
5924
+ _excluded3$3 = ["children", "buttonColor", "iconSize", "buttonPosition"],
5918
5925
  _excluded4$2 = ["children"],
5919
5926
  _excluded5 = ["children"];
5920
5927
  var ModalOverlay = function ModalOverlay(_ref) {
@@ -5949,7 +5956,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
5949
5956
  width: "100vw",
5950
5957
  height: "100vh",
5951
5958
  display: "flex",
5952
- backgroundColor: "blackAlpha.500",
5959
+ backgroundColor: "color.blackAlpha.500",
5953
5960
  backdropFilter: blur ? "blur(" + blur + "px)" : undefined,
5954
5961
  onClick: handleClick
5955
5962
  }, OverlayAlignments[position], props), children));
@@ -5961,7 +5968,7 @@ var ModalContainer = function ModalContainer(_ref2) {
5961
5968
  isFullScreen = _ref2$isFullScreen === void 0 ? false : _ref2$isFullScreen,
5962
5969
  _ref2$shape = _ref2.shape,
5963
5970
  shape = _ref2$shape === void 0 ? 'rounded' : _ref2$shape,
5964
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2$5);
5971
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
5965
5972
  var defaultShadow = typeof document !== undefined ? {
5966
5973
  boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.3)'
5967
5974
  } : {
@@ -5993,7 +6000,7 @@ var ModalHeader = function ModalHeader(_ref3) {
5993
6000
  iconSize = _ref3$iconSize === void 0 ? 'md' : _ref3$iconSize,
5994
6001
  _ref3$buttonPosition = _ref3.buttonPosition,
5995
6002
  buttonPosition = _ref3$buttonPosition === void 0 ? 'right' : _ref3$buttonPosition,
5996
- props = _objectWithoutPropertiesLoose(_ref3, _excluded3$2);
6003
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
5997
6004
  var onClose = props.onClose ? props.onClose : hideModal;
5998
6005
  var buttonIcon = React.createElement(Button, {
5999
6006
  onClick: onClose,