@app-studio/web 0.8.93 → 0.8.95

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.
@@ -470,20 +470,20 @@ var HeadingSizes = {
470
470
  * Font sizes following typography guidelines
471
471
  */
472
472
  var FontSizes = {
473
- xs: '12px',
474
- sm: '14px',
475
- md: '16px',
476
- lg: '18px',
473
+ xs: '10px',
474
+ sm: '12px',
475
+ md: '14px',
476
+ lg: '16px',
477
477
  xl: '20px'
478
478
  };
479
479
  /**
480
480
  * Line heights following typography guidelines
481
481
  */
482
482
  var LineHeights = {
483
- xs: '16px',
484
- sm: '20px',
485
- md: '24px',
486
- lg: '28px',
483
+ xs: '14px',
484
+ sm: '16px',
485
+ md: '20px',
486
+ lg: '22px',
487
487
  xl: '28px'
488
488
  };
489
489
  /**
@@ -735,7 +735,9 @@ var _excluded$3 = ["widthHeight", "color", "transform", "orientation", "children
735
735
  _excluded76 = ["widthHeight", "color", "strokeWidth", "filled"],
736
736
  _excluded77 = ["widthHeight", "color", "strokeWidth", "filled"],
737
737
  _excluded78 = ["widthHeight", "color", "strokeWidth", "filled"],
738
- _excluded79 = ["widthHeight", "color", "strokeWidth", "filled"];
738
+ _excluded79 = ["widthHeight", "color", "strokeWidth", "filled"],
739
+ _excluded80 = ["widthHeight", "color", "strokeWidth", "filled"],
740
+ _excluded81 = ["widthHeight", "color", "strokeWidth", "filled"];
739
741
  // Default wrapper component for consistent sizing and styling
740
742
  var IconWrapper = _ref => {
741
743
  var {
@@ -2803,6 +2805,53 @@ var ShieldIcon = _ref79 => {
2803
2805
  })));
2804
2806
  };
2805
2807
  var CheckIcon = TickIcon;
2808
+ var LogoutIcon = _ref80 => {
2809
+ var {
2810
+ widthHeight = 24,
2811
+ color = 'currentColor',
2812
+ strokeWidth = 1,
2813
+ filled = false
2814
+ } = _ref80,
2815
+ props = _objectWithoutPropertiesLoose(_ref80, _excluded80);
2816
+ return /*#__PURE__*/React__default.createElement(IconWrapper, Object.assign({
2817
+ widthHeight: widthHeight,
2818
+ color: color
2819
+ }, props), /*#__PURE__*/React__default.createElement("svg", Object.assign({
2820
+ viewBox: "0 0 24 24",
2821
+ "aria-hidden": "false",
2822
+ focusable: "false"
2823
+ }, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React__default.createElement("path", {
2824
+ d: "M16 17l5-5-5-5"
2825
+ }), /*#__PURE__*/React__default.createElement("path", {
2826
+ d: "M21 12H9"
2827
+ }), /*#__PURE__*/React__default.createElement("path", {
2828
+ d: "M13 5v-2a1 1 0 0 0-1-1H5a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7a1 1 0 0 0 1-1v-2"
2829
+ })));
2830
+ };
2831
+ var PowerOffIcon = _ref81 => {
2832
+ var {
2833
+ widthHeight = 24,
2834
+ color = 'currentColor',
2835
+ strokeWidth = 1.5,
2836
+ filled = false
2837
+ } = _ref81,
2838
+ props = _objectWithoutPropertiesLoose(_ref81, _excluded81);
2839
+ return /*#__PURE__*/React__default.createElement(IconWrapper, Object.assign({
2840
+ widthHeight: widthHeight,
2841
+ color: color
2842
+ }, props), /*#__PURE__*/React__default.createElement("svg", Object.assign({
2843
+ viewBox: "0 0 24 24",
2844
+ "aria-hidden": "false",
2845
+ focusable: "false"
2846
+ }, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React__default.createElement("line", {
2847
+ x1: "12",
2848
+ y1: "2",
2849
+ x2: "12",
2850
+ y2: "8"
2851
+ }), /*#__PURE__*/React__default.createElement("path", {
2852
+ d: "M6.8 6.8a8 8 0 1 0 10 0"
2853
+ })));
2854
+ };
2806
2855
 
2807
2856
  var Icon = {
2808
2857
  __proto__: null,
@@ -2885,7 +2934,9 @@ var Icon = {
2885
2934
  ChartIcon: ChartIcon,
2886
2935
  GiftIcon: GiftIcon,
2887
2936
  ShieldIcon: ShieldIcon,
2888
- CheckIcon: CheckIcon
2937
+ CheckIcon: CheckIcon,
2938
+ LogoutIcon: LogoutIcon,
2939
+ PowerOffIcon: PowerOffIcon
2889
2940
  };
2890
2941
 
2891
2942
  /**
@@ -3265,7 +3316,7 @@ var BadgeSizes = {
3265
3316
  height: '32px',
3266
3317
  padding: '0 12px',
3267
3318
  // Typography
3268
- fontSize: '14px',
3319
+ fontSize: '16px',
3269
3320
  fontWeight: '500',
3270
3321
  lineHeight: '32px'
3271
3322
  },
@@ -3275,7 +3326,7 @@ var BadgeSizes = {
3275
3326
  height: '36px',
3276
3327
  padding: '0 14px',
3277
3328
  // Typography
3278
- fontSize: '16px',
3329
+ fontSize: '20px',
3279
3330
  fontWeight: '500',
3280
3331
  lineHeight: '36px'
3281
3332
  }
@@ -3686,70 +3737,60 @@ var Loader = LoaderComponent;
3686
3737
  */
3687
3738
  /**
3688
3739
  * Button sizes following the 4px grid system
3689
- */
3690
- var ButtonSizes = {
3740
+ */var ButtonSizes = {
3691
3741
  xs: {
3692
- // Height: 24px (6 × 4px)
3742
+ minHeight: 3 * 4,
3743
+ paddingTop: 1,
3744
+ paddingBottom: 1,
3745
+ paddingLeft: 2,
3746
+ paddingRight: 2,
3747
+ fontSize: 10,
3748
+ fontWeight: '500',
3749
+ lineHeight: 14,
3750
+ letterSpacing: '-0.01em'
3751
+ },
3752
+ sm: {
3693
3753
  minHeight: 4 * 4,
3694
- paddingTop: 2,
3695
- paddingBottom: 2,
3696
- paddingLeft: 4,
3697
- paddingRight: 4,
3698
- // Typography
3754
+ paddingTop: 4,
3755
+ paddingBottom: 4,
3756
+ paddingLeft: 8,
3757
+ paddingRight: 8,
3699
3758
  fontSize: 12,
3700
3759
  fontWeight: '500',
3701
- lineHeight: 20,
3760
+ lineHeight: 16,
3702
3761
  letterSpacing: '-0.01em'
3703
3762
  },
3704
- sm: {
3705
- // Height: 32px (8 × 4px)
3763
+ md: {
3706
3764
  minHeight: 6 * 4,
3707
3765
  paddingTop: 6,
3708
3766
  paddingBottom: 6,
3709
3767
  paddingLeft: 12,
3710
3768
  paddingRight: 12,
3711
- // Typography
3712
- fontSize: 12,
3769
+ fontSize: 14,
3713
3770
  fontWeight: '500',
3714
- lineHeight: 12,
3771
+ lineHeight: 18,
3715
3772
  letterSpacing: '-0.01em'
3716
3773
  },
3717
- md: {
3718
- // Height: 40px (10 × 4px) - standard height for interactive elements
3774
+ lg: {
3719
3775
  minHeight: 8 * 4,
3720
3776
  paddingTop: 8,
3721
3777
  paddingBottom: 8,
3722
3778
  paddingLeft: 16,
3723
3779
  paddingRight: 16,
3724
- // Typography
3725
3780
  fontSize: 16,
3726
3781
  fontWeight: '500',
3727
- lineHeight: 16,
3782
+ lineHeight: 18,
3728
3783
  letterSpacing: '-0.01em'
3729
3784
  },
3730
- lg: {
3785
+ xl: {
3731
3786
  minHeight: 10 * 4,
3732
3787
  paddingTop: 10,
3733
3788
  paddingBottom: 10,
3734
3789
  paddingLeft: 20,
3735
3790
  paddingRight: 20,
3736
- // Typography
3737
- fontSize: 16,
3738
- fontWeight: '500',
3739
- lineHeight: 20,
3740
- letterSpacing: '-0.01em'
3741
- },
3742
- xl: {
3743
- // Height: 60px (15 × 4px)
3744
- minHeight: 12 * 4,
3745
- paddingTop: 12,
3746
- paddingBottom: 12,
3747
- paddingLeft: 24,
3748
- paddingRight: 24,
3749
- // Typography
3750
- fontSize: 18,
3791
+ fontSize: 20,
3751
3792
  fontWeight: '500',
3752
- lineHeight: 24,
3793
+ lineHeight: 22,
3753
3794
  letterSpacing: '-0.01em'
3754
3795
  }
3755
3796
  };
@@ -6500,13 +6541,12 @@ var useSelectState = _ref => {
6500
6541
  var {
6501
6542
  placeholder,
6502
6543
  isMulti,
6503
- options
6544
+ options,
6545
+ id = "select-" + Math.random().toString(36).substr(2, 9)
6504
6546
  } = _ref;
6505
6547
  // Determines the default value based on the 'placeholder' and 'isMulti' props, setting to an empty array for multi-select or an empty string/single default option
6506
6548
  var defaultValue = placeholder ? isMulti ? [] : '' // If there's a placeholder, set default to empty array for multi-select or empty string for single select
6507
- : Array.isArray(options) && options.length > 0 ? options[0].value : ''; // If no placeholder, use the first option value if available, otherwise undefined
6508
- // State hook for managing visibility of the Select dropdown, initially set to hidden
6509
- var [hide, setHide] = React__default.useState(true);
6549
+ : Array.isArray(options) && options.length > 0 ? options[0].value : isMulti ? [] : ''; // If no placeholder, use the first option value if available, otherwise empty array for multi-select or empty string for single select
6510
6550
  // State hook for tracking mouse hover status over the Select component
6511
6551
  var [isHovered, setIsHovered] = React__default.useState(false);
6512
6552
  // State hook for tracking focus status of the Select input field
@@ -6515,8 +6555,11 @@ var useSelectState = _ref => {
6515
6555
  var [value, setValue] = React__default.useState(defaultValue);
6516
6556
  // State hook for keeping track of the currently highlighted index in the options list
6517
6557
  var [highlightedIndex, setHighlightedIndex] = React__default.useState(0);
6558
+ // State hook for managing visibility of the Select dropdown, initially set to hidden
6559
+ var [hide, setHide] = React__default.useState(true);
6518
6560
  // Returns an object containing all stateful values and their associated setters to manage the Select component's state
6519
6561
  return {
6562
+ id,
6520
6563
  value,
6521
6564
  setValue,
6522
6565
  hide,
@@ -6731,7 +6774,7 @@ var FieldContent = _ref => {
6731
6774
  flexWrap: "nowrap",
6732
6775
  alignItems: "center",
6733
6776
  justifyContent: "space-between",
6734
- marginBottom: 8,
6777
+ marginBottom: 2,
6735
6778
  // Visual properties
6736
6779
  borderStyle: "solid",
6737
6780
  borderColor: color,
@@ -6753,10 +6796,9 @@ var FieldIcons = _ref => {
6753
6796
  props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
6754
6797
  return /*#__PURE__*/React__default.createElement(appStudio.Center, Object.assign({
6755
6798
  gap: 10,
6756
- right: 16,
6799
+ right: 10,
6757
6800
  zIndex: 500,
6758
- flexWrap: "nowrap",
6759
- position: "absolute"
6801
+ flexWrap: "nowrap"
6760
6802
  }, props), children);
6761
6803
  };
6762
6804
 
@@ -6940,20 +6982,27 @@ var Item = _ref => {
6940
6982
  } = _ref,
6941
6983
  props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
6942
6984
  // Handles the click event on an option by invoking the callback with the selected option's value
6943
- var handleOptionClick = option => callback(option);
6985
+ var handleOptionClick = (e, option) => {
6986
+ e.stopPropagation();
6987
+ e.preventDefault();
6988
+ if (typeof callback === 'function') {
6989
+ callback(option);
6990
+ }
6991
+ };
6944
6992
  // Toggles the hover state on the item
6945
6993
  var handleHover = () => setIsHovered(!isHovered);
6946
6994
  return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
6947
6995
  as: "li",
6948
6996
  // Layout properties
6949
6997
  margin: 0,
6950
- paddingVertical: 12,
6951
- paddingHorizontal: 16,
6998
+ paddingVertical: 8,
6999
+ paddingHorizontal: 8,
6952
7000
  listStyleType: "none",
7001
+ cursor: "pointer",
6953
7002
  // Event handlers
6954
7003
  onMouseEnter: handleHover,
6955
7004
  onMouseLeave: handleHover,
6956
- onClick: () => handleOptionClick(option.value),
7005
+ onClick: e => handleOptionClick(e, option.value),
6957
7006
  // Visual properties
6958
7007
  backgroundColor: isHovered ? 'color.gray.100' : 'transparent',
6959
7008
  borderRadius: "4px" // Subtle rounded corners for items
@@ -6999,7 +7048,7 @@ var SelectBox = _ref2 => {
6999
7048
  width: '95%',
7000
7049
  height: '100%',
7001
7050
  border: 'none',
7002
- paddingVertical: 12,
7051
+ paddingVertical: 4,
7003
7052
  paddingHorizontal: 0,
7004
7053
  // Typography properties
7005
7054
  fontSize: appStudio.Typography.fontSizes[size],
@@ -7079,34 +7128,16 @@ var DropDown = _ref5 => {
7079
7128
  } = _ref5;
7080
7129
  var itemStates = useItemState();
7081
7130
  var handleCallback = option => callback(option);
7082
- // Shadow styles for the dropdown
7083
- var shadow = {
7084
- boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)'
7085
- };
7131
+ // Shadow styles for the dropdown - now applied directly in the Element
7086
7132
  return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
7087
7133
  as: "ul",
7088
7134
  role: "dropdown",
7089
- top: "100%",
7090
7135
  width: "100%",
7091
7136
  display: "flex",
7092
7137
  flexDirection: "column",
7093
- position: "absolute",
7094
- marginTop: 8,
7095
- marginLeft: 0,
7096
- marginRight: 0,
7097
- marginBottom: 0,
7098
- padding: 0,
7099
- maxHeight: "240px" // 60 × 4px grid
7100
- ,
7101
- overflowY: "auto",
7102
- zIndex: 1000,
7103
7138
  backgroundColor: "color.white",
7104
- borderRadius: "8px" // Consistent with design system (rounded-md)
7105
- ,
7106
- borderWidth: "1px",
7107
- borderStyle: "solid",
7108
- borderColor: "color.gray.200",
7109
7139
  transition: "all 0.2s ease",
7140
+ margin: 0,
7110
7141
  style: {
7111
7142
  scrollbarWidth: 'thin',
7112
7143
  scrollbarColor: 'rgba(0, 0, 0, 0.2) transparent',
@@ -7121,7 +7152,7 @@ var DropDown = _ref5 => {
7121
7152
  borderRadius: '4px'
7122
7153
  }
7123
7154
  }
7124
- }, shadow, views == null ? void 0 : views.dropDown), options.length > 0 && options.map((option, index) => (/*#__PURE__*/React__default.createElement(Item, Object.assign({
7155
+ }, views == null ? void 0 : views.dropDown), options && options.length > 0 && options.map((option, index) => (/*#__PURE__*/React__default.createElement(Item, Object.assign({
7125
7156
  key: option.value,
7126
7157
  size: size,
7127
7158
  style: views['text'],
@@ -7204,23 +7235,57 @@ var SelectView = _ref7 => {
7204
7235
  highlightedIndex
7205
7236
  } = _ref7,
7206
7237
  props = _objectWithoutPropertiesLoose(_ref7, _excluded4$6);
7238
+ // close when *any* other select opens
7239
+ React__default.useEffect(() => {
7240
+ var handleCloseAll = () => setHide(true);
7241
+ document.addEventListener('closeAllSelects', handleCloseAll);
7242
+ return () => document.removeEventListener('closeAllSelects', handleCloseAll);
7243
+ }, [setHide]);
7244
+ // Add a global click handler to close the dropdown when clicking outside
7245
+ React__default.useEffect(() => {
7246
+ var handleGlobalClick = e => {
7247
+ var target = e.target;
7248
+ // Only close if clicking outside of this specific select component
7249
+ if (!target.closest("#" + id) && !hide) {
7250
+ setHide(true);
7251
+ }
7252
+ };
7253
+ document.addEventListener('click', handleGlobalClick);
7254
+ return () => {
7255
+ document.removeEventListener('click', handleGlobalClick);
7256
+ };
7257
+ }, [id, hide, setHide]);
7207
7258
  var showLabel = !!(isFocused && label);
7208
7259
  var handleHover = () => setIsHovered(!isHovered);
7209
7260
  var handleFocus = () => setIsFocused(true);
7210
7261
  var handleClick = event => {
7262
+ // tell all other selects to close
7263
+ document.dispatchEvent(new Event('closeAllSelects'));
7211
7264
  if (event && event.stopPropagation) event.stopPropagation();
7212
- setHide(!hide);
7213
- setIsFocused(!isFocused);
7265
+ // Toggle dropdown visibility
7266
+ var newHideState = !hide;
7267
+ setHide(newHideState);
7268
+ setIsFocused(!newHideState); // Set focus state based on dropdown visibility
7214
7269
  };
7215
7270
  var handleCallback = React.useCallback(option => {
7216
- setHide(!hide);
7271
+ // Close dropdown after selection
7272
+ setHide(true);
7273
+ // Tell all other selects to close
7274
+ document.dispatchEvent(new Event('closeAllSelects'));
7275
+ // Update value based on multi-select or single-select mode
7217
7276
  if (isMulti && Array.isArray(value)) {
7218
- !value.includes(option) && setValue([...value, option]);
7277
+ if (!value.includes(option)) {
7278
+ var newValue = [...value, option];
7279
+ setValue(newValue);
7280
+ if (onChange) onChange(option);
7281
+ }
7219
7282
  } else {
7220
7283
  setValue(option);
7284
+ if (onChange) onChange(option);
7221
7285
  }
7222
- if (onChange) onChange(option);
7223
- }, [hide, isMulti, value]);
7286
+ // Set focus to indicate selection
7287
+ setIsFocused(true);
7288
+ }, [isMulti, value, setHide, setValue, onChange, setIsFocused]);
7224
7289
  var handleRemoveOption = valueOption => {
7225
7290
  if (Array.isArray(value) && value.includes(valueOption)) {
7226
7291
  var newValue = value.filter(option => option !== valueOption);
@@ -7228,11 +7293,24 @@ var SelectView = _ref7 => {
7228
7293
  }
7229
7294
  };
7230
7295
  return /*#__PURE__*/React__default.createElement(FieldContainer, {
7296
+ style: {
7297
+ position: 'relative',
7298
+ width: '100%',
7299
+ display: 'inline-block'
7300
+ },
7301
+ id: id,
7231
7302
  role: "SelectBox",
7232
7303
  helperText: helperText,
7233
7304
  error: error,
7234
7305
  views: views,
7235
- onClick: isDisabled || isReadOnly ? () => {} : handleClick
7306
+ onClick: e => {
7307
+ // Stop propagation to prevent clicks from bubbling up
7308
+ e.stopPropagation();
7309
+ // Only handle click if not disabled or readonly
7310
+ if (!(isDisabled || isReadOnly)) {
7311
+ handleClick(e);
7312
+ }
7313
+ }
7236
7314
  }, /*#__PURE__*/React__default.createElement(FieldContent, {
7237
7315
  label: label,
7238
7316
  size: size,
@@ -7282,39 +7360,78 @@ var SelectView = _ref7 => {
7282
7360
  orientation: "up",
7283
7361
  widthHeight: IconSizes$2[size],
7284
7362
  style: views.icon
7285
- })))))), !hide && (/*#__PURE__*/React__default.createElement(DropDown, {
7363
+ })))))), !hide && options.length > 0 && (/*#__PURE__*/React__default.createElement(appStudio.Element, {
7364
+ onClick: e => e.stopPropagation(),
7365
+ style: {
7366
+ position: 'absolute',
7367
+ top: 'calc(100% + 4px)',
7368
+ left: 0,
7369
+ right: 0,
7370
+ zIndex: 1000
7371
+ }
7372
+ }, /*#__PURE__*/React__default.createElement(DropDown, {
7286
7373
  size: size,
7287
- views: views,
7374
+ views: Object.assign({}, views, {
7375
+ dropDown: {
7376
+ borderRadius: '6px',
7377
+ border: '1px solid color.gray.200',
7378
+ boxShadow: '0 8px 16px rgba(0,0,0,0.1)',
7379
+ padding: '8px',
7380
+ maxHeight: '240px',
7381
+ overflowY: 'auto'
7382
+ }
7383
+ }),
7288
7384
  options: options,
7289
7385
  callback: handleCallback,
7290
7386
  highlightedIndex: highlightedIndex,
7291
7387
  setHighlightedIndex: setHighlightedIndex
7292
- })));
7388
+ }))));
7293
7389
  };
7294
7390
 
7295
7391
  // Defines a functional component named 'SelectComponent', which is expected to receive 'SelectProps' as properties.
7296
7392
  var SelectComponent = props => {
7393
+ // Ensure options is always an array
7394
+ var safeProps = Object.assign({}, props, {
7395
+ options: props.options || []
7396
+ });
7297
7397
  // Invokes the 'useSelectState' hook with props to obtain stateful logic for the Select component.
7298
- var selectStates = useSelectState(props);
7398
+ var selectStates = useSelectState(safeProps);
7299
7399
  // Renders the 'SelectView' component, passing along any states controlled by 'useSelectState' and all properties passed to 'SelectComponent'.
7300
- return /*#__PURE__*/React__default.createElement(SelectView, Object.assign({}, selectStates, props));
7400
+ return /*#__PURE__*/React__default.createElement(SelectView, Object.assign({}, selectStates, safeProps, {
7401
+ onClick: e => {
7402
+ // Stop propagation to prevent the global click handler from closing other dropdowns
7403
+ e.stopPropagation();
7404
+ if (props.onClick) props.onClick(e);
7405
+ }
7406
+ }));
7301
7407
  };
7302
7408
  // Exports 'SelectComponent' as 'Select', making it available for import in other parts of the application.
7303
7409
  var Select = SelectComponent;
7304
7410
 
7305
- // This file defines a custom hook for managing the state of a Switch component. It allows tracking whether the switch is hovered, and its on/off state based on 'isDisabled' and 'isChecked' properties.
7411
+ // This file defines a custom hook for managing the state of a Switch component.
7412
+ // It allows tracking whether the switch is hovered, and its on/off state based on 'isDisabled' and 'isChecked' properties.
7306
7413
  var useSwitchState = _ref => {
7307
7414
  var {
7308
7415
  isDisabled,
7309
7416
  isChecked
7310
7417
  } = _ref;
7311
7418
  var [isHovered, setIsHovered] = React__default.useState(false);
7312
- var [on, setOn] = React__default.useState(isDisabled ? !isDisabled : isChecked);
7419
+ var [on, setOn] = React__default.useState(isChecked || false);
7420
+ var [value, setValue] = React__default.useState(isChecked || false);
7421
+ // Update the value when isChecked changes
7422
+ React.useEffect(() => {
7423
+ if (isChecked !== undefined) {
7424
+ setOn(isChecked);
7425
+ setValue(isChecked);
7426
+ }
7427
+ }, [isChecked]);
7313
7428
  return {
7314
7429
  isHovered,
7315
7430
  setIsHovered,
7316
7431
  on,
7317
- setOn
7432
+ setOn,
7433
+ value,
7434
+ setValue
7318
7435
  };
7319
7436
  };
7320
7437
 
@@ -7330,68 +7447,68 @@ var useSwitchState = _ref => {
7330
7447
  */
7331
7448
  /**
7332
7449
  * Knob (circle) sizes for the Switch component
7333
- * Following the 4px grid system
7450
+ * Following the 4px grid system - dimensions réduites
7334
7451
  */
7335
7452
  var KnobSizes = {
7336
7453
  xs: {
7454
+ height: '8px',
7455
+ width: '8px'
7456
+ },
7457
+ sm: {
7337
7458
  height: '12px',
7338
7459
  width: '12px'
7339
7460
  },
7340
- sm: {
7461
+ md: {
7341
7462
  height: '16px',
7342
7463
  width: '16px'
7343
7464
  },
7344
- md: {
7465
+ lg: {
7345
7466
  height: '20px',
7346
7467
  width: '20px'
7347
7468
  },
7348
- lg: {
7469
+ xl: {
7349
7470
  height: '24px',
7350
7471
  width: '24px'
7351
- },
7352
- xl: {
7353
- height: '28px',
7354
- width: '28px'
7355
7472
  }
7356
7473
  };
7357
7474
  /**
7358
7475
  * Slider (track) sizes for the Switch component
7359
- * Following the 4px grid system
7476
+ * Following the 4px grid system - dimensions réduites
7360
7477
  */
7361
7478
  var SliderSizes = {
7362
7479
  xs: {
7363
- height: '24px',
7364
- width: '40px'
7480
+ height: '16px',
7481
+ width: '36px'
7365
7482
  },
7366
7483
  sm: {
7367
- height: '28px',
7368
- width: '48px'
7484
+ height: '20px',
7485
+ width: '44px'
7369
7486
  },
7370
7487
  md: {
7371
- height: '32px',
7372
- width: '56px'
7488
+ height: '24px',
7489
+ width: '52px'
7373
7490
  },
7374
7491
  lg: {
7375
- height: '36px',
7376
- width: '64px'
7492
+ height: '28px',
7493
+ width: '60px'
7377
7494
  },
7378
7495
  xl: {
7379
- height: '40px',
7380
- width: '72px'
7496
+ height: '32px',
7497
+ width: '68px'
7381
7498
  }
7382
7499
  };
7383
7500
  /**
7384
- * Padding for the Switch slider
7501
+ * Padding for the Switch slider - ajusté pour les nouvelles dimensions
7385
7502
  * Following the 4px grid system
7386
7503
  */
7387
7504
  var SliderPadding = {
7388
7505
  xs: {
7389
7506
  paddingVertical: 4,
7390
- paddingHorizontal: 4
7507
+ paddingHorizontal: 2
7391
7508
  },
7392
7509
  sm: {
7393
7510
  paddingVertical: 4,
7394
- paddingHorizontal: 4
7511
+ paddingHorizontal: 2
7395
7512
  },
7396
7513
  md: {
7397
7514
  paddingVertical: 4,
@@ -7449,7 +7566,6 @@ var SwitchView = _ref => {
7449
7566
  isHovered = false,
7450
7567
  isDisabled = false,
7451
7568
  isReadOnly = false,
7452
- on,
7453
7569
  setOn,
7454
7570
  onChange,
7455
7571
  setValue = () => {},
@@ -7462,10 +7578,11 @@ var SwitchView = _ref => {
7462
7578
  } = _ref,
7463
7579
  props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
7464
7580
  var handleToggle = event => {
7465
- if (!isReadOnly) {
7466
- setValue(!value);
7467
- setOn(!on);
7468
- if (onChange) onChange(event.target.checked);
7581
+ if (!isReadOnly && !isDisabled) {
7582
+ var newValue = event.target.checked;
7583
+ setValue(newValue);
7584
+ setOn(newValue);
7585
+ if (onChange) onChange(newValue);
7469
7586
  }
7470
7587
  };
7471
7588
  var handleHover = () => setIsHovered(!isHovered);
@@ -7513,27 +7630,39 @@ var SwitchView = _ref => {
7513
7630
  // Layout properties
7514
7631
  display: "flex",
7515
7632
  alignItems: "center",
7516
- justifyContent: activeChild ? 'space-between' : value ? 'flex-end' : 'flex-start',
7633
+ justifyContent: value ? activeChild ? 'space-between' : 'flex-end' : inActiveChild ? 'space-between' : 'flex-start',
7517
7634
  marginBottom: 4,
7518
7635
  // Visual properties
7519
7636
  borderRadius: "9999px" // Full rounded for pill shape
7520
7637
  ,
7521
7638
  backgroundColor: isDisabled ? ColorSchemes.default.disabled : value ? isHovered ? ColorSchemes.states.hover.active : ColorSchemes.default.active : isHovered ? ColorSchemes.states.hover.inactive : ColorSchemes.default.inactive,
7639
+ overflow: "hidden",
7522
7640
  // State properties
7523
7641
  cursor: "pointer",
7524
7642
  // Animation
7525
7643
  transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
7526
7644
  }, shadow, SliderPadding[size], SliderSizes[size], views['slider']), activeChild && value && (/*#__PURE__*/React__default.createElement(appStudio.View, {
7527
7645
  marginLeft: 8,
7528
- transition: "all 0.3s ease"
7646
+ marginRight: 4,
7647
+ transition: "all 0.3s ease",
7648
+ display: "flex",
7649
+ alignItems: "center",
7650
+ justifyContent: "center",
7651
+ height: "100%"
7529
7652
  }, activeChild)), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
7530
7653
  borderRadius: "50%",
7531
7654
  backgroundColor: ColorSchemes.default.knob,
7532
7655
  boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
7533
- transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
7656
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
7657
+ zIndex: 1
7534
7658
  }, KnobSizes[size], views['circle'])), inActiveChild && !value && (/*#__PURE__*/React__default.createElement(appStudio.View, {
7535
7659
  marginRight: 8,
7536
- transition: "all 0.3s ease"
7660
+ marginLeft: 4,
7661
+ transition: "all 0.3s ease",
7662
+ display: "flex",
7663
+ alignItems: "center",
7664
+ justifyContent: "center",
7665
+ height: "100%"
7537
7666
  }, inActiveChild))), labelPosition === 'right' && label && (/*#__PURE__*/React__default.createElement(Text, {
7538
7667
  fontWeight: "500" // Medium weight for better readability
7539
7668
  ,
@@ -7819,7 +7948,7 @@ var TextFieldView = _ref => {
7819
7948
  var fieldStyles = Object.assign({
7820
7949
  // Layout properties
7821
7950
  margin: 0,
7822
- paddingVertical: 8,
7951
+ paddingVertical: 4,
7823
7952
  paddingHorizontal: 0,
7824
7953
  width: '100%',
7825
7954
  height: '100%',
@@ -7959,24 +8088,24 @@ var useCheckboxState = _ref => {
7959
8088
  */
7960
8089
  var Sizes = {
7961
8090
  xs: {
8091
+ height: '12px',
8092
+ width: '12px'
8093
+ },
8094
+ sm: {
7962
8095
  height: '16px',
7963
8096
  width: '16px'
7964
8097
  },
7965
- sm: {
8098
+ md: {
7966
8099
  height: '20px',
7967
8100
  width: '20px'
7968
8101
  },
7969
- md: {
8102
+ lg: {
7970
8103
  height: '24px',
7971
8104
  width: '24px'
7972
8105
  },
7973
- lg: {
8106
+ xl: {
7974
8107
  height: '28px',
7975
8108
  width: '28px'
7976
- },
7977
- xl: {
7978
- height: '32px',
7979
- width: '32px'
7980
8109
  }
7981
8110
  };
7982
8111
  /**
@@ -10214,7 +10343,7 @@ var ComboBoxView = _ref => {
10214
10343
  hint: placeholder,
10215
10344
  isClearable: false,
10216
10345
  left: /*#__PURE__*/React__default.createElement(SearchIcon, {
10217
- widthHeight: 12
10346
+ widthHeight: 16
10218
10347
  }),
10219
10348
  views: {
10220
10349
  container: Object.assign({
@@ -12775,17 +12904,17 @@ var useNavigationMenuState = function useNavigationMenuState(defaultActiveItemId
12775
12904
  var NavigationMenuSizes = {
12776
12905
  sm: {
12777
12906
  padding: '8px 12px',
12778
- fontSize: '14px',
12907
+ fontSize: '12px',
12779
12908
  fontWeight: '500'
12780
12909
  },
12781
12910
  md: {
12782
12911
  padding: '12px 16px',
12783
- fontSize: '16px',
12912
+ fontSize: '14px',
12784
12913
  fontWeight: '500'
12785
12914
  },
12786
12915
  lg: {
12787
12916
  padding: '16px 20px',
12788
- fontSize: '18px',
12917
+ fontSize: '16px',
12789
12918
  fontWeight: '500'
12790
12919
  }
12791
12920
  };
@@ -13733,8 +13862,8 @@ var HighlightStyles = {
13733
13862
  }),
13734
13863
  gradient: (color, secondaryColor) => ({
13735
13864
  background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
13736
- backgroundClip: 'text',
13737
- webkitBackgroundClip: 'text',
13865
+ backgroundClip: 'text !important',
13866
+ webkitBackgroundClip: 'text !important',
13738
13867
  color: 'transparent',
13739
13868
  webkitTextFillColor: 'transparent',
13740
13869
  display: 'inline-block',
@@ -18535,6 +18664,7 @@ exports.LinkedinIcon = LinkedinIcon;
18535
18664
  exports.Loader = Loader;
18536
18665
  exports.LocationIcon = LocationIcon;
18537
18666
  exports.LockIcon = LockIcon;
18667
+ exports.LogoutIcon = LogoutIcon;
18538
18668
  exports.MagicWandIcon = MagicWandIcon;
18539
18669
  exports.MenuIcon = MenuIcon;
18540
18670
  exports.Menubar = Menubar;
@@ -18554,6 +18684,7 @@ exports.Password = Password;
18554
18684
  exports.PauseIcon = PauseIcon;
18555
18685
  exports.PlayIcon = PlayIcon;
18556
18686
  exports.PlusIcon = PlusIcon;
18687
+ exports.PowerOffIcon = PowerOffIcon;
18557
18688
  exports.PrintIcon = PrintIcon;
18558
18689
  exports.ProfileIcon = ProfileIcon;
18559
18690
  exports.RefreshIcon = RefreshIcon;