@elliemae/ds-card-v3 3.70.0-next.3 → 3.70.0-next.30
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/DSCardV3.js +18 -25
- package/dist/cjs/DSCardV3.js.map +2 -2
- package/dist/cjs/config/useCardV3.js +12 -2
- package/dist/cjs/config/useCardV3.js.map +2 -2
- package/dist/cjs/constants/index.js +4 -13
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/parts/DSCardBody/DSCardBody.js +1 -1
- package/dist/cjs/parts/DSCardBody/DSCardBody.js.map +2 -2
- package/dist/cjs/parts/DSCardBody/config/useCardBody.js +2 -2
- package/dist/cjs/parts/DSCardBody/config/useCardBody.js.map +2 -2
- package/dist/cjs/parts/DSCardBody/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/parts/DSCardFooter/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/parts/DSCardHeader/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +1 -1
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +38 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-dscard-v3-valid.js +5 -1
- package/dist/cjs/typescript-testing/typescript-dscard-v3-valid.js.map +2 -2
- package/dist/esm/DSCardV3.js +18 -25
- package/dist/esm/DSCardV3.js.map +2 -2
- package/dist/esm/config/useCardV3.js +12 -2
- package/dist/esm/config/useCardV3.js.map +2 -2
- package/dist/esm/constants/index.js +4 -13
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/parts/DSCardBody/DSCardBody.js +2 -2
- package/dist/esm/parts/DSCardBody/DSCardBody.js.map +2 -2
- package/dist/esm/parts/DSCardBody/config/useCardBody.js +2 -2
- package/dist/esm/parts/DSCardBody/config/useCardBody.js.map +2 -2
- package/dist/esm/parts/DSCardBody/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/DSCardFooter/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/DSCardHeader/react-desc-prop-types.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +1 -1
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +15 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-dscard-v3-valid.js +5 -1
- package/dist/esm/typescript-testing/typescript-dscard-v3-valid.js.map +2 -2
- package/dist/types/config/useCardV3.d.ts +2 -0
- package/dist/types/constants/index.d.ts +2 -5
- package/dist/types/parts/DSCardBody/config/useCardBody.d.ts +1 -1
- package/dist/types/parts/DSCardBody/react-desc-prop-types.d.ts +3 -0
- package/dist/types/parts/DSCardFooter/react-desc-prop-types.d.ts +3 -0
- package/dist/types/parts/DSCardHeader/react-desc-prop-types.d.ts +3 -0
- package/dist/types/react-desc-prop-types.d.ts +8 -0
- package/dist/types/tests/DSCardV3.api.test.d.ts +1 -0
- package/dist/types/tests/DSCardV3.data-testid.test.d.ts +1 -0
- package/dist/types/tests/DSCardV3.exports.test.d.ts +1 -0
- package/dist/types/tests/DSCardV3.get-owner-props-arguments.test.d.ts +1 -0
- package/dist/types/tests/DSCardV3.proptype-schema.test.d.ts +1 -0
- package/dist/types/typescript-testing/slot-props.d.ts +1 -0
- package/package.json +7 -7
- /package/dist/types/tests/{DSCardV3.test.d.ts → DSCardV3.a11y.test.d.ts} +0 -0
package/dist/cjs/DSCardV3.js
CHANGED
|
@@ -40,19 +40,19 @@ var import_ds_grid = require("@elliemae/ds-grid");
|
|
|
40
40
|
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
41
41
|
var import_useCardV3 = require("./config/useCardV3.js");
|
|
42
42
|
var import_constants = require("./constants/index.js");
|
|
43
|
+
const isAccentedVariant = (variant) => variant === import_constants.Variants.ACCENTED || variant === import_constants.Variants.ACCENTED_DISABLED;
|
|
44
|
+
const isDisabledVariant = (variant) => variant === import_constants.Variants.DISABLED || variant === import_constants.Variants.ACCENTED_DISABLED;
|
|
43
45
|
const StyledWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSCardV3Name, slot: import_constants.CARD_V_3_SLOTS.ROOT })`
|
|
44
46
|
min-height: 4.923rem;
|
|
45
47
|
min-width: 240px;
|
|
46
48
|
position: relative;
|
|
47
49
|
border: 1px solid
|
|
48
|
-
${({ variant, theme }) =>
|
|
49
|
-
if (variant === import_constants.Variants.ACCENTED) return theme.colors.brand["500"];
|
|
50
|
-
return theme.colors.neutral["100"];
|
|
51
|
-
}};
|
|
50
|
+
${({ variant, theme }) => isAccentedVariant(variant) ? theme.colors.brand["500"] : theme.colors.neutral["100"]};
|
|
52
51
|
|
|
53
|
-
${({ variant, theme
|
|
54
|
-
if (variant
|
|
55
|
-
|
|
52
|
+
${({ variant, theme }) => {
|
|
53
|
+
if (!isAccentedVariant(variant)) return "";
|
|
54
|
+
const accentColor = isDisabledVariant(variant) ? theme.colors.neutral["100"] : theme.colors.brand["500"];
|
|
55
|
+
return `
|
|
56
56
|
&::after {
|
|
57
57
|
content: '';
|
|
58
58
|
display: block;
|
|
@@ -60,41 +60,34 @@ const StyledWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
|
|
|
60
60
|
top: 0;
|
|
61
61
|
left: 0;
|
|
62
62
|
height: 100%;
|
|
63
|
-
border-left: 5px solid ${
|
|
63
|
+
border-left: 5px solid ${accentColor};
|
|
64
64
|
}
|
|
65
65
|
`;
|
|
66
|
-
return `
|
|
67
|
-
|
|
68
|
-
`;
|
|
69
66
|
}};
|
|
70
67
|
|
|
71
|
-
background-color: ${({ theme }) => theme.colors.neutral["000"]};
|
|
72
68
|
border-radius: 4px;
|
|
73
|
-
${(
|
|
74
|
-
if (!
|
|
75
|
-
if (
|
|
76
|
-
return `background-color: ${
|
|
77
|
-
border-color: ${
|
|
78
|
-
return `background-color: ${
|
|
69
|
+
${({ variant, theme }) => {
|
|
70
|
+
if (!isDisabledVariant(variant)) return `background-color: ${theme.colors.neutral["000"]};`;
|
|
71
|
+
if (isAccentedVariant(variant))
|
|
72
|
+
return `background-color: ${theme.colors.neutral["050"]};
|
|
73
|
+
border-color: ${theme.colors.neutral["100"]};`;
|
|
74
|
+
return `background-color: ${theme.colors.neutral["050"]};`;
|
|
79
75
|
}}
|
|
80
76
|
|
|
81
|
-
${(
|
|
82
|
-
&:disabled {
|
|
83
|
-
background-color: ${({ theme }) => theme.colors.neutral["050"]};
|
|
84
|
-
}
|
|
77
|
+
${({ variant, theme }) => isDisabledVariant(variant) ? "box-shadow: none;" : `box-shadow: ${theme.shadows.xs};`}
|
|
85
78
|
&:hover {
|
|
86
|
-
${(
|
|
79
|
+
${({ variant }) => !isDisabledVariant(variant) ? "box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.6);" : ""}
|
|
87
80
|
}
|
|
88
81
|
${import_ds_system.xStyledCommonProps}
|
|
89
82
|
`;
|
|
90
83
|
const DSCardV3 = (props) => {
|
|
91
|
-
const { propsWithDefault, gridProps } = (0, import_useCardV3.useCardV3)(props);
|
|
84
|
+
const { propsWithDefault, gridProps, resolvedVariant } = (0, import_useCardV3.useCardV3)(props);
|
|
92
85
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
86
|
StyledWrapper,
|
|
94
87
|
{
|
|
95
88
|
getOwnerProps: () => propsWithDefault,
|
|
96
89
|
getOwnerPropsArguments: () => ({}),
|
|
97
|
-
variant:
|
|
90
|
+
variant: resolvedVariant,
|
|
98
91
|
...gridProps,
|
|
99
92
|
children: propsWithDefault.children
|
|
100
93
|
}
|
package/dist/cjs/DSCardV3.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCardV3.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSCardV3T, DSCardV3PropTypesSchema } from './react-desc-prop-types.js';\nimport { useCardV3 } from './config/useCardV3.js';\nimport { CARD_V_3_SLOTS, DSCardV3Name, Variants } from './constants/index.js';\n\nconst StyledWrapper = styled(Grid, { name: DSCardV3Name, slot: CARD_V_3_SLOTS.ROOT })<{ variant?: DSCardV3T.VariantT }>`\n min-height: 4.923rem;\n min-width: 240px;\n position: relative;\n border: 1px solid\n ${({ variant, theme }) =>
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSCardV3T, DSCardV3PropTypesSchema } from './react-desc-prop-types.js';\nimport { useCardV3 } from './config/useCardV3.js';\nimport { CARD_V_3_SLOTS, DSCardV3Name, Variants } from './constants/index.js';\n\n// \"disabled\" is a purely visual state of this non-interactive container \u2014 it is driven by the\n// `variant` value, never by an HTML `disabled` attribute (which is invalid on a <div> and\n// misleads assistive technology \u2014 see PUI-17888). These helpers derive the visual flags from the variant.\nconst isAccentedVariant = (variant?: DSCardV3T.VariantT) =>\n variant === Variants.ACCENTED || variant === Variants.ACCENTED_DISABLED;\nconst isDisabledVariant = (variant?: DSCardV3T.VariantT) =>\n variant === Variants.DISABLED || variant === Variants.ACCENTED_DISABLED;\n\nconst StyledWrapper = styled(Grid, { name: DSCardV3Name, slot: CARD_V_3_SLOTS.ROOT })<{ variant?: DSCardV3T.VariantT }>`\n min-height: 4.923rem;\n min-width: 240px;\n position: relative;\n border: 1px solid\n ${({ variant, theme }) => (isAccentedVariant(variant) ? theme.colors.brand['500'] : theme.colors.neutral['100'])};\n\n ${({ variant, theme }) => {\n if (!isAccentedVariant(variant)) return '';\n const accentColor = isDisabledVariant(variant) ? theme.colors.neutral['100'] : theme.colors.brand['500'];\n return `\n &::after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n border-left: 5px solid ${accentColor};\n }\n `;\n }};\n\n border-radius: 4px;\n ${({ variant, theme }) => {\n if (!isDisabledVariant(variant)) return `background-color: ${theme.colors.neutral['000']};`;\n if (isAccentedVariant(variant))\n return `background-color: ${theme.colors.neutral['050']};\n border-color: ${theme.colors.neutral['100']};`;\n return `background-color: ${theme.colors.neutral['050']};`;\n }}\n\n ${({ variant, theme }) => (isDisabledVariant(variant) ? 'box-shadow: none;' : `box-shadow: ${theme.shadows.xs};`)}\n &:hover {\n ${({ variant }) => (!isDisabledVariant(variant) ? 'box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.6);' : '')}\n }\n ${xStyledCommonProps}\n`;\n\nconst DSCardV3: React.ComponentType<DSCardV3T.Props> = (props) => {\n const { propsWithDefault, gridProps, resolvedVariant } = useCardV3(props);\n return (\n <StyledWrapper\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n variant={resolvedVariant}\n {...gridProps}\n >\n {propsWithDefault.children}\n </StyledWrapper>\n );\n};\n\nDSCardV3.displayName = DSCardV3Name;\nconst DSCardV3WithSchema = describe(DSCardV3);\nDSCardV3WithSchema.propTypes = DSCardV3PropTypesSchema;\n\nexport { DSCardV3, DSCardV3WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0DnB;AAzDJ,8BAAyB;AACzB,uBAA2C;AAC3C,qBAAqB;AACrB,mCAAwD;AACxD,uBAA0B;AAC1B,uBAAuD;AAKvD,MAAM,oBAAoB,CAAC,YACzB,YAAY,0BAAS,YAAY,YAAY,0BAAS;AACxD,MAAM,oBAAoB,CAAC,YACzB,YAAY,0BAAS,YAAY,YAAY,0BAAS;AAExD,MAAM,oBAAgB,yBAAO,qBAAM,EAAE,MAAM,+BAAc,MAAM,gCAAe,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,MAK9E,CAAC,EAAE,SAAS,MAAM,MAAO,kBAAkB,OAAO,IAAI,MAAM,OAAO,MAAM,KAAK,IAAI,MAAM,OAAO,QAAQ,KAAK,CAAE;AAAA;AAAA,IAEhH,CAAC,EAAE,SAAS,MAAM,MAAM;AACxB,MAAI,CAAC,kBAAkB,OAAO,EAAG,QAAO;AACxC,QAAM,cAAc,kBAAkB,OAAO,IAAI,MAAM,OAAO,QAAQ,KAAK,IAAI,MAAM,OAAO,MAAM,KAAK;AACvG,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAQsB,WAAW;AAAA;AAAA;AAG1C,CAAC;AAAA;AAAA;AAAA,IAGC,CAAC,EAAE,SAAS,MAAM,MAAM;AACxB,MAAI,CAAC,kBAAkB,OAAO,EAAG,QAAO,qBAAqB,MAAM,OAAO,QAAQ,KAAK,CAAC;AACxF,MAAI,kBAAkB,OAAO;AAC3B,WAAO,qBAAqB,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,oBACzC,MAAM,OAAO,QAAQ,KAAK,CAAC;AAC3C,SAAO,qBAAqB,MAAM,OAAO,QAAQ,KAAK,CAAC;AACzD,CAAC;AAAA;AAAA,IAEC,CAAC,EAAE,SAAS,MAAM,MAAO,kBAAkB,OAAO,IAAI,sBAAsB,eAAe,MAAM,QAAQ,EAAE,GAAI;AAAA;AAAA,MAE7G,CAAC,EAAE,QAAQ,MAAO,CAAC,kBAAkB,OAAO,IAAI,gDAAgD,EAAG;AAAA;AAAA,IAErG,mCAAkB;AAAA;AAGtB,MAAM,WAAiD,CAAC,UAAU;AAChE,QAAM,EAAE,kBAAkB,WAAW,gBAAgB,QAAI,4BAAU,KAAK;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAe,MAAM;AAAA,MACrB,wBAAwB,OAAO,CAAC;AAAA,MAChC,SAAS;AAAA,MACR,GAAG;AAAA,MAEH,2BAAiB;AAAA;AAAA,EACpB;AAEJ;AAEA,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -37,19 +37,29 @@ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
38
|
var import_uid = require("uid");
|
|
39
39
|
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
40
|
+
var import_constants = require("../constants/index.js");
|
|
40
41
|
var import_useValidateProps = require("./useValidateProps.js");
|
|
42
|
+
const resolveVariant = (variant, disabled) => {
|
|
43
|
+
const base = variant ?? import_constants.Variants.DEFAULT;
|
|
44
|
+
if (!disabled) return base;
|
|
45
|
+
if (base === import_constants.Variants.ACCENTED || base === import_constants.Variants.ACCENTED_DISABLED) return import_constants.Variants.ACCENTED_DISABLED;
|
|
46
|
+
return import_constants.Variants.DISABLED;
|
|
47
|
+
};
|
|
41
48
|
const useCardV3 = (propsFromUser) => {
|
|
42
49
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
|
|
43
50
|
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSCardV3PropTypes);
|
|
44
|
-
const
|
|
51
|
+
const { disabled, variant, ...gridInputProps } = propsWithDefault;
|
|
52
|
+
const resolvedVariant = resolveVariant(variant, disabled);
|
|
53
|
+
const gridProps = (0, import_ds_grid.getGridProps)(gridInputProps);
|
|
45
54
|
const instanceUid = import_react.default.useMemo(() => (0, import_uid.uid)(5), []);
|
|
46
55
|
return import_react.default.useMemo(
|
|
47
56
|
() => ({
|
|
48
57
|
propsWithDefault,
|
|
49
58
|
gridProps,
|
|
59
|
+
resolvedVariant,
|
|
50
60
|
instanceUid
|
|
51
61
|
}),
|
|
52
|
-
[propsWithDefault, gridProps, instanceUid]
|
|
62
|
+
[propsWithDefault, gridProps, resolvedVariant, instanceUid]
|
|
53
63
|
);
|
|
54
64
|
};
|
|
55
65
|
//# sourceMappingURL=useCardV3.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useCardV3.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { getGridProps } from '@elliemae/ds-grid';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { uid } from 'uid';\nimport { DSCardV3PropTypes, defaultProps, type DSCardV3T } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardV3CTX {\n propsWithDefault: DSCardV3T.InternalProps;\n gridProps: ReturnType<typeof getGridProps>;\n instanceUid: string;\n}\n\nexport const useCardV3 = (propsFromUser: DSCardV3T.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardV3T.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardV3PropTypes);\n // =============================================================================\n //
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAA6B;AAC7B,8BAA6C;AAC7C,mBAAkB;AAClB,iBAAoB;AACpB,mCAAgE;AAChE,8BAAiC;
|
|
4
|
+
"sourcesContent": ["import { getGridProps } from '@elliemae/ds-grid';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { uid } from 'uid';\nimport { DSCardV3PropTypes, defaultProps, type DSCardV3T } from '../react-desc-prop-types.js';\nimport { Variants } from '../constants/index.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardV3CTX {\n propsWithDefault: DSCardV3T.InternalProps;\n gridProps: ReturnType<typeof getGridProps>;\n resolvedVariant: DSCardV3T.VariantT;\n instanceUid: string;\n}\n\n// Resolves the visual variant, folding the deprecated `disabled` prop into the variant value.\n// A non-interactive card can never carry an HTML `disabled` attribute (PUI-17888), so \"disabled\"\n// is expressed exclusively through the variant: a disabled card is just a variant that looks muted.\nconst resolveVariant = (variant: DSCardV3T.VariantT | undefined, disabled: boolean | undefined): DSCardV3T.VariantT => {\n const base = variant ?? Variants.DEFAULT;\n if (!disabled) return base;\n if (base === Variants.ACCENTED || base === Variants.ACCENTED_DISABLED) return Variants.ACCENTED_DISABLED;\n return Variants.DISABLED;\n};\n\nexport const useCardV3 = (propsFromUser: DSCardV3T.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardV3T.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardV3PropTypes);\n // =============================================================================\n // RESOLVE THE VISUAL VARIANT and feed GRID only the props it owns.\n // `disabled` and `variant` are split off here: `disabled` must never reach the DOM (invalid on a\n // non-interactive container \u2014 PUI-17888), and `variant` is forwarded to the styled root explicitly.\n // =============================================================================\n const { disabled, variant, ...gridInputProps } = propsWithDefault;\n const resolvedVariant = resolveVariant(variant, disabled);\n const gridProps = getGridProps(gridInputProps);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const instanceUid = React.useMemo(() => uid(5), []);\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n gridProps,\n resolvedVariant,\n instanceUid,\n }),\n [propsWithDefault, gridProps, resolvedVariant, instanceUid],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAA6B;AAC7B,8BAA6C;AAC7C,mBAAkB;AAClB,iBAAoB;AACpB,mCAAgE;AAChE,uBAAyB;AACzB,8BAAiC;AAYjC,MAAM,iBAAiB,CAAC,SAAyC,aAAsD;AACrH,QAAM,OAAO,WAAW,0BAAS;AACjC,MAAI,CAAC,SAAU,QAAO;AACtB,MAAI,SAAS,0BAAS,YAAY,SAAS,0BAAS,kBAAmB,QAAO,0BAAS;AACvF,SAAO,0BAAS;AAClB;AAEO,MAAM,YAAY,CAAC,kBAAmC;AAI3D,QAAM,uBAAmB,sDAAsD,eAAe,yCAAY;AAC1G,gDAAiB,kBAAkB,8CAAiB;AAMpD,QAAM,EAAE,UAAU,SAAS,GAAG,eAAe,IAAI;AACjD,QAAM,kBAAkB,eAAe,SAAS,QAAQ;AACxD,QAAM,gBAAY,6BAAa,cAAc;AAI7C,QAAM,cAAc,aAAAA,QAAM,QAAQ,UAAM,gBAAI,CAAC,GAAG,CAAC,CAAC;AAElD,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,WAAW,iBAAiB,WAAW;AAAA,EAC5D;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -35,9 +35,7 @@ __export(constants_exports, {
|
|
|
35
35
|
DSCardV3FooterName: () => DSCardV3FooterName,
|
|
36
36
|
DSCardV3HeaderName: () => DSCardV3HeaderName,
|
|
37
37
|
DSCardV3Name: () => DSCardV3Name,
|
|
38
|
-
|
|
39
|
-
Variants: () => Variants,
|
|
40
|
-
omit: () => omit
|
|
38
|
+
Variants: () => Variants
|
|
41
39
|
});
|
|
42
40
|
module.exports = __toCommonJS(constants_exports);
|
|
43
41
|
var React = __toESM(require("react"));
|
|
@@ -48,11 +46,9 @@ const DSCardV3FooterName = "DSCardv3footer";
|
|
|
48
46
|
const DSCardV3BodyName = "DSCardv3body";
|
|
49
47
|
const Variants = {
|
|
50
48
|
DEFAULT: "default",
|
|
51
|
-
ACCENTED: "accented"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
HELLO: "WORLD",
|
|
55
|
-
FOO: "BAR"
|
|
49
|
+
ACCENTED: "accented",
|
|
50
|
+
DISABLED: "disabled",
|
|
51
|
+
ACCENTED_DISABLED: "accented-disabled"
|
|
56
52
|
};
|
|
57
53
|
const CARD_V_3_SLOTS_PARTS = {
|
|
58
54
|
ROOT: { ROOT: "root" },
|
|
@@ -67,9 +63,4 @@ const CARD_V_3_SLOTS = {
|
|
|
67
63
|
FOOTER: "footer"
|
|
68
64
|
};
|
|
69
65
|
const CARD_V_3_DATA_TESTID = (0, import_ds_system.slotObjectToDataTestIds)(DSCardV3Name, CARD_V_3_SLOTS);
|
|
70
|
-
const omit = (obj, ...keys) => {
|
|
71
|
-
const a = { ...obj };
|
|
72
|
-
keys.forEach((key) => delete a[key]);
|
|
73
|
-
return a;
|
|
74
|
-
};
|
|
75
66
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSCardV3Name = 'DSCardv3';\nexport const DSCardV3HeaderName = 'DSCardv3header';\nexport const DSCardV3FooterName = 'DSCardv3footer';\nexport const DSCardV3BodyName = 'DSCardv3body';\n\nexport const Variants = {\n DEFAULT: 'default',\n ACCENTED: 'accented',\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSCardV3Name = 'DSCardv3';\nexport const DSCardV3HeaderName = 'DSCardv3header';\nexport const DSCardV3FooterName = 'DSCardv3footer';\nexport const DSCardV3BodyName = 'DSCardv3body';\n\nexport const Variants = {\n DEFAULT: 'default',\n ACCENTED: 'accented',\n DISABLED: 'disabled',\n ACCENTED_DISABLED: 'accented-disabled',\n} as const;\n\n// we are giving \"component_name_slots\" to avoid errors on duplicate exports variables in aggregators\n\nexport const CARD_V_3_SLOTS_PARTS = {\n ROOT: { ROOT: 'root' },\n HEADER: { HEADER: 'header' },\n BODY: { BODY: 'body' },\n FOOTER: { FOOTER: 'footer' },\n} as const;\n\nexport const CARD_V_3_SLOTS = {\n ROOT: 'root',\n HEADER: 'header',\n BODY: 'body',\n FOOTER: 'footer',\n} as const;\n\n// we are giving \"component_name_data_testid\" to avoid errors on duplicate exports variables in aggregators\nexport const CARD_V_3_DATA_TESTID = slotObjectToDataTestIds(DSCardV3Name, CARD_V_3_SLOTS);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,eAAe;AACrB,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,mBAAmB;AAEzB,MAAM,WAAW;AAAA,EACtB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AAAA,EACV,mBAAmB;AACrB;AAIO,MAAM,uBAAuB;AAAA,EAClC,MAAM,EAAE,MAAM,OAAO;AAAA,EACrB,QAAQ,EAAE,QAAQ,SAAS;AAAA,EAC3B,MAAM,EAAE,MAAM,OAAO;AAAA,EACrB,QAAQ,EAAE,QAAQ,SAAS;AAC7B;AAEO,MAAM,iBAAiB;AAAA,EAC5B,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AACV;AAGO,MAAM,2BAAuB,0CAAwB,cAAc,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -46,7 +46,7 @@ const StyledWrapper = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
|
|
|
46
46
|
${import_ds_system.xStyledCommonProps}
|
|
47
47
|
`;
|
|
48
48
|
const DSCardBody = (props) => {
|
|
49
|
-
const { propsWithDefault, gridProps } = (0, import_useCardBody.
|
|
49
|
+
const { propsWithDefault, gridProps } = (0, import_useCardBody.useCardBody)(props);
|
|
50
50
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledWrapper, { getOwnerProps: () => propsWithDefault, ...gridProps, children: propsWithDefault.children || "" });
|
|
51
51
|
};
|
|
52
52
|
DSCardBody.displayName = import_constants.DSCardV3BodyName;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSCardBody/DSCardBody.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSCardBodyT, DSCardBodyPropTypesSchema } from './react-desc-prop-types.js';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBnB;AAhBJ,8BAAyB;AACzB,uBAA2C;AAC3C,qBAAqB;AACrB,mCAA4D;AAC5D,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { type DSCardBodyT, DSCardBodyPropTypesSchema } from './react-desc-prop-types.js';\nimport { useCardBody } from './config/useCardBody.js';\nimport { CARD_V_3_SLOTS, DSCardV3Name, DSCardV3BodyName } from '../../constants/index.js';\n\nconst StyledWrapper = styled(Grid, { name: DSCardV3Name, slot: CARD_V_3_SLOTS.BODY })`\n min-width: 240px;\n padding: 8px 16px;\n ${xStyledCommonProps}\n`;\n\nconst DSCardBody: React.ComponentType<DSCardBodyT.Props> = (props) => {\n const { propsWithDefault, gridProps } = useCardBody(props);\n return (\n <StyledWrapper getOwnerProps={() => propsWithDefault} {...gridProps}>\n {propsWithDefault.children || ''}\n </StyledWrapper>\n );\n};\n\nDSCardBody.displayName = DSCardV3BodyName;\nconst DSCardBodyWithSchema = describe(DSCardBody);\nDSCardBodyWithSchema.propTypes = DSCardBodyPropTypesSchema;\n\nexport { DSCardBody, DSCardBodyWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBnB;AAhBJ,8BAAyB;AACzB,uBAA2C;AAC3C,qBAAqB;AACrB,mCAA4D;AAC5D,yBAA4B;AAC5B,uBAA+D;AAE/D,MAAM,oBAAgB,yBAAO,qBAAM,EAAE,MAAM,+BAAc,MAAM,gCAAe,KAAK,CAAC;AAAA;AAAA;AAAA,IAGhF,mCAAkB;AAAA;AAGtB,MAAM,aAAqD,CAAC,UAAU;AACpE,QAAM,EAAE,kBAAkB,UAAU,QAAI,gCAAY,KAAK;AACzD,SACE,4CAAC,iBAAc,eAAe,MAAM,kBAAmB,GAAG,WACvD,2BAAiB,YAAY,IAChC;AAEJ;AAEA,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU;AAChD,qBAAqB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,7 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var useCardBody_exports = {};
|
|
30
30
|
__export(useCardBody_exports, {
|
|
31
|
-
|
|
31
|
+
useCardBody: () => useCardBody
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(useCardBody_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
@@ -38,7 +38,7 @@ var import_react = __toESM(require("react"));
|
|
|
38
38
|
var import_uid = require("uid");
|
|
39
39
|
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
40
40
|
var import_useValidateProps = require("./useValidateProps.js");
|
|
41
|
-
const
|
|
41
|
+
const useCardBody = (propsFromUser) => {
|
|
42
42
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
|
|
43
43
|
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSCardBodyPropTypes);
|
|
44
44
|
const gridProps = (0, import_ds_grid.getGridProps)(propsWithDefault);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/parts/DSCardBody/config/useCardBody.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { getGridProps } from '@elliemae/ds-grid';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { uid } from 'uid';\nimport { DSCardBodyPropTypes, defaultProps, type DSCardBodyT } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAA6B;AAC7B,8BAA6C;AAC7C,mBAAkB;AAClB,iBAAoB;AACpB,mCAAoE;AACpE,8BAAiC;AAE1B,MAAM,
|
|
4
|
+
"sourcesContent": ["import { getGridProps } from '@elliemae/ds-grid';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { uid } from 'uid';\nimport { DSCardBodyPropTypes, defaultProps, type DSCardBodyT } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const useCardBody = (propsFromUser: DSCardBodyT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardBodyT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardBodyPropTypes);\n // =============================================================================\n // WE inherit the global attributes and xstyled props from GRID\n // =============================================================================\n const gridProps = getGridProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const { id } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n gridProps,\n instanceUid,\n }),\n [propsWithDefault, gridProps, instanceUid],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAA6B;AAC7B,8BAA6C;AAC7C,mBAAkB;AAClB,iBAAoB;AACpB,mCAAoE;AACpE,8BAAiC;AAE1B,MAAM,cAAc,CAAC,kBAAqC;AAI/D,QAAM,uBAAmB,sDAAwD,eAAe,yCAAY;AAC5G,gDAAiB,kBAAkB,gDAAmB;AAItD,QAAM,gBAAY,6BAAa,gBAAgB;AAI/C,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,UAAM,gBAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAE1D,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,WAAW,WAAW;AAAA,EAC3C;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSCardBody/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { DSGridPropTypes, defaultProps as gridDefaultProps, type DSGridT } from '@elliemae/ds-grid';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { getPropsPerSlotPropTypes } from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { CARD_V_3_SLOTS_PARTS, DSCardV3Name } from '../../constants/index.js';\n\nexport declare namespace DSCardBodyT {\n export interface RequiredProps {}\n\n export type DefaultProps = DSGridT.DefaultProps;\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSCardV3Name, typeof CARD_V_3_SLOTS_PARTS.BODY> {\n children?: React.ReactNode;\n }\n\n export interface Props\n extends OptionalProps,\n Partial<DefaultProps>,\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {}\n\n export interface InternalProps\n extends OptionalProps,\n // DefaultProps, //<-- our defaultProps ARE the grid's default props itself\n // we are already extendings DSGridT.Props (which includes XstyledProps, GlobalProps with relevant overrides)\n // so we don't need to extend them again here (which kind of conflicts with DSGridT.Props somehow)\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {}\n}\n\nexport const defaultProps: DSCardBodyT.DefaultProps = {\n ...gridDefaultProps,\n};\n\nexport const DSCardBodyPropTypes: DSPropTypesSchema<DSCardBodyT.Props> = {\n ...DSGridPropTypes,\n ...getPropsPerSlotPropTypes(DSCardV3Name, CARD_V_3_SLOTS_PARTS.BODY),\n};\n\nexport const DSCardBodyPropTypesSchema = DSCardBodyPropTypes as unknown as ValidationMap<DSCardBodyT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAAgF;AAEhF,8BAAyC;AAEzC,uBAAmD;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { DSGridPropTypes, defaultProps as gridDefaultProps, type DSGridT } from '@elliemae/ds-grid';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { getPropsPerSlotPropTypes } from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { CARD_V_3_SLOTS_PARTS, DSCardV3Name } from '../../constants/index.js';\n\nexport declare namespace DSCardBodyT {\n export type SlotFunctionArguments = {\n dsCardv3Body: () => object;\n };\n\n export interface RequiredProps {}\n\n export type DefaultProps = DSGridT.DefaultProps;\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSCardV3Name, typeof CARD_V_3_SLOTS_PARTS.BODY> {\n children?: React.ReactNode;\n }\n\n export interface Props\n extends OptionalProps,\n Partial<DefaultProps>,\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {}\n\n export interface InternalProps\n extends OptionalProps,\n // DefaultProps, //<-- our defaultProps ARE the grid's default props itself\n // we are already extendings DSGridT.Props (which includes XstyledProps, GlobalProps with relevant overrides)\n // so we don't need to extend them again here (which kind of conflicts with DSGridT.Props somehow)\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {}\n}\n\nexport const defaultProps: DSCardBodyT.DefaultProps = {\n ...gridDefaultProps,\n};\n\nexport const DSCardBodyPropTypes: DSPropTypesSchema<DSCardBodyT.Props> = {\n ...DSGridPropTypes,\n ...getPropsPerSlotPropTypes(DSCardV3Name, CARD_V_3_SLOTS_PARTS.BODY),\n};\n\nexport const DSCardBodyPropTypesSchema = DSCardBodyPropTypes as unknown as ValidationMap<DSCardBodyT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAAgF;AAEhF,8BAAyC;AAEzC,uBAAmD;AA2C5C,MAAM,eAAyC;AAAA,EACpD,GAAG,eAAAA;AACL;AAEO,MAAM,sBAA4D;AAAA,EACvE,GAAG;AAAA,EACH,OAAG,kDAAyB,+BAAc,sCAAqB,IAAI;AACrE;AAEO,MAAM,4BAA4B;",
|
|
6
6
|
"names": ["gridDefaultProps"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSCardFooter/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\n\nimport { DSGridPropTypes, defaultProps as gridDefaultProps, type DSGridT } from '@elliemae/ds-grid';\nimport type { DSPropTypesSchema, GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes } from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { CARD_V_3_SLOTS_PARTS, DSCardV3Name } from '../../constants/index.js';\n\nexport declare namespace DSCardFooterT {\n export interface RequiredProps {}\n\n export type DefaultProps = DSGridT.DefaultProps;\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSCardV3Name, typeof CARD_V_3_SLOTS_PARTS.FOOTER> {\n children?: React.ReactNode;\n }\n\n export interface Props\n extends OptionalProps,\n Partial<DefaultProps>,\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {}\n\n export interface InternalProps\n extends OptionalProps,\n // DefaultProps, //<-- our defaultProps ARE the grid's default props itself\n // we are already extendings DSGridT.Props (which includes XstyledProps, GlobalProps with relevant overrides)\n // so we don't need to extend them again here (which kind of conflicts with DSGridT.Props somehow)\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {}\n}\n\nexport const defaultProps: DSCardFooterT.DefaultProps = {\n ...gridDefaultProps,\n};\n\nexport const DSCardFooterPropTypes: DSPropTypesSchema<DSCardFooterT.Props> = {\n ...DSGridPropTypes,\n ...getPropsPerSlotPropTypes(DSCardV3Name, CARD_V_3_SLOTS_PARTS.FOOTER),\n children: PropTypes.any.description('The content of the card'),\n};\n\nexport const DSCardFooterPropTypesSchema = DSCardFooterPropTypes as unknown as WeakValidationMap<DSCardFooterT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,qBAAgF;AAEhF,8BAAoD;AAGpD,uBAAmD;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\n\nimport { DSGridPropTypes, defaultProps as gridDefaultProps, type DSGridT } from '@elliemae/ds-grid';\nimport type { DSPropTypesSchema, GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes } from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { CARD_V_3_SLOTS_PARTS, DSCardV3Name } from '../../constants/index.js';\n\nexport declare namespace DSCardFooterT {\n export type SlotFunctionArguments = {\n dsCardv3Footer: () => object;\n };\n\n export interface RequiredProps {}\n\n export type DefaultProps = DSGridT.DefaultProps;\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSCardV3Name, typeof CARD_V_3_SLOTS_PARTS.FOOTER> {\n children?: React.ReactNode;\n }\n\n export interface Props\n extends OptionalProps,\n Partial<DefaultProps>,\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {}\n\n export interface InternalProps\n extends OptionalProps,\n // DefaultProps, //<-- our defaultProps ARE the grid's default props itself\n // we are already extendings DSGridT.Props (which includes XstyledProps, GlobalProps with relevant overrides)\n // so we don't need to extend them again here (which kind of conflicts with DSGridT.Props somehow)\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {}\n}\n\nexport const defaultProps: DSCardFooterT.DefaultProps = {\n ...gridDefaultProps,\n};\n\nexport const DSCardFooterPropTypes: DSPropTypesSchema<DSCardFooterT.Props> = {\n ...DSGridPropTypes,\n ...getPropsPerSlotPropTypes(DSCardV3Name, CARD_V_3_SLOTS_PARTS.FOOTER),\n children: PropTypes.any.description('The content of the card'),\n};\n\nexport const DSCardFooterPropTypesSchema = DSCardFooterPropTypes as unknown as WeakValidationMap<DSCardFooterT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,qBAAgF;AAEhF,8BAAoD;AAGpD,uBAAmD;AA2C5C,MAAM,eAA2C;AAAA,EACtD,GAAG,eAAAA;AACL;AAEO,MAAM,wBAAgE;AAAA,EAC3E,GAAG;AAAA,EACH,OAAG,kDAAyB,+BAAc,sCAAqB,MAAM;AAAA,EACrE,UAAU,kCAAU,IAAI,YAAY,yBAAyB;AAC/D;AAEO,MAAM,8BAA8B;",
|
|
6
6
|
"names": ["gridDefaultProps"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/DSCardHeader/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { DSGridPropTypes, defaultProps as gridDefaultProps, type DSGridT } from '@elliemae/ds-grid';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes } from '@elliemae/ds-props-helpers';\nimport type { Theme } from '@elliemae/ds-system';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { CARD_V_3_SLOTS_PARTS, DSCardV3Name } from '../../constants/index.js';\n\nexport declare namespace DSCardHeaderT {\n export interface RequiredProps {}\n\n export type DefaultProps = DSGridT.DefaultProps;\n\n export interface OptionalProps\n extends DSGridT.OptionalProps,\n TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSCardV3Name, typeof CARD_V_3_SLOTS_PARTS.HEADER> {\n children?: React.ReactNode;\n showBorder?: boolean;\n }\n\n export interface Props\n extends OptionalProps,\n Partial<DefaultProps>,\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {}\n\n export interface InternalProps\n extends OptionalProps,\n // DefaultProps, //<-- our defaultProps ARE the grid's default props itself\n // we are already extendings DSGridT.Props (which includes XstyledProps, GlobalProps with relevant overrides)\n // so we don't need to extend them again here (which kind of conflicts with DSGridT.Props somehow)\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {\n theme: Theme;\n }\n}\n\nexport const defaultProps: DSCardHeaderT.DefaultProps = {\n ...gridDefaultProps,\n};\n\nexport const DSCardHeaderPropTypes: DSPropTypesSchema<DSCardHeaderT.Props> = {\n ...DSGridPropTypes,\n ...getPropsPerSlotPropTypes(DSCardV3Name, CARD_V_3_SLOTS_PARTS.HEADER),\n children: PropTypes.any.description('The content of the card'),\n showBorder: PropTypes.bool.description('Show border at the bottom of the card header'),\n};\n\nexport const DSCardHeaderPropTypesSchema = DSCardHeaderPropTypes as unknown as ValidationMap<DSCardHeaderT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAAgF;AAEhF,8BAAoD;AAGpD,uBAAmD;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { DSGridPropTypes, defaultProps as gridDefaultProps, type DSGridT } from '@elliemae/ds-grid';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes } from '@elliemae/ds-props-helpers';\nimport type { Theme } from '@elliemae/ds-system';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { CARD_V_3_SLOTS_PARTS, DSCardV3Name } from '../../constants/index.js';\n\nexport declare namespace DSCardHeaderT {\n export type SlotFunctionArguments = {\n dsCardv3Header: () => object;\n };\n\n export interface RequiredProps {}\n\n export type DefaultProps = DSGridT.DefaultProps;\n\n export interface OptionalProps\n extends DSGridT.OptionalProps,\n TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSCardV3Name, typeof CARD_V_3_SLOTS_PARTS.HEADER> {\n children?: React.ReactNode;\n showBorder?: boolean;\n }\n\n export interface Props\n extends OptionalProps,\n Partial<DefaultProps>,\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {}\n\n export interface InternalProps\n extends OptionalProps,\n // DefaultProps, //<-- our defaultProps ARE the grid's default props itself\n // we are already extendings DSGridT.Props (which includes XstyledProps, GlobalProps with relevant overrides)\n // so we don't need to extend them again here (which kind of conflicts with DSGridT.Props somehow)\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {\n theme: Theme;\n }\n}\n\nexport const defaultProps: DSCardHeaderT.DefaultProps = {\n ...gridDefaultProps,\n};\n\nexport const DSCardHeaderPropTypes: DSPropTypesSchema<DSCardHeaderT.Props> = {\n ...DSGridPropTypes,\n ...getPropsPerSlotPropTypes(DSCardV3Name, CARD_V_3_SLOTS_PARTS.HEADER),\n children: PropTypes.any.description('The content of the card'),\n showBorder: PropTypes.bool.description('Show border at the bottom of the card header'),\n};\n\nexport const DSCardHeaderPropTypesSchema = DSCardHeaderPropTypes as unknown as ValidationMap<DSCardHeaderT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAAgF;AAEhF,8BAAoD;AAGpD,uBAAmD;AA+C5C,MAAM,eAA2C;AAAA,EACtD,GAAG,eAAAA;AACL;AAEO,MAAM,wBAAgE;AAAA,EAC3E,GAAG;AAAA,EACH,OAAG,kDAAyB,+BAAc,sCAAqB,MAAM;AAAA,EACrE,UAAU,kCAAU,IAAI,YAAY,yBAAyB;AAAA,EAC7D,YAAY,kCAAU,KAAK,YAAY,8CAA8C;AACvF;AAEO,MAAM,8BAA8B;",
|
|
6
6
|
"names": ["gridDefaultProps"]
|
|
7
7
|
}
|
|
@@ -45,7 +45,7 @@ const DSCardV3PropTypes = {
|
|
|
45
45
|
...import_ds_props_helpers.xstyledPropTypes,
|
|
46
46
|
variant: import_ds_props_helpers.PropTypes.oneOf(Object.values(import_constants.Variants)).description("The variant of the card"),
|
|
47
47
|
children: import_ds_props_helpers.PropTypes.any.description("The content of the card"),
|
|
48
|
-
disabled: import_ds_props_helpers.PropTypes.bool.description("
|
|
48
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description('Deprecated. Use variant="disabled" or variant="accented-disabled" instead.').deprecated({ version: "4.x", message: 'use variant="disabled" or variant="accented-disabled" instead' })
|
|
49
49
|
};
|
|
50
50
|
const DSCardV3PropTypesSchema = DSCardV3PropTypes;
|
|
51
51
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { type DSGridT, DSGridPropTypes } from '@elliemae/ds-grid';\nimport type { DSPropTypesSchema, GlobalAttributesT, 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 { CARD_V_3_SLOTS_PARTS, DSCardV3Name, Variants } from './constants/index.js';\n\nexport declare namespace DSCardV3T {\n type Keys = keyof typeof Variants;\n export type VariantT = (typeof Variants)[Keys];\n export interface RequiredProps {}\n\n export interface DefaultProps {}\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSCardV3Name, typeof CARD_V_3_SLOTS_PARTS.ROOT> {\n children?: React.ReactNode;\n disabled?: boolean;\n variant?: VariantT;\n }\n\n export interface Props\n extends OptionalProps,\n Partial<DefaultProps>,\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {\n 'data-testid'?: string;\n innerRef?: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n }\n\n export interface InternalProps\n extends OptionalProps,\n DefaultProps,\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {\n 'data-testid'?: string;\n innerRef?: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n }\n}\n\nexport const defaultProps: DSCardV3T.DefaultProps = {};\n\nexport const DSCardV3PropTypes: DSPropTypesSchema<Omit<DSCardV3T.Props, 'data-testid'>> = {\n ...DSGridPropTypes,\n ...getPropsPerSlotPropTypes(DSCardV3Name, CARD_V_3_SLOTS_PARTS.ROOT),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n variant: PropTypes.oneOf(Object.values(Variants)).description('The variant of the card'),\n children: PropTypes.any.description('The content of the card'),\n disabled: PropTypes.bool.description('
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAA8C;AAE9C,8BAKO;AAEP,uBAA6D;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { type DSGridT, DSGridPropTypes } from '@elliemae/ds-grid';\nimport type { DSPropTypesSchema, GlobalAttributesT, 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 { CARD_V_3_SLOTS_PARTS, DSCardV3Name, Variants } from './constants/index.js';\n\nexport declare namespace DSCardV3T {\n type Keys = keyof typeof Variants;\n export type VariantT = (typeof Variants)[Keys];\n\n export type SlotFunctionArguments = {\n dsCardv3Root: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {}\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSCardV3Name, typeof CARD_V_3_SLOTS_PARTS.ROOT> {\n children?: React.ReactNode;\n /**\n * @deprecated v4.x \u2014 use `variant=\"disabled\"` or `variant=\"accented-disabled\"` instead.\n * A non-interactive card must not carry an HTML `disabled` attribute (PUI-17888); the disabled\n * look is now a visual variant. This prop is still honoured and resolved to the matching variant.\n */\n disabled?: boolean;\n variant?: VariantT;\n }\n\n export interface Props\n extends OptionalProps,\n Partial<DefaultProps>,\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {\n 'data-testid'?: string;\n innerRef?: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n }\n\n export interface InternalProps\n extends OptionalProps,\n DefaultProps,\n Omit<\n GlobalAttributesT<HTMLDivElement>,\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents, @typescript-eslint/no-duplicate-type-constituents\n keyof OptionalProps | keyof DefaultProps | keyof XstyledProps | keyof RequiredProps | keyof DSGridT.Props\n >,\n XstyledProps,\n RequiredProps,\n DSGridT.Props {\n 'data-testid'?: string;\n innerRef?: TypescriptHelpersT.AnyRef<HTMLDivElement>;\n }\n}\n\nexport const defaultProps: DSCardV3T.DefaultProps = {};\n\nexport const DSCardV3PropTypes: DSPropTypesSchema<Omit<DSCardV3T.Props, 'data-testid'>> = {\n ...DSGridPropTypes,\n ...getPropsPerSlotPropTypes(DSCardV3Name, CARD_V_3_SLOTS_PARTS.ROOT),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n variant: PropTypes.oneOf(Object.values(Variants)).description('The variant of the card'),\n children: PropTypes.any.description('The content of the card'),\n disabled: PropTypes.bool\n .description('Deprecated. Use variant=\"disabled\" or variant=\"accented-disabled\" instead.')\n .deprecated({ version: '4.x', message: 'use variant=\"disabled\" or variant=\"accented-disabled\" instead' }),\n};\n\nexport const DSCardV3PropTypesSchema = DSCardV3PropTypes as unknown as ValidationMap<DSCardV3T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,qBAA8C;AAE9C,8BAKO;AAEP,uBAA6D;AAyDtD,MAAM,eAAuC,CAAC;AAE9C,MAAM,oBAA6E;AAAA,EACxF,GAAG;AAAA,EACH,OAAG,kDAAyB,+BAAc,sCAAqB,IAAI;AAAA,EACnE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,SAAS,kCAAU,MAAM,OAAO,OAAO,yBAAQ,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACvF,UAAU,kCAAU,IAAI,YAAY,yBAAyB;AAAA,EAC7D,UAAU,kCAAU,KACjB,YAAY,4EAA4E,EACxF,WAAW,EAAE,SAAS,OAAO,SAAS,gEAAgE,CAAC;AAC5G;AAEO,MAAM,0BAA0B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
const SlotPropsAsObj = {
|
|
26
|
+
dsCardv3Root: { "aria-label": "just a typescript test" },
|
|
27
|
+
dsCardv3Header: { "aria-label": "just a typescript test" },
|
|
28
|
+
dsCardv3Body: { "aria-label": "just a typescript test" },
|
|
29
|
+
dsCardv3Footer: { "aria-label": "just a typescript test" }
|
|
30
|
+
};
|
|
31
|
+
const SlotPropsAsFunctions = {
|
|
32
|
+
dsCardv3Root: () => ({ "aria-label": "just a typescript test" }),
|
|
33
|
+
dsCardv3Header: () => ({ "aria-label": "just a typescript test" }),
|
|
34
|
+
dsCardv3Body: () => ({ "aria-label": "just a typescript test" }),
|
|
35
|
+
dsCardv3Footer: () => ({ "aria-label": "just a typescript test" })
|
|
36
|
+
};
|
|
37
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
38
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSCardV3Name, CARD_V_3_SLOTS } from '../constants/index.js';\nimport type { DSCardV3T } from '../react-desc-prop-types.js';\nimport type { DSCardHeaderT } from '../parts/DSCardHeader/react-desc-prop-types.js';\nimport type { DSCardBodyT } from '../parts/DSCardBody/react-desc-prop-types.js';\nimport type { DSCardFooterT } from '../parts/DSCardFooter/react-desc-prop-types.js';\n\n// ds-card-v3 uses a flattened-slot pattern: all four slots live under the single\n// `DSCardv3` component name, but the slot props are exposed across the root and the\n// three part components. The combined object below therefore intersects each\n// component's slot prop, and the exhaustiveness check covers all four slots at once.\n\nconst SlotPropsAsObj: Partial<DSCardV3T.Props> &\n Partial<DSCardHeaderT.Props> &\n Partial<DSCardBodyT.Props> &\n Partial<DSCardFooterT.Props> = {\n dsCardv3Root: { 'aria-label': 'just a typescript test' },\n dsCardv3Header: { 'aria-label': 'just a typescript test' },\n dsCardv3Body: { 'aria-label': 'just a typescript test' },\n dsCardv3Footer: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSCardV3T.SlotFunctionArguments &\n DSCardHeaderT.SlotFunctionArguments &\n DSCardBodyT.SlotFunctionArguments &\n DSCardFooterT.SlotFunctionArguments = {\n dsCardv3Root: () => ({ 'aria-label': 'just a typescript test' }),\n dsCardv3Header: () => ({ 'aria-label': 'just a typescript test' }),\n dsCardv3Body: () => ({ 'aria-label': 'just a typescript test' }),\n dsCardv3Footer: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot defined in CARD_V_3_SLOTS is\n// missing from the combined SlotFunctionArguments surface above.\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSCardV3Name, typeof CARD_V_3_SLOTS>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACcvB,MAAM,iBAG2B;AAAA,EAC/B,cAAc,EAAE,cAAc,yBAAyB;AAAA,EACvD,gBAAgB,EAAE,cAAc,yBAAyB;AAAA,EACzD,cAAc,EAAE,cAAc,yBAAyB;AAAA,EACvD,gBAAgB,EAAE,cAAc,yBAAyB;AAC3D;AAEA,MAAM,uBAGkC;AAAA,EACtC,cAAc,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC9D,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAChE,cAAc,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC9D,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAClE;AAIA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -79,6 +79,10 @@ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)
|
|
|
79
79
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCardV3, { ...testExplicitDefinition }),
|
|
80
80
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCardV3, { ...testInferedTypeCompatibility }),
|
|
81
81
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCardV3, { ...testDefinitionAsConst }),
|
|
82
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCardV3, { "data-testid": "ds-card-v3-id", children: "Card Label" })
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCardV3, { "data-testid": "ds-card-v3-id", children: "Card Label" }),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCardV3, { variant: "default", children: "Card Label" }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCardV3, { variant: "accented", children: "Card Label" }),
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCardV3, { variant: "disabled", children: "Card Label" }),
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSCardV3, { variant: "accented-disabled", children: "Card Label" })
|
|
83
87
|
] });
|
|
84
88
|
//# sourceMappingURL=typescript-dscard-v3-valid.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-dscard-v3-valid.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { DSCardV3 } from '../index.js';\nimport type { DSCardV3T } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSCardV3T.Props;\ntype ComponentPropsInternals = DSCardV3T.InternalProps;\ntype ComponentPropsDefaultProps = DSCardV3T.DefaultProps;\ntype ComponentPropsOptionalProps = DSCardV3T.OptionalProps;\ntype ComponentPropsRequiredProps = DSCardV3T.RequiredProps;\n\nconst ref = createRef<HTMLDivElement>();\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n children: 'Button Label',\n};\nconst testOptionalProps: ComponentPropsOptionalProps = {\n children: 'Card Label',\n disabled: false,\n variant: 'accented',\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n 'data-testid': 'ds-cardv3',\n};\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n 'data-testid': 'ds-card-v3-id',\n};\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n 'data-testid': 'ds-card-v3-id',\n children: 'Button Label',\n innerRef: ref,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n 'data-testid': 'ds-card-v3-id',\n children: 'Button Label',\n variant: 'accented',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n 'data-testid': 'ds-card-v3-id',\n children: 'Button Label',\n variant: 'accented',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSCardV3 {...testExplicitDefinition} />\n <DSCardV3 {...testInferedTypeCompatibility} />\n <DSCardV3 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSCardV3 data-testid=\"ds-card-v3-id\">Card Label</DSCardV3>\n </>\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC0ErB;AAzEF,mBAA0B;AAC1B,eAAyB;AAUzB,MAAM,UAAM,wBAA0B;AAEtC,MAAM,oBAAiD;AAAA,EACrD,UAAU;AACZ;AACA,MAAM,oBAAiD;AAAA,EACrD,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;AAIA,MAAM,sBAA2D;AAAA,EAC/D,eAAe;AACjB;AACA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AACA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,uBAA6D;AAAA,EACjE,eAAe;AACjB;AACA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AACA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,eAAe;AAAA,EACf,UAAU;AAAA,EACV,UAAU;AACZ;AAGA,MAAM,+BAA+B;AAAA,EACnC,eAAe;AAAA,EACf,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,wBAAwB;AAAA,EAC5B,eAAe;AAAA,EACf,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,qBAAU,GAAG,wBAAwB;AAAA,EACtC,4CAAC,qBAAU,GAAG,8BAA8B;AAAA,EAC5C,4CAAC,qBAAU,GAAG,uBAAuB;AAAA,EAErC,4CAAC,qBAAS,eAAY,iBAAgB,wBAAU;AAAA,GAClD;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { createRef } from 'react';\nimport { DSCardV3 } from '../index.js';\nimport type { DSCardV3T } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSCardV3T.Props;\ntype ComponentPropsInternals = DSCardV3T.InternalProps;\ntype ComponentPropsDefaultProps = DSCardV3T.DefaultProps;\ntype ComponentPropsOptionalProps = DSCardV3T.OptionalProps;\ntype ComponentPropsRequiredProps = DSCardV3T.RequiredProps;\n\nconst ref = createRef<HTMLDivElement>();\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n children: 'Button Label',\n};\nconst testOptionalProps: ComponentPropsOptionalProps = {\n children: 'Card Label',\n disabled: false,\n variant: 'accented',\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n 'data-testid': 'ds-cardv3',\n};\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n 'data-testid': 'ds-card-v3-id',\n};\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n 'data-testid': 'ds-card-v3-id',\n children: 'Button Label',\n innerRef: ref,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n 'data-testid': 'ds-card-v3-id',\n children: 'Button Label',\n variant: 'accented',\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n 'data-testid': 'ds-card-v3-id',\n children: 'Button Label',\n variant: 'accented',\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSCardV3 {...testExplicitDefinition} />\n <DSCardV3 {...testInferedTypeCompatibility} />\n <DSCardV3 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSCardV3 data-testid=\"ds-card-v3-id\">Card Label</DSCardV3>\n {/* all four variant values are accepted */}\n <DSCardV3 variant=\"default\">Card Label</DSCardV3>\n <DSCardV3 variant=\"accented\">Card Label</DSCardV3>\n <DSCardV3 variant=\"disabled\">Card Label</DSCardV3>\n <DSCardV3 variant=\"accented-disabled\">Card Label</DSCardV3>\n </>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC0ErB;AAzEF,mBAA0B;AAC1B,eAAyB;AAUzB,MAAM,UAAM,wBAA0B;AAEtC,MAAM,oBAAiD;AAAA,EACrD,UAAU;AACZ;AACA,MAAM,oBAAiD;AAAA,EACrD,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;AAIA,MAAM,sBAA2D;AAAA,EAC/D,eAAe;AACjB;AACA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AACA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,uBAA6D;AAAA,EACjE,eAAe;AACjB;AACA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AACA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,eAAe;AAAA,EACf,UAAU;AAAA,EACV,UAAU;AACZ;AAGA,MAAM,+BAA+B;AAAA,EACnC,eAAe;AAAA,EACf,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,wBAAwB;AAAA,EAC5B,eAAe;AAAA,EACf,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,qBAAU,GAAG,wBAAwB;AAAA,EACtC,4CAAC,qBAAU,GAAG,8BAA8B;AAAA,EAC5C,4CAAC,qBAAU,GAAG,uBAAuB;AAAA,EAErC,4CAAC,qBAAS,eAAY,iBAAgB,wBAAU;AAAA,EAEhD,4CAAC,qBAAS,SAAQ,WAAU,wBAAU;AAAA,EACtC,4CAAC,qBAAS,SAAQ,YAAW,wBAAU;AAAA,EACvC,4CAAC,qBAAS,SAAQ,YAAW,wBAAU;AAAA,EACvC,4CAAC,qBAAS,SAAQ,qBAAoB,wBAAU;AAAA,GAClD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSCardV3.js
CHANGED
|
@@ -6,19 +6,19 @@ import { Grid } from "@elliemae/ds-grid";
|
|
|
6
6
|
import { DSCardV3PropTypesSchema } from "./react-desc-prop-types.js";
|
|
7
7
|
import { useCardV3 } from "./config/useCardV3.js";
|
|
8
8
|
import { CARD_V_3_SLOTS, DSCardV3Name, Variants } from "./constants/index.js";
|
|
9
|
+
const isAccentedVariant = (variant) => variant === Variants.ACCENTED || variant === Variants.ACCENTED_DISABLED;
|
|
10
|
+
const isDisabledVariant = (variant) => variant === Variants.DISABLED || variant === Variants.ACCENTED_DISABLED;
|
|
9
11
|
const StyledWrapper = styled(Grid, { name: DSCardV3Name, slot: CARD_V_3_SLOTS.ROOT })`
|
|
10
12
|
min-height: 4.923rem;
|
|
11
13
|
min-width: 240px;
|
|
12
14
|
position: relative;
|
|
13
15
|
border: 1px solid
|
|
14
|
-
${({ variant, theme }) =>
|
|
15
|
-
if (variant === Variants.ACCENTED) return theme.colors.brand["500"];
|
|
16
|
-
return theme.colors.neutral["100"];
|
|
17
|
-
}};
|
|
16
|
+
${({ variant, theme }) => isAccentedVariant(variant) ? theme.colors.brand["500"] : theme.colors.neutral["100"]};
|
|
18
17
|
|
|
19
|
-
${({ variant, theme
|
|
20
|
-
if (variant
|
|
21
|
-
|
|
18
|
+
${({ variant, theme }) => {
|
|
19
|
+
if (!isAccentedVariant(variant)) return "";
|
|
20
|
+
const accentColor = isDisabledVariant(variant) ? theme.colors.neutral["100"] : theme.colors.brand["500"];
|
|
21
|
+
return `
|
|
22
22
|
&::after {
|
|
23
23
|
content: '';
|
|
24
24
|
display: block;
|
|
@@ -26,41 +26,34 @@ const StyledWrapper = styled(Grid, { name: DSCardV3Name, slot: CARD_V_3_SLOTS.RO
|
|
|
26
26
|
top: 0;
|
|
27
27
|
left: 0;
|
|
28
28
|
height: 100%;
|
|
29
|
-
border-left: 5px solid ${
|
|
29
|
+
border-left: 5px solid ${accentColor};
|
|
30
30
|
}
|
|
31
31
|
`;
|
|
32
|
-
return `
|
|
33
|
-
|
|
34
|
-
`;
|
|
35
32
|
}};
|
|
36
33
|
|
|
37
|
-
background-color: ${({ theme }) => theme.colors.neutral["000"]};
|
|
38
34
|
border-radius: 4px;
|
|
39
|
-
${(
|
|
40
|
-
if (!
|
|
41
|
-
if (
|
|
42
|
-
return `background-color: ${
|
|
43
|
-
border-color: ${
|
|
44
|
-
return `background-color: ${
|
|
35
|
+
${({ variant, theme }) => {
|
|
36
|
+
if (!isDisabledVariant(variant)) return `background-color: ${theme.colors.neutral["000"]};`;
|
|
37
|
+
if (isAccentedVariant(variant))
|
|
38
|
+
return `background-color: ${theme.colors.neutral["050"]};
|
|
39
|
+
border-color: ${theme.colors.neutral["100"]};`;
|
|
40
|
+
return `background-color: ${theme.colors.neutral["050"]};`;
|
|
45
41
|
}}
|
|
46
42
|
|
|
47
|
-
${(
|
|
48
|
-
&:disabled {
|
|
49
|
-
background-color: ${({ theme }) => theme.colors.neutral["050"]};
|
|
50
|
-
}
|
|
43
|
+
${({ variant, theme }) => isDisabledVariant(variant) ? "box-shadow: none;" : `box-shadow: ${theme.shadows.xs};`}
|
|
51
44
|
&:hover {
|
|
52
|
-
${(
|
|
45
|
+
${({ variant }) => !isDisabledVariant(variant) ? "box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.6);" : ""}
|
|
53
46
|
}
|
|
54
47
|
${xStyledCommonProps}
|
|
55
48
|
`;
|
|
56
49
|
const DSCardV3 = (props) => {
|
|
57
|
-
const { propsWithDefault, gridProps } = useCardV3(props);
|
|
50
|
+
const { propsWithDefault, gridProps, resolvedVariant } = useCardV3(props);
|
|
58
51
|
return /* @__PURE__ */ jsx(
|
|
59
52
|
StyledWrapper,
|
|
60
53
|
{
|
|
61
54
|
getOwnerProps: () => propsWithDefault,
|
|
62
55
|
getOwnerPropsArguments: () => ({}),
|
|
63
|
-
variant:
|
|
56
|
+
variant: resolvedVariant,
|
|
64
57
|
...gridProps,
|
|
65
58
|
children: propsWithDefault.children
|
|
66
59
|
}
|