@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.
@@ -439,20 +439,20 @@
439
439
  * Font sizes following typography guidelines
440
440
  */
441
441
  var FontSizes = {
442
- xs: '12px',
443
- sm: '14px',
444
- md: '16px',
445
- lg: '18px',
442
+ xs: '10px',
443
+ sm: '12px',
444
+ md: '14px',
445
+ lg: '16px',
446
446
  xl: '20px'
447
447
  };
448
448
  /**
449
449
  * Line heights following typography guidelines
450
450
  */
451
451
  var LineHeights = {
452
- xs: '16px',
453
- sm: '20px',
454
- md: '24px',
455
- lg: '28px',
452
+ xs: '14px',
453
+ sm: '16px',
454
+ md: '20px',
455
+ lg: '22px',
456
456
  xl: '28px'
457
457
  };
458
458
  /**
@@ -704,7 +704,9 @@
704
704
  _excluded76 = ["widthHeight", "color", "strokeWidth", "filled"],
705
705
  _excluded77 = ["widthHeight", "color", "strokeWidth", "filled"],
706
706
  _excluded78 = ["widthHeight", "color", "strokeWidth", "filled"],
707
- _excluded79 = ["widthHeight", "color", "strokeWidth", "filled"];
707
+ _excluded79 = ["widthHeight", "color", "strokeWidth", "filled"],
708
+ _excluded80 = ["widthHeight", "color", "strokeWidth", "filled"],
709
+ _excluded81 = ["widthHeight", "color", "strokeWidth", "filled"];
708
710
  // Default wrapper component for consistent sizing and styling
709
711
  var IconWrapper = _ref => {
710
712
  var {
@@ -2772,6 +2774,53 @@
2772
2774
  })));
2773
2775
  };
2774
2776
  var CheckIcon = TickIcon;
2777
+ var LogoutIcon = _ref80 => {
2778
+ var {
2779
+ widthHeight = 24,
2780
+ color = 'currentColor',
2781
+ strokeWidth = 1,
2782
+ filled = false
2783
+ } = _ref80,
2784
+ props = _objectWithoutPropertiesLoose(_ref80, _excluded80);
2785
+ return /*#__PURE__*/React__default.createElement(IconWrapper, Object.assign({
2786
+ widthHeight: widthHeight,
2787
+ color: color
2788
+ }, props), /*#__PURE__*/React__default.createElement("svg", Object.assign({
2789
+ viewBox: "0 0 24 24",
2790
+ "aria-hidden": "false",
2791
+ focusable: "false"
2792
+ }, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React__default.createElement("path", {
2793
+ d: "M16 17l5-5-5-5"
2794
+ }), /*#__PURE__*/React__default.createElement("path", {
2795
+ d: "M21 12H9"
2796
+ }), /*#__PURE__*/React__default.createElement("path", {
2797
+ 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"
2798
+ })));
2799
+ };
2800
+ var PowerOffIcon = _ref81 => {
2801
+ var {
2802
+ widthHeight = 24,
2803
+ color = 'currentColor',
2804
+ strokeWidth = 1.5,
2805
+ filled = false
2806
+ } = _ref81,
2807
+ props = _objectWithoutPropertiesLoose(_ref81, _excluded81);
2808
+ return /*#__PURE__*/React__default.createElement(IconWrapper, Object.assign({
2809
+ widthHeight: widthHeight,
2810
+ color: color
2811
+ }, props), /*#__PURE__*/React__default.createElement("svg", Object.assign({
2812
+ viewBox: "0 0 24 24",
2813
+ "aria-hidden": "false",
2814
+ focusable: "false"
2815
+ }, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React__default.createElement("line", {
2816
+ x1: "12",
2817
+ y1: "2",
2818
+ x2: "12",
2819
+ y2: "8"
2820
+ }), /*#__PURE__*/React__default.createElement("path", {
2821
+ d: "M6.8 6.8a8 8 0 1 0 10 0"
2822
+ })));
2823
+ };
2775
2824
 
2776
2825
  var Icon = {
2777
2826
  __proto__: null,
@@ -2854,7 +2903,9 @@
2854
2903
  ChartIcon: ChartIcon,
2855
2904
  GiftIcon: GiftIcon,
2856
2905
  ShieldIcon: ShieldIcon,
2857
- CheckIcon: CheckIcon
2906
+ CheckIcon: CheckIcon,
2907
+ LogoutIcon: LogoutIcon,
2908
+ PowerOffIcon: PowerOffIcon
2858
2909
  };
2859
2910
 
2860
2911
  /**
@@ -3234,7 +3285,7 @@
3234
3285
  height: '32px',
3235
3286
  padding: '0 12px',
3236
3287
  // Typography
3237
- fontSize: '14px',
3288
+ fontSize: '16px',
3238
3289
  fontWeight: '500',
3239
3290
  lineHeight: '32px'
3240
3291
  },
@@ -3244,7 +3295,7 @@
3244
3295
  height: '36px',
3245
3296
  padding: '0 14px',
3246
3297
  // Typography
3247
- fontSize: '16px',
3298
+ fontSize: '20px',
3248
3299
  fontWeight: '500',
3249
3300
  lineHeight: '36px'
3250
3301
  }
@@ -3655,70 +3706,60 @@
3655
3706
  */
3656
3707
  /**
3657
3708
  * Button sizes following the 4px grid system
3658
- */
3659
- var ButtonSizes = {
3709
+ */var ButtonSizes = {
3660
3710
  xs: {
3661
- // Height: 24px (6 × 4px)
3711
+ minHeight: 3 * 4,
3712
+ paddingTop: 1,
3713
+ paddingBottom: 1,
3714
+ paddingLeft: 2,
3715
+ paddingRight: 2,
3716
+ fontSize: 10,
3717
+ fontWeight: '500',
3718
+ lineHeight: 14,
3719
+ letterSpacing: '-0.01em'
3720
+ },
3721
+ sm: {
3662
3722
  minHeight: 4 * 4,
3663
- paddingTop: 2,
3664
- paddingBottom: 2,
3665
- paddingLeft: 4,
3666
- paddingRight: 4,
3667
- // Typography
3723
+ paddingTop: 4,
3724
+ paddingBottom: 4,
3725
+ paddingLeft: 8,
3726
+ paddingRight: 8,
3668
3727
  fontSize: 12,
3669
3728
  fontWeight: '500',
3670
- lineHeight: 20,
3729
+ lineHeight: 16,
3671
3730
  letterSpacing: '-0.01em'
3672
3731
  },
3673
- sm: {
3674
- // Height: 32px (8 × 4px)
3732
+ md: {
3675
3733
  minHeight: 6 * 4,
3676
3734
  paddingTop: 6,
3677
3735
  paddingBottom: 6,
3678
3736
  paddingLeft: 12,
3679
3737
  paddingRight: 12,
3680
- // Typography
3681
- fontSize: 12,
3738
+ fontSize: 14,
3682
3739
  fontWeight: '500',
3683
- lineHeight: 12,
3740
+ lineHeight: 18,
3684
3741
  letterSpacing: '-0.01em'
3685
3742
  },
3686
- md: {
3687
- // Height: 40px (10 × 4px) - standard height for interactive elements
3743
+ lg: {
3688
3744
  minHeight: 8 * 4,
3689
3745
  paddingTop: 8,
3690
3746
  paddingBottom: 8,
3691
3747
  paddingLeft: 16,
3692
3748
  paddingRight: 16,
3693
- // Typography
3694
3749
  fontSize: 16,
3695
3750
  fontWeight: '500',
3696
- lineHeight: 16,
3751
+ lineHeight: 18,
3697
3752
  letterSpacing: '-0.01em'
3698
3753
  },
3699
- lg: {
3754
+ xl: {
3700
3755
  minHeight: 10 * 4,
3701
3756
  paddingTop: 10,
3702
3757
  paddingBottom: 10,
3703
3758
  paddingLeft: 20,
3704
3759
  paddingRight: 20,
3705
- // Typography
3706
- fontSize: 16,
3707
- fontWeight: '500',
3708
- lineHeight: 20,
3709
- letterSpacing: '-0.01em'
3710
- },
3711
- xl: {
3712
- // Height: 60px (15 × 4px)
3713
- minHeight: 12 * 4,
3714
- paddingTop: 12,
3715
- paddingBottom: 12,
3716
- paddingLeft: 24,
3717
- paddingRight: 24,
3718
- // Typography
3719
- fontSize: 18,
3760
+ fontSize: 20,
3720
3761
  fontWeight: '500',
3721
- lineHeight: 24,
3762
+ lineHeight: 22,
3722
3763
  letterSpacing: '-0.01em'
3723
3764
  }
3724
3765
  };
@@ -6469,13 +6510,12 @@
6469
6510
  var {
6470
6511
  placeholder,
6471
6512
  isMulti,
6472
- options
6513
+ options,
6514
+ id = "select-" + Math.random().toString(36).substr(2, 9)
6473
6515
  } = _ref;
6474
6516
  // 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
6475
6517
  var defaultValue = placeholder ? isMulti ? [] : '' // If there's a placeholder, set default to empty array for multi-select or empty string for single select
6476
- : Array.isArray(options) && options.length > 0 ? options[0].value : ''; // If no placeholder, use the first option value if available, otherwise undefined
6477
- // State hook for managing visibility of the Select dropdown, initially set to hidden
6478
- var [hide, setHide] = React__default.useState(true);
6518
+ : 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
6479
6519
  // State hook for tracking mouse hover status over the Select component
6480
6520
  var [isHovered, setIsHovered] = React__default.useState(false);
6481
6521
  // State hook for tracking focus status of the Select input field
@@ -6484,8 +6524,11 @@
6484
6524
  var [value, setValue] = React__default.useState(defaultValue);
6485
6525
  // State hook for keeping track of the currently highlighted index in the options list
6486
6526
  var [highlightedIndex, setHighlightedIndex] = React__default.useState(0);
6527
+ // State hook for managing visibility of the Select dropdown, initially set to hidden
6528
+ var [hide, setHide] = React__default.useState(true);
6487
6529
  // Returns an object containing all stateful values and their associated setters to manage the Select component's state
6488
6530
  return {
6531
+ id,
6489
6532
  value,
6490
6533
  setValue,
6491
6534
  hide,
@@ -6700,7 +6743,7 @@
6700
6743
  flexWrap: "nowrap",
6701
6744
  alignItems: "center",
6702
6745
  justifyContent: "space-between",
6703
- marginBottom: 8,
6746
+ marginBottom: 2,
6704
6747
  // Visual properties
6705
6748
  borderStyle: "solid",
6706
6749
  borderColor: color,
@@ -6722,10 +6765,9 @@
6722
6765
  props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
6723
6766
  return /*#__PURE__*/React__default.createElement(appStudio.Center, Object.assign({
6724
6767
  gap: 10,
6725
- right: 16,
6768
+ right: 10,
6726
6769
  zIndex: 500,
6727
- flexWrap: "nowrap",
6728
- position: "absolute"
6770
+ flexWrap: "nowrap"
6729
6771
  }, props), children);
6730
6772
  };
6731
6773
 
@@ -6909,20 +6951,27 @@
6909
6951
  } = _ref,
6910
6952
  props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
6911
6953
  // Handles the click event on an option by invoking the callback with the selected option's value
6912
- var handleOptionClick = option => callback(option);
6954
+ var handleOptionClick = (e, option) => {
6955
+ e.stopPropagation();
6956
+ e.preventDefault();
6957
+ if (typeof callback === 'function') {
6958
+ callback(option);
6959
+ }
6960
+ };
6913
6961
  // Toggles the hover state on the item
6914
6962
  var handleHover = () => setIsHovered(!isHovered);
6915
6963
  return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
6916
6964
  as: "li",
6917
6965
  // Layout properties
6918
6966
  margin: 0,
6919
- paddingVertical: 12,
6920
- paddingHorizontal: 16,
6967
+ paddingVertical: 8,
6968
+ paddingHorizontal: 8,
6921
6969
  listStyleType: "none",
6970
+ cursor: "pointer",
6922
6971
  // Event handlers
6923
6972
  onMouseEnter: handleHover,
6924
6973
  onMouseLeave: handleHover,
6925
- onClick: () => handleOptionClick(option.value),
6974
+ onClick: e => handleOptionClick(e, option.value),
6926
6975
  // Visual properties
6927
6976
  backgroundColor: isHovered ? 'color.gray.100' : 'transparent',
6928
6977
  borderRadius: "4px" // Subtle rounded corners for items
@@ -6968,7 +7017,7 @@
6968
7017
  width: '95%',
6969
7018
  height: '100%',
6970
7019
  border: 'none',
6971
- paddingVertical: 12,
7020
+ paddingVertical: 4,
6972
7021
  paddingHorizontal: 0,
6973
7022
  // Typography properties
6974
7023
  fontSize: appStudio.Typography.fontSizes[size],
@@ -7048,34 +7097,16 @@
7048
7097
  } = _ref5;
7049
7098
  var itemStates = useItemState();
7050
7099
  var handleCallback = option => callback(option);
7051
- // Shadow styles for the dropdown
7052
- var shadow = {
7053
- boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)'
7054
- };
7100
+ // Shadow styles for the dropdown - now applied directly in the Element
7055
7101
  return /*#__PURE__*/React__default.createElement(appStudio.Element, Object.assign({
7056
7102
  as: "ul",
7057
7103
  role: "dropdown",
7058
- top: "100%",
7059
7104
  width: "100%",
7060
7105
  display: "flex",
7061
7106
  flexDirection: "column",
7062
- position: "absolute",
7063
- marginTop: 8,
7064
- marginLeft: 0,
7065
- marginRight: 0,
7066
- marginBottom: 0,
7067
- padding: 0,
7068
- maxHeight: "240px" // 60 × 4px grid
7069
- ,
7070
- overflowY: "auto",
7071
- zIndex: 1000,
7072
7107
  backgroundColor: "color.white",
7073
- borderRadius: "8px" // Consistent with design system (rounded-md)
7074
- ,
7075
- borderWidth: "1px",
7076
- borderStyle: "solid",
7077
- borderColor: "color.gray.200",
7078
7108
  transition: "all 0.2s ease",
7109
+ margin: 0,
7079
7110
  style: {
7080
7111
  scrollbarWidth: 'thin',
7081
7112
  scrollbarColor: 'rgba(0, 0, 0, 0.2) transparent',
@@ -7090,7 +7121,7 @@
7090
7121
  borderRadius: '4px'
7091
7122
  }
7092
7123
  }
7093
- }, shadow, views == null ? void 0 : views.dropDown), options.length > 0 && options.map((option, index) => (/*#__PURE__*/React__default.createElement(Item, Object.assign({
7124
+ }, views == null ? void 0 : views.dropDown), options && options.length > 0 && options.map((option, index) => (/*#__PURE__*/React__default.createElement(Item, Object.assign({
7094
7125
  key: option.value,
7095
7126
  size: size,
7096
7127
  style: views['text'],
@@ -7173,23 +7204,57 @@
7173
7204
  highlightedIndex
7174
7205
  } = _ref7,
7175
7206
  props = _objectWithoutPropertiesLoose(_ref7, _excluded4$6);
7207
+ // close when *any* other select opens
7208
+ React__default.useEffect(() => {
7209
+ var handleCloseAll = () => setHide(true);
7210
+ document.addEventListener('closeAllSelects', handleCloseAll);
7211
+ return () => document.removeEventListener('closeAllSelects', handleCloseAll);
7212
+ }, [setHide]);
7213
+ // Add a global click handler to close the dropdown when clicking outside
7214
+ React__default.useEffect(() => {
7215
+ var handleGlobalClick = e => {
7216
+ var target = e.target;
7217
+ // Only close if clicking outside of this specific select component
7218
+ if (!target.closest("#" + id) && !hide) {
7219
+ setHide(true);
7220
+ }
7221
+ };
7222
+ document.addEventListener('click', handleGlobalClick);
7223
+ return () => {
7224
+ document.removeEventListener('click', handleGlobalClick);
7225
+ };
7226
+ }, [id, hide, setHide]);
7176
7227
  var showLabel = !!(isFocused && label);
7177
7228
  var handleHover = () => setIsHovered(!isHovered);
7178
7229
  var handleFocus = () => setIsFocused(true);
7179
7230
  var handleClick = event => {
7231
+ // tell all other selects to close
7232
+ document.dispatchEvent(new Event('closeAllSelects'));
7180
7233
  if (event && event.stopPropagation) event.stopPropagation();
7181
- setHide(!hide);
7182
- setIsFocused(!isFocused);
7234
+ // Toggle dropdown visibility
7235
+ var newHideState = !hide;
7236
+ setHide(newHideState);
7237
+ setIsFocused(!newHideState); // Set focus state based on dropdown visibility
7183
7238
  };
7184
7239
  var handleCallback = React.useCallback(option => {
7185
- setHide(!hide);
7240
+ // Close dropdown after selection
7241
+ setHide(true);
7242
+ // Tell all other selects to close
7243
+ document.dispatchEvent(new Event('closeAllSelects'));
7244
+ // Update value based on multi-select or single-select mode
7186
7245
  if (isMulti && Array.isArray(value)) {
7187
- !value.includes(option) && setValue([...value, option]);
7246
+ if (!value.includes(option)) {
7247
+ var newValue = [...value, option];
7248
+ setValue(newValue);
7249
+ if (onChange) onChange(option);
7250
+ }
7188
7251
  } else {
7189
7252
  setValue(option);
7253
+ if (onChange) onChange(option);
7190
7254
  }
7191
- if (onChange) onChange(option);
7192
- }, [hide, isMulti, value]);
7255
+ // Set focus to indicate selection
7256
+ setIsFocused(true);
7257
+ }, [isMulti, value, setHide, setValue, onChange, setIsFocused]);
7193
7258
  var handleRemoveOption = valueOption => {
7194
7259
  if (Array.isArray(value) && value.includes(valueOption)) {
7195
7260
  var newValue = value.filter(option => option !== valueOption);
@@ -7197,11 +7262,24 @@
7197
7262
  }
7198
7263
  };
7199
7264
  return /*#__PURE__*/React__default.createElement(FieldContainer, {
7265
+ style: {
7266
+ position: 'relative',
7267
+ width: '100%',
7268
+ display: 'inline-block'
7269
+ },
7270
+ id: id,
7200
7271
  role: "SelectBox",
7201
7272
  helperText: helperText,
7202
7273
  error: error,
7203
7274
  views: views,
7204
- onClick: isDisabled || isReadOnly ? () => {} : handleClick
7275
+ onClick: e => {
7276
+ // Stop propagation to prevent clicks from bubbling up
7277
+ e.stopPropagation();
7278
+ // Only handle click if not disabled or readonly
7279
+ if (!(isDisabled || isReadOnly)) {
7280
+ handleClick(e);
7281
+ }
7282
+ }
7205
7283
  }, /*#__PURE__*/React__default.createElement(FieldContent, {
7206
7284
  label: label,
7207
7285
  size: size,
@@ -7251,39 +7329,78 @@
7251
7329
  orientation: "up",
7252
7330
  widthHeight: IconSizes$2[size],
7253
7331
  style: views.icon
7254
- })))))), !hide && (/*#__PURE__*/React__default.createElement(DropDown, {
7332
+ })))))), !hide && options.length > 0 && (/*#__PURE__*/React__default.createElement(appStudio.Element, {
7333
+ onClick: e => e.stopPropagation(),
7334
+ style: {
7335
+ position: 'absolute',
7336
+ top: 'calc(100% + 4px)',
7337
+ left: 0,
7338
+ right: 0,
7339
+ zIndex: 1000
7340
+ }
7341
+ }, /*#__PURE__*/React__default.createElement(DropDown, {
7255
7342
  size: size,
7256
- views: views,
7343
+ views: Object.assign({}, views, {
7344
+ dropDown: {
7345
+ borderRadius: '6px',
7346
+ border: '1px solid color.gray.200',
7347
+ boxShadow: '0 8px 16px rgba(0,0,0,0.1)',
7348
+ padding: '8px',
7349
+ maxHeight: '240px',
7350
+ overflowY: 'auto'
7351
+ }
7352
+ }),
7257
7353
  options: options,
7258
7354
  callback: handleCallback,
7259
7355
  highlightedIndex: highlightedIndex,
7260
7356
  setHighlightedIndex: setHighlightedIndex
7261
- })));
7357
+ }))));
7262
7358
  };
7263
7359
 
7264
7360
  // Defines a functional component named 'SelectComponent', which is expected to receive 'SelectProps' as properties.
7265
7361
  var SelectComponent = props => {
7362
+ // Ensure options is always an array
7363
+ var safeProps = Object.assign({}, props, {
7364
+ options: props.options || []
7365
+ });
7266
7366
  // Invokes the 'useSelectState' hook with props to obtain stateful logic for the Select component.
7267
- var selectStates = useSelectState(props);
7367
+ var selectStates = useSelectState(safeProps);
7268
7368
  // Renders the 'SelectView' component, passing along any states controlled by 'useSelectState' and all properties passed to 'SelectComponent'.
7269
- return /*#__PURE__*/React__default.createElement(SelectView, Object.assign({}, selectStates, props));
7369
+ return /*#__PURE__*/React__default.createElement(SelectView, Object.assign({}, selectStates, safeProps, {
7370
+ onClick: e => {
7371
+ // Stop propagation to prevent the global click handler from closing other dropdowns
7372
+ e.stopPropagation();
7373
+ if (props.onClick) props.onClick(e);
7374
+ }
7375
+ }));
7270
7376
  };
7271
7377
  // Exports 'SelectComponent' as 'Select', making it available for import in other parts of the application.
7272
7378
  var Select = SelectComponent;
7273
7379
 
7274
- // 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.
7380
+ // This file defines a custom hook for managing the state of a Switch component.
7381
+ // It allows tracking whether the switch is hovered, and its on/off state based on 'isDisabled' and 'isChecked' properties.
7275
7382
  var useSwitchState = _ref => {
7276
7383
  var {
7277
7384
  isDisabled,
7278
7385
  isChecked
7279
7386
  } = _ref;
7280
7387
  var [isHovered, setIsHovered] = React__default.useState(false);
7281
- var [on, setOn] = React__default.useState(isDisabled ? !isDisabled : isChecked);
7388
+ var [on, setOn] = React__default.useState(isChecked || false);
7389
+ var [value, setValue] = React__default.useState(isChecked || false);
7390
+ // Update the value when isChecked changes
7391
+ React.useEffect(() => {
7392
+ if (isChecked !== undefined) {
7393
+ setOn(isChecked);
7394
+ setValue(isChecked);
7395
+ }
7396
+ }, [isChecked]);
7282
7397
  return {
7283
7398
  isHovered,
7284
7399
  setIsHovered,
7285
7400
  on,
7286
- setOn
7401
+ setOn,
7402
+ value,
7403
+ setValue
7287
7404
  };
7288
7405
  };
7289
7406
 
@@ -7299,68 +7416,68 @@
7299
7416
  */
7300
7417
  /**
7301
7418
  * Knob (circle) sizes for the Switch component
7302
- * Following the 4px grid system
7419
+ * Following the 4px grid system - dimensions réduites
7303
7420
  */
7304
7421
  var KnobSizes = {
7305
7422
  xs: {
7423
+ height: '8px',
7424
+ width: '8px'
7425
+ },
7426
+ sm: {
7306
7427
  height: '12px',
7307
7428
  width: '12px'
7308
7429
  },
7309
- sm: {
7430
+ md: {
7310
7431
  height: '16px',
7311
7432
  width: '16px'
7312
7433
  },
7313
- md: {
7434
+ lg: {
7314
7435
  height: '20px',
7315
7436
  width: '20px'
7316
7437
  },
7317
- lg: {
7438
+ xl: {
7318
7439
  height: '24px',
7319
7440
  width: '24px'
7320
- },
7321
- xl: {
7322
- height: '28px',
7323
- width: '28px'
7324
7441
  }
7325
7442
  };
7326
7443
  /**
7327
7444
  * Slider (track) sizes for the Switch component
7328
- * Following the 4px grid system
7445
+ * Following the 4px grid system - dimensions réduites
7329
7446
  */
7330
7447
  var SliderSizes = {
7331
7448
  xs: {
7332
- height: '24px',
7333
- width: '40px'
7449
+ height: '16px',
7450
+ width: '36px'
7334
7451
  },
7335
7452
  sm: {
7336
- height: '28px',
7337
- width: '48px'
7453
+ height: '20px',
7454
+ width: '44px'
7338
7455
  },
7339
7456
  md: {
7340
- height: '32px',
7341
- width: '56px'
7457
+ height: '24px',
7458
+ width: '52px'
7342
7459
  },
7343
7460
  lg: {
7344
- height: '36px',
7345
- width: '64px'
7461
+ height: '28px',
7462
+ width: '60px'
7346
7463
  },
7347
7464
  xl: {
7348
- height: '40px',
7349
- width: '72px'
7465
+ height: '32px',
7466
+ width: '68px'
7350
7467
  }
7351
7468
  };
7352
7469
  /**
7353
- * Padding for the Switch slider
7470
+ * Padding for the Switch slider - ajusté pour les nouvelles dimensions
7354
7471
  * Following the 4px grid system
7355
7472
  */
7356
7473
  var SliderPadding = {
7357
7474
  xs: {
7358
7475
  paddingVertical: 4,
7359
- paddingHorizontal: 4
7476
+ paddingHorizontal: 2
7360
7477
  },
7361
7478
  sm: {
7362
7479
  paddingVertical: 4,
7363
- paddingHorizontal: 4
7480
+ paddingHorizontal: 2
7364
7481
  },
7365
7482
  md: {
7366
7483
  paddingVertical: 4,
@@ -7418,7 +7535,6 @@
7418
7535
  isHovered = false,
7419
7536
  isDisabled = false,
7420
7537
  isReadOnly = false,
7421
- on,
7422
7538
  setOn,
7423
7539
  onChange,
7424
7540
  setValue = () => {},
@@ -7431,10 +7547,11 @@
7431
7547
  } = _ref,
7432
7548
  props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
7433
7549
  var handleToggle = event => {
7434
- if (!isReadOnly) {
7435
- setValue(!value);
7436
- setOn(!on);
7437
- if (onChange) onChange(event.target.checked);
7550
+ if (!isReadOnly && !isDisabled) {
7551
+ var newValue = event.target.checked;
7552
+ setValue(newValue);
7553
+ setOn(newValue);
7554
+ if (onChange) onChange(newValue);
7438
7555
  }
7439
7556
  };
7440
7557
  var handleHover = () => setIsHovered(!isHovered);
@@ -7482,27 +7599,39 @@
7482
7599
  // Layout properties
7483
7600
  display: "flex",
7484
7601
  alignItems: "center",
7485
- justifyContent: activeChild ? 'space-between' : value ? 'flex-end' : 'flex-start',
7602
+ justifyContent: value ? activeChild ? 'space-between' : 'flex-end' : inActiveChild ? 'space-between' : 'flex-start',
7486
7603
  marginBottom: 4,
7487
7604
  // Visual properties
7488
7605
  borderRadius: "9999px" // Full rounded for pill shape
7489
7606
  ,
7490
7607
  backgroundColor: isDisabled ? ColorSchemes.default.disabled : value ? isHovered ? ColorSchemes.states.hover.active : ColorSchemes.default.active : isHovered ? ColorSchemes.states.hover.inactive : ColorSchemes.default.inactive,
7608
+ overflow: "hidden",
7491
7609
  // State properties
7492
7610
  cursor: "pointer",
7493
7611
  // Animation
7494
7612
  transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
7495
7613
  }, shadow, SliderPadding[size], SliderSizes[size], views['slider']), activeChild && value && (/*#__PURE__*/React__default.createElement(appStudio.View, {
7496
7614
  marginLeft: 8,
7497
- transition: "all 0.3s ease"
7615
+ marginRight: 4,
7616
+ transition: "all 0.3s ease",
7617
+ display: "flex",
7618
+ alignItems: "center",
7619
+ justifyContent: "center",
7620
+ height: "100%"
7498
7621
  }, activeChild)), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
7499
7622
  borderRadius: "50%",
7500
7623
  backgroundColor: ColorSchemes.default.knob,
7501
7624
  boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
7502
- transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
7625
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
7626
+ zIndex: 1
7503
7627
  }, KnobSizes[size], views['circle'])), inActiveChild && !value && (/*#__PURE__*/React__default.createElement(appStudio.View, {
7504
7628
  marginRight: 8,
7505
- transition: "all 0.3s ease"
7629
+ marginLeft: 4,
7630
+ transition: "all 0.3s ease",
7631
+ display: "flex",
7632
+ alignItems: "center",
7633
+ justifyContent: "center",
7634
+ height: "100%"
7506
7635
  }, inActiveChild))), labelPosition === 'right' && label && (/*#__PURE__*/React__default.createElement(Text, {
7507
7636
  fontWeight: "500" // Medium weight for better readability
7508
7637
  ,
@@ -7788,7 +7917,7 @@
7788
7917
  var fieldStyles = Object.assign({
7789
7918
  // Layout properties
7790
7919
  margin: 0,
7791
- paddingVertical: 8,
7920
+ paddingVertical: 4,
7792
7921
  paddingHorizontal: 0,
7793
7922
  width: '100%',
7794
7923
  height: '100%',
@@ -7928,24 +8057,24 @@
7928
8057
  */
7929
8058
  var Sizes = {
7930
8059
  xs: {
8060
+ height: '12px',
8061
+ width: '12px'
8062
+ },
8063
+ sm: {
7931
8064
  height: '16px',
7932
8065
  width: '16px'
7933
8066
  },
7934
- sm: {
8067
+ md: {
7935
8068
  height: '20px',
7936
8069
  width: '20px'
7937
8070
  },
7938
- md: {
8071
+ lg: {
7939
8072
  height: '24px',
7940
8073
  width: '24px'
7941
8074
  },
7942
- lg: {
8075
+ xl: {
7943
8076
  height: '28px',
7944
8077
  width: '28px'
7945
- },
7946
- xl: {
7947
- height: '32px',
7948
- width: '32px'
7949
8078
  }
7950
8079
  };
7951
8080
  /**
@@ -10183,7 +10312,7 @@
10183
10312
  hint: placeholder,
10184
10313
  isClearable: false,
10185
10314
  left: /*#__PURE__*/React__default.createElement(SearchIcon, {
10186
- widthHeight: 12
10315
+ widthHeight: 16
10187
10316
  }),
10188
10317
  views: {
10189
10318
  container: Object.assign({
@@ -12744,17 +12873,17 @@
12744
12873
  var NavigationMenuSizes = {
12745
12874
  sm: {
12746
12875
  padding: '8px 12px',
12747
- fontSize: '14px',
12876
+ fontSize: '12px',
12748
12877
  fontWeight: '500'
12749
12878
  },
12750
12879
  md: {
12751
12880
  padding: '12px 16px',
12752
- fontSize: '16px',
12881
+ fontSize: '14px',
12753
12882
  fontWeight: '500'
12754
12883
  },
12755
12884
  lg: {
12756
12885
  padding: '16px 20px',
12757
- fontSize: '18px',
12886
+ fontSize: '16px',
12758
12887
  fontWeight: '500'
12759
12888
  }
12760
12889
  };
@@ -13702,8 +13831,8 @@
13702
13831
  }),
13703
13832
  gradient: (color, secondaryColor) => ({
13704
13833
  background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
13705
- backgroundClip: 'text',
13706
- webkitBackgroundClip: 'text',
13834
+ backgroundClip: 'text !important',
13835
+ webkitBackgroundClip: 'text !important',
13707
13836
  color: 'transparent',
13708
13837
  webkitTextFillColor: 'transparent',
13709
13838
  display: 'inline-block',
@@ -18504,6 +18633,7 @@
18504
18633
  exports.Loader = Loader;
18505
18634
  exports.LocationIcon = LocationIcon;
18506
18635
  exports.LockIcon = LockIcon;
18636
+ exports.LogoutIcon = LogoutIcon;
18507
18637
  exports.MagicWandIcon = MagicWandIcon;
18508
18638
  exports.MenuIcon = MenuIcon;
18509
18639
  exports.Menubar = Menubar;
@@ -18523,6 +18653,7 @@
18523
18653
  exports.PauseIcon = PauseIcon;
18524
18654
  exports.PlayIcon = PlayIcon;
18525
18655
  exports.PlusIcon = PlusIcon;
18656
+ exports.PowerOffIcon = PowerOffIcon;
18526
18657
  exports.PrintIcon = PrintIcon;
18527
18658
  exports.ProfileIcon = ProfileIcon;
18528
18659
  exports.RefreshIcon = RefreshIcon;