@openmrs/esm-styleguide 8.0.1-pre.3525 → 8.0.1-pre.3537
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 +3 -3
- package/dist/datepicker/DatePickerIcon.d.ts +6 -0
- package/dist/datepicker/DatePickerInput.d.ts +11 -0
- package/dist/datepicker/MonthYear.d.ts +10 -0
- package/dist/datepicker/locale-context.d.ts +2 -0
- package/dist/datepicker/utils.d.ts +15 -0
- package/dist/error-state/error-state.component.d.ts +6 -0
- package/dist/error-state/index.d.ts +1 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/left-nav/index.d.ts +23 -0
- package/dist/modals/index.d.ts +25 -0
- package/dist/openmrs-esm-styleguide.js +1 -1
- package/dist/openmrs-esm-styleguide.js.map +1 -1
- package/dist/snackbars/active-snackbar.component.d.ts +9 -0
- package/dist/snackbars/index.d.ts +12 -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 +12 -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/dashboard-extension/index.tsx +1 -1
- package/src/location-picker/location-picker.resource.ts +0 -1
- package/src/workspaces/notification/workspace-notification.component.tsx +4 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[0] Browserslist: browsers data (caniuse-lite) is
|
|
1
|
+
[0] Browserslist: browsers data (caniuse-lite) is 7 months old. Please run:
|
|
2
2
|
[0] npx update-browserslist-db@latest
|
|
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 (248.
|
|
6
|
+
[0] │ openmrs-esm-styleguide.js (248.457 KiB)
|
|
7
7
|
[0] │ openmrs-esm-styleguide.css (3.259 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.
|
|
@@ -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 9.
|
|
19
|
+
[0] Rspack compiled with 3 warnings in 9.55 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,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Component to render the Calendar icon for the DatePicker component with the same styling as
|
|
4
|
+
* the Carbon DatePicker component.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DatePickerIcon: React.ForwardRefExoticComponent<React.RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DateInputProps } from 'react-aria-components';
|
|
3
|
+
interface OpenmrsDateInputProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* This is just the standard React Aria Components DatePickerInput with an added `onClick` handler to open
|
|
8
|
+
* the calendar when the group is clicked. This is used to emulate Carbon's behaviour in the DatePicker.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DatePickerInput: React.ForwardRefExoticComponent<DateInputProps & OpenmrsDateInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Custom component to render the month and year on the DatePicker and provide the standard Carbon
|
|
4
|
+
* UI to change them.
|
|
5
|
+
*
|
|
6
|
+
* Should work with any calendar system supported by the @internationalized/date package.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MonthYear: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & {
|
|
9
|
+
children?: React.ReactNode | undefined;
|
|
10
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -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 * from './error-state.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './icons';
|
|
@@ -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 {};
|