@epam/ai-dial-ui-kit 0.16.0-dev.54 → 0.16.0-dev.56

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 (40) hide show
  1. package/README.md +3 -0
  2. package/dist/CHANGELOG.md +14 -0
  3. package/dist/{DateCellRenderer-CPl27YD9.cjs → DateCellRenderer-weXr7pb2.cjs} +28 -28
  4. package/dist/{MarkdownEditor-BtLY7OVq.cjs → MarkdownEditor-B-x8Ntfe.cjs} +1 -1
  5. package/dist/components/New/CaptionText/CaptionText.js +31 -25
  6. package/dist/components/New/Dropdown/Dropdown.js +204 -195
  7. package/dist/components/New/LiveRegion/LiveRegion.js +33 -0
  8. package/dist/components/New/Notification/Notification.js +51 -40
  9. package/dist/components/New/Notification/constants.js +26 -17
  10. package/dist/components/New/ToggleChip/ToggleChip.js +54 -0
  11. package/dist/components/New/ToggleChip/constants.js +11 -0
  12. package/dist/components/ProgressBar/ProgressBar.js +43 -38
  13. package/dist/components-manifest.json +230 -13
  14. package/dist/constants/public-class-names.js +7 -0
  15. package/dist/dial-ui-kit.cjs +3 -3
  16. package/dist/dial-ui-kit.js +378 -367
  17. package/dist/editors.cjs +1 -1
  18. package/dist/grid.cjs +1 -1
  19. package/dist/{icon-D93YIwGJ.cjs → icon-4D9xu6E_.cjs} +1 -1
  20. package/dist/index.css +1 -1
  21. package/dist/src/components/New/CaptionText/CaptionText.d.ts +21 -6
  22. package/dist/src/components/New/Dropdown/Dropdown.d.ts +53 -1
  23. package/dist/src/components/New/LiveRegion/LiveRegion.d.ts +58 -0
  24. package/dist/src/components/New/Notification/Notification.d.ts +21 -2
  25. package/dist/src/components/New/Notification/constants.d.ts +11 -0
  26. package/dist/src/components/New/ToggleChip/ToggleChip.d.ts +70 -0
  27. package/dist/src/components/New/ToggleChip/constants.d.ts +12 -0
  28. package/dist/src/components/ProgressBar/ProgressBar.d.ts +23 -3
  29. package/dist/src/constants/public-class-names.d.ts +7 -0
  30. package/dist/src/index.d.ts +8 -2
  31. package/dist/src/types/dropdown.d.ts +16 -0
  32. package/dist/src/types/live-region.d.ts +17 -0
  33. package/dist/src/types/notification.d.ts +11 -0
  34. package/dist/src/types/progress-bar.d.ts +13 -0
  35. package/dist/types/dropdown.js +5 -4
  36. package/dist/types/live-region.js +5 -0
  37. package/dist/types/notification.js +3 -2
  38. package/dist/types/progress-bar.js +4 -0
  39. package/dist/utils/merge-classes.js +11 -8
  40. package/package.json +1 -1
package/README.md CHANGED
@@ -271,6 +271,7 @@ breaking change and goes through the migration-guide process.
271
271
  | `notification` | `dial-kit-notification` | The `Notification` surface, including every toast and section-message wrapper |
272
272
  | `noDataContent` | `dial-kit-no-data-content` | The empty-state root of `NoDataContent` |
273
273
  | `stateScreen` | `dial-kit-state-screen` | The `section` root of a `StateScreen` |
274
+ | `liveRegion` | `dial-kit-live-region` | The always-mounted wrapper of a `LiveRegion`, or of an `announce`d `CaptionText` / `ErrorText` |
274
275
  | `transferQueue` | `dial-kit-transfer-queue` | The `role="status"` panel of a `TransferQueue`: header, rows and aggregate bar |
275
276
 
276
277
  #### Text
@@ -364,6 +365,7 @@ breaking change and goes through the migration-guide process.
364
365
  | `tag` | `dial-kit-tag` | A `Tag` pill, including a `TagInput`'s rows |
365
366
  | `filterChips` | `dial-kit-filter-chips` | The `role="group"` row of a `FilterChips`; its chips carry `dial-kit-tag` |
366
367
  | `toggleIconButton` | `dial-kit-toggle-icon-button` | A `ToggleIconButton`, additive to `dial-kit-base-icon-button` |
368
+ | `toggleChip` | `dial-kit-toggle-chip` | The `<button aria-pressed>` of a `ToggleChip` |
367
369
  | `closeButton` | `dial-kit-close-button` | A `CloseButton`, additive to `dial-kit-base-icon-button` |
368
370
  | `infoButton` | `dial-kit-info-button` | An `InfoButton`, additive to `dial-kit-base-icon-button` |
369
371
  | `buttonDropdown` | `dial-kit-button-dropdown` | The wrapper of a `ButtonDropdown` |
@@ -429,6 +431,7 @@ not AAA:
429
431
  | Standard 2.0 fields (`Input`, `Select`, `RadioGroupPopupField`) | 40px tall | The pointer target spans the full field width but stays 4px short of 44 vertically; the height is a shared form design token, not a per-control choice. `.dial-kit-input` clips its overflow, so the pseudo-element cannot grow the target either |
430
432
  | `Tag` remove button | 16×16 rendered | Reaches 24×24 through `dial-kit-minimum-target`; a 44px target would overhang 14px per side and swallow the neighbouring tags of a `TagInput` row |
431
433
  | Clickable `Tag` | 32px tall | A 44px target would overhang 6px per side and swallow the neighbouring chips of a filter row; the tag is already wider than 24px on both axes |
434
+ | `ToggleChip` | 32px tall | Same pill as a clickable `Tag`: a 44px target would overhang 6px per side and swallow the neighbouring chips of a toggle row; the chip is already wider than 24px on both axes |
432
435
  | `Radio` circle | 20×20 rendered | Reaches 24×24 through `dial-kit-minimum-target`; a 44px target would overhang 12px per side and swallow the adjacent label. Clicking the label selects the radio, so the practical target is wider |
433
436
  | `Checkbox` box | 20×20 rendered | Reaches 24×24 through `dial-kit-minimum-target`; a 44px target would overhang 12px per side and swallow the adjacent label. Clicking the label toggles the checkbox, so the practical target is wider |
434
437
  | `Slider` track row | 24px tall | The pointer target spans the full track width but is only 24px tall; a 44px row would add 20px of dead space to every form the slider sits in, and the thumb is dragged rather than tapped |
package/dist/CHANGELOG.md CHANGED
@@ -31,6 +31,18 @@ Versions match the git tags on the `development` branch.
31
31
 
32
32
  ### Added
33
33
 
34
+ - **`Dropdown` (2.0) — `overlayRole` (`DropdownOverlayRole.Menu` / `Dialog` / `None`), `overlayAriaLabel`, `overlayAriaLabelledBy`, `returnFocus`** — the floating wrapper was always `role="menu"`, so a `renderOverlay` panel that is not a menu — a usage-limits dialog, an announcements region — sat inside a menu, which is invalid ARIA. `overlayRole={DropdownOverlayRole.Dialog}` renders `role="dialog"` with `aria-haspopup="dialog"` on the trigger, named by `overlayAriaLabelledBy`, `overlayAriaLabel` or, failing both, the trigger; `DropdownOverlayRole.None` renders a role-less wrapper and drops `aria-haspopup`, keeping `aria-expanded` / `aria-controls`, for content that brings its own role. Arrow-key navigation between options now runs for `Menu` only, so a dialog's own text field or listbox keeps its arrow keys. The role applies to `renderOverlay` only; the `items` list stays a menu. Closing the overlay — Escape, a chosen item, the close button — already returned focus to the trigger; `returnFocus={false}` now opts out. The default, `Menu`, renders exactly as before. ai-dial-chat's `UsageLimitsControl` and `AnnouncementsPopover` needed a non-menu panel. Additive.
35
+
36
+ - **`ToggleChip` (2.0)** — a chip that switches one option on and off on its own, for a row of independent toggles such as the tools a model may call. A native `<button aria-pressed>` drawn as the `TagAppearance.Selectable` filter chip — no fill until on, the accent-alpha fill and a semibold label once on — with `icon` before a `ReactNode` `label`, so a caller can add trailing ON / OFF text; `isSelected` (default `false`) and `onToggle(next)`, named as on `ToggleIconButton`; `disabled` greys it out with the 2.0 disable tokens while keeping its state visible. It has no remove control. `FilterChips` picks one value and `Tag` is a `<span>` with a string label, so neither fit. The root carries `dial-kit-toggle-chip` (`DIAL_KIT_CLASS.toggleChip`). ai-dial-chat's `ToolsChips` hand-rolled these. Additive.
37
+
38
+ - **`ProgressBar` (2.0) — `role` (`ProgressBarRole.Progressbar` / `Meter`)** — `ProgressBarRole.Meter` renders `role="meter"` for a level inside a range that never completes, such as capacity used or a quota, with the same `aria-valuemin` / `aria-valuemax` / `aria-valuenow` and the caller's `aria-valuetext`; an unlabelled meter is named `Meter` rather than `Progress`. The track and fill are unchanged, with no low / optimum / high colouring. The default, `Progressbar`, renders as before. The native `role` attribute is no longer in `ProgressBarProps`; it was always overwritten. ai-dial-chat's `ProjectCapacityMeter` hand-rolled a `role="meter"` bar. Additive.
39
+
40
+ - **`Notification` (2.0) — `surface` (`NotificationSurface.Variant` / `Neutral`)** — each variant tied one icon to one coloured surface, so a warning on the neutral sunken layer could not be built from the kit: ai-dial-chat hand-rolled its Scheduled Tasks login banner for exactly that pairing. `surface={NotificationSurface.Neutral}` draws `bg-layer-sunken` with primary text and keeps everything else the variant decides: the icon, its status colour (`text-info`, `text-success`, `text-warning-icon`, `text-error`) and the live-region role, so a neutral warning is still `role="alert"`. The wrappers forward it. The default, `Variant`, renders exactly as before. Additive.
41
+
42
+ - **Type scale — monospace steps `dial-code-semi-text`, `dial-tiny-code-text`, `dial-tiny-code-semi-text`** — code had one step, 14px / 20px normal, so a JSON key layered `font-semibold` on `dial-code-text` and inline code inside 12px copy set only the mono font family and borrowed `dial-tiny-text` for its size. `dial-code-semi-text` is 14px / 20px semibold, `dial-tiny-code-text` 12px / 16px normal and `dial-tiny-code-semi-text` 12px / 16px semibold, all on the `dial-code-text` mono stack. They join the `mergeClasses` type-scale group and the MCP typography reference. Additive.
43
+
44
+ - **`LiveRegion` (2.0) and `CaptionText` / `ErrorText` — `announce`** — `LiveRegion` is a live region that is always in the DOM, even with empty `children`, so a screen reader announces the first message put into it; a region mounted together with its text is often read late or not at all. `politeness` (`LiveRegionPoliteness.Polite`, default → `role="status"` + `aria-live="polite"`; `Assertive` → `role="alert"` + `aria-live="assertive"`), `visuallyHidden` (`sr-only`), `atomic` (`aria-atomic`) and `as` (`LiveRegionElement.Div` / `Span` / `P`). An empty, visible region takes no space through `empty:sr-only`, not `display: none`, which some screen readers drop from the accessibility tree. `announce` on `CaptionText` / `ErrorText` renders the caption inside such a region, kept mounted while `text` is empty; `id` and `className` stay on the text element, so `aria-describedby` still resolves. Without `announce` nothing changes. The root carries `dial-kit-live-region` (`DIAL_KIT_CLASS.liveRegion`). ai-dial-chat hand-wrote ~30 always-mounted `role="status"` / `role="alert"` spans after 0.16 took the alert role off `ErrorText`. Additive.
45
+
34
46
  - **`FileName` (2.0) — `icon`** — replaces the type icon with your own, for example to mark a special folder in a tree. The icon's wrapper is `aria-hidden`, the `loading` spinner still takes its place, and the shared badge (part of the type icon) is not drawn, while `sharedLabel` still announces the state. Without `icon` nothing changes.
35
47
 
36
48
  - **`Grid` (2.0) — `appearance` (`GridAppearance.Default` / `Chat`)** — `GridAppearance.Chat` draws the design's "Chat table": a borderless card with a 12px corner and the MD shadow, 12px of padding on both sides of every header and row cell, a full-width 1px line under the header, dividers between data rows that stop at the cell padding on both sides and sit on the 0.5px `stroke-tertiary` stroke, and hover and selected rows with a 12px corner and no divider. It ignores `wrapperBorder`. The root carries `dial-kit-grid-chat`. ai-dial-chat's usage and catalog tables wrapped the grid in their own card and could not inset the dividers or round the rows without restyling ag-Grid's markup. Additive.
@@ -61,6 +73,8 @@ Versions match the git tags on the `development` branch.
61
73
 
62
74
  ### Changed
63
75
 
76
+ - **`StarterButton` (2.0) — transparent at rest** — the starter pill no longer fills with `bg-control-neutral` (`#fcfcfc`) at rest: it is transparent with the 1px `border-default` stroke (`--stroke-default`, `#b2c2dd`), and fills only on hover (`bg-control-neutral-hover-muted`, `#e0e6f0`) and press (`bg-control-neutral-active`, `#d1dbea`), as the design specifies. On a surface other than the page background it now shows that surface through. Label, icons, focus ring and disabled state are unchanged.
77
+
64
78
  - **`Input`, `Select` and the other `.dial-kit-input` fields (2.0) — the focus ring is drawn inside the border** — the focus and active ring was an outline outside the field (`outline-offset-0`), so a host that wrapped a field in an `overflow: auto` or `hidden` box with no padding saw it cut off on the sides and bottom. The ring is now offset by `-1px`, so it lies over the 1px border, as the design draws it (a 1px `accent-focus` border, no outer ring), and no ancestor can clip it. An invalid field's ring does the same in the error color. Visual only; no prop changes.
65
79
 
66
80
  - **`shadow-xs` and `shadow-lg` match the design's shadow scale** — `shadow-xs` was `0 1px 4px` blue alpha-20 over a `0 1px 2px` grey layer; it is now a single `0 0 8px 1px` blue alpha-20 halo, so a pressed button glows evenly instead of dropping down. `shadow-lg` was `0 8px 44px 0`; it is now `1px 10px 25px 12px`, same blue alpha-8. `shadow-sm` and `shadow-md` already matched. `--shadow-xs-2` no longer reaches `shadow-xs` and only colours the resting shadow of solid controls (`dial-kit-control-shadow`). Visual only; no token renamed.