@elliemae/ds-card-v3 3.26.0-next.12
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/CardV3.js +90 -0
- package/dist/cjs/CardV3.js.map +7 -0
- package/dist/cjs/CardV3Definitions.js +43 -0
- package/dist/cjs/CardV3Definitions.js.map +7 -0
- package/dist/cjs/index.js +33 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/parts/CardContent.js +54 -0
- package/dist/cjs/parts/CardContent.js.map +7 -0
- package/dist/cjs/parts/CardContext.js +42 -0
- package/dist/cjs/parts/CardContext.js.map +7 -0
- package/dist/cjs/parts/CardFocusRing.js +68 -0
- package/dist/cjs/parts/CardFocusRing.js.map +7 -0
- package/dist/cjs/parts/CardFooter.js +54 -0
- package/dist/cjs/parts/CardFooter.js.map +7 -0
- package/dist/cjs/parts/CardHeader.js +81 -0
- package/dist/cjs/parts/CardHeader.js.map +7 -0
- package/dist/cjs/parts/CardSelectIndicator.js +46 -0
- package/dist/cjs/parts/CardSelectIndicator.js.map +7 -0
- package/dist/cjs/parts/index.js +34 -0
- package/dist/cjs/parts/index.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +28 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/styled.js +115 -0
- package/dist/cjs/styled.js.map +7 -0
- package/dist/esm/CardV3.js +60 -0
- package/dist/esm/CardV3.js.map +7 -0
- package/dist/esm/CardV3Definitions.js +13 -0
- package/dist/esm/CardV3Definitions.js.map +7 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/parts/CardContent.js +24 -0
- package/dist/esm/parts/CardContent.js.map +7 -0
- package/dist/esm/parts/CardContext.js +12 -0
- package/dist/esm/parts/CardContext.js.map +7 -0
- package/dist/esm/parts/CardFocusRing.js +38 -0
- package/dist/esm/parts/CardFocusRing.js.map +7 -0
- package/dist/esm/parts/CardFooter.js +24 -0
- package/dist/esm/parts/CardFooter.js.map +7 -0
- package/dist/esm/parts/CardHeader.js +51 -0
- package/dist/esm/parts/CardHeader.js.map +7 -0
- package/dist/esm/parts/CardSelectIndicator.js +16 -0
- package/dist/esm/parts/CardSelectIndicator.js.map +7 -0
- package/dist/esm/parts/index.js +7 -0
- package/dist/esm/parts/index.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +2 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/styled.js +85 -0
- package/dist/esm/styled.js.map +7 -0
- package/dist/types/CardV3.d.ts +4 -0
- package/dist/types/CardV3Definitions.d.ts +5 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/parts/CardContent.d.ts +2 -0
- package/dist/types/parts/CardContext.d.ts +3 -0
- package/dist/types/parts/CardFocusRing.d.ts +2 -0
- package/dist/types/parts/CardFooter.d.ts +2 -0
- package/dist/types/parts/CardHeader.d.ts +2 -0
- package/dist/types/parts/CardSelectIndicator.d.ts +2 -0
- package/dist/types/parts/index.d.ts +5 -0
- package/dist/types/react-desc-prop-types.d.ts +39 -0
- package/dist/types/styled.d.ts +45 -0
- package/package.json +73 -0
|
@@ -0,0 +1,90 @@
|
|
|
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 CardV3_exports = {};
|
|
30
|
+
__export(CardV3_exports, {
|
|
31
|
+
Card: () => Card,
|
|
32
|
+
defaultProps: () => defaultProps
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(CardV3_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
var import_lodash = require("lodash");
|
|
39
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
40
|
+
var import_parts = require("./parts/index.js");
|
|
41
|
+
var import_styled = require("./styled.js");
|
|
42
|
+
var import_CardContext = require("./parts/CardContext.js");
|
|
43
|
+
var import_CardV3Definitions = require("./CardV3Definitions.js");
|
|
44
|
+
const defaultProps = {
|
|
45
|
+
hasError: false
|
|
46
|
+
};
|
|
47
|
+
const Card = (props) => {
|
|
48
|
+
const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, defaultProps);
|
|
49
|
+
const { children, hasError, disabled, isOverlay, onClick, isSelected, isMultiSelect } = propsWithDefault;
|
|
50
|
+
const StyledCardContainer = (0, import_react.useMemo)(() => {
|
|
51
|
+
if (onClick && !disabled) {
|
|
52
|
+
return import_styled.StyledButtonCard;
|
|
53
|
+
}
|
|
54
|
+
if (disabled) {
|
|
55
|
+
return import_styled.StyledCardDisabled;
|
|
56
|
+
}
|
|
57
|
+
return import_styled.StyledCard;
|
|
58
|
+
}, [disabled, onClick]);
|
|
59
|
+
const globalsAttrs = (0, import_lodash.omit)((0, import_ds_utilities.useGetGlobalAttributes)(propsWithDefault), ["cols", "rows", "wrap"]);
|
|
60
|
+
const xstyledProps = (0, import_ds_utilities.useGetXstyledProps)(propsWithDefault);
|
|
61
|
+
const getOwnerProps = (0, import_react.useCallback)(() => propsWithDefault, [propsWithDefault]);
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CardContext.CardContext.Provider, { value: { isMultiSelect, disabled, isSelected, onClick }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
StyledCardContainer,
|
|
64
|
+
{
|
|
65
|
+
border: "solid 1px neutral-100",
|
|
66
|
+
boxShadow: "xs",
|
|
67
|
+
isOverlay,
|
|
68
|
+
...globalsAttrs,
|
|
69
|
+
...xstyledProps,
|
|
70
|
+
"data-disabled": disabled,
|
|
71
|
+
"data-selected": isSelected,
|
|
72
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_parts.FocusRing, { target: `[data-testid=${import_CardV3Definitions.DSCardV3DataTestIds.ACTION_AREA}]`, hasError, children: [
|
|
73
|
+
onClick ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
|
+
import_styled.CardActionArea,
|
|
75
|
+
{
|
|
76
|
+
disabled,
|
|
77
|
+
"data-testid": import_CardV3Definitions.DSCardV3DataTestIds.ACTION_AREA,
|
|
78
|
+
"aria-selected": isSelected,
|
|
79
|
+
"aria-multiselectable": isMultiSelect,
|
|
80
|
+
"aria-disabled": disabled,
|
|
81
|
+
"aria-invalid": hasError,
|
|
82
|
+
getOwnerProps
|
|
83
|
+
}
|
|
84
|
+
) : null,
|
|
85
|
+
children
|
|
86
|
+
] })
|
|
87
|
+
}
|
|
88
|
+
) });
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=CardV3.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CardV3.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-empty-interface */\n/* eslint-disable react/display-name */\nimport React, { useMemo, useCallback } from 'react';\nimport { omit } from 'lodash';\nimport { useMemoMergePropsWithDefault, useGetXstyledProps, useGetGlobalAttributes } from '@elliemae/ds-utilities';\nimport type { CardT } from './react-desc-prop-types.js';\nimport { FocusRing } from './parts/index.js';\nimport { CardActionArea, StyledButtonCard, StyledCard, StyledCardDisabled } from './styled.js';\nimport { CardContext } from './parts/CardContext.js';\nimport { DSCardV3DataTestIds } from './CardV3Definitions.js';\n\nexport const defaultProps: CardT.DefaultProps = {\n hasError: false,\n};\n\n// create acontext\n\nexport const Card: React.ComponentType<CardT.InternalProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<CardT.Props>(props, defaultProps);\n const { children, hasError, disabled, isOverlay, onClick, isSelected, isMultiSelect } = propsWithDefault;\n\n const StyledCardContainer = useMemo(() => {\n if (onClick && !disabled) {\n return StyledButtonCard;\n }\n if (disabled) {\n return StyledCardDisabled;\n }\n return StyledCard;\n }, [disabled, onClick]);\n\n const globalsAttrs = omit(useGetGlobalAttributes(propsWithDefault), ['cols', 'rows', 'wrap']);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n const getOwnerProps = useCallback(() => propsWithDefault, [propsWithDefault]);\n\n return (\n <CardContext.Provider value={{ isMultiSelect, disabled, isSelected, onClick }}>\n <StyledCardContainer\n border=\"solid 1px neutral-100\"\n boxShadow=\"xs\"\n isOverlay={isOverlay}\n {...globalsAttrs}\n {...xstyledProps}\n data-disabled={disabled}\n data-selected={isSelected}\n >\n <FocusRing target={`[data-testid=${DSCardV3DataTestIds.ACTION_AREA}]`} hasError={hasError}>\n {onClick ? (\n <CardActionArea\n disabled={disabled}\n data-testid={DSCardV3DataTestIds.ACTION_AREA}\n aria-selected={isSelected}\n aria-multiselectable={isMultiSelect}\n aria-disabled={disabled}\n aria-invalid={hasError}\n getOwnerProps={getOwnerProps}\n />\n ) : null}\n {children}\n </FocusRing>\n </StyledCardContainer>\n </CardContext.Provider>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+Cf;AA5CR,mBAA4C;AAC5C,oBAAqB;AACrB,0BAAyF;AAEzF,mBAA0B;AAC1B,oBAAiF;AACjF,yBAA4B;AAC5B,+BAAoC;AAE7B,MAAM,eAAmC;AAAA,EAC9C,UAAU;AACZ;AAIO,MAAM,OAAiD,CAAC,UAAU;AACvE,QAAM,uBAAmB,kDAA0C,OAAO,YAAY;AACtF,QAAM,EAAE,UAAU,UAAU,UAAU,WAAW,SAAS,YAAY,cAAc,IAAI;AAExF,QAAM,0BAAsB,sBAAQ,MAAM;AACxC,QAAI,WAAW,CAAC,UAAU;AACxB,aAAO;AAAA,IACT;AACA,QAAI,UAAU;AACZ,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,GAAG,CAAC,UAAU,OAAO,CAAC;AAEtB,QAAM,mBAAe,wBAAK,4CAAuB,gBAAgB,GAAG,CAAC,QAAQ,QAAQ,MAAM,CAAC;AAC5F,QAAM,mBAAe,wCAAmB,gBAAgB;AACxD,QAAM,oBAAgB,0BAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAE5E,SACE,4CAAC,+BAAY,UAAZ,EAAqB,OAAO,EAAE,eAAe,UAAU,YAAY,QAAQ,GAC1E;AAAA,IAAC;AAAA;AAAA,MACC,QAAO;AAAA,MACP,WAAU;AAAA,MACV;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,iBAAe;AAAA,MACf,iBAAe;AAAA,MAEf,uDAAC,0BAAU,QAAQ,gBAAgB,6CAAoB,gBAAgB,UACpE;AAAA,kBACC;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,eAAa,6CAAoB;AAAA,YACjC,iBAAe;AAAA,YACf,wBAAsB;AAAA,YACtB,iBAAe;AAAA,YACf,gBAAc;AAAA,YACd;AAAA;AAAA,QACF,IACE;AAAA,QACH;AAAA,SACH;AAAA;AAAA,EACF,GACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 CardV3Definitions_exports = {};
|
|
30
|
+
__export(CardV3Definitions_exports, {
|
|
31
|
+
DSCardV3DataTestIds: () => DSCardV3DataTestIds,
|
|
32
|
+
DSCardV3Name: () => DSCardV3Name,
|
|
33
|
+
DSCardV3Slots: () => DSCardV3Slots
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(CardV3Definitions_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
+
const DSCardV3Name = "DSCardV3";
|
|
39
|
+
const DSCardV3Slots = {
|
|
40
|
+
ACTION_AREA: "action-area"
|
|
41
|
+
};
|
|
42
|
+
const DSCardV3DataTestIds = (0, import_ds_system.slotObjectToDataTestIds)(DSCardV3Name, DSCardV3Slots);
|
|
43
|
+
//# sourceMappingURL=CardV3Definitions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CardV3Definitions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSCardV3Name = 'DSCardV3';\nexport const DSCardV3Slots = {\n ACTION_AREA: 'action-area',\n};\n\nexport const DSCardV3DataTestIds = slotObjectToDataTestIds(DSCardV3Name, DSCardV3Slots);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,eAAe;AACrB,MAAM,gBAAgB;AAAA,EAC3B,aAAa;AACf;AAEO,MAAM,0BAAsB,0CAAwB,cAAc,aAAa;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
+
mod
|
|
24
|
+
));
|
|
25
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
|
+
var src_exports = {};
|
|
27
|
+
module.exports = __toCommonJS(src_exports);
|
|
28
|
+
var React = __toESM(require("react"));
|
|
29
|
+
__reExport(src_exports, require("./CardV3.js"), module.exports);
|
|
30
|
+
__reExport(src_exports, require("./CardV3Definitions.js"), module.exports);
|
|
31
|
+
__reExport(src_exports, require("./react-desc-prop-types.js"), module.exports);
|
|
32
|
+
__reExport(src_exports, require("./parts/index.js"), module.exports);
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './CardV3.js';\nexport * from './CardV3Definitions.js';\nexport * from './react-desc-prop-types.js';\nexport * from './parts/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,wBAAd;AACA,wBAAc,mCADd;AAEA,wBAAc,uCAFd;AAGA,wBAAc,6BAHd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 CardContent_exports = {};
|
|
30
|
+
__export(CardContent_exports, {
|
|
31
|
+
CardContent: () => CardContent
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(CardContent_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
37
|
+
const CardContent = (props) => {
|
|
38
|
+
const { children, ...rest } = props;
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
import_ds_grid.Grid,
|
|
41
|
+
{
|
|
42
|
+
"data-type": "card-content",
|
|
43
|
+
gutter: "xxs",
|
|
44
|
+
px: "xs",
|
|
45
|
+
py: "xxs",
|
|
46
|
+
paddingTop: "0px",
|
|
47
|
+
minHeight: "64px",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
...rest,
|
|
50
|
+
children
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=CardContent.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/CardContent.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport type { CardT } from '../react-desc-prop-types.js';\n\nexport const CardContent = (props: CardT.CardElementsProps) => {\n const { children, ...rest } = props;\n return (\n <Grid\n data-type=\"card-content\"\n gutter=\"xxs\"\n px=\"xs\"\n py=\"xxs\"\n paddingTop=\"0px\"\n minHeight=\"64px\"\n alignItems=\"center\"\n {...rest}\n >\n {children}\n </Grid>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOnB;AANJ,qBAAqB;AAGd,MAAM,cAAc,CAAC,UAAmC;AAC7D,QAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAC9B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,QAAO;AAAA,MACP,IAAG;AAAA,MACH,IAAG;AAAA,MACH,YAAW;AAAA,MACX,WAAU;AAAA,MACV,YAAW;AAAA,MACV,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 CardContext_exports = {};
|
|
30
|
+
__export(CardContext_exports, {
|
|
31
|
+
CardContext: () => CardContext
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(CardContext_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
const defaultContext = {
|
|
37
|
+
isSelected: false,
|
|
38
|
+
isMultiSelect: false,
|
|
39
|
+
disabled: false
|
|
40
|
+
};
|
|
41
|
+
const CardContext = import_react.default.createContext(defaultContext);
|
|
42
|
+
//# sourceMappingURL=CardContext.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/CardContext.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport type { CardContextProps } from '../react-desc-prop-types.js';\n\nconst defaultContext: CardContextProps = {\n isSelected: false,\n isMultiSelect: false,\n disabled: false,\n};\n\nexport const CardContext = React.createContext<CardContextProps>(defaultContext);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAGlB,MAAM,iBAAmC;AAAA,EACvC,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,UAAU;AACZ;AAEO,MAAM,cAAc,aAAAA,QAAM,cAAgC,cAAc;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 CardFocusRing_exports = {};
|
|
30
|
+
__export(CardFocusRing_exports, {
|
|
31
|
+
FocusRing: () => FocusRing
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(CardFocusRing_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_styled = require("../styled.js");
|
|
38
|
+
const FocusRing = (props) => {
|
|
39
|
+
const { target, children, hasError } = props;
|
|
40
|
+
const [showFocusRing, setShowFocusingRing] = import_react.default.useState(false);
|
|
41
|
+
const handleOnFocus = import_react.default.useCallback(
|
|
42
|
+
(e) => {
|
|
43
|
+
if (e.target.matches(target)) {
|
|
44
|
+
setShowFocusingRing(true);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
[target]
|
|
48
|
+
);
|
|
49
|
+
const handleOnBlur = import_react.default.useCallback(
|
|
50
|
+
(e) => {
|
|
51
|
+
if (e.target.matches(target)) {
|
|
52
|
+
setShowFocusingRing(false);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
[target]
|
|
56
|
+
);
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
+
import_styled.StyledFocusRing,
|
|
59
|
+
{
|
|
60
|
+
hasError,
|
|
61
|
+
onFocusCapture: handleOnFocus,
|
|
62
|
+
onBlurCapture: handleOnBlur,
|
|
63
|
+
showFocusRing,
|
|
64
|
+
children
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=CardFocusRing.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/CardFocusRing.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { StyledFocusRing } from '../styled.js';\nimport { type CardT } from '../react-desc-prop-types.js';\n\nexport const FocusRing = (props: CardT.FocusRingProps) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { target, children, hasError } = props;\n const [showFocusRing, setShowFocusingRing] = React.useState(false);\n const handleOnFocus: React.FocusEventHandler<HTMLDivElement> = React.useCallback(\n (e) => {\n if (e.target.matches(target)) {\n setShowFocusingRing(true);\n }\n },\n [target],\n );\n\n const handleOnBlur: React.FocusEventHandler<HTMLDivElement> = React.useCallback(\n (e) => {\n if (e.target.matches(target)) {\n setShowFocusingRing(false);\n }\n },\n [target],\n );\n return (\n <StyledFocusRing\n hasError={hasError}\n onFocusCapture={handleOnFocus}\n onBlurCapture={handleOnBlur}\n showFocusRing={showFocusRing}\n >\n {children}\n </StyledFocusRing>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AA1BJ,mBAAkB;AAClB,oBAAgC;AAGzB,MAAM,YAAY,CAAC,UAAgC;AAExD,QAAM,EAAE,QAAQ,UAAU,SAAS,IAAI;AACvC,QAAM,CAAC,eAAe,mBAAmB,IAAI,aAAAA,QAAM,SAAS,KAAK;AACjE,QAAM,gBAAyD,aAAAA,QAAM;AAAA,IACnE,CAAC,MAAM;AACL,UAAI,EAAE,OAAO,QAAQ,MAAM,GAAG;AAC5B,4BAAoB,IAAI;AAAA,MAC1B;AAAA,IACF;AAAA,IACA,CAAC,MAAM;AAAA,EACT;AAEA,QAAM,eAAwD,aAAAA,QAAM;AAAA,IAClE,CAAC,MAAM;AACL,UAAI,EAAE,OAAO,QAAQ,MAAM,GAAG;AAC5B,4BAAoB,KAAK;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,CAAC,MAAM;AAAA,EACT;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,gBAAgB;AAAA,MAChB,eAAe;AAAA,MACf;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 CardFooter_exports = {};
|
|
30
|
+
__export(CardFooter_exports, {
|
|
31
|
+
CardFooter: () => CardFooter
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(CardFooter_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
37
|
+
const CardFooter = (props) => {
|
|
38
|
+
const { children, ...rest } = props;
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
import_ds_grid.Grid,
|
|
41
|
+
{
|
|
42
|
+
"data-type": "card-footer",
|
|
43
|
+
px: "xs",
|
|
44
|
+
py: "xxs",
|
|
45
|
+
gutter: "xxs",
|
|
46
|
+
borderTop: "1px solid #CBCFD7",
|
|
47
|
+
minHeight: "40px",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
...rest,
|
|
50
|
+
children
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=CardFooter.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/CardFooter.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport type { CardT } from '../react-desc-prop-types.js';\n\nexport const CardFooter = (props: CardT.CardElementsProps) => {\n const { children, ...rest } = props;\n return (\n <Grid\n data-type=\"card-footer\"\n px=\"xs\"\n py=\"xxs\"\n gutter=\"xxs\"\n borderTop=\"1px solid #CBCFD7\"\n minHeight=\"40px\"\n alignItems=\"center\"\n {...rest}\n >\n {children}\n </Grid>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOnB;AANJ,qBAAqB;AAGd,MAAM,aAAa,CAAC,UAAmC;AAC5D,QAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAC9B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,IAAG;AAAA,MACH,IAAG;AAAA,MACH,QAAO;AAAA,MACP,WAAU;AAAA,MACV,WAAU;AAAA,MACV,YAAW;AAAA,MACV,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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 CardHeader_exports = {};
|
|
30
|
+
__export(CardHeader_exports, {
|
|
31
|
+
CardHeader: () => CardHeader
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(CardHeader_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
38
|
+
var import_CardSelectIndicator = require("./CardSelectIndicator.js");
|
|
39
|
+
var import_CardContext = require("./CardContext.js");
|
|
40
|
+
const CardHeader = (props) => {
|
|
41
|
+
const { isSelected, isMultiSelect, onClick } = import_react.default.useContext(import_CardContext.CardContext);
|
|
42
|
+
const { children, ...rest } = props;
|
|
43
|
+
if (isSelected !== void 0 && isMultiSelect && onClick) {
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
45
|
+
import_ds_grid.Grid,
|
|
46
|
+
{
|
|
47
|
+
cols: ["12px", "auto"],
|
|
48
|
+
"data-type": "card-header",
|
|
49
|
+
padding: "xxxs",
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
minHeight: "56px",
|
|
52
|
+
...rest,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CardSelectIndicator.CardSelectIndicator, { isSelected, isMultiSelect }),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { py: "xxxs", paddingRight: "xxs2", children })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
if (isSelected !== void 0 && !isMultiSelect && onClick) {
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
62
|
+
import_ds_grid.Grid,
|
|
63
|
+
{
|
|
64
|
+
cols: ["16px", "auto"],
|
|
65
|
+
"data-type": "card-header",
|
|
66
|
+
gutter: "xxs",
|
|
67
|
+
px: "xs",
|
|
68
|
+
py: "xxs",
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
minHeight: "56px",
|
|
71
|
+
...rest,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CardSelectIndicator.CardSelectIndicator, { isSelected, isMultiSelect }),
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { py: "xxxs", paddingRight: "xxs2", children })
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { "data-type": "card-header", px: "xs", py: "xxs", gutter: "xxs", alignItems: "center", minHeight: "56px", ...rest, children });
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=CardHeader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/CardHeader.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { CardSelectIndicator } from './CardSelectIndicator.js';\nimport { CardContext } from './CardContext.js';\nimport type { CardT } from '../react-desc-prop-types.js';\n\nexport const CardHeader = (props: CardT.CardElementsProps) => {\n const { isSelected, isMultiSelect, onClick } = React.useContext(CardContext);\n const { children, ...rest } = props;\n if (isSelected !== undefined && isMultiSelect && onClick) {\n return (\n <Grid\n cols={['12px', 'auto']}\n data-type=\"card-header\"\n padding=\"xxxs\"\n alignItems=\"center\"\n minHeight=\"56px\"\n {...rest}\n >\n <CardSelectIndicator isSelected={isSelected} isMultiSelect={isMultiSelect} />\n <Grid py=\"xxxs\" paddingRight=\"xxs2\">\n {children}\n </Grid>\n </Grid>\n );\n }\n if (isSelected !== undefined && !isMultiSelect && onClick) {\n return (\n <Grid\n cols={['16px', 'auto']}\n data-type=\"card-header\"\n gutter=\"xxs\"\n px=\"xs\"\n py=\"xxs\"\n alignItems=\"center\"\n minHeight=\"56px\"\n {...rest}\n >\n <CardSelectIndicator isSelected={isSelected} isMultiSelect={isMultiSelect} />\n <Grid py=\"xxxs\" paddingRight=\"xxs2\">\n {children}\n </Grid>\n </Grid>\n );\n }\n return (\n <Grid data-type=\"card-header\" px=\"xs\" py=\"xxs\" gutter=\"xxs\" alignItems=\"center\" minHeight=\"56px\" {...rest}>\n {children}\n </Grid>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWjB;AAXN,mBAAkB;AAClB,qBAAqB;AACrB,iCAAoC;AACpC,yBAA4B;AAGrB,MAAM,aAAa,CAAC,UAAmC;AAC5D,QAAM,EAAE,YAAY,eAAe,QAAQ,IAAI,aAAAA,QAAM,WAAW,8BAAW;AAC3E,QAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAC9B,MAAI,eAAe,UAAa,iBAAiB,SAAS;AACxD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,CAAC,QAAQ,MAAM;AAAA,QACrB,aAAU;AAAA,QACV,SAAQ;AAAA,QACR,YAAW;AAAA,QACX,WAAU;AAAA,QACT,GAAG;AAAA,QAEJ;AAAA,sDAAC,kDAAoB,YAAwB,eAA8B;AAAA,UAC3E,4CAAC,uBAAK,IAAG,QAAO,cAAa,QAC1B,UACH;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,MAAI,eAAe,UAAa,CAAC,iBAAiB,SAAS;AACzD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,CAAC,QAAQ,MAAM;AAAA,QACrB,aAAU;AAAA,QACV,QAAO;AAAA,QACP,IAAG;AAAA,QACH,IAAG;AAAA,QACH,YAAW;AAAA,QACX,WAAU;AAAA,QACT,GAAG;AAAA,QAEJ;AAAA,sDAAC,kDAAoB,YAAwB,eAA8B;AAAA,UAC3E,4CAAC,uBAAK,IAAG,QAAO,cAAa,QAC1B,UACH;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,SACE,4CAAC,uBAAK,aAAU,eAAc,IAAG,MAAK,IAAG,OAAM,QAAO,OAAM,YAAW,UAAS,WAAU,QAAQ,GAAG,MAClG,UACH;AAEJ;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 CardSelectIndicator_exports = {};
|
|
30
|
+
__export(CardSelectIndicator_exports, {
|
|
31
|
+
CardSelectIndicator: () => CardSelectIndicator
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(CardSelectIndicator_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
37
|
+
var import_ds_form_radio = require("@elliemae/ds-form-radio");
|
|
38
|
+
var import_styled = require("../styled.js");
|
|
39
|
+
const CardSelectIndicator = (props) => {
|
|
40
|
+
const { isSelected, isMultiSelect } = props;
|
|
41
|
+
if (!isMultiSelect) {
|
|
42
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { alignItems: "center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form_radio.PresentationalRadio, { checked: isSelected, "aria-label": "@todo", device: "desktop" }) });
|
|
43
|
+
}
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledCardSingleIndicator, { isSelected });
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=CardSelectIndicator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/CardSelectIndicator.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { PresentationalRadio } from '@elliemae/ds-form-radio';\nimport { StyledCardSingleIndicator } from '../styled.js';\nimport { type CardT } from '../react-desc-prop-types.js';\n\nexport const CardSelectIndicator = (props: CardT.CardSelectIndicatorProps) => {\n const { isSelected, isMultiSelect } = props;\n if (!isMultiSelect) {\n return (\n <Grid alignItems=\"center\">\n <PresentationalRadio checked={isSelected} aria-label=\"@todo\" device=\"desktop\" />\n </Grid>\n );\n }\n return <StyledCardSingleIndicator isSelected={isSelected} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWf;AAVR,qBAAqB;AACrB,2BAAoC;AACpC,oBAA0C;AAGnC,MAAM,sBAAsB,CAAC,UAA0C;AAC5E,QAAM,EAAE,YAAY,cAAc,IAAI;AACtC,MAAI,CAAC,eAAe;AAClB,WACE,4CAAC,uBAAK,YAAW,UACf,sDAAC,4CAAoB,SAAS,YAAY,cAAW,SAAQ,QAAO,WAAU,GAChF;AAAA,EAEJ;AACA,SAAO,4CAAC,2CAA0B,YAAwB;AAC5D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|