@elliemae/ds-legacy-props-helpers 1.0.0-rc.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.
- package/dist/cjs/defaultProps/index.js +36 -0
- package/dist/cjs/defaultProps/index.js.map +7 -0
- package/dist/cjs/defaultProps/useMemoMergePropsWithDefault.js +49 -0
- package/dist/cjs/defaultProps/useMemoMergePropsWithDefault.js.map +7 -0
- package/dist/cjs/getProps/index.js +42 -0
- package/dist/cjs/getProps/index.js.map +7 -0
- package/dist/cjs/globalProps/constants.js +401 -0
- package/dist/cjs/globalProps/constants.js.map +7 -0
- package/dist/cjs/globalProps/getGlobalAttributes.js +53 -0
- package/dist/cjs/globalProps/getGlobalAttributes.js.map +7 -0
- package/dist/cjs/globalProps/globalAttributesPropTypes.js +408 -0
- package/dist/cjs/globalProps/globalAttributesPropTypes.js.map +7 -0
- package/dist/cjs/globalProps/index.js +40 -0
- package/dist/cjs/globalProps/index.js.map +7 -0
- package/dist/cjs/globalProps/useGetGlobalAttributes.js +44 -0
- package/dist/cjs/globalProps/useGetGlobalAttributes.js.map +7 -0
- package/dist/cjs/index.js +59 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +4 -0
- package/dist/cjs/propTypes/PropTypes.js +142 -0
- package/dist/cjs/propTypes/PropTypes.js.map +7 -0
- package/dist/cjs/propTypes/customPropTypes.js +39 -0
- package/dist/cjs/propTypes/customPropTypes.js.map +7 -0
- package/dist/cjs/propTypes/describe.js +79 -0
- package/dist/cjs/propTypes/describe.js.map +7 -0
- package/dist/cjs/propTypes/describeConversions.js +107 -0
- package/dist/cjs/propTypes/describeConversions.js.map +7 -0
- package/dist/cjs/propTypes/describeGuards.js +50 -0
- package/dist/cjs/propTypes/describeGuards.js.map +7 -0
- package/dist/cjs/propTypes/index.js +38 -0
- package/dist/cjs/propTypes/index.js.map +7 -0
- package/dist/cjs/propTypes/toTypescript.js +151 -0
- package/dist/cjs/propTypes/toTypescript.js.map +7 -0
- package/dist/cjs/propTypes/types.js +28 -0
- package/dist/cjs/propTypes/types.js.map +7 -0
- package/dist/cjs/propsPerDataTestId/getPropsPerDatatestIdPropTypes.js +66 -0
- package/dist/cjs/propsPerDataTestId/getPropsPerDatatestIdPropTypes.js.map +7 -0
- package/dist/cjs/propsPerDataTestId/getPropsPerDatatestid.js +45 -0
- package/dist/cjs/propsPerDataTestId/getPropsPerDatatestid.js.map +7 -0
- package/dist/cjs/propsPerDataTestId/index.js +38 -0
- package/dist/cjs/propsPerDataTestId/index.js.map +7 -0
- package/dist/cjs/tests/globalProps/TestComponent.js +42 -0
- package/dist/cjs/tests/globalProps/TestComponent.js.map +7 -0
- package/dist/cjs/tests/validation/test.schema.js +72 -0
- package/dist/cjs/tests/validation/test.schema.js.map +7 -0
- package/dist/cjs/tests/xstyledProps/TestComponent.js +43 -0
- package/dist/cjs/tests/xstyledProps/TestComponent.js.map +7 -0
- package/dist/cjs/useDeprecateComponent/index.js +42 -0
- package/dist/cjs/useDeprecateComponent/index.js.map +7 -0
- package/dist/cjs/validation/errorTemplates.js +53 -0
- package/dist/cjs/validation/errorTemplates.js.map +7 -0
- package/dist/cjs/validation/index.js +40 -0
- package/dist/cjs/validation/index.js.map +7 -0
- package/dist/cjs/validation/typescriptGuards.js +86 -0
- package/dist/cjs/validation/typescriptGuards.js.map +7 -0
- package/dist/cjs/validation/typescriptParsers.js +77 -0
- package/dist/cjs/validation/typescriptParsers.js.map +7 -0
- package/dist/cjs/validation/typescriptValidator.js +220 -0
- package/dist/cjs/validation/typescriptValidator.js.map +7 -0
- package/dist/cjs/xstyledProps/constants.js +132 -0
- package/dist/cjs/xstyledProps/constants.js.map +7 -0
- package/dist/cjs/xstyledProps/index.js +38 -0
- package/dist/cjs/xstyledProps/index.js.map +7 -0
- package/dist/cjs/xstyledProps/useGetXstyledProps.js +49 -0
- package/dist/cjs/xstyledProps/useGetXstyledProps.js.map +7 -0
- package/dist/cjs/xstyledProps/xstyledPropTypes.js +127 -0
- package/dist/cjs/xstyledProps/xstyledPropTypes.js.map +7 -0
- package/dist/esm/defaultProps/index.js +6 -0
- package/dist/esm/defaultProps/index.js.map +7 -0
- package/dist/esm/defaultProps/useMemoMergePropsWithDefault.js +19 -0
- package/dist/esm/defaultProps/useMemoMergePropsWithDefault.js.map +7 -0
- package/dist/esm/getProps/index.js +12 -0
- package/dist/esm/getProps/index.js.map +7 -0
- package/dist/esm/globalProps/constants.js +371 -0
- package/dist/esm/globalProps/constants.js.map +7 -0
- package/dist/esm/globalProps/getGlobalAttributes.js +23 -0
- package/dist/esm/globalProps/getGlobalAttributes.js.map +7 -0
- package/dist/esm/globalProps/globalAttributesPropTypes.js +378 -0
- package/dist/esm/globalProps/globalAttributesPropTypes.js.map +7 -0
- package/dist/esm/globalProps/index.js +10 -0
- package/dist/esm/globalProps/index.js.map +7 -0
- package/dist/esm/globalProps/useGetGlobalAttributes.js +14 -0
- package/dist/esm/globalProps/useGetGlobalAttributes.js.map +7 -0
- package/dist/esm/index.js +38 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +4 -0
- package/dist/esm/propTypes/PropTypes.js +112 -0
- package/dist/esm/propTypes/PropTypes.js.map +7 -0
- package/dist/esm/propTypes/customPropTypes.js +9 -0
- package/dist/esm/propTypes/customPropTypes.js.map +7 -0
- package/dist/esm/propTypes/describe.js +49 -0
- package/dist/esm/propTypes/describe.js.map +7 -0
- package/dist/esm/propTypes/describeConversions.js +86 -0
- package/dist/esm/propTypes/describeConversions.js.map +7 -0
- package/dist/esm/propTypes/describeGuards.js +20 -0
- package/dist/esm/propTypes/describeGuards.js.map +7 -0
- package/dist/esm/propTypes/index.js +8 -0
- package/dist/esm/propTypes/index.js.map +7 -0
- package/dist/esm/propTypes/toTypescript.js +121 -0
- package/dist/esm/propTypes/toTypescript.js.map +7 -0
- package/dist/esm/propTypes/types.js +2 -0
- package/dist/esm/propTypes/types.js.map +7 -0
- package/dist/esm/propsPerDataTestId/getPropsPerDatatestIdPropTypes.js +36 -0
- package/dist/esm/propsPerDataTestId/getPropsPerDatatestIdPropTypes.js.map +7 -0
- package/dist/esm/propsPerDataTestId/getPropsPerDatatestid.js +15 -0
- package/dist/esm/propsPerDataTestId/getPropsPerDatatestid.js.map +7 -0
- package/dist/esm/propsPerDataTestId/index.js +8 -0
- package/dist/esm/propsPerDataTestId/index.js.map +7 -0
- package/dist/esm/tests/globalProps/TestComponent.js +12 -0
- package/dist/esm/tests/globalProps/TestComponent.js.map +7 -0
- package/dist/esm/tests/validation/test.schema.js +42 -0
- package/dist/esm/tests/validation/test.schema.js.map +7 -0
- package/dist/esm/tests/xstyledProps/TestComponent.js +13 -0
- package/dist/esm/tests/xstyledProps/TestComponent.js.map +7 -0
- package/dist/esm/useDeprecateComponent/index.js +12 -0
- package/dist/esm/useDeprecateComponent/index.js.map +7 -0
- package/dist/esm/validation/errorTemplates.js +23 -0
- package/dist/esm/validation/errorTemplates.js.map +7 -0
- package/dist/esm/validation/index.js +10 -0
- package/dist/esm/validation/index.js.map +7 -0
- package/dist/esm/validation/typescriptGuards.js +56 -0
- package/dist/esm/validation/typescriptGuards.js.map +7 -0
- package/dist/esm/validation/typescriptParsers.js +47 -0
- package/dist/esm/validation/typescriptParsers.js.map +7 -0
- package/dist/esm/validation/typescriptValidator.js +202 -0
- package/dist/esm/validation/typescriptValidator.js.map +7 -0
- package/dist/esm/xstyledProps/constants.js +102 -0
- package/dist/esm/xstyledProps/constants.js.map +7 -0
- package/dist/esm/xstyledProps/index.js +8 -0
- package/dist/esm/xstyledProps/index.js.map +7 -0
- package/dist/esm/xstyledProps/useGetXstyledProps.js +19 -0
- package/dist/esm/xstyledProps/useGetXstyledProps.js.map +7 -0
- package/dist/esm/xstyledProps/xstyledPropTypes.js +97 -0
- package/dist/esm/xstyledProps/xstyledPropTypes.js.map +7 -0
- package/dist/types/defaultProps/index.d.ts +1 -0
- package/dist/types/defaultProps/useMemoMergePropsWithDefault.d.ts +1 -0
- package/dist/types/getProps/index.d.ts +3 -0
- package/dist/types/globalProps/constants.d.ts +3 -0
- package/dist/types/globalProps/getGlobalAttributes.d.ts +6 -0
- package/dist/types/globalProps/globalAttributesPropTypes.d.ts +372 -0
- package/dist/types/globalProps/index.d.ts +3 -0
- package/dist/types/globalProps/useGetGlobalAttributes.d.ts +3 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/propTypes/PropTypes.d.ts +3 -0
- package/dist/types/propTypes/customPropTypes.d.ts +2 -0
- package/dist/types/propTypes/describe.d.ts +3 -0
- package/dist/types/propTypes/describeConversions.d.ts +3 -0
- package/dist/types/propTypes/describeGuards.d.ts +9 -0
- package/dist/types/propTypes/index.d.ts +4 -0
- package/dist/types/propTypes/toTypescript.d.ts +3 -0
- package/dist/types/propTypes/types.d.ts +118 -0
- package/dist/types/propsPerDataTestId/getPropsPerDatatestIdPropTypes.d.ts +39 -0
- package/dist/types/propsPerDataTestId/getPropsPerDatatestid.d.ts +43 -0
- package/dist/types/propsPerDataTestId/index.d.ts +2 -0
- package/dist/types/tests/globalProps/TestComponent.d.ts +1 -0
- package/dist/types/tests/globalProps/globalAttributes.test.d.ts +1 -0
- package/dist/types/tests/propsPerDataTestId/getPropsPerDatatestIdPropTypes.test.d.ts +1 -0
- package/dist/types/tests/propsPerDataTestId/getPropsPerDatatestid.test.d.ts +1 -0
- package/dist/types/tests/validation/any.validation.test.d.ts +1 -0
- package/dist/types/tests/validation/array.validation.test.d.ts +1 -0
- package/dist/types/tests/validation/boolean.validation.test.d.ts +1 -0
- package/dist/types/tests/validation/function.validation.test.d.ts +1 -0
- package/dist/types/tests/validation/isRequiredIf.validation.test.d.ts +1 -0
- package/dist/types/tests/validation/number.validation.test.d.ts +1 -0
- package/dist/types/tests/validation/object.validation.test.d.ts +1 -0
- package/dist/types/tests/validation/objectOf.validation.test.d.ts +1 -0
- package/dist/types/tests/validation/schema.validation.test.d.ts +1 -0
- package/dist/types/tests/validation/string.validation.test.d.ts +1 -0
- package/dist/types/tests/validation/test.schema.d.ts +1 -0
- package/dist/types/tests/validation/union.validation.test.d.ts +1 -0
- package/dist/types/tests/xstyledProps/TestComponent.d.ts +1 -0
- package/dist/types/tests/xstyledProps/xstyledProps.test.d.ts +1 -0
- package/dist/types/useDeprecateComponent/index.d.ts +6 -0
- package/dist/types/validation/errorTemplates.d.ts +2 -0
- package/dist/types/validation/index.d.ts +2 -0
- package/dist/types/validation/typescriptGuards.d.ts +13 -0
- package/dist/types/validation/typescriptParsers.d.ts +1 -0
- package/dist/types/validation/typescriptValidator.d.ts +4 -0
- package/dist/types/xstyledProps/constants.d.ts +7 -0
- package/dist/types/xstyledProps/index.d.ts +2 -0
- package/dist/types/xstyledProps/useGetXstyledProps.d.ts +6 -0
- package/dist/types/xstyledProps/xstyledPropTypes.d.ts +84 -0
- package/package.json +64 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
backgroundKeys: () => backgroundKeys,
|
|
32
|
+
borderKeys: () => borderKeys,
|
|
33
|
+
boxShadowKeys: () => boxShadowKeys,
|
|
34
|
+
colorKeys: () => colorKeys,
|
|
35
|
+
layoutKeys: () => layoutKeys,
|
|
36
|
+
typographyKeys: () => typographyKeys,
|
|
37
|
+
xstyledKeys: () => xstyledKeys
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(constants_exports);
|
|
40
|
+
var React = __toESM(require("react"));
|
|
41
|
+
const marginKeys = [
|
|
42
|
+
"margin",
|
|
43
|
+
"marginTop",
|
|
44
|
+
"marginRight",
|
|
45
|
+
"marginBottom",
|
|
46
|
+
"marginLeft",
|
|
47
|
+
"m",
|
|
48
|
+
"mt",
|
|
49
|
+
"mr",
|
|
50
|
+
"mb",
|
|
51
|
+
"ml",
|
|
52
|
+
"mx",
|
|
53
|
+
"my"
|
|
54
|
+
];
|
|
55
|
+
const paddingKeys = [
|
|
56
|
+
"padding",
|
|
57
|
+
"p",
|
|
58
|
+
"paddingTop",
|
|
59
|
+
"pt",
|
|
60
|
+
"paddingRight",
|
|
61
|
+
"pr",
|
|
62
|
+
"paddingBottom",
|
|
63
|
+
"pb",
|
|
64
|
+
"paddingLeft",
|
|
65
|
+
"pl",
|
|
66
|
+
"px",
|
|
67
|
+
"py"
|
|
68
|
+
];
|
|
69
|
+
const spaceKeys = ["spaceY", "spaceX", "spaceXReverse", "spaceYReverse"];
|
|
70
|
+
const widthKeys = ["width", "w", "maxWidth", "maxW", "minWidth", "minW"];
|
|
71
|
+
const heightKeys = ["height", "h", "maxHeight", "maxH", "minHeight", "minH"];
|
|
72
|
+
const maskSizeKeys = ["maskSize"];
|
|
73
|
+
const spacingKeys = [...marginKeys, ...paddingKeys, ...spaceKeys];
|
|
74
|
+
const sizingKeys = [...widthKeys, ...heightKeys, ...maskSizeKeys];
|
|
75
|
+
const layoutKeys = [
|
|
76
|
+
"display",
|
|
77
|
+
"float",
|
|
78
|
+
"boxSizing",
|
|
79
|
+
"container",
|
|
80
|
+
"overflow",
|
|
81
|
+
"overflowX",
|
|
82
|
+
"overflowY",
|
|
83
|
+
"zIndex",
|
|
84
|
+
"position",
|
|
85
|
+
"top",
|
|
86
|
+
"right",
|
|
87
|
+
"bottom",
|
|
88
|
+
"left",
|
|
89
|
+
"visibility",
|
|
90
|
+
"overscrollBehavior",
|
|
91
|
+
"objectFit"
|
|
92
|
+
];
|
|
93
|
+
const borderKeys = [
|
|
94
|
+
"border",
|
|
95
|
+
"borderTop",
|
|
96
|
+
"borderBottom",
|
|
97
|
+
"borderRight",
|
|
98
|
+
"borderLeft",
|
|
99
|
+
"borderColor",
|
|
100
|
+
"borderTopColor",
|
|
101
|
+
"borderBottomColor",
|
|
102
|
+
"borderRightColor",
|
|
103
|
+
"borderLeftColor",
|
|
104
|
+
"borderStyle",
|
|
105
|
+
"borderTopStyle",
|
|
106
|
+
"borderBottomStyle",
|
|
107
|
+
"borderRightStyle",
|
|
108
|
+
"borderLeftStyle",
|
|
109
|
+
"borderWidth",
|
|
110
|
+
"borderTopWidth",
|
|
111
|
+
"borderBottomWidth",
|
|
112
|
+
"borderRightWidth",
|
|
113
|
+
"borderLeftWidth",
|
|
114
|
+
"borderRadius"
|
|
115
|
+
];
|
|
116
|
+
const backgroundKeys = ["backgroundColor", "bg"];
|
|
117
|
+
const colorKeys = ["color"];
|
|
118
|
+
const boxShadowKeys = ["boxShadow"];
|
|
119
|
+
const typographyKeys = ["fontWeight", "textAlign"];
|
|
120
|
+
const xstyledKeys = Object.fromEntries(
|
|
121
|
+
[
|
|
122
|
+
...spacingKeys,
|
|
123
|
+
...sizingKeys,
|
|
124
|
+
...layoutKeys,
|
|
125
|
+
...borderKeys,
|
|
126
|
+
...backgroundKeys,
|
|
127
|
+
...colorKeys,
|
|
128
|
+
...boxShadowKeys,
|
|
129
|
+
...typographyKeys
|
|
130
|
+
].map((item) => [item, true])
|
|
131
|
+
);
|
|
132
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/xstyledProps/constants.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
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 = ['width', 'w', 'maxWidth', 'maxW', 'minWidth', 'minW'];\n\nconst heightKeys = ['height', '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 borderKeys = [\n 'border',\n 'borderTop',\n 'borderBottom',\n 'borderRight',\n 'borderLeft',\n 'borderColor',\n 'borderTopColor',\n 'borderBottomColor',\n 'borderRightColor',\n 'borderLeftColor',\n 'borderStyle',\n 'borderTopStyle',\n 'borderBottomStyle',\n 'borderRightStyle',\n 'borderLeftStyle',\n 'borderWidth',\n 'borderTopWidth',\n 'borderBottomWidth',\n 'borderRightWidth',\n 'borderLeftWidth',\n 'borderRadius',\n];\n\nexport const backgroundKeys = ['backgroundColor', 'bg'];\n\nexport const colorKeys = ['color'];\n\nexport const boxShadowKeys = ['boxShadow'];\n\nexport const typographyKeys = ['fontWeight', 'textAlign'];\n\nexport const xstyledKeys = Object.fromEntries(\n [\n ...spacingKeys,\n ...sizingKeys,\n ...layoutKeys,\n ...borderKeys,\n ...backgroundKeys,\n ...colorKeys,\n ...boxShadowKeys,\n ...typographyKeys,\n ].map((item) => [item, true]),\n) as Record<string, true>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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,SAAS,KAAK,YAAY,QAAQ,YAAY,MAAM;AAEvE,MAAM,aAAa,CAAC,UAAU,KAAK,aAAa,QAAQ,aAAa,MAAM;AAE3E,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,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;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,iBAAiB,CAAC,mBAAmB,IAAI;AAE/C,MAAM,YAAY,CAAC,OAAO;AAE1B,MAAM,gBAAgB,CAAC,WAAW;AAElC,MAAM,iBAAiB,CAAC,cAAc,WAAW;AAEjD,MAAM,cAAc,OAAO;AAAA,EAChC;AAAA,IACE,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,EACL,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC;AAC9B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var xstyledProps_exports = {};
|
|
30
|
+
__export(xstyledProps_exports, {
|
|
31
|
+
useGetXstyledProps: () => import_useGetXstyledProps.useGetXstyledProps,
|
|
32
|
+
xstyledPropTypes: () => import_xstyledPropTypes.xstyledPropTypes
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(xstyledProps_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_useGetXstyledProps = require("./useGetXstyledProps.js");
|
|
37
|
+
var import_xstyledPropTypes = require("./xstyledPropTypes.js");
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/xstyledProps/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { type XstyledProps, useGetXstyledProps } from './useGetXstyledProps.js';\nexport { xstyledPropTypes } from './xstyledPropTypes.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAsD;AACtD,8BAAiC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useGetXstyledProps_exports = {};
|
|
30
|
+
__export(useGetXstyledProps_exports, {
|
|
31
|
+
useGetXstyledProps: () => useGetXstyledProps
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useGetXstyledProps_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_constants = require("./constants.js");
|
|
37
|
+
const useGetXstyledProps = (props) => {
|
|
38
|
+
const componentXstyledProps = (0, import_react.useMemo)(() => {
|
|
39
|
+
const xstyledPropsObject = {};
|
|
40
|
+
Object.entries(props).forEach(([key, value]) => {
|
|
41
|
+
if (key in import_constants.xstyledKeys) {
|
|
42
|
+
xstyledPropsObject[key] = value;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return xstyledPropsObject;
|
|
46
|
+
}, [props]);
|
|
47
|
+
return componentXstyledProps;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=useGetXstyledProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/xstyledProps/useGetXstyledProps.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useMemo } from 'react';\nimport type {\n SizingProps,\n SpaceProps,\n LayoutProps,\n BoxShadowProps,\n BorderProps,\n BackgroundProps,\n} from '@elliemae/ds-legacy-system';\nimport { xstyledKeys } from './constants.js';\n\nexport interface XstyledProps\n extends SpaceProps,\n SizingProps,\n LayoutProps,\n BoxShadowProps,\n BorderProps,\n BackgroundProps {}\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwB;AASxB,uBAA4B;AAYrB,MAAM,qBAAqB,CAAK,UAA6C;AAClF,QAAM,4BAAwB,sBAAQ,MAAM;AAC1C,UAAM,qBAA8C,CAAC;AACrD,WAAO,QAAQ,KAAK,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC9C,UAAI,OAAO,8BAAa;AACtB,2BAAmB,GAAG,IAAI;AAAA,MAC5B;AAAA,IACF,CAAC;AACD,WAAO;AAAA,EACT,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var xstyledPropTypes_exports = {};
|
|
30
|
+
__export(xstyledPropTypes_exports, {
|
|
31
|
+
xstyledPropTypes: () => xstyledPropTypes
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(xstyledPropTypes_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_propTypes = require("../propTypes/index.js");
|
|
36
|
+
const xstyledGenericPropType = import_propTypes.PropTypes.oneOfType([
|
|
37
|
+
import_propTypes.PropTypes.number,
|
|
38
|
+
import_propTypes.PropTypes.string,
|
|
39
|
+
import_propTypes.PropTypes.object,
|
|
40
|
+
import_propTypes.PropTypes.bool
|
|
41
|
+
]);
|
|
42
|
+
const genericDescription = "Applies to the root container. For more info read xstyled docs";
|
|
43
|
+
const xstyledPropTypes = {
|
|
44
|
+
margin: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
45
|
+
m: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
46
|
+
marginTop: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
47
|
+
mt: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
48
|
+
marginRight: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
49
|
+
mr: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
50
|
+
marginBottom: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
51
|
+
mb: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
52
|
+
marginLeft: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
53
|
+
ml: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
54
|
+
mx: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
55
|
+
my: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
56
|
+
padding: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
57
|
+
p: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
58
|
+
paddingTop: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
59
|
+
pt: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
60
|
+
paddingRight: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
61
|
+
pr: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
62
|
+
paddingBottom: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
63
|
+
pb: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
64
|
+
paddingLeft: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
65
|
+
pl: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
66
|
+
px: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
67
|
+
py: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
68
|
+
spaceY: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
69
|
+
spaceX: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
70
|
+
spaceXReverse: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
71
|
+
spaceYReverse: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
72
|
+
w: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
73
|
+
width: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
74
|
+
maxWidth: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
75
|
+
maxW: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
76
|
+
minWidth: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
77
|
+
minW: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
78
|
+
h: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
79
|
+
height: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
80
|
+
maxHeight: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
81
|
+
maxH: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
82
|
+
minHeight: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
83
|
+
minH: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
84
|
+
maskSize: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
85
|
+
display: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
86
|
+
float: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
87
|
+
boxSizing: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
88
|
+
container: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
89
|
+
overflow: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
90
|
+
overflowX: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
91
|
+
overflowY: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
92
|
+
zIndex: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
93
|
+
position: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
94
|
+
top: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
95
|
+
right: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
96
|
+
bottom: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
97
|
+
left: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
98
|
+
visibility: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
99
|
+
overscrollBehavior: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
100
|
+
objectFit: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
101
|
+
color: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
102
|
+
bg: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
103
|
+
backgroundColor: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
104
|
+
border: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
105
|
+
borderTop: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
106
|
+
borderBottom: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
107
|
+
borderRight: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
108
|
+
borderLeft: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
109
|
+
borderColor: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
110
|
+
borderTopColor: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
111
|
+
borderBottomColor: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
112
|
+
borderRightColor: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
113
|
+
borderLeftColor: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
114
|
+
borderStyle: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
115
|
+
borderTopStyle: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
116
|
+
borderBottomStyle: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
117
|
+
borderRightStyle: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
118
|
+
borderLeftStyle: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
119
|
+
borderWidth: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
120
|
+
borderTopWidth: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
121
|
+
borderBottomWidth: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
122
|
+
borderRightWidth: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
123
|
+
borderLeftWidth: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
124
|
+
borderRadius: xstyledGenericPropType.description(genericDescription).xstyled(),
|
|
125
|
+
boxShadow: xstyledGenericPropType.description(genericDescription).xstyled()
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=xstyledPropTypes.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/xstyledProps/xstyledPropTypes.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '../propTypes/index.js';\n\n// Based on https://github.com/gregberge/xstyled/blob/c0c92b459bb3a5de46d7854be3667861f816baa5/packages/prop-types/src/index.ts\nconst xstyledGenericPropType = PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n PropTypes.object,\n PropTypes.bool,\n]);\n\nconst genericDescription = 'Applies to the root container. For more info read xstyled docs';\n\nexport const xstyledPropTypes = {\n margin: xstyledGenericPropType.description(genericDescription).xstyled(),\n m: xstyledGenericPropType.description(genericDescription).xstyled(),\n marginTop: xstyledGenericPropType.description(genericDescription).xstyled(),\n mt: xstyledGenericPropType.description(genericDescription).xstyled(),\n marginRight: xstyledGenericPropType.description(genericDescription).xstyled(),\n mr: xstyledGenericPropType.description(genericDescription).xstyled(),\n marginBottom: xstyledGenericPropType.description(genericDescription).xstyled(),\n mb: xstyledGenericPropType.description(genericDescription).xstyled(),\n marginLeft: xstyledGenericPropType.description(genericDescription).xstyled(),\n ml: xstyledGenericPropType.description(genericDescription).xstyled(),\n mx: xstyledGenericPropType.description(genericDescription).xstyled(),\n my: xstyledGenericPropType.description(genericDescription).xstyled(),\n padding: xstyledGenericPropType.description(genericDescription).xstyled(),\n p: xstyledGenericPropType.description(genericDescription).xstyled(),\n paddingTop: xstyledGenericPropType.description(genericDescription).xstyled(),\n pt: xstyledGenericPropType.description(genericDescription).xstyled(),\n paddingRight: xstyledGenericPropType.description(genericDescription).xstyled(),\n pr: xstyledGenericPropType.description(genericDescription).xstyled(),\n paddingBottom: xstyledGenericPropType.description(genericDescription).xstyled(),\n pb: xstyledGenericPropType.description(genericDescription).xstyled(),\n paddingLeft: xstyledGenericPropType.description(genericDescription).xstyled(),\n pl: xstyledGenericPropType.description(genericDescription).xstyled(),\n px: xstyledGenericPropType.description(genericDescription).xstyled(),\n py: xstyledGenericPropType.description(genericDescription).xstyled(),\n spaceY: xstyledGenericPropType.description(genericDescription).xstyled(),\n spaceX: xstyledGenericPropType.description(genericDescription).xstyled(),\n spaceXReverse: xstyledGenericPropType.description(genericDescription).xstyled(),\n spaceYReverse: xstyledGenericPropType.description(genericDescription).xstyled(),\n w: xstyledGenericPropType.description(genericDescription).xstyled(),\n width: xstyledGenericPropType.description(genericDescription).xstyled(),\n maxWidth: xstyledGenericPropType.description(genericDescription).xstyled(),\n maxW: xstyledGenericPropType.description(genericDescription).xstyled(),\n minWidth: xstyledGenericPropType.description(genericDescription).xstyled(),\n minW: xstyledGenericPropType.description(genericDescription).xstyled(),\n h: xstyledGenericPropType.description(genericDescription).xstyled(),\n height: xstyledGenericPropType.description(genericDescription).xstyled(),\n maxHeight: xstyledGenericPropType.description(genericDescription).xstyled(),\n maxH: xstyledGenericPropType.description(genericDescription).xstyled(),\n minHeight: xstyledGenericPropType.description(genericDescription).xstyled(),\n minH: xstyledGenericPropType.description(genericDescription).xstyled(),\n maskSize: xstyledGenericPropType.description(genericDescription).xstyled(),\n display: xstyledGenericPropType.description(genericDescription).xstyled(),\n float: xstyledGenericPropType.description(genericDescription).xstyled(),\n boxSizing: xstyledGenericPropType.description(genericDescription).xstyled(),\n container: xstyledGenericPropType.description(genericDescription).xstyled(),\n overflow: xstyledGenericPropType.description(genericDescription).xstyled(),\n overflowX: xstyledGenericPropType.description(genericDescription).xstyled(),\n overflowY: xstyledGenericPropType.description(genericDescription).xstyled(),\n zIndex: xstyledGenericPropType.description(genericDescription).xstyled(),\n position: xstyledGenericPropType.description(genericDescription).xstyled(),\n top: xstyledGenericPropType.description(genericDescription).xstyled(),\n right: xstyledGenericPropType.description(genericDescription).xstyled(),\n bottom: xstyledGenericPropType.description(genericDescription).xstyled(),\n left: xstyledGenericPropType.description(genericDescription).xstyled(),\n visibility: xstyledGenericPropType.description(genericDescription).xstyled(),\n overscrollBehavior: xstyledGenericPropType.description(genericDescription).xstyled(),\n objectFit: xstyledGenericPropType.description(genericDescription).xstyled(),\n color: xstyledGenericPropType.description(genericDescription).xstyled(),\n bg: xstyledGenericPropType.description(genericDescription).xstyled(),\n backgroundColor: xstyledGenericPropType.description(genericDescription).xstyled(),\n border: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderTop: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderBottom: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderRight: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderLeft: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderColor: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderTopColor: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderBottomColor: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderRightColor: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderLeftColor: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderStyle: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderTopStyle: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderBottomStyle: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderRightStyle: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderLeftStyle: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderWidth: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderTopWidth: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderBottomWidth: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderRightWidth: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderLeftWidth: xstyledGenericPropType.description(genericDescription).xstyled(),\n borderRadius: xstyledGenericPropType.description(genericDescription).xstyled(),\n boxShadow: xstyledGenericPropType.description(genericDescription).xstyled(),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA0B;AAG1B,MAAM,yBAAyB,2BAAU,UAAU;AAAA,EACjD,2BAAU;AAAA,EACV,2BAAU;AAAA,EACV,2BAAU;AAAA,EACV,2BAAU;AACZ,CAAC;AAED,MAAM,qBAAqB;AAEpB,MAAM,mBAAmB;AAAA,EAC9B,QAAQ,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EACvE,GAAG,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EAClE,WAAW,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EAC1E,IAAI,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EACnE,aAAa,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EAC5E,IAAI,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EACnE,cAAc,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EAC7E,IAAI,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EACnE,YAAY,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EAC3E,IAAI,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EACnE,IAAI,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EACnE,IAAI,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EACnE,SAAS,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAAA,EACxE,GAAG,uBAAuB,YAAY,kBAAkB,EAAE,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,QAAQ;AAAA,EAC7E,WAAW,uBAAuB,YAAY,kBAAkB,EAAE,QAAQ;AAC5E;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/defaultProps/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { useMemoMergePropsWithDefault } from './useMemoMergePropsWithDefault.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oCAAoC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
import deepequal from "fast-deep-equal/react.js";
|
|
4
|
+
const useMemoCompare = (next, compare) => {
|
|
5
|
+
const previousRef = useRef(next);
|
|
6
|
+
const previous = previousRef.current;
|
|
7
|
+
const isEqual = compare(previous, next);
|
|
8
|
+
if (!isEqual)
|
|
9
|
+
previousRef.current = next;
|
|
10
|
+
return isEqual ? previous : next;
|
|
11
|
+
};
|
|
12
|
+
const useMemoMergePropsWithDefault = (props, defaultProps, compare = deepequal) => {
|
|
13
|
+
const mergedProps = { ...defaultProps, ...props };
|
|
14
|
+
return useMemoCompare(mergedProps, compare);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
useMemoMergePropsWithDefault
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useMemoMergePropsWithDefault.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/defaultProps/useMemoMergePropsWithDefault.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useRef } from 'react';\nimport deepequal from 'fast-deep-equal/react.js';\n\n// Hook\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst useMemoCompare = <T = any>(next: T, compare: (prevToCompare: T, nextToCompare: T) => boolean): T => {\n // Ref for storing previous value\n const previousRef = useRef(next);\n const previous = previousRef.current;\n // Pass previous and next value to compare function\n // to determine whether to consider them equal.\n const isEqual = compare(previous, next);\n // If not equal update previousRef to next value.\n // We only update if not equal so that this hook continues to return\n // the same old value if compare keeps returning true.\n if (!isEqual) previousRef.current = next;\n // Finally, if equal then return the previous value\n return isEqual ? previous : next;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const useMemoMergePropsWithDefault = <T = Record<string, any>>(\n props: Partial<T>,\n defaultProps: Partial<T>,\n compare = deepequal,\n): T => {\n const mergedProps = { ...defaultProps, ...props } as T;\n\n return useMemoCompare<T>(mergedProps, compare);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,OAAO,eAAe;AAItB,MAAM,iBAAiB,CAAU,MAAS,YAAgE;AAExG,QAAM,cAAc,OAAO,IAAI;AAC/B,QAAM,WAAW,YAAY;AAG7B,QAAM,UAAU,QAAQ,UAAU,IAAI;AAItC,MAAI,CAAC;AAAS,gBAAY,UAAU;AAEpC,SAAO,UAAU,WAAW;AAC9B;AAGO,MAAM,+BAA+B,CAC1C,OACA,cACA,UAAU,cACJ;AACN,QAAM,cAAc,EAAE,GAAG,cAAc,GAAG,MAAM;AAEhD,SAAO,eAAkB,aAAa,OAAO;AAC/C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const getAriaProps = (props) => Object.fromEntries(Object.entries(props).filter(([key]) => key.startsWith("aria-")));
|
|
3
|
+
const getDataProps = (props) => Object.fromEntries(Object.entries(props).filter(([key]) => key.startsWith("data-")));
|
|
4
|
+
const getAriaOrDataProps = (props) => Object.fromEntries(
|
|
5
|
+
Object.entries(props).filter(([key]) => key.startsWith("aria-") || key.startsWith("data-"))
|
|
6
|
+
);
|
|
7
|
+
export {
|
|
8
|
+
getAriaOrDataProps,
|
|
9
|
+
getAriaProps,
|
|
10
|
+
getDataProps
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/getProps/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\n\nexport const getAriaProps = <T extends Record<string, unknown> = Record<string, unknown>>(props: T): AriaProps =>\n Object.fromEntries(Object.entries(props).filter(([key]) => key.startsWith('aria-'))) as AriaProps;\n\nexport const getDataProps = <T extends Record<string, unknown> = Record<string, unknown>>(props: T): DataProps =>\n Object.fromEntries(Object.entries(props).filter(([key]) => key.startsWith('data-'))) as DataProps;\n\nexport const getAriaOrDataProps = <T extends Record<string, unknown> = Record<string, unknown>>(\n props: T,\n): AriaAndDataProps =>\n Object.fromEntries(\n Object.entries(props).filter(([key]) => key.startsWith('aria-') || key.startsWith('data-')),\n ) as AriaAndDataProps;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEhB,MAAM,eAAe,CAA8D,UACxF,OAAO,YAAY,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,IAAI,WAAW,OAAO,CAAC,CAAC;AAE9E,MAAM,eAAe,CAA8D,UACxF,OAAO,YAAY,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,IAAI,WAAW,OAAO,CAAC,CAAC;AAE9E,MAAM,qBAAqB,CAChC,UAEA,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,IAAI,WAAW,OAAO,KAAK,IAAI,WAAW,OAAO,CAAC;AAC5F;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|