@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.
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +896 -310
- package/dist/index.css +2 -2
- package/dist/src/components/Alert/Alert.d.ts +6 -6
- package/dist/src/components/Alert/constants.d.ts +1 -1
- package/dist/src/components/Button/Button.d.ts +5 -2
- package/dist/src/components/Button/constants.d.ts +2 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +33 -0
- package/dist/src/components/CloseButton/CloseButton.d.ts +26 -0
- package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +53 -0
- package/dist/src/components/ConfirmationPopup/constants.d.ts +11 -0
- package/dist/src/components/Input/Input.d.ts +4 -4
- package/dist/src/components/InputField/InputField.d.ts +4 -4
- package/dist/src/components/Loader/Loader.d.ts +32 -0
- package/dist/src/components/Loader/constants.d.ts +2 -0
- package/dist/src/components/NoDataContent/NoDataContent.d.ts +22 -0
- package/dist/src/components/PasswordInput/Icons/HideIcon.d.ts +16 -0
- package/dist/src/components/PasswordInput/Icons/ShowIcon.d.ts +16 -0
- package/dist/src/components/PasswordInput/PasswordInput.d.ts +24 -0
- package/dist/src/components/PasswordInput/PasswordInputField.d.ts +29 -0
- package/dist/src/components/Popup/Popup.d.ts +52 -0
- package/dist/src/components/Popup/constants.d.ts +6 -0
- package/dist/src/components/RadioButton/RadioButton.d.ts +46 -0
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +51 -0
- package/dist/src/components/RadioGroup/constants.d.ts +5 -0
- package/dist/src/components/Search/Search.d.ts +42 -0
- package/dist/src/components/Search/constants.d.ts +14 -0
- package/dist/src/components/Steps/Step.d.ts +9 -0
- package/dist/src/components/Steps/Steps.d.ts +24 -0
- package/dist/src/components/Steps/tests/Steps.test.d.ts +1 -0
- package/dist/src/components/Steps/utils.d.ts +3 -0
- package/dist/src/components/Switch/Switch.d.ts +1 -1
- package/dist/src/components/TextAreaField/TextAreaField.d.ts +2 -2
- package/dist/src/constants/icon.d.ts +5 -0
- package/dist/src/index.d.ts +19 -1
- package/dist/src/models/field-control-props.d.ts +2 -2
- package/dist/src/models/step.d.ts +9 -0
- package/dist/src/types/button.d.ts +6 -0
- package/dist/src/types/confirmation-popup.d.ts +4 -0
- package/dist/src/types/popup.d.ts +5 -0
- package/dist/src/types/radio-group.d.ts +4 -0
- package/dist/src/types/search.d.ts +4 -0
- 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,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";
|
|
@@ -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 [
|
|
34
|
-
* @param [
|
|
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
|
package/dist/src/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
14
|
-
|
|
13
|
+
iconAfter?: ReactNode;
|
|
14
|
+
iconBefore?: ReactNode;
|
|
15
15
|
min?: number;
|
|
16
16
|
max?: number;
|
|
17
17
|
textBeforeInput?: string;
|