@elliemae/ds-props-helpers 3.35.0 → 3.36.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/cjs/defaultProps/useMemoMergePropsWithDefault.js +2 -4
  2. package/dist/cjs/defaultProps/useMemoMergePropsWithDefault.js.map +1 -1
  3. package/dist/cjs/propTypes/describeConversions.js.map +1 -1
  4. package/dist/cjs/propTypes/toTypescript.js +1 -2
  5. package/dist/cjs/propTypes/toTypescript.js.map +1 -1
  6. package/dist/cjs/propsPerDataTestId/getPropsPerDatatestIdPropTypes.js.map +1 -1
  7. package/dist/cjs/propsPerSlot/getPropsPerSlotPropTypes.js.map +2 -2
  8. package/dist/cjs/useDeprecateComponent/index.js.map +1 -1
  9. package/dist/cjs/validation/errorTemplates.js.map +1 -1
  10. package/dist/cjs/validation/typescriptGuards.js +7 -14
  11. package/dist/cjs/validation/typescriptGuards.js.map +1 -1
  12. package/dist/cjs/validation/typescriptParsers.js +10 -20
  13. package/dist/cjs/validation/typescriptParsers.js.map +1 -1
  14. package/dist/cjs/validation/typescriptValidator.js +1 -2
  15. package/dist/cjs/validation/typescriptValidator.js.map +1 -1
  16. package/dist/esm/defaultProps/useMemoMergePropsWithDefault.js +2 -4
  17. package/dist/esm/defaultProps/useMemoMergePropsWithDefault.js.map +1 -1
  18. package/dist/esm/propTypes/describeConversions.js.map +1 -1
  19. package/dist/esm/propTypes/toTypescript.js +1 -2
  20. package/dist/esm/propTypes/toTypescript.js.map +1 -1
  21. package/dist/esm/propsPerDataTestId/getPropsPerDatatestIdPropTypes.js.map +1 -1
  22. package/dist/esm/propsPerSlot/getPropsPerSlotPropTypes.js.map +2 -2
  23. package/dist/esm/useDeprecateComponent/index.js.map +1 -1
  24. package/dist/esm/validation/errorTemplates.js.map +1 -1
  25. package/dist/esm/validation/typescriptGuards.js +7 -14
  26. package/dist/esm/validation/typescriptGuards.js.map +1 -1
  27. package/dist/esm/validation/typescriptParsers.js +10 -20
  28. package/dist/esm/validation/typescriptParsers.js.map +1 -1
  29. package/dist/esm/validation/typescriptValidator.js +1 -2
  30. package/dist/esm/validation/typescriptValidator.js.map +1 -1
  31. package/dist/types/globalProps/getGlobalAttributes.d.ts +1 -1
  32. package/dist/types/globalProps/useGetGlobalAttributes.d.ts +1 -366
  33. package/package.json +4 -4
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/validation/typescriptGuards.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "type GuardFn = (format: string) => boolean;\n\nexport const isPrimitiveType: GuardFn = (format) => ['string', 'number', 'boolean'].includes(format);\nexport const isUndefined: GuardFn = (format) => format === '\"undefined\"';\nexport const isNull: GuardFn = (format) => format === '\"null\"';\nexport const isUnion: GuardFn = (format) => {\n let depth = 0;\n let satisfies = false;\n format.split('').forEach((char) => {\n if (['{', '('].includes(char)) depth += 1;\n else if (['}', ')'].includes(char)) depth -= 1;\n else if (char === '|' && depth === 0) satisfies = true;\n });\n return satisfies;\n};\n\nexport const isString: GuardFn = (format) => !isUnion(format) && format[0] === '\"' && format.slice(-1) === '\"';\n\nexport const isArray: GuardFn = (format) => !isUnion(format) && format.slice(-2) === '[]';\n\nexport const isObjectOf: GuardFn = (format) =>\n format !== 'object' && !isUnion(format) && format.startsWith('{ [key: string]: ');\n\nexport const isObject: GuardFn = (format) =>\n format === 'object' || (!isUnion(format) && format[0] === '{' && format.slice(-1) === '}');\n\nexport const isFunction: GuardFn = (format) => {\n // It's isn't an union\n if (isUnion(format)) return false;\n // Has to start with (( and end with )\n if (!format.startsWith('((') && format.slice(-1) !== ')') return false;\n\n // The arrow MUST occur at depth 1 (when couting parenthesis)\n // Otherwise the only possibility is that we have \"something with parenthesis\" (look down below)\n let depth = 0;\n let arrowOccursAtDepth1 = false;\n for (let i = 0; i < format.length; i += 1) {\n const char = format[i];\n if (['{', '('].includes(char)) depth += 1;\n else if (['}', ')'].includes(char)) depth -= 1;\n else if (i < format.length - 1 && format.slice(i, i + 2) === '=>') {\n arrowOccursAtDepth1 = arrowOccursAtDepth1 || depth === 1;\n }\n }\n return arrowOccursAtDepth1;\n};\n\nexport const isJSXorNode: GuardFn = (format) => !isUnion(format) && ['React.ReactNode', 'JSX.Element'].includes(format);\n\nexport const isSomethingWithParenthesis: GuardFn = (format) =>\n !isUnion(format) && format[0] === '(' && format.slice(-1) === ')';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEhB,MAAM,kBAA2B,CAAC,WAAW,CAAC,UAAU,UAAU,SAAS,EAAE,SAAS,MAAM;AAC5F,MAAM,cAAuB,CAAC,WAAW,WAAW;AACpD,MAAM,SAAkB,CAAC,WAAW,WAAW;AAC/C,MAAM,UAAmB,CAAC,WAAW;AAC1C,MAAI,QAAQ;AACZ,MAAI,YAAY;AAChB,SAAO,MAAM,EAAE,EAAE,QAAQ,CAAC,SAAS;AACjC,QAAI,CAAC,KAAK,GAAG,EAAE,SAAS,IAAI;AAAG,eAAS;AAAA,aAC/B,CAAC,KAAK,GAAG,EAAE,SAAS,IAAI;AAAG,eAAS;AAAA,aACpC,SAAS,OAAO,UAAU;AAAG,kBAAY;AAAA,EACpD,CAAC;AACD,SAAO;AACT;AAEO,MAAM,WAAoB,CAAC,WAAW,CAAC,QAAQ,MAAM,KAAK,OAAO,CAAC,MAAM,OAAO,OAAO,MAAM,EAAE,MAAM;AAEpG,MAAM,UAAmB,CAAC,WAAW,CAAC,QAAQ,MAAM,KAAK,OAAO,MAAM,EAAE,MAAM;AAE9E,MAAM,aAAsB,CAAC,WAClC,WAAW,YAAY,CAAC,QAAQ,MAAM,KAAK,OAAO,WAAW,mBAAmB;AAE3E,MAAM,WAAoB,CAAC,WAChC,WAAW,YAAa,CAAC,QAAQ,MAAM,KAAK,OAAO,CAAC,MAAM,OAAO,OAAO,MAAM,EAAE,MAAM;AAEjF,MAAM,aAAsB,CAAC,WA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7
7
  const pushPair = () => {
8
- if (lastKey)
9
- keyValuePairs.push([lastKey, lastValue.slice(1)]);
8
+ if (lastKey) keyValuePairs.push([lastKey, lastValue.slice(1)]);
10
9
  lastKey = "";
11
10
  lastValue = "";
12
11
  shouldAppendToKey = true;
@@ -15,36 +14,27 @@ const typescriptObjectParser = (format) => {
15
14
  format.split("").forEach((char) => {
16
15
  if (char === "{") {
17
16
  depth += 1;
18
- if (depth > 1)
19
- lastValue += char;
17
+ if (depth > 1) lastValue += char;
20
18
  } else if (char === "}") {
21
- if (depth > 1)
22
- lastValue += char;
19
+ if (depth > 1) lastValue += char;
23
20
  depth -= 1;
24
- if (depth === 1)
25
- pushPair();
21
+ if (depth === 1) pushPair();
26
22
  } else if (char === ":") {
27
23
  shouldAppendToKey = false;
28
- if (depth > 1)
29
- lastValue += char;
24
+ if (depth > 1) lastValue += char;
30
25
  } else if (char === ",") {
31
- if (depth === 1)
32
- pushPair();
33
- else
34
- lastValue += char;
26
+ if (depth === 1) pushPair();
27
+ else lastValue += char;
35
28
  } else if (char === " ") {
36
- if (!shouldAppendToKey)
37
- lastValue += char;
29
+ if (!shouldAppendToKey) lastValue += char;
38
30
  } else if (char === "(") {
39
31
  depth += 1;
40
32
  lastValue += char;
41
33
  } else if (char === ")") {
42
34
  depth -= 1;
43
35
  lastValue += char;
44
- } else if (shouldAppendToKey)
45
- lastKey += char;
46
- else
47
- lastValue += char;
36
+ } else if (shouldAppendToKey) lastKey += char;
37
+ else lastValue += char;
48
38
  });
49
39
  pushPair();
50
40
  return keyValuePairs;
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/validation/typescriptParsers.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nexport const typescriptObjectParser = (format: 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.slice(1)]);\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 if (!shouldAppendToKey) lastValue += char;\n } else if (char === '(') {\n depth += 1;\n lastValue += char;\n } else if (char === ')') {\n depth -= 1;\n lastValue += char;\n } else if (shouldAppendToKey) lastKey += char;\n else lastValue += char;\n });\n pushPair();\n\n return keyValuePairs;\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACChB,MAAM,yBAAyB,CAAC,WAAmB;AACxD,QAAM,gBAAoC,CAAC;AAG3C,MAAI,UAAU;AACd,MAAI,YAAY;AAChB,MAAI,oBAAoB;AAExB,QAAM,WAAW,MAAM;AACrB,QAAI;AAAS,oBAAc,KAAK,CAAC,SAAS,UAAU,MAAM,CAAC,CAAC,CAAC;AAC7D,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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;AACT;",
6
6
  "names": []
7
7
  }
@@ -78,8 +78,7 @@ const validateObject = (schemaName, key, value, format, validationsMemo, nextVal
78
78
  throwTypeError(schemaName, key, value, format);
79
79
  return;
80
80
  }
81
- if (format === "object")
82
- return;
81
+ if (format === "object") return;
83
82
  const keyValuePairs = typescriptObjectParser(format);
84
83
  keyValuePairs.forEach(([objectKey, objectValue]) => {
85
84
  const trueKey = objectKey.slice(-1) === "?" ? objectKey.slice(0, -1) : objectKey;
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/validation/typescriptValidator.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\n/* eslint-disable max-params */\nimport type { PropsWithChildren, WeakValidationMap } from 'react';\nimport { useMemo, useRef } from 'react';\nimport type { TypescriptDocumentation } from '../propTypes/types.js';\nimport { describe } from '../propTypes/index.js';\nimport { throwRequiredError, throwTypeError } from './errorTemplates.js';\nimport {\n isArray,\n isFunction,\n isJSXorNode,\n isObject,\n isPrimitiveType,\n isSomethingWithParenthesis,\n isString,\n isUnion,\n isUndefined,\n isNull,\n isObjectOf,\n} from './typescriptGuards.js';\nimport { typescriptObjectParser } from './typescriptParsers.js';\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): value is Record<string, unknown> {\n return !(typeof value !== 'object' || Array.isArray(value));\n}\n\nconst validateObjectOf: 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 const valuesFormat = format.slice('{ [key: string]: '.length, -2);\n\n Object.keys(value).forEach((objectKey) => {\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}[${objectKey}]`,\n value[objectKey],\n valuesFormat,\n validationsMemo,\n nextValidationsMemo,\n );\n });\n};\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, trueKey);\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): 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 (isObjectOf(format)) {\n validateObjectOf(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, omitValidation } = property;\n\n const requiredConditionally = isRequiredIf && isRequiredIf(props);\n\n if (omitValidation) {\n return;\n }\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 componentDisplayName: string,\n): void => {\n if (!Boolean(componentDisplayName)) {\n throw new Error('Provide display name for the component to use for validation');\n }\n\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 DescribedComponent.displayName = componentDisplayName;\n return DescribedComponent.toTypescript();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [propTypes]);\n\n useMemo(() => {\n const nextValidationsMemo = {};\n\n validateTypescriptPropTypesImplementation(props, typescriptSchema, validationsMemo.current, nextValidationsMemo);\n validationsMemo.current = nextValidationsMemo;\n return 'WE DONT NEED RETURN just the memo';\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACIvB,SAAS,SAAS,cAAc;AAEhC,SAAS,gBAAgB;AACzB,SAAS,oBAAoB,sBAAsB;AACnD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,8BAA8B;AAmBvC,MAAM,oBAAiC,CAAC,YAAY,KAAK,OAAO,WAAW;AACzE,MAAI,UAAU,UAAa,UAAU,aAAa;AAChD,mBAAe,YAAY,KAAK,OAAO,MAAM;AAAA,EAC/C;AACF;AACA,MAAM,eAA4B,CAAC,YAAY,KAAK,OAAO,WAAW;AACpE,MAAI,UAAU,QAAQ,UAAU,QAAQ;AACtC,mBAAe,YAAY,KAAK,OAAO,MAAM;AAAA,EAC/C;AACF;AACA,MAAM,wBAAqC,CAAC,YAAY,KAAK,OAAO,WAAW;AAC7E,MAAI,OAAO,UAAU,QAAQ;AAC3B,mBAAe,YAAY,KAAK,OAAO,MAAM;AAAA,EAC/C;AACF;AAEA,MAAM,iBAA8B,CAAC,YAAY,KAAK,OAAO,WAAW;AACtE,MAAI,UAAU,OAAO,MAAM,GAAG,EAAE,GAAG;AACjC,mBAAe,YAAY,KAAK,OAAO,MAAM;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EAChF;AAEA,QAAM,kBAAkB,OAA+B,CAAC,CAAC;AAEzD,QAAM,mBAAmB,QAAQ,MAAM;AACrC,UAAM,YAAY,MAAM;AAAA,IAAC;AAEzB,UAAM,qBAAqB,SAAS,SAAS;AAC7C,uBAAmB,YAAY;AAC/B,uBAAmB,cAAc;AACjC,WAAO,mBAAmB,aAAa;AAAA,EAEzC,GAAG,CAAC,SAAS,CAAC;AAEd,UAAQ,MAAM;AACZ,UAAM,sBAAsB,CAAC;AAE7B,8CAA0C,OAAO,kBAAkB,gBAAgB,SAAS,mBAAmB;AAC/G,oBAAgB,UAAU;AAC1B,WAAO;AAAA,EAET,GAAG,CAAC,KAAK,CAAC;AACZ;",
6
6
  "names": []
7
7
  }
@@ -5,5 +5,5 @@ type GenericGlobalAttributes<T = Element> = Omit<AriaAttributes & DOMAttributes<
5
5
  tabIndex?: TypescriptHelpersT.WCAGTabIndex;
6
6
  }, 'dangerouslySetInnerHTML' | 'as'>;
7
7
  export type GlobalAttributesT<T = Element, S extends Record<string, any> = object> = Partial<Pick<S, keyof GenericGlobalAttributes<T>> & Omit<GenericGlobalAttributes<T>, keyof S>>;
8
- export declare const getGlobalAttributes: <T, S = Element, P extends Record<string, any> = object>(props: T, overrides?: Partial<GlobalAttributes<CallableFunction>>) => Partial<Pick<P, "name" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "form" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<GenericGlobalAttributes<S>, keyof P>>;
8
+ export declare const getGlobalAttributes: <T, S = Element, P extends Record<string, any> = object>(props: T, overrides?: Partial<GlobalAttributes<CallableFunction>>) => GlobalAttributesT<S, P>;
9
9
  export {};
@@ -1,368 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { GlobalAttributes } from './constants.js';
3
2
  import type { GlobalAttributesT } from './getGlobalAttributes.js';
4
- export declare const useGetGlobalAttributes: <P extends object, S = Element, T extends object = object>(props: P, overrides?: Partial<GlobalAttributes<CallableFunction>>) => Partial<Pick<T, "name" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "form" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<{
5
- name?: string | undefined;
6
- "aria-activedescendant"?: string | undefined;
7
- "aria-atomic"?: (boolean | "true" | "false") | undefined;
8
- "aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
9
- "aria-braillelabel"?: string | undefined;
10
- "aria-brailleroledescription"?: string | undefined;
11
- "aria-busy"?: (boolean | "true" | "false") | undefined;
12
- "aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
13
- "aria-colcount"?: number | undefined;
14
- "aria-colindex"?: number | undefined;
15
- "aria-colindextext"?: string | undefined;
16
- "aria-colspan"?: number | undefined;
17
- "aria-controls"?: string | undefined;
18
- "aria-current"?: boolean | "true" | "false" | "step" | "page" | "location" | "date" | "time" | undefined;
19
- "aria-describedby"?: string | undefined;
20
- "aria-description"?: string | undefined;
21
- "aria-details"?: string | undefined;
22
- "aria-disabled"?: (boolean | "true" | "false") | undefined;
23
- "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
24
- "aria-errormessage"?: string | undefined;
25
- "aria-expanded"?: (boolean | "true" | "false") | undefined;
26
- "aria-flowto"?: string | undefined;
27
- "aria-grabbed"?: (boolean | "true" | "false") | undefined;
28
- "aria-haspopup"?: boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined;
29
- "aria-hidden"?: (boolean | "true" | "false") | undefined;
30
- "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
31
- "aria-keyshortcuts"?: string | undefined;
32
- "aria-label"?: string | undefined;
33
- "aria-labelledby"?: string | undefined;
34
- "aria-level"?: number | undefined;
35
- "aria-live"?: "off" | "assertive" | "polite" | undefined;
36
- "aria-modal"?: (boolean | "true" | "false") | undefined;
37
- "aria-multiline"?: (boolean | "true" | "false") | undefined;
38
- "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
39
- "aria-orientation"?: "horizontal" | "vertical" | undefined;
40
- "aria-owns"?: string | undefined;
41
- "aria-placeholder"?: string | undefined;
42
- "aria-posinset"?: number | undefined;
43
- "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
44
- "aria-readonly"?: (boolean | "true" | "false") | undefined;
45
- "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
46
- "aria-required"?: (boolean | "true" | "false") | undefined;
47
- "aria-roledescription"?: string | undefined;
48
- "aria-rowcount"?: number | undefined;
49
- "aria-rowindex"?: number | undefined;
50
- "aria-rowindextext"?: string | undefined;
51
- "aria-rowspan"?: number | undefined;
52
- "aria-selected"?: (boolean | "true" | "false") | undefined;
53
- "aria-setsize"?: number | undefined;
54
- "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
55
- "aria-valuemax"?: number | undefined;
56
- "aria-valuemin"?: number | undefined;
57
- "aria-valuenow"?: number | undefined;
58
- "aria-valuetext"?: string | undefined;
59
- children?: import("react").ReactNode;
60
- onCopy?: import("react").ClipboardEventHandler<S> | undefined;
61
- onCopyCapture?: import("react").ClipboardEventHandler<S> | undefined;
62
- onCut?: import("react").ClipboardEventHandler<S> | undefined;
63
- onCutCapture?: import("react").ClipboardEventHandler<S> | undefined;
64
- onPaste?: import("react").ClipboardEventHandler<S> | undefined;
65
- onPasteCapture?: import("react").ClipboardEventHandler<S> | undefined;
66
- onCompositionEnd?: import("react").CompositionEventHandler<S> | undefined;
67
- onCompositionEndCapture?: import("react").CompositionEventHandler<S> | undefined;
68
- onCompositionStart?: import("react").CompositionEventHandler<S> | undefined;
69
- onCompositionStartCapture?: import("react").CompositionEventHandler<S> | undefined;
70
- onCompositionUpdate?: import("react").CompositionEventHandler<S> | undefined;
71
- onCompositionUpdateCapture?: import("react").CompositionEventHandler<S> | undefined;
72
- onFocus?: import("react").FocusEventHandler<S> | undefined;
73
- onFocusCapture?: import("react").FocusEventHandler<S> | undefined;
74
- onBlur?: import("react").FocusEventHandler<S> | undefined;
75
- onBlurCapture?: import("react").FocusEventHandler<S> | undefined;
76
- onChange?: import("react").FormEventHandler<S> | undefined;
77
- onChangeCapture?: import("react").FormEventHandler<S> | undefined;
78
- onBeforeInput?: import("react").FormEventHandler<S> | undefined;
79
- onBeforeInputCapture?: import("react").FormEventHandler<S> | undefined;
80
- onInput?: import("react").FormEventHandler<S> | undefined;
81
- onInputCapture?: import("react").FormEventHandler<S> | undefined;
82
- onReset?: import("react").FormEventHandler<S> | undefined;
83
- onResetCapture?: import("react").FormEventHandler<S> | undefined;
84
- onSubmit?: import("react").FormEventHandler<S> | undefined;
85
- onSubmitCapture?: import("react").FormEventHandler<S> | undefined;
86
- onInvalid?: import("react").FormEventHandler<S> | undefined;
87
- onInvalidCapture?: import("react").FormEventHandler<S> | undefined;
88
- onLoad?: import("react").ReactEventHandler<S> | undefined;
89
- onLoadCapture?: import("react").ReactEventHandler<S> | undefined;
90
- onError?: import("react").ReactEventHandler<S> | undefined;
91
- onErrorCapture?: import("react").ReactEventHandler<S> | undefined;
92
- onKeyDown?: import("react").KeyboardEventHandler<S> | undefined;
93
- onKeyDownCapture?: import("react").KeyboardEventHandler<S> | undefined;
94
- onKeyPress?: import("react").KeyboardEventHandler<S> | undefined;
95
- onKeyPressCapture?: import("react").KeyboardEventHandler<S> | undefined;
96
- onKeyUp?: import("react").KeyboardEventHandler<S> | undefined;
97
- onKeyUpCapture?: import("react").KeyboardEventHandler<S> | undefined;
98
- onAbort?: import("react").ReactEventHandler<S> | undefined;
99
- onAbortCapture?: import("react").ReactEventHandler<S> | undefined;
100
- onCanPlay?: import("react").ReactEventHandler<S> | undefined;
101
- onCanPlayCapture?: import("react").ReactEventHandler<S> | undefined;
102
- onCanPlayThrough?: import("react").ReactEventHandler<S> | undefined;
103
- onCanPlayThroughCapture?: import("react").ReactEventHandler<S> | undefined;
104
- onDurationChange?: import("react").ReactEventHandler<S> | undefined;
105
- onDurationChangeCapture?: import("react").ReactEventHandler<S> | undefined;
106
- onEmptied?: import("react").ReactEventHandler<S> | undefined;
107
- onEmptiedCapture?: import("react").ReactEventHandler<S> | undefined;
108
- onEncrypted?: import("react").ReactEventHandler<S> | undefined;
109
- onEncryptedCapture?: import("react").ReactEventHandler<S> | undefined;
110
- onEnded?: import("react").ReactEventHandler<S> | undefined;
111
- onEndedCapture?: import("react").ReactEventHandler<S> | undefined;
112
- onLoadedData?: import("react").ReactEventHandler<S> | undefined;
113
- onLoadedDataCapture?: import("react").ReactEventHandler<S> | undefined;
114
- onLoadedMetadata?: import("react").ReactEventHandler<S> | undefined;
115
- onLoadedMetadataCapture?: import("react").ReactEventHandler<S> | undefined;
116
- onLoadStart?: import("react").ReactEventHandler<S> | undefined;
117
- onLoadStartCapture?: import("react").ReactEventHandler<S> | undefined;
118
- onPause?: import("react").ReactEventHandler<S> | undefined;
119
- onPauseCapture?: import("react").ReactEventHandler<S> | undefined;
120
- onPlay?: import("react").ReactEventHandler<S> | undefined;
121
- onPlayCapture?: import("react").ReactEventHandler<S> | undefined;
122
- onPlaying?: import("react").ReactEventHandler<S> | undefined;
123
- onPlayingCapture?: import("react").ReactEventHandler<S> | undefined;
124
- onProgress?: import("react").ReactEventHandler<S> | undefined;
125
- onProgressCapture?: import("react").ReactEventHandler<S> | undefined;
126
- onRateChange?: import("react").ReactEventHandler<S> | undefined;
127
- onRateChangeCapture?: import("react").ReactEventHandler<S> | undefined;
128
- onResize?: import("react").ReactEventHandler<S> | undefined;
129
- onResizeCapture?: import("react").ReactEventHandler<S> | undefined;
130
- onSeeked?: import("react").ReactEventHandler<S> | undefined;
131
- onSeekedCapture?: import("react").ReactEventHandler<S> | undefined;
132
- onSeeking?: import("react").ReactEventHandler<S> | undefined;
133
- onSeekingCapture?: import("react").ReactEventHandler<S> | undefined;
134
- onStalled?: import("react").ReactEventHandler<S> | undefined;
135
- onStalledCapture?: import("react").ReactEventHandler<S> | undefined;
136
- onSuspend?: import("react").ReactEventHandler<S> | undefined;
137
- onSuspendCapture?: import("react").ReactEventHandler<S> | undefined;
138
- onTimeUpdate?: import("react").ReactEventHandler<S> | undefined;
139
- onTimeUpdateCapture?: import("react").ReactEventHandler<S> | undefined;
140
- onVolumeChange?: import("react").ReactEventHandler<S> | undefined;
141
- onVolumeChangeCapture?: import("react").ReactEventHandler<S> | undefined;
142
- onWaiting?: import("react").ReactEventHandler<S> | undefined;
143
- onWaitingCapture?: import("react").ReactEventHandler<S> | undefined;
144
- onAuxClick?: import("react").MouseEventHandler<S> | undefined;
145
- onAuxClickCapture?: import("react").MouseEventHandler<S> | undefined;
146
- onClick?: import("react").MouseEventHandler<S> | undefined;
147
- onClickCapture?: import("react").MouseEventHandler<S> | undefined;
148
- onContextMenu?: import("react").MouseEventHandler<S> | undefined;
149
- onContextMenuCapture?: import("react").MouseEventHandler<S> | undefined;
150
- onDoubleClick?: import("react").MouseEventHandler<S> | undefined;
151
- onDoubleClickCapture?: import("react").MouseEventHandler<S> | undefined;
152
- onDrag?: import("react").DragEventHandler<S> | undefined;
153
- onDragCapture?: import("react").DragEventHandler<S> | undefined;
154
- onDragEnd?: import("react").DragEventHandler<S> | undefined;
155
- onDragEndCapture?: import("react").DragEventHandler<S> | undefined;
156
- onDragEnter?: import("react").DragEventHandler<S> | undefined;
157
- onDragEnterCapture?: import("react").DragEventHandler<S> | undefined;
158
- onDragExit?: import("react").DragEventHandler<S> | undefined;
159
- onDragExitCapture?: import("react").DragEventHandler<S> | undefined;
160
- onDragLeave?: import("react").DragEventHandler<S> | undefined;
161
- onDragLeaveCapture?: import("react").DragEventHandler<S> | undefined;
162
- onDragOver?: import("react").DragEventHandler<S> | undefined;
163
- onDragOverCapture?: import("react").DragEventHandler<S> | undefined;
164
- onDragStart?: import("react").DragEventHandler<S> | undefined;
165
- onDragStartCapture?: import("react").DragEventHandler<S> | undefined;
166
- onDrop?: import("react").DragEventHandler<S> | undefined;
167
- onDropCapture?: import("react").DragEventHandler<S> | undefined;
168
- onMouseDown?: import("react").MouseEventHandler<S> | undefined;
169
- onMouseDownCapture?: import("react").MouseEventHandler<S> | undefined;
170
- onMouseEnter?: import("react").MouseEventHandler<S> | undefined;
171
- onMouseLeave?: import("react").MouseEventHandler<S> | undefined;
172
- onMouseMove?: import("react").MouseEventHandler<S> | undefined;
173
- onMouseMoveCapture?: import("react").MouseEventHandler<S> | undefined;
174
- onMouseOut?: import("react").MouseEventHandler<S> | undefined;
175
- onMouseOutCapture?: import("react").MouseEventHandler<S> | undefined;
176
- onMouseOver?: import("react").MouseEventHandler<S> | undefined;
177
- onMouseOverCapture?: import("react").MouseEventHandler<S> | undefined;
178
- onMouseUp?: import("react").MouseEventHandler<S> | undefined;
179
- onMouseUpCapture?: import("react").MouseEventHandler<S> | undefined;
180
- onSelect?: import("react").ReactEventHandler<S> | undefined;
181
- onSelectCapture?: import("react").ReactEventHandler<S> | undefined;
182
- onTouchCancel?: import("react").TouchEventHandler<S> | undefined;
183
- onTouchCancelCapture?: import("react").TouchEventHandler<S> | undefined;
184
- onTouchEnd?: import("react").TouchEventHandler<S> | undefined;
185
- onTouchEndCapture?: import("react").TouchEventHandler<S> | undefined;
186
- onTouchMove?: import("react").TouchEventHandler<S> | undefined;
187
- onTouchMoveCapture?: import("react").TouchEventHandler<S> | undefined;
188
- onTouchStart?: import("react").TouchEventHandler<S> | undefined;
189
- onTouchStartCapture?: import("react").TouchEventHandler<S> | undefined;
190
- onPointerDown?: import("react").PointerEventHandler<S> | undefined;
191
- onPointerDownCapture?: import("react").PointerEventHandler<S> | undefined;
192
- onPointerMove?: import("react").PointerEventHandler<S> | undefined;
193
- onPointerMoveCapture?: import("react").PointerEventHandler<S> | undefined;
194
- onPointerUp?: import("react").PointerEventHandler<S> | undefined;
195
- onPointerUpCapture?: import("react").PointerEventHandler<S> | undefined;
196
- onPointerCancel?: import("react").PointerEventHandler<S> | undefined;
197
- onPointerCancelCapture?: import("react").PointerEventHandler<S> | undefined;
198
- onPointerEnter?: import("react").PointerEventHandler<S> | undefined;
199
- onPointerLeave?: import("react").PointerEventHandler<S> | undefined;
200
- onPointerOver?: import("react").PointerEventHandler<S> | undefined;
201
- onPointerOverCapture?: import("react").PointerEventHandler<S> | undefined;
202
- onPointerOut?: import("react").PointerEventHandler<S> | undefined;
203
- onPointerOutCapture?: import("react").PointerEventHandler<S> | undefined;
204
- onGotPointerCapture?: import("react").PointerEventHandler<S> | undefined;
205
- onGotPointerCaptureCapture?: import("react").PointerEventHandler<S> | undefined;
206
- onLostPointerCapture?: import("react").PointerEventHandler<S> | undefined;
207
- onLostPointerCaptureCapture?: import("react").PointerEventHandler<S> | undefined;
208
- onScroll?: import("react").UIEventHandler<S> | undefined;
209
- onScrollCapture?: import("react").UIEventHandler<S> | undefined;
210
- onWheel?: import("react").WheelEventHandler<S> | undefined;
211
- onWheelCapture?: import("react").WheelEventHandler<S> | undefined;
212
- onAnimationStart?: import("react").AnimationEventHandler<S> | undefined;
213
- onAnimationStartCapture?: import("react").AnimationEventHandler<S> | undefined;
214
- onAnimationEnd?: import("react").AnimationEventHandler<S> | undefined;
215
- onAnimationEndCapture?: import("react").AnimationEventHandler<S> | undefined;
216
- onAnimationIteration?: import("react").AnimationEventHandler<S> | undefined;
217
- onAnimationIterationCapture?: import("react").AnimationEventHandler<S> | undefined;
218
- onTransitionEnd?: import("react").TransitionEventHandler<S> | undefined;
219
- onTransitionEndCapture?: import("react").TransitionEventHandler<S> | undefined;
220
- form?: string | undefined;
221
- list?: string | undefined;
222
- defaultChecked?: boolean | undefined;
223
- defaultValue?: string | number | readonly string[] | undefined;
224
- suppressContentEditableWarning?: boolean | undefined;
225
- suppressHydrationWarning?: boolean | undefined;
226
- accessKey?: string | undefined;
227
- autoFocus?: boolean | undefined;
228
- className?: string | undefined;
229
- contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
230
- contextMenu?: string | undefined;
231
- dir?: string | undefined;
232
- draggable?: (boolean | "true" | "false") | undefined;
233
- hidden?: boolean | undefined;
234
- id?: string | undefined;
235
- lang?: string | undefined;
236
- nonce?: string | undefined;
237
- slot?: string | undefined;
238
- spellCheck?: (boolean | "true" | "false") | undefined;
239
- style?: import("react").CSSProperties | undefined;
240
- tabIndex?: 0 | -1 | undefined;
241
- title?: string | undefined;
242
- translate?: "yes" | "no" | undefined;
243
- radioGroup?: string | undefined;
244
- role?: import("react").AriaRole | undefined;
245
- about?: string | undefined;
246
- content?: string | undefined;
247
- datatype?: string | undefined;
248
- inlist?: any;
249
- prefix?: string | undefined;
250
- property?: string | undefined;
251
- rel?: string | undefined;
252
- resource?: string | undefined;
253
- rev?: string | undefined;
254
- typeof?: string | undefined;
255
- vocab?: string | undefined;
256
- autoCapitalize?: string | undefined;
257
- autoCorrect?: string | undefined;
258
- autoSave?: string | undefined;
259
- color?: string | undefined;
260
- itemProp?: string | undefined;
261
- itemScope?: boolean | undefined;
262
- itemType?: string | undefined;
263
- itemID?: string | undefined;
264
- itemRef?: string | undefined;
265
- results?: number | undefined;
266
- security?: string | undefined;
267
- unselectable?: "on" | "off" | undefined;
268
- inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
269
- is?: string | undefined;
270
- accept?: string | undefined;
271
- acceptCharset?: string | undefined;
272
- action?: string | undefined;
273
- allowFullScreen?: boolean | undefined;
274
- allowTransparency?: boolean | undefined;
275
- alt?: string | undefined;
276
- async?: boolean | undefined;
277
- autoComplete?: string | undefined;
278
- autoPlay?: boolean | undefined;
279
- capture?: boolean | "user" | "environment" | undefined;
280
- cellPadding?: string | number | undefined;
281
- cellSpacing?: string | number | undefined;
282
- charSet?: string | undefined;
283
- challenge?: string | undefined;
284
- checked?: boolean | undefined;
285
- cite?: string | undefined;
286
- classID?: string | undefined;
287
- cols?: number | undefined;
288
- colSpan?: number | undefined;
289
- controls?: boolean | undefined;
290
- coords?: string | undefined;
291
- crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
292
- data?: string | undefined;
293
- dateTime?: string | undefined;
294
- default?: boolean | undefined;
295
- defer?: boolean | undefined;
296
- disabled?: boolean | undefined;
297
- download?: any;
298
- encType?: string | undefined;
299
- formAction?: string | undefined;
300
- formEncType?: string | undefined;
301
- formMethod?: string | undefined;
302
- formNoValidate?: boolean | undefined;
303
- formTarget?: string | undefined;
304
- frameBorder?: string | number | undefined;
305
- headers?: string | undefined;
306
- height?: string | number | undefined;
307
- high?: number | undefined;
308
- href?: string | undefined;
309
- hrefLang?: string | undefined;
310
- htmlFor?: string | undefined;
311
- httpEquiv?: string | undefined;
312
- integrity?: string | undefined;
313
- keyParams?: string | undefined;
314
- keyType?: string | undefined;
315
- kind?: string | undefined;
316
- label?: string | undefined;
317
- loop?: boolean | undefined;
318
- low?: number | undefined;
319
- manifest?: string | undefined;
320
- marginHeight?: number | undefined;
321
- marginWidth?: number | undefined;
322
- max?: string | number | undefined;
323
- maxLength?: number | undefined;
324
- media?: string | undefined;
325
- mediaGroup?: string | undefined;
326
- method?: string | undefined;
327
- min?: string | number | undefined;
328
- minLength?: number | undefined;
329
- multiple?: boolean | undefined;
330
- muted?: boolean | undefined;
331
- noValidate?: boolean | undefined;
332
- open?: boolean | undefined;
333
- optimum?: number | undefined;
334
- pattern?: string | undefined;
335
- placeholder?: string | undefined;
336
- playsInline?: boolean | undefined;
337
- poster?: string | undefined;
338
- preload?: string | undefined;
339
- readOnly?: boolean | undefined;
340
- required?: boolean | undefined;
341
- reversed?: boolean | undefined;
342
- rows?: number | undefined;
343
- rowSpan?: number | undefined;
344
- sandbox?: string | undefined;
345
- scope?: string | undefined;
346
- scoped?: boolean | undefined;
347
- scrolling?: string | undefined;
348
- seamless?: boolean | undefined;
349
- selected?: boolean | undefined;
350
- shape?: string | undefined;
351
- size?: number | undefined;
352
- sizes?: string | undefined;
353
- span?: number | undefined;
354
- src?: string | undefined;
355
- srcDoc?: string | undefined;
356
- srcLang?: string | undefined;
357
- srcSet?: string | undefined;
358
- start?: number | undefined;
359
- step?: string | number | undefined;
360
- summary?: string | undefined;
361
- target?: string | undefined;
362
- type?: string | undefined;
363
- useMap?: string | undefined;
364
- value?: string | number | readonly string[] | undefined;
365
- width?: string | number | undefined;
366
- wmode?: string | undefined;
367
- wrap?: string | undefined;
368
- }, keyof T>>;
3
+ export declare const useGetGlobalAttributes: <P extends object, S = Element, T extends object = object>(props: P, overrides?: Partial<GlobalAttributes<CallableFunction>>) => GlobalAttributesT<S, T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-props-helpers",
3
- "version": "3.35.0",
3
+ "version": "3.36.0-next.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Props Helpers",
6
6
  "files": [
@@ -35,12 +35,12 @@
35
35
  "dependencies": {
36
36
  "fast-deep-equal": "~3.1.3",
37
37
  "prop-types": "~15.8.1",
38
- "@elliemae/ds-system": "3.35.0",
39
- "@elliemae/ds-typescript-helpers": "3.35.0"
38
+ "@elliemae/ds-system": "3.36.0-next.1",
39
+ "@elliemae/ds-typescript-helpers": "3.36.0-next.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@elliemae/pui-cli": "~9.0.0-next.31",
43
- "@elliemae/ds-monorepo-devops": "3.35.0"
43
+ "@elliemae/ds-monorepo-devops": "3.36.0-next.1"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "lodash": "^4.17.21",