@chekinapp/ui 0.0.130 → 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 +289 -299
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +206 -216
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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
|
({
|
|
@@ -12146,143 +12146,137 @@ var Input = React44.forwardRef(
|
|
|
12146
12146
|
children: topLabel
|
|
12147
12147
|
}
|
|
12148
12148
|
),
|
|
12149
|
-
/* @__PURE__ */ jsxs89(
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
),
|
|
12158
|
-
children: [
|
|
12159
|
-
/* @__PURE__ */ jsxs89(
|
|
12160
|
-
"div",
|
|
12161
|
-
{
|
|
12162
|
-
className: cn("input__content relative w-full cursor-text", contentClassName),
|
|
12163
|
-
children: [
|
|
12164
|
-
/* @__PURE__ */ jsx142(
|
|
12165
|
-
Fieldset,
|
|
12166
|
-
{
|
|
12167
|
-
isFocused: isFocused && !readOnly,
|
|
12168
|
-
invalid: hasInvalidState,
|
|
12169
|
-
isEmpty,
|
|
12170
|
-
onClick: handleLabelClick,
|
|
12171
|
-
isActivated: !isEmpty || isFocused,
|
|
12172
|
-
readOnly,
|
|
12173
|
-
loading,
|
|
12174
|
-
disabled,
|
|
12175
|
-
htmlFor: inputId,
|
|
12176
|
-
labelId: `${inputId}-label`,
|
|
12177
|
-
legend: typeof label === "string" ? label : void 0,
|
|
12178
|
-
label,
|
|
12179
|
-
tooltip,
|
|
12180
|
-
className: "input__fieldset",
|
|
12181
|
-
labelClassName: cn({
|
|
12182
|
-
input__label: true,
|
|
12183
|
-
"pl-[28px]": !!leftIcon
|
|
12184
|
-
})
|
|
12185
|
-
}
|
|
12186
|
-
),
|
|
12187
|
-
leftIcon && /* @__PURE__ */ jsx142("span", { className: "input__left-icon 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__ */ jsx142("span", { className: "input__left-icon-inner flex h-full w-10 items-center justify-center", children: leftIcon }) }),
|
|
12188
|
-
/* @__PURE__ */ jsx142(
|
|
12189
|
-
"input",
|
|
12190
|
-
{
|
|
12191
|
-
...props,
|
|
12192
|
-
ref: combinedInputRef,
|
|
12193
|
-
id: inputId,
|
|
12194
|
-
name,
|
|
12195
|
-
type: inputType,
|
|
12196
|
-
"data-testid": "input",
|
|
12197
|
-
value,
|
|
12198
|
-
defaultValue,
|
|
12199
|
-
disabled: disabled || loading,
|
|
12200
|
-
readOnly,
|
|
12201
|
-
required: !optional,
|
|
12202
|
-
"aria-label": typeof label === "string" ? label : void 0,
|
|
12203
|
-
"aria-invalid": hasInvalidState,
|
|
12204
|
-
"aria-busy": loading,
|
|
12205
|
-
"aria-describedby": errorMessage && renderErrorMessage ? errorId : void 0,
|
|
12206
|
-
placeholder: isFocused || !label ? placeholder : void 0,
|
|
12207
|
-
onChange: handleChange,
|
|
12208
|
-
onFocus: handleFocus,
|
|
12209
|
-
onBlur: handleBlur,
|
|
12210
|
-
className: cn(
|
|
12211
|
-
"input__control",
|
|
12212
|
-
"m-0 box-border h-12 w-full rounded-[6px] border-0 px-4 text-[16px] font-medium leading-5 text-[var(--chekin-color-brand-navy)] outline-none transition-colors duration-200 [text-overflow:ellipsis] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
12213
|
-
"placeholder:font-medium placeholder:text-[var(--chekin-color-gray-1)] placeholder:opacity-100",
|
|
12214
|
-
isEmpty && !isFocused ? "bg-[var(--empty-field-background)]" : "bg-transparent",
|
|
12215
|
-
isEmpty && "text-[var(--chekin-color-gray-1)]",
|
|
12216
|
-
inputType === "password" && "[&:not(:placeholder-shown)]:font-bold [&:not(:placeholder-shown)]:tracking-[2px]",
|
|
12217
|
-
(disabled || readOnly) && "cursor-not-allowed",
|
|
12218
|
-
loading && "cursor-progress",
|
|
12219
|
-
leftIcon && "pl-10",
|
|
12220
|
-
(showRightPaddingForReset || showRightPaddingForReveal) && "pr-10",
|
|
12221
|
-
sign && "pr-10",
|
|
12222
|
-
inputClassName
|
|
12223
|
-
)
|
|
12224
|
-
}
|
|
12225
|
-
),
|
|
12226
|
-
sign && /* @__PURE__ */ jsx142("span", { className: "input__sign pointer-events-none absolute right-[14px] top-0 flex h-full items-center text-[18px] font-medium leading-6 text-[var(--chekin-color-brand-navy)]", children: sign }),
|
|
12227
|
-
trailingAdornment && /* @__PURE__ */ jsx142("span", { className: "input__trailing-adornment pointer-events-none absolute right-[14px] top-0 flex h-full items-center", children: trailingAdornment }),
|
|
12228
|
-
onReset && !isEmpty && /* @__PURE__ */ jsx142(
|
|
12229
|
-
"button",
|
|
12230
|
-
{
|
|
12231
|
-
type: "button",
|
|
12232
|
-
onClick: onReset,
|
|
12233
|
-
disabled,
|
|
12234
|
-
className: "input__reset-button absolute right-0 top-0 flex h-full w-10 items-center justify-center border-0 bg-transparent p-0 text-[#9696b9] hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-50",
|
|
12235
|
-
"aria-label": t("reset"),
|
|
12236
|
-
children: /* @__PURE__ */ jsx142(X9, { size: 14 })
|
|
12237
|
-
}
|
|
12238
|
-
),
|
|
12239
|
-
isPasswordReveal && /* @__PURE__ */ jsx142(
|
|
12240
|
-
"button",
|
|
12241
|
-
{
|
|
12242
|
-
type: "button",
|
|
12243
|
-
onClick: togglePasswordReveal,
|
|
12244
|
-
className: "input__password-button absolute right-[14px] top-[18px] flex h-[13px] w-[21px] cursor-pointer items-center justify-center border-0 bg-transparent p-0 hover:opacity-85",
|
|
12245
|
-
"aria-label": isPasswordRevealed ? t("hide_password") : t("show_password"),
|
|
12246
|
-
children: /* @__PURE__ */ jsx142(
|
|
12247
|
-
Eye,
|
|
12248
|
-
{
|
|
12249
|
-
size: 20,
|
|
12250
|
-
className: cn(
|
|
12251
|
-
"input__password-icon",
|
|
12252
|
-
isPasswordRevealed ? "text-[#fc98dd]" : "text-[var(--chekin-color-gray-2)]"
|
|
12253
|
-
)
|
|
12254
|
-
}
|
|
12255
|
-
)
|
|
12256
|
-
}
|
|
12257
|
-
)
|
|
12258
|
-
]
|
|
12259
|
-
}
|
|
12149
|
+
/* @__PURE__ */ jsxs89("div", { className: cn("input__field", "relative block w-full", fieldClassName), children: [
|
|
12150
|
+
/* @__PURE__ */ jsxs89(
|
|
12151
|
+
"div",
|
|
12152
|
+
{
|
|
12153
|
+
className: cn(
|
|
12154
|
+
"input__content relative w-full cursor-text",
|
|
12155
|
+
readOnly && !disabled && !loading && "cursor-default",
|
|
12156
|
+
contentClassName
|
|
12260
12157
|
),
|
|
12261
|
-
|
|
12158
|
+
children: [
|
|
12159
|
+
/* @__PURE__ */ jsx142(
|
|
12160
|
+
Fieldset,
|
|
12161
|
+
{
|
|
12162
|
+
isFocused: isFocused && !readOnly,
|
|
12163
|
+
invalid: hasInvalidState,
|
|
12164
|
+
isEmpty,
|
|
12165
|
+
onClick: handleLabelClick,
|
|
12166
|
+
isActivated: !isEmpty || isFocused,
|
|
12167
|
+
readOnly,
|
|
12168
|
+
loading,
|
|
12169
|
+
disabled,
|
|
12170
|
+
htmlFor: inputId,
|
|
12171
|
+
labelId: `${inputId}-label`,
|
|
12172
|
+
legend: typeof label === "string" ? label : void 0,
|
|
12173
|
+
label,
|
|
12174
|
+
tooltip,
|
|
12175
|
+
className: "input__fieldset",
|
|
12176
|
+
labelClassName: cn({
|
|
12177
|
+
input__label: true,
|
|
12178
|
+
"pl-[28px]": !!leftIcon
|
|
12179
|
+
})
|
|
12180
|
+
}
|
|
12181
|
+
),
|
|
12182
|
+
leftIcon && /* @__PURE__ */ jsx142("span", { className: "input__left-icon 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__ */ jsx142("span", { className: "input__left-icon-inner flex h-full w-10 items-center justify-center", children: leftIcon }) }),
|
|
12262
12183
|
/* @__PURE__ */ jsx142(
|
|
12184
|
+
"input",
|
|
12185
|
+
{
|
|
12186
|
+
...props,
|
|
12187
|
+
ref: combinedInputRef,
|
|
12188
|
+
id: inputId,
|
|
12189
|
+
name,
|
|
12190
|
+
type: inputType,
|
|
12191
|
+
"data-testid": "input",
|
|
12192
|
+
value,
|
|
12193
|
+
defaultValue,
|
|
12194
|
+
disabled: disabled || loading,
|
|
12195
|
+
readOnly,
|
|
12196
|
+
required: !optional,
|
|
12197
|
+
"aria-label": typeof label === "string" ? label : void 0,
|
|
12198
|
+
"aria-invalid": hasInvalidState,
|
|
12199
|
+
"aria-busy": loading,
|
|
12200
|
+
"aria-describedby": errorMessage && renderErrorMessage ? errorId : void 0,
|
|
12201
|
+
placeholder: isFocused || !label ? placeholder : void 0,
|
|
12202
|
+
onChange: handleChange,
|
|
12203
|
+
onFocus: handleFocus,
|
|
12204
|
+
onBlur: handleBlur,
|
|
12205
|
+
className: cn(
|
|
12206
|
+
"input__control",
|
|
12207
|
+
"m-0 box-border h-12 w-full rounded-[6px] border-0 px-4 text-[16px] font-medium leading-5 text-[var(--chekin-color-brand-navy)] outline-none transition-colors duration-200 [text-overflow:ellipsis] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
12208
|
+
"placeholder:font-medium placeholder:text-[var(--chekin-color-gray-1)] placeholder:opacity-100",
|
|
12209
|
+
isEmpty && !isFocused ? "bg-[var(--empty-field-background)]" : "bg-transparent",
|
|
12210
|
+
isEmpty && "text-[var(--chekin-color-gray-1)]",
|
|
12211
|
+
inputType === "password" && "[&:not(:placeholder-shown)]:font-bold [&:not(:placeholder-shown)]:tracking-[2px]",
|
|
12212
|
+
disabled && "cursor-not-allowed",
|
|
12213
|
+
readOnly && !disabled && !loading && "cursor-default",
|
|
12214
|
+
loading && "cursor-progress",
|
|
12215
|
+
leftIcon && "pl-10",
|
|
12216
|
+
(showRightPaddingForReset || showRightPaddingForReveal) && "pr-10",
|
|
12217
|
+
sign && "pr-10",
|
|
12218
|
+
inputClassName
|
|
12219
|
+
)
|
|
12220
|
+
}
|
|
12221
|
+
),
|
|
12222
|
+
sign && /* @__PURE__ */ jsx142("span", { className: "input__sign pointer-events-none absolute right-[14px] top-0 flex h-full items-center text-[18px] font-medium leading-6 text-[var(--chekin-color-brand-navy)]", children: sign }),
|
|
12223
|
+
trailingAdornment && /* @__PURE__ */ jsx142("span", { className: "input__trailing-adornment pointer-events-none absolute right-[14px] top-0 flex h-full items-center", children: trailingAdornment }),
|
|
12224
|
+
onReset && !isEmpty && /* @__PURE__ */ jsx142(
|
|
12263
12225
|
"button",
|
|
12264
12226
|
{
|
|
12265
12227
|
type: "button",
|
|
12266
|
-
onClick:
|
|
12267
|
-
|
|
12268
|
-
"
|
|
12269
|
-
|
|
12228
|
+
onClick: onReset,
|
|
12229
|
+
disabled,
|
|
12230
|
+
className: "input__reset-button absolute right-0 top-0 flex h-full w-10 items-center justify-center border-0 bg-transparent p-0 text-[#9696b9] hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-50",
|
|
12231
|
+
"aria-label": t("reset"),
|
|
12232
|
+
children: /* @__PURE__ */ jsx142(X9, { size: 14 })
|
|
12270
12233
|
}
|
|
12271
12234
|
),
|
|
12272
|
-
/* @__PURE__ */ jsx142(
|
|
12235
|
+
isPasswordReveal && /* @__PURE__ */ jsx142(
|
|
12273
12236
|
"button",
|
|
12274
12237
|
{
|
|
12275
12238
|
type: "button",
|
|
12276
|
-
onClick:
|
|
12277
|
-
className: "
|
|
12278
|
-
"aria-label": t("
|
|
12279
|
-
children: /* @__PURE__ */ jsx142(
|
|
12239
|
+
onClick: togglePasswordReveal,
|
|
12240
|
+
className: "input__password-button absolute right-[14px] top-[18px] flex h-[13px] w-[21px] cursor-pointer items-center justify-center border-0 bg-transparent p-0 hover:opacity-85",
|
|
12241
|
+
"aria-label": isPasswordRevealed ? t("hide_password") : t("show_password"),
|
|
12242
|
+
children: /* @__PURE__ */ jsx142(
|
|
12243
|
+
Eye,
|
|
12244
|
+
{
|
|
12245
|
+
size: 20,
|
|
12246
|
+
className: cn(
|
|
12247
|
+
"input__password-icon",
|
|
12248
|
+
isPasswordRevealed ? "text-[#fc98dd]" : "text-[var(--chekin-color-gray-2)]"
|
|
12249
|
+
)
|
|
12250
|
+
}
|
|
12251
|
+
)
|
|
12280
12252
|
}
|
|
12281
12253
|
)
|
|
12282
|
-
]
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12254
|
+
]
|
|
12255
|
+
}
|
|
12256
|
+
),
|
|
12257
|
+
type === "number" && showNumberButtons && /* @__PURE__ */ jsxs89("div", { className: "input__number-controls absolute right-[18px] top-[13px] inline-flex items-center text-right", children: [
|
|
12258
|
+
/* @__PURE__ */ jsx142(
|
|
12259
|
+
"button",
|
|
12260
|
+
{
|
|
12261
|
+
type: "button",
|
|
12262
|
+
onClick: onDecrement,
|
|
12263
|
+
className: "input__decrement-button mr-2 inline-flex h-[23px] w-8 cursor-pointer items-center justify-center rounded-[3px] border-0 bg-[var(--chekin-color-brand-blue)] p-0 text-[20px] font-bold text-white outline-none hover:opacity-90 active:opacity-100",
|
|
12264
|
+
"aria-label": t("decrement"),
|
|
12265
|
+
children: /* @__PURE__ */ jsx142(Minus4, { size: 16, strokeWidth: 3, "aria-hidden": true })
|
|
12266
|
+
}
|
|
12267
|
+
),
|
|
12268
|
+
/* @__PURE__ */ jsx142(
|
|
12269
|
+
"button",
|
|
12270
|
+
{
|
|
12271
|
+
type: "button",
|
|
12272
|
+
onClick: onIncrement,
|
|
12273
|
+
className: "input__increment-button inline-flex h-[23px] w-8 cursor-pointer items-center justify-center rounded-[3px] border-0 bg-[var(--chekin-color-brand-blue)] p-0 text-[20px] font-bold text-white outline-none hover:opacity-90 active:opacity-100",
|
|
12274
|
+
"aria-label": t("increment"),
|
|
12275
|
+
children: /* @__PURE__ */ jsx142(Plus3, { size: 16, strokeWidth: 3, "aria-hidden": true })
|
|
12276
|
+
}
|
|
12277
|
+
)
|
|
12278
|
+
] })
|
|
12279
|
+
] }),
|
|
12286
12280
|
!errorMessage && optional && /* @__PURE__ */ jsx142(
|
|
12287
12281
|
"span",
|
|
12288
12282
|
{
|
|
@@ -13098,15 +13092,19 @@ function useSelectMenuState({
|
|
|
13098
13092
|
}) {
|
|
13099
13093
|
const containerRef = React47.useRef(null);
|
|
13100
13094
|
const [internalIsOpen, setInternalIsOpen] = React47.useState(false);
|
|
13101
|
-
const
|
|
13102
|
-
const isOpen =
|
|
13095
|
+
const [hasClosedControlledOpen, setHasClosedControlledOpen] = React47.useState(false);
|
|
13096
|
+
const isOpen = controlledIsOpen === false ? false : controlledIsOpen === true ? !hasClosedControlledOpen : internalIsOpen;
|
|
13097
|
+
React47.useEffect(() => {
|
|
13098
|
+
if (controlledIsOpen !== true) setHasClosedControlledOpen(false);
|
|
13099
|
+
}, [controlledIsOpen]);
|
|
13103
13100
|
const setIsOpen = React47.useCallback(
|
|
13104
13101
|
(next) => {
|
|
13105
13102
|
const value = typeof next === "function" ? next(isOpen) : next;
|
|
13106
|
-
|
|
13103
|
+
if (controlledIsOpen === true) setHasClosedControlledOpen(!value);
|
|
13104
|
+
if (controlledIsOpen !== false) setInternalIsOpen(value);
|
|
13107
13105
|
onMenuOpenChange?.(value);
|
|
13108
13106
|
},
|
|
13109
|
-
[isOpen, onMenuOpenChange]
|
|
13107
|
+
[isOpen, controlledIsOpen, onMenuOpenChange]
|
|
13110
13108
|
);
|
|
13111
13109
|
const openMenu = React47.useCallback(() => {
|
|
13112
13110
|
setIsOpen(true);
|
|
@@ -14307,7 +14305,7 @@ var PhoneInput = React50.forwardRef(function PhoneInput2({
|
|
|
14307
14305
|
filterOption: countriesFilter,
|
|
14308
14306
|
clearable: false,
|
|
14309
14307
|
getValueLabel: (option) => option.value,
|
|
14310
|
-
className: "
|
|
14308
|
+
className: "max-w-none w-auto",
|
|
14311
14309
|
dropdownClassName: "right-auto w-[280px]"
|
|
14312
14310
|
}
|
|
14313
14311
|
),
|
|
@@ -14332,7 +14330,7 @@ var PhoneInput = React50.forwardRef(function PhoneInput2({
|
|
|
14332
14330
|
onFocus,
|
|
14333
14331
|
onBlur,
|
|
14334
14332
|
renderErrorMessage: false,
|
|
14335
|
-
wrapperClassName: "
|
|
14333
|
+
wrapperClassName: "max-w-none w-auto",
|
|
14336
14334
|
contentClassName: readOnly ? "!cursor-default" : void 0,
|
|
14337
14335
|
inputClassName: readOnly ? "!cursor-default" : void 0
|
|
14338
14336
|
}
|
|
@@ -14719,64 +14717,10 @@ var InfiniteScrollMultiSelect = React57.forwardRef(function InfiniteScrollMultiS
|
|
|
14719
14717
|
import * as React58 from "react";
|
|
14720
14718
|
import { useTranslation as useTranslation36 } from "react-i18next";
|
|
14721
14719
|
|
|
14722
|
-
// src/dashboard/select-checkboxes/SelectCheckboxOption.tsx
|
|
14723
|
-
import { jsx as jsx163, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
14724
|
-
function SelectCheckboxOption(props) {
|
|
14725
|
-
const {
|
|
14726
|
-
option,
|
|
14727
|
-
index,
|
|
14728
|
-
isSelected,
|
|
14729
|
-
isHighlighted,
|
|
14730
|
-
isDisabled,
|
|
14731
|
-
id,
|
|
14732
|
-
onClick,
|
|
14733
|
-
onHover,
|
|
14734
|
-
innerRef
|
|
14735
|
-
} = props;
|
|
14736
|
-
return /* @__PURE__ */ jsxs102(
|
|
14737
|
-
"button",
|
|
14738
|
-
{
|
|
14739
|
-
id,
|
|
14740
|
-
ref: innerRef,
|
|
14741
|
-
type: "button",
|
|
14742
|
-
role: "option",
|
|
14743
|
-
"aria-selected": isSelected,
|
|
14744
|
-
"aria-disabled": isDisabled,
|
|
14745
|
-
tabIndex: -1,
|
|
14746
|
-
disabled: isDisabled,
|
|
14747
|
-
onClick: () => onClick(option),
|
|
14748
|
-
onMouseMove: () => onHover(index),
|
|
14749
|
-
className: cn(
|
|
14750
|
-
"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",
|
|
14751
|
-
!isDisabled && "cursor-pointer hover:bg-[var(--chekin-color-surface-pressed)]",
|
|
14752
|
-
isHighlighted && !isDisabled && "bg-[var(--chekin-color-surface-pressed)]",
|
|
14753
|
-
isSelected && "bg-[var(--chekin-color-surface-autocomplete)] font-semibold text-[var(--chekin-color-brand-blue)]",
|
|
14754
|
-
isDisabled && "cursor-not-allowed text-[var(--chekin-color-gray-2)]"
|
|
14755
|
-
),
|
|
14756
|
-
children: [
|
|
14757
|
-
/* @__PURE__ */ jsx163(
|
|
14758
|
-
BaseCheckbox,
|
|
14759
|
-
{
|
|
14760
|
-
checked: isSelected,
|
|
14761
|
-
disabled: isDisabled,
|
|
14762
|
-
size: "s",
|
|
14763
|
-
tabIndex: -1,
|
|
14764
|
-
className: "pointer-events-none shrink-0"
|
|
14765
|
-
}
|
|
14766
|
-
),
|
|
14767
|
-
/* @__PURE__ */ jsxs102("span", { className: "flex min-w-0 flex-1 items-center justify-between gap-2", children: [
|
|
14768
|
-
/* @__PURE__ */ jsx163("span", { className: "block break-words", children: option.label }),
|
|
14769
|
-
option.description && /* @__PURE__ */ jsx163("span", { className: "shrink-0 text-[12px] font-medium italic text-[var(--chekin-color-gray-1)]", children: option.description })
|
|
14770
|
-
] })
|
|
14771
|
-
]
|
|
14772
|
-
}
|
|
14773
|
-
);
|
|
14774
|
-
}
|
|
14775
|
-
|
|
14776
14720
|
// src/dashboard/select-checkboxes/CountTrigger.tsx
|
|
14777
14721
|
import { ChevronDown as ChevronDown3 } from "lucide-react";
|
|
14778
14722
|
import { useTranslation as useTranslation35 } from "react-i18next";
|
|
14779
|
-
import { jsx as
|
|
14723
|
+
import { jsx as jsx163, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
14780
14724
|
function createCountTrigger(opts) {
|
|
14781
14725
|
const { valueText, totalCount } = opts;
|
|
14782
14726
|
function CountTrigger(props) {
|
|
@@ -14804,7 +14748,7 @@ function createCountTrigger(opts) {
|
|
|
14804
14748
|
const computedText = typeof valueText === "function" ? valueText(count, total) : valueText ?? (count > 0 ? t("n_selected", { count, defaultValue: `${count} selected` }) : "");
|
|
14805
14749
|
const display = hasValue ? computedText : isOpen ? placeholder ?? null : null;
|
|
14806
14750
|
const isEmpty = !hasValue;
|
|
14807
|
-
return /* @__PURE__ */
|
|
14751
|
+
return /* @__PURE__ */ jsxs102(
|
|
14808
14752
|
"button",
|
|
14809
14753
|
{
|
|
14810
14754
|
id: triggerId,
|
|
@@ -14827,9 +14771,9 @@ function createCountTrigger(opts) {
|
|
|
14827
14771
|
loading && "!cursor-progress"
|
|
14828
14772
|
),
|
|
14829
14773
|
children: [
|
|
14830
|
-
leftIcon && /* @__PURE__ */
|
|
14831
|
-
/* @__PURE__ */
|
|
14832
|
-
/* @__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(
|
|
14833
14777
|
ChevronDown3,
|
|
14834
14778
|
{
|
|
14835
14779
|
size: 16,
|
|
@@ -14847,9 +14791,9 @@ function createCountTrigger(opts) {
|
|
|
14847
14791
|
}
|
|
14848
14792
|
|
|
14849
14793
|
// src/dashboard/select-checkboxes/SelectAllRow.tsx
|
|
14850
|
-
import { jsx as
|
|
14794
|
+
import { jsx as jsx164, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
14851
14795
|
function SelectAllRow({ label, checked, disabled, onToggle }) {
|
|
14852
|
-
return /* @__PURE__ */
|
|
14796
|
+
return /* @__PURE__ */ jsxs103(
|
|
14853
14797
|
"button",
|
|
14854
14798
|
{
|
|
14855
14799
|
type: "button",
|
|
@@ -14860,7 +14804,7 @@ function SelectAllRow({ label, checked, disabled, onToggle }) {
|
|
|
14860
14804
|
disabled && "cursor-default opacity-40"
|
|
14861
14805
|
),
|
|
14862
14806
|
children: [
|
|
14863
|
-
/* @__PURE__ */
|
|
14807
|
+
/* @__PURE__ */ jsx164(
|
|
14864
14808
|
BaseCheckbox,
|
|
14865
14809
|
{
|
|
14866
14810
|
checked,
|
|
@@ -14870,20 +14814,20 @@ function SelectAllRow({ label, checked, disabled, onToggle }) {
|
|
|
14870
14814
|
className: "pointer-events-none shrink-0"
|
|
14871
14815
|
}
|
|
14872
14816
|
),
|
|
14873
|
-
/* @__PURE__ */
|
|
14817
|
+
/* @__PURE__ */ jsx164("span", { className: "flex-1", children: label })
|
|
14874
14818
|
]
|
|
14875
14819
|
}
|
|
14876
14820
|
);
|
|
14877
14821
|
}
|
|
14878
14822
|
|
|
14879
14823
|
// src/dashboard/select-checkboxes/SelectCheckboxes.tsx
|
|
14880
|
-
import { Fragment as Fragment16, jsx as
|
|
14824
|
+
import { Fragment as Fragment16, jsx as jsx165 } from "react/jsx-runtime";
|
|
14881
14825
|
function hasPaginationProps(props) {
|
|
14882
14826
|
return props.canLoadMore !== void 0 || props.isLoadingMore !== void 0 || props.loadMoreItems !== void 0 || props.onSearchChange !== void 0;
|
|
14883
14827
|
}
|
|
14884
14828
|
function makeTriggerSlot(render) {
|
|
14885
14829
|
function CustomTrigger(props) {
|
|
14886
|
-
return /* @__PURE__ */
|
|
14830
|
+
return /* @__PURE__ */ jsx165(Fragment16, { children: render(props.isOpen, props.onContainerClick) });
|
|
14887
14831
|
}
|
|
14888
14832
|
return CustomTrigger;
|
|
14889
14833
|
}
|
|
@@ -14968,15 +14912,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14968
14912
|
totalCount: flatRawOptions.length
|
|
14969
14913
|
});
|
|
14970
14914
|
}, [trigger, valueText, flatRawOptions.length]);
|
|
14971
|
-
const
|
|
14972
|
-
() => ({
|
|
14973
|
-
...userComponents,
|
|
14974
|
-
Control,
|
|
14975
|
-
Option: userComponents?.Option ?? SelectCheckboxOption
|
|
14976
|
-
}),
|
|
14977
|
-
[userComponents, Control]
|
|
14978
|
-
);
|
|
14979
|
-
const menuHeader = allowSelectAll ? /* @__PURE__ */ jsx166(
|
|
14915
|
+
const menuHeader = allowSelectAll ? /* @__PURE__ */ jsx165(
|
|
14980
14916
|
SelectAllRow,
|
|
14981
14917
|
{
|
|
14982
14918
|
label: selectAllLabel ?? t("select_all", { defaultValue: "Select All" }),
|
|
@@ -14996,7 +14932,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
14996
14932
|
value: currentValue,
|
|
14997
14933
|
onChange: handleChange,
|
|
14998
14934
|
filterOption: passthroughFilter2,
|
|
14999
|
-
components,
|
|
14935
|
+
// components,
|
|
15000
14936
|
closeMenuOnSelect,
|
|
15001
14937
|
searchPosition: searchable ? "dropdown" : "trigger",
|
|
15002
14938
|
searchable,
|
|
@@ -15005,7 +14941,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
15005
14941
|
isMulti: true
|
|
15006
14942
|
};
|
|
15007
14943
|
if (isPaginated) {
|
|
15008
|
-
return /* @__PURE__ */
|
|
14944
|
+
return /* @__PURE__ */ jsx165(
|
|
15009
14945
|
InfiniteScrollSelect,
|
|
15010
14946
|
{
|
|
15011
14947
|
ref,
|
|
@@ -15016,7 +14952,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
15016
14952
|
}
|
|
15017
14953
|
);
|
|
15018
14954
|
}
|
|
15019
|
-
return /* @__PURE__ */
|
|
14955
|
+
return /* @__PURE__ */ jsx165(
|
|
15020
14956
|
Select,
|
|
15021
14957
|
{
|
|
15022
14958
|
ref,
|
|
@@ -15031,6 +14967,60 @@ var SelectCheckboxes = React58.forwardRef(
|
|
|
15031
14967
|
SelectCheckboxesInternal
|
|
15032
14968
|
);
|
|
15033
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
|
+
|
|
15034
15024
|
// src/dashboard/textarea/Textarea.tsx
|
|
15035
15025
|
import * as React60 from "react";
|
|
15036
15026
|
import { useTranslation as useTranslation37 } from "react-i18next";
|