@elliemae/ds-props-helpers 1.55.0-next.7 → 1.55.0-next.8
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/cjs/getProps/index.js +30 -0
- package/cjs/getProps/index.js.map +1 -0
- package/cjs/index.js +3 -0
- package/cjs/index.js.map +1 -1
- package/esm/getProps/index.js +21 -0
- package/esm/getProps/index.js.map +1 -0
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/getProps/package.json +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
10
|
+
|
|
11
|
+
var getAriaProps = function getAriaProps(props) {
|
|
12
|
+
return Object.fromEntries(Object.entries(props).filter(function (_ref) {
|
|
13
|
+
var _ref2 = _slicedToArray__default['default'](_ref, 1),
|
|
14
|
+
key = _ref2[0];
|
|
15
|
+
|
|
16
|
+
return key.includes('aria-');
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
var getDataProps = function getDataProps(props) {
|
|
20
|
+
return Object.fromEntries(Object.entries(props).filter(function (_ref3) {
|
|
21
|
+
var _ref4 = _slicedToArray__default['default'](_ref3, 1),
|
|
22
|
+
key = _ref4[0];
|
|
23
|
+
|
|
24
|
+
return key.includes('data-');
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.getAriaProps = getAriaProps;
|
|
29
|
+
exports.getDataProps = getDataProps;
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/getProps/index.ts"],"sourcesContent":["export const getAriaProps = (props: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(props).filter(([key]) => key.includes('aria-')));\n\nexport const getDataProps = (props: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(props).filter(([key]) => key.includes('data-')));\n"],"names":["getAriaProps","props","Object","fromEntries","entries","filter","key","includes","getDataProps"],"mappings":";;;;;;;;;;IAAaA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD;AAAA,SAC1BC,MAAM,CAACC,WAAP,CAAmBD,MAAM,CAACE,OAAP,CAAeH,KAAf,EAAsBI,MAAtB,CAA6B;AAAA;AAAA,QAAEC,GAAF;;AAAA,WAAWA,GAAG,CAACC,QAAJ,CAAa,OAAb,CAAX;AAAA,GAA7B,CAAnB,CAD0B;AAAA;IAGfC,YAAY,GAAG,SAAfA,YAAe,CAACP,KAAD;AAAA,SAC1BC,MAAM,CAACC,WAAP,CAAmBD,MAAM,CAACE,OAAP,CAAeH,KAAf,EAAsBI,MAAtB,CAA6B;AAAA;AAAA,QAAEC,GAAF;;AAAA,WAAWA,GAAG,CAACC,QAAJ,CAAa,OAAb,CAAX;AAAA,GAA7B,CAAnB,CAD0B;AAAA;;;;;"}
|
package/cjs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var defaultProps_useMemoMergePropsWithDefault = require('./defaultProps/useMemoM
|
|
|
6
6
|
var validation_validator = require('./validation/validator.js');
|
|
7
7
|
var validation_errorTemplates = require('./validation/errorTemplates.js');
|
|
8
8
|
var validation_typescriptValidator = require('./validation/typescriptValidator.js');
|
|
9
|
+
var getProps_index = require('./getProps/index.js');
|
|
9
10
|
require('@babel/runtime/helpers/defineProperty');
|
|
10
11
|
require('react');
|
|
11
12
|
require('fast-deep-equal/react');
|
|
@@ -22,4 +23,6 @@ exports.throwRequiredError = validation_errorTemplates.throwRequiredError;
|
|
|
22
23
|
exports.throwTypeError = validation_errorTemplates.throwTypeError;
|
|
23
24
|
exports.useValidateTypescriptPropTypes = validation_typescriptValidator.useValidateTypescriptPropTypes;
|
|
24
25
|
exports.validateTypescriptPropTypesImplementation = validation_typescriptValidator.validateTypescriptPropTypesImplementation;
|
|
26
|
+
exports.getAriaProps = getProps_index.getAriaProps;
|
|
27
|
+
exports.getDataProps = getProps_index.getDataProps;
|
|
25
28
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';
|
|
2
|
+
|
|
3
|
+
var getAriaProps = function getAriaProps(props) {
|
|
4
|
+
return Object.fromEntries(Object.entries(props).filter(function (_ref) {
|
|
5
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
6
|
+
key = _ref2[0];
|
|
7
|
+
|
|
8
|
+
return key.includes('aria-');
|
|
9
|
+
}));
|
|
10
|
+
};
|
|
11
|
+
var getDataProps = function getDataProps(props) {
|
|
12
|
+
return Object.fromEntries(Object.entries(props).filter(function (_ref3) {
|
|
13
|
+
var _ref4 = _slicedToArray(_ref3, 1),
|
|
14
|
+
key = _ref4[0];
|
|
15
|
+
|
|
16
|
+
return key.includes('data-');
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { getAriaProps, getDataProps };
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/getProps/index.ts"],"sourcesContent":["export const getAriaProps = (props: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(props).filter(([key]) => key.includes('aria-')));\n\nexport const getDataProps = (props: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(props).filter(([key]) => key.includes('data-')));\n"],"names":["getAriaProps","props","Object","fromEntries","entries","filter","key","includes","getDataProps"],"mappings":";;IAAaA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD;AAAA,SAC1BC,MAAM,CAACC,WAAP,CAAmBD,MAAM,CAACE,OAAP,CAAeH,KAAf,EAAsBI,MAAtB,CAA6B;AAAA;AAAA,QAAEC,GAAF;;AAAA,WAAWA,GAAG,CAACC,QAAJ,CAAa,OAAb,CAAX;AAAA,GAA7B,CAAnB,CAD0B;AAAA;IAGfC,YAAY,GAAG,SAAfA,YAAe,CAACP,KAAD;AAAA,SAC1BC,MAAM,CAACC,WAAP,CAAmBD,MAAM,CAACE,OAAP,CAAeH,KAAf,EAAsBI,MAAtB,CAA6B;AAAA;AAAA,QAAEC,GAAF;;AAAA,WAAWA,GAAG,CAACC,QAAJ,CAAa,OAAb,CAAX;AAAA,GAA7B,CAAnB,CAD0B;AAAA;;;;"}
|
package/esm/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { useMemoMergePropsWithDefault } from './defaultProps/useMemoMergePropsWi
|
|
|
2
2
|
export { useValidatePropTypes } from './validation/validator.js';
|
|
3
3
|
export { throwRequiredError, throwTypeError } from './validation/errorTemplates.js';
|
|
4
4
|
export { useValidateTypescriptPropTypes, validateTypescriptPropTypesImplementation } from './validation/typescriptValidator.js';
|
|
5
|
+
export { getAriaProps, getDataProps } from './getProps/index.js';
|
|
5
6
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
6
7
|
import 'react';
|
|
7
8
|
import 'fast-deep-equal/react';
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|