@aircall/ds 0.2.6 → 0.2.7

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.js CHANGED
@@ -12,6 +12,8 @@ import * as Icons from "@aircall/react-icons";
12
12
  import { ArrowLeftOutline, ArrowRightOutline, CheckCircleOutline, CheckOutline, ChevronDownOutline, ChevronRightOutline, ChevronUpOutline, CloseOutline, Emoji, Info, Search } from "@aircall/react-icons";
13
13
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
14
14
  import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
15
+ import { Combobox as Combobox$1 } from "@base-ui/react";
16
+ import { CheckIcon, ChevronDownIcon, CircleIcon, Loader2Icon, MinusIcon, OctagonXIcon, PanelLeftIcon, TriangleAlertIcon, XIcon } from "lucide-react";
15
17
  import { Command as Command$1 } from "cmdk";
16
18
  import * as DialogPrimitive from "@radix-ui/react-dialog";
17
19
  import { getCountryISO3 } from "@aircall/numbers";
@@ -23,7 +25,6 @@ import { ThemeProvider as ThemeProvider$1, useTheme, useTheme as useTheme$1 } fr
23
25
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
24
26
  import * as LabelPrimitive from "@radix-ui/react-label";
25
27
  import { OTPInput, OTPInputContext } from "input-otp";
26
- import { CircleIcon, Loader2Icon, MinusIcon, OctagonXIcon, PanelLeftIcon, TriangleAlertIcon } from "lucide-react";
27
28
  import * as ProgressPrimitive from "@radix-ui/react-progress";
28
29
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
29
30
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
@@ -212,7 +213,8 @@ const buttonVariants = cva("cursor-pointer inline-flex items-center justify-cent
212
213
  lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
213
214
  icon: "size-9",
214
215
  "icon-sm": "size-8",
215
- "icon-lg": "size-10"
216
+ "icon-lg": "size-10",
217
+ "icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3"
216
218
  },
217
219
  block: { true: "w-full" }
218
220
  },
@@ -452,6 +454,292 @@ function CollapsibleContent({ ...props }) {
452
454
  });
453
455
  }
454
456
 
457
+ //#endregion
458
+ //#region src/components/input.tsx
459
+ const inputVariants = cva("text-foreground file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
460
+ variants: {
461
+ sizing: {
462
+ default: "h-9 px-4 py-2",
463
+ sm: "h-8 rounded-md gap-1.5 px-3",
464
+ lg: "h-11 rounded-lg px-6"
465
+ },
466
+ block: { true: "w-full" }
467
+ },
468
+ defaultVariants: { sizing: "default" }
469
+ });
470
+ const Input = React$1.forwardRef(({ className, type, sizing, block, ...props }, forwardedRef) => {
471
+ return /* @__PURE__ */ jsx("input", {
472
+ type,
473
+ "data-slot": "input",
474
+ className: cn(inputVariants({
475
+ sizing,
476
+ block,
477
+ className
478
+ })),
479
+ ...props,
480
+ ref: forwardedRef
481
+ });
482
+ });
483
+
484
+ //#endregion
485
+ //#region src/components/textarea.tsx
486
+ function Textarea({ className, ...props }) {
487
+ return /* @__PURE__ */ jsx("textarea", {
488
+ "data-slot": "textarea",
489
+ className: cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
490
+ ...props
491
+ });
492
+ }
493
+
494
+ //#endregion
495
+ //#region src/components/input-group.tsx
496
+ const inputGroupVariants = cva("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none has-[>textarea]:h-auto", {
497
+ variants: { sizing: {
498
+ default: "h-9",
499
+ sm: "h-8",
500
+ lg: "h-11"
501
+ } },
502
+ defaultVariants: { sizing: "default" }
503
+ });
504
+ function InputGroup({ className, sizing, ...props }) {
505
+ return /* @__PURE__ */ jsx("div", {
506
+ "data-slot": "input-group",
507
+ role: "group",
508
+ className: cn(inputGroupVariants({ sizing }), "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]", "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40", className),
509
+ ...props
510
+ });
511
+ }
512
+ const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50", {
513
+ variants: { align: {
514
+ "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
515
+ "inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
516
+ "block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
517
+ "block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
518
+ } },
519
+ defaultVariants: { align: "inline-start" }
520
+ });
521
+ function InputGroupAddon({ className, align = "inline-start", ...props }) {
522
+ return /* @__PURE__ */ jsx("div", {
523
+ role: "group",
524
+ "data-slot": "input-group-addon",
525
+ "data-align": align,
526
+ className: cn(inputGroupAddonVariants({ align }), className),
527
+ onClick: (e) => {
528
+ if (e.target.closest("button")) return;
529
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
530
+ },
531
+ ...props
532
+ });
533
+ }
534
+ const inputGroupButtonVariants = cva("text-sm shadow-none flex gap-2 items-center", {
535
+ variants: { size: {
536
+ xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
537
+ sm: "h-7 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
538
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
539
+ "icon-sm": "size-7 p-0 has-[>svg]:p-0"
540
+ } },
541
+ defaultVariants: { size: "xs" }
542
+ });
543
+ const InputGroupButton = React$1.forwardRef(({ className, type = "button", variant = "ghost", size = "xs", ...props }, ref) => {
544
+ return /* @__PURE__ */ jsx(Button, {
545
+ ref,
546
+ type,
547
+ "data-size": size,
548
+ variant,
549
+ className: cn(inputGroupButtonVariants({ size }), className),
550
+ ...props
551
+ });
552
+ });
553
+ InputGroupButton.displayName = "InputGroupButton";
554
+ function InputGroupText({ className, ...props }) {
555
+ return /* @__PURE__ */ jsx("span", {
556
+ className: cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
557
+ ...props
558
+ });
559
+ }
560
+ const InputGroupInput = React$1.forwardRef(({ className, ...props }, forwardedRef) => {
561
+ return /* @__PURE__ */ jsx(Input, {
562
+ "data-slot": "input-group-control",
563
+ className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", className),
564
+ ...props,
565
+ ref: forwardedRef
566
+ });
567
+ });
568
+ function InputGroupTextarea({ className, ...props }) {
569
+ return /* @__PURE__ */ jsx(Textarea, {
570
+ "data-slot": "input-group-control",
571
+ className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent", className),
572
+ ...props
573
+ });
574
+ }
575
+
576
+ //#endregion
577
+ //#region src/components/combobox.tsx
578
+ const Combobox = Combobox$1.Root;
579
+ function ComboboxValue({ ...props }) {
580
+ return /* @__PURE__ */ jsx(Combobox$1.Value, {
581
+ "data-slot": "combobox-value",
582
+ ...props
583
+ });
584
+ }
585
+ const ComboboxTrigger = React$1.forwardRef(({ className, children, ...props }, ref) => {
586
+ return /* @__PURE__ */ jsxs(Combobox$1.Trigger, {
587
+ ref,
588
+ "data-slot": "combobox-trigger",
589
+ "aria-label": "Open options",
590
+ className: cn("[&_svg:not([class*='size-'])]:size-4", className),
591
+ ...props,
592
+ children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, {
593
+ "data-slot": "combobox-trigger-icon",
594
+ className: "text-muted-foreground pointer-events-none size-4"
595
+ })]
596
+ });
597
+ });
598
+ ComboboxTrigger.displayName = "ComboboxTrigger";
599
+ function ComboboxClear({ className, ...props }) {
600
+ return /* @__PURE__ */ jsx(Combobox$1.Clear, {
601
+ "data-slot": "combobox-clear",
602
+ "aria-label": "Clear selection",
603
+ render: /* @__PURE__ */ jsx(InputGroupButton, {
604
+ variant: "ghost",
605
+ size: "icon-xs"
606
+ }),
607
+ className: cn(className),
608
+ ...props,
609
+ children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
610
+ });
611
+ }
612
+ function ComboboxInput({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }) {
613
+ return /* @__PURE__ */ jsxs(InputGroup, {
614
+ className: cn("w-auto", className),
615
+ children: [
616
+ /* @__PURE__ */ jsx(Combobox$1.Input, {
617
+ disabled,
618
+ render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
619
+ ...props
620
+ }),
621
+ /* @__PURE__ */ jsxs(InputGroupAddon, {
622
+ align: "inline-end",
623
+ children: [showTrigger && /* @__PURE__ */ jsx(InputGroupButton, {
624
+ size: "icon-xs",
625
+ variant: "ghost",
626
+ asChild: true,
627
+ "data-slot": "input-group-button",
628
+ className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
629
+ disabled,
630
+ children: /* @__PURE__ */ jsx(ComboboxTrigger, {})
631
+ }), showClear && /* @__PURE__ */ jsx(ComboboxClear, { disabled })]
632
+ }),
633
+ children
634
+ ]
635
+ });
636
+ }
637
+ function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
638
+ return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
639
+ side,
640
+ sideOffset,
641
+ align,
642
+ alignOffset,
643
+ anchor,
644
+ className: "isolate z-50",
645
+ children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
646
+ "data-slot": "combobox-content",
647
+ "data-chips": !!anchor,
648
+ className: cn("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:border-input/30 group/combobox-content relative max-h-96 w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-md shadow-md ring-1 duration-100 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none", className),
649
+ ...props
650
+ })
651
+ }) });
652
+ }
653
+ function ComboboxList({ className, ...props }) {
654
+ return /* @__PURE__ */ jsx(Combobox$1.List, {
655
+ "data-slot": "combobox-list",
656
+ className: cn("max-h-[min(calc(--spacing(96)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0", className),
657
+ ...props
658
+ });
659
+ }
660
+ function ComboboxItem({ className, children, ...props }) {
661
+ return /* @__PURE__ */ jsxs(Combobox$1.Item, {
662
+ "data-slot": "combobox-item",
663
+ className: cn("data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
664
+ ...props,
665
+ children: [children, /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
666
+ "data-slot": "combobox-item-indicator",
667
+ render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
668
+ children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none size-4 pointer-coarse:size-5" })
669
+ })]
670
+ });
671
+ }
672
+ function ComboboxGroup({ className, ...props }) {
673
+ return /* @__PURE__ */ jsx(Combobox$1.Group, {
674
+ "data-slot": "combobox-group",
675
+ className: cn(className),
676
+ ...props
677
+ });
678
+ }
679
+ function ComboboxLabel({ className, ...props }) {
680
+ return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
681
+ "data-slot": "combobox-label",
682
+ className: cn("text-muted-foreground px-2 py-1.5 text-xs pointer-coarse:px-3 pointer-coarse:py-2 pointer-coarse:text-sm", className),
683
+ ...props
684
+ });
685
+ }
686
+ function ComboboxCollection({ ...props }) {
687
+ return /* @__PURE__ */ jsx(Combobox$1.Collection, {
688
+ "data-slot": "combobox-collection",
689
+ ...props
690
+ });
691
+ }
692
+ function ComboboxEmpty({ className, ...props }) {
693
+ return /* @__PURE__ */ jsx(Combobox$1.Empty, {
694
+ "data-slot": "combobox-empty",
695
+ className: cn("text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex", className),
696
+ ...props
697
+ });
698
+ }
699
+ function ComboboxSeparator({ className, ...props }) {
700
+ return /* @__PURE__ */ jsx(Combobox$1.Separator, {
701
+ "data-slot": "combobox-separator",
702
+ className: cn("bg-border -mx-1 my-1 h-px", className),
703
+ ...props
704
+ });
705
+ }
706
+ const ComboboxChips = React$1.forwardRef(({ className, ...props }, ref) => {
707
+ return /* @__PURE__ */ jsx(Combobox$1.Chips, {
708
+ ref,
709
+ "data-slot": "combobox-chips",
710
+ className: cn("dark:bg-input/30 border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive dark:has-aria-invalid:border-destructive/50 flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:ring-[3px] has-aria-invalid:ring-[3px] has-data-[slot=combobox-chip]:px-1.5", className),
711
+ ...props
712
+ });
713
+ });
714
+ ComboboxChips.displayName = "ComboboxChips";
715
+ function ComboboxChip({ className, children, showRemove = true, ...props }) {
716
+ return /* @__PURE__ */ jsxs(Combobox$1.Chip, {
717
+ "data-slot": "combobox-chip",
718
+ className: cn("bg-muted text-foreground flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", className),
719
+ ...props,
720
+ children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, {
721
+ "aria-label": "Remove item",
722
+ render: /* @__PURE__ */ jsx(Button, {
723
+ variant: "ghost",
724
+ size: "icon-xs"
725
+ }),
726
+ className: "-ml-1 opacity-50 hover:opacity-100",
727
+ "data-slot": "combobox-chip-remove",
728
+ children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
729
+ })]
730
+ });
731
+ }
732
+ function ComboboxChipsInput({ className, ...props }) {
733
+ return /* @__PURE__ */ jsx(Combobox$1.Input, {
734
+ "data-slot": "combobox-chip-input",
735
+ className: cn("min-w-16 flex-1 outline-none", className),
736
+ ...props
737
+ });
738
+ }
739
+ function useComboboxAnchor() {
740
+ return React$1.useRef(null);
741
+ }
742
+
455
743
  //#endregion
456
744
  //#region src/components/dialog.tsx
457
745
  function Dialog({ ...props }) {
@@ -1136,125 +1424,6 @@ function FieldError({ className, children, errors, ...props }) {
1136
1424
  });
1137
1425
  }
1138
1426
 
1139
- //#endregion
1140
- //#region src/components/input.tsx
1141
- const inputVariants = cva("text-foreground file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
1142
- variants: {
1143
- sizing: {
1144
- default: "h-9 px-4 py-2",
1145
- sm: "h-8 rounded-md gap-1.5 px-3",
1146
- lg: "h-11 rounded-lg px-6"
1147
- },
1148
- block: { true: "w-full" }
1149
- },
1150
- defaultVariants: { sizing: "default" }
1151
- });
1152
- const Input = React$1.forwardRef(({ className, type, sizing, block, ...props }, forwardedRef) => {
1153
- return /* @__PURE__ */ jsx("input", {
1154
- type,
1155
- "data-slot": "input",
1156
- className: cn(inputVariants({
1157
- sizing,
1158
- block,
1159
- className
1160
- })),
1161
- ...props,
1162
- ref: forwardedRef
1163
- });
1164
- });
1165
-
1166
- //#endregion
1167
- //#region src/components/textarea.tsx
1168
- function Textarea({ className, ...props }) {
1169
- return /* @__PURE__ */ jsx("textarea", {
1170
- "data-slot": "textarea",
1171
- className: cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
1172
- ...props
1173
- });
1174
- }
1175
-
1176
- //#endregion
1177
- //#region src/components/input-group.tsx
1178
- const inputGroupVariants = cva("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none has-[>textarea]:h-auto", {
1179
- variants: { sizing: {
1180
- default: "h-9",
1181
- sm: "h-8",
1182
- lg: "h-11"
1183
- } },
1184
- defaultVariants: { sizing: "default" }
1185
- });
1186
- function InputGroup({ className, sizing, ...props }) {
1187
- return /* @__PURE__ */ jsx("div", {
1188
- "data-slot": "input-group",
1189
- role: "group",
1190
- className: cn(inputGroupVariants({ sizing }), "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]", "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40", className),
1191
- ...props
1192
- });
1193
- }
1194
- const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50", {
1195
- variants: { align: {
1196
- "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
1197
- "inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
1198
- "block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
1199
- "block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
1200
- } },
1201
- defaultVariants: { align: "inline-start" }
1202
- });
1203
- function InputGroupAddon({ className, align = "inline-start", ...props }) {
1204
- return /* @__PURE__ */ jsx("div", {
1205
- role: "group",
1206
- "data-slot": "input-group-addon",
1207
- "data-align": align,
1208
- className: cn(inputGroupAddonVariants({ align }), className),
1209
- onClick: (e) => {
1210
- if (e.target.closest("button")) return;
1211
- e.currentTarget.parentElement?.querySelector("input")?.focus();
1212
- },
1213
- ...props
1214
- });
1215
- }
1216
- const inputGroupButtonVariants = cva("text-sm shadow-none flex gap-2 items-center", {
1217
- variants: { size: {
1218
- xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
1219
- sm: "h-7 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
1220
- "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
1221
- "icon-sm": "size-7 p-0 has-[>svg]:p-0"
1222
- } },
1223
- defaultVariants: { size: "xs" }
1224
- });
1225
- const InputGroupButton = React$1.forwardRef(({ className, type = "button", variant = "ghost", size = "xs", ...props }, ref) => {
1226
- return /* @__PURE__ */ jsx(Button, {
1227
- ref,
1228
- type,
1229
- "data-size": size,
1230
- variant,
1231
- className: cn(inputGroupButtonVariants({ size }), className),
1232
- ...props
1233
- });
1234
- });
1235
- InputGroupButton.displayName = "InputGroupButton";
1236
- function InputGroupText({ className, ...props }) {
1237
- return /* @__PURE__ */ jsx("span", {
1238
- className: cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
1239
- ...props
1240
- });
1241
- }
1242
- const InputGroupInput = React$1.forwardRef(({ className, ...props }, forwardedRef) => {
1243
- return /* @__PURE__ */ jsx(Input, {
1244
- "data-slot": "input-group-control",
1245
- className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", className),
1246
- ...props,
1247
- ref: forwardedRef
1248
- });
1249
- });
1250
- function InputGroupTextarea({ className, ...props }) {
1251
- return /* @__PURE__ */ jsx(Textarea, {
1252
- "data-slot": "input-group-control",
1253
- className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent", className),
1254
- ...props
1255
- });
1256
- }
1257
-
1258
1427
  //#endregion
1259
1428
  //#region src/components/input-otp.tsx
1260
1429
  const inputOTPVariants = cva("", {
@@ -2316,4 +2485,4 @@ function ToggleGroupItem({ className, children, variant, size, ...props }) {
2316
2485
  }
2317
2486
 
2318
2487
  //#endregion
2319
- export { Alert, AlertAction, AlertDescription, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CountryFlag, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmojiPicker, EmojiPickerCategories, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Slot, Spinner, Switch, TabBar, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonGroupVariants, buttonVariants, cn, inputOTPVariants, spinnerVariants, toast, toggleVariants, useSidebar, useTheme };
2488
+ export { Alert, AlertAction, AlertDescription, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CountryFlag, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmojiPicker, EmojiPickerCategories, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Slot, Spinner, Switch, TabBar, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonGroupVariants, buttonVariants, cn, inputOTPVariants, spinnerVariants, toast, toggleVariants, useComboboxAnchor, useSidebar, useTheme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aircall/ds",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "sideEffects": [
@@ -33,6 +33,7 @@
33
33
  "react-dom": "^18.0.0 || ^19.0.0"
34
34
  },
35
35
  "dependencies": {
36
+ "@base-ui/react": "1.1.0",
36
37
  "@radix-ui/react-avatar": "1.1.9",
37
38
  "@radix-ui/react-checkbox": "1.3.3",
38
39
  "@radix-ui/react-collapsible": "1.1.12",