@codeplex-qwik/ui 0.0.2 → 0.0.6

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.
@@ -1,12 +1,16 @@
1
1
  import { default as React } from 'react';
2
+ import { AlertProps } from '@mui/material/Alert';
2
3
  export type CodeplexAlertVariant = 'info' | 'success' | 'warning' | 'danger';
3
- export interface CodeplexAlertProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ export type CodeplexAlertStyle = 'standard' | 'filled' | 'outlined';
5
+ export interface CodeplexAlertProps extends Omit<AlertProps, 'variant' | 'severity' | 'onClose'> {
4
6
  variant?: CodeplexAlertVariant;
7
+ design?: CodeplexAlertStyle;
5
8
  title?: string;
6
9
  description?: string;
7
- icon?: string;
8
10
  dismissible?: boolean;
9
11
  open?: boolean;
10
12
  onClose?: () => void;
13
+ color?: AlertProps['color'];
14
+ action?: React.ReactNode;
11
15
  }
12
- export declare const CodeplexAlert: ({ variant, title, description, icon, dismissible, open, onClose, className, children, ...props }: CodeplexAlertProps) => import("react/jsx-runtime").JSX.Element | null;
16
+ export declare const CodeplexAlert: ({ variant, design, title, description, icon, dismissible, open, onClose, className, children, action, sx, ...props }: CodeplexAlertProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { AutocompleteProps, AutocompleteRenderInputParams } from '@mui/material/Autocomplete';
3
+ import { TextFieldProps } from '@mui/material/TextField';
4
+ export interface CodeplexAutocompleteProps<T, Multiple extends boolean | undefined = undefined, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined> extends Omit<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>, 'renderInput'> {
5
+ label?: string;
6
+ placeholder?: string;
7
+ helperText?: string;
8
+ error?: boolean;
9
+ required?: boolean;
10
+ inputProps?: TextFieldProps;
11
+ renderInput?: (params: AutocompleteRenderInputParams) => React.ReactNode;
12
+ }
13
+ export declare function CodeplexAutocomplete<T, Multiple extends boolean | undefined = undefined, DisableClearable extends boolean | undefined = undefined, FreeSolo extends boolean | undefined = undefined>({ label, placeholder, helperText, error, required, inputProps, renderInput, ...props }: CodeplexAutocompleteProps<T, Multiple, DisableClearable, FreeSolo>): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,19 @@
1
- import { default as React } from 'react';
2
- export type CodeplexAvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
- export type CodeplexAvatarShape = 'circle' | 'rounded';
4
- export type CodeplexAvatarStatus = 'online' | 'offline' | 'busy' | 'away' | 'none';
5
- export interface CodeplexAvatarProps extends React.HTMLAttributes<HTMLDivElement> {
6
- src?: string;
1
+ import { AvatarProps } from '@mui/material/Avatar';
2
+ import { AvatarGroupProps } from '@mui/material/AvatarGroup';
3
+ export type CodeplexAvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
4
+ export interface CodeplexAvatarProps extends AvatarProps {
5
+ size?: CodeplexAvatarSize | number;
7
6
  alt?: string;
8
- name?: string;
9
- size?: CodeplexAvatarSize;
10
- shape?: CodeplexAvatarShape;
11
- status?: CodeplexAvatarStatus;
12
- showBorder?: boolean;
13
- showInitialsFallback?: boolean;
7
+ src?: string;
8
+ }
9
+ export declare const CodeplexAvatar: ({ size, sx, children, ...props }: CodeplexAvatarProps) => import("react/jsx-runtime").JSX.Element;
10
+ export interface CodeplexAvatarGroupProps extends AvatarGroupProps {
11
+ total?: number;
14
12
  }
15
- export declare const CodeplexAvatar: ({ src, alt, name, size, shape, status, showBorder, showInitialsFallback, className, ...props }: CodeplexAvatarProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const CodeplexAvatarGroup: ({ children, spacing, max, ...props }: CodeplexAvatarGroupProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const stringAvatar: (name: string) => {
15
+ sx: {
16
+ bgcolor: string;
17
+ };
18
+ children: string;
19
+ };
@@ -1,13 +1,4 @@
1
- import { default as React } from 'react';
2
- export type CodeplexBadgeVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'neutral';
3
- export type CodeplexBadgeSize = 'sm' | 'md';
4
- export interface CodeplexBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
5
- label: string;
6
- variant?: CodeplexBadgeVariant;
7
- size?: CodeplexBadgeSize;
8
- pill?: boolean;
9
- iconLeft?: React.ReactNode;
10
- iconRight?: React.ReactNode;
11
- onClick?: () => void;
1
+ import { BadgeProps } from '@mui/material/Badge';
2
+ export interface CodeplexBadgeProps extends BadgeProps {
12
3
  }
13
- export declare const CodeplexBadge: React.ForwardRefExoticComponent<CodeplexBadgeProps & React.RefAttributes<HTMLElement>>;
4
+ export declare const CodeplexBadge: ({ children, color, ...props }: CodeplexBadgeProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { ButtonGroupProps } from '@mui/material/ButtonGroup';
2
+ export interface CodeplexButtonGroupProps extends ButtonGroupProps {
3
+ }
4
+ export declare const CodeplexButtonGroup: ({ children, size, variant, color, ...props }: CodeplexButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import { default as React } from 'react';
2
+ import { CardProps } from '@mui/material/Card';
2
3
  export type CodeplexCardVariant = 'default' | 'outline' | 'soft';
3
4
  export type CodeplexCardPadding = 'none' | 'sm' | 'md' | 'lg';
4
- export interface CodeplexCardProps extends React.HTMLAttributes<HTMLElement> {
5
+ export interface CodeplexCardProps extends Omit<CardProps, 'variant'> {
5
6
  variant?: CodeplexCardVariant;
6
7
  padding?: CodeplexCardPadding;
7
8
  hoverable?: boolean;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { CheckboxProps } from '@mui/material/Checkbox';
3
+ import { default as FormGroup } from '@mui/material/FormGroup';
4
+ export interface CodeplexCheckboxProps extends CheckboxProps {
5
+ label?: string;
6
+ labelPlacement?: 'end' | 'start' | 'top' | 'bottom';
7
+ }
8
+ export declare const CodeplexCheckbox: React.ForwardRefExoticComponent<Omit<CodeplexCheckboxProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
+ export { FormGroup as CodeplexFormGroup };
@@ -0,0 +1,10 @@
1
+ import { TextFieldProps } from '@mui/material/TextField';
2
+ export interface CodeplexNumberFieldProps extends Omit<TextFieldProps, 'onChange'> {
3
+ min?: number;
4
+ max?: number;
5
+ step?: number;
6
+ value?: number;
7
+ defaultValue?: number;
8
+ onChange?: (value: number | null) => void;
9
+ }
10
+ export declare const CodeplexNumberField: ({ min, max, step, value: controlledValue, defaultValue, onChange, InputProps, disabled, ...props }: CodeplexNumberFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,18 +1,17 @@
1
- import { default as React } from 'react';
2
- export type CodeplexProgressVariant = 'primary' | 'success' | 'warning' | 'danger' | 'neutral' | 'gradient';
1
+ import { LinearProgressProps } from '@mui/material/LinearProgress';
2
+ export type CodeplexProgressVariant = 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
3
3
  export type CodeplexProgressSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
- export type CodeplexProgressLabelAlign = 'left' | 'center' | 'right';
5
- export interface CodeplexProgressProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ export interface CodeplexProgressProps extends Omit<LinearProgressProps, 'variant' | 'color'> {
6
5
  value?: number;
7
6
  max?: number;
8
7
  label?: string;
9
8
  showPercentage?: boolean;
10
9
  labelInside?: boolean;
11
- labelAlign?: CodeplexProgressLabelAlign;
12
- striped?: boolean;
13
- animated?: boolean;
14
10
  indeterminate?: boolean;
15
11
  size?: CodeplexProgressSize;
16
12
  variant?: CodeplexProgressVariant;
13
+ color?: LinearProgressProps['color'];
14
+ striped?: boolean;
15
+ animated?: boolean;
17
16
  }
18
- export declare const CodeplexProgress: ({ value, max, label, showPercentage, labelInside, labelAlign, striped, animated, indeterminate, size, variant, className, ...props }: CodeplexProgressProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const CodeplexProgress: ({ value, max, label, showPercentage, labelInside, indeterminate, size, variant, color, striped, animated, className, sx, ...props }: CodeplexProgressProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { RadioProps } from '@mui/material/Radio';
3
+ import { RadioGroupProps } from '@mui/material/RadioGroup';
4
+ export interface CodeplexRadioProps extends RadioProps {
5
+ label?: string;
6
+ labelPlacement?: 'end' | 'start' | 'top' | 'bottom';
7
+ }
8
+ export declare const CodeplexRadio: React.ForwardRefExoticComponent<Omit<CodeplexRadioProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
+ export interface CodeplexRadioGroupProps extends RadioGroupProps {
10
+ label?: string;
11
+ options?: Array<{
12
+ value: string;
13
+ label: string;
14
+ disabled?: boolean;
15
+ }>;
16
+ }
17
+ export declare const CodeplexRadioGroup: ({ label, options, children, ...props }: CodeplexRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,11 @@
1
- export type CodeplexRatingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2
- export type CodeplexRatingVariant = 'warning' | 'primary' | 'danger' | 'success';
3
- export interface CodeplexRatingProps {
1
+ import { RatingProps } from '@mui/material/Rating';
2
+ export type CodeplexRatingSize = 'small' | 'medium' | 'large';
3
+ export type CodeplexRatingVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
4
+ export interface CodeplexRatingProps extends Omit<RatingProps, 'onChange'> {
4
5
  value?: number;
5
- max?: number;
6
- readOnly?: boolean;
7
- size?: CodeplexRatingSize;
8
- variant?: CodeplexRatingVariant;
9
6
  showValue?: boolean;
10
7
  tooltips?: string[];
11
- className?: string;
12
- onChange?: (value: number) => void;
8
+ variant?: CodeplexRatingVariant;
9
+ onChange?: (value: number | null) => void;
13
10
  }
14
- export declare const CodeplexRating: ({ value, max, readOnly, size, variant, showValue, tooltips, className, onChange, }: CodeplexRatingProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const CodeplexRating: ({ value, max, readOnly, size, variant, showValue, tooltips, className, onChange, ...props }: CodeplexRatingProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ import { SelectProps } from '@mui/material/Select';
3
+ import { default as MenuItem } from '@mui/material/MenuItem';
4
+ export interface CodeplexSelectOption {
5
+ value: string | number;
6
+ label: string;
7
+ disabled?: boolean;
8
+ }
9
+ export interface CodeplexSelectProps extends Omit<SelectProps, 'renderValue'> {
10
+ label?: string;
11
+ options?: CodeplexSelectOption[];
12
+ helperText?: ReactNode;
13
+ placeholder?: string;
14
+ renderValue?: (value: any) => ReactNode;
15
+ }
16
+ export declare const CodeplexSelect: ({ label, value, onChange, options, multiple, helperText, error, disabled, required, placeholder, variant, displayEmpty, renderValue, children, sx, ...props }: CodeplexSelectProps) => import("react/jsx-runtime").JSX.Element;
17
+ export { MenuItem as CodeplexMenuItem };
18
+ export { default as CodeplexListSubheader } from '@mui/material/ListSubheader';
@@ -0,0 +1,4 @@
1
+ import { SkeletonProps } from '@mui/material/Skeleton';
2
+ export interface CodeplexSkeletonProps extends SkeletonProps {
3
+ }
4
+ export declare const CodeplexSkeleton: ({ variant, animation, ...props }: CodeplexSkeletonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { SliderProps } from '@mui/material/Slider';
2
+ export interface CodeplexSliderProps extends SliderProps {
3
+ label?: string;
4
+ helperText?: string;
5
+ }
6
+ export declare const CodeplexSlider: ({ label, helperText, className, sx, ...props }: CodeplexSliderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
+ import { CircularProgressProps } from '@mui/material/CircularProgress';
1
2
  export type CodeplexSpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2
- export type CodeplexSpinnerColor = 'primary' | 'white' | 'gray' | 'success' | 'danger' | 'warning';
3
+ export type CodeplexSpinnerColor = 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'white' | 'gray';
3
4
  export type CodeplexSpinnerType = 'border' | 'dots' | 'ping';
4
- export interface CodeplexSpinnerProps {
5
- size?: CodeplexSpinnerSize;
5
+ export interface CodeplexSpinnerProps extends Omit<CircularProgressProps, 'size' | 'color'> {
6
+ size?: CodeplexSpinnerSize | number;
6
7
  color?: CodeplexSpinnerColor;
7
8
  type?: CodeplexSpinnerType;
8
9
  label?: string;
9
10
  labelPosition?: 'right' | 'bottom';
10
11
  fullScreen?: boolean;
11
- className?: string;
12
12
  }
13
- export declare const CodeplexSpinner: ({ size, color, type, label, labelPosition, fullScreen, className, }: CodeplexSpinnerProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const CodeplexSpinner: ({ size, color, type, label, labelPosition, fullScreen, className, sx, ...props }: CodeplexSpinnerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { SwitchProps } from '@mui/material/Switch';
2
+ export interface CodeplexSwitchProps extends Omit<SwitchProps, 'size'> {
3
+ label?: string;
4
+ labelPlacement?: 'end' | 'start' | 'top' | 'bottom';
5
+ size?: 'small' | 'medium';
6
+ }
7
+ export declare const CodeplexSwitch: ({ label, labelPlacement, size, sx, ...props }: CodeplexSwitchProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { TextFieldProps } from '@mui/material/TextField';
2
+ export type CodeplexTextFieldProps = TextFieldProps;
3
+ export declare const CodeplexTextField: (props: CodeplexTextFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,18 @@
1
+ import { default as React } from 'react';
2
+ import { SnackbarProps } from '@mui/material/Snackbar';
3
+ import { AlertProps } from '@mui/material/Alert';
1
4
  export type CodeplexToastVariant = 'info' | 'success' | 'warning' | 'error';
2
5
  export type CodeplexToastPosition = 'top-left' | 'top-right' | 'top-center' | 'bottom-left' | 'bottom-right' | 'bottom-center';
3
- export interface CodeplexToastProps {
6
+ export interface CodeplexToastProps extends Omit<SnackbarProps, 'open' | 'onClose' | 'anchorOrigin'> {
4
7
  open: boolean;
5
8
  variant?: CodeplexToastVariant;
6
- title: string;
9
+ title?: string;
7
10
  subtitle?: string;
8
11
  position?: CodeplexToastPosition;
9
12
  showIcon?: boolean;
10
13
  dismissible?: boolean;
11
- onClose?: () => void;
14
+ duration?: number | null;
15
+ onClose?: (event?: React.SyntheticEvent | Event, reason?: string) => void;
16
+ alertProps?: AlertProps;
12
17
  }
13
- export declare const CodeplexToast: ({ open, variant, title, subtitle, position, showIcon, dismissible, onClose, }: CodeplexToastProps) => import("react/jsx-runtime").JSX.Element | null;
18
+ export declare const CodeplexToast: ({ open, variant, title, subtitle, position, showIcon, dismissible, duration, onClose, alertProps, children, ...props }: CodeplexToastProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export interface TransferListItem {
2
+ id: string | number;
3
+ label: string;
4
+ disabled?: boolean;
5
+ }
6
+ export interface CodeplexTransferListProps {
7
+ left: TransferListItem[];
8
+ right: TransferListItem[];
9
+ onChange: (left: TransferListItem[], right: TransferListItem[]) => void;
10
+ leftTitle?: string;
11
+ rightTitle?: string;
12
+ height?: number | string;
13
+ }
14
+ export declare const CodeplexTransferList: ({ left, right, onChange, leftTitle, rightTitle, height }: CodeplexTransferListProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeplex-qwik/ui",
3
- "version": "0.0.2",
3
+ "version": "0.0.6",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -17,5 +17,11 @@
17
17
  "react": "^19.0.0",
18
18
  "react-dom": "^19.0.0"
19
19
  },
20
- "module": "./dist/index.mjs"
20
+ "module": "./dist/index.mjs",
21
+ "dependencies": {
22
+ "@emotion/react": "^11.14.0",
23
+ "@emotion/styled": "^11.14.1",
24
+ "@mui/icons-material": "^7.3.6",
25
+ "@mui/material": "^7.3.6"
26
+ }
21
27
  }
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- export type CodeplexButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' | 'success';
3
- export type CodeplexButtonSize = 'xs' | 'sm' | 'md' | 'lg';
4
- export interface CodeplexButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
- variant?: CodeplexButtonVariant;
6
- size?: CodeplexButtonSize;
7
- fullWidth?: boolean;
8
- loading?: boolean;
9
- leftIcon?: React.ReactNode;
10
- rightIcon?: React.ReactNode;
11
- }
12
- export declare const CodeplexButton: React.ForwardRefExoticComponent<CodeplexButtonProps & React.RefAttributes<HTMLButtonElement>>;