@elliemae/ds-pills-v2 3.60.0-next.1 → 3.60.0-next.10
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/components/Pill.js +3 -3
- package/dist/cjs/components/Pill.js.map +2 -2
- package/dist/cjs/components/index.js +0 -2
- package/dist/cjs/components/index.js.map +2 -2
- package/dist/cjs/components/styled.js +29 -10
- package/dist/cjs/components/styled.js.map +3 -3
- package/dist/cjs/components/types/DropdownPill.js +2 -2
- package/dist/cjs/components/types/DropdownPill.js.map +2 -2
- package/dist/cjs/components/types/InputPill.js +2 -2
- package/dist/cjs/components/types/InputPill.js.map +2 -2
- package/dist/cjs/components/types/LabelOnlyPill.js +8 -4
- package/dist/cjs/components/types/LabelOnlyPill.js.map +2 -2
- package/dist/cjs/components/types/LabelPill.js +8 -4
- package/dist/cjs/components/types/LabelPill.js.map +2 -2
- package/dist/cjs/components/types/MenuButtonPill.js +60 -57
- package/dist/cjs/components/types/MenuButtonPill.js.map +3 -3
- package/dist/cjs/components/types/ReadOnlyPill.js +31 -29
- package/dist/cjs/components/types/ReadOnlyPill.js.map +2 -2
- package/dist/cjs/components/types/RemovablePill.js +78 -76
- package/dist/cjs/components/types/RemovablePill.js.map +2 -2
- package/dist/cjs/components/types/ValuePill.js +9 -5
- package/dist/cjs/components/types/ValuePill.js.map +2 -2
- package/dist/cjs/constants/index.js +51 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +14 -9
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/{components/PillButton.js → parts/DSPillButton/DSPillButton.js} +15 -16
- package/dist/cjs/parts/DSPillButton/DSPillButton.js.map +7 -0
- package/dist/cjs/parts/DSPillButton/config/usePillButton.js +53 -0
- package/dist/cjs/parts/DSPillButton/config/usePillButton.js.map +7 -0
- package/dist/cjs/parts/DSPillButton/config/useValidateProps.js +40 -0
- package/dist/cjs/parts/DSPillButton/config/useValidateProps.js.map +7 -0
- package/dist/cjs/parts/DSPillButton/constants/index.js +48 -0
- package/dist/cjs/parts/DSPillButton/constants/index.js.map +7 -0
- package/dist/cjs/parts/DSPillButton/index.js +40 -0
- package/dist/cjs/parts/DSPillButton/index.js.map +7 -0
- package/dist/cjs/parts/DSPillButton/react-desc-prop-types.js +58 -0
- package/dist/cjs/parts/DSPillButton/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/DSPillGroup/DSPillGroup.js +69 -0
- package/dist/cjs/parts/DSPillGroup/DSPillGroup.js.map +7 -0
- package/dist/cjs/{DSPillDefinitions.js → parts/DSPillGroup/PillGroupCTX.js} +10 -10
- package/dist/cjs/parts/DSPillGroup/PillGroupCTX.js.map +7 -0
- package/dist/cjs/{components/PillGroup.js → parts/DSPillGroup/config/usePillGroup.js} +35 -37
- package/dist/cjs/parts/DSPillGroup/config/usePillGroup.js.map +7 -0
- package/dist/cjs/parts/DSPillGroup/config/useValidateProps.js +40 -0
- package/dist/cjs/parts/DSPillGroup/config/useValidateProps.js.map +7 -0
- package/dist/cjs/parts/DSPillGroup/constants/index.js +45 -0
- package/dist/cjs/parts/DSPillGroup/constants/index.js.map +7 -0
- package/dist/cjs/parts/DSPillGroup/index.js +42 -0
- package/dist/cjs/parts/DSPillGroup/index.js.map +7 -0
- package/dist/cjs/parts/DSPillGroup/react-desc-prop-types.js +52 -0
- package/dist/cjs/parts/DSPillGroup/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +2 -35
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/typescript-pills-v2-valid.js.map +2 -2
- package/dist/esm/components/Pill.js +1 -1
- package/dist/esm/components/Pill.js.map +1 -1
- package/dist/esm/components/index.js +0 -2
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/styled.js +29 -10
- package/dist/esm/components/styled.js.map +2 -2
- package/dist/esm/components/types/DropdownPill.js +1 -1
- package/dist/esm/components/types/DropdownPill.js.map +1 -1
- package/dist/esm/components/types/InputPill.js +1 -1
- package/dist/esm/components/types/InputPill.js.map +1 -1
- package/dist/esm/components/types/LabelOnlyPill.js +8 -4
- package/dist/esm/components/types/LabelOnlyPill.js.map +2 -2
- package/dist/esm/components/types/LabelPill.js +8 -4
- package/dist/esm/components/types/LabelPill.js.map +2 -2
- package/dist/esm/components/types/MenuButtonPill.js +60 -57
- package/dist/esm/components/types/MenuButtonPill.js.map +2 -2
- package/dist/esm/components/types/ReadOnlyPill.js +31 -29
- package/dist/esm/components/types/ReadOnlyPill.js.map +2 -2
- package/dist/esm/components/types/RemovablePill.js +78 -76
- package/dist/esm/components/types/RemovablePill.js.map +2 -2
- package/dist/esm/components/types/ValuePill.js +9 -5
- package/dist/esm/components/types/ValuePill.js.map +2 -2
- package/dist/esm/constants/index.js +21 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +8 -10
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/{components/PillButton.js → parts/DSPillButton/DSPillButton.js} +12 -13
- package/dist/esm/parts/DSPillButton/DSPillButton.js.map +7 -0
- package/dist/esm/parts/DSPillButton/config/usePillButton.js +23 -0
- package/dist/esm/parts/DSPillButton/config/usePillButton.js.map +7 -0
- package/dist/esm/parts/DSPillButton/config/useValidateProps.js +10 -0
- package/dist/esm/parts/DSPillButton/config/useValidateProps.js.map +7 -0
- package/dist/esm/parts/DSPillButton/constants/index.js +18 -0
- package/dist/esm/parts/DSPillButton/constants/index.js.map +7 -0
- package/dist/esm/parts/DSPillButton/index.js +10 -0
- package/dist/esm/parts/DSPillButton/index.js.map +7 -0
- package/dist/esm/parts/DSPillButton/react-desc-prop-types.js +33 -0
- package/dist/esm/parts/DSPillButton/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/DSPillGroup/DSPillGroup.js +39 -0
- package/dist/esm/parts/DSPillGroup/DSPillGroup.js.map +7 -0
- package/dist/esm/parts/DSPillGroup/PillGroupCTX.js +10 -0
- package/dist/esm/parts/DSPillGroup/PillGroupCTX.js.map +7 -0
- package/dist/esm/parts/DSPillGroup/config/usePillGroup.js +74 -0
- package/dist/esm/parts/DSPillGroup/config/usePillGroup.js.map +7 -0
- package/dist/esm/parts/DSPillGroup/config/useValidateProps.js +10 -0
- package/dist/esm/parts/DSPillGroup/config/useValidateProps.js.map +7 -0
- package/dist/esm/parts/DSPillGroup/constants/index.js +15 -0
- package/dist/esm/parts/DSPillGroup/constants/index.js.map +7 -0
- package/dist/esm/parts/DSPillGroup/index.js +12 -0
- package/dist/esm/parts/DSPillGroup/index.js.map +7 -0
- package/dist/esm/parts/DSPillGroup/react-desc-prop-types.js +27 -0
- package/dist/esm/parts/DSPillGroup/react-desc-prop-types.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +8 -36
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-pills-v2-valid.js.map +2 -2
- package/dist/types/components/index.d.ts +0 -2
- package/dist/types/constants/index.d.ts +14 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/{components/PillButton.d.ts → parts/DSPillButton/DSPillButton.d.ts} +3 -3
- package/dist/types/parts/DSPillButton/config/usePillButton.d.ts +9 -0
- package/dist/types/parts/DSPillButton/config/useValidateProps.d.ts +3 -0
- package/dist/types/parts/DSPillButton/constants/index.d.ts +9 -0
- package/dist/types/parts/DSPillButton/index.d.ts +2 -0
- package/dist/types/parts/DSPillButton/react-desc-prop-types.d.ts +24 -0
- package/dist/types/parts/DSPillButton/tests/DSPillButton.test.d.ts +1 -0
- package/dist/types/parts/DSPillGroup/DSPillGroup.d.ts +5 -0
- package/dist/types/parts/DSPillGroup/PillGroupCTX.d.ts +4 -0
- package/dist/types/parts/DSPillGroup/config/usePillGroup.d.ts +386 -0
- package/dist/types/parts/DSPillGroup/config/useValidateProps.d.ts +3 -0
- package/dist/types/parts/DSPillGroup/constants/index.d.ts +9 -0
- package/dist/types/parts/DSPillGroup/index.d.ts +3 -0
- package/dist/types/parts/DSPillGroup/react-desc-prop-types.d.ts +21 -0
- package/dist/types/parts/DSPillGroup/tests/DSPillGroup.test.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +2 -7
- package/dist/types/tests/DSPill.exports.test.d.ts +1 -0
- package/dist/types/tests/DSPill.get-owner-props.test.d.ts +1 -0
- package/package.json +15 -15
- package/dist/cjs/DSPillDefinitions.js.map +0 -7
- package/dist/cjs/components/PillButton.js.map +0 -7
- package/dist/cjs/components/PillGroup.js.map +0 -7
- package/dist/esm/DSPillDefinitions.js +0 -10
- package/dist/esm/DSPillDefinitions.js.map +0 -7
- package/dist/esm/components/PillButton.js.map +0 -7
- package/dist/esm/components/PillGroup.js +0 -76
- package/dist/esm/components/PillGroup.js.map +0 -7
- package/dist/types/DSPillDefinitions.d.ts +0 -3
- package/dist/types/components/PillGroup.d.ts +0 -9
|
@@ -0,0 +1,53 @@
|
|
|
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 usePillButton_exports = {};
|
|
30
|
+
__export(usePillButton_exports, {
|
|
31
|
+
usePillButton: () => usePillButton
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(usePillButton_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
|
+
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
38
|
+
var import_useValidateProps = require("./useValidateProps.js");
|
|
39
|
+
const usePillButton = (propsFromUser) => {
|
|
40
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
|
|
41
|
+
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSPillButtonPropTypesSchema);
|
|
42
|
+
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
|
|
43
|
+
const ownerProps = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
|
|
44
|
+
return import_react.default.useMemo(
|
|
45
|
+
() => ({
|
|
46
|
+
propsWithDefault,
|
|
47
|
+
xstyledProps,
|
|
48
|
+
ownerProps
|
|
49
|
+
}),
|
|
50
|
+
[propsWithDefault, xstyledProps, ownerProps]
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=usePillButton.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/DSPillButton/config/usePillButton.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault, useOwnerProps } from '@elliemae/ds-props-helpers';\n\nimport { type DSPillButtonT, DSPillButtonPropTypesSchema, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const usePillButton = (propsFromUser: DSPillButtonT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSPillButtonT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSPillButtonPropTypesSchema);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // OWNER PROPS\n // =============================================================================\n const ownerProps = useOwnerProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n ownerProps,\n }),\n [propsWithDefault, xstyledProps, ownerProps],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAgF;AAEhF,mCAA8E;AAC9E,8BAAiC;AAE1B,MAAM,gBAAgB,CAAC,kBAAuC;AAInE,QAAM,uBAAmB,sDAA0D,eAAe,yCAAY;AAC9G,gDAAiB,kBAAkB,wDAA2B;AAI9D,QAAM,mBAAe,4CAAmB,gBAAgB;AAIxD,QAAM,iBAAa,uCAAc,gBAAgB;AAUjD,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,cAAc,UAAU;AAAA,EAC7C;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 useValidateProps_exports = {};
|
|
30
|
+
__export(useValidateProps_exports, {
|
|
31
|
+
useValidateProps: () => useValidateProps
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useValidateProps_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
|
+
var import_constants = require("../constants/index.js");
|
|
37
|
+
const useValidateProps = (props, propTypes) => {
|
|
38
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSPillButtonName);
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/DSPillButton/config/useValidateProps.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSPillButtonT } from '../react-desc-prop-types.js';\nimport { DSPillButtonName } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSPillButtonT.InternalProps,\n propTypes: ValidationMap<DSPillButtonT.Props>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSPillButtonName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,uBAAiC;AAE1B,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,8DAA+B,OAAO,WAAW,iCAAgB;AACnE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
DSPillButtonName: () => DSPillButtonName,
|
|
32
|
+
DSPillV2Name: () => import_constants.DSPillV2Name,
|
|
33
|
+
PILL_BUTTON_DATA_TESTID: () => PILL_BUTTON_DATA_TESTID,
|
|
34
|
+
PILL_BUTTON_SLOTS: () => PILL_BUTTON_SLOTS
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(constants_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
+
var import_constants = require("../../../constants/index.js");
|
|
40
|
+
const DSPillButtonName = "DSPillbutton";
|
|
41
|
+
const PILL_BUTTON_SLOTS = {
|
|
42
|
+
PILL_BUTTON: "pill-button"
|
|
43
|
+
};
|
|
44
|
+
const PILL_BUTTON_DATA_TESTID = {
|
|
45
|
+
...(0, import_ds_system.slotObjectToDataTestIds)(import_constants.DSPillV2Name, PILL_BUTTON_SLOTS),
|
|
46
|
+
PILL_BUTTON: "ds-button"
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/DSPillButton/constants/index.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\nimport { DSPillV2Name } from '../../../constants/index.js';\nexport { DSPillV2Name };\n\n// This should be used only for displayName, and useValidateProps.\n// For slots definition, use parent component name\nexport const DSPillButtonName = 'DSPillbutton';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const PILL_BUTTON_SLOTS = {\n PILL_BUTTON: 'pill-button',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const PILL_BUTTON_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSPillV2Name, PILL_BUTTON_SLOTS),\n PILL_BUTTON: 'ds-button',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AACxC,uBAA6B;AAKtB,MAAM,mBAAmB;AAGzB,MAAM,oBAAoB;AAAA,EAC/B,aAAa;AACf;AAGO,MAAM,0BAA0B;AAAA,EACrC,OAAG,0CAAwB,+BAAc,iBAAiB;AAAA,EAC1D,aAAa;AACf;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 DSPillButton_exports = {};
|
|
30
|
+
__export(DSPillButton_exports, {
|
|
31
|
+
DSPillButton: () => import_DSPillButton.DSPillButton,
|
|
32
|
+
DSPillButtonName: () => import_constants.DSPillButtonName,
|
|
33
|
+
DSPillButtonWithSchema: () => import_DSPillButton.DSPillButtonWithSchema,
|
|
34
|
+
PILL_BUTTON_DATA_TESTID: () => import_constants.PILL_BUTTON_DATA_TESTID
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(DSPillButton_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_DSPillButton = require("./DSPillButton.js");
|
|
39
|
+
var import_constants = require("./constants/index.js");
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/DSPillButton/index.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { DSPillButton, DSPillButtonWithSchema } from './DSPillButton.js';\nexport { PILL_BUTTON_DATA_TESTID, DSPillButtonName } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAqD;AACrD,uBAA0D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 react_desc_prop_types_exports = {};
|
|
30
|
+
__export(react_desc_prop_types_exports, {
|
|
31
|
+
DSPillButtonPropTypes: () => DSPillButtonPropTypes,
|
|
32
|
+
DSPillButtonPropTypesSchema: () => DSPillButtonPropTypesSchema,
|
|
33
|
+
defaultProps: () => defaultProps
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_constants = require("./constants/index.js");
|
|
39
|
+
const defaultProps = {
|
|
40
|
+
type: "right",
|
|
41
|
+
width: "100%",
|
|
42
|
+
height: "100%"
|
|
43
|
+
};
|
|
44
|
+
const DSPillButtonPropTypes = {
|
|
45
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSPillV2Name, import_constants.PILL_BUTTON_SLOTS),
|
|
46
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
47
|
+
...import_ds_props_helpers.xstyledPropTypes,
|
|
48
|
+
type: import_ds_props_helpers.PropTypes.oneOf(["only", "left", "right"]).description("The position in which this button will be placed. Only used for css styling internally").defaultValue("right"),
|
|
49
|
+
width: import_ds_props_helpers.PropTypes.string.description("Width of the button").defaultValue("100%"),
|
|
50
|
+
height: import_ds_props_helpers.PropTypes.string.description("Height of the button").defaultValue("100%"),
|
|
51
|
+
innerRef: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.object, import_ds_props_helpers.PropTypes.func]).description("Inner ref to button component."),
|
|
52
|
+
"data-testid": import_ds_props_helpers.PropTypes.string.description("root element data-testid"),
|
|
53
|
+
applyAriaDisabled: import_ds_props_helpers.PropTypes.bool.description(
|
|
54
|
+
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION."
|
|
55
|
+
).defaultValue(false)
|
|
56
|
+
};
|
|
57
|
+
const DSPillButtonPropTypesSchema = DSPillButtonPropTypes;
|
|
58
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/DSPillButton/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\nimport type { DSPropTypesSchema, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSPillV2Name, PILL_BUTTON_SLOTS } from './constants/index.js';\n\nexport declare namespace DSPillButtonT {\n export interface RequiredProps {}\n\n export interface DefaultProps {\n type: 'left' | 'right' | 'only';\n width: string;\n height: string;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSPillV2Name, typeof PILL_BUTTON_SLOTS> {\n applyAriaDisabled?: boolean;\n innerRef?: TypescriptHelpersT.AnyRef<HTMLButtonElement>;\n }\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<DSButtonT.Props, 'type' | 'buttonType' | 'isV3' | 'dsButtonRoot' | 'width' | 'height'>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<DSButtonT.Props, 'type' | 'buttonType' | 'isV3' | 'dsButtonRoot' | 'width' | 'height'>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSPillButtonT.DefaultProps = {\n type: 'right',\n width: '100%',\n height: '100%',\n};\n\nexport const DSPillButtonPropTypes: DSPropTypesSchema<DSPillButtonT.Props> = {\n ...getPropsPerSlotPropTypes(DSPillV2Name, PILL_BUTTON_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf(['only', 'left', 'right'])\n .description('The position in which this button will be placed. Only used for css styling internally')\n .defaultValue('right'),\n width: PropTypes.string.description('Width of the button').defaultValue('100%'),\n height: PropTypes.string.description('Height of the button').defaultValue('100%'),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).description('Inner ref to button component.'),\n 'data-testid': PropTypes.string.description('root element data-testid'),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\n )\n .defaultValue(false),\n};\n\nexport const DSPillButtonPropTypesSchema = DSPillButtonPropTypes as unknown as ValidationMap<DSPillButtonT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AAEP,uBAAgD;AA+BzC,MAAM,eAA2C;AAAA,EACtD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACV;AAEO,MAAM,wBAAgE;AAAA,EAC3E,OAAG,kDAAyB,+BAAc,kCAAiB;AAAA,EAC3D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,kCAAU,MAAM,CAAC,QAAQ,QAAQ,OAAO,CAAC,EAC5C,YAAY,wFAAwF,EACpG,aAAa,OAAO;AAAA,EACvB,OAAO,kCAAU,OAAO,YAAY,qBAAqB,EAAE,aAAa,MAAM;AAAA,EAC9E,QAAQ,kCAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,MAAM;AAAA,EAChF,UAAU,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE,YAAY,gCAAgC;AAAA,EAC9G,eAAe,kCAAU,OAAO,YAAY,0BAA0B;AAAA,EACtE,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;AAEO,MAAM,8BAA8B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 DSPillGroup_exports = {};
|
|
30
|
+
__export(DSPillGroup_exports, {
|
|
31
|
+
DSPillGroupV2: () => DSPillGroupV2,
|
|
32
|
+
DSPillGroupV2WithSchema: () => DSPillGroupV2WithSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DSPillGroup_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_usePillGroup = require("./config/usePillGroup.js");
|
|
40
|
+
var import_PillGroupCTX = require("./PillGroupCTX.js");
|
|
41
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
42
|
+
var import_styled = require("../../components/styled.js");
|
|
43
|
+
var import_constants = require("./constants/index.js");
|
|
44
|
+
const DSPillGroupV2 = (props) => {
|
|
45
|
+
const {
|
|
46
|
+
ctxValue,
|
|
47
|
+
globalAttributes,
|
|
48
|
+
pillGroupUid,
|
|
49
|
+
ownerProps,
|
|
50
|
+
propsWithDefault: { width, children, innerRef }
|
|
51
|
+
} = (0, import_usePillGroup.usePillGroup)(props);
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PillGroupCTX.PillGroupContext.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
+
import_styled.StyledPillGroup,
|
|
54
|
+
{
|
|
55
|
+
...globalAttributes,
|
|
56
|
+
width,
|
|
57
|
+
id: pillGroupUid,
|
|
58
|
+
cols: import_react.default.Children.map(children, () => "auto"),
|
|
59
|
+
gutter: "2px",
|
|
60
|
+
innerRef,
|
|
61
|
+
...ownerProps,
|
|
62
|
+
children
|
|
63
|
+
}
|
|
64
|
+
) });
|
|
65
|
+
};
|
|
66
|
+
DSPillGroupV2.displayName = import_constants.DSPillGroupName;
|
|
67
|
+
const DSPillGroupV2WithSchema = (0, import_ds_props_helpers.describe)(DSPillGroupV2);
|
|
68
|
+
DSPillGroupV2WithSchema.propTypes = import_react_desc_prop_types.DSPillGroupPropTypesSchema;
|
|
69
|
+
//# sourceMappingURL=DSPillGroup.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/DSPillGroup/DSPillGroup.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { describe } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { usePillGroup } from './config/usePillGroup.js';\nimport { PillGroupContext } from './PillGroupCTX.js';\nimport { type DSPillGroupT, DSPillGroupPropTypesSchema } from './react-desc-prop-types.js';\n\nimport { StyledPillGroup } from '../../components/styled.js';\nimport { DSPillGroupName } from './constants/index.js';\n\nconst DSPillGroupV2: React.ComponentType<DSPillGroupT.Props> = (props) => {\n const {\n ctxValue,\n globalAttributes,\n pillGroupUid,\n ownerProps,\n propsWithDefault: { width, children, innerRef },\n } = usePillGroup(props);\n return (\n <PillGroupContext.Provider value={ctxValue}>\n <StyledPillGroup\n {...globalAttributes}\n width={width}\n id={pillGroupUid}\n cols={React.Children.map(children, () => 'auto') as string[]}\n gutter=\"2px\"\n innerRef={innerRef}\n {...ownerProps}\n >\n {children}\n </StyledPillGroup>\n </PillGroupContext.Provider>\n );\n};\n\nDSPillGroupV2.displayName = DSPillGroupName;\nconst DSPillGroupV2WithSchema = describe(DSPillGroupV2);\nDSPillGroupV2WithSchema.propTypes = DSPillGroupPropTypesSchema;\n\nexport { DSPillGroupV2, DSPillGroupV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBjB;AAnBN,8BAAyB;AACzB,mBAAkB;AAClB,0BAA6B;AAC7B,0BAAiC;AACjC,mCAA8D;AAE9D,oBAAgC;AAChC,uBAAgC;AAEhC,MAAM,gBAAyD,CAAC,UAAU;AACxE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB,EAAE,OAAO,UAAU,SAAS;AAAA,EAChD,QAAI,kCAAa,KAAK;AACtB,SACE,4CAAC,qCAAiB,UAAjB,EAA0B,OAAO,UAChC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,IAAI;AAAA,MACJ,MAAM,aAAAA,QAAM,SAAS,IAAI,UAAU,MAAM,MAAM;AAAA,MAC/C,QAAO;AAAA,MACP;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
DSPillName: () => DSPillName
|
|
29
|
+
var PillGroupCTX_exports = {};
|
|
30
|
+
__export(PillGroupCTX_exports, {
|
|
31
|
+
PillGroupContext: () => PillGroupContext,
|
|
32
|
+
default: () => PillGroupCTX_default
|
|
34
33
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(PillGroupCTX_exports);
|
|
36
35
|
var React = __toESM(require("react"));
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
const defaultContext = { onKeyboardRemove: () => null, onKeyboardNavigation: () => null };
|
|
38
|
+
const PillGroupContext = (0, import_react.createContext)(defaultContext);
|
|
39
|
+
var PillGroupCTX_default = PillGroupContext;
|
|
40
|
+
//# sourceMappingURL=PillGroupCTX.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/DSPillGroup/PillGroupCTX.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { createContext } from 'react';\nimport type { PillGroupCTX } from './config/usePillGroup.js';\n\nconst defaultContext = { onKeyboardRemove: () => null, onKeyboardNavigation: () => null } as PillGroupCTX;\n\n/** Context for cross component communication */\nexport const PillGroupContext = createContext<PillGroupCTX>(defaultContext);\n\nexport default PillGroupContext;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA8B;AAG9B,MAAM,iBAAiB,EAAE,kBAAkB,MAAM,MAAM,sBAAsB,MAAM,KAAK;AAGjF,MAAM,uBAAmB,4BAA4B,cAAc;AAE1E,IAAO,uBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -26,33 +26,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
32
|
-
DSPillGroupV2Context: () => DSPillGroupV2Context,
|
|
33
|
-
DSPillGroupV2WithSchema: () => DSPillGroupV2WithSchema
|
|
29
|
+
var usePillGroup_exports = {};
|
|
30
|
+
__export(usePillGroup_exports, {
|
|
31
|
+
usePillGroup: () => usePillGroup
|
|
34
32
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(usePillGroup_exports);
|
|
36
34
|
var React = __toESM(require("react"));
|
|
37
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
36
|
var import_react = __toESM(require("react"));
|
|
39
37
|
var import_uid = require("uid");
|
|
40
|
-
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
41
|
-
var import_styled = require("./styled.js");
|
|
42
|
-
var import_DSPillDefinitions = require("../DSPillDefinitions.js");
|
|
43
38
|
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
const globalAttrs = (0, import_ds_props_helpers.useGetGlobalAttributes)(
|
|
52
|
-
propsWithDefaults
|
|
39
|
+
var import_useValidateProps = require("./useValidateProps.js");
|
|
40
|
+
const usePillGroup = (propsFromUser) => {
|
|
41
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
|
|
42
|
+
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSPillGroupPropTypesSchema);
|
|
43
|
+
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
|
|
44
|
+
const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(
|
|
45
|
+
propsWithDefault
|
|
53
46
|
);
|
|
54
|
-
const
|
|
55
|
-
const
|
|
47
|
+
const ownerProps = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
|
|
48
|
+
const pillGroupUid = import_react.default.useMemo(() => `ds-pill-group-${(0, import_uid.uid)(5)}`, []);
|
|
56
49
|
const onKeyboardRemove = (0, import_react.useCallback)(
|
|
57
50
|
(pillUid) => {
|
|
58
51
|
const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)];
|
|
@@ -82,20 +75,25 @@ const DSPillGroupV2 = (props) => {
|
|
|
82
75
|
() => ({ onKeyboardRemove, onKeyboardNavigation }),
|
|
83
76
|
[onKeyboardRemove, onKeyboardNavigation]
|
|
84
77
|
);
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
78
|
+
return import_react.default.useMemo(
|
|
79
|
+
() => ({
|
|
80
|
+
propsWithDefault,
|
|
81
|
+
xstyledProps,
|
|
82
|
+
pillGroupUid,
|
|
83
|
+
globalAttributes,
|
|
84
|
+
ctxValue,
|
|
85
|
+
ownerProps
|
|
86
|
+
// ...eventHandlers,
|
|
87
|
+
}),
|
|
88
|
+
[
|
|
89
|
+
propsWithDefault,
|
|
90
|
+
xstyledProps,
|
|
91
|
+
pillGroupUid,
|
|
92
|
+
globalAttributes,
|
|
93
|
+
ctxValue,
|
|
94
|
+
ownerProps
|
|
95
|
+
// ...eventHandlers,
|
|
96
|
+
]
|
|
97
|
+
);
|
|
97
98
|
};
|
|
98
|
-
|
|
99
|
-
const DSPillGroupV2WithSchema = (0, import_ds_props_helpers.describe)(DSPillGroupV2);
|
|
100
|
-
DSPillGroupV2WithSchema.propTypes = import_react_desc_prop_types.DSPillGroupPropTypes;
|
|
101
|
-
//# sourceMappingURL=PillGroup.js.map
|
|
99
|
+
//# sourceMappingURL=usePillGroup.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/DSPillGroup/config/usePillGroup.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type { DSGridT } from '@elliemae/ds-grid';\nimport {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport React, { useCallback, useMemo } from 'react';\nimport { uid } from 'uid';\nimport { type DSPillGroupT, DSPillGroupPropTypesSchema, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface PillGroupCTX {\n onKeyboardRemove: (pillUid: string) => void;\n onKeyboardNavigation: (pillUid: string, step: number, e: React.KeyboardEvent) => void;\n}\n\nexport const usePillGroup = (propsFromUser: DSPillGroupT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSPillGroupT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSPillGroupPropTypesSchema);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // GLOBAL ATTRIBUTES PROPS\n // =============================================================================\n const globalAttributes = useGetGlobalAttributes<DSPillGroupT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefault,\n );\n // =============================================================================\n // OWNER PROPS\n // =============================================================================\n const ownerProps = useOwnerProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const pillGroupUid = React.useMemo(() => `ds-pill-group-${uid(5)}`, []);\n\n const onKeyboardRemove = useCallback(\n (pillUid: string) => {\n const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)] as HTMLElement[];\n\n const pillIndex = elems.findIndex((elem) => elem.id === pillUid);\n\n if (pillIndex > 0) {\n elems[pillIndex - 1].focus();\n } else if (pillIndex + 1 < elems.length) {\n elems[pillIndex + 1].focus();\n }\n },\n [pillGroupUid],\n );\n const onKeyboardNavigation = useCallback(\n (pillUid: string, step: number, e: React.KeyboardEvent) => {\n const elems = [...document.querySelectorAll(`#${pillGroupUid} .ds-pill-focus-point`)] as HTMLElement[];\n\n const pillIndex = elems.findIndex((elem) => elem.id === pillUid);\n\n if (pillIndex >= 0) {\n if (elems[pillIndex + step]) {\n e.stopPropagation();\n elems[pillIndex + step].focus();\n }\n }\n },\n [pillGroupUid],\n );\n\n const ctxValue = useMemo(\n () => ({ onKeyboardRemove, onKeyboardNavigation }),\n [onKeyboardRemove, onKeyboardNavigation],\n );\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n pillGroupUid,\n globalAttributes,\n ctxValue,\n ownerProps,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n pillGroupUid,\n globalAttributes,\n ctxValue,\n ownerProps,\n // ...eventHandlers,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAKO;AACP,mBAA4C;AAC5C,iBAAoB;AACpB,mCAA4E;AAC5E,8BAAiC;AAO1B,MAAM,eAAe,CAAC,kBAAsC;AAIjE,QAAM,uBAAmB,sDAAyD,eAAe,yCAAY;AAC7G,gDAAiB,kBAAkB,uDAA0B;AAI7D,QAAM,mBAAe,4CAAmB,gBAAgB;AAIxD,QAAM,uBAAmB;AAAA,IACvB;AAAA,EACF;AAIA,QAAM,iBAAa,uCAAc,gBAAgB;AAKjD,QAAM,eAAe,aAAAA,QAAM,QAAQ,MAAM,qBAAiB,gBAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAEtE,QAAM,uBAAmB;AAAA,IACvB,CAAC,YAAoB;AACnB,YAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,YAAY,uBAAuB,CAAC;AAEpF,YAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,UAAI,YAAY,GAAG;AACjB,cAAM,YAAY,CAAC,EAAE,MAAM;AAAA,MAC7B,WAAW,YAAY,IAAI,MAAM,QAAQ;AACvC,cAAM,YAAY,CAAC,EAAE,MAAM;AAAA,MAC7B;AAAA,IACF;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AACA,QAAM,2BAAuB;AAAA,IAC3B,CAAC,SAAiB,MAAc,MAA2B;AACzD,YAAM,QAAQ,CAAC,GAAG,SAAS,iBAAiB,IAAI,YAAY,uBAAuB,CAAC;AAEpF,YAAM,YAAY,MAAM,UAAU,CAAC,SAAS,KAAK,OAAO,OAAO;AAE/D,UAAI,aAAa,GAAG;AAClB,YAAI,MAAM,YAAY,IAAI,GAAG;AAC3B,YAAE,gBAAgB;AAClB,gBAAM,YAAY,IAAI,EAAE,MAAM;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAAC,YAAY;AAAA,EACf;AAEA,QAAM,eAAW;AAAA,IACf,OAAO,EAAE,kBAAkB,qBAAqB;AAAA,IAChD,CAAC,kBAAkB,oBAAoB;AAAA,EACzC;AAOA,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 useValidateProps_exports = {};
|
|
30
|
+
__export(useValidateProps_exports, {
|
|
31
|
+
useValidateProps: () => useValidateProps
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useValidateProps_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
|
+
var import_constants = require("../constants/index.js");
|
|
37
|
+
const useValidateProps = (props, propTypes) => {
|
|
38
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSPillGroupName);
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/DSPillGroup/config/useValidateProps.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSPillGroupT } from '../react-desc-prop-types.js';\nimport { DSPillGroupName } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSPillGroupT.InternalProps,\n propTypes: ValidationMap<DSPillGroupT.Props>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSPillGroupName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,uBAAgC;AAEzB,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,8DAA+B,OAAO,WAAW,gCAAe;AAClE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
DSPillGroupName: () => DSPillGroupName,
|
|
32
|
+
DSPillV2Name: () => import_constants.DSPillV2Name,
|
|
33
|
+
PILL_GROUP_DATA_TESTID: () => PILL_GROUP_DATA_TESTID,
|
|
34
|
+
PILL_GROUP_SLOTS: () => PILL_GROUP_SLOTS
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(constants_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
+
var import_constants = require("../../../constants/index.js");
|
|
40
|
+
const DSPillGroupName = "DSPillgroup";
|
|
41
|
+
const PILL_GROUP_SLOTS = {
|
|
42
|
+
PILL_GROUP: "pill-group"
|
|
43
|
+
};
|
|
44
|
+
const PILL_GROUP_DATA_TESTID = (0, import_ds_system.slotObjectToDataTestIds)(import_constants.DSPillV2Name, PILL_GROUP_SLOTS);
|
|
45
|
+
//# sourceMappingURL=index.js.map
|