@pega/cosmos-react-core 2.0.0-dev.13.0 → 2.0.0-dev.14.0

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 (221) hide show
  1. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  2. package/lib/components/AppShell/AppShell.js +1 -1
  3. package/lib/components/AppShell/AppShell.js.map +1 -1
  4. package/lib/components/AppShell/AppShell.styles.d.ts +1 -0
  5. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  6. package/lib/components/AppShell/AppShell.styles.js +14 -8
  7. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  8. package/lib/components/Avatar/Avatar.js +1 -1
  9. package/lib/components/Avatar/Avatar.js.map +1 -1
  10. package/lib/components/Backdrop/Backdrop.d.ts +1 -1
  11. package/lib/components/Button/Button.d.ts +5 -0
  12. package/lib/components/Button/Button.d.ts.map +1 -1
  13. package/lib/components/Button/Button.js +16 -7
  14. package/lib/components/Button/Button.js.map +1 -1
  15. package/lib/components/Card/CardContent.js +1 -1
  16. package/lib/components/Card/CardContent.js.map +1 -1
  17. package/lib/components/Card/CardFooter.js +1 -1
  18. package/lib/components/Card/CardFooter.js.map +1 -1
  19. package/lib/components/Card/CardHeader.js +1 -1
  20. package/lib/components/Card/CardHeader.js.map +1 -1
  21. package/lib/components/ComboBox/ComboBox.d.ts +1 -1
  22. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  23. package/lib/components/ComboBox/ComboBox.js +2 -1
  24. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  25. package/lib/components/Configuration/Configuration.js +1 -1
  26. package/lib/components/Configuration/Configuration.js.map +1 -1
  27. package/lib/components/DateTime/Picker/Calendar.styles.d.ts +2 -2
  28. package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
  29. package/lib/components/DateTime/Picker/Calendar.styles.js +2 -2
  30. package/lib/components/DateTime/Picker/Calendar.styles.js.map +1 -1
  31. package/lib/components/File/FileInput.d.ts +1 -1
  32. package/lib/components/File/FileInput.d.ts.map +1 -1
  33. package/lib/components/Flex/Flex.d.ts +2 -2
  34. package/lib/components/Flex/Flex.d.ts.map +1 -1
  35. package/lib/components/Flex/Flex.js.map +1 -1
  36. package/lib/components/FormControl/FormControl.d.ts +1 -1
  37. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  38. package/lib/components/Grid/Grid.d.ts +1 -1
  39. package/lib/components/Grid/Grid.d.ts.map +1 -1
  40. package/lib/components/Icon/{mocks/iconNames.d.ts → iconNames.d.ts} +0 -0
  41. package/lib/components/Icon/iconNames.d.ts.map +1 -0
  42. package/lib/components/Icon/{mocks/iconNames.js → iconNames.js} +0 -0
  43. package/lib/components/Icon/iconNames.js.map +1 -0
  44. package/lib/components/Input/Input.styles.js +2 -2
  45. package/lib/components/Input/Input.styles.js.map +1 -1
  46. package/lib/components/Menu/FlyoutMenuList.d.ts.map +1 -1
  47. package/lib/components/Menu/FlyoutMenuList.js +4 -2
  48. package/lib/components/Menu/FlyoutMenuList.js.map +1 -1
  49. package/lib/components/Menu/Menu.styles.d.ts +10 -0
  50. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  51. package/lib/components/Menu/Menu.styles.js +196 -1
  52. package/lib/components/Menu/Menu.styles.js.map +1 -1
  53. package/lib/components/Menu/Menu.types.d.ts +15 -7
  54. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  55. package/lib/components/Menu/Menu.types.js.map +1 -1
  56. package/lib/components/Menu/MenuGroup.d.ts +6 -0
  57. package/lib/components/Menu/MenuGroup.d.ts.map +1 -0
  58. package/lib/components/Menu/MenuGroup.js +17 -0
  59. package/lib/components/Menu/MenuGroup.js.map +1 -0
  60. package/lib/components/Menu/MenuItem.d.ts +0 -3
  61. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  62. package/lib/components/Menu/MenuItem.js +9 -116
  63. package/lib/components/Menu/MenuItem.js.map +1 -1
  64. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  65. package/lib/components/Menu/MenuList.js +6 -5
  66. package/lib/components/Menu/MenuList.js.map +1 -1
  67. package/lib/components/Menu/MenuListHeader.d.ts +0 -1
  68. package/lib/components/Menu/MenuListHeader.d.ts.map +1 -1
  69. package/lib/components/Menu/MenuListHeader.js +4 -54
  70. package/lib/components/Menu/MenuListHeader.js.map +1 -1
  71. package/lib/components/Menu/helpers.d.ts +13 -12
  72. package/lib/components/Menu/helpers.d.ts.map +1 -1
  73. package/lib/components/Menu/helpers.js +32 -22
  74. package/lib/components/Menu/helpers.js.map +1 -1
  75. package/lib/components/Menu/index.d.ts +2 -3
  76. package/lib/components/Menu/index.d.ts.map +1 -1
  77. package/lib/components/Menu/index.js +1 -2
  78. package/lib/components/Menu/index.js.map +1 -1
  79. package/lib/components/Modal/Modal.js +1 -1
  80. package/lib/components/Modal/Modal.js.map +1 -1
  81. package/lib/components/Modal/Modal.styles.d.ts +1 -1
  82. package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
  83. package/lib/components/Modal/Modal.styles.js +17 -7
  84. package/lib/components/Modal/Modal.styles.js.map +1 -1
  85. package/lib/components/Modal/Modal.types.d.ts +7 -2
  86. package/lib/components/Modal/Modal.types.d.ts.map +1 -1
  87. package/lib/components/Modal/Modal.types.js.map +1 -1
  88. package/lib/components/MultiStep/MultiStep.styles.js +1 -1
  89. package/lib/components/MultiStep/MultiStep.styles.js.map +1 -1
  90. package/lib/components/Number/NumberInput.styles.d.ts +2 -2
  91. package/lib/components/Number/NumberInput.styles.d.ts.map +1 -1
  92. package/lib/components/PageTemplates/PageTemplates.d.ts +1 -0
  93. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  94. package/lib/components/PageTemplates/PageTemplates.js +18 -22
  95. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  96. package/lib/components/Progress/Bar.js +1 -1
  97. package/lib/components/Progress/Bar.js.map +1 -1
  98. package/lib/components/Progress/Ring.js +1 -1
  99. package/lib/components/Progress/Ring.js.map +1 -1
  100. package/lib/components/RadioCheck/RadioCheck.js +3 -3
  101. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  102. package/lib/components/RadioCheckGroup/RadioCheckGroup.js +2 -2
  103. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  104. package/lib/components/SearchInput/SearchInput.js +7 -7
  105. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  106. package/lib/components/Select/Select.js +2 -2
  107. package/lib/components/Select/Select.js.map +1 -1
  108. package/lib/components/Slider/Slider.styles.d.ts +1 -1
  109. package/lib/components/Slider/Slider.styles.js +1 -1
  110. package/lib/components/Slider/Slider.styles.js.map +1 -1
  111. package/lib/components/Switch/Switch.d.ts.map +1 -1
  112. package/lib/components/Switch/Switch.js +39 -29
  113. package/lib/components/Switch/Switch.js.map +1 -1
  114. package/lib/components/Text/Text.d.ts +1 -1
  115. package/lib/components/Text/Text.d.ts.map +1 -1
  116. package/lib/hooks/useI18n.d.ts +3 -0
  117. package/lib/hooks/useI18n.d.ts.map +1 -1
  118. package/lib/i18n/default.json +4 -1
  119. package/lib/i18n/i18n.d.ts +6 -0
  120. package/lib/i18n/i18n.d.ts.map +1 -1
  121. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  122. package/lib/styles/GlobalStyle.js +2 -1
  123. package/lib/styles/GlobalStyle.js.map +1 -1
  124. package/lib/theme/theme.d.ts +41 -11
  125. package/lib/theme/theme.d.ts.map +1 -1
  126. package/lib/theme/themeDefinition.json +50 -30
  127. package/lib/theme/themeOverrides.schema.json +15 -3
  128. package/lib/types/types.d.ts +4 -1
  129. package/lib/types/types.d.ts.map +1 -1
  130. package/lib/types/types.js.map +1 -1
  131. package/package.json +1 -1
  132. package/lib/components/AppShell/mocks/AppShell.mocks.d.ts +0 -14
  133. package/lib/components/AppShell/mocks/AppShell.mocks.d.ts.map +0 -1
  134. package/lib/components/AppShell/mocks/AppShell.mocks.js +0 -142
  135. package/lib/components/AppShell/mocks/AppShell.mocks.js.map +0 -1
  136. package/lib/components/AppShell/mocks/AppShell.styles.d.ts +0 -2
  137. package/lib/components/AppShell/mocks/AppShell.styles.d.ts.map +0 -1
  138. package/lib/components/AppShell/mocks/AppShell.styles.js +0 -5
  139. package/lib/components/AppShell/mocks/AppShell.styles.js.map +0 -1
  140. package/lib/components/Breadcrumbs/mocks/Breadcrumbs.styles.d.ts +0 -2
  141. package/lib/components/Breadcrumbs/mocks/Breadcrumbs.styles.d.ts.map +0 -1
  142. package/lib/components/Breadcrumbs/mocks/Breadcrumbs.styles.js +0 -12
  143. package/lib/components/Breadcrumbs/mocks/Breadcrumbs.styles.js.map +0 -1
  144. package/lib/components/Card/mocks/Card.styles.d.ts +0 -2
  145. package/lib/components/Card/mocks/Card.styles.d.ts.map +0 -1
  146. package/lib/components/Card/mocks/Card.styles.js +0 -5
  147. package/lib/components/Card/mocks/Card.styles.js.map +0 -1
  148. package/lib/components/CheckboxGroup/mocks/CheckboxGroup.styles.d.ts +0 -3
  149. package/lib/components/CheckboxGroup/mocks/CheckboxGroup.styles.d.ts.map +0 -1
  150. package/lib/components/CheckboxGroup/mocks/CheckboxGroup.styles.js +0 -10
  151. package/lib/components/CheckboxGroup/mocks/CheckboxGroup.styles.js.map +0 -1
  152. package/lib/components/ComboBox/mocks/ComboBox.mocks.d.ts +0 -24
  153. package/lib/components/ComboBox/mocks/ComboBox.mocks.d.ts.map +0 -1
  154. package/lib/components/ComboBox/mocks/ComboBox.mocks.js +0 -44
  155. package/lib/components/ComboBox/mocks/ComboBox.mocks.js.map +0 -1
  156. package/lib/components/Drawer/mocks/Drawer.styles.d.ts +0 -2
  157. package/lib/components/Drawer/mocks/Drawer.styles.d.ts.map +0 -1
  158. package/lib/components/Drawer/mocks/Drawer.styles.js +0 -11
  159. package/lib/components/Drawer/mocks/Drawer.styles.js.map +0 -1
  160. package/lib/components/ExpandCollapse/mocks/ExpandCollapse.styles.d.ts +0 -4
  161. package/lib/components/ExpandCollapse/mocks/ExpandCollapse.styles.d.ts.map +0 -1
  162. package/lib/components/ExpandCollapse/mocks/ExpandCollapse.styles.js +0 -12
  163. package/lib/components/ExpandCollapse/mocks/ExpandCollapse.styles.js.map +0 -1
  164. package/lib/components/Flex/mocks/Flex.styles.d.ts +0 -10
  165. package/lib/components/Flex/mocks/Flex.styles.d.ts.map +0 -1
  166. package/lib/components/Flex/mocks/Flex.styles.js +0 -42
  167. package/lib/components/Flex/mocks/Flex.styles.js.map +0 -1
  168. package/lib/components/Grid/mocks/Grid.styles.d.ts +0 -6
  169. package/lib/components/Grid/mocks/Grid.styles.d.ts.map +0 -1
  170. package/lib/components/Grid/mocks/Grid.styles.js +0 -37
  171. package/lib/components/Grid/mocks/Grid.styles.js.map +0 -1
  172. package/lib/components/Icon/mocks/iconNames.d.ts.map +0 -1
  173. package/lib/components/Icon/mocks/iconNames.js.map +0 -1
  174. package/lib/components/Menu/mocks/Menu.mocks.d.ts +0 -32
  175. package/lib/components/Menu/mocks/Menu.mocks.d.ts.map +0 -1
  176. package/lib/components/Menu/mocks/Menu.mocks.js +0 -87
  177. package/lib/components/Menu/mocks/Menu.mocks.js.map +0 -1
  178. package/lib/components/Menu/mocks/Menu.styles.d.ts +0 -2
  179. package/lib/components/Menu/mocks/Menu.styles.d.ts.map +0 -1
  180. package/lib/components/Menu/mocks/Menu.styles.js +0 -6
  181. package/lib/components/Menu/mocks/Menu.styles.js.map +0 -1
  182. package/lib/components/PageTemplates/mocks/PageTemplates.mocks.d.ts +0 -3
  183. package/lib/components/PageTemplates/mocks/PageTemplates.mocks.d.ts.map +0 -1
  184. package/lib/components/PageTemplates/mocks/PageTemplates.mocks.js +0 -10
  185. package/lib/components/PageTemplates/mocks/PageTemplates.mocks.js.map +0 -1
  186. package/lib/components/PageTemplates/mocks/PageTemplates.styles.d.ts +0 -4
  187. package/lib/components/PageTemplates/mocks/PageTemplates.styles.d.ts.map +0 -1
  188. package/lib/components/PageTemplates/mocks/PageTemplates.styles.js +0 -23
  189. package/lib/components/PageTemplates/mocks/PageTemplates.styles.js.map +0 -1
  190. package/lib/components/Progress/mocks/Progress.styles.d.ts +0 -2
  191. package/lib/components/Progress/mocks/Progress.styles.d.ts.map +0 -1
  192. package/lib/components/Progress/mocks/Progress.styles.js +0 -13
  193. package/lib/components/Progress/mocks/Progress.styles.js.map +0 -1
  194. package/lib/components/RadioButtonGroup/mocks/RadioButtonGroup.styles.d.ts +0 -3
  195. package/lib/components/RadioButtonGroup/mocks/RadioButtonGroup.styles.d.ts.map +0 -1
  196. package/lib/components/RadioButtonGroup/mocks/RadioButtonGroup.styles.js +0 -10
  197. package/lib/components/RadioButtonGroup/mocks/RadioButtonGroup.styles.js.map +0 -1
  198. package/lib/components/SummaryList/mocks/SummaryList.mocks.d.ts +0 -29
  199. package/lib/components/SummaryList/mocks/SummaryList.mocks.d.ts.map +0 -1
  200. package/lib/components/SummaryList/mocks/SummaryList.mocks.js +0 -29
  201. package/lib/components/SummaryList/mocks/SummaryList.mocks.js.map +0 -1
  202. package/lib/components/Switch/mocks/Switch.styles.d.ts +0 -2
  203. package/lib/components/Switch/mocks/Switch.styles.d.ts.map +0 -1
  204. package/lib/components/Switch/mocks/Switch.styles.js +0 -13
  205. package/lib/components/Switch/mocks/Switch.styles.js.map +0 -1
  206. package/lib/components/Table/mocks/Table.mocks.d.ts +0 -18
  207. package/lib/components/Table/mocks/Table.mocks.d.ts.map +0 -1
  208. package/lib/components/Table/mocks/Table.mocks.js +0 -30
  209. package/lib/components/Table/mocks/Table.mocks.js.map +0 -1
  210. package/lib/components/Table/mocks/Table.styles.d.ts +0 -4
  211. package/lib/components/Table/mocks/Table.styles.d.ts.map +0 -1
  212. package/lib/components/Table/mocks/Table.styles.js +0 -9
  213. package/lib/components/Table/mocks/Table.styles.js.map +0 -1
  214. package/lib/components/Tree/mocks/Tree.mocks.d.ts +0 -2
  215. package/lib/components/Tree/mocks/Tree.mocks.d.ts.map +0 -1
  216. package/lib/components/Tree/mocks/Tree.mocks.js +0 -22
  217. package/lib/components/Tree/mocks/Tree.mocks.js.map +0 -1
  218. package/lib/components/Tree/mocks/Tree.styles.d.ts +0 -3
  219. package/lib/components/Tree/mocks/Tree.styles.d.ts.map +0 -1
  220. package/lib/components/Tree/mocks/Tree.styles.js +0 -10
  221. package/lib/components/Tree/mocks/Tree.styles.js.map +0 -1
@@ -1,10 +0,0 @@
1
- import styled from 'styled-components';
2
- import Image from '../../Image';
3
- import Text from '../../Text';
4
- export const Paragraph = styled(Text) `
5
- width: 30ch;
6
- `;
7
- export const StyledImage = styled(Image) `
8
- max-width: 6rem;
9
- `;
10
- //# sourceMappingURL=RadioButtonGroup.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioButtonGroup.styles.js","sourceRoot":"","sources":["../../../../src/components/RadioButtonGroup/mocks/RadioButtonGroup.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,IAAI,MAAM,YAAY,CAAC;AAE9B,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;CAEpC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEvC,CAAC","sourcesContent":["import styled from 'styled-components';\n\nimport Image from '../../Image';\nimport Text from '../../Text';\n\nexport const Paragraph = styled(Text)`\n width: 30ch;\n`;\n\nexport const StyledImage = styled(Image)`\n max-width: 6rem;\n`;\n"]}
@@ -1,29 +0,0 @@
1
- import { Dispatch, ReactNode, SetStateAction } from 'react';
2
- export interface MockListItem {
3
- id: string;
4
- primary: string;
5
- secondary: ReactNode;
6
- visual: ReactNode;
7
- [key: string]: any;
8
- }
9
- export interface MockUserAPIResponse {
10
- results: MockUser[];
11
- }
12
- export interface MockUser {
13
- name: {
14
- title: string;
15
- first: string;
16
- last: string;
17
- };
18
- email: string;
19
- picture: {
20
- large: string;
21
- medium: string;
22
- thumbnail: string;
23
- };
24
- }
25
- export declare const getMockUsers: (limit?: number, fields?: string[]) => Promise<MockUserAPIResponse>;
26
- export declare const useMockListData: (cb: () => void, { count }?: {
27
- count?: number | undefined;
28
- }) => [MockListItem[], Dispatch<SetStateAction<MockListItem[]>>];
29
- //# sourceMappingURL=SummaryList.mocks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SummaryList.mocks.d.ts","sourceRoot":"","sources":["../../../../src/components/SummaryList/mocks/SummaryList.mocks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAMjF,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,QAAQ,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,eAAO,MAAM,YAAY,WAChB,MAAM,WACL,MAAM,EAAE,KACf,QAAQ,mBAAmB,CAI7B,CAAC;AAwBF,eAAO,MAAM,eAAe,OACtB,MAAM,IAAI;;MAEb,CAAC,YAAY,EAAE,EAAE,SAAS,eAAe,YAAY,EAAE,CAAC,CAAC,CAa3D,CAAC"}
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect, useState } from 'react';
3
- import Avatar from '../../Avatar';
4
- import { EmailDisplay } from '../../Email';
5
- import { useAfterInitialEffect } from '../../../hooks';
6
- export const getMockUsers = async (limit = 3, fields = ['name', 'email', 'picture']) => {
7
- return fetch(`https://randomuser.me/api/?results=${limit}&inc=${fields.join()}`).then(res => res.json());
8
- };
9
- const getMockListItem = ({ name: { first: firstName, last: lastName }, email, picture: { thumbnail } }) => {
10
- const fullName = `${firstName} ${lastName}`;
11
- return {
12
- id: email,
13
- primary: fullName,
14
- secondary: (_jsx("div", { children: _jsx(EmailDisplay, { value: email }, void 0) }, void 0)),
15
- visual: _jsx(Avatar, { name: fullName, imageSrc: thumbnail }, void 0)
16
- };
17
- };
18
- export const useMockListData = (cb, { count } = { count: undefined }) => {
19
- const [items, setItems] = useState([]);
20
- useEffect(() => {
21
- (async () => {
22
- const { results } = await getMockUsers(count);
23
- setItems(results.map(getMockListItem));
24
- })();
25
- }, [count]);
26
- useAfterInitialEffect(cb, [items]);
27
- return [items, setItems];
28
- };
29
- //# sourceMappingURL=SummaryList.mocks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SummaryList.mocks.js","sourceRoot":"","sources":["../../../../src/components/SummaryList/mocks/SummaryList.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuC,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjF,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AA4BvD,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,QAAgB,CAAC,EACjB,SAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,EACjB,EAAE;IAChC,OAAO,KAAK,CAAC,sCAAsC,KAAK,QAAQ,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAC1F,GAAG,CAAC,IAAI,EAAE,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,EACvB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,EAC1C,KAAK,EACL,OAAO,EAAE,EAAE,SAAS,EAAE,EAKvB,EAAgB,EAAE;IACjB,MAAM,QAAQ,GAAG,GAAG,SAAS,IAAI,QAAQ,EAAE,CAAC;IAC5C,OAAO;QACL,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE,CACT,wBACE,KAAC,YAAY,IAAC,KAAK,EAAE,KAAK,WAAI,WAC1B,CACP;QACD,MAAM,EAAE,KAAC,MAAM,IAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,WAAI;KACxD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,EAAc,EACd,EAAE,KAAK,KAAyB,EAAE,KAAK,EAAE,SAAS,EAAE,EACQ,EAAE;IAC9D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAiB,EAAE,CAAC,CAAC;IAEvD,SAAS,CAAC,GAAG,EAAE;QACb,CAAC,KAAK,IAAI,EAAE;YACV,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,CAAC;YAC9C,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,qBAAqB,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEnC,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import { Dispatch, ReactNode, SetStateAction, useEffect, useState } from 'react';\n\nimport Avatar from '../../Avatar';\nimport { EmailDisplay } from '../../Email';\nimport { useAfterInitialEffect } from '../../../hooks';\n\nexport interface MockListItem {\n id: string;\n primary: string;\n secondary: ReactNode;\n visual: ReactNode;\n [key: string]: any;\n}\n\nexport interface MockUserAPIResponse {\n results: MockUser[];\n}\n\nexport interface MockUser {\n name: {\n title: string;\n first: string;\n last: string;\n };\n email: string;\n picture: {\n large: string;\n medium: string;\n thumbnail: string;\n };\n}\n\nexport const getMockUsers = async (\n limit: number = 3,\n fields: string[] = ['name', 'email', 'picture']\n): Promise<MockUserAPIResponse> => {\n return fetch(`https://randomuser.me/api/?results=${limit}&inc=${fields.join()}`).then(res =>\n res.json()\n );\n};\n\nconst getMockListItem = ({\n name: { first: firstName, last: lastName },\n email,\n picture: { thumbnail }\n}: {\n name: { first: string; last: string };\n email: string;\n picture: { thumbnail: string };\n}): MockListItem => {\n const fullName = `${firstName} ${lastName}`;\n return {\n id: email,\n primary: fullName,\n secondary: (\n <div>\n <EmailDisplay value={email} />\n </div>\n ),\n visual: <Avatar name={fullName} imageSrc={thumbnail} />\n };\n};\n\nexport const useMockListData = (\n cb: () => void,\n { count }: { count?: number } = { count: undefined }\n): [MockListItem[], Dispatch<SetStateAction<MockListItem[]>>] => {\n const [items, setItems] = useState<MockListItem[]>([]);\n\n useEffect(() => {\n (async () => {\n const { results } = await getMockUsers(count);\n setItems(results.map(getMockListItem));\n })();\n }, [count]);\n\n useAfterInitialEffect(cb, [items]);\n\n return [items, setItems];\n};\n"]}
@@ -1,2 +0,0 @@
1
- export declare const StyledCard: import("styled-components").StyledComponent<"article", import("styled-components").DefaultTheme, {}, never>;
2
- //# sourceMappingURL=Switch.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Switch.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/mocks/Switch.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,6GAarB,CAAC"}
@@ -1,13 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
- import { defaultThemeProp } from '../../../theme';
3
- export const StyledCard = styled.article(props => {
4
- const { theme: { base: { spacing } } } = props;
5
- return css `
6
- margin: calc(2 * ${spacing});
7
- padding: ${spacing};
8
- height: max-content;
9
- width: max-content;
10
- `;
11
- });
12
- StyledCard.defaultProps = defaultThemeProp;
13
- //# sourceMappingURL=Switch.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Switch.styles.js","sourceRoot":"","sources":["../../../../src/components/Switch/mocks/Switch.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;IAC/C,MAAM,EACJ,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,GAAG,KAAK,CAAC;IAEV,OAAO,GAAG,CAAA;uBACW,OAAO;eACf,OAAO;;;GAGnB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../../theme';\n\nexport const StyledCard = styled.article(props => {\n const {\n theme: {\n base: { spacing }\n }\n } = props;\n\n return css`\n margin: calc(2 * ${spacing});\n padding: ${spacing};\n height: max-content;\n width: max-content;\n `;\n});\n\nStyledCard.defaultProps = defaultThemeProp;\n"]}
@@ -1,18 +0,0 @@
1
- export declare const tableData: ({
2
- id: string;
3
- name: string;
4
- dob: string;
5
- address: string;
6
- email: string;
7
- emailVerified: boolean;
8
- balance: string;
9
- } | {
10
- id: string;
11
- name: string;
12
- dob: string;
13
- address: JSX.Element;
14
- email: string;
15
- balance: string;
16
- emailVerified?: undefined;
17
- })[];
18
- //# sourceMappingURL=Table.mocks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.mocks.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/mocks/Table.mocks.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;IAgCrB,CAAC"}
@@ -1,30 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const tableData = [
3
- {
4
- id: '1234',
5
- name: 'Jane Smith',
6
- dob: '12/31/1990',
7
- address: 'Boston, MA',
8
- email: 'jsmith@email.com',
9
- emailVerified: true,
10
- balance: '$2,200'
11
- },
12
- {
13
- id: '5678',
14
- name: 'Joe Smith',
15
- dob: '01/01/1980',
16
- address: '',
17
- email: 'joe.smith@email.com',
18
- emailVerified: true,
19
- balance: '$1,350'
20
- },
21
- {
22
- id: '0000',
23
- name: 'Mary Lou',
24
- dob: '06/15/1985',
25
- address: (_jsxs(_Fragment, { children: [_jsx("div", { children: "100 Main St." }, void 0), _jsx("div", { children: "Springfield, USA" }, void 0)] }, void 0)),
26
- email: '',
27
- balance: '-$175'
28
- }
29
- ];
30
- //# sourceMappingURL=Table.mocks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.mocks.js","sourceRoot":"","sources":["../../../../src/components/Table/mocks/Table.mocks.tsx"],"names":[],"mappings":";AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,YAAY;QACrB,KAAK,EAAE,kBAAkB;QACzB,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,qBAAqB;QAC5B,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,QAAQ;KAClB;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,YAAY;QACjB,OAAO,EAAE,CACP,8BACE,iDAAuB,EACvB,qDAA2B,YAC1B,CACJ;QACD,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,OAAO;KACjB;CACF,CAAC","sourcesContent":["export const tableData = [\n {\n id: '1234',\n name: 'Jane Smith',\n dob: '12/31/1990',\n address: 'Boston, MA',\n email: 'jsmith@email.com',\n emailVerified: true,\n balance: '$2,200'\n },\n {\n id: '5678',\n name: 'Joe Smith',\n dob: '01/01/1980',\n address: '',\n email: 'joe.smith@email.com',\n emailVerified: true,\n balance: '$1,350'\n },\n {\n id: '0000',\n name: 'Mary Lou',\n dob: '06/15/1985',\n address: (\n <>\n <div>100 Main St.</div>\n <div>Springfield, USA</div>\n </>\n ),\n email: '',\n balance: '-$175'\n }\n];\n"]}
@@ -1,4 +0,0 @@
1
- export declare const StyledBalance: import("styled-components").StyledComponent<"h4", import("styled-components").DefaultTheme, {
2
- negativeBalance: boolean;
3
- }, never>;
4
- //# sourceMappingURL=Table.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/mocks/Table.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;qBAAgC,OAAO;SAMhE,CAAC"}
@@ -1,9 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
- import { defaultThemeProp } from '../../../theme';
3
- export const StyledBalance = styled.h4(({ negativeBalance, theme }) => {
4
- return css `
5
- color: ${negativeBalance ? theme.base.colors.red.medium : theme.base.colors.black};
6
- `;
7
- });
8
- StyledBalance.defaultProps = defaultThemeProp;
9
- //# sourceMappingURL=Table.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.styles.js","sourceRoot":"","sources":["../../../../src/components/Table/mocks/Table.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CACpC,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7B,OAAO,GAAG,CAAA;eACC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;KAClF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../../theme';\n\nexport const StyledBalance = styled.h4<{ negativeBalance: boolean }>(\n ({ negativeBalance, theme }) => {\n return css`\n color: ${negativeBalance ? theme.base.colors.red.medium : theme.base.colors.black};\n `;\n }\n);\n\nStyledBalance.defaultProps = defaultThemeProp;\n"]}
@@ -1,2 +0,0 @@
1
- export declare const themeToTree: (themeNode: object, parentPath?: string | undefined) => import("../Tree").TreeNode[];
2
- //# sourceMappingURL=Tree.mocks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tree.mocks.d.ts","sourceRoot":"","sources":["../../../../src/components/Tree/mocks/Tree.mocks.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,cAAe,MAAM,kEAsB5C,CAAC"}
@@ -1,22 +0,0 @@
1
- export const themeToTree = (themeNode, parentPath) => {
2
- const dataArray = [];
3
- Object.entries(themeNode).forEach(([childKey, childValue]) => {
4
- const id = parentPath ? `${parentPath}.${childKey}` : childKey;
5
- const label = childKey;
6
- // Is a leaf
7
- if (childValue.$type) {
8
- dataArray.push({
9
- id,
10
- label,
11
- data: { ...childValue }
12
- });
13
- }
14
- // Is a parent
15
- else {
16
- const nodes = themeToTree(childValue, id);
17
- dataArray.push({ id, label, nodes });
18
- }
19
- });
20
- return dataArray;
21
- };
22
- //# sourceMappingURL=Tree.mocks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tree.mocks.js","sourceRoot":"","sources":["../../../../src/components/Tree/mocks/Tree.mocks.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAiB,EAAE,UAAmB,EAAE,EAAE;IACpE,MAAM,SAAS,GAAuB,EAAE,CAAC;IACzC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE;QAC3D,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC/D,MAAM,KAAK,GAAG,QAAQ,CAAC;QAEvB,YAAY;QACZ,IAAI,UAAU,CAAC,KAAK,EAAE;YACpB,SAAS,CAAC,IAAI,CAAC;gBACb,EAAE;gBACF,KAAK;gBACL,IAAI,EAAE,EAAE,GAAG,UAAU,EAAE;aACxB,CAAC,CAAC;SACJ;QACD,cAAc;aACT;YACH,MAAM,KAAK,GAAuB,WAAW,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC9D,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;SACtC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["import { TreeProps } from '../Tree';\n\nexport const themeToTree = (themeNode: object, parentPath?: string) => {\n const dataArray: TreeProps['nodes'] = [];\n Object.entries(themeNode).forEach(([childKey, childValue]) => {\n const id = parentPath ? `${parentPath}.${childKey}` : childKey;\n const label = childKey;\n\n // Is a leaf\n if (childValue.$type) {\n dataArray.push({\n id,\n label,\n data: { ...childValue }\n });\n }\n // Is a parent\n else {\n const nodes: TreeProps['nodes'] = themeToTree(childValue, id);\n dataArray.push({ id, label, nodes });\n }\n });\n\n return dataArray;\n};\n"]}
@@ -1,3 +0,0 @@
1
- import Tree from '../Tree';
2
- export declare const StyledBaseTree: typeof Tree;
3
- //# sourceMappingURL=Tree.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tree.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Tree/mocks/Tree.styles.ts"],"names":[],"mappings":"AAEA,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,eAAO,MAAM,cAAc,EAAE,OAAO,IAMnC,CAAC"}
@@ -1,10 +0,0 @@
1
- import styled from 'styled-components';
2
- import Tree from '../Tree';
3
- export const StyledBaseTree = styled(Tree) `
4
- &,
5
- & ul {
6
- padding: revert;
7
- list-style: revert;
8
- }
9
- `;
10
- //# sourceMappingURL=Tree.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tree.styles.js","sourceRoot":"","sources":["../../../../src/components/Tree/mocks/Tree.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,MAAM,CAAC,MAAM,cAAc,GAAgB,MAAM,CAAC,IAAI,CAAC,CAAA;;;;;;CAMtD,CAAC","sourcesContent":["import styled from 'styled-components';\n\nimport Tree from '../Tree';\n\nexport const StyledBaseTree: typeof Tree = styled(Tree)`\n &,\n & ul {\n padding: revert;\n list-style: revert;\n }\n`;\n"]}