@elliemae/ds-mobile 3.57.0-next.7 → 3.57.0-next.9
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/FullPageContainer/FullPageContainer.js +0 -4
- package/dist/cjs/FullPageContainer/FullPageContainer.js.map +3 -3
- package/dist/cjs/FullPageContainer/FullPageContainerScroll.js +0 -5
- package/dist/cjs/FullPageContainer/FullPageContainerScroll.js.map +3 -3
- package/dist/cjs/InfiniteLoader/Loader.js +0 -4
- package/dist/cjs/InfiniteLoader/Loader.js.map +3 -3
- package/dist/cjs/LoadingPage/Page.js +2 -29
- package/dist/cjs/LoadingPage/Page.js.map +3 -3
- package/dist/cjs/MobileCard/ActionAddon.js +2 -17
- package/dist/cjs/MobileCard/ActionAddon.js.map +3 -3
- package/dist/cjs/MobileCard/CardIcons.js +1 -12
- package/dist/cjs/MobileCard/CardIcons.js.map +3 -3
- package/dist/cjs/MobileCard/ExpandChevron.js +1 -16
- package/dist/cjs/MobileCard/ExpandChevron.js.map +3 -3
- package/dist/cjs/MobileCard/ExpandableRegion.js +1 -6
- package/dist/cjs/MobileCard/ExpandableRegion.js.map +3 -3
- package/dist/cjs/MobileCard/polishedUtil.js +100 -0
- package/dist/cjs/MobileCard/polishedUtil.js.map +7 -0
- package/dist/cjs/MobileCard/useHeight.js +3 -3
- package/dist/cjs/MobileCard/useHeight.js.map +2 -2
- package/dist/cjs/MobileDropdownMenu/MobileDropdownInput.js +1 -5
- package/dist/cjs/MobileDropdownMenu/MobileDropdownInput.js.map +3 -3
- package/dist/cjs/MobileSelectList/MobileSelectList.js +3 -31
- package/dist/cjs/MobileSelectList/MobileSelectList.js.map +3 -3
- package/dist/cjs/MobileTouchable/MobileTouchable.js +5 -15
- package/dist/cjs/MobileTouchable/MobileTouchable.js.map +3 -3
- package/dist/cjs/PageFilter/PageFilter.js +1 -28
- package/dist/cjs/PageFilter/PageFilter.js.map +3 -3
- package/dist/cjs/PageForm/PageForm.js +0 -6
- package/dist/cjs/PageForm/PageForm.js.map +3 -3
- package/dist/cjs/PageList/PageList.js +1 -9
- package/dist/cjs/PageList/PageList.js.map +3 -3
- package/dist/cjs/PageSearch/PageSearch.js +1 -9
- package/dist/cjs/PageSearch/PageSearch.js.map +3 -3
- package/dist/cjs/PageSummary/PageSummary.js +0 -9
- package/dist/cjs/PageSummary/PageSummary.js.map +3 -3
- package/dist/cjs/SwipeToRefresh/ProgressIndicator.js +1 -5
- package/dist/cjs/SwipeToRefresh/ProgressIndicator.js.map +3 -3
- package/dist/esm/FullPageContainer/FullPageContainer.js +0 -4
- package/dist/esm/FullPageContainer/FullPageContainer.js.map +2 -2
- package/dist/esm/FullPageContainer/FullPageContainerScroll.js +0 -5
- package/dist/esm/FullPageContainer/FullPageContainerScroll.js.map +2 -2
- package/dist/esm/InfiniteLoader/Loader.js +0 -4
- package/dist/esm/InfiniteLoader/Loader.js.map +2 -2
- package/dist/esm/LoadingPage/Page.js +3 -30
- package/dist/esm/LoadingPage/Page.js.map +2 -2
- package/dist/esm/MobileCard/ActionAddon.js +2 -17
- package/dist/esm/MobileCard/ActionAddon.js.map +2 -2
- package/dist/esm/MobileCard/CardIcons.js +1 -12
- package/dist/esm/MobileCard/CardIcons.js.map +2 -2
- package/dist/esm/MobileCard/ExpandChevron.js +1 -16
- package/dist/esm/MobileCard/ExpandChevron.js.map +2 -2
- package/dist/esm/MobileCard/ExpandableRegion.js +2 -7
- package/dist/esm/MobileCard/ExpandableRegion.js.map +2 -2
- package/dist/esm/MobileCard/polishedUtil.js +70 -0
- package/dist/esm/MobileCard/polishedUtil.js.map +7 -0
- package/dist/esm/MobileCard/useHeight.js +1 -1
- package/dist/esm/MobileCard/useHeight.js.map +2 -2
- package/dist/esm/MobileDropdownMenu/MobileDropdownInput.js +1 -5
- package/dist/esm/MobileDropdownMenu/MobileDropdownInput.js.map +2 -2
- package/dist/esm/MobileSelectList/MobileSelectList.js +5 -33
- package/dist/esm/MobileSelectList/MobileSelectList.js.map +2 -2
- package/dist/esm/MobileTouchable/MobileTouchable.js +5 -15
- package/dist/esm/MobileTouchable/MobileTouchable.js.map +2 -2
- package/dist/esm/PageFilter/PageFilter.js +1 -28
- package/dist/esm/PageFilter/PageFilter.js.map +2 -2
- package/dist/esm/PageForm/PageForm.js +1 -7
- package/dist/esm/PageForm/PageForm.js.map +2 -2
- package/dist/esm/PageList/PageList.js +1 -9
- package/dist/esm/PageList/PageList.js.map +2 -2
- package/dist/esm/PageSearch/PageSearch.js +1 -9
- package/dist/esm/PageSearch/PageSearch.js.map +2 -2
- package/dist/esm/PageSummary/PageSummary.js +2 -11
- package/dist/esm/PageSummary/PageSummary.js.map +2 -2
- package/dist/esm/SwipeToRefresh/ProgressIndicator.js +1 -5
- package/dist/esm/SwipeToRefresh/ProgressIndicator.js.map +2 -2
- package/dist/types/FullPageContainer/FullPageContainer.d.ts +4 -10
- package/dist/types/FullPageContainer/FullPageContainerScroll.d.ts +5 -12
- package/dist/types/InfiniteLoader/Loader.d.ts +1 -7
- package/dist/types/LoadingPage/Page.d.ts +5 -6
- package/dist/types/MobileCard/ActionAddon.d.ts +5 -22
- package/dist/types/MobileCard/Card.d.ts +2 -2
- package/dist/types/MobileCard/CardIcons.d.ts +4 -17
- package/dist/types/MobileCard/ExpandChevron.d.ts +5 -22
- package/dist/types/MobileCard/ExpandableRegion.d.ts +4 -11
- package/dist/types/MobileCard/Group.d.ts +1 -1
- package/dist/types/MobileCard/index.d.ts +2 -2
- package/dist/types/MobileCard/polishedUtil.d.ts +24 -0
- package/dist/types/MobileDropdownMenu/MobileDropdownInput.d.ts +3 -9
- package/dist/types/MobilePageHeader/MobilePageHeader.d.ts +2 -2
- package/dist/types/MobileSelectList/MobileSelectList.d.ts +5 -6
- package/dist/types/MobileTouchable/MobileTouchable.d.ts +1 -2
- package/dist/types/PageFilter/PageFilter.d.ts +8 -37
- package/dist/types/PageForm/PageForm.d.ts +11 -26
- package/dist/types/PageList/PageList.d.ts +3 -4
- package/dist/types/PageSearch/PageSearch.d.ts +3 -4
- package/dist/types/PageSummary/PageSummary.d.ts +8 -19
- package/dist/types/SwipeToRefresh/ProgressIndicator.d.ts +3 -9
- package/package.json +19 -21
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/LoadingPage/Page.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n/* tslint:disable */\n// @ts-nocheck\n// What's with all the above disables?\n// this is what a legacy 7 year old codebase looks like.\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\nimport { styled, withTheme } from '@elliemae/ds-system';\nimport { get } from 'lodash-es';\nimport React, { useEffect, useRef, useState } from 'react';\n\nconst LoadingPageLoader = styled.div`\n ${({ type }) => (type === 'cover' ? 'position: fixed' : 'position: absolute')};\n\n z-index: ${(props) => props.zIndex || props.theme.zIndex.loader};\n top: 25%;\n left: 15%;\n width: 70%;\n height: 75%;\n display: flex;\n flex-direction: column;\n align-items: center;\n`;\n\nconst LoadingPage = ({ backdropZIndex, children, loader, loading, type = 'fill', zIndex }) => {\n const [position, setPosition] = useState(null);\n const childRef = useRef(null);\n useEffect(() => {\n if (childRef && childRef.current) {\n const style = childRef && window.getComputedStyle(childRef.current);\n setPosition(style.getPropertyValue('position'));\n }\n }, [childRef]);\n\n const Back = loading && <DSBackdrop type={type} zIndex={backdropZIndex} />;\n const Loader = loader && loading && (\n <LoadingPageLoader zIndex={zIndex} type={type} hide={!loading}>\n {loader}\n </LoadingPageLoader>\n );\n\n const injectRefPosition = (child) =>\n React.cloneElement(React.Children.only(child), {\n ref: childRef,\n children: React.Children.toArray(child.props.children).concat([Loader, Back]),\n style: {\n ...get(child, 'props.style', {}),\n position: position === 'static' ? 'relative' : position,\n },\n });\n\n if (React.Children.count(children) === 0) {\n return (\n <>\n {Loader}\n {Back}\n </>\n );\n }\n return injectRefPosition(children);\n};\n\nconst DSMobileLoadingPage = withTheme(LoadingPage);\n\nexport { DSMobileLoadingPage };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACqCG,SAmBpB,UAnBoB,KAmBpB,YAnBoB;AA5B1B,SAAS,kBAAkB;AAC3B,SAAS,QAAQ,iBAAiB;AAClC,SAAS,WAAW;AACpB,OAAOA,UAAS,WAAW,QAAQ,gBAAgB;AAEnD,MAAM,oBAAoB,OAAO;AAAA,IAC7B,CAAC,EAAE,KAAK,MAAO,SAAS,UAAU,oBAAoB,oBAAqB;AAAA;AAAA,aAElE,CAAC,UAAU,MAAM,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUjE,MAAM,cAAc,CAAC,EAAE,gBAAgB,UAAU,QAAQ,SAAS,OAAO,QAAQ,OAAO,MAAM;AAC5F,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,IAAI;AAC7C,QAAM,WAAW,OAAO,IAAI;AAC5B,YAAU,MAAM;AACd,QAAI,YAAY,SAAS,SAAS;AAChC,YAAM,QAAQ,YAAY,OAAO,iBAAiB,SAAS,OAAO;AAClE,kBAAY,MAAM,iBAAiB,UAAU,CAAC;AAAA,IAChD;AAAA,EACF,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,OAAO,WAAW,oBAAC,cAAW,MAAY,QAAQ,gBAAgB;AACxE,QAAM,SAAS,UAAU,WACvB,oBAAC,qBAAkB,QAAgB,MAAY,MAAM,CAAC,SACnD,kBACH;AAGF,QAAM,oBAAoB,CAAC,UACzBA,OAAM,aAAaA,OAAM,SAAS,KAAK,KAAK,GAAG;AAAA,IAC7C,KAAK;AAAA,IACL,UAAUA,OAAM,SAAS,QAAQ,MAAM,MAAM,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,CAAC;AAAA,IAC5E,OAAO;AAAA,MACL,GAAG,IAAI,OAAO,eAAe,CAAC,CAAC;AAAA,MAC/B,UAAU,aAAa,WAAW,aAAa;AAAA,IACjD;AAAA,EACF,CAAC;AAEH,MAAIA,OAAM,SAAS,MAAM,QAAQ,MAAM,GAAG;AACxC,WACE,iCACG;AAAA;AAAA,MACA;AAAA,OACH;AAAA,EAEJ;AACA,SAAO,kBAAkB,QAAQ;AACnC;AAEA,MAAM,sBAAsB,UAAU,WAAW;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { styled } from "@elliemae/ds-system";
|
|
5
|
-
import { ChevronSmallDown } from "@elliemae/ds-icons";
|
|
6
3
|
import { DSButton } from "@elliemae/ds-button";
|
|
4
|
+
import { ChevronSmallDown } from "@elliemae/ds-icons";
|
|
5
|
+
import { styled } from "@elliemae/ds-system";
|
|
7
6
|
const Addon = styled(DSButton)`
|
|
8
7
|
background-color: transparent;
|
|
9
8
|
padding-right: 4px;
|
|
@@ -21,20 +20,6 @@ const Addon = styled(DSButton)`
|
|
|
21
20
|
}
|
|
22
21
|
`;
|
|
23
22
|
const ActionAddon = ({ label, onClick, icon }) => /* @__PURE__ */ jsx(Addon, { onClick, labelText: label, icon: icon || /* @__PURE__ */ jsx(ChevronSmallDown, { color: ["brand-primary", 700] }) });
|
|
24
|
-
ActionAddon.propTypes = {
|
|
25
|
-
/**
|
|
26
|
-
* Addon label
|
|
27
|
-
*/
|
|
28
|
-
label: PropTypes.string,
|
|
29
|
-
/**
|
|
30
|
-
* On click callback
|
|
31
|
-
*/
|
|
32
|
-
onClick: PropTypes.func,
|
|
33
|
-
/**
|
|
34
|
-
* Icon to display after the label
|
|
35
|
-
*/
|
|
36
|
-
icon: PropTypes.element
|
|
37
|
-
};
|
|
38
23
|
export {
|
|
39
24
|
ActionAddon
|
|
40
25
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileCard/ActionAddon.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n/* tslint:disable */\n// @ts-nocheck\n// What's with all the above disables?\n// this is what a legacy 7 year old codebase looks like.\nimport { DSButton } from '@elliemae/ds-button';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport { styled } from '@elliemae/ds-system';\n\nconst Addon = styled(DSButton)`\n background-color: transparent;\n padding-right: 4px;\n height: 100%;\n border: none;\n font-size: 12px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.brand['700']};\n cursor: pointer;\n &:focus,\n &::after {\n background-color: transparent;\n box-shadow: none !important; /* needed */\n border: none !important; /* needed */\n }\n`;\n\nexport const ActionAddon = ({ label, onClick, icon }) => (\n <Addon onClick={onClick} labelText={label} icon={icon || <ChevronSmallDown color={['brand-primary', 700]} />} />\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC8BoC;AAtB3D,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,cAAc;AAEvB,MAAM,QAAQ,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMZ,CAAC,UAAU,MAAM,MAAM,YAAY,QAAQ;AAAA,WACjD,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU9C,MAAM,cAAc,CAAC,EAAE,OAAO,SAAS,KAAK,MACjD,oBAAC,SAAM,SAAkB,WAAW,OAAO,MAAM,QAAQ,oBAAC,oBAAiB,OAAO,CAAC,iBAAiB,GAAG,GAAG,GAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { styled } from "@elliemae/ds-system";
|
|
5
3
|
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
import { styled } from "@elliemae/ds-system";
|
|
6
5
|
const CardIconsWrapper = styled(Grid)`
|
|
7
6
|
align-items: center;
|
|
8
7
|
span,
|
|
@@ -63,16 +62,6 @@ const SubIcons = ({ icons = [], colors = [] }) => /* @__PURE__ */ jsx(CardIconsW
|
|
|
63
62
|
// eslint-disable-next-line react/no-array-index-key
|
|
64
63
|
/* @__PURE__ */ jsx(Icon, { className: `icon-color-${colors[i] || "muted"}` }, i)
|
|
65
64
|
)) });
|
|
66
|
-
SubIcons.propTypes = {
|
|
67
|
-
/**
|
|
68
|
-
* Array of Icons
|
|
69
|
-
*/
|
|
70
|
-
icons: PropTypes.arrayOf(PropTypes.func),
|
|
71
|
-
/**
|
|
72
|
-
* Color Types: muted, warn, error, success
|
|
73
|
-
*/
|
|
74
|
-
colors: PropTypes.arrayOf(PropTypes.oneOf(["muted", "warn", "error", "success", "primary"]))
|
|
75
|
-
};
|
|
76
65
|
export {
|
|
77
66
|
SubIcons
|
|
78
67
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileCard/CardIcons.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/restrict-template-expressions */\n/* eslint-disable import/no-unresolved */\n/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n/* tslint:disable */\n// @ts-nocheck\n// What's with all the above disables?\n// this is what a legacy 7 year old codebase looks like.\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\n\nconst CardIconsWrapper = styled(Grid)`\n align-items: center;\n span,\n svg {\n width: 12px !important;\n height: 12px !important;\n }\n span.icon-color-muted svg,\n svg:not([fill]) {\n fill: ${(props) => props.theme.colors.neutral['600']};\n height: 12px !important;\n width: 12px !important;\n\n & * {\n fill: ${(props) => props.theme.colors.neutral['600']};\n }\n }\n span.icon-color-warn svg,\n svg:not([fill]) {\n fill: ${(props) => props.theme.colors.warning['600']};\n height: 12px !important;\n width: 12px !important;\n\n & * {\n fill: ${(props) => props.theme.colors.warning['600']};\n }\n }\n span.icon-color-error svg,\n svg:not([fill]) {\n fill: ${(props) => props.theme.colors.danger['900']};\n height: 12px !important;\n width: 12px !important;\n\n & * {\n fill: ${(props) => props.theme.colors.danger['900']};\n }\n }\n span.icon-color-success svg,\n svg:not([fill]) {\n fill: ${(props) => props.theme.colors.success['900']};\n height: 12px !important;\n width: 12px !important;\n\n & * {\n fill: ${(props) => props.theme.colors.success['900']};\n }\n }\n span.icon-color-primary svg,\n svg:not([fill]) {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n span.icon-color-primary svg,\n svg:not([fill]) {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n`;\n\nexport const SubIcons = ({ icons = [], colors = [] }) => (\n <CardIconsWrapper cols={icons.map(() => '12px')} gutter=\"6px\" height=\"14px\" data-testid=\"card-subIcons\">\n {icons.map((Icon, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <Icon key={i} className={`icon-color-${colors[i] || 'muted'}`} />\n ))}\n </CardIconsWrapper>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACuEjB;AAhEN,SAAS,YAAY;AACrB,SAAS,cAAc;AAEvB,MAAM,mBAAmB,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YASxB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,cAK1C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,YAK9C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,cAK1C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,YAK9C,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,cAKzC,CAAC,UAAU,MAAM,MAAM,OAAO,OAAO,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,YAK7C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,cAK1C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,YAK9C,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,YAIxC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAI7C,MAAM,WAAW,CAAC,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC,EAAE,MACjD,oBAAC,oBAAiB,MAAM,MAAM,IAAI,MAAM,MAAM,GAAG,QAAO,OAAM,QAAO,QAAO,eAAY,iBACrF,gBAAM,IAAI,CAAC,MAAM;AAAA;AAAA,EAEhB,oBAAC,QAAa,WAAW,cAAc,OAAO,CAAC,KAAK,OAAO,MAAhD,CAAoD;AAAA,CAChE,GACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { styled } from "@elliemae/ds-system";
|
|
5
3
|
import { ChevronDown, ChevronRight } from "@elliemae/ds-icons";
|
|
4
|
+
import { styled } from "@elliemae/ds-system";
|
|
6
5
|
const ChevronWrap = styled.div`
|
|
7
6
|
margin-top: ${(props) => props.align === "top" ? "18px" : "0"};
|
|
8
7
|
align-self: ${(props) => props.align === "top" ? "flex-start" : "center"};
|
|
@@ -12,20 +11,6 @@ const ExpandChevron = ({ isExpanded, onClick, align }) => {
|
|
|
12
11
|
const Chevron = isExpanded ? ChevronDown : ChevronRight;
|
|
13
12
|
return /* @__PURE__ */ jsx(ChevronWrap, { "data-testid": "ds-card-expand-chevron", align, children: /* @__PURE__ */ jsx(Chevron, { size: "s", color: ["brand-primary", 800], onClick }) });
|
|
14
13
|
};
|
|
15
|
-
ExpandChevron.propTypes = {
|
|
16
|
-
/**
|
|
17
|
-
* Whether if the chevron is expanded or not
|
|
18
|
-
*/
|
|
19
|
-
isExpanded: PropTypes.bool,
|
|
20
|
-
/**
|
|
21
|
-
* click callback
|
|
22
|
-
*/
|
|
23
|
-
onClick: PropTypes.func.isRequired,
|
|
24
|
-
/**
|
|
25
|
-
* top or center
|
|
26
|
-
*/
|
|
27
|
-
align: PropTypes.string.isRequired
|
|
28
|
-
};
|
|
29
14
|
export {
|
|
30
15
|
ExpandChevron
|
|
31
16
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileCard/ExpandChevron.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n/* tslint:disable */\n// @ts-nocheck\n// What's with all the above disables?\n// this is what a legacy 7 year old codebase looks like.\nimport { ChevronDown, ChevronRight } from '@elliemae/ds-icons';\nimport { styled } from '@elliemae/ds-system';\n\nconst ChevronWrap = styled.div`\n margin-top: ${(props) => (props.align === 'top' ? '18px' : '0')};\n align-self: ${(props) => (props.align === 'top' ? 'flex-start' : 'center')};\n margin-left: ${(props) => props.theme.space.xs};\n`;\n\nexport const ExpandChevron = ({ isExpanded, onClick, align }) => {\n const Chevron = isExpanded ? ChevronDown : ChevronRight;\n return (\n <ChevronWrap data-testid=\"ds-card-expand-chevron\" align={align}>\n <Chevron size=\"s\" color={['brand-primary', 800]} onClick={onClick} />\n </ChevronWrap>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmBjB;AAbN,SAAS,aAAa,oBAAoB;AAC1C,SAAS,cAAc;AAEvB,MAAM,cAAc,OAAO;AAAA,gBACX,CAAC,UAAW,MAAM,UAAU,QAAQ,SAAS,GAAI;AAAA,gBACjD,CAAC,UAAW,MAAM,UAAU,QAAQ,eAAe,QAAS;AAAA,iBAC3D,CAAC,UAAU,MAAM,MAAM,MAAM,EAAE;AAAA;AAGzC,MAAM,gBAAgB,CAAC,EAAE,YAAY,SAAS,MAAM,MAAM;AAC/D,QAAM,UAAU,aAAa,cAAc;AAC3C,SACE,oBAAC,eAAY,eAAY,0BAAyB,OAChD,8BAAC,WAAQ,MAAK,KAAI,OAAO,CAAC,iBAAiB,GAAG,GAAG,SAAkB,GACrE;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { styled, border, truncate } from "@elliemae/ds-system";
|
|
3
|
+
import { border, styled, truncate } from "@elliemae/ds-system";
|
|
4
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
5
|
const RegionWrapper = styled.div`
|
|
7
6
|
width: 100%;
|
|
8
7
|
height: 100%;
|
|
@@ -42,10 +41,6 @@ const ExpandableRegion = ({ show, content }) => {
|
|
|
42
41
|
}
|
|
43
42
|
);
|
|
44
43
|
};
|
|
45
|
-
ExpandableRegion.propTypes = {
|
|
46
|
-
show: PropTypes.bool,
|
|
47
|
-
content: PropTypes.element
|
|
48
|
-
};
|
|
49
44
|
export {
|
|
50
45
|
ExpandableRegion
|
|
51
46
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileCard/ExpandableRegion.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { border, styled, truncate } from '@elliemae/ds-system';\nimport { useEffect, useRef, useState } from 'react';\n\nconst RegionWrapper = styled.div`\n width: 100%;\n height: 100%;\n`;\n\nconst Region = styled.div<{ hide: boolean; animate: boolean; refHeight: number }>`\n display: flex;\n ${(props) => (props.hide ? 'visibility: hidden;' : '')}\n transition: max-height ${(props) => (props.animate ? '0.25s' : '0.20s')} linear;\n max-height: 0;\n ${(props) =>\n props.animate\n ? `\n max-height: ${props.refHeight}px;\n `\n : ''}\n align-items: center;\n ${truncate()};\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n font-weight: ${(props) => props.theme.fontWeights.regular};\n`;\n\nexport const ExpandableRegion = ({ show, content }: { show: boolean; content: JSX.Element | JSX.Element[] }) => {\n const ref = useRef<HTMLDivElement>(null);\n // triggers transition\n const [animate, setAnimate] = useState(show);\n // needed to properly handle the transition. Hide after transition ends\n const [hide, setHide] = useState(!show);\n useEffect(() => {\n setAnimate(show);\n if (show) setHide(false);\n }, [show]);\n\n const hideOnAnimationEnd = () => {\n if (!show) setHide(true);\n };\n\n return (\n <Region\n hide={hide}\n // needed to handle transition, `auto` max-height isn't supported\n refHeight={ref?.current?.scrollHeight || 9999}\n onTransitionEnd={hideOnAnimationEnd}\n animate={animate}\n >\n <RegionWrapper innerRef={ref}>{content}</RegionWrapper>\n </Region>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACgDjB;AAhDN,SAAS,QAAQ,QAAQ,gBAAgB;AACzC,SAAS,WAAW,QAAQ,gBAAgB;AAE5C,MAAM,gBAAgB,OAAO;AAAA;AAAA;AAAA;AAK7B,MAAM,SAAS,OAAO;AAAA;AAAA,IAElB,CAAC,UAAW,MAAM,OAAO,wBAAwB,EAAG;AAAA,2BAC7B,CAAC,UAAW,MAAM,UAAU,UAAU,OAAQ;AAAA;AAAA,IAErE,CAAC,UACD,MAAM,UACF;AAAA,oBACY,MAAM,SAAS;AAAA,QAE3B,EAAE;AAAA;AAAA,IAEN,SAAS,CAAC;AAAA,gBACE,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC,CAAC;AAAA,iBACnD,CAAC,UAAU,MAAM,MAAM,YAAY,OAAO;AAAA;AAGpD,MAAM,mBAAmB,CAAC,EAAE,MAAM,QAAQ,MAA+D;AAC9G,QAAM,MAAM,OAAuB,IAAI;AAEvC,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,IAAI;AAE3C,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,CAAC,IAAI;AACtC,YAAU,MAAM;AACd,eAAW,IAAI;AACf,QAAI,KAAM,SAAQ,KAAK;AAAA,EACzB,GAAG,CAAC,IAAI,CAAC;AAET,QAAM,qBAAqB,MAAM;AAC/B,QAAI,CAAC,KAAM,SAAQ,IAAI;AAAA,EACzB;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MAEA,WAAW,KAAK,SAAS,gBAAgB;AAAA,MACzC,iBAAiB;AAAA,MACjB;AAAA,MAEA,8BAAC,iBAAc,UAAU,KAAM,mBAAQ;AAAA;AAAA,EACzC;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const cssRegex = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
|
|
3
|
+
function stripUnit(value) {
|
|
4
|
+
if (typeof value !== "string") return value;
|
|
5
|
+
const matchedValue = value.match(cssRegex);
|
|
6
|
+
return matchedValue ? parseFloat(value) : value;
|
|
7
|
+
}
|
|
8
|
+
const ERRORS = preval`
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const md = fs.readFileSync(__dirname + '/errors.md', 'utf8');
|
|
11
|
+
module.exports = md.split(/^#/gm).slice(1).reduce((errors, str) => {
|
|
12
|
+
const [, code, message] = str.split(/^.*?(\\d+)\\s*\\n/)
|
|
13
|
+
errors[code] = message
|
|
14
|
+
return errors;
|
|
15
|
+
}, {});
|
|
16
|
+
`;
|
|
17
|
+
function format(...args) {
|
|
18
|
+
let a = args[0];
|
|
19
|
+
const b = [];
|
|
20
|
+
let c;
|
|
21
|
+
for (c = 1; c < args.length; c += 1) {
|
|
22
|
+
b.push(args[c]);
|
|
23
|
+
}
|
|
24
|
+
b.forEach((d) => {
|
|
25
|
+
a = a.replace(/%[a-z]/, d);
|
|
26
|
+
});
|
|
27
|
+
return a;
|
|
28
|
+
}
|
|
29
|
+
class PolishedError extends Error {
|
|
30
|
+
constructor(code, ...args) {
|
|
31
|
+
if (false) {
|
|
32
|
+
super(
|
|
33
|
+
`An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#${code} for more information.`
|
|
34
|
+
);
|
|
35
|
+
} else {
|
|
36
|
+
super(format(ERRORS[code], ...args));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function endsWith(string, suffix) {
|
|
41
|
+
return string.substr(-suffix.length) === suffix;
|
|
42
|
+
}
|
|
43
|
+
const pxtoFactory = (to) => (pxval, base = "16px") => {
|
|
44
|
+
let newPxval = pxval;
|
|
45
|
+
let newBase = base;
|
|
46
|
+
if (typeof pxval === "string") {
|
|
47
|
+
if (!endsWith(pxval, "px")) {
|
|
48
|
+
throw new PolishedError(69, to, pxval);
|
|
49
|
+
}
|
|
50
|
+
newPxval = stripUnit(pxval);
|
|
51
|
+
}
|
|
52
|
+
if (typeof base === "string") {
|
|
53
|
+
if (!endsWith(base, "px")) {
|
|
54
|
+
throw new PolishedError(70, to, base);
|
|
55
|
+
}
|
|
56
|
+
newBase = stripUnit(base);
|
|
57
|
+
}
|
|
58
|
+
if (typeof newPxval === "string") {
|
|
59
|
+
throw new PolishedError(71, pxval, to);
|
|
60
|
+
}
|
|
61
|
+
if (typeof newBase === "string") {
|
|
62
|
+
throw new PolishedError(72, base, to);
|
|
63
|
+
}
|
|
64
|
+
return `${newPxval / newBase}${to}`;
|
|
65
|
+
};
|
|
66
|
+
const rem = pxtoFactory("rem");
|
|
67
|
+
export {
|
|
68
|
+
rem
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=polishedUtil.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileCard/polishedUtil.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable no-var */\n\ndeclare var preval: Function;\nconst cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n\n// copying from polished github repostiory at https://github.com/styled-components/polished/blob/main/src/helpers/stripUnit.js\n/**\n * Returns a given CSS value minus its unit of measure.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': stripUnit('100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${stripUnit('100px')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100\n * }\n */\nfunction stripUnit(value: string | number): string | number {\n if (typeof value !== 'string') return value;\n const matchedValue = value.match(cssRegex);\n return matchedValue ? parseFloat(value) : value;\n}\n\n// copying from polished github repostiory at https://github.com/styled-components/polished/blob/main/src/internalHelpers/_errors.js\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n * @private\n */\nconst ERRORS = preval`\n const fs = require('fs');\n const md = fs.readFileSync(__dirname + '/errors.md', 'utf8');\n module.exports = md.split(/^#/gm).slice(1).reduce((errors, str) => {\n const [, code, message] = str.split(/^.*?(\\\\d+)\\\\s*\\\\n/)\n errors[code] = message\n return errors;\n }, {});\n`;\n\n/**\n * super basic version of sprintf\n * @private\n */\n// @ts-expect-error - coping polished which is not typed\nfunction format(...args) {\n let a = args[0];\n const b = [];\n let c;\n\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach((d) => {\n a = a.replace(/%[a-z]/, d);\n });\n\n return a;\n}\n\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n * @private\n */\nclass PolishedError extends Error {\n constructor(code: string | number, ...args: Array<unknown>) {\n if (process.env.NODE_ENV === 'production') {\n super(\n `An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#${code} for more information.`,\n );\n } else {\n super(format(ERRORS[code], ...args));\n }\n }\n}\n\n// copied from polished github repostiory at https://github.com/styled-components/polished/blob/main/src/internalHelpers/_endsWith.js\n/**\n * Check if a string ends with something\n * @private\n */\nfunction endsWith(string: string, suffix: string): boolean {\n return string.substr(-suffix.length) === suffix;\n}\n\n// copied from polished github repostiory at https://github.com/styled-components/polished/blob/main/src/internalHelpers/_pxto.js\n/**\n * Factory function that creates pixel-to-x converters\n * @private\n */\nconst pxtoFactory =\n (to: string) =>\n (pxval: string | number, base: string | number = '16px'): string => {\n let newPxval = pxval;\n let newBase = base;\n if (typeof pxval === 'string') {\n if (!endsWith(pxval, 'px')) {\n throw new PolishedError(69, to, pxval);\n }\n newPxval = stripUnit(pxval);\n }\n\n if (typeof base === 'string') {\n if (!endsWith(base, 'px')) {\n throw new PolishedError(70, to, base);\n }\n newBase = stripUnit(base);\n }\n\n if (typeof newPxval === 'string') {\n throw new PolishedError(71, pxval, to);\n }\n\n if (typeof newBase === 'string') {\n throw new PolishedError(72, base, to);\n }\n\n return `${newPxval / newBase}${to}`;\n };\n\n// copied from polished github repostiory at https://github.com/styled-components/polished/blob/main/src/helpers/rem.js\n/**\n * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': rem('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${rem('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1rem'\n * }\n */\nexport const rem: (value: string | number, base?: string | number) => string = pxtoFactory('rem');\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACSvB,MAAM,WAAW;AAuBjB,SAAS,UAAU,OAAyC;AAC1D,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,QAAM,eAAe,MAAM,MAAM,QAAQ;AACzC,SAAO,eAAe,WAAW,KAAK,IAAI;AAC5C;AAOA,MAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAef,SAAS,UAAU,MAAM;AACvB,MAAI,IAAI,KAAK,CAAC;AACd,QAAM,IAAI,CAAC;AACX,MAAI;AAEJ,OAAK,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK,GAAG;AACnC,MAAE,KAAK,KAAK,CAAC,CAAC;AAAA,EAChB;AAEA,IAAE,QAAQ,CAAC,MAAM;AACf,QAAI,EAAE,QAAQ,UAAU,CAAC;AAAA,EAC3B,CAAC;AAED,SAAO;AACT;AAOA,MAAM,sBAAsB,MAAM;AAAA,EAChC,YAAY,SAA0B,MAAsB;AAC1D,QAAI,OAAuC;AACzC;AAAA,QACE,gHAAgH,IAAI;AAAA,MACtH;AAAA,IACF,OAAO;AACL,YAAM,OAAO,OAAO,IAAI,GAAG,GAAG,IAAI,CAAC;AAAA,IACrC;AAAA,EACF;AACF;AAOA,SAAS,SAAS,QAAgB,QAAyB;AACzD,SAAO,OAAO,OAAO,CAAC,OAAO,MAAM,MAAM;AAC3C;AAOA,MAAM,cACJ,CAAC,OACD,CAAC,OAAwB,OAAwB,WAAmB;AAClE,MAAI,WAAW;AACf,MAAI,UAAU;AACd,MAAI,OAAO,UAAU,UAAU;AAC7B,QAAI,CAAC,SAAS,OAAO,IAAI,GAAG;AAC1B,YAAM,IAAI,cAAc,IAAI,IAAI,KAAK;AAAA,IACvC;AACA,eAAW,UAAU,KAAK;AAAA,EAC5B;AAEA,MAAI,OAAO,SAAS,UAAU;AAC5B,QAAI,CAAC,SAAS,MAAM,IAAI,GAAG;AACzB,YAAM,IAAI,cAAc,IAAI,IAAI,IAAI;AAAA,IACtC;AACA,cAAU,UAAU,IAAI;AAAA,EAC1B;AAEA,MAAI,OAAO,aAAa,UAAU;AAChC,UAAM,IAAI,cAAc,IAAI,OAAO,EAAE;AAAA,EACvC;AAEA,MAAI,OAAO,YAAY,UAAU;AAC/B,UAAM,IAAI,cAAc,IAAI,MAAM,EAAE;AAAA,EACtC;AAEA,SAAO,GAAG,WAAW,OAAO,GAAG,EAAE;AACnC;AA0BK,MAAM,MAAkE,YAAY,KAAK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileCard/useHeight.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\nimport { useEffect, useState } from 'react';\nimport { rem } from './polishedUtil.js';\n\nfunction getCurrentFont() {\n const root = document.querySelector(':root');\n if (!root) return 13;\n const fontSize = window.getComputedStyle(root).getPropertyValue('font-size');\n if (!fontSize) return 13;\n // @ts-expect-error - file used to be like this, mobile is deprecated, just leaving as is\n return Number(fontSize.match(/\\d+/)[0]);\n}\n\n// @ts-expect-error - file used to be like this, mobile is deprecated, just leaving as is\nexport function useHeight(ref) {\n const [height, setHeight] = useState('0rem');\n const [currentFont, setCurrentFont] = useState(13);\n useEffect(() => {\n setCurrentFont(getCurrentFont());\n }, []);\n\n useEffect(() => {\n if (ref.current && height !== rem(ref.current.clientHeight, currentFont)) {\n setHeight(rem(ref.current.clientHeight, currentFont));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [ref.current, currentFont]);\n\n return height;\n}\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,gBAAgB;AACpC,SAAS,WAAW;AAEpB,SAAS,iBAAiB;AACxB,QAAM,OAAO,SAAS,cAAc,OAAO;AAC3C,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,WAAW,OAAO,iBAAiB,IAAI,EAAE,iBAAiB,WAAW;AAC3E,MAAI,CAAC,SAAU,QAAO;AAEtB,SAAO,OAAO,SAAS,MAAM,KAAK,EAAE,CAAC,CAAC;AACxC;AAGO,SAAS,UAAU,KAAK;AAC7B,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,MAAM;AAC3C,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,EAAE;AACjD,YAAU,MAAM;AACd,mBAAe,eAAe,CAAC;AAAA,EACjC,GAAG,CAAC,CAAC;AAEL,YAAU,MAAM;AACd,QAAI,IAAI,WAAW,WAAW,IAAI,IAAI,QAAQ,cAAc,WAAW,GAAG;AACxE,gBAAU,IAAI,IAAI,QAAQ,cAAc,WAAW,CAAC;AAAA,IACtD;AAAA,EAEF,GAAG,CAAC,IAAI,SAAS,WAAW,CAAC;AAE7B,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { styled, focus } from "@elliemae/ds-system";
|
|
4
|
-
import PropTypes from "prop-types";
|
|
5
3
|
import { ChevronDown } from "@elliemae/ds-icons";
|
|
4
|
+
import { focus, styled } from "@elliemae/ds-system";
|
|
6
5
|
const MobileDropdownInput = styled.input`
|
|
7
6
|
-webkit-appearance: none;
|
|
8
7
|
-moz-appearance: none;
|
|
@@ -39,9 +38,6 @@ const CaretWrap = styled.span`
|
|
|
39
38
|
align-items: center;
|
|
40
39
|
`;
|
|
41
40
|
const Caret = ({ onClick }) => /* @__PURE__ */ jsx(CaretWrap, { onClick, children: /* @__PURE__ */ jsx(ChevronDown, { color: ["brand-primary", "600"] }) });
|
|
42
|
-
Caret.propTypes = {
|
|
43
|
-
onClick: PropTypes.func.isRequired
|
|
44
|
-
};
|
|
45
41
|
const DSMobileDropdownTriggerInput = ({
|
|
46
42
|
inputProps,
|
|
47
43
|
caretProps,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileDropdownMenu/MobileDropdownInput.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n/* tslint:disable */\n// @ts-nocheck\n// What's with all the above disables?\n// this is what a legacy 7 year old codebase looks like.\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { focus, styled } from '@elliemae/ds-system';\n\nexport const MobileDropdownInput = styled.input`\n -webkit-appearance: none;\n -moz-appearance: none;\n -webkit-tap-highlight-color: transparent;\n caret-color: transparent;\n padding-right: 32px;\n padding-left: 10px;\n border-radius: 2px;\n width: 100%;\n background: ${(props) => props.theme.colors.neutral['000']};\n height: 32px;\n line-height: 32px;\n border: solid 1px ${(props) => props.theme.colors.neutral[200]};\n\n &:active,\n &:focus {\n ${(props) => focus(props.theme.colors.brand[700])}\n }\n`;\n\nexport const MobileDropdownInputWrap = styled.span`\n position: relative;\n width: 100%;\n display: inline-block;\n height: 32px;\n`;\n\nconst CaretWrap = styled.span`\n width: 32px;\n height: 32px;\n position: absolute;\n right: 0;\n top: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nexport const Caret = ({ onClick }): JSX.Element => (\n <CaretWrap onClick={onClick}>\n <ChevronDown color={['brand-primary', '600']} />\n </CaretWrap>\n);\n\nexport const DSMobileDropdownTriggerInput = ({\n inputProps,\n caretProps,\n selectedItemsText,\n}: {\n inputProps: Record<string, unknown>;\n caretProps: Record<string, unknown>;\n selectedItemsText?: string;\n}): JSX.Element => (\n <MobileDropdownInputWrap data-testid=\"ds-mobile-ddwn-menu\">\n <MobileDropdownInput {...inputProps} readOnly value={selectedItemsText ?? inputProps.value} />\n\n <Caret {...caretProps} />\n </MobileDropdownInputWrap>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiDnB,cAaF,YAbE;AA3CJ,SAAS,mBAAmB;AAC5B,SAAS,OAAO,cAAc;AAEvB,MAAM,sBAAsB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAS1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA,sBAGtC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,MAI1D,CAAC,UAAU,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC,CAAC;AAAA;AAAA;AAI9C,MAAM,0BAA0B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAO9C,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWlB,MAAM,QAAQ,CAAC,EAAE,QAAQ,MAC9B,oBAAC,aAAU,SACT,8BAAC,eAAY,OAAO,CAAC,iBAAiB,KAAK,GAAG,GAChD;AAGK,MAAM,+BAA+B,CAAC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AACF,MAKE,qBAAC,2BAAwB,eAAY,uBACnC;AAAA,sBAAC,uBAAqB,GAAG,YAAY,UAAQ,MAAC,OAAO,qBAAqB,WAAW,OAAO;AAAA,EAE5F,oBAAC,SAAO,GAAG,YAAY;AAAA,GACzB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React2, { useState, useEffect } from "react";
|
|
4
|
-
import { noop } from "lodash-es";
|
|
5
|
-
import PropTypes from "prop-types";
|
|
6
|
-
import { Grid } from "@elliemae/ds-grid";
|
|
7
3
|
import { DSTextBox } from "@elliemae/ds-form";
|
|
8
|
-
import {
|
|
4
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
5
|
+
import { __UNSAFE_SPACE_TO_DIMSUM, op, withTheme } from "@elliemae/ds-system";
|
|
6
|
+
import { noop } from "lodash-es";
|
|
7
|
+
import React2, { useEffect, useState } from "react";
|
|
9
8
|
import { DSMobileTouchable } from "../MobileTouchable/index.js";
|
|
10
|
-
import {
|
|
9
|
+
import { Footer, HeaderContainer, ListContainer, StyledContainer, checkbox, checked, selectedMark } from "./styled.js";
|
|
11
10
|
const MobileSelectList = ({
|
|
12
11
|
open = false,
|
|
13
12
|
header = null,
|
|
@@ -110,33 +109,6 @@ const MobileSelectList = ({
|
|
|
110
109
|
] });
|
|
111
110
|
};
|
|
112
111
|
const DSMobileSelectList = withTheme(MobileSelectList);
|
|
113
|
-
MobileSelectList.propTypes = {
|
|
114
|
-
/** show select list */
|
|
115
|
-
open: PropTypes.bool,
|
|
116
|
-
/** DSMobilePageHeader instance */
|
|
117
|
-
header: PropTypes.element,
|
|
118
|
-
/** called when a DSMobileListItem is touched */
|
|
119
|
-
onChange: PropTypes.func,
|
|
120
|
-
/** allow multiple selection */
|
|
121
|
-
multiple: PropTypes.bool,
|
|
122
|
-
/** Array of DSMobileListItem instances */
|
|
123
|
-
children: PropTypes.arrayOf(PropTypes.element),
|
|
124
|
-
/** data test id for testing purposes */
|
|
125
|
-
dataTestid: PropTypes.string,
|
|
126
|
-
/** footer action, DSButton instance */
|
|
127
|
-
buttonFooter: PropTypes.element,
|
|
128
|
-
/** footer action, DSButton instance */
|
|
129
|
-
ButtonFooter: PropTypes.func,
|
|
130
|
-
/** called when footer action is triggered */
|
|
131
|
-
onApply: PropTypes.func,
|
|
132
|
-
/** zIndex */
|
|
133
|
-
zIndex: PropTypes.number,
|
|
134
|
-
/** init selecteds */
|
|
135
|
-
selecteds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
136
|
-
theme: PropTypes.object.isRequired,
|
|
137
|
-
useSearch: PropTypes.bool,
|
|
138
|
-
onSearch: PropTypes.func
|
|
139
|
-
};
|
|
140
112
|
export {
|
|
141
113
|
DSMobileSelectList
|
|
142
114
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileSelectList/MobileSelectList.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint react/jsx-no-bind:0 react/no-this-in-sfc:0 */\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable func-names */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint react/jsx-no-bind:0 react/no-this-in-sfc:0 */\n/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n/* tslint:disable */\n// @ts-nocheck\n// What's with all the above disables?\n// this is what a legacy 7 year old codebase looks like.\n\nimport { DSTextBox } from '@elliemae/ds-form';\nimport { Grid } from '@elliemae/ds-grid';\nimport { __UNSAFE_SPACE_TO_DIMSUM, op, withTheme } from '@elliemae/ds-system';\nimport { noop } from 'lodash-es';\nimport React, { useEffect, useState } from 'react';\nimport { DSMobileTouchable } from '../MobileTouchable/index.js';\nimport { Footer, HeaderContainer, ListContainer, StyledContainer, checkbox, checked, selectedMark } from './styled.js';\n\nconst MobileSelectList = ({\n open = false,\n header = null,\n multiple = false,\n onChange = noop,\n children,\n theme,\n zIndex = 1,\n useSearch,\n onSearch = noop,\n dataTestid = 'mobile-select-list',\n buttonFooter = null,\n ButtonFooter,\n onApply = noop,\n selecteds: initSelecteds = [],\n}) => {\n const rows = ['auto', 1];\n const [selecteds, setSelected] = useState(initSelecteds);\n const [filter, setFilter] = useState('');\n useEffect(() => {\n setSelected(initSelecteds);\n }, [initSelecteds]);\n\n const handleSelection = (value) => {\n if (multiple) {\n const index = selecteds.findIndex((s) => s === value);\n if (index > -1) setSelected(selecteds.filter((s) => s !== value));\n else setSelected([...selecteds, value]);\n } else setSelected([value]);\n };\n const handleChange = function (event) {\n onChange(event, this);\n handleSelection(this.value);\n };\n const handleOnSearch = (e) => {\n setFilter(e.target.value);\n onSearch(e);\n };\n\n const handleApply = function (e) {\n if (this.onClick) this.onClick(e);\n onApply(e, selecteds);\n };\n if (buttonFooter || ButtonFooter) rows.push(op('*', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xl), 1.16666));\n if (!open) return null;\n return (\n <StyledContainer data-testid={dataTestid} rows={rows} zIndex={zIndex}>\n <HeaderContainer>\n {header}\n {useSearch && (\n <Grid\n alignItems=\"center\"\n height={__UNSAFE_SPACE_TO_DIMSUM(theme.space.xl)}\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n >\n <DSTextBox onChange={handleOnSearch} placeholder=\"Filter by name\" value={filter} />\n </Grid>\n )}\n </HeaderContainer>\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <ListContainer data-testid={`${dataTestid}--list-container`}>\n {React.Children.map(children, (child) => {\n let leftAddon = null;\n let rightAddon = null;\n const { value, title } = child.props;\n const found = selecteds.findIndex((s) => String(s) === String(value));\n if (\n filter &&\n !String(value).toLocaleLowerCase().includes(filter.toLocaleLowerCase()) &&\n !String(title).toLocaleLowerCase().includes(filter.toLocaleLowerCase())\n )\n return null;\n if (multiple) {\n if (found > -1) leftAddon = checked;\n else leftAddon = checkbox;\n } else if (found > -1) {\n rightAddon = selectedMark;\n }\n return (\n <DSMobileTouchable onClick={handleChange.bind(child.props)}>\n {React.cloneElement(child, { leftAddon, rightAddon })}\n </DSMobileTouchable>\n );\n })}\n </ListContainer>\n </Grid>\n </Grid>\n {ButtonFooter || Boolean(buttonFooter) ? (\n <Footer\n alignItems=\"center\"\n // eslint-disable-next-line max-lines\n pl={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n >\n {!ButtonFooter ? (\n React.cloneElement(buttonFooter, {\n ...buttonFooter.props,\n containerProps: {\n 'data-testid': `${dataTestid}--btn`,\n },\n buttonType: 'primary',\n size: 'l',\n onClick: handleApply.bind(buttonFooter.props),\n })\n ) : (\n <ButtonFooter\n containerProps={{\n 'data-testid': `${dataTestid}--btn`,\n }}\n buttonType=\"primary\"\n size=\"l\"\n onClick={handleApply}\n />\n )}\n </Footer>\n ) : null}\n </StyledContainer>\n );\n};\n\nconst DSMobileSelectList = withTheme(MobileSelectList);\n\nexport { DSMobileSelectList };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useCallback } from "react";
|
|
4
|
-
import { noop } from "lodash-es";
|
|
5
|
-
import PropTypes from "prop-types";
|
|
6
|
-
import { styled, withTheme } from "@elliemae/ds-system";
|
|
7
3
|
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
import { styled, withTheme } from "@elliemae/ds-system";
|
|
5
|
+
import { noop } from "lodash-es";
|
|
6
|
+
import { useCallback, useState } from "react";
|
|
8
7
|
const StyledContainer = styled(Grid)`
|
|
9
8
|
cursor: pointer;
|
|
10
9
|
background: ${(props) => props.touching ? props.theme.colors.brand["100"] : props.theme.colors.neutral["000"]};
|
|
@@ -31,9 +30,8 @@ const MobileTouchable = ({
|
|
|
31
30
|
...gridProps
|
|
32
31
|
}) => {
|
|
33
32
|
const [touching, setTouching] = useState(false);
|
|
34
|
-
const handleStart = useCallback(() => setTouching(true));
|
|
35
|
-
const handleEnd = useCallback(() => setTouching(false));
|
|
36
|
-
console.log("AAA", innerRef);
|
|
33
|
+
const handleStart = useCallback(() => setTouching(true), []);
|
|
34
|
+
const handleEnd = useCallback(() => setTouching(false), []);
|
|
37
35
|
return /* @__PURE__ */ jsx(
|
|
38
36
|
StyledContainer,
|
|
39
37
|
{
|
|
@@ -49,14 +47,6 @@ const MobileTouchable = ({
|
|
|
49
47
|
}
|
|
50
48
|
);
|
|
51
49
|
};
|
|
52
|
-
MobileTouchable.propTypes = {
|
|
53
|
-
onClick: PropTypes.func,
|
|
54
|
-
children: PropTypes.any,
|
|
55
|
-
render: PropTypes.func,
|
|
56
|
-
theme: PropTypes.any,
|
|
57
|
-
dataTestid: PropTypes.string,
|
|
58
|
-
innerRef: PropTypes.any
|
|
59
|
-
};
|
|
60
50
|
const DSMobileTouchable = withTheme(MobileTouchable);
|
|
61
51
|
export {
|
|
62
52
|
DSMobileTouchable
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileTouchable/MobileTouchable.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */\n/* tslint:disable */\n// @ts-nocheck\n// What's with all the above disables?\n// this is what a legacy 7 year old codebase looks like.\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled, withTheme } from '@elliemae/ds-system';\nimport { noop } from 'lodash-es';\nimport { useCallback, useState } from 'react';\n\nconst StyledContainer = styled(Grid)`\n cursor: pointer;\n background: ${(props) => (props.touching ? props.theme.colors.brand['100'] : props.theme.colors.neutral['000'])};\n &:focus {\n position: relative;\n &:after {\n position: absolute;\n content: '';\n border: 2px solid brand-700;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n }\n`;\n\nconst MobileTouchable = ({\n children,\n onClick = noop,\n theme,\n dataTestid = 'mobile-touchable',\n render,\n innerRef,\n ...gridProps\n}) => {\n const [touching, setTouching] = useState(false);\n const handleStart = useCallback(() => setTouching(true), []);\n const handleEnd = useCallback(() => setTouching(false), []);\n return (\n <StyledContainer\n {...gridProps}\n touching={touching}\n onClick={onClick}\n onTouchStart={handleStart}\n onTouchEnd={handleEnd}\n data-testid={dataTestid}\n innerRef={innerRef}\n tabIndex={0}\n >\n {children || render(gridProps)}\n </StyledContainer>\n );\n};\n\nconst DSMobileTouchable = withTheme(MobileTouchable);\n\nexport { DSMobileTouchable };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC0CnB;AAnCJ,SAAS,YAAY;AACrB,SAAS,QAAQ,iBAAiB;AAClC,SAAS,YAAY;AACrB,SAAS,aAAa,gBAAgB;AAEtC,MAAM,kBAAkB,OAAO,IAAI;AAAA;AAAA,gBAEnB,CAAC,UAAW,MAAM,WAAW,MAAM,MAAM,OAAO,MAAM,KAAK,IAAI,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAejH,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,cAAc,YAAY,MAAM,YAAY,IAAI,GAAG,CAAC,CAAC;AAC3D,QAAM,YAAY,YAAY,MAAM,YAAY,KAAK,GAAG,CAAC,CAAC;AAC1D,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,eAAa;AAAA,MACb;AAAA,MACA,UAAU;AAAA,MAET,sBAAY,OAAO,SAAS;AAAA;AAAA,EAC/B;AAEJ;AAEA,MAAM,oBAAoB,UAAU,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { styled, op, useTheme, __UNSAFE_SPACE_TO_DIMSUM } from "@elliemae/ds-system";
|
|
5
3
|
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
import { __UNSAFE_SPACE_TO_DIMSUM, op, styled, useTheme } from "@elliemae/ds-system";
|
|
6
5
|
import { DSFullPageContainer } from "../FullPageContainer/index.js";
|
|
7
6
|
const Header = styled(Grid)`
|
|
8
7
|
border-bottom: 1px solid ${(props) => props.theme.colors.neutral["300"]};
|
|
@@ -72,32 +71,6 @@ const PageFilter = ({
|
|
|
72
71
|
footerButton && /* @__PURE__ */ jsx(Footer, { children: footerButton })
|
|
73
72
|
] });
|
|
74
73
|
};
|
|
75
|
-
PageFilter.propTypes = {
|
|
76
|
-
/**
|
|
77
|
-
* Text to render in header title
|
|
78
|
-
*/
|
|
79
|
-
pageTitle: PropTypes.string,
|
|
80
|
-
/**
|
|
81
|
-
* Pass an element to render left. For example a Button with an icon
|
|
82
|
-
*/
|
|
83
|
-
leftProp: PropTypes.element,
|
|
84
|
-
/**
|
|
85
|
-
* Pass an element to render right. For example a Button with an icon
|
|
86
|
-
*/
|
|
87
|
-
rightProp: PropTypes.element,
|
|
88
|
-
/**
|
|
89
|
-
* Pass an element to render in the body section
|
|
90
|
-
*/
|
|
91
|
-
children: PropTypes.element,
|
|
92
|
-
/**
|
|
93
|
-
* Pass a button to render in the footer
|
|
94
|
-
*/
|
|
95
|
-
footerButton: PropTypes.element,
|
|
96
|
-
/**
|
|
97
|
-
* BreadCrumb text
|
|
98
|
-
*/
|
|
99
|
-
breadCrumb: PropTypes.string
|
|
100
|
-
};
|
|
101
74
|
const DSPageFilter = PageFilter;
|
|
102
75
|
export {
|
|
103
76
|
DSPageFilter
|