@epam/ai-dial-ui-kit 0.15.0-dev.5 → 0.15.0-dev.7
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 +139 -0
- package/dist/CHANGELOG.md +10 -0
- package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-4iMidqal.cjs} +26 -26
- package/dist/DateCellRenderer-CTTAnQjB.cjs +1 -0
- package/dist/components/Dropdown/Dropdown.js +70 -65
- package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
- package/dist/components/Dropdown/constants.js +14 -12
- package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
- package/dist/components/New/Accordion/Accordion.js +39 -37
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +7 -6
- package/dist/components/New/Calendar/Calendar.js +253 -222
- package/dist/components/New/CaptionText/CaptionText.js +18 -15
- package/dist/components/New/CardShell/CardShell.js +4 -2
- package/dist/components/New/Checkbox/Checkbox.js +67 -56
- package/dist/components/New/Checkbox/CheckboxBox.js +4 -2
- package/dist/components/New/CloseButton/CloseButton.js +18 -16
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +44 -39
- package/dist/components/New/Dropdown/Dropdown.js +101 -95
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +19 -17
- package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
- package/dist/components/New/FolderPath/FolderPath.js +29 -28
- package/dist/components/New/Highlight/Highlight.js +23 -30
- package/dist/components/New/InfoButton/InfoButton.js +12 -10
- package/dist/components/New/InlineSelect/InlineSelect.js +43 -41
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +40 -38
- package/dist/components/New/Label/Label.js +13 -8
- package/dist/components/New/MenuItem/MenuItem.js +29 -27
- package/dist/components/New/MenuItem/constants.js +9 -8
- package/dist/components/New/NoDataContent/NoDataContent.js +20 -18
- package/dist/components/New/Notification/Notification.js +28 -26
- package/dist/components/New/NumberInput/NumberInput.js +42 -33
- package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
- package/dist/components/New/Popup/Popup.js +45 -43
- package/dist/components/New/Radio/Radio.js +75 -64
- package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
- package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
- package/dist/components/New/Search/Search.js +28 -26
- package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
- package/dist/components/New/Select/Select.js +120 -109
- package/dist/components/New/Switch/Switch.js +69 -58
- package/dist/components/New/Tabs/Tabs.js +28 -22
- package/dist/components/New/Tag/Tag.js +42 -40
- package/dist/components/New/TagInput/TagInput.js +44 -42
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +25 -23
- package/dist/components/New/Tooltip/TooltipContent.js +10 -8
- package/dist/components/ProgressBar/ProgressBar.js +45 -33
- package/dist/components/Skeleton/Skeleton.js +25 -19
- package/dist/components/Spinner/Spinner.js +6 -4
- package/dist/components-manifest.json +7 -2
- package/dist/constants/public-class-names.js +152 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +203 -201
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/src/constants/public-class-names.d.ts +143 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/use-file-manager-tabs-DKmWaOlC.cjs +3 -0
- package/package.json +1 -1
- package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
- package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ The AI DIAL UI Kit is an production-ready React component library designed to st
|
|
|
26
26
|
- [Development Setup](#development-setup)
|
|
27
27
|
- [Project Structure](#project-structure)
|
|
28
28
|
- [🎨 Theming & Customization](#-theming--customization)
|
|
29
|
+
- [Public class names](#public-class-names)
|
|
29
30
|
- [♿ Accessibility](#-accessibility)
|
|
30
31
|
- [Naming icon-only controls](#naming-icon-only-controls)
|
|
31
32
|
- [Target size (WCAG 2.5.5, Level AAA)](#target-size-wcag-255-level-aaa)
|
|
@@ -192,6 +193,144 @@ These are defaults, not overrides: a `rounded-*` utility passed to a single
|
|
|
192
193
|
control through `className` still wins, because a consumer's utilities are
|
|
193
194
|
emitted after this package's stylesheet.
|
|
194
195
|
|
|
196
|
+
### Public class names
|
|
197
|
+
|
|
198
|
+
Some hosts need to restyle a part of a component the props do not reach — the
|
|
199
|
+
padding of a menu's row list, the radius of a row, the caret badge of an icon
|
|
200
|
+
trigger. The kit's own classes are Tailwind utilities and hashed module locals,
|
|
201
|
+
so a host that reaches for them ends up on selectors that break on the next
|
|
202
|
+
upgrade: `[class*='_selectedItem_']`, `> div:nth-child(2) > button`,
|
|
203
|
+
`[role='none'][aria-label='dropdown']` — the last of which is an accessibility
|
|
204
|
+
contract and, being a plain English string, is not one a localised host can rely
|
|
205
|
+
on either.
|
|
206
|
+
|
|
207
|
+
Every design-system 2.0 component therefore stamps a stable class on the element
|
|
208
|
+
that draws it. They are exported as one record:
|
|
209
|
+
|
|
210
|
+
```tsx
|
|
211
|
+
import { DIAL_KIT_CLASS } from '@epam/ai-dial-ui-kit';
|
|
212
|
+
|
|
213
|
+
DIAL_KIT_CLASS.menuItem; // 'dial-kit-menuitem'
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
```css
|
|
217
|
+
.dial-kit-dropdown-list {
|
|
218
|
+
padding-block: 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.dial-kit-menuitem {
|
|
222
|
+
border-radius: 8px;
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Nothing in `dist/index.css` selects on them: they carry no declarations of their
|
|
227
|
+
own and exist only as selectors, so a host's rule needs no `!important` it would
|
|
228
|
+
not otherwise need. Renaming one, or moving it to a different element, is a
|
|
229
|
+
breaking change and goes through the migration-guide process.
|
|
230
|
+
|
|
231
|
+
#### Feedback and status
|
|
232
|
+
|
|
233
|
+
| Key | Class | Element |
|
|
234
|
+
| --------------- | ------------------------- | ---------------------------------------------------------------------------------------- |
|
|
235
|
+
| `spinner` | `dial-kit-spinner` | The `role="status"` root of a `Spinner` |
|
|
236
|
+
| `progressBar` | `dial-kit-progress-bar` | The outermost element of a `ProgressBar` — its wrapper, or the track when it has neither label nor readout |
|
|
237
|
+
| `skeleton` | `dial-kit-skeleton` | The root of a `Skeleton` |
|
|
238
|
+
| `notification` | `dial-kit-notification` | The `Notification` surface, including every toast and section-message wrapper |
|
|
239
|
+
| `noDataContent` | `dial-kit-no-data-content` | The empty-state root of `NoDataContent` |
|
|
240
|
+
|
|
241
|
+
#### Text
|
|
242
|
+
|
|
243
|
+
| Key | Class | Element |
|
|
244
|
+
| --------------- | ------------------------- | ------------------------------------------------------------------- |
|
|
245
|
+
| `highlight` | `dial-kit-highlight` | The text element of a `Highlight` |
|
|
246
|
+
| `captionText` | `dial-kit-caption-text` | The caption line under a field |
|
|
247
|
+
| `errorText` | `dial-kit-error-text` | A caption in its error variant, additive to `captionText` |
|
|
248
|
+
| `label` | `dial-kit-label` | The `Label` root, wrapping its `label` element and its info button |
|
|
249
|
+
|
|
250
|
+
#### Containers
|
|
251
|
+
|
|
252
|
+
| Key | Class | Element |
|
|
253
|
+
| -------------------- | --------------------------------- | -------------------------------------------------------------------- |
|
|
254
|
+
| `cardShell` | `dial-kit-card-shell` | The `article` element of a `CardShell` |
|
|
255
|
+
| `collapsibleSidebar` | `dial-kit-collapsible-sidebar` | The `aside` element of a `CollapsibleSidebar` |
|
|
256
|
+
| `resizableContainer` | `dial-kit-resizable-container` | The content box inside a `ResizableContainer`'s resize frame |
|
|
257
|
+
| `popup` | `dial-kit-popup` | The `role="dialog"` panel of a `Popup` |
|
|
258
|
+
| `confirmationPopup` | `dial-kit-confirmation-popup` | A `ConfirmationPopup`'s panel, additive to `popup` |
|
|
259
|
+
| `accordion` | `dial-kit-accordion` | The root of an `Accordion` |
|
|
260
|
+
| `folderPath` | `dial-kit-folder-path` | The breadcrumb root of a `FolderPath` |
|
|
261
|
+
|
|
262
|
+
#### Menus and overlays
|
|
263
|
+
|
|
264
|
+
| Key | Class | Element |
|
|
265
|
+
| ------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
266
|
+
| `dropdown` | `dial-kit-dropdown` | The trigger wrapper of a `Dropdown` |
|
|
267
|
+
| `dropdownList` | `dial-kit-dropdown-list` | The `role="none"` item list inside a dropdown overlay, and a submenu's own list. Both generations |
|
|
268
|
+
| `menuItem` | `dial-kit-menuitem` | One overlay row: a dropdown item, a `Select` option, a submenu trigger or child |
|
|
269
|
+
| `menuItemCheck` | `dial-kit-menuitem-check` | The trailing check of a chosen `MenuItemMark.Check` row |
|
|
270
|
+
| `dropdownIcon` | `dial-kit-dropdown-icon` | The primary icon of a `DialDropdownIcon` trigger |
|
|
271
|
+
| `dropdownIconCaret` | `dial-kit-dropdown-icon-caret` | Its caret badge. Absent when `showCaret` is `false` |
|
|
272
|
+
| `tooltip` | `dial-kit-tooltip` | The bubble of a `Tooltip` |
|
|
273
|
+
| `interactiveTooltip` | `dial-kit-interactive-tooltip` | The panel of an `InteractiveTooltip` |
|
|
274
|
+
| `ellipsisTooltip` | `dial-kit-ellipsis-tooltip` | The text element of an `EllipsisTooltip`, which is also its trigger |
|
|
275
|
+
|
|
276
|
+
#### Fields
|
|
277
|
+
|
|
278
|
+
| Key | Class | Element |
|
|
279
|
+
| ---------------------- | ------------------------------------- | -------------------------------------------------------------- |
|
|
280
|
+
| `search` | `dial-kit-search` | The `Search` field box, additive to `dial-kit-input` |
|
|
281
|
+
| `passwordInput` | `dial-kit-password-input` | The `PasswordInput` field box, additive to `dial-kit-input` |
|
|
282
|
+
| `numberInput` | `dial-kit-number-input` | The `NumberInput` field box, additive to `dial-kit-input` |
|
|
283
|
+
| `tagInput` | `dial-kit-tag-input` | The `TagInput` field box, additive to `dial-kit-input` |
|
|
284
|
+
| `select` | `dial-kit-select` | The root of a `Select` |
|
|
285
|
+
| `inlineSelect` | `dial-kit-inline-select` | The trigger button of an `InlineSelect` |
|
|
286
|
+
| `calendar` | `dial-kit-calendar` | The root of a `Calendar`, in every mode |
|
|
287
|
+
| `fileDropzone` | `dial-kit-file-dropzone` | The drop area of a `FileDropzone` |
|
|
288
|
+
| `radioGroupPopupField` | `dial-kit-radio-group-popup-field` | The root of a `RadioGroupPopupField` |
|
|
289
|
+
|
|
290
|
+
#### Controls
|
|
291
|
+
|
|
292
|
+
| Key | Class | Element |
|
|
293
|
+
| ---------------------- | ------------------------------------- | ---------------------------------------------------------- |
|
|
294
|
+
| `switch` | `dial-kit-switch` | The row of a `Switch`: the control and its label |
|
|
295
|
+
| `checkbox` | `dial-kit-checkbox` | The row of a `Checkbox` |
|
|
296
|
+
| `checkboxBox` | `dial-kit-checkbox-box` | The decorative box a `CheckboxBox` draws |
|
|
297
|
+
| `radio` | `dial-kit-radio` | The row of a `Radio` |
|
|
298
|
+
| `radioGroup` | `dial-kit-radio-group` | The root of a `RadioGroup` |
|
|
299
|
+
| `segmentedControl` | `dial-kit-segmented-control` | The `role="radiogroup"` track of a `SegmentedControl` |
|
|
300
|
+
| `segmentedControlItem` | `dial-kit-segmented-control-item` | One segment of it |
|
|
301
|
+
| `tabs` | `dial-kit-tabs` | The `role="tablist"` root of `Tabs` |
|
|
302
|
+
| `tab` | `dial-kit-tab` | One tab inside it |
|
|
303
|
+
| `tag` | `dial-kit-tag` | A `Tag` pill, including a `TagInput`'s rows |
|
|
304
|
+
| `toggleIconButton` | `dial-kit-toggle-icon-button` | A `ToggleIconButton`, additive to `dial-kit-base-icon-button` |
|
|
305
|
+
| `closeButton` | `dial-kit-close-button` | A `CloseButton`, additive to `dial-kit-base-icon-button` |
|
|
306
|
+
| `infoButton` | `dial-kit-info-button` | An `InfoButton`, additive to `dial-kit-base-icon-button` |
|
|
307
|
+
| `buttonDropdown` | `dial-kit-button-dropdown` | The wrapper of a `ButtonDropdown` |
|
|
308
|
+
|
|
309
|
+
#### Components with no entry, and why
|
|
310
|
+
|
|
311
|
+
Some 2.0 components are deliberately absent, because the element a host would
|
|
312
|
+
target already carries a stable class:
|
|
313
|
+
|
|
314
|
+
| Component | Target it already |
|
|
315
|
+
| --------------------------------------------- | ----------------- |
|
|
316
|
+
| `Button` and its six variant wrappers | `dial-kit-base-button` (plus a per-variant class such as `dial-kit-primary-solid-button`) |
|
|
317
|
+
| `IconButton` and its five variant wrappers | `dial-kit-base-icon-button` |
|
|
318
|
+
| `FabButton` | `dial-kit-fab-button` |
|
|
319
|
+
| `Input` | `dial-kit-input` |
|
|
320
|
+
| `Textarea` | `dial-kit-textarea` |
|
|
321
|
+
| `Slider` | `dial-kit-slider` |
|
|
322
|
+
| `MarkdownEditor` | `dial-kit-markdown-editor` |
|
|
323
|
+
| `Grid` | `dial-kit-grid` (exported as `GRID_ROOT_CLASS`) |
|
|
324
|
+
|
|
325
|
+
Four more contribute no element of their own, and are addressed through what
|
|
326
|
+
they render: `ThemeScope` (a `display: contents` wrapper), `MultiSelectTags`
|
|
327
|
+
(`Tag`s), and `TooltipContainer` / `TooltipTrigger`.
|
|
328
|
+
|
|
329
|
+
Two neighbouring elements are reached through props instead, and keep being: a
|
|
330
|
+
`Dropdown`'s floating panel takes `listClassName`, a `Popup`'s backdrop takes
|
|
331
|
+
`overlayClassName`, and the `DialDropdownIcon` trigger button takes
|
|
332
|
+
`buttonClassName`.
|
|
333
|
+
|
|
195
334
|
## ♿ Accessibility
|
|
196
335
|
|
|
197
336
|
### Naming icon-only controls
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ Versions match the git tags on the `development` branch.
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.15.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Public class names on every design-system 2.0 component** — a host embedding the kit had no honest selector for the parts of a component its props do not reach: the kit's own classes are Tailwind utilities and hashed module locals, so hosts were left on `[class*='_selectedItem_']`, `> div:nth-child(2) > button` and `[role='none'][aria-label='dropdown']` — the last an accessibility contract, and a plain English string a localised host cannot rely on. Every 2.0 component now stamps a stable class on the element that draws it, exported as one record: `DIAL_KIT_CLASS.menuItem` is `'dial-kit-menuitem'`, and so on for 48 elements across the feedback components (`Spinner`, `ProgressBar`, `Skeleton`, `Notification`, `NoDataContent`), the text components (`Highlight`, `CaptionText`/`ErrorText`, `Label`), the containers (`CardShell`, `CollapsibleSidebar`, `ResizableContainer`, `Popup`, `ConfirmationPopup`, `Accordion`, `FolderPath`), the menus and overlays (`Dropdown` and its item list, rows and chosen-row check, `DialDropdownIcon`'s icon and caret badge, `Tooltip`, `InteractiveTooltip`, `EllipsisTooltip`), the fields (`Search`, `PasswordInput`, `NumberInput`, `TagInput`, `Select`, `InlineSelect`, `Calendar`, `FileDropzone`, `RadioGroupPopupField`) and the controls (`Switch`, `Checkbox`, `CheckboxBox`, `Radio`, `RadioGroup`, `SegmentedControl` and its segments, `Tabs` and its tabs, `Tag`, `ToggleIconButton`, `CloseButton`, `InfoButton`, `ButtonDropdown`). `dial-kit-dropdown-list` and `dial-kit-menuitem` are on the 1.0 dropdown family too, since `DialDropdownIcon` opens one.
|
|
15
|
+
|
|
16
|
+
Nothing in `dist/index.css` selects on any of them — they carry no declarations and exist only as selectors, so this is not a visual change and a host rule needs no `!important` it would not otherwise need. A row's class sits on the element that draws the row box, which is the wrapper rather than the inner button for a `MenuItem` with a `rightControl`; a `ProgressBar` with neither label nor readout returns its track as its own root, and the class follows it there. Components whose target element already carries a stable `dial-kit-*` class have no entry, because a second name for one thing is worse than none: `Button` and `IconButton` with their variant wrappers, `FabButton`, `Input`, `Textarea`, `Slider`, `MarkdownEditor` and `Grid`. A `Dropdown`'s floating panel, a `Popup`'s backdrop and the `DialDropdownIcon` trigger button keep being reached through `listClassName`, `overlayClassName` and `buttonClassName`. See the README for the full table. Requested in [ai-dial-chat#8707](https://github.com/epam/ai-dial-chat/issues/8707), the counterpart of the `dial-*` classes that issue adds to the chat libraries.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
10
20
|
## [0.14.0]
|
|
11
21
|
|
|
12
22
|
### Breaking Changes
|