@clasing/ui 0.1.37 → 0.1.39

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.ts CHANGED
@@ -1,16 +1,21 @@
1
1
  import { ClassProp } from 'class-variance-authority/types';
2
2
  import { default as default_2 } from 'react';
3
+ import { Dispatch } from 'react';
3
4
  import { ForwardRefExoticComponent } from 'react';
4
5
  import { JSX as JSX_2 } from 'react/jsx-runtime';
6
+ import { Matcher } from 'react-day-picker';
5
7
  import { ReactNode } from 'react';
6
8
  import { RefAttributes } from 'react';
9
+ import { SetStateAction } from 'react';
7
10
  import * as TablerIcons from '@tabler/icons-react';
8
11
  import { VariantProps } from 'class-variance-authority';
9
12
 
10
13
  declare interface AddToastProps {
14
+ title?: ToastProps['title'];
11
15
  message: ToastProps['message'];
12
16
  intent: ToastProps['intent'];
13
17
  position?: PositionProps;
18
+ canClose?: boolean;
14
19
  duration?: number;
15
20
  }
16
21
 
@@ -169,7 +174,9 @@ declare interface IDatepickerProps extends React.InputHTMLAttributes<HTMLInputEl
169
174
  touched?: boolean;
170
175
  value: string;
171
176
  locale?: 'enGB' | 'enUS' | 'es';
177
+ placement?: PopoverPlacement;
172
178
  placeholder?: string;
179
+ disabledDates?: Matcher | Matcher[] | undefined;
173
180
  minDate?: Date;
174
181
  maxDate?: Date;
175
182
  }
@@ -181,7 +188,9 @@ declare interface IDateRangePickerProps extends React.InputHTMLAttributes<HTMLIn
181
188
  touched?: boolean;
182
189
  startDate: string;
183
190
  endDate: string;
191
+ disabledDates?: Matcher | Matcher[] | undefined;
184
192
  locale?: 'enGB' | 'enUS' | 'es';
193
+ placement?: PopoverPlacement;
185
194
  placeholder?: string;
186
195
  minDate?: Date;
187
196
  maxDate?: Date;
@@ -196,14 +205,14 @@ declare interface IIconComponentProps {
196
205
  onClick?: () => void;
197
206
  }
198
207
 
199
- export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
208
+ export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
200
209
 
201
- declare interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
210
+ declare interface InputProps extends React.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {
202
211
  label?: string;
203
212
  helperText?: string;
204
213
  error?: string;
205
214
  touched?: boolean;
206
- type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
215
+ type?: 'text' | 'textarea' | 'password' | 'email' | 'number' | 'tel' | 'url';
207
216
  iconName?: {
208
217
  name: TablerIconName;
209
218
  stroke?: number;
@@ -223,6 +232,20 @@ declare interface IProgressBarProps extends Omit<React.HTMLAttributes<HTMLDivEle
223
232
  progress: number;
224
233
  }
225
234
 
235
+ declare interface ISelectableChipsProps {
236
+ id?: string;
237
+ label?: string;
238
+ options: Option_2[];
239
+ multiple?: boolean;
240
+ selectedOptions: Option_2['value'] | Option_2['value'][] | undefined;
241
+ setSelectedOptions: Dispatch<SetStateAction<Option_2['value'] | Option_2['value'][] | undefined>>;
242
+ className?: string;
243
+ disabled?: boolean;
244
+ helperText?: string;
245
+ error?: string;
246
+ touched?: boolean;
247
+ }
248
+
226
249
  declare interface ISpinnerProps {
227
250
  className?: string;
228
251
  }
@@ -246,6 +269,13 @@ declare interface ModalProps {
246
269
  canClose?: boolean;
247
270
  }
248
271
 
272
+ declare type Option_2 = {
273
+ value: string | number | boolean | undefined | null;
274
+ label: string;
275
+ notification?: boolean;
276
+ };
277
+ export { Option_2 as Option }
278
+
249
279
  declare interface OutsideClickHandlerProps {
250
280
  ref: React.RefObject<HTMLElement>;
251
281
  handler: () => void;
@@ -265,6 +295,8 @@ declare const progressBarStyles: (props?: ({
265
295
  rounded?: "sm" | "full" | null | undefined;
266
296
  } & ClassProp) | undefined) => string;
267
297
 
298
+ export declare const SelectableChips: ({ id, label, options, multiple, selectedOptions, setSelectedOptions, className, disabled, helperText, error, touched, }: ISelectableChipsProps) => JSX_2.Element | null;
299
+
268
300
  export declare const Spinner: ({ className }: ISpinnerProps) => JSX_2.Element;
269
301
 
270
302
  declare type TablerIconName = keyof typeof TablerIcons;
@@ -282,7 +314,9 @@ export declare const Toast: default_2.ForwardRefExoticComponent<ToastProps & def
282
314
  declare type ToastContextType = (props: AddToastProps) => void;
283
315
 
284
316
  declare interface ToastProps extends default_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof toastStyles> {
317
+ title?: string;
285
318
  message: string;
319
+ canClose?: boolean;
286
320
  onClose: () => void;
287
321
  position?: PositionProps;
288
322
  duration?: number;