@epam/ai-dial-ui-kit 0.13.0-dev.59 → 0.13.0-dev.60
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/dist/CHANGELOG.md +6 -0
- package/dist/{JsonEditor-CV2FUqAs.js → JsonEditor-B5vfpxzh.js} +1 -1
- package/dist/{JsonEditor-DPQ_6Rk7.cjs → JsonEditor-CjemqUZ2.cjs} +1 -1
- package/dist/{MarkdownEditor-BEjYBI-4.cjs → MarkdownEditor-BrUvRwsB.cjs} +1 -1
- package/dist/{MarkdownEditor-DT_WX1cP.js → MarkdownEditor-DKG9YlGS.js} +1 -1
- package/dist/{MarkdownEditor-CfnRGBST.js → MarkdownEditor-DWcVxbdX.js} +15 -15
- package/dist/{MarkdownEditor-BpG28sAL.cjs → MarkdownEditor-xg-rmepY.cjs} +1 -1
- package/dist/components-manifest.json +63 -66
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +126 -127
- package/dist/{index-qU5tP4t0.js → index-B4fgly61.js} +6103 -6094
- package/dist/{index-EGRzQwVW.cjs → index-CY5qji3j.cjs} +27 -27
- package/dist/index.css +2 -2
- package/dist/migration-guides/0.13.0/field-label-props-unification.md +94 -0
- package/dist/migration-guides/0.13.0/progress-bar-2-0-rewrite.md +103 -0
- package/dist/migration-guides/README.md +2 -0
- package/dist/src/components/New/Calendar/Calendar.d.ts +4 -2
- package/dist/src/components/New/FileDropzone/FileDropzone.d.ts +9 -0
- package/dist/src/components/New/MarkdownEditor/constants.d.ts +6 -1
- package/dist/src/components/New/Popup/Popup.d.ts +1 -1
- package/dist/src/components/New/Switch/Switch.d.ts +11 -5
- package/dist/src/components/Popup/Popup.d.ts +1 -1
- package/dist/src/components/ProgressBar/ProgressBar.d.ts +49 -11
- package/dist/src/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -67,6 +67,6 @@ export interface PopupProps {
|
|
|
67
67
|
* @param [hideClose=false] - Whether the close button is hidden in the header
|
|
68
68
|
* @param [closeAriaLabel="Close dialog"] - Accessible name of the close button
|
|
69
69
|
* @param [closeOnOutsideClick=true] - Whether the popup closes when clicking outside
|
|
70
|
-
* @param [preventKeyboardOnOpen=false] - When true, initial focus goes to a non-input guard to avoid opening the virtual keyboard on mobile
|
|
70
|
+
* @param [preventKeyboardOnOpen=false] - When true, initial focus goes to a non-input guard to avoid opening the virtual keyboard on mobile. Redundant since the default focuses the dialog container, which never raises the keyboard; kept for compatibility
|
|
71
71
|
*/
|
|
72
72
|
export declare const Popup: FC<PopupProps>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { FC, InputHTMLAttributes
|
|
1
|
+
import { FC, InputHTMLAttributes } from 'react';
|
|
2
|
+
import { LabelProps } from '../Label/Label';
|
|
2
3
|
type NativeInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange' | 'size'>;
|
|
3
4
|
export interface SwitchProps extends NativeInputProps {
|
|
4
|
-
|
|
5
|
+
labelProps?: LabelProps;
|
|
5
6
|
isOn?: boolean;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
onChange?: (value: boolean) => void;
|
|
@@ -16,17 +17,22 @@ export interface SwitchProps extends NativeInputProps {
|
|
|
16
17
|
* ```tsx
|
|
17
18
|
* <Switch
|
|
18
19
|
* id="notifications"
|
|
19
|
-
* label
|
|
20
|
+
* labelProps={{ label: 'Active' }}
|
|
20
21
|
* isOn={isActive}
|
|
21
22
|
* onChange={setIsActive}
|
|
22
23
|
* />
|
|
23
24
|
* ```
|
|
24
25
|
*
|
|
25
|
-
*
|
|
26
|
+
* The track and the label text are two sibling `<label for>` elements rather
|
|
27
|
+
* than one wrapper, so the {@link Label} keeps its own `required` marker and
|
|
28
|
+
* `caption` info button — a button nested in a label forwards its clicks to the
|
|
29
|
+
* labelled control. Clicking either one still toggles the switch.
|
|
30
|
+
*
|
|
31
|
+
* @param [labelProps] - Props of the {@link Label} rendered next to the control
|
|
26
32
|
* @param [isOn=false] - The current value of the switch
|
|
27
33
|
* @param [disabled=false] - Whether the switch is disabled
|
|
28
34
|
* @param [onChange] - Callback fired with the new value when toggled
|
|
29
|
-
* @param [caption] - Caption text rendered below the label
|
|
35
|
+
* @param [caption] - Caption text rendered below the label, and described by the switch
|
|
30
36
|
*/
|
|
31
37
|
export declare const Switch: FC<SwitchProps>;
|
|
32
38
|
export {};
|
|
@@ -59,6 +59,6 @@ export interface DialPopupProps {
|
|
|
59
59
|
* @param [size=PopupSize.Md] - Sets the max-width of the popup
|
|
60
60
|
* @param [hideClose=false] Whether the close button is hidden in the header (default: false)
|
|
61
61
|
* @param [closeOnOutsideClick=true] - Whether the popup closes when clicking outside (default: true)
|
|
62
|
-
* @param [preventKeyboardOnOpen=false] - When true, initial focus goes to a non-input guard to avoid opening the virtual keyboard on mobile
|
|
62
|
+
* @param [preventKeyboardOnOpen=false] - When true, initial focus goes to a non-input guard to avoid opening the virtual keyboard on mobile. Redundant since the default focuses the dialog container, which never raises the keyboard; kept for compatibility
|
|
63
63
|
*/
|
|
64
64
|
export declare const DialPopup: FC<DialPopupProps>;
|
|
@@ -1,16 +1,54 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export interface DialProgressBarProps {
|
|
1
|
+
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { LabelProps } from '../New/Label/Label';
|
|
3
|
+
import { ElementSize } from '../../types/size';
|
|
4
|
+
type NativeProgressBarProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
5
|
+
export interface ProgressBarProps extends NativeProgressBarProps {
|
|
7
6
|
value: number;
|
|
8
7
|
max?: number;
|
|
9
|
-
size?:
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
size?: ElementSize;
|
|
9
|
+
labelProps?: LabelProps;
|
|
10
|
+
valueLabel?: ReactNode;
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
|
-
*
|
|
13
|
+
* A horizontal bar indicating progress toward a goal.
|
|
14
|
+
* aliases: Progress|LoadingBar|Meter
|
|
15
|
+
* Design system 2.0
|
|
16
|
+
*
|
|
17
|
+
* Names itself from `labelProps.label` through `aria-labelledby`; without one it
|
|
18
|
+
* falls back to `aria-label`, and finally to `Progress` so the bar is never
|
|
19
|
+
* anonymous. Prefer a real label — several bars all announcing "Progress" tell a
|
|
20
|
+
* screen reader user nothing about which is which.
|
|
21
|
+
*
|
|
22
|
+
* Screen readers derive the announced percentage from the value and `max`. When
|
|
23
|
+
* the raw numbers are more useful than a percentage, pass `aria-valuetext`
|
|
24
|
+
* (e.g. `"3 of 10 files"`); it goes straight through to the element.
|
|
25
|
+
*
|
|
26
|
+
* `valueLabel` renders a readout at the end of the label row. Formatting stays
|
|
27
|
+
* with the caller — the bar has no way to know how many decimals or which unit
|
|
28
|
+
* a given quantity deserves. It does not name the bar, so pair it with a
|
|
29
|
+
* matching `aria-valuetext` to have the same reading announced.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <ProgressBar value={40} labelProps={{ label: 'Uploading' }} />
|
|
34
|
+
* <ProgressBar value={3} max={10} aria-valuetext="3 of 10 files" />
|
|
35
|
+
* <ProgressBar value={80} size={ElementSize.Small} />
|
|
36
|
+
*
|
|
37
|
+
* <ProgressBar
|
|
38
|
+
* value={3.313182}
|
|
39
|
+
* max={500}
|
|
40
|
+
* labelProps={{ label: 'Cost per month', caption: 'Billed monthly' }}
|
|
41
|
+
* valueLabel="3.31 / 500"
|
|
42
|
+
* aria-valuetext="3.31 of 500"
|
|
43
|
+
* />
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @param value - Current progress. Clamped into `0…max`.
|
|
47
|
+
* @param [max=100] - Value that counts as complete.
|
|
48
|
+
* @param [size=ElementSize.Standard] - Bar height: standard is 8px, small is 4px.
|
|
49
|
+
* @param [labelProps] - Props of the {@link Label} rendered above the bar, which also names it.
|
|
50
|
+
* @param [valueLabel] - Readout rendered at the end of the label row.
|
|
51
|
+
* @param [className] - Additional classes on the track element.
|
|
15
52
|
*/
|
|
16
|
-
export declare const
|
|
53
|
+
export declare const ProgressBar: FC<ProgressBarProps>;
|
|
54
|
+
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -21,8 +21,8 @@ export type { DialNotificationProps } from './components/Notification/Notificati
|
|
|
21
21
|
export { DialLoader } from './components/Loader/Loader';
|
|
22
22
|
export { Spinner } from './components/Spinner/Spinner';
|
|
23
23
|
export type { SpinnerProps } from './components/Spinner/Spinner';
|
|
24
|
-
export {
|
|
25
|
-
export type {
|
|
24
|
+
export { ProgressBar } from './components/ProgressBar/ProgressBar';
|
|
25
|
+
export type { ProgressBarProps } from './components/ProgressBar/ProgressBar';
|
|
26
26
|
export { DialPagination } from './components/Pagination/Pagination';
|
|
27
27
|
export type { DialPaginationProps } from './components/Pagination/Pagination';
|
|
28
28
|
export { DialCheckbox } from './components/Checkbox/Checkbox';
|