bsm-design-system 1.7.1 → 1.8.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/index.d.mts CHANGED
@@ -493,31 +493,39 @@ declare const contentVariants: tailwind_variants.TVReturnType<{
493
493
  sm: string;
494
494
  md: string;
495
495
  lg: string;
496
+ xl: string;
497
+ full: string;
496
498
  };
497
499
  }, undefined, "bg-background-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 \n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-primary-border\n fixed top-[50%] left-[50%] z-50 grid max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-lg \n border p-4 duration-200", {
498
500
  size: {
499
501
  sm: string;
500
502
  md: string;
501
503
  lg: string;
504
+ xl: string;
505
+ full: string;
502
506
  };
503
507
  }, undefined, tailwind_variants.TVReturnType<{
504
508
  size: {
505
509
  sm: string;
506
510
  md: string;
507
511
  lg: string;
512
+ xl: string;
513
+ full: string;
508
514
  };
509
515
  }, undefined, "bg-background-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 \n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-primary-border\n fixed top-[50%] left-[50%] z-50 grid max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-lg \n border p-4 duration-200", unknown, unknown, undefined>>;
510
516
 
511
- type DefaulTtype = React.ComponentProps<typeof DialogPrimitive.Root>;
517
+ type DefaulTtype = Omit<
518
+ React.ComponentProps<typeof DialogPrimitive.Root>,
519
+ "onOpenChange"
520
+ >;
512
521
 
513
522
  type DialogSize = keyof typeof contentVariants.variants.size;
514
523
 
515
524
  type SmartDialogProps = {
516
525
  open?: boolean;
517
- onOpenChange?: (open: boolean) => void;
526
+ onClose?: (open: boolean) => void;
518
527
  trigger?: React.ReactNode;
519
528
  children?: React.ReactNode;
520
- hideClose?: boolean;
521
529
  size?: DialogSize;
522
530
  } & DefaulTtype;
523
531
 
@@ -528,7 +536,7 @@ type DialogHeaderBarProps = {
528
536
  children?: React$1.ReactNode;
529
537
  };
530
538
  declare function DialogHeaderBar({ title, hideClose, children }: DialogHeaderBarProps): react_jsx_runtime.JSX.Element;
531
- declare function SmartDialog({ open, onOpenChange, trigger, children, hideClose, size, ...props }: SmartDialogProps): react_jsx_runtime.JSX.Element;
539
+ declare function SmartDialog({ open, onClose, trigger, children, size, ...props }: SmartDialogProps): react_jsx_runtime.JSX.Element;
532
540
  declare namespace SmartDialog {
533
541
  var Header: typeof DialogHeaderBar;
534
542
  var Footer: typeof DialogFooter;
@@ -537,10 +545,9 @@ declare namespace SmartDialog {
537
545
  declare function SheetFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
538
546
  type SmartSheetProps = {
539
547
  open?: boolean;
540
- onOpenChange?: (open: boolean) => void;
548
+ onClose?: (open: boolean) => void;
541
549
  trigger?: React$1.ReactNode;
542
550
  side?: "top" | "bottom" | "left" | "right";
543
- hideClose?: boolean;
544
551
  children?: React$1.ReactNode;
545
552
  };
546
553
  type SheetHeaderBarProps = {
@@ -549,10 +556,37 @@ type SheetHeaderBarProps = {
549
556
  children?: React$1.ReactNode;
550
557
  };
551
558
  declare function SheetHeaderBar({ title, hideClose, children }: SheetHeaderBarProps): react_jsx_runtime.JSX.Element;
552
- declare function SmartSheet({ open, onOpenChange, trigger, side, children, }: SmartSheetProps): react_jsx_runtime.JSX.Element;
559
+ declare function SmartSheet({ open, onClose, trigger, side, children, }: SmartSheetProps): react_jsx_runtime.JSX.Element;
553
560
  declare namespace SmartSheet {
554
561
  var Header: typeof SheetHeaderBar;
555
562
  var Footer: typeof SheetFooter;
556
563
  }
557
564
 
558
- export { Button, Card, Checkbox, SmartDialog as Dialog, SmartSheet as Drawer, Test as Input, RadioGroup, SegmentButton, Switch };
565
+ type Option = {
566
+ label: string;
567
+ value: string;
568
+ };
569
+
570
+ interface SelectProps {
571
+ mode?: "select" | "multi";
572
+ options: Option[];
573
+ value: string | string[] | null;
574
+ onChange: (v: any) => void;
575
+ onSearch?: (text: string) => void;
576
+ placeholder?: string;
577
+ emptyText?: string;
578
+ searchable?: boolean;
579
+ error?: boolean;
580
+ loading?: boolean;
581
+ disabled?: boolean;
582
+ readOnly?: boolean;
583
+ asyncSearch?: boolean;
584
+ label?: string;
585
+ hint?: string;
586
+ helperText?: string;
587
+ size?: "xs" | "sm" | "md" | "lg";
588
+ }
589
+
590
+ declare function Select({ mode, options, value, onChange, onSearch, searchable, loading, label, hint, helperText, error, disabled, readOnly, size, asyncSearch, placeholder, emptyText, }: SelectProps): react_jsx_runtime.JSX.Element;
591
+
592
+ export { Button, Card, Checkbox, SmartDialog as Dialog, SmartSheet as Drawer, Test as Input, RadioGroup, SegmentButton, Select, Switch };
package/index.d.ts CHANGED
@@ -493,31 +493,39 @@ declare const contentVariants: tailwind_variants.TVReturnType<{
493
493
  sm: string;
494
494
  md: string;
495
495
  lg: string;
496
+ xl: string;
497
+ full: string;
496
498
  };
497
499
  }, undefined, "bg-background-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 \n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-primary-border\n fixed top-[50%] left-[50%] z-50 grid max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-lg \n border p-4 duration-200", {
498
500
  size: {
499
501
  sm: string;
500
502
  md: string;
501
503
  lg: string;
504
+ xl: string;
505
+ full: string;
502
506
  };
503
507
  }, undefined, tailwind_variants.TVReturnType<{
504
508
  size: {
505
509
  sm: string;
506
510
  md: string;
507
511
  lg: string;
512
+ xl: string;
513
+ full: string;
508
514
  };
509
515
  }, undefined, "bg-background-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 \n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-primary-border\n fixed top-[50%] left-[50%] z-50 grid max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-lg \n border p-4 duration-200", unknown, unknown, undefined>>;
510
516
 
511
- type DefaulTtype = React.ComponentProps<typeof DialogPrimitive.Root>;
517
+ type DefaulTtype = Omit<
518
+ React.ComponentProps<typeof DialogPrimitive.Root>,
519
+ "onOpenChange"
520
+ >;
512
521
 
513
522
  type DialogSize = keyof typeof contentVariants.variants.size;
514
523
 
515
524
  type SmartDialogProps = {
516
525
  open?: boolean;
517
- onOpenChange?: (open: boolean) => void;
526
+ onClose?: (open: boolean) => void;
518
527
  trigger?: React.ReactNode;
519
528
  children?: React.ReactNode;
520
- hideClose?: boolean;
521
529
  size?: DialogSize;
522
530
  } & DefaulTtype;
523
531
 
@@ -528,7 +536,7 @@ type DialogHeaderBarProps = {
528
536
  children?: React$1.ReactNode;
529
537
  };
530
538
  declare function DialogHeaderBar({ title, hideClose, children }: DialogHeaderBarProps): react_jsx_runtime.JSX.Element;
531
- declare function SmartDialog({ open, onOpenChange, trigger, children, hideClose, size, ...props }: SmartDialogProps): react_jsx_runtime.JSX.Element;
539
+ declare function SmartDialog({ open, onClose, trigger, children, size, ...props }: SmartDialogProps): react_jsx_runtime.JSX.Element;
532
540
  declare namespace SmartDialog {
533
541
  var Header: typeof DialogHeaderBar;
534
542
  var Footer: typeof DialogFooter;
@@ -537,10 +545,9 @@ declare namespace SmartDialog {
537
545
  declare function SheetFooter({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
538
546
  type SmartSheetProps = {
539
547
  open?: boolean;
540
- onOpenChange?: (open: boolean) => void;
548
+ onClose?: (open: boolean) => void;
541
549
  trigger?: React$1.ReactNode;
542
550
  side?: "top" | "bottom" | "left" | "right";
543
- hideClose?: boolean;
544
551
  children?: React$1.ReactNode;
545
552
  };
546
553
  type SheetHeaderBarProps = {
@@ -549,10 +556,37 @@ type SheetHeaderBarProps = {
549
556
  children?: React$1.ReactNode;
550
557
  };
551
558
  declare function SheetHeaderBar({ title, hideClose, children }: SheetHeaderBarProps): react_jsx_runtime.JSX.Element;
552
- declare function SmartSheet({ open, onOpenChange, trigger, side, children, }: SmartSheetProps): react_jsx_runtime.JSX.Element;
559
+ declare function SmartSheet({ open, onClose, trigger, side, children, }: SmartSheetProps): react_jsx_runtime.JSX.Element;
553
560
  declare namespace SmartSheet {
554
561
  var Header: typeof SheetHeaderBar;
555
562
  var Footer: typeof SheetFooter;
556
563
  }
557
564
 
558
- export { Button, Card, Checkbox, SmartDialog as Dialog, SmartSheet as Drawer, Test as Input, RadioGroup, SegmentButton, Switch };
565
+ type Option = {
566
+ label: string;
567
+ value: string;
568
+ };
569
+
570
+ interface SelectProps {
571
+ mode?: "select" | "multi";
572
+ options: Option[];
573
+ value: string | string[] | null;
574
+ onChange: (v: any) => void;
575
+ onSearch?: (text: string) => void;
576
+ placeholder?: string;
577
+ emptyText?: string;
578
+ searchable?: boolean;
579
+ error?: boolean;
580
+ loading?: boolean;
581
+ disabled?: boolean;
582
+ readOnly?: boolean;
583
+ asyncSearch?: boolean;
584
+ label?: string;
585
+ hint?: string;
586
+ helperText?: string;
587
+ size?: "xs" | "sm" | "md" | "lg";
588
+ }
589
+
590
+ declare function Select({ mode, options, value, onChange, onSearch, searchable, loading, label, hint, helperText, error, disabled, readOnly, size, asyncSearch, placeholder, emptyText, }: SelectProps): react_jsx_runtime.JSX.Element;
591
+
592
+ export { Button, Card, Checkbox, SmartDialog as Dialog, SmartSheet as Drawer, Test as Input, RadioGroup, SegmentButton, Select, Switch };