@openmrs/esm-styleguide 11.0.1-pre.5956 → 11.0.1-pre.5960

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.
@@ -1,3 +1,3 @@
1
- [0] Successfully compiled: 117 files, copied 171 files with swc (217.81ms)
1
+ [0] Successfully compiled: 117 files, copied 171 files with swc (207.54ms)
2
2
  [0] swc --strip-leading-paths --copy-files src -d dist && svgo -rf dist --quiet exited with code 0
3
3
  [1] tsc --project tsconfig.build.json exited with code 0
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { type I18nProviderProps } from 'react-aria';
2
3
  /**
3
4
  * Thin wrapper around React Aria's I18nProvider to work around a JSX return type mismatch
4
5
  * between the library's types and our TSX configuration.
5
6
  */
6
- export declare function I18nWrapper(props: I18nProviderProps): JSX.Element;
7
+ export declare function I18nWrapper(props: I18nProviderProps): React.JSX.Element;
7
8
  //# sourceMappingURL=i18n-wrapper.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n-wrapper.component.d.ts","sourceRoot":"","sources":["../../src/datepicker/i18n-wrapper.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAElE;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAEjE"}
1
+ {"version":3,"file":"i18n-wrapper.component.d.ts","sourceRoot":"","sources":["../../src/datepicker/i18n-wrapper.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAElE;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAEvE"}
@@ -4,7 +4,7 @@ import { type SideNavProps } from '@carbon/react';
4
4
  /**
5
5
  * Extended props for the LeftNavMenu component
6
6
  */
7
- interface LeftNavMenuProps extends SideNavProps {
7
+ interface LeftNavMenuProps extends Omit<SideNavProps, 'onToggle'> {
8
8
  /**
9
9
  * Flag indicating if this component is a child of the header component.
10
10
  * When true, the component renders the left nav menu.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/left-nav/index.tsx"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAW3D;;GAEG;AACH,UAAU,gBAAiB,SAAQ,YAAY;IAC7C;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,sFA8BtB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/left-nav/index.tsx"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAW3D;;GAEG;AACH,UAAU,gBAAiB,SAAQ,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC;IAC/D;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,sFA8BtB,CAAC"}
@@ -14,7 +14,7 @@ export const ActionableNotificationComponent = ({ notification })=>{
14
14
  return /*#__PURE__*/ _jsx(ActionableNotification, {
15
15
  kind: kind || 'info',
16
16
  actionButtonLabel: actionText,
17
- ariaLabel: getCoreTranslation('closesActionableNotification', 'Closes actionable notification'),
17
+ "aria-label": getCoreTranslation('closesActionableNotification', 'Closes actionable notification'),
18
18
  onActionButtonClick: handleActionClick,
19
19
  statusIconDescription: getCoreTranslation('actionableNotification', 'Actionable notification'),
20
20
  subtitle: subtitle,
@@ -1,7 +1,7 @@
1
1
  /** @module @category UI */
2
2
  import React from 'react';
3
3
  export interface PageHeaderContentProps {
4
- title: string | JSX.Element;
4
+ title: string | React.JSX.Element;
5
5
  illustration: React.ReactElement;
6
6
  className?: string;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"page-header.component.d.ts","sourceRoot":"","sources":["../../src/page-header/page-header.component.tsx"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IAC5B,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,MAAM,mBAAmB,CAAC,CAAC,EAAE,CAAC,IAAI;KACrC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,KAAK,GAAG,CAAC;CAC9C,CAAC,MAAM,CAAC,CAAC,CAAC;AAGX,gBAAgB;AAChB,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,IAChB,CAAC,CAAC,GAAG;KAAG,CAAC,IAAI,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK;CAAE,CAAC,GAClD,CAAC,CAAC,GAAG;KAAG,CAAC,IAAI,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK;CAAE,CAAC,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAC;AAMlF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CA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,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAkB9D,CAAC"}
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { type OpenedWindow } from '@openmrs/esm-extensions';
4
4
  export interface ActionMenuButtonProps2 {
5
- icon: (props: object) => JSX.Element;
5
+ icon: (props: object) => React.JSX.Element;
6
6
  label: string;
7
7
  tagContent?: string | React.ReactNode;
8
8
  workspaceToLaunch: {
@@ -1 +1 @@
1
- {"version":3,"file":"action-menu-button2.component.d.ts","sourceRoot":"","sources":["../../../src/workspaces2/action-menu2/action-menu-button2.component.tsx"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,OAAO,KAAqB,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAwB5D,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACtC,iBAAiB,EAAE;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACrC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACnC,CAAC;IAEF;;;;;;;OAOG;IACH,uBAAuB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,OAAO,CAAC;IAE3D;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,OAAO,CAAC;CAC1D;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAqF9D,CAAC"}
1
+ {"version":3,"file":"action-menu-button2.component.d.ts","sourceRoot":"","sources":["../../../src/workspaces2/action-menu2/action-menu-button2.component.tsx"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,OAAO,KAAqB,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAwB5D,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACtC,iBAAiB,EAAE;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACrC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACnC,CAAC;IAEF;;;;;;;OAOG;IACH,uBAAuB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,OAAO,CAAC;IAE3D;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,OAAO,CAAC;CAC1D;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAqF9D,CAAC"}
@@ -30,7 +30,7 @@ const selectRegisteredWorkspacesByName = (state)=>state.registeredWorkspacesByNa
30
30
  windowProps,
31
31
  groupProps
32
32
  };
33
- const storeRef = useRef();
33
+ const storeRef = useRef(null);
34
34
  // The inputs this instance has already seeded, so we re-seed when the caller changes any of them,
35
35
  // but do NOT clobber the user's own navigation/close of the current one.
36
36
  const seededInputsRef = useRef(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-styleguide",
3
- "version": "11.0.1-pre.5956",
3
+ "version": "11.0.1-pre.5960",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The styleguide for OpenMRS SPA",
6
6
  "module": "dist/internal.js",
@@ -79,18 +79,18 @@
79
79
  "uuid": "^11.1.1"
80
80
  },
81
81
  "peerDependencies": {
82
- "@openmrs/esm-api": "^11.0.1-pre.5956",
83
- "@openmrs/esm-config": "^11.0.1-pre.5956",
84
- "@openmrs/esm-emr-api": "^11.0.1-pre.5956",
85
- "@openmrs/esm-error-handling": "^11.0.1-pre.5956",
86
- "@openmrs/esm-extensions": "^11.0.1-pre.5956",
87
- "@openmrs/esm-globals": "^11.0.1-pre.5956",
88
- "@openmrs/esm-navigation": "^11.0.1-pre.5956",
89
- "@openmrs/esm-react-utils": "^11.0.1-pre.5956",
90
- "@openmrs/esm-routes": "^11.0.1-pre.5956",
91
- "@openmrs/esm-state": "^11.0.1-pre.5956",
92
- "@openmrs/esm-translations": "^11.0.1-pre.5956",
93
- "@openmrs/esm-utils": "^11.0.1-pre.5956",
82
+ "@openmrs/esm-api": "^11.0.1-pre.5960",
83
+ "@openmrs/esm-config": "^11.0.1-pre.5960",
84
+ "@openmrs/esm-emr-api": "^11.0.1-pre.5960",
85
+ "@openmrs/esm-error-handling": "^11.0.1-pre.5960",
86
+ "@openmrs/esm-extensions": "^11.0.1-pre.5960",
87
+ "@openmrs/esm-globals": "^11.0.1-pre.5960",
88
+ "@openmrs/esm-navigation": "^11.0.1-pre.5960",
89
+ "@openmrs/esm-react-utils": "^11.0.1-pre.5960",
90
+ "@openmrs/esm-routes": "^11.0.1-pre.5960",
91
+ "@openmrs/esm-state": "^11.0.1-pre.5960",
92
+ "@openmrs/esm-translations": "^11.0.1-pre.5960",
93
+ "@openmrs/esm-utils": "^11.0.1-pre.5960",
94
94
  "dayjs": "1.x",
95
95
  "i18next": "25.x",
96
96
  "react": "18.x",
@@ -99,18 +99,18 @@
99
99
  "swr": "2.x"
100
100
  },
101
101
  "devDependencies": {
102
- "@openmrs/esm-api": "11.0.1-pre.5956",
103
- "@openmrs/esm-config": "11.0.1-pre.5956",
104
- "@openmrs/esm-emr-api": "11.0.1-pre.5956",
105
- "@openmrs/esm-error-handling": "11.0.1-pre.5956",
106
- "@openmrs/esm-extensions": "11.0.1-pre.5956",
107
- "@openmrs/esm-globals": "11.0.1-pre.5956",
108
- "@openmrs/esm-navigation": "11.0.1-pre.5956",
109
- "@openmrs/esm-react-utils": "11.0.1-pre.5956",
110
- "@openmrs/esm-routes": "11.0.1-pre.5956",
111
- "@openmrs/esm-state": "11.0.1-pre.5956",
112
- "@openmrs/esm-translations": "11.0.1-pre.5956",
113
- "@openmrs/esm-utils": "11.0.1-pre.5956",
102
+ "@openmrs/esm-api": "11.0.1-pre.5960",
103
+ "@openmrs/esm-config": "11.0.1-pre.5960",
104
+ "@openmrs/esm-emr-api": "11.0.1-pre.5960",
105
+ "@openmrs/esm-error-handling": "11.0.1-pre.5960",
106
+ "@openmrs/esm-extensions": "11.0.1-pre.5960",
107
+ "@openmrs/esm-globals": "11.0.1-pre.5960",
108
+ "@openmrs/esm-navigation": "11.0.1-pre.5960",
109
+ "@openmrs/esm-react-utils": "11.0.1-pre.5960",
110
+ "@openmrs/esm-routes": "11.0.1-pre.5960",
111
+ "@openmrs/esm-state": "11.0.1-pre.5960",
112
+ "@openmrs/esm-translations": "11.0.1-pre.5960",
113
+ "@openmrs/esm-utils": "11.0.1-pre.5960",
114
114
  "@swc/cli": "0.8.1",
115
115
  "@swc/core": "1.15.21",
116
116
  "@types/geopattern": "^1.2.9",
@@ -5,6 +5,6 @@ import { I18nProvider, type I18nProviderProps } from 'react-aria';
5
5
  * Thin wrapper around React Aria's I18nProvider to work around a JSX return type mismatch
6
6
  * between the library's types and our TSX configuration.
7
7
  */
8
- export function I18nWrapper(props: I18nProviderProps): JSX.Element {
9
- return React.createElement(I18nProvider as (props: I18nProviderProps) => JSX.Element, props);
8
+ export function I18nWrapper(props: I18nProviderProps): React.JSX.Element {
9
+ return React.createElement(I18nProvider as (props: I18nProviderProps) => React.JSX.Element, props);
10
10
  }
@@ -14,7 +14,7 @@ import styles from './left-nav.module.scss';
14
14
  /**
15
15
  * Extended props for the LeftNavMenu component
16
16
  */
17
- interface LeftNavMenuProps extends SideNavProps {
17
+ interface LeftNavMenuProps extends Omit<SideNavProps, 'onToggle'> {
18
18
  /**
19
19
  * Flag indicating if this component is a child of the header component.
20
20
  * When true, the component renders the left nav menu.
@@ -50,7 +50,7 @@ export const ActionableNotificationComponent: React.FC<ActionableNotificationPro
50
50
  <ActionableNotification
51
51
  kind={(kind as ActionableNotificationType) || 'info'}
52
52
  actionButtonLabel={actionText}
53
- ariaLabel={getCoreTranslation('closesActionableNotification', 'Closes actionable notification')}
53
+ aria-label={getCoreTranslation('closesActionableNotification', 'Closes actionable notification')}
54
54
  onActionButtonClick={handleActionClick}
55
55
  statusIconDescription={getCoreTranslation('actionableNotification', 'Actionable notification')}
56
56
  subtitle={subtitle}
@@ -7,7 +7,7 @@ import styles from './page-header.module.scss';
7
7
  import { type CoreTranslationKey, getCoreTranslation } from '@openmrs/esm-translations';
8
8
 
9
9
  export interface PageHeaderContentProps {
10
- title: string | JSX.Element;
10
+ title: string | React.JSX.Element;
11
11
  illustration: React.ReactElement;
12
12
  className?: string;
13
13
  }
@@ -9,7 +9,7 @@ import { launchWorkspace2, useWorkspace2Store } from '../workspace2';
9
9
  import styles from './action-menu-button2.module.scss';
10
10
 
11
11
  interface TagsProps {
12
- getIcon: (props: object) => JSX.Element;
12
+ getIcon: (props: object) => React.JSX.Element;
13
13
  hasUnsavedChanges: boolean;
14
14
  tagContent?: React.ReactNode;
15
15
  }
@@ -29,7 +29,7 @@ function Tags({ getIcon, hasUnsavedChanges, tagContent }: TagsProps) {
29
29
  }
30
30
 
31
31
  export interface ActionMenuButtonProps2 {
32
- icon: (props: object) => JSX.Element;
32
+ icon: (props: object) => React.JSX.Element;
33
33
  label: string;
34
34
  tagContent?: string | React.ReactNode;
35
35
  workspaceToLaunch: {
@@ -71,7 +71,7 @@ export const ExportedWorkspace: React.FC<ExportedWorkspaceProps> = ({
71
71
  });
72
72
 
73
73
  const seedInputs: SeedInputs = { name, workspaceProps, windowProps, groupProps };
74
- const storeRef = useRef<StoreApi<ExportedWorkspaceState>>();
74
+ const storeRef = useRef<StoreApi<ExportedWorkspaceState> | null>(null);
75
75
  // The inputs this instance has already seeded, so we re-seed when the caller changes any of them,
76
76
  // but do NOT clobber the user's own navigation/close of the current one.
77
77
  const seededInputsRef = useRef<SeedInputs | null>(null);