@memori.ai/ui 1.1.0 → 1.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
 
2
2
 
3
+ ## [1.3.0](https://github.com/memori-ai/ui/compare/v1.2.0...v1.3.0) (2026-02-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * add size prop to Drawer component ([21c7e2f](https://github.com/memori-ai/ui/commit/21c7e2f95eacac6142577c3a5a4bb6c91b411153))
9
+ * enhance SelectBox component with improved positioning and styling ([2246a34](https://github.com/memori-ai/ui/commit/2246a348b9d9dda19aa1834252f89b0ea0a640a5))
10
+
11
+ ## [1.2.0](https://github.com/memori-ai/ui/compare/v1.1.0...v1.2.0) (2026-02-03)
12
+
13
+
14
+ ### Features
15
+
16
+ * add Dropdown component with stories and styles ([bd96aac](https://github.com/memori-ai/ui/commit/bd96aaccfc35e0928c4de931ee91cabcc2e839d3))
17
+ * enhance Button, Modal, and Slider components with new props ([f0f9f46](https://github.com/memori-ai/ui/commit/f0f9f46d443b87ecf8fd4c76a7a80fed0104b8f2))
18
+
3
19
  ## [1.1.0](https://github.com/memori-ai/ui/compare/v1.0.5-alpha...v1.1.0) (2026-02-03)
4
20
 
5
21
 
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@ import { InputProps as InputProps_2 } from '@base-ui/react/input';
8
8
  import { InteractionType } from '@base-ui/utils/useEnhancedClickHandler';
9
9
  import { JSX } from 'react/jsx-runtime';
10
10
  import { JSX as JSX_2 } from 'react';
11
+ import { Menu } from '@base-ui/react/menu';
12
+ import { MenuRootProps } from '@base-ui/react/menu';
11
13
  import * as React_2 from 'react';
12
14
  import { UseToastManagerReturnValue } from '@base-ui/react';
13
15
 
@@ -150,7 +152,7 @@ export declare interface AlertViewportProps {
150
152
 
151
153
  export declare const Button: default_2.ForwardRefExoticComponent<ButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
152
154
 
153
- declare interface ButtonProps extends Omit<ButtonProps_2, 'className'> {
155
+ declare interface ButtonProps extends Omit<ButtonProps_2, 'className'>, Pick<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'title' | 'name' | 'form' | 'formAction' | 'formEncType' | 'formMethod' | 'formNoValidate' | 'formTarget' | 'autoFocus'> {
154
156
  /**
155
157
  * Button variant
156
158
  * @default 'primary'
@@ -461,6 +463,11 @@ declare interface DrawerProps {
461
463
  * @default 'right'
462
464
  */
463
465
  anchor?: 'left' | 'right' | 'top' | 'bottom';
466
+ /**
467
+ * Size of the drawer (width for left/right, height for top/bottom).
468
+ * @default 'sm'
469
+ */
470
+ size?: 'sm' | 'md' | 'lg';
464
471
  /**
465
472
  * The contents of the drawer.
466
473
  */
@@ -502,6 +509,155 @@ declare interface DrawerProps {
502
509
  closable?: boolean;
503
510
  }
504
511
 
512
+ export declare const Dropdown: default_2.ForwardRefExoticComponent<DropdownProps & default_2.RefAttributes<HTMLDivElement>> & {
513
+ Trigger: default_2.ForwardRefExoticComponent<DropdownTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
514
+ Menu: typeof DropdownMenu;
515
+ Item: default_2.ForwardRefExoticComponent<DropdownItemProps & default_2.RefAttributes<HTMLDivElement>>;
516
+ Separator: default_2.ForwardRefExoticComponent<DropdownSeparatorProps & default_2.RefAttributes<HTMLDivElement>>;
517
+ Group: default_2.ForwardRefExoticComponent<DropdownGroupProps & default_2.RefAttributes<HTMLDivElement>>;
518
+ GroupLabel: default_2.ForwardRefExoticComponent<DropdownGroupLabelProps & default_2.RefAttributes<HTMLDivElement>>;
519
+ };
520
+
521
+ declare interface DropdownGroupLabelProps extends Omit<default_2.ComponentPropsWithoutRef<typeof Menu.GroupLabel>, 'className' | 'style'> {
522
+ children?: default_2.ReactNode;
523
+ className?: string;
524
+ style?: default_2.CSSProperties;
525
+ }
526
+
527
+ declare interface DropdownGroupProps extends Omit<default_2.ComponentPropsWithoutRef<typeof Menu.Group>, 'className' | 'style'> {
528
+ children?: default_2.ReactNode;
529
+ className?: string;
530
+ style?: default_2.CSSProperties;
531
+ }
532
+
533
+ declare interface DropdownItemProps extends Omit<default_2.ComponentPropsWithoutRef<typeof Menu.Item>, 'className' | 'style'> {
534
+ /**
535
+ * Content of the item.
536
+ */
537
+ children?: default_2.ReactNode;
538
+ /**
539
+ * If true, the item is disabled.
540
+ * @default false
541
+ */
542
+ disabled?: boolean;
543
+ /**
544
+ * If true, the menu closes when this item is clicked.
545
+ * @default true
546
+ */
547
+ closeOnClick?: boolean;
548
+ /**
549
+ * Overrides the accessible name for type-ahead.
550
+ */
551
+ label?: string;
552
+ /**
553
+ * Additional CSS class name.
554
+ */
555
+ className?: string;
556
+ /**
557
+ * Inline styles.
558
+ */
559
+ style?: default_2.CSSProperties;
560
+ }
561
+
562
+ declare function DropdownMenu({ children, sideOffset, placement, align, container, className, style, }: DropdownMenuProps): JSX.Element;
563
+
564
+ declare namespace DropdownMenu {
565
+ var displayName: string;
566
+ }
567
+
568
+ declare interface DropdownMenuProps {
569
+ /**
570
+ * Menu content (DropdownItem, DropdownSeparator, etc.).
571
+ */
572
+ children?: default_2.ReactNode;
573
+ /**
574
+ * Offset in pixels between trigger and popup.
575
+ * @default 8
576
+ */
577
+ sideOffset?: number;
578
+ /**
579
+ * Preferred placement: which side of the trigger.
580
+ * @default 'bottom'
581
+ */
582
+ placement?: 'top' | 'bottom' | 'left' | 'right';
583
+ /**
584
+ * Alignment relative to the trigger.
585
+ * @default 'start'
586
+ */
587
+ align?: 'start' | 'center' | 'end';
588
+ /**
589
+ * Container element for the portal. Defaults to document.body.
590
+ */
591
+ container?: HTMLElement | null;
592
+ /**
593
+ * Additional CSS class name for the popup.
594
+ */
595
+ className?: string;
596
+ /**
597
+ * Inline styles for the popup.
598
+ */
599
+ style?: default_2.CSSProperties;
600
+ }
601
+
602
+ declare interface DropdownProps extends Omit<MenuRootProps, 'className' | 'style'> {
603
+ /**
604
+ * Whether the dropdown is open (controlled).
605
+ */
606
+ open?: boolean;
607
+ /**
608
+ * Whether the dropdown is initially open (uncontrolled).
609
+ * @default false
610
+ */
611
+ defaultOpen?: boolean;
612
+ /**
613
+ * Callback fired when the open state changes.
614
+ * @param open - The new open state
615
+ */
616
+ onOpenChange?: (open: boolean) => void;
617
+ /**
618
+ * If true, the dropdown trigger and menu are disabled.
619
+ * @default false
620
+ */
621
+ disabled?: boolean;
622
+ /**
623
+ * Additional CSS class name for the root wrapper.
624
+ */
625
+ className?: string;
626
+ /**
627
+ * Inline styles for the root.
628
+ */
629
+ style?: default_2.CSSProperties;
630
+ /**
631
+ * Content: DropdownTrigger and DropdownMenu.
632
+ */
633
+ children?: default_2.ReactNode;
634
+ }
635
+
636
+ declare interface DropdownSeparatorProps extends Omit<default_2.ComponentPropsWithoutRef<typeof Menu.Separator>, 'className' | 'style'> {
637
+ className?: string;
638
+ style?: default_2.CSSProperties;
639
+ }
640
+
641
+ declare interface DropdownTriggerProps extends Omit<default_2.ComponentPropsWithoutRef<typeof Menu.Trigger>, 'className' | 'style'> {
642
+ /**
643
+ * Content of the trigger (e.g. button text or icon).
644
+ */
645
+ children?: default_2.ReactNode;
646
+ /**
647
+ * Whether to show the chevron icon.
648
+ * @default true
649
+ */
650
+ showChevron?: boolean;
651
+ /**
652
+ * Additional CSS class name for the trigger button.
653
+ */
654
+ className?: string;
655
+ /**
656
+ * Inline styles for the trigger button.
657
+ */
658
+ style?: default_2.CSSProperties;
659
+ }
660
+
505
661
  export declare const Expandable: ({ rows, className, innerClassName, btnClassName, lineHeightMultiplier, defaultExpanded, expandSymbol, collapseSymbol, children, mode, }: Props) => JSX.Element;
506
662
 
507
663
  export declare const Input: default_2.ForwardRefExoticComponent<InputProps & default_2.RefAttributes<HTMLInputElement>>;
@@ -565,6 +721,10 @@ declare interface ModalProps extends Omit<DialogRootProps, 'className' | 'style'
565
721
  * @param open - The new open state
566
722
  */
567
723
  onOpenChange?: (open: boolean) => void;
724
+ /**
725
+ * Callback fired when the modal is closed (convenience prop, matches Drawer).
726
+ */
727
+ onClose?: () => void;
568
728
  /**
569
729
  * Modal title displayed at the top
570
730
  */
@@ -778,12 +938,17 @@ declare interface SelectBoxProps {
778
938
  style?: default_2.CSSProperties;
779
939
  }
780
940
 
781
- export declare const Slider: ({ min, max, step, defaultValue, label, onChange, disabled, }: SliderProps) => JSX.Element;
941
+ export declare const Slider: ({ min, max, step, value: valueProp, defaultValue, label, onChange, disabled, }: SliderProps) => JSX.Element;
782
942
 
783
943
  declare interface SliderProps {
784
944
  min?: number;
785
945
  max?: number;
786
946
  step?: number;
947
+ /**
948
+ * Controlled value. When provided, the thumb position is driven by this prop
949
+ * (e.g. for presets). Omit to use uncontrolled mode with defaultValue.
950
+ */
951
+ value?: number;
787
952
  defaultValue?: number;
788
953
  label?: string | default_2.ReactNode;
789
954
  onChange?: (value: number) => void;