@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.
package/dist/web.esm.js CHANGED
@@ -463,20 +463,20 @@ var HeadingSizes = {
463
463
  * Font sizes following typography guidelines
464
464
  */
465
465
  var FontSizes = {
466
- xs: '12px',
467
- sm: '14px',
468
- md: '16px',
469
- lg: '18px',
466
+ xs: '10px',
467
+ sm: '12px',
468
+ md: '14px',
469
+ lg: '16px',
470
470
  xl: '20px'
471
471
  };
472
472
  /**
473
473
  * Line heights following typography guidelines
474
474
  */
475
475
  var LineHeights = {
476
- xs: '16px',
477
- sm: '20px',
478
- md: '24px',
479
- lg: '28px',
476
+ xs: '14px',
477
+ sm: '16px',
478
+ md: '20px',
479
+ lg: '22px',
480
480
  xl: '28px'
481
481
  };
482
482
  /**
@@ -728,7 +728,9 @@ var _excluded$3 = ["widthHeight", "color", "transform", "orientation", "children
728
728
  _excluded76 = ["widthHeight", "color", "strokeWidth", "filled"],
729
729
  _excluded77 = ["widthHeight", "color", "strokeWidth", "filled"],
730
730
  _excluded78 = ["widthHeight", "color", "strokeWidth", "filled"],
731
- _excluded79 = ["widthHeight", "color", "strokeWidth", "filled"];
731
+ _excluded79 = ["widthHeight", "color", "strokeWidth", "filled"],
732
+ _excluded80 = ["widthHeight", "color", "strokeWidth", "filled"],
733
+ _excluded81 = ["widthHeight", "color", "strokeWidth", "filled"];
732
734
  // Default wrapper component for consistent sizing and styling
733
735
  var IconWrapper = _ref => {
734
736
  var {
@@ -2796,6 +2798,53 @@ var ShieldIcon = _ref79 => {
2796
2798
  })));
2797
2799
  };
2798
2800
  var CheckIcon = TickIcon;
2801
+ var LogoutIcon = _ref80 => {
2802
+ var {
2803
+ widthHeight = 24,
2804
+ color = 'currentColor',
2805
+ strokeWidth = 1,
2806
+ filled = false
2807
+ } = _ref80,
2808
+ props = _objectWithoutPropertiesLoose(_ref80, _excluded80);
2809
+ return /*#__PURE__*/React.createElement(IconWrapper, Object.assign({
2810
+ widthHeight: widthHeight,
2811
+ color: color
2812
+ }, props), /*#__PURE__*/React.createElement("svg", Object.assign({
2813
+ viewBox: "0 0 24 24",
2814
+ "aria-hidden": "false",
2815
+ focusable: "false"
2816
+ }, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React.createElement("path", {
2817
+ d: "M16 17l5-5-5-5"
2818
+ }), /*#__PURE__*/React.createElement("path", {
2819
+ d: "M21 12H9"
2820
+ }), /*#__PURE__*/React.createElement("path", {
2821
+ 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"
2822
+ })));
2823
+ };
2824
+ var PowerOffIcon = _ref81 => {
2825
+ var {
2826
+ widthHeight = 24,
2827
+ color = 'currentColor',
2828
+ strokeWidth = 1.5,
2829
+ filled = false
2830
+ } = _ref81,
2831
+ props = _objectWithoutPropertiesLoose(_ref81, _excluded81);
2832
+ return /*#__PURE__*/React.createElement(IconWrapper, Object.assign({
2833
+ widthHeight: widthHeight,
2834
+ color: color
2835
+ }, props), /*#__PURE__*/React.createElement("svg", Object.assign({
2836
+ viewBox: "0 0 24 24",
2837
+ "aria-hidden": "false",
2838
+ focusable: "false"
2839
+ }, getSvgProps(filled, color, strokeWidth)), /*#__PURE__*/React.createElement("line", {
2840
+ x1: "12",
2841
+ y1: "2",
2842
+ x2: "12",
2843
+ y2: "8"
2844
+ }), /*#__PURE__*/React.createElement("path", {
2845
+ d: "M6.8 6.8a8 8 0 1 0 10 0"
2846
+ })));
2847
+ };
2799
2848
 
2800
2849
  var Icon = {
2801
2850
  __proto__: null,
@@ -2878,7 +2927,9 @@ var Icon = {
2878
2927
  ChartIcon: ChartIcon,
2879
2928
  GiftIcon: GiftIcon,
2880
2929
  ShieldIcon: ShieldIcon,
2881
- CheckIcon: CheckIcon
2930
+ CheckIcon: CheckIcon,
2931
+ LogoutIcon: LogoutIcon,
2932
+ PowerOffIcon: PowerOffIcon
2882
2933
  };
2883
2934
 
2884
2935
  /**
@@ -3258,7 +3309,7 @@ var BadgeSizes = {
3258
3309
  height: '32px',
3259
3310
  padding: '0 12px',
3260
3311
  // Typography
3261
- fontSize: '14px',
3312
+ fontSize: '16px',
3262
3313
  fontWeight: '500',
3263
3314
  lineHeight: '32px'
3264
3315
  },
@@ -3268,7 +3319,7 @@ var BadgeSizes = {
3268
3319
  height: '36px',
3269
3320
  padding: '0 14px',
3270
3321
  // Typography
3271
- fontSize: '16px',
3322
+ fontSize: '20px',
3272
3323
  fontWeight: '500',
3273
3324
  lineHeight: '36px'
3274
3325
  }
@@ -3679,70 +3730,60 @@ var Loader = LoaderComponent;
3679
3730
  */
3680
3731
  /**
3681
3732
  * Button sizes following the 4px grid system
3682
- */
3683
- var ButtonSizes = {
3733
+ */var ButtonSizes = {
3684
3734
  xs: {
3685
- // Height: 24px (6 × 4px)
3735
+ minHeight: 3 * 4,
3736
+ paddingTop: 1,
3737
+ paddingBottom: 1,
3738
+ paddingLeft: 2,
3739
+ paddingRight: 2,
3740
+ fontSize: 10,
3741
+ fontWeight: '500',
3742
+ lineHeight: 14,
3743
+ letterSpacing: '-0.01em'
3744
+ },
3745
+ sm: {
3686
3746
  minHeight: 4 * 4,
3687
- paddingTop: 2,
3688
- paddingBottom: 2,
3689
- paddingLeft: 4,
3690
- paddingRight: 4,
3691
- // Typography
3747
+ paddingTop: 4,
3748
+ paddingBottom: 4,
3749
+ paddingLeft: 8,
3750
+ paddingRight: 8,
3692
3751
  fontSize: 12,
3693
3752
  fontWeight: '500',
3694
- lineHeight: 20,
3753
+ lineHeight: 16,
3695
3754
  letterSpacing: '-0.01em'
3696
3755
  },
3697
- sm: {
3698
- // Height: 32px (8 × 4px)
3756
+ md: {
3699
3757
  minHeight: 6 * 4,
3700
3758
  paddingTop: 6,
3701
3759
  paddingBottom: 6,
3702
3760
  paddingLeft: 12,
3703
3761
  paddingRight: 12,
3704
- // Typography
3705
- fontSize: 12,
3762
+ fontSize: 14,
3706
3763
  fontWeight: '500',
3707
- lineHeight: 12,
3764
+ lineHeight: 18,
3708
3765
  letterSpacing: '-0.01em'
3709
3766
  },
3710
- md: {
3711
- // Height: 40px (10 × 4px) - standard height for interactive elements
3767
+ lg: {
3712
3768
  minHeight: 8 * 4,
3713
3769
  paddingTop: 8,
3714
3770
  paddingBottom: 8,
3715
3771
  paddingLeft: 16,
3716
3772
  paddingRight: 16,
3717
- // Typography
3718
3773
  fontSize: 16,
3719
3774
  fontWeight: '500',
3720
- lineHeight: 16,
3775
+ lineHeight: 18,
3721
3776
  letterSpacing: '-0.01em'
3722
3777
  },
3723
- lg: {
3778
+ xl: {
3724
3779
  minHeight: 10 * 4,
3725
3780
  paddingTop: 10,
3726
3781
  paddingBottom: 10,
3727
3782
  paddingLeft: 20,
3728
3783
  paddingRight: 20,
3729
- // Typography
3730
- fontSize: 16,
3731
- fontWeight: '500',
3732
- lineHeight: 20,
3733
- letterSpacing: '-0.01em'
3734
- },
3735
- xl: {
3736
- // Height: 60px (15 × 4px)
3737
- minHeight: 12 * 4,
3738
- paddingTop: 12,
3739
- paddingBottom: 12,
3740
- paddingLeft: 24,
3741
- paddingRight: 24,
3742
- // Typography
3743
- fontSize: 18,
3784
+ fontSize: 20,
3744
3785
  fontWeight: '500',
3745
- lineHeight: 24,
3786
+ lineHeight: 22,
3746
3787
  letterSpacing: '-0.01em'
3747
3788
  }
3748
3789
  };
@@ -6493,13 +6534,12 @@ var useSelectState = _ref => {
6493
6534
  var {
6494
6535
  placeholder,
6495
6536
  isMulti,
6496
- options
6537
+ options,
6538
+ id = "select-" + Math.random().toString(36).substr(2, 9)
6497
6539
  } = _ref;
6498
6540
  // 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
6499
6541
  var defaultValue = placeholder ? isMulti ? [] : '' // If there's a placeholder, set default to empty array for multi-select or empty string for single select
6500
- : Array.isArray(options) && options.length > 0 ? options[0].value : ''; // If no placeholder, use the first option value if available, otherwise undefined
6501
- // State hook for managing visibility of the Select dropdown, initially set to hidden
6502
- var [hide, setHide] = React.useState(true);
6542
+ : 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
6503
6543
  // State hook for tracking mouse hover status over the Select component
6504
6544
  var [isHovered, setIsHovered] = React.useState(false);
6505
6545
  // State hook for tracking focus status of the Select input field
@@ -6508,8 +6548,11 @@ var useSelectState = _ref => {
6508
6548
  var [value, setValue] = React.useState(defaultValue);
6509
6549
  // State hook for keeping track of the currently highlighted index in the options list
6510
6550
  var [highlightedIndex, setHighlightedIndex] = React.useState(0);
6551
+ // State hook for managing visibility of the Select dropdown, initially set to hidden
6552
+ var [hide, setHide] = React.useState(true);
6511
6553
  // Returns an object containing all stateful values and their associated setters to manage the Select component's state
6512
6554
  return {
6555
+ id,
6513
6556
  value,
6514
6557
  setValue,
6515
6558
  hide,
@@ -6724,7 +6767,7 @@ var FieldContent = _ref => {
6724
6767
  flexWrap: "nowrap",
6725
6768
  alignItems: "center",
6726
6769
  justifyContent: "space-between",
6727
- marginBottom: 8,
6770
+ marginBottom: 2,
6728
6771
  // Visual properties
6729
6772
  borderStyle: "solid",
6730
6773
  borderColor: color,
@@ -6746,10 +6789,9 @@ var FieldIcons = _ref => {
6746
6789
  props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
6747
6790
  return /*#__PURE__*/React.createElement(Center, Object.assign({
6748
6791
  gap: 10,
6749
- right: 16,
6792
+ right: 10,
6750
6793
  zIndex: 500,
6751
- flexWrap: "nowrap",
6752
- position: "absolute"
6794
+ flexWrap: "nowrap"
6753
6795
  }, props), children);
6754
6796
  };
6755
6797
 
@@ -6933,20 +6975,27 @@ var Item = _ref => {
6933
6975
  } = _ref,
6934
6976
  props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
6935
6977
  // Handles the click event on an option by invoking the callback with the selected option's value
6936
- var handleOptionClick = option => callback(option);
6978
+ var handleOptionClick = (e, option) => {
6979
+ e.stopPropagation();
6980
+ e.preventDefault();
6981
+ if (typeof callback === 'function') {
6982
+ callback(option);
6983
+ }
6984
+ };
6937
6985
  // Toggles the hover state on the item
6938
6986
  var handleHover = () => setIsHovered(!isHovered);
6939
6987
  return /*#__PURE__*/React.createElement(Element, Object.assign({
6940
6988
  as: "li",
6941
6989
  // Layout properties
6942
6990
  margin: 0,
6943
- paddingVertical: 12,
6944
- paddingHorizontal: 16,
6991
+ paddingVertical: 8,
6992
+ paddingHorizontal: 8,
6945
6993
  listStyleType: "none",
6994
+ cursor: "pointer",
6946
6995
  // Event handlers
6947
6996
  onMouseEnter: handleHover,
6948
6997
  onMouseLeave: handleHover,
6949
- onClick: () => handleOptionClick(option.value),
6998
+ onClick: e => handleOptionClick(e, option.value),
6950
6999
  // Visual properties
6951
7000
  backgroundColor: isHovered ? 'color.gray.100' : 'transparent',
6952
7001
  borderRadius: "4px" // Subtle rounded corners for items
@@ -6992,7 +7041,7 @@ var SelectBox = _ref2 => {
6992
7041
  width: '95%',
6993
7042
  height: '100%',
6994
7043
  border: 'none',
6995
- paddingVertical: 12,
7044
+ paddingVertical: 4,
6996
7045
  paddingHorizontal: 0,
6997
7046
  // Typography properties
6998
7047
  fontSize: Typography.fontSizes[size],
@@ -7072,34 +7121,16 @@ var DropDown = _ref5 => {
7072
7121
  } = _ref5;
7073
7122
  var itemStates = useItemState();
7074
7123
  var handleCallback = option => callback(option);
7075
- // Shadow styles for the dropdown
7076
- var shadow = {
7077
- boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)'
7078
- };
7124
+ // Shadow styles for the dropdown - now applied directly in the Element
7079
7125
  return /*#__PURE__*/React.createElement(Element, Object.assign({
7080
7126
  as: "ul",
7081
7127
  role: "dropdown",
7082
- top: "100%",
7083
7128
  width: "100%",
7084
7129
  display: "flex",
7085
7130
  flexDirection: "column",
7086
- position: "absolute",
7087
- marginTop: 8,
7088
- marginLeft: 0,
7089
- marginRight: 0,
7090
- marginBottom: 0,
7091
- padding: 0,
7092
- maxHeight: "240px" // 60 × 4px grid
7093
- ,
7094
- overflowY: "auto",
7095
- zIndex: 1000,
7096
7131
  backgroundColor: "color.white",
7097
- borderRadius: "8px" // Consistent with design system (rounded-md)
7098
- ,
7099
- borderWidth: "1px",
7100
- borderStyle: "solid",
7101
- borderColor: "color.gray.200",
7102
7132
  transition: "all 0.2s ease",
7133
+ margin: 0,
7103
7134
  style: {
7104
7135
  scrollbarWidth: 'thin',
7105
7136
  scrollbarColor: 'rgba(0, 0, 0, 0.2) transparent',
@@ -7114,7 +7145,7 @@ var DropDown = _ref5 => {
7114
7145
  borderRadius: '4px'
7115
7146
  }
7116
7147
  }
7117
- }, shadow, views == null ? void 0 : views.dropDown), options.length > 0 && options.map((option, index) => (/*#__PURE__*/React.createElement(Item, Object.assign({
7148
+ }, views == null ? void 0 : views.dropDown), options && options.length > 0 && options.map((option, index) => (/*#__PURE__*/React.createElement(Item, Object.assign({
7118
7149
  key: option.value,
7119
7150
  size: size,
7120
7151
  style: views['text'],
@@ -7197,23 +7228,57 @@ var SelectView = _ref7 => {
7197
7228
  highlightedIndex
7198
7229
  } = _ref7,
7199
7230
  props = _objectWithoutPropertiesLoose(_ref7, _excluded4$6);
7231
+ // close when *any* other select opens
7232
+ React.useEffect(() => {
7233
+ var handleCloseAll = () => setHide(true);
7234
+ document.addEventListener('closeAllSelects', handleCloseAll);
7235
+ return () => document.removeEventListener('closeAllSelects', handleCloseAll);
7236
+ }, [setHide]);
7237
+ // Add a global click handler to close the dropdown when clicking outside
7238
+ React.useEffect(() => {
7239
+ var handleGlobalClick = e => {
7240
+ var target = e.target;
7241
+ // Only close if clicking outside of this specific select component
7242
+ if (!target.closest("#" + id) && !hide) {
7243
+ setHide(true);
7244
+ }
7245
+ };
7246
+ document.addEventListener('click', handleGlobalClick);
7247
+ return () => {
7248
+ document.removeEventListener('click', handleGlobalClick);
7249
+ };
7250
+ }, [id, hide, setHide]);
7200
7251
  var showLabel = !!(isFocused && label);
7201
7252
  var handleHover = () => setIsHovered(!isHovered);
7202
7253
  var handleFocus = () => setIsFocused(true);
7203
7254
  var handleClick = event => {
7255
+ // tell all other selects to close
7256
+ document.dispatchEvent(new Event('closeAllSelects'));
7204
7257
  if (event && event.stopPropagation) event.stopPropagation();
7205
- setHide(!hide);
7206
- setIsFocused(!isFocused);
7258
+ // Toggle dropdown visibility
7259
+ var newHideState = !hide;
7260
+ setHide(newHideState);
7261
+ setIsFocused(!newHideState); // Set focus state based on dropdown visibility
7207
7262
  };
7208
7263
  var handleCallback = useCallback(option => {
7209
- setHide(!hide);
7264
+ // Close dropdown after selection
7265
+ setHide(true);
7266
+ // Tell all other selects to close
7267
+ document.dispatchEvent(new Event('closeAllSelects'));
7268
+ // Update value based on multi-select or single-select mode
7210
7269
  if (isMulti && Array.isArray(value)) {
7211
- !value.includes(option) && setValue([...value, option]);
7270
+ if (!value.includes(option)) {
7271
+ var newValue = [...value, option];
7272
+ setValue(newValue);
7273
+ if (onChange) onChange(option);
7274
+ }
7212
7275
  } else {
7213
7276
  setValue(option);
7277
+ if (onChange) onChange(option);
7214
7278
  }
7215
- if (onChange) onChange(option);
7216
- }, [hide, isMulti, value]);
7279
+ // Set focus to indicate selection
7280
+ setIsFocused(true);
7281
+ }, [isMulti, value, setHide, setValue, onChange, setIsFocused]);
7217
7282
  var handleRemoveOption = valueOption => {
7218
7283
  if (Array.isArray(value) && value.includes(valueOption)) {
7219
7284
  var newValue = value.filter(option => option !== valueOption);
@@ -7221,11 +7286,24 @@ var SelectView = _ref7 => {
7221
7286
  }
7222
7287
  };
7223
7288
  return /*#__PURE__*/React.createElement(FieldContainer, {
7289
+ style: {
7290
+ position: 'relative',
7291
+ width: '100%',
7292
+ display: 'inline-block'
7293
+ },
7294
+ id: id,
7224
7295
  role: "SelectBox",
7225
7296
  helperText: helperText,
7226
7297
  error: error,
7227
7298
  views: views,
7228
- onClick: isDisabled || isReadOnly ? () => {} : handleClick
7299
+ onClick: e => {
7300
+ // Stop propagation to prevent clicks from bubbling up
7301
+ e.stopPropagation();
7302
+ // Only handle click if not disabled or readonly
7303
+ if (!(isDisabled || isReadOnly)) {
7304
+ handleClick(e);
7305
+ }
7306
+ }
7229
7307
  }, /*#__PURE__*/React.createElement(FieldContent, {
7230
7308
  label: label,
7231
7309
  size: size,
@@ -7275,39 +7353,78 @@ var SelectView = _ref7 => {
7275
7353
  orientation: "up",
7276
7354
  widthHeight: IconSizes$2[size],
7277
7355
  style: views.icon
7278
- })))))), !hide && (/*#__PURE__*/React.createElement(DropDown, {
7356
+ })))))), !hide && options.length > 0 && (/*#__PURE__*/React.createElement(Element, {
7357
+ onClick: e => e.stopPropagation(),
7358
+ style: {
7359
+ position: 'absolute',
7360
+ top: 'calc(100% + 4px)',
7361
+ left: 0,
7362
+ right: 0,
7363
+ zIndex: 1000
7364
+ }
7365
+ }, /*#__PURE__*/React.createElement(DropDown, {
7279
7366
  size: size,
7280
- views: views,
7367
+ views: Object.assign({}, views, {
7368
+ dropDown: {
7369
+ borderRadius: '6px',
7370
+ border: '1px solid color.gray.200',
7371
+ boxShadow: '0 8px 16px rgba(0,0,0,0.1)',
7372
+ padding: '8px',
7373
+ maxHeight: '240px',
7374
+ overflowY: 'auto'
7375
+ }
7376
+ }),
7281
7377
  options: options,
7282
7378
  callback: handleCallback,
7283
7379
  highlightedIndex: highlightedIndex,
7284
7380
  setHighlightedIndex: setHighlightedIndex
7285
- })));
7381
+ }))));
7286
7382
  };
7287
7383
 
7288
7384
  // Defines a functional component named 'SelectComponent', which is expected to receive 'SelectProps' as properties.
7289
7385
  var SelectComponent = props => {
7386
+ // Ensure options is always an array
7387
+ var safeProps = Object.assign({}, props, {
7388
+ options: props.options || []
7389
+ });
7290
7390
  // Invokes the 'useSelectState' hook with props to obtain stateful logic for the Select component.
7291
- var selectStates = useSelectState(props);
7391
+ var selectStates = useSelectState(safeProps);
7292
7392
  // Renders the 'SelectView' component, passing along any states controlled by 'useSelectState' and all properties passed to 'SelectComponent'.
7293
- return /*#__PURE__*/React.createElement(SelectView, Object.assign({}, selectStates, props));
7393
+ return /*#__PURE__*/React.createElement(SelectView, Object.assign({}, selectStates, safeProps, {
7394
+ onClick: e => {
7395
+ // Stop propagation to prevent the global click handler from closing other dropdowns
7396
+ e.stopPropagation();
7397
+ if (props.onClick) props.onClick(e);
7398
+ }
7399
+ }));
7294
7400
  };
7295
7401
  // Exports 'SelectComponent' as 'Select', making it available for import in other parts of the application.
7296
7402
  var Select = SelectComponent;
7297
7403
 
7298
- // 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.
7404
+ // This file defines a custom hook for managing the state of a Switch component.
7405
+ // It allows tracking whether the switch is hovered, and its on/off state based on 'isDisabled' and 'isChecked' properties.
7299
7406
  var useSwitchState = _ref => {
7300
7407
  var {
7301
7408
  isDisabled,
7302
7409
  isChecked
7303
7410
  } = _ref;
7304
7411
  var [isHovered, setIsHovered] = React.useState(false);
7305
- var [on, setOn] = React.useState(isDisabled ? !isDisabled : isChecked);
7412
+ var [on, setOn] = React.useState(isChecked || false);
7413
+ var [value, setValue] = React.useState(isChecked || false);
7414
+ // Update the value when isChecked changes
7415
+ useEffect(() => {
7416
+ if (isChecked !== undefined) {
7417
+ setOn(isChecked);
7418
+ setValue(isChecked);
7419
+ }
7420
+ }, [isChecked]);
7306
7421
  return {
7307
7422
  isHovered,
7308
7423
  setIsHovered,
7309
7424
  on,
7310
- setOn
7425
+ setOn,
7426
+ value,
7427
+ setValue
7311
7428
  };
7312
7429
  };
7313
7430
 
@@ -7323,68 +7440,68 @@ var useSwitchState = _ref => {
7323
7440
  */
7324
7441
  /**
7325
7442
  * Knob (circle) sizes for the Switch component
7326
- * Following the 4px grid system
7443
+ * Following the 4px grid system - dimensions réduites
7327
7444
  */
7328
7445
  var KnobSizes = {
7329
7446
  xs: {
7447
+ height: '8px',
7448
+ width: '8px'
7449
+ },
7450
+ sm: {
7330
7451
  height: '12px',
7331
7452
  width: '12px'
7332
7453
  },
7333
- sm: {
7454
+ md: {
7334
7455
  height: '16px',
7335
7456
  width: '16px'
7336
7457
  },
7337
- md: {
7458
+ lg: {
7338
7459
  height: '20px',
7339
7460
  width: '20px'
7340
7461
  },
7341
- lg: {
7462
+ xl: {
7342
7463
  height: '24px',
7343
7464
  width: '24px'
7344
- },
7345
- xl: {
7346
- height: '28px',
7347
- width: '28px'
7348
7465
  }
7349
7466
  };
7350
7467
  /**
7351
7468
  * Slider (track) sizes for the Switch component
7352
- * Following the 4px grid system
7469
+ * Following the 4px grid system - dimensions réduites
7353
7470
  */
7354
7471
  var SliderSizes = {
7355
7472
  xs: {
7356
- height: '24px',
7357
- width: '40px'
7473
+ height: '16px',
7474
+ width: '36px'
7358
7475
  },
7359
7476
  sm: {
7360
- height: '28px',
7361
- width: '48px'
7477
+ height: '20px',
7478
+ width: '44px'
7362
7479
  },
7363
7480
  md: {
7364
- height: '32px',
7365
- width: '56px'
7481
+ height: '24px',
7482
+ width: '52px'
7366
7483
  },
7367
7484
  lg: {
7368
- height: '36px',
7369
- width: '64px'
7485
+ height: '28px',
7486
+ width: '60px'
7370
7487
  },
7371
7488
  xl: {
7372
- height: '40px',
7373
- width: '72px'
7489
+ height: '32px',
7490
+ width: '68px'
7374
7491
  }
7375
7492
  };
7376
7493
  /**
7377
- * Padding for the Switch slider
7494
+ * Padding for the Switch slider - ajusté pour les nouvelles dimensions
7378
7495
  * Following the 4px grid system
7379
7496
  */
7380
7497
  var SliderPadding = {
7381
7498
  xs: {
7382
7499
  paddingVertical: 4,
7383
- paddingHorizontal: 4
7500
+ paddingHorizontal: 2
7384
7501
  },
7385
7502
  sm: {
7386
7503
  paddingVertical: 4,
7387
- paddingHorizontal: 4
7504
+ paddingHorizontal: 2
7388
7505
  },
7389
7506
  md: {
7390
7507
  paddingVertical: 4,
@@ -7442,7 +7559,6 @@ var SwitchView = _ref => {
7442
7559
  isHovered = false,
7443
7560
  isDisabled = false,
7444
7561
  isReadOnly = false,
7445
- on,
7446
7562
  setOn,
7447
7563
  onChange,
7448
7564
  setValue = () => {},
@@ -7455,10 +7571,11 @@ var SwitchView = _ref => {
7455
7571
  } = _ref,
7456
7572
  props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
7457
7573
  var handleToggle = event => {
7458
- if (!isReadOnly) {
7459
- setValue(!value);
7460
- setOn(!on);
7461
- if (onChange) onChange(event.target.checked);
7574
+ if (!isReadOnly && !isDisabled) {
7575
+ var newValue = event.target.checked;
7576
+ setValue(newValue);
7577
+ setOn(newValue);
7578
+ if (onChange) onChange(newValue);
7462
7579
  }
7463
7580
  };
7464
7581
  var handleHover = () => setIsHovered(!isHovered);
@@ -7506,27 +7623,39 @@ var SwitchView = _ref => {
7506
7623
  // Layout properties
7507
7624
  display: "flex",
7508
7625
  alignItems: "center",
7509
- justifyContent: activeChild ? 'space-between' : value ? 'flex-end' : 'flex-start',
7626
+ justifyContent: value ? activeChild ? 'space-between' : 'flex-end' : inActiveChild ? 'space-between' : 'flex-start',
7510
7627
  marginBottom: 4,
7511
7628
  // Visual properties
7512
7629
  borderRadius: "9999px" // Full rounded for pill shape
7513
7630
  ,
7514
7631
  backgroundColor: isDisabled ? ColorSchemes.default.disabled : value ? isHovered ? ColorSchemes.states.hover.active : ColorSchemes.default.active : isHovered ? ColorSchemes.states.hover.inactive : ColorSchemes.default.inactive,
7632
+ overflow: "hidden",
7515
7633
  // State properties
7516
7634
  cursor: "pointer",
7517
7635
  // Animation
7518
7636
  transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
7519
7637
  }, shadow, SliderPadding[size], SliderSizes[size], views['slider']), activeChild && value && (/*#__PURE__*/React.createElement(View, {
7520
7638
  marginLeft: 8,
7521
- transition: "all 0.3s ease"
7639
+ marginRight: 4,
7640
+ transition: "all 0.3s ease",
7641
+ display: "flex",
7642
+ alignItems: "center",
7643
+ justifyContent: "center",
7644
+ height: "100%"
7522
7645
  }, activeChild)), /*#__PURE__*/React.createElement(View, Object.assign({
7523
7646
  borderRadius: "50%",
7524
7647
  backgroundColor: ColorSchemes.default.knob,
7525
7648
  boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
7526
- transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
7649
+ transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
7650
+ zIndex: 1
7527
7651
  }, KnobSizes[size], views['circle'])), inActiveChild && !value && (/*#__PURE__*/React.createElement(View, {
7528
7652
  marginRight: 8,
7529
- transition: "all 0.3s ease"
7653
+ marginLeft: 4,
7654
+ transition: "all 0.3s ease",
7655
+ display: "flex",
7656
+ alignItems: "center",
7657
+ justifyContent: "center",
7658
+ height: "100%"
7530
7659
  }, inActiveChild))), labelPosition === 'right' && label && (/*#__PURE__*/React.createElement(Text, {
7531
7660
  fontWeight: "500" // Medium weight for better readability
7532
7661
  ,
@@ -7812,7 +7941,7 @@ var TextFieldView = _ref => {
7812
7941
  var fieldStyles = Object.assign({
7813
7942
  // Layout properties
7814
7943
  margin: 0,
7815
- paddingVertical: 8,
7944
+ paddingVertical: 4,
7816
7945
  paddingHorizontal: 0,
7817
7946
  width: '100%',
7818
7947
  height: '100%',
@@ -7952,24 +8081,24 @@ var useCheckboxState = _ref => {
7952
8081
  */
7953
8082
  var Sizes = {
7954
8083
  xs: {
8084
+ height: '12px',
8085
+ width: '12px'
8086
+ },
8087
+ sm: {
7955
8088
  height: '16px',
7956
8089
  width: '16px'
7957
8090
  },
7958
- sm: {
8091
+ md: {
7959
8092
  height: '20px',
7960
8093
  width: '20px'
7961
8094
  },
7962
- md: {
8095
+ lg: {
7963
8096
  height: '24px',
7964
8097
  width: '24px'
7965
8098
  },
7966
- lg: {
8099
+ xl: {
7967
8100
  height: '28px',
7968
8101
  width: '28px'
7969
- },
7970
- xl: {
7971
- height: '32px',
7972
- width: '32px'
7973
8102
  }
7974
8103
  };
7975
8104
  /**
@@ -10207,7 +10336,7 @@ var ComboBoxView = _ref => {
10207
10336
  hint: placeholder,
10208
10337
  isClearable: false,
10209
10338
  left: /*#__PURE__*/React.createElement(SearchIcon, {
10210
- widthHeight: 12
10339
+ widthHeight: 16
10211
10340
  }),
10212
10341
  views: {
10213
10342
  container: Object.assign({
@@ -12768,17 +12897,17 @@ var useNavigationMenuState = function useNavigationMenuState(defaultActiveItemId
12768
12897
  var NavigationMenuSizes = {
12769
12898
  sm: {
12770
12899
  padding: '8px 12px',
12771
- fontSize: '14px',
12900
+ fontSize: '12px',
12772
12901
  fontWeight: '500'
12773
12902
  },
12774
12903
  md: {
12775
12904
  padding: '12px 16px',
12776
- fontSize: '16px',
12905
+ fontSize: '14px',
12777
12906
  fontWeight: '500'
12778
12907
  },
12779
12908
  lg: {
12780
12909
  padding: '16px 20px',
12781
- fontSize: '18px',
12910
+ fontSize: '16px',
12782
12911
  fontWeight: '500'
12783
12912
  }
12784
12913
  };
@@ -13726,8 +13855,8 @@ var HighlightStyles = {
13726
13855
  }),
13727
13856
  gradient: (color, secondaryColor) => ({
13728
13857
  background: "linear-gradient(135deg, " + color + ", " + (secondaryColor || color) + ")",
13729
- backgroundClip: 'text',
13730
- webkitBackgroundClip: 'text',
13858
+ backgroundClip: 'text !important',
13859
+ webkitBackgroundClip: 'text !important',
13731
13860
  color: 'transparent',
13732
13861
  webkitTextFillColor: 'transparent',
13733
13862
  display: 'inline-block',
@@ -18452,5 +18581,5 @@ var Tooltip = TooltipComponent;
18452
18581
  Tooltip.Trigger = TooltipTrigger;
18453
18582
  Tooltip.Content = TooltipContent;
18454
18583
 
18455
- export { Accordion, Alert, ArrowIcon, AspectRatio, Avatar, Badge, BatteryIcon, BluetoothIcon, BoldArrowIcon, BookmarkIcon, Button, CalendarIcon, CameraIcon, Card, Carousel, Chart, ChartIcon, CheckIcon, Checkbox, ChevronIcon, ClockIcon, CloseEyeIcon, CloseIcon, CloudIcon, ComboBox, Command, ContextMenu, CookieConsent, CopyIcon, CountryPicker, CropIcon, DatePicker, DeleteIcon, Divider, DocumentIcon, DownloadIcon, DragAndDrop, DragAndDropComponent, DragHandleIcon, DropdownMenu, DustBinIcon, EditIcon, ErrorIcon, ExternalLinkIcon, FacebookIcon, FileIcon, FileImage, FileSVG, FilterIcon, FormikCheckbox, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikOTPInput, FormikPassword, FormikSelect, FormikSlider, FormikSwitch, FormikTextArea, FormikTextField, GiftIcon, HeartIcon, HelpIcon, HomeIcon, HoverCard, Icon, ImageIcon, InfoIcon, InstagramIcon, LikeIcon, Link, LinkedinIcon, Loader, LocationIcon, LockIcon, MagicWandIcon, MenuIcon, Menubar, MessageLayout, MessageView, MicrophoneIcon, MinusIcon, Modal, MoonIcon, NavigationMenu, NotificationIcon, OTPInput, OpenEyeIcon, Pagination, PanelIcon, Password, PauseIcon, PlayIcon, PlusIcon, PrintIcon, ProfileIcon, RefreshIcon, Resizable, RotateIcon, SaveIcon, SearchIcon, Select, Separator, SettingsIcon, ShapeIcon, ShareIcon, ShieldIcon, Sidebar, Slider, SliderIcon, SliderVerticalIcon, SpinnerIcon, StarIcon, SuccessIcon, Switch, Table, Tabs, Text, TextArea, TextField, TextIcon, ThreadsIcon, TickIcon, Title, Toast, Toggle, ToggleGroup, Tooltip, TwitchIcon, TwitterIcon, UnLikeIcon, UnlockIcon, UploadIcon, Uploader, UserIcon, VideoIcon, WarningIcon, WifiIcon, XIcon, YoutubeIcon, ZoomInIcon, ZoomOutIcon, hideMessage, hideModal, showMessage, showModal, useMessageStore, useModalStore, useToast$1 as useToast };
18584
+ export { Accordion, Alert, ArrowIcon, AspectRatio, Avatar, Badge, BatteryIcon, BluetoothIcon, BoldArrowIcon, BookmarkIcon, Button, CalendarIcon, CameraIcon, Card, Carousel, Chart, ChartIcon, CheckIcon, Checkbox, ChevronIcon, ClockIcon, CloseEyeIcon, CloseIcon, CloudIcon, ComboBox, Command, ContextMenu, CookieConsent, CopyIcon, CountryPicker, CropIcon, DatePicker, DeleteIcon, Divider, DocumentIcon, DownloadIcon, DragAndDrop, DragAndDropComponent, DragHandleIcon, DropdownMenu, DustBinIcon, EditIcon, ErrorIcon, ExternalLinkIcon, FacebookIcon, FileIcon, FileImage, FileSVG, FilterIcon, FormikCheckbox, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikOTPInput, FormikPassword, FormikSelect, FormikSlider, FormikSwitch, FormikTextArea, FormikTextField, GiftIcon, HeartIcon, HelpIcon, HomeIcon, HoverCard, Icon, ImageIcon, InfoIcon, InstagramIcon, LikeIcon, Link, LinkedinIcon, Loader, LocationIcon, LockIcon, LogoutIcon, MagicWandIcon, MenuIcon, Menubar, MessageLayout, MessageView, MicrophoneIcon, MinusIcon, Modal, MoonIcon, NavigationMenu, NotificationIcon, OTPInput, OpenEyeIcon, Pagination, PanelIcon, Password, PauseIcon, PlayIcon, PlusIcon, PowerOffIcon, PrintIcon, ProfileIcon, RefreshIcon, Resizable, RotateIcon, SaveIcon, SearchIcon, Select, Separator, SettingsIcon, ShapeIcon, ShareIcon, ShieldIcon, Sidebar, Slider, SliderIcon, SliderVerticalIcon, SpinnerIcon, StarIcon, SuccessIcon, Switch, Table, Tabs, Text, TextArea, TextField, TextIcon, ThreadsIcon, TickIcon, Title, Toast, Toggle, ToggleGroup, Tooltip, TwitchIcon, TwitterIcon, UnLikeIcon, UnlockIcon, UploadIcon, Uploader, UserIcon, VideoIcon, WarningIcon, WifiIcon, XIcon, YoutubeIcon, ZoomInIcon, ZoomOutIcon, hideMessage, hideModal, showMessage, showModal, useMessageStore, useModalStore, useToast$1 as useToast };
18456
18585
  //# sourceMappingURL=web.esm.js.map