@openmrs/esm-styleguide 8.0.1-pre.3581 → 8.0.1-pre.3592
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 +4 -4
- package/dist/empty-card/empty-card.component.d.ts +13 -0
- package/dist/empty-card/index.d.ts +1 -0
- package/dist/error-card/error-card.component.d.ts +11 -0
- package/dist/error-card/index.d.ts +1 -0
- package/dist/error-state/error-state.component.d.ts +6 -0
- package/dist/error-state/index.d.ts +1 -0
- package/dist/internal.d.ts +4 -0
- package/dist/left-nav/index.d.ts +23 -0
- package/dist/modals/index.d.ts +25 -0
- package/dist/notifications/actionable-notification.component.d.ts +20 -0
- package/dist/notifications/active-actionable-notifications.component.d.ts +8 -0
- package/dist/notifications/active-notifications.component.d.ts +8 -0
- package/dist/notifications/index.d.ts +19 -0
- package/dist/notifications/notification.component.d.ts +19 -0
- package/dist/openmrs-esm-styleguide.css +1 -1
- package/dist/openmrs-esm-styleguide.css.map +1 -1
- package/dist/openmrs-esm-styleguide.js +2 -2
- package/dist/openmrs-esm-styleguide.js.map +1 -1
- package/dist/pagination/index.d.ts +1 -0
- package/dist/pagination/pagination.component.d.ts +22 -0
- package/dist/public.d.ts +20 -18
- package/dist/snackbars/active-snackbar.component.d.ts +9 -0
- package/dist/snackbars/index.d.ts +13 -0
- package/dist/snackbars/snackbar.component.d.ts +22 -0
- package/dist/toasts/active-toasts.component.d.ts +9 -0
- package/dist/toasts/index.d.ts +13 -0
- package/dist/toasts/toast.component.d.ts +19 -0
- package/dist/workspaces/action-menu-button/action-menu-button.component.d.ts +11 -0
- package/dist/workspaces/container/action-menu.component.d.ts +9 -0
- package/dist/workspaces/container/workspace-container.component.d.ts +54 -0
- package/dist/workspaces/container/workspace-renderer.component.d.ts +8 -0
- package/dist/workspaces/notification/workspace-notification.component.d.ts +6 -0
- package/dist/workspaces/public.d.ts +4 -0
- package/dist/workspaces/workspace-sidebar-store/useWorkspaceGroupStore.d.ts +11 -0
- package/dist/workspaces/workspaces.d.ts +236 -0
- package/package.json +12 -12
- package/src/cards/card-header.component.tsx +30 -0
- package/src/cards/card-header.module.scss +45 -0
- package/src/cards/index.ts +1 -0
- package/src/declarations.d.ts +14 -2
- package/src/empty-card/empty-card-registration.ts +6 -0
- package/src/empty-card/empty-card.component.tsx +55 -0
- package/src/empty-card/empty-card.module.scss +27 -0
- package/src/empty-card/empty-card.test.tsx +58 -0
- package/src/empty-card/empty-data-illustration.svg +32 -0
- package/src/empty-card/index.ts +1 -0
- package/src/error-card/error-card.component.tsx +35 -0
- package/src/error-card/error-card.module.scss +21 -0
- package/src/error-card/error-card.test.tsx +25 -0
- package/src/error-card/index.ts +1 -0
- package/src/index.ts +5 -3
- package/src/internal.ts +4 -0
- package/src/pagination/index.ts +1 -0
- package/src/pagination/pagination.component.tsx +77 -0
- package/src/pagination/pagination.module.scss +66 -0
- package/src/pagination/pagination.test.tsx +72 -0
- package/src/public.ts +20 -18
- package/src/snackbars/index.tsx +2 -0
- package/src/toasts/index.tsx +2 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
[0] Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
4
4
|
[0] WARNING in ⚠ asset size limit: The following asset(s) exceed the recommended size limit (244.141 KiB). This can impact web performance.
|
|
5
5
|
[0] │ Assets:
|
|
6
|
-
[0] │ openmrs-esm-styleguide.js (
|
|
7
|
-
[0] │ openmrs-esm-styleguide.css (3.
|
|
6
|
+
[0] │ openmrs-esm-styleguide.js (249.951 KiB)
|
|
7
|
+
[0] │ openmrs-esm-styleguide.css (3.266 MiB)
|
|
8
8
|
[0]
|
|
9
9
|
[0] WARNING in ⚠ entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244.141 KiB). This can impact web performance.
|
|
10
10
|
[0] │ Entrypoints:
|
|
11
|
-
[0] │ main (3.
|
|
11
|
+
[0] │ main (3.510 MiB)
|
|
12
12
|
[0] │ openmrs-esm-styleguide.css
|
|
13
13
|
[0] │ openmrs-esm-styleguide.js
|
|
14
14
|
[0]
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
[0] │ You can limit the size of your bundles by using import() to lazy load some parts of your application.
|
|
17
17
|
[0] │ For more info visit https://www.rspack.dev/guide/optimization/code-splitting
|
|
18
18
|
[0]
|
|
19
|
-
[0] Rspack compiled with 3 warnings in
|
|
19
|
+
[0] Rspack compiled with 3 warnings in 10.40 s
|
|
20
20
|
[0] rspack --mode=production exited with code 0
|
|
21
21
|
[1] tsc --project tsconfig.build.json exited with code 0
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface EmptyCardProps {
|
|
3
|
+
/** The name of the type of item that would be displayed here if not empty. This must be a pre-translated string. */
|
|
4
|
+
displayText: string;
|
|
5
|
+
/** The title to use for this empty component. This must be a pre-translated string. */
|
|
6
|
+
headerTitle: string;
|
|
7
|
+
/** A callback to invoke when the user tries to record a new item. */
|
|
8
|
+
launchForm?(): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Re-usable card for displaying an empty state
|
|
12
|
+
*/
|
|
13
|
+
export declare const EmptyCard: React.FC<EmptyCardProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EmptyCard, type EmptyCardProps } from './empty-card.component';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ErrorCardProps {
|
|
3
|
+
/** This is the error that triggered rendering the card. It is expected to be the error returned from `openmrsFetch()` */
|
|
4
|
+
error: any;
|
|
5
|
+
/** The title for this card. This must be a pre-translated string. */
|
|
6
|
+
headerTitle: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Re-usable card for displaying a fetch error
|
|
10
|
+
*/
|
|
11
|
+
export declare const ErrorCard: React.FC<ErrorCardProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ErrorCard, type ErrorCardProps } from './error-card.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './error-state.component';
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export * from './breakpoints';
|
|
2
|
+
export * from './cards';
|
|
2
3
|
export * from './config-schema';
|
|
3
4
|
export * from './custom-overflow-menu';
|
|
4
5
|
export * from './dashboard-extension';
|
|
5
6
|
export * from './datepicker';
|
|
6
7
|
export * from './diagnosis-tags';
|
|
8
|
+
export * from './empty-card';
|
|
9
|
+
export * from './error-card';
|
|
7
10
|
export * from './error-state';
|
|
8
11
|
export * from './icons/icons';
|
|
9
12
|
export * from './left-nav';
|
|
@@ -13,6 +16,7 @@ export * from './notifications';
|
|
|
13
16
|
export * from './notifications/actionable-notification.component';
|
|
14
17
|
export * from './notifications/notification.component';
|
|
15
18
|
export * from './page-header';
|
|
19
|
+
export * from './pagination';
|
|
16
20
|
export * from './patient-banner';
|
|
17
21
|
export * from './patient-photo';
|
|
18
22
|
export * from './pictograms/pictograms';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @module @category UI */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type SideNavProps } from '@carbon/react';
|
|
4
|
+
/**
|
|
5
|
+
* Extended props for the LeftNavMenu component
|
|
6
|
+
*/
|
|
7
|
+
interface LeftNavMenuProps extends SideNavProps {
|
|
8
|
+
/**
|
|
9
|
+
* Flag indicating if this component is a child of the header component.
|
|
10
|
+
* When true, the component renders the left nav menu.
|
|
11
|
+
* When false, it renders an empty fragment.
|
|
12
|
+
*/
|
|
13
|
+
isChildOfHeader?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* This component renders the left nav in desktop mode. It's also used to render the same
|
|
17
|
+
* nav when the hamburger menu is clicked on in tablet mode. See side-menu-panel.component.tsx
|
|
18
|
+
*
|
|
19
|
+
* Use of this component by anything other than <SideMenuPanel> (where isChildOfHeader == false)
|
|
20
|
+
* is deprecated; it simply renders nothing.
|
|
21
|
+
*/
|
|
22
|
+
export declare const LeftNavMenu: React.ForwardRefExoticComponent<LeftNavMenuProps & React.RefAttributes<HTMLElement>>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type ModalSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
size?: ModalSize;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
* Sets up the modals system. Should be called in the app shell during initialization.
|
|
9
|
+
*/
|
|
10
|
+
export declare function setupModals(modalContainer: HTMLElement | null): void;
|
|
11
|
+
/**
|
|
12
|
+
* Shows a modal dialog.
|
|
13
|
+
*
|
|
14
|
+
* The modal must have been registered by name. This should be done in the `routes.json` file of the
|
|
15
|
+
* app that defines the modal. Note that both the `<ModalHeader>` and `<ModalBody>` should be at the
|
|
16
|
+
* top level of the modal component (wrapped in a React.Fragment), or else the content of the modal
|
|
17
|
+
* body might not vertical-scroll properly.
|
|
18
|
+
*
|
|
19
|
+
* @param modalName The name of the modal to show.
|
|
20
|
+
* @param props The optional props to provide to the modal.
|
|
21
|
+
* @param onClose The optional callback to call when the modal is closed.
|
|
22
|
+
* @returns The dispose function to force closing the modal dialog.
|
|
23
|
+
*/
|
|
24
|
+
export declare function showModal(modalName: string, props?: ModalProps, onClose?: () => void): () => void;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** @module @category UI */
|
|
3
|
+
export interface ActionableNotificationProps {
|
|
4
|
+
notification: ActionableNotificationMeta;
|
|
5
|
+
}
|
|
6
|
+
export interface ActionableNotificationDescriptor {
|
|
7
|
+
actionButtonLabel: string;
|
|
8
|
+
onActionButtonClick(): void;
|
|
9
|
+
onClose?(): void;
|
|
10
|
+
subtitle: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
kind?: ActionableNotificationType | string;
|
|
13
|
+
critical?: boolean;
|
|
14
|
+
progressActionLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ActionableNotificationMeta extends ActionableNotificationDescriptor {
|
|
17
|
+
id: number;
|
|
18
|
+
}
|
|
19
|
+
export type ActionableNotificationType = 'error' | 'info' | 'info-square' | 'success' | 'warning' | 'warning-alt';
|
|
20
|
+
export declare const ActionableNotificationComponent: React.FC<ActionableNotificationProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Subject } from 'rxjs';
|
|
3
|
+
import type { ActionableNotificationMeta } from './actionable-notification.component';
|
|
4
|
+
interface ActionableActiveNotificationProps {
|
|
5
|
+
subject: Subject<ActionableNotificationMeta>;
|
|
6
|
+
}
|
|
7
|
+
declare const ActionableActiveNotifications: React.FC<ActionableActiveNotificationProps>;
|
|
8
|
+
export default ActionableActiveNotifications;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Subject } from 'rxjs';
|
|
3
|
+
import type { InlineNotificationMeta } from './notification.component';
|
|
4
|
+
interface ActiveNotificationProps {
|
|
5
|
+
subject: Subject<InlineNotificationMeta>;
|
|
6
|
+
}
|
|
7
|
+
declare const ActiveNotifications: React.FC<ActiveNotificationProps>;
|
|
8
|
+
export default ActiveNotifications;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { NotificationDescriptor } from './notification.component';
|
|
2
|
+
import type { ActionableNotificationDescriptor } from './actionable-notification.component';
|
|
3
|
+
/**
|
|
4
|
+
* Starts a rendering host for inline notifications. Should only be used by the app shell.
|
|
5
|
+
* Under normal conditions there is no need to use this function.
|
|
6
|
+
* @param target The container target that hosts the inline notifications.
|
|
7
|
+
*/
|
|
8
|
+
export declare function renderInlineNotifications(target: HTMLElement | null): void;
|
|
9
|
+
/**
|
|
10
|
+
* Displays an inline notification in the UI.
|
|
11
|
+
* @param notification The description of the notification to display.
|
|
12
|
+
*/
|
|
13
|
+
export declare function showNotification(notification: NotificationDescriptor): void;
|
|
14
|
+
export declare function renderActionableNotifications(target: HTMLElement | null): void;
|
|
15
|
+
/**
|
|
16
|
+
* Displays an actionable notification in the UI.
|
|
17
|
+
* @param notification The description of the notification to display.
|
|
18
|
+
*/
|
|
19
|
+
export declare function showActionableNotification(notification: ActionableNotificationDescriptor): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** @module @category UI */
|
|
3
|
+
export interface NotificationProps {
|
|
4
|
+
notification: InlineNotificationMeta;
|
|
5
|
+
}
|
|
6
|
+
export interface NotificationDescriptor {
|
|
7
|
+
description: string;
|
|
8
|
+
action?: string;
|
|
9
|
+
kind?: InlineNotificationType;
|
|
10
|
+
critical?: boolean;
|
|
11
|
+
millis?: number;
|
|
12
|
+
title?: string;
|
|
13
|
+
onAction?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface InlineNotificationMeta extends NotificationDescriptor {
|
|
16
|
+
id: number;
|
|
17
|
+
}
|
|
18
|
+
export type InlineNotificationType = 'error' | 'info' | 'info-square' | 'success' | 'warning' | 'warning-alt';
|
|
19
|
+
export declare const Notification: React.FC<NotificationProps>;
|