@epam/ai-dial-ui-kit 0.16.0-dev.61 → 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.
@@ -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
  /**
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.16.0-dev.61",
3
+ "version": "0.16.0-dev.62",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",