@epam/ai-dial-ui-kit 0.14.0-dev.2 → 0.14.0-dev.4

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.
Files changed (48) hide show
  1. package/README.md +4 -1
  2. package/dist/CHANGELOG.md +45 -1
  3. package/dist/{JsonEditor-CM-CG-FK.js → JsonEditor-CFkmn69x.js} +1 -1
  4. package/dist/{JsonEditor-DPtZkKQi.cjs → JsonEditor-CPk58Te4.cjs} +1 -1
  5. package/dist/{MarkdownEditor-DRQoDnC-.js → MarkdownEditor-ALJ17x82.js} +1 -1
  6. package/dist/{MarkdownEditor-cdq8UZxL.js → MarkdownEditor-CqMQgd-3.js} +1 -1
  7. package/dist/{MarkdownEditor-DyIvPpmt.cjs → MarkdownEditor-Cz2HKRcy.cjs} +1 -1
  8. package/dist/{MarkdownEditor-D4WuEafx.cjs → MarkdownEditor-DgPlyntV.cjs} +1 -1
  9. package/dist/components-manifest.json +802 -43
  10. package/dist/dial-ui-kit.cjs.js +1 -1
  11. package/dist/dial-ui-kit.es.js +188 -174
  12. package/dist/{index-CBk9P1Pa.js → index-BnqboA_3.js} +10936 -10196
  13. package/dist/{index-A_KNCHda.cjs → index-CBaBO6e_.cjs} +31 -31
  14. package/dist/index.css +2 -2
  15. package/dist/migration-guides/0.14.0/control-color-token-rename.md +143 -0
  16. package/dist/migration-guides/0.14.0/focus-border-token-role-naming.md +87 -0
  17. package/dist/migration-guides/README.md +2 -0
  18. package/dist/src/components/New/Calendar/constants.d.ts +5 -5
  19. package/dist/src/components/New/Checkbox/Checkbox.d.ts +46 -0
  20. package/dist/src/components/New/Checkbox/constants.d.ts +10 -0
  21. package/dist/src/components/New/Dropdown/constants.d.ts +1 -1
  22. package/dist/src/components/New/EllipsisTooltip/EllipsisTooltip.d.ts +51 -0
  23. package/dist/src/components/New/EllipsisTooltip/use-truncation.d.ts +21 -0
  24. package/dist/src/components/New/Highlight/Highlight.d.ts +1 -1
  25. package/dist/src/components/New/Input/Button/constants.d.ts +1 -1
  26. package/dist/src/components/New/Label/Label.d.ts +5 -0
  27. package/dist/src/components/New/Notification/Notification.d.ts +7 -0
  28. package/dist/src/components/New/Notification/NotificationWrapper.d.ts +2 -0
  29. package/dist/src/components/New/Radio/Radio.d.ts +48 -0
  30. package/dist/src/components/New/RadioGroup/RadioGroup.d.ts +78 -0
  31. package/dist/src/components/New/RadioGroup/constants.d.ts +11 -0
  32. package/dist/src/components/New/RadioGroupPopupField/RadioGroupPopupField.d.ts +93 -0
  33. package/dist/src/components/New/RadioGroupPopupField/constants.d.ts +22 -0
  34. package/dist/src/components/New/SegmentedControl/SegmentedControl.d.ts +54 -0
  35. package/dist/src/components/New/SegmentedControl/constants.d.ts +16 -0
  36. package/dist/src/components/New/Select/constants.d.ts +1 -1
  37. package/dist/src/components/New/ToggleIconButton/ToggleIconButton.d.ts +47 -0
  38. package/dist/src/components/New/Tooltip/Tooltip.d.ts +43 -0
  39. package/dist/src/components/New/Tooltip/TooltipContainer.d.ts +32 -0
  40. package/dist/src/components/New/Tooltip/TooltipContent.d.ts +18 -0
  41. package/dist/src/components/New/Tooltip/TooltipContext.d.ts +115 -0
  42. package/dist/src/components/New/Tooltip/TooltipTrigger.d.ts +18 -0
  43. package/dist/src/components/New/Tooltip/constants.d.ts +25 -0
  44. package/dist/src/components/New/constants/overlay.d.ts +1 -1
  45. package/dist/src/index.d.ts +23 -1
  46. package/dist/src/types/notification.d.ts +2 -1
  47. package/dist/src/types/tooltip.d.ts +6 -0
  48. package/package.json +1 -1
@@ -0,0 +1,43 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { TooltipContainerOptions } from './TooltipContext';
3
+ export interface TooltipProps extends TooltipContainerOptions {
4
+ hideTooltip?: boolean;
5
+ tooltip?: ReactNode;
6
+ children: ReactNode;
7
+ asChild?: boolean;
8
+ triggerClassName?: string;
9
+ contentClassName?: string;
10
+ }
11
+ /**
12
+ * Shows a short explanation next to an element while it is hovered or focused.
13
+ * aliases: HoverPopover|InfoPopover
14
+ * Design system 2.0
15
+ *
16
+ * The tooltip is placed on one of the four sides of the trigger and follows it
17
+ * on scroll, flipping to the opposite side when it would not fit.
18
+ *
19
+ * Tooltip text does not reach assistive technology unless the trigger itself
20
+ * carries it: pass `asChild` so the `aria-describedby` lands on the control
21
+ * rather than on a wrapper `<span>`, and never let a tooltip be the only
22
+ * accessible name of a control — it renders nothing on mobile screens.
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * <Tooltip tooltip="Tooltip text" placement={TooltipPlacement.Top} asChild>
27
+ * <button>Hover me</button>
28
+ * </Tooltip>
29
+ * ```
30
+ *
31
+ * @param [tooltip] - The content to display in the tooltip
32
+ * @param children - The element that triggers the tooltip
33
+ * @param [asChild=false] - Use the child as the trigger instead of wrapping it in a `<span>`
34
+ * @param [hideTooltip=false] - Suppress the tooltip while keeping the trigger rendered
35
+ * @param [triggerClassName] - Additional CSS classes for the trigger element
36
+ * @param [contentClassName] - Additional CSS classes for the tooltip bubble
37
+ * @param [initialOpen=false] - Whether the tooltip starts open (uncontrolled only)
38
+ * @param [placement=TooltipPlacement.Bottom] - Side of the trigger the tooltip is placed on
39
+ * @param [isTriggerClickable=false] - Restrict hover handling to mouse input, ignoring touch
40
+ * @param [open] - Controlled open state; disables the hover and focus triggers
41
+ * @param [onOpenChange] - Callback fired when the open state should change
42
+ */
43
+ export declare const Tooltip: FC<TooltipProps>;
@@ -0,0 +1,32 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { TooltipContainerOptions } from './TooltipContext';
3
+ interface Props {
4
+ children: ReactNode;
5
+ }
6
+ /**
7
+ * Provides tooltip positioning and open state to a trigger and a content pair.
8
+ * aliases: TooltipProvider|TooltipRoot
9
+ * Design system 2.0
10
+ *
11
+ * Use it directly only when the trigger and the content cannot be rendered by
12
+ * `Tooltip` itself — for example when the content needs custom markup.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <TooltipContainer placement={TooltipPlacement.Top}>
17
+ * <TooltipTrigger asChild>
18
+ * <button>Hover me</button>
19
+ * </TooltipTrigger>
20
+ * <TooltipContent>Tooltip text</TooltipContent>
21
+ * </TooltipContainer>
22
+ * ```
23
+ *
24
+ * @param children - The tooltip trigger and content components
25
+ * @param [initialOpen=false] - Whether the tooltip starts open (uncontrolled only)
26
+ * @param [placement=TooltipPlacement.Bottom] - Side of the trigger the tooltip is placed on
27
+ * @param [isTriggerClickable=false] - Restrict hover handling to mouse input, ignoring touch
28
+ * @param [open] - Controlled open state; disables the hover and focus triggers
29
+ * @param [onOpenChange] - Callback fired when the open state should change
30
+ */
31
+ export declare const TooltipContainer: FC<Props & TooltipContainerOptions>;
32
+ export {};
@@ -0,0 +1,18 @@
1
+ import { CSSProperties, FC, HTMLProps } from 'react';
2
+ export interface TooltipContentProps extends HTMLProps<HTMLDivElement> {
3
+ style?: CSSProperties;
4
+ }
5
+ /**
6
+ * The floating bubble that carries the tooltip text.
7
+ * Design system 2.0
8
+ *
9
+ * Rendered in a portal, above popups and dropdowns, with an arrow pointing back
10
+ * at the trigger. Renders nothing on a mobile screen, where there is no hover
11
+ * to reveal it — so a control must never depend on a tooltip alone to be
12
+ * understood, or to have an accessible name.
13
+ *
14
+ * @param children - The content to display inside the tooltip
15
+ * @param [className] - Additional CSS classes applied to the tooltip bubble
16
+ * @param [style] - Additional inline styles for the tooltip bubble
17
+ */
18
+ export declare const TooltipContent: FC<TooltipContentProps>;
@@ -0,0 +1,115 @@
1
+ import { TooltipPlacement } from '../../../types/tooltip';
2
+ type ContextType = ReturnType<typeof useTooltip> | null;
3
+ export declare const TooltipContext: import('react').Context<ContextType>;
4
+ export interface TooltipContainerOptions {
5
+ initialOpen?: boolean;
6
+ placement?: TooltipPlacement;
7
+ isTriggerClickable?: boolean;
8
+ open?: boolean;
9
+ onOpenChange?: (open: boolean) => void;
10
+ }
11
+ export declare const useTooltipContext: () => {
12
+ placement: import('@floating-ui/utils').Placement;
13
+ strategy: import('@floating-ui/utils').Strategy;
14
+ middlewareData: import('@floating-ui/core').MiddlewareData;
15
+ x: number;
16
+ y: number;
17
+ isPositioned: boolean;
18
+ update: () => void;
19
+ floatingStyles: React.CSSProperties;
20
+ refs: {
21
+ reference: import('react').MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
22
+ floating: React.MutableRefObject<HTMLElement | null>;
23
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
24
+ setFloating: (node: HTMLElement | null) => void;
25
+ } & import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
26
+ elements: {
27
+ reference: import('@floating-ui/react-dom').ReferenceType | null;
28
+ floating: HTMLElement | null;
29
+ } & import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
30
+ context: {
31
+ placement: import('@floating-ui/utils').Placement;
32
+ strategy: import('@floating-ui/utils').Strategy;
33
+ x: number;
34
+ y: number;
35
+ middlewareData: import('@floating-ui/core').MiddlewareData;
36
+ isPositioned: boolean;
37
+ update: () => void;
38
+ floatingStyles: React.CSSProperties;
39
+ open: boolean;
40
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
41
+ events: import('@floating-ui/react').FloatingEvents;
42
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
43
+ nodeId: string | undefined;
44
+ floatingId: string | undefined;
45
+ refs: import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
46
+ elements: import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
47
+ };
48
+ getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
49
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
50
+ getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
51
+ active?: boolean;
52
+ selected?: boolean;
53
+ }) => Record<string, unknown>;
54
+ open: boolean;
55
+ setOpen: (open: boolean) => void;
56
+ arrowRef: import('react').RefObject<SVGSVGElement | null>;
57
+ };
58
+ /**
59
+ * Positioning and interaction state shared by the tooltip trigger and content.
60
+ * Design system 2.0
61
+ *
62
+ * @param [initialOpen=false] - Whether the tooltip starts open (uncontrolled only)
63
+ * @param [placement=TooltipPlacement.Bottom] - Side of the trigger the tooltip is placed on
64
+ * @param [isTriggerClickable=false] - Restrict hover handling to mouse input, ignoring touch
65
+ * @param [open] - Controlled open state; disables the hover and focus triggers
66
+ * @param [onOpenChange] - Callback fired when the open state should change
67
+ */
68
+ export declare const useTooltip: ({ initialOpen, placement, isTriggerClickable, open: controlledOpen, onOpenChange: setControlledOpen, }?: TooltipContainerOptions) => {
69
+ placement: import('@floating-ui/utils').Placement;
70
+ strategy: import('@floating-ui/utils').Strategy;
71
+ middlewareData: import('@floating-ui/core').MiddlewareData;
72
+ x: number;
73
+ y: number;
74
+ isPositioned: boolean;
75
+ update: () => void;
76
+ floatingStyles: React.CSSProperties;
77
+ refs: {
78
+ reference: import('react').MutableRefObject<import('@floating-ui/react-dom').ReferenceType | null>;
79
+ floating: React.MutableRefObject<HTMLElement | null>;
80
+ setReference: (node: import('@floating-ui/react-dom').ReferenceType | null) => void;
81
+ setFloating: (node: HTMLElement | null) => void;
82
+ } & import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
83
+ elements: {
84
+ reference: import('@floating-ui/react-dom').ReferenceType | null;
85
+ floating: HTMLElement | null;
86
+ } & import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
87
+ context: {
88
+ placement: import('@floating-ui/utils').Placement;
89
+ strategy: import('@floating-ui/utils').Strategy;
90
+ x: number;
91
+ y: number;
92
+ middlewareData: import('@floating-ui/core').MiddlewareData;
93
+ isPositioned: boolean;
94
+ update: () => void;
95
+ floatingStyles: React.CSSProperties;
96
+ open: boolean;
97
+ onOpenChange: (open: boolean, event?: Event, reason?: import('@floating-ui/react').OpenChangeReason) => void;
98
+ events: import('@floating-ui/react').FloatingEvents;
99
+ dataRef: React.MutableRefObject<import('@floating-ui/react').ContextData>;
100
+ nodeId: string | undefined;
101
+ floatingId: string | undefined;
102
+ refs: import('@floating-ui/react').ExtendedRefs<import('@floating-ui/react').ReferenceType>;
103
+ elements: import('@floating-ui/react').ExtendedElements<import('@floating-ui/react').ReferenceType>;
104
+ };
105
+ getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
106
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
107
+ getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
108
+ active?: boolean;
109
+ selected?: boolean;
110
+ }) => Record<string, unknown>;
111
+ open: boolean;
112
+ setOpen: (open: boolean) => void;
113
+ arrowRef: import('react').RefObject<SVGSVGElement | null>;
114
+ };
115
+ export {};
@@ -0,0 +1,18 @@
1
+ import { FC, HTMLProps } from 'react';
2
+ interface TooltipTriggerProps extends HTMLProps<HTMLElement> {
3
+ asChild?: boolean;
4
+ }
5
+ /**
6
+ * The element a tooltip is anchored to and opened from.
7
+ * Design system 2.0
8
+ *
9
+ * Prefer `asChild` whenever the trigger is a single element: it puts the
10
+ * `aria-describedby` that names the tooltip on the control itself instead of on
11
+ * a wrapper `<span>`, which is the only way the tooltip text reaches assistive
12
+ * technology.
13
+ *
14
+ * @param children - The element that opens the tooltip
15
+ * @param [asChild=false] - Render the child as the trigger instead of wrapping it in a `<span>`
16
+ */
17
+ export declare const TooltipTrigger: FC<TooltipTriggerProps>;
18
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Tooltip layout and styling constants.
3
+ * Design system 2.0
4
+ */
5
+ /** Height of the `FloatingArrow` triangle, in px — its default `height`. */
6
+ export declare const ARROW_HEIGHT = 7;
7
+ /** Space left between the arrow tip and the trigger, in px. */
8
+ export declare const ARROW_GAP = 2;
9
+ /**
10
+ * Delay before an on-hover tooltip opens, in ms. Long enough that a pointer
11
+ * crossing the trigger on its way somewhere else does not flash a tooltip.
12
+ */
13
+ export declare const HOVER_OPEN_DELAY = 500;
14
+ /**
15
+ * The arrow is an SVG outside the tooltip box, so it cannot inherit the box's
16
+ * background — keep this in sync with `bg-control-inverted` in
17
+ * `tooltipClassName`. A CSS fill beats the `fill` presentation attribute
18
+ * `FloatingArrow` puts on the `<svg>`, and the filled `<path>` inherits it.
19
+ */
20
+ export declare const arrowClassName = "fill-control-inverted";
21
+ /**
22
+ * Tooltips sit above popups, dropdowns and the calendar (all `z-[53]`), since
23
+ * they can be triggered by a control inside one of them.
24
+ */
25
+ export declare const tooltipClassName = "z-[55] max-w-[300px] whitespace-pre-wrap break-words rounded-lg bg-control-inverted px-3 py-2 dial-small-text text-control-inverted";
@@ -19,6 +19,6 @@ export declare const overlaySubMenuClassName: string;
19
19
  export declare const overlayItemClassName: string;
20
20
  /** Tint marking the row that is currently selected. */
21
21
  export declare const overlayItemSelectedClassName = "bg-control-accent-alpha-hover";
22
- export declare const overlayItemDisabledClassName = "opacity-75";
22
+ export declare const overlayItemDisabledClassName = "text-secondary";
23
23
  /** Distance between the trigger and its panel, and between nested panels. */
24
24
  export declare const overlayGap = 4;
@@ -150,7 +150,7 @@ export { Notification } from './components/New/Notification/Notification';
150
150
  export { Highlight } from './components/New/Highlight/Highlight';
151
151
  export { CardShell } from './components/New/CardShell/CardShell';
152
152
  export type { CardShellProps } from './components/New/CardShell/CardShell';
153
- export { ErrorMessageNotification, ErrorToastNotification, InfoMessageNotification, InfoToastNotification, LoadingMessageNotification, LoadingToastNotification, SuccessMessageNotification, SuccessToastNotification, WarningMessageNotification, WarningToastNotification, } from './components/New/Notification/NotificationWrapper';
153
+ export { ErrorMessageNotification, ErrorToastNotification, GeneralMessageNotification, GeneralToastNotification, InfoMessageNotification, InfoToastNotification, LoadingMessageNotification, LoadingToastNotification, SuccessMessageNotification, SuccessToastNotification, WarningMessageNotification, WarningToastNotification, } from './components/New/Notification/NotificationWrapper';
154
154
  export { CalendarMode } from './types/calendar.ts';
155
155
  export { Calendar } from './components/New/Calendar/Calendar';
156
156
  export type { CalendarProps, CalendarValue, } from './components/New/Calendar/Calendar';
@@ -200,6 +200,18 @@ export { Accordion } from './components/New/Accordion/Accordion';
200
200
  export type { AccordionProps } from './components/New/Accordion/Accordion';
201
201
  export { Switch } from './components/New/Switch/Switch';
202
202
  export type { SwitchProps } from './components/New/Switch/Switch';
203
+ export { Radio } from './components/New/Radio/Radio';
204
+ export type { RadioProps } from './components/New/Radio/Radio';
205
+ export { RadioGroup } from './components/New/RadioGroup/RadioGroup';
206
+ export type { RadioGroupProps, RadioGroupItem, } from './components/New/RadioGroup/RadioGroup';
207
+ export { RadioGroupPopupField } from './components/New/RadioGroupPopupField/RadioGroupPopupField';
208
+ export type { RadioGroupPopupFieldProps } from './components/New/RadioGroupPopupField/RadioGroupPopupField';
209
+ export { Checkbox } from './components/New/Checkbox/Checkbox';
210
+ export type { CheckboxProps } from './components/New/Checkbox/Checkbox';
211
+ export { ToggleIconButton } from './components/New/ToggleIconButton/ToggleIconButton';
212
+ export type { ToggleIconButtonProps } from './components/New/ToggleIconButton/ToggleIconButton';
213
+ export { SegmentedControl } from './components/New/SegmentedControl/SegmentedControl';
214
+ export type { SegmentedControlProps, SegmentedControlItem, } from './components/New/SegmentedControl/SegmentedControl';
203
215
  export { Tabs } from './components/New/Tabs/Tabs';
204
216
  export type { TabsProps, TabItem } from './components/New/Tabs/Tabs';
205
217
  export { FileDropzone } from './components/New/FileDropzone/FileDropzone';
@@ -211,3 +223,13 @@ export type { TagInputProps } from './components/New/TagInput/TagInput';
211
223
  export { Search } from './components/New/Search/Search';
212
224
  export type { SearchProps } from './components/New/Search/Search';
213
225
  export { matchesAccept } from './utils/file-accept';
226
+ export { Tooltip } from './components/New/Tooltip/Tooltip';
227
+ export type { TooltipProps } from './components/New/Tooltip/Tooltip';
228
+ export { TooltipContainer } from './components/New/Tooltip/TooltipContainer';
229
+ export { TooltipContent } from './components/New/Tooltip/TooltipContent';
230
+ export type { TooltipContentProps } from './components/New/Tooltip/TooltipContent';
231
+ export { TooltipTrigger } from './components/New/Tooltip/TooltipTrigger';
232
+ export type { TooltipContainerOptions } from './components/New/Tooltip/TooltipContext';
233
+ export { TooltipPlacement } from './types/tooltip.ts';
234
+ export { EllipsisTooltip } from './components/New/EllipsisTooltip/EllipsisTooltip';
235
+ export type { EllipsisTooltipProps } from './components/New/EllipsisTooltip/EllipsisTooltip';
@@ -3,7 +3,8 @@ export declare enum NotificationVariant {
3
3
  Success = "success",
4
4
  Warning = "warning",
5
5
  Error = "error",
6
- Loading = "loading"
6
+ Loading = "loading",
7
+ General = "general"
7
8
  }
8
9
  export declare enum NotificationType {
9
10
  Toast = "toast",
@@ -0,0 +1,6 @@
1
+ export declare enum TooltipPlacement {
2
+ Top = "top",
3
+ Right = "right",
4
+ Bottom = "bottom",
5
+ Left = "left"
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.14.0-dev.2",
3
+ "version": "0.14.0-dev.4",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",