@elliemae/ds-mobile 3.60.0-next.9 → 3.61.0-rc.2
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/GlobalHeader/MobileGlobalHeader.js +4 -4
- package/dist/cjs/GlobalHeader/MobileGlobalHeader.js.map +2 -2
- package/dist/cjs/MobileActionToolbar/MobileActionToolbarItem.js +2 -2
- package/dist/cjs/MobileActionToolbar/MobileActionToolbarItem.js.map +2 -2
- package/dist/cjs/MobileCard/ActionAddon.js +2 -2
- package/dist/cjs/MobileCard/ActionAddon.js.map +2 -2
- package/dist/cjs/MobileContextMenu/MobileContextMenuItem.js +2 -2
- package/dist/cjs/MobileContextMenu/MobileContextMenuItem.js.map +2 -2
- package/dist/cjs/MobileDatePicker/Input.js +3 -1
- package/dist/cjs/MobileDatePicker/Input.js.map +2 -2
- package/dist/cjs/MobileDatePicker/MobileDatePicker.js +4 -4
- package/dist/cjs/MobileDatePicker/MobileDatePicker.js.map +2 -2
- package/dist/cjs/MobileDropdownMenu/MobileDropdownInput.js +3 -1
- package/dist/cjs/MobileDropdownMenu/MobileDropdownInput.js.map +2 -2
- package/dist/cjs/MobileFooter/Footer.js +2 -2
- package/dist/cjs/MobileFooter/Footer.js.map +2 -2
- package/dist/cjs/MobilePageHeader/MobilePageHeader.js +2 -2
- package/dist/cjs/MobilePageHeader/MobilePageHeader.js.map +2 -2
- package/dist/cjs/MobileSelectList/MobileSelectList.js +2 -2
- package/dist/cjs/MobileSelectList/MobileSelectList.js.map +2 -2
- package/dist/cjs/MobileSelectList/styled.js +3 -3
- package/dist/cjs/MobileSelectList/styled.js.map +2 -2
- package/dist/cjs/MobileTimePicker/Input.js +3 -1
- package/dist/cjs/MobileTimePicker/Input.js.map +2 -2
- package/dist/cjs/MobileTimePicker/MobileTimePicker.js +4 -4
- package/dist/cjs/MobileTimePicker/MobileTimePicker.js.map +2 -2
- package/dist/cjs/Modal/Modal.js +3 -3
- package/dist/cjs/Modal/Modal.js.map +2 -2
- package/dist/cjs/package.json +1 -4
- package/dist/esm/GlobalHeader/MobileGlobalHeader.js +2 -2
- package/dist/esm/GlobalHeader/MobileGlobalHeader.js.map +1 -1
- package/dist/esm/MobileActionToolbar/MobileActionToolbarItem.js +1 -1
- package/dist/esm/MobileActionToolbar/MobileActionToolbarItem.js.map +1 -1
- package/dist/esm/MobileCard/ActionAddon.js +1 -1
- package/dist/esm/MobileCard/ActionAddon.js.map +1 -1
- package/dist/esm/MobileContextMenu/MobileContextMenuItem.js +1 -1
- package/dist/esm/MobileContextMenu/MobileContextMenuItem.js.map +1 -1
- package/dist/esm/MobileDatePicker/Input.js +4 -2
- package/dist/esm/MobileDatePicker/Input.js.map +2 -2
- package/dist/esm/MobileDatePicker/MobileDatePicker.js +2 -2
- package/dist/esm/MobileDatePicker/MobileDatePicker.js.map +1 -1
- package/dist/esm/MobileDropdownMenu/MobileDropdownInput.js +4 -2
- package/dist/esm/MobileDropdownMenu/MobileDropdownInput.js.map +2 -2
- package/dist/esm/MobileFooter/Footer.js +1 -1
- package/dist/esm/MobileFooter/Footer.js.map +1 -1
- package/dist/esm/MobilePageHeader/MobilePageHeader.js +1 -1
- package/dist/esm/MobilePageHeader/MobilePageHeader.js.map +1 -1
- package/dist/esm/MobileSelectList/MobileSelectList.js +1 -1
- package/dist/esm/MobileSelectList/MobileSelectList.js.map +1 -1
- package/dist/esm/MobileSelectList/styled.js +1 -1
- package/dist/esm/MobileSelectList/styled.js.map +1 -1
- package/dist/esm/MobileTimePicker/Input.js +4 -2
- package/dist/esm/MobileTimePicker/Input.js.map +2 -2
- package/dist/esm/MobileTimePicker/MobileTimePicker.js +2 -2
- package/dist/esm/MobileTimePicker/MobileTimePicker.js.map +1 -1
- package/dist/esm/Modal/Modal.js +1 -1
- package/dist/esm/Modal/Modal.js.map +1 -1
- package/dist/esm/package.json +1 -4
- package/package.json +41 -44
|
@@ -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-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"],
|
|
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-legacy-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
5
|
"mappings": "AAAA,YAAY,WAAW;ACmEjB,SASM,KATN;AAvDN,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,0BAA0B,IAAI,iBAAiB;AACxD,SAAS,YAAY;AACrB,OAAOA,UAAS,WAAW,gBAAgB;AAC3C,SAAS,yBAAyB;AAClC,SAAS,QAAQ,iBAAiB,eAAe,iBAAiB,UAAU,SAAS,oBAAoB;AAEzG,MAAM,mBAAmB,CAAC;AAAA,EACxB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,WAAW;AAAA,EACX,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,WAAW;AAAA,EACX,aAAa;AAAA,EACb,eAAe;AAAA,EACf;AAAA,EACA,UAAU;AAAA,EACV,WAAW,gBAAgB,CAAC;AAC9B,MAAM;AACJ,QAAM,OAAO,CAAC,QAAQ,CAAC;AACvB,QAAM,CAAC,WAAW,WAAW,IAAI,SAAS,aAAa;AACvD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,EAAE;AACvC,YAAU,MAAM;AACd,gBAAY,aAAa;AAAA,EAC3B,GAAG,CAAC,aAAa,CAAC;AAElB,QAAM,kBAAkB,CAA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|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { noop } from "lodash-es";
|
|
4
4
|
import { styled, border } from "@elliemae/ds-system";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
|
-
import { DSCheckbox } from "@elliemae/ds-form";
|
|
6
|
+
import { DSCheckbox } from "@elliemae/ds-legacy-form";
|
|
7
7
|
import { Checkmark } from "@elliemae/ds-icons";
|
|
8
8
|
import { DSMobileTouchable } from "../MobileTouchable/index.js";
|
|
9
9
|
import { DSMobileListItem } from "../MobileListItem/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileSelectList/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { noop } from 'lodash-es';\nimport { styled, border } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { DSMobileTouchable } from '../MobileTouchable/index.js';\nimport { DSMobileListItem } from '../MobileListItem/index.js';\n\nexport const StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n position: fixed;\n width: 100%;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled(Grid)`\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const Footer = styled(Grid)`\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const ListContainer = styled.div`\n & ${DSMobileTouchable}:last-child ${DSMobileListItem} {\n border: none;\n }\n`;\n\nexport const checkbox = <DSCheckbox checked={false} onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const checked = <DSCheckbox checked onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const selectedMark = <Checkmark color={['brand-primary', 600]} />;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { noop } from 'lodash-es';\nimport { styled, border } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCheckbox } from '@elliemae/ds-legacy-form';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { DSMobileTouchable } from '../MobileTouchable/index.js';\nimport { DSMobileListItem } from '../MobileListItem/index.js';\n\nexport const StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n position: fixed;\n width: 100%;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled(Grid)`\n border-bottom: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const Footer = styled(Grid)`\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n`;\n\nexport const ListContainer = styled.div`\n & ${DSMobileTouchable}:last-child ${DSMobileListItem} {\n border: none;\n }\n`;\n\nexport const checkbox = <DSCheckbox checked={false} onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const checked = <DSCheckbox checked onChange={noop} style={{ pointerEvents: 'none' }} />;\nexport const selectedMark = <Checkmark color={['brand-primary', 600]} />;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACkCC;AAjCxB,SAAS,YAAY;AACrB,SAAS,QAAQ,cAAc;AAC/B,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;AAE1B,MAAM,kBAAkB,OAAO,IAAI;AAAA,gBAC1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,aAC/C,CAAC,UAAU,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS7B,MAAM,kBAAkB,OAAO,IAAI;AAAA,mBACvB,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC,CAAC;AAAA;AAGhE,MAAM,SAAS,OAAO,IAAI;AAAA,gBACjB,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC,CAAC;AAAA;AAG7D,MAAM,gBAAgB,OAAO;AAAA,MAC9B,iBAAiB,eAAe,gBAAgB;AAAA;AAAA;AAAA;AAK/C,MAAM,WAAW,oBAAC,cAAW,SAAS,OAAO,UAAU,MAAM,OAAO,EAAE,eAAe,OAAO,GAAG;AAC/F,MAAM,UAAU,oBAAC,cAAW,SAAO,MAAC,UAAU,MAAM,OAAO,EAAE,eAAe,OAAO,GAAG;AACtF,MAAM,eAAe,oBAAC,aAAU,OAAO,CAAC,iBAAiB,GAAG,GAAG;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { __UNSAFE_SPACE_TO_DIMSUM, styled } from "@elliemae/ds-system";
|
|
4
4
|
const StyledInput = styled.input`
|
|
5
5
|
input[type='time']& {
|
|
6
6
|
-webkit-appearance: none;
|
|
@@ -26,7 +26,9 @@ const StyledInput = styled.input`
|
|
|
26
26
|
|
|
27
27
|
input[type='time']&:active,
|
|
28
28
|
input[type='time']&:focus {
|
|
29
|
-
|
|
29
|
+
outline: none;
|
|
30
|
+
border: 1px solid ${({ theme }) => theme.colors.brand[700]};
|
|
31
|
+
border-radius: 2px;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
&:before {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileTimePicker/Input.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { __UNSAFE_SPACE_TO_DIMSUM, styled } from '@elliemae/ds-system';\n\nconst StyledInput = styled.input`\n input[type='time']& {\n -webkit-appearance: none;\n -moz-appearance: none;\n -webkit-tap-highlight-color: transparent;\n appearance: none;\n color: transparent;\n\n white-space: nowrap;\n position: relative;\n height: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.l)};\n width: 100%;\n max-width: calc(100% - 32px);\n outline: none;\n box-sizing: border-box;\n display: flex;\n background: ${(props) => props.theme.colors.neutral['000']};\n padding: 0 ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n z-index: 1;\n border-radius: 2px;\n border: solid 1px ${(props) => props.theme.colors.neutral[200]};\n }\n\n input[type='time']&:active,\n input[type='time']&:focus {\n outline: none;\n border: 1px solid ${({ theme }) => theme.colors.brand[700]};\n border-radius: 2px;\n }\n\n &:before {\n color: ${(props) => (props.value === '' ? props.theme.colors.neutral['500'] : props.theme.colors.neutral['800'])};\n content: '${(props) => (props.value === '' ? props.placeholder : props['data-displayvalue'])}';\n }\n\n input[type='time']&::-webkit-datetime-edit,\n input[type='time']&::-webkit-inner-spin-button,\n input[type='time']&::-webkit-clear-button {\n -webkit-appearance: none;\n display: none;\n }\n`;\n\nexport const Input = ({ innerRef, ...props }) => <StyledInput innerRef={innerRef} {...props} />;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC8C0B;AA7CjD,SAAS,0BAA0B,cAAc;AAEjD,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAUb,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAMpD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,iBAC7C,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,EAAE,CAAC;AAAA;AAAA;AAAA,wBAGlD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAM1C,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,aAKjD,CAAC,UAAW,MAAM,UAAU,KAAK,MAAM,MAAM,OAAO,QAAQ,KAAK,IAAI,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAE;AAAA,gBACpG,CAAC,UAAW,MAAM,UAAU,KAAK,MAAM,cAAc,MAAM,mBAAmB,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWzF,MAAM,QAAQ,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,oBAAC,eAAY,UAAqB,GAAG,OAAO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,8 +4,8 @@ import { useRef, useMemo, useEffect } from "react";
|
|
|
4
4
|
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
5
5
|
import { DSIconColors } from "@elliemae/ds-icon";
|
|
6
6
|
import { RecentDocuments } from "@elliemae/ds-icons";
|
|
7
|
-
import { DSButton } from "@elliemae/ds-button";
|
|
8
|
-
import { DSInputGroup } from "@elliemae/ds-form";
|
|
7
|
+
import { DSButton } from "@elliemae/ds-legacy-button-v1";
|
|
8
|
+
import { DSInputGroup } from "@elliemae/ds-legacy-form";
|
|
9
9
|
import { Input } from "./Input.js";
|
|
10
10
|
const DSMobileTimePicker = ({ disabled, value, tabIndex, placeholder, onChange }) => {
|
|
11
11
|
const inputRef = useRef(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileTimePicker/MobileTimePicker.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useMemo, useEffect } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { RecentDocuments } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSInputGroup } from '@elliemae/ds-form';\nimport { Input } from './Input.js';\n\nconst DSMobileTimePicker = ({ disabled, value, tabIndex, placeholder, onChange }) => {\n const inputRef = useRef(null);\n const valueArr = value.split(':');\n useEffect(() => {\n /*\n necessary if value is being set in mount, \n otherwise the clear won't work on the first click\n [SEE input onChange comment]\n */\n if (inputRef.current) {\n inputRef.current.defaultValue = '';\n }\n }, [inputRef.current]);\n const displayValue = useMemo(() => {\n if (!value || !valueArr[0] || !valueArr[1]) return '';\n const ampm = valueArr[0] >= 12 ? 'pm' : 'am';\n const h = valueArr[0] > 12 ? valueArr[0] - 12 : valueArr[0];\n\n return `${h} : ${valueArr[1]} ${ampm}`;\n }, [value]);\n\n return (\n <DSInputGroup\n rightAddon={\n <DSButton\n aria-label=\"Time Picker Button\"\n color={!disabled ? DSIconColors.PRIMARY : DSIconColors.NEUTRAL}\n disabled={disabled}\n icon={<RecentDocuments />}\n type=\"button\"\n buttonType=\"secondary\"\n onClick={() => {\n inputRef.current.focus();\n inputRef.current.click();\n }}\n />\n }\n >\n <Input\n innerRef={inputRef}\n type=\"time\"\n data-testid=\"ds-mobile-time-picker\"\n aria-label=\"Time Picker Input Mask\"\n disabled={disabled}\n placeholder={placeholder}\n tabIndex={tabIndex}\n value={value}\n data-displayvalue={displayValue}\n onChange={(e) => {\n // https://github.com/facebook/react/issues/8938#issuecomment-360573204\n const { target } = e.nativeEvent;\n function iosClearDefault() {\n target.defaultValue = '';\n }\n window.setTimeout(iosClearDefault, 0);\n onChange(e);\n }}\n />\n </DSInputGroup>\n );\n};\n\nDSMobileTimePicker.defaultProps = {\n disabled: false,\n tabIndex: 0,\n placeholder: 'HH : MM am',\n value: '',\n};\n\nconst pickerProps = {\n /**\n * defaults to false\n */\n disabled: PropTypes.bool.description('disabled prop, defaults to false'),\n /**\n * 0 as default\n */\n tabIndex: PropTypes.number.description('focus order HTML property, 0 as default'),\n /**\n * HH : MM am as default\n */\n placeholder: PropTypes.string.description('HH : MM am as default'),\n /**\n * onChange handler, receives change event as first argument\n */\n onChange: PropTypes.func.description('onChange handler, receives change event as first argument'),\n /**\n * HH:MM string representing the time or empty string\n */\n value: PropTypes.string.description('HH:MM string representing the time or empty string'),\n};\n\nDSMobileTimePicker.displayName = 'DSMobileTimePicker';\nconst DSMobileTimePickerWithSchema = describe(DSMobileTimePicker).description('Time picker for mobile & tablet');\n\nDSMobileTimePickerWithSchema.propTypes = pickerProps;\n\nexport { DSMobileTimePicker, DSMobileTimePickerWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useMemo, useEffect } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { RecentDocuments } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-legacy-button-v1';\nimport { DSInputGroup } from '@elliemae/ds-legacy-form';\nimport { Input } from './Input.js';\n\nconst DSMobileTimePicker = ({ disabled, value, tabIndex, placeholder, onChange }) => {\n const inputRef = useRef(null);\n const valueArr = value.split(':');\n useEffect(() => {\n /*\n necessary if value is being set in mount, \n otherwise the clear won't work on the first click\n [SEE input onChange comment]\n */\n if (inputRef.current) {\n inputRef.current.defaultValue = '';\n }\n }, [inputRef.current]);\n const displayValue = useMemo(() => {\n if (!value || !valueArr[0] || !valueArr[1]) return '';\n const ampm = valueArr[0] >= 12 ? 'pm' : 'am';\n const h = valueArr[0] > 12 ? valueArr[0] - 12 : valueArr[0];\n\n return `${h} : ${valueArr[1]} ${ampm}`;\n }, [value]);\n\n return (\n <DSInputGroup\n rightAddon={\n <DSButton\n aria-label=\"Time Picker Button\"\n color={!disabled ? DSIconColors.PRIMARY : DSIconColors.NEUTRAL}\n disabled={disabled}\n icon={<RecentDocuments />}\n type=\"button\"\n buttonType=\"secondary\"\n onClick={() => {\n inputRef.current.focus();\n inputRef.current.click();\n }}\n />\n }\n >\n <Input\n innerRef={inputRef}\n type=\"time\"\n data-testid=\"ds-mobile-time-picker\"\n aria-label=\"Time Picker Input Mask\"\n disabled={disabled}\n placeholder={placeholder}\n tabIndex={tabIndex}\n value={value}\n data-displayvalue={displayValue}\n onChange={(e) => {\n // https://github.com/facebook/react/issues/8938#issuecomment-360573204\n const { target } = e.nativeEvent;\n function iosClearDefault() {\n target.defaultValue = '';\n }\n window.setTimeout(iosClearDefault, 0);\n onChange(e);\n }}\n />\n </DSInputGroup>\n );\n};\n\nDSMobileTimePicker.defaultProps = {\n disabled: false,\n tabIndex: 0,\n placeholder: 'HH : MM am',\n value: '',\n};\n\nconst pickerProps = {\n /**\n * defaults to false\n */\n disabled: PropTypes.bool.description('disabled prop, defaults to false'),\n /**\n * 0 as default\n */\n tabIndex: PropTypes.number.description('focus order HTML property, 0 as default'),\n /**\n * HH : MM am as default\n */\n placeholder: PropTypes.string.description('HH : MM am as default'),\n /**\n * onChange handler, receives change event as first argument\n */\n onChange: PropTypes.func.description('onChange handler, receives change event as first argument'),\n /**\n * HH:MM string representing the time or empty string\n */\n value: PropTypes.string.description('HH:MM string representing the time or empty string'),\n};\n\nDSMobileTimePicker.displayName = 'DSMobileTimePicker';\nconst DSMobileTimePickerWithSchema = describe(DSMobileTimePicker).description('Time picker for mobile & tablet');\n\nDSMobileTimePickerWithSchema.propTypes = pickerProps;\n\nexport { DSMobileTimePicker, DSMobileTimePickerWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACoCP;AApChB,SAAgB,QAAQ,SAAS,iBAAiB;AAClD,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAC7B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qBAAO,eAAe;AAAA,YACxB;AACA,mBAAO,WAAW,iBAAiB,CAAC;AACpC,qBAAS,CAAC;AAAA,UACZ;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,mBAAmB,eAAe;AAAA,EAChC,UAAU;AAAA,EACV,UAAU;AAAA,EACV,aAAa;AAAA,EACb,OAAO;AACT;AAEA,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA,EAIlB,UAAU,UAAU,KAAK,YAAY,kCAAkC;AAAA;AAAA;AAAA;AAAA,EAIvE,UAAU,UAAU,OAAO,YAAY,yCAAyC;AAAA;AAAA;AAAA;AAAA,EAIhF,aAAa,UAAU,OAAO,YAAY,uBAAuB;AAAA;AAAA;AAAA;AAAA,EAIjE,UAAU,UAAU,KAAK,YAAY,2DAA2D;AAAA;AAAA;AAAA;AAAA,EAIhG,OAAO,UAAU,OAAO,YAAY,oDAAoD;AAC1F;AAEA,mBAAmB,cAAc;AACjC,MAAM,+BAA+B,SAAS,kBAAkB,EAAE,YAAY,iCAAiC;AAE/G,6BAA6B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/Modal/Modal.js
CHANGED
|
@@ -4,7 +4,7 @@ import { describe, PropTypes } from "@elliemae/ds-props-helpers";
|
|
|
4
4
|
import { noop } from "lodash-es";
|
|
5
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
6
6
|
import { WarningTriangle } from "@elliemae/ds-icons";
|
|
7
|
-
import { DSButton } from "@elliemae/ds-button";
|
|
7
|
+
import { DSButton } from "@elliemae/ds-legacy-button-v1";
|
|
8
8
|
import { useTheme } from "@elliemae/ds-system";
|
|
9
9
|
import { ModalPosition, ModalBox, BackShadow, ModalIcon, ModalTitle, ModalDescription, BodyFix } from "./styled.js";
|
|
10
10
|
const Modal = ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/Modal/Modal.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport { Grid } from '@elliemae/ds-grid';\nimport { WarningTriangle } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-button';\nimport { useTheme } from '@elliemae/ds-system';\nimport { ModalPosition, ModalBox, BackShadow, ModalIcon, ModalTitle, ModalDescription, BodyFix } from './styled.js';\n\nconst Modal = ({\n zIndex = 1,\n title = '',\n description = '',\n onClose = noop,\n showSecondaryAction = true,\n secondaryActionProps = {\n onClick: noop,\n labelText: 'Cancel',\n },\n primaryActionProps = {\n onClick: noop,\n labelText: 'Accept',\n },\n isOpen = false,\n children = undefined,\n}) => {\n const theme = useTheme();\n if (!isOpen) return null;\n return (\n <>\n <BodyFix isOpen={isOpen} />\n <BackShadow onClick={onClose} zIndex={zIndex} />\n <ModalPosition zIndex={zIndex} cols={['auto']}>\n {children !== undefined ? (\n <>{children}</>\n ) : (\n <ModalBox\n maxHeight={`${window.innerHeight * 0.75}px`}\n rows={[1, '80px']}\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n rows={['auto', 'auto', 1]}\n style={{\n overflow: 'hidden',\n }}\n >\n <ModalIcon>\n <WarningTriangle size=\"xxl\" />\n </ModalIcon>\n <ModalTitle data-testid=\"modal-title\">{title}</ModalTitle>\n <ModalDescription\n data-testid=\"modal-desc\"\n style={{\n overflow: 'auto',\n }}\n >\n {description}\n </ModalDescription>\n </Grid>\n </Grid>\n <Grid pt=\"24px\">\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n cols={showSecondaryAction ? [1, 1] : [1]}\n gutter=\"xs\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{\n borderTop: `1px solid ${theme.colors.neutral[100]}`,\n }}\n >\n {showSecondaryAction && (\n <DSButton\n {...secondaryActionProps}\n labelText={secondaryActionProps.labelText || ' Cancel'}\n buttonType=\"secondary\"\n data-testid=\"modal-secondary-btn\"\n />\n )}\n <DSButton\n labelText={primaryActionProps.labelText || ' Accept'}\n {...primaryActionProps}\n buttonType=\"primary\"\n data-testid=\"modal-primary-btn\"\n />\n </Grid>\n </Grid>\n </ModalBox>\n )}\n </ModalPosition>\n </>\n );\n};\n\nconst modalProps = {\n isOpen: PropTypes.bool.description('Wheter the modal is open or closed').defaultValue(false),\n zIndex: PropTypes.number.description('z-index value').defaultValue(1),\n title: PropTypes.string.description('Modal s title').isRequired,\n description: PropTypes.string.description('Modal s content').isRequired,\n onClose: PropTypes.func.description('Function executed when the modal closes'),\n showSecondaryAction: PropTypes.bool.description('Wheter to show secondary action button or not').defaultValue(true),\n secondaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Secondary action props'),\n primaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Primary action props'),\n};\n\nModal.displayName = 'Modal';\nconst ModalWithSchema = describe(Modal);\nModalWithSchema.propTypes = modalProps;\n\nexport { Modal, ModalWithSchema };\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { noop } from 'lodash-es';\nimport { Grid } from '@elliemae/ds-grid';\nimport { WarningTriangle } from '@elliemae/ds-icons';\nimport { DSButton } from '@elliemae/ds-legacy-button-v1';\nimport { useTheme } from '@elliemae/ds-system';\nimport { ModalPosition, ModalBox, BackShadow, ModalIcon, ModalTitle, ModalDescription, BodyFix } from './styled.js';\n\nconst Modal = ({\n zIndex = 1,\n title = '',\n description = '',\n onClose = noop,\n showSecondaryAction = true,\n secondaryActionProps = {\n onClick: noop,\n labelText: 'Cancel',\n },\n primaryActionProps = {\n onClick: noop,\n labelText: 'Accept',\n },\n isOpen = false,\n children = undefined,\n}) => {\n const theme = useTheme();\n if (!isOpen) return null;\n return (\n <>\n <BodyFix isOpen={isOpen} />\n <BackShadow onClick={onClose} zIndex={zIndex} />\n <ModalPosition zIndex={zIndex} cols={['auto']}>\n {children !== undefined ? (\n <>{children}</>\n ) : (\n <ModalBox\n maxHeight={`${window.innerHeight * 0.75}px`}\n rows={[1, '80px']}\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n style={{\n overflow: 'hidden',\n }}\n >\n <Grid\n rows={['auto', 'auto', 1]}\n style={{\n overflow: 'hidden',\n }}\n >\n <ModalIcon>\n <WarningTriangle size=\"xxl\" />\n </ModalIcon>\n <ModalTitle data-testid=\"modal-title\">{title}</ModalTitle>\n <ModalDescription\n data-testid=\"modal-desc\"\n style={{\n overflow: 'auto',\n }}\n >\n {description}\n </ModalDescription>\n </Grid>\n </Grid>\n <Grid pt=\"24px\">\n <Grid\n pl=\"xs\"\n pr=\"xs\"\n cols={showSecondaryAction ? [1, 1] : [1]}\n gutter=\"xs\"\n justifyContent=\"center\"\n alignItems=\"center\"\n style={{\n borderTop: `1px solid ${theme.colors.neutral[100]}`,\n }}\n >\n {showSecondaryAction && (\n <DSButton\n {...secondaryActionProps}\n labelText={secondaryActionProps.labelText || ' Cancel'}\n buttonType=\"secondary\"\n data-testid=\"modal-secondary-btn\"\n />\n )}\n <DSButton\n labelText={primaryActionProps.labelText || ' Accept'}\n {...primaryActionProps}\n buttonType=\"primary\"\n data-testid=\"modal-primary-btn\"\n />\n </Grid>\n </Grid>\n </ModalBox>\n )}\n </ModalPosition>\n </>\n );\n};\n\nconst modalProps = {\n isOpen: PropTypes.bool.description('Wheter the modal is open or closed').defaultValue(false),\n zIndex: PropTypes.number.description('z-index value').defaultValue(1),\n title: PropTypes.string.description('Modal s title').isRequired,\n description: PropTypes.string.description('Modal s content').isRequired,\n onClose: PropTypes.func.description('Function executed when the modal closes'),\n showSecondaryAction: PropTypes.bool.description('Wheter to show secondary action button or not').defaultValue(true),\n secondaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Secondary action props'),\n primaryActionProps: PropTypes.shape({\n onClick: PropTypes.func,\n labelText: PropTypes.string,\n }).description('Primary action props'),\n};\n\nModal.displayName = 'Modal';\nconst ModalWithSchema = describe(Modal);\nModalWithSchema.propTypes = modalProps;\n\nexport { Modal, ModalWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC+BjB,SAII,UAJJ,KAoBQ,YApBR;AA7BN,SAAS,UAAU,iBAAiB;AACpC,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,eAAe,UAAU,YAAY,WAAW,YAAY,kBAAkB,eAAe;AAEtG,MAAM,QAAQ,CAAC;AAAA,EACb,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,IACrB,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AAAA,EACA,qBAAqB;AAAA,IACnB,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AAAA,EACA,SAAS;AAAA,EACT,WAAW;AACb,MAAM;AACJ,QAAM,QAAQ,SAAS;AACvB,MAAI,CAAC,OAAQ,QAAO;AACpB,SACE,iCACE;AAAA,wBAAC,WAAQ,QAAgB;AAAA,IACzB,oBAAC,cAAW,SAAS,SAAS,QAAgB;AAAA,IAC9C,oBAAC,iBAAc,QAAgB,MAAM,CAAC,MAAM,GACzC,uBAAa,SACZ,gCAAG,UAAS,IAEZ;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,GAAG,OAAO,cAAc,IAAI;AAAA,QACvC,MAAM,CAAC,GAAG,MAAM;AAAA,QAChB,OAAO;AAAA,UACL,UAAU;AAAA,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AK,YAAY,oCAAoC,EAAE,aAAa,KAAK;AAAA,EAC3F,QAAQ,UAAU,OAAO,YAAY,eAAe,EAAE,aAAa,CAAC;AAAA,EACpE,OAAO,UAAU,OAAO,YAAY,eAAe,EAAE;AAAA,EACrD,aAAa,UAAU,OAAO,YAAY,iBAAiB,EAAE;AAAA,EAC7D,SAAS,UAAU,KAAK,YAAY,yCAAyC;AAAA,EAC7E,qBAAqB,UAAU,KAAK,YAAY,+CAA+C,EAAE,aAAa,IAAI;AAAA,EAClH,sBAAsB,UAAU,MAAM;AAAA,IACpC,SAAS,UAAU;AAAA,IACnB,WAAW,UAAU;AAAA,EACvB,CAAC,EAAE,YAAY,wBAAwB;AAAA,EACvC,oBAAoB,UAAU,MAAM;AAAA,IAClC,SAAS,UAAU;AAAA,IACnB,WAAW,UAAU;AAAA,EACvB,CAAC,EAAE,YAAY,sBAAsB;AACvC;AAEA,MAAM,cAAc;AACpB,MAAM,kBAAkB,SAAS,KAAK;AACtC,gBAAgB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-mobile",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.61.0-rc.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - System",
|
|
6
6
|
"files": [
|
|
@@ -35,56 +35,53 @@
|
|
|
35
35
|
"reportFile": "tests.xml",
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"test": "pui-cli test --passWithNoTests --coverage=\"false\"",
|
|
40
|
-
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
41
|
-
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
42
|
-
"dts": "exit 0 | echo",
|
|
43
|
-
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
44
|
-
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\"",
|
|
45
|
-
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch"
|
|
46
|
-
},
|
|
47
38
|
"publishConfig": {
|
|
48
39
|
"access": "public",
|
|
49
40
|
"typeSafety": false
|
|
50
41
|
},
|
|
51
42
|
"dependencies": {
|
|
52
|
-
"@elliemae/ds-
|
|
53
|
-
"@elliemae/ds-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"@elliemae/ds-
|
|
57
|
-
"@elliemae/ds-
|
|
58
|
-
"@elliemae/ds-
|
|
59
|
-
"@elliemae/ds-
|
|
60
|
-
"@elliemae/ds-
|
|
61
|
-
"@elliemae/ds-
|
|
62
|
-
"@elliemae/ds-
|
|
63
|
-
"@elliemae/ds-props-helpers": "3.
|
|
64
|
-
"@elliemae/ds-
|
|
65
|
-
"@elliemae/ds-system": "3.
|
|
66
|
-
"@elliemae/ds-
|
|
67
|
-
"@elliemae/ds-truncated-expandable-text": "3.
|
|
68
|
-
"
|
|
69
|
-
"
|
|
43
|
+
"@elliemae/ds-legacy-button-v1": "1.0.16",
|
|
44
|
+
"@elliemae/ds-legacy-form": "1.0.16",
|
|
45
|
+
"react-window": "~1.8.8",
|
|
46
|
+
"react-window-infinite-loader": "~1.0.8",
|
|
47
|
+
"@elliemae/ds-accordion": "3.61.0-rc.2",
|
|
48
|
+
"@elliemae/ds-backdrop": "3.61.0-rc.2",
|
|
49
|
+
"@elliemae/ds-circular-progress-indicator": "3.61.0-rc.2",
|
|
50
|
+
"@elliemae/ds-button-v2": "3.61.0-rc.2",
|
|
51
|
+
"@elliemae/ds-form-checkbox": "3.61.0-rc.2",
|
|
52
|
+
"@elliemae/ds-grid": "3.61.0-rc.2",
|
|
53
|
+
"@elliemae/ds-icon": "3.61.0-rc.2",
|
|
54
|
+
"@elliemae/ds-props-helpers": "3.61.0-rc.2",
|
|
55
|
+
"@elliemae/ds-icons": "3.61.0-rc.2",
|
|
56
|
+
"@elliemae/ds-system": "3.61.0-rc.2",
|
|
57
|
+
"@elliemae/ds-shared": "3.61.0-rc.2",
|
|
58
|
+
"@elliemae/ds-truncated-expandable-text": "3.61.0-rc.2",
|
|
59
|
+
"@elliemae/ds-tabs": "3.61.0-rc.2",
|
|
60
|
+
"@elliemae/ds-indeterminate-progress-indicator": "3.61.0-rc.2"
|
|
70
61
|
},
|
|
71
62
|
"devDependencies": {
|
|
72
|
-
"@elliemae/
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"styled-components": "catalog:",
|
|
79
|
-
"styled-system": "catalog:"
|
|
63
|
+
"@elliemae/pui-theme": "~2.13.0",
|
|
64
|
+
"jest": "^30.0.0",
|
|
65
|
+
"styled-components": "~5.3.9",
|
|
66
|
+
"styled-system": "^5.1.5",
|
|
67
|
+
"@elliemae/ds-monorepo-devops": "3.61.0-rc.2",
|
|
68
|
+
"@elliemae/ds-test-utils": "3.61.0-rc.2"
|
|
80
69
|
},
|
|
81
70
|
"peerDependencies": {
|
|
82
|
-
"@elliemae/pui-theme": "
|
|
83
|
-
"lodash-es": "
|
|
84
|
-
"react": "
|
|
85
|
-
"react-dom": "
|
|
86
|
-
"styled-components": "
|
|
87
|
-
"styled-system": "
|
|
71
|
+
"@elliemae/pui-theme": "~2.13.0",
|
|
72
|
+
"lodash-es": "^4.17.21",
|
|
73
|
+
"react": "^18.3.1",
|
|
74
|
+
"react-dom": "^18.3.1",
|
|
75
|
+
"styled-components": "~5.3.9",
|
|
76
|
+
"styled-system": "^5.1.5"
|
|
88
77
|
},
|
|
89
|
-
"
|
|
90
|
-
|
|
78
|
+
"scripts": {
|
|
79
|
+
"test": "ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
|
|
80
|
+
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
81
|
+
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
82
|
+
"dts": "exit 0 | echo",
|
|
83
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
84
|
+
"checkDeps": "npx -yes ../../util/ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\"",
|
|
85
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch"
|
|
86
|
+
}
|
|
87
|
+
}
|