@epam/ai-dial-ui-kit 0.2.0-rc.2 → 0.2.0-rc.21

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 (43) hide show
  1. package/dist/dial-ui-kit.cjs.js +1 -1
  2. package/dist/dial-ui-kit.es.js +896 -310
  3. package/dist/index.css +2 -2
  4. package/dist/src/components/Alert/Alert.d.ts +6 -6
  5. package/dist/src/components/Alert/constants.d.ts +1 -1
  6. package/dist/src/components/Button/Button.d.ts +5 -2
  7. package/dist/src/components/Button/constants.d.ts +2 -0
  8. package/dist/src/components/Checkbox/Checkbox.d.ts +33 -0
  9. package/dist/src/components/CloseButton/CloseButton.d.ts +26 -0
  10. package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +53 -0
  11. package/dist/src/components/ConfirmationPopup/constants.d.ts +11 -0
  12. package/dist/src/components/Input/Input.d.ts +4 -4
  13. package/dist/src/components/InputField/InputField.d.ts +4 -4
  14. package/dist/src/components/Loader/Loader.d.ts +32 -0
  15. package/dist/src/components/Loader/constants.d.ts +2 -0
  16. package/dist/src/components/NoDataContent/NoDataContent.d.ts +22 -0
  17. package/dist/src/components/PasswordInput/Icons/HideIcon.d.ts +16 -0
  18. package/dist/src/components/PasswordInput/Icons/ShowIcon.d.ts +16 -0
  19. package/dist/src/components/PasswordInput/PasswordInput.d.ts +24 -0
  20. package/dist/src/components/PasswordInput/PasswordInputField.d.ts +29 -0
  21. package/dist/src/components/Popup/Popup.d.ts +52 -0
  22. package/dist/src/components/Popup/constants.d.ts +6 -0
  23. package/dist/src/components/RadioButton/RadioButton.d.ts +46 -0
  24. package/dist/src/components/RadioGroup/RadioGroup.d.ts +51 -0
  25. package/dist/src/components/RadioGroup/constants.d.ts +5 -0
  26. package/dist/src/components/Search/Search.d.ts +42 -0
  27. package/dist/src/components/Search/constants.d.ts +14 -0
  28. package/dist/src/components/Steps/Step.d.ts +9 -0
  29. package/dist/src/components/Steps/Steps.d.ts +24 -0
  30. package/dist/src/components/Steps/tests/Steps.test.d.ts +1 -0
  31. package/dist/src/components/Steps/utils.d.ts +3 -0
  32. package/dist/src/components/Switch/Switch.d.ts +1 -1
  33. package/dist/src/components/TextAreaField/TextAreaField.d.ts +2 -2
  34. package/dist/src/constants/icon.d.ts +5 -0
  35. package/dist/src/index.d.ts +19 -1
  36. package/dist/src/models/field-control-props.d.ts +2 -2
  37. package/dist/src/models/step.d.ts +9 -0
  38. package/dist/src/types/button.d.ts +6 -0
  39. package/dist/src/types/confirmation-popup.d.ts +4 -0
  40. package/dist/src/types/popup.d.ts +5 -0
  41. package/dist/src/types/radio-group.d.ts +4 -0
  42. package/dist/src/types/search.d.ts +4 -0
  43. package/package.json +1 -1
@@ -0,0 +1,42 @@
1
+ import { FC } from 'react';
2
+ import { SearchSize } from '../../types/search';
3
+ export interface DialSearchProps {
4
+ elementId: string;
5
+ value?: string | number | null;
6
+ placeholder?: string;
7
+ disabled?: boolean;
8
+ readonly?: boolean;
9
+ invalid?: boolean;
10
+ cssClass?: string;
11
+ containerCssClass?: string;
12
+ onChange?: (value: string) => void;
13
+ size?: SearchSize;
14
+ }
15
+ /**
16
+ * A search input component with a customizable placeholder, icons, flexible props, and the ability
17
+ * to clear the input value via a clear button. Supports multiple sizes for flexible layouts.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <DialSearch
22
+ * elementId="search"
23
+ * value={query}
24
+ * placeholder="Search"
25
+ * size={SearchSize.Small}
26
+ * onChange={(value) => setQuery(value)}
27
+ * disabled={false}
28
+ * />
29
+ * ```
30
+ *
31
+ * @param elementId - Unique identifier for the input element
32
+ * @param [value] - The current value of the input
33
+ * @param [placeholder] - Placeholder text shown when input is empty
34
+ * @param [disabled=false] - Whether the input is disabled
35
+ * @param [readonly=false] - Whether the input is read-only (non-editable)
36
+ * @param [invalid=false] - Whether the input should be styled as invalid
37
+ * @param [cssClass] - Additional CSS classes applied to the input element
38
+ * @param [containerCssClass] - Additional CSS classes applied to the container
39
+ * @param [onChange] - Callback fired when the input value changes
40
+ * @param [size=SearchSize.Base] - The size of the search input. Uses the {@link SearchSize} enum.
41
+ */
42
+ export declare const DialSearch: FC<DialSearchProps>;
@@ -0,0 +1,14 @@
1
+ export declare const SIZE_CONFIG: {
2
+ small: {
3
+ textClass: string;
4
+ containerClass: string;
5
+ iconSize: number;
6
+ iconStroke: number;
7
+ };
8
+ base: {
9
+ textClass: string;
10
+ containerClass: string;
11
+ iconSize: number;
12
+ iconStroke: number;
13
+ };
14
+ };
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { Step } from '../../models/step';
3
+ export interface DialStepProps {
4
+ step: Step;
5
+ index: number;
6
+ currentStep: string;
7
+ onChangeStep: (step: string) => void;
8
+ }
9
+ export declare const DialStep: FC<DialStepProps>;
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+ import { Step } from '../../models/step';
3
+ export interface DialStepsProps {
4
+ steps: Step[];
5
+ currentStep: string;
6
+ onChangeStep: (step: string) => void;
7
+ }
8
+ /**
9
+ * Props for the DialSteps component, which renders a multi-step navigation UI.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * <DialSteps
14
+ * steps={[{ id: 'step1', label: 'Step 1', status: StepStatus.VALID }, { id: 'step2', label: 'Step 2', status: StepStatus.ERROR }]}
15
+ * currentStep="step1"
16
+ * onChangeStep={(step) => console.log(step)}
17
+ * />
18
+ * ```
19
+ *
20
+ * @param steps - Array of step objects to display
21
+ * @param currentStep - The id of the currently active step
22
+ * @param onChangeStep - Callback to set the current step by id
23
+ */
24
+ export declare const DialSteps: FC<DialStepsProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Step } from '../../models/step';
2
+ export declare const getStepClass: (step: Step, currentStepId: string) => "border-accent-secondary text-primary" | "border-red-900 text-primary" | "border-accent-primary text-primary" | "border-primary text-white" | "border-red-900 text-error" | "border-primary text-secondary";
3
+ export declare const getCircleClass: (step: Step, currentStepId: string) => "bg-accent-secondary" | "bg-red-400" | "bg-accent-primary" | "bg-layer-4";
@@ -7,7 +7,7 @@ export interface DialSwitchProps {
7
7
  onChange?: (value: boolean) => void;
8
8
  }
9
9
  /**
10
- * A flexible input component with icon support and various styling options
10
+ * A Switch component with various styling options
11
11
  *
12
12
  * @example
13
13
  * ```tsx
@@ -30,8 +30,8 @@ export interface DialTextAreaFieldProps extends DialInputFieldBaseProps {
30
30
  * @param [disabled=false] - Whether the input is disabled and cannot be interacted with
31
31
  * @param [invalid=false] - Whether the input has validation errors (applies error styling)
32
32
  * @param [defaultEmptyText="None"] - Text to display when readonly and value is empty
33
- * @param [iconBeforeInput] - Icon or element to display before the input
34
- * @param [iconAfterInput] - Icon or element to display after the input
33
+ * @param [iconBefore] - Icon or element to display before the input
34
+ * @param [iconAfter] - Icon or element to display after the input
35
35
  * @param [textBeforeInput] - Text to display before the input
36
36
  * @param [elementContainerCssClass] - Additional CSS classes to apply to the input container
37
37
  * @param [containerCssClass] - Additional CSS classes to apply to the outer container
@@ -0,0 +1,5 @@
1
+ export declare const BASE_ICON_SIZE = 18;
2
+ export declare const BASE_ICON_PROPS: {
3
+ size: number;
4
+ stroke: number;
5
+ };
@@ -1,13 +1,31 @@
1
- export { DialButton } from './components/Button/Button';
2
1
  export { DialErrorText } from './components/ErrorText/ErrorText';
3
2
  export { DialFieldLabel } from './components/Field/Field';
4
3
  export { DialIcon } from './components/Icon/Icon';
5
4
  export { DialAlert } from './components/Alert/Alert';
5
+ export { DialLoader } from './components/Loader/Loader';
6
+ export { DialCheckbox } from './components/Checkbox/Checkbox';
7
+ export { DialSteps } from './components/Steps/Steps';
8
+ export { DialRadioButton } from './components/RadioButton/RadioButton';
9
+ export { DialRadioGroup } from './components/RadioGroup/RadioGroup';
10
+ export { DialNoDataContent } from './components/NoDataContent/NoDataContent';
11
+ export { DialButton } from './components/Button/Button';
12
+ export { DialCloseButton } from './components/CloseButton/CloseButton';
6
13
  export { DialTextarea } from './components/Textarea/Textarea';
7
14
  export { DialTextAreaField } from './components/TextAreaField/TextAreaField';
8
15
  export { DialTooltip } from './components/Tooltip/Tooltip';
9
16
  export { DialSwitch } from './components/Switch/Switch';
17
+ export { DialPopup } from './components/Popup/Popup';
18
+ export { DialConfirmationPopup } from './components/ConfirmationPopup/ConfirmationPopup';
10
19
  export { DialInput } from './components/Input/Input';
11
20
  export { DialNumberInputField } from './components/InputField/InputField';
12
21
  export { DialTextInputField } from './components/InputField/InputField';
22
+ export { DialPasswordInputField } from './components/PasswordInput/PasswordInputField';
23
+ export { DialPasswordInput } from './components/PasswordInput/PasswordInput';
24
+ export { DialSearch } from './components/Search/Search';
13
25
  export { AlertVariant } from './types/alert';
26
+ export { ButtonVariant } from './types/button';
27
+ export { RadioGroupOrientation } from './types/radio-group';
28
+ export { PopupSize } from './types/popup';
29
+ export { ConfirmationPopupVariant } from './types/confirmation-popup';
30
+ export { StepStatus } from './models/step';
31
+ export type { Step } from './models/step';
@@ -10,8 +10,8 @@ export interface InputBaseProps {
10
10
  disabled?: boolean;
11
11
  readonly?: boolean;
12
12
  invalid?: boolean;
13
- iconAfterInput?: ReactNode;
14
- iconBeforeInput?: ReactNode;
13
+ iconAfter?: ReactNode;
14
+ iconBefore?: ReactNode;
15
15
  min?: number;
16
16
  max?: number;
17
17
  textBeforeInput?: string;
@@ -0,0 +1,9 @@
1
+ export interface Step {
2
+ id: string;
3
+ name: string;
4
+ status?: StepStatus;
5
+ }
6
+ export declare enum StepStatus {
7
+ VALID = "valid",
8
+ ERROR = "error"
9
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum ButtonVariant {
2
+ Primary = "primary",
3
+ Secondary = "secondary",
4
+ Tertiary = "tertiary",
5
+ Danger = "danger"
6
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ConfirmationPopupVariant {
2
+ Info = "info",
3
+ Danger = "danger"
4
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum PopupSize {
2
+ Sm = "sm",
3
+ Md = "md",
4
+ Lg = "lg"
5
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum RadioGroupOrientation {
2
+ Row = "Row",
3
+ Column = "Column"
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum SearchSize {
2
+ Small = "small",
3
+ Base = "base"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.2.0-rc.2",
3
+ "version": "0.2.0-rc.21",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",