@epam/ai-dial-ui-kit 0.16.0-dev.60 → 0.16.0-dev.62
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 +1 -0
- package/dist/CHANGELOG.md +2 -0
- package/dist/{DateCellRenderer-BFcpoREG.cjs → DateCellRenderer-6jyIN-OC.cjs} +1 -1
- package/dist/components/New/Analytics/Card/Card.js +63 -55
- package/dist/components/New/LoginScreen/LoginScreen.js +98 -0
- package/dist/components-manifest.json +88 -4
- package/dist/constants/public-class-names.js +2 -0
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/dial-ui-kit.js +41 -39
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/src/components/New/Analytics/Card/Card.d.ts +7 -1
- package/dist/src/components/New/LoginScreen/LoginScreen.d.ts +63 -0
- package/dist/src/constants/public-class-names.d.ts +2 -0
- package/dist/src/index.d.ts +2 -0
- 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>;
|
|
@@ -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
|
@@ -237,6 +237,8 @@ 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 { LoginScreen } from './components/New/LoginScreen/LoginScreen';
|
|
241
|
+
export type { LoginScreenProps, LoginScreenProvider, } from './components/New/LoginScreen/LoginScreen';
|
|
240
242
|
export { LiveRegion } from './components/New/LiveRegion/LiveRegion';
|
|
241
243
|
export type { LiveRegionProps } from './components/New/LiveRegion/LiveRegion';
|
|
242
244
|
export { LiveRegionElement, LiveRegionPoliteness } from './types/live-region';
|