@openmrs/esm-styleguide 8.0.1-pre.3612 → 8.0.1-pre.3615
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.
- package/.turbo/turbo-build.log +1 -1
- package/dist/brand.d.ts +1 -0
- package/dist/breakpoints/index.d.ts +11 -0
- package/dist/cards/card-header.component.d.ts +11 -0
- package/dist/cards/index.d.ts +1 -0
- package/dist/config-schema.d.ts +23 -0
- package/dist/custom-overflow-menu/custom-overflow-menu.component.d.ts +8 -0
- package/dist/custom-overflow-menu/index.d.ts +1 -0
- package/dist/datepicker/utils.d.ts +15 -0
- package/dist/empty-card/empty-card-registration.d.ts +1 -0
- package/dist/icons/icon-registration.d.ts +1 -0
- package/dist/icons/icons.d.ts +329 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/logo/index.d.ts +1 -0
- package/dist/pictograms/pictogram-registration.d.ts +1 -0
- package/dist/pictograms/pictograms.d.ts +64 -0
- package/dist/svg-utils.d.ts +1 -0
- package/dist/utils.d.ts +6 -0
- package/dist/workspaces2/workspace2-close-prompt.modal.d.ts +11 -0
- package/mock-jest.tsx +26 -1
- package/mock.tsx +26 -1
- package/package.json +12 -12
package/.turbo/turbo-build.log
CHANGED
|
@@ -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
|
|
16
|
+
[0] Rspack compiled with 3 warnings in 9.56 s
|
|
17
17
|
[0] rspack --mode=production exited with code 0
|
|
18
18
|
[1] tsc --project tsconfig.build.json exited with code 0
|
package/dist/brand.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setupBranding(): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const Breakpoint: {
|
|
2
|
+
readonly PHONE_MIN: 0;
|
|
3
|
+
readonly PHONE_MAX: 600;
|
|
4
|
+
readonly TABLET_MIN: 601;
|
|
5
|
+
readonly TABLET_MAX: 1023;
|
|
6
|
+
readonly SMALL_DESKTOP_MIN: 1024;
|
|
7
|
+
readonly SMALL_DESKTOP_MAX: 1439;
|
|
8
|
+
readonly LARGE_DESKTOP_MIN: 1440;
|
|
9
|
+
readonly LARGE_DESKTOP_MAX: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function integrateBreakpoints(): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CardHeaderProps {
|
|
3
|
+
/** The title for this card. This must be a pre-translated string. */
|
|
4
|
+
title: string;
|
|
5
|
+
/** The contents of the card header to render if any. */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Re-usable header component for O3-style cards, like those found on the patient chart
|
|
10
|
+
*/
|
|
11
|
+
export declare function CardHeader({ title, children }: CardHeaderProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CardHeader, type CardHeaderProps } from './card-header.component';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ConfigSchema } from '@openmrs/esm-config';
|
|
2
|
+
import { type CarbonTagColor } from './utils';
|
|
3
|
+
export interface StyleguideConfigObject {
|
|
4
|
+
'Brand color #1': string;
|
|
5
|
+
'Brand color #2': string;
|
|
6
|
+
'Brand color #3': string;
|
|
7
|
+
excludePatientIdentifierCodeTypes: {
|
|
8
|
+
uuids: Array<string>;
|
|
9
|
+
};
|
|
10
|
+
implementationName: string;
|
|
11
|
+
patientPhotoConceptUuid: string;
|
|
12
|
+
preferredCalendar: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
preferredDateLocale: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
diagnosisTags: {
|
|
19
|
+
primaryColor: CarbonTagColor;
|
|
20
|
+
secondaryColor: CarbonTagColor;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare const esmStyleGuideSchema: ConfigSchema;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @module @category UI */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface CustomOverflowMenuProps {
|
|
4
|
+
menuTitle: React.ReactNode;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function CustomOverflowMenu({ menuTitle, children }: CustomOverflowMenuProps): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './custom-overflow-menu.component';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Calendar, type DateValue } from '@internationalized/date';
|
|
2
|
+
import { type DateInputValue } from './OpenmrsDatePicker';
|
|
3
|
+
/**
|
|
4
|
+
* Function to convert relatively arbitrary date values into a React Aria `DateValue`,
|
|
5
|
+
* normally a `CalendarDate`, which represents a date without time or timezone.
|
|
6
|
+
*/
|
|
7
|
+
export declare function dateToInternationalizedDate(date: DateInputValue, calendar: Calendar | undefined, allowNull: true): DateValue | null | undefined;
|
|
8
|
+
export declare function dateToInternationalizedDate(date: DateInputValue, calendar: Calendar | undefined, allowNull: false): DateValue | undefined;
|
|
9
|
+
export declare function dateToInternationalizedDate(date: DateInputValue, calendar: Calendar | undefined): DateValue | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Function to convert a `DateValue` (from React Aria) into a standard JS `Date`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function internationalizedDateToDate(date: DateValue): Date | undefined;
|
|
14
|
+
/** Removes any data attributes from an object */
|
|
15
|
+
export declare function removeDataAttributes<T>(props: T): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setupEmptyCard(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setupIcons(): void;
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
/** @category Icons */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type Argument } from 'classnames';
|
|
4
|
+
export declare const iconIds: readonly ["omrs-icon-activity", "omrs-icon-add", "omrs-icon-arrow-down", "omrs-icon-arrow-left", "omrs-icon-arrow-right", "omrs-icon-arrow-up", "omrs-icon-baby", "omrs-icon-calendar-heat-map", "omrs-icon-calendar", "omrs-icon-caret-down", "omrs-icon-caret-left", "omrs-icon-caret-right", "omrs-icon-caret-up", "omrs-icon-chart-average", "omrs-icon-checkmark-filled", "omrs-icon-checkmark-outline", "omrs-icon-chemistry", "omrs-icon-chevron-down", "omrs-icon-chevron-left", "omrs-icon-chevron-right", "omrs-icon-chevron-up", "omrs-icon-close", "omrs-icon-close-filled", "omrs-icon-close-outline", "omrs-icon-document", "omrs-icon-document-attachment", "omrs-icon-download", "omrs-icon-drug-order", "omrs-icon-edit", "omrs-icon-event-schedule", "omrs-icon-events", "omrs-icon-gender-female", "omrs-icon-gender-male", "omrs-icon-gender-other", "omrs-icon-gender-unknown", "omrs-icon-generic-order-type", "omrs-icon-group", "omrs-icon-group-access", "omrs-icon-hospital-bed", "omrs-icon-image-medical", "omrs-icon-information", "omrs-icon-information-filled", "omrs-icon-information-square", "omrs-icon-inventory-management", "omrs-icon-lab-order", "omrs-icon-list-checked", "omrs-icon-location", "omrs-icon-material-order", "omrs-icon-maximize", "omrs-icon-medication", "omrs-icon-message-queue", "omrs-icon-microscope", "omrs-icon-money", "omrs-icon-mother", "omrs-icon-movement", "omrs-icon-overflow-menu--horizontal", "omrs-icon-overflow-menu--vertical", "omrs-icon-password", "omrs-icon-pedestrian-family", "omrs-icon-pen", "omrs-icon-printer", "omrs-icon-procedure-order", "omrs-icon-programs", "omrs-icon-renew", "omrs-icon-referral-order", "omrs-icon-report", "omrs-icon-reset", "omrs-icon-save", "omrs-icon-search", "omrs-icon-settings", "omrs-icon-shopping-cart", "omrs-icon-shopping-cart--arrow-down", "omrs-icon-sticky-note-add", "omrs-icon-switcher", "omrs-icon-syringe", "omrs-icon-table-of-contents", "omrs-icon-table", "omrs-icon-time", "omrs-icon-tools", "omrs-icon-translate", "omrs-icon-trash-can", "omrs-icon-tree-view--alt", "omrs-icon-user-avatar", "omrs-icon-user-follow", "omrs-icon-user-xray", "omrs-icon-user", "omrs-icon-view-off", "omrs-icon-view", "omrs-icon-warning"];
|
|
5
|
+
export type IconId = (typeof iconIds)[number];
|
|
6
|
+
export type IconProps = {
|
|
7
|
+
className?: Argument;
|
|
8
|
+
fill?: string;
|
|
9
|
+
size?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
*/
|
|
13
|
+
export declare const ActivityIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
14
|
+
/**
|
|
15
|
+
*/
|
|
16
|
+
export declare const AddIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
17
|
+
/**
|
|
18
|
+
*/
|
|
19
|
+
export declare const ArrowDownIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
20
|
+
/**
|
|
21
|
+
*/
|
|
22
|
+
export declare const ArrowLeftIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
23
|
+
/**
|
|
24
|
+
*/
|
|
25
|
+
export declare const ArrowRightIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
26
|
+
/**
|
|
27
|
+
*/
|
|
28
|
+
export declare const ArrowUpIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
29
|
+
/**
|
|
30
|
+
*/
|
|
31
|
+
export declare const BabyIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
32
|
+
/**
|
|
33
|
+
*/
|
|
34
|
+
export declare const CalendarHeatMapIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
35
|
+
/**
|
|
36
|
+
*/
|
|
37
|
+
export declare const CalendarIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
38
|
+
/**
|
|
39
|
+
*/
|
|
40
|
+
export declare const CaretDownIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
41
|
+
/**
|
|
42
|
+
*/
|
|
43
|
+
export declare const CaretLeftIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
44
|
+
/**
|
|
45
|
+
*/
|
|
46
|
+
export declare const CaretRightIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
47
|
+
/**
|
|
48
|
+
*/
|
|
49
|
+
export declare const CaretUpIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
50
|
+
/**
|
|
51
|
+
*/
|
|
52
|
+
export declare const ChartAverageIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
53
|
+
/**
|
|
54
|
+
*/
|
|
55
|
+
export declare const CheckmarkFilledIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
56
|
+
/**
|
|
57
|
+
*/
|
|
58
|
+
export declare const CheckmarkOutlineIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
59
|
+
/**
|
|
60
|
+
*/
|
|
61
|
+
export declare const ChemistryIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
62
|
+
/**
|
|
63
|
+
*/
|
|
64
|
+
export declare const ChevronDownIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
65
|
+
/**
|
|
66
|
+
*/
|
|
67
|
+
export declare const ChevronLeftIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
68
|
+
/**
|
|
69
|
+
*/
|
|
70
|
+
export declare const ChevronRightIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
71
|
+
/**
|
|
72
|
+
*/
|
|
73
|
+
export declare const ChevronUpIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
74
|
+
/**
|
|
75
|
+
*/
|
|
76
|
+
export declare const CloseIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
77
|
+
/**
|
|
78
|
+
*/
|
|
79
|
+
export declare const CloseFilledIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
80
|
+
/**
|
|
81
|
+
*/
|
|
82
|
+
export declare const CloseOutlineIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
83
|
+
/**
|
|
84
|
+
*/
|
|
85
|
+
export declare const DocumentIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
86
|
+
/**
|
|
87
|
+
*/
|
|
88
|
+
export declare const DocumentAttachmentIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
89
|
+
/**
|
|
90
|
+
*/
|
|
91
|
+
export declare const DownloadIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
92
|
+
/**
|
|
93
|
+
*/
|
|
94
|
+
export declare const DrugOrderIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
95
|
+
/**
|
|
96
|
+
*/
|
|
97
|
+
export declare const EditIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
98
|
+
/**
|
|
99
|
+
*/
|
|
100
|
+
export declare const EventScheduleIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
101
|
+
/**
|
|
102
|
+
*/
|
|
103
|
+
export declare const EventsIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
104
|
+
/**
|
|
105
|
+
*/
|
|
106
|
+
export declare const GenderFemaleIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
107
|
+
/**
|
|
108
|
+
*/
|
|
109
|
+
export declare const GenderMaleIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
110
|
+
/**
|
|
111
|
+
*/
|
|
112
|
+
export declare const GenderOtherIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
113
|
+
/**
|
|
114
|
+
*/
|
|
115
|
+
export declare const GenderUnknownIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
116
|
+
/**
|
|
117
|
+
*/
|
|
118
|
+
export declare const GenericOrderTypeIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
119
|
+
/**
|
|
120
|
+
*/
|
|
121
|
+
export declare const GroupIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
122
|
+
/**
|
|
123
|
+
*/
|
|
124
|
+
export declare const GroupAccessIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
125
|
+
/**
|
|
126
|
+
*/
|
|
127
|
+
export declare const HospitalBedIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
128
|
+
/**
|
|
129
|
+
*/
|
|
130
|
+
export declare const ImageMedicalIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
131
|
+
/**
|
|
132
|
+
*/
|
|
133
|
+
export declare const InformationIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
134
|
+
/**
|
|
135
|
+
*/
|
|
136
|
+
export declare const InformationFilledIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
137
|
+
/**
|
|
138
|
+
*/
|
|
139
|
+
export declare const InformationSquareIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
140
|
+
/**
|
|
141
|
+
*/
|
|
142
|
+
export declare const InventoryManagementIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
143
|
+
/**
|
|
144
|
+
*/
|
|
145
|
+
export declare const LabOrderIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
146
|
+
/**
|
|
147
|
+
*/
|
|
148
|
+
export declare const ListCheckedIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
149
|
+
/**
|
|
150
|
+
*/
|
|
151
|
+
export declare const LocationIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
152
|
+
/**
|
|
153
|
+
*/
|
|
154
|
+
export declare const MaterialOrderIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
155
|
+
/**
|
|
156
|
+
*/
|
|
157
|
+
export declare const MaximizeIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
158
|
+
/**
|
|
159
|
+
*/
|
|
160
|
+
export declare const MedicationIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
161
|
+
/**
|
|
162
|
+
*/
|
|
163
|
+
export declare const MessageQueueIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
164
|
+
/**
|
|
165
|
+
*/
|
|
166
|
+
export declare const MicroscopeIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
167
|
+
/**
|
|
168
|
+
* Billing
|
|
169
|
+
*/
|
|
170
|
+
export declare const MoneyIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
171
|
+
/**
|
|
172
|
+
*/
|
|
173
|
+
export declare const MotherIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
174
|
+
/**
|
|
175
|
+
*/
|
|
176
|
+
export declare const MovementIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
177
|
+
/**
|
|
178
|
+
*/
|
|
179
|
+
export declare const OverflowMenuHorizontalIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
180
|
+
/**
|
|
181
|
+
*/
|
|
182
|
+
export declare const OverflowMenuVerticalIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
183
|
+
export declare const PasswordIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
184
|
+
/**
|
|
185
|
+
*/
|
|
186
|
+
export declare const PedestrianFamilyIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
187
|
+
/**
|
|
188
|
+
*/
|
|
189
|
+
export declare const PenIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
190
|
+
/**
|
|
191
|
+
*/
|
|
192
|
+
export declare const PrinterIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
193
|
+
/**
|
|
194
|
+
*/
|
|
195
|
+
export declare const ProcedureOrderIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
196
|
+
/**
|
|
197
|
+
*/
|
|
198
|
+
export declare const ProgramsIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
199
|
+
/**
|
|
200
|
+
*/
|
|
201
|
+
export declare const ReferralOrderIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
202
|
+
/**
|
|
203
|
+
*/
|
|
204
|
+
export declare const RenewIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
205
|
+
/**
|
|
206
|
+
*/
|
|
207
|
+
export declare const ReportIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
208
|
+
/**
|
|
209
|
+
*/
|
|
210
|
+
export declare const ResetIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
211
|
+
/**
|
|
212
|
+
*/
|
|
213
|
+
export declare const SaveIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
214
|
+
/**
|
|
215
|
+
*/
|
|
216
|
+
export declare const SearchIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
217
|
+
/**
|
|
218
|
+
*/
|
|
219
|
+
export declare const SettingsIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
220
|
+
/**
|
|
221
|
+
*/
|
|
222
|
+
export declare const SwitcherIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
223
|
+
/**
|
|
224
|
+
* Order Basket, the UI to enter Orders for Medications, Referrals, Labs, Procedures and more
|
|
225
|
+
*/
|
|
226
|
+
export declare const ShoppingCartIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
227
|
+
/**
|
|
228
|
+
* Used as a button to add an item to the Order basket from a search
|
|
229
|
+
*/
|
|
230
|
+
export declare const ShoppingCartArrowDownIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
231
|
+
/**
|
|
232
|
+
* Used as action button to open ward in-patient note workspace
|
|
233
|
+
*/
|
|
234
|
+
export declare const StickyNoteAddIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
235
|
+
/**
|
|
236
|
+
*/
|
|
237
|
+
export declare const SyringeIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
238
|
+
/**
|
|
239
|
+
* Used as a button to add an item to the Order basket from a search
|
|
240
|
+
*/
|
|
241
|
+
export declare const TableOfContentsIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
242
|
+
/**
|
|
243
|
+
*/
|
|
244
|
+
export declare const TableIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
245
|
+
/**
|
|
246
|
+
* Lab investigations
|
|
247
|
+
*/
|
|
248
|
+
export declare const TimeIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
249
|
+
/**
|
|
250
|
+
*/
|
|
251
|
+
export declare const ToolsIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
252
|
+
/**
|
|
253
|
+
*/
|
|
254
|
+
export declare const TranslateIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
255
|
+
/**
|
|
256
|
+
*/
|
|
257
|
+
export declare const TrashCanIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
258
|
+
/**
|
|
259
|
+
*/
|
|
260
|
+
export declare const TreeViewAltIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
261
|
+
/**
|
|
262
|
+
* User of OpenMRS e.g. My Account
|
|
263
|
+
*/
|
|
264
|
+
export declare const UserAvatarIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
265
|
+
/**
|
|
266
|
+
*/
|
|
267
|
+
export declare const UserFollowIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
268
|
+
/**
|
|
269
|
+
* UserXray Icon
|
|
270
|
+
*
|
|
271
|
+
* `UserXrayIcon` is also used for imaging orders
|
|
272
|
+
*/
|
|
273
|
+
export declare const UserXrayIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
274
|
+
/**
|
|
275
|
+
*/
|
|
276
|
+
export declare const UserIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
277
|
+
/**
|
|
278
|
+
*/
|
|
279
|
+
export declare const ViewOffIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
280
|
+
/**
|
|
281
|
+
*/
|
|
282
|
+
export declare const ViewIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
283
|
+
/**
|
|
284
|
+
*/
|
|
285
|
+
export declare const WarningIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
286
|
+
/**
|
|
287
|
+
*/
|
|
288
|
+
export declare const AllergiesIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
*/
|
|
292
|
+
export declare const AttachmentIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
293
|
+
/**
|
|
294
|
+
* Conditions
|
|
295
|
+
*
|
|
296
|
+
* Note this is an alias for ListCheckedIcon
|
|
297
|
+
*/
|
|
298
|
+
export declare const ConditionsIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
299
|
+
/**
|
|
300
|
+
*
|
|
301
|
+
*/
|
|
302
|
+
export declare const RadiologyIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
303
|
+
/**
|
|
304
|
+
* Used as a button to add an item to the Order basket from a search
|
|
305
|
+
*
|
|
306
|
+
* Note this is an alias for ShoppingCartArrowDownIcon
|
|
307
|
+
*/
|
|
308
|
+
export declare const ShoppingCartAddItemIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
309
|
+
/**
|
|
310
|
+
* This is a utility component that takes an `icon` and renders it if the sprite for the icon
|
|
311
|
+
* is available. The goal is to make it easier to conditionally render configuration-specified icons.
|
|
312
|
+
*
|
|
313
|
+
* @example
|
|
314
|
+
* ```tsx
|
|
315
|
+
* <MaybeIcon icon='omrs-icon-baby' className={styles.myIconStyles} />
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
export declare const MaybeIcon: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
319
|
+
icon: string | undefined;
|
|
320
|
+
fallback?: React.ReactNode;
|
|
321
|
+
} & IconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
322
|
+
export type SvgIconProps = {
|
|
323
|
+
icon: IconId;
|
|
324
|
+
iconProps: IconProps;
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* This is a utility type for custom icons that use the svg-sprite-loader to bundle custom icons
|
|
328
|
+
*/
|
|
329
|
+
export declare const Icon: React.MemoExoticComponent<React.ForwardRefExoticComponent<SvgIconProps & React.RefAttributes<SVGSVGElement>>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './icons';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setupLogo(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setupPictograms(): void;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** @category Pictograms */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type Argument } from 'classnames';
|
|
4
|
+
export declare const pictogramIds: readonly ["omrs-pict-appointments", "omrs-pict-assessment-1", "omrs-pict-assessment-2", "omrs-pict-blood-bank", "omrs-pict-cardiology", "omrs-pict-ct-scan", "omrs-pict-dentistry", "omrs-pict-emergency-department", "omrs-pict-facility", "omrs-pict-geriatrics", "omrs-pict-gynaecology", "omrs-pict-in-patient", "omrs-pict-laboratory", "omrs-pict-labs-2", "omrs-pict-obstetrics", "omrs-pict-patient-search", "omrs-pict-patients", "omrs-pict-payments-desk", "omrs-pict-pharmacy", "omrs-pict-pharmacy-2", "omrs-pict-registration", "omrs-pict-service-queues", "omrs-pict-stock-management", "omrs-pict-transfer", "omrs-pict-triage", "omrs-pict-x-ray"];
|
|
5
|
+
export type PictogramId = (typeof pictogramIds)[number];
|
|
6
|
+
export type PictogramProps = {
|
|
7
|
+
className?: Argument;
|
|
8
|
+
size?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const AppointmentsPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated use AppointmentsPictogram instead
|
|
13
|
+
*/
|
|
14
|
+
export declare const AppointmentsAltPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
15
|
+
export declare const Assessment1Pictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
16
|
+
export declare const Assessment2Pictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
17
|
+
export declare const BloodBankPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
18
|
+
export declare const CardiologyPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
19
|
+
export declare const CtScanPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
20
|
+
export declare const DentistryPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
21
|
+
export declare const EmergencyDepartmentPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
22
|
+
export declare const FacilityPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
23
|
+
export declare const GeriatricsPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
24
|
+
export declare const GynaecologyPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
25
|
+
export declare const InPatientPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
26
|
+
export declare const LaboratoryPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
27
|
+
export declare const Labs2Pictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
28
|
+
export declare const ObstetricsPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
29
|
+
export declare const PatientSearchPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
30
|
+
export declare const PatientsPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
31
|
+
export declare const PaymentsDeskPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
32
|
+
export declare const PharmacyPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
33
|
+
export declare const Pharmacy2Pictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
34
|
+
export declare const RegistrationPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
35
|
+
export declare const ServiceQueuesPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
36
|
+
export declare const StockManagementPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
37
|
+
export declare const TransferPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
38
|
+
export declare const TriagePictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
39
|
+
export declare const XrayPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
40
|
+
export declare const HomePictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
41
|
+
export declare const PatientListsPictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
42
|
+
/**
|
|
43
|
+
* This is a utility component that takes an `pictogram` and render it if the sprite for the pictogram
|
|
44
|
+
* is available. The goal is to make it easier to conditionally render configuration-specified pictograms.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* <MaybePictogram pictogram='omrs-icon-baby' className={styles.myPictogramStyles} />
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare const MaybePictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
52
|
+
pictogram: string;
|
|
53
|
+
fallback?: React.ReactNode;
|
|
54
|
+
} & PictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
55
|
+
export type SvgPictogramProps = {
|
|
56
|
+
/** the id of the pictogram */
|
|
57
|
+
pictogram: PictogramId;
|
|
58
|
+
/** properties when using the pictogram */
|
|
59
|
+
pictogramProps: PictogramProps;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* This is a utility type for custom pictograms. Please maintain alphabetical order when adding new pictograms for readability.
|
|
63
|
+
*/
|
|
64
|
+
export declare const Pictogram: React.MemoExoticComponent<React.ForwardRefExoticComponent<SvgPictogramProps & React.RefAttributes<SVGSVGElement>>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function addSvg(htmlId: string, svgString: string): void;
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Array of valid values for Carbon tag's "type" attribute.
|
|
3
|
+
* Options from https://react.carbondesignsystem.com/?path=/docs/components-tag--overview
|
|
4
|
+
*/
|
|
5
|
+
export declare const carbonTagColors: readonly ["red", "magenta", "purple", "blue", "teal", "cyan", "gray", "green", "warm-gray", "cool-gray", "high-contrast", "outline"];
|
|
6
|
+
export type CarbonTagColor = (typeof carbonTagColors)[number];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface WorkspaceUnsavedChangesModal {
|
|
3
|
+
onConfirm: () => void;
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
affectedWorkspaceTitles: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* This modal is used for prompting user to confirm closing currently opened workspace.
|
|
9
|
+
*/
|
|
10
|
+
declare const Workspace2ClosePromptModal: React.FC<WorkspaceUnsavedChangesModal>;
|
|
11
|
+
export default Workspace2ClosePromptModal;
|
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
|
-
|
|
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 '@openmrs/esm-styleguide/src/internal';
|
|
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
|
-
|
|
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 '@openmrs/esm-styleguide/src/internal';
|
|
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.
|
|
3
|
+
"version": "8.0.1-pre.3615",
|
|
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.
|
|
102
|
-
"@openmrs/esm-config": "8.0.1-pre.
|
|
103
|
-
"@openmrs/esm-emr-api": "8.0.1-pre.
|
|
104
|
-
"@openmrs/esm-error-handling": "8.0.1-pre.
|
|
105
|
-
"@openmrs/esm-extensions": "8.0.1-pre.
|
|
106
|
-
"@openmrs/esm-globals": "8.0.1-pre.
|
|
107
|
-
"@openmrs/esm-navigation": "8.0.1-pre.
|
|
108
|
-
"@openmrs/esm-react-utils": "8.0.1-pre.
|
|
109
|
-
"@openmrs/esm-state": "8.0.1-pre.
|
|
110
|
-
"@openmrs/esm-translations": "8.0.1-pre.
|
|
111
|
-
"@openmrs/esm-utils": "8.0.1-pre.
|
|
101
|
+
"@openmrs/esm-api": "8.0.1-pre.3615",
|
|
102
|
+
"@openmrs/esm-config": "8.0.1-pre.3615",
|
|
103
|
+
"@openmrs/esm-emr-api": "8.0.1-pre.3615",
|
|
104
|
+
"@openmrs/esm-error-handling": "8.0.1-pre.3615",
|
|
105
|
+
"@openmrs/esm-extensions": "8.0.1-pre.3615",
|
|
106
|
+
"@openmrs/esm-globals": "8.0.1-pre.3615",
|
|
107
|
+
"@openmrs/esm-navigation": "8.0.1-pre.3615",
|
|
108
|
+
"@openmrs/esm-react-utils": "8.0.1-pre.3615",
|
|
109
|
+
"@openmrs/esm-state": "8.0.1-pre.3615",
|
|
110
|
+
"@openmrs/esm-translations": "8.0.1-pre.3615",
|
|
111
|
+
"@openmrs/esm-utils": "8.0.1-pre.3615",
|
|
112
112
|
"@rspack/cli": "^1.3.11",
|
|
113
113
|
"@rspack/core": "^1.3.11",
|
|
114
114
|
"@types/geopattern": "^1.2.9",
|