@devopness/ui-react 2.179.0 → 2.181.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';
@@ -5,3 +5,5 @@ export * from './FormText';
5
5
  export * from './Illustration';
6
6
  export * from './FormLoading';
7
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,46 @@
1
+ import { default as React } from 'react';
2
+ import { Icon } from '../../../icons';
3
+ type ReviewProps = {
4
+ /** Content text or JSX element */
5
+ content: string | React.JSX.Element;
6
+ /** Make content bold
7
+ * @default false
8
+ */
9
+ isBoldFontWeight?: boolean;
10
+ /** Optional icon to display */
11
+ icon?: Icon | Omit<string, Icon>;
12
+ /** Background color for the icon */
13
+ iconBackgroundColor?: string;
14
+ /** Icon color */
15
+ iconColor?: string;
16
+ /** Icon size in pixels */
17
+ iconSize?: number;
18
+ /** Optional prefix before the label */
19
+ prefix?: string;
20
+ /** Background color for the review box */
21
+ backgroundColor?: string;
22
+ /** Apply margin for prefix
23
+ * @default true
24
+ */
25
+ hasPrefixMargin?: boolean;
26
+ /** Show icon after label instead of before
27
+ * @default false
28
+ */
29
+ isIconAfterLabel?: boolean;
30
+ };
31
+ /**
32
+ * Review component displays a label/value pair with optional icon and prefix.
33
+ *
34
+ * @example
35
+ * ```jsx
36
+ * <Review
37
+ * content="Status: Approved"
38
+ * icon="check"
39
+ * prefix="Info"
40
+ * backgroundColor="#f5f5f5"
41
+ * />
42
+ * ```
43
+ */
44
+ declare const Review: ({ content, icon, iconBackgroundColor, iconColor, iconSize, isBoldFontWeight, prefix, backgroundColor, hasPrefixMargin, isIconAfterLabel, }: ReviewProps) => import("react/jsx-runtime").JSX.Element;
45
+ export type { ReviewProps };
46
+ export { Review };
@@ -0,0 +1,24 @@
1
+ type DetailContentValueProps = {
2
+ isBoldFontWeight?: boolean;
3
+ };
4
+ type DetailContentInformationProps = {
5
+ noIcon?: boolean;
6
+ isIconAfterLabel?: boolean;
7
+ backgroundColor?: string;
8
+ };
9
+ type ContentDetailProps = {
10
+ type?: 'default' | 'warning';
11
+ };
12
+ type StyledProps = {
13
+ backgroundColor?: string;
14
+ color?: string;
15
+ };
16
+ declare const DetailContentInformation: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, DetailContentInformationProps>> & string;
17
+ declare const DetailContentValue: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, DetailContentValueProps>> & string;
18
+ declare const PrefixWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
19
+ showMarginRight?: boolean;
20
+ }>> & string;
21
+ declare const ContentIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProps>> & string;
22
+ declare const ContentDetail: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, ContentDetailProps>> & string;
23
+ export type { DetailContentInformationProps, DetailContentValueProps, ContentDetailProps, };
24
+ export { DetailContentInformation, DetailContentValue, PrefixWrapper, ContentIcon, ContentDetail, };
@@ -0,0 +1,24 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Props for the `ReviewBox` component.
4
+ */
5
+ type ReviewBoxProps = {
6
+ /** Child `Review` components to be displayed inside this container */
7
+ children: ReactNode;
8
+ /** The type of the review box, which affects its background color */
9
+ type?: 'default' | 'warning';
10
+ };
11
+ /**
12
+ * A container component for displaying a group of `Review` components.
13
+ *
14
+ * Pass any number of `Review` components as children to this component.
15
+ *
16
+ * @example
17
+ * <ReviewBox type="default">
18
+ * <Review content="Status: Approved" icon="check" prefix="Info" />
19
+ * <Review content="Score: 85%" icon="star" isIconAfterLabel />
20
+ * </ReviewBox>
21
+ */
22
+ declare const ReviewBox: ({ children, type }: ReviewBoxProps) => import("react/jsx-runtime").JSX.Element;
23
+ export type { ReviewBoxProps };
24
+ export { ReviewBox };
@@ -0,0 +1,2 @@
1
+ export * from './Review';
2
+ export * from './ReviewBox';
@@ -0,0 +1,40 @@
1
+ import { HTMLAttributes, PropsWithChildren, ReactNode } from 'react';
2
+ import { ToggleContentButtonProps } from './ToggleContentButton';
3
+ /**
4
+ * Props for the `ToggleContent` component.
5
+ */
6
+ type ToggleContentProps = {
7
+ /** Whether the content is sensitive (hides by default)
8
+ * @default false
9
+ */
10
+ isSensitiveContent?: boolean;
11
+ /** Show warning when revealing sensitive content
12
+ * @default false
13
+ */
14
+ showWarning?: boolean;
15
+ /** Placeholder to show when content is hidden */
16
+ hiddenContentPlaceholder?: ReactNode;
17
+ /** Whether to show the hidden content placeholder
18
+ * @default true
19
+ */
20
+ showHiddenContentPlaceholder?: boolean;
21
+ /** Optional container props */
22
+ containerProps?: HTMLAttributes<HTMLDivElement>;
23
+ /** Props for the toggle button */
24
+ buttonProps?: ToggleContentButtonProps;
25
+ };
26
+ /**
27
+ * Component to show/hide sensitive content with a toggle button.
28
+ *
29
+ * @example
30
+ * <ToggleContent
31
+ * isSensitiveContent
32
+ * showWarning
33
+ * hiddenContentPlaceholder="*****"
34
+ * >
35
+ * <span>Secret value</span>
36
+ * </ToggleContent>
37
+ */
38
+ declare const ToggleContent: ({ isSensitiveContent, showWarning, hiddenContentPlaceholder, showHiddenContentPlaceholder, containerProps, buttonProps, children, }: PropsWithChildren<ToggleContentProps>) => import("react/jsx-runtime").JSX.Element;
39
+ export { ToggleContent };
40
+ export type { ToggleContentProps };
@@ -0,0 +1,28 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { Button } from '../../Buttons';
3
+ import { Icon } from '../../../icons';
4
+ /**
5
+ * Props for the `ToggleContentButton` component.
6
+ */
7
+ type ToggleContentButtonProps = ComponentPropsWithoutRef<typeof Button> & {
8
+ /** Whether the content is currently visible
9
+ * @default false
10
+ */
11
+ showContent?: boolean;
12
+ /** Optional props when hiding the content */
13
+ hideContentProps?: {
14
+ text?: string;
15
+ icon?: Icon;
16
+ };
17
+ /** Optional props when revealing the content */
18
+ revealContentProps?: {
19
+ text?: string;
20
+ icon?: Icon;
21
+ };
22
+ };
23
+ /**
24
+ * Button to toggle visibility of sensitive content.
25
+ */
26
+ declare const ToggleContentButton: ({ showContent, hideContentProps, revealContentProps, ...props }: ToggleContentButtonProps) => import("react/jsx-runtime").JSX.Element;
27
+ export { ToggleContentButton };
28
+ export type { ToggleContentButtonProps };
@@ -0,0 +1,2 @@
1
+ export * from './ToggleContent';
2
+ export * from './ToggleContentButton';
@@ -21,3 +21,6 @@ export * from './Cover';
21
21
  export * from './PopoverPopupState';
22
22
  export * from './TimerCounter';
23
23
  export * from './SourceAndHash';
24
+ export * from './Popover';
25
+ export * from './Review';
26
+ export * from './ToggleContent';