@app-studio/web 0.8.77 → 0.8.78

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
@@ -5,7 +5,7 @@ import 'core-js/modules/es.array.iterator.js';
5
5
  import 'core-js/modules/es.string.includes.js';
6
6
  import 'core-js/modules/web.dom-collections.iterator.js';
7
7
  import 'core-js/modules/es.regexp.to-string.js';
8
- import { View, Horizontal, Vertical, Element, Center, Image, useTheme, Typography, Input, Form, Text as Text$1 } from 'app-studio';
8
+ import { View, Horizontal, Vertical, Element, Center, useTheme, Image, Typography, Input, Form, Text as Text$1 } from 'app-studio';
9
9
  import 'core-js/modules/es.symbol.description.js';
10
10
  import 'core-js/modules/es.parse-float.js';
11
11
  import { Link as Link$1 } from 'react-router-dom';
@@ -463,12 +463,7 @@ var FontSizes = {
463
463
  sm: '14px',
464
464
  md: '16px',
465
465
  lg: '18px',
466
- xl: '20px',
467
- '2xl': '24px',
468
- '3xl': '30px',
469
- '4xl': '36px',
470
- '5xl': '48px',
471
- '6xl': '60px'
466
+ xl: '20px'
472
467
  };
473
468
  /**
474
469
  * Line heights following typography guidelines
@@ -478,12 +473,7 @@ var LineHeights = {
478
473
  sm: '20px',
479
474
  md: '24px',
480
475
  lg: '28px',
481
- xl: '28px',
482
- '2xl': '32px',
483
- '3xl': '36px',
484
- '4xl': '40px',
485
- '5xl': '60px',
486
- '6xl': '72px'
476
+ xl: '28px'
487
477
  };
488
478
  /**
489
479
  * Font weights following typography guidelines
@@ -724,9 +714,12 @@ var IconWrapper = _ref => {
724
714
  };
725
715
  // Utility function to handle fill and stroke based on 'filled' prop
726
716
  var getSvgProps = (filled, color, strokeWidth) => {
717
+ var {
718
+ getColor
719
+ } = useTheme();
727
720
  return {
728
- fill: filled ? color : 'none',
729
- stroke: filled ? 'none' : color,
721
+ fill: filled ? getColor(color) : 'none',
722
+ stroke: filled ? 'none' : getColor(color),
730
723
  strokeWidth,
731
724
  strokeLinecap: 'round',
732
725
  strokeLinejoin: 'round'
@@ -1192,7 +1185,7 @@ var InfoIcon = _ref19 => {
1192
1185
  var {
1193
1186
  widthHeight = 24,
1194
1187
  color = 'currentColor',
1195
- filled = false,
1188
+ filled = true,
1196
1189
  strokeWidth = 1
1197
1190
  } = _ref19,
1198
1191
  props = _objectWithoutPropertiesLoose(_ref19, _excluded19);
@@ -2936,7 +2929,7 @@ var AlertView = _ref => {
2936
2929
  borderStyle: "solid",
2937
2930
  borderColor: Themes[variant].container.borderColor,
2938
2931
  backgroundColor: Themes[variant].container.backgroundColor,
2939
- boxShadow: Themes[variant].container.boxShadow,
2932
+ boxShadow: Themes[variant].container.containerShadow,
2940
2933
  // Animation
2941
2934
  transition: "all 0.2s ease"
2942
2935
  }, views == null ? void 0 : views.container), /*#__PURE__*/React.createElement(View, Object.assign({
@@ -3370,12 +3363,7 @@ var IconSizes = {
3370
3363
  sm: 14,
3371
3364
  md: 16,
3372
3365
  lg: 18,
3373
- xl: 20,
3374
- '2xl': 24,
3375
- '3xl': 30,
3376
- '4xl': 36,
3377
- '5xl': 48,
3378
- '6xl': 64
3366
+ xl: 20
3379
3367
  };
3380
3368
 
3381
3369
  var _excluded$6 = ["children", "to", "iconSize", "underline", "isHovered", "isExternal", "views", "setIsHovered"];
@@ -3627,12 +3615,7 @@ var DefaultSizes = {
3627
3615
  sm: 18,
3628
3616
  md: 22,
3629
3617
  lg: 26,
3630
- xl: 30,
3631
- '2xl': 40,
3632
- '3xl': 50,
3633
- '4xl': 60,
3634
- '5xl': 70,
3635
- '6xl': 80
3618
+ xl: 30
3636
3619
  };
3637
3620
  // Specifies a mapping of spinning speed labels to numerical millisecond values, determining the speed of the Loader component's animation cycles.
3638
3621
  var DefaultSpeeds = {
@@ -6273,9 +6256,9 @@ var FieldContainer = _ref => {
6273
6256
  gap: 8,
6274
6257
  position: "relative",
6275
6258
  width: "100%"
6276
- }, props), children, !error && helperText && (/*#__PURE__*/React.createElement(HelperText, Object.assign({
6259
+ }, props, views == null ? void 0 : views.container), children, !error && helperText && (/*#__PURE__*/React.createElement(HelperText, Object.assign({
6277
6260
  marginTop: 4
6278
- }, views), helperText)), error && (/*#__PURE__*/React.createElement(Text, {
6261
+ }, views == null ? void 0 : views.helperText), helperText)), error && (/*#__PURE__*/React.createElement(Text, Object.assign({
6279
6262
  size: "xs",
6280
6263
  marginTop: 4,
6281
6264
  marginHorizontal: 0,
@@ -6283,7 +6266,7 @@ var FieldContainer = _ref => {
6283
6266
  ,
6284
6267
  color: "color.red.500",
6285
6268
  transition: "all 0.2s ease"
6286
- }, error)));
6269
+ }, views == null ? void 0 : views.error), error)));
6287
6270
  };
6288
6271
 
6289
6272
  /**
@@ -7062,26 +7045,6 @@ var KnobSizes = {
7062
7045
  xl: {
7063
7046
  height: '28px',
7064
7047
  width: '28px'
7065
- },
7066
- '2xl': {
7067
- height: '32px',
7068
- width: '32px'
7069
- },
7070
- '3xl': {
7071
- height: '36px',
7072
- width: '36px'
7073
- },
7074
- '4xl': {
7075
- height: '40px',
7076
- width: '40px'
7077
- },
7078
- '5xl': {
7079
- height: '44px',
7080
- width: '44px'
7081
- },
7082
- '6xl': {
7083
- height: '48px',
7084
- width: '48px'
7085
7048
  }
7086
7049
  };
7087
7050
  /**
@@ -7108,26 +7071,6 @@ var SliderSizes = {
7108
7071
  xl: {
7109
7072
  height: '40px',
7110
7073
  width: '72px'
7111
- },
7112
- '2xl': {
7113
- height: '44px',
7114
- width: '80px'
7115
- },
7116
- '3xl': {
7117
- height: '48px',
7118
- width: '88px'
7119
- },
7120
- '4xl': {
7121
- height: '52px',
7122
- width: '96px'
7123
- },
7124
- '5xl': {
7125
- height: '56px',
7126
- width: '104px'
7127
- },
7128
- '6xl': {
7129
- height: '60px',
7130
- width: '112px'
7131
7074
  }
7132
7075
  };
7133
7076
  /**
@@ -7154,26 +7097,6 @@ var SliderPadding = {
7154
7097
  xl: {
7155
7098
  paddingVertical: 4,
7156
7099
  paddingHorizontal: 4
7157
- },
7158
- '2xl': {
7159
- paddingVertical: 4,
7160
- paddingHorizontal: 4
7161
- },
7162
- '3xl': {
7163
- paddingVertical: 4,
7164
- paddingHorizontal: 4
7165
- },
7166
- '4xl': {
7167
- paddingVertical: 4,
7168
- paddingHorizontal: 4
7169
- },
7170
- '5xl': {
7171
- paddingVertical: 4,
7172
- paddingHorizontal: 4
7173
- },
7174
- '6xl': {
7175
- paddingVertical: 4,
7176
- paddingHorizontal: 4
7177
7100
  }
7178
7101
  };
7179
7102
  /**
@@ -7386,11 +7309,8 @@ var TextAreaView = _ref => {
7386
7309
  setIsFocused = () => {},
7387
7310
  setIsHovered = () => {},
7388
7311
  views = {
7389
- box: {},
7390
- text: {},
7391
7312
  label: {},
7392
- helperText: {},
7393
- field: {}
7313
+ helperText: {}
7394
7314
  }
7395
7315
  } = _ref,
7396
7316
  props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
@@ -7401,11 +7321,11 @@ var TextAreaView = _ref => {
7401
7321
  var fieldStyles = Object.assign({
7402
7322
  // Layout properties
7403
7323
  margin: 0,
7404
- paddingVertical: 12,
7405
- paddingHorizontal: 0,
7324
+ paddingVertical: 2,
7325
+ paddingHorizontal: 2,
7406
7326
  width: '100%',
7407
- height: '100%',
7408
- minHeight: '80px',
7327
+ maxHeight: 'calc(100vh - 100px)',
7328
+ height: 'calc(5em)',
7409
7329
  border: 'none',
7410
7330
  resize: 'vertical',
7411
7331
  // Focus state
@@ -7416,7 +7336,7 @@ var TextAreaView = _ref => {
7416
7336
  },
7417
7337
  // Typography properties
7418
7338
  fontSize: Typography.fontSizes[size],
7419
- lineHeight: '1.5',
7339
+ lineHeight: Typography.fontSizes[size] * 1.5,
7420
7340
  letterSpacing: '-0.01em',
7421
7341
  // Visual properties
7422
7342
  backgroundColor: 'transparent',
@@ -7424,11 +7344,7 @@ var TextAreaView = _ref => {
7424
7344
  // State properties
7425
7345
  cursor: isDisabled ? 'not-allowed' : 'text',
7426
7346
  // Animation
7427
- transition: 'all 0.2s ease',
7428
- // Dark mode support
7429
- '@media (prefers-color-scheme: dark)': {
7430
- color: isDisabled ? 'color.gray.600' : 'color.gray.100'
7431
- }
7347
+ transition: 'all 0.2s ease'
7432
7348
  }, views['field']);
7433
7349
  var handleHover = () => setIsHovered(!isHovered);
7434
7350
  var handleFocus = () => {
@@ -7450,11 +7366,11 @@ var TextAreaView = _ref => {
7450
7366
  if (onChange) onChange(event.target.value);
7451
7367
  }
7452
7368
  };
7453
- return /*#__PURE__*/React.createElement(FieldContainer, {
7369
+ return /*#__PURE__*/React.createElement(FieldContainer, Object.assign({
7454
7370
  helperText: helperText,
7455
7371
  error: error,
7456
7372
  views: views
7457
- }, /*#__PURE__*/React.createElement(FieldContent, {
7373
+ }, props), /*#__PURE__*/React.createElement(FieldContent, Object.assign({
7458
7374
  label: label,
7459
7375
  size: size,
7460
7376
  error: error,
@@ -7471,11 +7387,11 @@ var TextAreaView = _ref => {
7471
7387
  showLabel: showLabel,
7472
7388
  onMouseEnter: handleHover,
7473
7389
  onMouseLeave: handleHover
7474
- }, /*#__PURE__*/React.createElement(FieldWrapper, null, showLabel && (/*#__PURE__*/React.createElement(FieldLabel, Object.assign({
7390
+ }, views == null ? void 0 : views.content), /*#__PURE__*/React.createElement(FieldWrapper, Object.assign({}, views == null ? void 0 : views.warper), showLabel && (/*#__PURE__*/React.createElement(FieldLabel, Object.assign({
7475
7391
  htmlFor: id,
7476
7392
  color: 'theme.primary',
7477
7393
  error: error
7478
- }, views), label)), /*#__PURE__*/React.createElement(Element, Object.assign({
7394
+ }, views == null ? void 0 : views.label), label)), /*#__PURE__*/React.createElement(Element, Object.assign({
7479
7395
  as: "textarea",
7480
7396
  id: id,
7481
7397
  name: name,
@@ -7490,10 +7406,10 @@ var TextAreaView = _ref => {
7490
7406
  onBlur: handleBlur,
7491
7407
  onFocus: handleFocus,
7492
7408
  multiline: isMultiline
7493
- }, fieldStyles, props, {
7409
+ }, fieldStyles, {
7494
7410
  onChange: handleChange,
7495
7411
  onChangeText: handleChange
7496
- })))));
7412
+ }, views == null ? void 0 : views.textarea)))));
7497
7413
  };
7498
7414
 
7499
7415
  // Defines the TextAreaComponent as a functional component that accepts TextAreaProps for type safety and structure.
@@ -7561,7 +7477,7 @@ var TextFieldView = _ref => {
7561
7477
  onChangeText,
7562
7478
  shadow = {},
7563
7479
  views = {
7564
- box: {},
7480
+ container: {},
7565
7481
  field: {},
7566
7482
  label: {},
7567
7483
  helperText: {},
@@ -7761,26 +7677,6 @@ var Sizes = {
7761
7677
  xl: {
7762
7678
  height: '32px',
7763
7679
  width: '32px'
7764
- },
7765
- '2xl': {
7766
- height: '36px',
7767
- width: '36px'
7768
- },
7769
- '3xl': {
7770
- height: '40px',
7771
- width: '40px'
7772
- },
7773
- '4xl': {
7774
- height: '44px',
7775
- width: '44px'
7776
- },
7777
- '5xl': {
7778
- height: '48px',
7779
- width: '48px'
7780
- },
7781
- '6xl': {
7782
- height: '52px',
7783
- width: '52px'
7784
7680
  }
7785
7681
  };
7786
7682
  /**
@@ -7792,12 +7688,7 @@ var IconSizes$3 = {
7792
7688
  sm: 14,
7793
7689
  md: 16,
7794
7690
  lg: 20,
7795
- xl: 24,
7796
- '2xl': 28,
7797
- '3xl': 32,
7798
- '4xl': 36,
7799
- '5xl': 40,
7800
- '6xl': 44
7691
+ xl: 24
7801
7692
  };
7802
7693
  /**
7803
7694
  * Variant styles for the Checkbox component
@@ -9593,8 +9484,7 @@ var CountryPickerView = _ref5 => {
9593
9484
  icon: {},
9594
9485
  label: {},
9595
9486
  dropDown: {},
9596
- helperText: {},
9597
- box: {}
9487
+ helperText: {}
9598
9488
  },
9599
9489
  themeMode: elementMode
9600
9490
  } = _ref5,
@@ -9742,7 +9632,7 @@ var DatePickerView = _ref => {
9742
9632
  variant = 'default',
9743
9633
  shape = 'default',
9744
9634
  views = {
9745
- box: {},
9635
+ container: {},
9746
9636
  label: {},
9747
9637
  helperText: {},
9748
9638
  text: {},
@@ -10025,7 +9915,7 @@ var ComboBoxView = _ref => {
10025
9915
  widthHeight: 12
10026
9916
  }),
10027
9917
  views: {
10028
- box: Object.assign({
9918
+ container: Object.assign({
10029
9919
  width: '100%',
10030
9920
  padding: '6px 12px',
10031
9921
  borderBottom: filteredItems.length > 0 ? '1px solid #ccc' : '1px solid transparent'
@@ -10395,14 +10285,7 @@ var OTPInputView = _ref => {
10395
10285
  length = 6,
10396
10286
  helperText,
10397
10287
  placeholder = '',
10398
- views = {
10399
- container: {},
10400
- input: {},
10401
- box: {},
10402
- text: {},
10403
- label: {},
10404
- helperText: {}
10405
- },
10288
+ views = {},
10406
10289
  size = 'md',
10407
10290
  shape = 'rounded',
10408
10291
  variant = 'outline',
@@ -10508,7 +10391,7 @@ var OTPInputView = _ref => {
10508
10391
  width: "100%",
10509
10392
  position: "relative",
10510
10393
  height: size === 'xs' ? '32px' : size === 'sm' ? '36px' : size === 'md' ? '40px' : size === 'lg' ? '48px' : '56px'
10511
- }, views.box), slot.char ? (/*#__PURE__*/React.createElement(View, Object.assign({
10394
+ }, views.container), slot.char ? (/*#__PURE__*/React.createElement(View, Object.assign({
10512
10395
  textAlign: "center",
10513
10396
  fontSize: size === 'xs' ? '14px' : size === 'sm' ? '16px' : size === 'md' ? '18px' : size === 'lg' ? '20px' : '24px',
10514
10397
  fontWeight: "medium"
@@ -12276,23 +12159,19 @@ var OverlayAlignments = {
12276
12159
  },
12277
12160
  top: {
12278
12161
  justifyContent: 'center',
12279
- alignItems: 'flex-start',
12280
- paddingTop: '64px'
12162
+ alignItems: 'flex-start'
12281
12163
  },
12282
12164
  right: {
12283
12165
  justifyContent: 'flex-end',
12284
- alignItems: 'center',
12285
- paddingRight: '32px'
12166
+ alignItems: 'center'
12286
12167
  },
12287
12168
  bottom: {
12288
12169
  justifyContent: 'center',
12289
- alignItems: 'flex-end',
12290
- paddingBottom: '64px'
12170
+ alignItems: 'flex-end'
12291
12171
  },
12292
12172
  left: {
12293
12173
  justifyContent: 'flex-start',
12294
- alignItems: 'center',
12295
- paddingLeft: '32px'
12174
+ alignItems: 'center'
12296
12175
  }
12297
12176
  };
12298
12177
  /**
@@ -15195,7 +15074,7 @@ var SeparatorView = _ref => {
15195
15074
  variant = 'solid',
15196
15075
  thickness = 'thin',
15197
15076
  color,
15198
- spacing = '16px',
15077
+ spacing = '0px',
15199
15078
  label,
15200
15079
  decorative = false,
15201
15080
  views
@@ -15220,7 +15099,7 @@ var SeparatorView = _ref => {
15220
15099
  alignItems: "center",
15221
15100
  justifyContent: "center",
15222
15101
  width: "100%",
15223
- margin: spacing
15102
+ padding: spacing
15224
15103
  }, ariaProps, props), /*#__PURE__*/React.createElement(View, Object.assign({
15225
15104
  height: "0px",
15226
15105
  flexGrow: 1,
@@ -15243,7 +15122,7 @@ var SeparatorView = _ref => {
15243
15122
  borderTopWidth: borderWidth,
15244
15123
  borderTopStyle: borderStyle,
15245
15124
  borderTopColor: separatorColor,
15246
- margin: spacing
15125
+ padding: spacing
15247
15126
  }, DefaultSeparatorStyles.container, ariaProps, views == null ? void 0 : views.container, props));
15248
15127
  }
15249
15128
  // For vertical separator
@@ -15253,7 +15132,7 @@ var SeparatorView = _ref => {
15253
15132
  borderLeftWidth: borderWidth,
15254
15133
  borderLeftStyle: borderStyle,
15255
15134
  borderLeftColor: separatorColor,
15256
- margin: spacing
15135
+ padding: spacing
15257
15136
  }, DefaultSeparatorStyles.container, ariaProps, views == null ? void 0 : views.container, props));
15258
15137
  };
15259
15138