asma-ui-table 1.0.127 → 1.0.128

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.
Files changed (60) hide show
  1. package/dist/asma-ui-table.es.js +340 -645
  2. package/dist/src/components/Fetching.d.ts +1 -0
  3. package/dist/src/components/StyledTableIndex.d.ts +5 -6
  4. package/dist/src/components/TableBody.d.ts +4 -4
  5. package/dist/src/components/TableRow.d.ts +5 -5
  6. package/dist/src/components/TableRows.d.ts +4 -4
  7. package/dist/src/components/TableSkeleton.d.ts +2 -2
  8. package/dist/src/components/columns/action-column/actionColumn.d.ts +87 -88
  9. package/dist/src/components/columns/action-column/components/HeaderActionMenu.d.ts +3 -3
  10. package/dist/src/components/columns/action-column/components/RowActionMenu.d.ts +4 -5
  11. package/dist/src/components/columns/dndHandleColumn.d.ts +210 -211
  12. package/dist/src/components/columns/expandColumn.d.ts +2 -3
  13. package/dist/src/components/columns/helpers/useElementHeightPx.d.ts +2 -1
  14. package/dist/src/components/columns/helpers/useProxyHorizontalScrollSync.d.ts +5 -4
  15. package/dist/src/components/columns/selectColumn.d.ts +3 -4
  16. package/dist/src/components/columns/showTextColumn.d.ts +2 -3
  17. package/dist/src/components/table-footer/TableFooter.d.ts +4 -4
  18. package/dist/src/components/table-footer/TablePagination.d.ts +3 -3
  19. package/dist/src/components/table-header/TableHeader.d.ts +4 -4
  20. package/dist/src/components/table-header/TableHeaderCell.d.ts +4 -4
  21. package/dist/src/context/RootContext.d.ts +1 -2
  22. package/dist/src/custom-features/expand-rows/ExpandRowsFeature.d.ts +1 -2
  23. package/dist/src/custom-features/expand-rows/index.d.ts +2 -2
  24. package/dist/src/custom-features/expand-rows/types.d.ts +1 -2
  25. package/dist/src/custom-features/focus-rows/FocusRowsFeature.d.ts +1 -2
  26. package/dist/src/custom-features/focus-rows/index.d.ts +1 -1
  27. package/dist/src/custom-features/focus-rows/types.d.ts +1 -2
  28. package/dist/src/custom-features/order-columns/OrderColumnsFeature.d.ts +1 -2
  29. package/dist/src/custom-features/order-columns/index.d.ts +1 -1
  30. package/dist/src/custom-features/order-columns/types.d.ts +1 -2
  31. package/dist/src/custom-features/order-columns/usePersistColumnOrder.d.ts +1 -2
  32. package/dist/src/helpers/cn.d.ts +1 -2
  33. package/dist/src/helpers/getTableHeaderStyle.d.ts +1 -2
  34. package/dist/src/helpers/injectColumns.d.ts +1 -2
  35. package/dist/src/hooks/useStyledTable.d.ts +2 -3
  36. package/dist/src/index.d.ts +4 -4
  37. package/dist/src/shared-components/CheckIcon.d.ts +2 -3
  38. package/dist/src/shared-components/ChevronDownIcon.d.ts +2 -3
  39. package/dist/src/shared-components/ChevronLeftIcon.d.ts +2 -3
  40. package/dist/src/shared-components/ChevronRightIcon.d.ts +2 -3
  41. package/dist/src/shared-components/ChevronUpIcon.d.ts +2 -3
  42. package/dist/src/shared-components/CircleWarningOutlineIcon.d.ts +2 -3
  43. package/dist/src/shared-components/DotsHorizontalIcon.d.ts +2 -3
  44. package/dist/src/shared-components/DotsVerticalIcon.d.ts +2 -3
  45. package/dist/src/shared-components/DropDownIcon.d.ts +2 -3
  46. package/dist/src/shared-components/DropUpIcon.d.ts +2 -3
  47. package/dist/src/shared-components/FilterIcon.d.ts +2 -3
  48. package/dist/src/shared-components/LoadingIcon.d.ts +2 -3
  49. package/dist/src/shared-components/PinIcon.d.ts +2 -3
  50. package/dist/src/shared-components/StyledCheckbox.d.ts +5 -6
  51. package/dist/src/shared-components/StyledMenuItem.d.ts +2 -3
  52. package/dist/src/shared-components/button/StyledButton.d.ts +2 -3
  53. package/dist/src/shared-components/button/index.d.ts +1 -1
  54. package/dist/src/shared-components/menu-item/index.d.ts +2 -3
  55. package/dist/src/shared-components/tooltip/index.d.ts +2 -3
  56. package/dist/src/types.d.ts +7 -8
  57. package/dist/style.css +1 -1
  58. package/dist/tailwind.config.d.ts +22 -32
  59. package/dist/vite.config.d.ts +1 -1
  60. package/package.json +1 -1
@@ -27,32 +27,6 @@ const INTERNAL_COLUMN_IDS = [
27
27
  DND_HANDLE_COLUMN_ID,
28
28
  SHOW_FULL_TEXT_ID
29
29
  ];
30
- function getAugmentedNamespace(n) {
31
- if (n.__esModule)
32
- return n;
33
- var f = n.default;
34
- if (typeof f == "function") {
35
- var a = function a2() {
36
- if (this instanceof a2) {
37
- return Reflect.construct(f, arguments, this.constructor);
38
- }
39
- return f.apply(this, arguments);
40
- };
41
- a.prototype = f.prototype;
42
- } else
43
- a = {};
44
- Object.defineProperty(a, "__esModule", { value: true });
45
- Object.keys(n).forEach(function(k) {
46
- var d = Object.getOwnPropertyDescriptor(n, k);
47
- Object.defineProperty(a, k, d.get ? d : {
48
- enumerable: true,
49
- get: function() {
50
- return n[k];
51
- }
52
- });
53
- });
54
- return a;
55
- }
56
30
  var jsxRuntime = { exports: {} };
57
31
  var reactJsxRuntime_production_min = {};
58
32
  /**
@@ -116,7 +90,7 @@ function requireReactJsxRuntime_development() {
116
90
  var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
117
91
  var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
118
92
  var REACT_MEMO_TYPE = Symbol.for("react.memo");
119
- var REACT_LAZY_TYPE2 = Symbol.for("react.lazy");
93
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
120
94
  var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
121
95
  var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
122
96
  var FAUX_ITERATOR_SYMBOL = "@@iterator";
@@ -173,7 +147,7 @@ function requireReactJsxRuntime_development() {
173
147
  return true;
174
148
  }
175
149
  if (typeof type === "object" && type !== null) {
176
- if (type.$$typeof === REACT_LAZY_TYPE2 || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
150
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
177
151
  // types supported by any Flight configuration anywhere since
178
152
  // we don't know which Flight build this will end up being used
179
153
  // with.
@@ -239,7 +213,7 @@ function requireReactJsxRuntime_development() {
239
213
  return outerName;
240
214
  }
241
215
  return getComponentNameFromType(type.type) || "Memo";
242
- case REACT_LAZY_TYPE2: {
216
+ case REACT_LAZY_TYPE: {
243
217
  var lazyComponent = type;
244
218
  var payload = lazyComponent._payload;
245
219
  var init = lazyComponent._init;
@@ -489,7 +463,7 @@ function requireReactJsxRuntime_development() {
489
463
  return describeFunctionComponentFrame(type.render);
490
464
  case REACT_MEMO_TYPE:
491
465
  return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
492
- case REACT_LAZY_TYPE2: {
466
+ case REACT_LAZY_TYPE: {
493
467
  var lazyComponent = type;
494
468
  var payload = lazyComponent._payload;
495
469
  var init = lazyComponent._init;
@@ -897,7 +871,6 @@ function requireReactJsxRuntime_development() {
897
871
  }
898
872
  }
899
873
  }
900
- var didWarnAboutKeySpread = {};
901
874
  function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
902
875
  {
903
876
  var validType = isValidElementType(type);
@@ -948,20 +921,6 @@ function requireReactJsxRuntime_development() {
948
921
  }
949
922
  }
950
923
  }
951
- {
952
- if (hasOwnProperty.call(props, "key")) {
953
- var componentName = getComponentNameFromType(type);
954
- var keys = Object.keys(props).filter(function(k) {
955
- return k !== "key";
956
- });
957
- var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
958
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
959
- var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
960
- error2('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
961
- didWarnAboutKeySpread[componentName + beforeExample] = true;
962
- }
963
- }
964
- }
965
924
  if (type === REACT_FRAGMENT_TYPE) {
966
925
  validateFragmentProps(element);
967
926
  } else {
@@ -1289,8 +1248,6 @@ function LiveRegion(_ref) {
1289
1248
  } = _ref;
1290
1249
  const visuallyHidden2 = {
1291
1250
  position: "fixed",
1292
- top: 0,
1293
- left: 0,
1294
1251
  width: 1,
1295
1252
  height: 1,
1296
1253
  margin: -1,
@@ -2101,12 +2058,11 @@ var KeyboardCode;
2101
2058
  KeyboardCode2["Up"] = "ArrowUp";
2102
2059
  KeyboardCode2["Esc"] = "Escape";
2103
2060
  KeyboardCode2["Enter"] = "Enter";
2104
- KeyboardCode2["Tab"] = "Tab";
2105
2061
  })(KeyboardCode || (KeyboardCode = {}));
2106
2062
  const defaultKeyboardCodes = {
2107
2063
  start: [KeyboardCode.Space, KeyboardCode.Enter],
2108
2064
  cancel: [KeyboardCode.Esc],
2109
- end: [KeyboardCode.Space, KeyboardCode.Enter, KeyboardCode.Tab]
2065
+ end: [KeyboardCode.Space, KeyboardCode.Enter]
2110
2066
  };
2111
2067
  const defaultKeyboardCoordinateGetter = (event, _ref) => {
2112
2068
  let {
@@ -2401,9 +2357,6 @@ class AbstractPointerSensor {
2401
2357
  passive: false
2402
2358
  });
2403
2359
  this.listeners.add(events2.end.name, this.handleEnd);
2404
- if (events2.cancel) {
2405
- this.listeners.add(events2.cancel.name, this.handleCancel);
2406
- }
2407
2360
  this.windowListeners.add(EventName.Resize, this.handleCancel);
2408
2361
  this.windowListeners.add(EventName.DragStart, preventDefault);
2409
2362
  this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);
@@ -2419,11 +2372,9 @@ class AbstractPointerSensor {
2419
2372
  }
2420
2373
  if (isDelayConstraint(activationConstraint)) {
2421
2374
  this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);
2422
- this.handlePending(activationConstraint);
2423
2375
  return;
2424
2376
  }
2425
2377
  if (isDistanceConstraint(activationConstraint)) {
2426
- this.handlePending(activationConstraint);
2427
2378
  return;
2428
2379
  }
2429
2380
  }
@@ -2438,13 +2389,6 @@ class AbstractPointerSensor {
2438
2389
  this.timeoutId = null;
2439
2390
  }
2440
2391
  }
2441
- handlePending(constraint, offset) {
2442
- const {
2443
- active,
2444
- onPending
2445
- } = this.props;
2446
- onPending(active, constraint, this.initialCoordinates, offset);
2447
- }
2448
2392
  handleStart() {
2449
2393
  const {
2450
2394
  initialCoordinates
@@ -2494,7 +2438,6 @@ class AbstractPointerSensor {
2494
2438
  return this.handleCancel();
2495
2439
  }
2496
2440
  }
2497
- this.handlePending(activationConstraint, delta);
2498
2441
  return;
2499
2442
  }
2500
2443
  if (event.cancelable) {
@@ -2504,24 +2447,16 @@ class AbstractPointerSensor {
2504
2447
  }
2505
2448
  handleEnd() {
2506
2449
  const {
2507
- onAbort,
2508
2450
  onEnd
2509
2451
  } = this.props;
2510
2452
  this.detach();
2511
- if (!this.activated) {
2512
- onAbort(this.props.active);
2513
- }
2514
2453
  onEnd();
2515
2454
  }
2516
2455
  handleCancel() {
2517
2456
  const {
2518
- onAbort,
2519
2457
  onCancel
2520
2458
  } = this.props;
2521
2459
  this.detach();
2522
- if (!this.activated) {
2523
- onAbort(this.props.active);
2524
- }
2525
2460
  onCancel();
2526
2461
  }
2527
2462
  handleKeydown(event) {
@@ -2535,9 +2470,6 @@ class AbstractPointerSensor {
2535
2470
  }
2536
2471
  }
2537
2472
  const events = {
2538
- cancel: {
2539
- name: "pointercancel"
2540
- },
2541
2473
  move: {
2542
2474
  name: "pointermove"
2543
2475
  },
@@ -2608,9 +2540,6 @@ MouseSensor.activators = [{
2608
2540
  }
2609
2541
  }];
2610
2542
  const events$2 = {
2611
- cancel: {
2612
- name: "touchcancel"
2613
- },
2614
2543
  move: {
2615
2544
  name: "touchmove"
2616
2545
  },
@@ -2819,11 +2748,11 @@ function useScrollIntent(_ref2) {
2819
2748
  }, [disabled, delta, previousDelta]);
2820
2749
  }
2821
2750
  function useCachedNode(draggableNodes, id) {
2822
- const draggableNode = id != null ? draggableNodes.get(id) : void 0;
2751
+ const draggableNode = id !== null ? draggableNodes.get(id) : void 0;
2823
2752
  const node = draggableNode ? draggableNode.node.current : null;
2824
2753
  return useLazyMemo((cachedNode) => {
2825
2754
  var _ref;
2826
- if (id == null) {
2755
+ if (id === null) {
2827
2756
  return null;
2828
2757
  }
2829
2758
  return (_ref = node != null ? node : cachedNode) != null ? _ref : null;
@@ -3023,23 +2952,7 @@ function useRect(element, measure, fallbackRect) {
3023
2952
  if (measure === void 0) {
3024
2953
  measure = defaultMeasure;
3025
2954
  }
3026
- const [rect, setRect] = useState(null);
3027
- function measureRect() {
3028
- setRect((currentRect) => {
3029
- if (!element) {
3030
- return null;
3031
- }
3032
- if (element.isConnected === false) {
3033
- var _ref;
3034
- return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;
3035
- }
3036
- const newRect = measure(element);
3037
- if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {
3038
- return currentRect;
3039
- }
3040
- return newRect;
3041
- });
3042
- }
2955
+ const [rect, measureRect] = useReducer(reducer2, null);
3043
2956
  const mutationObserver = useMutationObserver({
3044
2957
  callback(records) {
3045
2958
  if (!element) {
@@ -3074,6 +2987,20 @@ function useRect(element, measure, fallbackRect) {
3074
2987
  }
3075
2988
  }, [element]);
3076
2989
  return rect;
2990
+ function reducer2(currentRect) {
2991
+ if (!element) {
2992
+ return null;
2993
+ }
2994
+ if (element.isConnected === false) {
2995
+ var _ref;
2996
+ return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;
2997
+ }
2998
+ const newRect = measure(element);
2999
+ if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {
3000
+ return currentRect;
3001
+ }
3002
+ return newRect;
3003
+ }
3077
3004
  }
3078
3005
  function useRectDelta(rect) {
3079
3006
  const initialRect = useInitialValue(rect);
@@ -3222,24 +3149,28 @@ function useRects(elements, measure) {
3222
3149
  }
3223
3150
  const [firstElement] = elements;
3224
3151
  const windowRect = useWindowRect(firstElement ? getWindow$1(firstElement) : null);
3225
- const [rects, setRects] = useState(defaultValue$2);
3226
- function measureRects() {
3227
- setRects(() => {
3228
- if (!elements.length) {
3229
- return defaultValue$2;
3230
- }
3231
- return elements.map((element) => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));
3232
- });
3233
- }
3152
+ const [rects, measureRects] = useReducer(reducer2, defaultValue$2);
3234
3153
  const resizeObserver = useResizeObserver({
3235
3154
  callback: measureRects
3236
3155
  });
3237
- useIsomorphicLayoutEffect(() => {
3238
- resizeObserver == null ? void 0 : resizeObserver.disconnect();
3156
+ if (elements.length > 0 && rects === defaultValue$2) {
3239
3157
  measureRects();
3240
- elements.forEach((element) => resizeObserver == null ? void 0 : resizeObserver.observe(element));
3158
+ }
3159
+ useIsomorphicLayoutEffect(() => {
3160
+ if (elements.length) {
3161
+ elements.forEach((element) => resizeObserver == null ? void 0 : resizeObserver.observe(element));
3162
+ } else {
3163
+ resizeObserver == null ? void 0 : resizeObserver.disconnect();
3164
+ measureRects();
3165
+ }
3241
3166
  }, [elements]);
3242
3167
  return rects;
3168
+ function reducer2() {
3169
+ if (!elements.length) {
3170
+ return defaultValue$2;
3171
+ }
3172
+ return elements.map((element) => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));
3173
+ }
3243
3174
  }
3244
3175
  function getMeasurableNode(node) {
3245
3176
  if (!node) {
@@ -3406,7 +3337,7 @@ function reducer(state, action) {
3406
3337
  }
3407
3338
  };
3408
3339
  case Action.DragMove:
3409
- if (state.draggable.active == null) {
3340
+ if (!state.draggable.active) {
3410
3341
  return state;
3411
3342
  }
3412
3343
  return {
@@ -3668,7 +3599,7 @@ const DndContext = /* @__PURE__ */ memo$1(function DndContext2(_ref) {
3668
3599
  containers: droppableContainers
3669
3600
  }
3670
3601
  } = state;
3671
- const node = activeId != null ? draggableNodes.get(activeId) : null;
3602
+ const node = activeId ? draggableNodes.get(activeId) : null;
3672
3603
  const activeRects = useRef({
3673
3604
  initial: null,
3674
3605
  translated: null
@@ -3703,7 +3634,7 @@ const DndContext = /* @__PURE__ */ memo$1(function DndContext2(_ref) {
3703
3634
  const autoScrollOptions = getAutoScrollerOptions();
3704
3635
  const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure);
3705
3636
  useLayoutShiftScrollCompensation({
3706
- activeNode: activeId != null ? draggableNodes.get(activeId) : null,
3637
+ activeNode: activeId ? draggableNodes.get(activeId) : null,
3707
3638
  config: autoScrollOptions.layoutShiftCompensation,
3708
3639
  initialRect: initialActiveNodeRect,
3709
3640
  measure: measuringConfiguration.draggable.measure
@@ -3771,7 +3702,6 @@ const DndContext = /* @__PURE__ */ memo$1(function DndContext2(_ref) {
3771
3702
  const [over, setOver] = useState(null);
3772
3703
  const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);
3773
3704
  const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);
3774
- const activeSensorRef = useRef(null);
3775
3705
  const instantiateSensor = useCallback(
3776
3706
  (event, _ref2) => {
3777
3707
  let {
@@ -3794,43 +3724,6 @@ const DndContext = /* @__PURE__ */ memo$1(function DndContext2(_ref) {
3794
3724
  // Sensors need to be instantiated with refs for arguments that change over time
3795
3725
  // otherwise they are frozen in time with the stale arguments
3796
3726
  context: sensorContext,
3797
- onAbort(id2) {
3798
- const draggableNode = draggableNodes.get(id2);
3799
- if (!draggableNode) {
3800
- return;
3801
- }
3802
- const {
3803
- onDragAbort
3804
- } = latestProps.current;
3805
- const event2 = {
3806
- id: id2
3807
- };
3808
- onDragAbort == null ? void 0 : onDragAbort(event2);
3809
- dispatchMonitorEvent({
3810
- type: "onDragAbort",
3811
- event: event2
3812
- });
3813
- },
3814
- onPending(id2, constraint, initialCoordinates, offset) {
3815
- const draggableNode = draggableNodes.get(id2);
3816
- if (!draggableNode) {
3817
- return;
3818
- }
3819
- const {
3820
- onDragPending
3821
- } = latestProps.current;
3822
- const event2 = {
3823
- id: id2,
3824
- constraint,
3825
- initialCoordinates,
3826
- offset
3827
- };
3828
- onDragPending == null ? void 0 : onDragPending(event2);
3829
- dispatchMonitorEvent({
3830
- type: "onDragPending",
3831
- event: event2
3832
- });
3833
- },
3834
3727
  onStart(initialCoordinates) {
3835
3728
  const id2 = activeRef.current;
3836
3729
  if (id2 == null) {
@@ -3844,7 +3737,6 @@ const DndContext = /* @__PURE__ */ memo$1(function DndContext2(_ref) {
3844
3737
  onDragStart
3845
3738
  } = latestProps.current;
3846
3739
  const event2 = {
3847
- activatorEvent: activatorEvent2,
3848
3740
  active: {
3849
3741
  id: id2,
3850
3742
  data: draggableNode.data,
@@ -3863,8 +3755,6 @@ const DndContext = /* @__PURE__ */ memo$1(function DndContext2(_ref) {
3863
3755
  type: "onDragStart",
3864
3756
  event: event2
3865
3757
  });
3866
- setActiveSensor(activeSensorRef.current);
3867
- setActivatorEvent(activatorEvent2);
3868
3758
  });
3869
3759
  },
3870
3760
  onMove(coordinates) {
@@ -3876,7 +3766,10 @@ const DndContext = /* @__PURE__ */ memo$1(function DndContext2(_ref) {
3876
3766
  onEnd: createHandler(Action.DragEnd),
3877
3767
  onCancel: createHandler(Action.DragCancel)
3878
3768
  });
3879
- activeSensorRef.current = sensorInstance;
3769
+ unstable_batchedUpdates(() => {
3770
+ setActiveSensor(sensorInstance);
3771
+ setActivatorEvent(event.nativeEvent);
3772
+ });
3880
3773
  function createHandler(type) {
3881
3774
  return async function handler() {
3882
3775
  const {
@@ -3913,7 +3806,6 @@ const DndContext = /* @__PURE__ */ memo$1(function DndContext2(_ref) {
3913
3806
  setOver(null);
3914
3807
  setActiveSensor(null);
3915
3808
  setActivatorEvent(null);
3916
- activeSensorRef.current = null;
3917
3809
  const eventName = type === Action.DragEnd ? "onDragEnd" : "onDragCancel";
3918
3810
  if (event2) {
3919
3811
  const handler2 = latestProps.current[eventName];
@@ -4139,7 +4031,7 @@ const DndContext = /* @__PURE__ */ memo$1(function DndContext2(_ref) {
4139
4031
  });
4140
4032
  const NullContext = /* @__PURE__ */ createContext(null);
4141
4033
  const defaultRole = "button";
4142
- const ID_PREFIX$1 = "Draggable";
4034
+ const ID_PREFIX$1 = "Droppable";
4143
4035
  function useDraggable(_ref) {
4144
4036
  let {
4145
4037
  id,
@@ -4288,7 +4180,7 @@ function useDroppable(_ref) {
4288
4180
  resizeObserverConnected.current = false;
4289
4181
  resizeObserver.observe(nodeRef.current);
4290
4182
  }, [nodeRef, resizeObserver]);
4291
- useEffect(
4183
+ useIsomorphicLayoutEffect(
4292
4184
  () => {
4293
4185
  dispatch({
4294
4186
  type: Action.RegisterDroppable,
@@ -4891,11 +4783,6 @@ const mobileView = (windowWidth) => {
4891
4783
  return window.innerWidth < 743;
4892
4784
  return windowWidth <= 743;
4893
4785
  };
4894
- function useIsMobileView() {
4895
- const windowsSize = useWindowWidthSize();
4896
- const result = mobileView(windowsSize);
4897
- return result;
4898
- }
4899
4786
  /**
4900
4787
  * table-core
4901
4788
  *
@@ -8240,10 +8127,7 @@ function createStableCallback() {
8240
8127
  }
8241
8128
  function assertNotCalled() {
8242
8129
  if (process.env.NODE_ENV !== "production") {
8243
- throw (
8244
- /* minify-error-disabled */
8245
- new Error("Base UI: Cannot call an event handler while rendering.")
8246
- );
8130
+ throw new Error("Base UI: Cannot call an event handler while rendering.");
8247
8131
  }
8248
8132
  }
8249
8133
  const noop$1 = () => {
@@ -8435,7 +8319,7 @@ const majorVersion = parseInt(React.version, 10);
8435
8319
  function isReactVersionAtLeast(reactVersionToCheck) {
8436
8320
  return majorVersion >= reactVersionToCheck;
8437
8321
  }
8438
- function getReactElementRef$1(element) {
8322
+ function getReactElementRef(element) {
8439
8323
  if (!/* @__PURE__ */ React.isValidElement(element)) {
8440
8324
  return null;
8441
8325
  }
@@ -8634,9 +8518,9 @@ function useRenderElementProps(componentProps, params = {}) {
8634
8518
  if (!enabled) {
8635
8519
  useMergedRefs(null, null);
8636
8520
  } else if (Array.isArray(ref)) {
8637
- outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef$1(renderProp), ...ref]);
8521
+ outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
8638
8522
  } else {
8639
- outProps.ref = useMergedRefs(outProps.ref, getReactElementRef$1(renderProp), ref);
8523
+ outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
8640
8524
  }
8641
8525
  }
8642
8526
  if (!enabled) {
@@ -8650,7 +8534,6 @@ function useRenderElementProps(componentProps, params = {}) {
8650
8534
  }
8651
8535
  return outProps;
8652
8536
  }
8653
- const REACT_LAZY_TYPE = Symbol.for("react.lazy");
8654
8537
  function evaluateRenderProp(element, render, props, state) {
8655
8538
  if (render) {
8656
8539
  if (typeof render === "function") {
@@ -8658,17 +8541,7 @@ function evaluateRenderProp(element, render, props, state) {
8658
8541
  }
8659
8542
  const mergedProps = mergeProps(props, render.props);
8660
8543
  mergedProps.ref = props.ref;
8661
- let newElement = render;
8662
- if ((newElement == null ? void 0 : newElement.$$typeof) === REACT_LAZY_TYPE) {
8663
- const children = React.Children.toArray(render);
8664
- newElement = children[0];
8665
- }
8666
- if (process.env.NODE_ENV !== "production") {
8667
- if (!/* @__PURE__ */ React.isValidElement(newElement)) {
8668
- throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
8669
- }
8670
- }
8671
- return /* @__PURE__ */ React.cloneElement(newElement, mergedProps);
8544
+ return /* @__PURE__ */ React.cloneElement(render, mergedProps);
8672
8545
  }
8673
8546
  if (element) {
8674
8547
  if (typeof element === "string") {
@@ -8817,21 +8690,16 @@ function useButton(parameters = {}) {
8817
8690
  });
8818
8691
  if (process.env.NODE_ENV !== "production") {
8819
8692
  React.useEffect(() => {
8820
- var _a, _b;
8821
8693
  if (!elementRef.current) {
8822
8694
  return;
8823
8695
  }
8824
8696
  const isButtonTag = elementRef.current.tagName === "BUTTON";
8825
8697
  if (isNativeButton) {
8826
8698
  if (!isButtonTag) {
8827
- const ownerStackMessage = ((_a = SafeReact.captureOwnerStack) == null ? void 0 : _a.call(SafeReact)) || "";
8828
- const message = "A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`.";
8829
- error$1(`${message}${ownerStackMessage}`);
8699
+ error$1("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`.");
8830
8700
  }
8831
8701
  } else if (isButtonTag) {
8832
- const ownerStackMessage = ((_b = SafeReact.captureOwnerStack) == null ? void 0 : _b.call(SafeReact)) || "";
8833
- const message = "A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`.";
8834
- error$1(`${message}${ownerStackMessage}`);
8702
+ error$1("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.");
8835
8703
  }
8836
8704
  }, [isNativeButton]);
8837
8705
  }
@@ -9082,7 +8950,7 @@ function useField(params) {
9082
8950
  }
9083
8951
  const LabelableContext = /* @__PURE__ */ React.createContext({
9084
8952
  controlId: void 0,
9085
- registerControlId: NOOP,
8953
+ setControlId: NOOP,
9086
8954
  labelId: void 0,
9087
8955
  setLabelId: NOOP,
9088
8956
  messageIds: [],
@@ -9193,7 +9061,7 @@ const CheckboxRoot = /* @__PURE__ */ React.forwardRef(function CheckboxRoot2(com
9193
9061
  const {
9194
9062
  labelId,
9195
9063
  controlId,
9196
- registerControlId,
9064
+ setControlId,
9197
9065
  getDescriptionProps
9198
9066
  } = useLabelableContext();
9199
9067
  const groupContext = useCheckboxGroupContext();
@@ -9229,8 +9097,6 @@ const CheckboxRoot = /* @__PURE__ */ React.forwardRef(function CheckboxRoot2(com
9229
9097
  const setGroupValue = groupContext == null ? void 0 : groupContext.setValue;
9230
9098
  const defaultGroupValue = groupContext == null ? void 0 : groupContext.defaultValue;
9231
9099
  const controlRef = React.useRef(null);
9232
- const controlSourceRef = useRefWithInit(() => Symbol("checkbox-control"));
9233
- const hasRegisteredRef = React.useRef(false);
9234
9100
  const {
9235
9101
  getButtonProps,
9236
9102
  buttonRef
@@ -9246,23 +9112,14 @@ const CheckboxRoot = /* @__PURE__ */ React.forwardRef(function CheckboxRoot2(com
9246
9112
  state: "checked"
9247
9113
  });
9248
9114
  useIsoLayoutEffect(() => {
9249
- if (registerControlId === NOOP) {
9115
+ if (setControlId === NOOP) {
9250
9116
  return void 0;
9251
9117
  }
9252
- hasRegisteredRef.current = true;
9253
- registerControlId(controlSourceRef.current, inputId);
9254
- return void 0;
9255
- }, [inputId, groupContext, registerControlId, parent, controlSourceRef]);
9256
- React.useEffect(() => {
9257
- const controlSource = controlSourceRef.current;
9118
+ setControlId(inputId);
9258
9119
  return () => {
9259
- if (!hasRegisteredRef.current || registerControlId === NOOP) {
9260
- return;
9261
- }
9262
- hasRegisteredRef.current = false;
9263
- registerControlId(controlSource, void 0);
9120
+ setControlId(void 0);
9264
9121
  };
9265
- }, [registerControlId, controlSourceRef]);
9122
+ }, [inputId, groupContext, setControlId, parent]);
9266
9123
  useField({
9267
9124
  enabled: !groupContext,
9268
9125
  id,
@@ -9343,14 +9200,9 @@ const CheckboxRoot = /* @__PURE__ */ React.forwardRef(function CheckboxRoot2(com
9343
9200
  const computedChecked = isGroupedWithParent ? Boolean(groupChecked) : checked;
9344
9201
  const computedIndeterminate = isGroupedWithParent ? groupIndeterminate || indeterminate : indeterminate;
9345
9202
  React.useEffect(() => {
9346
- if (!parentContext || !value) {
9347
- return void 0;
9203
+ if (parentContext && value) {
9204
+ parentContext.disabledStatesRef.current.set(value, disabled);
9348
9205
  }
9349
- const disabledStates = parentContext.disabledStatesRef.current;
9350
- disabledStates.set(value, disabled);
9351
- return () => {
9352
- disabledStates.delete(value);
9353
- };
9354
9206
  }, [parentContext, disabled, value]);
9355
9207
  const state = React.useMemo(() => ({
9356
9208
  ...fieldState,
@@ -9392,13 +9244,7 @@ const CheckboxRoot = /* @__PURE__ */ React.forwardRef(function CheckboxRoot2(com
9392
9244
  return;
9393
9245
  }
9394
9246
  event.preventDefault();
9395
- (_a = inputRef.current) == null ? void 0 : _a.dispatchEvent(new PointerEvent("click", {
9396
- bubbles: true,
9397
- shiftKey: event.shiftKey,
9398
- ctrlKey: event.ctrlKey,
9399
- altKey: event.altKey,
9400
- metaKey: event.metaKey
9401
- }));
9247
+ (_a = inputRef.current) == null ? void 0 : _a.click();
9402
9248
  }
9403
9249
  }, getDescriptionProps, validation.getValidationProps, elementProps, otherGroupProps, getButtonProps],
9404
9250
  stateAttributesMapping
@@ -9456,7 +9302,7 @@ class Scheduler {
9456
9302
  this.nextId += 1;
9457
9303
  this.callbacks.push(fn);
9458
9304
  this.callbacksCount += 1;
9459
- const didRAFChange = process.env.NODE_ENV !== "production" && LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
9305
+ const didRAFChange = process.env.NODE_ENV === "test" && LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
9460
9306
  if (!this.isScheduled || didRAFChange) {
9461
9307
  requestAnimationFrame(this.tick);
9462
9308
  this.isScheduled = true;
@@ -9684,15 +9530,14 @@ const CheckboxIndicator = /* @__PURE__ */ React.forwardRef(function CheckboxIndi
9684
9530
  const rootState = useCheckboxRootContext();
9685
9531
  const rendered = rootState.checked || rootState.indeterminate;
9686
9532
  const {
9687
- mounted,
9688
9533
  transitionStatus,
9689
9534
  setMounted
9690
9535
  } = useTransitionStatus(rendered);
9691
9536
  const indicatorRef = React.useRef(null);
9692
- const state = {
9537
+ const state = React.useMemo(() => ({
9693
9538
  ...rootState,
9694
9539
  transitionStatus
9695
- };
9540
+ }), [rootState, transitionStatus]);
9696
9541
  useOpenChangeComplete({
9697
9542
  open: rendered,
9698
9543
  ref: indicatorRef,
@@ -9708,8 +9553,9 @@ const CheckboxIndicator = /* @__PURE__ */ React.forwardRef(function CheckboxIndi
9708
9553
  ...transitionStatusMapping,
9709
9554
  ...fieldValidityMapping
9710
9555
  }), [baseStateAttributesMapping]);
9711
- const shouldRender = keepMounted || mounted;
9556
+ const shouldRender = keepMounted || rendered;
9712
9557
  const element = useRenderElement("span", componentProps, {
9558
+ enabled: shouldRender,
9713
9559
  ref: [forwardedRef, indicatorRef],
9714
9560
  state,
9715
9561
  stateAttributesMapping,
@@ -9956,18 +9802,18 @@ const StyledMenuItem$1 = (props) => {
9956
9802
  }
9957
9803
  );
9958
9804
  };
9959
- const contained = "_contained_17pcg_6";
9960
- const common$2 = "_common_17pcg_6";
9961
- const medium = "_medium_17pcg_48";
9962
- const small = "_small_17pcg_53";
9963
- const large = "_large_17pcg_58";
9964
- const error = "_error_17pcg_68";
9965
- const outlined = "_outlined_17pcg_130";
9966
- const text = "_text_17pcg_254";
9967
- const textGray = "_textGray_17pcg_378";
9968
- const textWhite = "_textWhite_17pcg_440";
9805
+ const contained = "_contained_gteum_27";
9806
+ const common$2 = "_common_gteum_27";
9807
+ const medium = "_medium_gteum_69";
9808
+ const small = "_small_gteum_74";
9809
+ const large = "_large_gteum_79";
9810
+ const error = "_error_gteum_84";
9811
+ const outlined = "_outlined_gteum_141";
9812
+ const text = "_text_gteum_255";
9813
+ const textGray = "_textGray_gteum_369";
9814
+ const textWhite = "_textWhite_gteum_426";
9969
9815
  const style$4 = {
9970
- "asma-core-ui-button": "_asma-core-ui-button_17pcg_1",
9816
+ "asma-core-ui-button": "_asma-core-ui-button_gteum_1",
9971
9817
  contained,
9972
9818
  common: common$2,
9973
9819
  medium,
@@ -10043,34 +9889,44 @@ const StyledButton = ({
10043
9889
  );
10044
9890
  };
10045
9891
  function _extends() {
10046
- return _extends = Object.assign ? Object.assign.bind() : function(n) {
10047
- for (var e = 1; e < arguments.length; e++) {
10048
- var t = arguments[e];
10049
- for (var r2 in t)
10050
- ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
9892
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
9893
+ for (var i = 1; i < arguments.length; i++) {
9894
+ var source = arguments[i];
9895
+ for (var key in source) {
9896
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
9897
+ target[key] = source[key];
9898
+ }
9899
+ }
10051
9900
  }
10052
- return n;
10053
- }, _extends.apply(null, arguments);
9901
+ return target;
9902
+ };
9903
+ return _extends.apply(this, arguments);
10054
9904
  }
10055
- function _objectWithoutPropertiesLoose(r2, e) {
10056
- if (null == r2)
9905
+ function _objectWithoutPropertiesLoose(source, excluded) {
9906
+ if (source == null)
10057
9907
  return {};
10058
- var t = {};
10059
- for (var n in r2)
10060
- if ({}.hasOwnProperty.call(r2, n)) {
10061
- if (-1 !== e.indexOf(n))
10062
- continue;
10063
- t[n] = r2[n];
10064
- }
10065
- return t;
9908
+ var target = {};
9909
+ var sourceKeys = Object.keys(source);
9910
+ var key, i;
9911
+ for (i = 0; i < sourceKeys.length; i++) {
9912
+ key = sourceKeys[i];
9913
+ if (excluded.indexOf(key) >= 0)
9914
+ continue;
9915
+ target[key] = source[key];
9916
+ }
9917
+ return target;
10066
9918
  }
10067
- function _setPrototypeOf(t, e) {
10068
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
10069
- return t2.__proto__ = e2, t2;
10070
- }, _setPrototypeOf(t, e);
9919
+ function _setPrototypeOf(o, p) {
9920
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
9921
+ o2.__proto__ = p2;
9922
+ return o2;
9923
+ };
9924
+ return _setPrototypeOf(o, p);
10071
9925
  }
10072
- function _inheritsLoose(t, o) {
10073
- t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
9926
+ function _inheritsLoose(subClass, superClass) {
9927
+ subClass.prototype = Object.create(superClass.prototype);
9928
+ subClass.prototype.constructor = subClass;
9929
+ _setPrototypeOf(subClass, superClass);
10074
9930
  }
10075
9931
  const config = {
10076
9932
  disabled: false
@@ -10529,6 +10385,39 @@ function chainPropTypes(propType1, propType2) {
10529
10385
  return propType1(...args) || propType2(...args);
10530
10386
  };
10531
10387
  }
10388
+ function isPlainObject(item) {
10389
+ return item !== null && typeof item === "object" && item.constructor === Object;
10390
+ }
10391
+ function deepClone(source) {
10392
+ if (!isPlainObject(source)) {
10393
+ return source;
10394
+ }
10395
+ const output = {};
10396
+ Object.keys(source).forEach((key) => {
10397
+ output[key] = deepClone(source[key]);
10398
+ });
10399
+ return output;
10400
+ }
10401
+ function deepmerge(target, source, options = {
10402
+ clone: true
10403
+ }) {
10404
+ const output = options.clone ? _extends({}, target) : target;
10405
+ if (isPlainObject(target) && isPlainObject(source)) {
10406
+ Object.keys(source).forEach((key) => {
10407
+ if (key === "__proto__") {
10408
+ return;
10409
+ }
10410
+ if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
10411
+ output[key] = deepmerge(target[key], source[key], options);
10412
+ } else if (options.clone) {
10413
+ output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
10414
+ } else {
10415
+ output[key] = source[key];
10416
+ }
10417
+ });
10418
+ }
10419
+ return output;
10420
+ }
10532
10421
  function isClassComponent(elementType) {
10533
10422
  const {
10534
10423
  prototype = {}
@@ -10558,60 +10447,71 @@ function acceptingRef(props, propName, componentName, location, propFullName) {
10558
10447
  const elementAcceptingRef = chainPropTypes(PropTypes.element, acceptingRef);
10559
10448
  elementAcceptingRef.isRequired = chainPropTypes(PropTypes.element.isRequired, acceptingRef);
10560
10449
  const elementAcceptingRef$1 = elementAcceptingRef;
10561
- function getReactElementRef(element) {
10562
- if (parseInt(React.version, 10) >= 19) {
10563
- var _element$props;
10564
- return (element == null || (_element$props = element.props) == null ? void 0 : _element$props.ref) || null;
10565
- }
10566
- return (element == null ? void 0 : element.ref) || null;
10567
- }
10568
- function formatMuiErrorMessage$1(code) {
10450
+ function formatMuiErrorMessage(code) {
10569
10451
  let url = "https://mui.com/production-error/?code=" + code;
10570
10452
  for (let i = 1; i < arguments.length; i += 1) {
10571
10453
  url += "&args[]=" + encodeURIComponent(arguments[i]);
10572
10454
  }
10573
10455
  return "Minified MUI error #" + code + "; visit " + url + " for the full message.";
10574
10456
  }
10575
- const formatMuiErrorMessage = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10576
- __proto__: null,
10577
- default: formatMuiErrorMessage$1
10578
- }, Symbol.toStringTag, { value: "Module" }));
10579
- function isPlainObject(item) {
10580
- if (typeof item !== "object" || item === null) {
10581
- return false;
10457
+ function capitalize(string) {
10458
+ if (typeof string !== "string") {
10459
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`capitalize(string)\` expects a string argument.` : formatMuiErrorMessage(7));
10582
10460
  }
10583
- const prototype = Object.getPrototypeOf(item);
10584
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
10461
+ return string.charAt(0).toUpperCase() + string.slice(1);
10585
10462
  }
10586
- function deepClone(source) {
10587
- if (/* @__PURE__ */ React.isValidElement(source) || !isPlainObject(source)) {
10588
- return source;
10463
+ function setRef(ref, value) {
10464
+ if (typeof ref === "function") {
10465
+ ref(value);
10466
+ } else if (ref) {
10467
+ ref.current = value;
10589
10468
  }
10590
- const output = {};
10591
- Object.keys(source).forEach((key) => {
10592
- output[key] = deepClone(source[key]);
10593
- });
10594
- return output;
10595
10469
  }
10596
- function deepmerge(target, source, options = {
10597
- clone: true
10598
- }) {
10599
- const output = options.clone ? _extends({}, target) : target;
10600
- if (isPlainObject(target) && isPlainObject(source)) {
10601
- Object.keys(source).forEach((key) => {
10602
- if (/* @__PURE__ */ React.isValidElement(source[key])) {
10603
- output[key] = source[key];
10604
- } else if (isPlainObject(source[key]) && // Avoid prototype pollution
10605
- Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
10606
- output[key] = deepmerge(target[key], source[key], options);
10607
- } else if (options.clone) {
10608
- output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
10609
- } else {
10610
- output[key] = source[key];
10611
- }
10612
- });
10613
- }
10614
- return output;
10470
+ function useForkRef(...refs) {
10471
+ return React.useMemo(() => {
10472
+ if (refs.every((ref) => ref == null)) {
10473
+ return null;
10474
+ }
10475
+ return (instance) => {
10476
+ refs.forEach((ref) => {
10477
+ setRef(ref, instance);
10478
+ });
10479
+ };
10480
+ }, refs);
10481
+ }
10482
+ const defaultGenerator = (componentName) => componentName;
10483
+ const createClassNameGenerator = () => {
10484
+ let generate = defaultGenerator;
10485
+ return {
10486
+ configure(generator) {
10487
+ generate = generator;
10488
+ },
10489
+ generate(componentName) {
10490
+ return generate(componentName);
10491
+ },
10492
+ reset() {
10493
+ generate = defaultGenerator;
10494
+ }
10495
+ };
10496
+ };
10497
+ const ClassNameGenerator = createClassNameGenerator();
10498
+ const ClassNameGenerator$1 = ClassNameGenerator;
10499
+ const globalStateClassesMapping = {
10500
+ active: "active",
10501
+ checked: "checked",
10502
+ completed: "completed",
10503
+ disabled: "disabled",
10504
+ readOnly: "readOnly",
10505
+ error: "error",
10506
+ expanded: "expanded",
10507
+ focused: "focused",
10508
+ focusVisible: "focusVisible",
10509
+ required: "required",
10510
+ selected: "selected"
10511
+ };
10512
+ function generateUtilityClass(componentName, slot, globalStatePrefix = "Mui") {
10513
+ const globalStateClass = globalStateClassesMapping[slot];
10514
+ return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
10615
10515
  }
10616
10516
  const _excluded$6 = ["values", "unit", "step"];
10617
10517
  const sortBreakpointsValues = (values2) => {
@@ -10763,12 +10663,6 @@ function removeUnusedBreakpoints(breakpointKeys, style2) {
10763
10663
  return acc;
10764
10664
  }, style2);
10765
10665
  }
10766
- function capitalize(string) {
10767
- if (typeof string !== "string") {
10768
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`capitalize(string)\` expects a string argument.` : formatMuiErrorMessage$1(7));
10769
- }
10770
- return string.charAt(0).toUpperCase() + string.slice(1);
10771
- }
10772
10666
  function getPath(obj, path, checkVars = true) {
10773
10667
  if (!path || typeof path !== "string") {
10774
10668
  return null;
@@ -11019,25 +10913,51 @@ function borderTransform(value) {
11019
10913
  }
11020
10914
  return `${value}px solid`;
11021
10915
  }
11022
- function createBorderStyle(prop, transform) {
11023
- return style$3({
11024
- prop,
11025
- themeKey: "borders",
11026
- transform
11027
- });
11028
- }
11029
- const border = createBorderStyle("border", borderTransform);
11030
- const borderTop = createBorderStyle("borderTop", borderTransform);
11031
- const borderRight = createBorderStyle("borderRight", borderTransform);
11032
- const borderBottom = createBorderStyle("borderBottom", borderTransform);
11033
- const borderLeft = createBorderStyle("borderLeft", borderTransform);
11034
- const borderColor = createBorderStyle("borderColor");
11035
- const borderTopColor = createBorderStyle("borderTopColor");
11036
- const borderRightColor = createBorderStyle("borderRightColor");
11037
- const borderBottomColor = createBorderStyle("borderBottomColor");
11038
- const borderLeftColor = createBorderStyle("borderLeftColor");
11039
- const outline = createBorderStyle("outline", borderTransform);
11040
- const outlineColor = createBorderStyle("outlineColor");
10916
+ const border = style$3({
10917
+ prop: "border",
10918
+ themeKey: "borders",
10919
+ transform: borderTransform
10920
+ });
10921
+ const borderTop = style$3({
10922
+ prop: "borderTop",
10923
+ themeKey: "borders",
10924
+ transform: borderTransform
10925
+ });
10926
+ const borderRight = style$3({
10927
+ prop: "borderRight",
10928
+ themeKey: "borders",
10929
+ transform: borderTransform
10930
+ });
10931
+ const borderBottom = style$3({
10932
+ prop: "borderBottom",
10933
+ themeKey: "borders",
10934
+ transform: borderTransform
10935
+ });
10936
+ const borderLeft = style$3({
10937
+ prop: "borderLeft",
10938
+ themeKey: "borders",
10939
+ transform: borderTransform
10940
+ });
10941
+ const borderColor = style$3({
10942
+ prop: "borderColor",
10943
+ themeKey: "palette"
10944
+ });
10945
+ const borderTopColor = style$3({
10946
+ prop: "borderTopColor",
10947
+ themeKey: "palette"
10948
+ });
10949
+ const borderRightColor = style$3({
10950
+ prop: "borderRightColor",
10951
+ themeKey: "palette"
10952
+ });
10953
+ const borderBottomColor = style$3({
10954
+ prop: "borderBottomColor",
10955
+ themeKey: "palette"
10956
+ });
10957
+ const borderLeftColor = style$3({
10958
+ prop: "borderLeftColor",
10959
+ themeKey: "palette"
10960
+ });
11041
10961
  const borderRadius = (props) => {
11042
10962
  if (props.borderRadius !== void 0 && props.borderRadius !== null) {
11043
10963
  const transformer = createUnaryUnit(props.theme, "shape.borderRadius", 4, "borderRadius");
@@ -11052,7 +10972,7 @@ borderRadius.propTypes = process.env.NODE_ENV !== "production" ? {
11052
10972
  borderRadius: responsivePropType$1
11053
10973
  } : {};
11054
10974
  borderRadius.filterProps = ["borderRadius"];
11055
- compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);
10975
+ compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius);
11056
10976
  const gap = (props) => {
11057
10977
  if (props.gap !== void 0 && props.gap !== null) {
11058
10978
  const transformer = createUnaryUnit(props.theme, "spacing", 8, "gap");
@@ -11156,20 +11076,10 @@ const width = style$3({
11156
11076
  const maxWidth = (props) => {
11157
11077
  if (props.maxWidth !== void 0 && props.maxWidth !== null) {
11158
11078
  const styleFromPropValue = (propValue) => {
11159
- var _props$theme, _props$theme2;
11160
- const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || values[propValue];
11161
- if (!breakpoint) {
11162
- return {
11163
- maxWidth: sizingTransform(propValue)
11164
- };
11165
- }
11166
- if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== "px") {
11167
- return {
11168
- maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`
11169
- };
11170
- }
11079
+ var _props$theme, _props$theme$breakpoi, _props$theme$breakpoi2;
11080
+ const breakpoint = ((_props$theme = props.theme) == null ? void 0 : (_props$theme$breakpoi = _props$theme.breakpoints) == null ? void 0 : (_props$theme$breakpoi2 = _props$theme$breakpoi.values) == null ? void 0 : _props$theme$breakpoi2[propValue]) || values[propValue];
11171
11081
  return {
11172
- maxWidth: breakpoint
11082
+ maxWidth: breakpoint || sizingTransform(propValue)
11173
11083
  };
11174
11084
  };
11175
11085
  return handleBreakpoints(props, props.maxWidth, styleFromPropValue);
@@ -11244,13 +11154,6 @@ const defaultSxConfig = {
11244
11154
  borderLeftColor: {
11245
11155
  themeKey: "palette"
11246
11156
  },
11247
- outline: {
11248
- themeKey: "borders",
11249
- transform: borderTransform
11250
- },
11251
- outlineColor: {
11252
- themeKey: "palette"
11253
- },
11254
11157
  borderRadius: {
11255
11158
  themeKey: "shape.borderRadius",
11256
11159
  style: borderRadius
@@ -11549,8 +11452,7 @@ function unstable_createStyleFunctionSx() {
11549
11452
  var _theme$unstable_sxCon;
11550
11453
  const {
11551
11454
  sx,
11552
- theme = {},
11553
- nested
11455
+ theme = {}
11554
11456
  } = props || {};
11555
11457
  if (!sx) {
11556
11458
  return null;
@@ -11584,8 +11486,7 @@ function unstable_createStyleFunctionSx() {
11584
11486
  if (objectsHaveSameKeys(breakpointsValues, value)) {
11585
11487
  css[styleKey] = styleFunctionSx2({
11586
11488
  sx: value,
11587
- theme,
11588
- nested: true
11489
+ theme
11589
11490
  });
11590
11491
  } else {
11591
11492
  css = merge(css, breakpointsValues);
@@ -11596,11 +11497,6 @@ function unstable_createStyleFunctionSx() {
11596
11497
  }
11597
11498
  }
11598
11499
  });
11599
- if (!nested && theme.modularCssLayers) {
11600
- return {
11601
- "@layer sx": removeUnusedBreakpoints(breakpointsKeys, css)
11602
- };
11603
- }
11604
11500
  return removeUnusedBreakpoints(breakpointsKeys, css);
11605
11501
  }
11606
11502
  return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
@@ -11610,19 +11506,6 @@ function unstable_createStyleFunctionSx() {
11610
11506
  const styleFunctionSx = unstable_createStyleFunctionSx();
11611
11507
  styleFunctionSx.filterProps = ["sx"];
11612
11508
  const styleFunctionSx$1 = styleFunctionSx;
11613
- function applyStyles(key, styles2) {
11614
- const theme = this;
11615
- if (theme.vars && typeof theme.getColorSchemeSelector === "function") {
11616
- const selector = theme.getColorSchemeSelector(key).replace(/(\[[^\]]+\])/, "*:where($1)");
11617
- return {
11618
- [selector]: styles2
11619
- };
11620
- }
11621
- if (theme.palette.mode === key) {
11622
- return styles2;
11623
- }
11624
- return {};
11625
- }
11626
11509
  const _excluded$5 = ["breakpoints", "palette", "spacing", "shape"];
11627
11510
  function createTheme$1(options = {}, ...args) {
11628
11511
  const {
@@ -11644,7 +11527,6 @@ function createTheme$1(options = {}, ...args) {
11644
11527
  spacing,
11645
11528
  shape: _extends({}, shape$1, shapeInput)
11646
11529
  }, other);
11647
- muiTheme.applyStyles = applyStyles;
11648
11530
  muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
11649
11531
  muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
11650
11532
  muiTheme.unstable_sx = function sx(props) {
@@ -11666,126 +11548,13 @@ const systemDefaultTheme = createTheme$1();
11666
11548
  function useTheme$1(defaultTheme2 = systemDefaultTheme) {
11667
11549
  return useTheme$2(defaultTheme2);
11668
11550
  }
11669
- const defaultGenerator = (componentName) => componentName;
11670
- const createClassNameGenerator = () => {
11671
- let generate = defaultGenerator;
11672
- return {
11673
- configure(generator) {
11674
- generate = generator;
11675
- },
11676
- generate(componentName) {
11677
- return generate(componentName);
11678
- },
11679
- reset() {
11680
- generate = defaultGenerator;
11681
- }
11682
- };
11683
- };
11684
- const ClassNameGenerator = createClassNameGenerator();
11685
- const ClassNameGenerator$1 = ClassNameGenerator;
11686
- const globalStateClasses = {
11687
- active: "active",
11688
- checked: "checked",
11689
- completed: "completed",
11690
- disabled: "disabled",
11691
- error: "error",
11692
- expanded: "expanded",
11693
- focused: "focused",
11694
- focusVisible: "focusVisible",
11695
- open: "open",
11696
- readOnly: "readOnly",
11697
- required: "required",
11698
- selected: "selected"
11699
- };
11700
- function generateUtilityClass(componentName, slot, globalStatePrefix = "Mui") {
11701
- const globalStateClass = globalStateClasses[slot];
11702
- return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator$1.generate(componentName)}-${slot}`;
11703
- }
11704
- function clamp$1(val, min2 = Number.MIN_SAFE_INTEGER, max2 = Number.MAX_SAFE_INTEGER) {
11705
- return Math.max(min2, Math.min(val, max2));
11706
- }
11707
- const clamp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11708
- __proto__: null,
11709
- default: clamp$1
11710
- }, Symbol.toStringTag, { value: "Module" }));
11711
- function setRef(ref, value) {
11712
- if (typeof ref === "function") {
11713
- ref(value);
11714
- } else if (ref) {
11715
- ref.current = value;
11716
- }
11717
- }
11718
- function useForkRef(...refs) {
11719
- return React.useMemo(() => {
11720
- if (refs.every((ref) => ref == null)) {
11721
- return null;
11722
- }
11723
- return (instance) => {
11724
- refs.forEach((ref) => {
11725
- setRef(ref, instance);
11726
- });
11727
- };
11728
- }, refs);
11729
- }
11730
- function createMixins(breakpoints, mixins) {
11731
- return _extends({
11732
- toolbar: {
11733
- minHeight: 56,
11734
- [breakpoints.up("xs")]: {
11735
- "@media (orientation: landscape)": {
11736
- minHeight: 48
11737
- }
11738
- },
11739
- [breakpoints.up("sm")]: {
11740
- minHeight: 64
11741
- }
11742
- }
11743
- }, mixins);
11744
- }
11745
- var colorManipulator = {};
11746
- var interopRequireDefault = { exports: {} };
11747
- (function(module) {
11748
- function _interopRequireDefault2(e) {
11749
- return e && e.__esModule ? e : {
11750
- "default": e
11751
- };
11752
- }
11753
- module.exports = _interopRequireDefault2, module.exports.__esModule = true, module.exports["default"] = module.exports;
11754
- })(interopRequireDefault);
11755
- var interopRequireDefaultExports = interopRequireDefault.exports;
11756
- const require$$1 = /* @__PURE__ */ getAugmentedNamespace(formatMuiErrorMessage);
11757
- const require$$2 = /* @__PURE__ */ getAugmentedNamespace(clamp);
11758
- var _interopRequireDefault = interopRequireDefaultExports;
11759
- Object.defineProperty(colorManipulator, "__esModule", {
11760
- value: true
11761
- });
11762
- colorManipulator.alpha = alpha;
11763
- colorManipulator.blend = blend;
11764
- colorManipulator.colorChannel = void 0;
11765
- var darken_1 = colorManipulator.darken = darken;
11766
- colorManipulator.decomposeColor = decomposeColor;
11767
- colorManipulator.emphasize = emphasize;
11768
- var getContrastRatio_1 = colorManipulator.getContrastRatio = getContrastRatio;
11769
- colorManipulator.getLuminance = getLuminance;
11770
- colorManipulator.hexToRgb = hexToRgb;
11771
- colorManipulator.hslToRgb = hslToRgb;
11772
- var lighten_1 = colorManipulator.lighten = lighten;
11773
- colorManipulator.private_safeAlpha = private_safeAlpha;
11774
- colorManipulator.private_safeColorChannel = void 0;
11775
- colorManipulator.private_safeDarken = private_safeDarken;
11776
- colorManipulator.private_safeEmphasize = private_safeEmphasize;
11777
- colorManipulator.private_safeLighten = private_safeLighten;
11778
- colorManipulator.recomposeColor = recomposeColor;
11779
- colorManipulator.rgbToHex = rgbToHex;
11780
- var _formatMuiErrorMessage2 = _interopRequireDefault(require$$1);
11781
- var _clamp = _interopRequireDefault(require$$2);
11782
- function clampWrapper(value, min2 = 0, max2 = 1) {
11551
+ function clamp(value, min2 = 0, max2 = 1) {
11783
11552
  if (process.env.NODE_ENV !== "production") {
11784
11553
  if (value < min2 || value > max2) {
11785
11554
  console.error(`MUI: The value provided ${value} is out of range [${min2}, ${max2}].`);
11786
11555
  }
11787
11556
  }
11788
- return (0, _clamp.default)(value, min2, max2);
11557
+ return Math.min(Math.max(min2, value), max2);
11789
11558
  }
11790
11559
  function hexToRgb(color2) {
11791
11560
  color2 = color2.slice(1);
@@ -11798,10 +11567,6 @@ function hexToRgb(color2) {
11798
11567
  return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3;
11799
11568
  }).join(", ")})` : "";
11800
11569
  }
11801
- function intToHex(int) {
11802
- const hex = int.toString(16);
11803
- return hex.length === 1 ? `0${hex}` : hex;
11804
- }
11805
11570
  function decomposeColor(color2) {
11806
11571
  if (color2.type) {
11807
11572
  return color2;
@@ -11813,7 +11578,7 @@ function decomposeColor(color2) {
11813
11578
  const type = color2.substring(0, marker);
11814
11579
  if (["rgb", "rgba", "hsl", "hsla", "color"].indexOf(type) === -1) {
11815
11580
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported \`${color2}\` color.
11816
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : (0, _formatMuiErrorMessage2.default)(9, color2));
11581
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : formatMuiErrorMessage(9, color2));
11817
11582
  }
11818
11583
  let values2 = color2.substring(marker + 1, color2.length - 1);
11819
11584
  let colorSpace;
@@ -11825,7 +11590,7 @@ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
11825
11590
  }
11826
11591
  if (["srgb", "display-p3", "a98-rgb", "prophoto-rgb", "rec-2020"].indexOf(colorSpace) === -1) {
11827
11592
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: unsupported \`${colorSpace}\` color space.
11828
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : (0, _formatMuiErrorMessage2.default)(10, colorSpace));
11593
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : formatMuiErrorMessage(10, colorSpace));
11829
11594
  }
11830
11595
  } else {
11831
11596
  values2 = values2.split(",");
@@ -11837,22 +11602,6 @@ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rg
11837
11602
  colorSpace
11838
11603
  };
11839
11604
  }
11840
- const colorChannel = (color2) => {
11841
- const decomposedColor = decomposeColor(color2);
11842
- return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf("hsl") !== -1 && idx !== 0 ? `${val}%` : val).join(" ");
11843
- };
11844
- colorManipulator.colorChannel = colorChannel;
11845
- const private_safeColorChannel = (color2, warning) => {
11846
- try {
11847
- return colorChannel(color2);
11848
- } catch (error2) {
11849
- if (warning && process.env.NODE_ENV !== "production") {
11850
- console.warn(warning);
11851
- }
11852
- return color2;
11853
- }
11854
- };
11855
- colorManipulator.private_safeColorChannel = private_safeColorChannel;
11856
11605
  function recomposeColor(color2) {
11857
11606
  const {
11858
11607
  type,
@@ -11874,15 +11623,6 @@ function recomposeColor(color2) {
11874
11623
  }
11875
11624
  return `${type}(${values2})`;
11876
11625
  }
11877
- function rgbToHex(color2) {
11878
- if (color2.indexOf("#") === 0) {
11879
- return color2;
11880
- }
11881
- const {
11882
- values: values2
11883
- } = decomposeColor(color2);
11884
- return `#${values2.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join("")}`;
11885
- }
11886
11626
  function hslToRgb(color2) {
11887
11627
  color2 = decomposeColor(color2);
11888
11628
  const {
@@ -11920,32 +11660,9 @@ function getContrastRatio(foreground, background) {
11920
11660
  const lumB = getLuminance(background);
11921
11661
  return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
11922
11662
  }
11923
- function alpha(color2, value) {
11924
- color2 = decomposeColor(color2);
11925
- value = clampWrapper(value);
11926
- if (color2.type === "rgb" || color2.type === "hsl") {
11927
- color2.type += "a";
11928
- }
11929
- if (color2.type === "color") {
11930
- color2.values[3] = `/${value}`;
11931
- } else {
11932
- color2.values[3] = value;
11933
- }
11934
- return recomposeColor(color2);
11935
- }
11936
- function private_safeAlpha(color2, value, warning) {
11937
- try {
11938
- return alpha(color2, value);
11939
- } catch (error2) {
11940
- if (warning && process.env.NODE_ENV !== "production") {
11941
- console.warn(warning);
11942
- }
11943
- return color2;
11944
- }
11945
- }
11946
11663
  function darken(color2, coefficient) {
11947
11664
  color2 = decomposeColor(color2);
11948
- coefficient = clampWrapper(coefficient);
11665
+ coefficient = clamp(coefficient);
11949
11666
  if (color2.type.indexOf("hsl") !== -1) {
11950
11667
  color2.values[2] *= 1 - coefficient;
11951
11668
  } else if (color2.type.indexOf("rgb") !== -1 || color2.type.indexOf("color") !== -1) {
@@ -11955,19 +11672,9 @@ function darken(color2, coefficient) {
11955
11672
  }
11956
11673
  return recomposeColor(color2);
11957
11674
  }
11958
- function private_safeDarken(color2, coefficient, warning) {
11959
- try {
11960
- return darken(color2, coefficient);
11961
- } catch (error2) {
11962
- if (warning && process.env.NODE_ENV !== "production") {
11963
- console.warn(warning);
11964
- }
11965
- return color2;
11966
- }
11967
- }
11968
11675
  function lighten(color2, coefficient) {
11969
11676
  color2 = decomposeColor(color2);
11970
- coefficient = clampWrapper(coefficient);
11677
+ coefficient = clamp(coefficient);
11971
11678
  if (color2.type.indexOf("hsl") !== -1) {
11972
11679
  color2.values[2] += (100 - color2.values[2]) * coefficient;
11973
11680
  } else if (color2.type.indexOf("rgb") !== -1) {
@@ -11981,38 +11688,20 @@ function lighten(color2, coefficient) {
11981
11688
  }
11982
11689
  return recomposeColor(color2);
11983
11690
  }
11984
- function private_safeLighten(color2, coefficient, warning) {
11985
- try {
11986
- return lighten(color2, coefficient);
11987
- } catch (error2) {
11988
- if (warning && process.env.NODE_ENV !== "production") {
11989
- console.warn(warning);
11990
- }
11991
- return color2;
11992
- }
11993
- }
11994
- function emphasize(color2, coefficient = 0.15) {
11995
- return getLuminance(color2) > 0.5 ? darken(color2, coefficient) : lighten(color2, coefficient);
11996
- }
11997
- function private_safeEmphasize(color2, coefficient, warning) {
11998
- try {
11999
- return emphasize(color2, coefficient);
12000
- } catch (error2) {
12001
- if (warning && process.env.NODE_ENV !== "production") {
12002
- console.warn(warning);
11691
+ function createMixins(breakpoints, mixins) {
11692
+ return _extends({
11693
+ toolbar: {
11694
+ minHeight: 56,
11695
+ [breakpoints.up("xs")]: {
11696
+ "@media (orientation: landscape)": {
11697
+ minHeight: 48
11698
+ }
11699
+ },
11700
+ [breakpoints.up("sm")]: {
11701
+ minHeight: 64
11702
+ }
12003
11703
  }
12004
- return color2;
12005
- }
12006
- }
12007
- function blend(background, overlay, opacity, gamma = 1) {
12008
- const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);
12009
- const backgroundColor2 = decomposeColor(background);
12010
- const overlayColor = decomposeColor(overlay);
12011
- const rgb = [blendChannel(backgroundColor2.values[0], overlayColor.values[0]), blendChannel(backgroundColor2.values[1], overlayColor.values[1]), blendChannel(backgroundColor2.values[2], overlayColor.values[2])];
12012
- return recomposeColor({
12013
- type: "rgb",
12014
- values: rgb
12015
- });
11704
+ }, mixins);
12016
11705
  }
12017
11706
  const common = {
12018
11707
  black: "#000",
@@ -12210,9 +11899,9 @@ function addLightOrDark(intent, direction, shade, tonalOffset) {
12210
11899
  if (intent.hasOwnProperty(shade)) {
12211
11900
  intent[direction] = intent[shade];
12212
11901
  } else if (direction === "light") {
12213
- intent.light = lighten_1(intent.main, tonalOffsetLight);
11902
+ intent.light = lighten(intent.main, tonalOffsetLight);
12214
11903
  } else if (direction === "dark") {
12215
- intent.dark = darken_1(intent.main, tonalOffsetDark);
11904
+ intent.dark = darken(intent.main, tonalOffsetDark);
12216
11905
  }
12217
11906
  }
12218
11907
  }
@@ -12314,9 +12003,9 @@ function createPalette(palette) {
12314
12003
  const success = palette.success || getDefaultSuccess(mode);
12315
12004
  const warning = palette.warning || getDefaultWarning(mode);
12316
12005
  function getContrastText(background) {
12317
- const contrastText = getContrastRatio_1(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;
12006
+ const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;
12318
12007
  if (process.env.NODE_ENV !== "production") {
12319
- const contrast = getContrastRatio_1(background, contrastText);
12008
+ const contrast = getContrastRatio(background, contrastText);
12320
12009
  if (contrast < 3) {
12321
12010
  console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, "falls below the WCAG recommended absolute minimum contrast ratio of 3:1.", "https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join("\n"));
12322
12011
  }
@@ -12336,7 +12025,7 @@ function createPalette(palette) {
12336
12025
  }
12337
12026
  if (!color2.hasOwnProperty("main")) {
12338
12027
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${name ? ` (${name})` : ""} provided to augmentColor(color) is invalid.
12339
- The color object needs to have a \`main\` property or a \`${mainShade}\` property.` : formatMuiErrorMessage$1(11, name ? ` (${name})` : "", mainShade));
12028
+ The color object needs to have a \`main\` property or a \`${mainShade}\` property.` : formatMuiErrorMessage(11, name ? ` (${name})` : "", mainShade));
12340
12029
  }
12341
12030
  if (typeof color2.main !== "string") {
12342
12031
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${name ? ` (${name})` : ""} provided to augmentColor(color) is invalid.
@@ -12352,7 +12041,7 @@ const theme1 = createTheme({ palette: {
12352
12041
 
12353
12042
  const theme2 = createTheme({ palette: {
12354
12043
  primary: { main: green[500] },
12355
- } });` : formatMuiErrorMessage$1(12, name ? ` (${name})` : "", JSON.stringify(color2.main)));
12044
+ } });` : formatMuiErrorMessage(12, name ? ` (${name})` : "", JSON.stringify(color2.main)));
12356
12045
  }
12357
12046
  addLightOrDark(color2, "light", lightShade, tonalOffset);
12358
12047
  addLightOrDark(color2, "dark", darkShade, tonalOffset);
@@ -12483,7 +12172,6 @@ function createTypography(palette, typography) {
12483
12172
  button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),
12484
12173
  caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
12485
12174
  overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),
12486
- // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.
12487
12175
  inherit: {
12488
12176
  fontFamily: "inherit",
12489
12177
  fontWeight: "inherit",
@@ -12573,9 +12261,6 @@ function createTransitions(inputTransitions) {
12573
12261
  if (!isNumber(delay) && !isString(delay)) {
12574
12262
  console.error('MUI: Argument "delay" must be a number or a string.');
12575
12263
  }
12576
- if (typeof options !== "object") {
12577
- console.error(["MUI: Secong argument of transition.create must be an object.", "Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join("\n"));
12578
- }
12579
12264
  if (Object.keys(other).length !== 0) {
12580
12265
  console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(",")}].`);
12581
12266
  }
@@ -12609,11 +12294,9 @@ function createTheme(options = {}, ...args) {
12609
12294
  transitions: transitionsInput = {},
12610
12295
  typography: typographyInput = {}
12611
12296
  } = options, other = _objectWithoutPropertiesLoose(options, _excluded$1);
12612
- if (options.vars && // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
12613
- // `generateCssVars` is the closest identifier for checking that the `options` is a result of `extendTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
12614
- options.generateCssVars === void 0) {
12297
+ if (options.vars) {
12615
12298
  throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`vars\` is a private field used for CSS variables support.
12616
- Please use another name.` : formatMuiErrorMessage$1(18));
12299
+ Please use another name.` : formatMuiErrorMessage(18));
12617
12300
  }
12618
12301
  const palette = createPalette(paletteInput);
12619
12302
  const systemTheme = createTheme$1(options);
@@ -12720,7 +12403,7 @@ const Fade = /* @__PURE__ */ React.forwardRef(function Fade2(props, ref) {
12720
12403
  TransitionComponent = Transition$1
12721
12404
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded);
12722
12405
  const nodeRef = React.useRef(null);
12723
- const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
12406
+ const handleRef = useForkRef(nodeRef, children.ref, ref);
12724
12407
  const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => {
12725
12408
  if (callback) {
12726
12409
  const node = nodeRef.current;
@@ -12794,10 +12477,10 @@ const Fade = /* @__PURE__ */ React.forwardRef(function Fade2(props, ref) {
12794
12477
  }));
12795
12478
  });
12796
12479
  process.env.NODE_ENV !== "production" ? Fade.propTypes = {
12797
- // ┌────────────────────────────── Warning ──────────────────────────────┐
12798
- // These PropTypes are generated from the TypeScript type definitions.
12799
- // To update them, edit the d.ts file and run `pnpm proptypes`.
12800
- // └─────────────────────────────────────────────────────────────────────┘
12480
+ // ----------------------------- Warning --------------------------------
12481
+ // | These PropTypes are generated from the TypeScript type definitions |
12482
+ // | To update them edit the d.ts file and run "yarn proptypes" |
12483
+ // ----------------------------------------------------------------------
12801
12484
  /**
12802
12485
  * Add a custom transition end trigger. Called with the transitioning DOM
12803
12486
  * node and a done callback. Allows for more fine grained transition end
@@ -13090,7 +12773,7 @@ const translations = {
13090
12773
  no: {
13091
12774
  column_reorder: "Denne kolonnen er fast og kan ikke flyttes.",
13092
12775
  column_hidden: "Denne kolonnen er fast og kan ikke skjules.",
13093
- reset_order: "Tilbakestill ordre"
12776
+ reset_order: "Tilbakestill rekkefølge"
13094
12777
  }
13095
12778
  };
13096
12779
  function useTranslations(locale = "en") {
@@ -13408,55 +13091,55 @@ const injectColumns = (props) => {
13408
13091
  columns.unshift(selectColumn(isFixed2, rowHeight));
13409
13092
  }
13410
13093
  };
13411
- const tbody = "_tbody_1r9dx_108";
13412
- const expanded_row = "_expanded_row_1r9dx_165";
13413
- const selected = "_selected_1r9dx_183";
13414
- const shadowed = "_shadowed_1r9dx_203";
13415
- const resizer = "_resizer_1r9dx_242";
13416
- const isResizing = "_isResizing_1r9dx_254";
13094
+ const tbody = "_tbody_1fc5x_112";
13095
+ const expanded_row = "_expanded_row_1fc5x_169";
13096
+ const selected = "_selected_1fc5x_187";
13097
+ const shadowed = "_shadowed_1fc5x_210";
13098
+ const resizer = "_resizer_1fc5x_244";
13099
+ const isResizing = "_isResizing_1fc5x_256";
13417
13100
  const style$1 = {
13418
- "asma-ui-table-styled-table": "_asma-ui-table-styled-table_1r9dx_1",
13419
- "table-wrapper": "_table-wrapper_1r9dx_18",
13420
- "table-shell": "_table-shell_1r9dx_25",
13421
- "table-wrapper--no-rows": "_table-wrapper--no-rows_1r9dx_31",
13422
- "table-wrapper--proxy": "_table-wrapper--proxy_1r9dx_34",
13423
- "table-wrapper--proxy-bottom": "_table-wrapper--proxy-bottom_1r9dx_35",
13424
- "table-wrapper-fetching": "_table-wrapper-fetching_1r9dx_45",
13425
- "table-scroll": "_table-scroll_1r9dx_48",
13426
- "table-x--fill-height": "_table-x--fill-height_1r9dx_57",
13427
- "table-x": "_table-x_1r9dx_57",
13428
- "table-header--sticky": "_table-header--sticky_1r9dx_72",
13429
- "table-hscroll": "_table-hscroll_1r9dx_77",
13430
- "table-hscroll__content": "_table-hscroll__content_1r9dx_87",
13431
- "no-rows-overlay-container": "_no-rows-overlay-container_1r9dx_90",
13432
- "styled-table": "_styled-table_1r9dx_99",
13101
+ "asma-ui-table-styled-table": "_asma-ui-table-styled-table_1fc5x_1",
13102
+ "table-wrapper": "_table-wrapper_1fc5x_22",
13103
+ "table-shell": "_table-shell_1fc5x_29",
13104
+ "table-wrapper--no-rows": "_table-wrapper--no-rows_1fc5x_35",
13105
+ "table-wrapper--proxy": "_table-wrapper--proxy_1fc5x_38",
13106
+ "table-wrapper--proxy-bottom": "_table-wrapper--proxy-bottom_1fc5x_39",
13107
+ "table-wrapper-fetching": "_table-wrapper-fetching_1fc5x_49",
13108
+ "table-scroll": "_table-scroll_1fc5x_52",
13109
+ "table-x--fill-height": "_table-x--fill-height_1fc5x_61",
13110
+ "table-x": "_table-x_1fc5x_61",
13111
+ "table-header--sticky": "_table-header--sticky_1fc5x_76",
13112
+ "table-hscroll": "_table-hscroll_1fc5x_81",
13113
+ "table-hscroll__content": "_table-hscroll__content_1fc5x_91",
13114
+ "no-rows-overlay-container": "_no-rows-overlay-container_1fc5x_94",
13115
+ "styled-table": "_styled-table_1fc5x_103",
13433
13116
  tbody,
13434
- "loading-icon": "_loading-icon_1r9dx_113",
13435
- "t-row": "_t-row_1r9dx_120",
13436
- "t-cell": "_t-cell_1r9dx_120",
13437
- "action-cell": "_action-cell_1r9dx_130",
13438
- "fixed-cell": "_fixed-cell_1r9dx_134",
13117
+ "loading-icon": "_loading-icon_1fc5x_117",
13118
+ "t-row": "_t-row_1fc5x_124",
13119
+ "t-cell": "_t-cell_1fc5x_124",
13120
+ "action-cell": "_action-cell_1fc5x_134",
13121
+ "fixed-cell": "_fixed-cell_1fc5x_138",
13439
13122
  expanded_row,
13440
13123
  selected,
13441
- "single-selection": "_single-selection_1r9dx_186",
13124
+ "single-selection": "_single-selection_1fc5x_190",
13442
13125
  shadowed,
13443
- "is-loading": "_is-loading_1r9dx_229",
13444
- "action-cell-default-background": "_action-cell-default-background_1r9dx_232",
13445
- "fixed-cell-default-background": "_fixed-cell-default-background_1r9dx_235",
13446
- "sortable-column": "_sortable-column_1r9dx_238",
13126
+ "is-loading": "_is-loading_1fc5x_231",
13127
+ "action-cell-default-background": "_action-cell-default-background_1fc5x_234",
13128
+ "fixed-cell-default-background": "_fixed-cell-default-background_1fc5x_237",
13129
+ "sortable-column": "_sortable-column_1fc5x_240",
13447
13130
  resizer,
13448
13131
  isResizing,
13449
- "hide-table-header": "_hide-table-header_1r9dx_266",
13450
- "show-table-header": "_show-table-header_1r9dx_270",
13451
- "table-header": "_table-header_1r9dx_72",
13452
- "hide-header": "_hide-header_1r9dx_295",
13453
- "t-cell__actions": "_t-cell__actions_1r9dx_298",
13454
- "t-cell__fixed": "_t-cell__fixed_1r9dx_311",
13455
- "sort-icon": "_sort-icon_1r9dx_319",
13456
- "table-footer--sticky": "_table-footer--sticky_1r9dx_322",
13457
- "table-footer--inline": "_table-footer--inline_1r9dx_333",
13458
- "table-bottom": "_table-bottom_1r9dx_344",
13459
- "table-bottom--sticky": "_table-bottom--sticky_1r9dx_358"
13132
+ "hide-table-header": "_hide-table-header_1fc5x_268",
13133
+ "show-table-header": "_show-table-header_1fc5x_272",
13134
+ "table-header": "_table-header_1fc5x_76",
13135
+ "hide-header": "_hide-header_1fc5x_297",
13136
+ "t-cell__actions": "_t-cell__actions_1fc5x_300",
13137
+ "t-cell__fixed": "_t-cell__fixed_1fc5x_313",
13138
+ "sort-icon": "_sort-icon_1fc5x_321",
13139
+ "table-footer--sticky": "_table-footer--sticky_1fc5x_324",
13140
+ "table-footer--inline": "_table-footer--inline_1fc5x_335",
13141
+ "table-bottom": "_table-bottom_1fc5x_346",
13142
+ "table-bottom--sticky": "_table-bottom--sticky_1fc5x_360"
13460
13143
  };
13461
13144
  function DropUpIcon(props) {
13462
13145
  return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1rem", height: "1rem", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "currentColor", d: "m7 14l5-5l5 5z" }) });
@@ -14324,11 +14007,22 @@ const StyledTable = (props) => {
14324
14007
  const hasRows = data.length > 0;
14325
14008
  const fetching = hasRows && !!loading;
14326
14009
  const showNoRowsOverlay = !hasRows && !loading;
14327
- const isMobileView = useIsMobileView();
14010
+ const windowWidth = useWindowWidthSize();
14011
+ const isMobileView = mobileView(windowWidth);
14328
14012
  const wantsStickyFooter = !!options.stickyFooter;
14329
14013
  const canShowStickyFooter = wantsStickyFooter && !isMobileView;
14014
+ const [hasInternalOverflow, setHasInternalOverflow] = useState(false);
14015
+ const wrapperRef = useRef(null);
14330
14016
  const enableProxyHScroll = !canShowStickyFooter;
14331
14017
  const { tableScrollRef, tableXRef, hScrollRef, hScrollContentRef } = useProxyHorizontalScrollSync(enableProxyHScroll);
14018
+ useLayoutEffect(() => {
14019
+ const host = canShowStickyFooter ? wrapperRef.current : tableXRef.current ?? tableScrollRef.current;
14020
+ if (!host) {
14021
+ setHasInternalOverflow(false);
14022
+ return;
14023
+ }
14024
+ setHasInternalOverflow(host.scrollWidth > host.clientWidth);
14025
+ }, [canShowStickyFooter, tableXRef, tableScrollRef, windowWidth]);
14332
14026
  const { ref: containerRef, heightPx: rowsAreaPx } = useElementHeightPx();
14333
14027
  const rowHeightPx = options.rowHeight ?? 48;
14334
14028
  const visibleRows = table.getRowModel().rows.length;
@@ -14363,9 +14057,10 @@ const StyledTable = (props) => {
14363
14057
  {
14364
14058
  ref: containerRef,
14365
14059
  className: cn(style$1["asma-ui-table-styled-table"], tableClassName),
14060
+ "data-x-overflow": hasInternalOverflow ? "true" : "false",
14366
14061
  style: { height: height2 },
14367
14062
  children: [
14368
- /* @__PURE__ */ jsxRuntimeExports.jsx(OverlayShell, { enabled: canShowStickyFooter, className: style$1["table-shell"], children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tableWrapperClass, children: [
14063
+ /* @__PURE__ */ jsxRuntimeExports.jsx(OverlayShell, { enabled: canShowStickyFooter, className: style$1["table-shell"], children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: wrapperRef, className: tableWrapperClass, children: [
14369
14064
  canShowStickyFooter ? TableMarkup : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: tableScrollRef, className: cn(style$1["table-scroll"]), children: [
14370
14065
  /* @__PURE__ */ jsxRuntimeExports.jsx(
14371
14066
  "div",