@grandbazar/ui-baza 1.2.1 → 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/dist/index.d.ts CHANGED
@@ -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;
@@ -576,23 +626,33 @@ declare type TDropdownItemProps = React.HTMLAttributes<HTMLDivElement> & {
576
626
 
577
627
  declare type TDropdownMenuContextValue = {
578
628
  isOpen: boolean;
579
- setIsOpen: (isOpen: boolean) => void;
629
+ setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
580
630
  triggerRef: React.RefObject<HTMLButtonElement | null>;
581
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>>;
582
636
  };
583
637
 
584
638
  declare type TDropdownPortalProps = {
585
639
  children: React.ReactNode;
586
640
  className?: string;
587
641
  align?: TArrayElement<typeof DROPDOWN_PORTAL_ALIGN_LIST>;
642
+ position?: TArrayElement<typeof DROPDOWN_PORTAL_POSITION_LIST>;
588
643
  isNested?: boolean;
644
+ offset?: number;
645
+ maxWidth?: number;
646
+ maxHeight?: number;
589
647
  };
590
648
 
591
649
  declare type TDropdownRootProps = {
592
- children: React.ReactNode | ((context: Pick<TDropdownMenuContextValue, 'isOpen' | 'setIsOpen'>) => React.ReactNode);
650
+ children: React.ReactNode | ((context: Pick<TDropdownMenuContextValue, 'isOpen' | 'setIsOpen' | 'portalPlacement'>) => React.ReactNode);
593
651
  };
594
652
 
595
- declare type TDropdownTriggerProps = TAsChildProps<React.HTMLAttributes<HTMLButtonElement>>;
653
+ declare type TDropdownTriggerProps = TAsChildProps<React.HTMLAttributes<HTMLButtonElement>> & {
654
+ triggerEvent?: TArrayElement<typeof DROPDOWN_TRIGGER_EVENT_LIST>;
655
+ };
596
656
 
597
657
  declare const TEXT_FIELD_SIZES: readonly ["lg", "md"];
598
658
 
@@ -627,6 +687,37 @@ declare type TLabel<T = string> = Record<TLocale, T>;
627
687
 
628
688
  declare type TLocale = TArrayElement<typeof LOCALES>;
629
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
+
630
721
  declare type TPaginationItemProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
631
722
  size?: TArrayElement<typeof PAGINATION_SIZES>;
632
723
  isCurrent?: boolean;
@@ -644,6 +735,11 @@ declare type TPaginationRootProps = React.HTMLAttributes<HTMLDivElement> & {
644
735
  renderEllipsis?: () => React.ReactNode;
645
736
  };
646
737
 
738
+ declare type TPortalPlacement = {
739
+ position: TArrayElement<typeof DROPDOWN_PORTAL_POSITION_LIST>;
740
+ align: TArrayElement<typeof DROPDOWN_PORTAL_ALIGN_LIST>;
741
+ };
742
+
647
743
  declare type TProgressBarLinearProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
648
744
  size?: TArrayElement<typeof PROGRESS_BAR_SIZES>;
649
745
  percent: number;
@@ -742,6 +838,27 @@ declare type TTextFieldRootProps = React.HTMLAttributes<HTMLDivElement> & {
742
838
  size?: TArrayElement<typeof TEXT_FIELD_SIZES>;
743
839
  };
744
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
+
745
862
  declare type TWithRef<TProps, TElement = HTMLElement> = TProps & {
746
863
  ref?: React.Ref<TElement>;
747
864
  };