@telepix-lab/telepix-ui 0.8.4 → 0.9.1

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 (137) hide show
  1. package/dist/cjs/client.js +650 -358
  2. package/dist/cjs/icons/Icon.d.ts +21 -0
  3. package/dist/cjs/icons/components.d.ts +1203 -1167
  4. package/dist/cjs/icons/custom/abstract/Accessibility2.d.ts +1 -0
  5. package/dist/cjs/icons/custom/abstract/CircleBackslash.d.ts +1 -0
  6. package/dist/cjs/icons/custom/abstract/Copy2.d.ts +1 -0
  7. package/dist/cjs/icons/custom/abstract/Cross2.d.ts +1 -0
  8. package/dist/cjs/icons/custom/abstract/CrossCircled.d.ts +1 -0
  9. package/dist/cjs/icons/custom/abstract/ExternalLink2.d.ts +1 -0
  10. package/dist/cjs/icons/custom/abstract/index.d.ts +7 -1
  11. package/dist/cjs/icons/custom/alignment/AlignLeft2.d.ts +1 -0
  12. package/dist/cjs/icons/custom/alignment/AlignRight2.d.ts +1 -0
  13. package/dist/cjs/icons/custom/alignment/index.d.ts +3 -1
  14. package/dist/cjs/icons/custom/components/Binary2.d.ts +1 -0
  15. package/dist/cjs/icons/custom/components/Button.d.ts +1 -0
  16. package/dist/cjs/icons/custom/components/Calendar2.d.ts +1 -0
  17. package/dist/cjs/icons/custom/components/FilePdfLine.d.ts +1 -0
  18. package/dist/cjs/icons/custom/components/FilePdfPdfFill.d.ts +1 -0
  19. package/dist/cjs/icons/custom/components/FilePdfPdfLine.d.ts +1 -0
  20. package/dist/cjs/icons/custom/components/FileSymlink2.d.ts +1 -0
  21. package/dist/cjs/icons/custom/components/index.d.ts +8 -1
  22. package/dist/cjs/icons/custom/design/BoxModel.d.ts +1 -0
  23. package/dist/cjs/icons/custom/design/Columns2.d.ts +1 -0
  24. package/dist/cjs/icons/custom/design/Component1.d.ts +1 -0
  25. package/dist/cjs/icons/custom/design/Component2.d.ts +1 -0
  26. package/dist/cjs/icons/custom/design/ComponentInstance.d.ts +1 -0
  27. package/dist/cjs/icons/custom/design/PolygonFree.d.ts +1 -0
  28. package/dist/cjs/icons/custom/design/PolygonRect.d.ts +1 -0
  29. package/dist/cjs/icons/custom/design/Value.d.ts +1 -0
  30. package/dist/cjs/icons/custom/design/ValueNone.d.ts +1 -0
  31. package/dist/cjs/icons/custom/design/index.d.ts +9 -0
  32. package/dist/cjs/icons/custom/etc1/ToggleRightFilled.d.ts +1 -0
  33. package/dist/cjs/icons/custom/etc1/index.d.ts +1 -0
  34. package/dist/cjs/icons/custom/etc3/Radiobutton.d.ts +1 -0
  35. package/dist/cjs/icons/custom/etc3/RainOrSnow2.d.ts +1 -0
  36. package/dist/cjs/icons/custom/etc3/SnowOrRain2.d.ts +1 -0
  37. package/dist/cjs/icons/custom/etc3/SunSnow2.d.ts +1 -0
  38. package/dist/cjs/icons/custom/etc3/index.d.ts +4 -0
  39. package/dist/cjs/icons/custom/logos/DNAV.d.ts +1 -0
  40. package/dist/cjs/icons/custom/logos/My.d.ts +1 -0
  41. package/dist/cjs/icons/custom/logos/index.d.ts +3 -1
  42. package/dist/cjs/icons/custom/objects/Archive2.d.ts +1 -0
  43. package/dist/cjs/icons/custom/objects/Backpack2.d.ts +1 -0
  44. package/dist/cjs/icons/custom/objects/Camera2.d.ts +1 -0
  45. package/dist/cjs/icons/custom/objects/ClipboardCopy2.d.ts +1 -0
  46. package/dist/cjs/icons/custom/objects/Cookie2.d.ts +1 -0
  47. package/dist/cjs/icons/custom/objects/Eraser2.d.ts +1 -0
  48. package/dist/cjs/icons/custom/objects/FileText2.d.ts +1 -0
  49. package/dist/cjs/icons/custom/objects/Hand2.d.ts +1 -0
  50. package/dist/cjs/icons/custom/objects/Home2.d.ts +1 -0
  51. package/dist/cjs/icons/custom/objects/Trash1.d.ts +1 -0
  52. package/dist/cjs/icons/custom/objects/index.d.ts +11 -1
  53. package/dist/cjs/icons/custom/typography/Underline2.d.ts +1 -0
  54. package/dist/cjs/icons/custom/typography/index.d.ts +2 -1
  55. package/dist/cjs/icons/data/abstract.d.ts +24 -0
  56. package/dist/cjs/icons/data/alignment.d.ts +8 -0
  57. package/dist/cjs/icons/data/component.d.ts +36 -0
  58. package/dist/cjs/icons/data/design.d.ts +36 -0
  59. package/dist/cjs/icons/data/etc1.d.ts +4 -0
  60. package/dist/cjs/icons/data/etc3.d.ts +28 -0
  61. package/dist/cjs/icons/data/logos.d.ts +8 -0
  62. package/dist/cjs/icons/data/objects.d.ts +40 -0
  63. package/dist/cjs/icons/data/typography.d.ts +4 -0
  64. package/dist/cjs/icons/iconUtils.d.ts +36 -0
  65. package/dist/cjs/icons/index.d.ts +189 -2
  66. package/dist/cjs/index.js +5395 -4364
  67. package/dist/color.css +1 -1
  68. package/dist/esm/client.js +650 -358
  69. package/dist/esm/icons/Icon.d.ts +21 -0
  70. package/dist/esm/icons/components.d.ts +1203 -1167
  71. package/dist/esm/icons/custom/abstract/Accessibility2.d.ts +1 -0
  72. package/dist/esm/icons/custom/abstract/CircleBackslash.d.ts +1 -0
  73. package/dist/esm/icons/custom/abstract/Copy2.d.ts +1 -0
  74. package/dist/esm/icons/custom/abstract/Cross2.d.ts +1 -0
  75. package/dist/esm/icons/custom/abstract/CrossCircled.d.ts +1 -0
  76. package/dist/esm/icons/custom/abstract/ExternalLink2.d.ts +1 -0
  77. package/dist/esm/icons/custom/abstract/index.d.ts +7 -1
  78. package/dist/esm/icons/custom/alignment/AlignLeft2.d.ts +1 -0
  79. package/dist/esm/icons/custom/alignment/AlignRight2.d.ts +1 -0
  80. package/dist/esm/icons/custom/alignment/index.d.ts +3 -1
  81. package/dist/esm/icons/custom/components/Binary2.d.ts +1 -0
  82. package/dist/esm/icons/custom/components/Button.d.ts +1 -0
  83. package/dist/esm/icons/custom/components/Calendar2.d.ts +1 -0
  84. package/dist/esm/icons/custom/components/FilePdfLine.d.ts +1 -0
  85. package/dist/esm/icons/custom/components/FilePdfPdfFill.d.ts +1 -0
  86. package/dist/esm/icons/custom/components/FilePdfPdfLine.d.ts +1 -0
  87. package/dist/esm/icons/custom/components/FileSymlink2.d.ts +1 -0
  88. package/dist/esm/icons/custom/components/index.d.ts +8 -1
  89. package/dist/esm/icons/custom/design/BoxModel.d.ts +1 -0
  90. package/dist/esm/icons/custom/design/Columns2.d.ts +1 -0
  91. package/dist/esm/icons/custom/design/Component1.d.ts +1 -0
  92. package/dist/esm/icons/custom/design/Component2.d.ts +1 -0
  93. package/dist/esm/icons/custom/design/ComponentInstance.d.ts +1 -0
  94. package/dist/esm/icons/custom/design/PolygonFree.d.ts +1 -0
  95. package/dist/esm/icons/custom/design/PolygonRect.d.ts +1 -0
  96. package/dist/esm/icons/custom/design/Value.d.ts +1 -0
  97. package/dist/esm/icons/custom/design/ValueNone.d.ts +1 -0
  98. package/dist/esm/icons/custom/design/index.d.ts +9 -0
  99. package/dist/esm/icons/custom/etc1/ToggleRightFilled.d.ts +1 -0
  100. package/dist/esm/icons/custom/etc1/index.d.ts +1 -0
  101. package/dist/esm/icons/custom/etc3/Radiobutton.d.ts +1 -0
  102. package/dist/esm/icons/custom/etc3/RainOrSnow2.d.ts +1 -0
  103. package/dist/esm/icons/custom/etc3/SnowOrRain2.d.ts +1 -0
  104. package/dist/esm/icons/custom/etc3/SunSnow2.d.ts +1 -0
  105. package/dist/esm/icons/custom/etc3/index.d.ts +4 -0
  106. package/dist/esm/icons/custom/logos/DNAV.d.ts +1 -0
  107. package/dist/esm/icons/custom/logos/My.d.ts +1 -0
  108. package/dist/esm/icons/custom/logos/index.d.ts +3 -1
  109. package/dist/esm/icons/custom/objects/Archive2.d.ts +1 -0
  110. package/dist/esm/icons/custom/objects/Backpack2.d.ts +1 -0
  111. package/dist/esm/icons/custom/objects/Camera2.d.ts +1 -0
  112. package/dist/esm/icons/custom/objects/ClipboardCopy2.d.ts +1 -0
  113. package/dist/esm/icons/custom/objects/Cookie2.d.ts +1 -0
  114. package/dist/esm/icons/custom/objects/Eraser2.d.ts +1 -0
  115. package/dist/esm/icons/custom/objects/FileText2.d.ts +1 -0
  116. package/dist/esm/icons/custom/objects/Hand2.d.ts +1 -0
  117. package/dist/esm/icons/custom/objects/Home2.d.ts +1 -0
  118. package/dist/esm/icons/custom/objects/Trash1.d.ts +1 -0
  119. package/dist/esm/icons/custom/objects/index.d.ts +11 -1
  120. package/dist/esm/icons/custom/typography/Underline2.d.ts +1 -0
  121. package/dist/esm/icons/custom/typography/index.d.ts +2 -1
  122. package/dist/esm/icons/data/abstract.d.ts +24 -0
  123. package/dist/esm/icons/data/alignment.d.ts +8 -0
  124. package/dist/esm/icons/data/component.d.ts +36 -0
  125. package/dist/esm/icons/data/design.d.ts +36 -0
  126. package/dist/esm/icons/data/etc1.d.ts +4 -0
  127. package/dist/esm/icons/data/etc3.d.ts +28 -0
  128. package/dist/esm/icons/data/logos.d.ts +8 -0
  129. package/dist/esm/icons/data/objects.d.ts +40 -0
  130. package/dist/esm/icons/data/typography.d.ts +4 -0
  131. package/dist/esm/icons/iconUtils.d.ts +36 -0
  132. package/dist/esm/icons/index.d.ts +189 -2
  133. package/dist/esm/index.js +5352 -4367
  134. package/dist/index.d.ts +1411 -1162
  135. package/dist/styles.css +1 -1
  136. package/dist/theme.css +1 -1
  137. package/package.json +53 -48
@@ -1834,6 +1834,13 @@ function RemoveScrollSideCar(props) {
1834
1834
  if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
1835
1835
  return false;
1836
1836
  }
1837
+ // allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target
1838
+ var selection = window.getSelection();
1839
+ var anchorNode = selection && selection.anchorNode;
1840
+ var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
1841
+ if (isTouchingSelection) {
1842
+ return false;
1843
+ }
1837
1844
  var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
1838
1845
  if (!canBeScrolledInMainDirection) {
1839
1846
  return true;
@@ -2080,7 +2087,7 @@ var hideOthers = function (originalTarget, parentNode, markerName) {
2080
2087
  };
2081
2088
 
2082
2089
  var DIALOG_NAME = "Dialog";
2083
- var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
2090
+ var [createDialogContext] = createContextScope(DIALOG_NAME);
2084
2091
  var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
2085
2092
  var Dialog$1 = (props) => {
2086
2093
  const {
@@ -2437,7 +2444,7 @@ function useSize(element) {
2437
2444
  }
2438
2445
 
2439
2446
  var CHECKBOX_NAME = "Checkbox";
2440
- var [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);
2447
+ var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
2441
2448
  var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
2442
2449
  function CheckboxProvider(props) {
2443
2450
  const {
@@ -2714,10 +2721,6 @@ const oppositeSideMap = {
2714
2721
  bottom: 'top',
2715
2722
  top: 'bottom'
2716
2723
  };
2717
- const oppositeAlignmentMap = {
2718
- start: 'end',
2719
- end: 'start'
2720
- };
2721
2724
  function clamp$1(start, value, end) {
2722
2725
  return max(start, min(value, end));
2723
2726
  }
@@ -2736,9 +2739,9 @@ function getOppositeAxis(axis) {
2736
2739
  function getAxisLength(axis) {
2737
2740
  return axis === 'y' ? 'height' : 'width';
2738
2741
  }
2739
- const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
2740
2742
  function getSideAxis(placement) {
2741
- return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
2743
+ const firstChar = placement[0];
2744
+ return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
2742
2745
  }
2743
2746
  function getAlignmentAxis(placement) {
2744
2747
  return getOppositeAxis(getSideAxis(placement));
@@ -2761,7 +2764,7 @@ function getExpandedPlacements(placement) {
2761
2764
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2762
2765
  }
2763
2766
  function getOppositeAlignmentPlacement(placement) {
2764
- return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
2767
+ return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
2765
2768
  }
2766
2769
  const lrPlacement = ['left', 'right'];
2767
2770
  const rlPlacement = ['right', 'left'];
@@ -2792,7 +2795,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2792
2795
  return list;
2793
2796
  }
2794
2797
  function getOppositePlacement(placement) {
2795
- return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
2798
+ const side = getSide(placement);
2799
+ return oppositeSideMap[side] + placement.slice(side.length);
2796
2800
  }
2797
2801
  function expandPaddingObject(padding) {
2798
2802
  return {
@@ -2886,6 +2890,74 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
2886
2890
  return coords;
2887
2891
  }
2888
2892
 
2893
+ /**
2894
+ * Resolves with an object of overflow side offsets that determine how much the
2895
+ * element is overflowing a given clipping boundary on each side.
2896
+ * - positive = overflowing the boundary by that number of pixels
2897
+ * - negative = how many pixels left before it will overflow
2898
+ * - 0 = lies flush with the boundary
2899
+ * @see https://floating-ui.com/docs/detectOverflow
2900
+ */
2901
+ async function detectOverflow(state, options) {
2902
+ var _await$platform$isEle;
2903
+ if (options === void 0) {
2904
+ options = {};
2905
+ }
2906
+ const {
2907
+ x,
2908
+ y,
2909
+ platform,
2910
+ rects,
2911
+ elements,
2912
+ strategy
2913
+ } = state;
2914
+ const {
2915
+ boundary = 'clippingAncestors',
2916
+ rootBoundary = 'viewport',
2917
+ elementContext = 'floating',
2918
+ altBoundary = false,
2919
+ padding = 0
2920
+ } = evaluate(options, state);
2921
+ const paddingObject = getPaddingObject(padding);
2922
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
2923
+ const element = elements[altBoundary ? altContext : elementContext];
2924
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
2925
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
2926
+ boundary,
2927
+ rootBoundary,
2928
+ strategy
2929
+ }));
2930
+ const rect = elementContext === 'floating' ? {
2931
+ x,
2932
+ y,
2933
+ width: rects.floating.width,
2934
+ height: rects.floating.height
2935
+ } : rects.reference;
2936
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
2937
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
2938
+ x: 1,
2939
+ y: 1
2940
+ } : {
2941
+ x: 1,
2942
+ y: 1
2943
+ };
2944
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
2945
+ elements,
2946
+ rect,
2947
+ offsetParent,
2948
+ strategy
2949
+ }) : rect);
2950
+ return {
2951
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
2952
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
2953
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
2954
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
2955
+ };
2956
+ }
2957
+
2958
+ // Maximum number of resets that can occur before bailing to avoid infinite reset loops.
2959
+ const MAX_RESET_COUNT = 50;
2960
+
2889
2961
  /**
2890
2962
  * Computes the `x` and `y` coordinates that will place the floating element
2891
2963
  * next to a given reference element.
@@ -2900,7 +2972,10 @@ const computePosition$1 = async (reference, floating, config) => {
2900
2972
  middleware = [],
2901
2973
  platform
2902
2974
  } = config;
2903
- const validMiddleware = middleware.filter(Boolean);
2975
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
2976
+ ...platform,
2977
+ detectOverflow
2978
+ };
2904
2979
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
2905
2980
  let rects = await platform.getElementRects({
2906
2981
  reference,
@@ -2912,13 +2987,17 @@ const computePosition$1 = async (reference, floating, config) => {
2912
2987
  y
2913
2988
  } = computeCoordsFromPlacement(rects, placement, rtl);
2914
2989
  let statefulPlacement = placement;
2915
- let middlewareData = {};
2916
2990
  let resetCount = 0;
2917
- for (let i = 0; i < validMiddleware.length; i++) {
2991
+ const middlewareData = {};
2992
+ for (let i = 0; i < middleware.length; i++) {
2993
+ const currentMiddleware = middleware[i];
2994
+ if (!currentMiddleware) {
2995
+ continue;
2996
+ }
2918
2997
  const {
2919
2998
  name,
2920
2999
  fn
2921
- } = validMiddleware[i];
3000
+ } = currentMiddleware;
2922
3001
  const {
2923
3002
  x: nextX,
2924
3003
  y: nextY,
@@ -2932,7 +3011,7 @@ const computePosition$1 = async (reference, floating, config) => {
2932
3011
  strategy,
2933
3012
  middlewareData,
2934
3013
  rects,
2935
- platform,
3014
+ platform: platformWithDetectOverflow,
2936
3015
  elements: {
2937
3016
  reference,
2938
3017
  floating
@@ -2940,14 +3019,11 @@ const computePosition$1 = async (reference, floating, config) => {
2940
3019
  });
2941
3020
  x = nextX != null ? nextX : x;
2942
3021
  y = nextY != null ? nextY : y;
2943
- middlewareData = {
2944
- ...middlewareData,
2945
- [name]: {
2946
- ...middlewareData[name],
2947
- ...data
2948
- }
3022
+ middlewareData[name] = {
3023
+ ...middlewareData[name],
3024
+ ...data
2949
3025
  };
2950
- if (reset && resetCount <= 50) {
3026
+ if (reset && resetCount < MAX_RESET_COUNT) {
2951
3027
  resetCount++;
2952
3028
  if (typeof reset === 'object') {
2953
3029
  if (reset.placement) {
@@ -2977,71 +3053,6 @@ const computePosition$1 = async (reference, floating, config) => {
2977
3053
  };
2978
3054
  };
2979
3055
 
2980
- /**
2981
- * Resolves with an object of overflow side offsets that determine how much the
2982
- * element is overflowing a given clipping boundary on each side.
2983
- * - positive = overflowing the boundary by that number of pixels
2984
- * - negative = how many pixels left before it will overflow
2985
- * - 0 = lies flush with the boundary
2986
- * @see https://floating-ui.com/docs/detectOverflow
2987
- */
2988
- async function detectOverflow(state, options) {
2989
- var _await$platform$isEle;
2990
- if (options === void 0) {
2991
- options = {};
2992
- }
2993
- const {
2994
- x,
2995
- y,
2996
- platform,
2997
- rects,
2998
- elements,
2999
- strategy
3000
- } = state;
3001
- const {
3002
- boundary = 'clippingAncestors',
3003
- rootBoundary = 'viewport',
3004
- elementContext = 'floating',
3005
- altBoundary = false,
3006
- padding = 0
3007
- } = evaluate(options, state);
3008
- const paddingObject = getPaddingObject(padding);
3009
- const altContext = elementContext === 'floating' ? 'reference' : 'floating';
3010
- const element = elements[altBoundary ? altContext : elementContext];
3011
- const clippingClientRect = rectToClientRect(await platform.getClippingRect({
3012
- element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
3013
- boundary,
3014
- rootBoundary,
3015
- strategy
3016
- }));
3017
- const rect = elementContext === 'floating' ? {
3018
- x,
3019
- y,
3020
- width: rects.floating.width,
3021
- height: rects.floating.height
3022
- } : rects.reference;
3023
- const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
3024
- const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
3025
- x: 1,
3026
- y: 1
3027
- } : {
3028
- x: 1,
3029
- y: 1
3030
- };
3031
- const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
3032
- elements,
3033
- rect,
3034
- offsetParent,
3035
- strategy
3036
- }) : rect);
3037
- return {
3038
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
3039
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
3040
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
3041
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
3042
- };
3043
- }
3044
-
3045
3056
  /**
3046
3057
  * Provides data to position an inner element of the floating element so that it
3047
3058
  * appears centered to the reference element.
@@ -3174,7 +3185,7 @@ const flip$2 = function (options) {
3174
3185
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3175
3186
  }
3176
3187
  const placements = [initialPlacement, ...fallbackPlacements];
3177
- const overflow = await detectOverflow(state, detectOverflowOptions);
3188
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
3178
3189
  const overflows = [];
3179
3190
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3180
3191
  if (checkMainAxis) {
@@ -3281,7 +3292,8 @@ const hide$2 = function (options) {
3281
3292
  options,
3282
3293
  async fn(state) {
3283
3294
  const {
3284
- rects
3295
+ rects,
3296
+ platform
3285
3297
  } = state;
3286
3298
  const {
3287
3299
  strategy = 'referenceHidden',
@@ -3290,7 +3302,7 @@ const hide$2 = function (options) {
3290
3302
  switch (strategy) {
3291
3303
  case 'referenceHidden':
3292
3304
  {
3293
- const overflow = await detectOverflow(state, {
3305
+ const overflow = await platform.detectOverflow(state, {
3294
3306
  ...detectOverflowOptions,
3295
3307
  elementContext: 'reference'
3296
3308
  });
@@ -3304,7 +3316,7 @@ const hide$2 = function (options) {
3304
3316
  }
3305
3317
  case 'escaped':
3306
3318
  {
3307
- const overflow = await detectOverflow(state, {
3319
+ const overflow = await platform.detectOverflow(state, {
3308
3320
  ...detectOverflowOptions,
3309
3321
  altBoundary: true
3310
3322
  });
@@ -3427,7 +3439,8 @@ const shift$2 = function (options) {
3427
3439
  const {
3428
3440
  x,
3429
3441
  y,
3430
- placement
3442
+ placement,
3443
+ platform
3431
3444
  } = state;
3432
3445
  const {
3433
3446
  mainAxis: checkMainAxis = true,
@@ -3450,7 +3463,7 @@ const shift$2 = function (options) {
3450
3463
  x,
3451
3464
  y
3452
3465
  };
3453
- const overflow = await detectOverflow(state, detectOverflowOptions);
3466
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
3454
3467
  const crossAxis = getSideAxis(getSide(placement));
3455
3468
  const mainAxis = getOppositeAxis(crossAxis);
3456
3469
  let mainAxisCoord = coords[mainAxis];
@@ -3582,7 +3595,7 @@ const size$2 = function (options) {
3582
3595
  apply = () => {},
3583
3596
  ...detectOverflowOptions
3584
3597
  } = evaluate(options, state);
3585
- const overflow = await detectOverflow(state, detectOverflowOptions);
3598
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
3586
3599
  const side = getSide(placement);
3587
3600
  const alignment = getAlignment(placement);
3588
3601
  const isYAxis = getSideAxis(placement) === 'y';
@@ -3685,7 +3698,6 @@ function isShadowRoot(value) {
3685
3698
  }
3686
3699
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
3687
3700
  }
3688
- const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
3689
3701
  function isOverflowElement(element) {
3690
3702
  const {
3691
3703
  overflow,
@@ -3693,32 +3705,35 @@ function isOverflowElement(element) {
3693
3705
  overflowY,
3694
3706
  display
3695
3707
  } = getComputedStyle$1(element);
3696
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
3708
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
3697
3709
  }
3698
- const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
3699
3710
  function isTableElement(element) {
3700
- return tableElements.has(getNodeName(element));
3711
+ return /^(table|td|th)$/.test(getNodeName(element));
3701
3712
  }
3702
- const topLayerSelectors = [':popover-open', ':modal'];
3703
3713
  function isTopLayer(element) {
3704
- return topLayerSelectors.some(selector => {
3705
- try {
3706
- return element.matches(selector);
3707
- } catch (_e) {
3708
- return false;
3714
+ try {
3715
+ if (element.matches(':popover-open')) {
3716
+ return true;
3709
3717
  }
3710
- });
3718
+ } catch (_e) {
3719
+ // no-op
3720
+ }
3721
+ try {
3722
+ return element.matches(':modal');
3723
+ } catch (_e) {
3724
+ return false;
3725
+ }
3711
3726
  }
3712
- const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
3713
- const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
3714
- const containValues = ['paint', 'layout', 'strict', 'content'];
3727
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
3728
+ const containRe = /paint|layout|strict|content/;
3729
+ const isNotNone = value => !!value && value !== 'none';
3730
+ let isWebKitValue;
3715
3731
  function isContainingBlock(elementOrCss) {
3716
- const webkit = isWebKit();
3717
3732
  const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
3718
3733
 
3719
3734
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
3720
3735
  // https://drafts.csswg.org/css-transforms-2/#individual-transforms
3721
- return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
3736
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
3722
3737
  }
3723
3738
  function getContainingBlock(element) {
3724
3739
  let currentNode = getParentNode(element);
@@ -3733,12 +3748,13 @@ function getContainingBlock(element) {
3733
3748
  return null;
3734
3749
  }
3735
3750
  function isWebKit() {
3736
- if (typeof CSS === 'undefined' || !CSS.supports) return false;
3737
- return CSS.supports('-webkit-backdrop-filter', 'none');
3751
+ if (isWebKitValue == null) {
3752
+ isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
3753
+ }
3754
+ return isWebKitValue;
3738
3755
  }
3739
- const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
3740
3756
  function isLastTraversableNode(node) {
3741
- return lastTraversableNodeNames.has(getNodeName(node));
3757
+ return /^(html|body|#document)$/.test(getNodeName(node));
3742
3758
  }
3743
3759
  function getComputedStyle$1(element) {
3744
3760
  return getWindow(element).getComputedStyle(element);
@@ -3794,8 +3810,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
3794
3810
  if (isBody) {
3795
3811
  const frameElement = getFrameElement(win);
3796
3812
  return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
3813
+ } else {
3814
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
3797
3815
  }
3798
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
3799
3816
  }
3800
3817
  function getFrameElement(win) {
3801
3818
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
@@ -3972,7 +3989,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
3972
3989
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
3973
3990
  scroll = getNodeScroll(offsetParent);
3974
3991
  }
3975
- if (isHTMLElement(offsetParent)) {
3992
+ if (isOffsetParentAnElement) {
3976
3993
  const offsetRect = getBoundingClientRect(offsetParent);
3977
3994
  scale = getScale(offsetParent);
3978
3995
  offsets.x = offsetRect.x + offsetParent.clientLeft;
@@ -4060,7 +4077,6 @@ function getViewportRect(element, strategy) {
4060
4077
  };
4061
4078
  }
4062
4079
 
4063
- const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
4064
4080
  // Returns the inner client rect, subtracting scrollbars if present.
4065
4081
  function getInnerBoundingClientRect(element, strategy) {
4066
4082
  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
@@ -4125,7 +4141,7 @@ function getClippingElementAncestors(element, cache) {
4125
4141
  if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
4126
4142
  currentContainingBlockComputedStyle = null;
4127
4143
  }
4128
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
4144
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
4129
4145
  if (shouldDropCurrentNode) {
4130
4146
  // Drop non-containing blocks.
4131
4147
  result = result.filter(ancestor => ancestor !== currentNode);
@@ -4150,20 +4166,23 @@ function getClippingRect(_ref) {
4150
4166
  } = _ref;
4151
4167
  const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
4152
4168
  const clippingAncestors = [...elementClippingAncestors, rootBoundary];
4153
- const firstClippingAncestor = clippingAncestors[0];
4154
- const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
4155
- const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
4156
- accRect.top = max(rect.top, accRect.top);
4157
- accRect.right = min(rect.right, accRect.right);
4158
- accRect.bottom = min(rect.bottom, accRect.bottom);
4159
- accRect.left = max(rect.left, accRect.left);
4160
- return accRect;
4161
- }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
4169
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
4170
+ let top = firstRect.top;
4171
+ let right = firstRect.right;
4172
+ let bottom = firstRect.bottom;
4173
+ let left = firstRect.left;
4174
+ for (let i = 1; i < clippingAncestors.length; i++) {
4175
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
4176
+ top = max(rect.top, top);
4177
+ right = min(rect.right, right);
4178
+ bottom = min(rect.bottom, bottom);
4179
+ left = max(rect.left, left);
4180
+ }
4162
4181
  return {
4163
- width: clippingRect.right - clippingRect.left,
4164
- height: clippingRect.bottom - clippingRect.top,
4165
- x: clippingRect.left,
4166
- y: clippingRect.top
4182
+ width: right - left,
4183
+ height: bottom - top,
4184
+ x: left,
4185
+ y: top
4167
4186
  };
4168
4187
  }
4169
4188
 
@@ -4414,7 +4433,7 @@ function autoUpdate(reference, floating, update, options) {
4414
4433
  animationFrame = false
4415
4434
  } = options;
4416
4435
  const referenceEl = unwrapElement(reference);
4417
- const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
4436
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
4418
4437
  ancestors.forEach(ancestor => {
4419
4438
  ancestorScroll && ancestor.addEventListener('scroll', update, {
4420
4439
  passive: true
@@ -4427,7 +4446,7 @@ function autoUpdate(reference, floating, update, options) {
4427
4446
  if (elementResize) {
4428
4447
  resizeObserver = new ResizeObserver(_ref => {
4429
4448
  let [firstEntry] = _ref;
4430
- if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
4449
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
4431
4450
  // Prevent update loops when using the `size` middleware.
4432
4451
  // https://github.com/floating-ui/floating-ui/issues/1740
4433
4452
  resizeObserver.unobserve(floating);
@@ -4442,7 +4461,9 @@ function autoUpdate(reference, floating, update, options) {
4442
4461
  if (referenceEl && !animationFrame) {
4443
4462
  resizeObserver.observe(referenceEl);
4444
4463
  }
4445
- resizeObserver.observe(floating);
4464
+ if (floating) {
4465
+ resizeObserver.observe(floating);
4466
+ }
4446
4467
  }
4447
4468
  let frameId;
4448
4469
  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
@@ -4824,28 +4845,39 @@ const arrow$1 = options => {
4824
4845
  * object may be passed.
4825
4846
  * @see https://floating-ui.com/docs/offset
4826
4847
  */
4827
- const offset = (options, deps) => ({
4828
- ...offset$1(options),
4829
- options: [options, deps]
4830
- });
4848
+ const offset = (options, deps) => {
4849
+ const result = offset$1(options);
4850
+ return {
4851
+ name: result.name,
4852
+ fn: result.fn,
4853
+ options: [options, deps]
4854
+ };
4855
+ };
4831
4856
 
4832
4857
  /**
4833
4858
  * Optimizes the visibility of the floating element by shifting it in order to
4834
4859
  * keep it in view when it will overflow the clipping boundary.
4835
4860
  * @see https://floating-ui.com/docs/shift
4836
4861
  */
4837
- const shift = (options, deps) => ({
4838
- ...shift$1(options),
4839
- options: [options, deps]
4840
- });
4862
+ const shift = (options, deps) => {
4863
+ const result = shift$1(options);
4864
+ return {
4865
+ name: result.name,
4866
+ fn: result.fn,
4867
+ options: [options, deps]
4868
+ };
4869
+ };
4841
4870
 
4842
4871
  /**
4843
4872
  * Built-in `limiter` that will stop `shift()` at a certain point.
4844
4873
  */
4845
- const limitShift = (options, deps) => ({
4846
- ...limitShift$1(options),
4847
- options: [options, deps]
4848
- });
4874
+ const limitShift = (options, deps) => {
4875
+ const result = limitShift$1(options);
4876
+ return {
4877
+ fn: result.fn,
4878
+ options: [options, deps]
4879
+ };
4880
+ };
4849
4881
 
4850
4882
  /**
4851
4883
  * Optimizes the visibility of the floating element by flipping the `placement`
@@ -4853,10 +4885,14 @@ const limitShift = (options, deps) => ({
4853
4885
  * clipping boundary. Alternative to `autoPlacement`.
4854
4886
  * @see https://floating-ui.com/docs/flip
4855
4887
  */
4856
- const flip = (options, deps) => ({
4857
- ...flip$1(options),
4858
- options: [options, deps]
4859
- });
4888
+ const flip = (options, deps) => {
4889
+ const result = flip$1(options);
4890
+ return {
4891
+ name: result.name,
4892
+ fn: result.fn,
4893
+ options: [options, deps]
4894
+ };
4895
+ };
4860
4896
 
4861
4897
  /**
4862
4898
  * Provides data that allows you to change the size of the floating element —
@@ -4864,20 +4900,28 @@ const flip = (options, deps) => ({
4864
4900
  * width of the reference element.
4865
4901
  * @see https://floating-ui.com/docs/size
4866
4902
  */
4867
- const size = (options, deps) => ({
4868
- ...size$1(options),
4869
- options: [options, deps]
4870
- });
4903
+ const size = (options, deps) => {
4904
+ const result = size$1(options);
4905
+ return {
4906
+ name: result.name,
4907
+ fn: result.fn,
4908
+ options: [options, deps]
4909
+ };
4910
+ };
4871
4911
 
4872
4912
  /**
4873
4913
  * Provides data to hide the floating element in applicable situations, such as
4874
4914
  * when it is not in the same clipping context as the reference element.
4875
4915
  * @see https://floating-ui.com/docs/hide
4876
4916
  */
4877
- const hide = (options, deps) => ({
4878
- ...hide$1(options),
4879
- options: [options, deps]
4880
- });
4917
+ const hide = (options, deps) => {
4918
+ const result = hide$1(options);
4919
+ return {
4920
+ name: result.name,
4921
+ fn: result.fn,
4922
+ options: [options, deps]
4923
+ };
4924
+ };
4881
4925
 
4882
4926
  /**
4883
4927
  * Provides data to position an inner element of the floating element so that it
@@ -4885,10 +4929,14 @@ const hide = (options, deps) => ({
4885
4929
  * This wraps the core `arrow` middleware to allow React refs as the element.
4886
4930
  * @see https://floating-ui.com/docs/arrow
4887
4931
  */
4888
- const arrow = (options, deps) => ({
4889
- ...arrow$1(options),
4890
- options: [options, deps]
4891
- });
4932
+ const arrow = (options, deps) => {
4933
+ const result = arrow$1(options);
4934
+ return {
4935
+ name: result.name,
4936
+ fn: result.fn,
4937
+ options: [options, deps]
4938
+ };
4939
+ };
4892
4940
 
4893
4941
  // src/arrow.tsx
4894
4942
  var NAME = "Arrow";
@@ -6203,7 +6251,7 @@ var SubTrigger = MenuSubTrigger;
6203
6251
  var SubContent = MenuSubContent;
6204
6252
 
6205
6253
  var CONTEXT_MENU_NAME = "ContextMenu";
6206
- var [createContextMenuContext, createContextMenuScope] = createContextScope(CONTEXT_MENU_NAME, [
6254
+ var [createContextMenuContext] = createContextScope(CONTEXT_MENU_NAME, [
6207
6255
  createMenuScope
6208
6256
  ]);
6209
6257
  var useMenuScope = createMenuScope();
@@ -6486,7 +6534,7 @@ function clamp(value, [min, max]) {
6486
6534
  }
6487
6535
 
6488
6536
  var POPOVER_NAME = "Popover";
6489
- var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
6537
+ var [createPopoverContext] = createContextScope(POPOVER_NAME, [
6490
6538
  createPopperScope
6491
6539
  ]);
6492
6540
  var usePopperScope$2 = createPopperScope();
@@ -6889,7 +6937,7 @@ function getState$1(checked) {
6889
6937
  }
6890
6938
  var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
6891
6939
  var RADIO_GROUP_NAME = "RadioGroup";
6892
- var [createRadioGroupContext, createRadioGroupScope] = createContextScope(RADIO_GROUP_NAME, [
6940
+ var [createRadioGroupContext] = createContextScope(RADIO_GROUP_NAME, [
6893
6941
  createRovingFocusGroupScope,
6894
6942
  createRadioScope
6895
6943
  ]);
@@ -7028,7 +7076,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
7028
7076
  var SELECTION_KEYS = [" ", "Enter"];
7029
7077
  var SELECT_NAME = "Select";
7030
7078
  var [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME);
7031
- var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
7079
+ var [createSelectContext] = createContextScope(SELECT_NAME, [
7032
7080
  createCollectionScope,
7033
7081
  createPopperScope
7034
7082
  ]);
@@ -8153,7 +8201,7 @@ var ItemIndicator = SelectItemIndicator;
8153
8201
  var Separator = SelectSeparator$1;
8154
8202
 
8155
8203
  var SWITCH_NAME = "Switch";
8156
- var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
8204
+ var [createSwitchContext] = createContextScope(SWITCH_NAME);
8157
8205
  var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
8158
8206
  var Switch$1 = React__namespace.forwardRef(
8159
8207
  (props, forwardedRef) => {
@@ -8293,7 +8341,7 @@ function getState(checked) {
8293
8341
  var Root = Switch$1;
8294
8342
  var Thumb = SwitchThumb;
8295
8343
 
8296
- var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
8344
+ var [createTooltipContext] = createContextScope("Tooltip", [
8297
8345
  createPopperScope
8298
8346
  ]);
8299
8347
  var usePopperScope = createPopperScope();
@@ -8770,7 +8818,36 @@ var Arrow2 = TooltipArrow$1;
8770
8818
 
8771
8819
  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}
8772
8820
 
8821
+ /**
8822
+ * Concatenates two arrays faster than the array spread operator.
8823
+ */
8824
+ const concatArrays = (array1, array2) => {
8825
+ // Pre-allocate for better V8 optimization
8826
+ const combinedArray = new Array(array1.length + array2.length);
8827
+ for (let i = 0; i < array1.length; i++) {
8828
+ combinedArray[i] = array1[i];
8829
+ }
8830
+ for (let i = 0; i < array2.length; i++) {
8831
+ combinedArray[array1.length + i] = array2[i];
8832
+ }
8833
+ return combinedArray;
8834
+ };
8835
+
8836
+ // Factory function ensures consistent object shapes
8837
+ const createClassValidatorObject = (classGroupId, validator) => ({
8838
+ classGroupId,
8839
+ validator
8840
+ });
8841
+ // Factory ensures consistent ClassPartObject shape
8842
+ const createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({
8843
+ nextPart,
8844
+ validators,
8845
+ classGroupId
8846
+ });
8773
8847
  const CLASS_PART_SEPARATOR = '-';
8848
+ const EMPTY_CONFLICTS = [];
8849
+ // I use two dots here because one dot is used as prefix for class groups in plugins
8850
+ const ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';
8774
8851
  const createClassGroupUtils = config => {
8775
8852
  const classMap = createClassMap(config);
8776
8853
  const {
@@ -8778,54 +8855,73 @@ const createClassGroupUtils = config => {
8778
8855
  conflictingClassGroupModifiers
8779
8856
  } = config;
8780
8857
  const getClassGroupId = className => {
8781
- const classParts = className.split(CLASS_PART_SEPARATOR);
8782
- // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.
8783
- if (classParts[0] === '' && classParts.length !== 1) {
8784
- classParts.shift();
8858
+ if (className.startsWith('[') && className.endsWith(']')) {
8859
+ return getGroupIdForArbitraryProperty(className);
8785
8860
  }
8786
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
8861
+ const classParts = className.split(CLASS_PART_SEPARATOR);
8862
+ // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and skip it.
8863
+ const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;
8864
+ return getGroupRecursive(classParts, startIndex, classMap);
8787
8865
  };
8788
8866
  const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
8789
- const conflicts = conflictingClassGroups[classGroupId] || [];
8790
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
8791
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
8867
+ if (hasPostfixModifier) {
8868
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
8869
+ const baseConflicts = conflictingClassGroups[classGroupId];
8870
+ if (modifierConflicts) {
8871
+ if (baseConflicts) {
8872
+ // Merge base conflicts with modifier conflicts
8873
+ return concatArrays(baseConflicts, modifierConflicts);
8874
+ }
8875
+ // Only modifier conflicts
8876
+ return modifierConflicts;
8877
+ }
8878
+ // Fall back to without postfix if no modifier conflicts
8879
+ return baseConflicts || EMPTY_CONFLICTS;
8792
8880
  }
8793
- return conflicts;
8881
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
8794
8882
  };
8795
8883
  return {
8796
8884
  getClassGroupId,
8797
8885
  getConflictingClassGroupIds
8798
8886
  };
8799
8887
  };
8800
- const getGroupRecursive = (classParts, classPartObject) => {
8801
- if (classParts.length === 0) {
8888
+ const getGroupRecursive = (classParts, startIndex, classPartObject) => {
8889
+ const classPathsLength = classParts.length - startIndex;
8890
+ if (classPathsLength === 0) {
8802
8891
  return classPartObject.classGroupId;
8803
8892
  }
8804
- const currentClassPart = classParts[0];
8893
+ const currentClassPart = classParts[startIndex];
8805
8894
  const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
8806
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;
8807
- if (classGroupFromNextClassPart) {
8808
- return classGroupFromNextClassPart;
8895
+ if (nextClassPartObject) {
8896
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
8897
+ if (result) return result;
8809
8898
  }
8810
- if (classPartObject.validators.length === 0) {
8899
+ const validators = classPartObject.validators;
8900
+ if (validators === null) {
8811
8901
  return undefined;
8812
8902
  }
8813
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
8814
- return classPartObject.validators.find(({
8815
- validator
8816
- }) => validator(classRest))?.classGroupId;
8817
- };
8818
- const arbitraryPropertyRegex = /^\[(.+)\]$/;
8819
- const getGroupIdForArbitraryProperty = className => {
8820
- if (arbitraryPropertyRegex.test(className)) {
8821
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
8822
- const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
8823
- if (property) {
8824
- // I use two dots here because one dot is used as prefix for class groups in plugins
8825
- return 'arbitrary..' + property;
8903
+ // Build classRest string efficiently by joining from startIndex onwards
8904
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
8905
+ const validatorsLength = validators.length;
8906
+ for (let i = 0; i < validatorsLength; i++) {
8907
+ const validatorObj = validators[i];
8908
+ if (validatorObj.validator(classRest)) {
8909
+ return validatorObj.classGroupId;
8826
8910
  }
8827
8911
  }
8912
+ return undefined;
8828
8913
  };
8914
+ /**
8915
+ * Get the class group ID for an arbitrary property.
8916
+ *
8917
+ * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
8918
+ */
8919
+ const getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {
8920
+ const content = className.slice(1, -1);
8921
+ const colonIndex = content.indexOf(':');
8922
+ const property = content.slice(0, colonIndex);
8923
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;
8924
+ })();
8829
8925
  /**
8830
8926
  * Exported for testing only
8831
8927
  */
@@ -8834,54 +8930,77 @@ const createClassMap = config => {
8834
8930
  theme,
8835
8931
  classGroups
8836
8932
  } = config;
8837
- const classMap = {
8838
- nextPart: new Map(),
8839
- validators: []
8840
- };
8933
+ return processClassGroups(classGroups, theme);
8934
+ };
8935
+ // Split into separate functions to maintain monomorphic call sites
8936
+ const processClassGroups = (classGroups, theme) => {
8937
+ const classMap = createClassPartObject();
8841
8938
  for (const classGroupId in classGroups) {
8842
- processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
8939
+ const group = classGroups[classGroupId];
8940
+ processClassesRecursively(group, classMap, classGroupId, theme);
8843
8941
  }
8844
8942
  return classMap;
8845
8943
  };
8846
8944
  const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
8847
- classGroup.forEach(classDefinition => {
8848
- if (typeof classDefinition === 'string') {
8849
- const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
8850
- classPartObjectToEdit.classGroupId = classGroupId;
8851
- return;
8852
- }
8853
- if (typeof classDefinition === 'function') {
8854
- if (isThemeGetter(classDefinition)) {
8855
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
8856
- return;
8857
- }
8858
- classPartObject.validators.push({
8859
- validator: classDefinition,
8860
- classGroupId
8861
- });
8862
- return;
8863
- }
8864
- Object.entries(classDefinition).forEach(([key, classGroup]) => {
8865
- processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
8866
- });
8867
- });
8945
+ const len = classGroup.length;
8946
+ for (let i = 0; i < len; i++) {
8947
+ const classDefinition = classGroup[i];
8948
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
8949
+ }
8950
+ };
8951
+ // Split into separate functions for each type to maintain monomorphic call sites
8952
+ const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
8953
+ if (typeof classDefinition === 'string') {
8954
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
8955
+ return;
8956
+ }
8957
+ if (typeof classDefinition === 'function') {
8958
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
8959
+ return;
8960
+ }
8961
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
8962
+ };
8963
+ const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
8964
+ const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
8965
+ classPartObjectToEdit.classGroupId = classGroupId;
8966
+ };
8967
+ const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
8968
+ if (isThemeGetter(classDefinition)) {
8969
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
8970
+ return;
8971
+ }
8972
+ if (classPartObject.validators === null) {
8973
+ classPartObject.validators = [];
8974
+ }
8975
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
8976
+ };
8977
+ const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
8978
+ const entries = Object.entries(classDefinition);
8979
+ const len = entries.length;
8980
+ for (let i = 0; i < len; i++) {
8981
+ const [key, value] = entries[i];
8982
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
8983
+ }
8868
8984
  };
8869
8985
  const getPart = (classPartObject, path) => {
8870
- let currentClassPartObject = classPartObject;
8871
- path.split(CLASS_PART_SEPARATOR).forEach(pathPart => {
8872
- if (!currentClassPartObject.nextPart.has(pathPart)) {
8873
- currentClassPartObject.nextPart.set(pathPart, {
8874
- nextPart: new Map(),
8875
- validators: []
8876
- });
8986
+ let current = classPartObject;
8987
+ const parts = path.split(CLASS_PART_SEPARATOR);
8988
+ const len = parts.length;
8989
+ for (let i = 0; i < len; i++) {
8990
+ const part = parts[i];
8991
+ let next = current.nextPart.get(part);
8992
+ if (!next) {
8993
+ next = createClassPartObject();
8994
+ current.nextPart.set(part, next);
8877
8995
  }
8878
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
8879
- });
8880
- return currentClassPartObject;
8996
+ current = next;
8997
+ }
8998
+ return current;
8881
8999
  };
8882
- const isThemeGetter = func => func.isThemeGetter;
9000
+ // Type guard maintains monomorphic check
9001
+ const isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;
8883
9002
 
8884
- // LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance
9003
+ // LRU cache implementation using plain objects for simplicity
8885
9004
  const createLruCache = maxCacheSize => {
8886
9005
  if (maxCacheSize < 1) {
8887
9006
  return {
@@ -8890,31 +9009,31 @@ const createLruCache = maxCacheSize => {
8890
9009
  };
8891
9010
  }
8892
9011
  let cacheSize = 0;
8893
- let cache = new Map();
8894
- let previousCache = new Map();
9012
+ let cache = Object.create(null);
9013
+ let previousCache = Object.create(null);
8895
9014
  const update = (key, value) => {
8896
- cache.set(key, value);
9015
+ cache[key] = value;
8897
9016
  cacheSize++;
8898
9017
  if (cacheSize > maxCacheSize) {
8899
9018
  cacheSize = 0;
8900
9019
  previousCache = cache;
8901
- cache = new Map();
9020
+ cache = Object.create(null);
8902
9021
  }
8903
9022
  };
8904
9023
  return {
8905
9024
  get(key) {
8906
- let value = cache.get(key);
9025
+ let value = cache[key];
8907
9026
  if (value !== undefined) {
8908
9027
  return value;
8909
9028
  }
8910
- if ((value = previousCache.get(key)) !== undefined) {
9029
+ if ((value = previousCache[key]) !== undefined) {
8911
9030
  update(key, value);
8912
9031
  return value;
8913
9032
  }
8914
9033
  },
8915
9034
  set(key, value) {
8916
- if (cache.has(key)) {
8917
- cache.set(key, value);
9035
+ if (key in cache) {
9036
+ cache[key] = value;
8918
9037
  } else {
8919
9038
  update(key, value);
8920
9039
  }
@@ -8923,7 +9042,15 @@ const createLruCache = maxCacheSize => {
8923
9042
  };
8924
9043
  const IMPORTANT_MODIFIER = '!';
8925
9044
  const MODIFIER_SEPARATOR = ':';
8926
- const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
9045
+ const EMPTY_MODIFIERS = [];
9046
+ // Pre-allocated result object shape for consistency
9047
+ const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
9048
+ modifiers,
9049
+ hasImportantModifier,
9050
+ baseClassName,
9051
+ maybePostfixModifierPosition,
9052
+ isExternal
9053
+ });
8927
9054
  const createParseClassName = config => {
8928
9055
  const {
8929
9056
  prefix,
@@ -8936,17 +9063,19 @@ const createParseClassName = config => {
8936
9063
  * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
8937
9064
  */
8938
9065
  let parseClassName = className => {
9066
+ // Use simple array with push for better performance
8939
9067
  const modifiers = [];
8940
9068
  let bracketDepth = 0;
8941
9069
  let parenDepth = 0;
8942
9070
  let modifierStart = 0;
8943
9071
  let postfixModifierPosition;
8944
- for (let index = 0; index < className.length; index++) {
8945
- let currentCharacter = className[index];
9072
+ const len = className.length;
9073
+ for (let index = 0; index < len; index++) {
9074
+ const currentCharacter = className[index];
8946
9075
  if (bracketDepth === 0 && parenDepth === 0) {
8947
9076
  if (currentCharacter === MODIFIER_SEPARATOR) {
8948
9077
  modifiers.push(className.slice(modifierStart, index));
8949
- modifierStart = index + MODIFIER_SEPARATOR_LENGTH;
9078
+ modifierStart = index + 1;
8950
9079
  continue;
8951
9080
  }
8952
9081
  if (currentCharacter === '/') {
@@ -8954,37 +9083,31 @@ const createParseClassName = config => {
8954
9083
  continue;
8955
9084
  }
8956
9085
  }
8957
- if (currentCharacter === '[') {
8958
- bracketDepth++;
8959
- } else if (currentCharacter === ']') {
8960
- bracketDepth--;
8961
- } else if (currentCharacter === '(') {
8962
- parenDepth++;
8963
- } else if (currentCharacter === ')') {
8964
- parenDepth--;
8965
- }
9086
+ if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;
9087
+ }
9088
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
9089
+ // Inline important modifier check
9090
+ let baseClassName = baseClassNameWithImportantModifier;
9091
+ let hasImportantModifier = false;
9092
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
9093
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
9094
+ hasImportantModifier = true;
9095
+ } else if (
9096
+ /**
9097
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
9098
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
9099
+ */
9100
+ baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
9101
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
9102
+ hasImportantModifier = true;
8966
9103
  }
8967
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
8968
- const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
8969
- const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
8970
9104
  const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
8971
- return {
8972
- modifiers,
8973
- hasImportantModifier,
8974
- baseClassName,
8975
- maybePostfixModifierPosition
8976
- };
9105
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
8977
9106
  };
8978
9107
  if (prefix) {
8979
9108
  const fullPrefix = prefix + MODIFIER_SEPARATOR;
8980
9109
  const parseClassNameOriginal = parseClassName;
8981
- parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
8982
- isExternal: true,
8983
- modifiers: [],
8984
- hasImportantModifier: false,
8985
- baseClassName: className,
8986
- maybePostfixModifierPosition: undefined
8987
- };
9110
+ parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);
8988
9111
  }
8989
9112
  if (experimentalParseClassName) {
8990
9113
  const parseClassNameOriginal = parseClassName;
@@ -8995,19 +9118,6 @@ const createParseClassName = config => {
8995
9118
  }
8996
9119
  return parseClassName;
8997
9120
  };
8998
- const stripImportantModifier = baseClassName => {
8999
- if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
9000
- return baseClassName.substring(0, baseClassName.length - 1);
9001
- }
9002
- /**
9003
- * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
9004
- * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
9005
- */
9006
- if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
9007
- return baseClassName.substring(1);
9008
- }
9009
- return baseClassName;
9010
- };
9011
9121
 
9012
9122
  /**
9013
9123
  * Sorts modifiers according to following schema:
@@ -9015,26 +9125,41 @@ const stripImportantModifier = baseClassName => {
9015
9125
  * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
9016
9126
  */
9017
9127
  const createSortModifiers = config => {
9018
- const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map(modifier => [modifier, true]));
9019
- const sortModifiers = modifiers => {
9020
- if (modifiers.length <= 1) {
9021
- return modifiers;
9022
- }
9023
- const sortedModifiers = [];
9024
- let unsortedModifiers = [];
9025
- modifiers.forEach(modifier => {
9026
- const isPositionSensitive = modifier[0] === '[' || orderSensitiveModifiers[modifier];
9027
- if (isPositionSensitive) {
9028
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
9029
- unsortedModifiers = [];
9128
+ // Pre-compute weights for all known modifiers for O(1) comparison
9129
+ const modifierWeights = new Map();
9130
+ // Assign weights to sensitive modifiers (highest priority, but preserve order)
9131
+ config.orderSensitiveModifiers.forEach((mod, index) => {
9132
+ modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods
9133
+ });
9134
+ return modifiers => {
9135
+ const result = [];
9136
+ let currentSegment = [];
9137
+ // Process modifiers in one pass
9138
+ for (let i = 0; i < modifiers.length; i++) {
9139
+ const modifier = modifiers[i];
9140
+ // Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)
9141
+ const isArbitrary = modifier[0] === '[';
9142
+ const isOrderSensitive = modifierWeights.has(modifier);
9143
+ if (isArbitrary || isOrderSensitive) {
9144
+ // Sort and flush current segment alphabetically
9145
+ if (currentSegment.length > 0) {
9146
+ currentSegment.sort();
9147
+ result.push(...currentSegment);
9148
+ currentSegment = [];
9149
+ }
9150
+ result.push(modifier);
9030
9151
  } else {
9031
- unsortedModifiers.push(modifier);
9152
+ // Regular modifier - add to current segment for batch sorting
9153
+ currentSegment.push(modifier);
9032
9154
  }
9033
- });
9034
- sortedModifiers.push(...unsortedModifiers.sort());
9035
- return sortedModifiers;
9155
+ }
9156
+ // Sort and add any remaining segment items
9157
+ if (currentSegment.length > 0) {
9158
+ currentSegment.sort();
9159
+ result.push(...currentSegment);
9160
+ }
9161
+ return result;
9036
9162
  };
9037
- return sortModifiers;
9038
9163
  };
9039
9164
  const createConfigUtils = config => ({
9040
9165
  cache: createLruCache(config.cacheSize),
@@ -9089,10 +9214,11 @@ const mergeClassList = (classList, configUtils) => {
9089
9214
  }
9090
9215
  hasPostfixModifier = false;
9091
9216
  }
9092
- const variantModifier = sortModifiers(modifiers).join(':');
9217
+ // Fast path: skip sorting for empty or single modifier
9218
+ const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');
9093
9219
  const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
9094
9220
  const classId = modifierId + classGroupId;
9095
- if (classGroupsInConflict.includes(classId)) {
9221
+ if (classGroupsInConflict.indexOf(classId) > -1) {
9096
9222
  // Tailwind class omitted due to conflict
9097
9223
  continue;
9098
9224
  }
@@ -9117,13 +9243,13 @@ const mergeClassList = (classList, configUtils) => {
9117
9243
  *
9118
9244
  * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
9119
9245
  */
9120
- function twJoin() {
9246
+ const twJoin = (...classLists) => {
9121
9247
  let index = 0;
9122
9248
  let argument;
9123
9249
  let resolvedValue;
9124
9250
  let string = '';
9125
- while (index < arguments.length) {
9126
- if (argument = arguments[index++]) {
9251
+ while (index < classLists.length) {
9252
+ if (argument = classLists[index++]) {
9127
9253
  if (resolvedValue = toValue(argument)) {
9128
9254
  string && (string += ' ');
9129
9255
  string += resolvedValue;
@@ -9131,8 +9257,9 @@ function twJoin() {
9131
9257
  }
9132
9258
  }
9133
9259
  return string;
9134
- }
9260
+ };
9135
9261
  const toValue = mix => {
9262
+ // Fast path for strings
9136
9263
  if (typeof mix === 'string') {
9137
9264
  return mix;
9138
9265
  }
@@ -9148,20 +9275,20 @@ const toValue = mix => {
9148
9275
  }
9149
9276
  return string;
9150
9277
  };
9151
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
9278
+ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
9152
9279
  let configUtils;
9153
9280
  let cacheGet;
9154
9281
  let cacheSet;
9155
- let functionToCall = initTailwindMerge;
9156
- function initTailwindMerge(classList) {
9282
+ let functionToCall;
9283
+ const initTailwindMerge = classList => {
9157
9284
  const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
9158
9285
  configUtils = createConfigUtils(config);
9159
9286
  cacheGet = configUtils.cache.get;
9160
9287
  cacheSet = configUtils.cache.set;
9161
9288
  functionToCall = tailwindMerge;
9162
9289
  return tailwindMerge(classList);
9163
- }
9164
- function tailwindMerge(classList) {
9290
+ };
9291
+ const tailwindMerge = classList => {
9165
9292
  const cachedResult = cacheGet(classList);
9166
9293
  if (cachedResult) {
9167
9294
  return cachedResult;
@@ -9169,19 +9296,19 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
9169
9296
  const result = mergeClassList(classList, configUtils);
9170
9297
  cacheSet(classList, result);
9171
9298
  return result;
9172
- }
9173
- return function callTailwindMerge() {
9174
- return functionToCall(twJoin.apply(null, arguments));
9175
9299
  };
9176
- }
9300
+ functionToCall = initTailwindMerge;
9301
+ return (...args) => functionToCall(twJoin(...args));
9302
+ };
9303
+ const fallbackThemeArr = [];
9177
9304
  const fromTheme = key => {
9178
- const themeGetter = theme => theme[key] || [];
9305
+ const themeGetter = theme => theme[key] || fallbackThemeArr;
9179
9306
  themeGetter.isThemeGetter = true;
9180
9307
  return themeGetter;
9181
9308
  };
9182
9309
  const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
9183
9310
  const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
9184
- const fractionRegex = /^\d+\/\d+$/;
9311
+ const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
9185
9312
  const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
9186
9313
  const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
9187
9314
  const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
@@ -9207,6 +9334,8 @@ const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever
9207
9334
  const isArbitraryValue = value => arbitraryValueRegex.test(value);
9208
9335
  const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
9209
9336
  const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
9337
+ const isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny);
9338
+ const isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever);
9210
9339
  const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
9211
9340
  const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
9212
9341
  const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);
@@ -9217,6 +9346,7 @@ const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLab
9217
9346
  const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);
9218
9347
  const isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);
9219
9348
  const isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);
9349
+ const isArbitraryVariableWeight = value => getIsArbitraryVariable(value, isLabelWeight, true);
9220
9350
  // Helpers
9221
9351
  const getIsArbitraryValue = (value, testLabel, testValue) => {
9222
9352
  const result = arbitraryValueRegex.exec(value);
@@ -9245,6 +9375,7 @@ const isLabelSize = label => label === 'length' || label === 'size' || label ===
9245
9375
  const isLabelLength = label => label === 'length';
9246
9376
  const isLabelNumber = label => label === 'number';
9247
9377
  const isLabelFamilyName = label => label === 'family-name';
9378
+ const isLabelWeight = label => label === 'number' || label === 'weight';
9248
9379
  const isLabelShadow = label => label === 'shadow';
9249
9380
  const getDefaultConfig = () => {
9250
9381
  /**
@@ -9303,6 +9434,8 @@ const getDefaultConfig = () => {
9303
9434
  const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];
9304
9435
  const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
9305
9436
  const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
9437
+ const scaleSizingInline = () => [isFraction, 'screen', 'full', 'dvw', 'lvw', 'svw', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
9438
+ const scaleSizingBlock = () => [isFraction, 'screen', 'full', 'lh', 'dvh', 'lvh', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
9306
9439
  const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
9307
9440
  const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
9308
9441
  position: [isArbitraryVariable, isArbitraryValue]
@@ -9501,40 +9634,66 @@ const getDefaultConfig = () => {
9501
9634
  */
9502
9635
  position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
9503
9636
  /**
9504
- * Top / Right / Bottom / Left
9637
+ * Inset
9505
9638
  * @see https://tailwindcss.com/docs/top-right-bottom-left
9506
9639
  */
9507
9640
  inset: [{
9508
9641
  inset: scaleInset()
9509
9642
  }],
9510
9643
  /**
9511
- * Right / Left
9644
+ * Inset Inline
9512
9645
  * @see https://tailwindcss.com/docs/top-right-bottom-left
9513
9646
  */
9514
9647
  'inset-x': [{
9515
9648
  'inset-x': scaleInset()
9516
9649
  }],
9517
9650
  /**
9518
- * Top / Bottom
9651
+ * Inset Block
9519
9652
  * @see https://tailwindcss.com/docs/top-right-bottom-left
9520
9653
  */
9521
9654
  'inset-y': [{
9522
9655
  'inset-y': scaleInset()
9523
9656
  }],
9524
9657
  /**
9525
- * Start
9658
+ * Inset Inline Start
9526
9659
  * @see https://tailwindcss.com/docs/top-right-bottom-left
9660
+ * @todo class group will be renamed to `inset-s` in next major release
9527
9661
  */
9528
9662
  start: [{
9663
+ 'inset-s': scaleInset(),
9664
+ /**
9665
+ * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
9666
+ * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
9667
+ */
9529
9668
  start: scaleInset()
9530
9669
  }],
9531
9670
  /**
9532
- * End
9671
+ * Inset Inline End
9533
9672
  * @see https://tailwindcss.com/docs/top-right-bottom-left
9673
+ * @todo class group will be renamed to `inset-e` in next major release
9534
9674
  */
9535
9675
  end: [{
9676
+ 'inset-e': scaleInset(),
9677
+ /**
9678
+ * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
9679
+ * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
9680
+ */
9536
9681
  end: scaleInset()
9537
9682
  }],
9683
+ /**
9684
+ * Inset Block Start
9685
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
9686
+ */
9687
+ 'inset-bs': [{
9688
+ 'inset-bs': scaleInset()
9689
+ }],
9690
+ /**
9691
+ * Inset Block End
9692
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
9693
+ */
9694
+ 'inset-be': [{
9695
+ 'inset-be': scaleInset()
9696
+ }],
9538
9697
  /**
9539
9698
  * Top
9540
9699
  * @see https://tailwindcss.com/docs/top-right-bottom-left
@@ -9801,33 +9960,47 @@ const getDefaultConfig = () => {
9801
9960
  p: scaleUnambiguousSpacing()
9802
9961
  }],
9803
9962
  /**
9804
- * Padding X
9963
+ * Padding Inline
9805
9964
  * @see https://tailwindcss.com/docs/padding
9806
9965
  */
9807
9966
  px: [{
9808
9967
  px: scaleUnambiguousSpacing()
9809
9968
  }],
9810
9969
  /**
9811
- * Padding Y
9970
+ * Padding Block
9812
9971
  * @see https://tailwindcss.com/docs/padding
9813
9972
  */
9814
9973
  py: [{
9815
9974
  py: scaleUnambiguousSpacing()
9816
9975
  }],
9817
9976
  /**
9818
- * Padding Start
9977
+ * Padding Inline Start
9819
9978
  * @see https://tailwindcss.com/docs/padding
9820
9979
  */
9821
9980
  ps: [{
9822
9981
  ps: scaleUnambiguousSpacing()
9823
9982
  }],
9824
9983
  /**
9825
- * Padding End
9984
+ * Padding Inline End
9826
9985
  * @see https://tailwindcss.com/docs/padding
9827
9986
  */
9828
9987
  pe: [{
9829
9988
  pe: scaleUnambiguousSpacing()
9830
9989
  }],
9990
+ /**
9991
+ * Padding Block Start
9992
+ * @see https://tailwindcss.com/docs/padding
9993
+ */
9994
+ pbs: [{
9995
+ pbs: scaleUnambiguousSpacing()
9996
+ }],
9997
+ /**
9998
+ * Padding Block End
9999
+ * @see https://tailwindcss.com/docs/padding
10000
+ */
10001
+ pbe: [{
10002
+ pbe: scaleUnambiguousSpacing()
10003
+ }],
9831
10004
  /**
9832
10005
  * Padding Top
9833
10006
  * @see https://tailwindcss.com/docs/padding
@@ -9864,33 +10037,47 @@ const getDefaultConfig = () => {
9864
10037
  m: scaleMargin()
9865
10038
  }],
9866
10039
  /**
9867
- * Margin X
10040
+ * Margin Inline
9868
10041
  * @see https://tailwindcss.com/docs/margin
9869
10042
  */
9870
10043
  mx: [{
9871
10044
  mx: scaleMargin()
9872
10045
  }],
9873
10046
  /**
9874
- * Margin Y
10047
+ * Margin Block
9875
10048
  * @see https://tailwindcss.com/docs/margin
9876
10049
  */
9877
10050
  my: [{
9878
10051
  my: scaleMargin()
9879
10052
  }],
9880
10053
  /**
9881
- * Margin Start
10054
+ * Margin Inline Start
9882
10055
  * @see https://tailwindcss.com/docs/margin
9883
10056
  */
9884
10057
  ms: [{
9885
10058
  ms: scaleMargin()
9886
10059
  }],
9887
10060
  /**
9888
- * Margin End
10061
+ * Margin Inline End
9889
10062
  * @see https://tailwindcss.com/docs/margin
9890
10063
  */
9891
10064
  me: [{
9892
10065
  me: scaleMargin()
9893
10066
  }],
10067
+ /**
10068
+ * Margin Block Start
10069
+ * @see https://tailwindcss.com/docs/margin
10070
+ */
10071
+ mbs: [{
10072
+ mbs: scaleMargin()
10073
+ }],
10074
+ /**
10075
+ * Margin Block End
10076
+ * @see https://tailwindcss.com/docs/margin
10077
+ */
10078
+ mbe: [{
10079
+ mbe: scaleMargin()
10080
+ }],
9894
10081
  /**
9895
10082
  * Margin Top
9896
10083
  * @see https://tailwindcss.com/docs/margin
@@ -9953,6 +10140,48 @@ const getDefaultConfig = () => {
9953
10140
  size: [{
9954
10141
  size: scaleSizing()
9955
10142
  }],
10143
+ /**
10144
+ * Inline Size
10145
+ * @see https://tailwindcss.com/docs/width
10146
+ */
10147
+ 'inline-size': [{
10148
+ inline: ['auto', ...scaleSizingInline()]
10149
+ }],
10150
+ /**
10151
+ * Min-Inline Size
10152
+ * @see https://tailwindcss.com/docs/min-width
10153
+ */
10154
+ 'min-inline-size': [{
10155
+ 'min-inline': ['auto', ...scaleSizingInline()]
10156
+ }],
10157
+ /**
10158
+ * Max-Inline Size
10159
+ * @see https://tailwindcss.com/docs/max-width
10160
+ */
10161
+ 'max-inline-size': [{
10162
+ 'max-inline': ['none', ...scaleSizingInline()]
10163
+ }],
10164
+ /**
10165
+ * Block Size
10166
+ * @see https://tailwindcss.com/docs/height
10167
+ */
10168
+ 'block-size': [{
10169
+ block: ['auto', ...scaleSizingBlock()]
10170
+ }],
10171
+ /**
10172
+ * Min-Block Size
10173
+ * @see https://tailwindcss.com/docs/min-height
10174
+ */
10175
+ 'min-block-size': [{
10176
+ 'min-block': ['auto', ...scaleSizingBlock()]
10177
+ }],
10178
+ /**
10179
+ * Max-Block Size
10180
+ * @see https://tailwindcss.com/docs/max-height
10181
+ */
10182
+ 'max-block-size': [{
10183
+ 'max-block': ['none', ...scaleSizingBlock()]
10184
+ }],
9956
10185
  /**
9957
10186
  * Width
9958
10187
  * @see https://tailwindcss.com/docs/width
@@ -10025,7 +10254,7 @@ const getDefaultConfig = () => {
10025
10254
  * @see https://tailwindcss.com/docs/font-weight
10026
10255
  */
10027
10256
  'font-weight': [{
10028
- font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
10257
+ font: [themeFontWeight, isArbitraryVariableWeight, isArbitraryWeight]
10029
10258
  }],
10030
10259
  /**
10031
10260
  * Font Stretch
@@ -10039,7 +10268,14 @@ const getDefaultConfig = () => {
10039
10268
  * @see https://tailwindcss.com/docs/font-family
10040
10269
  */
10041
10270
  'font-family': [{
10042
- font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
10271
+ font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont]
10272
+ }],
10273
+ /**
10274
+ * Font Feature Settings
10275
+ * @see https://tailwindcss.com/docs/font-feature-settings
10276
+ */
10277
+ 'font-features': [{
10278
+ 'font-features': [isArbitraryValue]
10043
10279
  }],
10044
10280
  /**
10045
10281
  * Font Variant Numeric
@@ -10458,33 +10694,47 @@ const getDefaultConfig = () => {
10458
10694
  border: scaleBorderWidth()
10459
10695
  }],
10460
10696
  /**
10461
- * Border Width X
10697
+ * Border Width Inline
10462
10698
  * @see https://tailwindcss.com/docs/border-width
10463
10699
  */
10464
10700
  'border-w-x': [{
10465
10701
  'border-x': scaleBorderWidth()
10466
10702
  }],
10467
10703
  /**
10468
- * Border Width Y
10704
+ * Border Width Block
10469
10705
  * @see https://tailwindcss.com/docs/border-width
10470
10706
  */
10471
10707
  'border-w-y': [{
10472
10708
  'border-y': scaleBorderWidth()
10473
10709
  }],
10474
10710
  /**
10475
- * Border Width Start
10711
+ * Border Width Inline Start
10476
10712
  * @see https://tailwindcss.com/docs/border-width
10477
10713
  */
10478
10714
  'border-w-s': [{
10479
10715
  'border-s': scaleBorderWidth()
10480
10716
  }],
10481
10717
  /**
10482
- * Border Width End
10718
+ * Border Width Inline End
10483
10719
  * @see https://tailwindcss.com/docs/border-width
10484
10720
  */
10485
10721
  'border-w-e': [{
10486
10722
  'border-e': scaleBorderWidth()
10487
10723
  }],
10724
+ /**
10725
+ * Border Width Block Start
10726
+ * @see https://tailwindcss.com/docs/border-width
10727
+ */
10728
+ 'border-w-bs': [{
10729
+ 'border-bs': scaleBorderWidth()
10730
+ }],
10731
+ /**
10732
+ * Border Width Block End
10733
+ * @see https://tailwindcss.com/docs/border-width
10734
+ */
10735
+ 'border-w-be': [{
10736
+ 'border-be': scaleBorderWidth()
10737
+ }],
10488
10738
  /**
10489
10739
  * Border Width Top
10490
10740
  * @see https://tailwindcss.com/docs/border-width
@@ -10559,33 +10809,47 @@ const getDefaultConfig = () => {
10559
10809
  border: scaleColor()
10560
10810
  }],
10561
10811
  /**
10562
- * Border Color X
10812
+ * Border Color Inline
10563
10813
  * @see https://tailwindcss.com/docs/border-color
10564
10814
  */
10565
10815
  'border-color-x': [{
10566
10816
  'border-x': scaleColor()
10567
10817
  }],
10568
10818
  /**
10569
- * Border Color Y
10819
+ * Border Color Block
10570
10820
  * @see https://tailwindcss.com/docs/border-color
10571
10821
  */
10572
10822
  'border-color-y': [{
10573
10823
  'border-y': scaleColor()
10574
10824
  }],
10575
10825
  /**
10576
- * Border Color S
10826
+ * Border Color Inline Start
10577
10827
  * @see https://tailwindcss.com/docs/border-color
10578
10828
  */
10579
10829
  'border-color-s': [{
10580
10830
  'border-s': scaleColor()
10581
10831
  }],
10582
10832
  /**
10583
- * Border Color E
10833
+ * Border Color Inline End
10584
10834
  * @see https://tailwindcss.com/docs/border-color
10585
10835
  */
10586
10836
  'border-color-e': [{
10587
10837
  'border-e': scaleColor()
10588
10838
  }],
10839
+ /**
10840
+ * Border Color Block Start
10841
+ * @see https://tailwindcss.com/docs/border-color
10842
+ */
10843
+ 'border-color-bs': [{
10844
+ 'border-bs': scaleColor()
10845
+ }],
10846
+ /**
10847
+ * Border Color Block End
10848
+ * @see https://tailwindcss.com/docs/border-color
10849
+ */
10850
+ 'border-color-be': [{
10851
+ 'border-be': scaleColor()
10852
+ }],
10589
10853
  /**
10590
10854
  * Border Color Top
10591
10855
  * @see https://tailwindcss.com/docs/border-color
@@ -11446,33 +11710,47 @@ const getDefaultConfig = () => {
11446
11710
  'scroll-m': scaleUnambiguousSpacing()
11447
11711
  }],
11448
11712
  /**
11449
- * Scroll Margin X
11713
+ * Scroll Margin Inline
11450
11714
  * @see https://tailwindcss.com/docs/scroll-margin
11451
11715
  */
11452
11716
  'scroll-mx': [{
11453
11717
  'scroll-mx': scaleUnambiguousSpacing()
11454
11718
  }],
11455
11719
  /**
11456
- * Scroll Margin Y
11720
+ * Scroll Margin Block
11457
11721
  * @see https://tailwindcss.com/docs/scroll-margin
11458
11722
  */
11459
11723
  'scroll-my': [{
11460
11724
  'scroll-my': scaleUnambiguousSpacing()
11461
11725
  }],
11462
11726
  /**
11463
- * Scroll Margin Start
11727
+ * Scroll Margin Inline Start
11464
11728
  * @see https://tailwindcss.com/docs/scroll-margin
11465
11729
  */
11466
11730
  'scroll-ms': [{
11467
11731
  'scroll-ms': scaleUnambiguousSpacing()
11468
11732
  }],
11469
11733
  /**
11470
- * Scroll Margin End
11734
+ * Scroll Margin Inline End
11471
11735
  * @see https://tailwindcss.com/docs/scroll-margin
11472
11736
  */
11473
11737
  'scroll-me': [{
11474
11738
  'scroll-me': scaleUnambiguousSpacing()
11475
11739
  }],
11740
+ /**
11741
+ * Scroll Margin Block Start
11742
+ * @see https://tailwindcss.com/docs/scroll-margin
11743
+ */
11744
+ 'scroll-mbs': [{
11745
+ 'scroll-mbs': scaleUnambiguousSpacing()
11746
+ }],
11747
+ /**
11748
+ * Scroll Margin Block End
11749
+ * @see https://tailwindcss.com/docs/scroll-margin
11750
+ */
11751
+ 'scroll-mbe': [{
11752
+ 'scroll-mbe': scaleUnambiguousSpacing()
11753
+ }],
11476
11754
  /**
11477
11755
  * Scroll Margin Top
11478
11756
  * @see https://tailwindcss.com/docs/scroll-margin
@@ -11509,33 +11787,47 @@ const getDefaultConfig = () => {
11509
11787
  'scroll-p': scaleUnambiguousSpacing()
11510
11788
  }],
11511
11789
  /**
11512
- * Scroll Padding X
11790
+ * Scroll Padding Inline
11513
11791
  * @see https://tailwindcss.com/docs/scroll-padding
11514
11792
  */
11515
11793
  'scroll-px': [{
11516
11794
  'scroll-px': scaleUnambiguousSpacing()
11517
11795
  }],
11518
11796
  /**
11519
- * Scroll Padding Y
11797
+ * Scroll Padding Block
11520
11798
  * @see https://tailwindcss.com/docs/scroll-padding
11521
11799
  */
11522
11800
  'scroll-py': [{
11523
11801
  'scroll-py': scaleUnambiguousSpacing()
11524
11802
  }],
11525
11803
  /**
11526
- * Scroll Padding Start
11804
+ * Scroll Padding Inline Start
11527
11805
  * @see https://tailwindcss.com/docs/scroll-padding
11528
11806
  */
11529
11807
  'scroll-ps': [{
11530
11808
  'scroll-ps': scaleUnambiguousSpacing()
11531
11809
  }],
11532
11810
  /**
11533
- * Scroll Padding End
11811
+ * Scroll Padding Inline End
11534
11812
  * @see https://tailwindcss.com/docs/scroll-padding
11535
11813
  */
11536
11814
  'scroll-pe': [{
11537
11815
  'scroll-pe': scaleUnambiguousSpacing()
11538
11816
  }],
11817
+ /**
11818
+ * Scroll Padding Block Start
11819
+ * @see https://tailwindcss.com/docs/scroll-padding
11820
+ */
11821
+ 'scroll-pbs': [{
11822
+ 'scroll-pbs': scaleUnambiguousSpacing()
11823
+ }],
11824
+ /**
11825
+ * Scroll Padding Block End
11826
+ * @see https://tailwindcss.com/docs/scroll-padding
11827
+ */
11828
+ 'scroll-pbe': [{
11829
+ 'scroll-pbe': scaleUnambiguousSpacing()
11830
+ }],
11539
11831
  /**
11540
11832
  * Scroll Padding Top
11541
11833
  * @see https://tailwindcss.com/docs/scroll-padding
@@ -11670,15 +11962,15 @@ const getDefaultConfig = () => {
11670
11962
  conflictingClassGroups: {
11671
11963
  overflow: ['overflow-x', 'overflow-y'],
11672
11964
  overscroll: ['overscroll-x', 'overscroll-y'],
11673
- inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],
11965
+ inset: ['inset-x', 'inset-y', 'inset-bs', 'inset-be', 'start', 'end', 'top', 'right', 'bottom', 'left'],
11674
11966
  'inset-x': ['right', 'left'],
11675
11967
  'inset-y': ['top', 'bottom'],
11676
11968
  flex: ['basis', 'grow', 'shrink'],
11677
11969
  gap: ['gap-x', 'gap-y'],
11678
- p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],
11970
+ p: ['px', 'py', 'ps', 'pe', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl'],
11679
11971
  px: ['pr', 'pl'],
11680
11972
  py: ['pt', 'pb'],
11681
- m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
11973
+ m: ['mx', 'my', 'ms', 'me', 'mbs', 'mbe', 'mt', 'mr', 'mb', 'ml'],
11682
11974
  mx: ['mr', 'ml'],
11683
11975
  my: ['mt', 'mb'],
11684
11976
  size: ['w', 'h'],
@@ -11698,18 +11990,18 @@ const getDefaultConfig = () => {
11698
11990
  'rounded-b': ['rounded-br', 'rounded-bl'],
11699
11991
  'rounded-l': ['rounded-tl', 'rounded-bl'],
11700
11992
  'border-spacing': ['border-spacing-x', 'border-spacing-y'],
11701
- 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
11993
+ 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-bs', 'border-w-be', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
11702
11994
  'border-w-x': ['border-w-r', 'border-w-l'],
11703
11995
  'border-w-y': ['border-w-t', 'border-w-b'],
11704
- 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
11996
+ 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-bs', 'border-color-be', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
11705
11997
  'border-color-x': ['border-color-r', 'border-color-l'],
11706
11998
  'border-color-y': ['border-color-t', 'border-color-b'],
11707
11999
  translate: ['translate-x', 'translate-y', 'translate-none'],
11708
12000
  'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],
11709
- 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
12001
+ 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mbs', 'scroll-mbe', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
11710
12002
  'scroll-mx': ['scroll-mr', 'scroll-ml'],
11711
12003
  'scroll-my': ['scroll-mt', 'scroll-mb'],
11712
- 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
12004
+ 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pbs', 'scroll-pbe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
11713
12005
  'scroll-px': ['scroll-pr', 'scroll-pl'],
11714
12006
  'scroll-py': ['scroll-pt', 'scroll-pb'],
11715
12007
  touch: ['touch-x', 'touch-y', 'touch-pz'],
@@ -13273,7 +13565,7 @@ const Calendar = ({ className, classNames, showOutsideDays = true, ...props }) =
13273
13565
 
13274
13566
  var dayjs_min = {exports: {}};
13275
13567
 
13276
- (function (module, exports) {
13568
+ (function (module, exports$1) {
13277
13569
  !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
13278
13570
  } (dayjs_min));
13279
13571