@epam/ai-dial-ui-kit 0.16.0-dev.61 → 0.16.0-dev.66
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/README.md +4 -2
- package/dist/CHANGELOG.md +8 -0
- package/dist/{DateCellRenderer-BFcpoREG.cjs → DateCellRenderer-6jyIN-OC.cjs} +1 -1
- package/dist/components/New/Calendar/Calendar.js +245 -228
- package/dist/components/New/ErrorBoundary/ErrorBoundary.js +67 -0
- package/dist/components/New/LoginScreen/LoginScreen.js +98 -0
- package/dist/components/Spinner/Spinner.js +16 -11
- package/dist/components-manifest.json +190 -8
- package/dist/constants/public-class-names.js +2 -0
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/dial-ui-kit.js +78 -74
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/src/components/New/Calendar/Calendar.d.ts +32 -1
- package/dist/src/components/New/ErrorBoundary/ErrorBoundary.d.ts +78 -0
- package/dist/src/components/New/LoginScreen/LoginScreen.d.ts +63 -0
- package/dist/src/components/Spinner/Spinner.d.ts +27 -1
- package/dist/src/constants/public-class-names.d.ts +2 -0
- package/dist/src/index.d.ts +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FC, ReactNode, Ref } from 'react';
|
|
2
|
+
export interface LoginScreenProvider {
|
|
3
|
+
/** Stable provider id; used as the list key. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Visible label; also the link's accessible name. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Where the provider's sign-in starts — a top-level navigation. */
|
|
8
|
+
href: string;
|
|
9
|
+
/** Optional provider logo. Decorative; hidden when it fails to load. */
|
|
10
|
+
iconSrc?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface LoginScreenProps {
|
|
13
|
+
/** Headline of the screen, rendered as the page's `h1`. */
|
|
14
|
+
title: ReactNode;
|
|
15
|
+
/** Prompt above the provider list, such as "Sign in with:". */
|
|
16
|
+
description?: ReactNode;
|
|
17
|
+
/** Product mark above the title. Decorative; hidden when it fails to load. */
|
|
18
|
+
logoSrc?: string;
|
|
19
|
+
/** One full-width link-styled button per provider. */
|
|
20
|
+
providers?: LoginScreenProvider[];
|
|
21
|
+
/** Accessible name of the provider list. */
|
|
22
|
+
providersLabel?: string;
|
|
23
|
+
/** State content above the providers: a spinner, an error with a retry, a notice. */
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
/** Ref to the `h1` (focusable with `tabIndex={-1}`), for moving focus after a retry. */
|
|
26
|
+
titleRef?: Ref<HTMLHeadingElement>;
|
|
27
|
+
/** Additional CSS classes for the container. */
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The full-page sign-in screen shared by DIAL applications: soft themed
|
|
32
|
+
* artwork behind a centred card with the product mark, an `h1`, state content
|
|
33
|
+
* and one button per identity provider.
|
|
34
|
+
* aliases: SignInPage|LoginPage|AuthPage|ProviderPicker
|
|
35
|
+
* Design system 2.0
|
|
36
|
+
*
|
|
37
|
+
* Fills its container. The root is a `section` named by its title. The
|
|
38
|
+
* artwork follows the `gradient-1` / `gradient-2` theme tokens. On mobile the
|
|
39
|
+
* card loses its surface and spans the width. Fetching providers and building
|
|
40
|
+
* their URLs stay with the application. For a signed-out or access-denied
|
|
41
|
+
* state inside an app, use `StateScreen`.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <LoginScreen
|
|
46
|
+
* logoSrc="/favicon.svg"
|
|
47
|
+
* title="Welcome to DIAL Chat"
|
|
48
|
+
* description="Sign in with:"
|
|
49
|
+
* providersLabel="Sign-in options"
|
|
50
|
+
* providers={[{ id: 'keycloak', label: 'Keycloak', href: '/api/auth/login/keycloak' }]}
|
|
51
|
+
* />
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @param title - Headline of the screen, rendered as the page's `h1`.
|
|
55
|
+
* @param [description] - Prompt above the provider list.
|
|
56
|
+
* @param [logoSrc] - Product mark above the title.
|
|
57
|
+
* @param [providers] - One link-styled button per provider.
|
|
58
|
+
* @param [providersLabel] - Accessible name of the provider list.
|
|
59
|
+
* @param [children] - State content above the providers.
|
|
60
|
+
* @param [titleRef] - Ref to the focusable `h1`.
|
|
61
|
+
* @param [className] - Additional CSS classes for the container.
|
|
62
|
+
*/
|
|
63
|
+
export declare const LoginScreen: FC<LoginScreenProps>;
|
|
@@ -1,11 +1,37 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, Ref } from 'react';
|
|
2
2
|
export interface SpinnerProps {
|
|
3
3
|
size?: number;
|
|
4
4
|
className?: string;
|
|
5
5
|
fullWidth?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Covers the whole viewport: a fixed overlay on the page background, above
|
|
8
|
+
* the page and at the kit's popup layer, with the ring centred. For an app's
|
|
9
|
+
* loading screen; it replaces the `fullWidth` + `h-screen` wrappers hosts
|
|
10
|
+
* wrote themselves.
|
|
11
|
+
*/
|
|
12
|
+
fullScreen?: boolean;
|
|
6
13
|
ariaLabel?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Makes the ring focusable (`tabIndex={-1}`) and points this ref at it, so
|
|
16
|
+
* a host can move focus to the loading state after a retry removes the
|
|
17
|
+
* focused control. The ring, not the overlay, takes focus, so the host's
|
|
18
|
+
* focus outline stays on screen.
|
|
19
|
+
*/
|
|
20
|
+
focusRef?: Ref<HTMLDivElement>;
|
|
7
21
|
}
|
|
8
22
|
/**
|
|
9
23
|
* Design system 2.0
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Spinner fullScreen size={48} ariaLabel="Checking your session…" />
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @param [size] - Ring diameter in px.
|
|
31
|
+
* @param [className] - Additional container classes.
|
|
32
|
+
* @param [fullWidth] - Stretches the container to its parent's width and height.
|
|
33
|
+
* @param [fullScreen] - Covers the whole viewport with the ring centred.
|
|
34
|
+
* @param [ariaLabel] - Accessible label for screen readers.
|
|
35
|
+
* @param [focusRef] - Makes the ring focusable and points this ref at it.
|
|
10
36
|
*/
|
|
11
37
|
export declare const Spinner: FC<SpinnerProps>;
|
|
@@ -17,6 +17,8 @@ export declare const DIAL_KIT_CLASS: {
|
|
|
17
17
|
readonly notification: "dial-kit-notification";
|
|
18
18
|
/** The empty-state root of `NoDataContent`. */
|
|
19
19
|
readonly noDataContent: "dial-kit-no-data-content";
|
|
20
|
+
/** The `section` root of a `LoginScreen`. */
|
|
21
|
+
readonly loginScreen: "dial-kit-login-screen";
|
|
20
22
|
/** The `section` root of a `StateScreen`. */
|
|
21
23
|
readonly stateScreen: "dial-kit-state-screen";
|
|
22
24
|
/**
|
package/dist/src/index.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export type { CardShellProps } from './components/New/CardShell/CardShell';
|
|
|
84
84
|
export { ErrorMessageNotification, ErrorToastNotification, GeneralMessageNotification, GeneralToastNotification, InfoMessageNotification, InfoToastNotification, LoadingMessageNotification, LoadingToastNotification, SuccessMessageNotification, SuccessToastNotification, WarningMessageNotification, WarningToastNotification, } from './components/New/Notification/NotificationWrapper';
|
|
85
85
|
export { CalendarMode } from './types/calendar.ts';
|
|
86
86
|
export { Calendar } from './components/New/Calendar/Calendar';
|
|
87
|
-
export type { CalendarProps, CalendarValue, } from './components/New/Calendar/Calendar';
|
|
87
|
+
export type { CalendarProps, CalendarTimeFieldRenderProps, CalendarValue, } from './components/New/Calendar/Calendar';
|
|
88
88
|
export { FolderPath } from './components/New/FolderPath/FolderPath';
|
|
89
89
|
export type { FolderPathProps } from './components/New/FolderPath/FolderPath';
|
|
90
90
|
export { BreadcrumbsSize } from './types/breadcrumbs';
|
|
@@ -237,6 +237,10 @@ export { NoDataContent } from './components/New/NoDataContent/NoDataContent';
|
|
|
237
237
|
export type { NoDataContentProps } from './components/New/NoDataContent/NoDataContent';
|
|
238
238
|
export { StateScreen } from './components/New/StateScreen/StateScreen';
|
|
239
239
|
export type { StateScreenProps } from './components/New/StateScreen/StateScreen';
|
|
240
|
+
export { ErrorBoundary } from './components/New/ErrorBoundary/ErrorBoundary';
|
|
241
|
+
export type { ErrorBoundaryProps } from './components/New/ErrorBoundary/ErrorBoundary';
|
|
242
|
+
export { LoginScreen } from './components/New/LoginScreen/LoginScreen';
|
|
243
|
+
export type { LoginScreenProps, LoginScreenProvider, } from './components/New/LoginScreen/LoginScreen';
|
|
240
244
|
export { LiveRegion } from './components/New/LiveRegion/LiveRegion';
|
|
241
245
|
export type { LiveRegionProps } from './components/New/LiveRegion/LiveRegion';
|
|
242
246
|
export { LiveRegionElement, LiveRegionPoliteness } from './types/live-region';
|