@elliemae/ds-utilities 3.0.0-next.44 → 3.0.0-next.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/capitalize.js +9 -16
- package/dist/cjs/capitalize.js.map +1 -1
- package/dist/cjs/compose.js +9 -16
- package/dist/cjs/compose.js.map +1 -1
- package/dist/cjs/deprecated/deprecatedMsg.js +9 -16
- package/dist/cjs/deprecated/deprecatedMsg.js.map +1 -1
- package/dist/cjs/deprecated/index.js +16 -22
- package/dist/cjs/deprecated/index.js.map +1 -1
- package/dist/cjs/deprecated/reactTypesUtility.js +9 -16
- package/dist/cjs/deprecated/reactTypesUtility.js.map +1 -1
- package/dist/cjs/deprecated/scrollingTimer.js +9 -16
- package/dist/cjs/deprecated/scrollingTimer.js.map +1 -1
- package/dist/cjs/deprecated/useParentElement.js +9 -16
- package/dist/cjs/deprecated/useParentElement.js.map +1 -1
- package/dist/cjs/deprecated/useSetRef.js +9 -16
- package/dist/cjs/deprecated/useSetRef.js.map +1 -1
- package/dist/cjs/deprecated/useUncontrolled.js +9 -16
- package/dist/cjs/deprecated/useUncontrolled.js.map +1 -1
- package/dist/cjs/deprecated/useWindowSize.js +9 -16
- package/dist/cjs/deprecated/useWindowSize.js.map +1 -1
- package/dist/cjs/getComponentFromProps.js +9 -16
- package/dist/cjs/getComponentFromProps.js.map +1 -1
- package/dist/cjs/hooks/index.js +9 -16
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useCallbackAfterRender.js +9 -16
- package/dist/cjs/hooks/useCallbackAfterRender.js.map +1 -1
- package/dist/cjs/hooks/useCancellableDelayedCallback.js +9 -16
- package/dist/cjs/hooks/useCancellableDelayedCallback.js.map +1 -1
- package/dist/cjs/hooks/useDerivedStateFromProps.js +9 -16
- package/dist/cjs/hooks/useDerivedStateFromProps.js.map +1 -1
- package/dist/cjs/hooks/useExecutionTimer.js +9 -16
- package/dist/cjs/hooks/useExecutionTimer.js.map +1 -1
- package/dist/cjs/hooks/useExpandState.js +9 -16
- package/dist/cjs/hooks/useExpandState.js.map +1 -1
- package/dist/cjs/hooks/useFocusTrap.js +9 -16
- package/dist/cjs/hooks/useFocusTrap.js.map +1 -1
- package/dist/cjs/hooks/useHotkeys.js +9 -16
- package/dist/cjs/hooks/useHotkeys.js.map +1 -1
- package/dist/cjs/hooks/useHoverHandlersDelay.js +9 -16
- package/dist/cjs/hooks/useHoverHandlersDelay.js.map +1 -1
- package/dist/cjs/hooks/useIsMobile.js +9 -16
- package/dist/cjs/hooks/useIsMobile.js.map +1 -1
- package/dist/cjs/hooks/useIsShowingEllipsis.js +9 -16
- package/dist/cjs/hooks/useIsShowingEllipsis.js.map +1 -1
- package/dist/cjs/hooks/useOnElementResize.js +9 -16
- package/dist/cjs/hooks/useOnElementResize.js.map +1 -1
- package/dist/cjs/hooks/usePrevious.js +9 -16
- package/dist/cjs/hooks/usePrevious.js.map +1 -1
- package/dist/cjs/hooks/useResizeObserver.js +9 -16
- package/dist/cjs/hooks/useResizeObserver.js.map +1 -1
- package/dist/cjs/hooks/useShouldRecalculate.js +9 -16
- package/dist/cjs/hooks/useShouldRecalculate.js.map +1 -1
- package/dist/cjs/hooks/useWindowScrollerList.js +9 -16
- package/dist/cjs/hooks/useWindowScrollerList.js.map +1 -1
- package/dist/cjs/index.js +12 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/onClickHandlerForNonInteractiveElements.js +9 -16
- package/dist/cjs/onClickHandlerForNonInteractiveElements.js.map +1 -1
- package/dist/cjs/operators.js +9 -16
- package/dist/cjs/operators.js.map +1 -1
- package/dist/cjs/platform.js +9 -16
- package/dist/cjs/platform.js.map +1 -1
- package/dist/cjs/props-helpers/defaultProps/index.js +11 -17
- package/dist/cjs/props-helpers/defaultProps/index.js.map +1 -1
- package/dist/cjs/props-helpers/defaultProps/useMemoMergePropsWithDefault.js +9 -16
- package/dist/cjs/props-helpers/defaultProps/useMemoMergePropsWithDefault.js.map +1 -1
- package/dist/cjs/props-helpers/getProps/index.js +9 -16
- package/dist/cjs/props-helpers/getProps/index.js.map +1 -1
- package/dist/cjs/props-helpers/globalProps/constants.js +9 -16
- package/dist/cjs/props-helpers/globalProps/constants.js.map +1 -1
- package/dist/cjs/props-helpers/globalProps/globalAttributesPropTypes.js +9 -16
- package/dist/cjs/props-helpers/globalProps/globalAttributesPropTypes.js.map +1 -1
- package/dist/cjs/props-helpers/globalProps/index.js +12 -18
- package/dist/cjs/props-helpers/globalProps/index.js.map +1 -1
- package/dist/cjs/props-helpers/globalProps/useGetGlobalAttributes.js +9 -16
- package/dist/cjs/props-helpers/globalProps/useGetGlobalAttributes.js.map +1 -1
- package/dist/cjs/props-helpers/index.js +17 -23
- package/dist/cjs/props-helpers/index.js.map +1 -1
- package/dist/cjs/props-helpers/propTypes/PropTypes.js +9 -16
- package/dist/cjs/props-helpers/propTypes/PropTypes.js.map +1 -1
- package/dist/cjs/props-helpers/propTypes/customPropTypes.js +9 -16
- package/dist/cjs/props-helpers/propTypes/customPropTypes.js.map +1 -1
- package/dist/cjs/props-helpers/propTypes/describe.js +9 -16
- package/dist/cjs/props-helpers/propTypes/describe.js.map +1 -1
- package/dist/cjs/props-helpers/propTypes/describeConversions.js +9 -16
- package/dist/cjs/props-helpers/propTypes/describeConversions.js.map +1 -1
- package/dist/cjs/props-helpers/propTypes/describeGuards.js +9 -16
- package/dist/cjs/props-helpers/propTypes/describeGuards.js.map +1 -1
- package/dist/cjs/props-helpers/propTypes/index.js +9 -16
- package/dist/cjs/props-helpers/propTypes/index.js.map +1 -1
- package/dist/cjs/props-helpers/propTypes/toTypescript.js +9 -16
- package/dist/cjs/props-helpers/propTypes/toTypescript.js.map +1 -1
- package/dist/cjs/props-helpers/propTypes/types.js +9 -16
- package/dist/cjs/props-helpers/propTypes/types.js.map +1 -1
- package/dist/cjs/props-helpers/tests/globalProps/TestComponent.js +9 -16
- package/dist/cjs/props-helpers/tests/globalProps/TestComponent.js.map +1 -1
- package/dist/cjs/props-helpers/tests/validation/test.schema.js +9 -16
- package/dist/cjs/props-helpers/tests/validation/test.schema.js.map +1 -1
- package/dist/cjs/props-helpers/tests/xstyledProps/TestComponent.js +9 -16
- package/dist/cjs/props-helpers/tests/xstyledProps/TestComponent.js.map +1 -1
- package/dist/cjs/props-helpers/useDeprecateComponent/index.js +9 -16
- package/dist/cjs/props-helpers/useDeprecateComponent/index.js.map +1 -1
- package/dist/cjs/props-helpers/validation/errorTemplates.js +9 -16
- package/dist/cjs/props-helpers/validation/errorTemplates.js.map +1 -1
- package/dist/cjs/props-helpers/validation/index.js +12 -18
- package/dist/cjs/props-helpers/validation/index.js.map +1 -1
- package/dist/cjs/props-helpers/validation/typescriptGuards.js +9 -16
- package/dist/cjs/props-helpers/validation/typescriptGuards.js.map +1 -1
- package/dist/cjs/props-helpers/validation/typescriptParsers.js +9 -16
- package/dist/cjs/props-helpers/validation/typescriptParsers.js.map +1 -1
- package/dist/cjs/props-helpers/validation/typescriptValidator.js +9 -16
- package/dist/cjs/props-helpers/validation/typescriptValidator.js.map +1 -1
- package/dist/cjs/props-helpers/xstyledProps/constants.js +9 -16
- package/dist/cjs/props-helpers/xstyledProps/constants.js.map +1 -1
- package/dist/cjs/props-helpers/xstyledProps/index.js +12 -18
- package/dist/cjs/props-helpers/xstyledProps/index.js.map +1 -1
- package/dist/cjs/props-helpers/xstyledProps/useGetXstyledProps.js +9 -16
- package/dist/cjs/props-helpers/xstyledProps/useGetXstyledProps.js.map +1 -1
- package/dist/cjs/props-helpers/xstyledProps/xstyledPropTypes.js +9 -16
- package/dist/cjs/props-helpers/xstyledProps/xstyledPropTypes.js.map +1 -1
- package/dist/cjs/reactTypesUtility.js +9 -16
- package/dist/cjs/reactTypesUtility.js.map +1 -1
- package/dist/cjs/system.js +9 -16
- package/dist/cjs/system.js.map +1 -1
- package/dist/cjs/timeUtils.js +9 -16
- package/dist/cjs/timeUtils.js.map +1 -1
- package/dist/cjs/utils.js +9 -16
- package/dist/cjs/utils.js.map +1 -1
- package/dist/cjs/validations.js +9 -16
- package/dist/cjs/validations.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/props-helpers/validation/typescriptParsers.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable complexity */\nexport const typescriptObjectParser = (format: string): [string, string][] => {\n const keyValuePairs: [string, string][] = [];\n\n // State of the algorithm\n let lastKey = '';\n let lastValue = '';\n let shouldAppendToKey = true;\n\n const pushPair = () => {\n if (lastKey) keyValuePairs.push([lastKey, lastValue]);\n lastKey = '';\n lastValue = '';\n shouldAppendToKey = true;\n };\n\n // Complex -- but working -- logic\n let depth = 0;\n format.split('').forEach((char) => {\n if (char === '{') {\n depth += 1;\n if (depth > 1) lastValue += char;\n } else if (char === '}') {\n if (depth > 1) lastValue += char;\n depth -= 1;\n if (depth === 1) pushPair();\n } else if (char === ':') {\n shouldAppendToKey = false;\n if (depth > 1) lastValue += char;\n } else if (char === ',') {\n if (depth === 1) pushPair();\n else lastValue += char;\n } else if (char === ' ') {\n // Do nothing\n } else if (shouldAppendToKey) lastKey += char;\n else lastValue += char;\n });\n pushPair();\n\n return keyValuePairs;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADChB,MAAM,yBAAyB,CAAC,WAAuC;AAC5E,QAAM,gBAAoC,CAAC;AAG3C,MAAI,UAAU;AACd,MAAI,YAAY;AAChB,MAAI,oBAAoB;AAExB,QAAM,WAAW,MAAM;AACrB,QAAI;AAAS,oBAAc,KAAK,CAAC,SAAS,SAAS,CAAC;AACpD,cAAU;AACV,gBAAY;AACZ,wBAAoB;AAAA,EACtB;AAGA,MAAI,QAAQ;AACZ,SAAO,MAAM,EAAE,EAAE,QAAQ,CAAC,SAAS;AACjC,QAAI,SAAS,KAAK;AAChB,eAAS;AACT,UAAI,QAAQ;AAAG,qBAAa;AAAA,IAC9B,WAAW,SAAS,KAAK;AACvB,UAAI,QAAQ;AAAG,qBAAa;AAC5B,eAAS;AACT,UAAI,UAAU;AAAG,iBAAS;AAAA,IAC5B,WAAW,SAAS,KAAK;AACvB,0BAAoB;AACpB,UAAI,QAAQ;AAAG,qBAAa;AAAA,IAC9B,WAAW,SAAS,KAAK;AACvB,UAAI,UAAU;AAAG,iBAAS;AAAA;AACrB,qBAAa;AAAA,IACpB,WAAW,SAAS,KAAK;AAAA,IAEzB,WAAW;AAAmB,iBAAW;AAAA;AACpC,mBAAa;AAAA,EACpB,CAAC;AACD,WAAS;AAET,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,32 +4,26 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var typescriptValidator_exports = {};
|
|
29
22
|
__export(typescriptValidator_exports, {
|
|
30
23
|
useValidateTypescriptPropTypes: () => useValidateTypescriptPropTypes,
|
|
31
24
|
validateTypescriptPropTypesImplementation: () => validateTypescriptPropTypesImplementation
|
|
32
25
|
});
|
|
26
|
+
module.exports = __toCommonJS(typescriptValidator_exports);
|
|
33
27
|
var React = __toESM(require("react"));
|
|
34
28
|
var import_react = require("react");
|
|
35
29
|
var import_propTypes = require("../propTypes");
|
|
@@ -173,5 +167,4 @@ const useValidateTypescriptPropTypes = (props, propTypes) => {
|
|
|
173
167
|
validationsMemo.current = nextValidationsMemo;
|
|
174
168
|
}, [props]);
|
|
175
169
|
};
|
|
176
|
-
module.exports = __toCommonJS(typescriptValidator_exports);
|
|
177
170
|
//# sourceMappingURL=typescriptValidator.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/props-helpers/validation/typescriptValidator.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-lines */\n/* eslint-disable max-params */\nimport { PropsWithChildren, useMemo, useRef, WeakValidationMap } from 'react';\nimport { TypescriptDocumentation } from '../propTypes/types';\nimport { describe } from '../propTypes';\nimport { throwRequiredError, throwTypeError } from './errorTemplates';\nimport {\n isArray,\n isFunction,\n isJSXorNode,\n isObject,\n isPrimitiveType,\n isSomethingWithParenthesis,\n isString,\n isUnion,\n isUndefined,\n isNull,\n} from './typescriptGuards';\nimport { typescriptObjectParser } from './typescriptParsers';\n\ntype ValidatorFn = (\n schemaName: string,\n key: string,\n value: unknown,\n format: string,\n validationsMemo: Record<symbol, string>,\n nextValidationsMemo: Record<symbol, string>,\n) => void;\n\n// =============================================================================\n// Atom Validators\n// =============================================================================\n\n// This functions will validate something from the data\n// and optionally recursively apply `validateValueWithFormat`\n// in smaller parts\n\nconst validateUndefined: ValidatorFn = (schemaName, key, value, format) => {\n if (value !== undefined || value === 'undefined') {\n throwTypeError(schemaName, key, value, format);\n }\n};\nconst validateNull: ValidatorFn = (schemaName, key, value, format) => {\n if (value !== null || value === 'null') {\n throwTypeError(schemaName, key, value, format);\n }\n};\nconst validatePrimitiveType: ValidatorFn = (schemaName, key, value, format) => {\n if (typeof value !== format) {\n throwTypeError(schemaName, key, value, format);\n }\n};\n\nconst validateString: ValidatorFn = (schemaName, key, value, format) => {\n if (value !== format.slice(1, -1)) {\n throwTypeError(schemaName, key, value, format);\n }\n};\n\nconst validateArray: ValidatorFn = (schemaName, key, value, format, validationsMemo, nextValidationsMemo) => {\n // Check that we have an array\n if (!Array.isArray(value)) {\n throwTypeError(schemaName, key, value, format);\n }\n\n // Check that each element inside satisfies the format\n (value as unknown[]).forEach((val, index) => {\n // this is a recursive func, we need to invoke it before it's defined.\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n validateValueWithFormat(\n schemaName,\n `${key}[${index}]`,\n val,\n format.slice(0, -2),\n validationsMemo,\n nextValidationsMemo,\n );\n });\n};\nfunction isObjectType(value: unknown | Record<string, unknown>): value is Record<string, unknown> {\n return !(typeof value !== 'object' || Array.isArray(value));\n}\nconst validateObject: ValidatorFn = (schemaName, key, value, format, validationsMemo, nextValidationsMemo) => {\n const valuesIsObject = isObjectType(value);\n // Check that we have an object\n if (!valuesIsObject) {\n throwTypeError(schemaName, key, value, format);\n return;\n }\n\n if (format === 'object') return;\n\n const keyValuePairs = typescriptObjectParser(format);\n // Now we have the key - value pairs\n // Each key could either be required or not\n // Just recursively check the object\n\n keyValuePairs.forEach(([objectKey, objectValue]) => {\n const trueKey = objectKey.slice(-1) === '?' ? objectKey.slice(0, -1) : objectKey;\n\n if (trueKey === objectKey && !(trueKey in value)) {\n throwRequiredError(schemaName, key);\n }\n\n if (trueKey in value) {\n // this is a recursive func, we need to invoke it before it's defined.\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n validateValueWithFormat(\n schemaName,\n `${key}[${trueKey}]`,\n value[trueKey],\n objectValue,\n validationsMemo,\n nextValidationsMemo,\n );\n }\n });\n};\n\nconst validateUnion: ValidatorFn = (schemaName, key, value, format, validationsMemo, nextValidationsMemo) => {\n const possibilities = format.split(/\\s?\\|\\s?/);\n\n const errors = [];\n\n possibilities.forEach((possibility) => {\n try {\n // this is a recursive func, we need to invoke it before it's defined.\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n validateValueWithFormat(schemaName, key, value, possibility, validationsMemo, nextValidationsMemo);\n } catch (e) {\n errors.push(e);\n }\n });\n\n if (errors.length === possibilities.length) {\n throwTypeError(schemaName, key, value, format);\n }\n};\n\nconst validateFunction: ValidatorFn = (schemaName, key, value, format) => {\n // Check that we have a function\n if (typeof value !== 'function') {\n throwTypeError(schemaName, key, value, format);\n }\n};\n\nfunction isJSXElement(value: unknown | JSX.Element): value is JSX.Element {\n return value === null || (typeof value === 'object' && value !== null && '$$typeof' in value);\n}\nconst validateJSXorNode: ValidatorFn = (schemaName, key, value, format) => {\n const valueIsJSX = isJSXElement(value);\n if (format === 'JSX.Element' && !valueIsJSX) {\n throwTypeError(schemaName, key, value, format);\n }\n};\n\n// =============================================================================\n// Schema validator\n// =============================================================================\n\nconst validateValueWithFormat: ValidatorFn = (schemaName, key, value, format, validationsMemo, nextValidationsMemo) => {\n nextValidationsMemo[value as symbol] = format;\n\n if ((value as symbol) in validationsMemo) {\n // We already validated this value on this format\n return;\n }\n\n if (isUndefined(format)) {\n validateUndefined(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isNull(format)) {\n validateNull(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isPrimitiveType(format)) {\n validatePrimitiveType(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isUnion(format)) {\n validateUnion(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isString(format)) {\n validateString(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isArray(format)) {\n validateArray(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isObject(format)) {\n validateObject(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isFunction(format)) {\n validateFunction(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isJSXorNode(format)) {\n validateJSXorNode(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isSomethingWithParenthesis(format)) {\n validateValueWithFormat(schemaName, key, value, format.slice(1, -1), validationsMemo, nextValidationsMemo);\n }\n};\n\nexport const validateTypescriptPropTypesImplementation = (\n props: PropsWithChildren<Record<string, unknown>>,\n schema: TypescriptDocumentation,\n validationsMemo: Record<string, string> = {},\n nextValidationsMemo: Record<string, string> = {},\n): void => {\n const { properties, name: schemaName } = schema;\n\n properties.forEach((property) => {\n const { name, format, required, isRequiredIf } = property;\n\n const requiredConditionally = isRequiredIf && isRequiredIf(props);\n\n if (required && !(name in props)) {\n throwRequiredError(schema.name, name);\n }\n\n if (requiredConditionally && !(name in props)) {\n throwRequiredError(schema.name, name);\n }\n\n const shouldValidateProperty = props[name] !== undefined || required || requiredConditionally;\n\n if (name in props && format && shouldValidateProperty) {\n validateValueWithFormat(schemaName, name, props[name], format, validationsMemo, nextValidationsMemo);\n }\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const useValidateTypescriptPropTypes = <T = Record<string, any>>(\n props: PropsWithChildren<T>,\n propTypes: WeakValidationMap<unknown>,\n): void => {\n const validationsMemo = useRef<Record<string, string>>({});\n\n const typescriptSchema = useMemo(() => {\n const Component = () => {};\n\n const DescribedComponent = describe(Component);\n DescribedComponent.propTypes = propTypes;\n return DescribedComponent.toTypescript();\n }, [propTypes]);\n\n useMemo(() => {\n const nextValidationsMemo = {};\n\n validateTypescriptPropTypesImplementation(props, typescriptSchema, validationsMemo.current, nextValidationsMemo);\n validationsMemo.current = nextValidationsMemo;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAsE;AAEtE,uBAAyB;AACzB,4BAAmD;AACnD,8BAWO;AACP,+BAAuC;AAmBvC,MAAM,oBAAiC,CAAC,YAAY,KAAK,OAAO,WAAW;AACzE,MAAI,UAAU,UAAa,UAAU,aAAa;AAChD,8CAAe,YAAY,KAAK,OAAO,MAAM;AAAA,EAC/C;AACF;AACA,MAAM,eAA4B,CAAC,YAAY,KAAK,OAAO,WAAW;AACpE,MAAI,UAAU,QAAQ,UAAU,QAAQ;AACtC,8CAAe,YAAY,KAAK,OAAO,MAAM;AAAA,EAC/C;AACF;AACA,MAAM,wBAAqC,CAAC,YAAY,KAAK,OAAO,WAAW;AAC7E,MAAI,OAAO,UAAU,QAAQ;AAC3B,8CAAe,YAAY,KAAK,OAAO,MAAM;AAAA,EAC/C;AACF;AAEA,MAAM,iBAA8B,CAAC,YAAY,KAAK,OAAO,WAAW;AACtE,MAAI,UAAU,OAAO,MAAM,GAAG,EAAE,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AM,qBAAqB,+BAAS,SAAS;AAC7C,uBAAmB,YAAY;AAC/B,WAAO,mBAAmB,aAAa;AAAA,EACzC,GAAG,CAAC,SAAS,CAAC;AAEd,4BAAQ,MAAM;AACZ,UAAM,sBAAsB,CAAC;AAE7B,8CAA0C,OAAO,kBAAkB,gBAAgB,SAAS,mBAAmB;AAC/G,oBAAgB,UAAU;AAAA,EAE5B,GAAG,CAAC,KAAK,CAAC;AACZ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,32 +4,26 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var constants_exports = {};
|
|
29
22
|
__export(constants_exports, {
|
|
30
23
|
layoutKeys: () => layoutKeys,
|
|
31
24
|
xstyledKeys: () => xstyledKeys
|
|
32
25
|
});
|
|
26
|
+
module.exports = __toCommonJS(constants_exports);
|
|
33
27
|
var React = __toESM(require("react"));
|
|
34
28
|
const marginKeys = [
|
|
35
29
|
"margin",
|
|
@@ -84,5 +78,4 @@ const layoutKeys = [
|
|
|
84
78
|
"objectFit"
|
|
85
79
|
];
|
|
86
80
|
const xstyledKeys = Object.fromEntries([...spacingKeys, ...sizingKeys, ...layoutKeys].map((item) => [item, true]));
|
|
87
|
-
module.exports = __toCommonJS(constants_exports);
|
|
88
81
|
//# sourceMappingURL=constants.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/props-helpers/xstyledProps/constants.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["const marginKeys = [\n 'margin',\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'm',\n 'mt',\n 'mr',\n 'mb',\n 'ml',\n 'mx',\n 'my',\n];\n\nconst paddingKeys = [\n 'padding',\n 'p',\n 'paddingTop',\n 'pt',\n 'paddingRight',\n 'pr',\n 'paddingBottom',\n 'pb',\n 'paddingLeft',\n 'pl',\n 'px',\n 'py',\n];\n\nconst spaceKeys = ['spaceY', 'spaceX', 'spaceXReverse', 'spaceYReverse'];\n\nconst widthKeys = ['w', 'maxWidth', 'maxW', 'minWidth', 'minW'];\n\nconst heightKeys = ['h', 'maxHeight', 'maxH', 'minHeight', 'minH'];\n\nconst maskSizeKeys = ['maskSize'];\n\nconst spacingKeys = [...marginKeys, ...paddingKeys, ...spaceKeys];\nconst sizingKeys = [...widthKeys, ...heightKeys, ...maskSizeKeys];\nexport const layoutKeys = [\n 'display',\n 'float',\n 'boxSizing',\n 'container',\n 'overflow',\n 'overflowX',\n 'overflowY',\n 'zIndex',\n 'position',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'visibility',\n 'overscrollBehavior',\n 'objectFit',\n];\n\nexport const xstyledKeys = Object.fromEntries(\n [...spacingKeys, ...sizingKeys, ...layoutKeys].map((item) => [item, true]),\n) as Record<string, true>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,YAAY,CAAC,UAAU,UAAU,iBAAiB,eAAe;AAEvE,MAAM,YAAY,CAAC,KAAK,YAAY,QAAQ,YAAY,MAAM;AAE9D,MAAM,aAAa,CAAC,KAAK,aAAa,QAAQ,aAAa,MAAM;AAEjE,MAAM,eAAe,CAAC,UAAU;AAEhC,MAAM,cAAc,CAAC,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS;AAChE,MAAM,aAAa,CAAC,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY;AACzD,MAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,cAAc,OAAO,YAChC,CAAC,GAAG,aAAa,GAAG,YAAY,GAAG,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,CAC3E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,26 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from))
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
12
|
}
|
|
14
|
-
return
|
|
13
|
+
return to;
|
|
15
14
|
};
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
-
return (module2, temp) => {
|
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
-
};
|
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
15
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
18
|
var xstyledProps_exports = {};
|
|
25
|
-
var React = __toESM(require("react"));
|
|
26
|
-
__reExport(xstyledProps_exports, require("./useGetXstyledProps"));
|
|
27
|
-
__reExport(xstyledProps_exports, require("./xstyledPropTypes"));
|
|
28
19
|
module.exports = __toCommonJS(xstyledProps_exports);
|
|
20
|
+
var React = __toESM(require("react"));
|
|
21
|
+
__reExport(xstyledProps_exports, require("./useGetXstyledProps"), module.exports);
|
|
22
|
+
__reExport(xstyledProps_exports, require("./xstyledPropTypes"), module.exports);
|
|
29
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/props-helpers/xstyledProps/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './useGetXstyledProps';\nexport * from './xstyledPropTypes';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,iCAAc,iCAAd;AACA,iCAAc,+BADd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var useGetXstyledProps_exports = {};
|
|
29
22
|
__export(useGetXstyledProps_exports, {
|
|
30
23
|
useGetXstyledProps: () => useGetXstyledProps
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(useGetXstyledProps_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
var import_react = require("react");
|
|
34
28
|
var import_constants = require("./constants");
|
|
@@ -44,5 +38,4 @@ const useGetXstyledProps = (props) => {
|
|
|
44
38
|
}, [props]);
|
|
45
39
|
return componentXstyledProps;
|
|
46
40
|
};
|
|
47
|
-
module.exports = __toCommonJS(useGetXstyledProps_exports);
|
|
48
41
|
//# sourceMappingURL=useGetXstyledProps.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/props-helpers/xstyledProps/useGetXstyledProps.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { useMemo } from 'react';\nimport type { SizingProps, SpaceProps, LayoutProps } from '@xstyled/styled-components';\nimport { xstyledKeys } from './constants';\n\nexport type XstyledProps = SpaceProps & SizingProps & LayoutProps;\n\ntype PropsWithXstyled<T> = T & XstyledProps;\n\nexport const useGetXstyledProps = <T,>(props: PropsWithXstyled<T>): XstyledProps => {\n const componentXstyledProps = useMemo(() => {\n const xstyledPropsObject: Record<string, unknown> = {};\n Object.entries(props).forEach(([key, value]) => {\n if (key in xstyledKeys) {\n xstyledPropsObject[key] = value;\n }\n });\n return xstyledPropsObject;\n }, [props]);\n\n return componentXstyledProps as XstyledProps;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AAExB,uBAA4B;AAMrB,MAAM,qBAAqB,CAAK,UAA6C;AAClF,QAAM,wBAAwB,0BAAQ,MAAM;AAC1C,UAAM,qBAA8C,CAAC;AACrD,WAAO,QAAQ,KAAK,EAAE,QAAQ,CAAC,CAAC,KAAK,WAAW;AAC9C,UAAI,OAAO,8BAAa;AACtB,2BAAmB,OAAO;AAAA,MAC5B;AAAA,IACF,CAAC;AACD,WAAO;AAAA,EACT,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var xstyledPropTypes_exports = {};
|
|
29
22
|
__export(xstyledPropTypes_exports, {
|
|
30
23
|
xstyledPropTypes: () => xstyledPropTypes
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(xstyledPropTypes_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
var import_propTypes = require("../propTypes");
|
|
34
28
|
const xstyledPropTypes = {
|
|
@@ -88,5 +82,4 @@ const xstyledPropTypes = {
|
|
|
88
82
|
overscrollBehavior: import_propTypes.PropTypes.any.description("Applies to the root container. For more info read xstyled docs").xstyled(),
|
|
89
83
|
objectFit: import_propTypes.PropTypes.any.description("Applies to the root container. For more info read xstyled docs").xstyled()
|
|
90
84
|
};
|
|
91
|
-
module.exports = __toCommonJS(xstyledPropTypes_exports);
|
|
92
85
|
//# sourceMappingURL=xstyledPropTypes.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/props-helpers/xstyledProps/xstyledPropTypes.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { PropTypes } from '../propTypes';\n\nexport const xstyledPropTypes = {\n margin: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n m: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n marginTop: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n mt: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n marginRight: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n mr: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n marginBottom: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n mb: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n marginLeft: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n ml: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n mx: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n my: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n padding: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n p: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n paddingTop: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n pt: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n paddingRight: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n pr: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n paddingBottom: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n pb: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n paddingLeft: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n pl: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n px: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n py: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n spaceY: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n spaceX: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n spaceXReverse: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n spaceYReverse: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n w: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n maxWidth: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n maxW: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n minWidth: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n minW: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n h: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n maxHeight: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n maxH: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n minHeight: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n minH: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n maskSize: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n display: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n float: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n boxSizing: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n container: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n overflow: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n overflowX: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n overflowY: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n zIndex: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n position: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n top: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n right: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n bottom: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n left: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n visibility: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n overscrollBehavior: PropTypes.any\n .description('Applies to the root container. For more info read xstyled docs')\n .xstyled(),\n objectFit: PropTypes.any.description('Applies to the root container. For more info read xstyled docs').xstyled(),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA0B;AAEnB,MAAM,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AW,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAC/G,WAAW,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAC/G,UAAU,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAC9G,WAAW,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAC/G,WAAW,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAC/G,QAAQ,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAC5G,UAAU,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAC9G,KAAK,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EACzG,OAAO,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAC3G,QAAQ,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAC5G,MAAM,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAC1G,YAAY,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AAAA,EAChH,oBAAoB,2BAAU,IAC3B,YAAY,gEAAgE,EAC5E,QAAQ;AAAA,EACX,WAAW,2BAAU,IAAI,YAAY,gEAAgE,EAAE,QAAQ;AACjH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,34 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var reactTypesUtility_exports = {};
|
|
29
22
|
__export(reactTypesUtility_exports, {
|
|
30
23
|
isDOMTypeElement: () => isDOMTypeElement
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(reactTypesUtility_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
var import_react = __toESM(require("react"));
|
|
34
28
|
const isElement = (element) => import_react.default.isValidElement(element);
|
|
35
29
|
const isDOMTypeElement = (element) => isElement(element) && typeof element?.type === "string";
|
|
36
|
-
module.exports = __toCommonJS(reactTypesUtility_exports);
|
|
37
30
|
//# sourceMappingURL=reactTypesUtility.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/reactTypesUtility.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\n\nconst isElement = (element: Record<string, unknown> | null | undefined) => React.isValidElement(element);\n\nexport const isDOMTypeElement = (element: Record<string, unknown> | null | undefined) =>\n isElement(element) && typeof element?.type === 'string';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAElB,MAAM,YAAY,CAAC,YAAwD,qBAAM,eAAe,OAAO;AAEhG,MAAM,mBAAmB,CAAC,YAC/B,UAAU,OAAO,KAAK,OAAO,SAAS,SAAS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/system.js
CHANGED
|
@@ -4,33 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var system_exports = {};
|
|
29
22
|
__export(system_exports, {
|
|
30
23
|
logger: () => logger,
|
|
31
24
|
mergeRefs: () => mergeRefs,
|
|
32
25
|
setRef: () => setRef
|
|
33
26
|
});
|
|
27
|
+
module.exports = __toCommonJS(system_exports);
|
|
34
28
|
var React = __toESM(require("react"));
|
|
35
29
|
var import_utils = require("./utils");
|
|
36
30
|
const setRef = (ref, value) => {
|
|
@@ -51,5 +45,4 @@ const mergeRefs = (...refs) => {
|
|
|
51
45
|
function logger(...args) {
|
|
52
46
|
console.log(...args);
|
|
53
47
|
}
|
|
54
|
-
module.exports = __toCommonJS(system_exports);
|
|
55
48
|
//# sourceMappingURL=system.js.map
|
package/dist/cjs/system.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/system.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { isFunction } from './utils';\n\ntype AnyRef<T extends HTMLElement> = React.MutableRefObject<T> | ((_ref: T) => void);\n\nexport const setRef = <T extends HTMLElement>(ref: AnyRef<T>, value: T) => {\n if (isFunction(ref)) {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n};\n\nexport const mergeRefs = <T extends HTMLElement>(...refs: AnyRef<T>[]) => {\n const mergeRefsFunc = (node: T) => {\n if (!node) return;\n refs.forEach((ref) => setRef(ref, node));\n };\n return mergeRefsFunc;\n};\n\nexport function logger(...args: unknown[]) {\n // eslint-disable-next-line no-console\n console.log(...args);\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA2B;AAIpB,MAAM,SAAS,CAAwB,KAAgB,UAAa;AACzE,MAAI,6BAAW,GAAG,GAAG;AACnB,QAAI,KAAK;AAAA,EACX,WAAW,KAAK;AACd,QAAI,UAAU;AAAA,EAChB;AACF;AAEO,MAAM,YAAY,IAA2B,SAAsB;AACxE,QAAM,gBAAgB,CAAC,SAAY;AACjC,QAAI,CAAC;AAAM;AACX,SAAK,QAAQ,CAAC,QAAQ,OAAO,KAAK,IAAI,CAAC;AAAA,EACzC;AACA,SAAO;AACT;AAEO,mBAAmB,MAAiB;AAEzC,UAAQ,IAAI,GAAG,IAAI;AACrB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/timeUtils.js
CHANGED
|
@@ -4,32 +4,26 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var timeUtils_exports = {};
|
|
29
22
|
__export(timeUtils_exports, {
|
|
30
23
|
addLeadingZeros: () => addLeadingZeros,
|
|
31
24
|
getVisibleTimeByFormat: () => getVisibleTimeByFormat
|
|
32
25
|
});
|
|
26
|
+
module.exports = __toCommonJS(timeUtils_exports);
|
|
33
27
|
var React = __toESM(require("react"));
|
|
34
28
|
var import_utils = require("./utils");
|
|
35
29
|
const getVisibleTimeByFormat = (format) => ({
|
|
@@ -39,5 +33,4 @@ const getVisibleTimeByFormat = (format) => ({
|
|
|
39
33
|
use12Hours: format.indexOf("A") > -1 || format.indexOf("h") > -1 || format.indexOf("a") > -1
|
|
40
34
|
});
|
|
41
35
|
const addLeadingZeros = (count) => (number) => (0, import_utils.padStart)(String(number), count, "0");
|
|
42
|
-
module.exports = __toCommonJS(timeUtils_exports);
|
|
43
36
|
//# sourceMappingURL=timeUtils.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/timeUtils.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { padStart } from './utils';\n\nexport const getVisibleTimeByFormat = (format: string) => ({\n showHours: format.indexOf('H') > -1 || format.indexOf('h') > -1 || format.indexOf('k') > -1,\n showMinutes: format.indexOf('m') > -1,\n showSeconds: format.indexOf('s') > -1,\n use12Hours: format.indexOf('A') > -1 || format.indexOf('h') > -1 || format.indexOf('a') > -1,\n});\n\nexport const addLeadingZeros = (count: number) => (number: number) => padStart(String(number), count, '0');\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyB;AAElB,MAAM,yBAAyB,CAAC,WAAoB;AAAA,EACzD,WAAW,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI;AAAA,EACzF,aAAa,OAAO,QAAQ,GAAG,IAAI;AAAA,EACnC,aAAa,OAAO,QAAQ,GAAG,IAAI;AAAA,EACnC,YAAY,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI,MAAM,OAAO,QAAQ,GAAG,IAAI;AAC5F;AAEO,MAAM,kBAAkB,CAAC,UAAkB,CAAC,WAAmB,2BAAS,OAAO,MAAM,GAAG,OAAO,GAAG;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/utils.js
CHANGED
|
@@ -21,27 +21,20 @@ var __spreadValues = (a, b) => {
|
|
|
21
21
|
return a;
|
|
22
22
|
};
|
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
24
|
var __export = (target, all) => {
|
|
26
25
|
for (var name in all)
|
|
27
26
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
27
|
};
|
|
29
|
-
var
|
|
30
|
-
if (
|
|
31
|
-
for (let key of __getOwnPropNames(
|
|
32
|
-
if (!__hasOwnProp.call(
|
|
33
|
-
__defProp(
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
33
|
}
|
|
35
|
-
return
|
|
34
|
+
return to;
|
|
36
35
|
};
|
|
37
|
-
var __toESM = (
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
41
|
-
return (module2, temp) => {
|
|
42
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
-
};
|
|
44
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
45
38
|
var utils_exports = {};
|
|
46
39
|
__export(utils_exports, {
|
|
47
40
|
addOrRemove: () => addOrRemove,
|
|
@@ -92,6 +85,7 @@ __export(utils_exports, {
|
|
|
92
85
|
uniqBy: () => import_lodash.uniqBy,
|
|
93
86
|
values: () => import_lodash.values
|
|
94
87
|
});
|
|
88
|
+
module.exports = __toCommonJS(utils_exports);
|
|
95
89
|
var React = __toESM(require("react"));
|
|
96
90
|
var import_lodash = require("lodash");
|
|
97
91
|
const cx = (...classnames) => classnames.reduce((result, cn) => `${result} ${cn || ""}`, "");
|
|
@@ -142,5 +136,4 @@ const removeUndefinedProperties = (obj) => {
|
|
|
142
136
|
return cleanObject;
|
|
143
137
|
};
|
|
144
138
|
var utils_default = {};
|
|
145
|
-
module.exports = __toCommonJS(utils_exports);
|
|
146
139
|
//# sourceMappingURL=utils.js.map
|