gd-ui-library 1.0.24 → 1.0.25

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.mts CHANGED
@@ -2,6 +2,7 @@ import { ClassValue } from 'clsx';
2
2
  import React, { ReactNode } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { AxiosRequestConfig } from 'axios';
5
+ import { CountryCode } from 'libphonenumber-js';
5
6
 
6
7
  declare function cn(...inputs: ClassValue[]): string;
7
8
 
@@ -934,17 +935,11 @@ interface ResourceService<T, ID = string | number> {
934
935
  declare function createResourceService<T, ID = string | number>(baseUrl: string): ResourceService<T, ID>;
935
936
 
936
937
  type ValidatorFunction = (value: any) => string | undefined | Promise<string | undefined>;
937
- interface SlugOptions {
938
+ interface BaseOptions {
938
939
  required?: boolean;
939
- minLength?: number;
940
- maxLength?: number;
941
- allowNumbers?: boolean;
942
- allowUnderscores?: boolean;
943
- allowDots?: boolean;
944
- separator?: string;
945
940
  fieldName?: string;
941
+ message?: string;
946
942
  }
947
- declare const validateSlug: (options?: SlugOptions) => ValidatorFunction;
948
943
 
949
944
  interface EmailOptions {
950
945
  required?: boolean;
@@ -970,6 +965,7 @@ interface ImageOptions {
970
965
  minHeight?: number;
971
966
  aspectRatio?: number;
972
967
  fieldName?: string;
968
+ validateUrlStatus?: boolean;
973
969
  }
974
970
  declare const validateImage: (options?: ImageOptions) => ValidatorFunction;
975
971
 
@@ -1016,6 +1012,14 @@ interface PasswordOptions {
1016
1012
  }
1017
1013
  declare const validatePassword: (options?: PasswordOptions) => ValidatorFunction;
1018
1014
 
1015
+ interface PhoneOptions {
1016
+ required?: boolean;
1017
+ defaultCountry?: CountryCode;
1018
+ fieldName?: string;
1019
+ strict?: boolean;
1020
+ }
1021
+ declare const validatePhone: (options?: PhoneOptions) => ValidatorFunction;
1022
+
1019
1023
  interface RequiredOptions {
1020
1024
  message?: string;
1021
1025
  trim?: boolean;
@@ -1039,6 +1043,18 @@ interface ShortDescriptionOptions {
1039
1043
  }
1040
1044
  declare const validateShortDescription: (options?: ShortDescriptionOptions) => ValidatorFunction;
1041
1045
 
1046
+ interface SlugOptions {
1047
+ required?: boolean;
1048
+ minLength?: number;
1049
+ maxLength?: number;
1050
+ allowNumbers?: boolean;
1051
+ allowUnderscores?: boolean;
1052
+ allowDots?: boolean;
1053
+ separator?: string;
1054
+ fieldName?: string;
1055
+ }
1056
+ declare const validateSlug: (options?: SlugOptions) => ValidatorFunction;
1057
+
1042
1058
  interface UrlOptions {
1043
1059
  required?: boolean;
1044
1060
  protocols?: string[];
@@ -1050,4 +1066,4 @@ interface UrlOptions {
1050
1066
  }
1051
1067
  declare const validateUrl: (options?: UrlOptions) => ValidatorFunction;
1052
1068
 
1053
- export { Accordion, Alert, type ApiConfig, ApiService, type ApiState, AutoComplete, Avatar, Badge, Banner, Breadcrumb, Button, Calendar, type CalendarEvent, CalendarWithEvents, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CartItem, Chart, type ChartDataset, type ChartType, Checkbox, Chip, ClickAwayListener, CodeEditor, ColorPicker, Container, type CropArea, DatePicker, DebouncedInput, Dialog, Drawer, Dropdown, type DropdownItem, type DropdownProps, EmailComposer, type EmailOptions, EmptyState, type FileItem, FileManager, FileUpload, type FilterGroup, type FilterOption, Footer, FormBuilder, type FormField, type FormFieldType, GanttChart, type GanttTask, Grid, Hero, IconSelect, type IconSelectProps, ImageCrop, type ImageCropHandle, type ImageCropProps, type ImageOptions, InfiniteScroll, Input, InputGroup, Kanban, LazyLoad, List, ListItem, type LongDescriptionOptions, MasonryGrid, type NameOptions, Navbar, OTPInput, Pagination, type PasswordOptions, Popover, Portal, ProductFilter, ProgressBar, Radio, Rating, type RequiredOptions, type ResourceService, RichTextEditor, Section, Select, ShoppingCart, type ShortDescriptionOptions, Sidebar, type SidebarItem, type SidebarProps, Skeleton, Slider, type SlugOptions, Spinner, SplitPane, Stack, Statistic, StatusIndicator, Stepper, Table, Tabs, Textarea, TimePicker, Timeline, type ToastOptions, type ToastVariant, Toaster, Toggle, Tooltip, Transition, TreeView, type UrlOptions, type ValidatorFunction, VirtualScroll, api, clearCache, cn, createResourceService, queryCache, toast, useApi, useMutation, useQuery, validateEmail, validateImage, validateLongDescription, validateName, validatePassword, validateRequired, validateShortDescription, validateSlug, validateUrl };
1069
+ export { Accordion, Alert, type ApiConfig, ApiService, type ApiState, AutoComplete, Avatar, Badge, Banner, type BaseOptions, Breadcrumb, Button, Calendar, type CalendarEvent, CalendarWithEvents, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CartItem, Chart, type ChartDataset, type ChartType, Checkbox, Chip, ClickAwayListener, CodeEditor, ColorPicker, Container, type CropArea, DatePicker, DebouncedInput, Dialog, Drawer, Dropdown, type DropdownItem, type DropdownProps, EmailComposer, type EmailOptions, EmptyState, type FileItem, FileManager, FileUpload, type FilterGroup, type FilterOption, Footer, FormBuilder, type FormField, type FormFieldType, GanttChart, type GanttTask, Grid, Hero, IconSelect, type IconSelectProps, ImageCrop, type ImageCropHandle, type ImageCropProps, type ImageOptions, InfiniteScroll, Input, InputGroup, Kanban, LazyLoad, List, ListItem, type LongDescriptionOptions, MasonryGrid, type NameOptions, Navbar, OTPInput, Pagination, type PasswordOptions, type PhoneOptions, Popover, Portal, ProductFilter, ProgressBar, Radio, Rating, type RequiredOptions, type ResourceService, RichTextEditor, Section, Select, ShoppingCart, type ShortDescriptionOptions, Sidebar, type SidebarItem, type SidebarProps, Skeleton, Slider, type SlugOptions, Spinner, SplitPane, Stack, Statistic, StatusIndicator, Stepper, Table, Tabs, Textarea, TimePicker, Timeline, type ToastOptions, type ToastVariant, Toaster, Toggle, Tooltip, Transition, TreeView, type UrlOptions, type ValidatorFunction, VirtualScroll, api, clearCache, cn, createResourceService, queryCache, toast, useApi, useMutation, useQuery, validateEmail, validateImage, validateLongDescription, validateName, validatePassword, validatePhone, validateRequired, validateShortDescription, validateSlug, validateUrl };
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { ClassValue } from 'clsx';
2
2
  import React, { ReactNode } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { AxiosRequestConfig } from 'axios';
5
+ import { CountryCode } from 'libphonenumber-js';
5
6
 
6
7
  declare function cn(...inputs: ClassValue[]): string;
7
8
 
@@ -934,17 +935,11 @@ interface ResourceService<T, ID = string | number> {
934
935
  declare function createResourceService<T, ID = string | number>(baseUrl: string): ResourceService<T, ID>;
935
936
 
936
937
  type ValidatorFunction = (value: any) => string | undefined | Promise<string | undefined>;
937
- interface SlugOptions {
938
+ interface BaseOptions {
938
939
  required?: boolean;
939
- minLength?: number;
940
- maxLength?: number;
941
- allowNumbers?: boolean;
942
- allowUnderscores?: boolean;
943
- allowDots?: boolean;
944
- separator?: string;
945
940
  fieldName?: string;
941
+ message?: string;
946
942
  }
947
- declare const validateSlug: (options?: SlugOptions) => ValidatorFunction;
948
943
 
949
944
  interface EmailOptions {
950
945
  required?: boolean;
@@ -970,6 +965,7 @@ interface ImageOptions {
970
965
  minHeight?: number;
971
966
  aspectRatio?: number;
972
967
  fieldName?: string;
968
+ validateUrlStatus?: boolean;
973
969
  }
974
970
  declare const validateImage: (options?: ImageOptions) => ValidatorFunction;
975
971
 
@@ -1016,6 +1012,14 @@ interface PasswordOptions {
1016
1012
  }
1017
1013
  declare const validatePassword: (options?: PasswordOptions) => ValidatorFunction;
1018
1014
 
1015
+ interface PhoneOptions {
1016
+ required?: boolean;
1017
+ defaultCountry?: CountryCode;
1018
+ fieldName?: string;
1019
+ strict?: boolean;
1020
+ }
1021
+ declare const validatePhone: (options?: PhoneOptions) => ValidatorFunction;
1022
+
1019
1023
  interface RequiredOptions {
1020
1024
  message?: string;
1021
1025
  trim?: boolean;
@@ -1039,6 +1043,18 @@ interface ShortDescriptionOptions {
1039
1043
  }
1040
1044
  declare const validateShortDescription: (options?: ShortDescriptionOptions) => ValidatorFunction;
1041
1045
 
1046
+ interface SlugOptions {
1047
+ required?: boolean;
1048
+ minLength?: number;
1049
+ maxLength?: number;
1050
+ allowNumbers?: boolean;
1051
+ allowUnderscores?: boolean;
1052
+ allowDots?: boolean;
1053
+ separator?: string;
1054
+ fieldName?: string;
1055
+ }
1056
+ declare const validateSlug: (options?: SlugOptions) => ValidatorFunction;
1057
+
1042
1058
  interface UrlOptions {
1043
1059
  required?: boolean;
1044
1060
  protocols?: string[];
@@ -1050,4 +1066,4 @@ interface UrlOptions {
1050
1066
  }
1051
1067
  declare const validateUrl: (options?: UrlOptions) => ValidatorFunction;
1052
1068
 
1053
- export { Accordion, Alert, type ApiConfig, ApiService, type ApiState, AutoComplete, Avatar, Badge, Banner, Breadcrumb, Button, Calendar, type CalendarEvent, CalendarWithEvents, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CartItem, Chart, type ChartDataset, type ChartType, Checkbox, Chip, ClickAwayListener, CodeEditor, ColorPicker, Container, type CropArea, DatePicker, DebouncedInput, Dialog, Drawer, Dropdown, type DropdownItem, type DropdownProps, EmailComposer, type EmailOptions, EmptyState, type FileItem, FileManager, FileUpload, type FilterGroup, type FilterOption, Footer, FormBuilder, type FormField, type FormFieldType, GanttChart, type GanttTask, Grid, Hero, IconSelect, type IconSelectProps, ImageCrop, type ImageCropHandle, type ImageCropProps, type ImageOptions, InfiniteScroll, Input, InputGroup, Kanban, LazyLoad, List, ListItem, type LongDescriptionOptions, MasonryGrid, type NameOptions, Navbar, OTPInput, Pagination, type PasswordOptions, Popover, Portal, ProductFilter, ProgressBar, Radio, Rating, type RequiredOptions, type ResourceService, RichTextEditor, Section, Select, ShoppingCart, type ShortDescriptionOptions, Sidebar, type SidebarItem, type SidebarProps, Skeleton, Slider, type SlugOptions, Spinner, SplitPane, Stack, Statistic, StatusIndicator, Stepper, Table, Tabs, Textarea, TimePicker, Timeline, type ToastOptions, type ToastVariant, Toaster, Toggle, Tooltip, Transition, TreeView, type UrlOptions, type ValidatorFunction, VirtualScroll, api, clearCache, cn, createResourceService, queryCache, toast, useApi, useMutation, useQuery, validateEmail, validateImage, validateLongDescription, validateName, validatePassword, validateRequired, validateShortDescription, validateSlug, validateUrl };
1069
+ export { Accordion, Alert, type ApiConfig, ApiService, type ApiState, AutoComplete, Avatar, Badge, Banner, type BaseOptions, Breadcrumb, Button, Calendar, type CalendarEvent, CalendarWithEvents, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CartItem, Chart, type ChartDataset, type ChartType, Checkbox, Chip, ClickAwayListener, CodeEditor, ColorPicker, Container, type CropArea, DatePicker, DebouncedInput, Dialog, Drawer, Dropdown, type DropdownItem, type DropdownProps, EmailComposer, type EmailOptions, EmptyState, type FileItem, FileManager, FileUpload, type FilterGroup, type FilterOption, Footer, FormBuilder, type FormField, type FormFieldType, GanttChart, type GanttTask, Grid, Hero, IconSelect, type IconSelectProps, ImageCrop, type ImageCropHandle, type ImageCropProps, type ImageOptions, InfiniteScroll, Input, InputGroup, Kanban, LazyLoad, List, ListItem, type LongDescriptionOptions, MasonryGrid, type NameOptions, Navbar, OTPInput, Pagination, type PasswordOptions, type PhoneOptions, Popover, Portal, ProductFilter, ProgressBar, Radio, Rating, type RequiredOptions, type ResourceService, RichTextEditor, Section, Select, ShoppingCart, type ShortDescriptionOptions, Sidebar, type SidebarItem, type SidebarProps, Skeleton, Slider, type SlugOptions, Spinner, SplitPane, Stack, Statistic, StatusIndicator, Stepper, Table, Tabs, Textarea, TimePicker, Timeline, type ToastOptions, type ToastVariant, Toaster, Toggle, Tooltip, Transition, TreeView, type UrlOptions, type ValidatorFunction, VirtualScroll, api, clearCache, cn, createResourceService, queryCache, toast, useApi, useMutation, useQuery, validateEmail, validateImage, validateLongDescription, validateName, validatePassword, validatePhone, validateRequired, validateShortDescription, validateSlug, validateUrl };