@openmrs/esm-styleguide 5.3.3-pre.1240 → 5.3.3-pre.1247

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 (50) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/__mocks__/react-i18next.js +10 -15
  3. package/dist/openmrs-esm-styleguide.css.map +1 -1
  4. package/dist/openmrs-esm-styleguide.js.map +1 -1
  5. package/jest.config.js +16 -16
  6. package/package.json +4 -4
  7. package/postcss.config.js +3 -3
  8. package/setupTests.ts +4 -4
  9. package/src/_all.scss +17 -17
  10. package/src/_overrides.scss +11 -18
  11. package/src/brand.ts +5 -5
  12. package/src/breakpoints/index.ts +8 -29
  13. package/src/components/_breadcrumbs.scss +1 -1
  14. package/src/config-schema.ts +8 -8
  15. package/src/content-switcher/index.ts +1 -1
  16. package/src/content-switcher/omrs-content-switcher.component.tsx +5 -9
  17. package/src/content-switcher/omrs-content-switcher.scss +1 -1
  18. package/src/datepicker/index.tsx +1 -1
  19. package/src/datepicker/openmrs/openmrs-date-picker.component.tsx +9 -9
  20. package/src/datepicker/react-spectrum/adobe-react-spectrum-date-wrapper.component.tsx +16 -35
  21. package/src/datepicker/react-spectrum/locales.ts +3 -3
  22. package/src/declarations.d.ts +4 -4
  23. package/src/error-state/error-state.component.tsx +10 -13
  24. package/src/error-state/error-state.module.scss +8 -8
  25. package/src/error-state/error-state.test.tsx +10 -14
  26. package/src/error-state/index.ts +1 -1
  27. package/src/icons/index.ts +47 -47
  28. package/src/icons/svgs.test.js +16 -16
  29. package/src/index.ts +15 -15
  30. package/src/left-nav/index.tsx +16 -26
  31. package/src/left-nav/left-nav.module.scss +3 -3
  32. package/src/logo/index.ts +15 -15
  33. package/src/modals/index.tsx +27 -39
  34. package/src/notifications/_actionable-notifications.scss +1 -1
  35. package/src/notifications/actionable-notification.component.tsx +6 -15
  36. package/src/notifications/active-actionable-notifications.component.tsx +8 -18
  37. package/src/notifications/active-notifications.component.tsx +7 -11
  38. package/src/notifications/index.tsx +20 -36
  39. package/src/notifications/notification.component.tsx +5 -11
  40. package/src/public.ts +11 -22
  41. package/src/snackbars/_snackbars.scss +1 -1
  42. package/src/snackbars/active-snackbar.component.tsx +6 -10
  43. package/src/snackbars/index.tsx +7 -9
  44. package/src/snackbars/snackbar.component.tsx +9 -18
  45. package/src/spinner/index.ts +2 -7
  46. package/src/svg-utils.ts +7 -7
  47. package/src/toasts/active-toasts.component.tsx +6 -13
  48. package/src/toasts/index.tsx +11 -11
  49. package/src/toasts/toast.component.tsx +7 -22
  50. package/webpack.config.js +26 -33
@@ -1,4 +1,4 @@
1
- @openmrs/esm-styleguide:build: cache hit, replaying output 8fff856698b5b923
1
+ @openmrs/esm-styleguide:build: cache hit, replaying output 4084772a6630f4fb
2
2
  @openmrs/esm-styleguide:build: Browserslist: caniuse-lite is outdated. Please run:
3
3
  @openmrs/esm-styleguide:build:  npx update-browserslist-db@latest
4
4
  @openmrs/esm-styleguide:build:  Why you should do it regularly: https://github.com/browserslist/update-db#readme
@@ -20,7 +20,7 @@
20
20
  @openmrs/esm-styleguide:build: assets by chunk 822 KiB (name: main)
21
21
  @openmrs/esm-styleguide:build:  asset openmrs-esm-styleguide.css 753 KiB [emitted] [minimized] [big] (name: main) 1 related asset
22
22
  @openmrs/esm-styleguide:build:  asset openmrs-esm-styleguide.js 69.4 KiB [emitted] [minimized] (name: main) 2 related assets
23
- @openmrs/esm-styleguide:build: Entrypoint main [big] 822 KiB (3.33 MiB) = openmrs-esm-styleguide.css 753 KiB openmrs-esm-styleguide.js 69.4 KiB 182 auxiliary assets
23
+ @openmrs/esm-styleguide:build: Entrypoint main [big] 822 KiB (3.32 MiB) = openmrs-esm-styleguide.css 753 KiB openmrs-esm-styleguide.js 69.4 KiB 182 auxiliary assets
24
24
  @openmrs/esm-styleguide:build: orphan modules 9.62 MiB (javascript) 622 KiB (css/mini-extract) 2.4 MiB (asset) 16.6 KiB (runtime) [orphan] 882 modules
25
25
  @openmrs/esm-styleguide:build: runtime modules 274 bytes 1 module
26
26
  @openmrs/esm-styleguide:build: built modules 200 KiB (javascript) 883 KiB (css/mini-extract) [built]
@@ -53,4 +53,4 @@
53
53
  @openmrs/esm-styleguide:build: You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
54
54
  @openmrs/esm-styleguide:build: For more info visit https://webpack.js.org/guides/code-splitting/
55
55
  @openmrs/esm-styleguide:build: 
56
- @openmrs/esm-styleguide:build: webpack 5.88.0 compiled with 3 warnings in 16077 ms
56
+ @openmrs/esm-styleguide:build: webpack 5.88.0 compiled with 3 warnings in 15887 ms
@@ -1,14 +1,12 @@
1
- const React = require("react");
2
- const reactI18next = require("react-i18next");
1
+ const React = require('react');
2
+ const reactI18next = require('react-i18next');
3
3
 
4
- const hasChildren = (node) =>
5
- node && (node.children || (node.props && node.props.children));
4
+ const hasChildren = (node) => node && (node.children || (node.props && node.props.children));
6
5
 
7
- const getChildren = (node) =>
8
- node && node.children ? node.children : node.props && node.props.children;
6
+ const getChildren = (node) => (node && node.children ? node.children : node.props && node.props.children);
9
7
 
10
8
  const renderNodes = (reactNodes) => {
11
- if (typeof reactNodes === "string") {
9
+ if (typeof reactNodes === 'string') {
12
10
  return reactNodes;
13
11
  }
14
12
 
@@ -16,18 +14,15 @@ const renderNodes = (reactNodes) => {
16
14
  const child = reactNodes[key];
17
15
  const isElement = React.isValidElement(child);
18
16
 
19
- if (typeof child === "string") {
17
+ if (typeof child === 'string') {
20
18
  return child;
21
19
  }
22
20
  if (hasChildren(child)) {
23
21
  const inner = renderNodes(getChildren(child));
24
22
  return React.cloneElement(child, { ...child.props, key: i }, inner);
25
23
  }
26
- if (typeof child === "object" && !isElement) {
27
- return Object.keys(child).reduce(
28
- (str, childKey) => `${str}${child[childKey]}`,
29
- ""
30
- );
24
+ if (typeof child === 'object' && !isElement) {
25
+ return Object.keys(child).reduce((str, childKey) => `${str}${child[childKey]}`, '');
31
26
  }
32
27
 
33
28
  return child;
@@ -35,8 +30,8 @@ const renderNodes = (reactNodes) => {
35
30
  };
36
31
 
37
32
  const useMock = [(k) => k, {}];
38
- useMock.t = (k, o) => (o && o.defaultValue) || (typeof o === "string" ? o : k);
39
- useMock.i18n = { language: "en_US" };
33
+ useMock.t = (k, o) => (o && o.defaultValue) || (typeof o === 'string' ? o : k);
34
+ useMock.i18n = { language: 'en_US' };
40
35
 
41
36
  module.exports = {
42
37
  // this mock makes sure any components using the translate HoC receive the t function as a prop