@zelelo/iskra-ui 0.1.0 → 0.2.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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { HTMLAttributes, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, ReactElement } from 'react';
2
+ import { HTMLAttributes, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, ReactElement, TextareaHTMLAttributes } from 'react';
3
3
  import { Placement } from '@floating-ui/react';
4
4
 
5
5
  interface IAccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue"> {
@@ -74,21 +74,36 @@ interface ICheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "si
74
74
 
75
75
  declare const Checkbox: react.ForwardRefExoticComponent<ICheckboxProps & react.RefAttributes<HTMLInputElement>>;
76
76
 
77
- interface IInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> {
78
- size?: "sm" | "md" | "lg";
77
+ /** Размер для CSS-свойства: число (в пикселях) или готовая CSS-строка. */
78
+ type TCssSize = number | string;
79
+
80
+ interface IDividerProps extends HTMLAttributes<HTMLDivElement> {
81
+ orientation?: "horizontal" | "vertical";
82
+ decorative?: boolean;
83
+ thickness?: TCssSize;
84
+ labelPosition?: "start" | "center" | "end";
85
+ }
86
+
87
+ declare const Divider: {
88
+ ({ orientation, decorative, thickness, labelPosition, className, style, children, ...props }: IDividerProps): ReactNode;
89
+ displayName: string;
90
+ };
91
+
92
+ type TFieldSize = "sm" | "md" | "lg";
93
+ interface IFieldProps {
94
+ size?: TFieldSize;
79
95
  label?: ReactNode;
80
96
  hint?: ReactNode;
81
97
  error?: ReactNode;
98
+ }
99
+
100
+ interface IInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "prefix">, IFieldProps {
82
101
  startIcon?: ReactNode;
83
102
  endIcon?: ReactNode;
84
- className?: string;
85
103
  }
86
104
 
87
105
  declare const Input: react.ForwardRefExoticComponent<IInputProps & react.RefAttributes<HTMLInputElement>>;
88
106
 
89
- /** Размер для CSS-свойства: число (в пикселях) или готовая CSS-строка. */
90
- type TCssSize = number | string;
91
-
92
107
  interface IModalProps {
93
108
  open: boolean;
94
109
  onClose: () => void;
@@ -104,6 +119,18 @@ declare const Modal: {
104
119
  displayName: string;
105
120
  };
106
121
 
122
+ interface IProgressBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
123
+ value?: number;
124
+ max?: number;
125
+ size?: "sm" | "md" | "lg";
126
+ variant?: "accent" | "success" | "danger";
127
+ }
128
+
129
+ declare const ProgressBar: {
130
+ ({ value, max, size, variant, className, style, ...props }: IProgressBarProps): ReactNode;
131
+ displayName: string;
132
+ };
133
+
107
134
  interface IRadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "name"> {
108
135
  size?: "sm" | "md" | "lg";
109
136
  label?: ReactNode;
@@ -194,7 +221,16 @@ interface ITabsProps {
194
221
  className?: string;
195
222
  }
196
223
 
197
- declare const Tabs: ({ items, defaultValue, onChange, className }: ITabsProps) => ReactNode;
224
+ declare const Tabs: {
225
+ ({ items, defaultValue, onChange, className }: ITabsProps): ReactNode;
226
+ displayName: string;
227
+ };
228
+
229
+ interface ITextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, IFieldProps {
230
+ resize?: "vertical" | "none";
231
+ }
232
+
233
+ declare const Textarea: react.ForwardRefExoticComponent<ITextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
198
234
 
199
235
  type TToastVariant = "info" | "success" | "warning" | "error";
200
236
  interface IToastProps extends HTMLAttributes<HTMLDivElement> {
@@ -241,4 +277,4 @@ interface ITooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, "content">
241
277
 
242
278
  declare const Tooltip: ({ content, children, placement, delay, className, ...props }: ITooltipProps) => ReactNode;
243
279
 
244
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, Badge, Button, Checkbox, type IAccordionContentProps, type IAccordionItemProps, type IAccordionProps, type IAccordionTriggerProps, type IAlertProps, type IBadgeProps, type IButtonProps, type ICheckboxProps, type IInputProps, type IModalProps, type IRadioGroupProps, type IRadioProps, type ISkeletonProps, type ISpinnerProps, type ISwitchProps, type ITabItem, type ITabsProps, type IToastOptions, type IToastProps, type IToastProviderProps, type ITooltipProps, type IUseToastResult, Input, Modal, Radio, RadioGroup, Skeleton, Spinner, Switch, type TSpinnerVariant, type TToastVariant, Tabs, Toast, ToastProvider, Tooltip, useToast };
280
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, Badge, Button, Checkbox, Divider, type IAccordionContentProps, type IAccordionItemProps, type IAccordionProps, type IAccordionTriggerProps, type IAlertProps, type IBadgeProps, type IButtonProps, type ICheckboxProps, type IDividerProps, type IInputProps, type IModalProps, type IProgressBarProps, type IRadioGroupProps, type IRadioProps, type ISkeletonProps, type ISpinnerProps, type ISwitchProps, type ITabItem, type ITabsProps, type ITextareaProps, type IToastOptions, type IToastProps, type IToastProviderProps, type ITooltipProps, type IUseToastResult, Input, Modal, ProgressBar, Radio, RadioGroup, Skeleton, Spinner, Switch, type TSpinnerVariant, type TToastVariant, Tabs, Textarea, Toast, ToastProvider, Tooltip, useToast };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { HTMLAttributes, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, ReactElement } from 'react';
2
+ import { HTMLAttributes, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, ReactElement, TextareaHTMLAttributes } from 'react';
3
3
  import { Placement } from '@floating-ui/react';
4
4
 
5
5
  interface IAccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue"> {
@@ -74,21 +74,36 @@ interface ICheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "si
74
74
 
75
75
  declare const Checkbox: react.ForwardRefExoticComponent<ICheckboxProps & react.RefAttributes<HTMLInputElement>>;
76
76
 
77
- interface IInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> {
78
- size?: "sm" | "md" | "lg";
77
+ /** Размер для CSS-свойства: число (в пикселях) или готовая CSS-строка. */
78
+ type TCssSize = number | string;
79
+
80
+ interface IDividerProps extends HTMLAttributes<HTMLDivElement> {
81
+ orientation?: "horizontal" | "vertical";
82
+ decorative?: boolean;
83
+ thickness?: TCssSize;
84
+ labelPosition?: "start" | "center" | "end";
85
+ }
86
+
87
+ declare const Divider: {
88
+ ({ orientation, decorative, thickness, labelPosition, className, style, children, ...props }: IDividerProps): ReactNode;
89
+ displayName: string;
90
+ };
91
+
92
+ type TFieldSize = "sm" | "md" | "lg";
93
+ interface IFieldProps {
94
+ size?: TFieldSize;
79
95
  label?: ReactNode;
80
96
  hint?: ReactNode;
81
97
  error?: ReactNode;
98
+ }
99
+
100
+ interface IInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "prefix">, IFieldProps {
82
101
  startIcon?: ReactNode;
83
102
  endIcon?: ReactNode;
84
- className?: string;
85
103
  }
86
104
 
87
105
  declare const Input: react.ForwardRefExoticComponent<IInputProps & react.RefAttributes<HTMLInputElement>>;
88
106
 
89
- /** Размер для CSS-свойства: число (в пикселях) или готовая CSS-строка. */
90
- type TCssSize = number | string;
91
-
92
107
  interface IModalProps {
93
108
  open: boolean;
94
109
  onClose: () => void;
@@ -104,6 +119,18 @@ declare const Modal: {
104
119
  displayName: string;
105
120
  };
106
121
 
122
+ interface IProgressBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
123
+ value?: number;
124
+ max?: number;
125
+ size?: "sm" | "md" | "lg";
126
+ variant?: "accent" | "success" | "danger";
127
+ }
128
+
129
+ declare const ProgressBar: {
130
+ ({ value, max, size, variant, className, style, ...props }: IProgressBarProps): ReactNode;
131
+ displayName: string;
132
+ };
133
+
107
134
  interface IRadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "name"> {
108
135
  size?: "sm" | "md" | "lg";
109
136
  label?: ReactNode;
@@ -194,7 +221,16 @@ interface ITabsProps {
194
221
  className?: string;
195
222
  }
196
223
 
197
- declare const Tabs: ({ items, defaultValue, onChange, className }: ITabsProps) => ReactNode;
224
+ declare const Tabs: {
225
+ ({ items, defaultValue, onChange, className }: ITabsProps): ReactNode;
226
+ displayName: string;
227
+ };
228
+
229
+ interface ITextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, IFieldProps {
230
+ resize?: "vertical" | "none";
231
+ }
232
+
233
+ declare const Textarea: react.ForwardRefExoticComponent<ITextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
198
234
 
199
235
  type TToastVariant = "info" | "success" | "warning" | "error";
200
236
  interface IToastProps extends HTMLAttributes<HTMLDivElement> {
@@ -241,4 +277,4 @@ interface ITooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, "content">
241
277
 
242
278
  declare const Tooltip: ({ content, children, placement, delay, className, ...props }: ITooltipProps) => ReactNode;
243
279
 
244
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, Badge, Button, Checkbox, type IAccordionContentProps, type IAccordionItemProps, type IAccordionProps, type IAccordionTriggerProps, type IAlertProps, type IBadgeProps, type IButtonProps, type ICheckboxProps, type IInputProps, type IModalProps, type IRadioGroupProps, type IRadioProps, type ISkeletonProps, type ISpinnerProps, type ISwitchProps, type ITabItem, type ITabsProps, type IToastOptions, type IToastProps, type IToastProviderProps, type ITooltipProps, type IUseToastResult, Input, Modal, Radio, RadioGroup, Skeleton, Spinner, Switch, type TSpinnerVariant, type TToastVariant, Tabs, Toast, ToastProvider, Tooltip, useToast };
280
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, Badge, Button, Checkbox, Divider, type IAccordionContentProps, type IAccordionItemProps, type IAccordionProps, type IAccordionTriggerProps, type IAlertProps, type IBadgeProps, type IButtonProps, type ICheckboxProps, type IDividerProps, type IInputProps, type IModalProps, type IProgressBarProps, type IRadioGroupProps, type IRadioProps, type ISkeletonProps, type ISpinnerProps, type ISwitchProps, type ITabItem, type ITabsProps, type ITextareaProps, type IToastOptions, type IToastProps, type IToastProviderProps, type ITooltipProps, type IUseToastResult, Input, Modal, ProgressBar, Radio, RadioGroup, Skeleton, Spinner, Switch, type TSpinnerVariant, type TToastVariant, Tabs, Textarea, Toast, ToastProvider, Tooltip, useToast };