@acronis-platform/ui-react 0.46.0 → 0.50.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/components/ui/alert/alert.js +99 -0
- package/dist/components/ui/alert/alert.js.map +1 -0
- package/dist/components/ui/chart/chart.js +213 -0
- package/dist/components/ui/chart/chart.js.map +1 -0
- package/dist/components/ui/combobox/combobox.js +149 -0
- package/dist/components/ui/combobox/combobox.js.map +1 -0
- package/dist/components/ui/field/field.js +189 -0
- package/dist/components/ui/field/field.js.map +1 -0
- package/dist/components/ui/form/form.js +16 -0
- package/dist/components/ui/form/form.js.map +1 -0
- package/dist/components/ui/skeleton/skeleton.js +22 -0
- package/dist/components/ui/skeleton/skeleton.js.map +1 -0
- package/dist/index.js +292 -251
- package/dist/index.js.map +1 -1
- package/dist/react.js +292 -251
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/alert/alert.d.ts +14 -0
- package/dist/src/components/ui/alert/index.d.ts +2 -0
- package/dist/src/components/ui/button/button.d.ts +1 -1
- package/dist/src/components/ui/chart/chart.d.ts +55 -0
- package/dist/src/components/ui/chart/index.d.ts +2 -0
- package/dist/src/components/ui/combobox/combobox.d.ts +28 -0
- package/dist/src/components/ui/combobox/index.d.ts +2 -0
- package/dist/src/components/ui/field/field.d.ts +39 -0
- package/dist/src/components/ui/field/field.docs.d.ts +27 -0
- package/dist/src/components/ui/field/index.d.ts +2 -0
- package/dist/src/components/ui/form/form.d.ts +6 -0
- package/dist/src/components/ui/form/index.d.ts +1 -0
- package/dist/src/components/ui/sheet/sheet.d.ts +1 -1
- package/dist/src/components/ui/skeleton/index.d.ts +1 -0
- package/dist/src/components/ui/skeleton/skeleton.d.ts +4 -0
- package/dist/src/components/ui/tag/tag.d.ts +1 -1
- package/dist/src/index.d.ts +7 -0
- package/dist/ui-react.css +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { LegendPayload } from 'recharts/types/component/DefaultLegendContent';
|
|
2
|
+
import { NameType, Payload, ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
3
|
+
import { Props as LegendProps } from 'recharts/types/component/Legend';
|
|
4
|
+
import { TooltipContentProps } from 'recharts/types/component/Tooltip';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import * as RechartsPrimitive from 'recharts';
|
|
7
|
+
declare const THEMES: {
|
|
8
|
+
readonly light: "";
|
|
9
|
+
readonly dark: "[data-theme='dark']";
|
|
10
|
+
};
|
|
11
|
+
export type ChartConfig = {
|
|
12
|
+
[k in string]: {
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
icon?: React.ComponentType;
|
|
15
|
+
} & ({
|
|
16
|
+
color?: string;
|
|
17
|
+
theme?: never;
|
|
18
|
+
} | {
|
|
19
|
+
color?: never;
|
|
20
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
export type ChartTooltipContentProps = Partial<TooltipContentProps<ValueType, NameType>> & {
|
|
24
|
+
className?: string;
|
|
25
|
+
hideLabel?: boolean;
|
|
26
|
+
hideIndicator?: boolean;
|
|
27
|
+
indicator?: 'line' | 'dot' | 'dashed';
|
|
28
|
+
nameKey?: string;
|
|
29
|
+
labelKey?: string;
|
|
30
|
+
labelFormatter?: (label: TooltipContentProps<number, string>['label'], payload: TooltipContentProps<number, string>['payload']) => React.ReactNode;
|
|
31
|
+
formatter?: (value: number | string, name: string, item: Payload<number | string, string>, index: number, payload: ReadonlyArray<Payload<number | string, string>>) => React.ReactNode;
|
|
32
|
+
labelClassName?: string;
|
|
33
|
+
color?: string;
|
|
34
|
+
};
|
|
35
|
+
export type ChartLegendContentProps = {
|
|
36
|
+
className?: string;
|
|
37
|
+
hideIcon?: boolean;
|
|
38
|
+
verticalAlign?: LegendProps['verticalAlign'];
|
|
39
|
+
payload?: LegendPayload[];
|
|
40
|
+
nameKey?: string;
|
|
41
|
+
};
|
|
42
|
+
export interface ChartContainerProps extends React.ComponentProps<'div'> {
|
|
43
|
+
config: ChartConfig;
|
|
44
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
|
|
45
|
+
}
|
|
46
|
+
declare function ChartContainer({ id, className, children, config, ...props }: ChartContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
declare const ChartStyle: ({ id, config }: {
|
|
48
|
+
id: string;
|
|
49
|
+
config: ChartConfig;
|
|
50
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
51
|
+
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
52
|
+
declare function ChartTooltipContent({ active, payload, label, className, indicator, hideLabel, hideIndicator, labelFormatter, formatter, labelClassName, color, nameKey, labelKey, }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
53
|
+
declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
|
|
54
|
+
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
55
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function Combobox<Value, Multiple extends boolean | undefined = false>(props: ComboboxPrimitive.Root.Props<Value, Multiple>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare namespace Combobox {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ComboboxInputProps extends Omit<React.ComponentPropsWithoutRef<typeof ComboboxPrimitive.Input>, 'className'> {
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Wrapper (box) className. */
|
|
10
|
+
containerClassName?: string;
|
|
11
|
+
/** Show a clear (✕) button while the field has a value. */
|
|
12
|
+
clearable?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const ComboboxInput: React.ForwardRefExoticComponent<ComboboxInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
15
|
+
export interface ComboboxContentProps extends React.ComponentPropsWithoutRef<typeof ComboboxPrimitive.Popup> {
|
|
16
|
+
sideOffset?: number;
|
|
17
|
+
align?: ComboboxPrimitive.Positioner.Props['align'];
|
|
18
|
+
side?: ComboboxPrimitive.Positioner.Props['side'];
|
|
19
|
+
/** Container to portal into (e.g. a shadow root, so the popup inherits styles). */
|
|
20
|
+
portalContainer?: ComboboxPrimitive.Portal.Props['container'];
|
|
21
|
+
}
|
|
22
|
+
declare const ComboboxContent: React.ForwardRefExoticComponent<ComboboxContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const ComboboxList: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').AutocompleteListProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const ComboboxItem: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const ComboboxEmpty: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').AutocompleteEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
declare const ComboboxGroup: React.ForwardRefExoticComponent<Omit<import('@base-ui/react').AutocompleteGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const ComboboxGroupLabel: React.ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').AutocompleteGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Field as FieldPrimitive } from '@base-ui/react/field';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const fieldVariants: (props?: ({
|
|
5
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface FieldProps extends Omit<React.ComponentProps<typeof FieldPrimitive.Root>, 'className'>, VariantProps<typeof fieldVariants> {
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function Field({ className, orientation, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export interface FieldLabelProps extends Omit<React.ComponentProps<typeof FieldPrimitive.Label>, 'className'> {
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function FieldLabel({ className, ...props }: FieldLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export interface FieldControlProps extends Omit<React.ComponentProps<typeof FieldPrimitive.Control>, 'className'> {
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function FieldControl({ className, ...props }: FieldControlProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export interface FieldDescriptionProps extends Omit<React.ComponentProps<typeof FieldPrimitive.Description>, 'className'> {
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
declare function FieldDescription({ className, ...props }: FieldDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export interface FieldErrorProps extends Omit<React.ComponentProps<typeof FieldPrimitive.Error>, 'className'> {
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
declare function FieldError({ className, ...props }: FieldErrorProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export interface FieldLegendProps extends React.ComponentProps<'legend'> {
|
|
29
|
+
variant?: 'legend' | 'label';
|
|
30
|
+
}
|
|
31
|
+
declare function FieldLegend({ className, variant, ...props }: FieldLegendProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export interface FieldSeparatorProps extends React.ComponentProps<'div'> {
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
declare function FieldSeparator({ children, className, ...props }: FieldSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export { Field, FieldLabel, FieldControl, FieldDescription, FieldError, FieldSet, FieldLegend, FieldGroup, FieldContent, FieldTitle, FieldSeparator, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface FieldProps {
|
|
3
|
+
/** Label/control layout — stacked, inline, or stacked-then-inline at the @md container width. */
|
|
4
|
+
orientation?: 'vertical' | 'horizontal' | 'responsive';
|
|
5
|
+
/** Marks the field invalid (sets data-invalid + the control's aria-invalid). */
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
/** Disables the field and its control. */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Identifies the field when a form is submitted. */
|
|
10
|
+
name?: string;
|
|
11
|
+
/** When the field validates. */
|
|
12
|
+
validationMode?: 'onSubmit' | 'onBlur' | 'onChange';
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface FieldErrorProps {
|
|
17
|
+
/** Which ValidityState shows the message; `true` always shows it. */
|
|
18
|
+
match?: boolean | keyof ValidityState;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface FieldLegendProps {
|
|
23
|
+
/** Large legend text or small label text. */
|
|
24
|
+
variant?: 'legend' | 'label';
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Field, FieldLabel, FieldControl, FieldDescription, FieldError, FieldSet, FieldLegend, FieldGroup, FieldContent, FieldTitle, FieldSeparator, } from './field';
|
|
2
|
+
export type { FieldProps, FieldLabelProps, FieldControlProps, FieldDescriptionProps, FieldErrorProps, FieldLegendProps, FieldSeparatorProps, } from './field';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FormProps as BaseFormProps } from '@base-ui/react/form';
|
|
2
|
+
export interface FormProps<FormValues extends Record<string, unknown> = Record<string, unknown>> extends Omit<BaseFormProps<FormValues>, 'className'> {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
declare function Form<FormValues extends Record<string, unknown> = Record<string, unknown>>({ className, ...props }: FormProps<FormValues>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Form };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Form, type FormProps } from './form';
|
|
@@ -2,7 +2,7 @@ import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const sheetVariants: (props?: ({
|
|
5
|
-
side?: "
|
|
5
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare const Sheet: typeof DialogPrimitive.Root;
|
|
8
8
|
declare const SheetTrigger: DialogPrimitive.Trigger;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Skeleton, type SkeletonProps } from './skeleton';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const tagVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "info" | "success" | "warning" | "critical" | "ai" | "neutral" | "danger" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface TagProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof tagVariants> {
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
export { cn } from './lib/utils';
|
|
2
|
+
export * from './components/ui/alert';
|
|
2
3
|
export * from './components/ui/avatar';
|
|
3
4
|
export * from './components/ui/breadcrumb';
|
|
4
5
|
export * from './components/ui/button';
|
|
5
6
|
export * from './components/ui/button-menu';
|
|
6
7
|
export * from './components/ui/card';
|
|
7
8
|
export * from './components/ui/card-filter';
|
|
9
|
+
export * from './components/ui/chart';
|
|
8
10
|
export * from './components/ui/checkbox';
|
|
9
11
|
export * from './components/ui/chip';
|
|
12
|
+
export * from './components/ui/combobox';
|
|
10
13
|
export * from './components/ui/data-table';
|
|
11
14
|
export * from './components/ui/description-list';
|
|
12
15
|
export * from './components/ui/dialog';
|
|
13
16
|
export * from './components/ui/dropdown-menu';
|
|
14
17
|
export * from './components/ui/empty';
|
|
18
|
+
export * from './components/ui/field';
|
|
19
|
+
export * from './components/ui/form';
|
|
15
20
|
export * from './components/ui/radio';
|
|
21
|
+
export * from './components/ui/input';
|
|
16
22
|
export * from './components/ui/input-date-picker';
|
|
17
23
|
export * from './components/ui/input-search';
|
|
18
24
|
export * from './components/ui/input-select';
|
|
@@ -30,6 +36,7 @@ export { InputTextArea as Textarea, type InputTextAreaProps as TextareaProps, }
|
|
|
30
36
|
export * from './components/ui/select';
|
|
31
37
|
export * from './components/ui/separator';
|
|
32
38
|
export * from './components/ui/sheet';
|
|
39
|
+
export * from './components/ui/skeleton';
|
|
33
40
|
export * from './components/ui/spinner';
|
|
34
41
|
export * from './components/ui/resizable';
|
|
35
42
|
export * from './components/ui/sidebar-primary';
|