@epam/ai-dial-ui-kit 0.14.0-dev.11 → 0.14.0-dev.12

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 (25) hide show
  1. package/dist/{JsonEditor-BAWk7XXc.cjs → JsonEditor-CIlvycLc.cjs} +1 -1
  2. package/dist/{JsonEditor-B-EMx5BY.js → JsonEditor-NpnQyFhU.js} +1 -1
  3. package/dist/{MarkdownEditor-DPlMgApq.js → MarkdownEditor-BfGhvCXb.js} +1 -1
  4. package/dist/{MarkdownEditor-B4VOwIVY.cjs → MarkdownEditor-D4Bnm8m2.cjs} +1 -1
  5. package/dist/{MarkdownEditor-BJnJ74CN.js → MarkdownEditor-DNsyeoRP.js} +1 -1
  6. package/dist/{MarkdownEditor-BkkQlx9o.cjs → MarkdownEditor-HHw9bUhi.cjs} +1 -1
  7. package/dist/components-manifest.json +335 -6
  8. package/dist/dial-ui-kit.cjs.js +1 -1
  9. package/dist/dial-ui-kit.es.js +216 -203
  10. package/dist/{index-C30-CsGh.js → index-BLzC7Z4I.js} +10477 -10023
  11. package/dist/{index-DL9rE-US.cjs → index-CCLX8BoI.cjs} +31 -31
  12. package/dist/index.css +2 -2
  13. package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +1 -4
  14. package/dist/src/components/Grid/renderers/utils.d.ts +1 -2
  15. package/dist/src/components/New/Grid/Grid.d.ts +124 -0
  16. package/dist/src/components/New/Grid/components/SelectionCell.d.ts +21 -0
  17. package/dist/src/components/New/Grid/components/SelectionHeader.d.ts +14 -0
  18. package/dist/src/components/New/Grid/constants.d.ts +59 -0
  19. package/dist/src/components/New/Grid/renderers/DateCellRenderer.d.ts +48 -0
  20. package/dist/src/components/New/Grid/renderers/constants.d.ts +5 -0
  21. package/dist/src/components/New/NoDataContent/NoDataContent.d.ts +48 -0
  22. package/dist/src/index.d.ts +10 -0
  23. package/dist/src/utils/grid-comparators.d.ts +4 -0
  24. package/dist/src/utils/grid-date.d.ts +7 -0
  25. package/package.json +1 -1
@@ -0,0 +1,59 @@
1
+ /** Root class of the 2.0 grid; every rule in `styles/grid.scss` sits under it. */
2
+ export declare const GRID_ROOT_CLASS = "dial-kit-grid";
3
+ /** Present only while a selection column is rendered. Drives its reveal. */
4
+ export declare const GRID_WITH_SELECTION_CLASS = "dial-kit-grid-with-selection";
5
+ export declare const GRID_WITHOUT_HEADER_BORDERS_CLASS = "dial-kit-grid-without-header-borders";
6
+ /** Cell of the selection column: faded out until the row is hovered. */
7
+ export declare const GRID_ROW_SELECT_CLASS = "dial-kit-grid-row-select";
8
+ /** Header of the selection column: faded out until the header is hovered. */
9
+ export declare const GRID_HEADER_SELECT_CLASS = "dial-kit-grid-header-select";
10
+ /**
11
+ * Pins the whole selection column visible — on touch, or once something is
12
+ * selected. It sits on the container rather than on the column definition:
13
+ * ag-Grid rebuilds every cell when a column definition changes, which would
14
+ * pull the DOM out from under the click that caused the selection.
15
+ */
16
+ export declare const GRID_SELECTION_VISIBLE_CLASS = "dial-kit-grid-selection-visible";
17
+ /** Right-aligns a column. Applied by the consumer through `cellClass`. */
18
+ export declare const GRID_ALIGN_RIGHT_CLASS = "dial-kit-grid-align-right";
19
+ /** Height of both a body row and the header row. */
20
+ export declare const ROW_HEIGHT = 40;
21
+ /**
22
+ * ag-Grid theme parameters, resolved from the 2.0 colour tokens with the same
23
+ * literal fallbacks the Tailwind config carries, so a consumer that defines no
24
+ * CSS variables still gets the intended palette.
25
+ *
26
+ * Hover sits one step up the accent-alpha ramp from the selected tint, so a
27
+ * hovered selected row still reads as hovered — the same relationship the 2.0
28
+ * dropdown and select rows use.
29
+ */
30
+ export declare const GRID_THEME_PARAMS: {
31
+ accentColor: string;
32
+ backgroundColor: string;
33
+ oddRowBackgroundColor: string;
34
+ selectedRowBackgroundColor: string;
35
+ rowHoverColor: string;
36
+ borderColor: string;
37
+ rowBorder: string;
38
+ chromeBackgroundColor: string;
39
+ foregroundColor: string;
40
+ headerTextColor: string;
41
+ browserColorScheme: string;
42
+ headerFontSize: number;
43
+ headerFontWeight: number;
44
+ fontSize: number;
45
+ fontFamily: string;
46
+ spacing: number;
47
+ borderRadius: number;
48
+ wrapperBorderRadius: number;
49
+ };
50
+ /**
51
+ * Sources reported with a selection change. `checkboxSelected` marks the ones
52
+ * the user made in the selection column, the other two mark selections the
53
+ * component applied itself while syncing to `selectedRowIds` or new row data.
54
+ */
55
+ export declare enum SelectionEventSourceType {
56
+ API = "api",
57
+ ROW_DATA_CHANGED = "rowDataChanged",
58
+ CHECKBOX_SELECTED = "checkboxSelected"
59
+ }
@@ -0,0 +1,48 @@
1
+ import { ICellRendererParams } from 'ag-grid-community';
2
+ import { FC } from 'react';
3
+ import { DateValue } from '../../../../utils/grid-date';
4
+ export type { DateValue };
5
+ export interface DateCellRendererProps extends Partial<ICellRendererParams<Record<string, unknown>, DateValue>> {
6
+ /** The date to render. A pure integer string is read as epoch milliseconds. */
7
+ value?: DateValue | null;
8
+ /** Locale used for formatting. Defaults to `'en-US'`. */
9
+ locale?: string;
10
+ /** `Intl.DateTimeFormat` options. */
11
+ options?: Intl.DateTimeFormatOptions;
12
+ /** Rendered when the value carries no usable date. */
13
+ emptyPlaceholder?: string;
14
+ /** Additional CSS classes for the cell. */
15
+ className?: string;
16
+ /** Suppresses the truncation tooltip. */
17
+ hideTooltip?: boolean;
18
+ }
19
+ /**
20
+ * Date cell for the 2.0 {@link Grid}, usable as an ag-Grid `cellRenderer`.
21
+ * aliases: DateCell|TimestampCell
22
+ * Design system 2.0
23
+ *
24
+ * Formats the value with `Intl.DateTimeFormat` and wraps it in a
25
+ * {@link EllipsisTooltip}, so the full string is only offered when the column is
26
+ * too narrow to show it. A valid date is rendered inside a `<time datetime>`,
27
+ * which gives assistive tech and crawlers the machine-readable value next to
28
+ * the localised one.
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * // As a column renderer
33
+ * { field: 'createdAt', cellRenderer: DateCellRenderer,
34
+ * cellRendererParams: { options: { timeZone: 'UTC' } } }
35
+ *
36
+ * // Directly
37
+ * <DateCellRenderer value="2025-07-20T00:00:00Z" options={{ timeZone: 'UTC' }} />
38
+ * <DateCellRenderer value={1752969600000} /> // epoch milliseconds
39
+ * ```
40
+ *
41
+ * @param [value] - The date to render.
42
+ * @param [locale='en-US'] - Locale used for formatting.
43
+ * @param [options] - `Intl.DateTimeFormat` options, e.g. `timeZone`.
44
+ * @param [emptyPlaceholder] - Rendered when the value carries no usable date.
45
+ * @param [className] - Additional CSS classes for the cell.
46
+ * @param [hideTooltip=false] - Suppresses the truncation tooltip.
47
+ */
48
+ export declare const DateCellRenderer: FC<DateCellRendererProps>;
@@ -0,0 +1,5 @@
1
+ import { ColDef } from 'ag-grid-community';
2
+ export declare const DEFAULT_LOCALE = "en-US";
3
+ export declare const DEFAULT_DATE_FORMAT_OPTIONS: Intl.DateTimeFormatOptions;
4
+ /** Fixed, unsortable and unfilterable: the column holds a control, not data. */
5
+ export declare const SELECTION_COL_DEF: ColDef;
@@ -0,0 +1,48 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface NoDataContentProps {
3
+ /** Headline of the empty state. */
4
+ title: ReactNode;
5
+ /** Optional secondary line under the title. */
6
+ description?: ReactNode;
7
+ /** Illustration above the title. Defaults to a struck-through clipboard. */
8
+ icon?: ReactNode;
9
+ /**
10
+ * Announces the empty state to assistive tech as it appears. Turn it on where
11
+ * the content replaces a list the user has just filtered or searched.
12
+ */
13
+ live?: boolean;
14
+ /** Additional CSS classes for the container. */
15
+ className?: string;
16
+ /** Additional CSS classes for the title. */
17
+ titleClassName?: string;
18
+ /** Additional CSS classes for the description. */
19
+ descriptionClassName?: string;
20
+ }
21
+ /**
22
+ * Message shown in place of a list, table or grid that has nothing to show.
23
+ * aliases: EmptyState|NoResults|ZeroState
24
+ * Design system 2.0
25
+ *
26
+ * Fills its container and centres an illustration, a headline and an optional
27
+ * secondary line. The icon is decorative, so it is hidden from assistive tech
28
+ * and the text carries the message on its own.
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * <NoDataContent
33
+ * title="No results found"
34
+ * description="Try a different search term."
35
+ * />
36
+ *
37
+ * <NoDataContent title="Nothing here yet" icon={<IconInbox size={60} />} live />
38
+ * ```
39
+ *
40
+ * @param title - Headline of the empty state.
41
+ * @param [description] - Optional secondary line under the title.
42
+ * @param [icon] - Illustration above the title. Defaults to a struck-through clipboard.
43
+ * @param [live=false] - Announce the empty state to assistive tech as it appears.
44
+ * @param [className] - Additional CSS classes for the container.
45
+ * @param [titleClassName] - Additional CSS classes for the title.
46
+ * @param [descriptionClassName] - Additional CSS classes for the description.
47
+ */
48
+ export declare const NoDataContent: FC<NoDataContentProps>;
@@ -244,3 +244,13 @@ export { ResizableContainer } from './components/New/ResizableContainer/Resizabl
244
244
  export type { ResizableContainerProps } from './components/New/ResizableContainer/ResizableContainer';
245
245
  export { ConditionalResizableContainer } from './components/New/ResizableContainer/ConditionalResizableContainer';
246
246
  export type { ConditionalResizableContainerProps } from './components/New/ResizableContainer/ConditionalResizableContainer';
247
+ export { NoDataContent } from './components/New/NoDataContent/NoDataContent';
248
+ export type { NoDataContentProps } from './components/New/NoDataContent/NoDataContent';
249
+ export { Grid, GRID_SELECTION_COLUMN_ID } from './components/New/Grid/Grid';
250
+ export type { GridProps } from './components/New/Grid/Grid';
251
+ export { DateCellRenderer } from './components/New/Grid/renderers/DateCellRenderer';
252
+ export type { DateCellRendererProps, DateValue, } from './components/New/Grid/renderers/DateCellRenderer';
253
+ export { DEFAULT_DATE_FORMAT_OPTIONS, DEFAULT_LOCALE as DEFAULT_DATE_LOCALE, } from './components/New/Grid/renderers/constants';
254
+ export { GRID_ALIGN_RIGHT_CLASS, GRID_ROOT_CLASS, GRID_THEME_PARAMS, ROW_HEIGHT as GRID_ROW_HEIGHT, } from './components/New/Grid/constants';
255
+ export { convertToDate } from './utils/grid-date';
256
+ export { baseColumnComparator, checkColDefsChanges, } from './utils/grid-comparators';
@@ -0,0 +1,4 @@
1
+ import { ColDef, IRowNode } from 'ag-grid-community';
2
+ export declare const baseColumnComparator: (a: string | number | undefined, b: string | number | undefined, _nodeA?: IRowNode, _nodeB?: IRowNode, isInverted?: boolean) => number;
3
+ export declare const omitUndefined: <T extends object>(value: T | undefined) => T;
4
+ export declare const checkColDefsChanges: (cols: ColDef[], initialCols: ColDef[]) => boolean;
@@ -0,0 +1,7 @@
1
+ export type DateValue = string | number | Date;
2
+ /**
3
+ * Normalises the value a date cell can receive into a `Date`, or `null` when it
4
+ * carries no usable date. A pure integer string is read as epoch milliseconds,
5
+ * so a serialised timestamp behaves like the number it came from.
6
+ */
7
+ export declare const convertToDate: (input?: DateValue | null) => Date | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.14.0-dev.11",
3
+ "version": "0.14.0-dev.12",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",