@chekinapp/ui 0.0.10 → 0.0.13

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.cts CHANGED
@@ -171,8 +171,6 @@ declare const buttonVariants: (props?: ({
171
171
 
172
172
  interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
173
173
  asChild?: boolean;
174
- leftIcon?: React$1.ReactNode;
175
- rightIcon?: React$1.ReactNode;
176
174
  loading?: boolean;
177
175
  loadingText?: string;
178
176
  }
package/dist/index.d.ts CHANGED
@@ -171,8 +171,6 @@ declare const buttonVariants: (props?: ({
171
171
 
172
172
  interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
173
173
  asChild?: boolean;
174
- leftIcon?: React$1.ReactNode;
175
- rightIcon?: React$1.ReactNode;
176
174
  loading?: boolean;
177
175
  loadingText?: string;
178
176
  }
package/dist/index.js CHANGED
@@ -627,7 +627,7 @@ import { useTranslation as useTranslation3 } from "react-i18next";
627
627
  import { cva as cva3 } from "class-variance-authority";
628
628
  var buttonVariants = cva3(
629
629
  [
630
- "relative inline-flex items-center justify-center gap-2 whitespace-nowrap",
630
+ "button relative inline-flex items-center justify-center gap-2 whitespace-nowrap",
631
631
  "[font-family:var(--button-font-family)] [font-weight:var(--button-font-weight)]",
632
632
  "transition-all duration-150 ease-out outline-none",
633
633
  "focus-visible:shadow-[var(--button-focus-shadow)]",
@@ -641,39 +641,45 @@ var buttonVariants = cva3(
641
641
  variants: {
642
642
  variant: {
643
643
  default: [
644
+ "button_default",
644
645
  "bg-[var(--button-primary-bg)] text-[color:var(--button-primary-text)]",
645
646
  "hover:before:bg-[var(--button-primary-hover-overlay)] active:before:bg-[var(--button-primary-active-overlay)]",
646
647
  "disabled:hover:before:bg-transparent"
647
648
  ],
648
649
  primary: [
650
+ "button_default",
649
651
  "bg-[var(--button-primary-bg)] text-[color:var(--button-primary-text)]",
650
652
  "hover:before:bg-[var(--button-primary-hover-overlay)] active:before:bg-[var(--button-primary-active-overlay)]",
651
653
  "disabled:hover:before:bg-transparent"
652
654
  ],
653
655
  destructive: [
656
+ "button_destructive",
654
657
  "border border-[var(--button-destructive-border)] bg-[var(--button-destructive-bg)] text-[color:var(--button-destructive-text)]",
655
658
  "shadow-[var(--button-shadow)]",
656
659
  "hover:bg-[var(--button-destructive-hover-bg)]",
657
660
  "disabled:hover:bg-[var(--button-destructive-bg)]"
658
661
  ],
659
662
  secondary: [
663
+ "button_secondary",
660
664
  "border border-[var(--button-secondary-border)] bg-[var(--button-secondary-bg)] text-[color:var(--button-secondary-text)]",
661
665
  "shadow-[var(--button-shadow)]",
662
666
  "hover:before:bg-[var(--button-secondary-hover-overlay)] active:before:bg-[var(--button-secondary-active-overlay)]",
663
667
  "disabled:hover:before:bg-transparent"
664
668
  ],
665
669
  ghost: [
670
+ "button_ghost",
666
671
  "bg-[var(--button-ghost-bg)] text-[color:var(--button-ghost-text)]",
667
672
  "hover:bg-[var(--button-ghost-hover-bg)] active:bg-[var(--button-ghost-active-bg)]",
668
673
  "disabled:hover:bg-[var(--button-ghost-bg)]"
669
674
  ],
670
675
  link: [
671
- "h-auto rounded-none bg-[var(--button-link-bg)] px-0 py-0 text-[color:var(--button-link-text)]",
672
- "underline-offset-4",
673
- "hover:underline active:opacity-80 before:hidden",
674
- "disabled:hover:no-underline"
676
+ "button_link",
677
+ "h-auto [font-weight:var(--button-link-font-weight)] rounded-none bg-[var(--button-link-bg)] px-0 py-0 text-[color:var(--button-link-text)]",
678
+ "hover:opacity-80 active:opacity-80 before:hidden",
679
+ "disabled:hover:no-opacity-80"
675
680
  ],
676
681
  tertiary: [
682
+ "button_tertiary",
677
683
  "border border-[var(--button-tertiary-border)] bg-[var(--button-tertiary-bg)] text-[color:var(--button-tertiary-text)]",
678
684
  "shadow-[var(--button-shadow)]",
679
685
  "hover:before:bg-[var(--button-tertiary-hover-overlay)] active:before:bg-[var(--button-tertiary-active-overlay)]",
@@ -686,21 +692,21 @@ var buttonVariants = cva3(
686
692
  ]
687
693
  },
688
694
  size: {
689
- default: "h-[var(--button-height-default)] min-w-[var(--button-min-width-default)] px-4 py-2 text-[length:var(--button-font-size)]",
690
- m: "h-[var(--button-height-m)] min-w-[var(--button-min-width-m)] px-4 text-[length:var(--button-font-size)]",
691
- md: "h-[var(--button-height-m)] min-w-[var(--button-min-width-m)] px-4 text-[length:var(--button-font-size)]",
692
- s: "h-[var(--button-height-s)] px-[12px] text-[13px]",
693
- sm: "h-[var(--button-height-sm)] px-3 text-[length:var(--button-font-size)]",
694
- lg: "h-[var(--button-height-lg)] px-8 text-[15px]",
695
- xs: "h-[var(--button-height-xs)] px-[10px] text-[12px]",
696
- icon: "h-[var(--button-height-icon)] w-[var(--button-height-icon)] p-0"
695
+ default: "button_size_default h-[var(--button-height-default)] min-w-[var(--button-min-width-default)] px-4 py-2 text-[length:var(--button-font-size)]",
696
+ m: "button_size_m h-[var(--button-height-m)] min-w-[var(--button-min-width-m)] px-4 text-[length:var(--button-font-size)]",
697
+ md: "button_size_m h-[var(--button-height-m)] min-w-[var(--button-min-width-m)] px-4 text-[length:var(--button-font-size)]",
698
+ s: "button_size_sm h-[var(--button-height-s)] px-[12px] text-[13px]",
699
+ sm: "button_size_sm h-[var(--button-height-sm)] px-3 text-[length:var(--button-font-size)]",
700
+ lg: "button_size_lg h-[var(--button-height-lg)] px-8 text-[15px]",
701
+ xs: "button_size_xs h-[var(--button-height-xs)] px-[10px] text-[12px]",
702
+ icon: "button_size_icon h-[var(--button-height-icon)] w-[var(--button-height-icon)] p-0"
697
703
  },
698
704
  shape: {
699
705
  rounded: "rounded-[var(--button-radius)]",
700
706
  pill: "rounded-full"
701
707
  },
702
708
  readOnly: {
703
- true: "pointer-events-none cursor-not-allowed !opacity-100",
709
+ true: "button_readonly pointer-events-none cursor-not-allowed !opacity-100",
704
710
  false: ""
705
711
  }
706
712
  },
@@ -740,8 +746,6 @@ var Button = React4.forwardRef(
740
746
  shape,
741
747
  asChild = false,
742
748
  readOnly = false,
743
- leftIcon,
744
- rightIcon,
745
749
  loading = false,
746
750
  loadingText,
747
751
  disabled,
@@ -776,11 +780,7 @@ var Button = React4.forwardRef(
776
780
  children: loading ? /* @__PURE__ */ jsxs9("span", { className: "inline-flex items-center gap-1.5", children: [
777
781
  /* @__PURE__ */ jsx10(Spinner, {}),
778
782
  showLoadingLabel ? /* @__PURE__ */ jsx10("span", { children: loadingText || t("please_wait") }) : null
779
- ] }) : /* @__PURE__ */ jsxs9("span", { className: "inline-flex items-center gap-2", children: [
780
- leftIcon,
781
- children,
782
- rightIcon
783
- ] })
783
+ ] }) : /* @__PURE__ */ jsx10("span", { className: "inline-flex items-center gap-2", children })
784
784
  }
785
785
  );
786
786
  }
@@ -6134,7 +6134,10 @@ function Skeleton({ className, ...props }) {
6134
6134
  "div",
6135
6135
  {
6136
6136
  "data-slot": "skeleton",
6137
- className: cn("animate-pulse rounded-md bg-chekin-gray-3", className),
6137
+ className: cn(
6138
+ "animate-pulse rounded-md bg-[var(--chekin-color-gray-3)]",
6139
+ className
6140
+ ),
6138
6141
  ...props
6139
6142
  }
6140
6143
  );
@@ -9239,11 +9242,7 @@ function ResponsiveSheet({
9239
9242
  onPointerDownOutside: handleInteractOutside,
9240
9243
  onInteractOutside: handleInteractOutside,
9241
9244
  onEscapeKeyDown: handleEscapeKeyDown,
9242
- className: cn(
9243
- "max-w-[560px] rounded-[28px] border-0 p-0 shadow-xl",
9244
- className,
9245
- dialogClassName
9246
- ),
9245
+ className: cn("max-w-[560px] border-0 p-0 shadow-xl", className, dialogClassName),
9247
9246
  lockScroll: false,
9248
9247
  children: [
9249
9248
  title ? /* @__PURE__ */ jsx122(DialogTitle, { className: "sr-only", children: title }) : null,
@@ -10736,6 +10735,7 @@ AirbnbSearchInput.displayName = "SearchInput";
10736
10735
  import * as React39 from "react";
10737
10736
  import { ChevronDown as ChevronDown3, Search as Search4 } from "lucide-react";
10738
10737
  import { useVirtualizer } from "@tanstack/react-virtual";
10738
+ import { useCallback as useCallback20 } from "react";
10739
10739
  import { jsx as jsx132, jsxs as jsxs86 } from "react/jsx-runtime";
10740
10740
  var ROW_HEIGHT = 48;
10741
10741
  var DESKTOP_LIST_HEIGHT = 280;
@@ -10809,6 +10809,16 @@ var SearchableSelectInternal = ({
10809
10809
  const describedBy = error && !hideErrorMessage ? errorId : void 0;
10810
10810
  const activeOptionId = highlightedIndex >= 0 ? getOptionId(reactId, highlightedIndex) : void 0;
10811
10811
  useOutsideClick(containerRef, open && !isMobile ? () => closeSelect() : null);
10812
+ const setSelectOpen = useCallback20(
10813
+ (nextOpen, options2) => {
10814
+ setOpen(nextOpen);
10815
+ onOpenChange?.(nextOpen);
10816
+ if (!nextOpen && options2?.restoreFocus) {
10817
+ triggerRef.current?.focus();
10818
+ }
10819
+ },
10820
+ []
10821
+ );
10812
10822
  React39.useEffect(() => {
10813
10823
  if (isBlocked) {
10814
10824
  setSelectOpen(false);
@@ -10821,7 +10831,7 @@ var SearchableSelectInternal = ({
10821
10831
  return () => {
10822
10832
  window.cancelAnimationFrame(frameId);
10823
10833
  };
10824
- }, [isBlocked, open]);
10834
+ }, [isBlocked, open, setSelectOpen]);
10825
10835
  React39.useEffect(() => {
10826
10836
  if (!open) {
10827
10837
  setHighlightedIndex(-1);
@@ -10834,13 +10844,6 @@ var SearchableSelectInternal = ({
10834
10844
  return selectedIndex >= 0 ? selectedIndex : getFirstEnabledIndex(visibleOptions);
10835
10845
  });
10836
10846
  }, [open, selectedIndex, visibleOptions]);
10837
- function setSelectOpen(nextOpen, options2) {
10838
- setOpen(nextOpen);
10839
- onOpenChange?.(nextOpen);
10840
- if (!nextOpen && options2?.restoreFocus) {
10841
- triggerRef.current?.focus();
10842
- }
10843
- }
10844
10847
  function openSelect() {
10845
10848
  if (isBlocked) return;
10846
10849
  setSelectOpen(true);