@k3-tech/react-kit 0.0.54 → 0.0.56
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/index.js +531 -1691
- package/dist/kit/builder/form/components/FormBuilder.d.ts +1 -1
- package/dist/kit/builder/form/components/FormBuilder.d.ts.map +1 -1
- package/dist/kit/builder/form/components/FormBuilderField.d.ts.map +1 -1
- package/dist/kit/builder/form/hooks/useFormBuilder.d.ts +1 -0
- package/dist/kit/builder/form/hooks/useFormBuilder.d.ts.map +1 -1
- package/dist/kit/builder/form/types.d.ts +2 -1
- package/dist/kit/builder/form/types.d.ts.map +1 -1
- package/dist/kit/themes/base.css +1 -1
- package/dist/kit/themes/clean-slate.css +1 -1
- package/dist/kit/themes/default.css +1 -1
- package/dist/kit/themes/minimal-modern.css +1 -1
- package/dist/kit/themes/spotify.css +1 -1
- package/dist/shadcn/ui/form.d.ts +1 -1
- package/dist/shadcn/ui/form.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/kit/builder/form/components/FormBuilder.tsx +2 -5
- package/src/kit/builder/form/components/FormBuilderField.tsx +6 -1
- package/src/kit/builder/form/hooks/useFormBuilder.ts +8 -2
- package/src/kit/builder/form/types.ts +4 -3
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import React__default, { createContext, useSyncExternalStore, useEffect, useMemo, useContext, forwardRef, createElement, Fragment as Fragment$1, memo as memo$1, useRef, useCallback, useLayoutEffect, useReducer, cloneElement, Component, useState, useImperativeHandle, use as use$
|
|
6
|
+
import React__default, { createContext, useSyncExternalStore, useEffect, useMemo, useContext, forwardRef, createElement, Fragment as Fragment$1, memo as memo$1, useRef, useCallback, useLayoutEffect, useReducer, cloneElement, Component, useState, useImperativeHandle, use as use$1, isValidElement, PureComponent } from "react";
|
|
7
7
|
import * as ReactDOM from "react-dom";
|
|
8
8
|
import ReactDOM__default from "react-dom";
|
|
9
9
|
import { useRouter, useLocation, Link as Link$1 } from "@tanstack/react-router";
|
|
@@ -4609,28 +4609,7 @@ function clsx() {
|
|
|
4609
4609
|
for (var e2, t2, f = 0, n2 = "", o2 = arguments.length; f < o2; f++) (e2 = arguments[f]) && (t2 = r$2(e2)) && (n2 && (n2 += " "), n2 += t2);
|
|
4610
4610
|
return n2;
|
|
4611
4611
|
}
|
|
4612
|
-
const concatArrays = (array1, array2) => {
|
|
4613
|
-
const combinedArray = new Array(array1.length + array2.length);
|
|
4614
|
-
for (let i2 = 0; i2 < array1.length; i2++) {
|
|
4615
|
-
combinedArray[i2] = array1[i2];
|
|
4616
|
-
}
|
|
4617
|
-
for (let i2 = 0; i2 < array2.length; i2++) {
|
|
4618
|
-
combinedArray[array1.length + i2] = array2[i2];
|
|
4619
|
-
}
|
|
4620
|
-
return combinedArray;
|
|
4621
|
-
};
|
|
4622
|
-
const createClassValidatorObject = (classGroupId, validator) => ({
|
|
4623
|
-
classGroupId,
|
|
4624
|
-
validator
|
|
4625
|
-
});
|
|
4626
|
-
const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators2 = null, classGroupId) => ({
|
|
4627
|
-
nextPart,
|
|
4628
|
-
validators: validators2,
|
|
4629
|
-
classGroupId
|
|
4630
|
-
});
|
|
4631
4612
|
const CLASS_PART_SEPARATOR = "-";
|
|
4632
|
-
const EMPTY_CONFLICTS = [];
|
|
4633
|
-
const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
|
|
4634
4613
|
const createClassGroupUtils = (config2) => {
|
|
4635
4614
|
const classMap = createClassMap(config2);
|
|
4636
4615
|
const {
|
|
@@ -4638,134 +4617,104 @@ const createClassGroupUtils = (config2) => {
|
|
|
4638
4617
|
conflictingClassGroupModifiers
|
|
4639
4618
|
} = config2;
|
|
4640
4619
|
const getClassGroupId = (className) => {
|
|
4641
|
-
if (className.startsWith("[") && className.endsWith("]")) {
|
|
4642
|
-
return getGroupIdForArbitraryProperty(className);
|
|
4643
|
-
}
|
|
4644
4620
|
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
4645
|
-
|
|
4646
|
-
|
|
4621
|
+
if (classParts[0] === "" && classParts.length !== 1) {
|
|
4622
|
+
classParts.shift();
|
|
4623
|
+
}
|
|
4624
|
+
return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
|
|
4647
4625
|
};
|
|
4648
4626
|
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
if (modifierConflicts) {
|
|
4653
|
-
if (baseConflicts) {
|
|
4654
|
-
return concatArrays(baseConflicts, modifierConflicts);
|
|
4655
|
-
}
|
|
4656
|
-
return modifierConflicts;
|
|
4657
|
-
}
|
|
4658
|
-
return baseConflicts || EMPTY_CONFLICTS;
|
|
4627
|
+
const conflicts = conflictingClassGroups[classGroupId] || [];
|
|
4628
|
+
if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
|
|
4629
|
+
return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
|
|
4659
4630
|
}
|
|
4660
|
-
return
|
|
4631
|
+
return conflicts;
|
|
4661
4632
|
};
|
|
4662
4633
|
return {
|
|
4663
4634
|
getClassGroupId,
|
|
4664
4635
|
getConflictingClassGroupIds
|
|
4665
4636
|
};
|
|
4666
4637
|
};
|
|
4667
|
-
const getGroupRecursive = (classParts,
|
|
4668
|
-
|
|
4669
|
-
if (
|
|
4638
|
+
const getGroupRecursive = (classParts, classPartObject) => {
|
|
4639
|
+
var _a2;
|
|
4640
|
+
if (classParts.length === 0) {
|
|
4670
4641
|
return classPartObject.classGroupId;
|
|
4671
4642
|
}
|
|
4672
|
-
const currentClassPart = classParts[
|
|
4643
|
+
const currentClassPart = classParts[0];
|
|
4673
4644
|
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4645
|
+
const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
|
|
4646
|
+
if (classGroupFromNextClassPart) {
|
|
4647
|
+
return classGroupFromNextClassPart;
|
|
4677
4648
|
}
|
|
4678
|
-
|
|
4679
|
-
if (validators2 === null) {
|
|
4649
|
+
if (classPartObject.validators.length === 0) {
|
|
4680
4650
|
return void 0;
|
|
4681
4651
|
}
|
|
4682
|
-
const classRest =
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4652
|
+
const classRest = classParts.join(CLASS_PART_SEPARATOR);
|
|
4653
|
+
return (_a2 = classPartObject.validators.find(({
|
|
4654
|
+
validator
|
|
4655
|
+
}) => validator(classRest))) == null ? void 0 : _a2.classGroupId;
|
|
4656
|
+
};
|
|
4657
|
+
const arbitraryPropertyRegex = /^\[(.+)\]$/;
|
|
4658
|
+
const getGroupIdForArbitraryProperty = (className) => {
|
|
4659
|
+
if (arbitraryPropertyRegex.test(className)) {
|
|
4660
|
+
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
|
|
4661
|
+
const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
|
|
4662
|
+
if (property) {
|
|
4663
|
+
return "arbitrary.." + property;
|
|
4688
4664
|
}
|
|
4689
4665
|
}
|
|
4690
|
-
return void 0;
|
|
4691
4666
|
};
|
|
4692
|
-
const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
4693
|
-
const content = className.slice(1, -1);
|
|
4694
|
-
const colonIndex = content.indexOf(":");
|
|
4695
|
-
const property = content.slice(0, colonIndex);
|
|
4696
|
-
return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
|
|
4697
|
-
})();
|
|
4698
4667
|
const createClassMap = (config2) => {
|
|
4699
4668
|
const {
|
|
4700
4669
|
theme,
|
|
4701
4670
|
classGroups
|
|
4702
4671
|
} = config2;
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4672
|
+
const classMap = {
|
|
4673
|
+
nextPart: /* @__PURE__ */ new Map(),
|
|
4674
|
+
validators: []
|
|
4675
|
+
};
|
|
4707
4676
|
for (const classGroupId in classGroups) {
|
|
4708
|
-
|
|
4709
|
-
processClassesRecursively(group, classMap, classGroupId, theme);
|
|
4677
|
+
processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
|
|
4710
4678
|
}
|
|
4711
4679
|
return classMap;
|
|
4712
4680
|
};
|
|
4713
4681
|
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
}
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
}
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
};
|
|
4735
|
-
const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
4736
|
-
if (isThemeGetter(classDefinition)) {
|
|
4737
|
-
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
4738
|
-
return;
|
|
4739
|
-
}
|
|
4740
|
-
if (classPartObject.validators === null) {
|
|
4741
|
-
classPartObject.validators = [];
|
|
4742
|
-
}
|
|
4743
|
-
classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
|
|
4744
|
-
};
|
|
4745
|
-
const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
4746
|
-
const entries = Object.entries(classDefinition);
|
|
4747
|
-
const len = entries.length;
|
|
4748
|
-
for (let i2 = 0; i2 < len; i2++) {
|
|
4749
|
-
const [key, value] = entries[i2];
|
|
4750
|
-
processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
|
|
4751
|
-
}
|
|
4682
|
+
classGroup.forEach((classDefinition) => {
|
|
4683
|
+
if (typeof classDefinition === "string") {
|
|
4684
|
+
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
4685
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
4686
|
+
return;
|
|
4687
|
+
}
|
|
4688
|
+
if (typeof classDefinition === "function") {
|
|
4689
|
+
if (isThemeGetter(classDefinition)) {
|
|
4690
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
4691
|
+
return;
|
|
4692
|
+
}
|
|
4693
|
+
classPartObject.validators.push({
|
|
4694
|
+
validator: classDefinition,
|
|
4695
|
+
classGroupId
|
|
4696
|
+
});
|
|
4697
|
+
return;
|
|
4698
|
+
}
|
|
4699
|
+
Object.entries(classDefinition).forEach(([key, classGroup2]) => {
|
|
4700
|
+
processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
|
|
4701
|
+
});
|
|
4702
|
+
});
|
|
4752
4703
|
};
|
|
4753
4704
|
const getPart = (classPartObject, path) => {
|
|
4754
|
-
let
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
}
|
|
4766
|
-
return current;
|
|
4705
|
+
let currentClassPartObject = classPartObject;
|
|
4706
|
+
path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
|
|
4707
|
+
if (!currentClassPartObject.nextPart.has(pathPart)) {
|
|
4708
|
+
currentClassPartObject.nextPart.set(pathPart, {
|
|
4709
|
+
nextPart: /* @__PURE__ */ new Map(),
|
|
4710
|
+
validators: []
|
|
4711
|
+
});
|
|
4712
|
+
}
|
|
4713
|
+
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
|
|
4714
|
+
});
|
|
4715
|
+
return currentClassPartObject;
|
|
4767
4716
|
};
|
|
4768
|
-
const isThemeGetter = (func) =>
|
|
4717
|
+
const isThemeGetter = (func) => func.isThemeGetter;
|
|
4769
4718
|
const createLruCache = (maxCacheSize) => {
|
|
4770
4719
|
if (maxCacheSize < 1) {
|
|
4771
4720
|
return {
|
|
@@ -4775,31 +4724,31 @@ const createLruCache = (maxCacheSize) => {
|
|
|
4775
4724
|
};
|
|
4776
4725
|
}
|
|
4777
4726
|
let cacheSize = 0;
|
|
4778
|
-
let cache2 = /* @__PURE__ */
|
|
4779
|
-
let previousCache = /* @__PURE__ */
|
|
4727
|
+
let cache2 = /* @__PURE__ */ new Map();
|
|
4728
|
+
let previousCache = /* @__PURE__ */ new Map();
|
|
4780
4729
|
const update = (key, value) => {
|
|
4781
|
-
cache2
|
|
4730
|
+
cache2.set(key, value);
|
|
4782
4731
|
cacheSize++;
|
|
4783
4732
|
if (cacheSize > maxCacheSize) {
|
|
4784
4733
|
cacheSize = 0;
|
|
4785
4734
|
previousCache = cache2;
|
|
4786
|
-
cache2 = /* @__PURE__ */
|
|
4735
|
+
cache2 = /* @__PURE__ */ new Map();
|
|
4787
4736
|
}
|
|
4788
4737
|
};
|
|
4789
4738
|
return {
|
|
4790
4739
|
get(key) {
|
|
4791
|
-
let value = cache2
|
|
4740
|
+
let value = cache2.get(key);
|
|
4792
4741
|
if (value !== void 0) {
|
|
4793
4742
|
return value;
|
|
4794
4743
|
}
|
|
4795
|
-
if ((value = previousCache
|
|
4744
|
+
if ((value = previousCache.get(key)) !== void 0) {
|
|
4796
4745
|
update(key, value);
|
|
4797
4746
|
return value;
|
|
4798
4747
|
}
|
|
4799
4748
|
},
|
|
4800
4749
|
set(key, value) {
|
|
4801
|
-
if (key
|
|
4802
|
-
cache2
|
|
4750
|
+
if (cache2.has(key)) {
|
|
4751
|
+
cache2.set(key, value);
|
|
4803
4752
|
} else {
|
|
4804
4753
|
update(key, value);
|
|
4805
4754
|
}
|
|
@@ -4808,14 +4757,7 @@ const createLruCache = (maxCacheSize) => {
|
|
|
4808
4757
|
};
|
|
4809
4758
|
const IMPORTANT_MODIFIER = "!";
|
|
4810
4759
|
const MODIFIER_SEPARATOR = ":";
|
|
4811
|
-
const
|
|
4812
|
-
const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
|
|
4813
|
-
modifiers,
|
|
4814
|
-
hasImportantModifier,
|
|
4815
|
-
baseClassName,
|
|
4816
|
-
maybePostfixModifierPosition,
|
|
4817
|
-
isExternal
|
|
4818
|
-
});
|
|
4760
|
+
const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
|
|
4819
4761
|
const createParseClassName = (config2) => {
|
|
4820
4762
|
const {
|
|
4821
4763
|
prefix,
|
|
@@ -4827,13 +4769,12 @@ const createParseClassName = (config2) => {
|
|
|
4827
4769
|
let parenDepth = 0;
|
|
4828
4770
|
let modifierStart = 0;
|
|
4829
4771
|
let postfixModifierPosition;
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
const currentCharacter = className[index2];
|
|
4772
|
+
for (let index2 = 0; index2 < className.length; index2++) {
|
|
4773
|
+
let currentCharacter = className[index2];
|
|
4833
4774
|
if (bracketDepth === 0 && parenDepth === 0) {
|
|
4834
4775
|
if (currentCharacter === MODIFIER_SEPARATOR) {
|
|
4835
4776
|
modifiers.push(className.slice(modifierStart, index2));
|
|
4836
|
-
modifierStart = index2 +
|
|
4777
|
+
modifierStart = index2 + MODIFIER_SEPARATOR_LENGTH;
|
|
4837
4778
|
continue;
|
|
4838
4779
|
}
|
|
4839
4780
|
if (currentCharacter === "/") {
|
|
@@ -4841,34 +4782,37 @@ const createParseClassName = (config2) => {
|
|
|
4841
4782
|
continue;
|
|
4842
4783
|
}
|
|
4843
4784
|
}
|
|
4844
|
-
if (currentCharacter === "[")
|
|
4845
|
-
|
|
4846
|
-
else if (currentCharacter === "
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
|
|
4854
|
-
hasImportantModifier = true;
|
|
4855
|
-
} else if (
|
|
4856
|
-
/**
|
|
4857
|
-
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
4858
|
-
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
4859
|
-
*/
|
|
4860
|
-
baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
|
|
4861
|
-
) {
|
|
4862
|
-
baseClassName = baseClassNameWithImportantModifier.slice(1);
|
|
4863
|
-
hasImportantModifier = true;
|
|
4785
|
+
if (currentCharacter === "[") {
|
|
4786
|
+
bracketDepth++;
|
|
4787
|
+
} else if (currentCharacter === "]") {
|
|
4788
|
+
bracketDepth--;
|
|
4789
|
+
} else if (currentCharacter === "(") {
|
|
4790
|
+
parenDepth++;
|
|
4791
|
+
} else if (currentCharacter === ")") {
|
|
4792
|
+
parenDepth--;
|
|
4793
|
+
}
|
|
4864
4794
|
}
|
|
4795
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
|
|
4796
|
+
const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
|
|
4797
|
+
const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
|
|
4865
4798
|
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
|
|
4866
|
-
return
|
|
4799
|
+
return {
|
|
4800
|
+
modifiers,
|
|
4801
|
+
hasImportantModifier,
|
|
4802
|
+
baseClassName,
|
|
4803
|
+
maybePostfixModifierPosition
|
|
4804
|
+
};
|
|
4867
4805
|
};
|
|
4868
4806
|
if (prefix) {
|
|
4869
4807
|
const fullPrefix = prefix + MODIFIER_SEPARATOR;
|
|
4870
4808
|
const parseClassNameOriginal = parseClassName;
|
|
4871
|
-
parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.
|
|
4809
|
+
parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
|
|
4810
|
+
isExternal: true,
|
|
4811
|
+
modifiers: [],
|
|
4812
|
+
hasImportantModifier: false,
|
|
4813
|
+
baseClassName: className,
|
|
4814
|
+
maybePostfixModifierPosition: void 0
|
|
4815
|
+
};
|
|
4872
4816
|
}
|
|
4873
4817
|
if (experimentalParseClassName) {
|
|
4874
4818
|
const parseClassNameOriginal = parseClassName;
|
|
@@ -4879,35 +4823,36 @@ const createParseClassName = (config2) => {
|
|
|
4879
4823
|
}
|
|
4880
4824
|
return parseClassName;
|
|
4881
4825
|
};
|
|
4826
|
+
const stripImportantModifier = (baseClassName) => {
|
|
4827
|
+
if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
|
|
4828
|
+
return baseClassName.substring(0, baseClassName.length - 1);
|
|
4829
|
+
}
|
|
4830
|
+
if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
|
|
4831
|
+
return baseClassName.substring(1);
|
|
4832
|
+
}
|
|
4833
|
+
return baseClassName;
|
|
4834
|
+
};
|
|
4882
4835
|
const createSortModifiers = (config2) => {
|
|
4883
|
-
const
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
const
|
|
4889
|
-
let
|
|
4890
|
-
|
|
4891
|
-
const
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
if (currentSegment.length > 0) {
|
|
4896
|
-
currentSegment.sort();
|
|
4897
|
-
result.push(...currentSegment);
|
|
4898
|
-
currentSegment = [];
|
|
4899
|
-
}
|
|
4900
|
-
result.push(modifier);
|
|
4836
|
+
const orderSensitiveModifiers = Object.fromEntries(config2.orderSensitiveModifiers.map((modifier) => [modifier, true]));
|
|
4837
|
+
const sortModifiers = (modifiers) => {
|
|
4838
|
+
if (modifiers.length <= 1) {
|
|
4839
|
+
return modifiers;
|
|
4840
|
+
}
|
|
4841
|
+
const sortedModifiers = [];
|
|
4842
|
+
let unsortedModifiers = [];
|
|
4843
|
+
modifiers.forEach((modifier) => {
|
|
4844
|
+
const isPositionSensitive = modifier[0] === "[" || orderSensitiveModifiers[modifier];
|
|
4845
|
+
if (isPositionSensitive) {
|
|
4846
|
+
sortedModifiers.push(...unsortedModifiers.sort(), modifier);
|
|
4847
|
+
unsortedModifiers = [];
|
|
4901
4848
|
} else {
|
|
4902
|
-
|
|
4849
|
+
unsortedModifiers.push(modifier);
|
|
4903
4850
|
}
|
|
4904
|
-
}
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
result.push(...currentSegment);
|
|
4908
|
-
}
|
|
4909
|
-
return result;
|
|
4851
|
+
});
|
|
4852
|
+
sortedModifiers.push(...unsortedModifiers.sort());
|
|
4853
|
+
return sortedModifiers;
|
|
4910
4854
|
};
|
|
4855
|
+
return sortModifiers;
|
|
4911
4856
|
};
|
|
4912
4857
|
const createConfigUtils = (config2) => ({
|
|
4913
4858
|
cache: createLruCache(config2.cacheSize),
|
|
@@ -4953,10 +4898,10 @@ const mergeClassList = (classList, configUtils) => {
|
|
|
4953
4898
|
}
|
|
4954
4899
|
hasPostfixModifier = false;
|
|
4955
4900
|
}
|
|
4956
|
-
const variantModifier =
|
|
4901
|
+
const variantModifier = sortModifiers(modifiers).join(":");
|
|
4957
4902
|
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
4958
4903
|
const classId = modifierId + classGroupId;
|
|
4959
|
-
if (classGroupsInConflict.
|
|
4904
|
+
if (classGroupsInConflict.includes(classId)) {
|
|
4960
4905
|
continue;
|
|
4961
4906
|
}
|
|
4962
4907
|
classGroupsInConflict.push(classId);
|
|
@@ -4969,13 +4914,13 @@ const mergeClassList = (classList, configUtils) => {
|
|
|
4969
4914
|
}
|
|
4970
4915
|
return result;
|
|
4971
4916
|
};
|
|
4972
|
-
|
|
4917
|
+
function twJoin() {
|
|
4973
4918
|
let index2 = 0;
|
|
4974
4919
|
let argument;
|
|
4975
4920
|
let resolvedValue;
|
|
4976
4921
|
let string2 = "";
|
|
4977
|
-
while (index2 <
|
|
4978
|
-
if (argument =
|
|
4922
|
+
while (index2 < arguments.length) {
|
|
4923
|
+
if (argument = arguments[index2++]) {
|
|
4979
4924
|
if (resolvedValue = toValue(argument)) {
|
|
4980
4925
|
string2 && (string2 += " ");
|
|
4981
4926
|
string2 += resolvedValue;
|
|
@@ -4983,7 +4928,7 @@ const twJoin = (...classLists) => {
|
|
|
4983
4928
|
}
|
|
4984
4929
|
}
|
|
4985
4930
|
return string2;
|
|
4986
|
-
}
|
|
4931
|
+
}
|
|
4987
4932
|
const toValue = (mix) => {
|
|
4988
4933
|
if (typeof mix === "string") {
|
|
4989
4934
|
return mix;
|
|
@@ -5000,20 +4945,20 @@ const toValue = (mix) => {
|
|
|
5000
4945
|
}
|
|
5001
4946
|
return string2;
|
|
5002
4947
|
};
|
|
5003
|
-
|
|
4948
|
+
function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
5004
4949
|
let configUtils;
|
|
5005
4950
|
let cacheGet;
|
|
5006
4951
|
let cacheSet;
|
|
5007
|
-
let functionToCall;
|
|
5008
|
-
|
|
4952
|
+
let functionToCall = initTailwindMerge;
|
|
4953
|
+
function initTailwindMerge(classList) {
|
|
5009
4954
|
const config2 = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
5010
4955
|
configUtils = createConfigUtils(config2);
|
|
5011
4956
|
cacheGet = configUtils.cache.get;
|
|
5012
4957
|
cacheSet = configUtils.cache.set;
|
|
5013
4958
|
functionToCall = tailwindMerge;
|
|
5014
4959
|
return tailwindMerge(classList);
|
|
5015
|
-
}
|
|
5016
|
-
|
|
4960
|
+
}
|
|
4961
|
+
function tailwindMerge(classList) {
|
|
5017
4962
|
const cachedResult = cacheGet(classList);
|
|
5018
4963
|
if (cachedResult) {
|
|
5019
4964
|
return cachedResult;
|
|
@@ -5021,13 +4966,13 @@ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
|
|
|
5021
4966
|
const result = mergeClassList(classList, configUtils);
|
|
5022
4967
|
cacheSet(classList, result);
|
|
5023
4968
|
return result;
|
|
4969
|
+
}
|
|
4970
|
+
return function callTailwindMerge() {
|
|
4971
|
+
return functionToCall(twJoin.apply(null, arguments));
|
|
5024
4972
|
};
|
|
5025
|
-
|
|
5026
|
-
return (...args) => functionToCall(twJoin(...args));
|
|
5027
|
-
};
|
|
5028
|
-
const fallbackThemeArr = [];
|
|
4973
|
+
}
|
|
5029
4974
|
const fromTheme = (key) => {
|
|
5030
|
-
const themeGetter = (theme) => theme[key] ||
|
|
4975
|
+
const themeGetter = (theme) => theme[key] || [];
|
|
5031
4976
|
themeGetter.isThemeGetter = true;
|
|
5032
4977
|
return themeGetter;
|
|
5033
4978
|
};
|
|
@@ -7635,7 +7580,7 @@ function createContext2(rootComponentName, defaultContext) {
|
|
|
7635
7580
|
}
|
|
7636
7581
|
return [Provider2, useContext2];
|
|
7637
7582
|
}
|
|
7638
|
-
function createContextScope
|
|
7583
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
7639
7584
|
let defaultContexts = [];
|
|
7640
7585
|
function createContext3(rootComponentName, defaultContext) {
|
|
7641
7586
|
const BaseContext = React.createContext(defaultContext);
|
|
@@ -7672,9 +7617,9 @@ function createContextScope$2(scopeName, createContextScopeDeps = []) {
|
|
|
7672
7617
|
};
|
|
7673
7618
|
};
|
|
7674
7619
|
createScope.scopeName = scopeName;
|
|
7675
|
-
return [createContext3, composeContextScopes
|
|
7620
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
7676
7621
|
}
|
|
7677
|
-
function composeContextScopes
|
|
7622
|
+
function composeContextScopes(...scopes) {
|
|
7678
7623
|
const baseScope = scopes[0];
|
|
7679
7624
|
if (scopes.length === 1) return baseScope;
|
|
7680
7625
|
const createScope = () => {
|
|
@@ -7694,18 +7639,18 @@ function composeContextScopes$2(...scopes) {
|
|
|
7694
7639
|
createScope.scopeName = baseScope.scopeName;
|
|
7695
7640
|
return createScope;
|
|
7696
7641
|
}
|
|
7697
|
-
function setRef$
|
|
7642
|
+
function setRef$2(ref, value) {
|
|
7698
7643
|
if (typeof ref === "function") {
|
|
7699
7644
|
return ref(value);
|
|
7700
7645
|
} else if (ref !== null && ref !== void 0) {
|
|
7701
7646
|
ref.current = value;
|
|
7702
7647
|
}
|
|
7703
7648
|
}
|
|
7704
|
-
function composeRefs$
|
|
7649
|
+
function composeRefs$2(...refs) {
|
|
7705
7650
|
return (node) => {
|
|
7706
7651
|
let hasCleanup = false;
|
|
7707
7652
|
const cleanups = refs.map((ref) => {
|
|
7708
|
-
const cleanup = setRef$
|
|
7653
|
+
const cleanup = setRef$2(ref, node);
|
|
7709
7654
|
if (!hasCleanup && typeof cleanup == "function") {
|
|
7710
7655
|
hasCleanup = true;
|
|
7711
7656
|
}
|
|
@@ -7718,7 +7663,7 @@ function composeRefs$1(...refs) {
|
|
|
7718
7663
|
if (typeof cleanup == "function") {
|
|
7719
7664
|
cleanup();
|
|
7720
7665
|
} else {
|
|
7721
|
-
setRef$
|
|
7666
|
+
setRef$2(refs[i2], null);
|
|
7722
7667
|
}
|
|
7723
7668
|
}
|
|
7724
7669
|
};
|
|
@@ -7726,15 +7671,15 @@ function composeRefs$1(...refs) {
|
|
|
7726
7671
|
};
|
|
7727
7672
|
}
|
|
7728
7673
|
function useComposedRefs$1(...refs) {
|
|
7729
|
-
return React.useCallback(composeRefs$
|
|
7674
|
+
return React.useCallback(composeRefs$2(...refs), refs);
|
|
7730
7675
|
}
|
|
7731
7676
|
// @__NO_SIDE_EFFECTS__
|
|
7732
|
-
function createSlot$
|
|
7733
|
-
const SlotClone = /* @__PURE__ */ createSlotClone$
|
|
7677
|
+
function createSlot$1(ownerName) {
|
|
7678
|
+
const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
|
|
7734
7679
|
const Slot2 = React.forwardRef((props2, forwardedRef) => {
|
|
7735
7680
|
const { children, ...slotProps } = props2;
|
|
7736
7681
|
const childrenArray = React.Children.toArray(children);
|
|
7737
|
-
const slottable = childrenArray.find(isSlottable$
|
|
7682
|
+
const slottable = childrenArray.find(isSlottable$1);
|
|
7738
7683
|
if (slottable) {
|
|
7739
7684
|
const newElement = slottable.props.children;
|
|
7740
7685
|
const newChildren = childrenArray.map((child) => {
|
|
@@ -7753,14 +7698,14 @@ function createSlot$7(ownerName) {
|
|
|
7753
7698
|
return Slot2;
|
|
7754
7699
|
}
|
|
7755
7700
|
// @__NO_SIDE_EFFECTS__
|
|
7756
|
-
function createSlotClone$
|
|
7701
|
+
function createSlotClone$1(ownerName) {
|
|
7757
7702
|
const SlotClone = React.forwardRef((props2, forwardedRef) => {
|
|
7758
7703
|
const { children, ...slotProps } = props2;
|
|
7759
7704
|
if (React.isValidElement(children)) {
|
|
7760
|
-
const childrenRef = getElementRef$
|
|
7761
|
-
const props22 = mergeProps$
|
|
7705
|
+
const childrenRef = getElementRef$2(children);
|
|
7706
|
+
const props22 = mergeProps$1(slotProps, children.props);
|
|
7762
7707
|
if (children.type !== React.Fragment) {
|
|
7763
|
-
props22.ref = forwardedRef ? composeRefs$
|
|
7708
|
+
props22.ref = forwardedRef ? composeRefs$2(forwardedRef, childrenRef) : childrenRef;
|
|
7764
7709
|
}
|
|
7765
7710
|
return React.cloneElement(children, props22);
|
|
7766
7711
|
}
|
|
@@ -7769,20 +7714,20 @@ function createSlotClone$7(ownerName) {
|
|
|
7769
7714
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
7770
7715
|
return SlotClone;
|
|
7771
7716
|
}
|
|
7772
|
-
var SLOTTABLE_IDENTIFIER$
|
|
7717
|
+
var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
|
|
7773
7718
|
// @__NO_SIDE_EFFECTS__
|
|
7774
7719
|
function createSlottable(ownerName) {
|
|
7775
7720
|
const Slottable2 = ({ children }) => {
|
|
7776
7721
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
7777
7722
|
};
|
|
7778
7723
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
7779
|
-
Slottable2.__radixId = SLOTTABLE_IDENTIFIER$
|
|
7724
|
+
Slottable2.__radixId = SLOTTABLE_IDENTIFIER$1;
|
|
7780
7725
|
return Slottable2;
|
|
7781
7726
|
}
|
|
7782
|
-
function isSlottable$
|
|
7783
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$
|
|
7727
|
+
function isSlottable$1(child) {
|
|
7728
|
+
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
|
|
7784
7729
|
}
|
|
7785
|
-
function mergeProps$
|
|
7730
|
+
function mergeProps$1(slotProps, childProps) {
|
|
7786
7731
|
const overrideProps = { ...childProps };
|
|
7787
7732
|
for (const propName in childProps) {
|
|
7788
7733
|
const slotPropValue = slotProps[propName];
|
|
@@ -7806,7 +7751,7 @@ function mergeProps$7(slotProps, childProps) {
|
|
|
7806
7751
|
}
|
|
7807
7752
|
return { ...slotProps, ...overrideProps };
|
|
7808
7753
|
}
|
|
7809
|
-
function getElementRef$
|
|
7754
|
+
function getElementRef$2(element) {
|
|
7810
7755
|
var _a2, _b;
|
|
7811
7756
|
let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
|
|
7812
7757
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
@@ -7822,7 +7767,7 @@ function getElementRef$8(element) {
|
|
|
7822
7767
|
}
|
|
7823
7768
|
function createCollection(name) {
|
|
7824
7769
|
const PROVIDER_NAME2 = name + "CollectionProvider";
|
|
7825
|
-
const [createCollectionContext, createCollectionScope2] = createContextScope
|
|
7770
|
+
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
|
|
7826
7771
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
7827
7772
|
PROVIDER_NAME2,
|
|
7828
7773
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -7835,7 +7780,7 @@ function createCollection(name) {
|
|
|
7835
7780
|
};
|
|
7836
7781
|
CollectionProvider.displayName = PROVIDER_NAME2;
|
|
7837
7782
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
7838
|
-
const CollectionSlotImpl = /* @__PURE__ */ createSlot$
|
|
7783
|
+
const CollectionSlotImpl = /* @__PURE__ */ createSlot$1(COLLECTION_SLOT_NAME);
|
|
7839
7784
|
const CollectionSlot = React__default.forwardRef(
|
|
7840
7785
|
(props2, forwardedRef) => {
|
|
7841
7786
|
const { scope, children } = props2;
|
|
@@ -7847,7 +7792,7 @@ function createCollection(name) {
|
|
|
7847
7792
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
7848
7793
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
7849
7794
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
7850
|
-
const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$
|
|
7795
|
+
const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$1(ITEM_SLOT_NAME);
|
|
7851
7796
|
const CollectionItemSlot = React__default.forwardRef(
|
|
7852
7797
|
(props2, forwardedRef) => {
|
|
7853
7798
|
const { scope, children, ...itemData } = props2;
|
|
@@ -7958,7 +7903,7 @@ function useUncontrolledState$1({
|
|
|
7958
7903
|
function isFunction$3(value) {
|
|
7959
7904
|
return typeof value === "function";
|
|
7960
7905
|
}
|
|
7961
|
-
var NODES
|
|
7906
|
+
var NODES = [
|
|
7962
7907
|
"a",
|
|
7963
7908
|
"button",
|
|
7964
7909
|
"div",
|
|
@@ -7977,8 +7922,8 @@ var NODES$6 = [
|
|
|
7977
7922
|
"svg",
|
|
7978
7923
|
"ul"
|
|
7979
7924
|
];
|
|
7980
|
-
var Primitive
|
|
7981
|
-
const Slot2 = /* @__PURE__ */ createSlot$
|
|
7925
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
7926
|
+
const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
|
|
7982
7927
|
const Node2 = React.forwardRef((props2, forwardedRef) => {
|
|
7983
7928
|
const { asChild, ...primitiveProps } = props2;
|
|
7984
7929
|
const Comp = asChild ? Slot2 : node;
|
|
@@ -8003,7 +7948,7 @@ var Presence = (props2) => {
|
|
|
8003
7948
|
const { present, children } = props2;
|
|
8004
7949
|
const presence = usePresence(present);
|
|
8005
7950
|
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
|
|
8006
|
-
const ref = useComposedRefs$1(presence.ref, getElementRef$
|
|
7951
|
+
const ref = useComposedRefs$1(presence.ref, getElementRef$1(child));
|
|
8007
7952
|
const forceMount = typeof children === "function";
|
|
8008
7953
|
return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
|
|
8009
7954
|
};
|
|
@@ -8102,7 +8047,7 @@ function usePresence(present) {
|
|
|
8102
8047
|
function getAnimationName(styles) {
|
|
8103
8048
|
return (styles == null ? void 0 : styles.animationName) || "none";
|
|
8104
8049
|
}
|
|
8105
|
-
function getElementRef$
|
|
8050
|
+
function getElementRef$1(element) {
|
|
8106
8051
|
var _a2, _b;
|
|
8107
8052
|
let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
|
|
8108
8053
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
@@ -8126,7 +8071,7 @@ function useId$1(deterministicId) {
|
|
|
8126
8071
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
8127
8072
|
}
|
|
8128
8073
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
8129
|
-
var [createCollapsibleContext, createCollapsibleScope] = createContextScope
|
|
8074
|
+
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
8130
8075
|
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
8131
8076
|
var Collapsible$1 = React.forwardRef(
|
|
8132
8077
|
(props2, forwardedRef) => {
|
|
@@ -8153,7 +8098,7 @@ var Collapsible$1 = React.forwardRef(
|
|
|
8153
8098
|
open,
|
|
8154
8099
|
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
8155
8100
|
children: /* @__PURE__ */ jsx(
|
|
8156
|
-
Primitive
|
|
8101
|
+
Primitive.div,
|
|
8157
8102
|
{
|
|
8158
8103
|
"data-state": getState$7(open),
|
|
8159
8104
|
"data-disabled": disabled ? "" : void 0,
|
|
@@ -8172,7 +8117,7 @@ var CollapsibleTrigger$1 = React.forwardRef(
|
|
|
8172
8117
|
const { __scopeCollapsible, ...triggerProps } = props2;
|
|
8173
8118
|
const context = useCollapsibleContext(TRIGGER_NAME$d, __scopeCollapsible);
|
|
8174
8119
|
return /* @__PURE__ */ jsx(
|
|
8175
|
-
Primitive
|
|
8120
|
+
Primitive.button,
|
|
8176
8121
|
{
|
|
8177
8122
|
type: "button",
|
|
8178
8123
|
"aria-controls": context.contentId,
|
|
@@ -8234,7 +8179,7 @@ var CollapsibleContentImpl = React.forwardRef((props2, forwardedRef) => {
|
|
|
8234
8179
|
}
|
|
8235
8180
|
}, [context.open, present]);
|
|
8236
8181
|
return /* @__PURE__ */ jsx(
|
|
8237
|
-
Primitive
|
|
8182
|
+
Primitive.div,
|
|
8238
8183
|
{
|
|
8239
8184
|
"data-state": getState$7(context.open),
|
|
8240
8185
|
"data-disabled": context.disabled ? "" : void 0,
|
|
@@ -8265,7 +8210,7 @@ function useDirection(localDir) {
|
|
|
8265
8210
|
var ACCORDION_NAME = "Accordion";
|
|
8266
8211
|
var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
|
|
8267
8212
|
var [Collection$6, useCollection$6, createCollectionScope$6] = createCollection(ACCORDION_NAME);
|
|
8268
|
-
var [createAccordionContext] = createContextScope
|
|
8213
|
+
var [createAccordionContext] = createContextScope(ACCORDION_NAME, [
|
|
8269
8214
|
createCollectionScope$6,
|
|
8270
8215
|
createCollapsibleScope
|
|
8271
8216
|
]);
|
|
@@ -8428,7 +8373,7 @@ var AccordionImpl = React__default.forwardRef(
|
|
|
8428
8373
|
direction: dir,
|
|
8429
8374
|
orientation,
|
|
8430
8375
|
children: /* @__PURE__ */ jsx(Collection$6.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(
|
|
8431
|
-
Primitive
|
|
8376
|
+
Primitive.div,
|
|
8432
8377
|
{
|
|
8433
8378
|
...accordionProps,
|
|
8434
8379
|
"data-orientation": orientation,
|
|
@@ -8489,7 +8434,7 @@ var AccordionHeader = React__default.forwardRef(
|
|
|
8489
8434
|
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
8490
8435
|
const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
|
|
8491
8436
|
return /* @__PURE__ */ jsx(
|
|
8492
|
-
Primitive
|
|
8437
|
+
Primitive.h3,
|
|
8493
8438
|
{
|
|
8494
8439
|
"data-orientation": accordionContext.orientation,
|
|
8495
8440
|
"data-state": getState$6(itemContext.open),
|
|
@@ -8611,24 +8556,55 @@ function AccordionContent({
|
|
|
8611
8556
|
}
|
|
8612
8557
|
);
|
|
8613
8558
|
}
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8559
|
+
function setRef$1(ref, value) {
|
|
8560
|
+
if (typeof ref === "function") {
|
|
8561
|
+
return ref(value);
|
|
8562
|
+
} else if (ref !== null && ref !== void 0) {
|
|
8563
|
+
ref.current = value;
|
|
8564
|
+
}
|
|
8565
|
+
}
|
|
8566
|
+
function composeRefs$1(...refs) {
|
|
8567
|
+
return (node) => {
|
|
8568
|
+
let hasCleanup = false;
|
|
8569
|
+
const cleanups = refs.map((ref) => {
|
|
8570
|
+
const cleanup = setRef$1(ref, node);
|
|
8571
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
8572
|
+
hasCleanup = true;
|
|
8573
|
+
}
|
|
8574
|
+
return cleanup;
|
|
8575
|
+
});
|
|
8576
|
+
if (hasCleanup) {
|
|
8577
|
+
return () => {
|
|
8578
|
+
for (let i2 = 0; i2 < cleanups.length; i2++) {
|
|
8579
|
+
const cleanup = cleanups[i2];
|
|
8580
|
+
if (typeof cleanup == "function") {
|
|
8581
|
+
cleanup();
|
|
8582
|
+
} else {
|
|
8583
|
+
setRef$1(refs[i2], null);
|
|
8584
|
+
}
|
|
8585
|
+
}
|
|
8586
|
+
};
|
|
8587
|
+
}
|
|
8588
|
+
};
|
|
8589
|
+
}
|
|
8590
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
8591
|
+
var use = React[" use ".trim().toString()];
|
|
8592
|
+
function isPromiseLike(value) {
|
|
8617
8593
|
return typeof value === "object" && value !== null && "then" in value;
|
|
8618
8594
|
}
|
|
8619
|
-
function isLazyComponent
|
|
8620
|
-
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE
|
|
8595
|
+
function isLazyComponent(element) {
|
|
8596
|
+
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
8621
8597
|
}
|
|
8622
8598
|
// @__NO_SIDE_EFFECTS__
|
|
8623
|
-
function createSlot
|
|
8624
|
-
const SlotClone = /* @__PURE__ */ createSlotClone
|
|
8599
|
+
function createSlot(ownerName) {
|
|
8600
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
8625
8601
|
const Slot2 = React.forwardRef((props2, forwardedRef) => {
|
|
8626
8602
|
let { children, ...slotProps } = props2;
|
|
8627
|
-
if (isLazyComponent
|
|
8628
|
-
children = use
|
|
8603
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
8604
|
+
children = use(children._payload);
|
|
8629
8605
|
}
|
|
8630
8606
|
const childrenArray = React.Children.toArray(children);
|
|
8631
|
-
const slottable = childrenArray.find(isSlottable
|
|
8607
|
+
const slottable = childrenArray.find(isSlottable);
|
|
8632
8608
|
if (slottable) {
|
|
8633
8609
|
const newElement = slottable.props.children;
|
|
8634
8610
|
const newChildren = childrenArray.map((child) => {
|
|
@@ -8646,17 +8622,17 @@ function createSlot$6(ownerName) {
|
|
|
8646
8622
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
8647
8623
|
return Slot2;
|
|
8648
8624
|
}
|
|
8649
|
-
var Slot$4 = /* @__PURE__ */ createSlot
|
|
8625
|
+
var Slot$4 = /* @__PURE__ */ createSlot("Slot");
|
|
8650
8626
|
// @__NO_SIDE_EFFECTS__
|
|
8651
|
-
function createSlotClone
|
|
8627
|
+
function createSlotClone(ownerName) {
|
|
8652
8628
|
const SlotClone = React.forwardRef((props2, forwardedRef) => {
|
|
8653
8629
|
let { children, ...slotProps } = props2;
|
|
8654
|
-
if (isLazyComponent
|
|
8655
|
-
children = use
|
|
8630
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
8631
|
+
children = use(children._payload);
|
|
8656
8632
|
}
|
|
8657
8633
|
if (React.isValidElement(children)) {
|
|
8658
|
-
const childrenRef = getElementRef
|
|
8659
|
-
const props22 = mergeProps
|
|
8634
|
+
const childrenRef = getElementRef(children);
|
|
8635
|
+
const props22 = mergeProps(slotProps, children.props);
|
|
8660
8636
|
if (children.type !== React.Fragment) {
|
|
8661
8637
|
props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
|
|
8662
8638
|
}
|
|
@@ -8667,11 +8643,11 @@ function createSlotClone$6(ownerName) {
|
|
|
8667
8643
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
8668
8644
|
return SlotClone;
|
|
8669
8645
|
}
|
|
8670
|
-
var SLOTTABLE_IDENTIFIER
|
|
8671
|
-
function isSlottable
|
|
8672
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER
|
|
8646
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
8647
|
+
function isSlottable(child) {
|
|
8648
|
+
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
8673
8649
|
}
|
|
8674
|
-
function mergeProps
|
|
8650
|
+
function mergeProps(slotProps, childProps) {
|
|
8675
8651
|
const overrideProps = { ...childProps };
|
|
8676
8652
|
for (const propName in childProps) {
|
|
8677
8653
|
const slotPropValue = slotProps[propName];
|
|
@@ -8695,7 +8671,7 @@ function mergeProps$6(slotProps, childProps) {
|
|
|
8695
8671
|
}
|
|
8696
8672
|
return { ...slotProps, ...overrideProps };
|
|
8697
8673
|
}
|
|
8698
|
-
function getElementRef
|
|
8674
|
+
function getElementRef(element) {
|
|
8699
8675
|
var _a2, _b;
|
|
8700
8676
|
let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
|
|
8701
8677
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
@@ -8836,7 +8812,7 @@ function useSize(element) {
|
|
|
8836
8812
|
return size2;
|
|
8837
8813
|
}
|
|
8838
8814
|
var CHECKBOX_NAME = "Checkbox";
|
|
8839
|
-
var [createCheckboxContext] = createContextScope
|
|
8815
|
+
var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
|
|
8840
8816
|
var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
|
|
8841
8817
|
function CheckboxProvider(props2) {
|
|
8842
8818
|
const {
|
|
@@ -8917,7 +8893,7 @@ var CheckboxTrigger = React.forwardRef(
|
|
|
8917
8893
|
}
|
|
8918
8894
|
}, [control, setChecked]);
|
|
8919
8895
|
return /* @__PURE__ */ jsx(
|
|
8920
|
-
Primitive
|
|
8896
|
+
Primitive.button,
|
|
8921
8897
|
{
|
|
8922
8898
|
type: "button",
|
|
8923
8899
|
role: "checkbox",
|
|
@@ -9001,7 +8977,7 @@ var CheckboxIndicator = React.forwardRef(
|
|
|
9001
8977
|
{
|
|
9002
8978
|
present: forceMount || isIndeterminate$1(context.checked) || context.checked === true,
|
|
9003
8979
|
children: /* @__PURE__ */ jsx(
|
|
9004
|
-
Primitive
|
|
8980
|
+
Primitive.span,
|
|
9005
8981
|
{
|
|
9006
8982
|
"data-state": getState$5(context.checked),
|
|
9007
8983
|
"data-disabled": context.disabled ? "" : void 0,
|
|
@@ -9053,7 +9029,7 @@ var CheckboxBubbleInput = React.forwardRef(
|
|
|
9053
9029
|
}, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
|
|
9054
9030
|
const defaultCheckedRef = React.useRef(isIndeterminate$1(checked) ? false : checked);
|
|
9055
9031
|
return /* @__PURE__ */ jsx(
|
|
9056
|
-
Primitive
|
|
9032
|
+
Primitive.input,
|
|
9057
9033
|
{
|
|
9058
9034
|
type: "checkbox",
|
|
9059
9035
|
"aria-hidden": true,
|
|
@@ -9438,7 +9414,7 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
|
|
|
9438
9414
|
var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
|
9439
9415
|
function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new WeakSet()) {
|
|
9440
9416
|
if (isPrimitive(object1) || isPrimitive(object2)) {
|
|
9441
|
-
return
|
|
9417
|
+
return object1 === object2;
|
|
9442
9418
|
}
|
|
9443
9419
|
if (isDateObject(object1) && isDateObject(object2)) {
|
|
9444
9420
|
return object1.getTime() === object2.getTime();
|
|
@@ -9460,7 +9436,7 @@ function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new W
|
|
|
9460
9436
|
}
|
|
9461
9437
|
if (key !== "ref") {
|
|
9462
9438
|
const val2 = object2[key];
|
|
9463
|
-
if (isDateObject(val1) && isDateObject(val2) || isObject$5(val1) && isObject$5(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) :
|
|
9439
|
+
if (isDateObject(val1) && isDateObject(val2) || isObject$5(val1) && isObject$5(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) : val1 !== val2) {
|
|
9464
9440
|
return false;
|
|
9465
9441
|
}
|
|
9466
9442
|
}
|
|
@@ -9473,76 +9449,48 @@ function useWatch(props2) {
|
|
|
9473
9449
|
const _defaultValue = React__default.useRef(defaultValue);
|
|
9474
9450
|
const _compute = React__default.useRef(compute);
|
|
9475
9451
|
const _computeFormValues = React__default.useRef(void 0);
|
|
9476
|
-
const _prevControl = React__default.useRef(control);
|
|
9477
|
-
const _prevName = React__default.useRef(name);
|
|
9478
9452
|
_compute.current = compute;
|
|
9479
|
-
const
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9453
|
+
const defaultValueMemo = React__default.useMemo(() => control._getWatch(name, _defaultValue.current), [control, name]);
|
|
9454
|
+
const [value, updateValue] = React__default.useState(_compute.current ? _compute.current(defaultValueMemo) : defaultValueMemo);
|
|
9455
|
+
useIsomorphicLayoutEffect$4(() => control._subscribe({
|
|
9456
|
+
name,
|
|
9457
|
+
formState: {
|
|
9458
|
+
values: true
|
|
9459
|
+
},
|
|
9460
|
+
exact,
|
|
9461
|
+
callback: (formState) => {
|
|
9462
|
+
if (!disabled) {
|
|
9463
|
+
const formValues = generateWatchOutput(name, control._names, formState.values || control._formValues, false, _defaultValue.current);
|
|
9464
|
+
if (_compute.current) {
|
|
9465
|
+
const computedFormValues = _compute.current(formValues);
|
|
9466
|
+
if (!deepEqual$1(computedFormValues, _computeFormValues.current)) {
|
|
9467
|
+
updateValue(computedFormValues);
|
|
9468
|
+
_computeFormValues.current = computedFormValues;
|
|
9469
|
+
}
|
|
9470
|
+
} else {
|
|
9471
|
+
updateValue(formValues);
|
|
9495
9472
|
}
|
|
9496
|
-
} else {
|
|
9497
|
-
updateValue(formValues);
|
|
9498
9473
|
}
|
|
9499
9474
|
}
|
|
9500
|
-
}, [control
|
|
9501
|
-
useIsomorphicLayoutEffect$4(() => {
|
|
9502
|
-
if (_prevControl.current !== control || !deepEqual$1(_prevName.current, name)) {
|
|
9503
|
-
_prevControl.current = control;
|
|
9504
|
-
_prevName.current = name;
|
|
9505
|
-
refreshValue();
|
|
9506
|
-
}
|
|
9507
|
-
return control._subscribe({
|
|
9508
|
-
name,
|
|
9509
|
-
formState: {
|
|
9510
|
-
values: true
|
|
9511
|
-
},
|
|
9512
|
-
exact,
|
|
9513
|
-
callback: (formState) => {
|
|
9514
|
-
refreshValue(formState.values);
|
|
9515
|
-
}
|
|
9516
|
-
});
|
|
9517
|
-
}, [control, exact, name, refreshValue]);
|
|
9475
|
+
}), [control, disabled, name, exact]);
|
|
9518
9476
|
React__default.useEffect(() => control._removeUnmounted());
|
|
9519
|
-
|
|
9520
|
-
const prevName = _prevName.current;
|
|
9521
|
-
const computedOutput = React__default.useMemo(() => {
|
|
9522
|
-
if (disabled) {
|
|
9523
|
-
return null;
|
|
9524
|
-
}
|
|
9525
|
-
const nameChanged = !controlChanged && !deepEqual$1(prevName, name);
|
|
9526
|
-
const shouldReturnImmediate = controlChanged || nameChanged;
|
|
9527
|
-
return shouldReturnImmediate ? getCurrentOutput() : null;
|
|
9528
|
-
}, [disabled, controlChanged, name, prevName, getCurrentOutput]);
|
|
9529
|
-
return computedOutput !== null ? computedOutput : value;
|
|
9477
|
+
return value;
|
|
9530
9478
|
}
|
|
9531
9479
|
function useController(props2) {
|
|
9532
9480
|
const methods = useFormContext();
|
|
9533
|
-
const { name, disabled, control = methods.control, shouldUnregister, defaultValue
|
|
9481
|
+
const { name, disabled, control = methods.control, shouldUnregister, defaultValue } = props2;
|
|
9534
9482
|
const isArrayField = isNameInFieldArray(control._names.array, name);
|
|
9535
9483
|
const defaultValueMemo = React__default.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
|
|
9536
9484
|
const value = useWatch({
|
|
9537
9485
|
control,
|
|
9538
9486
|
name,
|
|
9539
9487
|
defaultValue: defaultValueMemo,
|
|
9540
|
-
exact
|
|
9488
|
+
exact: true
|
|
9541
9489
|
});
|
|
9542
9490
|
const formState = useFormState({
|
|
9543
9491
|
control,
|
|
9544
9492
|
name,
|
|
9545
|
-
exact
|
|
9493
|
+
exact: true
|
|
9546
9494
|
});
|
|
9547
9495
|
const _props = React__default.useRef(props2);
|
|
9548
9496
|
const _previousNameRef = React__default.useRef(void 0);
|
|
@@ -9759,11 +9707,10 @@ function isTraversable(value) {
|
|
|
9759
9707
|
}
|
|
9760
9708
|
function markFieldsDirty(data, fields = {}) {
|
|
9761
9709
|
for (const key in data) {
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
} else if (!isUndefined(value)) {
|
|
9710
|
+
if (isTraversable(data[key])) {
|
|
9711
|
+
fields[key] = Array.isArray(data[key]) ? [] : {};
|
|
9712
|
+
markFieldsDirty(data[key], fields[key]);
|
|
9713
|
+
} else if (!isUndefined(data[key])) {
|
|
9767
9714
|
fields[key] = true;
|
|
9768
9715
|
}
|
|
9769
9716
|
}
|
|
@@ -9774,16 +9721,14 @@ function getDirtyFields(data, formValues, dirtyFieldsFromValues) {
|
|
|
9774
9721
|
dirtyFieldsFromValues = markFieldsDirty(formValues);
|
|
9775
9722
|
}
|
|
9776
9723
|
for (const key in data) {
|
|
9777
|
-
|
|
9778
|
-
if (isTraversable(value)) {
|
|
9724
|
+
if (isTraversable(data[key])) {
|
|
9779
9725
|
if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) {
|
|
9780
|
-
dirtyFieldsFromValues[key] = markFieldsDirty(
|
|
9726
|
+
dirtyFieldsFromValues[key] = markFieldsDirty(data[key], Array.isArray(data[key]) ? [] : {});
|
|
9781
9727
|
} else {
|
|
9782
|
-
getDirtyFields(
|
|
9728
|
+
getDirtyFields(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
|
|
9783
9729
|
}
|
|
9784
9730
|
} else {
|
|
9785
|
-
|
|
9786
|
-
dirtyFieldsFromValues[key] = !deepEqual$1(value, formValue);
|
|
9731
|
+
dirtyFieldsFromValues[key] = !deepEqual$1(data[key], formValues[key]);
|
|
9787
9732
|
}
|
|
9788
9733
|
}
|
|
9789
9734
|
return dirtyFieldsFromValues;
|
|
@@ -10238,7 +10183,7 @@ function createFormControl(props2 = {}) {
|
|
|
10238
10183
|
if (field) {
|
|
10239
10184
|
const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);
|
|
10240
10185
|
isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set$1(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue);
|
|
10241
|
-
_state.mount &&
|
|
10186
|
+
_state.mount && _setValid();
|
|
10242
10187
|
}
|
|
10243
10188
|
};
|
|
10244
10189
|
const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
|
|
@@ -10849,12 +10794,8 @@ function createFormControl(props2 = {}) {
|
|
|
10849
10794
|
watchAll: false,
|
|
10850
10795
|
focus: ""
|
|
10851
10796
|
};
|
|
10852
|
-
_state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues
|
|
10797
|
+
_state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues;
|
|
10853
10798
|
_state.watch = !!_options.shouldUnregister;
|
|
10854
|
-
_state.action = false;
|
|
10855
|
-
if (!keepStateOptions.keepErrors) {
|
|
10856
|
-
_formState.errors = {};
|
|
10857
|
-
}
|
|
10858
10799
|
_subjects.state.next({
|
|
10859
10800
|
submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
|
|
10860
10801
|
isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual$1(formValues, _defaultValues)),
|
|
@@ -11280,15 +11221,11 @@ function useForm(props2 = {}) {
|
|
|
11280
11221
|
}
|
|
11281
11222
|
}, [control, formState.isDirty]);
|
|
11282
11223
|
React__default.useEffect(() => {
|
|
11283
|
-
var _a2;
|
|
11284
11224
|
if (props2.values && !deepEqual$1(props2.values, _values.current)) {
|
|
11285
11225
|
control._reset(props2.values, {
|
|
11286
11226
|
keepFieldsRef: true,
|
|
11287
11227
|
...control._options.resetOptions
|
|
11288
11228
|
});
|
|
11289
|
-
if (!((_a2 = control._options.resetOptions) === null || _a2 === void 0 ? void 0 : _a2.keepIsValid)) {
|
|
11290
|
-
control._setValid();
|
|
11291
|
-
}
|
|
11292
11229
|
_values.current = props2.values;
|
|
11293
11230
|
updateFormState((state) => ({ ...state }));
|
|
11294
11231
|
} else {
|
|
@@ -11323,7 +11260,7 @@ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
|
11323
11260
|
var EVENT_OPTIONS$1 = { bubbles: false, cancelable: true };
|
|
11324
11261
|
var GROUP_NAME$5 = "RovingFocusGroup";
|
|
11325
11262
|
var [Collection$5, useCollection$5, createCollectionScope$5] = createCollection(GROUP_NAME$5);
|
|
11326
|
-
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope
|
|
11263
|
+
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
11327
11264
|
GROUP_NAME$5,
|
|
11328
11265
|
[createCollectionScope$5]
|
|
11329
11266
|
);
|
|
@@ -11390,7 +11327,7 @@ var RovingFocusGroupImpl = React.forwardRef((props2, forwardedRef) => {
|
|
|
11390
11327
|
[]
|
|
11391
11328
|
),
|
|
11392
11329
|
children: /* @__PURE__ */ jsx(
|
|
11393
|
-
Primitive
|
|
11330
|
+
Primitive.div,
|
|
11394
11331
|
{
|
|
11395
11332
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
11396
11333
|
"data-orientation": orientation,
|
|
@@ -11455,7 +11392,7 @@ var RovingFocusGroupItem = React.forwardRef(
|
|
|
11455
11392
|
focusable,
|
|
11456
11393
|
active,
|
|
11457
11394
|
children: /* @__PURE__ */ jsx(
|
|
11458
|
-
Primitive
|
|
11395
|
+
Primitive.span,
|
|
11459
11396
|
{
|
|
11460
11397
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
11461
11398
|
"data-orientation": context.orientation,
|
|
@@ -11529,7 +11466,7 @@ function wrapArray$3(array2, startIndex) {
|
|
|
11529
11466
|
var Root$e = RovingFocusGroup;
|
|
11530
11467
|
var Item$2 = RovingFocusGroupItem;
|
|
11531
11468
|
var TABS_NAME = "Tabs";
|
|
11532
|
-
var [createTabsContext] = createContextScope
|
|
11469
|
+
var [createTabsContext] = createContextScope(TABS_NAME, [
|
|
11533
11470
|
createRovingFocusGroupScope
|
|
11534
11471
|
]);
|
|
11535
11472
|
var useRovingFocusGroupScope$4 = createRovingFocusGroupScope();
|
|
@@ -11564,7 +11501,7 @@ var Tabs$1 = React.forwardRef(
|
|
|
11564
11501
|
dir: direction,
|
|
11565
11502
|
activationMode,
|
|
11566
11503
|
children: /* @__PURE__ */ jsx(
|
|
11567
|
-
Primitive
|
|
11504
|
+
Primitive.div,
|
|
11568
11505
|
{
|
|
11569
11506
|
dir: direction,
|
|
11570
11507
|
"data-orientation": orientation,
|
|
@@ -11592,7 +11529,7 @@ var TabsList$1 = React.forwardRef(
|
|
|
11592
11529
|
dir: context.dir,
|
|
11593
11530
|
loop,
|
|
11594
11531
|
children: /* @__PURE__ */ jsx(
|
|
11595
|
-
Primitive
|
|
11532
|
+
Primitive.div,
|
|
11596
11533
|
{
|
|
11597
11534
|
role: "tablist",
|
|
11598
11535
|
"aria-orientation": context.orientation,
|
|
@@ -11622,7 +11559,7 @@ var TabsTrigger$1 = React.forwardRef(
|
|
|
11622
11559
|
focusable: !disabled,
|
|
11623
11560
|
active: isSelected,
|
|
11624
11561
|
children: /* @__PURE__ */ jsx(
|
|
11625
|
-
Primitive
|
|
11562
|
+
Primitive.button,
|
|
11626
11563
|
{
|
|
11627
11564
|
type: "button",
|
|
11628
11565
|
role: "tab",
|
|
@@ -11671,7 +11608,7 @@ var TabsContent$1 = React.forwardRef(
|
|
|
11671
11608
|
return () => cancelAnimationFrame(rAF);
|
|
11672
11609
|
}, []);
|
|
11673
11610
|
return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(
|
|
11674
|
-
Primitive
|
|
11611
|
+
Primitive.div,
|
|
11675
11612
|
{
|
|
11676
11613
|
"data-state": isSelected ? "active" : "inactive",
|
|
11677
11614
|
"data-orientation": context.orientation,
|
|
@@ -11839,135 +11776,6 @@ function CardFooter({ className, ...props2 }) {
|
|
|
11839
11776
|
}
|
|
11840
11777
|
);
|
|
11841
11778
|
}
|
|
11842
|
-
var REACT_LAZY_TYPE$5 = Symbol.for("react.lazy");
|
|
11843
|
-
var use$5 = React[" use ".trim().toString()];
|
|
11844
|
-
function isPromiseLike$5(value) {
|
|
11845
|
-
return typeof value === "object" && value !== null && "then" in value;
|
|
11846
|
-
}
|
|
11847
|
-
function isLazyComponent$5(element) {
|
|
11848
|
-
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$5 && "_payload" in element && isPromiseLike$5(element._payload);
|
|
11849
|
-
}
|
|
11850
|
-
// @__NO_SIDE_EFFECTS__
|
|
11851
|
-
function createSlot$5(ownerName) {
|
|
11852
|
-
const SlotClone = /* @__PURE__ */ createSlotClone$5(ownerName);
|
|
11853
|
-
const Slot2 = React.forwardRef((props2, forwardedRef) => {
|
|
11854
|
-
let { children, ...slotProps } = props2;
|
|
11855
|
-
if (isLazyComponent$5(children) && typeof use$5 === "function") {
|
|
11856
|
-
children = use$5(children._payload);
|
|
11857
|
-
}
|
|
11858
|
-
const childrenArray = React.Children.toArray(children);
|
|
11859
|
-
const slottable = childrenArray.find(isSlottable$5);
|
|
11860
|
-
if (slottable) {
|
|
11861
|
-
const newElement = slottable.props.children;
|
|
11862
|
-
const newChildren = childrenArray.map((child) => {
|
|
11863
|
-
if (child === slottable) {
|
|
11864
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
11865
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
11866
|
-
} else {
|
|
11867
|
-
return child;
|
|
11868
|
-
}
|
|
11869
|
-
});
|
|
11870
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
11871
|
-
}
|
|
11872
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
11873
|
-
});
|
|
11874
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
11875
|
-
return Slot2;
|
|
11876
|
-
}
|
|
11877
|
-
// @__NO_SIDE_EFFECTS__
|
|
11878
|
-
function createSlotClone$5(ownerName) {
|
|
11879
|
-
const SlotClone = React.forwardRef((props2, forwardedRef) => {
|
|
11880
|
-
let { children, ...slotProps } = props2;
|
|
11881
|
-
if (isLazyComponent$5(children) && typeof use$5 === "function") {
|
|
11882
|
-
children = use$5(children._payload);
|
|
11883
|
-
}
|
|
11884
|
-
if (React.isValidElement(children)) {
|
|
11885
|
-
const childrenRef = getElementRef$5(children);
|
|
11886
|
-
const props22 = mergeProps$5(slotProps, children.props);
|
|
11887
|
-
if (children.type !== React.Fragment) {
|
|
11888
|
-
props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
|
|
11889
|
-
}
|
|
11890
|
-
return React.cloneElement(children, props22);
|
|
11891
|
-
}
|
|
11892
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
11893
|
-
});
|
|
11894
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
11895
|
-
return SlotClone;
|
|
11896
|
-
}
|
|
11897
|
-
var SLOTTABLE_IDENTIFIER$5 = Symbol("radix.slottable");
|
|
11898
|
-
function isSlottable$5(child) {
|
|
11899
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$5;
|
|
11900
|
-
}
|
|
11901
|
-
function mergeProps$5(slotProps, childProps) {
|
|
11902
|
-
const overrideProps = { ...childProps };
|
|
11903
|
-
for (const propName in childProps) {
|
|
11904
|
-
const slotPropValue = slotProps[propName];
|
|
11905
|
-
const childPropValue = childProps[propName];
|
|
11906
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
11907
|
-
if (isHandler) {
|
|
11908
|
-
if (slotPropValue && childPropValue) {
|
|
11909
|
-
overrideProps[propName] = (...args) => {
|
|
11910
|
-
const result = childPropValue(...args);
|
|
11911
|
-
slotPropValue(...args);
|
|
11912
|
-
return result;
|
|
11913
|
-
};
|
|
11914
|
-
} else if (slotPropValue) {
|
|
11915
|
-
overrideProps[propName] = slotPropValue;
|
|
11916
|
-
}
|
|
11917
|
-
} else if (propName === "style") {
|
|
11918
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
11919
|
-
} else if (propName === "className") {
|
|
11920
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
11921
|
-
}
|
|
11922
|
-
}
|
|
11923
|
-
return { ...slotProps, ...overrideProps };
|
|
11924
|
-
}
|
|
11925
|
-
function getElementRef$5(element) {
|
|
11926
|
-
var _a2, _b;
|
|
11927
|
-
let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
|
|
11928
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
11929
|
-
if (mayWarn) {
|
|
11930
|
-
return element.ref;
|
|
11931
|
-
}
|
|
11932
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
11933
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
11934
|
-
if (mayWarn) {
|
|
11935
|
-
return element.props.ref;
|
|
11936
|
-
}
|
|
11937
|
-
return element.props.ref || element.ref;
|
|
11938
|
-
}
|
|
11939
|
-
var NODES$5 = [
|
|
11940
|
-
"a",
|
|
11941
|
-
"button",
|
|
11942
|
-
"div",
|
|
11943
|
-
"form",
|
|
11944
|
-
"h2",
|
|
11945
|
-
"h3",
|
|
11946
|
-
"img",
|
|
11947
|
-
"input",
|
|
11948
|
-
"label",
|
|
11949
|
-
"li",
|
|
11950
|
-
"nav",
|
|
11951
|
-
"ol",
|
|
11952
|
-
"p",
|
|
11953
|
-
"select",
|
|
11954
|
-
"span",
|
|
11955
|
-
"svg",
|
|
11956
|
-
"ul"
|
|
11957
|
-
];
|
|
11958
|
-
var Primitive$5 = NODES$5.reduce((primitive, node) => {
|
|
11959
|
-
const Slot2 = /* @__PURE__ */ createSlot$5(`Primitive.${node}`);
|
|
11960
|
-
const Node2 = React.forwardRef((props2, forwardedRef) => {
|
|
11961
|
-
const { asChild, ...primitiveProps } = props2;
|
|
11962
|
-
const Comp = asChild ? Slot2 : node;
|
|
11963
|
-
if (typeof window !== "undefined") {
|
|
11964
|
-
window[Symbol.for("radix-ui")] = true;
|
|
11965
|
-
}
|
|
11966
|
-
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
11967
|
-
});
|
|
11968
|
-
Node2.displayName = `Primitive.${node}`;
|
|
11969
|
-
return { ...primitive, [node]: Node2 };
|
|
11970
|
-
}, {});
|
|
11971
11779
|
var NAME$5 = "Separator";
|
|
11972
11780
|
var DEFAULT_ORIENTATION = "horizontal";
|
|
11973
11781
|
var ORIENTATIONS = ["horizontal", "vertical"];
|
|
@@ -11977,7 +11785,7 @@ var Separator$3 = React.forwardRef((props2, forwardedRef) => {
|
|
|
11977
11785
|
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
|
11978
11786
|
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
|
11979
11787
|
return /* @__PURE__ */ jsx(
|
|
11980
|
-
Primitive
|
|
11788
|
+
Primitive.div,
|
|
11981
11789
|
{
|
|
11982
11790
|
"data-orientation": orientation,
|
|
11983
11791
|
...semanticProps,
|
|
@@ -12378,139 +12186,10 @@ function SectionBuilder({
|
|
|
12378
12186
|
section.id
|
|
12379
12187
|
)) });
|
|
12380
12188
|
}
|
|
12381
|
-
var REACT_LAZY_TYPE$4 = Symbol.for("react.lazy");
|
|
12382
|
-
var use$4 = React[" use ".trim().toString()];
|
|
12383
|
-
function isPromiseLike$4(value) {
|
|
12384
|
-
return typeof value === "object" && value !== null && "then" in value;
|
|
12385
|
-
}
|
|
12386
|
-
function isLazyComponent$4(element) {
|
|
12387
|
-
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$4 && "_payload" in element && isPromiseLike$4(element._payload);
|
|
12388
|
-
}
|
|
12389
|
-
// @__NO_SIDE_EFFECTS__
|
|
12390
|
-
function createSlot$4(ownerName) {
|
|
12391
|
-
const SlotClone = /* @__PURE__ */ createSlotClone$4(ownerName);
|
|
12392
|
-
const Slot2 = React.forwardRef((props2, forwardedRef) => {
|
|
12393
|
-
let { children, ...slotProps } = props2;
|
|
12394
|
-
if (isLazyComponent$4(children) && typeof use$4 === "function") {
|
|
12395
|
-
children = use$4(children._payload);
|
|
12396
|
-
}
|
|
12397
|
-
const childrenArray = React.Children.toArray(children);
|
|
12398
|
-
const slottable = childrenArray.find(isSlottable$4);
|
|
12399
|
-
if (slottable) {
|
|
12400
|
-
const newElement = slottable.props.children;
|
|
12401
|
-
const newChildren = childrenArray.map((child) => {
|
|
12402
|
-
if (child === slottable) {
|
|
12403
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
12404
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
12405
|
-
} else {
|
|
12406
|
-
return child;
|
|
12407
|
-
}
|
|
12408
|
-
});
|
|
12409
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
12410
|
-
}
|
|
12411
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
12412
|
-
});
|
|
12413
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
12414
|
-
return Slot2;
|
|
12415
|
-
}
|
|
12416
|
-
// @__NO_SIDE_EFFECTS__
|
|
12417
|
-
function createSlotClone$4(ownerName) {
|
|
12418
|
-
const SlotClone = React.forwardRef((props2, forwardedRef) => {
|
|
12419
|
-
let { children, ...slotProps } = props2;
|
|
12420
|
-
if (isLazyComponent$4(children) && typeof use$4 === "function") {
|
|
12421
|
-
children = use$4(children._payload);
|
|
12422
|
-
}
|
|
12423
|
-
if (React.isValidElement(children)) {
|
|
12424
|
-
const childrenRef = getElementRef$4(children);
|
|
12425
|
-
const props22 = mergeProps$4(slotProps, children.props);
|
|
12426
|
-
if (children.type !== React.Fragment) {
|
|
12427
|
-
props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
|
|
12428
|
-
}
|
|
12429
|
-
return React.cloneElement(children, props22);
|
|
12430
|
-
}
|
|
12431
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
12432
|
-
});
|
|
12433
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
12434
|
-
return SlotClone;
|
|
12435
|
-
}
|
|
12436
|
-
var SLOTTABLE_IDENTIFIER$4 = Symbol("radix.slottable");
|
|
12437
|
-
function isSlottable$4(child) {
|
|
12438
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$4;
|
|
12439
|
-
}
|
|
12440
|
-
function mergeProps$4(slotProps, childProps) {
|
|
12441
|
-
const overrideProps = { ...childProps };
|
|
12442
|
-
for (const propName in childProps) {
|
|
12443
|
-
const slotPropValue = slotProps[propName];
|
|
12444
|
-
const childPropValue = childProps[propName];
|
|
12445
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
12446
|
-
if (isHandler) {
|
|
12447
|
-
if (slotPropValue && childPropValue) {
|
|
12448
|
-
overrideProps[propName] = (...args) => {
|
|
12449
|
-
const result = childPropValue(...args);
|
|
12450
|
-
slotPropValue(...args);
|
|
12451
|
-
return result;
|
|
12452
|
-
};
|
|
12453
|
-
} else if (slotPropValue) {
|
|
12454
|
-
overrideProps[propName] = slotPropValue;
|
|
12455
|
-
}
|
|
12456
|
-
} else if (propName === "style") {
|
|
12457
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
12458
|
-
} else if (propName === "className") {
|
|
12459
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
12460
|
-
}
|
|
12461
|
-
}
|
|
12462
|
-
return { ...slotProps, ...overrideProps };
|
|
12463
|
-
}
|
|
12464
|
-
function getElementRef$4(element) {
|
|
12465
|
-
var _a2, _b;
|
|
12466
|
-
let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
|
|
12467
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
12468
|
-
if (mayWarn) {
|
|
12469
|
-
return element.ref;
|
|
12470
|
-
}
|
|
12471
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
12472
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
12473
|
-
if (mayWarn) {
|
|
12474
|
-
return element.props.ref;
|
|
12475
|
-
}
|
|
12476
|
-
return element.props.ref || element.ref;
|
|
12477
|
-
}
|
|
12478
|
-
var NODES$4 = [
|
|
12479
|
-
"a",
|
|
12480
|
-
"button",
|
|
12481
|
-
"div",
|
|
12482
|
-
"form",
|
|
12483
|
-
"h2",
|
|
12484
|
-
"h3",
|
|
12485
|
-
"img",
|
|
12486
|
-
"input",
|
|
12487
|
-
"label",
|
|
12488
|
-
"li",
|
|
12489
|
-
"nav",
|
|
12490
|
-
"ol",
|
|
12491
|
-
"p",
|
|
12492
|
-
"select",
|
|
12493
|
-
"span",
|
|
12494
|
-
"svg",
|
|
12495
|
-
"ul"
|
|
12496
|
-
];
|
|
12497
|
-
var Primitive$4 = NODES$4.reduce((primitive, node) => {
|
|
12498
|
-
const Slot2 = /* @__PURE__ */ createSlot$4(`Primitive.${node}`);
|
|
12499
|
-
const Node2 = React.forwardRef((props2, forwardedRef) => {
|
|
12500
|
-
const { asChild, ...primitiveProps } = props2;
|
|
12501
|
-
const Comp = asChild ? Slot2 : node;
|
|
12502
|
-
if (typeof window !== "undefined") {
|
|
12503
|
-
window[Symbol.for("radix-ui")] = true;
|
|
12504
|
-
}
|
|
12505
|
-
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
12506
|
-
});
|
|
12507
|
-
Node2.displayName = `Primitive.${node}`;
|
|
12508
|
-
return { ...primitive, [node]: Node2 };
|
|
12509
|
-
}, {});
|
|
12510
12189
|
var NAME$4 = "Label";
|
|
12511
12190
|
var Label$3 = React.forwardRef((props2, forwardedRef) => {
|
|
12512
12191
|
return /* @__PURE__ */ jsx(
|
|
12513
|
-
Primitive
|
|
12192
|
+
Primitive.label,
|
|
12514
12193
|
{
|
|
12515
12194
|
...props2,
|
|
12516
12195
|
ref: forwardedRef,
|
|
@@ -15093,32 +14772,28 @@ var useElementIds = "useId" in React__default ? function useElementIds2(_ref) {
|
|
|
15093
14772
|
if (!id) {
|
|
15094
14773
|
id = reactId;
|
|
15095
14774
|
}
|
|
15096
|
-
var
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
}, [getItemId, id, inputId, labelId, menuId, toggleButtonId]);
|
|
15107
|
-
return elementIds;
|
|
14775
|
+
var elementIdsRef = useRef({
|
|
14776
|
+
labelId: labelId || id + "-label",
|
|
14777
|
+
menuId: menuId || id + "-menu",
|
|
14778
|
+
getItemId: getItemId || function(index2) {
|
|
14779
|
+
return id + "-item-" + index2;
|
|
14780
|
+
},
|
|
14781
|
+
toggleButtonId: toggleButtonId || id + "-toggle-button",
|
|
14782
|
+
inputId: inputId || id + "-input"
|
|
14783
|
+
});
|
|
14784
|
+
return elementIdsRef.current;
|
|
15108
14785
|
} : function useElementIds3(_ref2) {
|
|
15109
14786
|
var _ref2$id = _ref2.id, id = _ref2$id === void 0 ? "downshift-" + generateId() : _ref2$id, labelId = _ref2.labelId, menuId = _ref2.menuId, getItemId = _ref2.getItemId, toggleButtonId = _ref2.toggleButtonId, inputId = _ref2.inputId;
|
|
15110
|
-
var
|
|
15111
|
-
|
|
15112
|
-
|
|
15113
|
-
|
|
15114
|
-
|
|
15115
|
-
|
|
15116
|
-
|
|
15117
|
-
|
|
15118
|
-
|
|
15119
|
-
|
|
15120
|
-
}, [getItemId, id, inputId, labelId, menuId, toggleButtonId]);
|
|
15121
|
-
return elementIds;
|
|
14787
|
+
var elementIdsRef = useRef({
|
|
14788
|
+
labelId: labelId || id + "-label",
|
|
14789
|
+
menuId: menuId || id + "-menu",
|
|
14790
|
+
getItemId: getItemId || function(index2) {
|
|
14791
|
+
return id + "-item-" + index2;
|
|
14792
|
+
},
|
|
14793
|
+
toggleButtonId: toggleButtonId || id + "-toggle-button",
|
|
14794
|
+
inputId: inputId || id + "-input"
|
|
14795
|
+
});
|
|
14796
|
+
return elementIdsRef.current;
|
|
15122
14797
|
};
|
|
15123
14798
|
function getItemAndIndex(itemProp, indexProp, items, errorMessage) {
|
|
15124
14799
|
var item, index2;
|
|
@@ -15255,22 +14930,20 @@ function useMouseAndTouchTracker(environment, handleBlur, downshiftElementsRefs)
|
|
|
15255
14930
|
isTouchMove: false,
|
|
15256
14931
|
isTouchEnd: false
|
|
15257
14932
|
});
|
|
15258
|
-
function getDownshiftElements() {
|
|
15259
|
-
return downshiftElementsRefs.map(function(ref) {
|
|
15260
|
-
return ref.current;
|
|
15261
|
-
});
|
|
15262
|
-
}
|
|
15263
14933
|
useEffect(function() {
|
|
15264
14934
|
if (!environment) {
|
|
15265
14935
|
return noop$3;
|
|
15266
14936
|
}
|
|
14937
|
+
var downshiftElements = downshiftElementsRefs.map(function(ref) {
|
|
14938
|
+
return ref.current;
|
|
14939
|
+
});
|
|
15267
14940
|
function onMouseDown() {
|
|
15268
14941
|
mouseAndTouchTrackersRef.current.isTouchEnd = false;
|
|
15269
14942
|
mouseAndTouchTrackersRef.current.isMouseDown = true;
|
|
15270
14943
|
}
|
|
15271
14944
|
function onMouseUp(event) {
|
|
15272
14945
|
mouseAndTouchTrackersRef.current.isMouseDown = false;
|
|
15273
|
-
if (!targetWithinDownshift(event.target,
|
|
14946
|
+
if (!targetWithinDownshift(event.target, downshiftElements, environment)) {
|
|
15274
14947
|
handleBlur();
|
|
15275
14948
|
}
|
|
15276
14949
|
}
|
|
@@ -15283,7 +14956,7 @@ function useMouseAndTouchTracker(environment, handleBlur, downshiftElementsRefs)
|
|
|
15283
14956
|
}
|
|
15284
14957
|
function onTouchEnd(event) {
|
|
15285
14958
|
mouseAndTouchTrackersRef.current.isTouchEnd = true;
|
|
15286
|
-
if (!mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target,
|
|
14959
|
+
if (!mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, downshiftElements, environment, false)) {
|
|
15287
14960
|
handleBlur();
|
|
15288
14961
|
}
|
|
15289
14962
|
}
|
|
@@ -15822,13 +15495,9 @@ function useCombobox(userProps) {
|
|
|
15822
15495
|
selectItem: false
|
|
15823
15496
|
});
|
|
15824
15497
|
}
|
|
15825
|
-
}, [dispatch, latest]), useMemo(
|
|
15826
|
-
|
|
15827
|
-
|
|
15828
|
-
},
|
|
15829
|
-
// dependencies can be left empty because refs are getting mutated
|
|
15830
|
-
[]
|
|
15831
|
-
));
|
|
15498
|
+
}, [dispatch, latest]), useMemo(function() {
|
|
15499
|
+
return [menuRef, toggleButtonRef, inputRef];
|
|
15500
|
+
}, [menuRef.current, toggleButtonRef.current, inputRef.current]));
|
|
15832
15501
|
var setGetterPropCallInfo = useGetterPropsCalledChecker("getInputProps", "getMenuProps");
|
|
15833
15502
|
useEffect(function() {
|
|
15834
15503
|
if (!isOpen) {
|
|
@@ -16327,7 +15996,7 @@ var DismissableLayer = React.forwardRef(
|
|
|
16327
15996
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
16328
15997
|
}, []);
|
|
16329
15998
|
return /* @__PURE__ */ jsx(
|
|
16330
|
-
Primitive
|
|
15999
|
+
Primitive.div,
|
|
16331
16000
|
{
|
|
16332
16001
|
...layerProps,
|
|
16333
16002
|
ref: composedRefs,
|
|
@@ -16360,7 +16029,7 @@ var DismissableLayerBranch = React.forwardRef((props2, forwardedRef) => {
|
|
|
16360
16029
|
};
|
|
16361
16030
|
}
|
|
16362
16031
|
}, [context.branches]);
|
|
16363
|
-
return /* @__PURE__ */ jsx(Primitive
|
|
16032
|
+
return /* @__PURE__ */ jsx(Primitive.div, { ...props2, ref: composedRefs });
|
|
16364
16033
|
});
|
|
16365
16034
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
16366
16035
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
@@ -16582,7 +16251,7 @@ var FocusScope = React.forwardRef((props2, forwardedRef) => {
|
|
|
16582
16251
|
},
|
|
16583
16252
|
[loop, trapped, focusScope.paused]
|
|
16584
16253
|
);
|
|
16585
|
-
return /* @__PURE__ */ jsx(Primitive
|
|
16254
|
+
return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
16586
16255
|
});
|
|
16587
16256
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
16588
16257
|
function focusFirst$2(candidates, { select = false } = {}) {
|
|
@@ -18546,7 +18215,7 @@ var NAME$3 = "Arrow";
|
|
|
18546
18215
|
var Arrow$1 = React.forwardRef((props2, forwardedRef) => {
|
|
18547
18216
|
const { children, width = 10, height = 5, ...arrowProps } = props2;
|
|
18548
18217
|
return /* @__PURE__ */ jsx(
|
|
18549
|
-
Primitive
|
|
18218
|
+
Primitive.svg,
|
|
18550
18219
|
{
|
|
18551
18220
|
...arrowProps,
|
|
18552
18221
|
ref: forwardedRef,
|
|
@@ -18561,7 +18230,7 @@ var Arrow$1 = React.forwardRef((props2, forwardedRef) => {
|
|
|
18561
18230
|
Arrow$1.displayName = NAME$3;
|
|
18562
18231
|
var Root$b = Arrow$1;
|
|
18563
18232
|
var POPPER_NAME = "Popper";
|
|
18564
|
-
var [createPopperContext, createPopperScope] = createContextScope
|
|
18233
|
+
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
18565
18234
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
18566
18235
|
var Popper = (props2) => {
|
|
18567
18236
|
const { __scopePopper, children } = props2;
|
|
@@ -18584,7 +18253,7 @@ var PopperAnchor = React.forwardRef(
|
|
|
18584
18253
|
context.onAnchorChange(anchorRef.current);
|
|
18585
18254
|
}
|
|
18586
18255
|
});
|
|
18587
|
-
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive
|
|
18256
|
+
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
18588
18257
|
}
|
|
18589
18258
|
);
|
|
18590
18259
|
PopperAnchor.displayName = ANCHOR_NAME$2;
|
|
@@ -18712,7 +18381,7 @@ var PopperContent = React.forwardRef(
|
|
|
18712
18381
|
arrowY,
|
|
18713
18382
|
shouldHideArrow: cannotCenterArrow,
|
|
18714
18383
|
children: /* @__PURE__ */ jsx(
|
|
18715
|
-
Primitive
|
|
18384
|
+
Primitive.div,
|
|
18716
18385
|
{
|
|
18717
18386
|
"data-side": placedSide,
|
|
18718
18387
|
"data-align": placedAlign,
|
|
@@ -18838,7 +18507,7 @@ var Portal$7 = React.forwardRef((props2, forwardedRef) => {
|
|
|
18838
18507
|
const [mounted, setMounted] = React.useState(false);
|
|
18839
18508
|
useLayoutEffect2(() => setMounted(true), []);
|
|
18840
18509
|
const container = containerProp || mounted && ((_a2 = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a2.body);
|
|
18841
|
-
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive
|
|
18510
|
+
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
18842
18511
|
});
|
|
18843
18512
|
Portal$7.displayName = PORTAL_NAME$a;
|
|
18844
18513
|
var getDefaultParent = function(originalTarget) {
|
|
@@ -19469,12 +19138,6 @@ function RemoveScrollSideCar(props2) {
|
|
|
19469
19138
|
if ("touches" in event && moveDirection === "h" && target.type === "range") {
|
|
19470
19139
|
return false;
|
|
19471
19140
|
}
|
|
19472
|
-
var selection = window.getSelection();
|
|
19473
|
-
var anchorNode = selection && selection.anchorNode;
|
|
19474
|
-
var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
|
|
19475
|
-
if (isTouchingSelection) {
|
|
19476
|
-
return false;
|
|
19477
|
-
}
|
|
19478
19141
|
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
19479
19142
|
if (!canBeScrolledInMainDirection) {
|
|
19480
19143
|
return true;
|
|
@@ -19587,7 +19250,7 @@ var ReactRemoveScroll = React.forwardRef(function(props2, ref) {
|
|
|
19587
19250
|
});
|
|
19588
19251
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
19589
19252
|
var POPOVER_NAME = "Popover";
|
|
19590
|
-
var [createPopoverContext] = createContextScope
|
|
19253
|
+
var [createPopoverContext] = createContextScope(POPOVER_NAME, [
|
|
19591
19254
|
createPopperScope
|
|
19592
19255
|
]);
|
|
19593
19256
|
var usePopperScope$4 = createPopperScope();
|
|
@@ -19651,7 +19314,7 @@ var PopoverTrigger$1 = React.forwardRef(
|
|
|
19651
19314
|
const popperScope = usePopperScope$4(__scopePopover);
|
|
19652
19315
|
const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
|
|
19653
19316
|
const trigger = /* @__PURE__ */ jsx(
|
|
19654
|
-
Primitive
|
|
19317
|
+
Primitive.button,
|
|
19655
19318
|
{
|
|
19656
19319
|
type: "button",
|
|
19657
19320
|
"aria-haspopup": "dialog",
|
|
@@ -19687,7 +19350,7 @@ var PopoverContent$1 = React.forwardRef(
|
|
|
19687
19350
|
}
|
|
19688
19351
|
);
|
|
19689
19352
|
PopoverContent$1.displayName = CONTENT_NAME$a;
|
|
19690
|
-
var Slot$3 = /* @__PURE__ */ createSlot$
|
|
19353
|
+
var Slot$3 = /* @__PURE__ */ createSlot$1("PopoverContent.RemoveScroll");
|
|
19691
19354
|
var PopoverContentModal = React.forwardRef(
|
|
19692
19355
|
(props2, forwardedRef) => {
|
|
19693
19356
|
const context = usePopoverContext(CONTENT_NAME$a, props2.__scopePopover);
|
|
@@ -19840,7 +19503,7 @@ var PopoverClose = React.forwardRef(
|
|
|
19840
19503
|
const { __scopePopover, ...closeProps } = props2;
|
|
19841
19504
|
const context = usePopoverContext(CLOSE_NAME$1, __scopePopover);
|
|
19842
19505
|
return /* @__PURE__ */ jsx(
|
|
19843
|
-
Primitive
|
|
19506
|
+
Primitive.button,
|
|
19844
19507
|
{
|
|
19845
19508
|
type: "button",
|
|
19846
19509
|
...closeProps,
|
|
@@ -20546,7 +20209,7 @@ var NAME$2 = "VisuallyHidden";
|
|
|
20546
20209
|
var VisuallyHidden = React.forwardRef(
|
|
20547
20210
|
(props2, forwardedRef) => {
|
|
20548
20211
|
return /* @__PURE__ */ jsx(
|
|
20549
|
-
Primitive
|
|
20212
|
+
Primitive.span,
|
|
20550
20213
|
{
|
|
20551
20214
|
...props2,
|
|
20552
20215
|
ref: forwardedRef,
|
|
@@ -20561,7 +20224,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
|
20561
20224
|
var SELECTION_KEYS$1 = [" ", "Enter"];
|
|
20562
20225
|
var SELECT_NAME = "Select";
|
|
20563
20226
|
var [Collection$4, useCollection$4, createCollectionScope$4] = createCollection(SELECT_NAME);
|
|
20564
|
-
var [createSelectContext] = createContextScope
|
|
20227
|
+
var [createSelectContext] = createContextScope(SELECT_NAME, [
|
|
20565
20228
|
createCollectionScope$4,
|
|
20566
20229
|
createPopperScope
|
|
20567
20230
|
]);
|
|
@@ -20698,7 +20361,7 @@ var SelectTrigger$1 = React.forwardRef(
|
|
|
20698
20361
|
}
|
|
20699
20362
|
};
|
|
20700
20363
|
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
20701
|
-
Primitive
|
|
20364
|
+
Primitive.button,
|
|
20702
20365
|
{
|
|
20703
20366
|
type: "button",
|
|
20704
20367
|
role: "combobox",
|
|
@@ -20757,7 +20420,7 @@ var SelectValue$1 = React.forwardRef(
|
|
|
20757
20420
|
onValueNodeHasChildrenChange(hasChildren);
|
|
20758
20421
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
20759
20422
|
return /* @__PURE__ */ jsx(
|
|
20760
|
-
Primitive
|
|
20423
|
+
Primitive.span,
|
|
20761
20424
|
{
|
|
20762
20425
|
...valueProps,
|
|
20763
20426
|
ref: composedRefs,
|
|
@@ -20772,7 +20435,7 @@ var ICON_NAME = "SelectIcon";
|
|
|
20772
20435
|
var SelectIcon = React.forwardRef(
|
|
20773
20436
|
(props2, forwardedRef) => {
|
|
20774
20437
|
const { __scopeSelect, children, ...iconProps } = props2;
|
|
20775
|
-
return /* @__PURE__ */ jsx(Primitive
|
|
20438
|
+
return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
20776
20439
|
}
|
|
20777
20440
|
);
|
|
20778
20441
|
SelectIcon.displayName = ICON_NAME;
|
|
@@ -20803,7 +20466,7 @@ SelectContent$1.displayName = CONTENT_NAME$9;
|
|
|
20803
20466
|
var CONTENT_MARGIN = 10;
|
|
20804
20467
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$9);
|
|
20805
20468
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
20806
|
-
var Slot$2 = /* @__PURE__ */ createSlot$
|
|
20469
|
+
var Slot$2 = /* @__PURE__ */ createSlot$1("SelectContent.RemoveScroll");
|
|
20807
20470
|
var SelectContentImpl = React.forwardRef(
|
|
20808
20471
|
(props2, forwardedRef) => {
|
|
20809
20472
|
const {
|
|
@@ -21183,7 +20846,7 @@ var SelectItemAlignedPosition = React.forwardRef((props2, forwardedRef) => {
|
|
|
21183
20846
|
zIndex: contentZIndex
|
|
21184
20847
|
},
|
|
21185
20848
|
children: /* @__PURE__ */ jsx(
|
|
21186
|
-
Primitive
|
|
20849
|
+
Primitive.div,
|
|
21187
20850
|
{
|
|
21188
20851
|
...popperProps,
|
|
21189
20852
|
ref: composedRefs,
|
|
@@ -21257,7 +20920,7 @@ var SelectViewport = React.forwardRef(
|
|
|
21257
20920
|
}
|
|
21258
20921
|
),
|
|
21259
20922
|
/* @__PURE__ */ jsx(Collection$4.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
|
|
21260
|
-
Primitive
|
|
20923
|
+
Primitive.div,
|
|
21261
20924
|
{
|
|
21262
20925
|
"data-radix-select-viewport": "",
|
|
21263
20926
|
role: "presentation",
|
|
@@ -21312,7 +20975,7 @@ var SelectGroup$1 = React.forwardRef(
|
|
|
21312
20975
|
(props2, forwardedRef) => {
|
|
21313
20976
|
const { __scopeSelect, ...groupProps } = props2;
|
|
21314
20977
|
const groupId = useId$1();
|
|
21315
|
-
return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive
|
|
20978
|
+
return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
21316
20979
|
}
|
|
21317
20980
|
);
|
|
21318
20981
|
SelectGroup$1.displayName = GROUP_NAME$4;
|
|
@@ -21321,7 +20984,7 @@ var SelectLabel$1 = React.forwardRef(
|
|
|
21321
20984
|
(props2, forwardedRef) => {
|
|
21322
20985
|
const { __scopeSelect, ...labelProps } = props2;
|
|
21323
20986
|
const groupContext = useSelectGroupContext(LABEL_NAME$4, __scopeSelect);
|
|
21324
|
-
return /* @__PURE__ */ jsx(Primitive
|
|
20987
|
+
return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
21325
20988
|
}
|
|
21326
20989
|
);
|
|
21327
20990
|
SelectLabel$1.displayName = LABEL_NAME$4;
|
|
@@ -21380,7 +21043,7 @@ var SelectItem$1 = React.forwardRef(
|
|
|
21380
21043
|
disabled,
|
|
21381
21044
|
textValue,
|
|
21382
21045
|
children: /* @__PURE__ */ jsx(
|
|
21383
|
-
Primitive
|
|
21046
|
+
Primitive.div,
|
|
21384
21047
|
{
|
|
21385
21048
|
role: "option",
|
|
21386
21049
|
"aria-labelledby": textId,
|
|
@@ -21463,7 +21126,7 @@ var SelectItemText = React.forwardRef(
|
|
|
21463
21126
|
return () => onNativeOptionRemove(nativeOption);
|
|
21464
21127
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
21465
21128
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21466
|
-
/* @__PURE__ */ jsx(Primitive
|
|
21129
|
+
/* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
21467
21130
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
|
|
21468
21131
|
] });
|
|
21469
21132
|
}
|
|
@@ -21474,7 +21137,7 @@ var SelectItemIndicator = React.forwardRef(
|
|
|
21474
21137
|
(props2, forwardedRef) => {
|
|
21475
21138
|
const { __scopeSelect, ...itemIndicatorProps } = props2;
|
|
21476
21139
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME$1, __scopeSelect);
|
|
21477
|
-
return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive
|
|
21140
|
+
return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
21478
21141
|
}
|
|
21479
21142
|
);
|
|
21480
21143
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME$1;
|
|
@@ -21565,7 +21228,7 @@ var SelectScrollButtonImpl = React.forwardRef((props2, forwardedRef) => {
|
|
|
21565
21228
|
(_a2 = activeItem == null ? void 0 : activeItem.ref.current) == null ? void 0 : _a2.scrollIntoView({ block: "nearest" });
|
|
21566
21229
|
}, [getItems]);
|
|
21567
21230
|
return /* @__PURE__ */ jsx(
|
|
21568
|
-
Primitive
|
|
21231
|
+
Primitive.div,
|
|
21569
21232
|
{
|
|
21570
21233
|
"aria-hidden": true,
|
|
21571
21234
|
...scrollIndicatorProps,
|
|
@@ -21593,7 +21256,7 @@ var SEPARATOR_NAME$4 = "SelectSeparator";
|
|
|
21593
21256
|
var SelectSeparator$1 = React.forwardRef(
|
|
21594
21257
|
(props2, forwardedRef) => {
|
|
21595
21258
|
const { __scopeSelect, ...separatorProps } = props2;
|
|
21596
|
-
return /* @__PURE__ */ jsx(Primitive
|
|
21259
|
+
return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
21597
21260
|
}
|
|
21598
21261
|
);
|
|
21599
21262
|
SelectSeparator$1.displayName = SEPARATOR_NAME$4;
|
|
@@ -21630,7 +21293,7 @@ var SelectBubbleInput = React.forwardRef(
|
|
|
21630
21293
|
}
|
|
21631
21294
|
}, [prevValue, value]);
|
|
21632
21295
|
return /* @__PURE__ */ jsx(
|
|
21633
|
-
Primitive
|
|
21296
|
+
Primitive.select,
|
|
21634
21297
|
{
|
|
21635
21298
|
...props2,
|
|
21636
21299
|
style: { ...VISUALLY_HIDDEN_STYLES, ...props2.style },
|
|
@@ -21951,7 +21614,7 @@ function CheckboxField({
|
|
|
21951
21614
|
] });
|
|
21952
21615
|
}
|
|
21953
21616
|
var SWITCH_NAME = "Switch";
|
|
21954
|
-
var [createSwitchContext] = createContextScope
|
|
21617
|
+
var [createSwitchContext] = createContextScope(SWITCH_NAME);
|
|
21955
21618
|
var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
|
|
21956
21619
|
var Switch$1 = React.forwardRef(
|
|
21957
21620
|
(props2, forwardedRef) => {
|
|
@@ -21979,7 +21642,7 @@ var Switch$1 = React.forwardRef(
|
|
|
21979
21642
|
});
|
|
21980
21643
|
return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
|
|
21981
21644
|
/* @__PURE__ */ jsx(
|
|
21982
|
-
Primitive
|
|
21645
|
+
Primitive.button,
|
|
21983
21646
|
{
|
|
21984
21647
|
type: "button",
|
|
21985
21648
|
role: "switch",
|
|
@@ -22024,7 +21687,7 @@ var SwitchThumb = React.forwardRef(
|
|
|
22024
21687
|
const { __scopeSwitch, ...thumbProps } = props2;
|
|
22025
21688
|
const context = useSwitchContext(THUMB_NAME$2, __scopeSwitch);
|
|
22026
21689
|
return /* @__PURE__ */ jsx(
|
|
22027
|
-
Primitive
|
|
21690
|
+
Primitive.span,
|
|
22028
21691
|
{
|
|
22029
21692
|
"data-state": getState$2(context.checked),
|
|
22030
21693
|
"data-disabled": context.disabled ? "" : void 0,
|
|
@@ -22180,7 +21843,7 @@ function SwitchField({
|
|
|
22180
21843
|
] });
|
|
22181
21844
|
}
|
|
22182
21845
|
var RADIO_NAME = "Radio";
|
|
22183
|
-
var [createRadioContext, createRadioScope] = createContextScope
|
|
21846
|
+
var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);
|
|
22184
21847
|
var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
|
|
22185
21848
|
var Radio = React.forwardRef(
|
|
22186
21849
|
(props2, forwardedRef) => {
|
|
@@ -22201,7 +21864,7 @@ var Radio = React.forwardRef(
|
|
|
22201
21864
|
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
22202
21865
|
return /* @__PURE__ */ jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
|
|
22203
21866
|
/* @__PURE__ */ jsx(
|
|
22204
|
-
Primitive
|
|
21867
|
+
Primitive.button,
|
|
22205
21868
|
{
|
|
22206
21869
|
type: "button",
|
|
22207
21870
|
role: "radio",
|
|
@@ -22245,7 +21908,7 @@ var RadioIndicator = React.forwardRef(
|
|
|
22245
21908
|
const { __scopeRadio, forceMount, ...indicatorProps } = props2;
|
|
22246
21909
|
const context = useRadioContext(INDICATOR_NAME$5, __scopeRadio);
|
|
22247
21910
|
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsx(
|
|
22248
|
-
Primitive
|
|
21911
|
+
Primitive.span,
|
|
22249
21912
|
{
|
|
22250
21913
|
"data-state": getState$1(context.checked),
|
|
22251
21914
|
"data-disabled": context.disabled ? "" : void 0,
|
|
@@ -22285,7 +21948,7 @@ var RadioBubbleInput = React.forwardRef(
|
|
|
22285
21948
|
}
|
|
22286
21949
|
}, [prevChecked, checked, bubbles]);
|
|
22287
21950
|
return /* @__PURE__ */ jsx(
|
|
22288
|
-
Primitive
|
|
21951
|
+
Primitive.input,
|
|
22289
21952
|
{
|
|
22290
21953
|
type: "radio",
|
|
22291
21954
|
"aria-hidden": true,
|
|
@@ -22311,7 +21974,7 @@ function getState$1(checked) {
|
|
|
22311
21974
|
}
|
|
22312
21975
|
var ARROW_KEYS$2 = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
|
22313
21976
|
var RADIO_GROUP_NAME$4 = "RadioGroup";
|
|
22314
|
-
var [createRadioGroupContext] = createContextScope
|
|
21977
|
+
var [createRadioGroupContext] = createContextScope(RADIO_GROUP_NAME$4, [
|
|
22315
21978
|
createRovingFocusGroupScope,
|
|
22316
21979
|
createRadioScope
|
|
22317
21980
|
]);
|
|
@@ -22359,7 +22022,7 @@ var RadioGroup$2 = React.forwardRef(
|
|
|
22359
22022
|
dir: direction,
|
|
22360
22023
|
loop,
|
|
22361
22024
|
children: /* @__PURE__ */ jsx(
|
|
22362
|
-
Primitive
|
|
22025
|
+
Primitive.div,
|
|
22363
22026
|
{
|
|
22364
22027
|
role: "radiogroup",
|
|
22365
22028
|
"aria-required": required2,
|
|
@@ -23510,7 +23173,7 @@ const match = {
|
|
|
23510
23173
|
defaultParseWidth: "any"
|
|
23511
23174
|
})
|
|
23512
23175
|
};
|
|
23513
|
-
const enUS
|
|
23176
|
+
const enUS = {
|
|
23514
23177
|
code: "en-US",
|
|
23515
23178
|
formatDistance,
|
|
23516
23179
|
formatLong,
|
|
@@ -24357,7 +24020,7 @@ const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
24357
24020
|
function format(date2, formatStr, options) {
|
|
24358
24021
|
var _a2, _b, _c, _d, _e2, _f, _g, _h;
|
|
24359
24022
|
const defaultOptions2 = getDefaultOptions();
|
|
24360
|
-
const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS
|
|
24023
|
+
const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS;
|
|
24361
24024
|
const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a2 = options == null ? void 0 : options.locale) == null ? void 0 : _a2.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
|
|
24362
24025
|
const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_f = (_e2 = options == null ? void 0 : options.locale) == null ? void 0 : _e2.options) == null ? void 0 : _f.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_h = (_g = defaultOptions2.locale) == null ? void 0 : _g.options) == null ? void 0 : _h.weekStartsOn) ?? 0;
|
|
24363
24026
|
const originalDate = toDate(date2, options == null ? void 0 : options.in);
|
|
@@ -24495,63 +24158,6 @@ function endOfBroadcastWeek(date2, dateLib) {
|
|
|
24495
24158
|
const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);
|
|
24496
24159
|
return endDate;
|
|
24497
24160
|
}
|
|
24498
|
-
const enUS = {
|
|
24499
|
-
...enUS$1,
|
|
24500
|
-
labels: {
|
|
24501
|
-
labelDayButton: (date2, modifiers, options, dateLib) => {
|
|
24502
|
-
let formatDate;
|
|
24503
|
-
if (dateLib && typeof dateLib.format === "function") {
|
|
24504
|
-
formatDate = dateLib.format.bind(dateLib);
|
|
24505
|
-
} else {
|
|
24506
|
-
formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
|
|
24507
|
-
}
|
|
24508
|
-
let label = formatDate(date2, "PPPP");
|
|
24509
|
-
if (modifiers.today)
|
|
24510
|
-
label = `Today, ${label}`;
|
|
24511
|
-
if (modifiers.selected)
|
|
24512
|
-
label = `${label}, selected`;
|
|
24513
|
-
return label;
|
|
24514
|
-
},
|
|
24515
|
-
labelMonthDropdown: "Choose the Month",
|
|
24516
|
-
labelNext: "Go to the Next Month",
|
|
24517
|
-
labelPrevious: "Go to the Previous Month",
|
|
24518
|
-
labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,
|
|
24519
|
-
labelYearDropdown: "Choose the Year",
|
|
24520
|
-
labelGrid: (date2, options, dateLib) => {
|
|
24521
|
-
let formatDate;
|
|
24522
|
-
if (dateLib && typeof dateLib.format === "function") {
|
|
24523
|
-
formatDate = dateLib.format.bind(dateLib);
|
|
24524
|
-
} else {
|
|
24525
|
-
formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
|
|
24526
|
-
}
|
|
24527
|
-
return formatDate(date2, "LLLL yyyy");
|
|
24528
|
-
},
|
|
24529
|
-
labelGridcell: (date2, modifiers, options, dateLib) => {
|
|
24530
|
-
let formatDate;
|
|
24531
|
-
if (dateLib && typeof dateLib.format === "function") {
|
|
24532
|
-
formatDate = dateLib.format.bind(dateLib);
|
|
24533
|
-
} else {
|
|
24534
|
-
formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
|
|
24535
|
-
}
|
|
24536
|
-
let label = formatDate(date2, "PPPP");
|
|
24537
|
-
if (modifiers == null ? void 0 : modifiers.today) {
|
|
24538
|
-
label = `Today, ${label}`;
|
|
24539
|
-
}
|
|
24540
|
-
return label;
|
|
24541
|
-
},
|
|
24542
|
-
labelNav: "Navigation bar",
|
|
24543
|
-
labelWeekNumberHeader: "Week Number",
|
|
24544
|
-
labelWeekday: (date2, options, dateLib) => {
|
|
24545
|
-
let formatDate;
|
|
24546
|
-
if (dateLib && typeof dateLib.format === "function") {
|
|
24547
|
-
formatDate = dateLib.format.bind(dateLib);
|
|
24548
|
-
} else {
|
|
24549
|
-
formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
|
|
24550
|
-
}
|
|
24551
|
-
return formatDate(date2, "cccc");
|
|
24552
|
-
}
|
|
24553
|
-
}
|
|
24554
|
-
};
|
|
24555
24161
|
class DateLib {
|
|
24556
24162
|
/**
|
|
24557
24163
|
* Creates an instance of `DateLib`.
|
|
@@ -24835,9 +24441,6 @@ class CalendarDay {
|
|
|
24835
24441
|
this.displayMonth = displayMonth;
|
|
24836
24442
|
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date2, displayMonth));
|
|
24837
24443
|
this.dateLib = dateLib;
|
|
24838
|
-
this.isoDate = dateLib.format(date2, "yyyy-MM-dd");
|
|
24839
|
-
this.displayMonthId = dateLib.format(displayMonth, "yyyy-MM");
|
|
24840
|
-
this.dateMonthId = dateLib.format(date2, "yyyy-MM");
|
|
24841
24444
|
}
|
|
24842
24445
|
/**
|
|
24843
24446
|
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
@@ -25148,7 +24751,7 @@ function dateMatchModifiers(date2, matchers, dateLib = defaultDateLib) {
|
|
|
25148
24751
|
return isSameDay2(date2, matcher);
|
|
25149
24752
|
}
|
|
25150
24753
|
if (isDatesArray(matcher, dateLib)) {
|
|
25151
|
-
return matcher.
|
|
24754
|
+
return matcher.includes(date2);
|
|
25152
24755
|
}
|
|
25153
24756
|
if (isDateRange(matcher)) {
|
|
25154
24757
|
return rangeIncludesDate(matcher, date2, false, dateLib);
|
|
@@ -25184,7 +24787,7 @@ function dateMatchModifiers(date2, matchers, dateLib = defaultDateLib) {
|
|
|
25184
24787
|
});
|
|
25185
24788
|
}
|
|
25186
24789
|
function createGetModifiers(days, props2, navStart, navEnd, dateLib) {
|
|
25187
|
-
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today
|
|
24790
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props2;
|
|
25188
24791
|
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
25189
24792
|
const computedNavStart = navStart && startOfMonth2(navStart);
|
|
25190
24793
|
const computedNavEnd = navEnd && endOfMonth2(navEnd);
|
|
@@ -25204,7 +24807,7 @@ function createGetModifiers(days, props2, navStart, navEnd, dateLib) {
|
|
|
25204
24807
|
const isDisabled = Boolean(disabled && dateMatchModifiers(date2, disabled, dateLib));
|
|
25205
24808
|
const isHidden2 = Boolean(hidden && dateMatchModifiers(date2, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
|
|
25206
24809
|
!broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
25207
|
-
const isToday = isSameDay2(date2, today);
|
|
24810
|
+
const isToday = isSameDay2(date2, today ?? dateLib.today());
|
|
25208
24811
|
if (isOutside)
|
|
25209
24812
|
internalModifiersMap.outside.push(day);
|
|
25210
24813
|
if (isDisabled)
|
|
@@ -25352,6 +24955,60 @@ function getFormatters(customFormatters) {
|
|
|
25352
24955
|
...customFormatters
|
|
25353
24956
|
};
|
|
25354
24957
|
}
|
|
24958
|
+
function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
|
|
24959
|
+
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
24960
|
+
const months = eachMonthOfInterval2({
|
|
24961
|
+
start: startOfYear2(displayMonth),
|
|
24962
|
+
end: endOfYear2(displayMonth)
|
|
24963
|
+
});
|
|
24964
|
+
const options = months.map((month) => {
|
|
24965
|
+
const label = formatters2.formatMonthDropdown(month, dateLib);
|
|
24966
|
+
const value = getMonth2(month);
|
|
24967
|
+
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
24968
|
+
return { value, label, disabled };
|
|
24969
|
+
});
|
|
24970
|
+
return options;
|
|
24971
|
+
}
|
|
24972
|
+
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
24973
|
+
let style = { ...styles == null ? void 0 : styles[UI.Day] };
|
|
24974
|
+
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
24975
|
+
style = {
|
|
24976
|
+
...style,
|
|
24977
|
+
...modifiersStyles == null ? void 0 : modifiersStyles[modifier]
|
|
24978
|
+
};
|
|
24979
|
+
});
|
|
24980
|
+
return style;
|
|
24981
|
+
}
|
|
24982
|
+
function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
|
|
24983
|
+
const today = dateLib.today();
|
|
24984
|
+
const start = ISOWeek ? dateLib.startOfISOWeek(today) : dateLib.startOfWeek(today);
|
|
24985
|
+
const days = [];
|
|
24986
|
+
for (let i2 = 0; i2 < 7; i2++) {
|
|
24987
|
+
const day = dateLib.addDays(start, i2);
|
|
24988
|
+
days.push(day);
|
|
24989
|
+
}
|
|
24990
|
+
return days;
|
|
24991
|
+
}
|
|
24992
|
+
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
24993
|
+
if (!navStart)
|
|
24994
|
+
return void 0;
|
|
24995
|
+
if (!navEnd)
|
|
24996
|
+
return void 0;
|
|
24997
|
+
const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
|
|
24998
|
+
const firstNavYear = startOfYear2(navStart);
|
|
24999
|
+
const lastNavYear = endOfYear2(navEnd);
|
|
25000
|
+
const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
|
|
25001
|
+
if (reverse)
|
|
25002
|
+
years.reverse();
|
|
25003
|
+
return years.map((year) => {
|
|
25004
|
+
const label = formatters2.formatYearDropdown(year, dateLib);
|
|
25005
|
+
return {
|
|
25006
|
+
value: getYear2(year),
|
|
25007
|
+
label,
|
|
25008
|
+
disabled: false
|
|
25009
|
+
};
|
|
25010
|
+
});
|
|
25011
|
+
}
|
|
25355
25012
|
function labelDayButton(date2, modifiers, options, dateLib) {
|
|
25356
25013
|
let label = (dateLib ?? new DateLib(options)).format(date2, "PPPP");
|
|
25357
25014
|
if (modifiers.today)
|
|
@@ -25379,9 +25036,8 @@ function labelMonthDropdown(_options) {
|
|
|
25379
25036
|
function labelNav() {
|
|
25380
25037
|
return "";
|
|
25381
25038
|
}
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
return defaultLabel;
|
|
25039
|
+
function labelNext(_month) {
|
|
25040
|
+
return "Go to the Next Month";
|
|
25385
25041
|
}
|
|
25386
25042
|
function labelPrevious(_month) {
|
|
25387
25043
|
return "Go to the Previous Month";
|
|
@@ -25414,87 +25070,6 @@ const defaultLabels = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
|
|
|
25414
25070
|
labelWeekday,
|
|
25415
25071
|
labelYearDropdown
|
|
25416
25072
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
25417
|
-
const resolveLabel = (defaultLabel2, customLabel, localeLabel) => {
|
|
25418
|
-
if (customLabel)
|
|
25419
|
-
return customLabel;
|
|
25420
|
-
if (localeLabel) {
|
|
25421
|
-
return typeof localeLabel === "function" ? localeLabel : (..._args) => localeLabel;
|
|
25422
|
-
}
|
|
25423
|
-
return defaultLabel2;
|
|
25424
|
-
};
|
|
25425
|
-
function getLabels(customLabels, options) {
|
|
25426
|
-
var _a2;
|
|
25427
|
-
const localeLabels = ((_a2 = options.locale) == null ? void 0 : _a2.labels) ?? {};
|
|
25428
|
-
return {
|
|
25429
|
-
...defaultLabels,
|
|
25430
|
-
...customLabels ?? {},
|
|
25431
|
-
labelDayButton: resolveLabel(labelDayButton, customLabels == null ? void 0 : customLabels.labelDayButton, localeLabels.labelDayButton),
|
|
25432
|
-
labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels == null ? void 0 : customLabels.labelMonthDropdown, localeLabels.labelMonthDropdown),
|
|
25433
|
-
labelNext: resolveLabel(labelNext, customLabels == null ? void 0 : customLabels.labelNext, localeLabels.labelNext),
|
|
25434
|
-
labelPrevious: resolveLabel(labelPrevious, customLabels == null ? void 0 : customLabels.labelPrevious, localeLabels.labelPrevious),
|
|
25435
|
-
labelWeekNumber: resolveLabel(labelWeekNumber, customLabels == null ? void 0 : customLabels.labelWeekNumber, localeLabels.labelWeekNumber),
|
|
25436
|
-
labelYearDropdown: resolveLabel(labelYearDropdown, customLabels == null ? void 0 : customLabels.labelYearDropdown, localeLabels.labelYearDropdown),
|
|
25437
|
-
labelGrid: resolveLabel(labelGrid, customLabels == null ? void 0 : customLabels.labelGrid, localeLabels.labelGrid),
|
|
25438
|
-
labelGridcell: resolveLabel(labelGridcell, customLabels == null ? void 0 : customLabels.labelGridcell, localeLabels.labelGridcell),
|
|
25439
|
-
labelNav: resolveLabel(labelNav, customLabels == null ? void 0 : customLabels.labelNav, localeLabels.labelNav),
|
|
25440
|
-
labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels == null ? void 0 : customLabels.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
|
|
25441
|
-
labelWeekday: resolveLabel(labelWeekday, customLabels == null ? void 0 : customLabels.labelWeekday, localeLabels.labelWeekday)
|
|
25442
|
-
};
|
|
25443
|
-
}
|
|
25444
|
-
function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
|
|
25445
|
-
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
25446
|
-
const months = eachMonthOfInterval2({
|
|
25447
|
-
start: startOfYear2(displayMonth),
|
|
25448
|
-
end: endOfYear2(displayMonth)
|
|
25449
|
-
});
|
|
25450
|
-
const options = months.map((month) => {
|
|
25451
|
-
const label = formatters2.formatMonthDropdown(month, dateLib);
|
|
25452
|
-
const value = getMonth2(month);
|
|
25453
|
-
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
25454
|
-
return { value, label, disabled };
|
|
25455
|
-
});
|
|
25456
|
-
return options;
|
|
25457
|
-
}
|
|
25458
|
-
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
25459
|
-
let style = { ...styles == null ? void 0 : styles[UI.Day] };
|
|
25460
|
-
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
25461
|
-
style = {
|
|
25462
|
-
...style,
|
|
25463
|
-
...modifiersStyles == null ? void 0 : modifiersStyles[modifier]
|
|
25464
|
-
};
|
|
25465
|
-
});
|
|
25466
|
-
return style;
|
|
25467
|
-
}
|
|
25468
|
-
function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
|
|
25469
|
-
const referenceToday = today ?? dateLib.today();
|
|
25470
|
-
const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(referenceToday, dateLib) : ISOWeek ? dateLib.startOfISOWeek(referenceToday) : dateLib.startOfWeek(referenceToday);
|
|
25471
|
-
const days = [];
|
|
25472
|
-
for (let i2 = 0; i2 < 7; i2++) {
|
|
25473
|
-
const day = dateLib.addDays(start, i2);
|
|
25474
|
-
days.push(day);
|
|
25475
|
-
}
|
|
25476
|
-
return days;
|
|
25477
|
-
}
|
|
25478
|
-
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
25479
|
-
if (!navStart)
|
|
25480
|
-
return void 0;
|
|
25481
|
-
if (!navEnd)
|
|
25482
|
-
return void 0;
|
|
25483
|
-
const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
|
|
25484
|
-
const firstNavYear = startOfYear2(navStart);
|
|
25485
|
-
const lastNavYear = endOfYear2(navEnd);
|
|
25486
|
-
const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
|
|
25487
|
-
if (reverse)
|
|
25488
|
-
years.reverse();
|
|
25489
|
-
return years.map((year) => {
|
|
25490
|
-
const label = formatters2.formatYearDropdown(year, dateLib);
|
|
25491
|
-
return {
|
|
25492
|
-
value: getYear2(year),
|
|
25493
|
-
label,
|
|
25494
|
-
disabled: false
|
|
25495
|
-
};
|
|
25496
|
-
});
|
|
25497
|
-
}
|
|
25498
25073
|
const asHtmlElement = (element) => {
|
|
25499
25074
|
if (element instanceof HTMLElement)
|
|
25500
25075
|
return element;
|
|
@@ -25624,14 +25199,15 @@ function getDates(displayMonths, maxDate, props2, dateLib) {
|
|
|
25624
25199
|
const { ISOWeek, fixedWeeks, broadcastCalendar } = props2 ?? {};
|
|
25625
25200
|
const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
25626
25201
|
const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
|
|
25627
|
-
const
|
|
25628
|
-
const
|
|
25629
|
-
const gridEndDate = constraintWeekEnd && isAfter2(displayMonthsWeekEnd, constraintWeekEnd) ? constraintWeekEnd : displayMonthsWeekEnd;
|
|
25630
|
-
const nOfDays = differenceInCalendarDays2(gridEndDate, startWeekFirstDate);
|
|
25202
|
+
const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
|
|
25203
|
+
const nOfDays = differenceInCalendarDays2(endWeekLastDate, startWeekFirstDate);
|
|
25631
25204
|
const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
|
|
25632
25205
|
const dates = [];
|
|
25633
25206
|
for (let i2 = 0; i2 <= nOfDays; i2++) {
|
|
25634
25207
|
const date2 = addDays2(startWeekFirstDate, i2);
|
|
25208
|
+
if (maxDate && isAfter2(date2, maxDate)) {
|
|
25209
|
+
break;
|
|
25210
|
+
}
|
|
25635
25211
|
dates.push(date2);
|
|
25636
25212
|
}
|
|
25637
25213
|
const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
|
|
@@ -25798,7 +25374,6 @@ function useControlledValue(defaultValue, controlledValue) {
|
|
|
25798
25374
|
return [value, setValue];
|
|
25799
25375
|
}
|
|
25800
25376
|
function useCalendar(props2, dateLib) {
|
|
25801
|
-
var _a2;
|
|
25802
25377
|
const [navStart, navEnd] = getNavMonths(props2, dateLib);
|
|
25803
25378
|
const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
|
|
25804
25379
|
const initialMonth = getInitialMonth(props2, navStart, navEnd, dateLib);
|
|
@@ -25811,44 +25386,13 @@ function useCalendar(props2, dateLib) {
|
|
|
25811
25386
|
const newInitialMonth = getInitialMonth(props2, navStart, navEnd, dateLib);
|
|
25812
25387
|
setFirstMonth(newInitialMonth);
|
|
25813
25388
|
}, [props2.timeZone]);
|
|
25814
|
-
const
|
|
25815
|
-
|
|
25816
|
-
|
|
25817
|
-
|
|
25818
|
-
|
|
25819
|
-
|
|
25820
|
-
|
|
25821
|
-
const months2 = getMonths(displayMonths, dates, {
|
|
25822
|
-
broadcastCalendar: props2.broadcastCalendar,
|
|
25823
|
-
fixedWeeks: props2.fixedWeeks,
|
|
25824
|
-
ISOWeek: props2.ISOWeek,
|
|
25825
|
-
reverseMonths: props2.reverseMonths
|
|
25826
|
-
}, dateLib);
|
|
25827
|
-
const weeks2 = getWeeks(months2);
|
|
25828
|
-
const days2 = getDays(months2);
|
|
25829
|
-
const previousMonth2 = getPreviousMonth(firstMonth, navStart, props2, dateLib);
|
|
25830
|
-
const nextMonth2 = getNextMonth(firstMonth, navEnd, props2, dateLib);
|
|
25831
|
-
return {
|
|
25832
|
-
months: months2,
|
|
25833
|
-
weeks: weeks2,
|
|
25834
|
-
days: days2,
|
|
25835
|
-
previousMonth: previousMonth2,
|
|
25836
|
-
nextMonth: nextMonth2
|
|
25837
|
-
};
|
|
25838
|
-
}, [
|
|
25839
|
-
dateLib,
|
|
25840
|
-
firstMonth.getTime(),
|
|
25841
|
-
navEnd == null ? void 0 : navEnd.getTime(),
|
|
25842
|
-
navStart == null ? void 0 : navStart.getTime(),
|
|
25843
|
-
props2.disableNavigation,
|
|
25844
|
-
props2.broadcastCalendar,
|
|
25845
|
-
(_a2 = props2.endMonth) == null ? void 0 : _a2.getTime(),
|
|
25846
|
-
props2.fixedWeeks,
|
|
25847
|
-
props2.ISOWeek,
|
|
25848
|
-
props2.numberOfMonths,
|
|
25849
|
-
props2.pagedNavigation,
|
|
25850
|
-
props2.reverseMonths
|
|
25851
|
-
]);
|
|
25389
|
+
const displayMonths = getDisplayMonths(firstMonth, navEnd, props2, dateLib);
|
|
25390
|
+
const dates = getDates(displayMonths, props2.endMonth ? endOfMonth2(props2.endMonth) : void 0, props2, dateLib);
|
|
25391
|
+
const months = getMonths(displayMonths, dates, props2, dateLib);
|
|
25392
|
+
const weeks = getWeeks(months);
|
|
25393
|
+
const days = getDays(months);
|
|
25394
|
+
const previousMonth = getPreviousMonth(firstMonth, navStart, props2, dateLib);
|
|
25395
|
+
const nextMonth = getNextMonth(firstMonth, navEnd, props2, dateLib);
|
|
25852
25396
|
const { disableNavigation, onMonthChange } = props2;
|
|
25853
25397
|
const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));
|
|
25854
25398
|
const goToMonth = (date2) => {
|
|
@@ -26216,104 +25760,38 @@ function useSelection(props2, dateLib) {
|
|
|
26216
25760
|
return void 0;
|
|
26217
25761
|
}
|
|
26218
25762
|
}
|
|
26219
|
-
function toTimeZone(date2, timeZone) {
|
|
26220
|
-
if (date2 instanceof TZDate && date2.timeZone === timeZone) {
|
|
26221
|
-
return date2;
|
|
26222
|
-
}
|
|
26223
|
-
return new TZDate(date2, timeZone);
|
|
26224
|
-
}
|
|
26225
|
-
function convertMatcher(matcher, timeZone) {
|
|
26226
|
-
if (typeof matcher === "boolean" || typeof matcher === "function") {
|
|
26227
|
-
return matcher;
|
|
26228
|
-
}
|
|
26229
|
-
if (matcher instanceof Date) {
|
|
26230
|
-
return toTimeZone(matcher, timeZone);
|
|
26231
|
-
}
|
|
26232
|
-
if (Array.isArray(matcher)) {
|
|
26233
|
-
return matcher.map((value) => value instanceof Date ? toTimeZone(value, timeZone) : value);
|
|
26234
|
-
}
|
|
26235
|
-
if (isDateRange(matcher)) {
|
|
26236
|
-
return {
|
|
26237
|
-
...matcher,
|
|
26238
|
-
from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
|
|
26239
|
-
to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to
|
|
26240
|
-
};
|
|
26241
|
-
}
|
|
26242
|
-
if (isDateInterval(matcher)) {
|
|
26243
|
-
return {
|
|
26244
|
-
before: toTimeZone(matcher.before, timeZone),
|
|
26245
|
-
after: toTimeZone(matcher.after, timeZone)
|
|
26246
|
-
};
|
|
26247
|
-
}
|
|
26248
|
-
if (isDateAfterType(matcher)) {
|
|
26249
|
-
return {
|
|
26250
|
-
after: toTimeZone(matcher.after, timeZone)
|
|
26251
|
-
};
|
|
26252
|
-
}
|
|
26253
|
-
if (isDateBeforeType(matcher)) {
|
|
26254
|
-
return {
|
|
26255
|
-
before: toTimeZone(matcher.before, timeZone)
|
|
26256
|
-
};
|
|
26257
|
-
}
|
|
26258
|
-
return matcher;
|
|
26259
|
-
}
|
|
26260
|
-
function convertMatchersToTimeZone(matchers, timeZone) {
|
|
26261
|
-
if (!matchers) {
|
|
26262
|
-
return matchers;
|
|
26263
|
-
}
|
|
26264
|
-
if (Array.isArray(matchers)) {
|
|
26265
|
-
return matchers.map((matcher) => convertMatcher(matcher, timeZone));
|
|
26266
|
-
}
|
|
26267
|
-
return convertMatcher(matchers, timeZone);
|
|
26268
|
-
}
|
|
26269
25763
|
function DayPicker(initialProps) {
|
|
26270
25764
|
var _a2;
|
|
26271
25765
|
let props2 = initialProps;
|
|
26272
|
-
|
|
26273
|
-
if (timeZone) {
|
|
25766
|
+
if (props2.timeZone) {
|
|
26274
25767
|
props2 = {
|
|
26275
|
-
...initialProps
|
|
26276
|
-
timeZone
|
|
25768
|
+
...initialProps
|
|
26277
25769
|
};
|
|
26278
25770
|
if (props2.today) {
|
|
26279
|
-
props2.today =
|
|
25771
|
+
props2.today = new TZDate(props2.today, props2.timeZone);
|
|
26280
25772
|
}
|
|
26281
25773
|
if (props2.month) {
|
|
26282
|
-
props2.month =
|
|
25774
|
+
props2.month = new TZDate(props2.month, props2.timeZone);
|
|
26283
25775
|
}
|
|
26284
25776
|
if (props2.defaultMonth) {
|
|
26285
|
-
props2.defaultMonth =
|
|
25777
|
+
props2.defaultMonth = new TZDate(props2.defaultMonth, props2.timeZone);
|
|
26286
25778
|
}
|
|
26287
25779
|
if (props2.startMonth) {
|
|
26288
|
-
props2.startMonth =
|
|
25780
|
+
props2.startMonth = new TZDate(props2.startMonth, props2.timeZone);
|
|
26289
25781
|
}
|
|
26290
25782
|
if (props2.endMonth) {
|
|
26291
|
-
props2.endMonth =
|
|
25783
|
+
props2.endMonth = new TZDate(props2.endMonth, props2.timeZone);
|
|
26292
25784
|
}
|
|
26293
25785
|
if (props2.mode === "single" && props2.selected) {
|
|
26294
|
-
props2.selected =
|
|
25786
|
+
props2.selected = new TZDate(props2.selected, props2.timeZone);
|
|
26295
25787
|
} else if (props2.mode === "multiple" && props2.selected) {
|
|
26296
|
-
props2.selected = (_a2 = props2.selected) == null ? void 0 : _a2.map((date2) =>
|
|
25788
|
+
props2.selected = (_a2 = props2.selected) == null ? void 0 : _a2.map((date2) => new TZDate(date2, props2.timeZone));
|
|
26297
25789
|
} else if (props2.mode === "range" && props2.selected) {
|
|
26298
25790
|
props2.selected = {
|
|
26299
|
-
from: props2.selected.from ?
|
|
26300
|
-
to: props2.selected.to ?
|
|
25791
|
+
from: props2.selected.from ? new TZDate(props2.selected.from, props2.timeZone) : void 0,
|
|
25792
|
+
to: props2.selected.to ? new TZDate(props2.selected.to, props2.timeZone) : void 0
|
|
26301
25793
|
};
|
|
26302
25794
|
}
|
|
26303
|
-
if (props2.disabled !== void 0) {
|
|
26304
|
-
props2.disabled = convertMatchersToTimeZone(props2.disabled, timeZone);
|
|
26305
|
-
}
|
|
26306
|
-
if (props2.hidden !== void 0) {
|
|
26307
|
-
props2.hidden = convertMatchersToTimeZone(props2.hidden, timeZone);
|
|
26308
|
-
}
|
|
26309
|
-
if (props2.modifiers) {
|
|
26310
|
-
const nextModifiers = {};
|
|
26311
|
-
Object.keys(props2.modifiers).forEach((key) => {
|
|
26312
|
-
var _a3;
|
|
26313
|
-
nextModifiers[key] = convertMatchersToTimeZone((_a3 = props2.modifiers) == null ? void 0 : _a3[key], timeZone);
|
|
26314
|
-
});
|
|
26315
|
-
props2.modifiers = nextModifiers;
|
|
26316
|
-
}
|
|
26317
25795
|
}
|
|
26318
25796
|
const { components: components2, formatters: formatters2, labels, dateLib, locale, classNames } = useMemo(() => {
|
|
26319
25797
|
const locale2 = { ...enUS, ...props2.locale };
|
|
@@ -26330,7 +25808,7 @@ function DayPicker(initialProps) {
|
|
|
26330
25808
|
dateLib: dateLib2,
|
|
26331
25809
|
components: getComponents(props2.components),
|
|
26332
25810
|
formatters: getFormatters(props2.formatters),
|
|
26333
|
-
labels:
|
|
25811
|
+
labels: { ...defaultLabels, ...props2.labels },
|
|
26334
25812
|
locale: locale2,
|
|
26335
25813
|
classNames: { ...getDefaultClassNames(), ...props2.classNames }
|
|
26336
25814
|
};
|
|
@@ -26349,9 +25827,6 @@ function DayPicker(initialProps) {
|
|
|
26349
25827
|
props2.labels,
|
|
26350
25828
|
props2.classNames
|
|
26351
25829
|
]);
|
|
26352
|
-
if (!props2.today) {
|
|
26353
|
-
props2 = { ...props2, today: dateLib.today() };
|
|
26354
|
-
}
|
|
26355
25830
|
const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props2;
|
|
26356
25831
|
const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
|
|
26357
25832
|
const calendar = useCalendar(props2, dateLib);
|
|
@@ -26360,7 +25835,7 @@ function DayPicker(initialProps) {
|
|
|
26360
25835
|
const { isSelected, select, selected: selectedValue } = useSelection(props2, dateLib) ?? {};
|
|
26361
25836
|
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props2, calendar, getModifiers, isSelected ?? (() => false), dateLib);
|
|
26362
25837
|
const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
|
|
26363
|
-
const weekdays = useMemo(() => getWeekdays(dateLib, props2.ISOWeek
|
|
25838
|
+
const weekdays = useMemo(() => getWeekdays(dateLib, props2.ISOWeek), [dateLib, props2.ISOWeek]);
|
|
26364
25839
|
const isInteractive = mode !== void 0 || onDayClick !== void 0;
|
|
26365
25840
|
const handlePreviousClick = useCallback(() => {
|
|
26366
25841
|
if (!previousMonth)
|
|
@@ -26378,9 +25853,6 @@ function DayPicker(initialProps) {
|
|
|
26378
25853
|
e2.preventDefault();
|
|
26379
25854
|
e2.stopPropagation();
|
|
26380
25855
|
setFocused(day);
|
|
26381
|
-
if (m2.disabled) {
|
|
26382
|
-
return;
|
|
26383
|
-
}
|
|
26384
25856
|
select == null ? void 0 : select(day.date, m2, e2);
|
|
26385
25857
|
onDayClick == null ? void 0 : onDayClick(day.date, m2, e2);
|
|
26386
25858
|
}, [select, onDayClick, setFocused]);
|
|
@@ -26509,7 +25981,10 @@ function DayPicker(initialProps) {
|
|
|
26509
25981
|
whiteSpace: "nowrap",
|
|
26510
25982
|
wordWrap: "normal"
|
|
26511
25983
|
} }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
26512
|
-
) :
|
|
25984
|
+
) : (
|
|
25985
|
+
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
25986
|
+
React__default.createElement(components2.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
25987
|
+
)),
|
|
26513
25988
|
navLayout === "around" && !props2.hideNavigation && displayIndex === numberOfMonths - 1 && React__default.createElement(
|
|
26514
25989
|
components2.NextMonthButton,
|
|
26515
25990
|
{ type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props2.animate ? "true" : void 0 },
|
|
@@ -26529,7 +26004,8 @@ function DayPicker(initialProps) {
|
|
|
26529
26004
|
return React__default.createElement(
|
|
26530
26005
|
components2.Week,
|
|
26531
26006
|
{ className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
|
|
26532
|
-
showWeekNumber &&
|
|
26007
|
+
showWeekNumber && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
26008
|
+
React__default.createElement(components2.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
|
|
26533
26009
|
locale
|
|
26534
26010
|
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
|
|
26535
26011
|
week.days.map((day) => {
|
|
@@ -26546,7 +26022,10 @@ function DayPicker(initialProps) {
|
|
|
26546
26022
|
const style2 = getStyleForModifiers(modifiers, styles, props2.modifiersStyles);
|
|
26547
26023
|
const className2 = getClassNamesForModifiers(modifiers, classNames, props2.modifiersClassNames);
|
|
26548
26024
|
const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date2, modifiers, dateLib.options, dateLib) : void 0;
|
|
26549
|
-
return
|
|
26025
|
+
return (
|
|
26026
|
+
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
26027
|
+
React__default.createElement(components2.Day, { key: `${dateLib.format(date2, "yyyy-MM-dd")}_${dateLib.format(day.displayMonth, "yyyy-MM")}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": dateLib.format(date2, "yyyy-MM-dd"), "data-month": day.outside ? dateLib.format(date2, "yyyy-MM") : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React__default.createElement(components2.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date2, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date2, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib))
|
|
26028
|
+
);
|
|
26550
26029
|
})
|
|
26551
26030
|
);
|
|
26552
26031
|
}))
|
|
@@ -26554,7 +26033,8 @@ function DayPicker(initialProps) {
|
|
|
26554
26033
|
);
|
|
26555
26034
|
})
|
|
26556
26035
|
),
|
|
26557
|
-
props2.footer &&
|
|
26036
|
+
props2.footer && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
26037
|
+
React__default.createElement(components2.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props2.footer)
|
|
26558
26038
|
)
|
|
26559
26039
|
);
|
|
26560
26040
|
}
|
|
@@ -31919,7 +31399,7 @@ function reducer(state, action) {
|
|
|
31919
31399
|
function noop$1() {
|
|
31920
31400
|
}
|
|
31921
31401
|
var DIALOG_NAME = "Dialog";
|
|
31922
|
-
var [createDialogContext, createDialogScope] = createContextScope
|
|
31402
|
+
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
31923
31403
|
var [DialogProvider$1, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
31924
31404
|
var Dialog$1 = (props2) => {
|
|
31925
31405
|
const {
|
|
@@ -31963,7 +31443,7 @@ var DialogTrigger$1 = React.forwardRef(
|
|
|
31963
31443
|
const context = useDialogContext(TRIGGER_NAME$7, __scopeDialog);
|
|
31964
31444
|
const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
|
|
31965
31445
|
return /* @__PURE__ */ jsx(
|
|
31966
|
-
Primitive
|
|
31446
|
+
Primitive.button,
|
|
31967
31447
|
{
|
|
31968
31448
|
type: "button",
|
|
31969
31449
|
"aria-haspopup": "dialog",
|
|
@@ -31998,7 +31478,7 @@ var DialogOverlay$1 = React.forwardRef(
|
|
|
31998
31478
|
}
|
|
31999
31479
|
);
|
|
32000
31480
|
DialogOverlay$1.displayName = OVERLAY_NAME$1;
|
|
32001
|
-
var Slot$1 = /* @__PURE__ */ createSlot$
|
|
31481
|
+
var Slot$1 = /* @__PURE__ */ createSlot$1("DialogOverlay.RemoveScroll");
|
|
32002
31482
|
var DialogOverlayImpl = React.forwardRef(
|
|
32003
31483
|
(props2, forwardedRef) => {
|
|
32004
31484
|
const { __scopeDialog, ...overlayProps } = props2;
|
|
@@ -32007,7 +31487,7 @@ var DialogOverlayImpl = React.forwardRef(
|
|
|
32007
31487
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
32008
31488
|
// ie. when `Overlay` and `Content` are siblings
|
|
32009
31489
|
/* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot$1, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
|
|
32010
|
-
Primitive
|
|
31490
|
+
Primitive.div,
|
|
32011
31491
|
{
|
|
32012
31492
|
"data-state": getState(context.open),
|
|
32013
31493
|
...overlayProps,
|
|
@@ -32148,7 +31628,7 @@ var DialogTitle$1 = React.forwardRef(
|
|
|
32148
31628
|
(props2, forwardedRef) => {
|
|
32149
31629
|
const { __scopeDialog, ...titleProps } = props2;
|
|
32150
31630
|
const context = useDialogContext(TITLE_NAME$1, __scopeDialog);
|
|
32151
|
-
return /* @__PURE__ */ jsx(Primitive
|
|
31631
|
+
return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
32152
31632
|
}
|
|
32153
31633
|
);
|
|
32154
31634
|
DialogTitle$1.displayName = TITLE_NAME$1;
|
|
@@ -32157,7 +31637,7 @@ var DialogDescription$1 = React.forwardRef(
|
|
|
32157
31637
|
(props2, forwardedRef) => {
|
|
32158
31638
|
const { __scopeDialog, ...descriptionProps } = props2;
|
|
32159
31639
|
const context = useDialogContext(DESCRIPTION_NAME$1, __scopeDialog);
|
|
32160
|
-
return /* @__PURE__ */ jsx(Primitive
|
|
31640
|
+
return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
32161
31641
|
}
|
|
32162
31642
|
);
|
|
32163
31643
|
DialogDescription$1.displayName = DESCRIPTION_NAME$1;
|
|
@@ -32167,7 +31647,7 @@ var DialogClose$1 = React.forwardRef(
|
|
|
32167
31647
|
const { __scopeDialog, ...closeProps } = props2;
|
|
32168
31648
|
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
32169
31649
|
return /* @__PURE__ */ jsx(
|
|
32170
|
-
Primitive
|
|
31650
|
+
Primitive.button,
|
|
32171
31651
|
{
|
|
32172
31652
|
type: "button",
|
|
32173
31653
|
...closeProps,
|
|
@@ -32344,198 +31824,9 @@ function DialogDescription({
|
|
|
32344
31824
|
}
|
|
32345
31825
|
);
|
|
32346
31826
|
}
|
|
32347
|
-
function createContextScope$1(scopeName, createContextScopeDeps = []) {
|
|
32348
|
-
let defaultContexts = [];
|
|
32349
|
-
function createContext3(rootComponentName, defaultContext) {
|
|
32350
|
-
const BaseContext = React.createContext(defaultContext);
|
|
32351
|
-
BaseContext.displayName = rootComponentName + "Context";
|
|
32352
|
-
const index2 = defaultContexts.length;
|
|
32353
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
32354
|
-
const Provider2 = (props2) => {
|
|
32355
|
-
var _a2;
|
|
32356
|
-
const { scope, children, ...context } = props2;
|
|
32357
|
-
const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
|
|
32358
|
-
const value = React.useMemo(() => context, Object.values(context));
|
|
32359
|
-
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
32360
|
-
};
|
|
32361
|
-
Provider2.displayName = rootComponentName + "Provider";
|
|
32362
|
-
function useContext2(consumerName, scope) {
|
|
32363
|
-
var _a2;
|
|
32364
|
-
const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
|
|
32365
|
-
const context = React.useContext(Context);
|
|
32366
|
-
if (context) return context;
|
|
32367
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
32368
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
32369
|
-
}
|
|
32370
|
-
return [Provider2, useContext2];
|
|
32371
|
-
}
|
|
32372
|
-
const createScope = () => {
|
|
32373
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
32374
|
-
return React.createContext(defaultContext);
|
|
32375
|
-
});
|
|
32376
|
-
return function useScope(scope) {
|
|
32377
|
-
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
32378
|
-
return React.useMemo(
|
|
32379
|
-
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
32380
|
-
[scope, contexts]
|
|
32381
|
-
);
|
|
32382
|
-
};
|
|
32383
|
-
};
|
|
32384
|
-
createScope.scopeName = scopeName;
|
|
32385
|
-
return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
|
|
32386
|
-
}
|
|
32387
|
-
function composeContextScopes$1(...scopes) {
|
|
32388
|
-
const baseScope = scopes[0];
|
|
32389
|
-
if (scopes.length === 1) return baseScope;
|
|
32390
|
-
const createScope = () => {
|
|
32391
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
32392
|
-
useScope: createScope2(),
|
|
32393
|
-
scopeName: createScope2.scopeName
|
|
32394
|
-
}));
|
|
32395
|
-
return function useComposedScopes(overrideScopes) {
|
|
32396
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
32397
|
-
const scopeProps = useScope(overrideScopes);
|
|
32398
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
32399
|
-
return { ...nextScopes2, ...currentScope };
|
|
32400
|
-
}, {});
|
|
32401
|
-
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
32402
|
-
};
|
|
32403
|
-
};
|
|
32404
|
-
createScope.scopeName = baseScope.scopeName;
|
|
32405
|
-
return createScope;
|
|
32406
|
-
}
|
|
32407
|
-
var REACT_LAZY_TYPE$3 = Symbol.for("react.lazy");
|
|
32408
|
-
var use$3 = React[" use ".trim().toString()];
|
|
32409
|
-
function isPromiseLike$3(value) {
|
|
32410
|
-
return typeof value === "object" && value !== null && "then" in value;
|
|
32411
|
-
}
|
|
32412
|
-
function isLazyComponent$3(element) {
|
|
32413
|
-
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$3 && "_payload" in element && isPromiseLike$3(element._payload);
|
|
32414
|
-
}
|
|
32415
|
-
// @__NO_SIDE_EFFECTS__
|
|
32416
|
-
function createSlot$3(ownerName) {
|
|
32417
|
-
const SlotClone = /* @__PURE__ */ createSlotClone$3(ownerName);
|
|
32418
|
-
const Slot2 = React.forwardRef((props2, forwardedRef) => {
|
|
32419
|
-
let { children, ...slotProps } = props2;
|
|
32420
|
-
if (isLazyComponent$3(children) && typeof use$3 === "function") {
|
|
32421
|
-
children = use$3(children._payload);
|
|
32422
|
-
}
|
|
32423
|
-
const childrenArray = React.Children.toArray(children);
|
|
32424
|
-
const slottable = childrenArray.find(isSlottable$3);
|
|
32425
|
-
if (slottable) {
|
|
32426
|
-
const newElement = slottable.props.children;
|
|
32427
|
-
const newChildren = childrenArray.map((child) => {
|
|
32428
|
-
if (child === slottable) {
|
|
32429
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
32430
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
32431
|
-
} else {
|
|
32432
|
-
return child;
|
|
32433
|
-
}
|
|
32434
|
-
});
|
|
32435
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
32436
|
-
}
|
|
32437
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
32438
|
-
});
|
|
32439
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
32440
|
-
return Slot2;
|
|
32441
|
-
}
|
|
32442
|
-
// @__NO_SIDE_EFFECTS__
|
|
32443
|
-
function createSlotClone$3(ownerName) {
|
|
32444
|
-
const SlotClone = React.forwardRef((props2, forwardedRef) => {
|
|
32445
|
-
let { children, ...slotProps } = props2;
|
|
32446
|
-
if (isLazyComponent$3(children) && typeof use$3 === "function") {
|
|
32447
|
-
children = use$3(children._payload);
|
|
32448
|
-
}
|
|
32449
|
-
if (React.isValidElement(children)) {
|
|
32450
|
-
const childrenRef = getElementRef$3(children);
|
|
32451
|
-
const props22 = mergeProps$3(slotProps, children.props);
|
|
32452
|
-
if (children.type !== React.Fragment) {
|
|
32453
|
-
props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
|
|
32454
|
-
}
|
|
32455
|
-
return React.cloneElement(children, props22);
|
|
32456
|
-
}
|
|
32457
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
32458
|
-
});
|
|
32459
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
32460
|
-
return SlotClone;
|
|
32461
|
-
}
|
|
32462
|
-
var SLOTTABLE_IDENTIFIER$3 = Symbol("radix.slottable");
|
|
32463
|
-
function isSlottable$3(child) {
|
|
32464
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$3;
|
|
32465
|
-
}
|
|
32466
|
-
function mergeProps$3(slotProps, childProps) {
|
|
32467
|
-
const overrideProps = { ...childProps };
|
|
32468
|
-
for (const propName in childProps) {
|
|
32469
|
-
const slotPropValue = slotProps[propName];
|
|
32470
|
-
const childPropValue = childProps[propName];
|
|
32471
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
32472
|
-
if (isHandler) {
|
|
32473
|
-
if (slotPropValue && childPropValue) {
|
|
32474
|
-
overrideProps[propName] = (...args) => {
|
|
32475
|
-
const result = childPropValue(...args);
|
|
32476
|
-
slotPropValue(...args);
|
|
32477
|
-
return result;
|
|
32478
|
-
};
|
|
32479
|
-
} else if (slotPropValue) {
|
|
32480
|
-
overrideProps[propName] = slotPropValue;
|
|
32481
|
-
}
|
|
32482
|
-
} else if (propName === "style") {
|
|
32483
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
32484
|
-
} else if (propName === "className") {
|
|
32485
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
32486
|
-
}
|
|
32487
|
-
}
|
|
32488
|
-
return { ...slotProps, ...overrideProps };
|
|
32489
|
-
}
|
|
32490
|
-
function getElementRef$3(element) {
|
|
32491
|
-
var _a2, _b;
|
|
32492
|
-
let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
|
|
32493
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
32494
|
-
if (mayWarn) {
|
|
32495
|
-
return element.ref;
|
|
32496
|
-
}
|
|
32497
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
32498
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
32499
|
-
if (mayWarn) {
|
|
32500
|
-
return element.props.ref;
|
|
32501
|
-
}
|
|
32502
|
-
return element.props.ref || element.ref;
|
|
32503
|
-
}
|
|
32504
|
-
var NODES$3 = [
|
|
32505
|
-
"a",
|
|
32506
|
-
"button",
|
|
32507
|
-
"div",
|
|
32508
|
-
"form",
|
|
32509
|
-
"h2",
|
|
32510
|
-
"h3",
|
|
32511
|
-
"img",
|
|
32512
|
-
"input",
|
|
32513
|
-
"label",
|
|
32514
|
-
"li",
|
|
32515
|
-
"nav",
|
|
32516
|
-
"ol",
|
|
32517
|
-
"p",
|
|
32518
|
-
"select",
|
|
32519
|
-
"span",
|
|
32520
|
-
"svg",
|
|
32521
|
-
"ul"
|
|
32522
|
-
];
|
|
32523
|
-
var Primitive$3 = NODES$3.reduce((primitive, node) => {
|
|
32524
|
-
const Slot2 = /* @__PURE__ */ createSlot$3(`Primitive.${node}`);
|
|
32525
|
-
const Node2 = React.forwardRef((props2, forwardedRef) => {
|
|
32526
|
-
const { asChild, ...primitiveProps } = props2;
|
|
32527
|
-
const Comp = asChild ? Slot2 : node;
|
|
32528
|
-
if (typeof window !== "undefined") {
|
|
32529
|
-
window[Symbol.for("radix-ui")] = true;
|
|
32530
|
-
}
|
|
32531
|
-
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
32532
|
-
});
|
|
32533
|
-
Node2.displayName = `Primitive.${node}`;
|
|
32534
|
-
return { ...primitive, [node]: Node2 };
|
|
32535
|
-
}, {});
|
|
32536
31827
|
var PROGRESS_NAME = "Progress";
|
|
32537
31828
|
var DEFAULT_MAX = 100;
|
|
32538
|
-
var [createProgressContext] = createContextScope
|
|
31829
|
+
var [createProgressContext] = createContextScope(PROGRESS_NAME);
|
|
32539
31830
|
var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
|
|
32540
31831
|
var Progress$1 = React.forwardRef(
|
|
32541
31832
|
(props2, forwardedRef) => {
|
|
@@ -32556,7 +31847,7 @@ var Progress$1 = React.forwardRef(
|
|
|
32556
31847
|
const value = isValidValueNumber(valueProp, max2) ? valueProp : null;
|
|
32557
31848
|
const valueLabel = isNumber$3(value) ? getValueLabel(value, max2) : void 0;
|
|
32558
31849
|
return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max: max2, children: /* @__PURE__ */ jsx(
|
|
32559
|
-
Primitive
|
|
31850
|
+
Primitive.div,
|
|
32560
31851
|
{
|
|
32561
31852
|
"aria-valuemax": max2,
|
|
32562
31853
|
"aria-valuemin": 0,
|
|
@@ -32579,7 +31870,7 @@ var ProgressIndicator = React.forwardRef(
|
|
|
32579
31870
|
const { __scopeProgress, ...indicatorProps } = props2;
|
|
32580
31871
|
const context = useProgressContext(INDICATOR_NAME$4, __scopeProgress);
|
|
32581
31872
|
return /* @__PURE__ */ jsx(
|
|
32582
|
-
Primitive
|
|
31873
|
+
Primitive.div,
|
|
32583
31874
|
{
|
|
32584
31875
|
"data-state": getProgressState(context.value, context.max),
|
|
32585
31876
|
"data-value": context.value ?? void 0,
|
|
@@ -32644,7 +31935,7 @@ function Progress({
|
|
|
32644
31935
|
}
|
|
32645
31936
|
);
|
|
32646
31937
|
}
|
|
32647
|
-
var [createTooltipContext] = createContextScope
|
|
31938
|
+
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
32648
31939
|
createPopperScope
|
|
32649
31940
|
]);
|
|
32650
31941
|
var usePopperScope$2 = createPopperScope();
|
|
@@ -32803,7 +32094,7 @@ var TooltipTrigger$1 = React.forwardRef(
|
|
|
32803
32094
|
return () => document.removeEventListener("pointerup", handlePointerUp2);
|
|
32804
32095
|
}, [handlePointerUp2]);
|
|
32805
32096
|
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
32806
|
-
Primitive
|
|
32097
|
+
Primitive.button,
|
|
32807
32098
|
{
|
|
32808
32099
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
32809
32100
|
"data-state": context.stateAttribute,
|
|
@@ -34325,10 +33616,12 @@ function FormBuilderField({
|
|
|
34325
33616
|
});
|
|
34326
33617
|
const handleChange = useCallback(
|
|
34327
33618
|
(value, ...extras) => {
|
|
33619
|
+
if (typeof field.onChangeOverride === "function" && field.onChangeOverride(value, ...extras) === false)
|
|
33620
|
+
return;
|
|
34328
33621
|
controllerField.onChange(value);
|
|
34329
33622
|
onChange == null ? void 0 : onChange(value, ...extras);
|
|
34330
33623
|
},
|
|
34331
|
-
[controllerField, onChange]
|
|
33624
|
+
[controllerField, field.onChangeOverride, onChange]
|
|
34332
33625
|
);
|
|
34333
33626
|
const baseClassName = cn$1(
|
|
34334
33627
|
error && "border-destructive focus-visible:ring-destructive",
|
|
@@ -34901,7 +34194,7 @@ function jsonStringifyReplacer$1(_2, value) {
|
|
|
34901
34194
|
return value.toString();
|
|
34902
34195
|
return value;
|
|
34903
34196
|
}
|
|
34904
|
-
const captureStackTrace$1 =
|
|
34197
|
+
const captureStackTrace$1 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
|
|
34905
34198
|
};
|
|
34906
34199
|
function unwrapMessage$1(message2) {
|
|
34907
34200
|
return typeof message2 === "string" ? message2 : message2 == null ? void 0 : message2.message;
|
|
@@ -34930,13 +34223,7 @@ const initializer$2 = (inst, def) => {
|
|
|
34930
34223
|
value: def,
|
|
34931
34224
|
enumerable: false
|
|
34932
34225
|
});
|
|
34933
|
-
|
|
34934
|
-
get() {
|
|
34935
|
-
return JSON.stringify(def, jsonStringifyReplacer$1, 2);
|
|
34936
|
-
},
|
|
34937
|
-
enumerable: true
|
|
34938
|
-
// configurable: false,
|
|
34939
|
-
});
|
|
34226
|
+
inst.message = JSON.stringify(def, jsonStringifyReplacer$1, 2);
|
|
34940
34227
|
Object.defineProperty(inst, "toString", {
|
|
34941
34228
|
value: () => inst.message,
|
|
34942
34229
|
enumerable: false
|
|
@@ -38441,7 +37728,7 @@ function superRefine(fn) {
|
|
|
38441
37728
|
return _superRefine(fn);
|
|
38442
37729
|
}
|
|
38443
37730
|
function useFormBuilder(options) {
|
|
38444
|
-
const { sections, defaultValues, schema: providedSchema } = options;
|
|
37731
|
+
const { sections, defaultValues, schema: providedSchema, extendValidation } = options;
|
|
38445
37732
|
const generatedSchema = useMemo(() => {
|
|
38446
37733
|
if (providedSchema) return providedSchema;
|
|
38447
37734
|
const generateFieldSchema = (field) => {
|
|
@@ -38687,8 +37974,11 @@ function useFormBuilder(options) {
|
|
|
38687
37974
|
}
|
|
38688
37975
|
};
|
|
38689
37976
|
forEachField(sections);
|
|
37977
|
+
if (typeof extendValidation === "function") {
|
|
37978
|
+
return extendValidation(object(schemaObject));
|
|
37979
|
+
}
|
|
38690
37980
|
return object(schemaObject);
|
|
38691
|
-
}, [sections, providedSchema]);
|
|
37981
|
+
}, [sections, providedSchema, extendValidation]);
|
|
38692
37982
|
const generatedDefaultValues = useMemo(() => {
|
|
38693
37983
|
const values = {
|
|
38694
37984
|
...defaultValues ?? {}
|
|
@@ -38800,12 +38090,14 @@ function FormBuilder({
|
|
|
38800
38090
|
showActions = true,
|
|
38801
38091
|
customActions,
|
|
38802
38092
|
showActionsSeparator = true,
|
|
38803
|
-
form
|
|
38093
|
+
form,
|
|
38094
|
+
extendValidation
|
|
38804
38095
|
}) {
|
|
38805
38096
|
const { form: generatedForm } = useFormBuilder({
|
|
38806
38097
|
sections,
|
|
38807
38098
|
schema,
|
|
38808
|
-
defaultValues: defaultValues ?? void 0
|
|
38099
|
+
defaultValues: defaultValues ?? void 0,
|
|
38100
|
+
extendValidation
|
|
38809
38101
|
});
|
|
38810
38102
|
const activeForm = form ?? generatedForm;
|
|
38811
38103
|
const { control, handleSubmit, reset: reset2, setValue, getValues } = activeForm;
|
|
@@ -38906,11 +38198,6 @@ function FormBuilder({
|
|
|
38906
38198
|
const handleFieldChange = useCallback(
|
|
38907
38199
|
(field, value, ...extras) => {
|
|
38908
38200
|
if (field.onChange) {
|
|
38909
|
-
if (field.onChangeOverride) {
|
|
38910
|
-
if (field.onChangeOverride(value, extras, setValue, getValues))
|
|
38911
|
-
field.onChange(value, extras, setValue, getValues);
|
|
38912
|
-
return;
|
|
38913
|
-
}
|
|
38914
38201
|
field.onChange(value, extras, setValue, getValues);
|
|
38915
38202
|
}
|
|
38916
38203
|
},
|
|
@@ -39465,7 +38752,7 @@ var SUB_CLOSE_KEYS = {
|
|
|
39465
38752
|
};
|
|
39466
38753
|
var MENU_NAME$1 = "Menu";
|
|
39467
38754
|
var [Collection$3, useCollection$3, createCollectionScope$3] = createCollection(MENU_NAME$1);
|
|
39468
|
-
var [createMenuContext, createMenuScope] = createContextScope
|
|
38755
|
+
var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME$1, [
|
|
39469
38756
|
createCollectionScope$3,
|
|
39470
38757
|
createPopperScope,
|
|
39471
38758
|
createRovingFocusGroupScope
|
|
@@ -39589,7 +38876,7 @@ var MenuRootContentNonModal = React.forwardRef((props2, forwardedRef) => {
|
|
|
39589
38876
|
}
|
|
39590
38877
|
);
|
|
39591
38878
|
});
|
|
39592
|
-
var Slot = /* @__PURE__ */ createSlot$
|
|
38879
|
+
var Slot = /* @__PURE__ */ createSlot$1("MenuContent.ScrollLock");
|
|
39593
38880
|
var MenuContentImpl = React.forwardRef(
|
|
39594
38881
|
(props2, forwardedRef) => {
|
|
39595
38882
|
const {
|
|
@@ -39781,7 +39068,7 @@ var GROUP_NAME$3 = "MenuGroup";
|
|
|
39781
39068
|
var MenuGroup = React.forwardRef(
|
|
39782
39069
|
(props2, forwardedRef) => {
|
|
39783
39070
|
const { __scopeMenu, ...groupProps } = props2;
|
|
39784
|
-
return /* @__PURE__ */ jsx(Primitive
|
|
39071
|
+
return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
39785
39072
|
}
|
|
39786
39073
|
);
|
|
39787
39074
|
MenuGroup.displayName = GROUP_NAME$3;
|
|
@@ -39789,7 +39076,7 @@ var LABEL_NAME$3 = "MenuLabel";
|
|
|
39789
39076
|
var MenuLabel = React.forwardRef(
|
|
39790
39077
|
(props2, forwardedRef) => {
|
|
39791
39078
|
const { __scopeMenu, ...labelProps } = props2;
|
|
39792
|
-
return /* @__PURE__ */ jsx(Primitive
|
|
39079
|
+
return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
|
|
39793
39080
|
}
|
|
39794
39081
|
);
|
|
39795
39082
|
MenuLabel.displayName = LABEL_NAME$3;
|
|
@@ -39867,7 +39154,7 @@ var MenuItemImpl = React.forwardRef(
|
|
|
39867
39154
|
disabled,
|
|
39868
39155
|
textValue: textValue ?? textContent,
|
|
39869
39156
|
children: /* @__PURE__ */ jsx(Item$2, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
|
|
39870
|
-
Primitive
|
|
39157
|
+
Primitive.div,
|
|
39871
39158
|
{
|
|
39872
39159
|
role: "menuitem",
|
|
39873
39160
|
"data-highlighted": isFocused ? "" : void 0,
|
|
@@ -39978,7 +39265,7 @@ var MenuItemIndicator = React.forwardRef(
|
|
|
39978
39265
|
{
|
|
39979
39266
|
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
|
|
39980
39267
|
children: /* @__PURE__ */ jsx(
|
|
39981
|
-
Primitive
|
|
39268
|
+
Primitive.span,
|
|
39982
39269
|
{
|
|
39983
39270
|
...itemIndicatorProps,
|
|
39984
39271
|
ref: forwardedRef,
|
|
@@ -39995,7 +39282,7 @@ var MenuSeparator = React.forwardRef(
|
|
|
39995
39282
|
(props2, forwardedRef) => {
|
|
39996
39283
|
const { __scopeMenu, ...separatorProps } = props2;
|
|
39997
39284
|
return /* @__PURE__ */ jsx(
|
|
39998
|
-
Primitive
|
|
39285
|
+
Primitive.div,
|
|
39999
39286
|
{
|
|
40000
39287
|
role: "separator",
|
|
40001
39288
|
"aria-orientation": "horizontal",
|
|
@@ -40082,7 +39369,7 @@ var MenuSubTrigger = React.forwardRef(
|
|
|
40082
39369
|
"aria-controls": subContext.contentId,
|
|
40083
39370
|
"data-state": getOpenState$1(context.open),
|
|
40084
39371
|
...props2,
|
|
40085
|
-
ref: composeRefs$
|
|
39372
|
+
ref: composeRefs$2(forwardedRef, subContext.onTriggerChange),
|
|
40086
39373
|
onClick: (event) => {
|
|
40087
39374
|
var _a2;
|
|
40088
39375
|
(_a2 = props2.onClick) == null ? void 0 : _a2.call(props2, event);
|
|
@@ -40277,7 +39564,7 @@ var Sub = MenuSub;
|
|
|
40277
39564
|
var SubTrigger = MenuSubTrigger;
|
|
40278
39565
|
var SubContent = MenuSubContent;
|
|
40279
39566
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
40280
|
-
var [createDropdownMenuContext] = createContextScope
|
|
39567
|
+
var [createDropdownMenuContext] = createContextScope(
|
|
40281
39568
|
DROPDOWN_MENU_NAME,
|
|
40282
39569
|
[createMenuScope]
|
|
40283
39570
|
);
|
|
@@ -40324,7 +39611,7 @@ var DropdownMenuTrigger$1 = React.forwardRef(
|
|
|
40324
39611
|
const context = useDropdownMenuContext(TRIGGER_NAME$5, __scopeDropdownMenu);
|
|
40325
39612
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
40326
39613
|
return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
|
|
40327
|
-
Primitive
|
|
39614
|
+
Primitive.button,
|
|
40328
39615
|
{
|
|
40329
39616
|
type: "button",
|
|
40330
39617
|
id: context.triggerId,
|
|
@@ -40335,7 +39622,7 @@ var DropdownMenuTrigger$1 = React.forwardRef(
|
|
|
40335
39622
|
"data-disabled": disabled ? "" : void 0,
|
|
40336
39623
|
disabled,
|
|
40337
39624
|
...triggerProps,
|
|
40338
|
-
ref: composeRefs$
|
|
39625
|
+
ref: composeRefs$2(forwardedRef, context.triggerRef),
|
|
40339
39626
|
onPointerDown: composeEventHandlers$1(props2.onPointerDown, (event) => {
|
|
40340
39627
|
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
40341
39628
|
context.onOpenToggle();
|
|
@@ -46654,7 +45941,7 @@ function dotAccessor(path) {
|
|
|
46654
45941
|
return (row) => lodashExports.get(row, path);
|
|
46655
45942
|
}
|
|
46656
45943
|
var ROOT_NAME = "AlertDialog";
|
|
46657
|
-
var [createAlertDialogContext] = createContextScope
|
|
45944
|
+
var [createAlertDialogContext] = createContextScope(ROOT_NAME, [
|
|
46658
45945
|
createDialogScope
|
|
46659
45946
|
]);
|
|
46660
45947
|
var useDialogScope = createDialogScope();
|
|
@@ -46923,7 +46210,7 @@ function AlertDialogCancel({
|
|
|
46923
46210
|
}
|
|
46924
46211
|
const DialogContext = createContext(null);
|
|
46925
46212
|
function useDialogController() {
|
|
46926
|
-
const ctx = use$
|
|
46213
|
+
const ctx = use$1(DialogContext);
|
|
46927
46214
|
if (!ctx)
|
|
46928
46215
|
throw new Error("useDialogController must be used within DialogProvider");
|
|
46929
46216
|
return ctx;
|
|
@@ -49265,7 +48552,7 @@ function ThemeBridge({ children, ...props2 }) {
|
|
|
49265
48552
|
return /* @__PURE__ */ jsx(ThemeProviderContext, { ...props2, value, children });
|
|
49266
48553
|
}
|
|
49267
48554
|
const useTheme = () => {
|
|
49268
|
-
const context = use$
|
|
48555
|
+
const context = use$1(ThemeProviderContext);
|
|
49269
48556
|
if (context === void 0)
|
|
49270
48557
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
49271
48558
|
return context;
|
|
@@ -50633,135 +49920,6 @@ const Toaster$1 = /* @__PURE__ */ React__default.forwardRef(function Toaster(pro
|
|
|
50633
49920
|
}))
|
|
50634
49921
|
);
|
|
50635
49922
|
});
|
|
50636
|
-
var REACT_LAZY_TYPE$2 = Symbol.for("react.lazy");
|
|
50637
|
-
var use$2 = React[" use ".trim().toString()];
|
|
50638
|
-
function isPromiseLike$2(value) {
|
|
50639
|
-
return typeof value === "object" && value !== null && "then" in value;
|
|
50640
|
-
}
|
|
50641
|
-
function isLazyComponent$2(element) {
|
|
50642
|
-
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$2 && "_payload" in element && isPromiseLike$2(element._payload);
|
|
50643
|
-
}
|
|
50644
|
-
// @__NO_SIDE_EFFECTS__
|
|
50645
|
-
function createSlot$2(ownerName) {
|
|
50646
|
-
const SlotClone = /* @__PURE__ */ createSlotClone$2(ownerName);
|
|
50647
|
-
const Slot2 = React.forwardRef((props2, forwardedRef) => {
|
|
50648
|
-
let { children, ...slotProps } = props2;
|
|
50649
|
-
if (isLazyComponent$2(children) && typeof use$2 === "function") {
|
|
50650
|
-
children = use$2(children._payload);
|
|
50651
|
-
}
|
|
50652
|
-
const childrenArray = React.Children.toArray(children);
|
|
50653
|
-
const slottable = childrenArray.find(isSlottable$2);
|
|
50654
|
-
if (slottable) {
|
|
50655
|
-
const newElement = slottable.props.children;
|
|
50656
|
-
const newChildren = childrenArray.map((child) => {
|
|
50657
|
-
if (child === slottable) {
|
|
50658
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
50659
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
50660
|
-
} else {
|
|
50661
|
-
return child;
|
|
50662
|
-
}
|
|
50663
|
-
});
|
|
50664
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
50665
|
-
}
|
|
50666
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
50667
|
-
});
|
|
50668
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
50669
|
-
return Slot2;
|
|
50670
|
-
}
|
|
50671
|
-
// @__NO_SIDE_EFFECTS__
|
|
50672
|
-
function createSlotClone$2(ownerName) {
|
|
50673
|
-
const SlotClone = React.forwardRef((props2, forwardedRef) => {
|
|
50674
|
-
let { children, ...slotProps } = props2;
|
|
50675
|
-
if (isLazyComponent$2(children) && typeof use$2 === "function") {
|
|
50676
|
-
children = use$2(children._payload);
|
|
50677
|
-
}
|
|
50678
|
-
if (React.isValidElement(children)) {
|
|
50679
|
-
const childrenRef = getElementRef$2(children);
|
|
50680
|
-
const props22 = mergeProps$2(slotProps, children.props);
|
|
50681
|
-
if (children.type !== React.Fragment) {
|
|
50682
|
-
props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
|
|
50683
|
-
}
|
|
50684
|
-
return React.cloneElement(children, props22);
|
|
50685
|
-
}
|
|
50686
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
50687
|
-
});
|
|
50688
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
50689
|
-
return SlotClone;
|
|
50690
|
-
}
|
|
50691
|
-
var SLOTTABLE_IDENTIFIER$2 = Symbol("radix.slottable");
|
|
50692
|
-
function isSlottable$2(child) {
|
|
50693
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$2;
|
|
50694
|
-
}
|
|
50695
|
-
function mergeProps$2(slotProps, childProps) {
|
|
50696
|
-
const overrideProps = { ...childProps };
|
|
50697
|
-
for (const propName in childProps) {
|
|
50698
|
-
const slotPropValue = slotProps[propName];
|
|
50699
|
-
const childPropValue = childProps[propName];
|
|
50700
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
50701
|
-
if (isHandler) {
|
|
50702
|
-
if (slotPropValue && childPropValue) {
|
|
50703
|
-
overrideProps[propName] = (...args) => {
|
|
50704
|
-
const result = childPropValue(...args);
|
|
50705
|
-
slotPropValue(...args);
|
|
50706
|
-
return result;
|
|
50707
|
-
};
|
|
50708
|
-
} else if (slotPropValue) {
|
|
50709
|
-
overrideProps[propName] = slotPropValue;
|
|
50710
|
-
}
|
|
50711
|
-
} else if (propName === "style") {
|
|
50712
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
50713
|
-
} else if (propName === "className") {
|
|
50714
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
50715
|
-
}
|
|
50716
|
-
}
|
|
50717
|
-
return { ...slotProps, ...overrideProps };
|
|
50718
|
-
}
|
|
50719
|
-
function getElementRef$2(element) {
|
|
50720
|
-
var _a2, _b;
|
|
50721
|
-
let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
|
|
50722
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
50723
|
-
if (mayWarn) {
|
|
50724
|
-
return element.ref;
|
|
50725
|
-
}
|
|
50726
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
50727
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
50728
|
-
if (mayWarn) {
|
|
50729
|
-
return element.props.ref;
|
|
50730
|
-
}
|
|
50731
|
-
return element.props.ref || element.ref;
|
|
50732
|
-
}
|
|
50733
|
-
var NODES$2 = [
|
|
50734
|
-
"a",
|
|
50735
|
-
"button",
|
|
50736
|
-
"div",
|
|
50737
|
-
"form",
|
|
50738
|
-
"h2",
|
|
50739
|
-
"h3",
|
|
50740
|
-
"img",
|
|
50741
|
-
"input",
|
|
50742
|
-
"label",
|
|
50743
|
-
"li",
|
|
50744
|
-
"nav",
|
|
50745
|
-
"ol",
|
|
50746
|
-
"p",
|
|
50747
|
-
"select",
|
|
50748
|
-
"span",
|
|
50749
|
-
"svg",
|
|
50750
|
-
"ul"
|
|
50751
|
-
];
|
|
50752
|
-
var Primitive$2 = NODES$2.reduce((primitive, node) => {
|
|
50753
|
-
const Slot2 = /* @__PURE__ */ createSlot$2(`Primitive.${node}`);
|
|
50754
|
-
const Node2 = React.forwardRef((props2, forwardedRef) => {
|
|
50755
|
-
const { asChild, ...primitiveProps } = props2;
|
|
50756
|
-
const Comp = asChild ? Slot2 : node;
|
|
50757
|
-
if (typeof window !== "undefined") {
|
|
50758
|
-
window[Symbol.for("radix-ui")] = true;
|
|
50759
|
-
}
|
|
50760
|
-
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
50761
|
-
});
|
|
50762
|
-
Node2.displayName = `Primitive.${node}`;
|
|
50763
|
-
return { ...primitive, [node]: Node2 };
|
|
50764
|
-
}, {});
|
|
50765
49923
|
var NAME$1 = "AspectRatio";
|
|
50766
49924
|
var AspectRatio$1 = React.forwardRef(
|
|
50767
49925
|
(props2, forwardedRef) => {
|
|
@@ -50778,7 +49936,7 @@ var AspectRatio$1 = React.forwardRef(
|
|
|
50778
49936
|
},
|
|
50779
49937
|
"data-radix-aspect-ratio-wrapper": "",
|
|
50780
49938
|
children: /* @__PURE__ */ jsx(
|
|
50781
|
-
Primitive
|
|
49939
|
+
Primitive.div,
|
|
50782
49940
|
{
|
|
50783
49941
|
...aspectRatioProps,
|
|
50784
49942
|
ref: forwardedRef,
|
|
@@ -50804,195 +49962,6 @@ function AspectRatio({
|
|
|
50804
49962
|
}) {
|
|
50805
49963
|
return /* @__PURE__ */ jsx(Root$5, { "data-slot": "aspect-ratio", ...props2 });
|
|
50806
49964
|
}
|
|
50807
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
50808
|
-
let defaultContexts = [];
|
|
50809
|
-
function createContext3(rootComponentName, defaultContext) {
|
|
50810
|
-
const BaseContext = React.createContext(defaultContext);
|
|
50811
|
-
BaseContext.displayName = rootComponentName + "Context";
|
|
50812
|
-
const index2 = defaultContexts.length;
|
|
50813
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
50814
|
-
const Provider2 = (props2) => {
|
|
50815
|
-
var _a2;
|
|
50816
|
-
const { scope, children, ...context } = props2;
|
|
50817
|
-
const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
|
|
50818
|
-
const value = React.useMemo(() => context, Object.values(context));
|
|
50819
|
-
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
50820
|
-
};
|
|
50821
|
-
Provider2.displayName = rootComponentName + "Provider";
|
|
50822
|
-
function useContext2(consumerName, scope) {
|
|
50823
|
-
var _a2;
|
|
50824
|
-
const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
|
|
50825
|
-
const context = React.useContext(Context);
|
|
50826
|
-
if (context) return context;
|
|
50827
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
50828
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
50829
|
-
}
|
|
50830
|
-
return [Provider2, useContext2];
|
|
50831
|
-
}
|
|
50832
|
-
const createScope = () => {
|
|
50833
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
50834
|
-
return React.createContext(defaultContext);
|
|
50835
|
-
});
|
|
50836
|
-
return function useScope(scope) {
|
|
50837
|
-
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
50838
|
-
return React.useMemo(
|
|
50839
|
-
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
50840
|
-
[scope, contexts]
|
|
50841
|
-
);
|
|
50842
|
-
};
|
|
50843
|
-
};
|
|
50844
|
-
createScope.scopeName = scopeName;
|
|
50845
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
50846
|
-
}
|
|
50847
|
-
function composeContextScopes(...scopes) {
|
|
50848
|
-
const baseScope = scopes[0];
|
|
50849
|
-
if (scopes.length === 1) return baseScope;
|
|
50850
|
-
const createScope = () => {
|
|
50851
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
50852
|
-
useScope: createScope2(),
|
|
50853
|
-
scopeName: createScope2.scopeName
|
|
50854
|
-
}));
|
|
50855
|
-
return function useComposedScopes(overrideScopes) {
|
|
50856
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
50857
|
-
const scopeProps = useScope(overrideScopes);
|
|
50858
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
50859
|
-
return { ...nextScopes2, ...currentScope };
|
|
50860
|
-
}, {});
|
|
50861
|
-
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
50862
|
-
};
|
|
50863
|
-
};
|
|
50864
|
-
createScope.scopeName = baseScope.scopeName;
|
|
50865
|
-
return createScope;
|
|
50866
|
-
}
|
|
50867
|
-
var REACT_LAZY_TYPE$1 = Symbol.for("react.lazy");
|
|
50868
|
-
var use$1 = React[" use ".trim().toString()];
|
|
50869
|
-
function isPromiseLike$1(value) {
|
|
50870
|
-
return typeof value === "object" && value !== null && "then" in value;
|
|
50871
|
-
}
|
|
50872
|
-
function isLazyComponent$1(element) {
|
|
50873
|
-
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$1 && "_payload" in element && isPromiseLike$1(element._payload);
|
|
50874
|
-
}
|
|
50875
|
-
// @__NO_SIDE_EFFECTS__
|
|
50876
|
-
function createSlot$1(ownerName) {
|
|
50877
|
-
const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
|
|
50878
|
-
const Slot2 = React.forwardRef((props2, forwardedRef) => {
|
|
50879
|
-
let { children, ...slotProps } = props2;
|
|
50880
|
-
if (isLazyComponent$1(children) && typeof use$1 === "function") {
|
|
50881
|
-
children = use$1(children._payload);
|
|
50882
|
-
}
|
|
50883
|
-
const childrenArray = React.Children.toArray(children);
|
|
50884
|
-
const slottable = childrenArray.find(isSlottable$1);
|
|
50885
|
-
if (slottable) {
|
|
50886
|
-
const newElement = slottable.props.children;
|
|
50887
|
-
const newChildren = childrenArray.map((child) => {
|
|
50888
|
-
if (child === slottable) {
|
|
50889
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
50890
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
50891
|
-
} else {
|
|
50892
|
-
return child;
|
|
50893
|
-
}
|
|
50894
|
-
});
|
|
50895
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
50896
|
-
}
|
|
50897
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
50898
|
-
});
|
|
50899
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
50900
|
-
return Slot2;
|
|
50901
|
-
}
|
|
50902
|
-
// @__NO_SIDE_EFFECTS__
|
|
50903
|
-
function createSlotClone$1(ownerName) {
|
|
50904
|
-
const SlotClone = React.forwardRef((props2, forwardedRef) => {
|
|
50905
|
-
let { children, ...slotProps } = props2;
|
|
50906
|
-
if (isLazyComponent$1(children) && typeof use$1 === "function") {
|
|
50907
|
-
children = use$1(children._payload);
|
|
50908
|
-
}
|
|
50909
|
-
if (React.isValidElement(children)) {
|
|
50910
|
-
const childrenRef = getElementRef$1(children);
|
|
50911
|
-
const props22 = mergeProps$1(slotProps, children.props);
|
|
50912
|
-
if (children.type !== React.Fragment) {
|
|
50913
|
-
props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
|
|
50914
|
-
}
|
|
50915
|
-
return React.cloneElement(children, props22);
|
|
50916
|
-
}
|
|
50917
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
50918
|
-
});
|
|
50919
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
50920
|
-
return SlotClone;
|
|
50921
|
-
}
|
|
50922
|
-
var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
|
|
50923
|
-
function isSlottable$1(child) {
|
|
50924
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
|
|
50925
|
-
}
|
|
50926
|
-
function mergeProps$1(slotProps, childProps) {
|
|
50927
|
-
const overrideProps = { ...childProps };
|
|
50928
|
-
for (const propName in childProps) {
|
|
50929
|
-
const slotPropValue = slotProps[propName];
|
|
50930
|
-
const childPropValue = childProps[propName];
|
|
50931
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
50932
|
-
if (isHandler) {
|
|
50933
|
-
if (slotPropValue && childPropValue) {
|
|
50934
|
-
overrideProps[propName] = (...args) => {
|
|
50935
|
-
const result = childPropValue(...args);
|
|
50936
|
-
slotPropValue(...args);
|
|
50937
|
-
return result;
|
|
50938
|
-
};
|
|
50939
|
-
} else if (slotPropValue) {
|
|
50940
|
-
overrideProps[propName] = slotPropValue;
|
|
50941
|
-
}
|
|
50942
|
-
} else if (propName === "style") {
|
|
50943
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
50944
|
-
} else if (propName === "className") {
|
|
50945
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
50946
|
-
}
|
|
50947
|
-
}
|
|
50948
|
-
return { ...slotProps, ...overrideProps };
|
|
50949
|
-
}
|
|
50950
|
-
function getElementRef$1(element) {
|
|
50951
|
-
var _a2, _b;
|
|
50952
|
-
let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
|
|
50953
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
50954
|
-
if (mayWarn) {
|
|
50955
|
-
return element.ref;
|
|
50956
|
-
}
|
|
50957
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
50958
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
50959
|
-
if (mayWarn) {
|
|
50960
|
-
return element.props.ref;
|
|
50961
|
-
}
|
|
50962
|
-
return element.props.ref || element.ref;
|
|
50963
|
-
}
|
|
50964
|
-
var NODES$1 = [
|
|
50965
|
-
"a",
|
|
50966
|
-
"button",
|
|
50967
|
-
"div",
|
|
50968
|
-
"form",
|
|
50969
|
-
"h2",
|
|
50970
|
-
"h3",
|
|
50971
|
-
"img",
|
|
50972
|
-
"input",
|
|
50973
|
-
"label",
|
|
50974
|
-
"li",
|
|
50975
|
-
"nav",
|
|
50976
|
-
"ol",
|
|
50977
|
-
"p",
|
|
50978
|
-
"select",
|
|
50979
|
-
"span",
|
|
50980
|
-
"svg",
|
|
50981
|
-
"ul"
|
|
50982
|
-
];
|
|
50983
|
-
var Primitive$1 = NODES$1.reduce((primitive, node) => {
|
|
50984
|
-
const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
|
|
50985
|
-
const Node2 = React.forwardRef((props2, forwardedRef) => {
|
|
50986
|
-
const { asChild, ...primitiveProps } = props2;
|
|
50987
|
-
const Comp = asChild ? Slot2 : node;
|
|
50988
|
-
if (typeof window !== "undefined") {
|
|
50989
|
-
window[Symbol.for("radix-ui")] = true;
|
|
50990
|
-
}
|
|
50991
|
-
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
50992
|
-
});
|
|
50993
|
-
Node2.displayName = `Primitive.${node}`;
|
|
50994
|
-
return { ...primitive, [node]: Node2 };
|
|
50995
|
-
}, {});
|
|
50996
49965
|
var shim = { exports: {} };
|
|
50997
49966
|
var useSyncExternalStoreShim_production = {};
|
|
50998
49967
|
/**
|
|
@@ -51161,7 +50130,7 @@ var Avatar$1 = React.forwardRef(
|
|
|
51161
50130
|
scope: __scopeAvatar,
|
|
51162
50131
|
imageLoadingStatus,
|
|
51163
50132
|
onImageLoadingStatusChange: setImageLoadingStatus,
|
|
51164
|
-
children: /* @__PURE__ */ jsx(Primitive
|
|
50133
|
+
children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
|
|
51165
50134
|
}
|
|
51166
50135
|
);
|
|
51167
50136
|
}
|
|
@@ -51183,7 +50152,7 @@ var AvatarImage$1 = React.forwardRef(
|
|
|
51183
50152
|
handleLoadingStatusChange(imageLoadingStatus);
|
|
51184
50153
|
}
|
|
51185
50154
|
}, [imageLoadingStatus, handleLoadingStatusChange]);
|
|
51186
|
-
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive
|
|
50155
|
+
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
|
|
51187
50156
|
}
|
|
51188
50157
|
);
|
|
51189
50158
|
AvatarImage$1.displayName = IMAGE_NAME;
|
|
@@ -51199,7 +50168,7 @@ var AvatarFallback$1 = React.forwardRef(
|
|
|
51199
50168
|
return () => window.clearTimeout(timerId);
|
|
51200
50169
|
}
|
|
51201
50170
|
}, [delayMs]);
|
|
51202
|
-
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive
|
|
50171
|
+
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
|
|
51203
50172
|
}
|
|
51204
50173
|
);
|
|
51205
50174
|
AvatarFallback$1.displayName = FALLBACK_NAME;
|
|
@@ -59234,135 +58203,6 @@ function D(_2) {
|
|
|
59234
58203
|
function W(_2, C, h) {
|
|
59235
58204
|
return _2 = h && h.length > 0 ? `${_2 + " " + h.join(" ")}` : _2, G(_2, C, D(_2), D(C), 0, 0, {});
|
|
59236
58205
|
}
|
|
59237
|
-
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
59238
|
-
var use = React[" use ".trim().toString()];
|
|
59239
|
-
function isPromiseLike(value) {
|
|
59240
|
-
return typeof value === "object" && value !== null && "then" in value;
|
|
59241
|
-
}
|
|
59242
|
-
function isLazyComponent(element) {
|
|
59243
|
-
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
59244
|
-
}
|
|
59245
|
-
// @__NO_SIDE_EFFECTS__
|
|
59246
|
-
function createSlot(ownerName) {
|
|
59247
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
59248
|
-
const Slot2 = React.forwardRef((props2, forwardedRef) => {
|
|
59249
|
-
let { children, ...slotProps } = props2;
|
|
59250
|
-
if (isLazyComponent(children) && typeof use === "function") {
|
|
59251
|
-
children = use(children._payload);
|
|
59252
|
-
}
|
|
59253
|
-
const childrenArray = React.Children.toArray(children);
|
|
59254
|
-
const slottable = childrenArray.find(isSlottable);
|
|
59255
|
-
if (slottable) {
|
|
59256
|
-
const newElement = slottable.props.children;
|
|
59257
|
-
const newChildren = childrenArray.map((child) => {
|
|
59258
|
-
if (child === slottable) {
|
|
59259
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
59260
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
59261
|
-
} else {
|
|
59262
|
-
return child;
|
|
59263
|
-
}
|
|
59264
|
-
});
|
|
59265
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
59266
|
-
}
|
|
59267
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
59268
|
-
});
|
|
59269
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
59270
|
-
return Slot2;
|
|
59271
|
-
}
|
|
59272
|
-
// @__NO_SIDE_EFFECTS__
|
|
59273
|
-
function createSlotClone(ownerName) {
|
|
59274
|
-
const SlotClone = React.forwardRef((props2, forwardedRef) => {
|
|
59275
|
-
let { children, ...slotProps } = props2;
|
|
59276
|
-
if (isLazyComponent(children) && typeof use === "function") {
|
|
59277
|
-
children = use(children._payload);
|
|
59278
|
-
}
|
|
59279
|
-
if (React.isValidElement(children)) {
|
|
59280
|
-
const childrenRef = getElementRef(children);
|
|
59281
|
-
const props22 = mergeProps(slotProps, children.props);
|
|
59282
|
-
if (children.type !== React.Fragment) {
|
|
59283
|
-
props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
|
|
59284
|
-
}
|
|
59285
|
-
return React.cloneElement(children, props22);
|
|
59286
|
-
}
|
|
59287
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
59288
|
-
});
|
|
59289
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
59290
|
-
return SlotClone;
|
|
59291
|
-
}
|
|
59292
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
59293
|
-
function isSlottable(child) {
|
|
59294
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
59295
|
-
}
|
|
59296
|
-
function mergeProps(slotProps, childProps) {
|
|
59297
|
-
const overrideProps = { ...childProps };
|
|
59298
|
-
for (const propName in childProps) {
|
|
59299
|
-
const slotPropValue = slotProps[propName];
|
|
59300
|
-
const childPropValue = childProps[propName];
|
|
59301
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
59302
|
-
if (isHandler) {
|
|
59303
|
-
if (slotPropValue && childPropValue) {
|
|
59304
|
-
overrideProps[propName] = (...args) => {
|
|
59305
|
-
const result = childPropValue(...args);
|
|
59306
|
-
slotPropValue(...args);
|
|
59307
|
-
return result;
|
|
59308
|
-
};
|
|
59309
|
-
} else if (slotPropValue) {
|
|
59310
|
-
overrideProps[propName] = slotPropValue;
|
|
59311
|
-
}
|
|
59312
|
-
} else if (propName === "style") {
|
|
59313
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
59314
|
-
} else if (propName === "className") {
|
|
59315
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
59316
|
-
}
|
|
59317
|
-
}
|
|
59318
|
-
return { ...slotProps, ...overrideProps };
|
|
59319
|
-
}
|
|
59320
|
-
function getElementRef(element) {
|
|
59321
|
-
var _a2, _b;
|
|
59322
|
-
let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
|
|
59323
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
59324
|
-
if (mayWarn) {
|
|
59325
|
-
return element.ref;
|
|
59326
|
-
}
|
|
59327
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
59328
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
59329
|
-
if (mayWarn) {
|
|
59330
|
-
return element.props.ref;
|
|
59331
|
-
}
|
|
59332
|
-
return element.props.ref || element.ref;
|
|
59333
|
-
}
|
|
59334
|
-
var NODES = [
|
|
59335
|
-
"a",
|
|
59336
|
-
"button",
|
|
59337
|
-
"div",
|
|
59338
|
-
"form",
|
|
59339
|
-
"h2",
|
|
59340
|
-
"h3",
|
|
59341
|
-
"img",
|
|
59342
|
-
"input",
|
|
59343
|
-
"label",
|
|
59344
|
-
"li",
|
|
59345
|
-
"nav",
|
|
59346
|
-
"ol",
|
|
59347
|
-
"p",
|
|
59348
|
-
"select",
|
|
59349
|
-
"span",
|
|
59350
|
-
"svg",
|
|
59351
|
-
"ul"
|
|
59352
|
-
];
|
|
59353
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
59354
|
-
const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
|
|
59355
|
-
const Node2 = React.forwardRef((props2, forwardedRef) => {
|
|
59356
|
-
const { asChild, ...primitiveProps } = props2;
|
|
59357
|
-
const Comp = asChild ? Slot2 : node;
|
|
59358
|
-
if (typeof window !== "undefined") {
|
|
59359
|
-
window[Symbol.for("radix-ui")] = true;
|
|
59360
|
-
}
|
|
59361
|
-
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
59362
|
-
});
|
|
59363
|
-
Node2.displayName = `Primitive.${node}`;
|
|
59364
|
-
return { ...primitive, [node]: Node2 };
|
|
59365
|
-
}, {});
|
|
59366
58206
|
var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-heading=""]', le = '[cmdk-item=""]', ce = `${le}:not([aria-disabled="true"])`, Z = "cmdk-item-select", T = "data-value", Re = (r2, o2, n2) => W(r2, o2, n2), ue = React.createContext(void 0), K = () => React.useContext(ue), de = React.createContext(void 0), ee = () => React.useContext(de), fe = React.createContext(void 0), me = React.forwardRef((r2, o2) => {
|
|
59367
58207
|
let n2 = L(() => {
|
|
59368
58208
|
var e2, a2;
|
|
@@ -59558,15 +58398,15 @@ var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-head
|
|
|
59558
58398
|
}
|
|
59559
58399
|
if (!x2) return null;
|
|
59560
58400
|
let { disabled: A, value: ge, onSelect: j, forceMount: O2, keywords: $2, ...q } = r2;
|
|
59561
|
-
return React.createElement(Primitive.div, { ref: composeRefs$
|
|
58401
|
+
return React.createElement(Primitive.div, { ref: composeRefs$2(u2, o2), ...q, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
|
|
59562
58402
|
}), Ee = React.forwardRef((r2, o2) => {
|
|
59563
58403
|
let { heading: n2, children: u2, forceMount: c2, ...d } = r2, f = useId$1(), p2 = React.useRef(null), b2 = React.useRef(null), m2 = useId$1(), R = K(), x2 = P((S) => c2 || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
|
|
59564
58404
|
k(() => R.group(f), []), ve(f, p2, [r2.value, r2.heading, b2]);
|
|
59565
58405
|
let C = React.useMemo(() => ({ id: f, forceMount: c2 }), [c2]);
|
|
59566
|
-
return React.createElement(Primitive.div, { ref: composeRefs$
|
|
58406
|
+
return React.createElement(Primitive.div, { ref: composeRefs$2(p2, o2), ...d, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && React.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B(r2, (S) => React.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, React.createElement(fe.Provider, { value: C }, S))));
|
|
59567
58407
|
}), ye = React.forwardRef((r2, o2) => {
|
|
59568
58408
|
let { alwaysRender: n2, ...u2 } = r2, c2 = React.useRef(null), d = P((f) => !f.search);
|
|
59569
|
-
return !n2 && !d ? null : React.createElement(Primitive.div, { ref: composeRefs$
|
|
58409
|
+
return !n2 && !d ? null : React.createElement(Primitive.div, { ref: composeRefs$2(c2, o2), ...u2, "cmdk-separator": "", role: "separator" });
|
|
59570
58410
|
}), Se = React.forwardRef((r2, o2) => {
|
|
59571
58411
|
let { onValueChange: n2, ...u2 } = r2, c2 = r2.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b2 = K();
|
|
59572
58412
|
return React.useEffect(() => {
|
|
@@ -59588,7 +58428,7 @@ var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-head
|
|
|
59588
58428
|
cancelAnimationFrame(x2), C.unobserve(m2);
|
|
59589
58429
|
};
|
|
59590
58430
|
}
|
|
59591
|
-
}, []), React.createElement(Primitive.div, { ref: composeRefs$
|
|
58431
|
+
}, []), React.createElement(Primitive.div, { ref: composeRefs$2(d, o2), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B(r2, (m2) => React.createElement("div", { ref: composeRefs$2(f, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
|
|
59592
58432
|
}), xe = React.forwardRef((r2, o2) => {
|
|
59593
58433
|
let { open: n2, onOpenChange: u2, overlayClassName: c2, contentClassName: d, container: f, ...p2 } = r2;
|
|
59594
58434
|
return React.createElement(Root$7, { open: n2, onOpenChange: u2 }, React.createElement(Portal$4, { container: f }, React.createElement(Overlay$1, { "cmdk-overlay": "", className: c2 }), React.createElement(Content$2, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, React.createElement(me, { ref: o2, ...p2 }))));
|
|
@@ -59810,7 +58650,7 @@ function CommandShortcut({
|
|
|
59810
58650
|
);
|
|
59811
58651
|
}
|
|
59812
58652
|
var CONTEXT_MENU_NAME = "ContextMenu";
|
|
59813
|
-
var [createContextMenuContext] = createContextScope
|
|
58653
|
+
var [createContextMenuContext] = createContextScope(CONTEXT_MENU_NAME, [
|
|
59814
58654
|
createMenuScope
|
|
59815
58655
|
]);
|
|
59816
58656
|
var useMenuScope$1 = createMenuScope();
|
|
@@ -59873,7 +58713,7 @@ var ContextMenuTrigger$1 = React.forwardRef(
|
|
|
59873
58713
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
59874
58714
|
/* @__PURE__ */ jsx(Anchor2, { ...menuScope, virtualRef }),
|
|
59875
58715
|
/* @__PURE__ */ jsx(
|
|
59876
|
-
Primitive
|
|
58716
|
+
Primitive.span,
|
|
59877
58717
|
{
|
|
59878
58718
|
"data-state": context.open ? "open" : "closed",
|
|
59879
58719
|
"data-disabled": disabled ? "" : void 0,
|
|
@@ -61971,7 +60811,7 @@ function FormMessage({ className, ...props2 }) {
|
|
|
61971
60811
|
}
|
|
61972
60812
|
var originalBodyUserSelect;
|
|
61973
60813
|
var HOVERCARD_NAME = "HoverCard";
|
|
61974
|
-
var [createHoverCardContext] = createContextScope
|
|
60814
|
+
var [createHoverCardContext] = createContextScope(HOVERCARD_NAME, [
|
|
61975
60815
|
createPopperScope
|
|
61976
60816
|
]);
|
|
61977
60817
|
var usePopperScope = createPopperScope();
|
|
@@ -62037,7 +60877,7 @@ var HoverCardTrigger$1 = React.forwardRef(
|
|
|
62037
60877
|
const context = useHoverCardContext(TRIGGER_NAME$2, __scopeHoverCard);
|
|
62038
60878
|
const popperScope = usePopperScope(__scopeHoverCard);
|
|
62039
60879
|
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
62040
|
-
Primitive
|
|
60880
|
+
Primitive.a,
|
|
62041
60881
|
{
|
|
62042
60882
|
"data-state": context.open ? "open" : "closed",
|
|
62043
60883
|
...triggerProps,
|
|
@@ -62484,7 +61324,7 @@ function InputOTPSeparator({ ...props2 }) {
|
|
|
62484
61324
|
}
|
|
62485
61325
|
var MENUBAR_NAME = "Menubar";
|
|
62486
61326
|
var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection(MENUBAR_NAME);
|
|
62487
|
-
var [createMenubarContext] = createContextScope
|
|
61327
|
+
var [createMenubarContext] = createContextScope(MENUBAR_NAME, [
|
|
62488
61328
|
createCollectionScope$2,
|
|
62489
61329
|
createRovingFocusGroupScope
|
|
62490
61330
|
]);
|
|
@@ -62543,7 +61383,7 @@ var Menubar$1 = React.forwardRef(
|
|
|
62543
61383
|
dir: direction,
|
|
62544
61384
|
currentTabStopId,
|
|
62545
61385
|
onCurrentTabStopIdChange: setCurrentTabStopId,
|
|
62546
|
-
children: /* @__PURE__ */ jsx(Primitive
|
|
61386
|
+
children: /* @__PURE__ */ jsx(Primitive.div, { role: "menubar", ...menubarProps, ref: forwardedRef })
|
|
62547
61387
|
}
|
|
62548
61388
|
) }) })
|
|
62549
61389
|
}
|
|
@@ -62611,7 +61451,7 @@ var MenubarTrigger$1 = React.forwardRef(
|
|
|
62611
61451
|
focusable: !disabled,
|
|
62612
61452
|
tabStopId: menuContext.value,
|
|
62613
61453
|
children: /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
|
|
62614
|
-
Primitive
|
|
61454
|
+
Primitive.button,
|
|
62615
61455
|
{
|
|
62616
61456
|
type: "button",
|
|
62617
61457
|
role: "menuitem",
|
|
@@ -63133,7 +61973,7 @@ function MenubarSubContent({
|
|
|
63133
61973
|
var NAVIGATION_MENU_NAME = "NavigationMenu";
|
|
63134
61974
|
var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(NAVIGATION_MENU_NAME);
|
|
63135
61975
|
var [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] = createCollection(NAVIGATION_MENU_NAME);
|
|
63136
|
-
var [createNavigationMenuContext] = createContextScope
|
|
61976
|
+
var [createNavigationMenuContext] = createContextScope(
|
|
63137
61977
|
NAVIGATION_MENU_NAME,
|
|
63138
61978
|
[createCollectionScope$1, createFocusGroupCollectionScope]
|
|
63139
61979
|
);
|
|
@@ -63236,7 +62076,7 @@ var NavigationMenu$1 = React.forwardRef(
|
|
|
63236
62076
|
},
|
|
63237
62077
|
onItemDismiss: () => setValue(""),
|
|
63238
62078
|
children: /* @__PURE__ */ jsx(
|
|
63239
|
-
Primitive
|
|
62079
|
+
Primitive.nav,
|
|
63240
62080
|
{
|
|
63241
62081
|
"aria-label": "Main",
|
|
63242
62082
|
"data-orientation": orientation,
|
|
@@ -63280,7 +62120,7 @@ var NavigationMenuSub = React.forwardRef(
|
|
|
63280
62120
|
onTriggerEnter: (itemValue) => setValue(itemValue),
|
|
63281
62121
|
onItemSelect: (itemValue) => setValue(itemValue),
|
|
63282
62122
|
onItemDismiss: () => setValue(""),
|
|
63283
|
-
children: /* @__PURE__ */ jsx(Primitive
|
|
62123
|
+
children: /* @__PURE__ */ jsx(Primitive.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef })
|
|
63284
62124
|
}
|
|
63285
62125
|
);
|
|
63286
62126
|
}
|
|
@@ -63348,8 +62188,8 @@ var NavigationMenuList$1 = React.forwardRef(
|
|
|
63348
62188
|
(props2, forwardedRef) => {
|
|
63349
62189
|
const { __scopeNavigationMenu, ...listProps } = props2;
|
|
63350
62190
|
const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);
|
|
63351
|
-
const list = /* @__PURE__ */ jsx(Primitive
|
|
63352
|
-
return /* @__PURE__ */ jsx(Primitive
|
|
62191
|
+
const list = /* @__PURE__ */ jsx(Primitive.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef });
|
|
62192
|
+
return /* @__PURE__ */ jsx(Primitive.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection$1.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) });
|
|
63353
62193
|
}
|
|
63354
62194
|
);
|
|
63355
62195
|
NavigationMenuList$1.displayName = LIST_NAME;
|
|
@@ -63392,7 +62232,7 @@ var NavigationMenuItem$1 = React.forwardRef(
|
|
|
63392
62232
|
onFocusProxyEnter: handleContentEntry,
|
|
63393
62233
|
onRootContentClose: handleContentExit,
|
|
63394
62234
|
onContentFocusOutside: handleContentExit,
|
|
63395
|
-
children: /* @__PURE__ */ jsx(Primitive
|
|
62235
|
+
children: /* @__PURE__ */ jsx(Primitive.li, { ...itemProps, ref: forwardedRef })
|
|
63396
62236
|
}
|
|
63397
62237
|
);
|
|
63398
62238
|
}
|
|
@@ -63412,7 +62252,7 @@ var NavigationMenuTrigger$1 = React.forwardRef((props2, forwardedRef) => {
|
|
|
63412
62252
|
const open = itemContext.value === context.value;
|
|
63413
62253
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63414
62254
|
/* @__PURE__ */ jsx(Collection$1.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
63415
|
-
Primitive
|
|
62255
|
+
Primitive.button,
|
|
63416
62256
|
{
|
|
63417
62257
|
id: triggerId,
|
|
63418
62258
|
disabled,
|
|
@@ -63486,7 +62326,7 @@ var NavigationMenuLink$1 = React.forwardRef(
|
|
|
63486
62326
|
(props2, forwardedRef) => {
|
|
63487
62327
|
const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props2;
|
|
63488
62328
|
return /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
63489
|
-
Primitive
|
|
62329
|
+
Primitive.a,
|
|
63490
62330
|
{
|
|
63491
62331
|
"data-active": active ? "" : void 0,
|
|
63492
62332
|
"aria-current": active ? "page" : void 0,
|
|
@@ -63555,7 +62395,7 @@ var NavigationMenuIndicatorImpl = React.forwardRef((props2, forwardedRef) => {
|
|
|
63555
62395
|
useResizeObserver$1(activeTrigger, handlePositionChange);
|
|
63556
62396
|
useResizeObserver$1(context.indicatorTrack, handlePositionChange);
|
|
63557
62397
|
return position ? /* @__PURE__ */ jsx(
|
|
63558
|
-
Primitive
|
|
62398
|
+
Primitive.div,
|
|
63559
62399
|
{
|
|
63560
62400
|
"aria-hidden": true,
|
|
63561
62401
|
"data-state": isVisible ? "visible" : "hidden",
|
|
@@ -63764,7 +62604,7 @@ var NavigationMenuViewportImpl = React.forwardRef((props2, forwardedRef) => {
|
|
|
63764
62604
|
};
|
|
63765
62605
|
useResizeObserver$1(content, handleSizeChange);
|
|
63766
62606
|
return /* @__PURE__ */ jsx(
|
|
63767
|
-
Primitive
|
|
62607
|
+
Primitive.div,
|
|
63768
62608
|
{
|
|
63769
62609
|
"data-state": getOpenState(open),
|
|
63770
62610
|
"data-orientation": context.orientation,
|
|
@@ -63785,7 +62625,7 @@ var NavigationMenuViewportImpl = React.forwardRef((props2, forwardedRef) => {
|
|
|
63785
62625
|
NavigationMenuContentImpl,
|
|
63786
62626
|
{
|
|
63787
62627
|
...props22,
|
|
63788
|
-
ref: composeRefs$
|
|
62628
|
+
ref: composeRefs$2(ref, (node) => {
|
|
63789
62629
|
if (isActive && node) setContent(node);
|
|
63790
62630
|
})
|
|
63791
62631
|
}
|
|
@@ -63799,7 +62639,7 @@ var FocusGroup = React.forwardRef(
|
|
|
63799
62639
|
(props2, forwardedRef) => {
|
|
63800
62640
|
const { __scopeNavigationMenu, ...groupProps } = props2;
|
|
63801
62641
|
const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);
|
|
63802
|
-
return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive
|
|
62642
|
+
return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });
|
|
63803
62643
|
}
|
|
63804
62644
|
);
|
|
63805
62645
|
var ARROW_KEYS$1 = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"];
|
|
@@ -63810,7 +62650,7 @@ var FocusGroupItem = React.forwardRef(
|
|
|
63810
62650
|
const getItems = useFocusGroupCollection(__scopeNavigationMenu);
|
|
63811
62651
|
const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);
|
|
63812
62652
|
return /* @__PURE__ */ jsx(FocusGroupCollection.ItemSlot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(
|
|
63813
|
-
Primitive
|
|
62653
|
+
Primitive.button,
|
|
63814
62654
|
{
|
|
63815
62655
|
...groupProps,
|
|
63816
62656
|
ref: forwardedRef,
|
|
@@ -66315,7 +65155,7 @@ function useStateMachine(initialState2, machine) {
|
|
|
66315
65155
|
}, initialState2);
|
|
66316
65156
|
}
|
|
66317
65157
|
var SCROLL_AREA_NAME = "ScrollArea";
|
|
66318
|
-
var [createScrollAreaContext] = createContextScope
|
|
65158
|
+
var [createScrollAreaContext] = createContextScope(SCROLL_AREA_NAME);
|
|
66319
65159
|
var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
|
66320
65160
|
var ScrollArea$1 = React.forwardRef(
|
|
66321
65161
|
(props2, forwardedRef) => {
|
|
@@ -66360,7 +65200,7 @@ var ScrollArea$1 = React.forwardRef(
|
|
|
66360
65200
|
onCornerWidthChange: setCornerWidth,
|
|
66361
65201
|
onCornerHeightChange: setCornerHeight,
|
|
66362
65202
|
children: /* @__PURE__ */ jsx(
|
|
66363
|
-
Primitive
|
|
65203
|
+
Primitive.div,
|
|
66364
65204
|
{
|
|
66365
65205
|
dir: direction,
|
|
66366
65206
|
...scrollAreaProps,
|
|
@@ -66397,7 +65237,7 @@ var ScrollAreaViewport = React.forwardRef(
|
|
|
66397
65237
|
}
|
|
66398
65238
|
),
|
|
66399
65239
|
/* @__PURE__ */ jsx(
|
|
66400
|
-
Primitive
|
|
65240
|
+
Primitive.div,
|
|
66401
65241
|
{
|
|
66402
65242
|
"data-radix-scroll-area-viewport": "",
|
|
66403
65243
|
...viewportProps,
|
|
@@ -66783,7 +65623,7 @@ var ScrollAreaScrollbarImpl = React.forwardRef((props2, forwardedRef) => {
|
|
|
66783
65623
|
onThumbPositionChange: handleThumbPositionChange,
|
|
66784
65624
|
onThumbPointerDown: useCallbackRef$2(onThumbPointerDown),
|
|
66785
65625
|
children: /* @__PURE__ */ jsx(
|
|
66786
|
-
Primitive
|
|
65626
|
+
Primitive.div,
|
|
66787
65627
|
{
|
|
66788
65628
|
...scrollbarProps,
|
|
66789
65629
|
ref: composeRefs2,
|
|
@@ -66857,7 +65697,7 @@ var ScrollAreaThumbImpl = React.forwardRef(
|
|
|
66857
65697
|
}
|
|
66858
65698
|
}, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
|
|
66859
65699
|
return /* @__PURE__ */ jsx(
|
|
66860
|
-
Primitive
|
|
65700
|
+
Primitive.div,
|
|
66861
65701
|
{
|
|
66862
65702
|
"data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
|
|
66863
65703
|
...thumbProps,
|
|
@@ -66909,7 +65749,7 @@ var ScrollAreaCornerImpl = React.forwardRef((props2, forwardedRef) => {
|
|
|
66909
65749
|
setWidth(width2);
|
|
66910
65750
|
});
|
|
66911
65751
|
return hasSize ? /* @__PURE__ */ jsx(
|
|
66912
|
-
Primitive
|
|
65752
|
+
Primitive.div,
|
|
66913
65753
|
{
|
|
66914
65754
|
...cornerProps,
|
|
66915
65755
|
ref: forwardedRef,
|
|
@@ -67077,7 +65917,7 @@ var BACK_KEYS = {
|
|
|
67077
65917
|
};
|
|
67078
65918
|
var SLIDER_NAME = "Slider";
|
|
67079
65919
|
var [Collection, useCollection, createCollectionScope] = createCollection(SLIDER_NAME);
|
|
67080
|
-
var [createSliderContext] = createContextScope
|
|
65920
|
+
var [createSliderContext] = createContextScope(SLIDER_NAME, [
|
|
67081
65921
|
createCollectionScope
|
|
67082
65922
|
]);
|
|
67083
65923
|
var [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME);
|
|
@@ -67348,7 +66188,7 @@ var SliderImpl = React.forwardRef(
|
|
|
67348
66188
|
} = props2;
|
|
67349
66189
|
const context = useSliderContext(SLIDER_NAME, __scopeSlider);
|
|
67350
66190
|
return /* @__PURE__ */ jsx(
|
|
67351
|
-
Primitive
|
|
66191
|
+
Primitive.span,
|
|
67352
66192
|
{
|
|
67353
66193
|
...sliderProps,
|
|
67354
66194
|
ref: forwardedRef,
|
|
@@ -67395,7 +66235,7 @@ var SliderTrack = React.forwardRef(
|
|
|
67395
66235
|
const { __scopeSlider, ...trackProps } = props2;
|
|
67396
66236
|
const context = useSliderContext(TRACK_NAME, __scopeSlider);
|
|
67397
66237
|
return /* @__PURE__ */ jsx(
|
|
67398
|
-
Primitive
|
|
66238
|
+
Primitive.span,
|
|
67399
66239
|
{
|
|
67400
66240
|
"data-disabled": context.disabled ? "" : void 0,
|
|
67401
66241
|
"data-orientation": context.orientation,
|
|
@@ -67421,7 +66261,7 @@ var SliderRange = React.forwardRef(
|
|
|
67421
66261
|
const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
|
|
67422
66262
|
const offsetEnd = 100 - Math.max(...percentages);
|
|
67423
66263
|
return /* @__PURE__ */ jsx(
|
|
67424
|
-
Primitive
|
|
66264
|
+
Primitive.span,
|
|
67425
66265
|
{
|
|
67426
66266
|
"data-orientation": context.orientation,
|
|
67427
66267
|
"data-disabled": context.disabled ? "" : void 0,
|
|
@@ -67482,7 +66322,7 @@ var SliderThumbImpl = React.forwardRef(
|
|
|
67482
66322
|
},
|
|
67483
66323
|
children: [
|
|
67484
66324
|
/* @__PURE__ */ jsx(Collection.ItemSlot, { scope: props2.__scopeSlider, children: /* @__PURE__ */ jsx(
|
|
67485
|
-
Primitive
|
|
66325
|
+
Primitive.span,
|
|
67486
66326
|
{
|
|
67487
66327
|
role: "slider",
|
|
67488
66328
|
"aria-label": props2["aria-label"] || label,
|
|
@@ -67535,7 +66375,7 @@ var SliderBubbleInput = React.forwardRef(
|
|
|
67535
66375
|
}
|
|
67536
66376
|
}, [prevValue, value]);
|
|
67537
66377
|
return /* @__PURE__ */ jsx(
|
|
67538
|
-
Primitive
|
|
66378
|
+
Primitive.input,
|
|
67539
66379
|
{
|
|
67540
66380
|
style: { display: "none" },
|
|
67541
66381
|
...props2,
|
|
@@ -67689,7 +66529,7 @@ var Toggle$1 = React.forwardRef((props2, forwardedRef) => {
|
|
|
67689
66529
|
caller: NAME
|
|
67690
66530
|
});
|
|
67691
66531
|
return /* @__PURE__ */ jsx(
|
|
67692
|
-
Primitive
|
|
66532
|
+
Primitive.button,
|
|
67693
66533
|
{
|
|
67694
66534
|
type: "button",
|
|
67695
66535
|
"aria-pressed": pressed,
|
|
@@ -67708,7 +66548,7 @@ var Toggle$1 = React.forwardRef((props2, forwardedRef) => {
|
|
|
67708
66548
|
Toggle$1.displayName = NAME;
|
|
67709
66549
|
var Root = Toggle$1;
|
|
67710
66550
|
var TOGGLE_GROUP_NAME = "ToggleGroup";
|
|
67711
|
-
var [createToggleGroupContext] = createContextScope
|
|
66551
|
+
var [createToggleGroupContext] = createContextScope(TOGGLE_GROUP_NAME, [
|
|
67712
66552
|
createRovingFocusGroupScope
|
|
67713
66553
|
]);
|
|
67714
66554
|
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
@@ -67810,9 +66650,9 @@ var ToggleGroupImpl = React__default.forwardRef(
|
|
|
67810
66650
|
orientation,
|
|
67811
66651
|
dir: direction,
|
|
67812
66652
|
loop,
|
|
67813
|
-
children: /* @__PURE__ */ jsx(Primitive
|
|
66653
|
+
children: /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef })
|
|
67814
66654
|
}
|
|
67815
|
-
) : /* @__PURE__ */ jsx(Primitive
|
|
66655
|
+
) : /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef }) });
|
|
67816
66656
|
}
|
|
67817
66657
|
);
|
|
67818
66658
|
var ITEM_NAME = "ToggleGroupItem";
|