@grandbazar/ui-baza 1.2.0 → 1.2.2
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/README.md +34 -1
- package/dist/index.cjs +893 -108
- package/dist/index.d.ts +128 -9
- package/dist/index.js +874 -109
- package/dist/style.css +111 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ export declare namespace Breadcrumbs {
|
|
|
79
79
|
* @param asChild - When true, merges props onto the child element instead of rendering a button
|
|
80
80
|
* @param children - Content to display inside the button
|
|
81
81
|
*/
|
|
82
|
-
export declare function Button({ children, className, color, size, mode, asChild, ...props }:
|
|
82
|
+
export declare function Button({ children, className, color, size, mode, asChild, ...props }: TButtonPropsWithAsChild): JSX.Element;
|
|
83
83
|
|
|
84
84
|
export declare namespace Button {
|
|
85
85
|
var Function: typeof ButtonFunction;
|
|
@@ -151,7 +151,11 @@ declare function DatePickerField({ className, month, year, renderWeekdays, child
|
|
|
151
151
|
|
|
152
152
|
declare function DatePickerWeekDays({ className, locale }: TDatePickerWeekDaysProps): JSX.Element;
|
|
153
153
|
|
|
154
|
-
declare const DROPDOWN_PORTAL_ALIGN_LIST: readonly ["start", "end"];
|
|
154
|
+
declare const DROPDOWN_PORTAL_ALIGN_LIST: readonly ["start", "center", "end"];
|
|
155
|
+
|
|
156
|
+
declare const DROPDOWN_PORTAL_POSITION_LIST: readonly ["bottom", "top", "right", "left"];
|
|
157
|
+
|
|
158
|
+
declare const DROPDOWN_TRIGGER_EVENT_LIST: readonly ["click", "hover"];
|
|
155
159
|
|
|
156
160
|
declare function DropdownContent({ className, children, ...props }: TDropdownContentProps): JSX.Element;
|
|
157
161
|
|
|
@@ -182,11 +186,11 @@ export declare namespace DropdownMenu {
|
|
|
182
186
|
var Portal: typeof DropdownPortal;
|
|
183
187
|
}
|
|
184
188
|
|
|
185
|
-
declare function DropdownPortal({ children, className, align, isNested }: TDropdownPortalProps): ReactPortal | null;
|
|
189
|
+
declare function DropdownPortal({ children, className, align, position, isNested, offset, maxWidth, maxHeight, }: TDropdownPortalProps): ReactPortal | null;
|
|
186
190
|
|
|
187
191
|
declare function DropdownRoot({ children }: TDropdownRootProps): JSX.Element;
|
|
188
192
|
|
|
189
|
-
declare function DropdownTrigger({ children, asChild, ...props }: TDropdownTriggerProps): JSX.Element;
|
|
193
|
+
declare function DropdownTrigger({ children, asChild, triggerEvent, ...props }: TDropdownTriggerProps): JSX.Element;
|
|
190
194
|
|
|
191
195
|
export declare const I18N_MONTH_LABELS: {
|
|
192
196
|
readonly en: readonly ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
@@ -206,6 +210,12 @@ export declare namespace IconArrowCircle {
|
|
|
206
210
|
var Filled: (props: TSvgIconProps) => JSX.Element;
|
|
207
211
|
}
|
|
208
212
|
|
|
213
|
+
export declare function IconArrowCircleUp(props: TSvgIconProps): JSX.Element;
|
|
214
|
+
|
|
215
|
+
export declare namespace IconArrowCircleUp {
|
|
216
|
+
var Filled: (props: TSvgIconProps) => JSX.Element;
|
|
217
|
+
}
|
|
218
|
+
|
|
209
219
|
export declare function IconArrowDiagonal(props: TSvgIconProps): JSX.Element;
|
|
210
220
|
|
|
211
221
|
export declare namespace IconArrowDiagonal {
|
|
@@ -218,6 +228,10 @@ export declare namespace IconArrowUTurn {
|
|
|
218
228
|
var Up: (props: TSvgIconProps) => JSX.Element;
|
|
219
229
|
}
|
|
220
230
|
|
|
231
|
+
export declare function IconBell(props: TSvgIconProps): JSX.Element;
|
|
232
|
+
|
|
233
|
+
export declare function IconBox(props: TSvgIconProps): JSX.Element;
|
|
234
|
+
|
|
221
235
|
export declare function IconCalendar(props: TSvgIconProps): JSX.Element;
|
|
222
236
|
|
|
223
237
|
export declare function IconCharacteristic(props: TSvgIconProps): JSX.Element;
|
|
@@ -232,8 +246,16 @@ export declare namespace IconChevron {
|
|
|
232
246
|
|
|
233
247
|
export declare function IconChevronDouble(props: TSvgIconProps): JSX.Element;
|
|
234
248
|
|
|
249
|
+
export declare function IconClock(props: TSvgIconProps): JSX.Element;
|
|
250
|
+
|
|
235
251
|
export declare function IconCollapse(props: TSvgIconProps): JSX.Element;
|
|
236
252
|
|
|
253
|
+
export declare function IconCopy(props: TSvgIconProps): JSX.Element;
|
|
254
|
+
|
|
255
|
+
export declare function IconDots(props: TSvgIconProps): JSX.Element;
|
|
256
|
+
|
|
257
|
+
export declare function IconDownload(props: TSvgIconProps): JSX.Element;
|
|
258
|
+
|
|
237
259
|
export declare function IconEye(props: TSvgIconProps): JSX.Element;
|
|
238
260
|
|
|
239
261
|
export declare namespace IconEye {
|
|
@@ -242,6 +264,14 @@ export declare namespace IconEye {
|
|
|
242
264
|
|
|
243
265
|
declare function IconEyeOff(props: TSvgIconProps): JSX.Element;
|
|
244
266
|
|
|
267
|
+
export declare function IconFace(props: TSvgIconProps): JSX.Element;
|
|
268
|
+
|
|
269
|
+
export declare namespace IconFace {
|
|
270
|
+
var Sad: (props: TSvgIconProps) => JSX.Element;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export declare function IconFile(props: TSvgIconProps): JSX.Element;
|
|
274
|
+
|
|
245
275
|
export declare function IconFilters(props: TSvgIconProps): JSX.Element;
|
|
246
276
|
|
|
247
277
|
export declare function IconGear(props: TSvgIconProps): JSX.Element;
|
|
@@ -252,12 +282,18 @@ export declare namespace IconGear {
|
|
|
252
282
|
|
|
253
283
|
export declare function IconGoogle(props: TSvgIconProps): JSX.Element;
|
|
254
284
|
|
|
285
|
+
export declare function IconHanger(props: TSvgIconProps): JSX.Element;
|
|
286
|
+
|
|
287
|
+
export declare function IconInfo(props: TSvgIconProps): JSX.Element;
|
|
288
|
+
|
|
255
289
|
export declare function IconLogOut(props: TSvgIconProps): JSX.Element;
|
|
256
290
|
|
|
257
291
|
export declare function IconMail(props: TSvgIconProps): JSX.Element;
|
|
258
292
|
|
|
259
293
|
export declare function IconMinus(props: TSvgIconProps): JSX.Element;
|
|
260
294
|
|
|
295
|
+
export declare function IconOneCircle(props: TSvgIconProps): JSX.Element;
|
|
296
|
+
|
|
261
297
|
export declare function IconPerson(props: TSvgIconProps): JSX.Element;
|
|
262
298
|
|
|
263
299
|
export declare namespace IconPerson {
|
|
@@ -280,6 +316,10 @@ export declare function IconQRCode(props: TSvgIconProps): JSX.Element;
|
|
|
280
316
|
|
|
281
317
|
export declare function IconRequest(props: TSvgIconProps): JSX.Element;
|
|
282
318
|
|
|
319
|
+
export declare function IconResizeCorner(props: TSvgIconProps): JSX.Element;
|
|
320
|
+
|
|
321
|
+
export declare function IconScan(props: TSvgIconProps): JSX.Element;
|
|
322
|
+
|
|
283
323
|
export declare function IconSearch(props: TSvgIconProps): JSX.Element;
|
|
284
324
|
|
|
285
325
|
export declare function IconShopping(props: TSvgIconProps): JSX.Element;
|
|
@@ -290,6 +330,14 @@ export declare namespace IconShopping {
|
|
|
290
330
|
|
|
291
331
|
export declare function IconSort(props: TSvgIconProps): JSX.Element;
|
|
292
332
|
|
|
333
|
+
export declare function IconStar(props: TSvgIconProps): JSX.Element;
|
|
334
|
+
|
|
335
|
+
export declare function IconSticker(props: TSvgIconProps): JSX.Element;
|
|
336
|
+
|
|
337
|
+
export declare function IconStop(props: TSvgIconProps): JSX.Element;
|
|
338
|
+
|
|
339
|
+
export declare function IconSwitch(props: TSvgIconProps): JSX.Element;
|
|
340
|
+
|
|
293
341
|
export declare function IconTelegram(props: TSvgIconProps): JSX.Element;
|
|
294
342
|
|
|
295
343
|
export declare function IconVK(props: TSvgIconProps): JSX.Element;
|
|
@@ -300,6 +348,8 @@ export declare namespace IconXMark {
|
|
|
300
348
|
var Small: typeof IconXMarkSmall;
|
|
301
349
|
}
|
|
302
350
|
|
|
351
|
+
export declare function IconXMarkCircle(props: TSvgIconProps): JSX.Element;
|
|
352
|
+
|
|
303
353
|
declare function IconXMarkSmall(props: TSvgIconProps): JSX.Element;
|
|
304
354
|
|
|
305
355
|
export declare function IconYandex(props: TSvgIconProps): JSX.Element;
|
|
@@ -474,7 +524,7 @@ declare type TAsChildProps<TDefaultElementProps> = ({
|
|
|
474
524
|
asChild?: false;
|
|
475
525
|
} & TDefaultElementProps) | {
|
|
476
526
|
asChild: true;
|
|
477
|
-
children:
|
|
527
|
+
children: React.ReactNode;
|
|
478
528
|
};
|
|
479
529
|
|
|
480
530
|
declare type TBadgeProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -519,7 +569,9 @@ declare type TButtonFunctionProps = TAsChildProps<React.ButtonHTMLAttributes<HTM
|
|
|
519
569
|
disabled?: boolean;
|
|
520
570
|
};
|
|
521
571
|
|
|
522
|
-
export declare type TButtonProps =
|
|
572
|
+
export declare type TButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & TButtonCommonProps;
|
|
573
|
+
|
|
574
|
+
declare type TButtonPropsWithAsChild = TAsChildProps<React.ButtonHTMLAttributes<HTMLButtonElement>> & TButtonCommonProps;
|
|
523
575
|
|
|
524
576
|
export declare type TCalendarDay = {
|
|
525
577
|
date: number;
|
|
@@ -574,23 +626,33 @@ declare type TDropdownItemProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
574
626
|
|
|
575
627
|
declare type TDropdownMenuContextValue = {
|
|
576
628
|
isOpen: boolean;
|
|
577
|
-
setIsOpen:
|
|
629
|
+
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
578
630
|
triggerRef: React.RefObject<HTMLButtonElement | null>;
|
|
579
631
|
portalRef: React.RefObject<HTMLDivElement | null>;
|
|
632
|
+
triggerEvent: TArrayElement<typeof DROPDOWN_TRIGGER_EVENT_LIST>;
|
|
633
|
+
setTriggerEvent: React.Dispatch<React.SetStateAction<TArrayElement<typeof DROPDOWN_TRIGGER_EVENT_LIST>>>;
|
|
634
|
+
portalPlacement: TPortalPlacement | null;
|
|
635
|
+
setPortalPlacement: React.Dispatch<React.SetStateAction<TPortalPlacement | null>>;
|
|
580
636
|
};
|
|
581
637
|
|
|
582
638
|
declare type TDropdownPortalProps = {
|
|
583
639
|
children: React.ReactNode;
|
|
584
640
|
className?: string;
|
|
585
641
|
align?: TArrayElement<typeof DROPDOWN_PORTAL_ALIGN_LIST>;
|
|
642
|
+
position?: TArrayElement<typeof DROPDOWN_PORTAL_POSITION_LIST>;
|
|
586
643
|
isNested?: boolean;
|
|
644
|
+
offset?: number;
|
|
645
|
+
maxWidth?: number;
|
|
646
|
+
maxHeight?: number;
|
|
587
647
|
};
|
|
588
648
|
|
|
589
649
|
declare type TDropdownRootProps = {
|
|
590
|
-
children: React.ReactNode | ((context: Pick<TDropdownMenuContextValue, 'isOpen' | 'setIsOpen'>) => React.ReactNode);
|
|
650
|
+
children: React.ReactNode | ((context: Pick<TDropdownMenuContextValue, 'isOpen' | 'setIsOpen' | 'portalPlacement'>) => React.ReactNode);
|
|
591
651
|
};
|
|
592
652
|
|
|
593
|
-
declare type TDropdownTriggerProps = TAsChildProps<React.HTMLAttributes<HTMLButtonElement
|
|
653
|
+
declare type TDropdownTriggerProps = TAsChildProps<React.HTMLAttributes<HTMLButtonElement>> & {
|
|
654
|
+
triggerEvent?: TArrayElement<typeof DROPDOWN_TRIGGER_EVENT_LIST>;
|
|
655
|
+
};
|
|
594
656
|
|
|
595
657
|
declare const TEXT_FIELD_SIZES: readonly ["lg", "md"];
|
|
596
658
|
|
|
@@ -625,6 +687,37 @@ declare type TLabel<T = string> = Record<TLocale, T>;
|
|
|
625
687
|
|
|
626
688
|
declare type TLocale = TArrayElement<typeof LOCALES>;
|
|
627
689
|
|
|
690
|
+
/**
|
|
691
|
+
* Tooltip is a compound component for displaying contextual hints.
|
|
692
|
+
* Provides a trigger wrapper and content rendering for short descriptions.
|
|
693
|
+
*
|
|
694
|
+
* @param children - Trigger element for the tooltip
|
|
695
|
+
* @param className - Additional CSS classes for the tooltip content
|
|
696
|
+
* @param title - Optional title text
|
|
697
|
+
* @param description - Optional description text
|
|
698
|
+
* @param align - Alignment for the tooltip content (start, center, end)
|
|
699
|
+
* @param position - Preferred placement of the tooltip content
|
|
700
|
+
* @param triggerEvent - Trigger behavior (hover, click)
|
|
701
|
+
* @param maxWidth - Max width of the tooltip content in pixels (required for horizontal flip)
|
|
702
|
+
* @param maxHeight - Max height of the tooltip content in pixels (required for vertical flip)
|
|
703
|
+
* @param arrowOffset - Arrow offset in pixels for inline and block axes
|
|
704
|
+
* @param withoutArrow - Hide tooltip arrow
|
|
705
|
+
*
|
|
706
|
+
* @example
|
|
707
|
+
* <Tooltip title="Title" description="Details">
|
|
708
|
+
* <button>Hover me</button>
|
|
709
|
+
* </Tooltip>
|
|
710
|
+
*/
|
|
711
|
+
export declare function Tooltip(props: React.ComponentProps<typeof TooltipRoot>): JSX.Element;
|
|
712
|
+
|
|
713
|
+
export declare namespace Tooltip {
|
|
714
|
+
var Content: typeof TooltipContent;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
declare function TooltipContent({ className, role, title, description, arrowAlign, arrowPosition, arrowOffset, ...props }: TTooltipContentProps): JSX.Element;
|
|
718
|
+
|
|
719
|
+
declare function TooltipRoot({ children, align, position, triggerEvent, maxWidth, maxHeight, withoutArrow, ...tooltipContentProps }: TTooltipRootProps): JSX.Element;
|
|
720
|
+
|
|
628
721
|
declare type TPaginationItemProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
629
722
|
size?: TArrayElement<typeof PAGINATION_SIZES>;
|
|
630
723
|
isCurrent?: boolean;
|
|
@@ -642,6 +735,11 @@ declare type TPaginationRootProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
642
735
|
renderEllipsis?: () => React.ReactNode;
|
|
643
736
|
};
|
|
644
737
|
|
|
738
|
+
declare type TPortalPlacement = {
|
|
739
|
+
position: TArrayElement<typeof DROPDOWN_PORTAL_POSITION_LIST>;
|
|
740
|
+
align: TArrayElement<typeof DROPDOWN_PORTAL_ALIGN_LIST>;
|
|
741
|
+
};
|
|
742
|
+
|
|
645
743
|
declare type TProgressBarLinearProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
646
744
|
size?: TArrayElement<typeof PROGRESS_BAR_SIZES>;
|
|
647
745
|
percent: number;
|
|
@@ -740,6 +838,27 @@ declare type TTextFieldRootProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
740
838
|
size?: TArrayElement<typeof TEXT_FIELD_SIZES>;
|
|
741
839
|
};
|
|
742
840
|
|
|
841
|
+
declare type TTooltipContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
842
|
+
title?: string;
|
|
843
|
+
description?: string;
|
|
844
|
+
arrowAlign?: TArrayElement<typeof DROPDOWN_PORTAL_ALIGN_LIST>;
|
|
845
|
+
arrowPosition?: TArrayElement<typeof DROPDOWN_PORTAL_POSITION_LIST>;
|
|
846
|
+
arrowOffset?: {
|
|
847
|
+
inline: number;
|
|
848
|
+
block: number;
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
declare type TTooltipRootProps = Omit<React.ComponentProps<typeof TooltipContent>, 'arrowAlign' | 'arrowPosition'> & {
|
|
853
|
+
children: React.ReactNode;
|
|
854
|
+
triggerEvent?: TArrayElement<typeof DROPDOWN_TRIGGER_EVENT_LIST>;
|
|
855
|
+
align?: TArrayElement<typeof DROPDOWN_PORTAL_ALIGN_LIST>;
|
|
856
|
+
position?: TArrayElement<typeof DROPDOWN_PORTAL_POSITION_LIST>;
|
|
857
|
+
maxWidth?: number;
|
|
858
|
+
maxHeight?: number;
|
|
859
|
+
withoutArrow?: boolean;
|
|
860
|
+
};
|
|
861
|
+
|
|
743
862
|
declare type TWithRef<TProps, TElement = HTMLElement> = TProps & {
|
|
744
863
|
ref?: React.Ref<TElement>;
|
|
745
864
|
};
|