@elliemae/ds-accordion 3.16.0-next.6 → 3.16.0-next.7
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/parts/accordionItem/DSAccordionItem.js +81 -64
- package/dist/cjs/parts/accordionItem/DSAccordionItem.js.map +2 -2
- package/dist/cjs/parts/accordionItem/styles.js +1 -18
- package/dist/cjs/parts/accordionItem/styles.js.map +2 -2
- package/dist/esm/parts/accordionItem/DSAccordionItem.js +82 -65
- package/dist/esm/parts/accordionItem/DSAccordionItem.js.map +2 -2
- package/dist/esm/parts/accordionItem/styles.js +2 -19
- package/dist/esm/parts/accordionItem/styles.js.map +2 -2
- package/package.json +7 -7
|
@@ -33,6 +33,7 @@ var React = __toESM(require("react"));
|
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_react = require("react");
|
|
35
35
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
36
37
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
37
38
|
var import_ds_button = require("@elliemae/ds-button");
|
|
38
39
|
var import_ds_popperjs = require("@elliemae/ds-popperjs");
|
|
@@ -93,58 +94,6 @@ const DSAccordionItem = (props) => {
|
|
|
93
94
|
}, [CustomActions, actualActiveValue, allChildrenReferences, customActions, isDSMobile, renderCustomActions]);
|
|
94
95
|
const { isShowingEllipsis: isPrimaryShowingEllipsis, setElement: setPrimaryElement } = (0, import_ds_utilities.useIsShowingEllipsis)();
|
|
95
96
|
const { isShowingEllipsis: isSecondaryShowingEllipsis, setElement: setSecondaryElement } = (0, import_ds_utilities.useIsShowingEllipsis)();
|
|
96
|
-
const Titles = (0, import_react.useMemo)(() => {
|
|
97
|
-
if ((isPrimaryShowingEllipsis || isSecondaryShowingEllipsis) && !isDSMobile)
|
|
98
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
99
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
100
|
-
import_styles.StyledPrimaryTitle,
|
|
101
|
-
{
|
|
102
|
-
ref: setPrimaryElement,
|
|
103
|
-
...title ? { id: `accordion_${title || ""}id` } : void 0,
|
|
104
|
-
disabled,
|
|
105
|
-
isDSMobile,
|
|
106
|
-
selected,
|
|
107
|
-
withSecondaryTitle: secondaryTitle,
|
|
108
|
-
children: title
|
|
109
|
-
}
|
|
110
|
-
),
|
|
111
|
-
!isDSMobile && secondaryTitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledSecondaryTitle, { ref: setSecondaryElement, disabled, selected, children: secondaryTitle }),
|
|
112
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_popperjs.DSPopperJS, { referenceElement, showPopover, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledTooltipContent, { children: [
|
|
113
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: title }),
|
|
114
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
|
|
115
|
-
" ",
|
|
116
|
-
secondaryTitle
|
|
117
|
-
] })
|
|
118
|
-
] }) })
|
|
119
|
-
] });
|
|
120
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
121
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
-
import_styles.StyledPrimaryTitle,
|
|
123
|
-
{
|
|
124
|
-
ref: setPrimaryElement,
|
|
125
|
-
...title ? { id: `accordion_${title || ""}id` } : void 0,
|
|
126
|
-
disabled,
|
|
127
|
-
isDSMobile,
|
|
128
|
-
selected,
|
|
129
|
-
withSecondaryTitle: secondaryTitle,
|
|
130
|
-
children: title
|
|
131
|
-
}
|
|
132
|
-
),
|
|
133
|
-
!isDSMobile && secondaryTitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledSecondaryTitle, { ref: setSecondaryElement, disabled, selected, children: secondaryTitle })
|
|
134
|
-
] });
|
|
135
|
-
}, [
|
|
136
|
-
isPrimaryShowingEllipsis,
|
|
137
|
-
isSecondaryShowingEllipsis,
|
|
138
|
-
isDSMobile,
|
|
139
|
-
setPrimaryElement,
|
|
140
|
-
title,
|
|
141
|
-
disabled,
|
|
142
|
-
selected,
|
|
143
|
-
secondaryTitle,
|
|
144
|
-
setSecondaryElement,
|
|
145
|
-
referenceElement,
|
|
146
|
-
showPopover
|
|
147
|
-
]);
|
|
148
97
|
const onKeyDownWithIndex = (0, import_react.useCallback)(
|
|
149
98
|
(e) => {
|
|
150
99
|
handleOnKeyDown(e, dsIndex);
|
|
@@ -166,6 +115,78 @@ const DSAccordionItem = (props) => {
|
|
|
166
115
|
onFocus: handleOnFocus,
|
|
167
116
|
onBlur: handleOnBlur
|
|
168
117
|
};
|
|
118
|
+
const titleDesktop = (0, import_react.useMemo)(
|
|
119
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
120
|
+
import_ds_grid.Grid,
|
|
121
|
+
{
|
|
122
|
+
onMouseEnter: handleOnFocus,
|
|
123
|
+
onMouseLeave: handleOnBlur,
|
|
124
|
+
rows: ["auto", "auto"],
|
|
125
|
+
rowGap: secondaryTitle ? "3px" : "0px",
|
|
126
|
+
padding: "6px 0px",
|
|
127
|
+
width: "100%",
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: ["20px", "auto"], children: [
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledItemAddon, { disabled, children: selected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconOpened, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconClosed, {}) }),
|
|
131
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledItemTitles, { withSecondaryTitle: secondaryTitle, selected, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
132
|
+
import_styles.StyledPrimaryTitle,
|
|
133
|
+
{
|
|
134
|
+
ref: setPrimaryElement,
|
|
135
|
+
...title ? { id: `accordion_${title || ""}id` } : void 0,
|
|
136
|
+
disabled,
|
|
137
|
+
selected,
|
|
138
|
+
withSecondaryTitle: secondaryTitle,
|
|
139
|
+
children: title
|
|
140
|
+
}
|
|
141
|
+
) })
|
|
142
|
+
] }),
|
|
143
|
+
secondaryTitle && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: ["20px", "auto"], children: [
|
|
144
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}),
|
|
145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledSecondaryTitle, { ref: setSecondaryElement, disabled, selected, children: secondaryTitle })
|
|
146
|
+
] })
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
[
|
|
151
|
+
referenceElement,
|
|
152
|
+
setSecondaryElement,
|
|
153
|
+
handleOnBlur,
|
|
154
|
+
handleOnFocus,
|
|
155
|
+
secondaryTitle,
|
|
156
|
+
selected,
|
|
157
|
+
title,
|
|
158
|
+
disabled,
|
|
159
|
+
showPopover
|
|
160
|
+
]
|
|
161
|
+
);
|
|
162
|
+
const titleMobile = (0, import_react.useMemo)(
|
|
163
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: ["auto", "20px"], children: [
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
165
|
+
import_styles.StyledItemTitles,
|
|
166
|
+
{
|
|
167
|
+
onMouseEnter: handleOnFocus,
|
|
168
|
+
onMouseLeave: handleOnBlur,
|
|
169
|
+
isDSMobile: true,
|
|
170
|
+
withSecondaryTitle: secondaryTitle,
|
|
171
|
+
selected,
|
|
172
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
173
|
+
import_styles.StyledPrimaryTitle,
|
|
174
|
+
{
|
|
175
|
+
ref: setPrimaryElement,
|
|
176
|
+
...title ? { id: `accordion_${title || ""}id` } : void 0,
|
|
177
|
+
disabled,
|
|
178
|
+
isDSMobile: true,
|
|
179
|
+
selected,
|
|
180
|
+
withSecondaryTitle: secondaryTitle,
|
|
181
|
+
children: title
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
}
|
|
185
|
+
),
|
|
186
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledItemAddon, { disabled, isDSMobile: true, children: selected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconOpened, { isDSMobile: true }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconClosed, { isDSMobile: true }) })
|
|
187
|
+
] }) }),
|
|
188
|
+
[isDSMobile, title, setPrimaryElement, handleOnBlur, handleOnFocus, secondaryTitle, selected, disabled]
|
|
189
|
+
);
|
|
169
190
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledItemContainer, { "data-testid": import_DSAccordionDatatestid.DSAccordionDataTestid.ITEM.CONTAINER, className, ...xstyledAttrs, children: [
|
|
170
191
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledItemHeaderContainer, { disabled, ref: setReferenceElement, children: [
|
|
171
192
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -188,18 +209,14 @@ const DSAccordionItem = (props) => {
|
|
|
188
209
|
...handlers,
|
|
189
210
|
...globalAttrs,
|
|
190
211
|
children: [
|
|
191
|
-
|
|
192
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
193
|
-
|
|
194
|
-
{
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
selected,
|
|
200
|
-
children: Titles
|
|
201
|
-
}
|
|
202
|
-
)
|
|
212
|
+
isDSMobile ? titleMobile : titleDesktop,
|
|
213
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_popperjs.DSPopperJS, { referenceElement, showPopover: !selected && showPopover, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledTooltipContent, { children: [
|
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: title }),
|
|
215
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
|
|
216
|
+
" ",
|
|
217
|
+
secondaryTitle
|
|
218
|
+
] })
|
|
219
|
+
] }) })
|
|
203
220
|
]
|
|
204
221
|
}
|
|
205
222
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/accordionItem/DSAccordionItem.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React, { useState, useContext, useCallback, useMemo } from 'react';\nimport {\n useMemoMergePropsWithDefault,\n describe,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { useIsShowingEllipsis } from '@elliemae/ds-utilities';\nimport { DSButton, BUTTON_TYPE } from '@elliemae/ds-button';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { accordionItemDefaultProps } from '../../defaultProps';\nimport {\n StyledItemAddon,\n StyledItemContainer,\n StyledItemContent,\n StyledItemCustomActions,\n StyledItemHeader,\n StyledItemHeaderContainer,\n StyledItemTitles,\n StyledPrimaryTitle,\n StyledSecondaryTitle,\n StyledTooltipContent,\n} from './styles';\nimport { useAccordionItem } from './useAccordionItem';\nimport { DSAccordionContext } from '../../DSAccordionCTX';\nimport { DSAccordionDataTestid } from '../../exported-related/DSAccordionDatatestid';\nimport { accordionItemPropTypes } from '../../react-desc-prop-types';\nimport type { DSAccordionT } from '../../react-desc-prop-types';\n\nconst DSAccordionItem = (props: DSAccordionT.ItemProps): JSX.Element => {\n const propsWithDefaults = useMemoMergePropsWithDefault(\n props,\n accordionItemDefaultProps,\n ) as DSAccordionT.InternalItemProps;\n\n const {\n children,\n title,\n secondaryTitle,\n customActions,\n iconOpened: IconOpened,\n iconClosed: IconClosed,\n value,\n disabled,\n dsIndex,\n renderCustomActions,\n CustomActions,\n xStyledPropsContent,\n ...rest\n } = propsWithDefaults;\n\n const { handleOnClick, handleOnKeyDown, selected } = useAccordionItem({ value, disabled });\n\n const xstyledAttrs = useGetXstyledProps(rest);\n const xstyledContentAttrs = useGetXstyledProps(xStyledPropsContent);\n\n const {\n allChildrenReferences,\n actualActiveValue,\n props: { isDSMobile },\n } = useContext(DSAccordionContext);\n\n const [showPopover, setShowPopover] = useState(false);\n const [referenceElement, setReferenceElement] = useState<HTMLElement | null>();\n\n const CustomActionsContent = useMemo(() => {\n if (!isDSMobile && customActions?.length > 0)\n return (\n <StyledItemCustomActions isDSMobile={isDSMobile}>\n {customActions?.map(({ onClick, id, ...otherProps }) => (\n <DSButton\n key={id}\n onClick={(e: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement>): void => {\n e.stopPropagation();\n if (onClick) onClick(e as React.MouseEvent<HTMLElement, MouseEvent>);\n }}\n {...otherProps}\n buttonType={BUTTON_TYPE.SECONDARY}\n />\n ))}\n </StyledItemCustomActions>\n );\n\n if (!isDSMobile && (renderCustomActions || CustomActions))\n return (\n <StyledItemCustomActions isDSMobile={isDSMobile}>\n {CustomActions !== undefined ? (\n <CustomActions allRefs={allChildrenReferences} actualActiveValue={actualActiveValue} />\n ) : (\n renderCustomActions?.({ allRefs: allChildrenReferences, actualActiveValue })\n )}\n </StyledItemCustomActions>\n );\n return null;\n }, [CustomActions, actualActiveValue, allChildrenReferences, customActions, isDSMobile, renderCustomActions]);\n\n const { isShowingEllipsis: isPrimaryShowingEllipsis, setElement: setPrimaryElement } = useIsShowingEllipsis();\n\n const { isShowingEllipsis: isSecondaryShowingEllipsis, setElement: setSecondaryElement } = useIsShowingEllipsis();\n\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React, { useState, useContext, useCallback, useMemo } from 'react';\nimport {\n useMemoMergePropsWithDefault,\n describe,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useIsShowingEllipsis } from '@elliemae/ds-utilities';\nimport { DSButton, BUTTON_TYPE } from '@elliemae/ds-button';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { accordionItemDefaultProps } from '../../defaultProps';\nimport {\n StyledItemAddon,\n StyledItemContainer,\n StyledItemContent,\n StyledItemCustomActions,\n StyledItemHeader,\n StyledItemHeaderContainer,\n StyledItemTitles,\n StyledPrimaryTitle,\n StyledSecondaryTitle,\n StyledTooltipContent,\n} from './styles';\nimport { useAccordionItem } from './useAccordionItem';\nimport { DSAccordionContext } from '../../DSAccordionCTX';\nimport { DSAccordionDataTestid } from '../../exported-related/DSAccordionDatatestid';\nimport { accordionItemPropTypes } from '../../react-desc-prop-types';\nimport type { DSAccordionT } from '../../react-desc-prop-types';\n\nconst DSAccordionItem = (props: DSAccordionT.ItemProps): JSX.Element => {\n const propsWithDefaults = useMemoMergePropsWithDefault(\n props,\n accordionItemDefaultProps,\n ) as DSAccordionT.InternalItemProps;\n\n const {\n children,\n title,\n secondaryTitle,\n customActions,\n iconOpened: IconOpened,\n iconClosed: IconClosed,\n value,\n disabled,\n dsIndex,\n renderCustomActions,\n CustomActions,\n xStyledPropsContent,\n ...rest\n } = propsWithDefaults;\n\n const { handleOnClick, handleOnKeyDown, selected } = useAccordionItem({ value, disabled });\n\n const xstyledAttrs = useGetXstyledProps(rest);\n const xstyledContentAttrs = useGetXstyledProps(xStyledPropsContent);\n\n const {\n allChildrenReferences,\n actualActiveValue,\n props: { isDSMobile },\n } = useContext(DSAccordionContext);\n\n const [showPopover, setShowPopover] = useState(false);\n const [referenceElement, setReferenceElement] = useState<HTMLElement | null>();\n\n const CustomActionsContent = useMemo(() => {\n if (!isDSMobile && customActions?.length > 0)\n return (\n <StyledItemCustomActions isDSMobile={isDSMobile}>\n {customActions?.map(({ onClick, id, ...otherProps }) => (\n <DSButton\n key={id}\n onClick={(e: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement>): void => {\n e.stopPropagation();\n if (onClick) onClick(e as React.MouseEvent<HTMLElement, MouseEvent>);\n }}\n {...otherProps}\n buttonType={BUTTON_TYPE.SECONDARY}\n />\n ))}\n </StyledItemCustomActions>\n );\n\n if (!isDSMobile && (renderCustomActions || CustomActions))\n return (\n <StyledItemCustomActions isDSMobile={isDSMobile}>\n {CustomActions !== undefined ? (\n <CustomActions allRefs={allChildrenReferences} actualActiveValue={actualActiveValue} />\n ) : (\n renderCustomActions?.({ allRefs: allChildrenReferences, actualActiveValue })\n )}\n </StyledItemCustomActions>\n );\n return null;\n }, [CustomActions, actualActiveValue, allChildrenReferences, customActions, isDSMobile, renderCustomActions]);\n\n const { isShowingEllipsis: isPrimaryShowingEllipsis, setElement: setPrimaryElement } = useIsShowingEllipsis();\n\n const { isShowingEllipsis: isSecondaryShowingEllipsis, setElement: setSecondaryElement } = useIsShowingEllipsis();\n\n const onKeyDownWithIndex = useCallback(\n (e: React.KeyboardEvent) => {\n handleOnKeyDown(e, dsIndex);\n },\n [dsIndex, handleOnKeyDown],\n );\n const handleOnFocus = useCallback(\n () => setShowPopover(isPrimaryShowingEllipsis || isSecondaryShowingEllipsis),\n [isPrimaryShowingEllipsis, isSecondaryShowingEllipsis],\n );\n\n const handleOnBlur = useCallback(() => setShowPopover(false), []);\n\n const { className, ...globalAttrs } = useGetGlobalAttributes(rest, {\n onClick: handleOnClick,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n });\n\n const handlers = {\n onClick: handleOnClick,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n };\n\n const titleDesktop = useMemo(\n () => (\n <Grid\n onMouseEnter={handleOnFocus}\n onMouseLeave={handleOnBlur}\n rows={['auto', 'auto']}\n rowGap={secondaryTitle ? '3px' : '0px'}\n padding=\"6px 0px\"\n width=\"100%\"\n >\n <Grid cols={['20px', 'auto']}>\n <StyledItemAddon disabled={disabled}>{selected ? <IconOpened /> : <IconClosed />}</StyledItemAddon>\n <StyledItemTitles withSecondaryTitle={secondaryTitle} selected={selected}>\n <StyledPrimaryTitle\n ref={setPrimaryElement}\n {...(title ? { id: `accordion_${title || ''}id` } : undefined)}\n disabled={disabled}\n selected={selected}\n withSecondaryTitle={secondaryTitle}\n >\n {title}\n </StyledPrimaryTitle>\n </StyledItemTitles>\n </Grid>\n {secondaryTitle && (\n <Grid cols={['20px', 'auto']}>\n <div></div>\n\n <StyledSecondaryTitle ref={setSecondaryElement} disabled={disabled} selected={selected}>\n {secondaryTitle}\n </StyledSecondaryTitle>\n </Grid>\n )}\n </Grid>\n ),\n [\n referenceElement,\n setSecondaryElement,\n handleOnBlur,\n handleOnFocus,\n secondaryTitle,\n selected,\n title,\n disabled,\n showPopover,\n ],\n );\n\n const titleMobile = useMemo(\n () => (\n <Grid width=\"100%\">\n <Grid cols={['auto', '20px']}>\n <StyledItemTitles\n onMouseEnter={handleOnFocus}\n onMouseLeave={handleOnBlur}\n isDSMobile\n withSecondaryTitle={secondaryTitle}\n selected={selected}\n >\n <StyledPrimaryTitle\n ref={setPrimaryElement}\n {...(title ? { id: `accordion_${title || ''}id` } : undefined)}\n disabled={disabled}\n isDSMobile\n selected={selected}\n withSecondaryTitle={secondaryTitle}\n >\n {title}\n </StyledPrimaryTitle>\n </StyledItemTitles>\n <StyledItemAddon disabled={disabled} isDSMobile>\n {selected ? <IconOpened isDSMobile /> : <IconClosed isDSMobile />}\n </StyledItemAddon>\n </Grid>\n </Grid>\n ),\n [isDSMobile, title, setPrimaryElement, handleOnBlur, handleOnFocus, secondaryTitle, selected, disabled],\n );\n\n return (\n <StyledItemContainer data-testid={DSAccordionDataTestid.ITEM.CONTAINER} className={className} {...xstyledAttrs}>\n <StyledItemHeaderContainer disabled={disabled} ref={setReferenceElement}>\n <StyledItemHeader\n type=\"button\"\n withCustomActions={(customActions?.length > 0 || renderCustomActions !== undefined) && !isDSMobile}\n withSecondaryTitle={secondaryTitle}\n tabIndex={!disabled ? 0 : undefined}\n disabled={disabled}\n data-disabled={disabled}\n ref={allChildrenReferences[dsIndex]}\n onKeyDown={onKeyDownWithIndex}\n isDSMobile={isDSMobile}\n data-testid={DSAccordionDataTestid.ITEM.HEADER}\n id={`ds-accordion-header-${value}`}\n aria-expanded={selected}\n aria-disabled={disabled}\n aria-controls={`ds-accordion-content-${value}`}\n {...handlers}\n {...globalAttrs}\n >\n {isDSMobile ? titleMobile : titleDesktop}\n <DSPopperJS referenceElement={referenceElement} showPopover={!selected && showPopover}>\n <StyledTooltipContent>\n <p>{title}</p>\n <p> {secondaryTitle}</p>\n </StyledTooltipContent>\n </DSPopperJS>\n </StyledItemHeader>\n {CustomActionsContent}\n </StyledItemHeaderContainer>\n {selected && (\n <StyledItemContent\n data-testid={DSAccordionDataTestid.ITEM.CONTENT}\n aria-labelledby={`ds-accordion-header-${value}`}\n role=\"region\"\n isDSMobile={isDSMobile}\n id={`ds-accordion-content-${value}`}\n {...xstyledContentAttrs}\n >\n {children}\n </StyledItemContent>\n )}\n </StyledItemContainer>\n );\n};\n\nDSAccordionItem.displayName = 'DSAccordionItem';\nconst DSAccordionItemWithSchema = describe(DSAccordionItem);\nDSAccordionItemWithSchema.propTypes = accordionItemPropTypes as WeakValidationMap<unknown>;\n\nexport { DSAccordionItem, DSAccordionItemWithSchema };\nexport default DSAccordionItem;\n", "import *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,EACxG;AAEA,SACE,6CAAC,qCAAoB,eAAa,mDAAsB,KAAK,WAAW,WAAuB,GAAG,cAChG;AAAA,iDAAC,2CAA0B,UAAoB,KAAK,qBAClD;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,oBAAoB,eAAe,SAAS,KAAK,wBAAwB,WAAc,CAAC;AAAA,UACxF,oBAAoB;AAAA,UACpB,UAAU,CAAC,WAAW,IAAI;AAAA,UAC1B;AAAA,UACA,iBAAe;AAAA,UACf,KAAK,sBAAsB;AAAA,UAC3B,WAAW;AAAA,UACX;AAAA,UACA,eAAa,mDAAsB,KAAK;AAAA,UACxC,IAAI,uBAAuB;AAAA,UAC3B,iBAAe;AAAA,UACf,iBAAe;AAAA,UACf,iBAAe,wBAAwB;AAAA,UACtC,GAAG;AAAA,UACH,GAAG;AAAA,UAEH;AAAA,yBAAa,cAAc;AAAA,YAC5B,4CAAC,iCAAW,kBAAoC,aAAa,CAAC,YAAY,aACxE,uDAAC,sCACC;AAAA,0DAAC,OAAG,iBAAM;AAAA,cACV,6CAAC,OAAE;AAAA;AAAA,gBAAE;AAAA,iBAAe;AAAA,eACtB,GACF;AAAA;AAAA;AAAA,MACF;AAAA,MACC;AAAA,OACH;AAAA,IACC,YACC;AAAA,MAAC;AAAA;AAAA,QACC,eAAa,mDAAsB,KAAK;AAAA,QACxC,mBAAiB,uBAAuB;AAAA,QACxC,MAAK;AAAA,QACL;AAAA,QACA,IAAI,wBAAwB;AAAA,QAC3B,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,KAEJ;AAEJ;AAEA,gBAAgB,cAAc;AAC9B,MAAM,gCAA4B,kCAAS,eAAe;AAC1D,0BAA0B,YAAY;AAGtC,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -39,19 +39,6 @@ module.exports = __toCommonJS(styles_exports);
|
|
|
39
39
|
var React = __toESM(require("react"));
|
|
40
40
|
var import_ds_system = require("@elliemae/ds-system");
|
|
41
41
|
var import_exported_related = require("../../exported-related");
|
|
42
|
-
const paddingSetter = ({ isDSMobile, withSecondaryTitle }) => {
|
|
43
|
-
if (isDSMobile)
|
|
44
|
-
return import_ds_system.css`
|
|
45
|
-
padding: 13px 0;
|
|
46
|
-
`;
|
|
47
|
-
if (withSecondaryTitle)
|
|
48
|
-
return import_ds_system.css`
|
|
49
|
-
padding: 6px 0;
|
|
50
|
-
`;
|
|
51
|
-
return import_ds_system.css`
|
|
52
|
-
padding: 7px 0;
|
|
53
|
-
`;
|
|
54
|
-
};
|
|
55
42
|
const StyledItemContainer = (0, import_ds_system.styled)("div", {
|
|
56
43
|
name: import_exported_related.DSAccordionName,
|
|
57
44
|
slot: import_exported_related.DSAccordionSlots.ITEM.CONTAINER
|
|
@@ -71,7 +58,7 @@ const StyledItemHeader = (0, import_ds_system.styled)("button", {
|
|
|
71
58
|
display: flex;
|
|
72
59
|
min-height: ${({ theme, withSecondaryTitle, isDSMobile }) => isDSMobile ? `44px` : `${withSecondaryTitle ? theme.space.m : theme.space.s}`};
|
|
73
60
|
width: 100%;
|
|
74
|
-
align-items:
|
|
61
|
+
align-items: center;
|
|
75
62
|
border: none;
|
|
76
63
|
outline: none;
|
|
77
64
|
background: none;
|
|
@@ -79,7 +66,6 @@ const StyledItemHeader = (0, import_ds_system.styled)("button", {
|
|
|
79
66
|
cursor: ${({ disabled }) => disabled ? "not-allowed" : "pointer"};
|
|
80
67
|
}
|
|
81
68
|
padding: ${({ isDSMobile }) => isDSMobile ? `0 16px` : `0`};
|
|
82
|
-
${({ isDSMobile }) => isDSMobile ? `flex-direction: row-reverse;` : ``}
|
|
83
69
|
&:focus {
|
|
84
70
|
&:after {
|
|
85
71
|
position: absolute;
|
|
@@ -108,8 +94,6 @@ const StyledItemAddon = (0, import_ds_system.styled)("div", {
|
|
|
108
94
|
height: 100%;
|
|
109
95
|
display: grid;
|
|
110
96
|
place-items: center;
|
|
111
|
-
padding-top: 5px;
|
|
112
|
-
|
|
113
97
|
& .em-ds-icon svg {
|
|
114
98
|
fill: ${({ disabled, theme }) => disabled ? theme.colors.neutral[200] : theme.colors.brand[800]};
|
|
115
99
|
}
|
|
@@ -120,7 +104,6 @@ const StyledItemTitles = (0, import_ds_system.styled)("div", {
|
|
|
120
104
|
})`
|
|
121
105
|
display: grid;
|
|
122
106
|
grid-gap: ${({ theme }) => theme.space.xxxs};
|
|
123
|
-
${paddingSetter}
|
|
124
107
|
grid-template-columns: 100%;
|
|
125
108
|
width: 100%;
|
|
126
109
|
align-content: center;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/accordionItem/styles.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSAccordionName, DSAccordionSlots } from '../../exported-related';\ninterface StyledItemHeaderPropsT {\n withCustomActions: boolean;\n withSecondaryTitle?: string;\n isDSMobile
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAgD;AAChD,8BAAkD;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSAccordionName, DSAccordionSlots } from '../../exported-related';\ninterface StyledItemHeaderPropsT {\n withCustomActions: boolean;\n withSecondaryTitle?: string;\n isDSMobile?: boolean;\n}\n\ninterface StyledItemTitlesPropsT {\n withSecondaryTitle?: string;\n isDSMobile?: boolean;\n selected: boolean;\n}\n\ninterface StyledPrimaryTitlePropsT {\n disabled: boolean;\n isDSMobile?: boolean;\n selected: boolean;\n withSecondaryTitle: boolean;\n}\n\ninterface StyledItemContentPropsT {\n isDSMobile?: boolean;\n}\n\ninterface StyledSecondaryTitlePropsT {\n disabled: boolean;\n selected: boolean;\n}\n\ninterface StyledItemAddonPropsT {\n disabled: boolean;\n isDSMobile?: boolean;\n}\n\ninterface StyledItemHeaderContainerPropsT {\n disabled: boolean;\n}\n\ninterface StyledItemCustomActionsPropsT {\n isDSMobile?: boolean;\n}\n\nexport const StyledItemContainer = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.CONTAINER,\n})`\n display: grid;\n grid-template-rows: auto auto;\n border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[200]};\n align-items: center;\n min-width: 240px;\n grid-template-columns: 100%;\n ${xStyledCommonProps};\n`;\n\nexport const StyledItemHeader = styled('button', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.CONTAINER,\n})<StyledItemHeaderPropsT>`\n display: flex;\n min-height: ${({ theme, withSecondaryTitle, isDSMobile }) =>\n isDSMobile ? `44px` : `${withSecondaryTitle ? theme.space.m : theme.space.s}`};\n width: 100%;\n align-items: center;\n border: none;\n outline: none;\n background: none;\n &:hover {\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n }\n padding: ${({ isDSMobile }) => (isDSMobile ? `0 16px` : `0`)};\n &:focus {\n &:after {\n position: absolute;\n content: '';\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n pointer-events: none;\n }\n }\n`;\n\nexport const StyledItemContent = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.CONTENT.CONTAINER,\n})<StyledItemContentPropsT>`\n padding: ${({ isDSMobile }) => (isDSMobile ? `3px 16px 24px 16px` : '16px 20px')};\n ${xStyledCommonProps};\n`;\n\nexport const StyledItemAddon = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.ADDON,\n})<StyledItemAddonPropsT>`\n height: 100%;\n display: grid;\n place-items: center;\n & .em-ds-icon svg {\n fill: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[200] : theme.colors.brand[800])};\n }\n`;\n\nexport const StyledItemTitles = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.TITLE_CONTAINER,\n})<StyledItemTitlesPropsT>`\n display: grid;\n grid-gap: ${({ theme }) => theme.space.xxxs};\n grid-template-columns: 100%;\n width: 100%;\n align-content: center;\n`;\n\nexport const StyledPrimaryTitle = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.PRIMARY_TITLE,\n})<StyledPrimaryTitlePropsT>`\n margin: 0;\n font-size: 16px;\n line-height: 1.125;\n text-align: left;\n text-overflow: ellipsis;\n min-height: ${({ theme }) => theme.space.xs};\n color: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[500] : theme.colors.neutral[700])};\n font-weight: ${({ theme, isDSMobile }) => (isDSMobile ? theme.fontWeights.semibold : theme.fontWeights.regular)};\n ${({ selected }) =>\n selected\n ? `word-break: break-word;`\n : `\n overflow: hidden;\n white-space: nowrap;\n `};\n width: 100%;\n display: block;\n`;\n\nexport const StyledSecondaryTitle = styled('span', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.SECONDARY_TITLE,\n})<StyledSecondaryTitlePropsT>`\n margin: 0;\n font-size: ${({ theme }) => theme.fontSizes.label[200]};\n line-height: 1.273;\n text-align: left;\n min-height: 12px;\n color: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[500] : theme.colors.neutral[700])};\n text-overflow: ellipsis;\n ${({ selected }) =>\n selected\n ? `word-break: break-word;`\n : `\n overflow: hidden;\n white-space: nowrap;\n width: 100%;\n display: block;`}\n`;\n\nexport const StyledItemCustomActions = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.CUSTOM_ACTIONS_CONTAINER,\n})<StyledItemCustomActionsPropsT>`\n display: grid;\n grid-auto-flow: column;\n place-items: center;\n grid-gap: ${({ theme }) => theme.space.xxs};\n margin: ${({ theme, isDSMobile }) => (isDSMobile ? `0 ${theme.space.xs}` : '0 20px 0 16px')};\n justify-content: flex-end;\n height: 28px;\n`;\n\nexport const StyledItemHeaderContainer = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.CONTAINER,\n})<StyledItemHeaderContainerPropsT>`\n display: grid;\n grid-template-columns: auto max-content;\n place-items: center;\n position: relative;\n border-radius: 2px;\n &:hover {\n ${({ disabled, theme }) => (!disabled ? `background: ${theme.colors.brand[200]};` : ``)}\n }\n`;\n\nexport const StyledTooltipContent = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.TOOLTIP,\n})`\n padding: 8px;\n width: 250px;\n background: white;\n display: grid;\n gap: ${({ theme }) => theme.space.xxs};\n\n p {\n margin: 0;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,uBAAgD;AAChD,8BAAkD;AA0C3C,MAAM,0BAAsB,yBAAO,OAAO;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,yCAAiB,KAAK;AAC9B,CAAC;AAAA;AAAA;AAAA,6BAG4B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,IAI7D;AAAA;AAGG,MAAM,uBAAmB,yBAAO,UAAU;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,yCAAiB,KAAK,OAAO;AACrC,CAAC;AAAA;AAAA,gBAEe,CAAC,EAAE,OAAO,oBAAoB,WAAW,MACrD,aAAa,SAAS,GAAG,qBAAqB,MAAM,MAAM,IAAI,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAOhE,CAAC,EAAE,SAAS,MAAO,WAAW,gBAAg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B,yBAAO,QAAQ;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,yCAAiB,KAAK,OAAO;AACrC,CAAC;AAAA;AAAA,eAEc,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA;AAAA;AAAA,WAIzC,CAAC,EAAE,UAAU,MAAM,MAAO,WAAW,MAAM,OAAO,QAAQ,OAAO,MAAM,OAAO,QAAQ;AAAA;AAAA,IAE7F,CAAC,EAAE,SAAS,MACZ,WACI,4BACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOD,MAAM,8BAA0B,yBAAO,OAAO;AAAA,EACnD,MAAM;AAAA,EACN,MAAM,yCAAiB,KAAK,OAAO;AACrC,CAAC;AAAA;AAAA;AAAA;AAAA,cAIa,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,YAC7B,CAAC,EAAE,OAAO,WAAW,MAAO,aAAa,KAAK,MAAM,MAAM,OAAO;AAAA;AAAA;AAAA;AAKtE,MAAM,gCAA4B,yBAAO,OAAO;AAAA,EACrD,MAAM;AAAA,EACN,MAAM,yCAAiB,KAAK,OAAO;AACrC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOK,CAAC,EAAE,UAAU,MAAM,MAAO,CAAC,WAAW,eAAe,MAAM,OAAO,MAAM,UAAU;AAAA;AAAA;AAIjF,MAAM,2BAAuB,yBAAO,OAAO;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,yCAAiB,KAAK,OAAO;AACrC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,SAKQ,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useContext, useCallback, useMemo } from "react";
|
|
4
4
|
import {
|
|
5
5
|
useMemoMergePropsWithDefault,
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
useGetGlobalAttributes,
|
|
8
8
|
useGetXstyledProps
|
|
9
9
|
} from "@elliemae/ds-props-helpers";
|
|
10
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
10
11
|
import { useIsShowingEllipsis } from "@elliemae/ds-utilities";
|
|
11
12
|
import { DSButton, BUTTON_TYPE } from "@elliemae/ds-button";
|
|
12
13
|
import { DSPopperJS } from "@elliemae/ds-popperjs";
|
|
@@ -78,58 +79,6 @@ const DSAccordionItem = (props) => {
|
|
|
78
79
|
}, [CustomActions, actualActiveValue, allChildrenReferences, customActions, isDSMobile, renderCustomActions]);
|
|
79
80
|
const { isShowingEllipsis: isPrimaryShowingEllipsis, setElement: setPrimaryElement } = useIsShowingEllipsis();
|
|
80
81
|
const { isShowingEllipsis: isSecondaryShowingEllipsis, setElement: setSecondaryElement } = useIsShowingEllipsis();
|
|
81
|
-
const Titles = useMemo(() => {
|
|
82
|
-
if ((isPrimaryShowingEllipsis || isSecondaryShowingEllipsis) && !isDSMobile)
|
|
83
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
84
|
-
/* @__PURE__ */ jsx(
|
|
85
|
-
StyledPrimaryTitle,
|
|
86
|
-
{
|
|
87
|
-
ref: setPrimaryElement,
|
|
88
|
-
...title ? { id: `accordion_${title || ""}id` } : void 0,
|
|
89
|
-
disabled,
|
|
90
|
-
isDSMobile,
|
|
91
|
-
selected,
|
|
92
|
-
withSecondaryTitle: secondaryTitle,
|
|
93
|
-
children: title
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
!isDSMobile && secondaryTitle && /* @__PURE__ */ jsx(StyledSecondaryTitle, { ref: setSecondaryElement, disabled, selected, children: secondaryTitle }),
|
|
97
|
-
/* @__PURE__ */ jsx(DSPopperJS, { referenceElement, showPopover, children: /* @__PURE__ */ jsxs(StyledTooltipContent, { children: [
|
|
98
|
-
/* @__PURE__ */ jsx("p", { children: title }),
|
|
99
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
100
|
-
" ",
|
|
101
|
-
secondaryTitle
|
|
102
|
-
] })
|
|
103
|
-
] }) })
|
|
104
|
-
] });
|
|
105
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
106
|
-
/* @__PURE__ */ jsx(
|
|
107
|
-
StyledPrimaryTitle,
|
|
108
|
-
{
|
|
109
|
-
ref: setPrimaryElement,
|
|
110
|
-
...title ? { id: `accordion_${title || ""}id` } : void 0,
|
|
111
|
-
disabled,
|
|
112
|
-
isDSMobile,
|
|
113
|
-
selected,
|
|
114
|
-
withSecondaryTitle: secondaryTitle,
|
|
115
|
-
children: title
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
!isDSMobile && secondaryTitle && /* @__PURE__ */ jsx(StyledSecondaryTitle, { ref: setSecondaryElement, disabled, selected, children: secondaryTitle })
|
|
119
|
-
] });
|
|
120
|
-
}, [
|
|
121
|
-
isPrimaryShowingEllipsis,
|
|
122
|
-
isSecondaryShowingEllipsis,
|
|
123
|
-
isDSMobile,
|
|
124
|
-
setPrimaryElement,
|
|
125
|
-
title,
|
|
126
|
-
disabled,
|
|
127
|
-
selected,
|
|
128
|
-
secondaryTitle,
|
|
129
|
-
setSecondaryElement,
|
|
130
|
-
referenceElement,
|
|
131
|
-
showPopover
|
|
132
|
-
]);
|
|
133
82
|
const onKeyDownWithIndex = useCallback(
|
|
134
83
|
(e) => {
|
|
135
84
|
handleOnKeyDown(e, dsIndex);
|
|
@@ -151,6 +100,78 @@ const DSAccordionItem = (props) => {
|
|
|
151
100
|
onFocus: handleOnFocus,
|
|
152
101
|
onBlur: handleOnBlur
|
|
153
102
|
};
|
|
103
|
+
const titleDesktop = useMemo(
|
|
104
|
+
() => /* @__PURE__ */ jsxs(
|
|
105
|
+
Grid,
|
|
106
|
+
{
|
|
107
|
+
onMouseEnter: handleOnFocus,
|
|
108
|
+
onMouseLeave: handleOnBlur,
|
|
109
|
+
rows: ["auto", "auto"],
|
|
110
|
+
rowGap: secondaryTitle ? "3px" : "0px",
|
|
111
|
+
padding: "6px 0px",
|
|
112
|
+
width: "100%",
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ jsxs(Grid, { cols: ["20px", "auto"], children: [
|
|
115
|
+
/* @__PURE__ */ jsx(StyledItemAddon, { disabled, children: selected ? /* @__PURE__ */ jsx(IconOpened, {}) : /* @__PURE__ */ jsx(IconClosed, {}) }),
|
|
116
|
+
/* @__PURE__ */ jsx(StyledItemTitles, { withSecondaryTitle: secondaryTitle, selected, children: /* @__PURE__ */ jsx(
|
|
117
|
+
StyledPrimaryTitle,
|
|
118
|
+
{
|
|
119
|
+
ref: setPrimaryElement,
|
|
120
|
+
...title ? { id: `accordion_${title || ""}id` } : void 0,
|
|
121
|
+
disabled,
|
|
122
|
+
selected,
|
|
123
|
+
withSecondaryTitle: secondaryTitle,
|
|
124
|
+
children: title
|
|
125
|
+
}
|
|
126
|
+
) })
|
|
127
|
+
] }),
|
|
128
|
+
secondaryTitle && /* @__PURE__ */ jsxs(Grid, { cols: ["20px", "auto"], children: [
|
|
129
|
+
/* @__PURE__ */ jsx("div", {}),
|
|
130
|
+
/* @__PURE__ */ jsx(StyledSecondaryTitle, { ref: setSecondaryElement, disabled, selected, children: secondaryTitle })
|
|
131
|
+
] })
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
[
|
|
136
|
+
referenceElement,
|
|
137
|
+
setSecondaryElement,
|
|
138
|
+
handleOnBlur,
|
|
139
|
+
handleOnFocus,
|
|
140
|
+
secondaryTitle,
|
|
141
|
+
selected,
|
|
142
|
+
title,
|
|
143
|
+
disabled,
|
|
144
|
+
showPopover
|
|
145
|
+
]
|
|
146
|
+
);
|
|
147
|
+
const titleMobile = useMemo(
|
|
148
|
+
() => /* @__PURE__ */ jsx(Grid, { width: "100%", children: /* @__PURE__ */ jsxs(Grid, { cols: ["auto", "20px"], children: [
|
|
149
|
+
/* @__PURE__ */ jsx(
|
|
150
|
+
StyledItemTitles,
|
|
151
|
+
{
|
|
152
|
+
onMouseEnter: handleOnFocus,
|
|
153
|
+
onMouseLeave: handleOnBlur,
|
|
154
|
+
isDSMobile: true,
|
|
155
|
+
withSecondaryTitle: secondaryTitle,
|
|
156
|
+
selected,
|
|
157
|
+
children: /* @__PURE__ */ jsx(
|
|
158
|
+
StyledPrimaryTitle,
|
|
159
|
+
{
|
|
160
|
+
ref: setPrimaryElement,
|
|
161
|
+
...title ? { id: `accordion_${title || ""}id` } : void 0,
|
|
162
|
+
disabled,
|
|
163
|
+
isDSMobile: true,
|
|
164
|
+
selected,
|
|
165
|
+
withSecondaryTitle: secondaryTitle,
|
|
166
|
+
children: title
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
/* @__PURE__ */ jsx(StyledItemAddon, { disabled, isDSMobile: true, children: selected ? /* @__PURE__ */ jsx(IconOpened, { isDSMobile: true }) : /* @__PURE__ */ jsx(IconClosed, { isDSMobile: true }) })
|
|
172
|
+
] }) }),
|
|
173
|
+
[isDSMobile, title, setPrimaryElement, handleOnBlur, handleOnFocus, secondaryTitle, selected, disabled]
|
|
174
|
+
);
|
|
154
175
|
return /* @__PURE__ */ jsxs(StyledItemContainer, { "data-testid": DSAccordionDataTestid.ITEM.CONTAINER, className, ...xstyledAttrs, children: [
|
|
155
176
|
/* @__PURE__ */ jsxs(StyledItemHeaderContainer, { disabled, ref: setReferenceElement, children: [
|
|
156
177
|
/* @__PURE__ */ jsxs(
|
|
@@ -173,18 +194,14 @@ const DSAccordionItem = (props) => {
|
|
|
173
194
|
...handlers,
|
|
174
195
|
...globalAttrs,
|
|
175
196
|
children: [
|
|
176
|
-
|
|
177
|
-
/* @__PURE__ */ jsx(
|
|
178
|
-
|
|
179
|
-
{
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
selected,
|
|
185
|
-
children: Titles
|
|
186
|
-
}
|
|
187
|
-
)
|
|
197
|
+
isDSMobile ? titleMobile : titleDesktop,
|
|
198
|
+
/* @__PURE__ */ jsx(DSPopperJS, { referenceElement, showPopover: !selected && showPopover, children: /* @__PURE__ */ jsxs(StyledTooltipContent, { children: [
|
|
199
|
+
/* @__PURE__ */ jsx("p", { children: title }),
|
|
200
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
201
|
+
" ",
|
|
202
|
+
secondaryTitle
|
|
203
|
+
] })
|
|
204
|
+
] }) })
|
|
188
205
|
]
|
|
189
206
|
}
|
|
190
207
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/accordionItem/DSAccordionItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React, { useState, useContext, useCallback, useMemo } from 'react';\nimport {\n useMemoMergePropsWithDefault,\n describe,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { useIsShowingEllipsis } from '@elliemae/ds-utilities';\nimport { DSButton, BUTTON_TYPE } from '@elliemae/ds-button';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { accordionItemDefaultProps } from '../../defaultProps';\nimport {\n StyledItemAddon,\n StyledItemContainer,\n StyledItemContent,\n StyledItemCustomActions,\n StyledItemHeader,\n StyledItemHeaderContainer,\n StyledItemTitles,\n StyledPrimaryTitle,\n StyledSecondaryTitle,\n StyledTooltipContent,\n} from './styles';\nimport { useAccordionItem } from './useAccordionItem';\nimport { DSAccordionContext } from '../../DSAccordionCTX';\nimport { DSAccordionDataTestid } from '../../exported-related/DSAccordionDatatestid';\nimport { accordionItemPropTypes } from '../../react-desc-prop-types';\nimport type { DSAccordionT } from '../../react-desc-prop-types';\n\nconst DSAccordionItem = (props: DSAccordionT.ItemProps): JSX.Element => {\n const propsWithDefaults = useMemoMergePropsWithDefault(\n props,\n accordionItemDefaultProps,\n ) as DSAccordionT.InternalItemProps;\n\n const {\n children,\n title,\n secondaryTitle,\n customActions,\n iconOpened: IconOpened,\n iconClosed: IconClosed,\n value,\n disabled,\n dsIndex,\n renderCustomActions,\n CustomActions,\n xStyledPropsContent,\n ...rest\n } = propsWithDefaults;\n\n const { handleOnClick, handleOnKeyDown, selected } = useAccordionItem({ value, disabled });\n\n const xstyledAttrs = useGetXstyledProps(rest);\n const xstyledContentAttrs = useGetXstyledProps(xStyledPropsContent);\n\n const {\n allChildrenReferences,\n actualActiveValue,\n props: { isDSMobile },\n } = useContext(DSAccordionContext);\n\n const [showPopover, setShowPopover] = useState(false);\n const [referenceElement, setReferenceElement] = useState<HTMLElement | null>();\n\n const CustomActionsContent = useMemo(() => {\n if (!isDSMobile && customActions?.length > 0)\n return (\n <StyledItemCustomActions isDSMobile={isDSMobile}>\n {customActions?.map(({ onClick, id, ...otherProps }) => (\n <DSButton\n key={id}\n onClick={(e: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement>): void => {\n e.stopPropagation();\n if (onClick) onClick(e as React.MouseEvent<HTMLElement, MouseEvent>);\n }}\n {...otherProps}\n buttonType={BUTTON_TYPE.SECONDARY}\n />\n ))}\n </StyledItemCustomActions>\n );\n\n if (!isDSMobile && (renderCustomActions || CustomActions))\n return (\n <StyledItemCustomActions isDSMobile={isDSMobile}>\n {CustomActions !== undefined ? (\n <CustomActions allRefs={allChildrenReferences} actualActiveValue={actualActiveValue} />\n ) : (\n renderCustomActions?.({ allRefs: allChildrenReferences, actualActiveValue })\n )}\n </StyledItemCustomActions>\n );\n return null;\n }, [CustomActions, actualActiveValue, allChildrenReferences, customActions, isDSMobile, renderCustomActions]);\n\n const { isShowingEllipsis: isPrimaryShowingEllipsis, setElement: setPrimaryElement } = useIsShowingEllipsis();\n\n const { isShowingEllipsis: isSecondaryShowingEllipsis, setElement: setSecondaryElement } = useIsShowingEllipsis();\n\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport React, { useState, useContext, useCallback, useMemo } from 'react';\nimport {\n useMemoMergePropsWithDefault,\n describe,\n useGetGlobalAttributes,\n useGetXstyledProps,\n} from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useIsShowingEllipsis } from '@elliemae/ds-utilities';\nimport { DSButton, BUTTON_TYPE } from '@elliemae/ds-button';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { accordionItemDefaultProps } from '../../defaultProps';\nimport {\n StyledItemAddon,\n StyledItemContainer,\n StyledItemContent,\n StyledItemCustomActions,\n StyledItemHeader,\n StyledItemHeaderContainer,\n StyledItemTitles,\n StyledPrimaryTitle,\n StyledSecondaryTitle,\n StyledTooltipContent,\n} from './styles';\nimport { useAccordionItem } from './useAccordionItem';\nimport { DSAccordionContext } from '../../DSAccordionCTX';\nimport { DSAccordionDataTestid } from '../../exported-related/DSAccordionDatatestid';\nimport { accordionItemPropTypes } from '../../react-desc-prop-types';\nimport type { DSAccordionT } from '../../react-desc-prop-types';\n\nconst DSAccordionItem = (props: DSAccordionT.ItemProps): JSX.Element => {\n const propsWithDefaults = useMemoMergePropsWithDefault(\n props,\n accordionItemDefaultProps,\n ) as DSAccordionT.InternalItemProps;\n\n const {\n children,\n title,\n secondaryTitle,\n customActions,\n iconOpened: IconOpened,\n iconClosed: IconClosed,\n value,\n disabled,\n dsIndex,\n renderCustomActions,\n CustomActions,\n xStyledPropsContent,\n ...rest\n } = propsWithDefaults;\n\n const { handleOnClick, handleOnKeyDown, selected } = useAccordionItem({ value, disabled });\n\n const xstyledAttrs = useGetXstyledProps(rest);\n const xstyledContentAttrs = useGetXstyledProps(xStyledPropsContent);\n\n const {\n allChildrenReferences,\n actualActiveValue,\n props: { isDSMobile },\n } = useContext(DSAccordionContext);\n\n const [showPopover, setShowPopover] = useState(false);\n const [referenceElement, setReferenceElement] = useState<HTMLElement | null>();\n\n const CustomActionsContent = useMemo(() => {\n if (!isDSMobile && customActions?.length > 0)\n return (\n <StyledItemCustomActions isDSMobile={isDSMobile}>\n {customActions?.map(({ onClick, id, ...otherProps }) => (\n <DSButton\n key={id}\n onClick={(e: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement>): void => {\n e.stopPropagation();\n if (onClick) onClick(e as React.MouseEvent<HTMLElement, MouseEvent>);\n }}\n {...otherProps}\n buttonType={BUTTON_TYPE.SECONDARY}\n />\n ))}\n </StyledItemCustomActions>\n );\n\n if (!isDSMobile && (renderCustomActions || CustomActions))\n return (\n <StyledItemCustomActions isDSMobile={isDSMobile}>\n {CustomActions !== undefined ? (\n <CustomActions allRefs={allChildrenReferences} actualActiveValue={actualActiveValue} />\n ) : (\n renderCustomActions?.({ allRefs: allChildrenReferences, actualActiveValue })\n )}\n </StyledItemCustomActions>\n );\n return null;\n }, [CustomActions, actualActiveValue, allChildrenReferences, customActions, isDSMobile, renderCustomActions]);\n\n const { isShowingEllipsis: isPrimaryShowingEllipsis, setElement: setPrimaryElement } = useIsShowingEllipsis();\n\n const { isShowingEllipsis: isSecondaryShowingEllipsis, setElement: setSecondaryElement } = useIsShowingEllipsis();\n\n const onKeyDownWithIndex = useCallback(\n (e: React.KeyboardEvent) => {\n handleOnKeyDown(e, dsIndex);\n },\n [dsIndex, handleOnKeyDown],\n );\n const handleOnFocus = useCallback(\n () => setShowPopover(isPrimaryShowingEllipsis || isSecondaryShowingEllipsis),\n [isPrimaryShowingEllipsis, isSecondaryShowingEllipsis],\n );\n\n const handleOnBlur = useCallback(() => setShowPopover(false), []);\n\n const { className, ...globalAttrs } = useGetGlobalAttributes(rest, {\n onClick: handleOnClick,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n });\n\n const handlers = {\n onClick: handleOnClick,\n onFocus: handleOnFocus,\n onBlur: handleOnBlur,\n };\n\n const titleDesktop = useMemo(\n () => (\n <Grid\n onMouseEnter={handleOnFocus}\n onMouseLeave={handleOnBlur}\n rows={['auto', 'auto']}\n rowGap={secondaryTitle ? '3px' : '0px'}\n padding=\"6px 0px\"\n width=\"100%\"\n >\n <Grid cols={['20px', 'auto']}>\n <StyledItemAddon disabled={disabled}>{selected ? <IconOpened /> : <IconClosed />}</StyledItemAddon>\n <StyledItemTitles withSecondaryTitle={secondaryTitle} selected={selected}>\n <StyledPrimaryTitle\n ref={setPrimaryElement}\n {...(title ? { id: `accordion_${title || ''}id` } : undefined)}\n disabled={disabled}\n selected={selected}\n withSecondaryTitle={secondaryTitle}\n >\n {title}\n </StyledPrimaryTitle>\n </StyledItemTitles>\n </Grid>\n {secondaryTitle && (\n <Grid cols={['20px', 'auto']}>\n <div></div>\n\n <StyledSecondaryTitle ref={setSecondaryElement} disabled={disabled} selected={selected}>\n {secondaryTitle}\n </StyledSecondaryTitle>\n </Grid>\n )}\n </Grid>\n ),\n [\n referenceElement,\n setSecondaryElement,\n handleOnBlur,\n handleOnFocus,\n secondaryTitle,\n selected,\n title,\n disabled,\n showPopover,\n ],\n );\n\n const titleMobile = useMemo(\n () => (\n <Grid width=\"100%\">\n <Grid cols={['auto', '20px']}>\n <StyledItemTitles\n onMouseEnter={handleOnFocus}\n onMouseLeave={handleOnBlur}\n isDSMobile\n withSecondaryTitle={secondaryTitle}\n selected={selected}\n >\n <StyledPrimaryTitle\n ref={setPrimaryElement}\n {...(title ? { id: `accordion_${title || ''}id` } : undefined)}\n disabled={disabled}\n isDSMobile\n selected={selected}\n withSecondaryTitle={secondaryTitle}\n >\n {title}\n </StyledPrimaryTitle>\n </StyledItemTitles>\n <StyledItemAddon disabled={disabled} isDSMobile>\n {selected ? <IconOpened isDSMobile /> : <IconClosed isDSMobile />}\n </StyledItemAddon>\n </Grid>\n </Grid>\n ),\n [isDSMobile, title, setPrimaryElement, handleOnBlur, handleOnFocus, secondaryTitle, selected, disabled],\n );\n\n return (\n <StyledItemContainer data-testid={DSAccordionDataTestid.ITEM.CONTAINER} className={className} {...xstyledAttrs}>\n <StyledItemHeaderContainer disabled={disabled} ref={setReferenceElement}>\n <StyledItemHeader\n type=\"button\"\n withCustomActions={(customActions?.length > 0 || renderCustomActions !== undefined) && !isDSMobile}\n withSecondaryTitle={secondaryTitle}\n tabIndex={!disabled ? 0 : undefined}\n disabled={disabled}\n data-disabled={disabled}\n ref={allChildrenReferences[dsIndex]}\n onKeyDown={onKeyDownWithIndex}\n isDSMobile={isDSMobile}\n data-testid={DSAccordionDataTestid.ITEM.HEADER}\n id={`ds-accordion-header-${value}`}\n aria-expanded={selected}\n aria-disabled={disabled}\n aria-controls={`ds-accordion-content-${value}`}\n {...handlers}\n {...globalAttrs}\n >\n {isDSMobile ? titleMobile : titleDesktop}\n <DSPopperJS referenceElement={referenceElement} showPopover={!selected && showPopover}>\n <StyledTooltipContent>\n <p>{title}</p>\n <p> {secondaryTitle}</p>\n </StyledTooltipContent>\n </DSPopperJS>\n </StyledItemHeader>\n {CustomActionsContent}\n </StyledItemHeaderContainer>\n {selected && (\n <StyledItemContent\n data-testid={DSAccordionDataTestid.ITEM.CONTENT}\n aria-labelledby={`ds-accordion-header-${value}`}\n role=\"region\"\n isDSMobile={isDSMobile}\n id={`ds-accordion-content-${value}`}\n {...xstyledContentAttrs}\n >\n {children}\n </StyledItemContent>\n )}\n </StyledItemContainer>\n );\n};\n\nDSAccordionItem.displayName = 'DSAccordionItem';\nconst DSAccordionItemWithSchema = describe(DSAccordionItem);\nDSAccordionItemWithSchema.propTypes = accordionItemPropTypes as WeakValidationMap<unknown>;\n\nexport { DSAccordionItem, DSAccordionItemWithSchema };\nexport default DSAccordionItem;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyEX,cAiEJ,YAjEI;AAvEZ,SAAgB,UAAU,YAAY,aAA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|
-
import { styled,
|
|
2
|
+
import { styled, xStyledCommonProps } from "@elliemae/ds-system";
|
|
3
3
|
import { DSAccordionName, DSAccordionSlots } from "../../exported-related";
|
|
4
|
-
const paddingSetter = ({ isDSMobile, withSecondaryTitle }) => {
|
|
5
|
-
if (isDSMobile)
|
|
6
|
-
return css`
|
|
7
|
-
padding: 13px 0;
|
|
8
|
-
`;
|
|
9
|
-
if (withSecondaryTitle)
|
|
10
|
-
return css`
|
|
11
|
-
padding: 6px 0;
|
|
12
|
-
`;
|
|
13
|
-
return css`
|
|
14
|
-
padding: 7px 0;
|
|
15
|
-
`;
|
|
16
|
-
};
|
|
17
4
|
const StyledItemContainer = styled("div", {
|
|
18
5
|
name: DSAccordionName,
|
|
19
6
|
slot: DSAccordionSlots.ITEM.CONTAINER
|
|
@@ -33,7 +20,7 @@ const StyledItemHeader = styled("button", {
|
|
|
33
20
|
display: flex;
|
|
34
21
|
min-height: ${({ theme, withSecondaryTitle, isDSMobile }) => isDSMobile ? `44px` : `${withSecondaryTitle ? theme.space.m : theme.space.s}`};
|
|
35
22
|
width: 100%;
|
|
36
|
-
align-items:
|
|
23
|
+
align-items: center;
|
|
37
24
|
border: none;
|
|
38
25
|
outline: none;
|
|
39
26
|
background: none;
|
|
@@ -41,7 +28,6 @@ const StyledItemHeader = styled("button", {
|
|
|
41
28
|
cursor: ${({ disabled }) => disabled ? "not-allowed" : "pointer"};
|
|
42
29
|
}
|
|
43
30
|
padding: ${({ isDSMobile }) => isDSMobile ? `0 16px` : `0`};
|
|
44
|
-
${({ isDSMobile }) => isDSMobile ? `flex-direction: row-reverse;` : ``}
|
|
45
31
|
&:focus {
|
|
46
32
|
&:after {
|
|
47
33
|
position: absolute;
|
|
@@ -70,8 +56,6 @@ const StyledItemAddon = styled("div", {
|
|
|
70
56
|
height: 100%;
|
|
71
57
|
display: grid;
|
|
72
58
|
place-items: center;
|
|
73
|
-
padding-top: 5px;
|
|
74
|
-
|
|
75
59
|
& .em-ds-icon svg {
|
|
76
60
|
fill: ${({ disabled, theme }) => disabled ? theme.colors.neutral[200] : theme.colors.brand[800]};
|
|
77
61
|
}
|
|
@@ -82,7 +66,6 @@ const StyledItemTitles = styled("div", {
|
|
|
82
66
|
})`
|
|
83
67
|
display: grid;
|
|
84
68
|
grid-gap: ${({ theme }) => theme.space.xxxs};
|
|
85
|
-
${paddingSetter}
|
|
86
69
|
grid-template-columns: 100%;
|
|
87
70
|
width: 100%;
|
|
88
71
|
align-content: center;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/accordionItem/styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSAccordionName, DSAccordionSlots } from '../../exported-related';\ninterface StyledItemHeaderPropsT {\n withCustomActions: boolean;\n withSecondaryTitle?: string;\n isDSMobile
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { styled, css, xStyledCommonProps } from '@elliemae/ds-system';\nimport { DSAccordionName, DSAccordionSlots } from '../../exported-related';\ninterface StyledItemHeaderPropsT {\n withCustomActions: boolean;\n withSecondaryTitle?: string;\n isDSMobile?: boolean;\n}\n\ninterface StyledItemTitlesPropsT {\n withSecondaryTitle?: string;\n isDSMobile?: boolean;\n selected: boolean;\n}\n\ninterface StyledPrimaryTitlePropsT {\n disabled: boolean;\n isDSMobile?: boolean;\n selected: boolean;\n withSecondaryTitle: boolean;\n}\n\ninterface StyledItemContentPropsT {\n isDSMobile?: boolean;\n}\n\ninterface StyledSecondaryTitlePropsT {\n disabled: boolean;\n selected: boolean;\n}\n\ninterface StyledItemAddonPropsT {\n disabled: boolean;\n isDSMobile?: boolean;\n}\n\ninterface StyledItemHeaderContainerPropsT {\n disabled: boolean;\n}\n\ninterface StyledItemCustomActionsPropsT {\n isDSMobile?: boolean;\n}\n\nexport const StyledItemContainer = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.CONTAINER,\n})`\n display: grid;\n grid-template-rows: auto auto;\n border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[200]};\n align-items: center;\n min-width: 240px;\n grid-template-columns: 100%;\n ${xStyledCommonProps};\n`;\n\nexport const StyledItemHeader = styled('button', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.CONTAINER,\n})<StyledItemHeaderPropsT>`\n display: flex;\n min-height: ${({ theme, withSecondaryTitle, isDSMobile }) =>\n isDSMobile ? `44px` : `${withSecondaryTitle ? theme.space.m : theme.space.s}`};\n width: 100%;\n align-items: center;\n border: none;\n outline: none;\n background: none;\n &:hover {\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n }\n padding: ${({ isDSMobile }) => (isDSMobile ? `0 16px` : `0`)};\n &:focus {\n &:after {\n position: absolute;\n content: '';\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n pointer-events: none;\n }\n }\n`;\n\nexport const StyledItemContent = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.CONTENT.CONTAINER,\n})<StyledItemContentPropsT>`\n padding: ${({ isDSMobile }) => (isDSMobile ? `3px 16px 24px 16px` : '16px 20px')};\n ${xStyledCommonProps};\n`;\n\nexport const StyledItemAddon = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.ADDON,\n})<StyledItemAddonPropsT>`\n height: 100%;\n display: grid;\n place-items: center;\n & .em-ds-icon svg {\n fill: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[200] : theme.colors.brand[800])};\n }\n`;\n\nexport const StyledItemTitles = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.TITLE_CONTAINER,\n})<StyledItemTitlesPropsT>`\n display: grid;\n grid-gap: ${({ theme }) => theme.space.xxxs};\n grid-template-columns: 100%;\n width: 100%;\n align-content: center;\n`;\n\nexport const StyledPrimaryTitle = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.PRIMARY_TITLE,\n})<StyledPrimaryTitlePropsT>`\n margin: 0;\n font-size: 16px;\n line-height: 1.125;\n text-align: left;\n text-overflow: ellipsis;\n min-height: ${({ theme }) => theme.space.xs};\n color: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[500] : theme.colors.neutral[700])};\n font-weight: ${({ theme, isDSMobile }) => (isDSMobile ? theme.fontWeights.semibold : theme.fontWeights.regular)};\n ${({ selected }) =>\n selected\n ? `word-break: break-word;`\n : `\n overflow: hidden;\n white-space: nowrap;\n `};\n width: 100%;\n display: block;\n`;\n\nexport const StyledSecondaryTitle = styled('span', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.SECONDARY_TITLE,\n})<StyledSecondaryTitlePropsT>`\n margin: 0;\n font-size: ${({ theme }) => theme.fontSizes.label[200]};\n line-height: 1.273;\n text-align: left;\n min-height: 12px;\n color: ${({ disabled, theme }) => (disabled ? theme.colors.neutral[500] : theme.colors.neutral[700])};\n text-overflow: ellipsis;\n ${({ selected }) =>\n selected\n ? `word-break: break-word;`\n : `\n overflow: hidden;\n white-space: nowrap;\n width: 100%;\n display: block;`}\n`;\n\nexport const StyledItemCustomActions = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.CUSTOM_ACTIONS_CONTAINER,\n})<StyledItemCustomActionsPropsT>`\n display: grid;\n grid-auto-flow: column;\n place-items: center;\n grid-gap: ${({ theme }) => theme.space.xxs};\n margin: ${({ theme, isDSMobile }) => (isDSMobile ? `0 ${theme.space.xs}` : '0 20px 0 16px')};\n justify-content: flex-end;\n height: 28px;\n`;\n\nexport const StyledItemHeaderContainer = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.CONTAINER,\n})<StyledItemHeaderContainerPropsT>`\n display: grid;\n grid-template-columns: auto max-content;\n place-items: center;\n position: relative;\n border-radius: 2px;\n &:hover {\n ${({ disabled, theme }) => (!disabled ? `background: ${theme.colors.brand[200]};` : ``)}\n }\n`;\n\nexport const StyledTooltipContent = styled('div', {\n name: DSAccordionName,\n slot: DSAccordionSlots.ITEM.HEADER.TOOLTIP,\n})`\n padding: 8px;\n width: 250px;\n background: white;\n display: grid;\n gap: ${({ theme }) => theme.space.xxs};\n\n p {\n margin: 0;\n }\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAa,0BAA0B;AAChD,SAAS,iBAAiB,wBAAwB;AA0C3C,MAAM,sBAAsB,OAAO,OAAO;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,iBAAiB,KAAK;AAC9B,CAAC;AAAA;AAAA;AAAA,6BAG4B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,IAI7D;AAAA;AAGG,MAAM,mBAAmB,OAAO,UAAU;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,iBAAiB,KAAK,OAAO;AACrC,CAAC;AAAA;AAAA,gBAEe,CAAC,EAAE,OAAO,oBAAoB,WAAW,MACrD,aAAa,SAAS,GAAG,qBAAqB,MAAM,MAAM,IAAI,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAOhE,CAAC,EAAE,SAAS,MAAO,WAAW,gBAAgB;AAAA;AAAA,aAE/C,CAAC,EAAE,WAAW,MAAO,aAAa,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAUhC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAMrD,MAAM,oBAAoB,OAAO,OAAO;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AAO,MAAM,OAAO,QAAQ;AAAA;AAAA,IAE7F,CAAC,EAAE,SAAS,MACZ,WACI,4BACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOD,MAAM,0BAA0B,OAAO,OAAO;AAAA,EACnD,MAAM;AAAA,EACN,MAAM,iBAAiB,KAAK,OAAO;AACrC,CAAC;AAAA;AAAA;AAAA;AAAA,cAIa,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA,YAC7B,CAAC,EAAE,OAAO,WAAW,MAAO,aAAa,KAAK,MAAM,MAAM,OAAO;AAAA;AAAA;AAAA;AAKtE,MAAM,4BAA4B,OAAO,OAAO;AAAA,EACrD,MAAM;AAAA,EACN,MAAM,iBAAiB,KAAK,OAAO;AACrC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOK,CAAC,EAAE,UAAU,MAAM,MAAO,CAAC,WAAW,eAAe,MAAM,OAAO,MAAM,UAAU;AAAA;AAAA;AAIjF,MAAM,uBAAuB,OAAO,OAAO;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,iBAAiB,KAAK,OAAO;AACrC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,SAKQ,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-accordion",
|
|
3
|
-
"version": "3.16.0-next.
|
|
3
|
+
"version": "3.16.0-next.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Accordion",
|
|
6
6
|
"files": [
|
|
@@ -83,12 +83,12 @@
|
|
|
83
83
|
"indent": 4
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@elliemae/ds-button": "3.16.0-next.
|
|
87
|
-
"@elliemae/ds-icons": "3.16.0-next.
|
|
88
|
-
"@elliemae/ds-popperjs": "3.16.0-next.
|
|
89
|
-
"@elliemae/ds-props-helpers": "3.16.0-next.
|
|
90
|
-
"@elliemae/ds-system": "3.16.0-next.
|
|
91
|
-
"@elliemae/ds-utilities": "3.16.0-next.
|
|
86
|
+
"@elliemae/ds-button": "3.16.0-next.7",
|
|
87
|
+
"@elliemae/ds-icons": "3.16.0-next.7",
|
|
88
|
+
"@elliemae/ds-popperjs": "3.16.0-next.7",
|
|
89
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.7",
|
|
90
|
+
"@elliemae/ds-system": "3.16.0-next.7",
|
|
91
|
+
"@elliemae/ds-utilities": "3.16.0-next.7"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@testing-library/jest-dom": "~5.16.4",
|