@epam/ai-dial-ui-kit 0.16.0-dev.39 → 0.16.0-dev.41
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-B2yk99n7.cjs → DateCellRenderer-f1EmpTB0.cjs} +1 -1
- package/dist/components/New/FormSection/FormSection.js +87 -0
- package/dist/components/New/Tabs/Tabs.js +91 -58
- package/dist/components-manifest.json +131 -4
- package/dist/constants/public-class-names.js +2 -0
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/dial-ui-kit.js +298 -293
- package/dist/grid.cjs +1 -1
- package/dist/src/components/New/FormSection/FormSection.d.ts +63 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +17 -1
- package/dist/src/constants/public-class-names.d.ts +2 -0
- package/dist/src/index.d.ts +4 -1
- package/dist/src/types/form-section.d.ts +9 -0
- package/dist/src/types/tab.d.ts +5 -0
- package/dist/types/form-section.js +4 -0
- package/dist/types/tab.js +5 -4
- package/package.json +1 -1
package/dist/grid.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./DateCellRenderer-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./DateCellRenderer-f1EmpTB0.cjs");exports.DEFAULT_DATE_FORMAT_OPTIONS=e.DEFAULT_DATE_FORMAT_OPTIONS;exports.DEFAULT_DATE_LOCALE=e.DEFAULT_LOCALE;exports.DEFAULT_GRID_DATE_FORMAT_OPTIONS=e.DEFAULT_DATE_FORMAT_OPTIONS$1;exports.DEFAULT_GRID_DATE_LOCALE=e.DEFAULT_LOCALE$1;exports.DateCellRenderer=e.DateCellRenderer;exports.DialDateCellRenderer=e.DialDateCellRenderer;exports.DialGrid=e.DialGrid;exports.GRID_ALIGN_RIGHT_CLASS=e.GRID_ALIGN_RIGHT_CLASS;exports.GRID_ROOT_CLASS=e.GRID_ROOT_CLASS;exports.GRID_ROW_HEIGHT=e.ROW_HEIGHT;exports.GRID_SELECTION_COLUMN_ID=e.GRID_SELECTION_COLUMN_ID;exports.GRID_THEME_PARAMS=e.GRID_THEME_PARAMS;exports.Grid=e.Grid;exports.GridColorScheme=e.GridColorScheme;exports.GridSelectionMode=e.GridSelectionMode;exports.baseColumnComparator=e.baseColumnComparator;exports.checkColDefsChanges=e.checkColDefsChanges;exports.convertGridDateToDate=e.convertToDate;exports.convertToDate=e.convertToDate;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { FormSectionVariant } from '../../../types/form-section';
|
|
3
|
+
export type FormSectionHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
4
|
+
export interface FormSectionProps {
|
|
5
|
+
/** Heading of the section; also names the `section` landmark. */
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
/** Control at the end of the heading row — typically a small "Add" or "Change" button. */
|
|
8
|
+
action?: ReactNode;
|
|
9
|
+
/** Optional line under the heading saying what the section holds. */
|
|
10
|
+
description?: ReactNode;
|
|
11
|
+
/** Type scale of the heading and description. Defaults to `FormSectionVariant.Row`. */
|
|
12
|
+
variant?: FormSectionVariant;
|
|
13
|
+
/** Level of the heading element, to fit the page's outline. Defaults to `3`. */
|
|
14
|
+
headingLevel?: FormSectionHeadingLevel;
|
|
15
|
+
/** The section's fields or values. */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
/** Additional CSS classes for the container. */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Additional CSS classes for the heading. */
|
|
20
|
+
titleClassName?: string;
|
|
21
|
+
/** Additional CSS classes for the description. */
|
|
22
|
+
descriptionClassName?: string;
|
|
23
|
+
/** Additional CSS classes for the content wrapper. */
|
|
24
|
+
contentClassName?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A titled section of a form or a builder column: a heading with an optional
|
|
28
|
+
* action at its end, an optional description and the section's content.
|
|
29
|
+
* aliases: SectionRow|FieldSection|SettingsSection|FormGroup|SectionHeader
|
|
30
|
+
* Design system 2.0
|
|
31
|
+
*
|
|
32
|
+
* The root is a `section` named by its heading, so each section is a region a
|
|
33
|
+
* screen reader can jump to. `headingLevel` picks the heading element so the
|
|
34
|
+
* section fits the outline of the page it is mounted in; the variant only sets
|
|
35
|
+
* the type scale. The action sits at the inline end of the heading row and
|
|
36
|
+
* never shrinks; the content is rendered as given, with no field styling of its
|
|
37
|
+
* own. For a collapsible group, use `Accordion`; for a single labelled control,
|
|
38
|
+
* the control's own `label`.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <FormSection
|
|
43
|
+
* title="Model"
|
|
44
|
+
* variant={FormSectionVariant.Caption}
|
|
45
|
+
* action={<GhostButton label="Change" onClick={openPicker} />}
|
|
46
|
+
* description="The model that answers in this application."
|
|
47
|
+
* >
|
|
48
|
+
* <SelectedEntityCard entityId={modelId} />
|
|
49
|
+
* </FormSection>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @param title - Heading of the section; also names the `section` landmark.
|
|
53
|
+
* @param [action] - Control at the end of the heading row.
|
|
54
|
+
* @param [description] - Optional line under the heading.
|
|
55
|
+
* @param [variant] - Type scale of the heading and description. Defaults to `FormSectionVariant.Row`.
|
|
56
|
+
* @param [headingLevel] - Level of the heading element. Defaults to `3`.
|
|
57
|
+
* @param [children] - The section's fields or values.
|
|
58
|
+
* @param [className] - Additional CSS classes for the container.
|
|
59
|
+
* @param [titleClassName] - Additional CSS classes for the heading.
|
|
60
|
+
* @param [descriptionClassName] - Additional CSS classes for the description.
|
|
61
|
+
* @param [contentClassName] - Additional CSS classes for the content wrapper.
|
|
62
|
+
*/
|
|
63
|
+
export declare const FormSection: FC<FormSectionProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
import { TabOrientation } from '../../../types/tab';
|
|
2
|
+
import { TabOrientation, TabStatus } from '../../../types/tab';
|
|
3
3
|
/** A single tab entry rendered by {@link Tabs}. */
|
|
4
4
|
export interface TabItem {
|
|
5
5
|
/** Unique identifier used to match against `activeTabId`. */
|
|
@@ -12,6 +12,18 @@ export interface TabItem {
|
|
|
12
12
|
icon?: ReactNode;
|
|
13
13
|
/** Renders the tab greyed out and unselectable, and skips it during keyboard navigation. */
|
|
14
14
|
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Flags the tab as holding an error or a warning � typically a form section
|
|
17
|
+
* that failed validation. Draws a coloured icon after the label and adds the
|
|
18
|
+
* state to the tab's accessible name. Uses the {@link TabStatus} enum.
|
|
19
|
+
*/
|
|
20
|
+
status?: TabStatus;
|
|
21
|
+
/**
|
|
22
|
+
* Already-translated text announced for `status`, appended to the tab's
|
|
23
|
+
* accessible name. Defaults to `'Error'` / `'Warning'`; pass it when the
|
|
24
|
+
* interface is localised.
|
|
25
|
+
*/
|
|
26
|
+
statusLabel?: string;
|
|
15
27
|
}
|
|
16
28
|
export interface TabsProps {
|
|
17
29
|
/** Ordered list of tabs to render. */
|
|
@@ -64,6 +76,10 @@ export interface TabsProps {
|
|
|
64
76
|
* `ArrowUp` / `ArrowDown`. The rail is the shape to reach for when the tabs
|
|
65
77
|
* label whole pages of a settings surface; the row, when they filter one.
|
|
66
78
|
*
|
|
79
|
+
* A tab with a `status` (`TabStatus.Error` or `TabStatus.Warning`) draws a
|
|
80
|
+
* coloured icon after its label, and the status text joins the tab's accessible
|
|
81
|
+
* name so the state reaches assistive tech as well as sighted users.
|
|
82
|
+
*
|
|
67
83
|
* `className` lands on whichever element is outermost: the heading wrapper when
|
|
68
84
|
* `sectionLabel` is set, the `role="tablist"` itself when it is not.
|
|
69
85
|
*
|
|
@@ -154,6 +154,8 @@ export declare const DIAL_KIT_CLASS: {
|
|
|
154
154
|
readonly entityIdentity: "dial-kit-entity-identity";
|
|
155
155
|
/** The bordered card of a `SelectedEntityCard`, not the wrapper that also holds its error. */
|
|
156
156
|
readonly selectedEntityCard: "dial-kit-selected-entity-card";
|
|
157
|
+
/** The `section` root of a `FormSection`: its heading row, description and content. */
|
|
158
|
+
readonly formSection: "dial-kit-form-section";
|
|
157
159
|
/** The row of a `Switch`: the control and its label. */
|
|
158
160
|
readonly switch: "dial-kit-switch";
|
|
159
161
|
/** The row of a `Checkbox`: the box and its label. */
|
package/dist/src/index.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ export { ConfirmationPopupVariant } from './types/confirmation-popup';
|
|
|
104
104
|
export { DropdownType, DropdownTrigger, DropdownItemType, } from './types/dropdown';
|
|
105
105
|
export { MenuItemMark } from './types/menu-item';
|
|
106
106
|
export { ElementSize } from './types/size';
|
|
107
|
-
export { ScreenResolution, TabOrientation, TabView } from './types/tab';
|
|
107
|
+
export { ScreenResolution, TabOrientation, TabStatus, TabView, } from './types/tab';
|
|
108
108
|
export type { DialBreadcrumbPathItem } from './models/breadcrumb';
|
|
109
109
|
export { FormItemOrientation } from './types/form-item';
|
|
110
110
|
export { SelectSize, SelectVariant } from './types/select';
|
|
@@ -284,6 +284,9 @@ export { NoDataContent } from './components/New/NoDataContent/NoDataContent';
|
|
|
284
284
|
export type { NoDataContentProps } from './components/New/NoDataContent/NoDataContent';
|
|
285
285
|
export { StateScreen } from './components/New/StateScreen/StateScreen';
|
|
286
286
|
export type { StateScreenProps } from './components/New/StateScreen/StateScreen';
|
|
287
|
+
export { FormSection } from './components/New/FormSection/FormSection';
|
|
288
|
+
export type { FormSectionProps, FormSectionHeadingLevel, } from './components/New/FormSection/FormSection';
|
|
289
|
+
export { FormSectionVariant } from './types/form-section';
|
|
287
290
|
export { TransferQueue } from './components/New/TransferQueue/TransferQueue';
|
|
288
291
|
export type { TransferQueueItem, TransferQueueLabels, TransferQueueProps, } from './components/New/TransferQueue/TransferQueue';
|
|
289
292
|
export { DEFAULT_TRANSFER_QUEUE_LABELS, TRANSFER_QUEUE_AUTO_CLOSE_DELAY_MS, } from './components/New/TransferQueue/constants';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** How a `FormSection` sets its heading, description and content. */
|
|
2
|
+
export declare enum FormSectionVariant {
|
|
3
|
+
/** A field of a form: small semibold heading, small description, an 8px header gap. */
|
|
4
|
+
Row = "row",
|
|
5
|
+
/** A titled group of a builder column: caption-lead heading, tiny description. */
|
|
6
|
+
Caption = "caption",
|
|
7
|
+
/** One setting inside a group: tiny semibold heading, tiny description. */
|
|
8
|
+
Setting = "setting"
|
|
9
|
+
}
|
package/dist/src/types/tab.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ export declare enum TabOrientation {
|
|
|
2
2
|
Horizontal = "horizontal",
|
|
3
3
|
Vertical = "vertical"
|
|
4
4
|
}
|
|
5
|
+
/** Validation state a tab can flag on itself, e.g. a form section with problems. */
|
|
6
|
+
export declare enum TabStatus {
|
|
7
|
+
Error = "error",
|
|
8
|
+
Warning = "warning"
|
|
9
|
+
}
|
|
5
10
|
export declare enum TabView {
|
|
6
11
|
Default = "default",
|
|
7
12
|
Inline = "inline"
|
package/dist/types/tab.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e = /* @__PURE__ */ ((r) => (r.Horizontal = "horizontal", r.Vertical = "vertical", r))(e || {}), l = /* @__PURE__ */ ((r) => (r.Error = "error", r.Warning = "warning", r))(l || {}), n = /* @__PURE__ */ ((r) => (r.Default = "default", r.Inline = "inline", r))(n || {}), a = /* @__PURE__ */ ((r) => (r.Mobile = "mobile", r.Tablet = "tablet", r))(a || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
a as ScreenResolution,
|
|
4
|
+
e as TabOrientation,
|
|
5
|
+
l as TabStatus,
|
|
6
|
+
n as TabView
|
|
6
7
|
};
|