@chekinapp/ui 0.0.114 → 0.0.115

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
@@ -2967,6 +2967,7 @@ type ControlProps<T, V extends SelectValue$1, L extends ReactNode> = {
2967
2967
  clearLabel?: string;
2968
2968
  hideIndicator?: boolean;
2969
2969
  autoFocus?: boolean;
2970
+ leftIcon?: ReactNode;
2970
2971
  components: SelectComponents<T, V, L>;
2971
2972
  };
2972
2973
  type MenuListProps<T, V extends SelectValue$1, L extends ReactNode> = {
@@ -3070,6 +3071,7 @@ type BaseSelectProps<T, V extends SelectValue$1, L extends ReactNode> = {
3070
3071
  searchPosition?: 'trigger' | 'dropdown';
3071
3072
  menuHeader?: React$1.ReactNode;
3072
3073
  onMenuScrollToBottom?: (event: React$1.UIEvent<HTMLDivElement>) => void;
3074
+ leftIcon?: React$1.ReactNode;
3073
3075
  };
3074
3076
  type SingleSelectProps<T, V extends SelectValue$1, L extends ReactNode> = BaseSelectProps<T, V, L> & {
3075
3077
  isMulti?: false;
package/dist/index.d.ts CHANGED
@@ -2967,6 +2967,7 @@ type ControlProps<T, V extends SelectValue$1, L extends ReactNode> = {
2967
2967
  clearLabel?: string;
2968
2968
  hideIndicator?: boolean;
2969
2969
  autoFocus?: boolean;
2970
+ leftIcon?: ReactNode;
2970
2971
  components: SelectComponents<T, V, L>;
2971
2972
  };
2972
2973
  type MenuListProps<T, V extends SelectValue$1, L extends ReactNode> = {
@@ -3070,6 +3071,7 @@ type BaseSelectProps<T, V extends SelectValue$1, L extends ReactNode> = {
3070
3071
  searchPosition?: 'trigger' | 'dropdown';
3071
3072
  menuHeader?: React$1.ReactNode;
3072
3073
  onMenuScrollToBottom?: (event: React$1.UIEvent<HTMLDivElement>) => void;
3074
+ leftIcon?: React$1.ReactNode;
3073
3075
  };
3074
3076
  type SingleSelectProps<T, V extends SelectValue$1, L extends ReactNode> = BaseSelectProps<T, V, L> & {
3075
3077
  isMulti?: false;
package/dist/index.js CHANGED
@@ -12830,6 +12830,7 @@ function SelectTrigger({
12830
12830
  invalid,
12831
12831
  placeholder,
12832
12832
  valueLabel,
12833
+ leftIcon,
12833
12834
  onClick,
12834
12835
  onKeyDown,
12835
12836
  onBlur
@@ -12853,12 +12854,14 @@ function SelectTrigger({
12853
12854
  onKeyDown,
12854
12855
  onBlur,
12855
12856
  className: cn(
12856
- "relative m-0 box-border flex h-12 w-full cursor-pointer items-center justify-between gap-2 rounded-[6px] border-0 px-4 text-left text-[16px] font-medium leading-5 outline-none transition-colors duration-200",
12857
+ "relative m-0 box-border flex h-12 w-full cursor-pointer items-center justify-between gap-2 rounded-[6px] border-0 pr-4 text-left text-[16px] font-medium leading-5 outline-none transition-colors duration-200",
12858
+ leftIcon ? "pl-10" : "pl-4",
12857
12859
  isEmpty ? "bg-[var(--empty-field-background)] text-[var(--chekin-color-gray-1)]" : "bg-transparent text-[var(--chekin-color-brand-navy)]",
12858
12860
  disabled && !loading && "cursor-not-allowed opacity-50",
12859
12861
  loading && "!cursor-progress"
12860
12862
  ),
12861
12863
  children: [
12864
+ leftIcon && /* @__PURE__ */ jsx149("span", { className: "pointer-events-none absolute left-0 top-0 flex h-full max-w-10 items-center justify-center text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ jsx149("span", { className: "flex h-full w-10 items-center justify-center", children: leftIcon }) }),
12862
12865
  /* @__PURE__ */ jsx149("span", { id: valueId, className: "block min-w-0 flex-1 truncate text-left", children: valueLabel ?? (isOpen ? placeholder : null) }),
12863
12866
  /* @__PURE__ */ jsx149("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ jsx149(
12864
12867
  ChevronDown2,
@@ -12908,6 +12911,7 @@ function ComboboxTrigger({
12908
12911
  onClear,
12909
12912
  clearLabel,
12910
12913
  leadingContent,
12914
+ leftIcon,
12911
12915
  containerClassName,
12912
12916
  inputClassName,
12913
12917
  hideIndicator,
@@ -12938,11 +12942,13 @@ function ComboboxTrigger({
12938
12942
  containerClassName
12939
12943
  ),
12940
12944
  children: [
12945
+ leftIcon && /* @__PURE__ */ jsx150("span", { className: "pointer-events-none absolute left-0 top-0 flex h-full max-w-10 items-center justify-center text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ jsx150("span", { className: "flex h-full w-10 items-center justify-center", children: leftIcon }) }),
12941
12946
  /* @__PURE__ */ jsxs97(
12942
12947
  "div",
12943
12948
  {
12944
12949
  className: cn(
12945
- "flex min-w-0 flex-1 items-center gap-2 py-[10px] pl-4",
12950
+ "flex min-w-0 flex-1 items-center gap-2 py-[10px]",
12951
+ leftIcon ? "pl-10" : "pl-4",
12946
12952
  isMulti && "flex-wrap"
12947
12953
  ),
12948
12954
  children: [
@@ -13504,6 +13510,7 @@ function DefaultControl(props) {
13504
13510
  clearLabel,
13505
13511
  hideIndicator,
13506
13512
  autoFocus,
13513
+ leftIcon,
13507
13514
  components
13508
13515
  } = props;
13509
13516
  const Chip = components.MultiValueChip ?? DefaultMultiValueChip;
@@ -13541,6 +13548,7 @@ function DefaultControl(props) {
13541
13548
  clearLabel,
13542
13549
  hideIndicator,
13543
13550
  autoFocus,
13551
+ leftIcon,
13544
13552
  leadingContent: isMulti ? selectedOptions.map((option) => /* @__PURE__ */ jsx152(
13545
13553
  Chip,
13546
13554
  {
@@ -13571,7 +13579,8 @@ function StaticControl(props) {
13571
13579
  disabled,
13572
13580
  valueLabel,
13573
13581
  placeholder,
13574
- onContainerClick
13582
+ onContainerClick,
13583
+ leftIcon
13575
13584
  } = props;
13576
13585
  return /* @__PURE__ */ jsx153(
13577
13586
  SelectTrigger,
@@ -13589,6 +13598,7 @@ function StaticControl(props) {
13589
13598
  invalid,
13590
13599
  placeholder,
13591
13600
  valueLabel,
13601
+ leftIcon,
13592
13602
  onClick: onContainerClick,
13593
13603
  onKeyDown: () => void 0
13594
13604
  }
@@ -13740,7 +13750,8 @@ function SelectInternal(props, ref) {
13740
13750
  onInputChange,
13741
13751
  searchPosition = "trigger",
13742
13752
  menuHeader,
13743
- onMenuScrollToBottom
13753
+ onMenuScrollToBottom,
13754
+ leftIcon
13744
13755
  } = props;
13745
13756
  const isSearchInDropdown = searchPosition === "dropdown";
13746
13757
  const isMulti = props.isMulti === true;
@@ -13862,6 +13873,7 @@ function SelectInternal(props, ref) {
13862
13873
  clearLabel: isMulti ? t("clear_all") : t("clear"),
13863
13874
  hideIndicator,
13864
13875
  autoFocus,
13876
+ leftIcon,
13865
13877
  components
13866
13878
  }
13867
13879
  ),
@@ -13880,7 +13892,8 @@ function SelectInternal(props, ref) {
13880
13892
  legend: resolvedLabel,
13881
13893
  label: resolvedLabel,
13882
13894
  tooltip,
13883
- onClick: state.handleContainerClick
13895
+ onClick: state.handleContainerClick,
13896
+ labelClassName: leftIcon ? "pl-[28px]" : void 0
13884
13897
  }
13885
13898
  ),
13886
13899
  /* @__PURE__ */ jsxs99(
@@ -14635,7 +14648,8 @@ function createCountTrigger(opts) {
14635
14648
  disabled,
14636
14649
  placeholder,
14637
14650
  selectedOptions,
14638
- onContainerClick
14651
+ onContainerClick,
14652
+ leftIcon
14639
14653
  } = props;
14640
14654
  const count = selectedOptions.length;
14641
14655
  const total = totalCount ?? count;
@@ -14657,12 +14671,14 @@ function createCountTrigger(opts) {
14657
14671
  disabled: isBlocked,
14658
14672
  onClick: onContainerClick,
14659
14673
  className: cn(
14660
- "relative m-0 box-border flex h-12 w-full cursor-pointer items-center justify-between gap-2 rounded-[6px] border-0 px-4 text-left text-[16px] font-medium leading-5 outline-none transition-colors duration-200",
14674
+ "relative m-0 box-border flex h-12 w-full cursor-pointer items-center justify-between gap-2 rounded-[6px] border-0 pr-4 text-left text-[16px] font-medium leading-5 outline-none transition-colors duration-200",
14675
+ leftIcon ? "pl-10" : "pl-4",
14661
14676
  isEmpty ? "bg-[var(--empty-field-background)] text-[var(--chekin-color-gray-1)]" : "bg-transparent text-[var(--chekin-color-brand-navy)]",
14662
14677
  disabled && !loading && "cursor-not-allowed opacity-50",
14663
14678
  loading && "!cursor-progress"
14664
14679
  ),
14665
14680
  children: [
14681
+ leftIcon && /* @__PURE__ */ jsx166("span", { className: "pointer-events-none absolute left-0 top-0 flex h-full max-w-10 items-center justify-center text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ jsx166("span", { className: "flex h-full w-10 items-center justify-center", children: leftIcon }) }),
14666
14682
  /* @__PURE__ */ jsx166("span", { id: valueId, className: "block min-w-0 flex-1 truncate text-left", children: display }),
14667
14683
  /* @__PURE__ */ jsx166("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ jsx166(
14668
14684
  ChevronDown3,