@elliemae/ds-card-navigation 3.55.1 → 3.57.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSCardNavigation.js +50 -39
- package/dist/cjs/DSCardNavigation.js.map +2 -2
- package/dist/cjs/config/useCardNavigation.js +19 -4
- package/dist/cjs/config/useCardNavigation.js.map +2 -2
- package/dist/cjs/constants/index.js +11 -2
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/parts/ActionsRegion.js +72 -0
- package/dist/cjs/parts/ActionsRegion.js.map +7 -0
- package/dist/cjs/{style.js → parts/style.js} +83 -38
- package/dist/cjs/parts/style.js.map +7 -0
- package/dist/cjs/parts/text-region/IconAndTextsRegion.js +107 -0
- package/dist/cjs/parts/text-region/IconAndTextsRegion.js.map +7 -0
- package/dist/cjs/parts/text-region/IconAndTextsRegionContent.js +128 -0
- package/dist/cjs/parts/text-region/IconAndTextsRegionContent.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +3 -3
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/DSCardNavigation.js +51 -48
- package/dist/esm/DSCardNavigation.js.map +2 -2
- package/dist/esm/config/useCardNavigation.js +20 -5
- package/dist/esm/config/useCardNavigation.js.map +2 -2
- package/dist/esm/constants/index.js +11 -2
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/parts/ActionsRegion.js +46 -0
- package/dist/esm/parts/ActionsRegion.js.map +7 -0
- package/dist/esm/parts/style.js +170 -0
- package/dist/esm/parts/style.js.map +7 -0
- package/dist/esm/parts/text-region/IconAndTextsRegion.js +77 -0
- package/dist/esm/parts/text-region/IconAndTextsRegion.js.map +7 -0
- package/dist/esm/parts/text-region/IconAndTextsRegionContent.js +107 -0
- package/dist/esm/parts/text-region/IconAndTextsRegionContent.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +3 -3
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/DSCardNavigation.d.ts +1 -1
- package/dist/types/config/useCardNavigation.d.ts +7 -6
- package/dist/types/constants/index.d.ts +13 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/parts/ActionsRegion.d.ts +10 -0
- package/dist/types/{style.d.ts → parts/style.d.ts} +11 -5
- package/dist/types/parts/text-region/IconAndTextsRegion.d.ts +15 -0
- package/dist/types/parts/text-region/IconAndTextsRegionContent.d.ts +17 -0
- package/dist/types/tests/tooltip-tests/DSCardNavigation.tooltip.wrapText.interdependecy.test.playwright.d.ts +1 -0
- package/dist/types/tests/tooltip-tests/DSCardNavigationTooltipTestRenderer.d.ts +1 -0
- package/package.json +16 -11
- package/dist/cjs/DescriptionComponent.js +0 -79
- package/dist/cjs/DescriptionComponent.js.map +0 -7
- package/dist/cjs/TitleComponent.js +0 -51
- package/dist/cjs/TitleComponent.js.map +0 -7
- package/dist/cjs/style.js.map +0 -7
- package/dist/esm/DescriptionComponent.js +0 -49
- package/dist/esm/DescriptionComponent.js.map +0 -7
- package/dist/esm/TitleComponent.js +0 -21
- package/dist/esm/TitleComponent.js.map +0 -7
- package/dist/esm/style.js +0 -125
- package/dist/esm/style.js.map +0 -7
- package/dist/types/DescriptionComponent.d.ts +0 -4
- package/dist/types/TitleComponent.d.ts +0 -4
- package/dist/types/tests/overflow/DSCardNavigationOverflowTestRenderer.d.ts +0 -2
- package/dist/types/tests/wraptext/DSCardNavigationWrapTextTestRenderer.d.ts +0 -2
- /package/dist/types/tests/{overflow/DSCardNavigation.overflow.test.playwright.d.ts → tooltip-tests/DSCardNavigation.tooltip.hover.test.playwright.d.ts} +0 -0
- /package/dist/types/tests/{wraptext/DSCardNavigation.wrapText.test.playwright.d.ts → tooltip-tests/DSCardNavigation.tooltip.keyboard.test.playwright.d.ts} +0 -0
|
@@ -34,51 +34,62 @@ __export(DSCardNavigation_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(DSCardNavigation_exports);
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
-
var import_ds_button_v2 = require("@elliemae/ds-button-v2");
|
|
38
|
-
var import_ds_icons = require("@elliemae/ds-icons");
|
|
39
37
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
40
|
-
var import_react = require("react");
|
|
41
38
|
var import_useCardNavigation = require("./config/useCardNavigation.js");
|
|
42
39
|
var import_constants = require("./constants/index.js");
|
|
43
40
|
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
44
|
-
var import_style = require("./style.js");
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
const mainIconColor = ["neutral", "0"];
|
|
41
|
+
var import_style = require("./parts/style.js");
|
|
42
|
+
var import_IconAndTextsRegion = require("./parts/text-region/IconAndTextsRegion.js");
|
|
43
|
+
var import_ActionsRegion = require("./parts/ActionsRegion.js");
|
|
48
44
|
const DSCardNavigation = (props) => {
|
|
49
|
-
const
|
|
50
|
-
const {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
45
|
+
const cardNavigationConfig = (0, import_useCardNavigation.useCardNavigation)(props);
|
|
46
|
+
const {
|
|
47
|
+
propsWithDefault,
|
|
48
|
+
xstyledProps,
|
|
49
|
+
globalProps,
|
|
50
|
+
iconAndTextsRegionIsFocused,
|
|
51
|
+
showFocusRingAroundAll,
|
|
52
|
+
hideFocusRingAroundAll,
|
|
53
|
+
instanceUid
|
|
54
|
+
} = cardNavigationConfig;
|
|
55
|
+
const { containerProps, title, description, type, Icon, actions, wrapText } = propsWithDefault;
|
|
56
|
+
const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
58
|
+
import_style.StyledCardNavigationBoxWrapper,
|
|
59
|
+
{
|
|
60
|
+
...globalProps,
|
|
61
|
+
...xstyledProps,
|
|
62
|
+
...containerProps,
|
|
63
|
+
getOwnerProps,
|
|
64
|
+
getOwnerPropsArguments,
|
|
65
|
+
$isIconAndTextsRegionFocused: iconAndTextsRegionIsFocused,
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
68
|
+
import_IconAndTextsRegion.IconAndTextsRegion,
|
|
69
|
+
{
|
|
70
|
+
getOwnerProps,
|
|
71
|
+
getOwnerPropsArguments,
|
|
72
|
+
title,
|
|
73
|
+
description,
|
|
74
|
+
wrapText,
|
|
75
|
+
type,
|
|
76
|
+
Icon,
|
|
77
|
+
showFocusRingAroundAll,
|
|
78
|
+
hideFocusRingAroundAll
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
|
+
import_ActionsRegion.ActionsRegion,
|
|
83
|
+
{
|
|
84
|
+
getOwnerProps,
|
|
85
|
+
getOwnerPropsArguments,
|
|
86
|
+
actions,
|
|
87
|
+
instanceUid
|
|
88
|
+
}
|
|
78
89
|
)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
);
|
|
82
93
|
};
|
|
83
94
|
DSCardNavigation.displayName = import_constants.DSCardNavigationName;
|
|
84
95
|
const DSCardNavigationWithSchema = (0, import_ds_props_helpers.describe)(DSCardNavigation);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCardNavigation.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { useCardNavigation } from './config/useCardNavigation.js';\nimport { DSCardNavigationName } from './constants/index.js';\nimport { type DSCardNavigationT, DSCardNavigationPropTypesSchema } from './react-desc-prop-types.js';\nimport { StyledCardNavigationBoxWrapper } from './parts/style.js';\nimport { IconAndTextsRegion } from './parts/text-region/IconAndTextsRegion.js';\nimport { ActionsRegion } from './parts/ActionsRegion.js';\n\nconst DSCardNavigation: React.ComponentType<DSCardNavigationT.Props> = (props) => {\n const cardNavigationConfig = useCardNavigation(props);\n const {\n propsWithDefault,\n xstyledProps,\n globalProps,\n iconAndTextsRegionIsFocused,\n showFocusRingAroundAll,\n hideFocusRingAroundAll,\n instanceUid,\n } = cardNavigationConfig;\n const { containerProps, title, description, type, Icon, actions, wrapText } = propsWithDefault;\n\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSCardNavigationT.Props>(propsWithDefault);\n\n return (\n <StyledCardNavigationBoxWrapper\n {...globalProps}\n {...xstyledProps}\n {...containerProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n $isIconAndTextsRegionFocused={iconAndTextsRegionIsFocused}\n >\n <IconAndTextsRegion\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n title={title}\n description={description}\n wrapText={wrapText}\n type={type}\n Icon={Icon}\n showFocusRingAroundAll={showFocusRingAroundAll}\n hideFocusRingAroundAll={hideFocusRingAroundAll}\n />\n <ActionsRegion\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n actions={actions}\n instanceUid={instanceUid}\n />\n </StyledCardNavigationBoxWrapper>\n );\n};\n\nDSCardNavigation.displayName = DSCardNavigationName;\nconst DSCardNavigationWithSchema = describe(DSCardNavigation);\nDSCardNavigationWithSchema.propTypes = DSCardNavigationPropTypesSchema;\n\nexport { DSCardNavigation, DSCardNavigationWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBnB;AAzBJ,8BAAwC;AAExC,+BAAkC;AAClC,uBAAqC;AACrC,mCAAwE;AACxE,mBAA+C;AAC/C,gCAAmC;AACnC,2BAA8B;AAE9B,MAAM,mBAAiE,CAAC,UAAU;AAChF,QAAM,2BAAuB,4CAAkB,KAAK;AACpD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,gBAAgB,OAAO,aAAa,MAAM,MAAM,SAAS,SAAS,IAAI;AAE9E,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAuC,gBAAgB;AAEzG,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,8BAA8B;AAAA,MAE9B;AAAA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,iBAAiB,cAAc;AAC/B,MAAM,iCAA6B,kCAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -40,20 +40,35 @@ var import_useValidateProps = require("./useValidateProps.js");
|
|
|
40
40
|
const useCardNavigation = (propsFromUser) => {
|
|
41
41
|
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
|
|
42
42
|
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSCardNavigationPropTypes);
|
|
43
|
+
const { title, type, ...globalPropsWithoutReusedReservedKeywords } = propsWithDefault;
|
|
44
|
+
const globalProps = (0, import_ds_props_helpers.useGetGlobalAttributes)(globalPropsWithoutReusedReservedKeywords);
|
|
43
45
|
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
|
|
44
46
|
const instanceUid = import_react.default.useMemo(() => `ds-card-navigation-${(0, import_uid.uid)(5)}`, []);
|
|
47
|
+
const [iconAndTextsRegionIsFocused, setIconAndTextsRegionIsFocused] = import_react.default.useState(false);
|
|
48
|
+
const showFocusRingAroundAll = import_react.default.useCallback(() => {
|
|
49
|
+
setIconAndTextsRegionIsFocused(true);
|
|
50
|
+
}, []);
|
|
51
|
+
const hideFocusRingAroundAll = import_react.default.useCallback(() => {
|
|
52
|
+
setIconAndTextsRegionIsFocused(false);
|
|
53
|
+
}, []);
|
|
45
54
|
return import_react.default.useMemo(
|
|
46
55
|
() => ({
|
|
47
56
|
propsWithDefault,
|
|
48
57
|
xstyledProps,
|
|
49
|
-
|
|
50
|
-
|
|
58
|
+
globalProps,
|
|
59
|
+
instanceUid,
|
|
60
|
+
iconAndTextsRegionIsFocused,
|
|
61
|
+
showFocusRingAroundAll,
|
|
62
|
+
hideFocusRingAroundAll
|
|
51
63
|
}),
|
|
52
64
|
[
|
|
53
65
|
propsWithDefault,
|
|
54
66
|
xstyledProps,
|
|
55
|
-
|
|
56
|
-
|
|
67
|
+
globalProps,
|
|
68
|
+
instanceUid,
|
|
69
|
+
iconAndTextsRegionIsFocused,
|
|
70
|
+
showFocusRingAroundAll,
|
|
71
|
+
hideFocusRingAroundAll
|
|
57
72
|
]
|
|
58
73
|
);
|
|
59
74
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useCardNavigation.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSCardNavigationT, DSCardNavigationPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardNavigationCTX {\n propsWithDefault: DSCardNavigationT.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useCardNavigation = (propsFromUser: DSCardNavigationT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardNavigationT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardNavigationPropTypes);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSCardNavigationT, DSCardNavigationPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardNavigationCTX {\n propsWithDefault: DSCardNavigationT.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n instanceUid: string;\n iconAndTextsRegionIsFocused: boolean;\n showFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;\n hideFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;\n}\n\nexport const useCardNavigation = (propsFromUser: DSCardNavigationT.Props): CardNavigationCTX => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardNavigationT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardNavigationPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n // exclude `title` AND `type` as they are reused reserved keyword from global props,\n // we intend to \"consume\" those props, not \"spread\" in the html\n const { title, type, ...globalPropsWithoutReusedReservedKeywords } = propsWithDefault;\n const globalProps = useGetGlobalAttributes(globalPropsWithoutReusedReservedKeywords);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const instanceUid = React.useMemo(() => `ds-card-navigation-${uid(5)}`, []);\n const [iconAndTextsRegionIsFocused, setIconAndTextsRegionIsFocused] = React.useState(false);\n const showFocusRingAroundAll = React.useCallback<React.FocusEventHandler<HTMLDivElement>>(() => {\n setIconAndTextsRegionIsFocused(true);\n }, []);\n const hideFocusRingAroundAll = React.useCallback<React.FocusEventHandler<HTMLDivElement>>(() => {\n setIconAndTextsRegionIsFocused(false);\n }, []);\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n globalProps,\n instanceUid,\n iconAndTextsRegionIsFocused,\n showFocusRingAroundAll,\n hideFocusRingAroundAll,\n }),\n [\n propsWithDefault,\n xstyledProps,\n globalProps,\n instanceUid,\n iconAndTextsRegionIsFocused,\n showFocusRingAroundAll,\n hideFocusRingAroundAll,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAyF;AACzF,iBAAoB;AACpB,mCAAgF;AAChF,8BAAiC;AAY1B,MAAM,oBAAoB,CAAC,kBAA8D;AAI9F,QAAM,uBAAmB,sDAA8D,eAAe,yCAAY;AAClH,gDAAiB,kBAAkB,sDAAyB;AAM5D,QAAM,EAAE,OAAO,MAAM,GAAG,yCAAyC,IAAI;AACrE,QAAM,kBAAc,gDAAuB,wCAAwC;AACnF,QAAM,mBAAe,4CAAmB,gBAAgB;AAIxD,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,0BAAsB,gBAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAC1E,QAAM,CAAC,6BAA6B,8BAA8B,IAAI,aAAAA,QAAM,SAAS,KAAK;AAC1F,QAAM,yBAAyB,aAAAA,QAAM,YAAqD,MAAM;AAC9F,mCAA+B,IAAI;AAAA,EACrC,GAAG,CAAC,CAAC;AACL,QAAM,yBAAyB,aAAAA,QAAM,YAAqD,MAAM;AAC9F,mCAA+B,KAAK;AAAA,EACtC,GAAG,CAAC,CAAC;AAEL,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -43,11 +43,20 @@ const CARD_NAVIGATION_SLOTS = {
|
|
|
43
43
|
TITLE: "title",
|
|
44
44
|
ACTIONS: "actions",
|
|
45
45
|
TYPE: "type",
|
|
46
|
-
CENTRAL_CONTENT: "central-content"
|
|
46
|
+
CENTRAL_CONTENT: "central-content",
|
|
47
|
+
INTERACTIVE_ELEMENT_REGION: "interactive-element-region",
|
|
48
|
+
DESCRIPTION_TEXT: "description-text",
|
|
49
|
+
TITLE_TYPOGRAPHY: "title-typography",
|
|
50
|
+
TITLE_WRAPPER: "title-wrapper",
|
|
51
|
+
CONTENT: "content",
|
|
52
|
+
BUTTON_WRAPPER: "button-wrapper",
|
|
53
|
+
ACTION_BUTTON: "action-button"
|
|
47
54
|
};
|
|
48
55
|
const CARD_NAVIGATION_DATA_TESTID = {
|
|
49
56
|
...(0, import_ds_system.slotObjectToDataTestIds)(DSCardNavigationName, CARD_NAVIGATION_SLOTS),
|
|
50
|
-
DESCRIPTION_TEXT: "ds-card-navigation--description"
|
|
57
|
+
DESCRIPTION_TEXT: "ds-card-navigation--description",
|
|
58
|
+
TITLE_TYPOGRAPHY: "ds-typography-element",
|
|
59
|
+
ACTION_BUTTON: "ds-button"
|
|
51
60
|
};
|
|
52
61
|
const CardNavigationTypes = {
|
|
53
62
|
BORROWER: "borrower",
|
|
@@ -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 DSCardNavigationName = 'DSCardnavigation';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CARD_NAVIGATION_SLOTS = {\n ROOT: 'root',\n TITLE: 'title',\n ACTIONS: 'actions',\n TYPE: 'type',\n CENTRAL_CONTENT: 'central-content',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CARD_NAVIGATION_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSCardNavigationName, CARD_NAVIGATION_SLOTS),\n DESCRIPTION_TEXT: 'ds-card-navigation--description',\n};\n\nexport const CardNavigationTypes = {\n BORROWER: 'borrower',\n FINANCIAL: 'financial',\n LOAN: 'loan',\n REGULATORY: 'regulatory',\n} as const;\n\nexport const CardNavigationTypesValues = Object.values(CardNavigationTypes);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,uBAAuB;AAG7B,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSCardNavigationName = 'DSCardnavigation';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CARD_NAVIGATION_SLOTS = {\n ROOT: 'root',\n TITLE: 'title',\n ACTIONS: 'actions',\n TYPE: 'type',\n CENTRAL_CONTENT: 'central-content',\n INTERACTIVE_ELEMENT_REGION: 'interactive-element-region',\n DESCRIPTION_TEXT: 'description-text',\n TITLE_TYPOGRAPHY: 'title-typography',\n TITLE_WRAPPER: 'title-wrapper',\n CONTENT: 'content',\n BUTTON_WRAPPER: 'button-wrapper',\n ACTION_BUTTON: 'action-button',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CARD_NAVIGATION_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSCardNavigationName, CARD_NAVIGATION_SLOTS),\n DESCRIPTION_TEXT: 'ds-card-navigation--description',\n TITLE_TYPOGRAPHY: 'ds-typography-element',\n ACTION_BUTTON: 'ds-button',\n};\n\nexport const CardNavigationTypes = {\n BORROWER: 'borrower',\n FINANCIAL: 'financial',\n LOAN: 'loan',\n REGULATORY: 'regulatory',\n} as const;\n\nexport const CardNavigationTypesValues = Object.values(CardNavigationTypes);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,uBAAuB;AAG7B,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,4BAA4B;AAAA,EAC5B,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,eAAe;AACjB;AAGO,MAAM,8BAA8B;AAAA,EACzC,OAAG,0CAAwB,sBAAsB,qBAAqB;AAAA,EACtE,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,eAAe;AACjB;AAEO,MAAM,sBAAsB;AAAA,EACjC,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,YAAY;AACd;AAEO,MAAM,4BAA4B,OAAO,OAAO,mBAAmB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __export(index_exports, {
|
|
|
33
33
|
CardNavigationTypes: () => import_constants.CardNavigationTypes,
|
|
34
34
|
CardNavigationTypesValues: () => import_constants.CardNavigationTypesValues,
|
|
35
35
|
DSCardNavigation: () => import_DSCardNavigation2.DSCardNavigation,
|
|
36
|
+
DSCardNavigationName: () => import_constants.DSCardNavigationName,
|
|
36
37
|
DSCardNavigationWithSchema: () => import_DSCardNavigation2.DSCardNavigationWithSchema,
|
|
37
38
|
default: () => index_default
|
|
38
39
|
});
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport { DSCardNavigation } from './DSCardNavigation.js';\nimport type {} from '@xstyled/system';\nexport { DSCardNavigation, DSCardNavigationWithSchema } from './DSCardNavigation.js';\nexport { type DSCardNavigationT } from './react-desc-prop-types.js';\nexport {\n CARD_NAVIGATION_SLOTS,\n CARD_NAVIGATION_DATA_TESTID,\n CardNavigationTypesValues,\n CardNavigationTypes,\n} from './constants/index.js';\n\nexport default DSCardNavigation;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAiC;AAEjC,IAAAA,2BAA6D;AAE7D,
|
|
4
|
+
"sourcesContent": ["// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport { DSCardNavigation } from './DSCardNavigation.js';\nimport type {} from '@xstyled/system';\nexport { DSCardNavigation, DSCardNavigationWithSchema } from './DSCardNavigation.js';\nexport { type DSCardNavigationT } from './react-desc-prop-types.js';\nexport {\n CARD_NAVIGATION_SLOTS,\n CARD_NAVIGATION_DATA_TESTID,\n CardNavigationTypesValues,\n CardNavigationTypes,\n DSCardNavigationName,\n} from './constants/index.js';\n\nexport default DSCardNavigation;\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;ADEvB,8BAAiC;AAEjC,IAAAA,2BAA6D;AAE7D,uBAMO;AAEP,IAAO,gBAAQ;",
|
|
6
6
|
"names": ["import_DSCardNavigation"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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 ActionsRegion_exports = {};
|
|
30
|
+
__export(ActionsRegion_exports, {
|
|
31
|
+
ActionsRegion: () => ActionsRegion
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(ActionsRegion_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_button_v2 = require("@elliemae/ds-button-v2");
|
|
37
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
38
|
+
var import_style = require("./style.js");
|
|
39
|
+
const ActionsRegion = ({
|
|
40
|
+
actions,
|
|
41
|
+
instanceUid,
|
|
42
|
+
getOwnerProps,
|
|
43
|
+
getOwnerPropsArguments
|
|
44
|
+
}) => {
|
|
45
|
+
if (actions.length === 0) return null;
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledCardNavigationActions, { getOwnerProps, getOwnerPropsArguments, children: actions.map(({ icon, Icon, onClick, ...unexpectedButPreviouslySupportedOtherProps }, index) => {
|
|
47
|
+
const defaultIconJSX = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.MoreOptionsVert, { "aria-label": "More options" });
|
|
48
|
+
const iconJSX = icon ?? defaultIconJSX;
|
|
49
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
+
import_style.StyledCardNavigationButtonWrapper,
|
|
51
|
+
{
|
|
52
|
+
getOwnerProps,
|
|
53
|
+
getOwnerPropsArguments,
|
|
54
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
import_style.StyledCardNavigationActionButton,
|
|
56
|
+
{
|
|
57
|
+
onClick,
|
|
58
|
+
"aria-label": "More options",
|
|
59
|
+
...unexpectedButPreviouslySupportedOtherProps,
|
|
60
|
+
buttonType: import_ds_button_v2.BUTTON_TYPES.ICON,
|
|
61
|
+
size: import_ds_button_v2.BUTTON_SIZES.L,
|
|
62
|
+
getOwnerProps,
|
|
63
|
+
getOwnerPropsArguments,
|
|
64
|
+
children: Icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {}) : iconJSX
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
},
|
|
68
|
+
`${instanceUid}-${index}`
|
|
69
|
+
);
|
|
70
|
+
}) });
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=ActionsRegion.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/ActionsRegion.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { BUTTON_SIZES, BUTTON_TYPES } from '@elliemae/ds-button-v2';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\nimport React from 'react';\nimport type { DSCardNavigationT } from '../react-desc-prop-types.js';\nimport {\n StyledCardNavigationButtonWrapper,\n StyledCardNavigationActions,\n StyledCardNavigationActionButton,\n} from './style.js';\n\ninterface ActionRegionProps {\n actions: DSCardNavigationT.InternalProps['actions'];\n instanceUid: string;\n getOwnerProps?: () => object;\n getOwnerPropsArguments?: () => object;\n}\n\nexport const ActionsRegion: React.ComponentType<ActionRegionProps> = ({\n actions,\n instanceUid,\n getOwnerProps,\n getOwnerPropsArguments,\n}) => {\n if (actions.length === 0) return null;\n return (\n <StyledCardNavigationActions getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {actions.map(({ icon, Icon, onClick, ...unexpectedButPreviouslySupportedOtherProps }, index) => {\n const defaultIconJSX = <MoreOptionsVert aria-label=\"More options\" />;\n const iconJSX = icon ?? defaultIconJSX;\n return (\n <StyledCardNavigationButtonWrapper\n // eslint-disable-next-line react/no-array-index-key\n key={`${instanceUid}-${index}`}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledCardNavigationActionButton\n onClick={onClick}\n aria-label=\"More options\"\n {...unexpectedButPreviouslySupportedOtherProps}\n buttonType={BUTTON_TYPES.ICON}\n size={BUTTON_SIZES.L}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {Icon ? <Icon /> : iconJSX}\n </StyledCardNavigationActionButton>\n </StyledCardNavigationButtonWrapper>\n );\n })}\n </StyledCardNavigationActions>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2BQ;AA3B/B,0BAA2C;AAC3C,sBAAgC;AAGhC,mBAIO;AASA,MAAM,gBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,MAAI,QAAQ,WAAW,EAAG,QAAO;AACjC,SACE,4CAAC,4CAA4B,eAA8B,wBACxD,kBAAQ,IAAI,CAAC,EAAE,MAAM,MAAM,SAAS,GAAG,2CAA2C,GAAG,UAAU;AAC9F,UAAM,iBAAiB,4CAAC,mCAAgB,cAAW,gBAAe;AAClE,UAAM,UAAU,QAAQ;AACxB,WACE;AAAA,MAAC;AAAA;AAAA,QAGC;AAAA,QACA;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,cAAW;AAAA,YACV,GAAG;AAAA,YACJ,YAAY,iCAAa;AAAA,YACzB,MAAM,iCAAa;AAAA,YACnB;AAAA,YACA;AAAA,YAEC,iBAAO,4CAAC,QAAK,IAAK;AAAA;AAAA,QACrB;AAAA;AAAA,MAdK,GAAG,WAAW,IAAI,KAAK;AAAA,IAe9B;AAAA,EAEJ,CAAC,GACH;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -28,46 +28,65 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var style_exports = {};
|
|
30
30
|
__export(style_exports, {
|
|
31
|
-
|
|
31
|
+
StyledCardNavigationActionButton: () => StyledCardNavigationActionButton,
|
|
32
32
|
StyledCardNavigationActions: () => StyledCardNavigationActions,
|
|
33
33
|
StyledCardNavigationBoxWrapper: () => StyledCardNavigationBoxWrapper,
|
|
34
|
+
StyledCardNavigationButtonWrapper: () => StyledCardNavigationButtonWrapper,
|
|
34
35
|
StyledCardNavigationCentralContent: () => StyledCardNavigationCentralContent,
|
|
35
36
|
StyledCardNavigationContent: () => StyledCardNavigationContent,
|
|
36
|
-
StyledCardNavigationContentDescription: () => StyledCardNavigationContentDescription,
|
|
37
37
|
StyledCardNavigationContentTitle: () => StyledCardNavigationContentTitle,
|
|
38
38
|
StyledCardNavigationContentTitleWrapper: () => StyledCardNavigationContentTitleWrapper,
|
|
39
39
|
StyledCardNavigationIcon: () => StyledCardNavigationIcon,
|
|
40
40
|
StyledDescriptionTypography: () => StyledDescriptionTypography,
|
|
41
|
+
StyledGridTextContainer: () => StyledGridTextContainer,
|
|
41
42
|
StyledTitleTypography: () => StyledTitleTypography
|
|
42
43
|
});
|
|
43
44
|
module.exports = __toCommonJS(style_exports);
|
|
44
45
|
var React = __toESM(require("react"));
|
|
45
|
-
var import_ds_typography = require("@elliemae/ds-typography");
|
|
46
|
-
var import_ds_system = require("@elliemae/ds-system");
|
|
47
46
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
48
|
-
var
|
|
47
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
48
|
+
var import_ds_typography = require("@elliemae/ds-typography");
|
|
49
|
+
var import_ds_button_v2 = require("@elliemae/ds-button-v2");
|
|
50
|
+
var import_constants = require("../constants/index.js");
|
|
49
51
|
const StyledCardNavigationContentTitle = (0, import_ds_system.styled)("div", {
|
|
50
52
|
name: import_constants.DSCardNavigationName,
|
|
51
53
|
slot: import_constants.CARD_NAVIGATION_SLOTS.TITLE
|
|
54
|
+
})``;
|
|
55
|
+
const StyledTitleTypography = (0, import_ds_system.styled)(import_ds_typography.DSTypography, {
|
|
56
|
+
name: import_constants.DSCardNavigationName,
|
|
57
|
+
slot: import_constants.CARD_NAVIGATION_SLOTS.TITLE_TYPOGRAPHY,
|
|
58
|
+
preserveLegacyDataTestId: true
|
|
52
59
|
})`
|
|
53
|
-
padding-top: ${(props) => props.theme.space.xxs};
|
|
54
|
-
`;
|
|
55
|
-
const StyledTitleTypography = (0, import_ds_system.styled)(import_ds_typography.DSTypography)`
|
|
56
60
|
color: ${(props) => props.theme.colors.neutral["700"]};
|
|
57
61
|
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
58
|
-
font-size: 18px
|
|
62
|
+
font-size: 1.3846rem; // 18px -> 18/13 = 1.3846rem
|
|
63
|
+
|
|
64
|
+
@media (max-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
65
|
+
font-size: 1.125rem; // 18px -> 18/16 = 1.125rem
|
|
66
|
+
}
|
|
59
67
|
`;
|
|
60
|
-
const
|
|
61
|
-
|
|
68
|
+
const StyledDescriptionTypography = (0, import_ds_system.styled)(import_ds_typography.DSTypography, {
|
|
69
|
+
name: import_constants.DSCardNavigationName,
|
|
70
|
+
slot: import_constants.CARD_NAVIGATION_SLOTS.DESCRIPTION_TEXT,
|
|
71
|
+
preserveLegacyDataTestId: true
|
|
72
|
+
})`
|
|
62
73
|
color: ${(props) => props.theme.colors.neutral["500"]};
|
|
63
|
-
font-size: 12px
|
|
74
|
+
font-size: 0.923rem; // 12px -> 12/13 = 0.923rem
|
|
75
|
+
|
|
76
|
+
@media (max-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
77
|
+
font-size: 0.8775rem; // 12px -> 10.5/12 = 0.8775rem
|
|
78
|
+
}
|
|
64
79
|
`;
|
|
65
|
-
const StyledCardNavigationContentTitleWrapper = import_ds_system.styled
|
|
80
|
+
const StyledCardNavigationContentTitleWrapper = (0, import_ds_system.styled)("div", {
|
|
81
|
+
name: import_constants.DSCardNavigationName,
|
|
82
|
+
slot: import_constants.CARD_NAVIGATION_SLOTS.TITLE_WRAPPER
|
|
83
|
+
})`
|
|
66
84
|
width: 100%;
|
|
67
85
|
`;
|
|
68
|
-
const StyledCardNavigationContent = import_ds_system.styled
|
|
69
|
-
|
|
70
|
-
|
|
86
|
+
const StyledCardNavigationContent = (0, import_ds_system.styled)("div", {
|
|
87
|
+
name: import_constants.DSCardNavigationName,
|
|
88
|
+
slot: import_constants.CARD_NAVIGATION_SLOTS.CONTENT
|
|
89
|
+
})`
|
|
71
90
|
display: flex;
|
|
72
91
|
align-items: center;
|
|
73
92
|
flex: 1;
|
|
@@ -77,15 +96,14 @@ const StyledCardNavigationCentralContent = (0, import_ds_system.styled)(import_d
|
|
|
77
96
|
slot: import_constants.CARD_NAVIGATION_SLOTS.CENTRAL_CONTENT,
|
|
78
97
|
name: import_constants.DSCardNavigationName
|
|
79
98
|
})`
|
|
80
|
-
|
|
81
|
-
@media (max-width: ${(props) => props.theme.breakpoints.small}) {
|
|
82
|
-
min-width: 336px;
|
|
83
|
-
}
|
|
99
|
+
padding: 0 ${(props) => props.theme.space.xs};
|
|
84
100
|
`;
|
|
85
101
|
const StyledCardNavigationBoxWrapper = (0, import_ds_system.styled)("div", {
|
|
86
102
|
name: import_constants.DSCardNavigationName,
|
|
87
103
|
slot: import_constants.CARD_NAVIGATION_SLOTS.ROOT
|
|
88
104
|
})`
|
|
105
|
+
min-width: 240px;
|
|
106
|
+
min-height: 64px;
|
|
89
107
|
width: 337px;
|
|
90
108
|
display: flex;
|
|
91
109
|
flex-direction: row;
|
|
@@ -94,10 +112,12 @@ const StyledCardNavigationBoxWrapper = (0, import_ds_system.styled)("div", {
|
|
|
94
112
|
border-radius: 2px;
|
|
95
113
|
position: relative;
|
|
96
114
|
outline: none;
|
|
115
|
+
|
|
97
116
|
${(props) => props.fluid ? "width: 100%" : ""};
|
|
98
117
|
@media (max-width: ${(props) => props.theme.breakpoints.small}) {
|
|
99
118
|
width: ${(props) => props.fluid ? "width: 100%" : "414px"};
|
|
100
119
|
}
|
|
120
|
+
|
|
101
121
|
:after {
|
|
102
122
|
display: block;
|
|
103
123
|
content: '';
|
|
@@ -110,46 +130,71 @@ const StyledCardNavigationBoxWrapper = (0, import_ds_system.styled)("div", {
|
|
|
110
130
|
border-radius: 2px;
|
|
111
131
|
pointer-events: none;
|
|
112
132
|
}
|
|
113
|
-
&:hover
|
|
114
|
-
&:focus {
|
|
133
|
+
&:hover {
|
|
115
134
|
box-shadow: 0 3px 8px 0px rgba(37, 41, 47, 0.4);
|
|
135
|
+
outline-offset: 2px;
|
|
116
136
|
}
|
|
137
|
+
|
|
138
|
+
${(props) => props.$isIconAndTextsRegionFocused ? import_ds_system.css`
|
|
139
|
+
outline: 2px solid ${props.theme.colors.brand["700"]};
|
|
140
|
+
outline-offset: 2px;
|
|
141
|
+
` : import_ds_system.css``}
|
|
117
142
|
`;
|
|
118
143
|
const StyledCardNavigationIcon = (0, import_ds_system.styled)("div", {
|
|
119
144
|
name: import_constants.DSCardNavigationName,
|
|
120
145
|
slot: import_constants.CARD_NAVIGATION_SLOTS.TYPE
|
|
121
146
|
})`
|
|
122
|
-
width: 64px;
|
|
123
|
-
height: 64px;
|
|
124
|
-
|
|
147
|
+
min-width: 64px;
|
|
148
|
+
min-height: 64px;
|
|
149
|
+
height: 100%;
|
|
125
150
|
border-top-left-radius: 2px;
|
|
126
151
|
border-bottom-left-radius: 2px;
|
|
127
|
-
padding: ${(props) => props.theme.space.
|
|
152
|
+
padding: 0 ${(props) => props.theme.space.xs};
|
|
128
153
|
display: flex;
|
|
129
154
|
align-items: center;
|
|
130
155
|
justify-content: center;
|
|
131
156
|
fill: #ffffff;
|
|
132
|
-
background-color: ${({ $type }) => $type === import_constants.CardNavigationTypes.BORROWER && "#32aad1" || $type === import_constants.CardNavigationTypes.FINANCIAL && "#1ba88d" || $type === import_constants.CardNavigationTypes.LOAN && "#8e49b2" || $type === import_constants.CardNavigationTypes.REGULATORY && "#db5575" || "#32aad1"};
|
|
157
|
+
background-color: ${({ $type }) => $type === import_constants.CardNavigationTypes.BORROWER && "#32aad1" || $type === import_constants.CardNavigationTypes.FINANCIAL && "#1ba88d" || $type === import_constants.CardNavigationTypes.LOAN && "#8e49b2" || $type === import_constants.CardNavigationTypes.REGULATORY && "#db5575" || "#32aad1"};
|
|
133
158
|
`;
|
|
134
159
|
const StyledCardNavigationActions = (0, import_ds_system.styled)("div", {
|
|
135
160
|
name: import_constants.DSCardNavigationName,
|
|
136
161
|
slot: import_constants.CARD_NAVIGATION_SLOTS.ACTIONS
|
|
137
162
|
})`
|
|
163
|
+
padding: 0 ${(props) => props.theme.space.xs};
|
|
138
164
|
display: flex;
|
|
139
165
|
flex-direction: row;
|
|
140
166
|
align-items: center;
|
|
141
|
-
|
|
167
|
+
gap: ${(props) => props.theme.space.xs};
|
|
142
168
|
`;
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
169
|
+
const StyledCardNavigationButtonWrapper = (0, import_ds_system.styled)("div", {
|
|
170
|
+
name: import_constants.DSCardNavigationName,
|
|
171
|
+
slot: import_constants.CARD_NAVIGATION_SLOTS.BUTTON_WRAPPER
|
|
172
|
+
})`
|
|
173
|
+
span,
|
|
174
|
+
svg {
|
|
175
|
+
height: ${({ theme }) => theme.space.s};
|
|
176
|
+
width: ${({ theme }) => theme.space.s};
|
|
177
|
+
fill: ${({ theme }) => theme.colors.neutral[500]};
|
|
153
178
|
}
|
|
154
179
|
`;
|
|
180
|
+
const StyledGridTextContainer = (0, import_ds_system.styled)("div", {
|
|
181
|
+
name: import_constants.DSCardNavigationName,
|
|
182
|
+
slot: import_constants.CARD_NAVIGATION_SLOTS.INTERACTIVE_ELEMENT_REGION
|
|
183
|
+
})`
|
|
184
|
+
display: grid;
|
|
185
|
+
grid-template-columns: max-content auto;
|
|
186
|
+
align-items: center;
|
|
187
|
+
min-width: 0;
|
|
188
|
+
width: 100%;
|
|
189
|
+
overflow: hidden;
|
|
190
|
+
&:focus {
|
|
191
|
+
outline: none;
|
|
192
|
+
}
|
|
193
|
+
cursor: pointer;
|
|
194
|
+
`;
|
|
195
|
+
const StyledCardNavigationActionButton = (0, import_ds_system.styled)(import_ds_button_v2.DSButtonV3, {
|
|
196
|
+
name: import_constants.DSCardNavigationName,
|
|
197
|
+
slot: import_constants.CARD_NAVIGATION_SLOTS.ACTION_BUTTON,
|
|
198
|
+
preserveLegacyDataTestId: true
|
|
199
|
+
})``;
|
|
155
200
|
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/style.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { Grid } from '@elliemae/ds-grid';\nimport { css, styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSButtonV3 } from '@elliemae/ds-button-v2';\nimport { CARD_NAVIGATION_SLOTS, CardNavigationTypes, DSCardNavigationName } from '../constants/index.js';\n\nexport const StyledCardNavigationContentTitle = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.TITLE,\n})``;\n\nexport const StyledTitleTypography = styled(DSTypography, {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.TITLE_TYPOGRAPHY,\n preserveLegacyDataTestId: true,\n})`\n color: ${(props) => props.theme.colors.neutral['700']};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n font-size: 1.3846rem; // 18px -> 18/13 = 1.3846rem\n\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 1.125rem; // 18px -> 18/16 = 1.125rem\n }\n`;\n\nexport const StyledDescriptionTypography = styled(DSTypography, {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.DESCRIPTION_TEXT,\n preserveLegacyDataTestId: true,\n})`\n color: ${(props) => props.theme.colors.neutral['500']};\n font-size: 0.923rem; // 12px -> 12/13 = 0.923rem\n\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.8775rem; // 12px -> 10.5/12 = 0.8775rem\n }\n`;\n\nexport const StyledCardNavigationContentTitleWrapper = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.TITLE_WRAPPER,\n})`\n width: 100%;\n`;\n\nexport const StyledCardNavigationContent = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.CONTENT,\n})<{ wrapText?: boolean }>`\n display: flex;\n align-items: center;\n flex: 1;\n width: 100%;\n`;\n\nexport const StyledCardNavigationCentralContent = styled(Grid, {\n slot: CARD_NAVIGATION_SLOTS.CENTRAL_CONTENT,\n name: DSCardNavigationName,\n})<{ wrapText?: boolean; AnyOverFlow?: boolean }>`\n padding: 0 ${(props) => props.theme.space.xs};\n`;\ninterface StyledCardNavigationBoxWrapperProps {\n fluid?: boolean;\n}\n\nexport const StyledCardNavigationBoxWrapper = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.ROOT,\n})<StyledCardNavigationBoxWrapperProps & { $isIconAndTextsRegionFocused?: boolean }>`\n min-width: 240px;\n min-height: 64px;\n width: 337px;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n box-shadow: 0 1px 4px 0px rgba(37, 41, 47, 0.5);\n border-radius: 2px;\n position: relative;\n outline: none;\n\n ${(props) => (props.fluid ? 'width: 100%' : '')};\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n width: ${(props) => (props.fluid ? 'width: 100%' : '414px')};\n }\n\n :after {\n display: block;\n content: '';\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n border: solid ${(props) => props.theme.space.xxs} transparent;\n border-radius: 2px;\n pointer-events: none;\n }\n &:hover {\n box-shadow: 0 3px 8px 0px rgba(37, 41, 47, 0.4);\n outline-offset: 2px;\n }\n\n ${(props) =>\n props.$isIconAndTextsRegionFocused\n ? css`\n outline: 2px solid ${props.theme.colors.brand['700']};\n outline-offset: 2px;\n `\n : css``}\n`;\n\ninterface StyledCardNavigationIconProps {\n $type: (typeof CardNavigationTypes)[keyof typeof CardNavigationTypes];\n}\n\nexport const StyledCardNavigationIcon = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.TYPE,\n})<StyledCardNavigationIconProps>`\n min-width: 64px;\n min-height: 64px;\n height: 100%;\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px;\n padding: 0 ${(props) => props.theme.space.xs};\n display: flex;\n align-items: center;\n justify-content: center;\n fill: #ffffff;\n background-color: ${({ $type }) =>\n ($type === CardNavigationTypes.BORROWER && '#32aad1') ||\n ($type === CardNavigationTypes.FINANCIAL && '#1ba88d') ||\n ($type === CardNavigationTypes.LOAN && '#8e49b2') ||\n ($type === CardNavigationTypes.REGULATORY && '#db5575') ||\n '#32aad1'};\n`;\n\nexport const StyledCardNavigationActions = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.ACTIONS,\n})`\n padding: 0 ${(props) => props.theme.space.xs};\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: ${(props) => props.theme.space.xs};\n`;\n\nexport const StyledCardNavigationButtonWrapper = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.BUTTON_WRAPPER,\n})`\n span,\n svg {\n height: ${({ theme }) => theme.space.s};\n width: ${({ theme }) => theme.space.s};\n fill: ${({ theme }) => theme.colors.neutral[500]};\n }\n`;\n\nexport const StyledGridTextContainer = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.INTERACTIVE_ELEMENT_REGION,\n})`\n display: grid;\n grid-template-columns: max-content auto;\n align-items: center;\n min-width: 0;\n width: 100%;\n overflow: hidden;\n &:focus {\n outline: none;\n }\n cursor: pointer;\n`;\n\nexport const StyledCardNavigationActionButton = styled(DSButtonV3, {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.ACTION_BUTTON,\n preserveLegacyDataTestId: true,\n})``;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|