@devopness/ui-react 2.178.0 → 2.180.0

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.
@@ -0,0 +1,32 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { default as MuiAutocomplete } from '@mui/material/Autocomplete';
3
+ import { Input } from '../Input';
4
+ /**
5
+ * Props for the Autocomplete component
6
+ */
7
+ type AutocompleteProps = {
8
+ /** Props passed directly to Input component */
9
+ inputProps: Omit<ComponentPropsWithoutRef<typeof Input>, 'type'>;
10
+ /** Props passed directly to MUI Autocomplete component */
11
+ autocompleteProps: Pick<ComponentPropsWithoutRef<typeof MuiAutocomplete>, 'options' | 'onInputChange' | 'onChange' | 'onBlur' | 'value' | 'open'>;
12
+ };
13
+ /**
14
+ * Autocomplete component
15
+ *
16
+ * Wraps a Material UI Autocomplete with a styled Input component.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Autocomplete
21
+ * inputProps={{ placeholder: 'Type something' }}
22
+ * autocompleteProps={{
23
+ * options: ['Option 1', 'Option 2'],
24
+ * value: 'Option 1',
25
+ * onChange: (val) => console.log(val)
26
+ * }}
27
+ * />
28
+ * ```
29
+ */
30
+ declare const Autocomplete: ({ inputProps, autocompleteProps }: AutocompleteProps) => import("react/jsx-runtime").JSX.Element;
31
+ export { Autocomplete };
32
+ export type { AutocompleteProps };
@@ -0,0 +1 @@
1
+ export declare const AutocompletePopper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('@mui/material').PopperProps & import('react').RefAttributes<HTMLDivElement>, never>> & string & Omit<import('react').ForwardRefExoticComponent<import('@mui/material').PopperProps & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
@@ -0,0 +1 @@
1
+ export * from './Autocomplete';
@@ -0,0 +1,58 @@
1
+ import { default as React } from 'react';
2
+ import { ErrorMessage } from '../../Primitives';
3
+ import { Unwrap } from '../../types';
4
+ import { Icon } from '../../../icons';
5
+ /**
6
+ * Props for individual radio card inputs
7
+ */
8
+ type CardRadioCardProps = Unwrap<Required<Pick<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'value'>> & Pick<React.InputHTMLAttributes<HTMLInputElement>, 'id'> & {
9
+ /** Icon to display in the card */
10
+ icon: Icon | Omit<string, Icon> | {
11
+ name: Icon | Omit<string, Icon>;
12
+ color?: string;
13
+ };
14
+ /** Label for the card */
15
+ label: string;
16
+ /** Additional props for the input element */
17
+ inputProps?: Omit<React.InputHTMLAttributes<HTMLInputElement>, 'id' | 'name' | 'type' | 'value'> & {
18
+ ref?: React.Ref<HTMLInputElement>;
19
+ };
20
+ }>;
21
+ /**
22
+ * Props for the RadioSelectCards component
23
+ */
24
+ type RadioSelectCardsProps = Unwrap<Pick<CardRadioCardProps, 'name' | 'inputProps'> & Pick<React.HTMLAttributes<HTMLDivElement>, 'style'> & {
25
+ /** Array of card data to render */
26
+ data: Unwrap<Omit<CardRadioCardProps, 'name' | 'inputProps'> & {
27
+ defaultChecked?: boolean;
28
+ checked?: boolean;
29
+ disabled?: boolean;
30
+ }>[];
31
+ /** Loader state */
32
+ isLoading?: boolean;
33
+ /** External error to display */
34
+ error?: React.ComponentPropsWithoutRef<typeof ErrorMessage>['error'];
35
+ }>;
36
+ /**
37
+ * RadioSelectCards component
38
+ *
39
+ * Displays a group of selectable radio cards. Supports loading state and error display.
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * const options = [
44
+ * { value: 'option1', label: 'Option 1', icon: 'icon1' },
45
+ * { value: 'option2', label: 'Option 2', icon: { name: 'icon2', color: 'blue' } },
46
+ * ]
47
+ *
48
+ * <RadioSelectCards
49
+ * name="exampleRadio"
50
+ * data={options}
51
+ * isLoading={false}
52
+ * error="Please select an option"
53
+ * />
54
+ * ```
55
+ */
56
+ declare const RadioSelectCards: ({ data, style, isLoading, error, name, inputProps: sharedInputProps, }: RadioSelectCardsProps) => import("react/jsx-runtime").JSX.Element;
57
+ export { RadioSelectCards };
58
+ export type { RadioSelectCardsProps };
@@ -0,0 +1,2 @@
1
+ declare const StyledLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
2
+ export { StyledLabel };
@@ -0,0 +1 @@
1
+ export * from './RadioSelectCards';
@@ -0,0 +1,40 @@
1
+ import { TextareaHTMLAttributes, RefObject } from 'react';
2
+ import { LabelProps } from '../../Primitives';
3
+ /**
4
+ * Props for the TextArea component.
5
+ */
6
+ type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
7
+ /** Reference to the underlying textarea element. Can be RefObject or callback ref */
8
+ inputRef?: RefObject<HTMLTextAreaElement> | ((instance: HTMLTextAreaElement | null) => void);
9
+ /** Error information to display below the textarea. */
10
+ error?: Record<string, unknown> | undefined | null;
11
+ /** Disable textarea resize when true.
12
+ * @default true
13
+ */
14
+ isResizable?: boolean;
15
+ /** Optional label props for the field. */
16
+ label?: LabelProps;
17
+ /** Optional className to pass to the container. */
18
+ className?: string;
19
+ };
20
+ /**
21
+ * TextArea component
22
+ *
23
+ * A styled multiline text input that supports an optional label,
24
+ * an error message and optional resize control.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <TextArea
29
+ * id="notes"
30
+ * name="notes"
31
+ * placeholder="Type here..."
32
+ * label={{ htmlFor: 'notes', value: 'Notes' }}
33
+ * inputRef={ref}
34
+ * error={{ message: 'Required' }}
35
+ * />
36
+ * ```
37
+ */
38
+ declare const TextArea: ({ className, inputRef, error, label, isResizable, ...props }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
39
+ export { TextArea };
40
+ export type { TextAreaProps };
@@ -0,0 +1,9 @@
1
+ type PropsStyled = {
2
+ hasError?: boolean;
3
+ noResize?: boolean;
4
+ disabled?: boolean;
5
+ readOnly?: boolean;
6
+ };
7
+ declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
+ declare const StyledTextarea: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, PropsStyled>> & string;
9
+ export { Container, StyledTextarea };
@@ -0,0 +1 @@
1
+ export * from './TextArea';
@@ -4,3 +4,6 @@ export * from './Container';
4
4
  export * from './FormText';
5
5
  export * from './Illustration';
6
6
  export * from './FormLoading';
7
+ export * from './TextArea';
8
+ export * from './Autocomplete';
9
+ export * from './RadioSelectCards';
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from 'react';
2
+ import { PopoverProps as MaterialPopoverProps } from '@mui/material';
3
+ type PopoverProps = {
4
+ /** Optional header title */
5
+ title?: string;
6
+ /** Optional footer content */
7
+ footer?: ReactNode;
8
+ /** Popover children */
9
+ children?: ReactNode;
10
+ } & MaterialPopoverProps;
11
+ /**
12
+ * Popover component
13
+ *
14
+ * Displays a panel anchored to another element.
15
+ * Can optionally show a header title and footer content.
16
+ * Supports closing via the built-in close button.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Popover
21
+ * open={isOpen}
22
+ * anchorEl={anchorElement}
23
+ * onClose={() => setIsOpen(false)}
24
+ * title="Popover Title"
25
+ * footer={<div>Footer content</div>}
26
+ * >
27
+ * <div>Main content of the popover</div>
28
+ * </Popover>
29
+ * ```
30
+ */
31
+ declare const Popover: ({ title, footer, children, ...props }: PopoverProps) => import("react/jsx-runtime").JSX.Element;
32
+ export { Popover };
33
+ export type { PopoverProps };
@@ -0,0 +1,10 @@
1
+ import { Popover } from '@mui/material';
2
+ declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('@mui/material').PopoverProps, never>> & string & Omit<typeof Popover, keyof import('react').Component<any, {}, any>>;
3
+ declare const Header: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
+ justifyContent: "space-between" | "end";
5
+ }>> & string;
6
+ declare const Title: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
7
+ declare const Footer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
8
+ justifyContent: "space-between" | "end";
9
+ }>> & string;
10
+ export { Container, Header, Title, Footer };
@@ -0,0 +1 @@
1
+ export * from './Popover';
@@ -0,0 +1,59 @@
1
+ import { Tooltip } from '../Tooltip';
2
+ /**
3
+ * The type of the deployment source.
4
+ * Can be a branch, a tag, or a commit.
5
+ */
6
+ type LocalSourceType = 'branch' | 'commit' | 'tag';
7
+ /**
8
+ * Minimal information about a commit required for the SourceAndHash component.
9
+ */
10
+ type Commit = {
11
+ /** The commit hash */
12
+ hash: string;
13
+ /** The URL to view the commit in the source provider */
14
+ url: string;
15
+ /** The commit message to display in the tooltip */
16
+ message: string;
17
+ };
18
+ /**
19
+ * Minimal information about a deployment required for the SourceAndHash component.
20
+ */
21
+ type Deployment = {
22
+ /** The git reference used for this deployment (branch, tag, or commit hash) */
23
+ source_ref?: string;
24
+ /** The type of source used in the deployment */
25
+ source_type?: LocalSourceType;
26
+ };
27
+ /**
28
+ * Props for the SourceAndHash component.
29
+ */
30
+ type SourceAndHashProps = {
31
+ /** Commit information to display */
32
+ commit: Commit;
33
+ /** Deployment information to display optional source reference */
34
+ deployment: Deployment;
35
+ /** Maximum number of characters to display for the commit hash */
36
+ maxDisplayCharacters?: number;
37
+ /** Additional props to pass to the Tooltip component */
38
+ tooltipOptions?: Omit<Parameters<typeof Tooltip>[0], 'children' | 'title'> & {
39
+ title?: string;
40
+ };
41
+ };
42
+ /**
43
+ * SourceAndHash component
44
+ *
45
+ * Displays a shortened commit hash with an optional deployment source reference.
46
+ * The commit hash is wrapped in a link and a tooltip showing the full commit message.
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * <SourceAndHash
51
+ * commit={{ hash: 'abcd1234', url: 'https://github.com/repo/commit/abcd1234', message: 'Fix bug' }}
52
+ * deployment={{ source_ref: 'feature/new-feature', source_type: 'branch' }}
53
+ * maxDisplayCharacters={8}
54
+ * />
55
+ * ```
56
+ */
57
+ declare const SourceAndHash: ({ commit, deployment, maxDisplayCharacters, tooltipOptions, }: SourceAndHashProps) => import("react/jsx-runtime").JSX.Element;
58
+ export { SourceAndHash };
59
+ export type { SourceAndHashProps, Commit, Deployment };
@@ -0,0 +1,3 @@
1
+ declare const SourceAndHashSpan: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
2
+ declare const WrapperCommit: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export { SourceAndHashSpan, WrapperCommit };
@@ -0,0 +1 @@
1
+ export * from './SourceAndHash';
@@ -20,3 +20,5 @@ export * from './CheckBox';
20
20
  export * from './Cover';
21
21
  export * from './PopoverPopupState';
22
22
  export * from './TimerCounter';
23
+ export * from './SourceAndHash';
24
+ export * from './Popover';