@telepix-lab/telepix-ui 0.8.3 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client.js +650 -358
- package/dist/cjs/icons/Icon.d.ts +21 -0
- package/dist/cjs/icons/components.d.ts +1203 -1167
- package/dist/cjs/icons/custom/abstract/Accessibility2.d.ts +1 -0
- package/dist/cjs/icons/custom/abstract/CircleBackslash.d.ts +1 -0
- package/dist/cjs/icons/custom/abstract/Copy2.d.ts +1 -0
- package/dist/cjs/icons/custom/abstract/Cross2.d.ts +1 -0
- package/dist/cjs/icons/custom/abstract/CrossCircled.d.ts +1 -0
- package/dist/cjs/icons/custom/abstract/ExternalLink2.d.ts +1 -0
- package/dist/cjs/icons/custom/abstract/index.d.ts +7 -1
- package/dist/cjs/icons/custom/alignment/AlignLeft2.d.ts +1 -0
- package/dist/cjs/icons/custom/alignment/AlignRight2.d.ts +1 -0
- package/dist/cjs/icons/custom/alignment/index.d.ts +3 -1
- package/dist/cjs/icons/custom/components/Binary2.d.ts +1 -0
- package/dist/cjs/icons/custom/components/Button.d.ts +1 -0
- package/dist/cjs/icons/custom/components/Calendar2.d.ts +1 -0
- package/dist/cjs/icons/custom/components/FilePdfLine.d.ts +1 -0
- package/dist/cjs/icons/custom/components/FilePdfPdfFill.d.ts +1 -0
- package/dist/cjs/icons/custom/components/FilePdfPdfLine.d.ts +1 -0
- package/dist/cjs/icons/custom/components/FileSymlink2.d.ts +1 -0
- package/dist/cjs/icons/custom/components/index.d.ts +8 -1
- package/dist/cjs/icons/custom/design/BoxModel.d.ts +1 -0
- package/dist/cjs/icons/custom/design/Columns2.d.ts +1 -0
- package/dist/cjs/icons/custom/design/Component1.d.ts +1 -0
- package/dist/cjs/icons/custom/design/Component2.d.ts +1 -0
- package/dist/cjs/icons/custom/design/ComponentInstance.d.ts +1 -0
- package/dist/cjs/icons/custom/design/PolygonFree.d.ts +1 -0
- package/dist/cjs/icons/custom/design/PolygonRect.d.ts +1 -0
- package/dist/cjs/icons/custom/design/Value.d.ts +1 -0
- package/dist/cjs/icons/custom/design/ValueNone.d.ts +1 -0
- package/dist/cjs/icons/custom/design/index.d.ts +9 -0
- package/dist/cjs/icons/custom/etc1/ToggleRightFilled.d.ts +1 -0
- package/dist/cjs/icons/custom/etc1/index.d.ts +1 -0
- package/dist/cjs/icons/custom/etc3/Radiobutton.d.ts +1 -0
- package/dist/cjs/icons/custom/etc3/RainOrSnow2.d.ts +1 -0
- package/dist/cjs/icons/custom/etc3/SnowOrRain2.d.ts +1 -0
- package/dist/cjs/icons/custom/etc3/SunSnow2.d.ts +1 -0
- package/dist/cjs/icons/custom/etc3/index.d.ts +4 -0
- package/dist/cjs/icons/custom/logos/DNAV.d.ts +1 -0
- package/dist/cjs/icons/custom/logos/My.d.ts +1 -0
- package/dist/cjs/icons/custom/logos/index.d.ts +3 -1
- package/dist/cjs/icons/custom/objects/Archive2.d.ts +1 -0
- package/dist/cjs/icons/custom/objects/Backpack2.d.ts +1 -0
- package/dist/cjs/icons/custom/objects/Camera2.d.ts +1 -0
- package/dist/cjs/icons/custom/objects/ClipboardCopy2.d.ts +1 -0
- package/dist/cjs/icons/custom/objects/Cookie2.d.ts +1 -0
- package/dist/cjs/icons/custom/objects/Eraser2.d.ts +1 -0
- package/dist/cjs/icons/custom/objects/FileText2.d.ts +1 -0
- package/dist/cjs/icons/custom/objects/Hand2.d.ts +1 -0
- package/dist/cjs/icons/custom/objects/Home2.d.ts +1 -0
- package/dist/cjs/icons/custom/objects/Trash1.d.ts +1 -0
- package/dist/cjs/icons/custom/objects/index.d.ts +11 -1
- package/dist/cjs/icons/custom/typography/Underline2.d.ts +1 -0
- package/dist/cjs/icons/custom/typography/index.d.ts +2 -1
- package/dist/cjs/icons/data/abstract.d.ts +24 -0
- package/dist/cjs/icons/data/alignment.d.ts +8 -0
- package/dist/cjs/icons/data/component.d.ts +36 -0
- package/dist/cjs/icons/data/design.d.ts +36 -0
- package/dist/cjs/icons/data/etc1.d.ts +4 -0
- package/dist/cjs/icons/data/etc3.d.ts +28 -0
- package/dist/cjs/icons/data/logos.d.ts +8 -0
- package/dist/cjs/icons/data/objects.d.ts +40 -0
- package/dist/cjs/icons/data/typography.d.ts +4 -0
- package/dist/cjs/icons/iconUtils.d.ts +36 -0
- package/dist/cjs/icons/index.d.ts +189 -2
- package/dist/cjs/index.js +5395 -4364
- package/dist/color.css +1 -1
- package/dist/esm/client.js +650 -358
- package/dist/esm/icons/Icon.d.ts +21 -0
- package/dist/esm/icons/components.d.ts +1203 -1167
- package/dist/esm/icons/custom/abstract/Accessibility2.d.ts +1 -0
- package/dist/esm/icons/custom/abstract/CircleBackslash.d.ts +1 -0
- package/dist/esm/icons/custom/abstract/Copy2.d.ts +1 -0
- package/dist/esm/icons/custom/abstract/Cross2.d.ts +1 -0
- package/dist/esm/icons/custom/abstract/CrossCircled.d.ts +1 -0
- package/dist/esm/icons/custom/abstract/ExternalLink2.d.ts +1 -0
- package/dist/esm/icons/custom/abstract/index.d.ts +7 -1
- package/dist/esm/icons/custom/alignment/AlignLeft2.d.ts +1 -0
- package/dist/esm/icons/custom/alignment/AlignRight2.d.ts +1 -0
- package/dist/esm/icons/custom/alignment/index.d.ts +3 -1
- package/dist/esm/icons/custom/components/Binary2.d.ts +1 -0
- package/dist/esm/icons/custom/components/Button.d.ts +1 -0
- package/dist/esm/icons/custom/components/Calendar2.d.ts +1 -0
- package/dist/esm/icons/custom/components/FilePdfLine.d.ts +1 -0
- package/dist/esm/icons/custom/components/FilePdfPdfFill.d.ts +1 -0
- package/dist/esm/icons/custom/components/FilePdfPdfLine.d.ts +1 -0
- package/dist/esm/icons/custom/components/FileSymlink2.d.ts +1 -0
- package/dist/esm/icons/custom/components/index.d.ts +8 -1
- package/dist/esm/icons/custom/design/BoxModel.d.ts +1 -0
- package/dist/esm/icons/custom/design/Columns2.d.ts +1 -0
- package/dist/esm/icons/custom/design/Component1.d.ts +1 -0
- package/dist/esm/icons/custom/design/Component2.d.ts +1 -0
- package/dist/esm/icons/custom/design/ComponentInstance.d.ts +1 -0
- package/dist/esm/icons/custom/design/PolygonFree.d.ts +1 -0
- package/dist/esm/icons/custom/design/PolygonRect.d.ts +1 -0
- package/dist/esm/icons/custom/design/Value.d.ts +1 -0
- package/dist/esm/icons/custom/design/ValueNone.d.ts +1 -0
- package/dist/esm/icons/custom/design/index.d.ts +9 -0
- package/dist/esm/icons/custom/etc1/ToggleRightFilled.d.ts +1 -0
- package/dist/esm/icons/custom/etc1/index.d.ts +1 -0
- package/dist/esm/icons/custom/etc3/Radiobutton.d.ts +1 -0
- package/dist/esm/icons/custom/etc3/RainOrSnow2.d.ts +1 -0
- package/dist/esm/icons/custom/etc3/SnowOrRain2.d.ts +1 -0
- package/dist/esm/icons/custom/etc3/SunSnow2.d.ts +1 -0
- package/dist/esm/icons/custom/etc3/index.d.ts +4 -0
- package/dist/esm/icons/custom/logos/DNAV.d.ts +1 -0
- package/dist/esm/icons/custom/logos/My.d.ts +1 -0
- package/dist/esm/icons/custom/logos/index.d.ts +3 -1
- package/dist/esm/icons/custom/objects/Archive2.d.ts +1 -0
- package/dist/esm/icons/custom/objects/Backpack2.d.ts +1 -0
- package/dist/esm/icons/custom/objects/Camera2.d.ts +1 -0
- package/dist/esm/icons/custom/objects/ClipboardCopy2.d.ts +1 -0
- package/dist/esm/icons/custom/objects/Cookie2.d.ts +1 -0
- package/dist/esm/icons/custom/objects/Eraser2.d.ts +1 -0
- package/dist/esm/icons/custom/objects/FileText2.d.ts +1 -0
- package/dist/esm/icons/custom/objects/Hand2.d.ts +1 -0
- package/dist/esm/icons/custom/objects/Home2.d.ts +1 -0
- package/dist/esm/icons/custom/objects/Trash1.d.ts +1 -0
- package/dist/esm/icons/custom/objects/index.d.ts +11 -1
- package/dist/esm/icons/custom/typography/Underline2.d.ts +1 -0
- package/dist/esm/icons/custom/typography/index.d.ts +2 -1
- package/dist/esm/icons/data/abstract.d.ts +24 -0
- package/dist/esm/icons/data/alignment.d.ts +8 -0
- package/dist/esm/icons/data/component.d.ts +36 -0
- package/dist/esm/icons/data/design.d.ts +36 -0
- package/dist/esm/icons/data/etc1.d.ts +4 -0
- package/dist/esm/icons/data/etc3.d.ts +28 -0
- package/dist/esm/icons/data/logos.d.ts +8 -0
- package/dist/esm/icons/data/objects.d.ts +40 -0
- package/dist/esm/icons/data/typography.d.ts +4 -0
- package/dist/esm/icons/iconUtils.d.ts +36 -0
- package/dist/esm/icons/index.d.ts +189 -2
- package/dist/esm/index.js +5352 -4367
- package/dist/index.d.ts +1411 -1162
- package/dist/styles.css +1 -1
- package/dist/theme.css +1 -1
- package/package.json +53 -48
package/dist/esm/client.js
CHANGED
|
@@ -1814,6 +1814,13 @@ function RemoveScrollSideCar(props) {
|
|
|
1814
1814
|
if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
|
|
1815
1815
|
return false;
|
|
1816
1816
|
}
|
|
1817
|
+
// allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target
|
|
1818
|
+
var selection = window.getSelection();
|
|
1819
|
+
var anchorNode = selection && selection.anchorNode;
|
|
1820
|
+
var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
|
|
1821
|
+
if (isTouchingSelection) {
|
|
1822
|
+
return false;
|
|
1823
|
+
}
|
|
1817
1824
|
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
1818
1825
|
if (!canBeScrolledInMainDirection) {
|
|
1819
1826
|
return true;
|
|
@@ -2060,7 +2067,7 @@ var hideOthers = function (originalTarget, parentNode, markerName) {
|
|
|
2060
2067
|
};
|
|
2061
2068
|
|
|
2062
2069
|
var DIALOG_NAME = "Dialog";
|
|
2063
|
-
var [createDialogContext
|
|
2070
|
+
var [createDialogContext] = createContextScope(DIALOG_NAME);
|
|
2064
2071
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
2065
2072
|
var Dialog$1 = (props) => {
|
|
2066
2073
|
const {
|
|
@@ -2417,7 +2424,7 @@ function useSize(element) {
|
|
|
2417
2424
|
}
|
|
2418
2425
|
|
|
2419
2426
|
var CHECKBOX_NAME = "Checkbox";
|
|
2420
|
-
var [createCheckboxContext
|
|
2427
|
+
var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
|
|
2421
2428
|
var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
|
|
2422
2429
|
function CheckboxProvider(props) {
|
|
2423
2430
|
const {
|
|
@@ -2694,10 +2701,6 @@ const oppositeSideMap = {
|
|
|
2694
2701
|
bottom: 'top',
|
|
2695
2702
|
top: 'bottom'
|
|
2696
2703
|
};
|
|
2697
|
-
const oppositeAlignmentMap = {
|
|
2698
|
-
start: 'end',
|
|
2699
|
-
end: 'start'
|
|
2700
|
-
};
|
|
2701
2704
|
function clamp$1(start, value, end) {
|
|
2702
2705
|
return max(start, min(value, end));
|
|
2703
2706
|
}
|
|
@@ -2716,9 +2719,9 @@ function getOppositeAxis(axis) {
|
|
|
2716
2719
|
function getAxisLength(axis) {
|
|
2717
2720
|
return axis === 'y' ? 'height' : 'width';
|
|
2718
2721
|
}
|
|
2719
|
-
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
2720
2722
|
function getSideAxis(placement) {
|
|
2721
|
-
|
|
2723
|
+
const firstChar = placement[0];
|
|
2724
|
+
return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
|
|
2722
2725
|
}
|
|
2723
2726
|
function getAlignmentAxis(placement) {
|
|
2724
2727
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -2741,7 +2744,7 @@ function getExpandedPlacements(placement) {
|
|
|
2741
2744
|
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
2742
2745
|
}
|
|
2743
2746
|
function getOppositeAlignmentPlacement(placement) {
|
|
2744
|
-
return placement.replace(
|
|
2747
|
+
return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
|
|
2745
2748
|
}
|
|
2746
2749
|
const lrPlacement = ['left', 'right'];
|
|
2747
2750
|
const rlPlacement = ['right', 'left'];
|
|
@@ -2772,7 +2775,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
|
2772
2775
|
return list;
|
|
2773
2776
|
}
|
|
2774
2777
|
function getOppositePlacement(placement) {
|
|
2775
|
-
|
|
2778
|
+
const side = getSide(placement);
|
|
2779
|
+
return oppositeSideMap[side] + placement.slice(side.length);
|
|
2776
2780
|
}
|
|
2777
2781
|
function expandPaddingObject(padding) {
|
|
2778
2782
|
return {
|
|
@@ -2866,6 +2870,74 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
2866
2870
|
return coords;
|
|
2867
2871
|
}
|
|
2868
2872
|
|
|
2873
|
+
/**
|
|
2874
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
|
2875
|
+
* element is overflowing a given clipping boundary on each side.
|
|
2876
|
+
* - positive = overflowing the boundary by that number of pixels
|
|
2877
|
+
* - negative = how many pixels left before it will overflow
|
|
2878
|
+
* - 0 = lies flush with the boundary
|
|
2879
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
|
2880
|
+
*/
|
|
2881
|
+
async function detectOverflow(state, options) {
|
|
2882
|
+
var _await$platform$isEle;
|
|
2883
|
+
if (options === void 0) {
|
|
2884
|
+
options = {};
|
|
2885
|
+
}
|
|
2886
|
+
const {
|
|
2887
|
+
x,
|
|
2888
|
+
y,
|
|
2889
|
+
platform,
|
|
2890
|
+
rects,
|
|
2891
|
+
elements,
|
|
2892
|
+
strategy
|
|
2893
|
+
} = state;
|
|
2894
|
+
const {
|
|
2895
|
+
boundary = 'clippingAncestors',
|
|
2896
|
+
rootBoundary = 'viewport',
|
|
2897
|
+
elementContext = 'floating',
|
|
2898
|
+
altBoundary = false,
|
|
2899
|
+
padding = 0
|
|
2900
|
+
} = evaluate(options, state);
|
|
2901
|
+
const paddingObject = getPaddingObject(padding);
|
|
2902
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
2903
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
2904
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
2905
|
+
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))),
|
|
2906
|
+
boundary,
|
|
2907
|
+
rootBoundary,
|
|
2908
|
+
strategy
|
|
2909
|
+
}));
|
|
2910
|
+
const rect = elementContext === 'floating' ? {
|
|
2911
|
+
x,
|
|
2912
|
+
y,
|
|
2913
|
+
width: rects.floating.width,
|
|
2914
|
+
height: rects.floating.height
|
|
2915
|
+
} : rects.reference;
|
|
2916
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
2917
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
2918
|
+
x: 1,
|
|
2919
|
+
y: 1
|
|
2920
|
+
} : {
|
|
2921
|
+
x: 1,
|
|
2922
|
+
y: 1
|
|
2923
|
+
};
|
|
2924
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2925
|
+
elements,
|
|
2926
|
+
rect,
|
|
2927
|
+
offsetParent,
|
|
2928
|
+
strategy
|
|
2929
|
+
}) : rect);
|
|
2930
|
+
return {
|
|
2931
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
2932
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
2933
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
2934
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
2935
|
+
};
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2938
|
+
// Maximum number of resets that can occur before bailing to avoid infinite reset loops.
|
|
2939
|
+
const MAX_RESET_COUNT = 50;
|
|
2940
|
+
|
|
2869
2941
|
/**
|
|
2870
2942
|
* Computes the `x` and `y` coordinates that will place the floating element
|
|
2871
2943
|
* next to a given reference element.
|
|
@@ -2880,7 +2952,10 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
2880
2952
|
middleware = [],
|
|
2881
2953
|
platform
|
|
2882
2954
|
} = config;
|
|
2883
|
-
const
|
|
2955
|
+
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
2956
|
+
...platform,
|
|
2957
|
+
detectOverflow
|
|
2958
|
+
};
|
|
2884
2959
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
2885
2960
|
let rects = await platform.getElementRects({
|
|
2886
2961
|
reference,
|
|
@@ -2892,13 +2967,17 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
2892
2967
|
y
|
|
2893
2968
|
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
2894
2969
|
let statefulPlacement = placement;
|
|
2895
|
-
let middlewareData = {};
|
|
2896
2970
|
let resetCount = 0;
|
|
2897
|
-
|
|
2971
|
+
const middlewareData = {};
|
|
2972
|
+
for (let i = 0; i < middleware.length; i++) {
|
|
2973
|
+
const currentMiddleware = middleware[i];
|
|
2974
|
+
if (!currentMiddleware) {
|
|
2975
|
+
continue;
|
|
2976
|
+
}
|
|
2898
2977
|
const {
|
|
2899
2978
|
name,
|
|
2900
2979
|
fn
|
|
2901
|
-
} =
|
|
2980
|
+
} = currentMiddleware;
|
|
2902
2981
|
const {
|
|
2903
2982
|
x: nextX,
|
|
2904
2983
|
y: nextY,
|
|
@@ -2912,7 +2991,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
2912
2991
|
strategy,
|
|
2913
2992
|
middlewareData,
|
|
2914
2993
|
rects,
|
|
2915
|
-
platform,
|
|
2994
|
+
platform: platformWithDetectOverflow,
|
|
2916
2995
|
elements: {
|
|
2917
2996
|
reference,
|
|
2918
2997
|
floating
|
|
@@ -2920,14 +2999,11 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
2920
2999
|
});
|
|
2921
3000
|
x = nextX != null ? nextX : x;
|
|
2922
3001
|
y = nextY != null ? nextY : y;
|
|
2923
|
-
middlewareData = {
|
|
2924
|
-
...middlewareData,
|
|
2925
|
-
|
|
2926
|
-
...middlewareData[name],
|
|
2927
|
-
...data
|
|
2928
|
-
}
|
|
3002
|
+
middlewareData[name] = {
|
|
3003
|
+
...middlewareData[name],
|
|
3004
|
+
...data
|
|
2929
3005
|
};
|
|
2930
|
-
if (reset && resetCount
|
|
3006
|
+
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
2931
3007
|
resetCount++;
|
|
2932
3008
|
if (typeof reset === 'object') {
|
|
2933
3009
|
if (reset.placement) {
|
|
@@ -2957,71 +3033,6 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
2957
3033
|
};
|
|
2958
3034
|
};
|
|
2959
3035
|
|
|
2960
|
-
/**
|
|
2961
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
2962
|
-
* element is overflowing a given clipping boundary on each side.
|
|
2963
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
2964
|
-
* - negative = how many pixels left before it will overflow
|
|
2965
|
-
* - 0 = lies flush with the boundary
|
|
2966
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
2967
|
-
*/
|
|
2968
|
-
async function detectOverflow(state, options) {
|
|
2969
|
-
var _await$platform$isEle;
|
|
2970
|
-
if (options === void 0) {
|
|
2971
|
-
options = {};
|
|
2972
|
-
}
|
|
2973
|
-
const {
|
|
2974
|
-
x,
|
|
2975
|
-
y,
|
|
2976
|
-
platform,
|
|
2977
|
-
rects,
|
|
2978
|
-
elements,
|
|
2979
|
-
strategy
|
|
2980
|
-
} = state;
|
|
2981
|
-
const {
|
|
2982
|
-
boundary = 'clippingAncestors',
|
|
2983
|
-
rootBoundary = 'viewport',
|
|
2984
|
-
elementContext = 'floating',
|
|
2985
|
-
altBoundary = false,
|
|
2986
|
-
padding = 0
|
|
2987
|
-
} = evaluate(options, state);
|
|
2988
|
-
const paddingObject = getPaddingObject(padding);
|
|
2989
|
-
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
2990
|
-
const element = elements[altBoundary ? altContext : elementContext];
|
|
2991
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
2992
|
-
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))),
|
|
2993
|
-
boundary,
|
|
2994
|
-
rootBoundary,
|
|
2995
|
-
strategy
|
|
2996
|
-
}));
|
|
2997
|
-
const rect = elementContext === 'floating' ? {
|
|
2998
|
-
x,
|
|
2999
|
-
y,
|
|
3000
|
-
width: rects.floating.width,
|
|
3001
|
-
height: rects.floating.height
|
|
3002
|
-
} : rects.reference;
|
|
3003
|
-
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
3004
|
-
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
3005
|
-
x: 1,
|
|
3006
|
-
y: 1
|
|
3007
|
-
} : {
|
|
3008
|
-
x: 1,
|
|
3009
|
-
y: 1
|
|
3010
|
-
};
|
|
3011
|
-
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
3012
|
-
elements,
|
|
3013
|
-
rect,
|
|
3014
|
-
offsetParent,
|
|
3015
|
-
strategy
|
|
3016
|
-
}) : rect);
|
|
3017
|
-
return {
|
|
3018
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
3019
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
3020
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
3021
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
3022
|
-
};
|
|
3023
|
-
}
|
|
3024
|
-
|
|
3025
3036
|
/**
|
|
3026
3037
|
* Provides data to position an inner element of the floating element so that it
|
|
3027
3038
|
* appears centered to the reference element.
|
|
@@ -3154,7 +3165,7 @@ const flip$2 = function (options) {
|
|
|
3154
3165
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
3155
3166
|
}
|
|
3156
3167
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
3157
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
3168
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
3158
3169
|
const overflows = [];
|
|
3159
3170
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
3160
3171
|
if (checkMainAxis) {
|
|
@@ -3261,7 +3272,8 @@ const hide$2 = function (options) {
|
|
|
3261
3272
|
options,
|
|
3262
3273
|
async fn(state) {
|
|
3263
3274
|
const {
|
|
3264
|
-
rects
|
|
3275
|
+
rects,
|
|
3276
|
+
platform
|
|
3265
3277
|
} = state;
|
|
3266
3278
|
const {
|
|
3267
3279
|
strategy = 'referenceHidden',
|
|
@@ -3270,7 +3282,7 @@ const hide$2 = function (options) {
|
|
|
3270
3282
|
switch (strategy) {
|
|
3271
3283
|
case 'referenceHidden':
|
|
3272
3284
|
{
|
|
3273
|
-
const overflow = await detectOverflow(state, {
|
|
3285
|
+
const overflow = await platform.detectOverflow(state, {
|
|
3274
3286
|
...detectOverflowOptions,
|
|
3275
3287
|
elementContext: 'reference'
|
|
3276
3288
|
});
|
|
@@ -3284,7 +3296,7 @@ const hide$2 = function (options) {
|
|
|
3284
3296
|
}
|
|
3285
3297
|
case 'escaped':
|
|
3286
3298
|
{
|
|
3287
|
-
const overflow = await detectOverflow(state, {
|
|
3299
|
+
const overflow = await platform.detectOverflow(state, {
|
|
3288
3300
|
...detectOverflowOptions,
|
|
3289
3301
|
altBoundary: true
|
|
3290
3302
|
});
|
|
@@ -3407,7 +3419,8 @@ const shift$2 = function (options) {
|
|
|
3407
3419
|
const {
|
|
3408
3420
|
x,
|
|
3409
3421
|
y,
|
|
3410
|
-
placement
|
|
3422
|
+
placement,
|
|
3423
|
+
platform
|
|
3411
3424
|
} = state;
|
|
3412
3425
|
const {
|
|
3413
3426
|
mainAxis: checkMainAxis = true,
|
|
@@ -3430,7 +3443,7 @@ const shift$2 = function (options) {
|
|
|
3430
3443
|
x,
|
|
3431
3444
|
y
|
|
3432
3445
|
};
|
|
3433
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
3446
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
3434
3447
|
const crossAxis = getSideAxis(getSide(placement));
|
|
3435
3448
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
3436
3449
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -3562,7 +3575,7 @@ const size$2 = function (options) {
|
|
|
3562
3575
|
apply = () => {},
|
|
3563
3576
|
...detectOverflowOptions
|
|
3564
3577
|
} = evaluate(options, state);
|
|
3565
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
3578
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
3566
3579
|
const side = getSide(placement);
|
|
3567
3580
|
const alignment = getAlignment(placement);
|
|
3568
3581
|
const isYAxis = getSideAxis(placement) === 'y';
|
|
@@ -3665,7 +3678,6 @@ function isShadowRoot(value) {
|
|
|
3665
3678
|
}
|
|
3666
3679
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
3667
3680
|
}
|
|
3668
|
-
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
3669
3681
|
function isOverflowElement(element) {
|
|
3670
3682
|
const {
|
|
3671
3683
|
overflow,
|
|
@@ -3673,32 +3685,35 @@ function isOverflowElement(element) {
|
|
|
3673
3685
|
overflowY,
|
|
3674
3686
|
display
|
|
3675
3687
|
} = getComputedStyle$1(element);
|
|
3676
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) &&
|
|
3688
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
|
3677
3689
|
}
|
|
3678
|
-
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
|
|
3679
3690
|
function isTableElement(element) {
|
|
3680
|
-
return
|
|
3691
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
3681
3692
|
}
|
|
3682
|
-
const topLayerSelectors = [':popover-open', ':modal'];
|
|
3683
3693
|
function isTopLayer(element) {
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
return
|
|
3687
|
-
} catch (_e) {
|
|
3688
|
-
return false;
|
|
3694
|
+
try {
|
|
3695
|
+
if (element.matches(':popover-open')) {
|
|
3696
|
+
return true;
|
|
3689
3697
|
}
|
|
3690
|
-
})
|
|
3698
|
+
} catch (_e) {
|
|
3699
|
+
// no-op
|
|
3700
|
+
}
|
|
3701
|
+
try {
|
|
3702
|
+
return element.matches(':modal');
|
|
3703
|
+
} catch (_e) {
|
|
3704
|
+
return false;
|
|
3705
|
+
}
|
|
3691
3706
|
}
|
|
3692
|
-
const
|
|
3693
|
-
const
|
|
3694
|
-
const
|
|
3707
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
3708
|
+
const containRe = /paint|layout|strict|content/;
|
|
3709
|
+
const isNotNone = value => !!value && value !== 'none';
|
|
3710
|
+
let isWebKitValue;
|
|
3695
3711
|
function isContainingBlock(elementOrCss) {
|
|
3696
|
-
const webkit = isWebKit();
|
|
3697
3712
|
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
3698
3713
|
|
|
3699
3714
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
3700
3715
|
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
3701
|
-
return
|
|
3716
|
+
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 || '');
|
|
3702
3717
|
}
|
|
3703
3718
|
function getContainingBlock(element) {
|
|
3704
3719
|
let currentNode = getParentNode(element);
|
|
@@ -3713,12 +3728,13 @@ function getContainingBlock(element) {
|
|
|
3713
3728
|
return null;
|
|
3714
3729
|
}
|
|
3715
3730
|
function isWebKit() {
|
|
3716
|
-
if (
|
|
3717
|
-
|
|
3731
|
+
if (isWebKitValue == null) {
|
|
3732
|
+
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
|
3733
|
+
}
|
|
3734
|
+
return isWebKitValue;
|
|
3718
3735
|
}
|
|
3719
|
-
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
3720
3736
|
function isLastTraversableNode(node) {
|
|
3721
|
-
return
|
|
3737
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
3722
3738
|
}
|
|
3723
3739
|
function getComputedStyle$1(element) {
|
|
3724
3740
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -3774,8 +3790,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
3774
3790
|
if (isBody) {
|
|
3775
3791
|
const frameElement = getFrameElement(win);
|
|
3776
3792
|
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
3793
|
+
} else {
|
|
3794
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
3777
3795
|
}
|
|
3778
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
3779
3796
|
}
|
|
3780
3797
|
function getFrameElement(win) {
|
|
3781
3798
|
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
@@ -3952,7 +3969,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
3952
3969
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
3953
3970
|
scroll = getNodeScroll(offsetParent);
|
|
3954
3971
|
}
|
|
3955
|
-
if (
|
|
3972
|
+
if (isOffsetParentAnElement) {
|
|
3956
3973
|
const offsetRect = getBoundingClientRect(offsetParent);
|
|
3957
3974
|
scale = getScale(offsetParent);
|
|
3958
3975
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
@@ -4040,7 +4057,6 @@ function getViewportRect(element, strategy) {
|
|
|
4040
4057
|
};
|
|
4041
4058
|
}
|
|
4042
4059
|
|
|
4043
|
-
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
|
|
4044
4060
|
// Returns the inner client rect, subtracting scrollbars if present.
|
|
4045
4061
|
function getInnerBoundingClientRect(element, strategy) {
|
|
4046
4062
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
@@ -4105,7 +4121,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
4105
4121
|
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
4106
4122
|
currentContainingBlockComputedStyle = null;
|
|
4107
4123
|
}
|
|
4108
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle &&
|
|
4124
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
4109
4125
|
if (shouldDropCurrentNode) {
|
|
4110
4126
|
// Drop non-containing blocks.
|
|
4111
4127
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
@@ -4130,20 +4146,23 @@ function getClippingRect(_ref) {
|
|
|
4130
4146
|
} = _ref;
|
|
4131
4147
|
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
4132
4148
|
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
4133
|
-
const
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4149
|
+
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
4150
|
+
let top = firstRect.top;
|
|
4151
|
+
let right = firstRect.right;
|
|
4152
|
+
let bottom = firstRect.bottom;
|
|
4153
|
+
let left = firstRect.left;
|
|
4154
|
+
for (let i = 1; i < clippingAncestors.length; i++) {
|
|
4155
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
|
|
4156
|
+
top = max(rect.top, top);
|
|
4157
|
+
right = min(rect.right, right);
|
|
4158
|
+
bottom = min(rect.bottom, bottom);
|
|
4159
|
+
left = max(rect.left, left);
|
|
4160
|
+
}
|
|
4142
4161
|
return {
|
|
4143
|
-
width:
|
|
4144
|
-
height:
|
|
4145
|
-
x:
|
|
4146
|
-
y:
|
|
4162
|
+
width: right - left,
|
|
4163
|
+
height: bottom - top,
|
|
4164
|
+
x: left,
|
|
4165
|
+
y: top
|
|
4147
4166
|
};
|
|
4148
4167
|
}
|
|
4149
4168
|
|
|
@@ -4394,7 +4413,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
4394
4413
|
animationFrame = false
|
|
4395
4414
|
} = options;
|
|
4396
4415
|
const referenceEl = unwrapElement(reference);
|
|
4397
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
4416
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
|
|
4398
4417
|
ancestors.forEach(ancestor => {
|
|
4399
4418
|
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
4400
4419
|
passive: true
|
|
@@ -4407,7 +4426,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
4407
4426
|
if (elementResize) {
|
|
4408
4427
|
resizeObserver = new ResizeObserver(_ref => {
|
|
4409
4428
|
let [firstEntry] = _ref;
|
|
4410
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
4429
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
|
|
4411
4430
|
// Prevent update loops when using the `size` middleware.
|
|
4412
4431
|
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
4413
4432
|
resizeObserver.unobserve(floating);
|
|
@@ -4422,7 +4441,9 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
4422
4441
|
if (referenceEl && !animationFrame) {
|
|
4423
4442
|
resizeObserver.observe(referenceEl);
|
|
4424
4443
|
}
|
|
4425
|
-
|
|
4444
|
+
if (floating) {
|
|
4445
|
+
resizeObserver.observe(floating);
|
|
4446
|
+
}
|
|
4426
4447
|
}
|
|
4427
4448
|
let frameId;
|
|
4428
4449
|
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
@@ -4804,28 +4825,39 @@ const arrow$1 = options => {
|
|
|
4804
4825
|
* object may be passed.
|
|
4805
4826
|
* @see https://floating-ui.com/docs/offset
|
|
4806
4827
|
*/
|
|
4807
|
-
const offset = (options, deps) =>
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4828
|
+
const offset = (options, deps) => {
|
|
4829
|
+
const result = offset$1(options);
|
|
4830
|
+
return {
|
|
4831
|
+
name: result.name,
|
|
4832
|
+
fn: result.fn,
|
|
4833
|
+
options: [options, deps]
|
|
4834
|
+
};
|
|
4835
|
+
};
|
|
4811
4836
|
|
|
4812
4837
|
/**
|
|
4813
4838
|
* Optimizes the visibility of the floating element by shifting it in order to
|
|
4814
4839
|
* keep it in view when it will overflow the clipping boundary.
|
|
4815
4840
|
* @see https://floating-ui.com/docs/shift
|
|
4816
4841
|
*/
|
|
4817
|
-
const shift = (options, deps) =>
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4842
|
+
const shift = (options, deps) => {
|
|
4843
|
+
const result = shift$1(options);
|
|
4844
|
+
return {
|
|
4845
|
+
name: result.name,
|
|
4846
|
+
fn: result.fn,
|
|
4847
|
+
options: [options, deps]
|
|
4848
|
+
};
|
|
4849
|
+
};
|
|
4821
4850
|
|
|
4822
4851
|
/**
|
|
4823
4852
|
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
4824
4853
|
*/
|
|
4825
|
-
const limitShift = (options, deps) =>
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4854
|
+
const limitShift = (options, deps) => {
|
|
4855
|
+
const result = limitShift$1(options);
|
|
4856
|
+
return {
|
|
4857
|
+
fn: result.fn,
|
|
4858
|
+
options: [options, deps]
|
|
4859
|
+
};
|
|
4860
|
+
};
|
|
4829
4861
|
|
|
4830
4862
|
/**
|
|
4831
4863
|
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
@@ -4833,10 +4865,14 @@ const limitShift = (options, deps) => ({
|
|
|
4833
4865
|
* clipping boundary. Alternative to `autoPlacement`.
|
|
4834
4866
|
* @see https://floating-ui.com/docs/flip
|
|
4835
4867
|
*/
|
|
4836
|
-
const flip = (options, deps) =>
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4868
|
+
const flip = (options, deps) => {
|
|
4869
|
+
const result = flip$1(options);
|
|
4870
|
+
return {
|
|
4871
|
+
name: result.name,
|
|
4872
|
+
fn: result.fn,
|
|
4873
|
+
options: [options, deps]
|
|
4874
|
+
};
|
|
4875
|
+
};
|
|
4840
4876
|
|
|
4841
4877
|
/**
|
|
4842
4878
|
* Provides data that allows you to change the size of the floating element —
|
|
@@ -4844,20 +4880,28 @@ const flip = (options, deps) => ({
|
|
|
4844
4880
|
* width of the reference element.
|
|
4845
4881
|
* @see https://floating-ui.com/docs/size
|
|
4846
4882
|
*/
|
|
4847
|
-
const size = (options, deps) =>
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4883
|
+
const size = (options, deps) => {
|
|
4884
|
+
const result = size$1(options);
|
|
4885
|
+
return {
|
|
4886
|
+
name: result.name,
|
|
4887
|
+
fn: result.fn,
|
|
4888
|
+
options: [options, deps]
|
|
4889
|
+
};
|
|
4890
|
+
};
|
|
4851
4891
|
|
|
4852
4892
|
/**
|
|
4853
4893
|
* Provides data to hide the floating element in applicable situations, such as
|
|
4854
4894
|
* when it is not in the same clipping context as the reference element.
|
|
4855
4895
|
* @see https://floating-ui.com/docs/hide
|
|
4856
4896
|
*/
|
|
4857
|
-
const hide = (options, deps) =>
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4897
|
+
const hide = (options, deps) => {
|
|
4898
|
+
const result = hide$1(options);
|
|
4899
|
+
return {
|
|
4900
|
+
name: result.name,
|
|
4901
|
+
fn: result.fn,
|
|
4902
|
+
options: [options, deps]
|
|
4903
|
+
};
|
|
4904
|
+
};
|
|
4861
4905
|
|
|
4862
4906
|
/**
|
|
4863
4907
|
* Provides data to position an inner element of the floating element so that it
|
|
@@ -4865,10 +4909,14 @@ const hide = (options, deps) => ({
|
|
|
4865
4909
|
* This wraps the core `arrow` middleware to allow React refs as the element.
|
|
4866
4910
|
* @see https://floating-ui.com/docs/arrow
|
|
4867
4911
|
*/
|
|
4868
|
-
const arrow = (options, deps) =>
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4912
|
+
const arrow = (options, deps) => {
|
|
4913
|
+
const result = arrow$1(options);
|
|
4914
|
+
return {
|
|
4915
|
+
name: result.name,
|
|
4916
|
+
fn: result.fn,
|
|
4917
|
+
options: [options, deps]
|
|
4918
|
+
};
|
|
4919
|
+
};
|
|
4872
4920
|
|
|
4873
4921
|
// src/arrow.tsx
|
|
4874
4922
|
var NAME = "Arrow";
|
|
@@ -6183,7 +6231,7 @@ var SubTrigger = MenuSubTrigger;
|
|
|
6183
6231
|
var SubContent = MenuSubContent;
|
|
6184
6232
|
|
|
6185
6233
|
var CONTEXT_MENU_NAME = "ContextMenu";
|
|
6186
|
-
var [createContextMenuContext
|
|
6234
|
+
var [createContextMenuContext] = createContextScope(CONTEXT_MENU_NAME, [
|
|
6187
6235
|
createMenuScope
|
|
6188
6236
|
]);
|
|
6189
6237
|
var useMenuScope = createMenuScope();
|
|
@@ -6466,7 +6514,7 @@ function clamp(value, [min, max]) {
|
|
|
6466
6514
|
}
|
|
6467
6515
|
|
|
6468
6516
|
var POPOVER_NAME = "Popover";
|
|
6469
|
-
var [createPopoverContext
|
|
6517
|
+
var [createPopoverContext] = createContextScope(POPOVER_NAME, [
|
|
6470
6518
|
createPopperScope
|
|
6471
6519
|
]);
|
|
6472
6520
|
var usePopperScope$2 = createPopperScope();
|
|
@@ -6869,7 +6917,7 @@ function getState$1(checked) {
|
|
|
6869
6917
|
}
|
|
6870
6918
|
var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
|
6871
6919
|
var RADIO_GROUP_NAME = "RadioGroup";
|
|
6872
|
-
var [createRadioGroupContext
|
|
6920
|
+
var [createRadioGroupContext] = createContextScope(RADIO_GROUP_NAME, [
|
|
6873
6921
|
createRovingFocusGroupScope,
|
|
6874
6922
|
createRadioScope
|
|
6875
6923
|
]);
|
|
@@ -7008,7 +7056,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
|
7008
7056
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
7009
7057
|
var SELECT_NAME = "Select";
|
|
7010
7058
|
var [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME);
|
|
7011
|
-
var [createSelectContext
|
|
7059
|
+
var [createSelectContext] = createContextScope(SELECT_NAME, [
|
|
7012
7060
|
createCollectionScope,
|
|
7013
7061
|
createPopperScope
|
|
7014
7062
|
]);
|
|
@@ -8133,7 +8181,7 @@ var ItemIndicator = SelectItemIndicator;
|
|
|
8133
8181
|
var Separator = SelectSeparator$1;
|
|
8134
8182
|
|
|
8135
8183
|
var SWITCH_NAME = "Switch";
|
|
8136
|
-
var [createSwitchContext
|
|
8184
|
+
var [createSwitchContext] = createContextScope(SWITCH_NAME);
|
|
8137
8185
|
var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
|
|
8138
8186
|
var Switch$1 = React.forwardRef(
|
|
8139
8187
|
(props, forwardedRef) => {
|
|
@@ -8273,7 +8321,7 @@ function getState(checked) {
|
|
|
8273
8321
|
var Root = Switch$1;
|
|
8274
8322
|
var Thumb = SwitchThumb;
|
|
8275
8323
|
|
|
8276
|
-
var [createTooltipContext
|
|
8324
|
+
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
8277
8325
|
createPopperScope
|
|
8278
8326
|
]);
|
|
8279
8327
|
var usePopperScope = createPopperScope();
|
|
@@ -8750,7 +8798,36 @@ var Arrow2 = TooltipArrow$1;
|
|
|
8750
8798
|
|
|
8751
8799
|
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}
|
|
8752
8800
|
|
|
8801
|
+
/**
|
|
8802
|
+
* Concatenates two arrays faster than the array spread operator.
|
|
8803
|
+
*/
|
|
8804
|
+
const concatArrays = (array1, array2) => {
|
|
8805
|
+
// Pre-allocate for better V8 optimization
|
|
8806
|
+
const combinedArray = new Array(array1.length + array2.length);
|
|
8807
|
+
for (let i = 0; i < array1.length; i++) {
|
|
8808
|
+
combinedArray[i] = array1[i];
|
|
8809
|
+
}
|
|
8810
|
+
for (let i = 0; i < array2.length; i++) {
|
|
8811
|
+
combinedArray[array1.length + i] = array2[i];
|
|
8812
|
+
}
|
|
8813
|
+
return combinedArray;
|
|
8814
|
+
};
|
|
8815
|
+
|
|
8816
|
+
// Factory function ensures consistent object shapes
|
|
8817
|
+
const createClassValidatorObject = (classGroupId, validator) => ({
|
|
8818
|
+
classGroupId,
|
|
8819
|
+
validator
|
|
8820
|
+
});
|
|
8821
|
+
// Factory ensures consistent ClassPartObject shape
|
|
8822
|
+
const createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({
|
|
8823
|
+
nextPart,
|
|
8824
|
+
validators,
|
|
8825
|
+
classGroupId
|
|
8826
|
+
});
|
|
8753
8827
|
const CLASS_PART_SEPARATOR = '-';
|
|
8828
|
+
const EMPTY_CONFLICTS = [];
|
|
8829
|
+
// I use two dots here because one dot is used as prefix for class groups in plugins
|
|
8830
|
+
const ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';
|
|
8754
8831
|
const createClassGroupUtils = config => {
|
|
8755
8832
|
const classMap = createClassMap(config);
|
|
8756
8833
|
const {
|
|
@@ -8758,54 +8835,73 @@ const createClassGroupUtils = config => {
|
|
|
8758
8835
|
conflictingClassGroupModifiers
|
|
8759
8836
|
} = config;
|
|
8760
8837
|
const getClassGroupId = className => {
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
if (classParts[0] === '' && classParts.length !== 1) {
|
|
8764
|
-
classParts.shift();
|
|
8838
|
+
if (className.startsWith('[') && className.endsWith(']')) {
|
|
8839
|
+
return getGroupIdForArbitraryProperty(className);
|
|
8765
8840
|
}
|
|
8766
|
-
|
|
8841
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
8842
|
+
// Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and skip it.
|
|
8843
|
+
const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;
|
|
8844
|
+
return getGroupRecursive(classParts, startIndex, classMap);
|
|
8767
8845
|
};
|
|
8768
8846
|
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8847
|
+
if (hasPostfixModifier) {
|
|
8848
|
+
const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
|
|
8849
|
+
const baseConflicts = conflictingClassGroups[classGroupId];
|
|
8850
|
+
if (modifierConflicts) {
|
|
8851
|
+
if (baseConflicts) {
|
|
8852
|
+
// Merge base conflicts with modifier conflicts
|
|
8853
|
+
return concatArrays(baseConflicts, modifierConflicts);
|
|
8854
|
+
}
|
|
8855
|
+
// Only modifier conflicts
|
|
8856
|
+
return modifierConflicts;
|
|
8857
|
+
}
|
|
8858
|
+
// Fall back to without postfix if no modifier conflicts
|
|
8859
|
+
return baseConflicts || EMPTY_CONFLICTS;
|
|
8772
8860
|
}
|
|
8773
|
-
return
|
|
8861
|
+
return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
|
|
8774
8862
|
};
|
|
8775
8863
|
return {
|
|
8776
8864
|
getClassGroupId,
|
|
8777
8865
|
getConflictingClassGroupIds
|
|
8778
8866
|
};
|
|
8779
8867
|
};
|
|
8780
|
-
const getGroupRecursive = (classParts, classPartObject) => {
|
|
8781
|
-
|
|
8868
|
+
const getGroupRecursive = (classParts, startIndex, classPartObject) => {
|
|
8869
|
+
const classPathsLength = classParts.length - startIndex;
|
|
8870
|
+
if (classPathsLength === 0) {
|
|
8782
8871
|
return classPartObject.classGroupId;
|
|
8783
8872
|
}
|
|
8784
|
-
const currentClassPart = classParts[
|
|
8873
|
+
const currentClassPart = classParts[startIndex];
|
|
8785
8874
|
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
return
|
|
8875
|
+
if (nextClassPartObject) {
|
|
8876
|
+
const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
|
|
8877
|
+
if (result) return result;
|
|
8789
8878
|
}
|
|
8790
|
-
|
|
8879
|
+
const validators = classPartObject.validators;
|
|
8880
|
+
if (validators === null) {
|
|
8791
8881
|
return undefined;
|
|
8792
8882
|
}
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
if (arbitraryPropertyRegex.test(className)) {
|
|
8801
|
-
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
|
|
8802
|
-
const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));
|
|
8803
|
-
if (property) {
|
|
8804
|
-
// I use two dots here because one dot is used as prefix for class groups in plugins
|
|
8805
|
-
return 'arbitrary..' + property;
|
|
8883
|
+
// Build classRest string efficiently by joining from startIndex onwards
|
|
8884
|
+
const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
|
|
8885
|
+
const validatorsLength = validators.length;
|
|
8886
|
+
for (let i = 0; i < validatorsLength; i++) {
|
|
8887
|
+
const validatorObj = validators[i];
|
|
8888
|
+
if (validatorObj.validator(classRest)) {
|
|
8889
|
+
return validatorObj.classGroupId;
|
|
8806
8890
|
}
|
|
8807
8891
|
}
|
|
8892
|
+
return undefined;
|
|
8808
8893
|
};
|
|
8894
|
+
/**
|
|
8895
|
+
* Get the class group ID for an arbitrary property.
|
|
8896
|
+
*
|
|
8897
|
+
* @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
|
|
8898
|
+
*/
|
|
8899
|
+
const getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {
|
|
8900
|
+
const content = className.slice(1, -1);
|
|
8901
|
+
const colonIndex = content.indexOf(':');
|
|
8902
|
+
const property = content.slice(0, colonIndex);
|
|
8903
|
+
return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;
|
|
8904
|
+
})();
|
|
8809
8905
|
/**
|
|
8810
8906
|
* Exported for testing only
|
|
8811
8907
|
*/
|
|
@@ -8814,54 +8910,77 @@ const createClassMap = config => {
|
|
|
8814
8910
|
theme,
|
|
8815
8911
|
classGroups
|
|
8816
8912
|
} = config;
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8913
|
+
return processClassGroups(classGroups, theme);
|
|
8914
|
+
};
|
|
8915
|
+
// Split into separate functions to maintain monomorphic call sites
|
|
8916
|
+
const processClassGroups = (classGroups, theme) => {
|
|
8917
|
+
const classMap = createClassPartObject();
|
|
8821
8918
|
for (const classGroupId in classGroups) {
|
|
8822
|
-
|
|
8919
|
+
const group = classGroups[classGroupId];
|
|
8920
|
+
processClassesRecursively(group, classMap, classGroupId, theme);
|
|
8823
8921
|
}
|
|
8824
8922
|
return classMap;
|
|
8825
8923
|
};
|
|
8826
8924
|
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
8827
|
-
classGroup.
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8925
|
+
const len = classGroup.length;
|
|
8926
|
+
for (let i = 0; i < len; i++) {
|
|
8927
|
+
const classDefinition = classGroup[i];
|
|
8928
|
+
processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
8929
|
+
}
|
|
8930
|
+
};
|
|
8931
|
+
// Split into separate functions for each type to maintain monomorphic call sites
|
|
8932
|
+
const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
8933
|
+
if (typeof classDefinition === 'string') {
|
|
8934
|
+
processStringDefinition(classDefinition, classPartObject, classGroupId);
|
|
8935
|
+
return;
|
|
8936
|
+
}
|
|
8937
|
+
if (typeof classDefinition === 'function') {
|
|
8938
|
+
processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
8939
|
+
return;
|
|
8940
|
+
}
|
|
8941
|
+
processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
8942
|
+
};
|
|
8943
|
+
const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
|
|
8944
|
+
const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);
|
|
8945
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
8946
|
+
};
|
|
8947
|
+
const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
8948
|
+
if (isThemeGetter(classDefinition)) {
|
|
8949
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
8950
|
+
return;
|
|
8951
|
+
}
|
|
8952
|
+
if (classPartObject.validators === null) {
|
|
8953
|
+
classPartObject.validators = [];
|
|
8954
|
+
}
|
|
8955
|
+
classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
|
|
8956
|
+
};
|
|
8957
|
+
const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
8958
|
+
const entries = Object.entries(classDefinition);
|
|
8959
|
+
const len = entries.length;
|
|
8960
|
+
for (let i = 0; i < len; i++) {
|
|
8961
|
+
const [key, value] = entries[i];
|
|
8962
|
+
processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
|
|
8963
|
+
}
|
|
8848
8964
|
};
|
|
8849
8965
|
const getPart = (classPartObject, path) => {
|
|
8850
|
-
let
|
|
8851
|
-
path.split(CLASS_PART_SEPARATOR)
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8966
|
+
let current = classPartObject;
|
|
8967
|
+
const parts = path.split(CLASS_PART_SEPARATOR);
|
|
8968
|
+
const len = parts.length;
|
|
8969
|
+
for (let i = 0; i < len; i++) {
|
|
8970
|
+
const part = parts[i];
|
|
8971
|
+
let next = current.nextPart.get(part);
|
|
8972
|
+
if (!next) {
|
|
8973
|
+
next = createClassPartObject();
|
|
8974
|
+
current.nextPart.set(part, next);
|
|
8857
8975
|
}
|
|
8858
|
-
|
|
8859
|
-
}
|
|
8860
|
-
return
|
|
8976
|
+
current = next;
|
|
8977
|
+
}
|
|
8978
|
+
return current;
|
|
8861
8979
|
};
|
|
8862
|
-
|
|
8980
|
+
// Type guard maintains monomorphic check
|
|
8981
|
+
const isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;
|
|
8863
8982
|
|
|
8864
|
-
// LRU cache
|
|
8983
|
+
// LRU cache implementation using plain objects for simplicity
|
|
8865
8984
|
const createLruCache = maxCacheSize => {
|
|
8866
8985
|
if (maxCacheSize < 1) {
|
|
8867
8986
|
return {
|
|
@@ -8870,31 +8989,31 @@ const createLruCache = maxCacheSize => {
|
|
|
8870
8989
|
};
|
|
8871
8990
|
}
|
|
8872
8991
|
let cacheSize = 0;
|
|
8873
|
-
let cache =
|
|
8874
|
-
let previousCache =
|
|
8992
|
+
let cache = Object.create(null);
|
|
8993
|
+
let previousCache = Object.create(null);
|
|
8875
8994
|
const update = (key, value) => {
|
|
8876
|
-
cache
|
|
8995
|
+
cache[key] = value;
|
|
8877
8996
|
cacheSize++;
|
|
8878
8997
|
if (cacheSize > maxCacheSize) {
|
|
8879
8998
|
cacheSize = 0;
|
|
8880
8999
|
previousCache = cache;
|
|
8881
|
-
cache =
|
|
9000
|
+
cache = Object.create(null);
|
|
8882
9001
|
}
|
|
8883
9002
|
};
|
|
8884
9003
|
return {
|
|
8885
9004
|
get(key) {
|
|
8886
|
-
let value = cache
|
|
9005
|
+
let value = cache[key];
|
|
8887
9006
|
if (value !== undefined) {
|
|
8888
9007
|
return value;
|
|
8889
9008
|
}
|
|
8890
|
-
if ((value = previousCache
|
|
9009
|
+
if ((value = previousCache[key]) !== undefined) {
|
|
8891
9010
|
update(key, value);
|
|
8892
9011
|
return value;
|
|
8893
9012
|
}
|
|
8894
9013
|
},
|
|
8895
9014
|
set(key, value) {
|
|
8896
|
-
if (cache
|
|
8897
|
-
cache
|
|
9015
|
+
if (key in cache) {
|
|
9016
|
+
cache[key] = value;
|
|
8898
9017
|
} else {
|
|
8899
9018
|
update(key, value);
|
|
8900
9019
|
}
|
|
@@ -8903,7 +9022,15 @@ const createLruCache = maxCacheSize => {
|
|
|
8903
9022
|
};
|
|
8904
9023
|
const IMPORTANT_MODIFIER = '!';
|
|
8905
9024
|
const MODIFIER_SEPARATOR = ':';
|
|
8906
|
-
const
|
|
9025
|
+
const EMPTY_MODIFIERS = [];
|
|
9026
|
+
// Pre-allocated result object shape for consistency
|
|
9027
|
+
const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
|
|
9028
|
+
modifiers,
|
|
9029
|
+
hasImportantModifier,
|
|
9030
|
+
baseClassName,
|
|
9031
|
+
maybePostfixModifierPosition,
|
|
9032
|
+
isExternal
|
|
9033
|
+
});
|
|
8907
9034
|
const createParseClassName = config => {
|
|
8908
9035
|
const {
|
|
8909
9036
|
prefix,
|
|
@@ -8916,17 +9043,19 @@ const createParseClassName = config => {
|
|
|
8916
9043
|
* @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
|
|
8917
9044
|
*/
|
|
8918
9045
|
let parseClassName = className => {
|
|
9046
|
+
// Use simple array with push for better performance
|
|
8919
9047
|
const modifiers = [];
|
|
8920
9048
|
let bracketDepth = 0;
|
|
8921
9049
|
let parenDepth = 0;
|
|
8922
9050
|
let modifierStart = 0;
|
|
8923
9051
|
let postfixModifierPosition;
|
|
8924
|
-
|
|
8925
|
-
|
|
9052
|
+
const len = className.length;
|
|
9053
|
+
for (let index = 0; index < len; index++) {
|
|
9054
|
+
const currentCharacter = className[index];
|
|
8926
9055
|
if (bracketDepth === 0 && parenDepth === 0) {
|
|
8927
9056
|
if (currentCharacter === MODIFIER_SEPARATOR) {
|
|
8928
9057
|
modifiers.push(className.slice(modifierStart, index));
|
|
8929
|
-
modifierStart = index +
|
|
9058
|
+
modifierStart = index + 1;
|
|
8930
9059
|
continue;
|
|
8931
9060
|
}
|
|
8932
9061
|
if (currentCharacter === '/') {
|
|
@@ -8934,37 +9063,31 @@ const createParseClassName = config => {
|
|
|
8934
9063
|
continue;
|
|
8935
9064
|
}
|
|
8936
9065
|
}
|
|
8937
|
-
if (currentCharacter === '[')
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
9066
|
+
if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;
|
|
9067
|
+
}
|
|
9068
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
|
|
9069
|
+
// Inline important modifier check
|
|
9070
|
+
let baseClassName = baseClassNameWithImportantModifier;
|
|
9071
|
+
let hasImportantModifier = false;
|
|
9072
|
+
if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
|
|
9073
|
+
baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
|
|
9074
|
+
hasImportantModifier = true;
|
|
9075
|
+
} else if (
|
|
9076
|
+
/**
|
|
9077
|
+
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
9078
|
+
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
9079
|
+
*/
|
|
9080
|
+
baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
|
|
9081
|
+
baseClassName = baseClassNameWithImportantModifier.slice(1);
|
|
9082
|
+
hasImportantModifier = true;
|
|
8946
9083
|
}
|
|
8947
|
-
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
|
|
8948
|
-
const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
|
|
8949
|
-
const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
|
|
8950
9084
|
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;
|
|
8951
|
-
return
|
|
8952
|
-
modifiers,
|
|
8953
|
-
hasImportantModifier,
|
|
8954
|
-
baseClassName,
|
|
8955
|
-
maybePostfixModifierPosition
|
|
8956
|
-
};
|
|
9085
|
+
return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
|
|
8957
9086
|
};
|
|
8958
9087
|
if (prefix) {
|
|
8959
9088
|
const fullPrefix = prefix + MODIFIER_SEPARATOR;
|
|
8960
9089
|
const parseClassNameOriginal = parseClassName;
|
|
8961
|
-
parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.
|
|
8962
|
-
isExternal: true,
|
|
8963
|
-
modifiers: [],
|
|
8964
|
-
hasImportantModifier: false,
|
|
8965
|
-
baseClassName: className,
|
|
8966
|
-
maybePostfixModifierPosition: undefined
|
|
8967
|
-
};
|
|
9090
|
+
parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);
|
|
8968
9091
|
}
|
|
8969
9092
|
if (experimentalParseClassName) {
|
|
8970
9093
|
const parseClassNameOriginal = parseClassName;
|
|
@@ -8975,19 +9098,6 @@ const createParseClassName = config => {
|
|
|
8975
9098
|
}
|
|
8976
9099
|
return parseClassName;
|
|
8977
9100
|
};
|
|
8978
|
-
const stripImportantModifier = baseClassName => {
|
|
8979
|
-
if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
|
|
8980
|
-
return baseClassName.substring(0, baseClassName.length - 1);
|
|
8981
|
-
}
|
|
8982
|
-
/**
|
|
8983
|
-
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
8984
|
-
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
8985
|
-
*/
|
|
8986
|
-
if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
|
|
8987
|
-
return baseClassName.substring(1);
|
|
8988
|
-
}
|
|
8989
|
-
return baseClassName;
|
|
8990
|
-
};
|
|
8991
9101
|
|
|
8992
9102
|
/**
|
|
8993
9103
|
* Sorts modifiers according to following schema:
|
|
@@ -8995,26 +9105,41 @@ const stripImportantModifier = baseClassName => {
|
|
|
8995
9105
|
* - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
|
|
8996
9106
|
*/
|
|
8997
9107
|
const createSortModifiers = config => {
|
|
8998
|
-
|
|
8999
|
-
const
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9108
|
+
// Pre-compute weights for all known modifiers for O(1) comparison
|
|
9109
|
+
const modifierWeights = new Map();
|
|
9110
|
+
// Assign weights to sensitive modifiers (highest priority, but preserve order)
|
|
9111
|
+
config.orderSensitiveModifiers.forEach((mod, index) => {
|
|
9112
|
+
modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods
|
|
9113
|
+
});
|
|
9114
|
+
return modifiers => {
|
|
9115
|
+
const result = [];
|
|
9116
|
+
let currentSegment = [];
|
|
9117
|
+
// Process modifiers in one pass
|
|
9118
|
+
for (let i = 0; i < modifiers.length; i++) {
|
|
9119
|
+
const modifier = modifiers[i];
|
|
9120
|
+
// Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)
|
|
9121
|
+
const isArbitrary = modifier[0] === '[';
|
|
9122
|
+
const isOrderSensitive = modifierWeights.has(modifier);
|
|
9123
|
+
if (isArbitrary || isOrderSensitive) {
|
|
9124
|
+
// Sort and flush current segment alphabetically
|
|
9125
|
+
if (currentSegment.length > 0) {
|
|
9126
|
+
currentSegment.sort();
|
|
9127
|
+
result.push(...currentSegment);
|
|
9128
|
+
currentSegment = [];
|
|
9129
|
+
}
|
|
9130
|
+
result.push(modifier);
|
|
9010
9131
|
} else {
|
|
9011
|
-
|
|
9132
|
+
// Regular modifier - add to current segment for batch sorting
|
|
9133
|
+
currentSegment.push(modifier);
|
|
9012
9134
|
}
|
|
9013
|
-
}
|
|
9014
|
-
|
|
9015
|
-
|
|
9135
|
+
}
|
|
9136
|
+
// Sort and add any remaining segment items
|
|
9137
|
+
if (currentSegment.length > 0) {
|
|
9138
|
+
currentSegment.sort();
|
|
9139
|
+
result.push(...currentSegment);
|
|
9140
|
+
}
|
|
9141
|
+
return result;
|
|
9016
9142
|
};
|
|
9017
|
-
return sortModifiers;
|
|
9018
9143
|
};
|
|
9019
9144
|
const createConfigUtils = config => ({
|
|
9020
9145
|
cache: createLruCache(config.cacheSize),
|
|
@@ -9069,10 +9194,11 @@ const mergeClassList = (classList, configUtils) => {
|
|
|
9069
9194
|
}
|
|
9070
9195
|
hasPostfixModifier = false;
|
|
9071
9196
|
}
|
|
9072
|
-
|
|
9197
|
+
// Fast path: skip sorting for empty or single modifier
|
|
9198
|
+
const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');
|
|
9073
9199
|
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
9074
9200
|
const classId = modifierId + classGroupId;
|
|
9075
|
-
if (classGroupsInConflict.
|
|
9201
|
+
if (classGroupsInConflict.indexOf(classId) > -1) {
|
|
9076
9202
|
// Tailwind class omitted due to conflict
|
|
9077
9203
|
continue;
|
|
9078
9204
|
}
|
|
@@ -9097,13 +9223,13 @@ const mergeClassList = (classList, configUtils) => {
|
|
|
9097
9223
|
*
|
|
9098
9224
|
* Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
9099
9225
|
*/
|
|
9100
|
-
|
|
9226
|
+
const twJoin = (...classLists) => {
|
|
9101
9227
|
let index = 0;
|
|
9102
9228
|
let argument;
|
|
9103
9229
|
let resolvedValue;
|
|
9104
9230
|
let string = '';
|
|
9105
|
-
while (index <
|
|
9106
|
-
if (argument =
|
|
9231
|
+
while (index < classLists.length) {
|
|
9232
|
+
if (argument = classLists[index++]) {
|
|
9107
9233
|
if (resolvedValue = toValue(argument)) {
|
|
9108
9234
|
string && (string += ' ');
|
|
9109
9235
|
string += resolvedValue;
|
|
@@ -9111,8 +9237,9 @@ function twJoin() {
|
|
|
9111
9237
|
}
|
|
9112
9238
|
}
|
|
9113
9239
|
return string;
|
|
9114
|
-
}
|
|
9240
|
+
};
|
|
9115
9241
|
const toValue = mix => {
|
|
9242
|
+
// Fast path for strings
|
|
9116
9243
|
if (typeof mix === 'string') {
|
|
9117
9244
|
return mix;
|
|
9118
9245
|
}
|
|
@@ -9128,20 +9255,20 @@ const toValue = mix => {
|
|
|
9128
9255
|
}
|
|
9129
9256
|
return string;
|
|
9130
9257
|
};
|
|
9131
|
-
|
|
9258
|
+
const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
|
|
9132
9259
|
let configUtils;
|
|
9133
9260
|
let cacheGet;
|
|
9134
9261
|
let cacheSet;
|
|
9135
|
-
let functionToCall
|
|
9136
|
-
|
|
9262
|
+
let functionToCall;
|
|
9263
|
+
const initTailwindMerge = classList => {
|
|
9137
9264
|
const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
9138
9265
|
configUtils = createConfigUtils(config);
|
|
9139
9266
|
cacheGet = configUtils.cache.get;
|
|
9140
9267
|
cacheSet = configUtils.cache.set;
|
|
9141
9268
|
functionToCall = tailwindMerge;
|
|
9142
9269
|
return tailwindMerge(classList);
|
|
9143
|
-
}
|
|
9144
|
-
|
|
9270
|
+
};
|
|
9271
|
+
const tailwindMerge = classList => {
|
|
9145
9272
|
const cachedResult = cacheGet(classList);
|
|
9146
9273
|
if (cachedResult) {
|
|
9147
9274
|
return cachedResult;
|
|
@@ -9149,19 +9276,19 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
|
9149
9276
|
const result = mergeClassList(classList, configUtils);
|
|
9150
9277
|
cacheSet(classList, result);
|
|
9151
9278
|
return result;
|
|
9152
|
-
}
|
|
9153
|
-
return function callTailwindMerge() {
|
|
9154
|
-
return functionToCall(twJoin.apply(null, arguments));
|
|
9155
9279
|
};
|
|
9156
|
-
|
|
9280
|
+
functionToCall = initTailwindMerge;
|
|
9281
|
+
return (...args) => functionToCall(twJoin(...args));
|
|
9282
|
+
};
|
|
9283
|
+
const fallbackThemeArr = [];
|
|
9157
9284
|
const fromTheme = key => {
|
|
9158
|
-
const themeGetter = theme => theme[key] ||
|
|
9285
|
+
const themeGetter = theme => theme[key] || fallbackThemeArr;
|
|
9159
9286
|
themeGetter.isThemeGetter = true;
|
|
9160
9287
|
return themeGetter;
|
|
9161
9288
|
};
|
|
9162
9289
|
const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
|
|
9163
9290
|
const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
|
|
9164
|
-
const fractionRegex = /^\d
|
|
9291
|
+
const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
|
|
9165
9292
|
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
9166
9293
|
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$/;
|
|
9167
9294
|
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
|
|
@@ -9187,6 +9314,8 @@ const isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever
|
|
|
9187
9314
|
const isArbitraryValue = value => arbitraryValueRegex.test(value);
|
|
9188
9315
|
const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
|
|
9189
9316
|
const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
|
9317
|
+
const isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny);
|
|
9318
|
+
const isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever);
|
|
9190
9319
|
const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
|
|
9191
9320
|
const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
|
|
9192
9321
|
const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);
|
|
@@ -9197,6 +9326,7 @@ const isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLab
|
|
|
9197
9326
|
const isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);
|
|
9198
9327
|
const isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);
|
|
9199
9328
|
const isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);
|
|
9329
|
+
const isArbitraryVariableWeight = value => getIsArbitraryVariable(value, isLabelWeight, true);
|
|
9200
9330
|
// Helpers
|
|
9201
9331
|
const getIsArbitraryValue = (value, testLabel, testValue) => {
|
|
9202
9332
|
const result = arbitraryValueRegex.exec(value);
|
|
@@ -9225,6 +9355,7 @@ const isLabelSize = label => label === 'length' || label === 'size' || label ===
|
|
|
9225
9355
|
const isLabelLength = label => label === 'length';
|
|
9226
9356
|
const isLabelNumber = label => label === 'number';
|
|
9227
9357
|
const isLabelFamilyName = label => label === 'family-name';
|
|
9358
|
+
const isLabelWeight = label => label === 'number' || label === 'weight';
|
|
9228
9359
|
const isLabelShadow = label => label === 'shadow';
|
|
9229
9360
|
const getDefaultConfig = () => {
|
|
9230
9361
|
/**
|
|
@@ -9283,6 +9414,8 @@ const getDefaultConfig = () => {
|
|
|
9283
9414
|
const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];
|
|
9284
9415
|
const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
|
|
9285
9416
|
const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
|
|
9417
|
+
const scaleSizingInline = () => [isFraction, 'screen', 'full', 'dvw', 'lvw', 'svw', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
|
|
9418
|
+
const scaleSizingBlock = () => [isFraction, 'screen', 'full', 'lh', 'dvh', 'lvh', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
|
|
9286
9419
|
const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
|
|
9287
9420
|
const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
|
|
9288
9421
|
position: [isArbitraryVariable, isArbitraryValue]
|
|
@@ -9481,40 +9614,66 @@ const getDefaultConfig = () => {
|
|
|
9481
9614
|
*/
|
|
9482
9615
|
position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],
|
|
9483
9616
|
/**
|
|
9484
|
-
*
|
|
9617
|
+
* Inset
|
|
9485
9618
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
9486
9619
|
*/
|
|
9487
9620
|
inset: [{
|
|
9488
9621
|
inset: scaleInset()
|
|
9489
9622
|
}],
|
|
9490
9623
|
/**
|
|
9491
|
-
*
|
|
9624
|
+
* Inset Inline
|
|
9492
9625
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
9493
9626
|
*/
|
|
9494
9627
|
'inset-x': [{
|
|
9495
9628
|
'inset-x': scaleInset()
|
|
9496
9629
|
}],
|
|
9497
9630
|
/**
|
|
9498
|
-
*
|
|
9631
|
+
* Inset Block
|
|
9499
9632
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
9500
9633
|
*/
|
|
9501
9634
|
'inset-y': [{
|
|
9502
9635
|
'inset-y': scaleInset()
|
|
9503
9636
|
}],
|
|
9504
9637
|
/**
|
|
9505
|
-
* Start
|
|
9638
|
+
* Inset Inline Start
|
|
9506
9639
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
9640
|
+
* @todo class group will be renamed to `inset-s` in next major release
|
|
9507
9641
|
*/
|
|
9508
9642
|
start: [{
|
|
9643
|
+
'inset-s': scaleInset(),
|
|
9644
|
+
/**
|
|
9645
|
+
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
|
|
9646
|
+
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
|
9647
|
+
*/
|
|
9509
9648
|
start: scaleInset()
|
|
9510
9649
|
}],
|
|
9511
9650
|
/**
|
|
9512
|
-
* End
|
|
9651
|
+
* Inset Inline End
|
|
9513
9652
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
9653
|
+
* @todo class group will be renamed to `inset-e` in next major release
|
|
9514
9654
|
*/
|
|
9515
9655
|
end: [{
|
|
9656
|
+
'inset-e': scaleInset(),
|
|
9657
|
+
/**
|
|
9658
|
+
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
|
|
9659
|
+
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
|
9660
|
+
*/
|
|
9516
9661
|
end: scaleInset()
|
|
9517
9662
|
}],
|
|
9663
|
+
/**
|
|
9664
|
+
* Inset Block Start
|
|
9665
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
9666
|
+
*/
|
|
9667
|
+
'inset-bs': [{
|
|
9668
|
+
'inset-bs': scaleInset()
|
|
9669
|
+
}],
|
|
9670
|
+
/**
|
|
9671
|
+
* Inset Block End
|
|
9672
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
9673
|
+
*/
|
|
9674
|
+
'inset-be': [{
|
|
9675
|
+
'inset-be': scaleInset()
|
|
9676
|
+
}],
|
|
9518
9677
|
/**
|
|
9519
9678
|
* Top
|
|
9520
9679
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
@@ -9781,33 +9940,47 @@ const getDefaultConfig = () => {
|
|
|
9781
9940
|
p: scaleUnambiguousSpacing()
|
|
9782
9941
|
}],
|
|
9783
9942
|
/**
|
|
9784
|
-
* Padding
|
|
9943
|
+
* Padding Inline
|
|
9785
9944
|
* @see https://tailwindcss.com/docs/padding
|
|
9786
9945
|
*/
|
|
9787
9946
|
px: [{
|
|
9788
9947
|
px: scaleUnambiguousSpacing()
|
|
9789
9948
|
}],
|
|
9790
9949
|
/**
|
|
9791
|
-
* Padding
|
|
9950
|
+
* Padding Block
|
|
9792
9951
|
* @see https://tailwindcss.com/docs/padding
|
|
9793
9952
|
*/
|
|
9794
9953
|
py: [{
|
|
9795
9954
|
py: scaleUnambiguousSpacing()
|
|
9796
9955
|
}],
|
|
9797
9956
|
/**
|
|
9798
|
-
* Padding Start
|
|
9957
|
+
* Padding Inline Start
|
|
9799
9958
|
* @see https://tailwindcss.com/docs/padding
|
|
9800
9959
|
*/
|
|
9801
9960
|
ps: [{
|
|
9802
9961
|
ps: scaleUnambiguousSpacing()
|
|
9803
9962
|
}],
|
|
9804
9963
|
/**
|
|
9805
|
-
* Padding End
|
|
9964
|
+
* Padding Inline End
|
|
9806
9965
|
* @see https://tailwindcss.com/docs/padding
|
|
9807
9966
|
*/
|
|
9808
9967
|
pe: [{
|
|
9809
9968
|
pe: scaleUnambiguousSpacing()
|
|
9810
9969
|
}],
|
|
9970
|
+
/**
|
|
9971
|
+
* Padding Block Start
|
|
9972
|
+
* @see https://tailwindcss.com/docs/padding
|
|
9973
|
+
*/
|
|
9974
|
+
pbs: [{
|
|
9975
|
+
pbs: scaleUnambiguousSpacing()
|
|
9976
|
+
}],
|
|
9977
|
+
/**
|
|
9978
|
+
* Padding Block End
|
|
9979
|
+
* @see https://tailwindcss.com/docs/padding
|
|
9980
|
+
*/
|
|
9981
|
+
pbe: [{
|
|
9982
|
+
pbe: scaleUnambiguousSpacing()
|
|
9983
|
+
}],
|
|
9811
9984
|
/**
|
|
9812
9985
|
* Padding Top
|
|
9813
9986
|
* @see https://tailwindcss.com/docs/padding
|
|
@@ -9844,33 +10017,47 @@ const getDefaultConfig = () => {
|
|
|
9844
10017
|
m: scaleMargin()
|
|
9845
10018
|
}],
|
|
9846
10019
|
/**
|
|
9847
|
-
* Margin
|
|
10020
|
+
* Margin Inline
|
|
9848
10021
|
* @see https://tailwindcss.com/docs/margin
|
|
9849
10022
|
*/
|
|
9850
10023
|
mx: [{
|
|
9851
10024
|
mx: scaleMargin()
|
|
9852
10025
|
}],
|
|
9853
10026
|
/**
|
|
9854
|
-
* Margin
|
|
10027
|
+
* Margin Block
|
|
9855
10028
|
* @see https://tailwindcss.com/docs/margin
|
|
9856
10029
|
*/
|
|
9857
10030
|
my: [{
|
|
9858
10031
|
my: scaleMargin()
|
|
9859
10032
|
}],
|
|
9860
10033
|
/**
|
|
9861
|
-
* Margin Start
|
|
10034
|
+
* Margin Inline Start
|
|
9862
10035
|
* @see https://tailwindcss.com/docs/margin
|
|
9863
10036
|
*/
|
|
9864
10037
|
ms: [{
|
|
9865
10038
|
ms: scaleMargin()
|
|
9866
10039
|
}],
|
|
9867
10040
|
/**
|
|
9868
|
-
* Margin End
|
|
10041
|
+
* Margin Inline End
|
|
9869
10042
|
* @see https://tailwindcss.com/docs/margin
|
|
9870
10043
|
*/
|
|
9871
10044
|
me: [{
|
|
9872
10045
|
me: scaleMargin()
|
|
9873
10046
|
}],
|
|
10047
|
+
/**
|
|
10048
|
+
* Margin Block Start
|
|
10049
|
+
* @see https://tailwindcss.com/docs/margin
|
|
10050
|
+
*/
|
|
10051
|
+
mbs: [{
|
|
10052
|
+
mbs: scaleMargin()
|
|
10053
|
+
}],
|
|
10054
|
+
/**
|
|
10055
|
+
* Margin Block End
|
|
10056
|
+
* @see https://tailwindcss.com/docs/margin
|
|
10057
|
+
*/
|
|
10058
|
+
mbe: [{
|
|
10059
|
+
mbe: scaleMargin()
|
|
10060
|
+
}],
|
|
9874
10061
|
/**
|
|
9875
10062
|
* Margin Top
|
|
9876
10063
|
* @see https://tailwindcss.com/docs/margin
|
|
@@ -9933,6 +10120,48 @@ const getDefaultConfig = () => {
|
|
|
9933
10120
|
size: [{
|
|
9934
10121
|
size: scaleSizing()
|
|
9935
10122
|
}],
|
|
10123
|
+
/**
|
|
10124
|
+
* Inline Size
|
|
10125
|
+
* @see https://tailwindcss.com/docs/width
|
|
10126
|
+
*/
|
|
10127
|
+
'inline-size': [{
|
|
10128
|
+
inline: ['auto', ...scaleSizingInline()]
|
|
10129
|
+
}],
|
|
10130
|
+
/**
|
|
10131
|
+
* Min-Inline Size
|
|
10132
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
10133
|
+
*/
|
|
10134
|
+
'min-inline-size': [{
|
|
10135
|
+
'min-inline': ['auto', ...scaleSizingInline()]
|
|
10136
|
+
}],
|
|
10137
|
+
/**
|
|
10138
|
+
* Max-Inline Size
|
|
10139
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
10140
|
+
*/
|
|
10141
|
+
'max-inline-size': [{
|
|
10142
|
+
'max-inline': ['none', ...scaleSizingInline()]
|
|
10143
|
+
}],
|
|
10144
|
+
/**
|
|
10145
|
+
* Block Size
|
|
10146
|
+
* @see https://tailwindcss.com/docs/height
|
|
10147
|
+
*/
|
|
10148
|
+
'block-size': [{
|
|
10149
|
+
block: ['auto', ...scaleSizingBlock()]
|
|
10150
|
+
}],
|
|
10151
|
+
/**
|
|
10152
|
+
* Min-Block Size
|
|
10153
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
10154
|
+
*/
|
|
10155
|
+
'min-block-size': [{
|
|
10156
|
+
'min-block': ['auto', ...scaleSizingBlock()]
|
|
10157
|
+
}],
|
|
10158
|
+
/**
|
|
10159
|
+
* Max-Block Size
|
|
10160
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
10161
|
+
*/
|
|
10162
|
+
'max-block-size': [{
|
|
10163
|
+
'max-block': ['none', ...scaleSizingBlock()]
|
|
10164
|
+
}],
|
|
9936
10165
|
/**
|
|
9937
10166
|
* Width
|
|
9938
10167
|
* @see https://tailwindcss.com/docs/width
|
|
@@ -10005,7 +10234,7 @@ const getDefaultConfig = () => {
|
|
|
10005
10234
|
* @see https://tailwindcss.com/docs/font-weight
|
|
10006
10235
|
*/
|
|
10007
10236
|
'font-weight': [{
|
|
10008
|
-
font: [themeFontWeight,
|
|
10237
|
+
font: [themeFontWeight, isArbitraryVariableWeight, isArbitraryWeight]
|
|
10009
10238
|
}],
|
|
10010
10239
|
/**
|
|
10011
10240
|
* Font Stretch
|
|
@@ -10019,7 +10248,14 @@ const getDefaultConfig = () => {
|
|
|
10019
10248
|
* @see https://tailwindcss.com/docs/font-family
|
|
10020
10249
|
*/
|
|
10021
10250
|
'font-family': [{
|
|
10022
|
-
font: [isArbitraryVariableFamilyName,
|
|
10251
|
+
font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont]
|
|
10252
|
+
}],
|
|
10253
|
+
/**
|
|
10254
|
+
* Font Feature Settings
|
|
10255
|
+
* @see https://tailwindcss.com/docs/font-feature-settings
|
|
10256
|
+
*/
|
|
10257
|
+
'font-features': [{
|
|
10258
|
+
'font-features': [isArbitraryValue]
|
|
10023
10259
|
}],
|
|
10024
10260
|
/**
|
|
10025
10261
|
* Font Variant Numeric
|
|
@@ -10438,33 +10674,47 @@ const getDefaultConfig = () => {
|
|
|
10438
10674
|
border: scaleBorderWidth()
|
|
10439
10675
|
}],
|
|
10440
10676
|
/**
|
|
10441
|
-
* Border Width
|
|
10677
|
+
* Border Width Inline
|
|
10442
10678
|
* @see https://tailwindcss.com/docs/border-width
|
|
10443
10679
|
*/
|
|
10444
10680
|
'border-w-x': [{
|
|
10445
10681
|
'border-x': scaleBorderWidth()
|
|
10446
10682
|
}],
|
|
10447
10683
|
/**
|
|
10448
|
-
* Border Width
|
|
10684
|
+
* Border Width Block
|
|
10449
10685
|
* @see https://tailwindcss.com/docs/border-width
|
|
10450
10686
|
*/
|
|
10451
10687
|
'border-w-y': [{
|
|
10452
10688
|
'border-y': scaleBorderWidth()
|
|
10453
10689
|
}],
|
|
10454
10690
|
/**
|
|
10455
|
-
* Border Width Start
|
|
10691
|
+
* Border Width Inline Start
|
|
10456
10692
|
* @see https://tailwindcss.com/docs/border-width
|
|
10457
10693
|
*/
|
|
10458
10694
|
'border-w-s': [{
|
|
10459
10695
|
'border-s': scaleBorderWidth()
|
|
10460
10696
|
}],
|
|
10461
10697
|
/**
|
|
10462
|
-
* Border Width End
|
|
10698
|
+
* Border Width Inline End
|
|
10463
10699
|
* @see https://tailwindcss.com/docs/border-width
|
|
10464
10700
|
*/
|
|
10465
10701
|
'border-w-e': [{
|
|
10466
10702
|
'border-e': scaleBorderWidth()
|
|
10467
10703
|
}],
|
|
10704
|
+
/**
|
|
10705
|
+
* Border Width Block Start
|
|
10706
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
10707
|
+
*/
|
|
10708
|
+
'border-w-bs': [{
|
|
10709
|
+
'border-bs': scaleBorderWidth()
|
|
10710
|
+
}],
|
|
10711
|
+
/**
|
|
10712
|
+
* Border Width Block End
|
|
10713
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
10714
|
+
*/
|
|
10715
|
+
'border-w-be': [{
|
|
10716
|
+
'border-be': scaleBorderWidth()
|
|
10717
|
+
}],
|
|
10468
10718
|
/**
|
|
10469
10719
|
* Border Width Top
|
|
10470
10720
|
* @see https://tailwindcss.com/docs/border-width
|
|
@@ -10539,33 +10789,47 @@ const getDefaultConfig = () => {
|
|
|
10539
10789
|
border: scaleColor()
|
|
10540
10790
|
}],
|
|
10541
10791
|
/**
|
|
10542
|
-
* Border Color
|
|
10792
|
+
* Border Color Inline
|
|
10543
10793
|
* @see https://tailwindcss.com/docs/border-color
|
|
10544
10794
|
*/
|
|
10545
10795
|
'border-color-x': [{
|
|
10546
10796
|
'border-x': scaleColor()
|
|
10547
10797
|
}],
|
|
10548
10798
|
/**
|
|
10549
|
-
* Border Color
|
|
10799
|
+
* Border Color Block
|
|
10550
10800
|
* @see https://tailwindcss.com/docs/border-color
|
|
10551
10801
|
*/
|
|
10552
10802
|
'border-color-y': [{
|
|
10553
10803
|
'border-y': scaleColor()
|
|
10554
10804
|
}],
|
|
10555
10805
|
/**
|
|
10556
|
-
* Border Color
|
|
10806
|
+
* Border Color Inline Start
|
|
10557
10807
|
* @see https://tailwindcss.com/docs/border-color
|
|
10558
10808
|
*/
|
|
10559
10809
|
'border-color-s': [{
|
|
10560
10810
|
'border-s': scaleColor()
|
|
10561
10811
|
}],
|
|
10562
10812
|
/**
|
|
10563
|
-
* Border Color
|
|
10813
|
+
* Border Color Inline End
|
|
10564
10814
|
* @see https://tailwindcss.com/docs/border-color
|
|
10565
10815
|
*/
|
|
10566
10816
|
'border-color-e': [{
|
|
10567
10817
|
'border-e': scaleColor()
|
|
10568
10818
|
}],
|
|
10819
|
+
/**
|
|
10820
|
+
* Border Color Block Start
|
|
10821
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
10822
|
+
*/
|
|
10823
|
+
'border-color-bs': [{
|
|
10824
|
+
'border-bs': scaleColor()
|
|
10825
|
+
}],
|
|
10826
|
+
/**
|
|
10827
|
+
* Border Color Block End
|
|
10828
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
10829
|
+
*/
|
|
10830
|
+
'border-color-be': [{
|
|
10831
|
+
'border-be': scaleColor()
|
|
10832
|
+
}],
|
|
10569
10833
|
/**
|
|
10570
10834
|
* Border Color Top
|
|
10571
10835
|
* @see https://tailwindcss.com/docs/border-color
|
|
@@ -11426,33 +11690,47 @@ const getDefaultConfig = () => {
|
|
|
11426
11690
|
'scroll-m': scaleUnambiguousSpacing()
|
|
11427
11691
|
}],
|
|
11428
11692
|
/**
|
|
11429
|
-
* Scroll Margin
|
|
11693
|
+
* Scroll Margin Inline
|
|
11430
11694
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
11431
11695
|
*/
|
|
11432
11696
|
'scroll-mx': [{
|
|
11433
11697
|
'scroll-mx': scaleUnambiguousSpacing()
|
|
11434
11698
|
}],
|
|
11435
11699
|
/**
|
|
11436
|
-
* Scroll Margin
|
|
11700
|
+
* Scroll Margin Block
|
|
11437
11701
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
11438
11702
|
*/
|
|
11439
11703
|
'scroll-my': [{
|
|
11440
11704
|
'scroll-my': scaleUnambiguousSpacing()
|
|
11441
11705
|
}],
|
|
11442
11706
|
/**
|
|
11443
|
-
* Scroll Margin Start
|
|
11707
|
+
* Scroll Margin Inline Start
|
|
11444
11708
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
11445
11709
|
*/
|
|
11446
11710
|
'scroll-ms': [{
|
|
11447
11711
|
'scroll-ms': scaleUnambiguousSpacing()
|
|
11448
11712
|
}],
|
|
11449
11713
|
/**
|
|
11450
|
-
* Scroll Margin End
|
|
11714
|
+
* Scroll Margin Inline End
|
|
11451
11715
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
11452
11716
|
*/
|
|
11453
11717
|
'scroll-me': [{
|
|
11454
11718
|
'scroll-me': scaleUnambiguousSpacing()
|
|
11455
11719
|
}],
|
|
11720
|
+
/**
|
|
11721
|
+
* Scroll Margin Block Start
|
|
11722
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
11723
|
+
*/
|
|
11724
|
+
'scroll-mbs': [{
|
|
11725
|
+
'scroll-mbs': scaleUnambiguousSpacing()
|
|
11726
|
+
}],
|
|
11727
|
+
/**
|
|
11728
|
+
* Scroll Margin Block End
|
|
11729
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
11730
|
+
*/
|
|
11731
|
+
'scroll-mbe': [{
|
|
11732
|
+
'scroll-mbe': scaleUnambiguousSpacing()
|
|
11733
|
+
}],
|
|
11456
11734
|
/**
|
|
11457
11735
|
* Scroll Margin Top
|
|
11458
11736
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
@@ -11489,33 +11767,47 @@ const getDefaultConfig = () => {
|
|
|
11489
11767
|
'scroll-p': scaleUnambiguousSpacing()
|
|
11490
11768
|
}],
|
|
11491
11769
|
/**
|
|
11492
|
-
* Scroll Padding
|
|
11770
|
+
* Scroll Padding Inline
|
|
11493
11771
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
11494
11772
|
*/
|
|
11495
11773
|
'scroll-px': [{
|
|
11496
11774
|
'scroll-px': scaleUnambiguousSpacing()
|
|
11497
11775
|
}],
|
|
11498
11776
|
/**
|
|
11499
|
-
* Scroll Padding
|
|
11777
|
+
* Scroll Padding Block
|
|
11500
11778
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
11501
11779
|
*/
|
|
11502
11780
|
'scroll-py': [{
|
|
11503
11781
|
'scroll-py': scaleUnambiguousSpacing()
|
|
11504
11782
|
}],
|
|
11505
11783
|
/**
|
|
11506
|
-
* Scroll Padding Start
|
|
11784
|
+
* Scroll Padding Inline Start
|
|
11507
11785
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
11508
11786
|
*/
|
|
11509
11787
|
'scroll-ps': [{
|
|
11510
11788
|
'scroll-ps': scaleUnambiguousSpacing()
|
|
11511
11789
|
}],
|
|
11512
11790
|
/**
|
|
11513
|
-
* Scroll Padding End
|
|
11791
|
+
* Scroll Padding Inline End
|
|
11514
11792
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
11515
11793
|
*/
|
|
11516
11794
|
'scroll-pe': [{
|
|
11517
11795
|
'scroll-pe': scaleUnambiguousSpacing()
|
|
11518
11796
|
}],
|
|
11797
|
+
/**
|
|
11798
|
+
* Scroll Padding Block Start
|
|
11799
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
11800
|
+
*/
|
|
11801
|
+
'scroll-pbs': [{
|
|
11802
|
+
'scroll-pbs': scaleUnambiguousSpacing()
|
|
11803
|
+
}],
|
|
11804
|
+
/**
|
|
11805
|
+
* Scroll Padding Block End
|
|
11806
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
11807
|
+
*/
|
|
11808
|
+
'scroll-pbe': [{
|
|
11809
|
+
'scroll-pbe': scaleUnambiguousSpacing()
|
|
11810
|
+
}],
|
|
11519
11811
|
/**
|
|
11520
11812
|
* Scroll Padding Top
|
|
11521
11813
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
@@ -11650,15 +11942,15 @@ const getDefaultConfig = () => {
|
|
|
11650
11942
|
conflictingClassGroups: {
|
|
11651
11943
|
overflow: ['overflow-x', 'overflow-y'],
|
|
11652
11944
|
overscroll: ['overscroll-x', 'overscroll-y'],
|
|
11653
|
-
inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],
|
|
11945
|
+
inset: ['inset-x', 'inset-y', 'inset-bs', 'inset-be', 'start', 'end', 'top', 'right', 'bottom', 'left'],
|
|
11654
11946
|
'inset-x': ['right', 'left'],
|
|
11655
11947
|
'inset-y': ['top', 'bottom'],
|
|
11656
11948
|
flex: ['basis', 'grow', 'shrink'],
|
|
11657
11949
|
gap: ['gap-x', 'gap-y'],
|
|
11658
|
-
p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],
|
|
11950
|
+
p: ['px', 'py', 'ps', 'pe', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl'],
|
|
11659
11951
|
px: ['pr', 'pl'],
|
|
11660
11952
|
py: ['pt', 'pb'],
|
|
11661
|
-
m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],
|
|
11953
|
+
m: ['mx', 'my', 'ms', 'me', 'mbs', 'mbe', 'mt', 'mr', 'mb', 'ml'],
|
|
11662
11954
|
mx: ['mr', 'ml'],
|
|
11663
11955
|
my: ['mt', 'mb'],
|
|
11664
11956
|
size: ['w', 'h'],
|
|
@@ -11678,18 +11970,18 @@ const getDefaultConfig = () => {
|
|
|
11678
11970
|
'rounded-b': ['rounded-br', 'rounded-bl'],
|
|
11679
11971
|
'rounded-l': ['rounded-tl', 'rounded-bl'],
|
|
11680
11972
|
'border-spacing': ['border-spacing-x', 'border-spacing-y'],
|
|
11681
|
-
'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'],
|
|
11973
|
+
'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'],
|
|
11682
11974
|
'border-w-x': ['border-w-r', 'border-w-l'],
|
|
11683
11975
|
'border-w-y': ['border-w-t', 'border-w-b'],
|
|
11684
|
-
'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'],
|
|
11976
|
+
'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'],
|
|
11685
11977
|
'border-color-x': ['border-color-r', 'border-color-l'],
|
|
11686
11978
|
'border-color-y': ['border-color-t', 'border-color-b'],
|
|
11687
11979
|
translate: ['translate-x', 'translate-y', 'translate-none'],
|
|
11688
11980
|
'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],
|
|
11689
|
-
'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
|
|
11981
|
+
'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mbs', 'scroll-mbe', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],
|
|
11690
11982
|
'scroll-mx': ['scroll-mr', 'scroll-ml'],
|
|
11691
11983
|
'scroll-my': ['scroll-mt', 'scroll-mb'],
|
|
11692
|
-
'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
|
|
11984
|
+
'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pbs', 'scroll-pbe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],
|
|
11693
11985
|
'scroll-px': ['scroll-pr', 'scroll-pl'],
|
|
11694
11986
|
'scroll-py': ['scroll-pt', 'scroll-pb'],
|
|
11695
11987
|
touch: ['touch-x', 'touch-y', 'touch-pz'],
|
|
@@ -13253,7 +13545,7 @@ const Calendar = ({ className, classNames, showOutsideDays = true, ...props }) =
|
|
|
13253
13545
|
|
|
13254
13546
|
var dayjs_min = {exports: {}};
|
|
13255
13547
|
|
|
13256
|
-
(function (module, exports) {
|
|
13548
|
+
(function (module, exports$1) {
|
|
13257
13549
|
!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}));
|
|
13258
13550
|
} (dayjs_min));
|
|
13259
13551
|
|