@devopness/ui-react 2.179.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.
- package/dist/src/components/Forms/Autocomplete/Autocomplete.d.ts +32 -0
- package/dist/src/components/Forms/Autocomplete/Autocomplete.styled.d.ts +1 -0
- package/dist/src/components/Forms/Autocomplete/index.d.ts +1 -0
- package/dist/src/components/Forms/RadioSelectCards/RadioSelectCards.d.ts +58 -0
- package/dist/src/components/Forms/RadioSelectCards/RadioSelectCards.styled.d.ts +2 -0
- package/dist/src/components/Forms/RadioSelectCards/index.d.ts +1 -0
- package/dist/src/components/Forms/index.d.ts +2 -0
- package/dist/src/components/Primitives/Popover/Popover.d.ts +33 -0
- package/dist/src/components/Primitives/Popover/Popover.styled.d.ts +10 -0
- package/dist/src/components/Primitives/Popover/index.d.ts +1 -0
- package/dist/src/components/Primitives/index.d.ts +1 -0
- package/dist/ui-react.cjs +471 -332
- package/dist/ui-react.js +10283 -7168
- package/package.json +11 -11
|
@@ -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,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';
|