@elliemae/ds-mobile 3.16.0-next.2 → 3.16.0-next.3

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.
Files changed (161) hide show
  1. package/dist/cjs/Accordion/DSMobileAccordion.js +3 -3
  2. package/dist/cjs/Accordion/DSMobileAccordion.js.map +2 -2
  3. package/dist/cjs/Accordion/react-desc-prop-types.js +21 -21
  4. package/dist/cjs/Accordion/react-desc-prop-types.js.map +2 -2
  5. package/dist/cjs/CategoryBox/CategoryBox.js +7 -7
  6. package/dist/cjs/CategoryBox/CategoryBox.js.map +2 -2
  7. package/dist/cjs/CollectionBox/CollectionBox.js +7 -7
  8. package/dist/cjs/CollectionBox/CollectionBox.js.map +2 -2
  9. package/dist/cjs/GlobalHeader/MobileGlobalHeader.js +10 -10
  10. package/dist/cjs/GlobalHeader/MobileGlobalHeader.js.map +2 -2
  11. package/dist/cjs/GroupBox/GroupBox.js +8 -8
  12. package/dist/cjs/GroupBox/GroupBox.js.map +2 -2
  13. package/dist/cjs/InfiniteLoader/Infiniteloader.js +7 -6
  14. package/dist/cjs/InfiniteLoader/Infiniteloader.js.map +2 -2
  15. package/dist/cjs/InfiniteLoader/VirtualizedInfiniteLoader.js +9 -9
  16. package/dist/cjs/InfiniteLoader/VirtualizedInfiniteLoader.js.map +2 -2
  17. package/dist/cjs/MobileActionToolbar/MobileActionToolbar.js +4 -4
  18. package/dist/cjs/MobileActionToolbar/MobileActionToolbar.js.map +2 -2
  19. package/dist/cjs/MobileActionToolbar/MobileActionToolbarItem.js +3 -3
  20. package/dist/cjs/MobileActionToolbar/MobileActionToolbarItem.js.map +2 -2
  21. package/dist/cjs/MobileBanner/MobileBanner.js +2 -2
  22. package/dist/cjs/MobileBanner/MobileBanner.js.map +2 -2
  23. package/dist/cjs/MobileBanner/config/useMobileBanner.js +5 -5
  24. package/dist/cjs/MobileBanner/config/useMobileBanner.js.map +2 -2
  25. package/dist/cjs/MobileBanner/propTypes.js +14 -14
  26. package/dist/cjs/MobileBanner/propTypes.js.map +2 -2
  27. package/dist/cjs/MobileCard/Card.js +2 -2
  28. package/dist/cjs/MobileCard/Card.js.map +2 -2
  29. package/dist/cjs/MobileCard/Group.js +9 -9
  30. package/dist/cjs/MobileCard/Group.js.map +2 -2
  31. package/dist/cjs/MobileCard/props.js +14 -14
  32. package/dist/cjs/MobileCard/props.js.map +2 -2
  33. package/dist/cjs/MobileContextMenu/MobileContextMenu.js +18 -18
  34. package/dist/cjs/MobileContextMenu/MobileContextMenu.js.map +2 -2
  35. package/dist/cjs/MobileContextMenu/MobileContextMenuGroup.js +8 -8
  36. package/dist/cjs/MobileContextMenu/MobileContextMenuGroup.js.map +2 -2
  37. package/dist/cjs/MobileContextMenu/MobileContextMenuItem.js +11 -11
  38. package/dist/cjs/MobileContextMenu/MobileContextMenuItem.js.map +2 -2
  39. package/dist/cjs/MobileDatePicker/MobileDatePicker.js +7 -7
  40. package/dist/cjs/MobileDatePicker/MobileDatePicker.js.map +2 -2
  41. package/dist/cjs/MobileDropdownMenu/MobileDropdownMenu.js +6 -6
  42. package/dist/cjs/MobileDropdownMenu/MobileDropdownMenu.js.map +2 -2
  43. package/dist/cjs/MobileEmtpyState/MobileEmptyState.js +4 -4
  44. package/dist/cjs/MobileEmtpyState/MobileEmptyState.js.map +2 -2
  45. package/dist/cjs/MobileFilterbar/Filterbar.js +3 -3
  46. package/dist/cjs/MobileFilterbar/Filterbar.js.map +2 -2
  47. package/dist/cjs/MobileFilterbar/FilterbarItem.js +4 -4
  48. package/dist/cjs/MobileFilterbar/FilterbarItem.js.map +2 -2
  49. package/dist/cjs/MobileFilterbar/FilterbarSort.js +3 -3
  50. package/dist/cjs/MobileFilterbar/FilterbarSort.js.map +2 -2
  51. package/dist/cjs/MobileFooter/Action.js +5 -5
  52. package/dist/cjs/MobileFooter/Action.js.map +2 -2
  53. package/dist/cjs/MobileFooter/Footer.js +3 -3
  54. package/dist/cjs/MobileFooter/Footer.js.map +2 -2
  55. package/dist/cjs/MobileFooter/Text.js +3 -3
  56. package/dist/cjs/MobileFooter/Text.js.map +2 -2
  57. package/dist/cjs/MobileListItem/MobileListItem.js +8 -8
  58. package/dist/cjs/MobileListItem/MobileListItem.js.map +2 -2
  59. package/dist/cjs/MobileListItem/MobileListMultipleItem.js +2 -2
  60. package/dist/cjs/MobileListItem/MobileListMultipleItem.js.map +2 -2
  61. package/dist/cjs/MobileListItem/MobileListSeparator.js +2 -2
  62. package/dist/cjs/MobileListItem/MobileListSeparator.js.map +2 -2
  63. package/dist/cjs/MobileListItem/MobileListSingleItem.js +2 -2
  64. package/dist/cjs/MobileListItem/MobileListSingleItem.js.map +2 -2
  65. package/dist/cjs/MobilePageHeader/MobilePageHeader.js +12 -12
  66. package/dist/cjs/MobilePageHeader/MobilePageHeader.js.map +2 -2
  67. package/dist/cjs/MobileSeparator/Separator.js +6 -6
  68. package/dist/cjs/MobileSeparator/Separator.js.map +2 -2
  69. package/dist/cjs/MobileTimePicker/MobileTimePicker.js +7 -7
  70. package/dist/cjs/MobileTimePicker/MobileTimePicker.js.map +2 -2
  71. package/dist/cjs/Modal/Modal.js +14 -14
  72. package/dist/cjs/Modal/Modal.js.map +2 -2
  73. package/dist/cjs/SideNav/SideNav.js +9 -9
  74. package/dist/cjs/SideNav/SideNav.js.map +2 -2
  75. package/dist/cjs/SwipeToRefresh/SwipeToRefresh.js +5 -5
  76. package/dist/cjs/SwipeToRefresh/SwipeToRefresh.js.map +2 -2
  77. package/dist/cjs/Tabs/index.js +3 -3
  78. package/dist/cjs/Tabs/index.js.map +2 -2
  79. package/dist/cjs/Tabs/propTypes.js +14 -14
  80. package/dist/cjs/Tabs/propTypes.js.map +2 -2
  81. package/dist/esm/Accordion/DSMobileAccordion.js +1 -1
  82. package/dist/esm/Accordion/DSMobileAccordion.js.map +2 -2
  83. package/dist/esm/Accordion/react-desc-prop-types.js +1 -1
  84. package/dist/esm/Accordion/react-desc-prop-types.js.map +2 -2
  85. package/dist/esm/CategoryBox/CategoryBox.js +1 -1
  86. package/dist/esm/CategoryBox/CategoryBox.js.map +1 -1
  87. package/dist/esm/CollectionBox/CollectionBox.js +1 -1
  88. package/dist/esm/CollectionBox/CollectionBox.js.map +1 -1
  89. package/dist/esm/GlobalHeader/MobileGlobalHeader.js +1 -1
  90. package/dist/esm/GlobalHeader/MobileGlobalHeader.js.map +1 -1
  91. package/dist/esm/GroupBox/GroupBox.js +1 -1
  92. package/dist/esm/GroupBox/GroupBox.js.map +1 -1
  93. package/dist/esm/InfiniteLoader/Infiniteloader.js +2 -1
  94. package/dist/esm/InfiniteLoader/Infiniteloader.js.map +2 -2
  95. package/dist/esm/InfiniteLoader/VirtualizedInfiniteLoader.js +1 -1
  96. package/dist/esm/InfiniteLoader/VirtualizedInfiniteLoader.js.map +1 -1
  97. package/dist/esm/MobileActionToolbar/MobileActionToolbar.js +1 -1
  98. package/dist/esm/MobileActionToolbar/MobileActionToolbar.js.map +1 -1
  99. package/dist/esm/MobileActionToolbar/MobileActionToolbarItem.js +1 -1
  100. package/dist/esm/MobileActionToolbar/MobileActionToolbarItem.js.map +1 -1
  101. package/dist/esm/MobileBanner/MobileBanner.js +1 -1
  102. package/dist/esm/MobileBanner/MobileBanner.js.map +1 -1
  103. package/dist/esm/MobileBanner/config/useMobileBanner.js +1 -1
  104. package/dist/esm/MobileBanner/config/useMobileBanner.js.map +2 -2
  105. package/dist/esm/MobileBanner/propTypes.js +1 -1
  106. package/dist/esm/MobileBanner/propTypes.js.map +2 -2
  107. package/dist/esm/MobileCard/Card.js +1 -1
  108. package/dist/esm/MobileCard/Card.js.map +1 -1
  109. package/dist/esm/MobileCard/Group.js +1 -1
  110. package/dist/esm/MobileCard/Group.js.map +1 -1
  111. package/dist/esm/MobileCard/props.js +1 -1
  112. package/dist/esm/MobileCard/props.js.map +1 -1
  113. package/dist/esm/MobileContextMenu/MobileContextMenu.js +1 -1
  114. package/dist/esm/MobileContextMenu/MobileContextMenu.js.map +1 -1
  115. package/dist/esm/MobileContextMenu/MobileContextMenuGroup.js +1 -1
  116. package/dist/esm/MobileContextMenu/MobileContextMenuGroup.js.map +1 -1
  117. package/dist/esm/MobileContextMenu/MobileContextMenuItem.js +1 -1
  118. package/dist/esm/MobileContextMenu/MobileContextMenuItem.js.map +1 -1
  119. package/dist/esm/MobileDatePicker/MobileDatePicker.js +1 -1
  120. package/dist/esm/MobileDatePicker/MobileDatePicker.js.map +1 -1
  121. package/dist/esm/MobileDropdownMenu/MobileDropdownMenu.js +1 -1
  122. package/dist/esm/MobileDropdownMenu/MobileDropdownMenu.js.map +2 -2
  123. package/dist/esm/MobileEmtpyState/MobileEmptyState.js +1 -1
  124. package/dist/esm/MobileEmtpyState/MobileEmptyState.js.map +1 -1
  125. package/dist/esm/MobileFilterbar/Filterbar.js +1 -1
  126. package/dist/esm/MobileFilterbar/Filterbar.js.map +1 -1
  127. package/dist/esm/MobileFilterbar/FilterbarItem.js +1 -1
  128. package/dist/esm/MobileFilterbar/FilterbarItem.js.map +1 -1
  129. package/dist/esm/MobileFilterbar/FilterbarSort.js +1 -1
  130. package/dist/esm/MobileFilterbar/FilterbarSort.js.map +1 -1
  131. package/dist/esm/MobileFooter/Action.js +1 -1
  132. package/dist/esm/MobileFooter/Action.js.map +1 -1
  133. package/dist/esm/MobileFooter/Footer.js +1 -1
  134. package/dist/esm/MobileFooter/Footer.js.map +1 -1
  135. package/dist/esm/MobileFooter/Text.js +1 -1
  136. package/dist/esm/MobileFooter/Text.js.map +1 -1
  137. package/dist/esm/MobileListItem/MobileListItem.js +1 -1
  138. package/dist/esm/MobileListItem/MobileListItem.js.map +1 -1
  139. package/dist/esm/MobileListItem/MobileListMultipleItem.js +1 -1
  140. package/dist/esm/MobileListItem/MobileListMultipleItem.js.map +2 -2
  141. package/dist/esm/MobileListItem/MobileListSeparator.js +1 -1
  142. package/dist/esm/MobileListItem/MobileListSeparator.js.map +2 -2
  143. package/dist/esm/MobileListItem/MobileListSingleItem.js +1 -1
  144. package/dist/esm/MobileListItem/MobileListSingleItem.js.map +2 -2
  145. package/dist/esm/MobilePageHeader/MobilePageHeader.js +1 -1
  146. package/dist/esm/MobilePageHeader/MobilePageHeader.js.map +1 -1
  147. package/dist/esm/MobileSeparator/Separator.js +1 -1
  148. package/dist/esm/MobileSeparator/Separator.js.map +1 -1
  149. package/dist/esm/MobileTimePicker/MobileTimePicker.js +1 -1
  150. package/dist/esm/MobileTimePicker/MobileTimePicker.js.map +1 -1
  151. package/dist/esm/Modal/Modal.js +1 -1
  152. package/dist/esm/Modal/Modal.js.map +1 -1
  153. package/dist/esm/SideNav/SideNav.js +1 -1
  154. package/dist/esm/SideNav/SideNav.js.map +1 -1
  155. package/dist/esm/SwipeToRefresh/SwipeToRefresh.js +1 -1
  156. package/dist/esm/SwipeToRefresh/SwipeToRefresh.js.map +1 -1
  157. package/dist/esm/Tabs/index.js +1 -1
  158. package/dist/esm/Tabs/index.js.map +1 -1
  159. package/dist/esm/Tabs/propTypes.js +1 -1
  160. package/dist/esm/Tabs/propTypes.js.map +2 -2
  161. package/package.json +18 -17
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileCard/Card.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useRef } from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport {\n styled,\n space,\n color,\n border,\n op,\n truncate,\n withTheme,\n __UNSAFE_SPACE_TO_DIMSUM,\n toMobile,\n} from '@elliemae/ds-system';\nimport { GroupItem } from '@elliemae/ds-shared';\nimport { Grid } from '@elliemae/ds-grid';\nimport { StyledCard as Card } from './StyledCard';\nimport { ExpandChevron } from './ExpandChevron';\nimport { useHeight } from './useHeight';\nimport { ExpandableRegion } from './ExpandableRegion';\nimport { cardPropsTypes, MobileCardProps } from './props';\n\nconst TitleEllipsis = styled.div`\n ${truncate()}\n`;\n\nconst Title = styled.div`\n ${space}\n ${truncate()}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n font-size: ${(props) => toMobile(props.theme.fontSizes.title[600])};\n width: 100%;\n ${color('neutral', 800)}\n`;\nconst Detail = styled.span`\n ${space}\n ${truncate()}\n font-size: ${(props) => toMobile(props.theme.fontSizes.title[500])};\n font-weight: ${(props) => props.theme.fontWeights.regular};\n`;\nconst SubText = styled.span`\n margin-top: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n ${truncate()}\n &:nth-child(2) {\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.s)};\n }\n`;\nconst SubTextWrap = styled.div`\n ${truncate()}\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n margin-top: 6px;\n margin-bottom: 2px;\n padding-bottom: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs)};\n font-size: ${(props) => toMobile(props.theme.fontSizes.subTitle[400])};\n ${color('neutral', 500)}\n font-weight: ${(props) => props.theme.fontWeights.regular};\n display: flex;\n justify-content: space-between;\n`;\nconst LeftIcon = styled(Grid)<{ halfM: string }>`\n & > span {\n height: ${(props) => props.halfM};\n width: ${(props) => props.halfM};\n }\n\n & > span > svg,\n svg:not([fill]) {\n height: ${(props) => props.halfM};\n width: ${(props) => props.halfM};\n }\n`;\n\nconst RightIcon = styled(Grid)<{ halfM: string }>`\n span > svg,\n span > svg:not([fill]) {\n fill: #000000;\n }\n`;\nconst CenterWrap = styled.div`\n display: flex;\n align-items: center;\n ${truncate()}\n`;\n\nconst MobileCard: React.ComponentType<MobileCardProps> = ({\n children,\n height = 'm',\n leftAddOn,\n leftProp,\n rightProp,\n subText,\n subIcons,\n details,\n theme,\n expandable = false,\n expandedContent,\n value,\n cardContent,\n}) => {\n const subTextRef = useRef(null);\n const subTextHeight = useHeight(subTextRef);\n const isJustChildren = !(subText || subIcons || details);\n const halfM = op('/', __UNSAFE_SPACE_TO_DIMSUM(theme.space.m), 2);\n\n return (\n <GroupItem\n render={(context = {}) => {\n const { activeValue, onChange } = context;\n const selected =\n activeValue !== undefined && (activeValue === value || (activeValue?.length && activeValue?.includes(value)));\n\n return (\n <Card\n data-testid=\"card-wrapper\"\n minHeight={\n height === 'm' ? __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxl) : __UNSAFE_SPACE_TO_DIMSUM(theme.space.xl)\n }\n >\n {expandable && (\n <ExpandChevron\n isExpanded={selected}\n onClick={(e) => {\n e.stopPropagation();\n onChange({ target: { value } });\n }}\n align={subText || subIcons ? 'top' : 'center'}\n />\n )}\n <Grid pb={(subText || subIcons) && subTextHeight} cols={['auto', 'auto']} alignItems=\"center\">\n {leftProp && <Grid ml={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}>{leftProp}</Grid>}\n {leftAddOn && (\n <LeftIcon ml={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)} halfM={halfM}>\n {leftAddOn}\n </LeftIcon>\n )}\n </Grid>\n <Grid\n pl={!leftAddOn ? __UNSAFE_SPACE_TO_DIMSUM(theme.space.s) : __UNSAFE_SPACE_TO_DIMSUM(theme.space.xs)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n width=\"100%\"\n >\n <CenterWrap>\n <Title pt={!isJustChildren && halfM} data-testid=\"card-title\">\n <TitleEllipsis>{children}</TitleEllipsis>\n {details && (\n <Grid\n data-testid=\"card-details\"\n cols={details.map(() => 'min-content')}\n mb={(!(subText || subIcons) && halfM) || 0}\n pt={op('/', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxs), 2)}\n >\n {details.map((d, i) => (\n <Detail key={i}>\n {d}\n {i < details.length - 1 && <Detail px={__UNSAFE_SPACE_TO_DIMSUM(theme.space.xxs)}>\u2022</Detail>}\n </Detail>\n ))}\n </Grid>\n )}\n </Title>\n {rightProp &&\n rightProp.map((prop, i) => (\n <RightIcon ml={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)} key={i}>\n {prop}\n </RightIcon>\n ))}\n </CenterWrap>\n {subIcons && (\n <SubTextWrap ref={subTextRef}>\n <SubText>{subIcons}</SubText>\n {subText && subText[1] && <SubText data-testid=\"card-subText\">{subText[1]}</SubText>}\n </SubTextWrap>\n )}\n {subText && !subIcons && (\n <SubTextWrap ref={subTextRef}>\n {subText.map((s, i) => (\n <SubText data-testid=\"card-subText\" key={i}>\n {s}\n </SubText>\n ))}\n </SubTextWrap>\n )}\n <ExpandableRegion show={selected} content={expandedContent} />\n {cardContent && <Grid>{cardContent}</Grid>}\n </Grid>\n </Card>\n );\n }}\n />\n );\n};\n\nMobileCard.propTypes = cardPropsTypes;\nMobileCard.displayName = 'MobileCard';\nconst DSMobileCardWithSchema = describe(MobileCard);\n\nDSMobileCardWithSchema.propTypes = cardPropsTypes;\n\nexport { DSMobileCardWithSchema };\n\nexport default withTheme(MobileCard);\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useRef } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport {\n styled,\n space,\n color,\n border,\n op,\n truncate,\n withTheme,\n __UNSAFE_SPACE_TO_DIMSUM,\n toMobile,\n} from '@elliemae/ds-system';\nimport { GroupItem } from '@elliemae/ds-shared';\nimport { Grid } from '@elliemae/ds-grid';\nimport { StyledCard as Card } from './StyledCard';\nimport { ExpandChevron } from './ExpandChevron';\nimport { useHeight } from './useHeight';\nimport { ExpandableRegion } from './ExpandableRegion';\nimport { cardPropsTypes, MobileCardProps } from './props';\n\nconst TitleEllipsis = styled.div`\n ${truncate()}\n`;\n\nconst Title = styled.div`\n ${space}\n ${truncate()}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n font-size: ${(props) => toMobile(props.theme.fontSizes.title[600])};\n width: 100%;\n ${color('neutral', 800)}\n`;\nconst Detail = styled.span`\n ${space}\n ${truncate()}\n font-size: ${(props) => toMobile(props.theme.fontSizes.title[500])};\n font-weight: ${(props) => props.theme.fontWeights.regular};\n`;\nconst SubText = styled.span`\n margin-top: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n ${truncate()}\n &:nth-child(2) {\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.s)};\n }\n`;\nconst SubTextWrap = styled.div`\n ${truncate()}\n border-top: ${(props) => border(props.theme.colors.neutral['300'])};\n margin-top: 6px;\n margin-bottom: 2px;\n padding-bottom: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs)};\n font-size: ${(props) => toMobile(props.theme.fontSizes.subTitle[400])};\n ${color('neutral', 500)}\n font-weight: ${(props) => props.theme.fontWeights.regular};\n display: flex;\n justify-content: space-between;\n`;\nconst LeftIcon = styled(Grid)<{ halfM: string }>`\n & > span {\n height: ${(props) => props.halfM};\n width: ${(props) => props.halfM};\n }\n\n & > span > svg,\n svg:not([fill]) {\n height: ${(props) => props.halfM};\n width: ${(props) => props.halfM};\n }\n`;\n\nconst RightIcon = styled(Grid)<{ halfM: string }>`\n span > svg,\n span > svg:not([fill]) {\n fill: #000000;\n }\n`;\nconst CenterWrap = styled.div`\n display: flex;\n align-items: center;\n ${truncate()}\n`;\n\nconst MobileCard: React.ComponentType<MobileCardProps> = ({\n children,\n height = 'm',\n leftAddOn,\n leftProp,\n rightProp,\n subText,\n subIcons,\n details,\n theme,\n expandable = false,\n expandedContent,\n value,\n cardContent,\n}) => {\n const subTextRef = useRef(null);\n const subTextHeight = useHeight(subTextRef);\n const isJustChildren = !(subText || subIcons || details);\n const halfM = op('/', __UNSAFE_SPACE_TO_DIMSUM(theme.space.m), 2);\n\n return (\n <GroupItem\n render={(context = {}) => {\n const { activeValue, onChange } = context;\n const selected =\n activeValue !== undefined && (activeValue === value || (activeValue?.length && activeValue?.includes(value)));\n\n return (\n <Card\n data-testid=\"card-wrapper\"\n minHeight={\n height === 'm' ? __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxl) : __UNSAFE_SPACE_TO_DIMSUM(theme.space.xl)\n }\n >\n {expandable && (\n <ExpandChevron\n isExpanded={selected}\n onClick={(e) => {\n e.stopPropagation();\n onChange({ target: { value } });\n }}\n align={subText || subIcons ? 'top' : 'center'}\n />\n )}\n <Grid pb={(subText || subIcons) && subTextHeight} cols={['auto', 'auto']} alignItems=\"center\">\n {leftProp && <Grid ml={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}>{leftProp}</Grid>}\n {leftAddOn && (\n <LeftIcon ml={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)} halfM={halfM}>\n {leftAddOn}\n </LeftIcon>\n )}\n </Grid>\n <Grid\n pl={!leftAddOn ? __UNSAFE_SPACE_TO_DIMSUM(theme.space.s) : __UNSAFE_SPACE_TO_DIMSUM(theme.space.xs)}\n pr={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)}\n width=\"100%\"\n >\n <CenterWrap>\n <Title pt={!isJustChildren && halfM} data-testid=\"card-title\">\n <TitleEllipsis>{children}</TitleEllipsis>\n {details && (\n <Grid\n data-testid=\"card-details\"\n cols={details.map(() => 'min-content')}\n mb={(!(subText || subIcons) && halfM) || 0}\n pt={op('/', __UNSAFE_SPACE_TO_DIMSUM(theme.space.xxs), 2)}\n >\n {details.map((d, i) => (\n <Detail key={i}>\n {d}\n {i < details.length - 1 && <Detail px={__UNSAFE_SPACE_TO_DIMSUM(theme.space.xxs)}>\u2022</Detail>}\n </Detail>\n ))}\n </Grid>\n )}\n </Title>\n {rightProp &&\n rightProp.map((prop, i) => (\n <RightIcon ml={__UNSAFE_SPACE_TO_DIMSUM(theme.space.s)} key={i}>\n {prop}\n </RightIcon>\n ))}\n </CenterWrap>\n {subIcons && (\n <SubTextWrap ref={subTextRef}>\n <SubText>{subIcons}</SubText>\n {subText && subText[1] && <SubText data-testid=\"card-subText\">{subText[1]}</SubText>}\n </SubTextWrap>\n )}\n {subText && !subIcons && (\n <SubTextWrap ref={subTextRef}>\n {subText.map((s, i) => (\n <SubText data-testid=\"card-subText\" key={i}>\n {s}\n </SubText>\n ))}\n </SubTextWrap>\n )}\n <ExpandableRegion show={selected} content={expandedContent} />\n {cardContent && <Grid>{cardContent}</Grid>}\n </Grid>\n </Card>\n );\n }}\n />\n );\n};\n\nMobileCard.propTypes = cardPropsTypes;\nMobileCard.displayName = 'MobileCard';\nconst DSMobileCardWithSchema = describe(MobileCard);\n\nDSMobileCardWithSchema.propTypes = cardPropsTypes;\n\nexport { DSMobileCardWithSchema };\n\nexport default withTheme(MobileCard);\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACyHT,cASF,YATE;AAtHd,SAAgB,cAAc;AAC9B,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,cAAc,YAAY;AACnC,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB;AACjC,SAAS,sBAAuC;AAEhD,MAAM,gBAAgB,OAAO;AAAA,IACzB,SAAS;AAAA;AAGb,MAAM,QAAQ,OAAO;AAAA,IACjB;AAAA,IACA,SAAS;AAAA,iBACI,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,eACrC,CAAC,UAAU,SAAS,MAAM,MAAM,UAAU,MAAM,IAAI;AAAA;AAAA,IAE/D,MAAM,WAAW,GAAG;AAAA;AAExB,MAAM,SAAS,OAAO;AAAA,IAClB;AAAA,IACA,SAAS;AAAA,eACE,CAAC,UAAU,SAAS,MAAM,MAAM,UAAU,MAAM,IAAI;AAAA,iBAClD,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA;AAEpD,MAAM,UAAU,OAAO;AAAA,gBACP,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,EAA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CAAC,GAAG,MACf,qBAAC,UACE;AAAA;AAAA,8BACA,IAAI,QAAQ,SAAS,KAAK,oBAAC,UAAO,IAAI,yBAAyB,MAAM,MAAM,GAAG,GAAG,oBAAC;AAAA,iCAFxE,CAGb,CACD;AAAA;AAAA,wBACH;AAAA,yBAEJ;AAAA,sBACC,aACC,UAAU,IAAI,CAAC,MAAM,MACnB,oBAAC,aAAU,IAAI,yBAAyB,MAAM,MAAM,CAAC,GAClD,kBAD0D,CAE7D,CACD;AAAA,uBACL;AAAA,oBACC,YACC,qBAAC,eAAY,KAAK,YAChB;AAAA,0CAAC,WAAS,oBAAS;AAAA,sBAClB,WAAW,QAAQ,MAAM,oBAAC,WAAQ,eAAY,gBAAgB,kBAAQ,IAAG;AAAA,uBAC5E;AAAA,oBAED,WAAW,CAAC,YACX,oBAAC,eAAY,KAAK,YACf,kBAAQ,IAAI,CAAC,GAAG,MACf,oBAAC,WAAQ,eAAY,gBAClB,eADsC,CAEzC,CACD,GACH;AAAA,oBAEF,oBAAC,oBAAiB,MAAM,UAAU,SAAS,iBAAiB;AAAA,oBAC3D,eAAe,oBAAC,QAAM,uBAAY;AAAA;AAAA;AAAA,cACrC;AAAA;AAAA;AAAA,QACF;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,yBAAyB,SAAS,UAAU;AAElD,uBAAuB,YAAY;AAInC,IAAO,eAAQ,UAAU,UAAU;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import React2 from "react";
4
- import { describe, PropTypes } from "@elliemae/ds-utilities";
4
+ import { describe, PropTypes } from "@elliemae/ds-props-helpers";
5
5
  import { styled } from "@elliemae/ds-system";
6
6
  import { Group } from "@elliemae/ds-shared";
7
7
  import { Grid } from "@elliemae/ds-grid";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileCard/Group.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport { styled } from '@elliemae/ds-system';\nimport { Group } from '@elliemae/ds-shared';\nimport { Grid } from '@elliemae/ds-grid';\nimport { color, border, withTheme, truncate, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { StyledCard as Card } from './StyledCard';\n\nconst GroupGrid = styled(Grid)`\n ${Card} {\n border-top: none;\n }\n\n ${({ theme, withTopBorder }) => (withTopBorder ? `border-top: ${border(theme.colors.neutral['100'])}` : '')}\n`;\n\nconst GroupTitle = styled.span`\n ${truncate()}\n`;\n\nconst GroupTitleGrid = styled.div`\n display: flex;\n justify-content: space-between;\n padding: 0 ${(props) => props.theme.space.xs};\n font-size: ${(props) => `calc(${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m)} / 2)`};\n ${color('neutral', '700')}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n background-color: ${(props) => props.theme.colors.brand['200']};\n border-top: ${(props) => border(props.theme.colors.brand['300'])};\n line-height: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m)};\n @media (min-width: 1024px) {\n background-color: ${(props) => props.theme.colors.neutral['080']};\n border-top: ${(props) => border(props.theme.colors.neutral['080'])};\n }\n`;\n\nconst MobileCardGroup = ({\n children,\n theme,\n title,\n action,\n activeValue,\n allowMultipleOpen = false,\n onChange = () => null,\n}) => {\n const rows = !title ? ['auto'] : [__UNSAFE_SPACE_TO_DIMSUM(theme.space.m), 'auto'];\n\n return (\n <Group activeValue={activeValue} multiple={allowMultipleOpen} onChange={onChange}>\n <GroupGrid withTopBorder={!title} rows={rows}>\n {!!title && (\n <GroupTitleGrid pl=\"xxs\">\n <GroupTitle>{title}</GroupTitle>\n {action}\n </GroupTitleGrid>\n )}\n <Grid>\n {React.Children.map(\n children,\n (child, idx) =>\n React.cloneElement(child, {\n key: idx,\n value: idx,\n idx,\n }),\n null,\n )}\n </Grid>\n </GroupGrid>\n </Group>\n );\n};\n\nconst props = {\n theme: PropTypes.object.isRequired.description(''),\n /**\n * Defines group title\n */\n title: PropTypes.string.description(''),\n /**\n * Pass one or more Mobile Cards to render as a group\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired.description(''),\n /**\n * Group header addon\n */\n action: PropTypes.element.description(''),\n /** */\n activeValue: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]).description(''),\n /** */\n allowMultipleOpen: PropTypes.bool.description(''),\n /** */\n onChange: PropTypes.func.description(''),\n};\n\nMobileCardGroup.propTypes = props;\nMobileCardGroup.displayName = 'MobileCardGroup';\nconst DSMobileCardGroupWithSchema = describe(MobileCardGroup);\n\nDSMobileCardGroupWithSchema.propTypes = props;\n\nexport { DSMobileCardGroupWithSchema };\n\nexport default withTheme(MobileCardGroup);\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { Group } from '@elliemae/ds-shared';\nimport { Grid } from '@elliemae/ds-grid';\nimport { color, border, withTheme, truncate, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { StyledCard as Card } from './StyledCard';\n\nconst GroupGrid = styled(Grid)`\n ${Card} {\n border-top: none;\n }\n\n ${({ theme, withTopBorder }) => (withTopBorder ? `border-top: ${border(theme.colors.neutral['100'])}` : '')}\n`;\n\nconst GroupTitle = styled.span`\n ${truncate()}\n`;\n\nconst GroupTitleGrid = styled.div`\n display: flex;\n justify-content: space-between;\n padding: 0 ${(props) => props.theme.space.xs};\n font-size: ${(props) => `calc(${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m)} / 2)`};\n ${color('neutral', '700')}\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n background-color: ${(props) => props.theme.colors.brand['200']};\n border-top: ${(props) => border(props.theme.colors.brand['300'])};\n line-height: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m)};\n @media (min-width: 1024px) {\n background-color: ${(props) => props.theme.colors.neutral['080']};\n border-top: ${(props) => border(props.theme.colors.neutral['080'])};\n }\n`;\n\nconst MobileCardGroup = ({\n children,\n theme,\n title,\n action,\n activeValue,\n allowMultipleOpen = false,\n onChange = () => null,\n}) => {\n const rows = !title ? ['auto'] : [__UNSAFE_SPACE_TO_DIMSUM(theme.space.m), 'auto'];\n\n return (\n <Group activeValue={activeValue} multiple={allowMultipleOpen} onChange={onChange}>\n <GroupGrid withTopBorder={!title} rows={rows}>\n {!!title && (\n <GroupTitleGrid pl=\"xxs\">\n <GroupTitle>{title}</GroupTitle>\n {action}\n </GroupTitleGrid>\n )}\n <Grid>\n {React.Children.map(\n children,\n (child, idx) =>\n React.cloneElement(child, {\n key: idx,\n value: idx,\n idx,\n }),\n null,\n )}\n </Grid>\n </GroupGrid>\n </Group>\n );\n};\n\nconst props = {\n theme: PropTypes.object.isRequired.description(''),\n /**\n * Defines group title\n */\n title: PropTypes.string.description(''),\n /**\n * Pass one or more Mobile Cards to render as a group\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired.description(''),\n /**\n * Group header addon\n */\n action: PropTypes.element.description(''),\n /** */\n activeValue: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]).description(''),\n /** */\n allowMultipleOpen: PropTypes.bool.description(''),\n /** */\n onChange: PropTypes.func.description(''),\n};\n\nMobileCardGroup.propTypes = props;\nMobileCardGroup.displayName = 'MobileCardGroup';\nconst DSMobileCardGroupWithSchema = describe(MobileCardGroup);\n\nDSMobileCardGroupWithSchema.propTypes = props;\n\nexport { DSMobileCardGroupWithSchema };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F,SACE,oBAAC,SAAM,aAA0B,UAAU,mBAAmB,UAC5D,+BAAC,aAAU,eAAe,CAAC,OAAO,MAC/B;AAAA,KAAC,CAAC,SACD,qBAAC,kBAAe,IAAG,OACjB;AAAA,0BAAC,cAAY,iBAAM;AAAA,MAClB;AAAA,OACH;AAAA,IAEF,oBAAC,QACE,UAAAD,OAAM,SAAS;AAAA,MACd;AAAA,MACA,CAAC,OAAO,QACNA,OAAM,aAAa,OAAO;AAAA,QACxB,KAAK;AAAA,QACL,OAAO;AAAA,QACP;AAAA,MACF,CAAC;AAAA,MACH;AAAA,IACF,GACF;AAAA,KACF,GACF;AAEJ;AAEA,MAAM,QAAQ;AAAA,EACZ,OAAO,UAAU,OAAO,WAAW,YAAY,EAAE;AAAA,EAIjD,OAAO,UAAU,OAAO,YAAY,EAAE;AAAA,EAItC,UAAU,UAAU,UAAU,CAAC,UAAU,SAAS,UAAU,QAAQ,UAAU,OAAO,CAAC,CAAC,EAAE,WAAW,YAAY,EAAE;AAAA,EAIlH,QAAQ,UAAU,QAAQ,YAAY,EAAE;AAAA,EAExC,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,QAAQ,UAAU,MAAM,CAAC,CAAC,EAAE,YAAY,EAAE;AAAA,EAExG,mBAAmB,UAAU,KAAK,YAAY,EAAE;AAAA,EAEhD,UAAU,UAAU,KAAK,YAAY,EAAE;AACzC;AAEA,gBAAgB,YAAY;AAC5B,gBAAgB,cAAc;AAC9B,MAAM,8BAA8B,SAAS,eAAe;AAE5D,4BAA4B,YAAY;AAIxC,IAAO,gBAAQ,UAAU,eAAe;",
6
6
  "names": ["React", "props"]
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { PropTypes } from "@elliemae/ds-utilities";
2
+ import { PropTypes } from "@elliemae/ds-props-helpers";
3
3
  const cardPropsTypes = {
4
4
  height: PropTypes.oneOf(["s", "m"]).description("card height"),
5
5
  children: PropTypes.string.description("Defines mobile card title").isRequired,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileCard/props.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport type { Theme } from '@elliemae/pui-theme';\n\nexport interface MobileCardProps {\n children: React.ReactNode | React.ReactNode[];\n height: 's' | 'm';\n leftAddOn: JSX.Element | JSX.Element[];\n leftProp: JSX.Element | JSX.Element[];\n rightProp: JSX.Element[];\n subText: string[];\n subIcons: JSX.Element | JSX.Element[];\n details: string[];\n theme: Theme;\n value: number;\n expandable: boolean;\n expandedContent: JSX.Element | JSX.Element[];\n cardContent: JSX.Element | JSX.Element[];\n}\n\nexport const cardPropsTypes = {\n /**\n * card height\n */\n height: PropTypes.oneOf(['s', 'm']).description('card height'),\n /**\n * Defines mobile card title\n */\n children: PropTypes.string.description('Defines mobile card title').isRequired,\n /**\n * Wheter if the card is expandable or not\n */\n expandable: PropTypes.bool.description('Wheter if the card is expandable or not'),\n /**\n * content to display in expand card section\n */\n expandedContent: PropTypes.element.description('content to display in expand card section'),\n /**\n * Icon to the left of the card. Size is adjusted automatically.\n */\n leftAddOn: PropTypes.element.description('Icon to the left of the card. Size is adjusted automatically.'),\n /**\n * Pass an element to render left. For example a Button with an icon\n */\n leftProp: PropTypes.element.description('Pass an element to render left. For example a Button with an icon'),\n /**\n * Pass an array of 1 or 2 elements to render right. For example a Button with an icon\n */\n rightProp: PropTypes.arrayOf(PropTypes.element).description(\n 'Pass an array of 1 or 2 elements to render right. For example a Button with an icon',\n ),\n /**\n * Pass an array of 1 or 2 strings\n */\n subText: PropTypes.arrayOf(PropTypes.string).description('Pass an array of 1 or 2 strings'),\n /**\n * SubIcons component\n */\n subIcons: PropTypes.element.description('SubIcons component'),\n /**\n * Pass an array of 1, 2 or 3 strings\n */\n details: PropTypes.arrayOf(PropTypes.string).description('Pass an array of 1, 2 or 3 strings'),\n theme: PropTypes.object.description('').isRequired,\n value: PropTypes.number.description(''),\n cardContent: PropTypes.node.description('JSX content for the card'),\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { Theme } from '@elliemae/pui-theme';\n\nexport interface MobileCardProps {\n children: React.ReactNode | React.ReactNode[];\n height: 's' | 'm';\n leftAddOn: JSX.Element | JSX.Element[];\n leftProp: JSX.Element | JSX.Element[];\n rightProp: JSX.Element[];\n subText: string[];\n subIcons: JSX.Element | JSX.Element[];\n details: string[];\n theme: Theme;\n value: number;\n expandable: boolean;\n expandedContent: JSX.Element | JSX.Element[];\n cardContent: JSX.Element | JSX.Element[];\n}\n\nexport const cardPropsTypes = {\n /**\n * card height\n */\n height: PropTypes.oneOf(['s', 'm']).description('card height'),\n /**\n * Defines mobile card title\n */\n children: PropTypes.string.description('Defines mobile card title').isRequired,\n /**\n * Wheter if the card is expandable or not\n */\n expandable: PropTypes.bool.description('Wheter if the card is expandable or not'),\n /**\n * content to display in expand card section\n */\n expandedContent: PropTypes.element.description('content to display in expand card section'),\n /**\n * Icon to the left of the card. Size is adjusted automatically.\n */\n leftAddOn: PropTypes.element.description('Icon to the left of the card. Size is adjusted automatically.'),\n /**\n * Pass an element to render left. For example a Button with an icon\n */\n leftProp: PropTypes.element.description('Pass an element to render left. For example a Button with an icon'),\n /**\n * Pass an array of 1 or 2 elements to render right. For example a Button with an icon\n */\n rightProp: PropTypes.arrayOf(PropTypes.element).description(\n 'Pass an array of 1 or 2 elements to render right. For example a Button with an icon',\n ),\n /**\n * Pass an array of 1 or 2 strings\n */\n subText: PropTypes.arrayOf(PropTypes.string).description('Pass an array of 1 or 2 strings'),\n /**\n * SubIcons component\n */\n subIcons: PropTypes.element.description('SubIcons component'),\n /**\n * Pass an array of 1, 2 or 3 strings\n */\n details: PropTypes.arrayOf(PropTypes.string).description('Pass an array of 1, 2 or 3 strings'),\n theme: PropTypes.object.description('').isRequired,\n value: PropTypes.number.description(''),\n cardContent: PropTypes.node.description('JSX content for the card'),\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAmBnB,MAAM,iBAAiB;AAAA,EAI5B,QAAQ,UAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,aAAa;AAAA,EAI7D,UAAU,UAAU,OAAO,YAAY,2BAA2B,EAAE;AAAA,EAIpE,YAAY,UAAU,KAAK,YAAY,yCAAyC;AAAA,EAIhF,iBAAiB,UAAU,QAAQ,YAAY,2CAA2C;AAAA,EAI1F,WAAW,UAAU,QAAQ,YAAY,+DAA+D;AAAA,EAIxG,UAAU,UAAU,QAAQ,YAAY,mEAAmE;AAAA,EAI3G,WAAW,UAAU,QAAQ,UAAU,OAAO,EAAE;AAAA,IAC9C;AAAA,EACF;AAAA,EAIA,SAAS,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,iCAAiC;AAAA,EAI1F,UAAU,UAAU,QAAQ,YAAY,oBAAoB;AAAA,EAI5D,SAAS,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,oCAAoC;AAAA,EAC7F,OAAO,UAAU,OAAO,YAAY,EAAE,EAAE;AAAA,EACxC,OAAO,UAAU,OAAO,YAAY,EAAE;AAAA,EACtC,aAAa,UAAU,KAAK,YAAY,0BAA0B;AACpE;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import React2, { useState, useRef, useMemo } from "react";
4
4
  import { noop } from "lodash";
5
- import { describe, PropTypes } from "@elliemae/ds-utilities";
5
+ import { describe, PropTypes } from "@elliemae/ds-props-helpers";
6
6
  import { styled } from "@elliemae/ds-system";
7
7
  import { Grid } from "@elliemae/ds-grid";
8
8
  import { DSBackdrop } from "@elliemae/ds-backdrop";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileContextMenu/MobileContextMenu.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable func-names */\n/* eslint-disable max-lines */\nimport React, { useState, useRef, useMemo } from 'react';\nimport { noop } from 'lodash';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\nimport { truncate, withTheme } from '@elliemae/ds-system';\nimport { Group } from '@elliemae/ds-shared';\nimport { DSMobileContextMenuGroup as ContextMenuGroup } from './MobileContextMenuGroup';\n\nconst StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n width: ${(props) => `calc(100% - ${props.theme.space.xs})`};\n position: fixed;\n bottom: 0;\n left: ${(props) => props.theme.space.xxs};\n max-height: 90vh;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n box-shadow: 0 0px 24px 0 rgba(0, 0, 0, 0.5), 0 0px 11px 0 rgba(0, 0, 0, 0.5);\n`;\n\nconst StyledTitle = styled(Grid)`\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['000']};\n ${truncate()}\n\n & > span {\n height: 20px;\n width: 20px;\n }\n\n & > span > svg,\n svg:not([fill]) {\n height: 20px;\n width: 20px;\n fill: ${(props) => props.theme.colors.neutral['000']};\n }\n`;\n\nconst HeaderContainer = styled(Grid)`\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n background: ${(props) => props.theme.colors.brand['600']};\n`;\n\nconst isArr = (prop) => Array.isArray(prop);\n\nconst DSMobileContextMenu = withTheme(\n ({\n open = false,\n title = '',\n multiple = false,\n singleSelect = false,\n onChange = noop,\n onClickOutside = noop,\n children,\n theme,\n backdropZIndex = 1000,\n zIndex = 1001,\n dataTestid = 'mobile-context-menu',\n buttonFooter = null,\n onApply = noop,\n selecteds: initSelecteds,\n }) => {\n const [selectedItems, setSelectedItems] = useState([]);\n const trueSelected = useMemo(\n () => (initSelecteds !== undefined ? initSelecteds : [...selectedItems]),\n [initSelecteds, selectedItems],\n );\n const containerRef = useRef(null);\n const handleChange = (value, childProps, event) => {\n onChange(value, childProps, event);\n if (initSelecteds === undefined) {\n if (multiple) setSelectedItems([...value]);\n else if (singleSelect) setSelectedItems(value);\n }\n };\n\n const handleApply = function (e) {\n if (this.onClick) this.onClick(e);\n onApply(e, selectedItems);\n };\n\n const rows = [theme.space.s, 1];\n if (buttonFooter) rows.push('56px');\n\n if (!open) return null;\n\n return (\n <>\n <DSBackdrop\n type=\"cover\"\n zIndex={backdropZIndex}\n onClick={(e) => {\n // PUI-4481 prevent click on elements below backdrop\n e.stopPropagation();\n onClickOutside(e);\n }}\n />\n <StyledContainer zIndex={zIndex} rows={rows} ref={containerRef} data-testid=\"ds-mobile-context-menu\">\n <HeaderContainer justifyContent=\"center\" alignItems=\"center\" pl=\"xs\" pr=\"xs\">\n <StyledTitle alignItems=\"center\" gutter=\"xxs\" cols={Array(isArr(title) ? title.length : 1).fill('auto')}>\n {title}\n </StyledTitle>\n </HeaderContainer>\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <Group activeValue={trueSelected} multiple={multiple} onChange={handleChange}>\n {React.Children.map(children, (child, ii) => {\n const isGroup =\n child.type === (<ContextMenuGroup />).type ||\n child.type?.name === ContextMenuGroup.componentType ||\n child.type === ContextMenuGroup.type;\n const { onClick = noop } = child.props;\n const value = ii;\n let isSelected;\n if (singleSelect) isSelected = trueSelected === value;\n else if (multiple) isSelected = trueSelected.includes(value);\n return React.cloneElement(child, {\n value,\n key: `cm.${ii}`,\n isMulti: multiple,\n singleSelect,\n isSelected,\n onClick: !isGroup ? (e) => onClick(e, child.props) : null,\n selectedItems: isGroup ? trueSelected : null,\n });\n })}\n </Group>\n </Grid>\n </Grid>\n {buttonFooter && (\n <Grid pl=\"xs\" pr=\"xs\" alignItems=\"center\">\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 </Grid>\n )}\n </StyledContainer>\n </>\n );\n },\n);\n\nconst props = {\n /** toggle open the menu */\n open: PropTypes.bool.description('toggle open the menu'),\n /** context menu title */\n title: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.node])),\n ]).description('context menu title'),\n /** change handler for selectable context menu */\n onChange: PropTypes.func.description('change handler for selectable context menu'),\n /** multi select */\n multiple: PropTypes.bool.description('multi select'),\n /** click outside callback handler */\n onClickOutside: PropTypes.func.description('click outside callback handler'),\n /** array of mobile context menu items */\n children: PropTypes.arrayOf(PropTypes.element).description('array of mobile context menu items'),\n /** z index for overlay div */\n backdropZIndex: PropTypes.number.description('z index for overlay div'),\n /** z index for menu container */\n zIndex: PropTypes.number.description('z index for menu container'),\n /** for e2e tests */\n dataTestid: PropTypes.string.description('for e2e tests'),\n /** bottom button */\n buttonFooter: PropTypes.element.description('bottom button'),\n /** callback */\n onApply: PropTypes.func.description('callback'),\n /** selected elements for multi and single select */\n selecteds: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n PropTypes.number,\n ]).description('selected elements for multi and single select'),\n};\n\nDSMobileContextMenu.propTypes = props;\nDSMobileContextMenu.displayName = 'DSMobileContextMenu';\nconst DSMobileContextMenuWithSchema = describe(DSMobileContextMenu);\n\nDSMobileContextMenuWithSchema.propTypes = props;\n\nexport { DSMobileContextMenu, DSMobileContextMenuWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\n/* eslint-disable react/no-array-index-key */\n/* eslint-disable func-names */\n/* eslint-disable max-lines */\nimport React, { useState, useRef, useMemo } from 'react';\nimport { noop } from 'lodash';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSBackdrop } from '@elliemae/ds-backdrop';\nimport { truncate, withTheme } from '@elliemae/ds-system';\nimport { Group } from '@elliemae/ds-shared';\nimport { DSMobileContextMenuGroup as ContextMenuGroup } from './MobileContextMenuGroup';\n\nconst StyledContainer = styled(Grid)`\n background: ${(props) => props.theme.colors.neutral['000']};\n z-index: ${(props) => props.zIndex};\n width: ${(props) => `calc(100% - ${props.theme.space.xs})`};\n position: fixed;\n bottom: 0;\n left: ${(props) => props.theme.space.xxs};\n max-height: 90vh;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n box-shadow: 0 0px 24px 0 rgba(0, 0, 0, 0.5), 0 0px 11px 0 rgba(0, 0, 0, 0.5);\n`;\n\nconst StyledTitle = styled(Grid)`\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['000']};\n ${truncate()}\n\n & > span {\n height: 20px;\n width: 20px;\n }\n\n & > span > svg,\n svg:not([fill]) {\n height: 20px;\n width: 20px;\n fill: ${(props) => props.theme.colors.neutral['000']};\n }\n`;\n\nconst HeaderContainer = styled(Grid)`\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n background: ${(props) => props.theme.colors.brand['600']};\n`;\n\nconst isArr = (prop) => Array.isArray(prop);\n\nconst DSMobileContextMenu = withTheme(\n ({\n open = false,\n title = '',\n multiple = false,\n singleSelect = false,\n onChange = noop,\n onClickOutside = noop,\n children,\n theme,\n backdropZIndex = 1000,\n zIndex = 1001,\n dataTestid = 'mobile-context-menu',\n buttonFooter = null,\n onApply = noop,\n selecteds: initSelecteds,\n }) => {\n const [selectedItems, setSelectedItems] = useState([]);\n const trueSelected = useMemo(\n () => (initSelecteds !== undefined ? initSelecteds : [...selectedItems]),\n [initSelecteds, selectedItems],\n );\n const containerRef = useRef(null);\n const handleChange = (value, childProps, event) => {\n onChange(value, childProps, event);\n if (initSelecteds === undefined) {\n if (multiple) setSelectedItems([...value]);\n else if (singleSelect) setSelectedItems(value);\n }\n };\n\n const handleApply = function (e) {\n if (this.onClick) this.onClick(e);\n onApply(e, selectedItems);\n };\n\n const rows = [theme.space.s, 1];\n if (buttonFooter) rows.push('56px');\n\n if (!open) return null;\n\n return (\n <>\n <DSBackdrop\n type=\"cover\"\n zIndex={backdropZIndex}\n onClick={(e) => {\n // PUI-4481 prevent click on elements below backdrop\n e.stopPropagation();\n onClickOutside(e);\n }}\n />\n <StyledContainer zIndex={zIndex} rows={rows} ref={containerRef} data-testid=\"ds-mobile-context-menu\">\n <HeaderContainer justifyContent=\"center\" alignItems=\"center\" pl=\"xs\" pr=\"xs\">\n <StyledTitle alignItems=\"center\" gutter=\"xxs\" cols={Array(isArr(title) ? title.length : 1).fill('auto')}>\n {title}\n </StyledTitle>\n </HeaderContainer>\n <Grid style={{ overflow: 'hidden' }}>\n <Grid style={{ overflow: 'auto' }}>\n <Group activeValue={trueSelected} multiple={multiple} onChange={handleChange}>\n {React.Children.map(children, (child, ii) => {\n const isGroup =\n child.type === (<ContextMenuGroup />).type ||\n child.type?.name === ContextMenuGroup.componentType ||\n child.type === ContextMenuGroup.type;\n const { onClick = noop } = child.props;\n const value = ii;\n let isSelected;\n if (singleSelect) isSelected = trueSelected === value;\n else if (multiple) isSelected = trueSelected.includes(value);\n return React.cloneElement(child, {\n value,\n key: `cm.${ii}`,\n isMulti: multiple,\n singleSelect,\n isSelected,\n onClick: !isGroup ? (e) => onClick(e, child.props) : null,\n selectedItems: isGroup ? trueSelected : null,\n });\n })}\n </Group>\n </Grid>\n </Grid>\n {buttonFooter && (\n <Grid pl=\"xs\" pr=\"xs\" alignItems=\"center\">\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 </Grid>\n )}\n </StyledContainer>\n </>\n );\n },\n);\n\nconst props = {\n /** toggle open the menu */\n open: PropTypes.bool.description('toggle open the menu'),\n /** context menu title */\n title: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.node])),\n ]).description('context menu title'),\n /** change handler for selectable context menu */\n onChange: PropTypes.func.description('change handler for selectable context menu'),\n /** multi select */\n multiple: PropTypes.bool.description('multi select'),\n /** click outside callback handler */\n onClickOutside: PropTypes.func.description('click outside callback handler'),\n /** array of mobile context menu items */\n children: PropTypes.arrayOf(PropTypes.element).description('array of mobile context menu items'),\n /** z index for overlay div */\n backdropZIndex: PropTypes.number.description('z index for overlay div'),\n /** z index for menu container */\n zIndex: PropTypes.number.description('z index for menu container'),\n /** for e2e tests */\n dataTestid: PropTypes.string.description('for e2e tests'),\n /** bottom button */\n buttonFooter: PropTypes.element.description('bottom button'),\n /** callback */\n onApply: PropTypes.func.description('callback'),\n /** selected elements for multi and single select */\n selecteds: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n PropTypes.number,\n ]).description('selected elements for multi and single select'),\n};\n\nDSMobileContextMenu.propTypes = props;\nDSMobileContextMenu.displayName = 'DSMobileContextMenu';\nconst DSMobileContextMenuWithSchema = describe(DSMobileContextMenu);\n\nDSMobileContextMenuWithSchema.propTypes = props;\n\nexport { DSMobileContextMenu, DSMobileContextMenuWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACgGjB,mBACE,KASA,YAVF;AA5FN,OAAOA,UAAS,UAAU,QAAQ,eAAe;AACjD,SAAS,YAAY;AACrB,SAAS,UAAU,iBAAiB;AACpC,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,UAAU,i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,YAAY,eAAe;AAAA,EAExD,cAAc,UAAU,QAAQ,YAAY,eAAe;AAAA,EAE3D,SAAS,UAAU,KAAK,YAAY,UAAU;AAAA,EAE9C,WAAW,UAAU,UAAU;AAAA,IAC7B,UAAU,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,CAAC;AAAA,IAC3E,UAAU;AAAA,EACZ,CAAC,EAAE,YAAY,+CAA+C;AAChE;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,gCAAgC,SAAS,mBAAmB;AAElE,8BAA8B,YAAY;",
6
6
  "names": ["React", "props"]
7
7
  }
@@ -4,7 +4,7 @@ import React2 from "react";
4
4
  import { styled } from "@elliemae/ds-system";
5
5
  import { Grid } from "@elliemae/ds-grid";
6
6
  import { noop } from "lodash";
7
- import { PropTypes, describe } from "@elliemae/ds-utilities";
7
+ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
8
8
  const Title = styled.div`
9
9
  height: 24px;
10
10
  line-height: 24px;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileContextMenu/MobileContextMenuGroup.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { noop } from 'lodash';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\n\nconst Title = styled.div`\n height: 24px;\n line-height: 24px;\n font-size: 12px;\n border-top: 1px solid ${(props) => props.theme.colors.brand['300']};\n background: ${(props) => props.theme.colors.brand['200']};\n padding: 0 ${(props) => props.theme.space.xs};\n color: ${(props) => props.theme.colors.neutral['700']};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n`;\n\nconst DSMobileContextMenuGroup = ({ title, isMulti, singleSelect, children, value: groupValue, selectedItems }) => (\n <Grid>\n <Grid>\n <Title>{title}</Title>\n </Grid>\n <Grid>\n {React.Children.map(children, (child, index) => {\n const { onClick = noop } = child.props;\n const value = `${groupValue}:${index}`;\n let isSelected;\n if (singleSelect) isSelected = selectedItems === value;\n else if (isMulti) isSelected = selectedItems.includes(value);\n return React.cloneElement(child, {\n value,\n key: 'group.'.concat(index),\n isGroup: true,\n isMulti,\n singleSelect,\n isSelected,\n onClick: (e) => onClick(e, { value, ...child.props }),\n });\n })}\n </Grid>\n </Grid>\n);\n\nconst props = {\n /**\n * Group title\n */\n title: PropTypes.string.isRequired.description('group title'),\n /**\n * Array of MobileContextMenuItem\n */\n children: PropTypes.node.isRequired.description('Array of MobileContextMenuItem'),\n /** multi select */\n isMulti: PropTypes.bool.description('multi select'),\n /** single select */\n singleSelect: PropTypes.bool.description('single select'),\n /** value for select */\n value: PropTypes.string.description('value for select'),\n /** selected items, array for multi, string for single */\n selectedItems: PropTypes.oneOfType([PropTypes.array, PropTypes.string]).description(\n 'selected items, array for multi, string for single',\n ),\n};\n\nDSMobileContextMenuGroup.propTypes = props;\nDSMobileContextMenuGroup.componentType = 'DSMobileContextMenuGroup';\nDSMobileContextMenuGroup.displayName = 'DSMobileContextMenuGroup';\nconst DSMobileContextMenuGroupWithSchema = describe(DSMobileContextMenuGroup);\n\nDSMobileContextMenuGroupWithSchema.propTypes = props;\n\nexport { DSMobileContextMenuGroup, DSMobileContextMenuGroupWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { noop } from 'lodash';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\n\nconst Title = styled.div`\n height: 24px;\n line-height: 24px;\n font-size: 12px;\n border-top: 1px solid ${(props) => props.theme.colors.brand['300']};\n background: ${(props) => props.theme.colors.brand['200']};\n padding: 0 ${(props) => props.theme.space.xs};\n color: ${(props) => props.theme.colors.neutral['700']};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n`;\n\nconst DSMobileContextMenuGroup = ({ title, isMulti, singleSelect, children, value: groupValue, selectedItems }) => (\n <Grid>\n <Grid>\n <Title>{title}</Title>\n </Grid>\n <Grid>\n {React.Children.map(children, (child, index) => {\n const { onClick = noop } = child.props;\n const value = `${groupValue}:${index}`;\n let isSelected;\n if (singleSelect) isSelected = selectedItems === value;\n else if (isMulti) isSelected = selectedItems.includes(value);\n return React.cloneElement(child, {\n value,\n key: 'group.'.concat(index),\n isGroup: true,\n isMulti,\n singleSelect,\n isSelected,\n onClick: (e) => onClick(e, { value, ...child.props }),\n });\n })}\n </Grid>\n </Grid>\n);\n\nconst props = {\n /**\n * Group title\n */\n title: PropTypes.string.isRequired.description('group title'),\n /**\n * Array of MobileContextMenuItem\n */\n children: PropTypes.node.isRequired.description('Array of MobileContextMenuItem'),\n /** multi select */\n isMulti: PropTypes.bool.description('multi select'),\n /** single select */\n singleSelect: PropTypes.bool.description('single select'),\n /** value for select */\n value: PropTypes.string.description('value for select'),\n /** selected items, array for multi, string for single */\n selectedItems: PropTypes.oneOfType([PropTypes.array, PropTypes.string]).description(\n 'selected items, array for multi, string for single',\n ),\n};\n\nDSMobileContextMenuGroup.propTypes = props;\nDSMobileContextMenuGroup.componentType = 'DSMobileContextMenuGroup';\nDSMobileContextMenuGroup.displayName = 'DSMobileContextMenuGroup';\nconst DSMobileContextMenuGroupWithSchema = describe(DSMobileContextMenuGroup);\n\nDSMobileContextMenuGroupWithSchema.propTypes = props;\n\nexport { DSMobileContextMenuGroup, DSMobileContextMenuGroupWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACkBrB,SAEI,KAFJ;AAlBF,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,WAAW,gBAAgB;AAEpC,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA,0BAIK,CAACC,WAAUA,OAAM,MAAM,OAAO,MAAM;AAAA,gBAC9C,CAAC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ACvC,MAAM,qCAAqC,SAAS,wBAAwB;AAE5E,mCAAmC,YAAY;",
6
6
  "names": ["React", "props"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { PropTypes, describe } from "@elliemae/ds-utilities";
3
+ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
4
4
  import { Grid } from "@elliemae/ds-grid";
5
5
  import { styled, truncate } from "@elliemae/ds-system";
6
6
  import { GroupItem } from "@elliemae/ds-shared";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileContextMenu/MobileContextMenuItem.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable import/no-unresolved */\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled, truncate } from '@elliemae/ds-system';\nimport { GroupItem } from '@elliemae/ds-shared';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { DSMobileTouchable } from '../MobileTouchable';\n\nconst Wrap = styled((props) => <DSMobileTouchable {...props} />)`\n border-bottom: none;\n`;\n\nconst PropWrap = styled((props) => <Grid {...props} />)`\n ${(props) => {\n if (!props.isMulti) {\n return `\n & > span {\n height: 18px;\n width: 18px;\n }\n\n & > span > svg {\n height: 18px;\n width: 18px;\n }\n `;\n }\n return '';\n }}\n`;\n\nconst Title = styled.span`\n font-size: 16px;\n color: ${(props) => props.theme.colors.brand['600']};\n ${truncate()}\n`;\n\nconst Label = styled.span`\n font-size: 13px;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\n\nconst CheckMark = styled(Checkmark)`\n fill: ${(props) => props.theme.colors.brand['600']};\n`;\ninterface DSMobileContextMenuItemPropsT {\n label: string;\n title: string;\n leftProp: JSX.Element;\n isGroup: boolean;\n isMulti: boolean;\n isSelected: boolean;\n singleSelect: boolean;\n onClick: (e: any) => void;\n value: string;\n}\nconst DSMobileContextMenuItem = ({\n label,\n title,\n leftProp,\n rightAddon,\n isGroup,\n isMulti,\n singleSelect,\n isSelected,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onClick = () => {},\n value,\n}: DSMobileContextMenuItemPropsT): JSX.Element => (\n <GroupItem\n render={(context) => {\n const { activeValue } = context;\n let someItemSelected = activeValue >= 0 && !Array.isArray(activeValue);\n if (isGroup) someItemSelected = typeof activeValue === 'string';\n\n let showLeftAddon = isSelected;\n if (isMulti || !singleSelect) showLeftAddon = true;\n\n let leftAddon = leftProp || null;\n if (isMulti) leftAddon = <DSCheckbox checked={isSelected} data-testid=\"leftAddon-checkbox\" />;\n if (singleSelect) leftAddon = <CheckMark data-testid=\"leftAddon-checkmark\" />;\n\n const cols =\n (singleSelect && someItemSelected) || (leftAddon && !singleSelect) || isMulti ? ['40px', 'auto'] : ['auto'];\n if (rightAddon) cols.push('40px');\n return (\n <Wrap\n data-testid=\"ds-contextmenu-item\"\n onClick={(e) => {\n if (singleSelect || isMulti) context.onChange(value, e, { value, label, title });\n onClick(e);\n }}\n cols={cols}\n >\n {((singleSelect && someItemSelected) || isMulti || leftAddon) && (\n <PropWrap data-testid=\"left-addon\" isMulti={isMulti} alignItems=\"center\" justifyContent=\"center\" pl=\"16px\">\n {showLeftAddon && leftAddon}\n </PropWrap>\n )}\n <Grid height=\"44px\" pr=\"xs\" pl={!leftAddon && isGroup ? '24px' : 'xs'}>\n {label && (\n <Grid alignItems=\"center\">\n <Label data-testid=\"contextMenuItem-label\">{label}</Label>\n </Grid>\n )}\n <Grid alignItems={!label ? 'center' : undefined}>\n <Title data-testid=\"contextMenuItem-title\">{title}</Title>\n </Grid>\n </Grid>\n {rightAddon ? (\n <PropWrap data-testid=\"right-addon\" alignItems=\"center\" justifyContent=\"center\">\n {rightAddon}\n </PropWrap>\n ) : null}\n </Wrap>\n );\n }}\n />\n);\n\nconst props = {\n /** label */\n label: PropTypes.string.description('label'),\n /** menu item title */\n title: PropTypes.string.isRequired.description('menu item title'),\n /** */\n leftProp: PropTypes.element.description(''),\n /** multi select */\n isMulti: PropTypes.bool.description('multi select'),\n /** */\n singleSelect: PropTypes.bool.description(''),\n /** */\n isGroup: PropTypes.bool.description(''),\n /** on click handler */\n onClick: PropTypes.func.description('on click handler'),\n /** value for select */\n value: PropTypes.number.description('value for select'),\n /** selected value */\n isSelected: PropTypes.bool.description('selected value'),\n};\n\nDSMobileContextMenuItem.propTypes = props;\nDSMobileContextMenuItem.displayName = 'DSMobileContextMenuItem';\nconst DSMobileContextMenuItemWithSchema = describe(DSMobileContextMenuItem);\n\nDSMobileContextMenuItemWithSchema.propTypes = props;\n\nexport { DSMobileContextMenuItem, DSMobileContextMenuItemWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable import/no-unresolved */\nimport React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled, truncate } from '@elliemae/ds-system';\nimport { GroupItem } from '@elliemae/ds-shared';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport { DSMobileTouchable } from '../MobileTouchable';\n\nconst Wrap = styled((props) => <DSMobileTouchable {...props} />)`\n border-bottom: none;\n`;\n\nconst PropWrap = styled((props) => <Grid {...props} />)`\n ${(props) => {\n if (!props.isMulti) {\n return `\n & > span {\n height: 18px;\n width: 18px;\n }\n\n & > span > svg {\n height: 18px;\n width: 18px;\n }\n `;\n }\n return '';\n }}\n`;\n\nconst Title = styled.span`\n font-size: 16px;\n color: ${(props) => props.theme.colors.brand['600']};\n ${truncate()}\n`;\n\nconst Label = styled.span`\n font-size: 13px;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\n\nconst CheckMark = styled(Checkmark)`\n fill: ${(props) => props.theme.colors.brand['600']};\n`;\ninterface DSMobileContextMenuItemPropsT {\n label: string;\n title: string;\n leftProp: JSX.Element;\n isGroup: boolean;\n isMulti: boolean;\n isSelected: boolean;\n singleSelect: boolean;\n onClick: (e: any) => void;\n value: string;\n}\nconst DSMobileContextMenuItem = ({\n label,\n title,\n leftProp,\n rightAddon,\n isGroup,\n isMulti,\n singleSelect,\n isSelected,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onClick = () => {},\n value,\n}: DSMobileContextMenuItemPropsT): JSX.Element => (\n <GroupItem\n render={(context) => {\n const { activeValue } = context;\n let someItemSelected = activeValue >= 0 && !Array.isArray(activeValue);\n if (isGroup) someItemSelected = typeof activeValue === 'string';\n\n let showLeftAddon = isSelected;\n if (isMulti || !singleSelect) showLeftAddon = true;\n\n let leftAddon = leftProp || null;\n if (isMulti) leftAddon = <DSCheckbox checked={isSelected} data-testid=\"leftAddon-checkbox\" />;\n if (singleSelect) leftAddon = <CheckMark data-testid=\"leftAddon-checkmark\" />;\n\n const cols =\n (singleSelect && someItemSelected) || (leftAddon && !singleSelect) || isMulti ? ['40px', 'auto'] : ['auto'];\n if (rightAddon) cols.push('40px');\n return (\n <Wrap\n data-testid=\"ds-contextmenu-item\"\n onClick={(e) => {\n if (singleSelect || isMulti) context.onChange(value, e, { value, label, title });\n onClick(e);\n }}\n cols={cols}\n >\n {((singleSelect && someItemSelected) || isMulti || leftAddon) && (\n <PropWrap data-testid=\"left-addon\" isMulti={isMulti} alignItems=\"center\" justifyContent=\"center\" pl=\"16px\">\n {showLeftAddon && leftAddon}\n </PropWrap>\n )}\n <Grid height=\"44px\" pr=\"xs\" pl={!leftAddon && isGroup ? '24px' : 'xs'}>\n {label && (\n <Grid alignItems=\"center\">\n <Label data-testid=\"contextMenuItem-label\">{label}</Label>\n </Grid>\n )}\n <Grid alignItems={!label ? 'center' : undefined}>\n <Title data-testid=\"contextMenuItem-title\">{title}</Title>\n </Grid>\n </Grid>\n {rightAddon ? (\n <PropWrap data-testid=\"right-addon\" alignItems=\"center\" justifyContent=\"center\">\n {rightAddon}\n </PropWrap>\n ) : null}\n </Wrap>\n );\n }}\n />\n);\n\nconst props = {\n /** label */\n label: PropTypes.string.description('label'),\n /** menu item title */\n title: PropTypes.string.isRequired.description('menu item title'),\n /** */\n leftProp: PropTypes.element.description(''),\n /** multi select */\n isMulti: PropTypes.bool.description('multi select'),\n /** */\n singleSelect: PropTypes.bool.description(''),\n /** */\n isGroup: PropTypes.bool.description(''),\n /** on click handler */\n onClick: PropTypes.func.description('on click handler'),\n /** value for select */\n value: PropTypes.number.description('value for select'),\n /** selected value */\n isSelected: PropTypes.bool.description('selected value'),\n};\n\nDSMobileContextMenuItem.propTypes = props;\nDSMobileContextMenuItem.displayName = 'DSMobileContextMenuItem';\nconst DSMobileContextMenuItemWithSchema = describe(DSMobileContextMenuItem);\n\nDSMobileContextMenuItemWithSchema.propTypes = props;\n\nexport { DSMobileContextMenuItem, DSMobileContextMenuItemWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACYQ,cA2FrB,YA3FqB;AAR/B,SAAS,WAAW,gBAAgB;AACpC,SAAS,YAAY;AACrB,SAAS,QAAQ,gBAAgB;AACjC,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,yBAAyB;AAElC,MAAM,OAAO,OAAO,CAACA,WAAU,oBAAC,qBAAmB,GAAGA,QAAO,CAAE;AAAA;AAAA;AAI/D,MAAM,WAAW,OAAO,CAACA,WAAU,oBAAC,QAAM,GAAGA,QAAO,CAAE;AAAA,IAClD,CAACA,WAAU;AACX,MAAI,CAACA,OAAM,SAAS;AAClB,WAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWT;AACA,SAAO;AACT;AAAA;AAGF,MAAM,QAAQ,OAAO;AAAA;AAAA,WAEV,CAACA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IAAG,QACjG,2BAAiB,WACpB;AAAA,YAEF,qBAAC,QAAK,QAAO,QAAO,IAAG,MAAK,IAAI,CAAC,aAAa,UAAU,SAAS,MAC9D;AAAA,uBACC,oBAAC,QAAK,YAAW,UACf,8BAAC,SAAM,eAAY,yBAAyB,iBAAM,GACpD;AAAA,cAEF,oBAAC,QAAK,YAAY,CAAC,QAAQ,WAAW,QACpC,8BAAC,SAAM,eAAY,yBAAyB,iBAAM,GACpD;AAAA,eACF;AAAA,YACC,aACC,oBAAC,YAAS,eAAY,eAAc,YAAW,UAAS,gBAAe,UACpE,sBACH,IACE;AAAA;AAAA;AAAA,MACN;AAAA,IAEJ;AAAA;AACF;AAGF,MAAM,QAAQ;AAAA,EAEZ,OAAO,UAAU,OAAO,YAAY,OAAO;AAAA,EAE3C,OAAO,UAAU,OAAO,WAAW,YAAY,iBAAiB;AAAA,EAEhE,UAAU,UAAU,QAAQ,YAAY,EAAE;AAAA,EAE1C,SAAS,UAAU,KAAK,YAAY,cAAc;AAAA,EAElD,cAAc,UAAU,KAAK,YAAY,EAAE;AAAA,EAE3C,SAAS,UAAU,KAAK,YAAY,EAAE;AAAA,EAEtC,SAAS,UAAU,KAAK,YAAY,kBAAkB;AAAA,EAEtD,OAAO,UAAU,OAAO,YAAY,kBAAkB;AAAA,EAEtD,YAAY,UAAU,KAAK,YAAY,gBAAgB;AACzD;AAEA,wBAAwB,YAAY;AACpC,wBAAwB,cAAc;AACtC,MAAM,oCAAoC,SAAS,uBAAuB;AAE1E,kCAAkC,YAAY;",
6
6
  "names": ["props"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { useRef, useEffect } from "react";
4
- import { PropTypes, describe } from "@elliemae/ds-utilities";
4
+ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
5
5
  import { DSIconColors } from "@elliemae/ds-icon";
6
6
  import { DatePicker } from "@elliemae/ds-icons";
7
7
  import DSButton from "@elliemae/ds-button";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileDatePicker/MobileDatePicker.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useEffect } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { DatePicker } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { DSInputGroup } from '@elliemae/ds-form';\nimport { Input } from './Input';\n\nconst DSMobileDatePicker = ({ disabled, value, tabIndex, placeholder, onChange }) => {\n const inputRef = useRef(null);\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 valueArr = value.split('-');\n const displayValue = value && `${valueArr[1]} / ${valueArr[2]} / ${valueArr[0]}`;\n return (\n <DSInputGroup\n rightAddon={\n <DSButton\n aria-label=\"Date Picker Button\"\n color={!disabled ? DSIconColors.PRIMARY : DSIconColors.NEUTRAL}\n disabled={disabled}\n icon={<DatePicker />}\n type=\"button\"\n buttonType=\"secondary\"\n onClick={() => {\n inputRef.current.focus();\n inputRef.current.click();\n }}\n />\n }\n >\n <Input\n data-testid=\"ds-mobile-date-picker\"\n innerRef={inputRef}\n aria-label=\"Date Picker Input Mask\"\n disabled={disabled}\n onKeyDown={(e) => e.preventDefault()}\n type=\"date\"\n placeholder={placeholder}\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 tabIndex={tabIndex}\n value={value}\n data-displayvalue={displayValue}\n />\n </DSInputGroup>\n );\n};\n\nDSMobileDatePicker.defaultProps = {\n disabled: false,\n tabIndex: 0,\n placeholder: 'MM / DD / YYYY',\n};\n\nconst props = {\n /**\n * defaults to false\n */\n disabled: PropTypes.bool.description('defaults to false'),\n /**\n * 0 as default\n */\n tabIndex: PropTypes.number.description('0 as default'),\n /**\n * MM / DD / YYYY as default\n */\n placeholder: PropTypes.string.description('MM / DD / YYYY 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 * ISO8601 string representing the date in format YYYY-MM-DD or empty string\n */\n value: PropTypes.string.description('ISO8601 string representing the date in format YYYY-MM-DD or empty string'),\n};\n\nDSMobileDatePicker.propTypes = props;\nDSMobileDatePicker.displayName = 'DSMobileDatePicker';\nconst DSMobileDatePickerWithSchema = describe(DSMobileDatePicker);\n\nDSMobileDatePickerWithSchema.propTypes = props;\n\nexport { DSMobileDatePicker, DSMobileDatePickerWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useRef, useEffect } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSIconColors } from '@elliemae/ds-icon';\nimport { DatePicker } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { DSInputGroup } from '@elliemae/ds-form';\nimport { Input } from './Input';\n\nconst DSMobileDatePicker = ({ disabled, value, tabIndex, placeholder, onChange }) => {\n const inputRef = useRef(null);\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 valueArr = value.split('-');\n const displayValue = value && `${valueArr[1]} / ${valueArr[2]} / ${valueArr[0]}`;\n return (\n <DSInputGroup\n rightAddon={\n <DSButton\n aria-label=\"Date Picker Button\"\n color={!disabled ? DSIconColors.PRIMARY : DSIconColors.NEUTRAL}\n disabled={disabled}\n icon={<DatePicker />}\n type=\"button\"\n buttonType=\"secondary\"\n onClick={() => {\n inputRef.current.focus();\n inputRef.current.click();\n }}\n />\n }\n >\n <Input\n data-testid=\"ds-mobile-date-picker\"\n innerRef={inputRef}\n aria-label=\"Date Picker Input Mask\"\n disabled={disabled}\n onKeyDown={(e) => e.preventDefault()}\n type=\"date\"\n placeholder={placeholder}\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 tabIndex={tabIndex}\n value={value}\n data-displayvalue={displayValue}\n />\n </DSInputGroup>\n );\n};\n\nDSMobileDatePicker.defaultProps = {\n disabled: false,\n tabIndex: 0,\n placeholder: 'MM / DD / YYYY',\n};\n\nconst props = {\n /**\n * defaults to false\n */\n disabled: PropTypes.bool.description('defaults to false'),\n /**\n * 0 as default\n */\n tabIndex: PropTypes.number.description('0 as default'),\n /**\n * MM / DD / YYYY as default\n */\n placeholder: PropTypes.string.description('MM / DD / YYYY 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 * ISO8601 string representing the date in format YYYY-MM-DD or empty string\n */\n value: PropTypes.string.description('ISO8601 string representing the date in format YYYY-MM-DD or empty string'),\n};\n\nDSMobileDatePicker.propTypes = props;\nDSMobileDatePicker.displayName = 'DSMobileDatePicker';\nconst DSMobileDatePickerWithSchema = describe(DSMobileDatePicker);\n\nDSMobileDatePickerWithSchema.propTypes = props;\n\nexport { DSMobileDatePicker, DSMobileDatePickerWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;AC6BP;AA7BhB,SAAgB,QAAQ,iBAAiB;AACzC,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,OAAO,cAAc;AACrB,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAEtB,MAAM,qBAAqB,CAAC,EAAE,UAAU,OAAO,UAAU,aAAa,SAAS,MAAM;AACn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,UAAU,KAAK,YAAY,2DAA2D;AAAA,EAIhG,OAAO,UAAU,OAAO,YAAY,2EAA2E;AACjH;AAEA,mBAAmB,YAAY;AAC/B,mBAAmB,cAAc;AACjC,MAAM,+BAA+B,SAAS,kBAAkB;AAEhE,6BAA6B,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import React2, { useRef, useState } from "react";
4
- import { PropTypes, describe } from "@elliemae/ds-utilities";
4
+ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
5
5
  import {
6
6
  DSMobileContextMenu,
7
7
  DSMobileContextMenuItem
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileDropdownMenu/MobileDropdownMenu.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useRef, useState } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport {\n DSMobileContextMenu,\n DSMobileContextMenuItem,\n} from '../MobileContextMenu';\n\nimport { DSMobileDropdownTriggerInput } from './MobileDropdownInput';\ninterface OptionT {\n label: string;\n value: string;\n}\ninterface DSMobileDropdownMenuPropsT {\n placeholder: string;\n value: string;\n options: OptionT[];\n title: string;\n itemsProps: {\n label?: string;\n leftProp?: JSX.Element;\n isGroup?: boolean;\n isMulti?: boolean;\n singleSelect?: boolean;\n isItemSelected?: (opt: OptionT) => boolean;\n onClick?: (opt: OptionT, e: any) => void;\n };\n}\nconst DSMobileDropdownMenu = ({\n placeholder,\n options = [],\n title,\n value,\n itemsProps = {\n label: undefined,\n leftProp: undefined,\n isGroup: false,\n isMulti: false,\n singleSelect: false,\n isItemSelected: () => false,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onClick: () => {},\n },\n}: DSMobileDropdownMenuPropsT): JSX.Element => {\n const [menuOpen, setMenuOpen] = useState(false);\n const inputRef = useRef(null);\n const inputProps = React.useMemo(\n () => ({\n readOnly: true,\n value,\n onClick: () => setMenuOpen(true),\n ref: inputRef,\n placeholder,\n }),\n [value, placeholder],\n );\n const caretProps = React.useMemo(\n () => ({\n onClick: () => {\n inputRef.current.focus();\n setMenuOpen(true);\n },\n }),\n [],\n );\n return (\n <>\n <DSMobileDropdownTriggerInput\n inputProps={inputProps}\n caretProps={caretProps}\n />\n {menuOpen ? (\n <DSMobileContextMenu\n title={title}\n open\n onChange={(_, e) => {\n setMenuOpen(false);\n }}\n onClickOutside={() => setMenuOpen(false)}\n >\n {options.map((opt, i) => (\n <DSMobileContextMenuItem\n key={'ddwn'.concat(`${i}`)}\n title={opt.label}\n value={opt.value}\n isSelected={itemsProps.isItemSelected(opt)}\n onClick={(e) => {\n setMenuOpen(false);\n itemsProps.onClick(opt, e);\n }}\n label={itemsProps.label}\n leftProp={itemsProps.leftProp}\n isGroup={itemsProps.isGroup}\n isMulti={itemsProps.isMulti}\n singleSelect={itemsProps.singleSelect}\n />\n ))}\n </DSMobileContextMenu>\n ) : null}\n </>\n );\n};\n\nconst props = {\n /** dropdown menu placeholder */\n placeholder: PropTypes.string.description('dropdown menu placeholder'),\n /** context menu menu title */\n title: PropTypes.string.description('context menu menu title'),\n /** context menu options / items */\n options: PropTypes.arrayOf(\n PropTypes.shape({ value: PropTypes.string, label: PropTypes.string }),\n ).description('context menu options / items'),\n};\n\nDSMobileDropdownMenu.propTypes = props;\nDSMobileDropdownMenu.displayName = 'DSMobileDropdownMenu';\nconst DSMobileDropdownMenuWithSchema = describe(DSMobileDropdownMenu);\nDSMobileDropdownMenuWithSchema.propTypes = props;\n\nexport { DSMobileDropdownMenu, DSMobileDropdownMenuWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACkEnB,mBACE,KADF;AAjEJ,OAAOA,UAAS,QAAQ,gBAAgB;AACxC,SAAS,WAAW,gBAAgB;AACpC;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,YAC3B;AAAA,YACA,OAAO,WAAW;AAAA,YAClB,UAAU,WAAW;AAAA,YACrB,SAAS,WAAW;AAAA,YACpB,SAAS,WAAW;AAAA,YACpB,cAAc,WAAW;AAAA;AAAA,UAZpB,OAAO,OAAO,GAAG,GAAG;AAAA,QAa3B,CACD;AAAA;AAAA,IACH,IACE;AAAA,KACN;AAEJ;AAEA,MAAM,QAAQ;AAAA,EAEZ,aAAa,UAAU,OAAO,YAAY,2BAA2B;AAAA,EAErE,OAAO,UAAU,OAAO,YAAY,yBAAyB;AAAA,EAE7D,SAAS,UAAU;AAAA,IACjB,UAAU,MAAM,EAAE,OAAO,UAAU,QAAQ,OAAO,UAAU,OAAO,CAAC;AAAA,EACtE,EAAE,YAAY,8BAA8B;AAC9C;AAEA,qBAAqB,YAAY;AACjC,qBAAqB,cAAc;AACnC,MAAM,iCAAiC,SAAS,oBAAoB;AACpE,+BAA+B,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useRef, useState } from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport {\n DSMobileContextMenu,\n DSMobileContextMenuItem,\n} from '../MobileContextMenu';\nimport { DSMobileDropdownTriggerInput } from './MobileDropdownInput';\ninterface OptionT {\n label: string;\n value: string;\n}\ninterface DSMobileDropdownMenuPropsT {\n placeholder: string;\n value: string;\n options: OptionT[];\n title: string;\n itemsProps: {\n label?: string;\n leftProp?: JSX.Element;\n isGroup?: boolean;\n isMulti?: boolean;\n singleSelect?: boolean;\n isItemSelected?: (opt: OptionT) => boolean;\n onClick?: (opt: OptionT, e: any) => void;\n };\n}\nconst DSMobileDropdownMenu = ({\n placeholder,\n options = [],\n title,\n value,\n itemsProps = {\n label: undefined,\n leftProp: undefined,\n isGroup: false,\n isMulti: false,\n singleSelect: false,\n isItemSelected: () => false,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onClick: () => {},\n },\n}: DSMobileDropdownMenuPropsT): JSX.Element => {\n const [menuOpen, setMenuOpen] = useState(false);\n const inputRef = useRef(null);\n const inputProps = React.useMemo(\n () => ({\n readOnly: true,\n value,\n onClick: () => setMenuOpen(true),\n ref: inputRef,\n placeholder,\n }),\n [value, placeholder],\n );\n const caretProps = React.useMemo(\n () => ({\n onClick: () => {\n inputRef.current.focus();\n setMenuOpen(true);\n },\n }),\n [],\n );\n return (\n <>\n <DSMobileDropdownTriggerInput\n inputProps={inputProps}\n caretProps={caretProps}\n />\n {menuOpen ? (\n <DSMobileContextMenu\n title={title}\n open\n onChange={(_, e) => {\n setMenuOpen(false);\n }}\n onClickOutside={() => setMenuOpen(false)}\n >\n {options.map((opt, i) => (\n <DSMobileContextMenuItem\n key={'ddwn'.concat(`${i}`)}\n title={opt.label}\n value={opt.value}\n isSelected={itemsProps.isItemSelected(opt)}\n onClick={(e) => {\n setMenuOpen(false);\n itemsProps.onClick(opt, e);\n }}\n label={itemsProps.label}\n leftProp={itemsProps.leftProp}\n isGroup={itemsProps.isGroup}\n isMulti={itemsProps.isMulti}\n singleSelect={itemsProps.singleSelect}\n />\n ))}\n </DSMobileContextMenu>\n ) : null}\n </>\n );\n};\n\nconst props = {\n /** dropdown menu placeholder */\n placeholder: PropTypes.string.description('dropdown menu placeholder'),\n /** context menu menu title */\n title: PropTypes.string.description('context menu menu title'),\n /** context menu options / items */\n options: PropTypes.arrayOf(\n PropTypes.shape({ value: PropTypes.string, label: PropTypes.string }),\n ).description('context menu options / items'),\n};\n\nDSMobileDropdownMenu.propTypes = props;\nDSMobileDropdownMenu.displayName = 'DSMobileDropdownMenu';\nconst DSMobileDropdownMenuWithSchema = describe(DSMobileDropdownMenu);\nDSMobileDropdownMenuWithSchema.propTypes = props;\n\nexport { DSMobileDropdownMenu, DSMobileDropdownMenuWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACiEnB,mBACE,KADF;AAhEJ,OAAOA,UAAS,QAAQ,gBAAgB;AACxC,SAA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AQ,KAAK,CAAC;AAAA,YAC3B;AAAA,YACA,OAAO,WAAW;AAAA,YAClB,UAAU,WAAW;AAAA,YACrB,SAAS,WAAW;AAAA,YACpB,SAAS,WAAW;AAAA,YACpB,cAAc,WAAW;AAAA;AAAA,UAZpB,OAAO,OAAO,GAAG,GAAG;AAAA,QAa3B,CACD;AAAA;AAAA,IACH,IACE;AAAA,KACN;AAEJ;AAEA,MAAM,QAAQ;AAAA,EAEZ,aAAa,UAAU,OAAO,YAAY,2BAA2B;AAAA,EAErE,OAAO,UAAU,OAAO,YAAY,yBAAyB;AAAA,EAE7D,SAAS,UAAU;AAAA,IACjB,UAAU,MAAM,EAAE,OAAO,UAAU,QAAQ,OAAO,UAAU,OAAO,CAAC;AAAA,EACtE,EAAE,YAAY,8BAA8B;AAC9C;AAEA,qBAAqB,YAAY;AACjC,qBAAqB,cAAc;AACnC,MAAM,iCAAiC,SAAS,oBAAoB;AACpE,+BAA+B,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { styled } from "@elliemae/ds-system";
4
- import { PropTypes, describe } from "@elliemae/ds-utilities";
4
+ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
5
5
  import { Search } from "@elliemae/ds-icons";
6
6
  const Wrapper = styled.div`
7
7
  display: flex;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileEmtpyState/MobileEmptyState.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { Search } from '@elliemae/ds-icons';\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n`;\n\nconst Label = styled.p`\n color: ${(props) => props.theme.colors.neutral['600']};\n font-size: ${(props) => props.theme.space.xs};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n`;\n\ninterface EmptyStateT {\n label: string;\n Icon: () => JSX.Element;\n}\n\nconst DSMobileEmptyState: React.ComponentType<EmptyStateT> = ({ label = 'No search results found.', Icon }) => (\n <Wrapper>\n {Icon ? <Icon /> : <Search size=\"xxl\" color={['neutral', 400]} />}\n <Label>{label}</Label>\n </Wrapper>\n);\n\nconst props = {\n /** empty state label */\n label: PropTypes.string.description('empty state label'),\n icon: PropTypes.node.description('empty state icon'),\n};\n\nDSMobileEmptyState.propTypes = props;\nDSMobileEmptyState.displayName = 'DSMobileEmptyState';\nconst DSMobileEmptyStateWithSchema = describe(DSMobileEmptyState);\nDSMobileEmptyStateWithSchema.propTypes = props;\n\nexport { DSMobileEmptyState, DSMobileEmptyStateWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { Search } from '@elliemae/ds-icons';\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n`;\n\nconst Label = styled.p`\n color: ${(props) => props.theme.colors.neutral['600']};\n font-size: ${(props) => props.theme.space.xs};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n`;\n\ninterface EmptyStateT {\n label: string;\n Icon: () => JSX.Element;\n}\n\nconst DSMobileEmptyState: React.ComponentType<EmptyStateT> = ({ label = 'No search results found.', Icon }) => (\n <Wrapper>\n {Icon ? <Icon /> : <Search size=\"xxl\" color={['neutral', 400]} />}\n <Label>{label}</Label>\n </Wrapper>\n);\n\nconst props = {\n /** empty state label */\n label: PropTypes.string.description('empty state label'),\n icon: PropTypes.node.description('empty state icon'),\n};\n\nDSMobileEmptyState.propTypes = props;\nDSMobileEmptyState.displayName = 'DSMobileEmptyState';\nconst DSMobileEmptyStateWithSchema = describe(DSMobileEmptyState);\nDSMobileEmptyStateWithSchema.propTypes = props;\n\nexport { DSMobileEmptyState, DSMobileEmptyStateWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACyBrB,SACU,KADV;AAxBF,SAAS,cAAc;AACvB,SAAS,WAAW,gBAAgB;AACpC,SAAS,cAAc;AAEvB,MAAM,UAAU,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQvB,MAAM,QAAQ,OAAO;AAAA,WACV,CAACA,WAAUA,OAAM,MAAM,OAAO,QAAQ;AAAA,eAClC,CAACA,WAAUA,OAAM,MAAM,MAAM;AAAA,iBAC3B,CAACA,WAAUA,OAAM,MAAM,YAAY;AAAA;AAQpD,MAAM,qBAAuD,CAAC,EAAE,QAAQ,4BAA4B,KAAK,MACvG,qBAAC,WACE;AAAA,SAAO,oBAAC,QAAK,IAAK,oBAAC,UAAO,MAAK,OAAM,OAAO,CAAC,WAAW,GAAG,GAAG;AAAA,EAC/D,oBAAC,SAAO,iBAAM;AAAA,GAChB;AAGF,MAAM,QAAQ;AAAA,EAEZ,OAAO,UAAU,OAAO,YAAY,mBAAmB;AAAA,EACvD,MAAM,UAAU,KAAK,YAAY,kBAAkB;AACrD;AAEA,mBAAmB,YAAY;AAC/B,mBAAmB,cAAc;AACjC,MAAM,+BAA+B,SAAS,kBAAkB;AAChE,6BAA6B,YAAY;",
6
6
  "names": ["props"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { styled } from "@elliemae/ds-system";
4
- import { describe, PropTypes } from "@elliemae/ds-utilities";
4
+ import { describe, PropTypes } from "@elliemae/ds-props-helpers";
5
5
  import { __UNSAFE_SPACE_TO_DIMSUM } from "@elliemae/ds-system";
6
6
  import { Grid } from "@elliemae/ds-grid";
7
7
  import MobileSeparator from "../MobileSeparator";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFilterbar/Filterbar.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport { __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport MobileSeparator from '../MobileSeparator';\n\nconst Bar = styled.div`\n display: flex;\n overflow: auto;\n background-color: ${(props) => props.theme.colors.neutral['000']};\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n & > * {\n flex-shrink: 0;\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nconst Separator = styled.div`\n & > * {\n margin: 0;\n }\n`;\n\nconst DSMobileFilterbar = ({ children }) => (\n <Grid rows={['auto', 'auto']} data-testid=\"filter-bar-wrapper\">\n <Bar>{children}</Bar>\n <Separator>\n <MobileSeparator margin=\"xxs\" color={['neutral', '300']} />\n </Separator>\n </Grid>\n);\n\nconst filterbarProps = {\n children: PropTypes.element.description('FilterBar Items').isRequired,\n};\n\nDSMobileFilterbar.propTypes = filterbarProps;\nDSMobileFilterbar.displayName = 'DSMobileFilterbar';\nconst FilterbarWithSchema = describe(DSMobileFilterbar);\nFilterbarWithSchema.propTypes = filterbarProps;\n\nexport { DSMobileFilterbar, FilterbarWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport MobileSeparator from '../MobileSeparator';\n\nconst Bar = styled.div`\n display: flex;\n overflow: auto;\n background-color: ${(props) => props.theme.colors.neutral['000']};\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n & > * {\n flex-shrink: 0;\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nconst Separator = styled.div`\n & > * {\n margin: 0;\n }\n`;\n\nconst DSMobileFilterbar = ({ children }) => (\n <Grid rows={['auto', 'auto']} data-testid=\"filter-bar-wrapper\">\n <Bar>{children}</Bar>\n <Separator>\n <MobileSeparator margin=\"xxs\" color={['neutral', '300']} />\n </Separator>\n </Grid>\n);\n\nconst filterbarProps = {\n children: PropTypes.element.description('FilterBar Items').isRequired,\n};\n\nDSMobileFilterbar.propTypes = filterbarProps;\nDSMobileFilterbar.displayName = 'DSMobileFilterbar';\nconst FilterbarWithSchema = describe(DSMobileFilterbar);\nFilterbarWithSchema.propTypes = filterbarProps;\n\nexport { DSMobileFilterbar, FilterbarWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;AC6BrB,SACE,KADF;AA3BF,SAAS,cAAc;AACvB,SAAS,UAAU,iBAAiB;AACpC,SAAS,gCAAgC;AACzC,SAAS,YAAY;AACrB,OAAO,qBAAqB;AAE5B,MAAM,MAAM,OAAO;AAAA;AAAA;AAAA,sBAGG,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,kBAC1C,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU1E,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA;AAMzB,MAAM,oBAAoB,CAAC,EAAE,SAAS,MACpC,qBAAC,QAAK,MAAM,CAAC,QAAQ,MAAM,GAAG,eAAY,sBACxC;AAAA,sBAAC,OAAK,UAAS;AAAA,EACf,oBAAC,aACC,8BAAC,mBAAgB,QAAO,OAAM,OAAO,CAAC,WAAW,KAAK,GAAG,GAC3D;AAAA,GACF;AAGF,MAAM,iBAAiB;AAAA,EACrB,UAAU,UAAU,QAAQ,YAAY,iBAAiB,EAAE;AAC7D;AAEA,kBAAkB,YAAY;AAC9B,kBAAkB,cAAc;AAChC,MAAM,sBAAsB,SAAS,iBAAiB;AACtD,oBAAoB,YAAY;",
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 { describe, PropTypes } from "@elliemae/ds-utilities";
3
+ import { describe, PropTypes } from "@elliemae/ds-props-helpers";
4
4
  import { Grid } from "@elliemae/ds-grid";
5
5
  const DSMobileFilterbarItem = ({ children, onClick }) => /* @__PURE__ */ jsx(Grid, { "data-testid": "filter-bar-item-wrapper", cols: ["min-content"], pr: "xxs", pt: "xxs", role: "button", onClick, children });
6
6
  const filterbarItemProps = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFilterbar/FilterbarItem.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst DSMobileFilterbarItem = ({ children, onClick }) => (\n <Grid data-testid=\"filter-bar-item-wrapper\" cols={['min-content']} pr=\"xxs\" pt=\"xxs\" role=\"button\" onClick={onClick}>\n {children}\n </Grid>\n);\nconst filterbarItemProps = {\n children: PropTypes.element.description('FilterBar Items').isRequired,\n onClick: PropTypes.func.description('Function executed when clicking filterbar item'),\n};\n\nDSMobileFilterbarItem.propTypes = filterbarItemProps;\nDSMobileFilterbarItem.displayName = 'DSMobileFilterbarItem';\nconst FilterbarItemWithSchema = describe(DSMobileFilterbarItem);\nFilterbarItemWithSchema.propTypes = filterbarItemProps;\n\nexport { DSMobileFilterbarItem, FilterbarItemWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst DSMobileFilterbarItem = ({ children, onClick }) => (\n <Grid data-testid=\"filter-bar-item-wrapper\" cols={['min-content']} pr=\"xxs\" pt=\"xxs\" role=\"button\" onClick={onClick}>\n {children}\n </Grid>\n);\nconst filterbarItemProps = {\n children: PropTypes.element.description('FilterBar Items').isRequired,\n onClick: PropTypes.func.description('Function executed when clicking filterbar item'),\n};\n\nDSMobileFilterbarItem.propTypes = filterbarItemProps;\nDSMobileFilterbarItem.displayName = 'DSMobileFilterbarItem';\nconst FilterbarItemWithSchema = describe(DSMobileFilterbarItem);\nFilterbarItemWithSchema.propTypes = filterbarItemProps;\n\nexport { DSMobileFilterbarItem, FilterbarItemWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACKrB;AAJF,SAAS,UAAU,iBAAiB;AACpC,SAAS,YAAY;AAErB,MAAM,wBAAwB,CAAC,EAAE,UAAU,QAAQ,MACjD,oBAAC,QAAK,eAAY,2BAA0B,MAAM,CAAC,aAAa,GAAG,IAAG,OAAM,IAAG,OAAM,MAAK,UAAS,SAChG,UACH;AAEF,MAAM,qBAAqB;AAAA,EACzB,UAAU,UAAU,QAAQ,YAAY,iBAAiB,EAAE;AAAA,EAC3D,SAAS,UAAU,KAAK,YAAY,gDAAgD;AACtF;AAEA,sBAAsB,YAAY;AAClC,sBAAsB,cAAc;AACpC,MAAM,0BAA0B,SAAS,qBAAqB;AAC9D,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { describe, PropTypes } from "@elliemae/ds-utilities";
3
+ import { describe, PropTypes } from "@elliemae/ds-props-helpers";
4
4
  import { styled } from "@elliemae/ds-system";
5
5
  import { Grid } from "@elliemae/ds-grid";
6
6
  import MobileSeparator from "../MobileSeparator";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFilterbar/FilterbarSort.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport MobileSeparator from '../MobileSeparator';\n\nconst Separator = styled.div`\n & > * {\n margin-left: 0;\n }\n`;\n\nconst DSMobileFilterbarSort = ({ children }) => (\n <>\n {children}\n <Grid pb=\"xxs\" pt=\"xxs\" cols={['min-content']}>\n <Separator>\n <MobileSeparator margin=\"xxs\" direction=\"vertical\" color={['neutral', '300']} />\n </Separator>\n </Grid>\n </>\n);\n\nconst filterbarSortProps = {\n children: PropTypes.element.description('FilterBar Sort Item').isRequired,\n};\n\nDSMobileFilterbarSort.propTypes = filterbarSortProps;\nDSMobileFilterbarSort.displayName = 'DSMobileFilterbarSort';\nconst FilterbarSortWithSchema = describe(DSMobileFilterbarSort);\nFilterbarSortWithSchema.propTypes = filterbarSortProps;\n\nexport { DSMobileFilterbarSort, FilterbarSortWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport MobileSeparator from '../MobileSeparator';\n\nconst Separator = styled.div`\n & > * {\n margin-left: 0;\n }\n`;\n\nconst DSMobileFilterbarSort = ({ children }) => (\n <>\n {children}\n <Grid pb=\"xxs\" pt=\"xxs\" cols={['min-content']}>\n <Separator>\n <MobileSeparator margin=\"xxs\" direction=\"vertical\" color={['neutral', '300']} />\n </Separator>\n </Grid>\n </>\n);\n\nconst filterbarSortProps = {\n children: PropTypes.element.description('FilterBar Sort Item').isRequired,\n};\n\nDSMobileFilterbarSort.propTypes = filterbarSortProps;\nDSMobileFilterbarSort.displayName = 'DSMobileFilterbarSort';\nconst FilterbarSortWithSchema = describe(DSMobileFilterbarSort);\nFilterbarSortWithSchema.propTypes = filterbarSortProps;\n\nexport { DSMobileFilterbarSort, FilterbarSortWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACarB,mBAIM,KAJN;AAZF,SAAS,UAAU,iBAAiB;AACpC,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,OAAO,qBAAqB;AAE5B,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA;AAMzB,MAAM,wBAAwB,CAAC,EAAE,SAAS,MACxC,iCACG;AAAA;AAAA,EACD,oBAAC,QAAK,IAAG,OAAM,IAAG,OAAM,MAAM,CAAC,aAAa,GAC1C,8BAAC,aACC,8BAAC,mBAAgB,QAAO,OAAM,WAAU,YAAW,OAAO,CAAC,WAAW,KAAK,GAAG,GAChF,GACF;AAAA,GACF;AAGF,MAAM,qBAAqB;AAAA,EACzB,UAAU,UAAU,QAAQ,YAAY,qBAAqB,EAAE;AACjE;AAEA,sBAAsB,YAAY;AAClC,sBAAsB,cAAc;AACpC,MAAM,0BAA0B,SAAS,qBAAqB;AAC9D,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import React2 from "react";
4
4
  import { styled, typography, color, __UNSAFE_SPACE_TO_DIMSUM } from "@elliemae/ds-system";
5
5
  import { Grid } from "@elliemae/ds-grid";
6
- import { describe, PropTypes } from "@elliemae/ds-utilities";
6
+ import { describe, PropTypes } from "@elliemae/ds-props-helpers";
7
7
  const Label = styled.span`
8
8
  ${typography}
9
9
  ${color("neutral", "800")}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFooter/Action.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled, typography, color, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\n\nconst Label = styled.span`\n ${typography}\n ${color('neutral', '800')}\n padding-bottom: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs)};\n padding-top: calc(${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs)} / 2);\n`;\n\nconst DSMobileFooterAction = ({ label, icon, onClick }) => (\n <Grid\n data-testid=\"ds-mobile-footer-action\"\n rows={['auto'].concat(label ? 'min-content' : 'none')}\n justifyContent=\"center\"\n role=\"button\"\n onClick={onClick}\n >\n <Grid justifyContent=\"center\" alignItems=\"center\">\n {React.cloneElement(icon, {\n 'data-testid': 'ds-mobile-footer-action-icon',\n size: !label ? 'l' : 'm',\n })}\n </Grid>\n\n {label && (\n <Grid justifyContent=\"center\">\n <Label fontSize=\"11px\">{label}</Label>\n </Grid>\n )}\n </Grid>\n);\n\nconst actionProps = {\n /** Action label */\n label: PropTypes.string.description('Action label'),\n /** Action icon */\n icon: PropTypes.element.description('Action icon'),\n /** onClick callback */\n onClick: PropTypes.func.description('onClick callback'),\n};\n\nDSMobileFooterAction.propTypes = actionProps;\nDSMobileFooterAction.displayName = 'DSMobileFooterAction';\nconst DSMobileFooterActionWithSchema = describe(DSMobileFooterAction).description('Mobile footer action');\nDSMobileFooterActionWithSchema.propTypes = actionProps;\n\nexport { DSMobileFooterAction, DSMobileFooterActionWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled, typography, color, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\n\nconst Label = styled.span`\n ${typography}\n ${color('neutral', '800')}\n padding-bottom: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs)};\n padding-top: calc(${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xxs)} / 2);\n`;\n\nconst DSMobileFooterAction = ({ label, icon, onClick }) => (\n <Grid\n data-testid=\"ds-mobile-footer-action\"\n rows={['auto'].concat(label ? 'min-content' : 'none')}\n justifyContent=\"center\"\n role=\"button\"\n onClick={onClick}\n >\n <Grid justifyContent=\"center\" alignItems=\"center\">\n {React.cloneElement(icon, {\n 'data-testid': 'ds-mobile-footer-action-icon',\n size: !label ? 'l' : 'm',\n })}\n </Grid>\n\n {label && (\n <Grid justifyContent=\"center\">\n <Label fontSize=\"11px\">{label}</Label>\n </Grid>\n )}\n </Grid>\n);\n\nconst actionProps = {\n /** Action label */\n label: PropTypes.string.description('Action label'),\n /** Action icon */\n icon: PropTypes.element.description('Action icon'),\n /** onClick callback */\n onClick: PropTypes.func.description('onClick callback'),\n};\n\nDSMobileFooterAction.propTypes = actionProps;\nDSMobileFooterAction.displayName = 'DSMobileFooterAction';\nconst DSMobileFooterActionWithSchema = describe(DSMobileFooterAction).description('Mobile footer action');\nDSMobileFooterActionWithSchema.propTypes = actionProps;\n\nexport { DSMobileFooterAction, DSMobileFooterActionWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACerB,SAOE,KAPF;AAbF,OAAOA,YAAW;AAClB,SAAS,QAAQ,YAAY,OAAO,gCAAgC;AACpE,SAAS,YAAY;AACrB,SAAS,UAAU,iBAAiB;AAEpC,MAAM,QAAQ,OAAO;AAAA,IACjB;AAAA,IACA,MAAM,WAAW,KAAK;AAAA,oBACN,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,GAAG;AAAA,sBACvD,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,GAAG;AAAA;AAG/E,MAAM,uBAAuB,CAAC,EAAE,OAAO,MAAM,QAAQ,MACnD;AAAA,EAAC;AAAA;AAAA,IACC,eAAY;AAAA,IACZ,MAAM,CAAC,MAAM,EAAE,OAAO,QAAQ,gBAAgB,MAAM;AAAA,IACpD,gBAAe;AAAA,IACf,MAAK;AAAA,IACL;AAAA,IAEA;AAAA,0BAAC,QAAK,gBAAe,UAAS,YAAW,UACtC,UAAAA,OAAM,aAAa,MAAM;AAAA,QACxB,eAAe;AAAA,QACf,MAAM,CAAC,QAAQ,MAAM;AAAA,MACvB,CAAC,GACH;AAAA,MAEC,SACC,oBAAC,QAAK,gBAAe,UACnB,8BAAC,SAAM,UAAS,QAAQ,iBAAM,GAChC;AAAA;AAAA;AAEJ;AAGF,MAAM,cAAc;AAAA,EAElB,OAAO,UAAU,OAAO,YAAY,cAAc;AAAA,EAElD,MAAM,UAAU,QAAQ,YAAY,aAAa;AAAA,EAEjD,SAAS,UAAU,KAAK,YAAY,kBAAkB;AACxD;AAEA,qBAAqB,YAAY;AACjC,qBAAqB,cAAc;AACnC,MAAM,iCAAiC,SAAS,oBAAoB,EAAE,YAAY,sBAAsB;AACxG,+BAA+B,YAAY;",
6
6
  "names": ["React"]
7
7
  }
@@ -5,7 +5,7 @@ import { styled } from "@elliemae/ds-system";
5
5
  import { border, __UNSAFE_SPACE_TO_DIMSUM } from "@elliemae/ds-system";
6
6
  import { Grid } from "@elliemae/ds-grid";
7
7
  import DSButton from "@elliemae/ds-button";
8
- import { describe, PropTypes } from "@elliemae/ds-utilities";
8
+ import { describe, PropTypes } from "@elliemae/ds-props-helpers";
9
9
  import { DSMobileFooterText } from "./Text";
10
10
  const FooterWrap = styled(Grid)`
11
11
  background-color: ${(props) => props.theme.colors.neutral["000"]};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFooter/Footer.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { border, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSButton from '@elliemae/ds-button';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport { DSMobileFooterText } from './Text';\n\nconst FooterWrap = styled(Grid)`\n background-color: ${(props) => props.theme.colors.neutral['000']};\n border-top: ${(props) => border(props.theme.colors.neutral[100])};\n height: ${(props) => `calc(${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)} * 7)`};\n`;\n\nconst MobileFooter = ({ children }) => {\n const childArr = React.Children.toArray(children);\n const isButtonType = childArr[0].type === DSMobileFooterText || childArr[0].type === DSButton;\n const setCols = () => {\n if (isButtonType) {\n return childArr.length === 1 ? ['90%'] : ['45%', '45%'];\n }\n return childArr.map(() => `${100 / childArr.length}%`);\n };\n return (\n <FooterWrap>\n <Grid\n cols={setCols()}\n gutter={isButtonType ? 'xs' : undefined}\n justifyContent=\"center\"\n alignItems={isButtonType ? 'center' : undefined}\n >\n {childArr.map((c, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <Grid key={i}>{c}</Grid>\n ))}\n </Grid>\n </FooterWrap>\n );\n};\n\nconst footerProps = {\n /**\n * Instance of DSButton, DSMobileFooterText or DSMobileFooterAction\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired.description(\n 'Instance of DSButton, DSMobileFooterText or DSMobileFooterAction',\n ),\n};\n\nMobileFooter.propTypes = footerProps;\nMobileFooter.displayName = 'MobileFooter';\nconst MobileFooterWithSchema = describe(MobileFooter);\nMobileFooterWithSchema.propTypes = footerProps;\n\nexport default MobileFooter;\n\nexport { MobileFooterWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { border, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport DSButton from '@elliemae/ds-button';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSMobileFooterText } from './Text';\n\nconst FooterWrap = styled(Grid)`\n background-color: ${(props) => props.theme.colors.neutral['000']};\n border-top: ${(props) => border(props.theme.colors.neutral[100])};\n height: ${(props) => `calc(${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)} * 7)`};\n`;\n\nconst MobileFooter = ({ children }) => {\n const childArr = React.Children.toArray(children);\n const isButtonType = childArr[0].type === DSMobileFooterText || childArr[0].type === DSButton;\n const setCols = () => {\n if (isButtonType) {\n return childArr.length === 1 ? ['90%'] : ['45%', '45%'];\n }\n return childArr.map(() => `${100 / childArr.length}%`);\n };\n return (\n <FooterWrap>\n <Grid\n cols={setCols()}\n gutter={isButtonType ? 'xs' : undefined}\n justifyContent=\"center\"\n alignItems={isButtonType ? 'center' : undefined}\n >\n {childArr.map((c, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <Grid key={i}>{c}</Grid>\n ))}\n </Grid>\n </FooterWrap>\n );\n};\n\nconst footerProps = {\n /**\n * Instance of DSButton, DSMobileFooterText or DSMobileFooterAction\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired.description(\n 'Instance of DSButton, DSMobileFooterText or DSMobileFooterAction',\n ),\n};\n\nMobileFooter.propTypes = footerProps;\nMobileFooter.displayName = 'MobileFooter';\nconst MobileFooterWithSchema = describe(MobileFooter);\nMobileFooterWithSchema.propTypes = footerProps;\n\nexport default MobileFooter;\n\nexport { MobileFooterWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACmCb;AAjCV,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,QAAQ,gCAAgC;AACjD,SAAS,YAAY;AACrB,OAAO,cAAc;AACrB,SAAS,UAAU,iBAAiB;AACpC,SAAS,0BAA0B;AAEnC,MAAM,aAAa,OAAO,IAAI;AAAA,sBACR,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBAC5C,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,IAAI;AAAA,YACrD,CAAC,UAAU,QAAQ,yBAAyB,MAAM,MAAM,MAAM,EAAE;AAAA;AAG5E,MAAM,eAAe,CAAC,EAAE,SAAS,MAAM;AACrC,QAAM,WAAWA,OAAM,SAAS,QAAQ,QAAQ;AAChD,QAAM,eAAe,SAAS,GAAG,SAAS,sBAAsB,SAAS,GAAG,SAAS;AACrF,QAAM,UAAU,MAAM;AACpB,QAAI,cAAc;AAChB,aAAO,SAAS,WAAW,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,KAAK;AAAA,IACxD;AACA,WAAO,SAAS,IAAI,MAAM,GAAG,MAAM,SAAS,SAAS;AAAA,EACvD;AACA,SACE,oBAAC,cACC;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,QAAQ;AAAA,MACd,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAe;AAAA,MACf,YAAY,eAAe,WAAW;AAAA,MAErC,mBAAS,IAAI,CAAC,GAAG,MAEhB,oBAAC,QAAc,eAAJ,CAAM,CAClB;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,MAAM,cAAc;AAAA,EAIlB,UAAU,UAAU,UAAU,CAAC,UAAU,SAAS,UAAU,QAAQ,UAAU,OAAO,CAAC,CAAC,EAAE,WAAW;AAAA,IAClG;AAAA,EACF;AACF;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAEnC,IAAO,iBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { styled } from "@elliemae/ds-system";
4
4
  import { textStyle, truncate, color } from "@elliemae/ds-system";
5
- import { describe, PropTypes } from "@elliemae/ds-utilities";
5
+ import { describe, PropTypes } from "@elliemae/ds-props-helpers";
6
6
  const Text = styled.p`
7
7
  margin: auto 0;
8
8
  ${truncate()}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/MobileFooter/Text.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { textStyle, truncate, color } from '@elliemae/ds-system';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\n\nconst Text = styled.p`\n margin: auto 0;\n ${truncate()}\n ${textStyle('body')}\n ${color('neutral', '800')}\n`;\n\nconst DSMobileFooterText = ({ children }) => <Text>{children}</Text>;\n\nconst props = {\n children: PropTypes.string.isRequired.description('Children'),\n};\n\nDSMobileFooterText.propTypes = props;\nDSMobileFooterText.displayName = 'DSMobileFooterText';\nconst DSMobileFooterTextWithSchema = describe(DSMobileFooterText);\nDSMobileFooterTextWithSchema.propTypes = props;\n\nexport { DSMobileFooterText, DSMobileFooterTextWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable jest/valid-describe */\n/* eslint-disable jest/valid-title */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { textStyle, truncate, color } from '@elliemae/ds-system';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\n\nconst Text = styled.p`\n margin: auto 0;\n ${truncate()}\n ${textStyle('body')}\n ${color('neutral', '800')}\n`;\n\nconst DSMobileFooterText = ({ children }) => <Text>{children}</Text>;\n\nconst props = {\n children: PropTypes.string.isRequired.description('Children'),\n};\n\nDSMobileFooterText.propTypes = props;\nDSMobileFooterText.displayName = 'DSMobileFooterText';\nconst DSMobileFooterTextWithSchema = describe(DSMobileFooterText);\nDSMobileFooterTextWithSchema.propTypes = props;\n\nexport { DSMobileFooterText, DSMobileFooterTextWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACcsB;AAX7C,SAAS,cAAc;AACvB,SAAS,WAAW,UAAU,aAAa;AAC3C,SAAS,UAAU,iBAAiB;AAEpC,MAAM,OAAO,OAAO;AAAA;AAAA,IAEhB,SAAS;AAAA,IACT,UAAU,MAAM;AAAA,IAChB,MAAM,WAAW,KAAK;AAAA;AAG1B,MAAM,qBAAqB,CAAC,EAAE,SAAS,MAAM,oBAAC,QAAM,UAAS;AAE7D,MAAM,QAAQ;AAAA,EACZ,UAAU,UAAU,OAAO,WAAW,YAAY,UAAU;AAC9D;AAEA,mBAAmB,YAAY;AAC/B,mBAAmB,cAAc;AACjC,MAAM,+BAA+B,SAAS,kBAAkB;AAChE,6BAA6B,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { describe, PropTypes } from "@elliemae/ds-utilities";
3
+ import { describe, PropTypes } from "@elliemae/ds-props-helpers";
4
4
  import { styled } from "@elliemae/ds-system";
5
5
  import { Grid } from "@elliemae/ds-grid";
6
6
  import { border, truncate, withTheme, __UNSAFE_SPACE_TO_DIMSUM } from "@elliemae/ds-system";