@chekinapp/ui 0.0.131 → 0.0.132
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.cjs +171 -174
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +84 -87
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7786,7 +7786,6 @@ var SectionTagColors = /* @__PURE__ */ ((SectionTagColors2) => {
|
|
|
7786
7786
|
|
|
7787
7787
|
// src/section/Section.tsx
|
|
7788
7788
|
import { forwardRef as forwardRef38 } from "react";
|
|
7789
|
-
import { CircleHelp } from "lucide-react";
|
|
7790
7789
|
import { useTranslation as useTranslation15 } from "react-i18next";
|
|
7791
7790
|
|
|
7792
7791
|
// src/section/constants.ts
|
|
@@ -7799,16 +7798,17 @@ var SubSectionSize = /* @__PURE__ */ ((SubSectionSize2) => {
|
|
|
7799
7798
|
// src/section/Section.tsx
|
|
7800
7799
|
import { jsx as jsx98, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
7801
7800
|
function TooltipInfo({ content, className }) {
|
|
7802
|
-
return /* @__PURE__ */ jsx98(
|
|
7803
|
-
|
|
7801
|
+
return /* @__PURE__ */ jsx98(
|
|
7802
|
+
HelpTooltip,
|
|
7804
7803
|
{
|
|
7805
|
-
|
|
7806
|
-
|
|
7804
|
+
side: "right",
|
|
7805
|
+
content,
|
|
7806
|
+
contentClassName: "max-w-64",
|
|
7807
|
+
className: cn("text-[var(--chekin-color-gray-1)]", className),
|
|
7807
7808
|
onClick: (event) => event.stopPropagation(),
|
|
7808
|
-
|
|
7809
|
-
children: /* @__PURE__ */ jsx98(CircleHelp, { className: "h-4 w-4" })
|
|
7809
|
+
label: typeof content === "string" ? content : "More information"
|
|
7810
7810
|
}
|
|
7811
|
-
)
|
|
7811
|
+
);
|
|
7812
7812
|
}
|
|
7813
7813
|
var Section = forwardRef38(
|
|
7814
7814
|
({
|
|
@@ -12150,7 +12150,11 @@ var Input = React44.forwardRef(
|
|
|
12150
12150
|
/* @__PURE__ */ jsxs89(
|
|
12151
12151
|
"div",
|
|
12152
12152
|
{
|
|
12153
|
-
className: cn(
|
|
12153
|
+
className: cn(
|
|
12154
|
+
"input__content relative w-full cursor-text",
|
|
12155
|
+
readOnly && !disabled && !loading && "cursor-default",
|
|
12156
|
+
contentClassName
|
|
12157
|
+
),
|
|
12154
12158
|
children: [
|
|
12155
12159
|
/* @__PURE__ */ jsx142(
|
|
12156
12160
|
Fieldset,
|
|
@@ -12205,7 +12209,8 @@ var Input = React44.forwardRef(
|
|
|
12205
12209
|
isEmpty && !isFocused ? "bg-[var(--empty-field-background)]" : "bg-transparent",
|
|
12206
12210
|
isEmpty && "text-[var(--chekin-color-gray-1)]",
|
|
12207
12211
|
inputType === "password" && "[&:not(:placeholder-shown)]:font-bold [&:not(:placeholder-shown)]:tracking-[2px]",
|
|
12208
|
-
|
|
12212
|
+
disabled && "cursor-not-allowed",
|
|
12213
|
+
readOnly && !disabled && !loading && "cursor-default",
|
|
12209
12214
|
loading && "cursor-progress",
|
|
12210
12215
|
leftIcon && "pl-10",
|
|
12211
12216
|
(showRightPaddingForReset || showRightPaddingForReveal) && "pr-10",
|
|
@@ -14712,64 +14717,10 @@ var InfiniteScrollMultiSelect = React57.forwardRef(function InfiniteScrollMultiS
|
|
|
14712
14717
|
import * as React58 from "react";
|
|
14713
14718
|
import { useTranslation as useTranslation36 } from "react-i18next";
|
|
14714
14719
|
|
|
14715
|
-
// src/dashboard/select-checkboxes/SelectCheckboxOption.tsx
|
|
14716
|
-
import { jsx as jsx163, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
14717
|
-
function SelectCheckboxOption(props) {
|
|
14718
|
-
const {
|
|
14719
|
-
option,
|
|
14720
|
-
index,
|
|
14721
|
-
isSelected,
|
|
14722
|
-
isHighlighted,
|
|
14723
|
-
isDisabled,
|
|
14724
|
-
id,
|
|
14725
|
-
onClick,
|
|
14726
|
-
onHover,
|
|
14727
|
-
innerRef
|
|
14728
|
-
} = props;
|
|
14729
|
-
return /* @__PURE__ */ jsxs102(
|
|
14730
|
-
"button",
|
|
14731
|
-
{
|
|
14732
|
-
id,
|
|
14733
|
-
ref: innerRef,
|
|
14734
|
-
type: "button",
|
|
14735
|
-
role: "option",
|
|
14736
|
-
"aria-selected": isSelected,
|
|
14737
|
-
"aria-disabled": isDisabled,
|
|
14738
|
-
tabIndex: -1,
|
|
14739
|
-
disabled: isDisabled,
|
|
14740
|
-
onClick: () => onClick(option),
|
|
14741
|
-
onMouseMove: () => onHover(index),
|
|
14742
|
-
className: cn(
|
|
14743
|
-
"flex w-full items-center gap-3 rounded-md border-0 bg-transparent px-3 py-2 text-left text-[15px] font-medium leading-5 text-[var(--chekin-color-brand-navy)] outline-none transition-colors duration-100",
|
|
14744
|
-
!isDisabled && "cursor-pointer hover:bg-[var(--chekin-color-surface-pressed)]",
|
|
14745
|
-
isHighlighted && !isDisabled && "bg-[var(--chekin-color-surface-pressed)]",
|
|
14746
|
-
isSelected && "bg-[var(--chekin-color-surface-autocomplete)] font-semibold text-[var(--chekin-color-brand-blue)]",
|
|
14747
|
-
isDisabled && "cursor-not-allowed text-[var(--chekin-color-gray-2)]"
|
|
14748
|
-
),
|
|
14749
|
-
children: [
|
|
14750
|
-
/* @__PURE__ */ jsx163(
|
|
14751
|
-
BaseCheckbox,
|
|
14752
|
-
{
|
|
14753
|
-
checked: isSelected,
|
|
14754
|
-
disabled: isDisabled,
|
|
14755
|
-
size: "s",
|
|
14756
|
-
tabIndex: -1,
|
|
14757
|
-
className: "pointer-events-none shrink-0"
|
|
14758
|
-
}
|
|
14759
|
-
),
|
|
14760
|
-
/* @__PURE__ */ jsxs102("span", { className: "flex min-w-0 flex-1 items-center justify-between gap-2", children: [
|
|
14761
|
-
/* @__PURE__ */ jsx163("span", { className: "block break-words", children: option.label }),
|
|
14762
|
-
option.description && /* @__PURE__ */ jsx163("span", { className: "shrink-0 text-[12px] font-medium italic text-[var(--chekin-color-gray-1)]", children: option.description })
|
|
14763
|
-
] })
|
|
14764
|
-
]
|
|
14765
|
-
}
|
|
14766
|
-
);
|
|
14767
|
-
}
|
|
14768
|
-
|
|
14769
14720
|
// src/dashboard/select-checkboxes/CountTrigger.tsx
|
|
14770
14721
|
import { ChevronDown as ChevronDown3 } from "lucide-react";
|
|
14771
14722
|
import { useTranslation as useTranslation35 } from "react-i18next";
|
|
14772
|
-
import { jsx as
|
|
14723
|
+
import { jsx as jsx163, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
14773
14724
|
function createCountTrigger(opts) {
|
|
14774
14725
|
const { valueText, totalCount } = opts;
|
|
14775
14726
|
function CountTrigger(props) {
|
|
@@ -14797,7 +14748,7 @@ function createCountTrigger(opts) {
|
|
|
14797
14748
|
const computedText = typeof valueText === "function" ? valueText(count, total) : valueText ?? (count > 0 ? t("n_selected", { count, defaultValue: `${count} selected` }) : "");
|
|
14798
14749
|
const display = hasValue ? computedText : isOpen ? placeholder ?? null : null;
|
|
14799
14750
|
const isEmpty = !hasValue;
|
|
14800
|
-
return /* @__PURE__ */
|
|
14751
|
+
return /* @__PURE__ */ jsxs102(
|
|
14801
14752
|
"button",
|
|
14802
14753
|
{
|
|
14803
14754
|
id: triggerId,
|
|
@@ -14820,9 +14771,9 @@ function createCountTrigger(opts) {
|
|
|
14820
14771
|
loading && "!cursor-progress"
|
|
14821
14772
|
),
|
|
14822
14773
|
children: [
|
|
14823
|
-
leftIcon && /* @__PURE__ */
|
|
14824
|
-
/* @__PURE__ */
|
|
14825
|
-
/* @__PURE__ */
|
|
14774
|
+
leftIcon && /* @__PURE__ */ jsx163("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__ */ jsx163("span", { className: "flex h-full w-10 items-center justify-center", children: leftIcon }) }),
|
|
14775
|
+
/* @__PURE__ */ jsx163("span", { id: valueId, className: "block min-w-0 flex-1 truncate text-left", children: display }),
|
|
14776
|
+
/* @__PURE__ */ jsx163("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ jsx163(
|
|
14826
14777
|
ChevronDown3,
|
|
14827
14778
|
{
|
|
14828
14779
|
size: 16,
|
|
@@ -14840,9 +14791,9 @@ function createCountTrigger(opts) {
|
|
|
14840
14791
|
}
|
|
14841
14792
|
|
|
14842
14793
|
// src/dashboard/select-checkboxes/SelectAllRow.tsx
|
|
14843
|
-
import { jsx as
|
|
14794
|
+
import { jsx as jsx164, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
14844
14795
|
function SelectAllRow({ label, checked, disabled, onToggle }) {
|
|
14845
|
-
return /* @__PURE__ */
|
|
14796
|
+
return /* @__PURE__ */ jsxs103(
|
|
14846
14797
|
"button",
|
|
14847
14798
|
{
|
|
14848
14799
|
type: "button",
|
|
@@ -14853,7 +14804,7 @@ function SelectAllRow({ label, checked, disabled, onToggle }) {
|
|
|
14853
14804
|
disabled && "cursor-default opacity-40"
|
|
14854
14805
|
),
|
|
14855
14806
|
children: [
|
|
14856
|
-
/* @__PURE__ */
|
|
14807
|
+
/* @__PURE__ */ jsx164(
|
|
14857
14808
|
BaseCheckbox,
|
|
14858
14809
|
{
|
|
14859
14810
|
checked,
|
|
@@ -14863,20 +14814,20 @@ function SelectAllRow({ label, checked, disabled, onToggle }) {
|
|
|
14863
14814
|
className: "pointer-events-none shrink-0"
|
|
14864
14815
|
}
|
|
14865
14816
|
),
|
|
14866
|
-
/* @__PURE__ */
|
|
14817
|
+
/* @__PURE__ */ jsx164("span", { className: "flex-1", children: label })
|
|
14867
14818
|
]
|
|
14868
14819
|
}
|
|
14869
14820
|
);
|
|
14870
14821
|
}
|
|
14871
14822
|
|
|
14872
14823
|
// src/dashboard/select-checkboxes/SelectCheckboxes.tsx
|
|
14873
|
-
import { Fragment as Fragment16, jsx as
|
|
14824
|
+
import { Fragment as Fragment16, jsx as jsx165 } from "react/jsx-runtime";
|
|
14874
14825
|
function hasPaginationProps(props) {
|
|
14875
14826
|
return props.canLoadMore !== void 0 || props.isLoadingMore !== void 0 || props.loadMoreItems !== void 0 || props.onSearchChange !== void 0;
|
|
14876
14827
|
}
|
|
14877
14828
|
function makeTriggerSlot(render) {
|
|
14878
14829
|
function CustomTrigger(props) {
|
|
14879
|
-
return /* @__PURE__ */
|
|
14830
|
+
return /* @__PURE__ */ jsx165(Fragment16, { children: render(props.isOpen, props.onContainerClick) });
|
|
14880
14831
|
}
|
|
14881
14832
|
return CustomTrigger;
|
|
14882
14833
|
}
|
|
@@ -14961,15 +14912,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14961
14912
|
totalCount: flatRawOptions.length
|
|
14962
14913
|
});
|
|
14963
14914
|
}, [trigger, valueText, flatRawOptions.length]);
|
|
14964
|
-
const
|
|
14965
|
-
() => ({
|
|
14966
|
-
...userComponents,
|
|
14967
|
-
Control,
|
|
14968
|
-
Option: userComponents?.Option ?? SelectCheckboxOption
|
|
14969
|
-
}),
|
|
14970
|
-
[userComponents, Control]
|
|
14971
|
-
);
|
|
14972
|
-
const menuHeader = allowSelectAll ? /* @__PURE__ */ jsx166(
|
|
14915
|
+
const menuHeader = allowSelectAll ? /* @__PURE__ */ jsx165(
|
|
14973
14916
|
SelectAllRow,
|
|
14974
14917
|
{
|
|
14975
14918
|
label: selectAllLabel ?? t("select_all", { defaultValue: "Select All" }),
|
|
@@ -14989,7 +14932,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14989
14932
|
value: currentValue,
|
|
14990
14933
|
onChange: handleChange,
|
|
14991
14934
|
filterOption: passthroughFilter2,
|
|
14992
|
-
components,
|
|
14935
|
+
// components,
|
|
14993
14936
|
closeMenuOnSelect,
|
|
14994
14937
|
searchPosition: searchable ? "dropdown" : "trigger",
|
|
14995
14938
|
searchable,
|
|
@@ -14998,7 +14941,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14998
14941
|
isMulti: true
|
|
14999
14942
|
};
|
|
15000
14943
|
if (isPaginated) {
|
|
15001
|
-
return /* @__PURE__ */
|
|
14944
|
+
return /* @__PURE__ */ jsx165(
|
|
15002
14945
|
InfiniteScrollSelect,
|
|
15003
14946
|
{
|
|
15004
14947
|
ref,
|
|
@@ -15009,7 +14952,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
15009
14952
|
}
|
|
15010
14953
|
);
|
|
15011
14954
|
}
|
|
15012
|
-
return /* @__PURE__ */
|
|
14955
|
+
return /* @__PURE__ */ jsx165(
|
|
15013
14956
|
Select,
|
|
15014
14957
|
{
|
|
15015
14958
|
ref,
|
|
@@ -15024,6 +14967,60 @@ var SelectCheckboxes = React58.forwardRef(
|
|
|
15024
14967
|
SelectCheckboxesInternal
|
|
15025
14968
|
);
|
|
15026
14969
|
|
|
14970
|
+
// src/dashboard/select-checkboxes/SelectCheckboxOption.tsx
|
|
14971
|
+
import { jsx as jsx166, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
14972
|
+
function SelectCheckboxOption(props) {
|
|
14973
|
+
const {
|
|
14974
|
+
option,
|
|
14975
|
+
index,
|
|
14976
|
+
isSelected,
|
|
14977
|
+
isHighlighted,
|
|
14978
|
+
isDisabled,
|
|
14979
|
+
id,
|
|
14980
|
+
onClick,
|
|
14981
|
+
onHover,
|
|
14982
|
+
innerRef
|
|
14983
|
+
} = props;
|
|
14984
|
+
return /* @__PURE__ */ jsxs104(
|
|
14985
|
+
"button",
|
|
14986
|
+
{
|
|
14987
|
+
id,
|
|
14988
|
+
ref: innerRef,
|
|
14989
|
+
type: "button",
|
|
14990
|
+
role: "option",
|
|
14991
|
+
"aria-selected": isSelected,
|
|
14992
|
+
"aria-disabled": isDisabled,
|
|
14993
|
+
tabIndex: -1,
|
|
14994
|
+
disabled: isDisabled,
|
|
14995
|
+
onClick: () => onClick(option),
|
|
14996
|
+
onMouseMove: () => onHover(index),
|
|
14997
|
+
className: cn(
|
|
14998
|
+
"flex w-full items-center gap-3 rounded-md border-0 bg-transparent px-3 py-2 text-left text-[15px] font-medium leading-5 text-[var(--chekin-color-brand-navy)] outline-none transition-colors duration-100",
|
|
14999
|
+
!isDisabled && "cursor-pointer hover:bg-[var(--chekin-color-surface-pressed)]",
|
|
15000
|
+
isHighlighted && !isDisabled && "bg-[var(--chekin-color-surface-pressed)]",
|
|
15001
|
+
isSelected && "bg-[var(--chekin-color-surface-autocomplete)] font-semibold text-[var(--chekin-color-brand-blue)]",
|
|
15002
|
+
isDisabled && "cursor-not-allowed text-[var(--chekin-color-gray-2)]"
|
|
15003
|
+
),
|
|
15004
|
+
children: [
|
|
15005
|
+
/* @__PURE__ */ jsx166(
|
|
15006
|
+
BaseCheckbox,
|
|
15007
|
+
{
|
|
15008
|
+
checked: isSelected,
|
|
15009
|
+
disabled: isDisabled,
|
|
15010
|
+
size: "s",
|
|
15011
|
+
tabIndex: -1,
|
|
15012
|
+
className: "pointer-events-none shrink-0"
|
|
15013
|
+
}
|
|
15014
|
+
),
|
|
15015
|
+
/* @__PURE__ */ jsxs104("span", { className: "flex min-w-0 flex-1 items-center justify-between gap-2", children: [
|
|
15016
|
+
/* @__PURE__ */ jsx166("span", { className: "block break-words", children: option.label }),
|
|
15017
|
+
option.description && /* @__PURE__ */ jsx166("span", { className: "shrink-0 text-[12px] font-medium italic text-[var(--chekin-color-gray-1)]", children: option.description })
|
|
15018
|
+
] })
|
|
15019
|
+
]
|
|
15020
|
+
}
|
|
15021
|
+
);
|
|
15022
|
+
}
|
|
15023
|
+
|
|
15027
15024
|
// src/dashboard/textarea/Textarea.tsx
|
|
15028
15025
|
import * as React60 from "react";
|
|
15029
15026
|
import { useTranslation as useTranslation37 } from "react-i18next";
|