@openmrs/esm-styleguide 8.0.1-pre.3605 → 8.0.1-pre.3614

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.
@@ -13,6 +13,6 @@
13
13
  [0] │ You can limit the size of your bundles by using import() to lazy load some parts of your application.
14
14
  [0] │ For more info visit https://www.rspack.dev/guide/optimization/code-splitting
15
15
  [0]
16
- [0] Rspack compiled with 3 warnings in 9.66 s
16
+ [0] Rspack compiled with 3 warnings in 9.77 s
17
17
  [0] rspack --mode=production exited with code 0
18
18
  [1] tsc --project tsconfig.build.json exited with code 0
package/mock-jest.tsx CHANGED
@@ -133,7 +133,32 @@ export const XrayPictogram = () => <span>XrayPictogram</span>;
133
133
  export const MaybeIcon = ({ icon }) => <span>{icon}</span>;
134
134
  export const MaybePictogram = ({ pictogram }) => <span>{pictogram}</span>;
135
135
 
136
- export { CardHeader, EmptyCard, ErrorCard, EmptyCardIllustration, Pagination, PageHeader, PageHeaderContent } from '.';
136
+ // EmptyCardIllustration needs mocking because it uses SVG symbols registered by setupEmptyCard()
137
+ export const EmptyCardIllustration = ({ width = '64', height = '64' }: { width?: string; height?: string }) => (
138
+ <svg width={width} height={height} data-testid="empty-card-illustration">
139
+ <rect width={width} height={height} />
140
+ </svg>
141
+ );
142
+
143
+ // EmptyCard needs mocking because it uses EmptyCardIllustration internally
144
+ export const EmptyCard = ({
145
+ displayText,
146
+ headerTitle,
147
+ launchForm,
148
+ }: {
149
+ displayText: string;
150
+ headerTitle: string;
151
+ launchForm?(): void;
152
+ }) => (
153
+ <div data-testid="empty-card">
154
+ <h4>{headerTitle}</h4>
155
+ <EmptyCardIllustration />
156
+ <p>There are no {displayText} to display</p>
157
+ {launchForm && <button onClick={launchForm}>Record {displayText}</button>}
158
+ </div>
159
+ );
160
+
161
+ export { CardHeader, ErrorCard, Pagination, PageHeader, PageHeaderContent } from '.';
137
162
 
138
163
  export const OpenmrsDatePicker = () => <span>OpenmrsDatePicker</span>;
139
164
  export const OpenmrsDateRangePicker = () => <span>OpenmrsDateRangePicker</span>;
package/mock.tsx CHANGED
@@ -134,7 +134,32 @@ export const XrayPictogram = () => <span>XrayPictogram</span>;
134
134
  export const MaybeIcon = ({ icon }) => <span>{icon}</span>;
135
135
  export const MaybePictogram = ({ pictogram }) => <span>{pictogram}</span>;
136
136
 
137
- export { CardHeader, EmptyCard, ErrorCard, EmptyCardIllustration, Pagination, PageHeader, PageHeaderContent } from '.';
137
+ // EmptyCardIllustration needs mocking because it uses SVG symbols registered by setupEmptyCard()
138
+ export const EmptyCardIllustration = ({ width = '64', height = '64' }: { width?: string; height?: string }) => (
139
+ <svg width={width} height={height} data-testid="empty-card-illustration">
140
+ <rect width={width} height={height} />
141
+ </svg>
142
+ );
143
+
144
+ // EmptyCard needs mocking because it uses EmptyCardIllustration internally
145
+ export const EmptyCard = ({
146
+ displayText,
147
+ headerTitle,
148
+ launchForm,
149
+ }: {
150
+ displayText: string;
151
+ headerTitle: string;
152
+ launchForm?(): void;
153
+ }) => (
154
+ <div data-testid="empty-card">
155
+ <h4>{headerTitle}</h4>
156
+ <EmptyCardIllustration />
157
+ <p>There are no {displayText} to display</p>
158
+ {launchForm && <button onClick={launchForm}>Record {displayText}</button>}
159
+ </div>
160
+ );
161
+
162
+ export { CardHeader, ErrorCard, Pagination, PageHeader, PageHeaderContent } from '.';
138
163
 
139
164
  export const OpenmrsDatePicker = () => <span>OpenmrsDatePicker</span>;
140
165
  export const OpenmrsDateRangePicker = () => <span>OpenmrsDateRangePicker</span>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-styleguide",
3
- "version": "8.0.1-pre.3605",
3
+ "version": "8.0.1-pre.3614",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The styleguide for OpenMRS SPA",
6
6
  "main": "dist/openmrs-esm-styleguide.js",
@@ -98,17 +98,17 @@
98
98
  "swr": "2.x"
99
99
  },
100
100
  "devDependencies": {
101
- "@openmrs/esm-api": "8.0.1-pre.3605",
102
- "@openmrs/esm-config": "8.0.1-pre.3605",
103
- "@openmrs/esm-emr-api": "8.0.1-pre.3605",
104
- "@openmrs/esm-error-handling": "8.0.1-pre.3605",
105
- "@openmrs/esm-extensions": "8.0.1-pre.3605",
106
- "@openmrs/esm-globals": "8.0.1-pre.3605",
107
- "@openmrs/esm-navigation": "8.0.1-pre.3605",
108
- "@openmrs/esm-react-utils": "8.0.1-pre.3605",
109
- "@openmrs/esm-state": "8.0.1-pre.3605",
110
- "@openmrs/esm-translations": "8.0.1-pre.3605",
111
- "@openmrs/esm-utils": "8.0.1-pre.3605",
101
+ "@openmrs/esm-api": "8.0.1-pre.3614",
102
+ "@openmrs/esm-config": "8.0.1-pre.3614",
103
+ "@openmrs/esm-emr-api": "8.0.1-pre.3614",
104
+ "@openmrs/esm-error-handling": "8.0.1-pre.3614",
105
+ "@openmrs/esm-extensions": "8.0.1-pre.3614",
106
+ "@openmrs/esm-globals": "8.0.1-pre.3614",
107
+ "@openmrs/esm-navigation": "8.0.1-pre.3614",
108
+ "@openmrs/esm-react-utils": "8.0.1-pre.3614",
109
+ "@openmrs/esm-state": "8.0.1-pre.3614",
110
+ "@openmrs/esm-translations": "8.0.1-pre.3614",
111
+ "@openmrs/esm-utils": "8.0.1-pre.3614",
112
112
  "@rspack/cli": "^1.3.11",
113
113
  "@rspack/core": "^1.3.11",
114
114
  "@types/geopattern": "^1.2.9",