@nebula.js/stardust 5.0.0-alpha.2 → 5.0.0-alpha.3

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v5.0.0-alpha.2
2
+ * @nebula.js/stardust v5.0.0-alpha.3
3
3
  * Copyright (c) 2024 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -723,26 +723,40 @@
723
723
  }
724
724
  })(runtime);
725
725
 
726
- function ownKeys(object, enumerableOnly) {
727
- var keys = Object.keys(object);
726
+ function ownKeys(e, r) {
727
+ var t = Object.keys(e);
728
728
  if (Object.getOwnPropertySymbols) {
729
- var symbols = Object.getOwnPropertySymbols(object);
730
- enumerableOnly && (symbols = symbols.filter(function (sym) {
731
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
732
- })), keys.push.apply(keys, symbols);
733
- }
734
- return keys;
735
- }
736
- function _objectSpread2(target) {
737
- for (var i = 1; i < arguments.length; i++) {
738
- var source = null != arguments[i] ? arguments[i] : {};
739
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
740
- _defineProperty(target, key, source[key]);
741
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
742
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
729
+ var o = Object.getOwnPropertySymbols(e);
730
+ r && (o = o.filter(function (r) {
731
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
732
+ })), t.push.apply(t, o);
733
+ }
734
+ return t;
735
+ }
736
+ function _objectSpread2(e) {
737
+ for (var r = 1; r < arguments.length; r++) {
738
+ var t = null != arguments[r] ? arguments[r] : {};
739
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
740
+ _defineProperty(e, r, t[r]);
741
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
742
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
743
743
  });
744
744
  }
745
- return target;
745
+ return e;
746
+ }
747
+ function _toPrimitive(t, r) {
748
+ if ("object" != typeof t || !t) return t;
749
+ var e = t[Symbol.toPrimitive];
750
+ if (void 0 !== e) {
751
+ var i = e.call(t, r || "default");
752
+ if ("object" != typeof i) return i;
753
+ throw new TypeError("@@toPrimitive must return a primitive value.");
754
+ }
755
+ return ("string" === r ? String : Number)(t);
756
+ }
757
+ function _toPropertyKey(t) {
758
+ var i = _toPrimitive(t, "string");
759
+ return "symbol" == typeof i ? i : String(i);
746
760
  }
747
761
  function _defineProperty(obj, key, value) {
748
762
  key = _toPropertyKey(key);
@@ -799,20 +813,6 @@
799
813
  }
800
814
  return target;
801
815
  }
802
- function _toPrimitive(input, hint) {
803
- if (typeof input !== "object" || input === null) return input;
804
- var prim = input[Symbol.toPrimitive];
805
- if (prim !== undefined) {
806
- var res = prim.call(input, hint || "default");
807
- if (typeof res !== "object") return res;
808
- throw new TypeError("@@toPrimitive must return a primitive value.");
809
- }
810
- return (hint === "string" ? String : Number)(input);
811
- }
812
- function _toPropertyKey(arg) {
813
- var key = _toPrimitive(arg, "string");
814
- return typeof key === "symbol" ? key : String(key);
815
- }
816
816
 
817
817
  var react = {exports: {}};
818
818
 
@@ -1989,6 +1989,26 @@
1989
1989
  "zh-TW": "不符計算條件"
1990
1990
  }
1991
1991
  };
1992
+ var SelectionToolbar_ClickToLock = {
1993
+ id: "SelectionToolbar.ClickToLock",
1994
+ locale: {
1995
+ "de-DE": "Klicken zum Sperren",
1996
+ "en-US": "Click to lock",
1997
+ "es-ES": "Haga clic para bloquearla",
1998
+ "fr-FR": "Cliquez pour verrouiller",
1999
+ "it-IT": "Fare clic per bloccare",
2000
+ "ja-JP": "クリックしてロック",
2001
+ "ko-KR": "잠그려면 클릭하십시오.",
2002
+ "nl-NL": "Klik om te vergrendelen",
2003
+ "pl-PL": "Aby zablokować, kliknij",
2004
+ "pt-BR": "Clique para travar",
2005
+ "ru-RU": "Щелкните, чтобы заблокировать",
2006
+ "sv-SE": "Klicka för att låsa",
2007
+ "tr-TR": "Kilitlemek için tıklayın",
2008
+ "zh-CN": "单击以锁定",
2009
+ "zh-TW": "按一下鎖定"
2010
+ }
2011
+ };
1992
2012
  var all = {
1993
2013
  Cancel: Cancel$1,
1994
2014
  CurrentSelections_All: CurrentSelections_All,
@@ -2041,7 +2061,8 @@
2041
2061
  Visualization_Invalid_Dimension: Visualization_Invalid_Dimension,
2042
2062
  Visualization_Invalid_Measure: Visualization_Invalid_Measure,
2043
2063
  Visualization_LayoutError: Visualization_LayoutError,
2044
- Visualization_UnfulfilledCalculationCondition: Visualization_UnfulfilledCalculationCondition
2064
+ Visualization_UnfulfilledCalculationCondition: Visualization_UnfulfilledCalculationCondition,
2065
+ SelectionToolbar_ClickToLock: SelectionToolbar_ClickToLock
2045
2066
  };
2046
2067
 
2047
2068
  function appLocaleFn(language) {
@@ -3120,10 +3141,27 @@
3120
3141
  };
3121
3142
  var type = "dark";
3122
3143
  var color$1 = "@B98";
3144
+ var object$1 = {
3145
+ listBox: {
3146
+ backgroundColor: "@B20",
3147
+ title: {
3148
+ main: {
3149
+ color: "@B98",
3150
+ fontSize: "14px",
3151
+ fontWeight: "bold"
3152
+ }
3153
+ },
3154
+ content: {
3155
+ color: "#@B98",
3156
+ fontSize: "12px"
3157
+ }
3158
+ }
3159
+ };
3123
3160
  var darkRawJSON = {
3124
3161
  _variables: _variables,
3125
3162
  type: type,
3126
- color: color$1
3163
+ color: color$1,
3164
+ object: object$1
3127
3165
  };
3128
3166
 
3129
3167
  var object = {
@@ -3153,7 +3191,7 @@
3153
3191
  if (t._inherit === false || t._inherit === 'false') {
3154
3192
  baseInherit = {};
3155
3193
  }
3156
- const root = extend$2(true, {}, baseRawJSON, colorRawJSON, baseInherit);
3194
+ const root = extend$2(true, {}, baseRawJSON, baseInherit, colorRawJSON);
3157
3195
  // avoid merging known array objects as it could cause issues if they are of different types (pyramid vs class) or length
3158
3196
  const rawThemeJSON = extend$2(true, {}, root, {
3159
3197
  scales: null,
@@ -6645,7 +6683,7 @@
6645
6683
  }
6646
6684
 
6647
6685
  /**
6648
- * @mui/styled-engine v5.15.2
6686
+ * @mui/styled-engine v5.15.7
6649
6687
  *
6650
6688
  * @license MIT
6651
6689
  * This source code is licensed under the MIT license found in the
@@ -6708,8 +6746,13 @@
6708
6746
  return _extends$3.apply(this, arguments);
6709
6747
  }
6710
6748
 
6749
+ // https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
6711
6750
  function isPlainObject(item) {
6712
- return item !== null && typeof item === 'object' && item.constructor === Object;
6751
+ if (typeof item !== 'object' || item === null) {
6752
+ return false;
6753
+ }
6754
+ const prototype = Object.getPrototypeOf(item);
6755
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
6713
6756
  }
6714
6757
  function deepClone(source) {
6715
6758
  if (!isPlainObject(source)) {
@@ -6944,9 +6987,70 @@
6944
6987
  }, refs);
6945
6988
  }
6946
6989
 
6990
+ const UNINITIALIZED = {};
6991
+
6992
+ /**
6993
+ * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional
6994
+ * initialization argument, so the initialization function doesn't need to be an inline closure.
6995
+ *
6996
+ * @usage
6997
+ * const ref = useLazyRef(sortColumns, columns)
6998
+ */
6999
+ function useLazyRef(init, initArg) {
7000
+ const ref = reactExports.useRef(UNINITIALIZED);
7001
+ if (ref.current === UNINITIALIZED) {
7002
+ ref.current = init(initArg);
7003
+ }
7004
+ return ref;
7005
+ }
7006
+
7007
+ const EMPTY = [];
7008
+
7009
+ /**
7010
+ * A React.useEffect equivalent that runs once, when the component is mounted.
7011
+ */
7012
+ function useOnMount(fn) {
7013
+ /* eslint-disable react-hooks/exhaustive-deps */
7014
+ reactExports.useEffect(fn, EMPTY);
7015
+ /* eslint-enable react-hooks/exhaustive-deps */
7016
+ }
7017
+
7018
+ class Timeout {
7019
+ constructor() {
7020
+ this.currentId = 0;
7021
+ this.clear = () => {
7022
+ if (this.currentId !== 0) {
7023
+ clearTimeout(this.currentId);
7024
+ this.currentId = 0;
7025
+ }
7026
+ };
7027
+ this.disposeEffect = () => {
7028
+ return this.clear;
7029
+ };
7030
+ }
7031
+ static create() {
7032
+ return new Timeout();
7033
+ }
7034
+ /**
7035
+ * Executes `fn` after `delay`, clearing any previously scheduled call.
7036
+ */
7037
+ start(delay, fn) {
7038
+ this.clear();
7039
+ this.currentId = setTimeout(() => {
7040
+ this.currentId = 0;
7041
+ fn();
7042
+ }, delay);
7043
+ }
7044
+ }
7045
+ function useTimeout() {
7046
+ const timeout = useLazyRef(Timeout.create).current;
7047
+ useOnMount(timeout.disposeEffect);
7048
+ return timeout;
7049
+ }
7050
+
6947
7051
  let hadKeyboardEvent = true;
6948
7052
  let hadFocusVisibleRecently = false;
6949
- let hadFocusVisibleRecentlyTimeout;
7053
+ const hadFocusVisibleRecentlyTimeout = new Timeout();
6950
7054
  const inputTypesWhitelist = {
6951
7055
  text: true,
6952
7056
  search: true,
@@ -7069,10 +7173,9 @@
7069
7173
  // If we don't see a visibility change within 100ms, it's probably a
7070
7174
  // regular focus change.
7071
7175
  hadFocusVisibleRecently = true;
7072
- window.clearTimeout(hadFocusVisibleRecentlyTimeout);
7073
- hadFocusVisibleRecentlyTimeout = window.setTimeout(() => {
7176
+ hadFocusVisibleRecentlyTimeout.start(100, () => {
7074
7177
  hadFocusVisibleRecently = false;
7075
- }, 100);
7178
+ });
7076
7179
  isFocusVisibleRef.current = false;
7077
7180
  return true;
7078
7181
  }
@@ -7186,10 +7289,7 @@
7186
7289
  };
7187
7290
  const ClassNameGenerator = createClassNameGenerator();
7188
7291
 
7189
- // If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
7190
- // \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
7191
-
7192
- const globalStateClassesMapping = {
7292
+ const globalStateClasses = {
7193
7293
  active: 'active',
7194
7294
  checked: 'checked',
7195
7295
  completed: 'completed',
@@ -7203,19 +7303,23 @@
7203
7303
  required: 'required',
7204
7304
  selected: 'selected'
7205
7305
  };
7206
- function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
7207
- const globalStateClass = globalStateClassesMapping[slot];
7306
+ function generateUtilityClass$1(componentName, slot, globalStatePrefix = 'Mui') {
7307
+ const globalStateClass = globalStateClasses[slot];
7208
7308
  return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
7209
7309
  }
7210
7310
 
7211
- function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {
7311
+ function generateUtilityClasses$1(componentName, slots, globalStatePrefix = 'Mui') {
7212
7312
  const result = {};
7213
7313
  slots.forEach(slot => {
7214
- result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
7314
+ result[slot] = generateUtilityClass$1(componentName, slot, globalStatePrefix);
7215
7315
  });
7216
7316
  return result;
7217
7317
  }
7218
7318
 
7319
+ function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
7320
+ return Math.max(min, Math.min(val, max));
7321
+ }
7322
+
7219
7323
  const _excluded$S = ["values", "unit", "step"];
7220
7324
  const sortBreakpointsValues = values => {
7221
7325
  const breakpointsAsArray = Object.keys(values).map(key => ({
@@ -8279,6 +8383,81 @@
8279
8383
  const styleFunctionSx = unstable_createStyleFunctionSx();
8280
8384
  styleFunctionSx.filterProps = ['sx'];
8281
8385
 
8386
+ /**
8387
+ * A universal utility to style components with multiple color modes. Always use it from the theme object.
8388
+ * It works with:
8389
+ * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)
8390
+ * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)
8391
+ * - Zero-runtime engine
8392
+ *
8393
+ * Tips: Use an array over object spread and place `theme.applyStyles()` last.
8394
+ *
8395
+ * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]
8396
+ *
8397
+ * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}
8398
+ *
8399
+ * @example
8400
+ * 1. using with `styled`:
8401
+ * ```jsx
8402
+ * const Component = styled('div')(({ theme }) => [
8403
+ * { background: '#e5e5e5' },
8404
+ * theme.applyStyles('dark', {
8405
+ * background: '#1c1c1c',
8406
+ * color: '#fff',
8407
+ * }),
8408
+ * ]);
8409
+ * ```
8410
+ *
8411
+ * @example
8412
+ * 2. using with `sx` prop:
8413
+ * ```jsx
8414
+ * <Box sx={theme => [
8415
+ * { background: '#e5e5e5' },
8416
+ * theme.applyStyles('dark', {
8417
+ * background: '#1c1c1c',
8418
+ * color: '#fff',
8419
+ * }),
8420
+ * ]}
8421
+ * />
8422
+ * ```
8423
+ *
8424
+ * @example
8425
+ * 3. theming a component:
8426
+ * ```jsx
8427
+ * extendTheme({
8428
+ * components: {
8429
+ * MuiButton: {
8430
+ * styleOverrides: {
8431
+ * root: ({ theme }) => [
8432
+ * { background: '#e5e5e5' },
8433
+ * theme.applyStyles('dark', {
8434
+ * background: '#1c1c1c',
8435
+ * color: '#fff',
8436
+ * }),
8437
+ * ],
8438
+ * },
8439
+ * }
8440
+ * }
8441
+ * })
8442
+ *```
8443
+ */
8444
+ function applyStyles$2(key, styles) {
8445
+ // @ts-expect-error this is 'any' type
8446
+ const theme = this;
8447
+ if (theme.vars && typeof theme.getColorSchemeSelector === 'function') {
8448
+ // If CssVarsProvider is used as a provider,
8449
+ // returns '* :where([data-mui-color-scheme="light|dark"]) &'
8450
+ const selector = theme.getColorSchemeSelector(key).replace(/(\[[^\]]+\])/, '*:where($1)');
8451
+ return {
8452
+ [selector]: styles
8453
+ };
8454
+ }
8455
+ if (theme.palette.mode === key) {
8456
+ return styles;
8457
+ }
8458
+ return {};
8459
+ }
8460
+
8282
8461
  const _excluded$R = ["breakpoints", "palette", "spacing", "shape"];
8283
8462
  function createTheme$1(options = {}, ...args) {
8284
8463
  const {
@@ -8301,6 +8480,7 @@
8301
8480
  spacing,
8302
8481
  shape: _extends$4({}, shape$1, shapeInput)
8303
8482
  }, other);
8483
+ muiTheme.applyStyles = applyStyles$2;
8304
8484
  muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
8305
8485
  muiTheme.unstable_sxConfig = _extends$4({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
8306
8486
  muiTheme.unstable_sx = function sx(props) {
@@ -8382,7 +8562,7 @@
8382
8562
  });
8383
8563
  }
8384
8564
 
8385
- function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
8565
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
8386
8566
 
8387
8567
  const _excluded$P = ["className", "component"];
8388
8568
  function createBox(options = {}) {
@@ -8747,7 +8927,7 @@
8747
8927
  return resolveProps(theme.components[name].defaultProps, props);
8748
8928
  }
8749
8929
 
8750
- function useThemeProps$1({
8930
+ function useThemeProps$2({
8751
8931
  props,
8752
8932
  name,
8753
8933
  defaultTheme,
@@ -8765,7 +8945,6 @@
8765
8945
  return mergedProps;
8766
8946
  }
8767
8947
 
8768
- /* eslint-disable @typescript-eslint/naming-convention */
8769
8948
  /**
8770
8949
  * Returns a number whose value is limited to the given range.
8771
8950
  * @param {number} value The value to be clamped
@@ -8773,8 +8952,8 @@
8773
8952
  * @param {number} max The upper boundary of the output range
8774
8953
  * @returns {number} A number in the range [min, max]
8775
8954
  */
8776
- function clamp(value, min = 0, max = 1) {
8777
- return Math.min(Math.max(min, value), max);
8955
+ function clampWrapper(value, min = 0, max = 1) {
8956
+ return clamp(value, min, max);
8778
8957
  }
8779
8958
 
8780
8959
  /**
@@ -8937,7 +9116,7 @@
8937
9116
  */
8938
9117
  function alpha(color, value) {
8939
9118
  color = decomposeColor(color);
8940
- value = clamp(value);
9119
+ value = clampWrapper(value);
8941
9120
  if (color.type === 'rgb' || color.type === 'hsl') {
8942
9121
  color.type += 'a';
8943
9122
  }
@@ -8957,7 +9136,7 @@
8957
9136
  */
8958
9137
  function darken(color, coefficient) {
8959
9138
  color = decomposeColor(color);
8960
- coefficient = clamp(coefficient);
9139
+ coefficient = clampWrapper(coefficient);
8961
9140
  if (color.type.indexOf('hsl') !== -1) {
8962
9141
  color.values[2] *= 1 - coefficient;
8963
9142
  } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {
@@ -8976,7 +9155,7 @@
8976
9155
  */
8977
9156
  function lighten(color, coefficient) {
8978
9157
  color = decomposeColor(color);
8979
- coefficient = clamp(coefficient);
9158
+ coefficient = clampWrapper(coefficient);
8980
9159
  if (color.type.indexOf('hsl') !== -1) {
8981
9160
  color.values[2] += (100 - color.values[2]) * coefficient;
8982
9161
  } else if (color.type.indexOf('rgb') !== -1) {
@@ -9106,7 +9285,7 @@
9106
9285
  overridesResolver: (props, styles) => styles.root
9107
9286
  });
9108
9287
  function useThemePropsDefault(props) {
9109
- return useThemeProps$1({
9288
+ return useThemeProps$2({
9110
9289
  props,
9111
9290
  name: 'MuiStack',
9112
9291
  defaultTheme: defaultTheme$3
@@ -9215,7 +9394,7 @@
9215
9394
  const slots = {
9216
9395
  root: ['root']
9217
9396
  };
9218
- return composeClasses(slots, slot => generateUtilityClass(componentName, slot), {});
9397
+ return composeClasses(slots, slot => generateUtilityClass$1(componentName, slot), {});
9219
9398
  };
9220
9399
  const StackRoot = createStyledComponent(style);
9221
9400
  const Stack = /*#__PURE__*/reactExports.forwardRef(function Grid(inProps, ref) {
@@ -9951,11 +10130,11 @@
9951
10130
  return theme[THEME_ID] || theme;
9952
10131
  }
9953
10132
 
9954
- function useThemeProps({
10133
+ function useThemeProps$1({
9955
10134
  props,
9956
10135
  name
9957
10136
  }) {
9958
- return useThemeProps$1({
10137
+ return useThemeProps$2({
9959
10138
  props,
9960
10139
  name,
9961
10140
  defaultTheme: defaultTheme$2,
@@ -10797,7 +10976,7 @@
10797
10976
  });
10798
10977
  }
10799
10978
 
10800
- const touchRippleClasses = generateUtilityClasses('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']);
10979
+ const touchRippleClasses = generateUtilityClasses$1('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']);
10801
10980
 
10802
10981
  const _excluded$F = ["center", "classes", "className"];
10803
10982
  let _$1 = t => t,
@@ -10919,7 +11098,7 @@
10919
11098
  * TODO v5: Make private
10920
11099
  */
10921
11100
  const TouchRipple = /*#__PURE__*/reactExports.forwardRef(function TouchRipple(inProps, ref) {
10922
- const props = useThemeProps({
11101
+ const props = useThemeProps$1({
10923
11102
  props: inProps,
10924
11103
  name: 'MuiTouchRipple'
10925
11104
  });
@@ -10943,18 +11122,11 @@
10943
11122
  const ignoringMouseDown = reactExports.useRef(false);
10944
11123
  // We use a timer in order to only show the ripples for touch "click" like events.
10945
11124
  // We don't want to display the ripple for touch scroll events.
10946
- const startTimer = reactExports.useRef(0);
11125
+ const startTimer = useTimeout();
10947
11126
 
10948
11127
  // This is the hook called once the previous timeout is ready.
10949
11128
  const startTimerCommit = reactExports.useRef(null);
10950
11129
  const container = reactExports.useRef(null);
10951
- reactExports.useEffect(() => {
10952
- return () => {
10953
- if (startTimer.current) {
10954
- clearTimeout(startTimer.current);
10955
- }
10956
- };
10957
- }, []);
10958
11130
  const startCommit = reactExports.useCallback(params => {
10959
11131
  const {
10960
11132
  pulsate,
@@ -11047,12 +11219,13 @@
11047
11219
  });
11048
11220
  };
11049
11221
  // Delay the execution of the ripple effect.
11050
- startTimer.current = setTimeout(() => {
11222
+ // We have to make a tradeoff with this delay value.
11223
+ startTimer.start(DELAY_RIPPLE, () => {
11051
11224
  if (startTimerCommit.current) {
11052
11225
  startTimerCommit.current();
11053
11226
  startTimerCommit.current = null;
11054
11227
  }
11055
- }, DELAY_RIPPLE); // We have to make a tradeoff with this value.
11228
+ });
11056
11229
  }
11057
11230
  } else {
11058
11231
  startCommit({
@@ -11063,21 +11236,21 @@
11063
11236
  cb
11064
11237
  });
11065
11238
  }
11066
- }, [centerProp, startCommit]);
11239
+ }, [centerProp, startCommit, startTimer]);
11067
11240
  const pulsate = reactExports.useCallback(() => {
11068
11241
  start({}, {
11069
11242
  pulsate: true
11070
11243
  });
11071
11244
  }, [start]);
11072
11245
  const stop = reactExports.useCallback((event, cb) => {
11073
- clearTimeout(startTimer.current);
11246
+ startTimer.clear();
11074
11247
 
11075
11248
  // The touch interaction occurs too quickly.
11076
11249
  // We still want to show ripple effect.
11077
11250
  if ((event == null ? void 0 : event.type) === 'touchend' && startTimerCommit.current) {
11078
11251
  startTimerCommit.current();
11079
11252
  startTimerCommit.current = null;
11080
- startTimer.current = setTimeout(() => {
11253
+ startTimer.start(0, () => {
11081
11254
  stop(event, cb);
11082
11255
  });
11083
11256
  return;
@@ -11090,7 +11263,7 @@
11090
11263
  return oldRipples;
11091
11264
  });
11092
11265
  rippleCallback.current = cb;
11093
- }, []);
11266
+ }, [startTimer]);
11094
11267
  reactExports.useImperativeHandle(ref, () => ({
11095
11268
  pulsate,
11096
11269
  start,
@@ -11110,9 +11283,9 @@
11110
11283
  var TouchRipple$1 = TouchRipple;
11111
11284
 
11112
11285
  function getButtonBaseUtilityClass(slot) {
11113
- return generateUtilityClass('MuiButtonBase', slot);
11286
+ return generateUtilityClass$1('MuiButtonBase', slot);
11114
11287
  }
11115
- const buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);
11288
+ const buttonBaseClasses = generateUtilityClasses$1('MuiButtonBase', ['root', 'disabled', 'focusVisible']);
11116
11289
 
11117
11290
  const _excluded$E = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "touchRippleRef", "type"];
11118
11291
  const useUtilityClasses$r = ownerState => {
@@ -11181,7 +11354,7 @@
11181
11354
  * It contains a load of style reset and some focus/ripple logic.
11182
11355
  */
11183
11356
  const ButtonBase = /*#__PURE__*/reactExports.forwardRef(function ButtonBase(inProps, ref) {
11184
- const props = useThemeProps({
11357
+ const props = useThemeProps$1({
11185
11358
  props: inProps,
11186
11359
  name: 'MuiButtonBase'
11187
11360
  });
@@ -11397,7 +11570,7 @@
11397
11570
  type: type
11398
11571
  }, buttonProps, other, {
11399
11572
  children: [children, enableTouchRipple ?
11400
-
11573
+ /*#__PURE__*/
11401
11574
  /* TouchRipple is only needed client-side, x2 boost on the server. */
11402
11575
  jsxRuntimeExports.jsx(TouchRipple$1, _extends$6({
11403
11576
  ref: handleRippleRef,
@@ -11408,9 +11581,9 @@
11408
11581
  var ButtonBase$1 = ButtonBase;
11409
11582
 
11410
11583
  function getButtonUtilityClass(slot) {
11411
- return generateUtilityClass('MuiButton', slot);
11584
+ return generateUtilityClass$1('MuiButton', slot);
11412
11585
  }
11413
- const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
11586
+ const buttonClasses = generateUtilityClasses$1('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
11414
11587
  var buttonClasses$1 = buttonClasses;
11415
11588
 
11416
11589
  /**
@@ -11632,7 +11805,7 @@
11632
11805
  const contextProps = reactExports.useContext(ButtonGroupContext$1);
11633
11806
  const buttonGroupButtonContextPositionClassName = reactExports.useContext(ButtonGroupButtonContext$1);
11634
11807
  const resolvedProps = resolveProps(contextProps, inProps);
11635
- const props = useThemeProps({
11808
+ const props = useThemeProps$1({
11636
11809
  props: resolvedProps,
11637
11810
  name: 'MuiButton'
11638
11811
  });
@@ -11741,6 +11914,7 @@
11741
11914
  grey90: '#E6E6E6',
11742
11915
  grey85: '#D9D9D9',
11743
11916
  grey55: '#8C8C8C',
11917
+ grey45: '#737373',
11744
11918
  grey30: '#4D4D4D',
11745
11919
  grey25: '#404040',
11746
11920
  grey20: '#333333',
@@ -11795,7 +11969,9 @@
11795
11969
  custom: {
11796
11970
  focusBorder: colors.blue,
11797
11971
  focusOutline: 'rgba(70, 157, 205, 0.3)',
11798
- inputBackground: 'rgba(255, 255, 255, 1)'
11972
+ inputBackground: 'rgba(255, 255, 255, 1)',
11973
+ disabledBackground: colors.grey45,
11974
+ disabledContrastText: colors.grey100
11799
11975
  },
11800
11976
  selected: {
11801
11977
  main: colors.green,
@@ -11863,7 +12039,9 @@
11863
12039
  custom: {
11864
12040
  focusBorder: colors.blue,
11865
12041
  focusOutline: 'rgba(70, 157, 205, 0.3)',
11866
- inputBackground: 'rgba(0, 0, 0, 0.2)'
12042
+ inputBackground: 'rgba(0, 0, 0, 0.2)',
12043
+ disabledBackground: colors.grey45,
12044
+ disabledContrastText: colors.grey100
11867
12045
  },
11868
12046
  selected: {
11869
12047
  main: colors.green,
@@ -12024,7 +12202,7 @@
12024
12202
  return cache[key];
12025
12203
  }
12026
12204
 
12027
- const NEBULA_VERSION_HASH = "b12a" ;
12205
+ const NEBULA_VERSION_HASH = "fc09" ;
12028
12206
  ClassNameGenerator.configure(componentName => {
12029
12207
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
12030
12208
  });
@@ -12256,7 +12434,7 @@
12256
12434
  const appRef = React.createRef();
12257
12435
  const element = document.createElement('div');
12258
12436
  element.style.display = 'none';
12259
- element.setAttribute('data-nebulajs-version', "5.0.0-alpha.2" );
12437
+ element.setAttribute('data-nebulajs-version', "5.0.0-alpha.3" );
12260
12438
  element.setAttribute('data-app-id', app.id);
12261
12439
  document.body.appendChild(element);
12262
12440
  if (context) {
@@ -12324,9 +12502,9 @@
12324
12502
  }
12325
12503
 
12326
12504
  function getSvgIconUtilityClass(slot) {
12327
- return generateUtilityClass('MuiSvgIcon', slot);
12505
+ return generateUtilityClass$1('MuiSvgIcon', slot);
12328
12506
  }
12329
- generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
12507
+ generateUtilityClasses$1('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
12330
12508
 
12331
12509
  const _excluded$C = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"];
12332
12510
  const useUtilityClasses$p = ownerState => {
@@ -12381,7 +12559,7 @@
12381
12559
  };
12382
12560
  });
12383
12561
  const SvgIcon$1 = /*#__PURE__*/reactExports.forwardRef(function SvgIcon(inProps, ref) {
12384
- const props = useThemeProps({
12562
+ const props = useThemeProps$1({
12385
12563
  props: inProps,
12386
12564
  name: 'MuiSvgIcon'
12387
12565
  });
@@ -12488,9 +12666,9 @@
12488
12666
  }
12489
12667
 
12490
12668
  function getPaperUtilityClass(slot) {
12491
- return generateUtilityClass('MuiPaper', slot);
12669
+ return generateUtilityClass$1('MuiPaper', slot);
12492
12670
  }
12493
- generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);
12671
+ generateUtilityClasses$1('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);
12494
12672
 
12495
12673
  const _excluded$B = ["className", "component", "elevation", "square", "variant"];
12496
12674
  const useUtilityClasses$o = ownerState => {
@@ -12536,7 +12714,7 @@
12536
12714
  }));
12537
12715
  });
12538
12716
  const Paper = /*#__PURE__*/reactExports.forwardRef(function Paper(inProps, ref) {
12539
- const props = useThemeProps({
12717
+ const props = useThemeProps$1({
12540
12718
  props: inProps,
12541
12719
  name: 'MuiPaper'
12542
12720
  });
@@ -12564,12 +12742,238 @@
12564
12742
  });
12565
12743
  var Paper$1 = Paper;
12566
12744
 
12745
+ function _extends() {
12746
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
12747
+ for (var i = 1; i < arguments.length; i++) {
12748
+ var source = arguments[i];
12749
+ for (var key in source) {
12750
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
12751
+ target[key] = source[key];
12752
+ }
12753
+ }
12754
+ }
12755
+ return target;
12756
+ };
12757
+ return _extends.apply(this, arguments);
12758
+ }
12759
+
12760
+ /**
12761
+ * Determines if a given element is a DOM element name (i.e. not a React component).
12762
+ */
12763
+ function isHostComponent(element) {
12764
+ return typeof element === 'string';
12765
+ }
12766
+
12767
+ /**
12768
+ * Type of the ownerState based on the type of an element it applies to.
12769
+ * This resolves to the provided OwnerState for React components and `undefined` for host components.
12770
+ * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
12771
+ */
12772
+
12773
+ /**
12774
+ * Appends the ownerState object to the props, merging with the existing one if necessary.
12775
+ *
12776
+ * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
12777
+ * @param otherProps Props of the element.
12778
+ * @param ownerState
12779
+ */
12780
+ function appendOwnerState(elementType, otherProps, ownerState) {
12781
+ if (elementType === undefined || isHostComponent(elementType)) {
12782
+ return otherProps;
12783
+ }
12784
+ return _extends({}, otherProps, {
12785
+ ownerState: _extends({}, otherProps.ownerState, ownerState)
12786
+ });
12787
+ }
12788
+
12789
+ const defaultContextValue = {
12790
+ disableDefaultClasses: false
12791
+ };
12792
+ const ClassNameConfiguratorContext = /*#__PURE__*/reactExports.createContext(defaultContextValue);
12793
+ /**
12794
+ * @ignore - internal hook.
12795
+ *
12796
+ * Wraps the `generateUtilityClass` function and controls how the classes are generated.
12797
+ * Currently it only affects whether the classes are applied or not.
12798
+ *
12799
+ * @returns Function to be called with the `generateUtilityClass` function specific to a component to generate the classes.
12800
+ */
12801
+ function useClassNamesOverride(generateUtilityClass) {
12802
+ const {
12803
+ disableDefaultClasses
12804
+ } = reactExports.useContext(ClassNameConfiguratorContext);
12805
+ return slot => {
12806
+ if (disableDefaultClasses) {
12807
+ return '';
12808
+ }
12809
+ return generateUtilityClass(slot);
12810
+ };
12811
+ }
12812
+
12813
+ /**
12814
+ * Extracts event handlers from a given object.
12815
+ * A prop is considered an event handler if it is a function and its name starts with `on`.
12816
+ *
12817
+ * @param object An object to extract event handlers from.
12818
+ * @param excludeKeys An array of keys to exclude from the returned object.
12819
+ */
12820
+ function extractEventHandlers(object, excludeKeys = []) {
12821
+ if (object === undefined) {
12822
+ return {};
12823
+ }
12824
+ const result = {};
12825
+ Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {
12826
+ result[prop] = object[prop];
12827
+ });
12828
+ return result;
12829
+ }
12830
+
12831
+ /**
12832
+ * If `componentProps` is a function, calls it with the provided `ownerState`.
12833
+ * Otherwise, just returns `componentProps`.
12834
+ */
12835
+ function resolveComponentProps(componentProps, ownerState, slotState) {
12836
+ if (typeof componentProps === 'function') {
12837
+ return componentProps(ownerState, slotState);
12838
+ }
12839
+ return componentProps;
12840
+ }
12841
+
12842
+ function _objectWithoutPropertiesLoose(source, excluded) {
12843
+ if (source == null) return {};
12844
+ var target = {};
12845
+ var sourceKeys = Object.keys(source);
12846
+ var key, i;
12847
+ for (i = 0; i < sourceKeys.length; i++) {
12848
+ key = sourceKeys[i];
12849
+ if (excluded.indexOf(key) >= 0) continue;
12850
+ target[key] = source[key];
12851
+ }
12852
+ return target;
12853
+ }
12854
+
12855
+ /**
12856
+ * Removes event handlers from the given object.
12857
+ * A field is considered an event handler if it is a function with a name beginning with `on`.
12858
+ *
12859
+ * @param object Object to remove event handlers from.
12860
+ * @returns Object with event handlers removed.
12861
+ */
12862
+ function omitEventHandlers(object) {
12863
+ if (object === undefined) {
12864
+ return {};
12865
+ }
12866
+ const result = {};
12867
+ Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {
12868
+ result[prop] = object[prop];
12869
+ });
12870
+ return result;
12871
+ }
12872
+
12873
+ /**
12874
+ * Merges the slot component internal props (usually coming from a hook)
12875
+ * with the externally provided ones.
12876
+ *
12877
+ * The merge order is (the latter overrides the former):
12878
+ * 1. The internal props (specified as a getter function to work with get*Props hook result)
12879
+ * 2. Additional props (specified internally on a Base UI component)
12880
+ * 3. External props specified on the owner component. These should only be used on a root slot.
12881
+ * 4. External props specified in the `slotProps.*` prop.
12882
+ * 5. The `className` prop - combined from all the above.
12883
+ * @param parameters
12884
+ * @returns
12885
+ */
12886
+ function mergeSlotProps(parameters) {
12887
+ const {
12888
+ getSlotProps,
12889
+ additionalProps,
12890
+ externalSlotProps,
12891
+ externalForwardedProps,
12892
+ className
12893
+ } = parameters;
12894
+ if (!getSlotProps) {
12895
+ // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,
12896
+ // so we can simply merge all the props without having to worry about extracting event handlers.
12897
+ const joinedClasses = clsx(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);
12898
+ const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
12899
+ const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);
12900
+ if (joinedClasses.length > 0) {
12901
+ props.className = joinedClasses;
12902
+ }
12903
+ if (Object.keys(mergedStyle).length > 0) {
12904
+ props.style = mergedStyle;
12905
+ }
12906
+ return {
12907
+ props,
12908
+ internalRef: undefined
12909
+ };
12910
+ }
12911
+
12912
+ // In this case, getSlotProps is responsible for calling the external event handlers.
12913
+ // We don't need to include them in the merged props because of this.
12914
+
12915
+ const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));
12916
+ const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);
12917
+ const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);
12918
+ const internalSlotProps = getSlotProps(eventHandlers);
12919
+
12920
+ // The order of classes is important here.
12921
+ // Emotion (that we use in libraries consuming Base UI) depends on this order
12922
+ // to properly override style. It requires the most important classes to be last
12923
+ // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.
12924
+ const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);
12925
+ const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
12926
+ const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);
12927
+ if (joinedClasses.length > 0) {
12928
+ props.className = joinedClasses;
12929
+ }
12930
+ if (Object.keys(mergedStyle).length > 0) {
12931
+ props.style = mergedStyle;
12932
+ }
12933
+ return {
12934
+ props,
12935
+ internalRef: internalSlotProps.ref
12936
+ };
12937
+ }
12938
+
12939
+ const _excluded$A = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"];
12940
+ /**
12941
+ * @ignore - do not document.
12942
+ * Builds the props to be passed into the slot of an unstyled component.
12943
+ * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.
12944
+ * If the slot component is not a host component, it also merges in the `ownerState`.
12945
+ *
12946
+ * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.
12947
+ */
12948
+ function useSlotProps(parameters) {
12949
+ var _parameters$additiona;
12950
+ const {
12951
+ elementType,
12952
+ externalSlotProps,
12953
+ ownerState,
12954
+ skipResolvingSlotProps = false
12955
+ } = parameters,
12956
+ rest = _objectWithoutPropertiesLoose(parameters, _excluded$A);
12957
+ const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);
12958
+ const {
12959
+ props: mergedProps,
12960
+ internalRef
12961
+ } = mergeSlotProps(_extends({}, rest, {
12962
+ externalSlotProps: resolvedComponentsProps
12963
+ }));
12964
+ const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);
12965
+ const props = appendOwnerState(elementType, _extends({}, mergedProps, {
12966
+ ref
12967
+ }), ownerState);
12968
+ return props;
12969
+ }
12970
+
12567
12971
  function getIconButtonUtilityClass(slot) {
12568
- return generateUtilityClass('MuiIconButton', slot);
12972
+ return generateUtilityClass$1('MuiIconButton', slot);
12569
12973
  }
12570
- const iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge']);
12974
+ const iconButtonClasses = generateUtilityClasses$1('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge']);
12571
12975
 
12572
- const _excluded$A = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"];
12976
+ const _excluded$z = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"];
12573
12977
  const useUtilityClasses$n = ownerState => {
12574
12978
  const {
12575
12979
  classes,
@@ -12657,7 +13061,7 @@
12657
13061
  * regarding the available icon options.
12658
13062
  */
12659
13063
  const IconButton = /*#__PURE__*/reactExports.forwardRef(function IconButton(inProps, ref) {
12660
- const props = useThemeProps({
13064
+ const props = useThemeProps$1({
12661
13065
  props: inProps,
12662
13066
  name: 'MuiIconButton'
12663
13067
  });
@@ -12670,7 +13074,7 @@
12670
13074
  disableFocusRipple = false,
12671
13075
  size = 'medium'
12672
13076
  } = props,
12673
- other = _objectWithoutPropertiesLoose$3(props, _excluded$A);
13077
+ other = _objectWithoutPropertiesLoose$3(props, _excluded$z);
12674
13078
  const ownerState = _extends$6({}, props, {
12675
13079
  edge,
12676
13080
  color,
@@ -12693,11 +13097,11 @@
12693
13097
  var IconButton$1 = IconButton;
12694
13098
 
12695
13099
  function getTypographyUtilityClass(slot) {
12696
- return generateUtilityClass('MuiTypography', slot);
13100
+ return generateUtilityClass$1('MuiTypography', slot);
12697
13101
  }
12698
- generateUtilityClasses('MuiTypography', ['root', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'inherit', 'button', 'caption', 'overline', 'alignLeft', 'alignRight', 'alignCenter', 'alignJustify', 'noWrap', 'gutterBottom', 'paragraph']);
13102
+ generateUtilityClasses$1('MuiTypography', ['root', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'inherit', 'button', 'caption', 'overline', 'alignLeft', 'alignRight', 'alignCenter', 'alignJustify', 'noWrap', 'gutterBottom', 'paragraph']);
12699
13103
 
12700
- const _excluded$z = ["align", "className", "component", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"];
13104
+ const _excluded$y = ["align", "className", "component", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"];
12701
13105
  const useUtilityClasses$m = ownerState => {
12702
13106
  const {
12703
13107
  align,
@@ -12766,7 +13170,7 @@
12766
13170
  return colorTransformations[color] || color;
12767
13171
  };
12768
13172
  const Typography = /*#__PURE__*/reactExports.forwardRef(function Typography(inProps, ref) {
12769
- const themeProps = useThemeProps({
13173
+ const themeProps = useThemeProps$1({
12770
13174
  props: inProps,
12771
13175
  name: 'MuiTypography'
12772
13176
  });
@@ -12784,7 +13188,7 @@
12784
13188
  variant = 'body1',
12785
13189
  variantMapping = defaultVariantMapping
12786
13190
  } = props,
12787
- other = _objectWithoutPropertiesLoose$3(props, _excluded$z);
13191
+ other = _objectWithoutPropertiesLoose$3(props, _excluded$y);
12788
13192
  const ownerState = _extends$6({}, props, {
12789
13193
  align,
12790
13194
  color,
@@ -12807,232 +13211,6 @@
12807
13211
  });
12808
13212
  var Typography$1 = Typography;
12809
13213
 
12810
- function _extends() {
12811
- _extends = Object.assign ? Object.assign.bind() : function (target) {
12812
- for (var i = 1; i < arguments.length; i++) {
12813
- var source = arguments[i];
12814
- for (var key in source) {
12815
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12816
- target[key] = source[key];
12817
- }
12818
- }
12819
- }
12820
- return target;
12821
- };
12822
- return _extends.apply(this, arguments);
12823
- }
12824
-
12825
- /**
12826
- * Determines if a given element is a DOM element name (i.e. not a React component).
12827
- */
12828
- function isHostComponent(element) {
12829
- return typeof element === 'string';
12830
- }
12831
-
12832
- /**
12833
- * Type of the ownerState based on the type of an element it applies to.
12834
- * This resolves to the provided OwnerState for React components and `undefined` for host components.
12835
- * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.
12836
- */
12837
-
12838
- /**
12839
- * Appends the ownerState object to the props, merging with the existing one if necessary.
12840
- *
12841
- * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.
12842
- * @param otherProps Props of the element.
12843
- * @param ownerState
12844
- */
12845
- function appendOwnerState(elementType, otherProps, ownerState) {
12846
- if (elementType === undefined || isHostComponent(elementType)) {
12847
- return otherProps;
12848
- }
12849
- return _extends({}, otherProps, {
12850
- ownerState: _extends({}, otherProps.ownerState, ownerState)
12851
- });
12852
- }
12853
-
12854
- const defaultContextValue = {
12855
- disableDefaultClasses: false
12856
- };
12857
- const ClassNameConfiguratorContext = /*#__PURE__*/reactExports.createContext(defaultContextValue);
12858
- /**
12859
- * @ignore - internal hook.
12860
- *
12861
- * Wraps the `generateUtilityClass` function and controls how the classes are generated.
12862
- * Currently it only affects whether the classes are applied or not.
12863
- *
12864
- * @returns Function to be called with the `generateUtilityClass` function specific to a component to generate the classes.
12865
- */
12866
- function useClassNamesOverride(generateUtilityClass) {
12867
- const {
12868
- disableDefaultClasses
12869
- } = reactExports.useContext(ClassNameConfiguratorContext);
12870
- return slot => {
12871
- if (disableDefaultClasses) {
12872
- return '';
12873
- }
12874
- return generateUtilityClass(slot);
12875
- };
12876
- }
12877
-
12878
- /**
12879
- * Extracts event handlers from a given object.
12880
- * A prop is considered an event handler if it is a function and its name starts with `on`.
12881
- *
12882
- * @param object An object to extract event handlers from.
12883
- * @param excludeKeys An array of keys to exclude from the returned object.
12884
- */
12885
- function extractEventHandlers(object, excludeKeys = []) {
12886
- if (object === undefined) {
12887
- return {};
12888
- }
12889
- const result = {};
12890
- Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {
12891
- result[prop] = object[prop];
12892
- });
12893
- return result;
12894
- }
12895
-
12896
- /**
12897
- * If `componentProps` is a function, calls it with the provided `ownerState`.
12898
- * Otherwise, just returns `componentProps`.
12899
- */
12900
- function resolveComponentProps(componentProps, ownerState, slotState) {
12901
- if (typeof componentProps === 'function') {
12902
- return componentProps(ownerState, slotState);
12903
- }
12904
- return componentProps;
12905
- }
12906
-
12907
- function _objectWithoutPropertiesLoose(source, excluded) {
12908
- if (source == null) return {};
12909
- var target = {};
12910
- var sourceKeys = Object.keys(source);
12911
- var key, i;
12912
- for (i = 0; i < sourceKeys.length; i++) {
12913
- key = sourceKeys[i];
12914
- if (excluded.indexOf(key) >= 0) continue;
12915
- target[key] = source[key];
12916
- }
12917
- return target;
12918
- }
12919
-
12920
- /**
12921
- * Removes event handlers from the given object.
12922
- * A field is considered an event handler if it is a function with a name beginning with `on`.
12923
- *
12924
- * @param object Object to remove event handlers from.
12925
- * @returns Object with event handlers removed.
12926
- */
12927
- function omitEventHandlers(object) {
12928
- if (object === undefined) {
12929
- return {};
12930
- }
12931
- const result = {};
12932
- Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {
12933
- result[prop] = object[prop];
12934
- });
12935
- return result;
12936
- }
12937
-
12938
- /**
12939
- * Merges the slot component internal props (usually coming from a hook)
12940
- * with the externally provided ones.
12941
- *
12942
- * The merge order is (the latter overrides the former):
12943
- * 1. The internal props (specified as a getter function to work with get*Props hook result)
12944
- * 2. Additional props (specified internally on a Base UI component)
12945
- * 3. External props specified on the owner component. These should only be used on a root slot.
12946
- * 4. External props specified in the `slotProps.*` prop.
12947
- * 5. The `className` prop - combined from all the above.
12948
- * @param parameters
12949
- * @returns
12950
- */
12951
- function mergeSlotProps(parameters) {
12952
- const {
12953
- getSlotProps,
12954
- additionalProps,
12955
- externalSlotProps,
12956
- externalForwardedProps,
12957
- className
12958
- } = parameters;
12959
- if (!getSlotProps) {
12960
- // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,
12961
- // so we can simply merge all the props without having to worry about extracting event handlers.
12962
- const joinedClasses = clsx(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);
12963
- const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
12964
- const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);
12965
- if (joinedClasses.length > 0) {
12966
- props.className = joinedClasses;
12967
- }
12968
- if (Object.keys(mergedStyle).length > 0) {
12969
- props.style = mergedStyle;
12970
- }
12971
- return {
12972
- props,
12973
- internalRef: undefined
12974
- };
12975
- }
12976
-
12977
- // In this case, getSlotProps is responsible for calling the external event handlers.
12978
- // We don't need to include them in the merged props because of this.
12979
-
12980
- const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));
12981
- const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);
12982
- const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);
12983
- const internalSlotProps = getSlotProps(eventHandlers);
12984
-
12985
- // The order of classes is important here.
12986
- // Emotion (that we use in libraries consuming Base UI) depends on this order
12987
- // to properly override style. It requires the most important classes to be last
12988
- // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.
12989
- const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);
12990
- const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
12991
- const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);
12992
- if (joinedClasses.length > 0) {
12993
- props.className = joinedClasses;
12994
- }
12995
- if (Object.keys(mergedStyle).length > 0) {
12996
- props.style = mergedStyle;
12997
- }
12998
- return {
12999
- props,
13000
- internalRef: internalSlotProps.ref
13001
- };
13002
- }
13003
-
13004
- const _excluded$y = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"];
13005
- /**
13006
- * @ignore - do not document.
13007
- * Builds the props to be passed into the slot of an unstyled component.
13008
- * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.
13009
- * If the slot component is not a host component, it also merges in the `ownerState`.
13010
- *
13011
- * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.
13012
- */
13013
- function useSlotProps(parameters) {
13014
- var _parameters$additiona;
13015
- const {
13016
- elementType,
13017
- externalSlotProps,
13018
- ownerState,
13019
- skipResolvingSlotProps = false
13020
- } = parameters,
13021
- rest = _objectWithoutPropertiesLoose(parameters, _excluded$y);
13022
- const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);
13023
- const {
13024
- props: mergedProps,
13025
- internalRef
13026
- } = mergeSlotProps(_extends({}, rest, {
13027
- externalSlotProps: resolvedComponentsProps
13028
- }));
13029
- const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);
13030
- const props = appendOwnerState(elementType, _extends({}, mergedProps, {
13031
- ref
13032
- }), ownerState);
13033
- return props;
13034
- }
13035
-
13036
13214
  /**
13037
13215
  *
13038
13216
  * Demos:
@@ -13071,6 +13249,26 @@
13071
13249
  };
13072
13250
  }
13073
13251
 
13252
+ const GLOBAL_CLASS_PREFIX = 'base';
13253
+ function buildStateClass(state) {
13254
+ return `${GLOBAL_CLASS_PREFIX}--${state}`;
13255
+ }
13256
+ function buildSlotClass(componentName, slot) {
13257
+ return `${GLOBAL_CLASS_PREFIX}-${componentName}-${slot}`;
13258
+ }
13259
+ function generateUtilityClass(componentName, slot) {
13260
+ const globalStateClass = globalStateClasses[slot];
13261
+ return globalStateClass ? buildStateClass(globalStateClass) : buildSlotClass(componentName, slot);
13262
+ }
13263
+
13264
+ function generateUtilityClasses(componentName, slots) {
13265
+ const result = {};
13266
+ slots.forEach(slot => {
13267
+ result[slot] = generateUtilityClass(componentName, slot);
13268
+ });
13269
+ return result;
13270
+ }
13271
+
13074
13272
  // Inspired by https://github.com/focus-trap/tabbable
13075
13273
  const candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])'].join(',');
13076
13274
  function getTabIndex(node) {
@@ -15188,10 +15386,11 @@
15188
15386
  });
15189
15387
  });
15190
15388
 
15389
+ const COMPONENT_NAME = 'Popper';
15191
15390
  function getPopperUtilityClass(slot) {
15192
- return generateUtilityClass('MuiPopper', slot);
15391
+ return generateUtilityClass(COMPONENT_NAME, slot);
15193
15392
  }
15194
- generateUtilityClasses('MuiPopper', ['root']);
15393
+ generateUtilityClasses(COMPONENT_NAME, ['root']);
15195
15394
 
15196
15395
  const _excluded$x = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"],
15197
15396
  _excluded2$3 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"];
@@ -16059,7 +16258,7 @@
16059
16258
  const Popper = /*#__PURE__*/reactExports.forwardRef(function Popper(inProps, ref) {
16060
16259
  var _slots$root;
16061
16260
  const theme = useTheme$4();
16062
- const props = useThemeProps({
16261
+ const props = useThemeProps$1({
16063
16262
  props: inProps,
16064
16263
  name: 'MuiPopper'
16065
16264
  });
@@ -16162,9 +16361,9 @@
16162
16361
  }
16163
16362
 
16164
16363
  function getInputBaseUtilityClass(slot) {
16165
- return generateUtilityClass('MuiInputBase', slot);
16364
+ return generateUtilityClass$1('MuiInputBase', slot);
16166
16365
  }
16167
- const inputBaseClasses = generateUtilityClasses('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'readOnly', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);
16366
+ const inputBaseClasses = generateUtilityClasses$1('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'readOnly', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);
16168
16367
  var inputBaseClasses$1 = inputBaseClasses;
16169
16368
 
16170
16369
  const _excluded$u = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"];
@@ -16356,7 +16555,7 @@
16356
16555
  */
16357
16556
  const InputBase = /*#__PURE__*/reactExports.forwardRef(function InputBase(inProps, ref) {
16358
16557
  var _slotProps$input;
16359
- const props = useThemeProps({
16558
+ const props = useThemeProps$1({
16360
16559
  props: inProps,
16361
16560
  name: 'MuiInputBase'
16362
16561
  });
@@ -16604,9 +16803,9 @@
16604
16803
  var InputBase$1 = InputBase;
16605
16804
 
16606
16805
  function getOutlinedInputUtilityClass(slot) {
16607
- return generateUtilityClass('MuiOutlinedInput', slot);
16806
+ return generateUtilityClass$1('MuiOutlinedInput', slot);
16608
16807
  }
16609
- const outlinedInputClasses = _extends$6({}, inputBaseClasses$1, generateUtilityClasses('MuiOutlinedInput', ['root', 'notchedOutline', 'input']));
16808
+ const outlinedInputClasses = _extends$6({}, inputBaseClasses$1, generateUtilityClasses$1('MuiOutlinedInput', ['root', 'notchedOutline', 'input']));
16610
16809
  var outlinedInputClasses$1 = outlinedInputClasses;
16611
16810
 
16612
16811
  const _excluded$t = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
@@ -16728,9 +16927,9 @@
16728
16927
  var Fade$1 = Fade;
16729
16928
 
16730
16929
  function getBackdropUtilityClass(slot) {
16731
- return generateUtilityClass('MuiBackdrop', slot);
16930
+ return generateUtilityClass$1('MuiBackdrop', slot);
16732
16931
  }
16733
- generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);
16932
+ generateUtilityClasses$1('MuiBackdrop', ['root', 'invisible']);
16734
16933
 
16735
16934
  const _excluded$s = ["children", "className", "component", "components", "componentsProps", "invisible", "open", "slotProps", "slots", "TransitionComponent", "transitionDuration"];
16736
16935
  const useUtilityClasses$j = ownerState => {
@@ -16770,7 +16969,7 @@
16770
16969
  }));
16771
16970
  const Backdrop = /*#__PURE__*/reactExports.forwardRef(function Backdrop(inProps, ref) {
16772
16971
  var _slotProps$root, _ref, _slots$root;
16773
- const props = useThemeProps({
16972
+ const props = useThemeProps$1({
16774
16973
  props: inProps,
16775
16974
  name: 'MuiBackdrop'
16776
16975
  });
@@ -16812,10 +17011,15 @@
16812
17011
  });
16813
17012
  var Backdrop$1 = Backdrop;
16814
17013
 
17014
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
17015
+ function createUseThemeProps(name) {
17016
+ return useThemeProps$1;
17017
+ }
17018
+
16815
17019
  function getBadgeUtilityClass(slot) {
16816
- return generateUtilityClass('MuiBadge', slot);
17020
+ return generateUtilityClass$1('MuiBadge', slot);
16817
17021
  }
16818
- const badgeClasses = generateUtilityClasses('MuiBadge', ['root', 'badge', 'dot', 'standard', 'anchorOriginTopRight', 'anchorOriginBottomRight', 'anchorOriginTopLeft', 'anchorOriginBottomLeft', 'invisible', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'overlapRectangular', 'overlapCircular',
17022
+ const badgeClasses = generateUtilityClasses$1('MuiBadge', ['root', 'badge', 'dot', 'standard', 'anchorOriginTopRight', 'anchorOriginBottomRight', 'anchorOriginTopLeft', 'anchorOriginBottomLeft', 'invisible', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'overlapRectangular', 'overlapCircular',
16819
17023
  // TODO: v6 remove the overlap value from these class keys
16820
17024
  'anchorOriginTopLeftCircular', 'anchorOriginTopLeftRectangular', 'anchorOriginTopRightCircular', 'anchorOriginTopRightRectangular', 'anchorOriginBottomLeftCircular', 'anchorOriginBottomLeftRectangular', 'anchorOriginBottomRightCircular', 'anchorOriginBottomRightRectangular']);
16821
17025
  var badgeClasses$1 = badgeClasses;
@@ -16823,6 +17027,7 @@
16823
17027
  const _excluded$r = ["anchorOrigin", "className", "classes", "component", "components", "componentsProps", "children", "overlap", "color", "invisible", "max", "badgeContent", "slots", "slotProps", "showZero", "variant"];
16824
17028
  const RADIUS_STANDARD = 10;
16825
17029
  const RADIUS_DOT = 4;
17030
+ const useThemeProps = createUseThemeProps();
16826
17031
  const useUtilityClasses$i = ownerState => {
16827
17032
  const {
16828
17033
  color,
@@ -17119,7 +17324,7 @@
17119
17324
  });
17120
17325
  var Badge$1 = Badge;
17121
17326
 
17122
- const boxClasses = generateUtilityClasses('MuiBox', ['root']);
17327
+ const boxClasses = generateUtilityClasses$1('MuiBox', ['root']);
17123
17328
  var boxClasses$1 = boxClasses;
17124
17329
 
17125
17330
  const defaultTheme = createTheme();
@@ -17132,9 +17337,9 @@
17132
17337
  var Box$1 = Box;
17133
17338
 
17134
17339
  function getSwitchBaseUtilityClass(slot) {
17135
- return generateUtilityClass('PrivateSwitchBase', slot);
17340
+ return generateUtilityClass$1('PrivateSwitchBase', slot);
17136
17341
  }
17137
- generateUtilityClasses('PrivateSwitchBase', ['root', 'checked', 'disabled', 'input', 'edgeStart', 'edgeEnd']);
17342
+ generateUtilityClasses$1('PrivateSwitchBase', ['root', 'checked', 'disabled', 'input', 'edgeStart', 'edgeEnd']);
17138
17343
 
17139
17344
  const _excluded$q = ["autoFocus", "checked", "checkedIcon", "className", "defaultChecked", "disabled", "disableFocusRipple", "edge", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"];
17140
17345
  const useUtilityClasses$h = ownerState => {
@@ -17300,9 +17505,9 @@
17300
17505
  }), 'IndeterminateCheckBox');
17301
17506
 
17302
17507
  function getCheckboxUtilityClass(slot) {
17303
- return generateUtilityClass('MuiCheckbox', slot);
17508
+ return generateUtilityClass$1('MuiCheckbox', slot);
17304
17509
  }
17305
- const checkboxClasses = generateUtilityClasses('MuiCheckbox', ['root', 'checked', 'disabled', 'indeterminate', 'colorPrimary', 'colorSecondary', 'sizeSmall', 'sizeMedium']);
17510
+ const checkboxClasses = generateUtilityClasses$1('MuiCheckbox', ['root', 'checked', 'disabled', 'indeterminate', 'colorPrimary', 'colorSecondary', 'sizeSmall', 'sizeMedium']);
17306
17511
  var checkboxClasses$1 = checkboxClasses;
17307
17512
 
17308
17513
  const _excluded$p = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"];
@@ -17355,7 +17560,7 @@
17355
17560
  const defaultIndeterminateIcon = /*#__PURE__*/jsxRuntimeExports.jsx(IndeterminateCheckBoxIcon, {});
17356
17561
  const Checkbox = /*#__PURE__*/reactExports.forwardRef(function Checkbox(inProps, ref) {
17357
17562
  var _icon$props$fontSize, _indeterminateIcon$pr;
17358
- const props = useThemeProps({
17563
+ const props = useThemeProps$1({
17359
17564
  props: inProps,
17360
17565
  name: 'MuiCheckbox'
17361
17566
  });
@@ -17399,9 +17604,9 @@
17399
17604
  var Checkbox$1 = Checkbox;
17400
17605
 
17401
17606
  function getCircularProgressUtilityClass(slot) {
17402
- return generateUtilityClass('MuiCircularProgress', slot);
17607
+ return generateUtilityClass$1('MuiCircularProgress', slot);
17403
17608
  }
17404
- generateUtilityClasses('MuiCircularProgress', ['root', 'determinate', 'indeterminate', 'colorPrimary', 'colorSecondary', 'svg', 'circle', 'circleDeterminate', 'circleIndeterminate', 'circleDisableShrink']);
17609
+ generateUtilityClasses$1('MuiCircularProgress', ['root', 'determinate', 'indeterminate', 'colorPrimary', 'colorSecondary', 'svg', 'circle', 'circleDeterminate', 'circleIndeterminate', 'circleDisableShrink']);
17405
17610
 
17406
17611
  const _excluded$o = ["className", "color", "disableShrink", "size", "style", "thickness", "value", "variant"];
17407
17612
  let _ = t => t,
@@ -17513,7 +17718,7 @@
17513
17718
  * attribute to `true` on that region until it has finished loading.
17514
17719
  */
17515
17720
  const CircularProgress = /*#__PURE__*/reactExports.forwardRef(function CircularProgress(inProps, ref) {
17516
- const props = useThemeProps({
17721
+ const props = useThemeProps$1({
17517
17722
  props: inProps,
17518
17723
  name: 'MuiCircularProgress'
17519
17724
  });
@@ -17577,9 +17782,9 @@
17577
17782
  var CircularProgress$1 = CircularProgress;
17578
17783
 
17579
17784
  function getModalUtilityClass(slot) {
17580
- return generateUtilityClass('MuiModal', slot);
17785
+ return generateUtilityClass$1('MuiModal', slot);
17581
17786
  }
17582
- generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);
17787
+ generateUtilityClasses$1('MuiModal', ['root', 'hidden', 'backdrop']);
17583
17788
 
17584
17789
  const _excluded$n = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onTransitionEnter", "onTransitionExited", "open", "slotProps", "slots", "theme"];
17585
17790
  const useUtilityClasses$e = ownerState => {
@@ -17641,7 +17846,7 @@
17641
17846
  */
17642
17847
  const Modal = /*#__PURE__*/reactExports.forwardRef(function Modal(inProps, ref) {
17643
17848
  var _ref, _slots$root, _ref2, _slots$backdrop, _slotProps$root, _slotProps$backdrop;
17644
- const props = useThemeProps({
17849
+ const props = useThemeProps$1({
17645
17850
  name: 'MuiModal',
17646
17851
  props: inProps
17647
17852
  });
@@ -17767,9 +17972,9 @@
17767
17972
  var Modal$1 = Modal;
17768
17973
 
17769
17974
  function getDividerUtilityClass(slot) {
17770
- return generateUtilityClass('MuiDivider', slot);
17975
+ return generateUtilityClass$1('MuiDivider', slot);
17771
17976
  }
17772
- const dividerClasses = generateUtilityClasses('MuiDivider', ['root', 'absolute', 'fullWidth', 'inset', 'middle', 'flexItem', 'light', 'vertical', 'withChildren', 'withChildrenVertical', 'textAlignRight', 'textAlignLeft', 'wrapper', 'wrapperVertical']);
17977
+ const dividerClasses = generateUtilityClasses$1('MuiDivider', ['root', 'absolute', 'fullWidth', 'inset', 'middle', 'flexItem', 'light', 'vertical', 'withChildren', 'withChildrenVertical', 'textAlignRight', 'textAlignLeft', 'wrapper', 'wrapperVertical']);
17773
17978
  var dividerClasses$1 = dividerClasses;
17774
17979
 
17775
17980
  const _excluded$m = ["absolute", "children", "className", "component", "flexItem", "light", "orientation", "role", "textAlign", "variant"];
@@ -17898,7 +18103,7 @@
17898
18103
  paddingBottom: `calc(${theme.spacing(1)} * 1.2)`
17899
18104
  }));
17900
18105
  const Divider = /*#__PURE__*/reactExports.forwardRef(function Divider(inProps, ref) {
17901
- const props = useThemeProps({
18106
+ const props = useThemeProps$1({
17902
18107
  props: inProps,
17903
18108
  name: 'MuiDivider'
17904
18109
  });
@@ -17954,7 +18159,7 @@
17954
18159
  slot: 'Root',
17955
18160
  overridesResolver: (props, styles) => styles.root
17956
18161
  }),
17957
- useThemeProps: inProps => useThemeProps({
18162
+ useThemeProps: inProps => useThemeProps$1({
17958
18163
  props: inProps,
17959
18164
  name: 'MuiStack'
17960
18165
  })
@@ -17962,9 +18167,9 @@
17962
18167
  var Stack$1 = Stack;
17963
18168
 
17964
18169
  function getFormControlLabelUtilityClasses(slot) {
17965
- return generateUtilityClass('MuiFormControlLabel', slot);
18170
+ return generateUtilityClass$1('MuiFormControlLabel', slot);
17966
18171
  }
17967
- const formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error', 'required', 'asterisk']);
18172
+ const formControlLabelClasses = generateUtilityClasses$1('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error', 'required', 'asterisk']);
17968
18173
  var formControlLabelClasses$1 = formControlLabelClasses;
17969
18174
 
17970
18175
  const _excluded$l = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slotProps", "value"];
@@ -18046,7 +18251,7 @@
18046
18251
  */
18047
18252
  const FormControlLabel = /*#__PURE__*/reactExports.forwardRef(function FormControlLabel(inProps, ref) {
18048
18253
  var _ref, _slotProps$typography;
18049
- const props = useThemeProps({
18254
+ const props = useThemeProps$1({
18050
18255
  props: inProps,
18051
18256
  name: 'MuiFormControlLabel'
18052
18257
  });
@@ -18121,13 +18326,13 @@
18121
18326
  var GridContext$1 = GridContext;
18122
18327
 
18123
18328
  function getGridUtilityClass(slot) {
18124
- return generateUtilityClass('MuiGrid', slot);
18329
+ return generateUtilityClass$1('MuiGrid', slot);
18125
18330
  }
18126
18331
  const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
18127
18332
  const DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
18128
18333
  const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
18129
18334
  const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
18130
- const gridClasses = generateUtilityClasses('MuiGrid', ['root', 'container', 'item', 'zeroMinWidth',
18335
+ const gridClasses = generateUtilityClasses$1('MuiGrid', ['root', 'container', 'item', 'zeroMinWidth',
18131
18336
  // spacings
18132
18337
  ...SPACINGS.map(spacing => `spacing-xs-${spacing}`),
18133
18338
  // direction values
@@ -18476,7 +18681,7 @@
18476
18681
  return composeClasses(slots, getGridUtilityClass, classes);
18477
18682
  };
18478
18683
  const Grid = /*#__PURE__*/reactExports.forwardRef(function Grid(inProps, ref) {
18479
- const themeProps = useThemeProps({
18684
+ const themeProps = useThemeProps$1({
18480
18685
  props: inProps,
18481
18686
  name: 'MuiGrid'
18482
18687
  });
@@ -18583,7 +18788,7 @@
18583
18788
  TransitionComponent = Transition$1
18584
18789
  } = props,
18585
18790
  other = _objectWithoutPropertiesLoose$3(props, _excluded$j);
18586
- const timer = reactExports.useRef();
18791
+ const timer = useTimeout();
18587
18792
  const autoTimeout = reactExports.useRef();
18588
18793
  const theme = useTheme$1();
18589
18794
  const nodeRef = reactExports.useRef(null);
@@ -18672,18 +18877,13 @@
18672
18877
  const handleExited = normalizedTransitionCallback(onExited);
18673
18878
  const handleAddEndListener = next => {
18674
18879
  if (timeout === 'auto') {
18675
- timer.current = setTimeout(next, autoTimeout.current || 0);
18880
+ timer.start(autoTimeout.current || 0, next);
18676
18881
  }
18677
18882
  if (addEndListener) {
18678
18883
  // Old call signature before `react-transition-group` implemented `nodeRef`
18679
18884
  addEndListener(nodeRef.current, next);
18680
18885
  }
18681
18886
  };
18682
- reactExports.useEffect(() => {
18683
- return () => {
18684
- clearTimeout(timer.current);
18685
- };
18686
- }, []);
18687
18887
  return /*#__PURE__*/jsxRuntimeExports.jsx(TransitionComponent, _extends$6({
18688
18888
  appear: appear,
18689
18889
  in: inProp,
@@ -18713,9 +18913,9 @@
18713
18913
  var Grow$1 = Grow;
18714
18914
 
18715
18915
  function getIconUtilityClass(slot) {
18716
- return generateUtilityClass('MuiIcon', slot);
18916
+ return generateUtilityClass$1('MuiIcon', slot);
18717
18917
  }
18718
- generateUtilityClasses('MuiIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
18918
+ generateUtilityClasses$1('MuiIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
18719
18919
 
18720
18920
  const _excluded$i = ["baseClassName", "className", "color", "component", "fontSize"];
18721
18921
  const useUtilityClasses$a = ownerState => {
@@ -18773,7 +18973,7 @@
18773
18973
  }[ownerState.color]
18774
18974
  }));
18775
18975
  const Icon = /*#__PURE__*/reactExports.forwardRef(function Icon(inProps, ref) {
18776
- const props = useThemeProps({
18976
+ const props = useThemeProps$1({
18777
18977
  props: inProps,
18778
18978
  name: 'MuiIcon'
18779
18979
  });
@@ -18807,9 +19007,9 @@
18807
19007
  var Icon$1 = Icon;
18808
19008
 
18809
19009
  function getInputAdornmentUtilityClass(slot) {
18810
- return generateUtilityClass('MuiInputAdornment', slot);
19010
+ return generateUtilityClass$1('MuiInputAdornment', slot);
18811
19011
  }
18812
- const inputAdornmentClasses = generateUtilityClasses('MuiInputAdornment', ['root', 'filled', 'standard', 'outlined', 'positionStart', 'positionEnd', 'disablePointerEvents', 'hiddenLabel', 'sizeSmall']);
19012
+ const inputAdornmentClasses = generateUtilityClasses$1('MuiInputAdornment', ['root', 'filled', 'standard', 'outlined', 'positionStart', 'positionEnd', 'disablePointerEvents', 'hiddenLabel', 'sizeSmall']);
18813
19013
  var inputAdornmentClasses$1 = inputAdornmentClasses;
18814
19014
 
18815
19015
  var _span$1;
@@ -18865,7 +19065,7 @@
18865
19065
  pointerEvents: 'none'
18866
19066
  }));
18867
19067
  const InputAdornment = /*#__PURE__*/reactExports.forwardRef(function InputAdornment(inProps, ref) {
18868
- const props = useThemeProps({
19068
+ const props = useThemeProps$1({
18869
19069
  props: inProps,
18870
19070
  name: 'MuiInputAdornment'
18871
19071
  });
@@ -18922,9 +19122,9 @@
18922
19122
  var ListContext$1 = ListContext;
18923
19123
 
18924
19124
  function getListUtilityClass(slot) {
18925
- return generateUtilityClass('MuiList', slot);
19125
+ return generateUtilityClass$1('MuiList', slot);
18926
19126
  }
18927
- generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);
19127
+ generateUtilityClasses$1('MuiList', ['root', 'padding', 'dense', 'subheader']);
18928
19128
 
18929
19129
  const _excluded$g = ["children", "className", "component", "dense", "disablePadding", "subheader"];
18930
19130
  const useUtilityClasses$8 = ownerState => {
@@ -18962,7 +19162,7 @@
18962
19162
  paddingTop: 0
18963
19163
  }));
18964
19164
  const List = /*#__PURE__*/reactExports.forwardRef(function List(inProps, ref) {
18965
- const props = useThemeProps({
19165
+ const props = useThemeProps$1({
18966
19166
  props: inProps,
18967
19167
  name: 'MuiList'
18968
19168
  });
@@ -18999,18 +19199,18 @@
18999
19199
  var List$1 = List;
19000
19200
 
19001
19201
  function getListItemUtilityClass(slot) {
19002
- return generateUtilityClass('MuiListItem', slot);
19202
+ return generateUtilityClass$1('MuiListItem', slot);
19003
19203
  }
19004
- const listItemClasses = generateUtilityClasses('MuiListItem', ['root', 'container', 'focusVisible', 'dense', 'alignItemsFlexStart', 'disabled', 'divider', 'gutters', 'padding', 'button', 'secondaryAction', 'selected']);
19204
+ const listItemClasses = generateUtilityClasses$1('MuiListItem', ['root', 'container', 'focusVisible', 'dense', 'alignItemsFlexStart', 'disabled', 'divider', 'gutters', 'padding', 'button', 'secondaryAction', 'selected']);
19005
19205
  var listItemClasses$1 = listItemClasses;
19006
19206
 
19007
- const listItemButtonClasses = generateUtilityClasses('MuiListItemButton', ['root', 'focusVisible', 'dense', 'alignItemsFlexStart', 'disabled', 'divider', 'gutters', 'selected']);
19207
+ const listItemButtonClasses = generateUtilityClasses$1('MuiListItemButton', ['root', 'focusVisible', 'dense', 'alignItemsFlexStart', 'disabled', 'divider', 'gutters', 'selected']);
19008
19208
  var listItemButtonClasses$1 = listItemButtonClasses;
19009
19209
 
19010
19210
  function getListItemSecondaryActionClassesUtilityClass(slot) {
19011
- return generateUtilityClass('MuiListItemSecondaryAction', slot);
19211
+ return generateUtilityClass$1('MuiListItemSecondaryAction', slot);
19012
19212
  }
19013
- generateUtilityClasses('MuiListItemSecondaryAction', ['root', 'disableGutters']);
19213
+ generateUtilityClasses$1('MuiListItemSecondaryAction', ['root', 'disableGutters']);
19014
19214
 
19015
19215
  const _excluded$f = ["className"];
19016
19216
  const useUtilityClasses$7 = ownerState => {
@@ -19047,7 +19247,7 @@
19047
19247
  * Must be used as the last child of ListItem to function properly.
19048
19248
  */
19049
19249
  const ListItemSecondaryAction = /*#__PURE__*/reactExports.forwardRef(function ListItemSecondaryAction(inProps, ref) {
19050
- const props = useThemeProps({
19250
+ const props = useThemeProps$1({
19051
19251
  props: inProps,
19052
19252
  name: 'MuiListItemSecondaryAction'
19053
19253
  });
@@ -19183,7 +19383,7 @@
19183
19383
  * Uses an additional container component if `ListItemSecondaryAction` is the last child.
19184
19384
  */
19185
19385
  const ListItem = /*#__PURE__*/reactExports.forwardRef(function ListItem(inProps, ref) {
19186
- const props = useThemeProps({
19386
+ const props = useThemeProps$1({
19187
19387
  props: inProps,
19188
19388
  name: 'MuiListItem'
19189
19389
  });
@@ -19305,9 +19505,9 @@
19305
19505
  var ListItem$1 = ListItem;
19306
19506
 
19307
19507
  function getListItemIconUtilityClass(slot) {
19308
- return generateUtilityClass('MuiListItemIcon', slot);
19508
+ return generateUtilityClass$1('MuiListItemIcon', slot);
19309
19509
  }
19310
- const listItemIconClasses = generateUtilityClasses('MuiListItemIcon', ['root', 'alignItemsFlexStart']);
19510
+ const listItemIconClasses = generateUtilityClasses$1('MuiListItemIcon', ['root', 'alignItemsFlexStart']);
19311
19511
  var listItemIconClasses$1 = listItemIconClasses;
19312
19512
 
19313
19513
  const _excluded$d = ["className"];
@@ -19346,7 +19546,7 @@
19346
19546
  * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.
19347
19547
  */
19348
19548
  const ListItemIcon = /*#__PURE__*/reactExports.forwardRef(function ListItemIcon(inProps, ref) {
19349
- const props = useThemeProps({
19549
+ const props = useThemeProps$1({
19350
19550
  props: inProps,
19351
19551
  name: 'MuiListItemIcon'
19352
19552
  });
@@ -19367,7 +19567,7 @@
19367
19567
  });
19368
19568
  var ListItemIcon$1 = ListItemIcon;
19369
19569
 
19370
- const listItemTextClasses = generateUtilityClasses('MuiListItemText', ['root', 'multiline', 'dense', 'inset', 'primary', 'secondary']);
19570
+ const listItemTextClasses = generateUtilityClasses$1('MuiListItemText', ['root', 'multiline', 'dense', 'inset', 'primary', 'secondary']);
19371
19571
  var listItemTextClasses$1 = listItemTextClasses;
19372
19572
 
19373
19573
  const _excluded$c = ["actions", "autoFocus", "autoFocusItem", "children", "className", "disabledItemsFocusable", "disableListWrap", "onKeyDown", "variant"];
@@ -19591,9 +19791,9 @@
19591
19791
  var MenuList$1 = MenuList;
19592
19792
 
19593
19793
  function getPopoverUtilityClass(slot) {
19594
- return generateUtilityClass('MuiPopover', slot);
19794
+ return generateUtilityClass$1('MuiPopover', slot);
19595
19795
  }
19596
- generateUtilityClasses('MuiPopover', ['root', 'paper']);
19796
+ generateUtilityClasses$1('MuiPopover', ['root', 'paper']);
19597
19797
 
19598
19798
  const _excluded$b = ["onEntering"],
19599
19799
  _excluded2$1 = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps", "disableScrollLock"],
@@ -19660,7 +19860,7 @@
19660
19860
  });
19661
19861
  const Popover = /*#__PURE__*/reactExports.forwardRef(function Popover(inProps, ref) {
19662
19862
  var _slotProps$paper, _slots$root, _slots$paper;
19663
- const props = useThemeProps({
19863
+ const props = useThemeProps$1({
19664
19864
  props: inProps,
19665
19865
  name: 'MuiPopover'
19666
19866
  });
@@ -19915,9 +20115,9 @@
19915
20115
  var Popover$1 = Popover;
19916
20116
 
19917
20117
  function getMenuItemUtilityClass(slot) {
19918
- return generateUtilityClass('MuiMenuItem', slot);
20118
+ return generateUtilityClass$1('MuiMenuItem', slot);
19919
20119
  }
19920
- const menuItemClasses = generateUtilityClasses('MuiMenuItem', ['root', 'focusVisible', 'dense', 'disabled', 'divider', 'gutters', 'selected']);
20120
+ const menuItemClasses = generateUtilityClasses$1('MuiMenuItem', ['root', 'focusVisible', 'dense', 'disabled', 'divider', 'gutters', 'selected']);
19921
20121
  var menuItemClasses$1 = menuItemClasses;
19922
20122
 
19923
20123
  const _excluded$a = ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex", "className"];
@@ -20027,7 +20227,7 @@
20027
20227
  }
20028
20228
  })));
20029
20229
  const MenuItem = /*#__PURE__*/reactExports.forwardRef(function MenuItem(inProps, ref) {
20030
- const props = useThemeProps({
20230
+ const props = useThemeProps$1({
20031
20231
  props: inProps,
20032
20232
  name: 'MuiMenuItem'
20033
20233
  });
@@ -20291,7 +20491,7 @@
20291
20491
  }));
20292
20492
  const OutlinedInput = /*#__PURE__*/reactExports.forwardRef(function OutlinedInput(inProps, ref) {
20293
20493
  var _ref, _slots$root, _ref2, _slots$input, _React$Fragment;
20294
- const props = useThemeProps({
20494
+ const props = useThemeProps$1({
20295
20495
  props: inProps,
20296
20496
  name: 'MuiOutlinedInput'
20297
20497
  });
@@ -20429,9 +20629,9 @@
20429
20629
  }
20430
20630
 
20431
20631
  function getRadioUtilityClass(slot) {
20432
- return generateUtilityClass('MuiRadio', slot);
20632
+ return generateUtilityClass$1('MuiRadio', slot);
20433
20633
  }
20434
- const radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);
20634
+ const radioClasses = generateUtilityClasses$1('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);
20435
20635
 
20436
20636
  const _excluded$7 = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size", "className"];
20437
20637
  const useUtilityClasses$1 = ownerState => {
@@ -20491,7 +20691,7 @@
20491
20691
  const defaultIcon = /*#__PURE__*/jsxRuntimeExports.jsx(RadioButtonIcon, {});
20492
20692
  const Radio = /*#__PURE__*/reactExports.forwardRef(function Radio(inProps, ref) {
20493
20693
  var _defaultIcon$props$fo, _defaultCheckedIcon$p;
20494
- const props = useThemeProps({
20694
+ const props = useThemeProps$1({
20495
20695
  props: inProps,
20496
20696
  name: 'MuiRadio'
20497
20697
  });
@@ -20543,9 +20743,9 @@
20543
20743
  var Radio$1 = Radio;
20544
20744
 
20545
20745
  function getTooltipUtilityClass(slot) {
20546
- return generateUtilityClass('MuiTooltip', slot);
20746
+ return generateUtilityClass$1('MuiTooltip', slot);
20547
20747
  }
20548
- const tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);
20748
+ const tooltipClasses = generateUtilityClasses$1('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);
20549
20749
  var tooltipClasses$1 = tooltipClasses;
20550
20750
 
20551
20751
  const _excluded$6 = ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"];
@@ -20720,7 +20920,7 @@
20720
20920
  }
20721
20921
  }));
20722
20922
  let hystersisOpen = false;
20723
- let hystersisTimer = null;
20923
+ const hystersisTimer = new Timeout();
20724
20924
  let cursorPosition = {
20725
20925
  x: 0,
20726
20926
  y: 0
@@ -20737,7 +20937,7 @@
20737
20937
  // TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.
20738
20938
  const Tooltip = /*#__PURE__*/reactExports.forwardRef(function Tooltip(inProps, ref) {
20739
20939
  var _ref, _slots$popper, _ref2, _ref3, _slots$transition, _ref4, _slots$tooltip, _ref5, _slots$arrow, _slotProps$popper, _ref6, _slotProps$popper2, _slotProps$transition, _slotProps$tooltip, _ref7, _slotProps$tooltip2, _slotProps$arrow, _ref8, _slotProps$arrow2;
20740
- const props = useThemeProps({
20940
+ const props = useThemeProps$1({
20741
20941
  props: inProps,
20742
20942
  name: 'MuiTooltip'
20743
20943
  });
@@ -20782,10 +20982,10 @@
20782
20982
  const [arrowRef, setArrowRef] = reactExports.useState(null);
20783
20983
  const ignoreNonTouchEvents = reactExports.useRef(false);
20784
20984
  const disableInteractive = disableInteractiveProp || followCursor;
20785
- const closeTimer = reactExports.useRef();
20786
- const enterTimer = reactExports.useRef();
20787
- const leaveTimer = reactExports.useRef();
20788
- const touchTimer = reactExports.useRef();
20985
+ const closeTimer = useTimeout();
20986
+ const enterTimer = useTimeout();
20987
+ const leaveTimer = useTimeout();
20988
+ const touchTimer = useTimeout();
20789
20989
  const [openState, setOpenState] = useControlled({
20790
20990
  controlled: openProp,
20791
20991
  default: false,
@@ -20795,23 +20995,16 @@
20795
20995
  let open = openState;
20796
20996
  const id = useId(idProp);
20797
20997
  const prevUserSelect = reactExports.useRef();
20798
- const stopTouchInteraction = reactExports.useCallback(() => {
20998
+ const stopTouchInteraction = useEventCallback(() => {
20799
20999
  if (prevUserSelect.current !== undefined) {
20800
21000
  document.body.style.WebkitUserSelect = prevUserSelect.current;
20801
21001
  prevUserSelect.current = undefined;
20802
21002
  }
20803
- clearTimeout(touchTimer.current);
20804
- }, []);
20805
- reactExports.useEffect(() => {
20806
- return () => {
20807
- clearTimeout(closeTimer.current);
20808
- clearTimeout(enterTimer.current);
20809
- clearTimeout(leaveTimer.current);
20810
- stopTouchInteraction();
20811
- };
20812
- }, [stopTouchInteraction]);
21003
+ touchTimer.clear();
21004
+ });
21005
+ reactExports.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);
20813
21006
  const handleOpen = event => {
20814
- clearTimeout(hystersisTimer);
21007
+ hystersisTimer.clear();
20815
21008
  hystersisOpen = true;
20816
21009
 
20817
21010
  // The mouseover event will trigger for every nested element in the tooltip.
@@ -20827,18 +21020,16 @@
20827
21020
  * @param {React.SyntheticEvent | Event} event
20828
21021
  */
20829
21022
  event => {
20830
- clearTimeout(hystersisTimer);
20831
- hystersisTimer = setTimeout(() => {
21023
+ hystersisTimer.start(800 + leaveDelay, () => {
20832
21024
  hystersisOpen = false;
20833
- }, 800 + leaveDelay);
21025
+ });
20834
21026
  setOpenState(false);
20835
21027
  if (onClose && open) {
20836
21028
  onClose(event);
20837
21029
  }
20838
- clearTimeout(closeTimer.current);
20839
- closeTimer.current = setTimeout(() => {
21030
+ closeTimer.start(theme.transitions.duration.shortest, () => {
20840
21031
  ignoreNonTouchEvents.current = false;
20841
- }, theme.transitions.duration.shortest);
21032
+ });
20842
21033
  });
20843
21034
  const handleEnter = event => {
20844
21035
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
@@ -20851,22 +21042,21 @@
20851
21042
  if (childNode) {
20852
21043
  childNode.removeAttribute('title');
20853
21044
  }
20854
- clearTimeout(enterTimer.current);
20855
- clearTimeout(leaveTimer.current);
21045
+ enterTimer.clear();
21046
+ leaveTimer.clear();
20856
21047
  if (enterDelay || hystersisOpen && enterNextDelay) {
20857
- enterTimer.current = setTimeout(() => {
21048
+ enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {
20858
21049
  handleOpen(event);
20859
- }, hystersisOpen ? enterNextDelay : enterDelay);
21050
+ });
20860
21051
  } else {
20861
21052
  handleOpen(event);
20862
21053
  }
20863
21054
  };
20864
21055
  const handleLeave = event => {
20865
- clearTimeout(enterTimer.current);
20866
- clearTimeout(leaveTimer.current);
20867
- leaveTimer.current = setTimeout(() => {
21056
+ enterTimer.clear();
21057
+ leaveTimer.start(leaveDelay, () => {
20868
21058
  handleClose(event);
20869
- }, leaveDelay);
21059
+ });
20870
21060
  };
20871
21061
  const {
20872
21062
  isFocusVisibleRef,
@@ -20908,26 +21098,25 @@
20908
21098
  const handleMouseLeave = handleLeave;
20909
21099
  const handleTouchStart = event => {
20910
21100
  detectTouchStart(event);
20911
- clearTimeout(leaveTimer.current);
20912
- clearTimeout(closeTimer.current);
21101
+ leaveTimer.clear();
21102
+ closeTimer.clear();
20913
21103
  stopTouchInteraction();
20914
21104
  prevUserSelect.current = document.body.style.WebkitUserSelect;
20915
21105
  // Prevent iOS text selection on long-tap.
20916
21106
  document.body.style.WebkitUserSelect = 'none';
20917
- touchTimer.current = setTimeout(() => {
21107
+ touchTimer.start(enterTouchDelay, () => {
20918
21108
  document.body.style.WebkitUserSelect = prevUserSelect.current;
20919
21109
  handleEnter(event);
20920
- }, enterTouchDelay);
21110
+ });
20921
21111
  };
20922
21112
  const handleTouchEnd = event => {
20923
21113
  if (children.props.onTouchEnd) {
20924
21114
  children.props.onTouchEnd(event);
20925
21115
  }
20926
21116
  stopTouchInteraction();
20927
- clearTimeout(leaveTimer.current);
20928
- leaveTimer.current = setTimeout(() => {
21117
+ leaveTimer.start(leaveTouchDelay, () => {
20929
21118
  handleClose(event);
20930
- }, leaveTouchDelay);
21119
+ });
20931
21120
  };
20932
21121
  reactExports.useEffect(() => {
20933
21122
  if (!open) {
@@ -21426,6 +21615,7 @@
21426
21615
  var Lock = (props => SvgIcon(lock(props)));
21427
21616
 
21428
21617
  const unlock = props => _objectSpread2(_objectSpread2({}, props), {}, {
21618
+ viewBox: '0 0 12 16',
21429
21619
  shapes: [{
21430
21620
  type: 'path',
21431
21621
  attrs: {
@@ -23463,12 +23653,13 @@
23463
23653
  flexGrow: 1,
23464
23654
  paddingLeft: isRtl ? 8 : checkboxes ? 0 : undefined,
23465
23655
  paddingRight: checkboxes ? 0 : isRtl ? 8 : 0,
23466
- justifyContent: valueTextAlign
23656
+ justifyContent: valueTextAlign,
23657
+ textAlign: valueTextAlign
23467
23658
  };
23468
23659
  const isFirstElement = index === 0;
23469
- const showLock = isSelected && isLocked;
23470
- const showTick = !checkboxes && isSelected && !isLocked;
23471
- const showIcon = !checkboxes && sizePermitsTickOrLock;
23660
+ const showLockIcon = isSelected && isLocked;
23661
+ const showTickIcon = !checkboxes && isSelected && !isLocked;
23662
+ const showAnyIcon = !checkboxes && sizePermitsTickOrLock;
23472
23663
  const cellPaddingRight = checkboxes || !sizePermitsTickOrLock;
23473
23664
  const ariaLabel = getValueLabel({
23474
23665
  translator,
@@ -23564,13 +23755,13 @@
23564
23755
  checkboxes: checkboxes,
23565
23756
  dense: dense,
23566
23757
  showGray: showGray
23567
- }), showIcon && /*#__PURE__*/React.createElement(Grid$1, {
23758
+ }), showAnyIcon && /*#__PURE__*/React.createElement(Grid$1, {
23568
23759
  item: true,
23569
23760
  className: rowColClasses.icon
23570
- }, showLock && /*#__PURE__*/React.createElement(Lock, {
23761
+ }, showLockIcon && /*#__PURE__*/React.createElement(Lock, {
23571
23762
  style: iconStyles,
23572
23763
  size: "small"
23573
- }), showTick && /*#__PURE__*/React.createElement(Tick, {
23764
+ }), showTickIcon && /*#__PURE__*/React.createElement(Tick, {
23574
23765
  style: iconStyles,
23575
23766
  size: "small"
23576
23767
  }))));
@@ -25754,10 +25945,9 @@
25754
25945
  var default_1 = Close.default = void 0;
25755
25946
  var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
25756
25947
  var _jsxRuntime = jsxRuntimeExports;
25757
- var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
25948
+ default_1 = Close.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
25758
25949
  d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
25759
25950
  }), 'Close');
25760
- default_1 = Close.default = _default;
25761
25951
 
25762
25952
  const RootContainer = styled(Paper$1)(_ref => {
25763
25953
  let {
@@ -26485,6 +26675,7 @@
26485
26675
  function useDefaultSelectionActions(_ref) {
26486
26676
  let {
26487
26677
  api,
26678
+ layout,
26488
26679
  onConfirm = () => {},
26489
26680
  onCancel = () => {},
26490
26681
  onKeyDeactivate = () => {}
@@ -26496,14 +26687,14 @@
26496
26687
  key: 'clear',
26497
26688
  type: 'icon-button',
26498
26689
  label: translator.get('Selection.Clear'),
26499
- enabled: () => api.canClear(),
26690
+ enabled: () => api.canClear(layout),
26500
26691
  action: () => api.clear(),
26501
26692
  getSvgIconShape: clearSelections
26502
26693
  }, {
26503
26694
  key: 'cancel',
26504
26695
  type: 'icon-button',
26505
26696
  label: translator.get('Selection.Cancel'),
26506
- enabled: () => api.canCancel(),
26697
+ enabled: () => api.canCancel(layout),
26507
26698
  action: () => {
26508
26699
  onCancel();
26509
26700
  api.cancel();
@@ -26518,7 +26709,7 @@
26518
26709
  key: 'confirm',
26519
26710
  type: 'icon-button',
26520
26711
  label: translator.get('Selection.Confirm'),
26521
- enabled: () => api.canConfirm(),
26712
+ enabled: () => api.canConfirm(layout),
26522
26713
  action: () => {
26523
26714
  onConfirm();
26524
26715
  api.confirm();
@@ -26623,7 +26814,7 @@
26623
26814
  }), /*#__PURE__*/React.createElement(MenuList$1, {
26624
26815
  id: "moreMenuList"
26625
26816
  }, actions.map((item, ix) =>
26626
-
26817
+ /*#__PURE__*/
26627
26818
  // eslint-disable-next-line react/no-array-index-key
26628
26819
  React.createElement(MoreItem, {
26629
26820
  key: ix,
@@ -26653,7 +26844,8 @@
26653
26844
  keyboardNavigation,
26654
26845
  focusHandler,
26655
26846
  getEnabledButton,
26656
- selections
26847
+ selections,
26848
+ isRtl
26657
26849
  } = _ref;
26658
26850
  const handleActionsKeyDown = evt => {
26659
26851
  const {
@@ -26672,7 +26864,8 @@
26672
26864
  const isActionButton = target.classList.contains('njs-cell-action');
26673
26865
  if (isActionButton) {
26674
26866
  const index = getActionButtonIndex(target);
26675
- const pressedLeft = [KEYS.ARROW_LEFT, KEYS.ARROW_DOWN].includes(keyCode);
26867
+ let pressedLeft = [KEYS.ARROW_LEFT, KEYS.ARROW_DOWN].includes(keyCode);
26868
+ pressedLeft = isRtl ? !pressedLeft : pressedLeft; // invert direction when using RTL
26676
26869
  focusButton(pressedLeft ? index - 1 : index + 1);
26677
26870
  }
26678
26871
  evt.stopPropagation();
@@ -26777,6 +26970,7 @@
26777
26970
  onConfirm: () => {},
26778
26971
  onCancel: () => {}
26779
26972
  },
26973
+ extraItems,
26780
26974
  more: more$1 = {
26781
26975
  enabled: false,
26782
26976
  actions: [],
@@ -26791,10 +26985,13 @@
26791
26985
  focusHandler = null,
26792
26986
  actionsRefMock = null,
26793
26987
  // for testing
26794
- direction = 'ltr',
26795
- autoConfirm = false
26988
+ isRtl,
26989
+ autoConfirm = false,
26990
+ layout
26796
26991
  } = _ref3;
26797
- const defaultSelectionActions = useDefaultSelectionActions(selections);
26992
+ const defaultSelectionActions = useDefaultSelectionActions(_objectSpread2(_objectSpread2({}, selections), {}, {
26993
+ layout
26994
+ }));
26798
26995
  const {
26799
26996
  translator,
26800
26997
  keyboardNavigation
@@ -26820,8 +27017,9 @@
26820
27017
  keyboardNavigation,
26821
27018
  focusHandler,
26822
27019
  getEnabledButton,
26823
- selections
26824
- }), [keyboardNavigation, focusHandler, getEnabledButton, selections]);
27020
+ selections,
27021
+ isRtl
27022
+ }), [keyboardNavigation, focusHandler, getEnabledButton, selections, isRtl]);
26825
27023
  reactExports.useEffect(() => () => {
26826
27024
  setShowMoreItems(false);
26827
27025
  }, [popover.show, show, selections.show]);
@@ -26829,11 +27027,11 @@
26829
27027
  if (!focusHandler) return;
26830
27028
  const focusFirst = () => {
26831
27029
  const enabledButton = getEnabledButton(false);
26832
- enabledButton && enabledButton.focus();
27030
+ enabledButton === null || enabledButton === void 0 || enabledButton.focus();
26833
27031
  };
26834
27032
  const focusLast = () => {
26835
27033
  const enabledButton = getEnabledButton(true);
26836
- enabledButton && enabledButton.focus();
27034
+ enabledButton === null || enabledButton === void 0 || enabledButton.focus();
26837
27035
  };
26838
27036
  focusHandler.on('focus_toolbar_first', focusFirst);
26839
27037
  focusHandler.on('focus_toolbar_last', focusLast);
@@ -26867,7 +27065,6 @@
26867
27065
  const showActions = newActions.length > 0;
26868
27066
  const showMore = moreActions.length > 0;
26869
27067
  const showDivider = showActions && selections.show || showMore && selections.show;
26870
- const isRtl = direction === 'rtl';
26871
27068
  const Actions = /*#__PURE__*/React.createElement(Grid$1, {
26872
27069
  ref: actionsRef,
26873
27070
  onKeyDown: handleActionsKeyDown,
@@ -26879,7 +27076,11 @@
26879
27076
  sx: {
26880
27077
  flexDirection: isRtl ? 'row-reverse' : 'row'
26881
27078
  }
26882
- }, showActions && /*#__PURE__*/React.createElement(ActionsGroup, {
27079
+ }, (extraItems === null || extraItems === void 0 ? void 0 : extraItems.length) && /*#__PURE__*/React.createElement(ActionsGroup, {
27080
+ className: "actions-toolbar-extra-actions",
27081
+ actions: extraItems,
27082
+ isRtl: isRtl
27083
+ }), showActions && /*#__PURE__*/React.createElement(ActionsGroup, {
26883
27084
  actions: newActions
26884
27085
  }), showMore && /*#__PURE__*/React.createElement(ActionsGroup, {
26885
27086
  id: "actions-toolbar-show-more",
@@ -27081,7 +27282,7 @@
27081
27282
  };
27082
27283
  function focusRow(container) {
27083
27284
  const row = (container === null || container === void 0 ? void 0 : container.querySelector('.last-focused')) || (container === null || container === void 0 ? void 0 : container.querySelector('[role="row"]:first-child'));
27084
- row.setAttribute('tabIndex', 0);
27285
+ row === null || row === void 0 || row.setAttribute('tabIndex', 0);
27085
27286
  row === null || row === void 0 || row.focus();
27086
27287
  }
27087
27288
  const onKeyDown = async e => {
@@ -29601,6 +29802,11 @@
29601
29802
  const color = getContrastingColor('#fff', desiredTextColor);
29602
29803
  return color;
29603
29804
  }
29805
+ function getSearchBGColor(bgCol, getListboxStyle) {
29806
+ const searchBgColorObj = new Color(getListboxStyle('', 'backgroundColor'));
29807
+ searchBgColorObj.setAlpha(0.7);
29808
+ return searchBgColorObj.isInvalid() ? bgCol : searchBgColorObj.toRGBA();
29809
+ }
29604
29810
  function getStyles(_ref3) {
29605
29811
  var _themeOverrides$heade, _themeOverrides$backg, _themeOverrides$heade2, _themeOverrides$conte, _themeOverrides$heade3, _themeOverrides$heade4, _themeOverrides$conte2, _themeOverrides$conte3;
29606
29812
  let {
@@ -29629,7 +29835,8 @@
29629
29835
  const bgImage = (_themeOverrides$backg = themeOverrides.background) !== null && _themeOverrides$backg !== void 0 && _themeOverrides$backg.image ? resolveBgImage({
29630
29836
  bgImage: themeOverrides.background.image
29631
29837
  }, app) : undefined;
29632
- const searchBgColor = 'rgba(255, 255, 255, 0.7)';
29838
+ const bgColor = bgComponentColor || getListboxStyle('', 'backgroundColor') || theme.palette.background.default;
29839
+ const searchBgColor = getSearchBGColor(bgColor, getListboxStyle);
29633
29840
  const searchColor = getSearchColor(getListboxStyle);
29634
29841
  const headerFontStyle = ((_themeOverrides$heade2 = themeOverrides.header) === null || _themeOverrides$heade2 === void 0 ? void 0 : _themeOverrides$heade2.fontStyle) || {};
29635
29842
  const contentFontStyle = ((_themeOverrides$conte = themeOverrides.content) === null || _themeOverrides$conte === void 0 ? void 0 : _themeOverrides$conte.fontStyle) || {};
@@ -29638,7 +29845,7 @@
29638
29845
  const getWithFallback = (value, trueValue, falseValue) => value === true && trueValue || value === false && falseValue || undefined;
29639
29846
  return {
29640
29847
  background: {
29641
- backgroundColor: bgComponentColor || getListboxStyle('', 'backgroundColor') || theme.palette.background.default,
29848
+ backgroundColor: bgColor,
29642
29849
  backgroundImage: bgImage !== null && bgImage !== void 0 && bgImage.url && !(bgImage !== null && bgImage !== void 0 && bgImage.url.startsWith('url(')) ? "url('".concat(bgImage.url, "')") : undefined,
29643
29850
  backgroundRepeat: 'no-repeat',
29644
29851
  backgroundSize: bgImage === null || bgImage === void 0 ? void 0 : bgImage.size,
@@ -29779,9 +29986,11 @@
29779
29986
  anchorEl: alignTo.current,
29780
29987
  anchorOrigin: anchorOrigin,
29781
29988
  transformOrigin: transformOrigin,
29782
- PaperProps: {
29783
- style: {
29784
- minWidth: '250px'
29989
+ slotProps: {
29990
+ paper: {
29991
+ style: {
29992
+ minWidth: '250px'
29993
+ }
29785
29994
  }
29786
29995
  }
29787
29996
  }, /*#__PURE__*/React.createElement(Grid$1, {
@@ -29815,6 +30024,7 @@
29815
30024
  }), /*#__PURE__*/React.createElement(Grid$1, {
29816
30025
  item: true
29817
30026
  }, /*#__PURE__*/React.createElement(ActionsToolbar, {
30027
+ layout: layout,
29818
30028
  more: {
29819
30029
  enabled: !isLocked,
29820
30030
  actions: listboxSelectionToolbarItems,
@@ -30144,7 +30354,7 @@
30144
30354
  variant: "contained",
30145
30355
  fullWidth: true
30146
30356
  }, clearAllStates)), field.states.map((s, ix) =>
30147
-
30357
+ /*#__PURE__*/
30148
30358
  // eslint-disable-next-line react/no-array-index-key
30149
30359
  React.createElement(ListItem$1, {
30150
30360
  key: ix,
@@ -30322,7 +30532,7 @@
30322
30532
  }, /*#__PURE__*/React.createElement(List$1, {
30323
30533
  dense: true
30324
30534
  }, items.map((s, ix) =>
30325
-
30535
+ /*#__PURE__*/
30326
30536
  // eslint-disable-next-line react/no-array-index-key
30327
30537
  React.createElement(ListItem$1, {
30328
30538
  key: ix,
@@ -30876,16 +31086,15 @@
30876
31086
  onResize
30877
31087
  } = this.props;
30878
31088
  if (this._parentNode) {
30879
- var _style$paddingLeft, _style$paddingRight, _style$paddingTop, _style$paddingBottom;
30880
31089
  // Guard against AutoSizer component being removed from the DOM immediately after being added.
30881
31090
  // This can result in invalid style values which can result in NaN values if we don't handle them.
30882
31091
  // See issue #150 for more context.
30883
31092
 
30884
31093
  const style = window.getComputedStyle(this._parentNode) || {};
30885
- const paddingLeft = parseFloat((_style$paddingLeft = style.paddingLeft) !== null && _style$paddingLeft !== void 0 ? _style$paddingLeft : "0");
30886
- const paddingRight = parseFloat((_style$paddingRight = style.paddingRight) !== null && _style$paddingRight !== void 0 ? _style$paddingRight : "0");
30887
- const paddingTop = parseFloat((_style$paddingTop = style.paddingTop) !== null && _style$paddingTop !== void 0 ? _style$paddingTop : "0");
30888
- const paddingBottom = parseFloat((_style$paddingBottom = style.paddingBottom) !== null && _style$paddingBottom !== void 0 ? _style$paddingBottom : "0");
31094
+ const paddingLeft = parseFloat(style.paddingLeft || "0");
31095
+ const paddingRight = parseFloat(style.paddingRight || "0");
31096
+ const paddingTop = parseFloat(style.paddingTop || "0");
31097
+ const paddingBottom = parseFloat(style.paddingBottom || "0");
30889
31098
  const rect = this._parentNode.getBoundingClientRect();
30890
31099
  const scaledHeight = rect.height - paddingTop - paddingBottom;
30891
31100
  const scaledWidth = rect.width - paddingLeft - paddingRight;
@@ -31014,16 +31223,6 @@
31014
31223
  }
31015
31224
  }
31016
31225
 
31017
- const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
31018
- shapes: [{
31019
- type: 'path',
31020
- attrs: {
31021
- d: 'M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z'
31022
- }
31023
- }]
31024
- });
31025
- var DrillDownIcon = (props => SvgIcon(drillDown(props)));
31026
-
31027
31226
  function removeInnnerTabStops(container) {
31028
31227
  container === null || container === void 0 || container.querySelectorAll('[tabIndex="0"]').forEach(elm => {
31029
31228
  elm.setAttribute('tabIndex', -1);
@@ -31077,14 +31276,17 @@
31077
31276
  const lastSelectedRow = c === null || c === void 0 ? void 0 : c.querySelector('.value.last-focused');
31078
31277
  const firstRowElement = c === null || c === void 0 ? void 0 : c.querySelector('.value.selector, .value');
31079
31278
  const confirmButton = c === null || c === void 0 ? void 0 : c.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
31080
- const elementToFocus = searchField || lastSelectedRow || firstRowElement || confirmButton;
31279
+ const unlockCoverButton = c === null || c === void 0 ? void 0 : c.querySelector('#listbox-unlock-button');
31280
+ const elementToFocus = searchField || lastSelectedRow || firstRowElement || unlockCoverButton || confirmButton;
31081
31281
  elementToFocus === null || elementToFocus === void 0 || elementToFocus.setAttribute('tabIndex', 0);
31082
31282
  elementToFocus === null || elementToFocus === void 0 || elementToFocus.focus();
31083
31283
  },
31084
31284
  focusSelection() {
31285
+ const unlockCoverButton = document.querySelector('#listbox-unlock-button');
31085
31286
  const confirmButton = document.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
31086
- confirmButton === null || confirmButton === void 0 || confirmButton.setAttribute('tabIndex', 0);
31087
- confirmButton === null || confirmButton === void 0 || confirmButton.focus();
31287
+ const btnToFocus = unlockCoverButton || confirmButton;
31288
+ btnToFocus === null || btnToFocus === void 0 || btnToFocus.setAttribute('tabIndex', 0);
31289
+ btnToFocus === null || btnToFocus === void 0 || btnToFocus.focus();
31088
31290
  }
31089
31291
  };
31090
31292
  return keyboard;
@@ -31240,18 +31442,79 @@
31240
31442
  };
31241
31443
  }
31242
31444
 
31445
+ const StyledDiv = styled('div')(() => ({
31446
+ display: 'flex',
31447
+ width: '100%',
31448
+ height: '100%',
31449
+ alignItems: 'center',
31450
+ justifyContent: 'center'
31451
+ }));
31452
+ function ListBoxError(_ref) {
31453
+ let {
31454
+ text
31455
+ } = _ref;
31456
+ const {
31457
+ translator: translatorDynamic
31458
+ } = reactExports.useContext(InstanceContext);
31459
+ return /*#__PURE__*/React.createElement(StyledDiv, null, translatorDynamic.get(text));
31460
+ }
31461
+
31462
+ function isDirectQueryEnabled(_ref) {
31463
+ let {
31464
+ appLayout
31465
+ } = _ref;
31466
+ const isDQ = !!(appLayout !== null && appLayout !== void 0 && appLayout.qIsDirectQueryMode);
31467
+ return isDQ;
31468
+ }
31469
+
31470
+ function getContainerPadding(_ref) {
31471
+ let {
31472
+ isGridMode,
31473
+ dense,
31474
+ height,
31475
+ layoutOrder
31476
+ } = _ref;
31477
+ let containerPadding;
31478
+ if (isGridMode) {
31479
+ const itemHeight = getItemHeight({
31480
+ isGridMode,
31481
+ dense
31482
+ });
31483
+ let paddingY;
31484
+ if (itemHeight > height) {
31485
+ paddingY = '0px';
31486
+ } else {
31487
+ paddingY = '2px';
31488
+ }
31489
+ containerPadding = layoutOrder === 'row' ? "".concat(paddingY, " 4px") : "".concat(paddingY, " 6px ").concat(paddingY, " 4px");
31490
+ } else {
31491
+ containerPadding = undefined;
31492
+ }
31493
+ return containerPadding;
31494
+ }
31495
+
31496
+ const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
31497
+ shapes: [{
31498
+ type: 'path',
31499
+ attrs: {
31500
+ d: 'M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z'
31501
+ }
31502
+ }]
31503
+ });
31504
+ var DrillDownIcon = (props => SvgIcon(drillDown(props)));
31505
+
31243
31506
  function showToolbarDetached(_ref) {
31244
31507
  var _titleRef$current$cli, _titleRef$current, _titleRef$current2, _titleRef$current3;
31245
31508
  let {
31246
31509
  containerRect,
31247
31510
  titleRef,
31248
31511
  iconsWidth,
31249
- headerPaddingLeft,
31250
- headerPaddingRight
31512
+ paddingLeft,
31513
+ paddingRight
31251
31514
  } = _ref;
31252
31515
  const containerWidth = containerRect.width;
31253
31516
  const preventTruncation = 2;
31254
- const padding = headerPaddingLeft + headerPaddingRight;
31517
+ const padding = paddingLeft + paddingRight;
31255
31518
  const contentWidth = ((_titleRef$current$cli = titleRef === null || titleRef === void 0 || (_titleRef$current = titleRef.current) === null || _titleRef$current === void 0 ? void 0 : _titleRef$current.clientWidth) !== null && _titleRef$current$cli !== void 0 ? _titleRef$current$cli : 0) + iconsWidth + padding + preventTruncation;
31256
31519
  const actionToolbarWidth = 128;
31257
31520
  const notSufficientSpace = containerWidth < contentWidth + actionToolbarWidth;
@@ -31267,15 +31530,18 @@
31267
31530
  containerRef,
31268
31531
  isLocked,
31269
31532
  listboxSelectionToolbarItems,
31533
+ extraItems,
31270
31534
  selections,
31271
31535
  keyboard
31272
31536
  } = _ref;
31273
31537
  return {
31538
+ isDetached,
31274
31539
  show: showToolbar && !isDetached,
31275
31540
  popover: {
31276
31541
  show: showToolbar && isDetached,
31277
31542
  anchorEl: containerRef.current
31278
31543
  },
31544
+ extraItems,
31279
31545
  more: {
31280
31546
  enabled: !isLocked,
31281
31547
  actions: listboxSelectionToolbarItems,
@@ -31300,97 +31566,37 @@
31300
31566
  };
31301
31567
  }
31302
31568
 
31303
- const StyledDiv = styled('div')(() => ({
31304
- display: 'flex',
31305
- width: '100%',
31306
- height: '100%',
31307
- alignItems: 'center',
31308
- justifyContent: 'center'
31309
- }));
31310
- function ListBoxError(_ref) {
31311
- let {
31312
- text
31313
- } = _ref;
31314
- const {
31315
- translator: translatorDynamic
31316
- } = reactExports.useContext(InstanceContext);
31317
- return /*#__PURE__*/React.createElement(StyledDiv, null, translatorDynamic.get(text));
31318
- }
31319
-
31320
- function isDirectQueryEnabled(_ref) {
31321
- let {
31322
- appLayout
31323
- } = _ref;
31324
- const isDQ = !!(appLayout !== null && appLayout !== void 0 && appLayout.qIsDirectQueryMode);
31325
- return isDQ;
31326
- }
31327
-
31328
- function getContainerPadding(_ref) {
31329
- let {
31330
- isGridMode,
31331
- dense,
31332
- height,
31333
- layoutOrder
31334
- } = _ref;
31335
- let containerPadding;
31336
- if (isGridMode) {
31337
- const itemHeight = getItemHeight({
31338
- isGridMode,
31339
- dense
31340
- });
31341
- let paddingY;
31342
- if (itemHeight > height) {
31343
- paddingY = '0px';
31344
- } else {
31345
- paddingY = '2px';
31346
- }
31347
- containerPadding = layoutOrder === 'row' ? "".concat(paddingY, " 4px") : "".concat(paddingY, " 6px ").concat(paddingY, " 4px");
31348
- } else {
31349
- containerPadding = undefined;
31350
- }
31351
- return containerPadding;
31352
- }
31353
-
31354
- const PREFIX$4 = 'ListBoxInline';
31355
- const classes$4 = {
31356
- listBoxHeader: "".concat(PREFIX$4, "-listBoxHeader"),
31357
- screenReaderOnly: "".concat(PREFIX$4, "-screenReaderOnly"),
31358
- listboxWrapper: "".concat(PREFIX$4, "-listboxWrapper")
31569
+ const iconStyle = {
31570
+ fontSize: '12px'
31359
31571
  };
31360
- const StyledGrid$3 = styled(Grid$1, {
31361
- shouldForwardProp: p => !['containerPadding', 'isGridMode', 'styles'].includes(p)
31362
- })(_ref => {
31572
+ const UnlockButton = styled(ButtonBase$1)(_ref => {
31363
31573
  let {
31364
31574
  theme,
31365
- containerPadding,
31366
- isGridMode,
31367
- styles
31575
+ isLoading
31368
31576
  } = _ref;
31369
- return _objectSpread2(_objectSpread2({}, styles.background), {}, {
31370
- // sets background color and image of listbox
31371
- ["& .".concat(classes$4.listBoxHeader)]: {
31372
- alignSelf: 'center',
31373
- display: 'flex'
31374
- },
31375
- ["& .".concat(classes$4.screenReaderOnly)]: {
31376
- position: 'absolute',
31377
- height: 0,
31378
- width: 0,
31379
- overflow: 'hidden'
31380
- },
31381
- ["& .".concat(classes$4.listboxWrapper)]: {
31382
- padding: containerPadding
31383
- },
31384
- '&:focus': {
31385
- boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
31386
- },
31387
- '&:focus ::-webkit-scrollbar-track': {
31388
- boxShadow: !isGridMode ? 'inset -2px -2px 0px #3F8AB3' : undefined
31577
+ return {
31578
+ position: 'absolute',
31579
+ top: 0,
31580
+ left: 0,
31581
+ height: 48,
31582
+ zIndex: 2,
31583
+ // so it goes on top of action buttons
31584
+ background: theme.palette.custom.disabledBackground,
31585
+ opacity: 1,
31586
+ color: theme.palette.custom.disabledContrastText,
31587
+ width: '100%',
31588
+ display: 'flex',
31589
+ justifyContent: isLoading ? 'center' : 'flex-start',
31590
+ paddingLeft: 16,
31591
+ paddingRight: 16,
31592
+ borderRadius: 0,
31593
+ '& *, & p': {
31594
+ color: theme.palette.custom.disabledContrastText
31389
31595
  },
31390
- '&:focus-visible': {
31391
- outline: 'none'
31596
+ '& i': {
31597
+ padding: "".concat(ICON_PADDING, "px")
31392
31598
  }
31393
- });
31599
+ };
31394
31600
  });
31395
31601
  const StyledGridHeader = styled(Grid$1, {
31396
31602
  shouldForwardProp: p => !['styles', 'isRtl'].includes(p)
@@ -31406,33 +31612,304 @@
31406
31612
  alignContent: 'center'
31407
31613
  }, styles.header), {}, {
31408
31614
  '& *': {
31409
- // Assign the styles color as defaul color for all elements in the header
31410
31615
  color: styles.header.color
31411
31616
  }
31412
31617
  });
31413
31618
  });
31414
- const Title = styled(Typography$1)(_ref3 => {
31619
+ const HeaderTitle = styled(Typography$1)(_ref3 => {
31415
31620
  let {
31416
31621
  styles
31417
31622
  } = _ref3;
31418
31623
  return _objectSpread2(_objectSpread2({}, styles.header), {}, {
31624
+ display: 'block',
31625
+ // needed for text-overflow to work
31626
+ alignItems: 'center',
31419
31627
  paddingRight: '1px' // make place for italic font style
31420
31628
  });
31421
31629
  });
31422
- const isModal = _ref4 => {
31630
+ function UnlockCoverButton(_ref4) {
31631
+ let {
31632
+ translator,
31633
+ toggleLock,
31634
+ keyboard,
31635
+ isLoading
31636
+ } = _ref4;
31637
+ const fontSize = '14px';
31638
+ const unLockText = translator.get('SelectionToolbar.ClickToUnlock');
31639
+ const component = /*#__PURE__*/React.createElement(UnlockButton, {
31640
+ title: unLockText,
31641
+ tabIndex: keyboard.enabled ? 0 : -1,
31642
+ onClick: toggleLock,
31643
+ "data-testid": "listbox-unlock-button",
31644
+ id: "listbox-unlock-button",
31645
+ isLoading: isLoading
31646
+ }, isLoading ? /*#__PURE__*/React.createElement(CircularProgress$1, {
31647
+ size: 16,
31648
+ variant: "indeterminate",
31649
+ color: "primary"
31650
+ }) : /*#__PURE__*/React.createElement(Lock, {
31651
+ disableRipple: true,
31652
+ style: iconStyle
31653
+ }), !isLoading && /*#__PURE__*/React.createElement(Typography$1, {
31654
+ fontSize: fontSize
31655
+ }, unLockText));
31656
+ return component;
31657
+ }
31658
+
31659
+ // ms that needs to pass before the lock button can be toggled again
31660
+ const lockTimeFrameMs = 500;
31661
+ let lastTime = 0;
31662
+ function getToggleLock(_ref) {
31663
+ let {
31664
+ isLocked,
31665
+ setLocked,
31666
+ settingLockedState,
31667
+ model,
31668
+ setSettingLockedState
31669
+ } = _ref;
31670
+ return () => {
31671
+ const now = new Date();
31672
+ const curTime = now - lastTime;
31673
+ if (curTime < lockTimeFrameMs) {
31674
+ return Promise.resolve();
31675
+ }
31676
+ if (settingLockedState) {
31677
+ return () => {};
31678
+ }
31679
+ setSettingLockedState(true);
31680
+ lastTime = now;
31681
+ const func = isLocked ? model.unlock : model.lock;
31682
+ setLocked(!isLocked);
31683
+ return func.call(model, '/qListObjectDef').catch(() => {
31684
+ setLocked(isLocked); // revert to the layout value
31685
+ }).finally(() => {
31686
+ setTimeout(() => {
31687
+ setSettingLockedState(false);
31688
+ }, 0);
31689
+ });
31690
+ };
31691
+ }
31692
+ function ListBoxHeader(_ref2) {
31693
+ var _layout$qListObject, _layout$qListObject3;
31694
+ let {
31695
+ layout,
31696
+ translator,
31697
+ styles,
31698
+ isRtl,
31699
+ showLock,
31700
+ selectDisabled,
31701
+ showSearchIcon,
31702
+ isDrillDown,
31703
+ constraints,
31704
+ onShowSearch,
31705
+ classes,
31706
+ containerRect,
31707
+ isPopover,
31708
+ showToolbar,
31709
+ showDetachedToolbarOnly,
31710
+ containerRef,
31711
+ model,
31712
+ selectionState,
31713
+ isDirectQuery,
31714
+ selections,
31715
+ keyboard,
31716
+ autoConfirm
31717
+ } = _ref2;
31718
+ const [isToolbarDetached, setIsToolbarDetached] = reactExports.useState(showDetachedToolbarOnly);
31719
+ const [isLocked, setLocked] = reactExports.useState(layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 || (_layout$qListObject = _layout$qListObject.qDimensionInfo) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qLocked);
31720
+ const [settingLockedState, setSettingLockedState] = reactExports.useState(false);
31721
+ reactExports.useEffect(() => {
31722
+ var _layout$qListObject2;
31723
+ setLocked(layout === null || layout === void 0 || (_layout$qListObject2 = layout.qListObject) === null || _layout$qListObject2 === void 0 || (_layout$qListObject2 = _layout$qListObject2.qDimensionInfo) === null || _layout$qListObject2 === void 0 ? void 0 : _layout$qListObject2.qLocked);
31724
+ }, [layout === null || layout === void 0 || (_layout$qListObject3 = layout.qListObject) === null || _layout$qListObject3 === void 0 || (_layout$qListObject3 = _layout$qListObject3.qDimensionInfo) === null || _layout$qListObject3 === void 0 ? void 0 : _layout$qListObject3.qLocked]);
31725
+ const titleRef = reactExports.useRef(null);
31726
+ const showUnlock = showLock && isLocked;
31727
+ const showLockIcon = !showLock && isLocked; // shows instead of the cover button when field/dim is locked.
31728
+ const showLeftIcon = showSearchIcon || showLockIcon || isDrillDown; // the left-most icon outside of the actions/selections toolbar.
31729
+
31730
+ const paddingLeft = CELL_PADDING_LEFT - (showLeftIcon ? ICON_PADDING : 0);
31731
+ const paddingRight = isRtl ? CELL_PADDING_LEFT - (showLeftIcon ? ICON_PADDING : 0) : HEADER_PADDING_RIGHT;
31732
+
31733
+ // Calculate explicit width for icons container. Search and lock cannot exist combined.
31734
+ const iconsWidth = (showSearchIcon ? BUTTON_ICON_WIDTH : 0) + (showLockIcon ? BUTTON_ICON_WIDTH : 0) + (isDrillDown ? BUTTON_ICON_WIDTH : 0);
31735
+ const toggleLock = getToggleLock({
31736
+ isLocked,
31737
+ setLocked,
31738
+ settingLockedState,
31739
+ setSettingLockedState,
31740
+ model
31741
+ });
31742
+ const listboxSelectionToolbarItems = createListboxSelectionToolbar({
31743
+ layout,
31744
+ model,
31745
+ translator,
31746
+ selectionState,
31747
+ isDirectQuery
31748
+ });
31749
+ const extraItems = isLocked || !showLock ? undefined : [{
31750
+ key: 'lock',
31751
+ type: undefined,
31752
+ label: translator.get('SelectionToolbar.ClickToLock'),
31753
+ getSvgIconShape: unlock,
31754
+ enabled: () => !settingLockedState && !selectDisabled() && hasSelections(layout),
31755
+ action: toggleLock
31756
+ }];
31757
+ const searchIconComp = constraints !== null && constraints !== void 0 && constraints.active ? /*#__PURE__*/React.createElement(SearchIcon, {
31758
+ title: translator.get('Listbox.Search'),
31759
+ size: "large",
31760
+ style: _objectSpread2(_objectSpread2({}, iconStyle), {}, {
31761
+ padding: "".concat(ICON_PADDING, "px")
31762
+ })
31763
+ }) : /*#__PURE__*/React.createElement(IconButton$1, {
31764
+ onClick: onShowSearch,
31765
+ tabIndex: -1,
31766
+ title: translator.get('Listbox.Search'),
31767
+ size: "large",
31768
+ disableRipple: true,
31769
+ "data-testid": "search-toggle-btn"
31770
+ }, /*#__PURE__*/React.createElement(SearchIcon, {
31771
+ style: iconStyle
31772
+ }));
31773
+ reactExports.useEffect(() => {
31774
+ if (!titleRef.current || !containerRect) {
31775
+ return;
31776
+ }
31777
+ const mustShowDetached = showToolbarDetached({
31778
+ containerRect,
31779
+ titleRef,
31780
+ iconsWidth,
31781
+ paddingLeft,
31782
+ paddingRight
31783
+ });
31784
+ const isDetached = showDetachedToolbarOnly || mustShowDetached;
31785
+ setIsToolbarDetached(isDetached);
31786
+ }, [iconsWidth, paddingLeft, paddingRight, titleRef.current, showDetachedToolbarOnly, Object.entries(containerRect || {}).sort().join(',')]);
31787
+ const toolbarProps = getListboxActionProps({
31788
+ isDetached: isPopover ? false : isToolbarDetached,
31789
+ showToolbar,
31790
+ containerRef,
31791
+ isLocked,
31792
+ extraItems,
31793
+ listboxSelectionToolbarItems,
31794
+ selections,
31795
+ keyboard,
31796
+ autoConfirm
31797
+ });
31798
+ const actionsToolbar = /*#__PURE__*/React.createElement(ActionsToolbar, _extends$7({
31799
+ isRtl: isRtl,
31800
+ layout: layout
31801
+ }, toolbarProps));
31802
+ if (showDetachedToolbarOnly) {
31803
+ return actionsToolbar;
31804
+ }
31805
+
31806
+ // Always show a lock symbol when locked and showLock is false
31807
+ const lockedIconComp = showLockIcon ? /*#__PURE__*/React.createElement(Lock, {
31808
+ size: "large",
31809
+ style: _objectSpread2(_objectSpread2({}, iconStyle), {}, {
31810
+ padding: "".concat(ICON_PADDING, "px")
31811
+ })
31812
+ }) : undefined;
31813
+ return /*#__PURE__*/React.createElement(StyledGridHeader, {
31814
+ item: true,
31815
+ container: true,
31816
+ styles: styles,
31817
+ isRtl: isRtl,
31818
+ marginY: 1,
31819
+ paddingLeft: "".concat(paddingLeft, "px"),
31820
+ paddingRight: "".concat(paddingRight, "px"),
31821
+ className: "header-container"
31822
+ }, showUnlock && /*#__PURE__*/React.createElement(UnlockCoverButton, {
31823
+ isLoading: settingLockedState,
31824
+ translator: translator,
31825
+ toggleLock: toggleLock,
31826
+ keyboard: keyboard
31827
+ }), showLeftIcon && /*#__PURE__*/React.createElement(Grid$1, {
31828
+ item: true,
31829
+ container: true,
31830
+ alignItems: "center",
31831
+ width: iconsWidth,
31832
+ className: "header-action-container"
31833
+ }, lockedIconComp || showSearchIcon && searchIconComp, isDrillDown && /*#__PURE__*/React.createElement(DrillDownIcon, {
31834
+ tabIndex: -1,
31835
+ title: translator.get('Listbox.DrillDown'),
31836
+ style: _objectSpread2(_objectSpread2({}, iconStyle), {}, {
31837
+ padding: "".concat(ICON_PADDING, "px")
31838
+ })
31839
+ })), /*#__PURE__*/React.createElement(Grid$1, {
31840
+ item: true,
31841
+ xs: true,
31842
+ minWidth: 0 // needed to text-overflow see: https://css-tricks.com/flexbox-truncated-text/
31843
+ ,
31844
+ justifyContent: isRtl ? 'flex-end' : 'flex-start',
31845
+ className: classes.listBoxHeader
31846
+ }, /*#__PURE__*/React.createElement(HeaderTitle, {
31847
+ variant: "h6",
31848
+ noWrap: true,
31849
+ ref: titleRef,
31850
+ title: layout.title,
31851
+ styles: styles
31852
+ }, layout.title)), /*#__PURE__*/React.createElement(Grid$1, {
31853
+ item: true,
31854
+ display: "flex"
31855
+ }, actionsToolbar));
31856
+ }
31857
+
31858
+ const PREFIX$4 = 'ListBoxInline';
31859
+ const classes$4 = {
31860
+ listBoxHeader: "".concat(PREFIX$4, "-listBoxHeader"),
31861
+ screenReaderOnly: "".concat(PREFIX$4, "-screenReaderOnly"),
31862
+ listboxWrapper: "".concat(PREFIX$4, "-listboxWrapper")
31863
+ };
31864
+ const StyledGrid$3 = styled(Grid$1, {
31865
+ shouldForwardProp: p => !['containerPadding', 'isGridMode', 'styles'].includes(p)
31866
+ })(_ref => {
31867
+ let {
31868
+ theme,
31869
+ containerPadding,
31870
+ isGridMode,
31871
+ styles
31872
+ } = _ref;
31873
+ return _objectSpread2(_objectSpread2({}, styles.background), {}, {
31874
+ // sets background color and image of listbox
31875
+ ["& .".concat(classes$4.listBoxHeader)]: {
31876
+ alignSelf: 'center',
31877
+ display: 'flex'
31878
+ },
31879
+ ["& .".concat(classes$4.screenReaderOnly)]: {
31880
+ position: 'absolute',
31881
+ height: 0,
31882
+ width: 0,
31883
+ overflow: 'hidden'
31884
+ },
31885
+ ["& .".concat(classes$4.listboxWrapper)]: {
31886
+ padding: containerPadding
31887
+ },
31888
+ '&:focus': {
31889
+ boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
31890
+ },
31891
+ '&:focus ::-webkit-scrollbar-track': {
31892
+ boxShadow: !isGridMode ? 'inset -2px -2px 0px #3F8AB3' : undefined
31893
+ },
31894
+ '&:focus-visible': {
31895
+ outline: 'none'
31896
+ }
31897
+ });
31898
+ });
31899
+ const isModal = _ref2 => {
31423
31900
  var _app$isInModalSelecti, _app$isInModalSelecti2;
31424
31901
  let {
31425
31902
  app,
31426
31903
  appSelections
31427
- } = _ref4;
31904
+ } = _ref2;
31428
31905
  return (_app$isInModalSelecti = (_app$isInModalSelecti2 = app.isInModalSelection) === null || _app$isInModalSelecti2 === void 0 ? void 0 : _app$isInModalSelecti2.call(app)) !== null && _app$isInModalSelecti !== void 0 ? _app$isInModalSelecti : appSelections.isInModal();
31429
31906
  };
31430
- function ListBoxInline(_ref5) {
31431
- var _layout$qListObject, _layout$qListObject2, _layoutOptions$dense, _containerRef$current;
31907
+ function ListBoxInline(_ref3) {
31908
+ var _layout$qListObject, _layout$qListObject2, _layout$title, _layoutOptions$dense, _containerRef$current;
31432
31909
  let {
31433
31910
  options,
31434
31911
  layout
31435
- } = _ref5;
31912
+ } = _ref3;
31436
31913
  const {
31437
31914
  app,
31438
31915
  direction,
@@ -31453,6 +31930,7 @@
31453
31930
  renderedCallback,
31454
31931
  toolbar = true,
31455
31932
  isPopover = false,
31933
+ showLock = false,
31456
31934
  components
31457
31935
  } = options;
31458
31936
 
@@ -31468,9 +31946,6 @@
31468
31946
  return [ref, setRef];
31469
31947
  };
31470
31948
  const theme = useTheme$1();
31471
- const unlock = reactExports.useCallback(() => {
31472
- model.unlock('/qListObjectDef');
31473
- }, [model]);
31474
31949
  const {
31475
31950
  translator,
31476
31951
  keyboardNavigation,
@@ -31507,7 +31982,6 @@
31507
31982
  stop: 0
31508
31983
  });
31509
31984
  const [appSelections] = useAppSelections(app);
31510
- const titleRef = reactExports.useRef(null);
31511
31985
  const [selectionState$1] = reactExports.useState(() => selectionState());
31512
31986
  const keyboard = useTempKeyboard({
31513
31987
  containerRef,
@@ -31519,7 +31993,6 @@
31519
31993
  }), [app, appSelections]);
31520
31994
  const isInvalid = layout === null || layout === void 0 ? void 0 : layout.qListObject.qDimensionInfo.qError;
31521
31995
  const errorText = isInvalid && constraints.active ? 'Visualization.Invalid.Dimension' : 'Visualization.Incomplete';
31522
- const [isToolbarDetached, setIsToolbarDetached] = reactExports.useState(false);
31523
31996
  const {
31524
31997
  handleKeyDown,
31525
31998
  handleOnMouseEnter,
@@ -31536,8 +32009,6 @@
31536
32009
  constraints,
31537
32010
  isModal: isModalMode
31538
32011
  }), [keyboard, hovering, updateKeyScroll, containerRef, currentScrollIndex, app, appSelections, constraints, isModalMode]);
31539
- const showDetachedToolbarOnly = toolbar && ((layout === null || layout === void 0 ? void 0 : layout.title) === '' || (layout === null || layout === void 0 ? void 0 : layout.showTitle) === false) && !isPopover;
31540
- const showToolbarWithTitle = toolbar && (layout === null || layout === void 0 ? void 0 : layout.title) !== '' && (layout === null || layout === void 0 ? void 0 : layout.showTitle) !== false || isPopover;
31541
32012
  reactExports.useEffect(() => {
31542
32013
  document.addEventListener('keydown', globalKeyDown);
31543
32014
  return () => {
@@ -31545,6 +32016,9 @@
31545
32016
  };
31546
32017
  }, [globalKeyDown]);
31547
32018
  reactExports.useEffect(() => {
32019
+ if (search === true) {
32020
+ setShowSearch(true);
32021
+ }
31548
32022
  const show = () => {
31549
32023
  setShowToolbar(true);
31550
32024
  };
@@ -31555,6 +32029,7 @@
31555
32029
  }
31556
32030
  };
31557
32031
  if (isPopover) {
32032
+ // When isPopover, toolbar == false will be ignored.
31558
32033
  if (!selections.isActive()) {
31559
32034
  selections.begin('/qListObjectDef');
31560
32035
  selections.on('activated', show);
@@ -31562,7 +32037,7 @@
31562
32037
  }
31563
32038
  setShowToolbar(isPopover);
31564
32039
  }
31565
- if (selections) {
32040
+ if (toolbar && selections) {
31566
32041
  if (!selections.isModal()) {
31567
32042
  selections.on('activated', show);
31568
32043
  selections.on('deactivated', hide);
@@ -31575,7 +32050,7 @@
31575
32050
  selections.removeListener('deactivated', hide);
31576
32051
  }
31577
32052
  };
31578
- }, [selections, isPopover]);
32053
+ }, [toolbar, selections, isPopover]);
31579
32054
  reactExports.useEffect(() => {
31580
32055
  if (!searchContainer || !searchContainer.current) {
31581
32056
  return;
@@ -31592,64 +32067,31 @@
31592
32067
  autoConfirm = false,
31593
32068
  layoutOptions = {}
31594
32069
  } = layout !== null && layout !== void 0 ? layout : {};
31595
- const showSearchIcon = searchEnabled !== false && search === 'toggle';
31596
- const isLocked = (layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 || (_layout$qListObject = _layout$qListObject.qDimensionInfo) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qLocked) === true;
31597
- const showSearchOrLockIcon = isLocked || showSearchIcon;
32070
+ const isLocked = layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 || (_layout$qListObject = _layout$qListObject.qDimensionInfo) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qLocked;
32071
+ const showSearchIcon = searchEnabled !== false && search === 'toggle' && !isLocked;
31598
32072
  const isDrillDown = (layout === null || layout === void 0 || (_layout$qListObject2 = layout.qListObject) === null || _layout$qListObject2 === void 0 || (_layout$qListObject2 = _layout$qListObject2.qDimensionInfo) === null || _layout$qListObject2 === void 0 ? void 0 : _layout$qListObject2.qGrouping) === 'H';
31599
- const showIcons = showSearchOrLockIcon || isDrillDown;
31600
- const iconsWidth = (showSearchOrLockIcon ? BUTTON_ICON_WIDTH : 0) + (isDrillDown ? ICON_WIDTH + ICON_PADDING : 0); // Drill-down icon needs padding right so there is space between the icon and the title
32073
+ const canShowTitle = (layout === null || layout === void 0 || (_layout$title = layout.title) === null || _layout$title === void 0 ? void 0 : _layout$title.length) && (layout === null || layout === void 0 ? void 0 : layout.showTitle) !== false;
32074
+ const showDetachedToolbarOnly = toolbar && !canShowTitle && !isPopover;
32075
+ const showAttachedToolbar = toolbar && canShowTitle || isPopover;
31601
32076
  const isRtl = direction === 'rtl';
31602
- const headerPaddingLeft = CELL_PADDING_LEFT - (showSearchOrLockIcon ? ICON_PADDING : 0);
31603
- const headerPaddingRight = isRtl ? CELL_PADDING_LEFT - (showIcons ? ICON_PADDING : 0) : HEADER_PADDING_RIGHT;
31604
- reactExports.useEffect(() => {
31605
- if (!titleRef.current || !containerRect) {
31606
- return;
31607
- }
31608
- const isDetached = showToolbarDetached({
31609
- containerRect,
31610
- titleRef,
31611
- iconsWidth,
31612
- headerPaddingLeft,
31613
- headerPaddingRight
31614
- });
31615
- setIsToolbarDetached(isDetached);
31616
- }, [titleRef.current, containerRect]);
31617
32077
  if (!model || !layout || !translator) {
31618
32078
  return null;
31619
32079
  }
31620
- const listboxSelectionToolbarItems = createListboxSelectionToolbar({
31621
- layout,
31622
- model,
31623
- translator,
31624
- selectionState: selectionState$1,
31625
- isDirectQuery
31626
- });
31627
32080
  const showSearchToggle = search === 'toggle' && showSearch;
31628
- const searchVisible = (search === true || showSearchToggle) && !selectDisabled() && searchEnabled !== false;
32081
+ const searchVisible = search === true || showSearchToggle && !selectDisabled() && searchEnabled !== false;
31629
32082
  const dense = (_layoutOptions$dense = layoutOptions.dense) !== null && _layoutOptions$dense !== void 0 ? _layoutOptions$dense : false;
31630
- const onShowSearch = () => {
32083
+ const handleShowSearch = () => {
31631
32084
  const newValue = !showSearch;
31632
32085
  setShowSearch(newValue);
31633
32086
  };
31634
32087
  const onCtrlF = () => {
31635
32088
  if (search === 'toggle') {
31636
- onShowSearch();
32089
+ handleShowSearch();
31637
32090
  } else {
31638
32091
  const input = searchContainer.current.querySelector('input');
31639
32092
  input === null || input === void 0 || input.focus();
31640
32093
  }
31641
32094
  };
31642
- const getActionToolbarProps = isDetached => _objectSpread2(_objectSpread2({}, getListboxActionProps({
31643
- isDetached: isPopover ? false : isDetached,
31644
- showToolbar,
31645
- containerRef,
31646
- isLocked,
31647
- listboxSelectionToolbarItems,
31648
- selections,
31649
- keyboard
31650
- })), {}, {
31651
- autoConfirm
31652
- });
31653
32095
  const shouldAutoFocus = searchVisible && search === 'toggle';
31654
32096
 
31655
32097
  // Add a container padding for grid mode to harmonize with the grid item margins (should sum to 8px).
@@ -31660,49 +32102,35 @@
31660
32102
  height: (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.clientHeight,
31661
32103
  layoutOrder: layoutOptions.layoutOrder
31662
32104
  });
31663
- const searchIconComp = constraints !== null && constraints !== void 0 && constraints.active ? /*#__PURE__*/React.createElement(SearchIcon, {
31664
- title: translator.get('Listbox.Search'),
31665
- size: "large",
31666
- style: {
31667
- fontSize: '12px',
31668
- padding: '7px'
31669
- }
31670
- }) : /*#__PURE__*/React.createElement(IconButton$1, {
31671
- onClick: onShowSearch,
31672
- tabIndex: -1,
31673
- title: translator.get('Listbox.Search'),
31674
- size: "large",
31675
- disableRipple: true,
31676
- "data-testid": "search-toggle-btn"
31677
- }, /*#__PURE__*/React.createElement(SearchIcon, {
31678
- style: {
31679
- fontSize: '12px'
31680
- }
31681
- }));
31682
- const lockIconComp = selectDisabled() ? /*#__PURE__*/React.createElement(Lock, {
31683
- size: "large",
31684
- style: {
31685
- fontSize: '12px',
31686
- padding: '7px'
31687
- }
31688
- }) : /*#__PURE__*/React.createElement(IconButton$1, {
31689
- title: translator.get('SelectionToolbar.ClickToUnlock'),
31690
- tabIndex: -1,
31691
- onClick: unlock,
31692
- size: "large"
31693
- }, /*#__PURE__*/React.createElement(Lock, {
31694
- disableRipple: true,
31695
- style: {
31696
- fontSize: '12px'
31697
- }
31698
- }));
31699
32105
  if (isInvalid) {
31700
32106
  renderedCallback === null || renderedCallback === void 0 || renderedCallback();
31701
32107
  }
31702
- const listBoxMinHeight = showToolbarWithTitle ? DENSE_ROW_HEIGHT + SCROLL_BAR_WIDTH : 0;
31703
- return /*#__PURE__*/React.createElement(React.Fragment, null, showDetachedToolbarOnly && /*#__PURE__*/React.createElement(ActionsToolbar, _extends$7({
31704
- direction: direction
31705
- }, getActionToolbarProps(true))), /*#__PURE__*/React.createElement(StyledGrid$3, {
32108
+ const listBoxMinHeight = showAttachedToolbar ? DENSE_ROW_HEIGHT + SCROLL_BAR_WIDTH : 0;
32109
+ const listBoxHeader = /*#__PURE__*/React.createElement(ListBoxHeader, {
32110
+ selectDisabled: selectDisabled,
32111
+ showSearchIcon: showSearchIcon,
32112
+ isDrillDown: isDrillDown,
32113
+ onShowSearch: handleShowSearch,
32114
+ isPopover: isPopover,
32115
+ showToolbar: showToolbar,
32116
+ isDirectQuery: isDirectQuery,
32117
+ autoConfirm: autoConfirm,
32118
+ showDetachedToolbarOnly: showDetachedToolbarOnly,
32119
+ layout: layout,
32120
+ translator: translator,
32121
+ styles: styles,
32122
+ isRtl: isRtl,
32123
+ showLock: showLock,
32124
+ constraints: constraints,
32125
+ classes: classes$4,
32126
+ containerRect: containerRect,
32127
+ containerRef: containerRef,
32128
+ model: model,
32129
+ selectionState: selectionState$1,
32130
+ selections: selections,
32131
+ keyboard: keyboard
32132
+ });
32133
+ return /*#__PURE__*/React.createElement(React.Fragment, null, showDetachedToolbarOnly && listBoxHeader, /*#__PURE__*/React.createElement(StyledGrid$3, {
31706
32134
  className: "listbox-container",
31707
32135
  container: true,
31708
32136
  tabIndex: keyboard.enabled ? -1 : undefined,
@@ -31723,45 +32151,7 @@
31723
32151
  },
31724
32152
  isGridMode: isGridMode,
31725
32153
  "aria-label": keyboard.active ? translator.get('Listbox.ScreenReaderInstructions') : ''
31726
- }, showToolbarWithTitle && /*#__PURE__*/React.createElement(StyledGridHeader, {
31727
- item: true,
31728
- container: true,
31729
- styles: styles,
31730
- isRtl: isRtl,
31731
- marginY: 1,
31732
- paddingLeft: "".concat(headerPaddingLeft, "px"),
31733
- paddingRight: "".concat(headerPaddingRight, "px")
31734
- }, showIcons && /*#__PURE__*/React.createElement(Grid$1, {
31735
- item: true,
31736
- container: true,
31737
- alignItems: "center",
31738
- width: iconsWidth
31739
- }, isLocked ? lockIconComp : showSearchIcon && searchIconComp, isDrillDown && /*#__PURE__*/React.createElement(DrillDownIcon, {
31740
- tabIndex: -1,
31741
- title: translator.get('Listbox.DrillDown'),
31742
- size: "large",
31743
- style: {
31744
- fontSize: '12px'
31745
- }
31746
- })), /*#__PURE__*/React.createElement(Grid$1, {
31747
- item: true,
31748
- xs: true,
31749
- minWidth: 0 // needed to text-overflow see: https://css-tricks.com/flexbox-truncated-text/
31750
- ,
31751
- justifyContent: isRtl ? 'flex-end' : 'flex-start',
31752
- className: classes$4.listBoxHeader
31753
- }, /*#__PURE__*/React.createElement(Title, {
31754
- variant: "h6",
31755
- noWrap: true,
31756
- ref: titleRef,
31757
- title: layout.title,
31758
- styles: styles
31759
- }, layout.title)), /*#__PURE__*/React.createElement(Grid$1, {
31760
- item: true,
31761
- display: "flex"
31762
- }, /*#__PURE__*/React.createElement(ActionsToolbar, _extends$7({
31763
- direction: direction
31764
- }, getActionToolbarProps(isToolbarDetached))))), /*#__PURE__*/React.createElement(Grid$1, {
32154
+ }, showAttachedToolbar && listBoxHeader, /*#__PURE__*/React.createElement(Grid$1, {
31765
32155
  item: true,
31766
32156
  container: true,
31767
32157
  direction: "column",
@@ -31784,7 +32174,7 @@
31784
32174
  wildCardSearch: wildCardSearch,
31785
32175
  searchEnabled: searchEnabled,
31786
32176
  direction: direction,
31787
- hide: showSearchIcon && onShowSearch,
32177
+ hide: showSearchIcon && handleShowSearch,
31788
32178
  styles: styles
31789
32179
  })), /*#__PURE__*/React.createElement(Grid$1, {
31790
32180
  item: true,
@@ -31792,11 +32182,11 @@
31792
32182
  className: classes$4.listboxWrapper
31793
32183
  }, isInvalid ? /*#__PURE__*/React.createElement(ListBoxError, {
31794
32184
  text: errorText
31795
- }) : /*#__PURE__*/React.createElement(AutoSizer, null, _ref6 => {
32185
+ }) : /*#__PURE__*/React.createElement(AutoSizer, null, _ref4 => {
31796
32186
  let {
31797
32187
  height,
31798
32188
  width
31799
- } = _ref6;
32189
+ } = _ref4;
31800
32190
  return /*#__PURE__*/React.createElement(ListBox, {
31801
32191
  model: model,
31802
32192
  app: app,
@@ -31838,10 +32228,10 @@
31838
32228
  })))));
31839
32229
  }
31840
32230
  const ListBoxInlineMemoed = React.memo(ListBoxInline);
31841
- function IsolateUseLayoutWrapper(_ref7) {
32231
+ function IsolateUseLayoutWrapper(_ref5) {
31842
32232
  let {
31843
32233
  options = {}
31844
- } = _ref7;
32234
+ } = _ref5;
31845
32235
  const {
31846
32236
  model
31847
32237
  } = options;
@@ -31870,24 +32260,26 @@
31870
32260
  throw new Error("Option \"".concat(usedForbiddenOptions.join(', '), "\" is not applicable for existing objects."));
31871
32261
  }
31872
32262
  reactExports.useEffect(() => {
31873
- async function fetchObject() {
31874
- const modelFromStore = modelStore.get(qId);
31875
- if (modelFromStore) {
31876
- setModel(modelFromStore);
31877
- } else {
31878
- const m = await app.getObject(qId);
31879
- modelStore.set(m.id, m);
31880
- m.once('closed', () => {
31881
- modelStore.clear(m.id);
31882
- });
31883
- setModel(m);
32263
+ function storeModel(m) {
32264
+ if (modelStore.get(m.id)) {
32265
+ return;
31884
32266
  }
32267
+ // Nebula gets the model from this store in some of its
32268
+ // core functions, so it must always be stored here.
32269
+ modelStore.set(m.id, m);
32270
+ m.once('closed', () => {
32271
+ modelStore.clear(m.id);
32272
+ });
31885
32273
  }
31886
- if (sessionModel) {
31887
- setModel(sessionModel);
31888
- } else {
31889
- fetchObject();
32274
+ async function fetchObject(modelId) {
32275
+ const m = modelStore.get(modelId) || (await app.getObject(modelId));
32276
+ return m;
31890
32277
  }
32278
+ const p = Promise.resolve(sessionModel || fetchObject(qId));
32279
+ p.then(m => {
32280
+ storeModel(m);
32281
+ setModel(m);
32282
+ });
31891
32283
  }, []);
31892
32284
  return model;
31893
32285
  }
@@ -34003,7 +34395,8 @@
34003
34395
  show: showPopoverToolbar,
34004
34396
  anchorEl
34005
34397
  },
34006
- focusHandler: focusHandler
34398
+ focusHandler: focusHandler,
34399
+ layout: layout
34007
34400
  });
34008
34401
  return /*#__PURE__*/React.createElement(StyledGrid$1, {
34009
34402
  ref: containerRef,
@@ -35681,11 +36074,17 @@
35681
36074
  }
35682
36075
 
35683
36076
  /**
36077
+ * Callback function that should return a function that in turns gets
36078
+ * called before the hook runs again or when the component is destroyed.
36079
+ * For example to remove any listeners added in the callback itself.
35684
36080
  * @typedef {function():(void | function():void)} EffectCallback
35685
36081
  */
35686
36082
 
35687
36083
  /**
35688
36084
  * Triggers a callback function when a dependent value changes.
36085
+ *
36086
+ * Omitting the dependency array will have the hook run on each update
36087
+ * and an empty dependency array runs only once.
35689
36088
  * @entry
35690
36089
  * @param {EffectCallback} effect - The callback.
35691
36090
  * @param {Array<any>=} deps - The dependencies that should trigger the callback.
@@ -35698,6 +36097,15 @@
35698
36097
  * console.log('unmounted');
35699
36098
  * };
35700
36099
  * }, []);
36100
+ *
36101
+ * useEffect(() => {
36102
+ * const clickHandler = () => { console.log('click') };
36103
+ * const button = element.querySelector('.button');
36104
+ * button.addEventListener('click', clickHandler);
36105
+ * return () => {
36106
+ * button.removeEventListener('click', clickHandler);
36107
+ * };
36108
+ * }, []);
35701
36109
  */
35702
36110
  function useEffect(cb, deps) {
35703
36111
  {
@@ -35757,17 +36165,20 @@
35757
36165
 
35758
36166
  /**
35759
36167
  * Runs a callback function when a dependent changes.
36168
+ *
36169
+ * Useful for async operations that otherwise cause no side effects.
36170
+ * Do not add for example listeners withing the callback as there is no teardown function.
35760
36171
  * @entry
35761
36172
  * @template P
35762
36173
  * @param {function():Promise<P>} factory - The factory function that calls the promise.
35763
36174
  * @param {Array<any>=} deps - The dependencies.
35764
- * @returns {Array<P,Error>} The resolved value.
36175
+ * @returns {Array<P,Error>} The resolved value or rejected error
35765
36176
  * @example
35766
36177
  * import { usePromise } from '@nebula.js/stardust';
35767
36178
  * import { useModel } from '@nebula.js/stardust';
35768
36179
  * // ...
35769
36180
  * const model = useModel();
35770
- * const [resolved, rejected] = usePromise(() => model.getLayout(), []);
36181
+ * const [resolved, rejected] = usePromise(() => model.getLayout(), [model]);
35771
36182
  */
35772
36183
  function usePromise(p, deps) {
35773
36184
  const [obj, setObj] = useState(() => ({
@@ -40366,7 +40777,7 @@
40366
40777
 
40367
40778
  /**
40368
40779
  * @interface Configuration
40369
- * @property {LoadType=} load Fallback load function for missing types
40780
+ * @property {Function(LoadType):Promise<Visualization>=} load Fallback load function for missing types
40370
40781
  * @property {Context=} context Settings for the rendering instance
40371
40782
  * @property {Array<TypeInfo>=} types Visualization types to register
40372
40783
  * @property {Array<ThemeInfo>=} themes Themes to register
@@ -40785,6 +41196,7 @@
40785
41196
  * @param {FrequencyMode=} [options.frequencyMode=none] Show frequency none|value|percent|relative
40786
41197
  * @param {boolean=} [options.histogram=false] Show histogram bar (not applicable for existing objects)
40787
41198
  * @param {SearchMode=} [options.search=true] Show the search bar permanently, using the toggle button or when in selection: false|true|toggle
41199
+ * @param {boolean=} [options.showLock=false] Show the button for toggling locked state.
40788
41200
  * @param {boolean=} [options.toolbar=true] Show the toolbar
40789
41201
  * @param {boolean=} [options.checkboxes=false] Show values as checkboxes instead of as fields (not applicable for existing objects)
40790
41202
  * @param {boolean=} [options.dense=false] Reduces padding and text size (not applicable for existing objects)