@app-studio/web 0.8.76 → 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.
@@ -29,7 +29,6 @@ require('core-js/modules/web.url.js');
29
29
  require('core-js/modules/web.url.to-json.js');
30
30
  require('core-js/modules/web.url-search-params.js');
31
31
  var zustand = require('zustand');
32
- require('src/components/Badge/Badge');
33
32
  require('core-js/modules/es.string.ends-with.js');
34
33
  require('core-js/modules/es.string.match.js');
35
34
  require('core-js/modules/es.string.search.js');
@@ -471,12 +470,7 @@ var FontSizes = {
471
470
  sm: '14px',
472
471
  md: '16px',
473
472
  lg: '18px',
474
- xl: '20px',
475
- '2xl': '24px',
476
- '3xl': '30px',
477
- '4xl': '36px',
478
- '5xl': '48px',
479
- '6xl': '60px'
473
+ xl: '20px'
480
474
  };
481
475
  /**
482
476
  * Line heights following typography guidelines
@@ -486,12 +480,7 @@ var LineHeights = {
486
480
  sm: '20px',
487
481
  md: '24px',
488
482
  lg: '28px',
489
- xl: '28px',
490
- '2xl': '32px',
491
- '3xl': '36px',
492
- '4xl': '40px',
493
- '5xl': '60px',
494
- '6xl': '72px'
483
+ xl: '28px'
495
484
  };
496
485
  /**
497
486
  * Font weights following typography guidelines
@@ -732,9 +721,12 @@ var IconWrapper = _ref => {
732
721
  };
733
722
  // Utility function to handle fill and stroke based on 'filled' prop
734
723
  var getSvgProps = (filled, color, strokeWidth) => {
724
+ var {
725
+ getColor
726
+ } = appStudio.useTheme();
735
727
  return {
736
- fill: filled ? color : 'none',
737
- stroke: filled ? 'none' : color,
728
+ fill: filled ? getColor(color) : 'none',
729
+ stroke: filled ? 'none' : getColor(color),
738
730
  strokeWidth,
739
731
  strokeLinecap: 'round',
740
732
  strokeLinejoin: 'round'
@@ -1200,7 +1192,7 @@ var InfoIcon = _ref19 => {
1200
1192
  var {
1201
1193
  widthHeight = 24,
1202
1194
  color = 'currentColor',
1203
- filled = false,
1195
+ filled = true,
1204
1196
  strokeWidth = 1
1205
1197
  } = _ref19,
1206
1198
  props = _objectWithoutPropertiesLoose(_ref19, _excluded19);
@@ -2944,7 +2936,7 @@ var AlertView = _ref => {
2944
2936
  borderStyle: "solid",
2945
2937
  borderColor: Themes[variant].container.borderColor,
2946
2938
  backgroundColor: Themes[variant].container.backgroundColor,
2947
- boxShadow: Themes[variant].container.boxShadow,
2939
+ boxShadow: Themes[variant].container.containerShadow,
2948
2940
  // Animation
2949
2941
  transition: "all 0.2s ease"
2950
2942
  }, views == null ? void 0 : views.container), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
@@ -3378,12 +3370,7 @@ var IconSizes = {
3378
3370
  sm: 14,
3379
3371
  md: 16,
3380
3372
  lg: 18,
3381
- xl: 20,
3382
- '2xl': 24,
3383
- '3xl': 30,
3384
- '4xl': 36,
3385
- '5xl': 48,
3386
- '6xl': 64
3373
+ xl: 20
3387
3374
  };
3388
3375
 
3389
3376
  var _excluded$6 = ["children", "to", "iconSize", "underline", "isHovered", "isExternal", "views", "setIsHovered"];
@@ -3635,12 +3622,7 @@ var DefaultSizes = {
3635
3622
  sm: 18,
3636
3623
  md: 22,
3637
3624
  lg: 26,
3638
- xl: 30,
3639
- '2xl': 40,
3640
- '3xl': 50,
3641
- '4xl': 60,
3642
- '5xl': 70,
3643
- '6xl': 80
3625
+ xl: 30
3644
3626
  };
3645
3627
  // Specifies a mapping of spinning speed labels to numerical millisecond values, determining the speed of the Loader component's animation cycles.
3646
3628
  var DefaultSpeeds = {
@@ -4755,8 +4737,32 @@ Carousel.Item = CarouselItemComponent; // Compound component pattern
4755
4737
  Carousel.Previous = CarouselPreviousComponent; // Compound component pattern
4756
4738
  Carousel.Next = CarouselNextComponent; // Compound component pattern
4757
4739
 
4740
+ /**
4741
+ * Chart Colors
4742
+ *
4743
+ * Defines a consistent color scheme for all chart examples.
4744
+ * These colors should be used in the same order across all chart types
4745
+ * to ensure consistency between the charts and their legends.
4746
+ */
4747
+ var CHART_COLORS = {
4748
+ // Primary colors for all charts
4749
+ blue: 'color.blue.500',
4750
+ green: 'color.green.500',
4751
+ purple: 'color.purple.500',
4752
+ orange: 'color.orange.500',
4753
+ red: 'color.red.500',
4754
+ // Additional colors if needed
4755
+ teal: 'color.teal.500',
4756
+ pink: 'color.pink.500',
4757
+ indigo: 'color.indigo.500',
4758
+ yellow: 'color.yellow.500',
4759
+ cyan: 'color.cyan.500'
4760
+ };
4761
+ // Default color array for consistent ordering
4762
+ var DEFAULT_CHART_COLORS = [CHART_COLORS.blue, CHART_COLORS.green, CHART_COLORS.purple, CHART_COLORS.orange, CHART_COLORS.red, CHART_COLORS.teal, CHART_COLORS.pink, CHART_COLORS.indigo, CHART_COLORS.yellow, CHART_COLORS.cyan];
4763
+
4758
4764
  // Default colors for chart series
4759
- var DEFAULT_COLORS = ['color.blue.500', 'color.green.500', 'color.purple.500', 'color.orange.500', 'color.red.500', 'color.teal.500', 'color.pink.500', 'color.indigo.500', 'color.yellow.500', 'color.cyan.500'];
4765
+ var DEFAULT_COLORS = DEFAULT_CHART_COLORS;
4760
4766
  // Default styles for chart container
4761
4767
  var ChartContainerStyles = {
4762
4768
  width: '100%',
@@ -5000,6 +5006,9 @@ var BarChart = _ref => {
5000
5006
  hideTooltip,
5001
5007
  views
5002
5008
  } = _ref;
5009
+ var {
5010
+ getColor
5011
+ } = appStudio.useTheme();
5003
5012
  // Calculate chart dimensions
5004
5013
  var padding = {
5005
5014
  top: 20,
@@ -5093,7 +5102,7 @@ var BarChart = _ref => {
5093
5102
  y: y,
5094
5103
  width: barWidth,
5095
5104
  height: barHeight,
5096
- fill: series.color,
5105
+ fill: series.color ? getColor(series.color) : 'black',
5097
5106
  onMouseEnter: handleMouseEnter,
5098
5107
  onMouseLeave: hideTooltip,
5099
5108
  onClick: handleClick
@@ -5114,6 +5123,9 @@ var LineChart = _ref => {
5114
5123
  views
5115
5124
  } = _ref;
5116
5125
  // Calculate chart dimensions
5126
+ var {
5127
+ getColor
5128
+ } = appStudio.useTheme();
5117
5129
  var padding = {
5118
5130
  top: 20,
5119
5131
  right: 20,
@@ -5204,11 +5216,11 @@ var LineChart = _ref => {
5204
5216
  key: "series-" + seriesIndex
5205
5217
  }, /*#__PURE__*/React__default.createElement("path", Object.assign({
5206
5218
  d: generateAreaPath(series.data),
5207
- fill: series.color,
5219
+ fill: series.color ? getColor(series.color) : 'black',
5208
5220
  opacity: 0.1
5209
5221
  }, views == null ? void 0 : views.area)), /*#__PURE__*/React__default.createElement("path", Object.assign({
5210
5222
  d: generatePath(series.data),
5211
- stroke: series.color
5223
+ stroke: series.color ? getColor(series.color) : 'black'
5212
5224
  }, LineStyles, views == null ? void 0 : views.line)), series.data.map((value, dataIndex) => {
5213
5225
  var x = padding.left + dataIndex / (data.labels.length - 1) * chartWidth;
5214
5226
  var y = height - padding.bottom - value / maxValue * chartHeight * animationProgress;
@@ -6251,9 +6263,9 @@ var FieldContainer = _ref => {
6251
6263
  gap: 8,
6252
6264
  position: "relative",
6253
6265
  width: "100%"
6254
- }, props), children, !error && helperText && (/*#__PURE__*/React__default.createElement(HelperText, Object.assign({
6266
+ }, props, views == null ? void 0 : views.container), children, !error && helperText && (/*#__PURE__*/React__default.createElement(HelperText, Object.assign({
6255
6267
  marginTop: 4
6256
- }, views), helperText)), error && (/*#__PURE__*/React__default.createElement(Text, {
6268
+ }, views == null ? void 0 : views.helperText), helperText)), error && (/*#__PURE__*/React__default.createElement(Text, Object.assign({
6257
6269
  size: "xs",
6258
6270
  marginTop: 4,
6259
6271
  marginHorizontal: 0,
@@ -6261,7 +6273,7 @@ var FieldContainer = _ref => {
6261
6273
  ,
6262
6274
  color: "color.red.500",
6263
6275
  transition: "all 0.2s ease"
6264
- }, error)));
6276
+ }, views == null ? void 0 : views.error), error)));
6265
6277
  };
6266
6278
 
6267
6279
  /**
@@ -7040,26 +7052,6 @@ var KnobSizes = {
7040
7052
  xl: {
7041
7053
  height: '28px',
7042
7054
  width: '28px'
7043
- },
7044
- '2xl': {
7045
- height: '32px',
7046
- width: '32px'
7047
- },
7048
- '3xl': {
7049
- height: '36px',
7050
- width: '36px'
7051
- },
7052
- '4xl': {
7053
- height: '40px',
7054
- width: '40px'
7055
- },
7056
- '5xl': {
7057
- height: '44px',
7058
- width: '44px'
7059
- },
7060
- '6xl': {
7061
- height: '48px',
7062
- width: '48px'
7063
7055
  }
7064
7056
  };
7065
7057
  /**
@@ -7086,26 +7078,6 @@ var SliderSizes = {
7086
7078
  xl: {
7087
7079
  height: '40px',
7088
7080
  width: '72px'
7089
- },
7090
- '2xl': {
7091
- height: '44px',
7092
- width: '80px'
7093
- },
7094
- '3xl': {
7095
- height: '48px',
7096
- width: '88px'
7097
- },
7098
- '4xl': {
7099
- height: '52px',
7100
- width: '96px'
7101
- },
7102
- '5xl': {
7103
- height: '56px',
7104
- width: '104px'
7105
- },
7106
- '6xl': {
7107
- height: '60px',
7108
- width: '112px'
7109
7081
  }
7110
7082
  };
7111
7083
  /**
@@ -7132,26 +7104,6 @@ var SliderPadding = {
7132
7104
  xl: {
7133
7105
  paddingVertical: 4,
7134
7106
  paddingHorizontal: 4
7135
- },
7136
- '2xl': {
7137
- paddingVertical: 4,
7138
- paddingHorizontal: 4
7139
- },
7140
- '3xl': {
7141
- paddingVertical: 4,
7142
- paddingHorizontal: 4
7143
- },
7144
- '4xl': {
7145
- paddingVertical: 4,
7146
- paddingHorizontal: 4
7147
- },
7148
- '5xl': {
7149
- paddingVertical: 4,
7150
- paddingHorizontal: 4
7151
- },
7152
- '6xl': {
7153
- paddingVertical: 4,
7154
- paddingHorizontal: 4
7155
7107
  }
7156
7108
  };
7157
7109
  /**
@@ -7364,11 +7316,8 @@ var TextAreaView = _ref => {
7364
7316
  setIsFocused = () => {},
7365
7317
  setIsHovered = () => {},
7366
7318
  views = {
7367
- box: {},
7368
- text: {},
7369
7319
  label: {},
7370
- helperText: {},
7371
- field: {}
7320
+ helperText: {}
7372
7321
  }
7373
7322
  } = _ref,
7374
7323
  props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
@@ -7379,11 +7328,11 @@ var TextAreaView = _ref => {
7379
7328
  var fieldStyles = Object.assign({
7380
7329
  // Layout properties
7381
7330
  margin: 0,
7382
- paddingVertical: 12,
7383
- paddingHorizontal: 0,
7331
+ paddingVertical: 2,
7332
+ paddingHorizontal: 2,
7384
7333
  width: '100%',
7385
- height: '100%',
7386
- minHeight: '80px',
7334
+ maxHeight: 'calc(100vh - 100px)',
7335
+ height: 'calc(5em)',
7387
7336
  border: 'none',
7388
7337
  resize: 'vertical',
7389
7338
  // Focus state
@@ -7394,7 +7343,7 @@ var TextAreaView = _ref => {
7394
7343
  },
7395
7344
  // Typography properties
7396
7345
  fontSize: appStudio.Typography.fontSizes[size],
7397
- lineHeight: '1.5',
7346
+ lineHeight: appStudio.Typography.fontSizes[size] * 1.5,
7398
7347
  letterSpacing: '-0.01em',
7399
7348
  // Visual properties
7400
7349
  backgroundColor: 'transparent',
@@ -7402,11 +7351,7 @@ var TextAreaView = _ref => {
7402
7351
  // State properties
7403
7352
  cursor: isDisabled ? 'not-allowed' : 'text',
7404
7353
  // Animation
7405
- transition: 'all 0.2s ease',
7406
- // Dark mode support
7407
- '@media (prefers-color-scheme: dark)': {
7408
- color: isDisabled ? 'color.gray.600' : 'color.gray.100'
7409
- }
7354
+ transition: 'all 0.2s ease'
7410
7355
  }, views['field']);
7411
7356
  var handleHover = () => setIsHovered(!isHovered);
7412
7357
  var handleFocus = () => {
@@ -7428,11 +7373,11 @@ var TextAreaView = _ref => {
7428
7373
  if (onChange) onChange(event.target.value);
7429
7374
  }
7430
7375
  };
7431
- return /*#__PURE__*/React__default.createElement(FieldContainer, {
7376
+ return /*#__PURE__*/React__default.createElement(FieldContainer, Object.assign({
7432
7377
  helperText: helperText,
7433
7378
  error: error,
7434
7379
  views: views
7435
- }, /*#__PURE__*/React__default.createElement(FieldContent, {
7380
+ }, props), /*#__PURE__*/React__default.createElement(FieldContent, Object.assign({
7436
7381
  label: label,
7437
7382
  size: size,
7438
7383
  error: error,
@@ -7449,11 +7394,11 @@ var TextAreaView = _ref => {
7449
7394
  showLabel: showLabel,
7450
7395
  onMouseEnter: handleHover,
7451
7396
  onMouseLeave: handleHover
7452
- }, /*#__PURE__*/React__default.createElement(FieldWrapper, null, showLabel && (/*#__PURE__*/React__default.createElement(FieldLabel, Object.assign({
7397
+ }, views == null ? void 0 : views.content), /*#__PURE__*/React__default.createElement(FieldWrapper, Object.assign({}, views == null ? void 0 : views.warper), showLabel && (/*#__PURE__*/React__default.createElement(FieldLabel, Object.assign({
7453
7398
  htmlFor: id,
7454
7399
  color: 'theme.primary',
7455
7400
  error: error
7456
- }, views), label)), /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
7401
+ }, views == null ? void 0 : views.label), label)), /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
7457
7402
  as: "textarea",
7458
7403
  id: id,
7459
7404
  name: name,
@@ -7468,10 +7413,10 @@ var TextAreaView = _ref => {
7468
7413
  onBlur: handleBlur,
7469
7414
  onFocus: handleFocus,
7470
7415
  multiline: isMultiline
7471
- }, fieldStyles, props, {
7416
+ }, fieldStyles, {
7472
7417
  onChange: handleChange,
7473
7418
  onChangeText: handleChange
7474
- })))));
7419
+ }, views == null ? void 0 : views.textarea)))));
7475
7420
  };
7476
7421
 
7477
7422
  // Defines the TextAreaComponent as a functional component that accepts TextAreaProps for type safety and structure.
@@ -7539,7 +7484,7 @@ var TextFieldView = _ref => {
7539
7484
  onChangeText,
7540
7485
  shadow = {},
7541
7486
  views = {
7542
- box: {},
7487
+ container: {},
7543
7488
  field: {},
7544
7489
  label: {},
7545
7490
  helperText: {},
@@ -7739,26 +7684,6 @@ var Sizes = {
7739
7684
  xl: {
7740
7685
  height: '32px',
7741
7686
  width: '32px'
7742
- },
7743
- '2xl': {
7744
- height: '36px',
7745
- width: '36px'
7746
- },
7747
- '3xl': {
7748
- height: '40px',
7749
- width: '40px'
7750
- },
7751
- '4xl': {
7752
- height: '44px',
7753
- width: '44px'
7754
- },
7755
- '5xl': {
7756
- height: '48px',
7757
- width: '48px'
7758
- },
7759
- '6xl': {
7760
- height: '52px',
7761
- width: '52px'
7762
7687
  }
7763
7688
  };
7764
7689
  /**
@@ -7770,12 +7695,7 @@ var IconSizes$3 = {
7770
7695
  sm: 14,
7771
7696
  md: 16,
7772
7697
  lg: 20,
7773
- xl: 24,
7774
- '2xl': 28,
7775
- '3xl': 32,
7776
- '4xl': 36,
7777
- '5xl': 40,
7778
- '6xl': 44
7698
+ xl: 24
7779
7699
  };
7780
7700
  /**
7781
7701
  * Variant styles for the Checkbox component
@@ -9571,8 +9491,7 @@ var CountryPickerView = _ref5 => {
9571
9491
  icon: {},
9572
9492
  label: {},
9573
9493
  dropDown: {},
9574
- helperText: {},
9575
- box: {}
9494
+ helperText: {}
9576
9495
  },
9577
9496
  themeMode: elementMode
9578
9497
  } = _ref5,
@@ -9720,7 +9639,7 @@ var DatePickerView = _ref => {
9720
9639
  variant = 'default',
9721
9640
  shape = 'default',
9722
9641
  views = {
9723
- box: {},
9642
+ container: {},
9724
9643
  label: {},
9725
9644
  helperText: {},
9726
9645
  text: {},
@@ -10003,7 +9922,7 @@ var ComboBoxView = _ref => {
10003
9922
  widthHeight: 12
10004
9923
  }),
10005
9924
  views: {
10006
- box: Object.assign({
9925
+ container: Object.assign({
10007
9926
  width: '100%',
10008
9927
  padding: '6px 12px',
10009
9928
  borderBottom: filteredItems.length > 0 ? '1px solid #ccc' : '1px solid transparent'
@@ -10373,14 +10292,7 @@ var OTPInputView = _ref => {
10373
10292
  length = 6,
10374
10293
  helperText,
10375
10294
  placeholder = '',
10376
- views = {
10377
- container: {},
10378
- input: {},
10379
- box: {},
10380
- text: {},
10381
- label: {},
10382
- helperText: {}
10383
- },
10295
+ views = {},
10384
10296
  size = 'md',
10385
10297
  shape = 'rounded',
10386
10298
  variant = 'outline',
@@ -10486,7 +10398,7 @@ var OTPInputView = _ref => {
10486
10398
  width: "100%",
10487
10399
  position: "relative",
10488
10400
  height: size === 'xs' ? '32px' : size === 'sm' ? '36px' : size === 'md' ? '40px' : size === 'lg' ? '48px' : '56px'
10489
- }, views.box), slot.char ? (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
10401
+ }, views.container), slot.char ? (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
10490
10402
  textAlign: "center",
10491
10403
  fontSize: size === 'xs' ? '14px' : size === 'sm' ? '16px' : size === 'md' ? '18px' : size === 'lg' ? '20px' : '24px',
10492
10404
  fontWeight: "medium"
@@ -12254,23 +12166,19 @@ var OverlayAlignments = {
12254
12166
  },
12255
12167
  top: {
12256
12168
  justifyContent: 'center',
12257
- alignItems: 'flex-start',
12258
- paddingTop: '64px'
12169
+ alignItems: 'flex-start'
12259
12170
  },
12260
12171
  right: {
12261
12172
  justifyContent: 'flex-end',
12262
- alignItems: 'center',
12263
- paddingRight: '32px'
12173
+ alignItems: 'center'
12264
12174
  },
12265
12175
  bottom: {
12266
12176
  justifyContent: 'center',
12267
- alignItems: 'flex-end',
12268
- paddingBottom: '64px'
12177
+ alignItems: 'flex-end'
12269
12178
  },
12270
12179
  left: {
12271
12180
  justifyContent: 'flex-start',
12272
- alignItems: 'center',
12273
- paddingLeft: '32px'
12181
+ alignItems: 'center'
12274
12182
  }
12275
12183
  };
12276
12184
  /**
@@ -15173,7 +15081,7 @@ var SeparatorView = _ref => {
15173
15081
  variant = 'solid',
15174
15082
  thickness = 'thin',
15175
15083
  color,
15176
- spacing = '16px',
15084
+ spacing = '0px',
15177
15085
  label,
15178
15086
  decorative = false,
15179
15087
  views
@@ -15198,7 +15106,7 @@ var SeparatorView = _ref => {
15198
15106
  alignItems: "center",
15199
15107
  justifyContent: "center",
15200
15108
  width: "100%",
15201
- margin: spacing
15109
+ padding: spacing
15202
15110
  }, ariaProps, props), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
15203
15111
  height: "0px",
15204
15112
  flexGrow: 1,
@@ -15221,7 +15129,7 @@ var SeparatorView = _ref => {
15221
15129
  borderTopWidth: borderWidth,
15222
15130
  borderTopStyle: borderStyle,
15223
15131
  borderTopColor: separatorColor,
15224
- margin: spacing
15132
+ padding: spacing
15225
15133
  }, DefaultSeparatorStyles.container, ariaProps, views == null ? void 0 : views.container, props));
15226
15134
  }
15227
15135
  // For vertical separator
@@ -15231,7 +15139,7 @@ var SeparatorView = _ref => {
15231
15139
  borderLeftWidth: borderWidth,
15232
15140
  borderLeftStyle: borderStyle,
15233
15141
  borderLeftColor: separatorColor,
15234
- margin: spacing
15142
+ padding: spacing
15235
15143
  }, DefaultSeparatorStyles.container, ariaProps, views == null ? void 0 : views.container, props));
15236
15144
  };
15237
15145
 
@@ -15242,6 +15150,7 @@ var SeparatorComponent = props => {
15242
15150
  return /*#__PURE__*/React__default.createElement(SeparatorView, Object.assign({}, props));
15243
15151
  };
15244
15152
  var Separator = SeparatorComponent;
15153
+ var Divider = SeparatorComponent;
15245
15154
 
15246
15155
  var useSidebarState = function useSidebarState(defaultExpanded, expanded, onExpandedChange, breakpoint) {
15247
15156
  if (defaultExpanded === void 0) {
@@ -17841,6 +17750,7 @@ exports.CountryPicker = CountryPicker;
17841
17750
  exports.CropIcon = CropIcon;
17842
17751
  exports.DatePicker = DatePicker;
17843
17752
  exports.DeleteIcon = DeleteIcon;
17753
+ exports.Divider = Divider;
17844
17754
  exports.DocumentIcon = DocumentIcon;
17845
17755
  exports.DownloadIcon = DownloadIcon;
17846
17756
  exports.DragAndDrop = DragAndDrop;