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

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 (32) hide show
  1. package/README.md +1 -0
  2. package/dist/CHANGELOG.md +8 -0
  3. package/dist/{JsonEditor-CFkmn69x.js → JsonEditor-DrC6i27F.js} +1 -1
  4. package/dist/{JsonEditor-CPk58Te4.cjs → JsonEditor-dP4yDdgN.cjs} +1 -1
  5. package/dist/{MarkdownEditor-ALJ17x82.js → MarkdownEditor-BeNDQecT.js} +1 -1
  6. package/dist/{MarkdownEditor-CqMQgd-3.js → MarkdownEditor-CO-k9xZo.js} +1 -1
  7. package/dist/{MarkdownEditor-Cz2HKRcy.cjs → MarkdownEditor-CSgVi6EZ.cjs} +1 -1
  8. package/dist/{MarkdownEditor-DgPlyntV.cjs → MarkdownEditor-fskBDR5e.cjs} +1 -1
  9. package/dist/components-manifest.json +157 -11
  10. package/dist/dial-ui-kit.cjs.js +1 -1
  11. package/dist/dial-ui-kit.es.js +198 -196
  12. package/dist/{index-CBaBO6e_.cjs → index-DmEajFx0.cjs} +30 -30
  13. package/dist/{index-BnqboA_3.js → index-jMP1W9V6.js} +7052 -6964
  14. package/dist/index.css +1 -1
  15. package/dist/migration-guides/0.14.0/button-tooltip-2-0.md +111 -0
  16. package/dist/migration-guides/0.14.0/select-multiselect-option-row.md +99 -0
  17. package/dist/migration-guides/README.md +2 -0
  18. package/dist/src/components/New/Button/Button.d.ts +4 -3
  19. package/dist/src/components/New/Checkbox/Checkbox.d.ts +4 -0
  20. package/dist/src/components/New/Checkbox/CheckboxBox.d.ts +30 -0
  21. package/dist/src/components/New/Dropdown/constants.d.ts +2 -0
  22. package/dist/src/components/New/IconButton/IconButton.d.ts +4 -4
  23. package/dist/src/components/New/Popup/Popup.d.ts +48 -9
  24. package/dist/src/components/New/Popup/constants.d.ts +7 -0
  25. package/dist/src/components/New/Select/constants.d.ts +2 -2
  26. package/dist/src/components/New/Tag/Tag.d.ts +15 -0
  27. package/dist/src/components/New/Tooltip/constants.d.ts +6 -1
  28. package/dist/src/components/New/constants/overlay.d.ts +12 -3
  29. package/dist/src/index.d.ts +3 -0
  30. package/dist/src/models/dropdown.d.ts +10 -0
  31. package/dist/src/types/tag.d.ts +4 -0
  32. package/package.json +1 -1
@@ -1,10 +1,12 @@
1
1
  import { FC, HTMLAttributes, MouseEvent, ReactNode } from 'react';
2
2
  import { ElementSize } from '../../../types/size';
3
+ import { TagAppearance } from '../../../types/tag';
3
4
  type NativeTagProps = Omit<HTMLAttributes<HTMLSpanElement>, 'children'>;
4
5
  export interface TagProps extends NativeTagProps {
5
6
  label: string;
6
7
  icon?: ReactNode;
7
8
  size?: ElementSize;
9
+ appearance?: TagAppearance;
8
10
  selected?: boolean;
9
11
  disabled?: boolean;
10
12
  closable?: boolean;
@@ -24,16 +26,29 @@ export interface TagProps extends NativeTagProps {
24
26
  * the caller: a clickable tag that is also closable gives a screen reader two
25
27
  * actions with no way to tell which one it landed on.
26
28
  *
29
+ * `TagAppearance.Selectable` is the filter chip of the 2.0 design: no rim and no
30
+ * fill until it is selected, one hover tint shared by both states, and the state
31
+ * carried on `aria-pressed` rather than by the tint alone. Give it an `onClick` —
32
+ * a selectable tag that cannot be activated is a colour and nothing else.
33
+ *
27
34
  * @example
28
35
  * ```tsx
29
36
  * <Tag label="TypeScript" />
30
37
  * <Tag label="TypeScript" closable onRemove={() => remove('TypeScript')} />
31
38
  * <Tag label="Drafts" selected onClick={() => toggle('Drafts')} />
39
+ * <Tag
40
+ * label="Drafts"
41
+ * appearance={TagAppearance.Selectable}
42
+ * selected={isSelected}
43
+ * onClick={() => toggle('Drafts')}
44
+ * />
32
45
  * ```
33
46
  *
34
47
  * @param label - Text content displayed inside the tag.
35
48
  * @param [icon] - Icon rendered before the label.
36
49
  * @param [size=ElementSize.Standard] - Tag height: standard is 24px, small is 20px.
50
+ * @param [appearance=TagAppearance.Outlined] - `outlined` is the bordered chip; `selectable`
51
+ * is the borderless filter chip that tints when selected.
37
52
  * @param [selected=false] - Applies the accent-tinted selected styling.
38
53
  * @param [disabled=false] - Dims the tag and suppresses the remove control and click handling.
39
54
  * @param [closable=false] - Renders the remove button. Needs `onRemove` to appear.
@@ -21,5 +21,10 @@ export declare const arrowClassName = "fill-control-inverted";
21
21
  /**
22
22
  * Tooltips sit above popups, dropdowns and the calendar (all `z-[53]`), since
23
23
  * they can be triggered by a control inside one of them.
24
+ *
25
+ * `max-w-[376px]` is the cap the design puts on a tooltip: at `dial-small-text`
26
+ * that is around 60 characters a line, past which a line stops being
27
+ * comfortable to read. Longer text wraps instead of widening the bubble. The
28
+ * width stays a literal because Tailwind only sees static class strings.
24
29
  */
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";
30
+ export declare const tooltipClassName = "z-[55] max-w-[376px] whitespace-pre-wrap break-words rounded-lg bg-control-inverted px-3 py-2 dial-small-text text-control-inverted";
@@ -17,8 +17,17 @@ export declare const overlaySubMenuClassName: string;
17
17
  * reached by keyboard, and the 1.0 versions suppressed the ring outright.
18
18
  */
19
19
  export declare const overlayItemClassName: string;
20
- /** Tint marking the row that is currently selected. */
21
- export declare const overlayItemSelectedClassName = "bg-control-accent-alpha-hover";
22
- export declare const overlayItemDisabledClassName = "text-secondary";
20
+ /**
21
+ * Tint marking the row that is currently selected, at rest: the faint step of
22
+ * the accent-alpha ramp, so hovering a selected row still has somewhere to go.
23
+ */
24
+ export declare const overlayItemSelectedClassName = "bg-control-accent-alpha";
25
+ /**
26
+ * A row that cannot be chosen. `overlayItemClassName` tints every row on hover
27
+ * and a selected row carries a tint at rest, so both have to be turned off
28
+ * again here — `mergeClasses` is tailwind-merge, so these later declarations
29
+ * win as long as the disabled classes are merged after the selected ones.
30
+ */
31
+ export declare const overlayItemDisabledClassName: string;
23
32
  /** Distance between the trigger and its panel, and between nested panels. */
24
33
  export declare const overlayGap = 4;
@@ -208,6 +208,8 @@ export { RadioGroupPopupField } from './components/New/RadioGroupPopupField/Radi
208
208
  export type { RadioGroupPopupFieldProps } from './components/New/RadioGroupPopupField/RadioGroupPopupField';
209
209
  export { Checkbox } from './components/New/Checkbox/Checkbox';
210
210
  export type { CheckboxProps } from './components/New/Checkbox/Checkbox';
211
+ export { CheckboxBox } from './components/New/Checkbox/CheckboxBox';
212
+ export type { CheckboxBoxProps } from './components/New/Checkbox/CheckboxBox';
211
213
  export { ToggleIconButton } from './components/New/ToggleIconButton/ToggleIconButton';
212
214
  export type { ToggleIconButtonProps } from './components/New/ToggleIconButton/ToggleIconButton';
213
215
  export { SegmentedControl } from './components/New/SegmentedControl/SegmentedControl';
@@ -218,6 +220,7 @@ export { FileDropzone } from './components/New/FileDropzone/FileDropzone';
218
220
  export type { FileDropzoneProps } from './components/New/FileDropzone/FileDropzone';
219
221
  export { Tag } from './components/New/Tag/Tag';
220
222
  export type { TagProps } from './components/New/Tag/Tag';
223
+ export { TagAppearance } from './types/tag';
221
224
  export { TagInput } from './components/New/TagInput/TagInput';
222
225
  export type { TagInputProps } from './components/New/TagInput/TagInput';
223
226
  export { Search } from './components/New/Search/Search';
@@ -15,6 +15,16 @@ export interface DropdownItem {
15
15
  icon?: ReactNode;
16
16
  disabled?: boolean;
17
17
  danger?: boolean;
18
+ /**
19
+ * Renders the item as a multiselect row: a checkbox box before the label, the
20
+ * accent tint while checked, and a click that leaves the menu open. The row is
21
+ * a `menuitemcheckbox` whose state lives on `aria-checked`; the box itself is
22
+ * decorative. Keep `checked` in your own state and update it from the item's
23
+ * `onClick` (or the dropdown's `onItemClick`).
24
+ */
25
+ selectable?: boolean;
26
+ /** Whether a `selectable` item is currently checked. */
27
+ checked?: boolean;
18
28
  type?: DropdownItemType;
19
29
  className?: string;
20
30
  onClick?: (info: {
@@ -0,0 +1,4 @@
1
+ export declare enum TagAppearance {
2
+ Outlined = "outlined",
3
+ Selectable = "selectable"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.14.0-dev.4",
3
+ "version": "0.14.0-dev.5",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",