@jpmorganchase/mosaic-components 0.1.0-beta.11 → 0.1.0-beta.13

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 (272) hide show
  1. package/.turbo/turbo-build.log +2 -4
  2. package/CHANGELOG.md +26 -0
  3. package/README.md +0 -5
  4. package/dist/Accordion/index.d.ts +1 -1
  5. package/dist/Accordion/index.js +1 -1
  6. package/dist/AudioPlayer/index.js +1 -1
  7. package/dist/Button.d.ts +2 -2
  8. package/dist/Button.js +1 -1
  9. package/dist/EditionFilterView/index.d.ts +1 -1
  10. package/dist/EditionFilterView/index.js +1 -1
  11. package/dist/EditionTileLink/index.d.ts +1 -1
  12. package/dist/EditionTileLink/index.js +1 -1
  13. package/dist/Feature/FeatureActions/index.d.ts +1 -1
  14. package/dist/Feature/FeatureActions/index.js +1 -1
  15. package/dist/Feature/FeatureEyebrow/index.js +1 -1
  16. package/dist/Feature/index.js +1 -1
  17. package/dist/FilterToolbar/ContentArea/index.d.ts +1 -1
  18. package/dist/FilterToolbar/ContentArea/index.js +1 -1
  19. package/dist/FilterToolbar/PillGroup/index.d.ts +1 -1
  20. package/dist/FilterToolbar/PillGroup/index.js +1 -1
  21. package/dist/FilterToolbar/Toolbar.d.ts +1 -1
  22. package/dist/FilterToolbar/Toolbar.js +1 -1
  23. package/dist/FilterToolbar/index.js +1 -1
  24. package/dist/FilterView/ContentArea/index.d.ts +1 -1
  25. package/dist/FilterView/ContentArea/index.js +1 -1
  26. package/dist/FilterView/FilterView.d.ts +5 -5
  27. package/dist/FilterView/FilterView.js +1 -1
  28. package/dist/FilterView/NoResults/index.d.ts +1 -1
  29. package/dist/FilterView/NoResults/index.js +1 -1
  30. package/dist/FilterView/Pagination/index.d.ts +1 -1
  31. package/dist/FilterView/Pagination/index.js +1 -1
  32. package/dist/FilterView/Pagination/usePagination.d.ts +1 -1
  33. package/dist/FilterView/Pagination/usePagination.js +1 -1
  34. package/dist/FilterView/ResultCount/index.d.ts +1 -1
  35. package/dist/FilterView/ResultCount/index.js +1 -1
  36. package/dist/FilterView/index.js +1 -1
  37. package/dist/FormattedContent.d.ts +1 -1
  38. package/dist/FormattedContent.js +1 -1
  39. package/dist/HelpLinks/index.d.ts +1 -1
  40. package/dist/HelpLinks/index.js +1 -1
  41. package/dist/Hero/index.d.ts +1 -1
  42. package/dist/Hero/index.js +1 -1
  43. package/dist/Icon/index.d.ts +1 -1
  44. package/dist/Impact/index.d.ts +1 -1
  45. package/dist/Impact/index.js +1 -1
  46. package/dist/Link/index.js +1 -1
  47. package/dist/LinkButton.d.ts +2 -2
  48. package/dist/LinkButton.js +1 -1
  49. package/dist/List/ListItem.d.ts +1 -1
  50. package/dist/List/ListItem.js +1 -1
  51. package/dist/List/OrderedList.d.ts +1 -1
  52. package/dist/List/OrderedList.js +1 -1
  53. package/dist/List/UnorderedList.d.ts +1 -1
  54. package/dist/List/index.js +1 -1
  55. package/dist/Markdown/AnchorHeading/index.d.ts +2 -2
  56. package/dist/Markdown/AnchorHeading/index.js +1 -1
  57. package/dist/Markdown/BlockQuote/index.d.ts +1 -1
  58. package/dist/Markdown/BlockQuote/index.js +1 -1
  59. package/dist/Markdown/Heading.d.ts +7 -7
  60. package/dist/Markdown/Heading.js +1 -1
  61. package/dist/Markdown/InlineCode.d.ts +1 -1
  62. package/dist/Markdown/InlineCode.js +1 -1
  63. package/dist/Markdown/Link.d.ts +1 -1
  64. package/dist/Markdown/Link.js +1 -1
  65. package/dist/Markdown/Pre/index.d.ts +1 -1
  66. package/dist/Markdown/Pre/index.js +1 -1
  67. package/dist/Markdown/Table.d.ts +1 -1
  68. package/dist/Markdown/Table.js +1 -1
  69. package/dist/Markdown/Tbody.d.ts +1 -1
  70. package/dist/Markdown/Td.d.ts +2 -2
  71. package/dist/Markdown/Td.js +1 -1
  72. package/dist/Markdown/Th.d.ts +2 -2
  73. package/dist/Markdown/Th.js +1 -1
  74. package/dist/Markdown/Thead.d.ts +1 -1
  75. package/dist/Markdown/ThematicBreak/index.d.ts +1 -1
  76. package/dist/Markdown/Tr.d.ts +1 -1
  77. package/dist/Markdown/Tr.js +1 -1
  78. package/dist/Markdown/index.d.ts +106 -106
  79. package/dist/Markdown/index.js +1 -1
  80. package/dist/Markdown/markdownElements.d.ts +24 -24
  81. package/dist/Markdown/markdownElements.js +1 -1
  82. package/dist/Markdown/withMarkdownSpacing/index.d.ts +1 -1
  83. package/dist/Markdown/withMarkdownSpacing/index.js +1 -1
  84. package/dist/PageFilterView/index.js +1 -1
  85. package/dist/ReactLive/index.js +1 -1
  86. package/dist/SecondaryNavbar/index.d.ts +1 -1
  87. package/dist/SecondaryNavbar/index.js +1 -1
  88. package/dist/SectionHeading/index.js +1 -1
  89. package/dist/StickyHeader/index.d.ts +2 -2
  90. package/dist/StickyHeader/index.js +1 -1
  91. package/dist/Story/index.js +1 -1
  92. package/dist/Tabs/index.js +1 -1
  93. package/dist/TabsBase/TabsBase.d.ts +2 -2
  94. package/dist/TabsBase/TabsBase.js +1 -1
  95. package/dist/TabsBase/TabsButton.d.ts +2 -2
  96. package/dist/TabsBase/TabsLink.d.ts +1 -1
  97. package/dist/TabsBase/TabsLink.js +1 -1
  98. package/dist/TabsBase/index.js +1 -1
  99. package/dist/Tag/index.d.ts +1 -1
  100. package/dist/Tag/index.js +1 -1
  101. package/dist/ThemeProvider.js +1 -1
  102. package/dist/TileButton/index.d.ts +2 -2
  103. package/dist/TileButton/index.js +1 -1
  104. package/dist/TileContent/index.d.ts +1 -1
  105. package/dist/TileContent/index.js +1 -1
  106. package/dist/TileContentLabel/index.d.ts +3 -3
  107. package/dist/TileContentLabel/index.js +1 -1
  108. package/dist/TileLink/index.d.ts +2 -2
  109. package/dist/TileLink/index.js +1 -1
  110. package/dist/Typography/index.d.ts +38 -38
  111. package/dist/Typography/index.js +1 -1
  112. package/dist/Typography/withStyledTypography.d.ts +1 -1
  113. package/dist/Typography/withStyledTypography.js +1 -1
  114. package/dist/VideoPlayer/index.d.ts +1 -1
  115. package/dist/VideoPlayer/index.js +1 -1
  116. package/dist/chunk-26CX265J.js +1 -0
  117. package/dist/chunk-2ARWROO7.js +1 -0
  118. package/dist/chunk-2NXJRMPC.js +1 -0
  119. package/dist/chunk-2UXB3US3.js +1 -0
  120. package/dist/{chunk-7AKIGM4A.js → chunk-3T7QSWYG.js} +1 -1
  121. package/dist/chunk-47GPIIMM.js +1 -0
  122. package/dist/{chunk-KX3SXK2F.js → chunk-5U2Z6OEZ.js} +1 -1
  123. package/dist/{chunk-VROQRL3K.js → chunk-6HJPHCCS.js} +1 -1
  124. package/dist/{chunk-AZUFJ6VU.js → chunk-6UHHRIWA.js} +1 -1
  125. package/dist/{chunk-WRJSODGW.js → chunk-74RXQCVJ.js} +1 -1
  126. package/dist/chunk-B4I3UZSP.js +1 -0
  127. package/dist/{chunk-GMHXY34G.js → chunk-BAPU7HJ3.js} +1 -1
  128. package/dist/{chunk-XYZBCTIZ.js → chunk-BDI7IUAH.js} +1 -1
  129. package/dist/chunk-C2ZQQ7ZP.js +1 -0
  130. package/dist/chunk-C3Y4QQBE.js +1 -0
  131. package/dist/chunk-C4ENGERB.js +1 -0
  132. package/dist/chunk-C7JCZWVX.js +1 -0
  133. package/dist/chunk-CAHJ6PGZ.js +1 -0
  134. package/dist/chunk-CQLDUURH.js +1 -0
  135. package/dist/{chunk-CK3NOI7N.js → chunk-DPPALZDI.js} +1 -1
  136. package/dist/chunk-F3JFIKJC.js +1 -0
  137. package/dist/chunk-FKYZJPEO.js +1 -0
  138. package/dist/{chunk-5NKWGBQZ.js → chunk-G6AWA3FJ.js} +1 -1
  139. package/dist/chunk-GJ5OMOUR.js +1 -0
  140. package/dist/chunk-GMT5W53B.js +1 -0
  141. package/dist/{chunk-FJZG23C4.js → chunk-HY2GMO45.js} +1 -1
  142. package/dist/chunk-INYGBORN.js +1 -0
  143. package/dist/{chunk-THZHIJBQ.js → chunk-J7GJCVCD.js} +1 -1
  144. package/dist/chunk-JYIIMASI.js +1 -0
  145. package/dist/{chunk-GSGQC5H5.js → chunk-KYGDER56.js} +2 -2
  146. package/dist/{chunk-C252LIKT.js → chunk-LSV5QSPJ.js} +1 -1
  147. package/dist/{chunk-ZAUKECSD.js → chunk-NEKXUNC3.js} +1 -1
  148. package/dist/chunk-NHM5P6ZU.js +1 -0
  149. package/dist/{chunk-F6WIBZNK.js → chunk-NMLOOQZH.js} +1 -1
  150. package/dist/chunk-ORZHJDLF.js +1 -0
  151. package/dist/{chunk-SS3XUXOS.js → chunk-OZP4XJN4.js} +1 -1
  152. package/dist/chunk-P2Q72DAZ.js +1 -0
  153. package/dist/chunk-P7S3HLKN.js +1 -0
  154. package/dist/{chunk-VIQKAFRZ.js → chunk-PLHKMRZS.js} +1 -1
  155. package/dist/{chunk-BZH4QVWW.js → chunk-PYXBOKWW.js} +1 -1
  156. package/dist/chunk-QRIBS5XE.js +1 -0
  157. package/dist/chunk-RDGUE62K.js +1 -0
  158. package/dist/chunk-RPIX3WSX.js +1 -0
  159. package/dist/{chunk-TBLQRXJC.js → chunk-SHY5O66X.js} +1 -1
  160. package/dist/{chunk-7W3FVLQG.js → chunk-USHSPVAQ.js} +1 -1
  161. package/dist/{chunk-U3L7YGSF.js → chunk-VIF3F37A.js} +1 -1
  162. package/dist/chunk-W2PUIPEP.js +1 -0
  163. package/dist/{chunk-GHEBJRO3.js → chunk-ZEM3WI5Y.js} +1 -1
  164. package/dist/chunk-ZJD6TG4Z.js +1 -0
  165. package/dist/{chunk-FUUUTGVL.js → chunk-ZQEOC5MI.js} +1 -1
  166. package/dist/index.d.ts +0 -3
  167. package/dist/index.js +1 -1
  168. package/dist/styles.css +1 -1
  169. package/dist/styles.d.ts +0 -1
  170. package/dist/styles.js +1 -1
  171. package/package.json +22 -16
  172. package/src/Accordion/index.tsx +5 -1
  173. package/src/Button.tsx +6 -1
  174. package/src/EditionFilterView/index.tsx +1 -1
  175. package/src/EditionTileLink/index.tsx +4 -5
  176. package/src/Feature/FeatureActions/index.tsx +5 -1
  177. package/src/FilterToolbar/ContentArea/index.tsx +3 -5
  178. package/src/FilterToolbar/PillGroup/index.tsx +3 -1
  179. package/src/FilterToolbar/Toolbar.tsx +2 -5
  180. package/src/FilterView/ContentArea/index.tsx +3 -6
  181. package/src/FilterView/NoResults/index.tsx +1 -1
  182. package/src/FilterView/Pagination/index.tsx +1 -1
  183. package/src/FilterView/Pagination/usePagination.ts +1 -1
  184. package/src/FilterView/ResultCount/index.tsx +3 -1
  185. package/src/FormattedContent.tsx +1 -1
  186. package/src/HelpLinks/index.tsx +2 -2
  187. package/src/Hero/index.tsx +1 -1
  188. package/src/Icon/index.tsx +6 -1
  189. package/src/Impact/index.tsx +1 -1
  190. package/src/Label/styles.css.ts +1 -1
  191. package/src/LinkButton.tsx +1 -1
  192. package/src/List/ListItem.tsx +1 -1
  193. package/src/List/OrderedList.tsx +4 -1
  194. package/src/List/UnorderedList.tsx +1 -1
  195. package/src/Markdown/AnchorHeading/index.tsx +2 -2
  196. package/src/Markdown/BlockQuote/index.tsx +4 -1
  197. package/src/Markdown/InlineCode.tsx +4 -3
  198. package/src/Markdown/Link.tsx +1 -1
  199. package/src/Markdown/Pre/index.tsx +21 -23
  200. package/src/Markdown/Table.tsx +1 -1
  201. package/src/Markdown/Tbody.tsx +1 -1
  202. package/src/Markdown/Td.tsx +2 -2
  203. package/src/Markdown/Th.tsx +2 -2
  204. package/src/Markdown/Thead.tsx +1 -1
  205. package/src/Markdown/ThematicBreak/index.tsx +3 -3
  206. package/src/Markdown/Tr.tsx +1 -1
  207. package/src/Markdown/withMarkdownSpacing/index.tsx +3 -3
  208. package/src/SecondaryNavbar/index.tsx +1 -1
  209. package/src/StickyHeader/index.tsx +1 -1
  210. package/src/TabsBase/TabsBase.tsx +1 -1
  211. package/src/TabsBase/TabsButton.tsx +1 -1
  212. package/src/TabsBase/TabsLink.tsx +1 -1
  213. package/src/Tag/index.tsx +1 -1
  214. package/src/ThemeProvider.tsx +15 -12
  215. package/src/TileButton/index.tsx +1 -1
  216. package/src/TileContent/index.tsx +4 -2
  217. package/src/TileContentLabel/index.tsx +3 -3
  218. package/src/TileLink/index.tsx +1 -1
  219. package/src/Typography/withStyledTypography.tsx +5 -2
  220. package/src/VideoPlayer/index.tsx +5 -2
  221. package/src/__tests__/ReactLive.test.tsx +4 -3
  222. package/src/index.tsx +0 -3
  223. package/src/styles.ts +0 -1
  224. package/dist/ColorModeProvider.d.ts +0 -16
  225. package/dist/ColorModeProvider.js +0 -1
  226. package/dist/chunk-3R4QYYQ4.js +0 -1
  227. package/dist/chunk-42WFLOC6.js +0 -1
  228. package/dist/chunk-4W6HT3B4.js +0 -1
  229. package/dist/chunk-6464SWDK.js +0 -1
  230. package/dist/chunk-6CR2UHLM.js +0 -1
  231. package/dist/chunk-7OWUJHAN.js +0 -1
  232. package/dist/chunk-BUHTZKLI.js +0 -1
  233. package/dist/chunk-CUOEKXWQ.js +0 -1
  234. package/dist/chunk-DBAOAJMH.js +0 -1
  235. package/dist/chunk-ETW7NOZJ.js +0 -1
  236. package/dist/chunk-H5M4JDKA.js +0 -1
  237. package/dist/chunk-HLJ5MAIP.js +0 -1
  238. package/dist/chunk-HNI5K3YJ.js +0 -1
  239. package/dist/chunk-HOA24BWP.js +0 -1
  240. package/dist/chunk-JS3RLRUL.js +0 -1
  241. package/dist/chunk-LTWUYEB2.js +0 -1
  242. package/dist/chunk-NOY2XYXH.js +0 -1
  243. package/dist/chunk-OG67L3OV.js +0 -1
  244. package/dist/chunk-OUSBK7KV.js +0 -1
  245. package/dist/chunk-QQRJOQDC.js +0 -1
  246. package/dist/chunk-ROI2EB7Y.js +0 -1
  247. package/dist/chunk-U2VVI5ES.js +0 -1
  248. package/dist/chunk-US5YZNOL.js +0 -1
  249. package/dist/chunk-XTLNI7GW.js +0 -1
  250. package/dist/chunk-Y7KOFQIK.js +0 -1
  251. package/dist/chunk-YHDUTISD.js +0 -1
  252. package/dist/chunk-YQLFGUES.js +0 -1
  253. package/dist/chunk-YTOBFDVN.js +0 -1
  254. package/dist/labs/Diagram.d.ts +0 -6
  255. package/dist/labs/Sitemap/drawTree.d.ts +0 -74
  256. package/dist/labs/Sitemap/index.d.ts +0 -10
  257. package/dist/labs/Sitemap/styles.css.d.ts +0 -6
  258. package/dist/labs/index.d.ts +0 -9
  259. package/dist-labs/Diagram.js +0 -1
  260. package/dist-labs/Sitemap/drawTree.js +0 -1
  261. package/dist-labs/Sitemap/index.css +0 -1
  262. package/dist-labs/Sitemap/index.js +0 -1
  263. package/dist-labs/Sitemap/styles.css.css +0 -1
  264. package/dist-labs/Sitemap/styles.css.js +0 -1
  265. package/dist-labs/index.css +0 -1
  266. package/dist-labs/index.js +0 -1
  267. package/src/ColorModeProvider.tsx +0 -70
  268. package/src/labs/Diagram.tsx +0 -26
  269. package/src/labs/Sitemap/drawTree.ts +0 -163
  270. package/src/labs/Sitemap/index.tsx +0 -223
  271. package/src/labs/Sitemap/styles.css.ts +0 -24
  272. package/src/labs/index.ts +0 -13
@@ -9,7 +9,7 @@ export interface ListItemProps extends Omit<React.HTMLProps<HTMLLIElement>, 'che
9
9
  variant?: 'regular' | 'document' | 'image';
10
10
  }
11
11
 
12
- export const ListItem: React.FC<ListItemProps> = ({
12
+ export const ListItem: React.FC<React.PropsWithChildren<ListItemProps>> = ({
13
13
  children,
14
14
  size = 'small',
15
15
  variant = 'document',
@@ -6,7 +6,10 @@ import { ListItemProps } from './ListItem';
6
6
 
7
7
  export interface OrderedListProps extends Omit<React.HTMLProps<HTMLUListElement>, 'size'> {}
8
8
 
9
- export const OrderedList: React.FC<OrderedListProps> = ({ children, className }) => {
9
+ export const OrderedList: React.FC<React.PropsWithChildren<OrderedListProps>> = ({
10
+ children,
11
+ className
12
+ }) => {
10
13
  const formattedChildren = React.Children.map(children, child => {
11
14
  if (!React.isValidElement(child)) {
12
15
  return child;
@@ -10,7 +10,7 @@ export interface UnOrderedListProps extends Omit<React.HTMLProps<HTMLUListElemen
10
10
  variant?: 'regular' | 'document' | 'image';
11
11
  }
12
12
 
13
- export const UnorderedList: React.FC<UnOrderedListProps> = ({
13
+ export const UnorderedList: React.FC<React.PropsWithChildren<UnOrderedListProps>> = ({
14
14
  children,
15
15
  className,
16
16
  size = 'small',
@@ -8,11 +8,11 @@ import styles from './index.css';
8
8
 
9
9
  export interface AnchorHeadingProps extends React.HTMLProps<HTMLHeadingElement> {
10
10
  children: React.ReactNode[];
11
- Component: React.FC<TypographyProps>;
11
+ Component: React.FC<React.PropsWithChildren<TypographyProps>>;
12
12
  LinkProps?: LinkProps;
13
13
  }
14
14
 
15
- export const AnchorHeading: React.FC<AnchorHeadingProps> = ({
15
+ export const AnchorHeading: React.FC<React.PropsWithChildren<AnchorHeadingProps>> = ({
16
16
  Component,
17
17
  children,
18
18
  className,
@@ -6,7 +6,10 @@ import styles from './index.css';
6
6
 
7
7
  export interface BlockQuoteProps extends React.HTMLProps<HTMLDivElement> {}
8
8
 
9
- export const BlockQuote: React.FC<BlockQuoteProps> = ({ children, className }) => {
9
+ export const BlockQuote: React.FC<React.PropsWithChildren<BlockQuoteProps>> = ({
10
+ children,
11
+ className
12
+ }) => {
10
13
  const rawChildren =
11
14
  React.isValidElement(children) && children.props ? children.props.children : children;
12
15
  return (
@@ -4,6 +4,7 @@ import { code } from '@jpmorganchase/mosaic-theme';
4
4
 
5
5
  export interface InlineCodeProps extends React.HTMLProps<HTMLPreElement> {}
6
6
 
7
- export const InlineCode: React.FC<InlineCodeProps> = ({ className, ...rest }) => (
8
- <code className={classnames(className, code())} {...rest} />
9
- );
7
+ export const InlineCode: React.FC<React.PropsWithChildren<InlineCodeProps>> = ({
8
+ className,
9
+ ...rest
10
+ }) => <code className={classnames(className, code())} {...rest} />;
@@ -6,6 +6,6 @@ export interface MarkdownLinkProps extends LinkProps {
6
6
  href?: string;
7
7
  }
8
8
 
9
- export const Link: React.FC<MarkdownLinkProps> = ({ href, ...rest }) => (
9
+ export const Link: React.FC<React.PropsWithChildren<MarkdownLinkProps>> = ({ href, ...rest }) => (
10
10
  <LinkComponent link={href} variant="document" {...rest} />
11
11
  );
@@ -32,7 +32,7 @@ const httpPattern = /^((http[s]?):\/\/)/;
32
32
  * <div>I will be live editable!</div>
33
33
  * ```
34
34
  */
35
- export const Pre: React.FC<PreProps> = ({
35
+ export const Pre: React.FC<React.PropsWithChildren<PreProps>> = ({
36
36
  children,
37
37
  className,
38
38
  code: codeProp = '',
@@ -124,25 +124,23 @@ const CodeBlock = React.memo(
124
124
  )
125
125
  );
126
126
 
127
- const CodeHighlight: React.FC<{ code: string; language: Language }> = function CodeHighlight({
128
- code,
129
- language
130
- }) {
131
- return (
132
- <Highlight {...defaultPrismProps} code={code} language={language}>
133
- {({ tokens, getLineProps, getTokenProps }) => (
134
- <>
135
- {tokens.map((line, i) => (
136
- // eslint-disable-next-line react/jsx-key
137
- <div {...getLineProps({ line, key: i })} style={{}}>
138
- {line.map((token, key) => (
139
- // eslint-disable-next-line react/jsx-key
140
- <span {...getTokenProps({ token, key })} style={{}} />
141
- ))}
142
- </div>
143
- ))}
144
- </>
145
- )}
146
- </Highlight>
147
- );
148
- };
127
+ const CodeHighlight: React.FC<React.PropsWithChildren<{ code: string; language: Language }>> =
128
+ function CodeHighlight({ code, language }) {
129
+ return (
130
+ <Highlight {...defaultPrismProps} code={code} language={language}>
131
+ {({ tokens, getLineProps, getTokenProps }) => (
132
+ <>
133
+ {tokens.map((line, i) => (
134
+ // eslint-disable-next-line react/jsx-key
135
+ <div {...getLineProps({ line, key: i })} style={{}}>
136
+ {line.map((token, key) => (
137
+ // eslint-disable-next-line react/jsx-key
138
+ <span {...getTokenProps({ token, key })} style={{}} />
139
+ ))}
140
+ </div>
141
+ ))}
142
+ </>
143
+ )}
144
+ </Highlight>
145
+ );
146
+ };
@@ -4,7 +4,7 @@ import { table, tableContainer } from '@jpmorganchase/mosaic-theme';
4
4
 
5
5
  export interface TableProps extends React.HTMLProps<HTMLTableElement> {}
6
6
 
7
- export const Table: React.FC<TableProps> = ({ className, ...rest }) => (
7
+ export const Table: React.FC<React.PropsWithChildren<TableProps>> = ({ className, ...rest }) => (
8
8
  <div className={classnames(className, tableContainer())}>
9
9
  <table className={table()} {...rest} />
10
10
  </div>
@@ -4,6 +4,6 @@ import { tbody } from '@jpmorganchase/mosaic-theme';
4
4
 
5
5
  export interface TbodyProps extends React.HTMLProps<HTMLTableSectionElement> {}
6
6
 
7
- export const Tbody: React.FC<TbodyProps> = ({ className, ...rest }) => (
7
+ export const Tbody: React.FC<React.PropsWithChildren<TbodyProps>> = ({ className, ...rest }) => (
8
8
  <tbody className={classnames(className, tbody())} {...rest} />
9
9
  );
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import classnames from 'classnames';
3
3
  import { td } from '@jpmorganchase/mosaic-theme';
4
4
 
5
- export interface TdProps extends React.HTMLProps<HTMLTableDataCellElement> {}
5
+ export interface TdProps extends React.HTMLProps<HTMLTableCellElement> {}
6
6
 
7
- export const Td: React.FC<TdProps> = ({ className, ...rest }) => (
7
+ export const Td: React.FC<React.PropsWithChildren<TdProps>> = ({ className, ...rest }) => (
8
8
  <td className={classnames(className, td())} {...rest} />
9
9
  );
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import classnames from 'classnames';
3
3
  import { th } from '@jpmorganchase/mosaic-theme';
4
4
 
5
- export interface ThProps extends React.HTMLProps<HTMLTableHeaderCellElement> {}
5
+ export interface ThProps extends React.HTMLProps<HTMLTableCellElement> {}
6
6
 
7
- export const Th: React.FC<ThProps> = ({ className, ...rest }) => (
7
+ export const Th: React.FC<React.PropsWithChildren<ThProps>> = ({ className, ...rest }) => (
8
8
  <th className={classnames(className, th())} {...rest} />
9
9
  );
@@ -4,6 +4,6 @@ import { thead } from '@jpmorganchase/mosaic-theme';
4
4
 
5
5
  export interface TheadProps extends React.HTMLProps<HTMLTableSectionElement> {}
6
6
 
7
- export const Thead: React.FC<TheadProps> = ({ className, ...rest }) => (
7
+ export const Thead: React.FC<React.PropsWithChildren<TheadProps>> = ({ className, ...rest }) => (
8
8
  <thead className={classnames(className, thead())} {...rest} />
9
9
  );
@@ -5,6 +5,6 @@ import styles from './index.css';
5
5
 
6
6
  export interface ThematicBreakProps extends React.HTMLProps<HTMLHRElement> {}
7
7
 
8
- export const ThematicBreak: React.FC<ThematicBreakProps> = ({ className }) => (
9
- <hr className={classnames(className, styles.root)} />
10
- );
8
+ export const ThematicBreak: React.FC<React.PropsWithChildren<ThematicBreakProps>> = ({
9
+ className
10
+ }) => <hr className={classnames(className, styles.root)} />;
@@ -4,6 +4,6 @@ import { tr } from '@jpmorganchase/mosaic-theme';
4
4
 
5
5
  export interface TrProps extends React.HTMLProps<HTMLTableRowElement> {}
6
6
 
7
- export const Tr: React.FC<TrProps> = ({ className, ...rest }) => (
7
+ export const Tr: React.FC<React.PropsWithChildren<TrProps>> = ({ className, ...rest }) => (
8
8
  <tr className={classnames(className, tr())} {...rest} />
9
9
  );
@@ -14,11 +14,11 @@ export interface MarkdownComponentProps {
14
14
  }
15
15
 
16
16
  export function withMarkdownSpacing<TProps extends MarkdownComponentProps>(
17
- Component: React.ComponentType<TProps>,
17
+ Component: React.ComponentType<React.PropsWithChildren<TProps>>,
18
18
  spacing = 'regular',
19
19
  inline = false
20
- ): React.FC<TProps> {
21
- const MarkdownComponent: React.FC<TProps> = ({
20
+ ): React.FC<React.PropsWithChildren<TProps>> {
21
+ const MarkdownComponent: React.FC<React.PropsWithChildren<TProps>> = ({
22
22
  className = '',
23
23
  spacing: spacingProp,
24
24
  ...rest
@@ -28,7 +28,7 @@ const getSelectedTabIndex = (items: TabsMenu, itemPath: string): number =>
28
28
  return itemPath.startsWith((item as TabsLinkItem).link);
29
29
  });
30
30
 
31
- export const SecondaryNavbar: React.FC<SecondaryNavbarProps> = ({
31
+ export const SecondaryNavbar: React.FC<React.PropsWithChildren<SecondaryNavbarProps>> = ({
32
32
  className,
33
33
  items = [],
34
34
  supportLink,
@@ -10,7 +10,7 @@ export interface StickyHeaderProps {
10
10
  offset?: number;
11
11
  }
12
12
 
13
- export const StickyHeader: FC<StickyHeaderProps> = ({
13
+ export const StickyHeader: FC<React.PropsWithChildren<StickyHeaderProps>> = ({
14
14
  children,
15
15
  className,
16
16
  offset = 0,
@@ -33,7 +33,7 @@ function TabsItem({ children, item }) {
33
33
  return <TabsLink item={item}>{children}</TabsLink>;
34
34
  }
35
35
 
36
- export const TabsBase: FC<TabsBaseProps> = forwardRef(
36
+ export const TabsBase: FC<React.PropsWithChildren<TabsBaseProps>> = forwardRef(
37
37
  ({ className, menu, selectedIndex = -1 }, ref: Ref<HTMLDivElement>) => {
38
38
  const [cursorIndex, setCursorIndex] = useState(() => -1);
39
39
 
@@ -15,7 +15,7 @@ export interface TabsButtonItem {
15
15
  interface TabButtonProps {
16
16
  item: TabsButtonItem;
17
17
  }
18
- export const TabsButton: FC<TabButtonProps> = ({ item }) => (
18
+ export const TabsButton: FC<React.PropsWithChildren<TabButtonProps>> = ({ item }) => (
19
19
  <div
20
20
  className={styles.menuButton}
21
21
  onClick={event => item.onSelect(event, item.title)}
@@ -18,7 +18,7 @@ export interface TabsLinkProps {
18
18
  item: TabsLinkItem;
19
19
  }
20
20
 
21
- export const TabsLink: FC<TabsLinkProps> = ({ children, item }) => (
21
+ export const TabsLink: FC<React.PropsWithChildren<TabsLinkProps>> = ({ children, item }) => (
22
22
  <Link className={styles.menuLink} link={item.link} variant="selectable">
23
23
  {item.title}
24
24
  {children}
package/src/Tag/index.tsx CHANGED
@@ -30,7 +30,7 @@ export interface TagProps {
30
30
  * />
31
31
  * ```
32
32
  */
33
- export const Tag: React.FC<TagProps> = ({
33
+ export const Tag: React.FC<React.PropsWithChildren<TagProps>> = ({
34
34
  className,
35
35
  category = '0',
36
36
  icon: iconName = 'none',
@@ -1,21 +1,24 @@
1
- import React, { ReactNode } from 'react';
1
+ import React, { ReactNode, useEffect, useState } from 'react';
2
2
  import { SaltProvider } from '@salt-ds/core';
3
+ import { useColorMode } from '@jpmorganchase/mosaic-store';
3
4
 
4
- import { useColorMode, ColorModeProvider } from './ColorModeProvider';
5
+ const useHasHydrated = () => {
6
+ const [hasHydrated, setHasHydrated] = useState(false);
5
7
 
6
- function ColorModeThemeProvider({ children }: { children?: ReactNode }) {
8
+ useEffect(() => {
9
+ setHasHydrated(true);
10
+ }, []);
11
+
12
+ return hasHydrated;
13
+ };
14
+
15
+ export function ThemeProvider({ children }: { children?: ReactNode }) {
16
+ const hasHydrated = useHasHydrated();
7
17
  const colorMode = useColorMode();
18
+
8
19
  return (
9
- <SaltProvider applyClassesTo="child" mode={colorMode}>
20
+ <SaltProvider applyClassesTo="child" mode={hasHydrated ? colorMode : 'light'}>
10
21
  <div>{children}</div>
11
22
  </SaltProvider>
12
23
  );
13
24
  }
14
-
15
- export function ThemeProvider({ children }: { children?: ReactNode }) {
16
- return (
17
- <ColorModeProvider>
18
- <ColorModeThemeProvider>{children}</ColorModeThemeProvider>
19
- </ColorModeProvider>
20
- );
21
- }
@@ -17,7 +17,7 @@ function PseudoButton({ children }) {
17
17
  );
18
18
  }
19
19
 
20
- export const TileButton: FC<TileButtonProps> = forwardRef(
20
+ export const TileButton: FC<React.PropsWithChildren<TileButtonProps>> = forwardRef(
21
21
  (
22
22
  {
23
23
  action = 'Edit',
@@ -51,7 +51,9 @@ export interface TileContentProps {
51
51
  }
52
52
 
53
53
  const TileImage: FC<
54
- Pick<TileContentProps, 'classes' | 'image' | 'imagePlacement' | 'onImageError'>
54
+ React.PropsWithChildren<
55
+ Pick<TileContentProps, 'classes' | 'image' | 'imagePlacement' | 'onImageError'>
56
+ >
55
57
  > = ({ classes = {}, image, imagePlacement, onImageError }) => {
56
58
  let tileImage = image;
57
59
  const imageUrl = typeof image === 'string' ? image : undefined;
@@ -71,7 +73,7 @@ const TileImage: FC<
71
73
  return <div className={tileImageRecipe({ imagePlacement })}>{tileImage}</div>;
72
74
  };
73
75
 
74
- export const TileContent: FC<TileContentProps> = forwardRef(
76
+ export const TileContent: FC<React.PropsWithChildren<TileContentProps>> = forwardRef(
75
77
  (
76
78
  {
77
79
  action,
@@ -15,7 +15,7 @@ export interface TileContentLabelProps {
15
15
  labelName?: string;
16
16
  }
17
17
 
18
- export const ContentLabel: React.FC<TileContentLabelProps> = ({
18
+ export const ContentLabel: React.FC<React.PropsWithChildren<TileContentLabelProps>> = ({
19
19
  className,
20
20
  labelItems = [],
21
21
  labelName,
@@ -27,7 +27,7 @@ export const ContentLabel: React.FC<TileContentLabelProps> = ({
27
27
  </Label>
28
28
  );
29
29
 
30
- export const ContentLabelWithTooltip: React.FC<TileContentLabelProps> = ({
30
+ export const ContentLabelWithTooltip: React.FC<React.PropsWithChildren<TileContentLabelProps>> = ({
31
31
  className,
32
32
  labelItems = [],
33
33
  labelName,
@@ -64,7 +64,7 @@ export const ContentLabelWithTooltip: React.FC<TileContentLabelProps> = ({
64
64
  );
65
65
  };
66
66
 
67
- export const TileContentLabel: React.FC<TileContentLabelProps> = props => {
67
+ export const TileContentLabel: React.FC<React.PropsWithChildren<TileContentLabelProps>> = props => {
68
68
  const labelContent = props.labelItems?.join(', ') || '';
69
69
  return labelContent.length > MAX_LENGTH ? (
70
70
  <ContentLabelWithTooltip {...props} />
@@ -28,7 +28,7 @@ const PseudoLink = ({ children, disabled, link }) => {
28
28
  );
29
29
  };
30
30
 
31
- export const TileLink: FC<TileLinkProps> = forwardRef(
31
+ export const TileLink: FC<React.PropsWithChildren<TileLinkProps>> = forwardRef(
32
32
  (
33
33
  {
34
34
  action = 'Documentation Overview',
@@ -8,8 +8,11 @@ export function withStyledTypography(
8
8
  variantClassName: string,
9
9
  Component: React.ElementType = 'p',
10
10
  defaultProps: Record<string, unknown> = {}
11
- ): React.FC<TypographyProps> {
12
- const StyledTypography: React.FC<TypographyProps> = ({ className, ...rest }) => (
11
+ ): React.FC<React.PropsWithChildren<TypographyProps>> {
12
+ const StyledTypography: React.FC<React.PropsWithChildren<TypographyProps>> = ({
13
+ className,
14
+ ...rest
15
+ }) => (
13
16
  <Typography
14
17
  className={classnames(variantClassName, className)}
15
18
  component={Component}
@@ -30,7 +30,10 @@ const replayIconByVariant = {
30
30
  20: 'replay30'
31
31
  };
32
32
 
33
- export const VideoPlayer: React.FC<VideoPlayerProps> = ({ src, skipDuration }) => {
33
+ export const VideoPlayer: React.FC<React.PropsWithChildren<VideoPlayerProps>> = ({
34
+ src,
35
+ skipDuration
36
+ }) => {
34
37
  const [videoElem, setVideoElem] = useState<HTMLVideoElement | null>(null);
35
38
  const [isPlaying, setIsPlaying] = useState(false);
36
39
  const [durationString, setDurationString] = useState('00:00:00');
@@ -40,7 +43,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({ src, skipDuration }) =
40
43
  const [volumeOn, setVolumeOn] = useState(true);
41
44
  const [metaDataLoaded, setMetaDataLoaded] = useState(false);
42
45
 
43
- const videoRef = useCallback(videoNode => {
46
+ const videoRef = useCallback((videoNode: HTMLVideoElement | null) => {
44
47
  if (videoNode) {
45
48
  setVideoElem(videoNode);
46
49
  }
@@ -8,9 +8,10 @@ describe('GIVEN a ReactLive view', () =>
8
8
  const { getAllByRole } = render(<ReactLive language="jsx">{'<h1>Hello World</h1>'}</ReactLive>);
9
9
 
10
10
  // assert
11
- await waitFor(() => expect(screen.getByText('Show Live Code')).toBeInTheDocument());
12
- expect(screen.getByText('Hello World')).toBeInTheDocument();
13
-
11
+ await waitFor(() => {
12
+ expect(screen.getByText('Show Live Code')).toBeInTheDocument();
13
+ expect(screen.getByText('Hello World')).toBeInTheDocument();
14
+ });
14
15
  // act
15
16
  const showLiveCode = screen.getByText('Show Live Code');
16
17
  fireEvent.click(showLiveCode);
package/src/index.tsx CHANGED
@@ -4,7 +4,6 @@ export * from './Button';
4
4
  export * from './Callout';
5
5
  export * from './Card';
6
6
  export * from './Cards';
7
- export * from './ColorModeProvider';
8
7
  export * from './ComponentExample';
9
8
  export * from './DataTable';
10
9
  export * from './EditionFilterView';
@@ -23,7 +22,6 @@ export * from './ImageProvider';
23
22
  export * from './Impact';
24
23
  export * from './Impacts';
25
24
  export * from './Label';
26
- export * from './Label';
27
25
  export * from './Link';
28
26
  export * from './LinkBase';
29
27
  export * from './LinkProvider';
@@ -56,4 +54,3 @@ export * from './useBreakpoint';
56
54
  export * from './useLockBodyScroll';
57
55
  export * from './useSize';
58
56
  export * from './useSpacing';
59
- export * from './useSpacing';
package/src/styles.ts CHANGED
@@ -44,4 +44,3 @@ import './TileBase/styles.css';
44
44
  import './TileContent/styles.css';
45
45
  import './TileContentLabel/styles.css';
46
46
  import './TileLink/styles.css';
47
- import './labs/Sitemap/styles.css';
@@ -1,16 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- export declare const lightMode = "light";
3
- export declare const darkMode = "dark";
4
- export declare type ColorMode = 'dark' | 'light';
5
- export declare const themePrefKey = "mosaic-theme-pref";
6
- interface ColorModeContextValues {
7
- colorMode: ColorMode;
8
- setColorMode: (colorMode: ColorMode) => void;
9
- }
10
- export declare const ColorModeContext: React.Context<ColorModeContextValues>;
11
- export declare function useColorMode(): ColorMode;
12
- export declare function ColorModeProvider({ children, defaultColorMode }: {
13
- children: ReactNode;
14
- defaultColorMode?: ColorMode;
15
- }): JSX.Element;
16
- export {};
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f}from"./chunk-DBAOAJMH.js";export{d as ColorModeContext,f as ColorModeProvider,b as darkMode,a as lightMode,c as themePrefKey,e as useColorMode};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-VSQXG6EA.js";import m from"react";import s from"classnames";var c=({children:t,className:r,...e})=>m.createElement("div",{className:s(o.root,r),...e},t);export{c as a};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-3G3LBCJD.js";import a from"react";import r from"classnames";import{Paginator as P,Pagination as s}from"@salt-ds/lab";var f=({className:n,pageCount:i,page:t,onPageChange:g})=>a.createElement("div",{className:r(o.root,n)},a.createElement(s,{count:i,onPageChange:g,page:t},a.createElement(P,null)));export{f as a};
@@ -1 +0,0 @@
1
- import t from"react";var a=({children:r,size:o="small",variant:m="document",...n})=>{let i=t.Children.map(r,e=>t.isValidElement(e)&&e.props.mdxType==="ul"?t.cloneElement(e,{size:o,variant:m}):e);return t.createElement("li",{...n},i)};export{a};
@@ -1 +0,0 @@
1
- import o from"react";import r from"classnames";import{td as a}from"@jpmorganchase/mosaic-theme";var c=({className:e,...t})=>o.createElement("td",{className:r(e,a()),...t});export{c as a};
@@ -1 +0,0 @@
1
- import{a as r}from"./chunk-FABGH4NH.js";import{a as e}from"./chunk-TIPUHCNI.js";import t from"react";import b from"classnames";var C=23,g=({className:o,labelItems:n=[],labelName:l,...s})=>t.createElement(r,{className:b(e.root,o,e.labelHover),...s},t.createElement("i",null,l,": "),n.join(", ")),T=({className:o,labelItems:n=[],labelName:l,...s})=>{let i=n.join(", "),L=i.split(",").length,a=`${i.substr(0,C-12)}...`,p=L-a.split(",").length;return t.createElement(r,{TooltipProps:{title:l,children:t.createElement("span",{className:e.numRemaining},`${p===0?"1":p} more`)},className:b(e.root,o,e.labelHover),tooltip:i.split(",").map((m,c)=>t.createElement("span",{key:`${m}-${c}`},m," ",t.createElement("br",null))),tooltipClass:e.tooltipContent,...s},t.createElement("i",null,l,": "),a," +"," ")},P=o=>(o.labelItems?.join(", ")||"").length>C?t.createElement(T,{...o}):t.createElement(g,{...o});export{C as a,g as b,T as c,P as d};
@@ -1 +0,0 @@
1
- import{a as T}from"./chunk-SS3XUXOS.js";import{b as d}from"./chunk-NOS6FYP4.js";import{c}from"./chunk-44RW6ETD.js";import{a as f}from"./chunk-CV3R74GK.js";import{a as p}from"./chunk-C3QGODZV.js";import{a as m}from"./chunk-QBWO3SO2.js";import{a as h}from"./chunk-UOERMLXJ.js";import i,{forwardRef as B}from"react";var C=({children:o,disabled:n,link:r})=>{let{highlighted:[e]}=c(),s=!m(r);return i.createElement(f,{disabled:n,endIcon:s?"chevronRight":"tearOut",hovered:e},o)},M=B(({action:o="Documentation Overview",caption:n,description:r,disabled:e=!1,eyebrow:s,image:L,imagePlacement:k,link:t,size:l,title:P,...g},u)=>{let a=i.createElement(T,{action:i.createElement(C,{disabled:e,link:t},o),caption:n,description:r,disabled:e,eyebrow:s,image:L,imagePlacement:k,size:l,title:P}),x=!e&&t&&t.length;return i.createElement(d,{disabled:e,ref:u,size:l,...g},x?i.createElement(p,{"aria-labelledby":"tilecontent-title",className:h.link,href:t,tabIndex:0},a):a)});export{M as a};
@@ -1 +0,0 @@
1
- import{a as t}from"./chunk-A2A5KLET.js";import d,{useRef as n,useState as m,useEffect as p}from"react";import y from"classnames";var H=({children:c,className:i,offset:l=0,...f})=>{let e=n(null),[r,u]=m(!1),o=n(0),s=()=>{e.current&&u(window.scrollY>o.current-e.current.clientHeight)};p(()=>{if(!!e.current)return o.current=e.current.offsetTop,window.addEventListener("scroll",s),()=>{window.removeEventListener("scroll",()=>s)}},[]);let a=r?{top:`${l}px`}:void 0;return d.createElement("div",{className:y(t.root,{[t.sticky]:r},i),ref:e,role:"presentation",style:a,...f},c)};export{H as a};
@@ -1 +0,0 @@
1
- import{a as n}from"./chunk-THZHIJBQ.js";import i from"react";var p=({href:o,...r})=>i.createElement(n,{link:o,variant:"document",...r});export{p as a};
@@ -1 +0,0 @@
1
- import s,{useEffect as C,useMemo as i,useState as u,createContext as h}from"react";var m="light",p="dark",c="mosaic-theme-pref",n=h({colorMode:"light",setColorMode:()=>{}});function g(){let e=s.useContext(n);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeContext");return e.colorMode}function k({children:e,defaultColorMode:t=m}){let[l,r]=u(t);C(()=>{let o;try{let d=localStorage.getItem(c),M=matchMedia("(prefers-color-scheme:dark)").matches?"dark":t;o=d||M||t,r(o)}catch{console.error(`Could not set default color mode to ${o}`)}},[t]);let a=i(()=>({colorMode:l,setColorMode:o=>{r(o);try{localStorage.setItem(c,o)}catch{console.error(`Could not persist default color mode ${o} in local storage`)}}}),[l,r]);return s.createElement(n.Provider,{value:a},e)}export{m as a,p as b,c,n as d,g as e,k as f};
@@ -1 +0,0 @@
1
- import{a as r}from"./chunk-YX3L5Z7J.js";import n,{cloneElement as a,Children as s}from"react";import c from"classnames";function i(e){return s.map(e,(t,o)=>a(t,{key:`featureAction-${o}`,spacing:"none"}))}var u=({children:e,className:t,...o})=>n.createElement("div",{className:c(t,r.root),...o},i(e));export{u as a};
@@ -1 +0,0 @@
1
- import{a as s}from"./chunk-HAMMUBE7.js";import{a as e}from"./chunk-IZFGOF3C.js";import m from"react";import l from"classnames";var d=({className:a,image:t,title:o,label:r,...p})=>{let i=e();return m.createElement("div",{className:l(s.root,a),...p},m.createElement("div",{className:s.line}),m.createElement(i,{className:s.image,src:t}),m.createElement("div",null,m.createElement("p",{className:s.title},o),m.createElement("p",{className:s.label},r)))};export{d as a};
@@ -1 +0,0 @@
1
- import r from"react";import t from"classnames";import{orderedList as a,orderedListItem as i}from"@jpmorganchase/mosaic-theme";var l=({children:s,className:o})=>{let m=r.Children.map(s,e=>r.isValidElement(e)?r.cloneElement(e,{className:t(e.props.className,i)}):e);return r.createElement("ol",{className:t(o,a)},m)};export{l as a};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-RRVEX5DC.js";import i from"react";import c from"classnames";import m from"hoist-non-react-statics";function T(n,e="regular",s=!1){let r=({className:a="",spacing:t,...p})=>i.createElement(n,{className:c(o[t||e],a,{[o.inline]:s}),...p});return m(r,n),r}export{T as a};
@@ -1 +0,0 @@
1
- import{a as e}from"./chunk-3EEX4X6D.js";import{a as o}from"./chunk-SF7SQKVF.js";import l from"react";import i from"classnames";var p=({className:r})=>{let{displayedCount:t,totalItemCount:s}=e();return l.createElement("div",{"aria-label":"result count",className:i(r,o.root)},t===s?"All":t," Result",t===1?"":"s"," Displayed")};export{p as a};
@@ -1 +0,0 @@
1
- import r from"react";import n from"classnames";import{code as t}from"@jpmorganchase/mosaic-theme";var p=({className:e,...o})=>r.createElement("code",{className:n(e,t()),...o});export{p as a};
@@ -1 +0,0 @@
1
- import e from"react";import o from"classnames";import{table as r,tableContainer as s}from"@jpmorganchase/mosaic-theme";var b=({className:a,...t})=>e.createElement("div",{className:o(a,s())},e.createElement("table",{className:r(),...t}));export{b as a};
@@ -1 +0,0 @@
1
- import{a as o}from"./chunk-BX52WGFN.js";import n from"react";import s from"classnames";import m from"hoist-non-react-statics";function f(r,t="p",a={}){let p=({className:e,...y})=>n.createElement(o,{className:s(r,e),component:t,...a,...y});return m(p,o),p}export{f as a};
@@ -1 +0,0 @@
1
- import{e,f as d}from"./chunk-DBAOAJMH.js";import o from"react";import{SaltProvider as l}from"@salt-ds/core";function t({children:r}){let i=e();return o.createElement(l,{applyClassesTo:"child",mode:i},o.createElement("div",null,r))}function P({children:r}){return o.createElement(d,null,o.createElement(t,null,r))}export{P as a};
@@ -1 +0,0 @@
1
- import{b as d}from"./chunk-NOS6FYP4.js";import{c as m}from"./chunk-44RW6ETD.js";import{a as r}from"./chunk-CV3R74GK.js";import{a as s}from"./chunk-C3QGODZV.js";import{a as t,b as p,c}from"./chunk-335WBXRV.js";import{a}from"./chunk-IZFGOF3C.js";import i from"react";var h=({children:e})=>{let{highlighted:[l]}=m();return i.createElement(r,{endIcon:"chevronRight",hovered:l},e)},k=({image:e,imagePlacement:l})=>{let n=a();return!e||!n?null:i.createElement("div",{className:c({imagePlacement:l})},i.createElement(n,{alt:"","aria-describedby":"tilecontent-description",className:p({imagePlacement:l}),layout:"fill",src:e}))},x=({description:e,eyebrow:l=null,image:n,imagePlacement:g="fullWidth",link:u,title:o,...f})=>i.createElement(d,{className:t.root,...f,size:"fullWidth"},i.createElement(s,{className:t.content,"aria-labelledby":"tilecontent-title",href:u,tabIndex:0},n?i.createElement(k,{image:n,imagePlacement:g}):null,i.createElement("div",null,l?i.createElement("p",{className:t.eyebrow},l):null,o?i.createElement("p",{className:t.title},o):null,e?i.createElement("div",{className:t.description},e):null,i.createElement(h,null,i.createElement("p",{className:t.action},"Read More")))));export{x as a};
@@ -1 +0,0 @@
1
- import{a as s}from"./chunk-QRA62OWQ.js";import{a as e}from"./chunk-O5II25ZN.js";import a from"react";import n from"classnames";var b=({className:m,category:r="0",icon:o="none",label:t,size:i="small",...l})=>a.createElement("div",{className:n(s.root,s[`category${r}`],s[`border${r}`],m),...l},a.createElement("span",{className:n(s.label,s[i],s[`category${r}`]),"aria-label":"tag"},o&&a.createElement("span",{className:s.icon},a.createElement(e,{name:o,size:i})),t));export{b as a};
@@ -1 +0,0 @@
1
- import{a as t}from"./chunk-PY55ZUDE.js";import{a as e}from"./chunk-C252LIKT.js";import{a as p}from"./chunk-YKXHKTDJ.js";import{a as i}from"./chunk-QYR5BEHF.js";import{a as l}from"./chunk-3R4QYYQ4.js";import{a as r}from"./chunk-I3NDLK5N.js";import{a}from"./chunk-6AIEZTB5.js";import n from"react";import F from"classnames";var o=function({children:m,className:s,...f}){return n.createElement(r,{...f},n.createElement("div",{className:F(a.root,s)},m))};o.ContentArea=l;o.FilterDropdown=t;o.PillGroup=e;o.SortDropdown=i;o.Search=p;export{o as a};
@@ -1 +0,0 @@
1
- import n from"react";import s from"classnames";import{Button as u}from"@salt-ds/core";import{button as e}from"@jpmorganchase/mosaic-theme";var f=({children:o,className:r,variant:t="regular",...a})=>n.createElement(u,{className:s(e({variant:t}),r),variant:t=="regular"?"primary":t,...a},o);export{f as a};
@@ -1 +0,0 @@
1
- import o from"react";import t from"classnames";import{tr as s}from"@jpmorganchase/mosaic-theme";var c=({className:r,...e})=>o.createElement("tr",{className:t(r,s()),...e});export{c as a};
@@ -1 +0,0 @@
1
- import{I as y,j as b,q as N}from"./chunk-AZUFJ6VU.js";import{a as L}from"./chunk-U3L7YGSF.js";import{a as e}from"./chunk-3DFTW2GM.js";import{a as v}from"./chunk-IZFGOF3C.js";import a from"react";import m from"classnames";var I=(t,l,i)=>(l?l.split("<br>"):[]).map((r,n)=>a.createElement(b,{className:m({[e.fullWidthTitle]:t,[e.title]:!t}),key:`${i}-${n}`},r));function W({isFramed:t,heroBackgroundImage:l,heroImage:i,isFullWidth:s}){let r=v();return t?a.createElement("div",{className:e.frame},l&&a.createElement(r,{alt:"main background image",className:e.frameBackgroundImage,layout:"fill",src:l,priority:!0}),a.createElement(r,{alt:"main",className:e.frameImage,layout:"fill",src:i,priority:!0})):a.createElement(r,{alt:"main",className:m(e.image,{[e.fullWidthImage]:s,[e.imageWidth]:!s}),layout:"fill",objectFit:"scale-down",src:i,priority:!0})}var S=({backgroundImage:t,className:l,datestamp:i,datestampLabel:s="Last Modified",description:r,eyebrow:n,image:u,title:d,links:g,variant:c="regular",...h})=>{let o=c==="fullWidth",k=c==="framed";return a.createElement("div",{className:m(e.root,{[e.fullWidth]:o,[e.fixedSize]:!o},l),role:"banner",...h},a.createElement("div",{className:e.heading,role:"heading"},n?a.createElement(y,{className:e.eyebrow},n):null,typeof d=="string"?I(o,d,"title"):d,i?a.createElement(a.Fragment,null,a.createElement("label",{className:e.datestampLabel,id:"last-modified-label"},s,":"),a.createElement("span",{"aria-labelledby":"last-modified-label",className:e.datestamp},new Date(i).toLocaleString())):null,r?a.createElement(N,{className:e.description},r):null,g?a.createElement("div",{className:e.links},g.map((f,H)=>{let p=H===g.length-1;return a.createElement("div",{className:m({[e.link]:!p,[e.lastLink]:p}),key:f.label},a.createElement(L,{href:f.url,variant:"cta"},f.label))})):null),u?a.createElement(W,{heroBackgroundImage:t,heroImage:u,isFramed:k,isFullWidth:o}):null)};export{S as a};
@@ -1 +0,0 @@
1
- import{useState as g,useCallback as p}from"react";function P({itemsPerPage:n,displayedCount:t}){let[e,o]=g(1),a=t>=n,s=e>1&&a?(e-1)*n:0,c=a?s+n:t,r=Math.ceil(t/n),i=p(u=>{o(u)},[o]);return{page:e,pageCount:r,startIndex:s,endIndex:c,onPageChange:i}}export{P as a};
@@ -1 +0,0 @@
1
- import t from"react";import o from"classnames";import{th as s}from"@jpmorganchase/mosaic-theme";var c=({className:e,...r})=>t.createElement("th",{className:o(e,s()),...r});export{c as a};
@@ -1 +0,0 @@
1
- import{a as T}from"./chunk-DHXA4PUS.js";import{a as c}from"./chunk-VIQKAFRZ.js";import{a as b}from"./chunk-AUVYPVBP.js";import{a as e}from"./chunk-XKXLMQA4.js";import t,{useRef as p,useEffect as M,useState as I,forwardRef as v}from"react";import f from"classnames";var L=(o=>(o.MENU="menu",o.LINK="link",o.BUTTON="button",o))(L||{});function N({children:r,item:n}){let{type:s}=n;return s==="menu"?t.createElement(b,{item:n},r):s==="button"?t.createElement(T,{item:n},r):t.createElement(c,{item:n},r)}var S=v(({className:r,menu:n,selectedIndex:s=-1},o)=>{let[d,l]=I(()=>-1),i=p(null),a=p(null);return M(()=>{if(s>=0&&i.current&&a.current){let u=i.current?.children[s];if(u){let m=u.offsetWidth,B=u.offsetLeft;a.current.style.width=`${m}px`,a.current.style.left=`${B}px`,a.current.style.display="block"}}},[s]),t.createElement("div",{className:f(e.menuItems,r),ref:o},t.createElement("div",{className:e.flexContainer,onMouseLeave:()=>l(-1),ref:i},n&&n.length?n.map((u,m)=>t.createElement("div",{className:e.flexContainer,key:`menu_item_${m}`,onMouseEnter:()=>l(m)},t.createElement(N,{item:u},t.createElement("div",{className:f(e.menuIndicator,{[e.menuIndicatorHover]:d===m})})))):null,t.createElement("span",{className:f(e.menuIndicator,e.menuIndicatorSelected,e.hideOnFirstRender),"data-selected":s>=0,ref:a})))});export{L as a,S as b};