@sustaina/shared-ui 1.65.4 → 1.66.0
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.mts +33 -25
- package/dist/index.d.ts +33 -25
- package/dist/index.js +330 -363
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +332 -365
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
9
9
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
10
|
-
import { ChevronLeft, ChevronRight, CircleX, ChevronDown, X, CircleHelp,
|
|
10
|
+
import { ChevronLeft, ChevronRight, CircleX, ChevronDown, X, CircleHelp, Check, Undo, Redo, SearchIcon as SearchIcon$1, Pencil, BaselineIcon, Bold, Italic, Underline, Strikethrough, Code, Pilcrow, Heading1, Heading2, Heading3, List, ListOrdered, QuoteIcon, CodeSquare, LinkIcon, Link2Off, ImageIcon, AlignLeft, AlignCenter, AlignRight, ExternalLink, XIcon, CheckIcon, Triangle, CalendarIcon, Search, ChevronUp, ChevronRightIcon, PanelLeftIcon, Minimize2, Maximize2, Plus, MoreVertical, Bug, GripVertical, Info, CircleMinus, Minus } from 'lucide-react';
|
|
11
11
|
import Autoplay from 'embla-carousel-autoplay';
|
|
12
12
|
import { Slot } from '@radix-ui/react-slot';
|
|
13
13
|
import { cva } from 'class-variance-authority';
|
|
@@ -15,7 +15,7 @@ import { createPortal } from 'react-dom';
|
|
|
15
15
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
16
16
|
import { useForm, FormProvider, Controller, useFormContext, useFormState, useFieldArray, useWatch } from 'react-hook-form';
|
|
17
17
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
18
|
-
import { format, isValid,
|
|
18
|
+
import { format, isValid, parseISO, isAfter, compareAsc, parse } from 'date-fns';
|
|
19
19
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
20
20
|
import { Command as Command$1 } from 'cmdk';
|
|
21
21
|
import * as DialogPrimitive2 from '@radix-ui/react-dialog';
|
|
@@ -4854,6 +4854,14 @@ var ClearButton = ({
|
|
|
4854
4854
|
event.stopPropagation();
|
|
4855
4855
|
triggerClear();
|
|
4856
4856
|
};
|
|
4857
|
+
const handlePointerDown = (event) => {
|
|
4858
|
+
event.preventDefault();
|
|
4859
|
+
event.stopPropagation();
|
|
4860
|
+
};
|
|
4861
|
+
const handleMouseDown = (event) => {
|
|
4862
|
+
event.preventDefault();
|
|
4863
|
+
event.stopPropagation();
|
|
4864
|
+
};
|
|
4857
4865
|
const handleKeyDown = (event) => {
|
|
4858
4866
|
if (event.key === "Enter" || event.key === " ") {
|
|
4859
4867
|
event.preventDefault();
|
|
@@ -4866,6 +4874,8 @@ var ClearButton = ({
|
|
|
4866
4874
|
{
|
|
4867
4875
|
role: "button",
|
|
4868
4876
|
tabIndex: 0,
|
|
4877
|
+
onPointerDown: handlePointerDown,
|
|
4878
|
+
onMouseDown: handleMouseDown,
|
|
4869
4879
|
onClick: handleClick,
|
|
4870
4880
|
onKeyDown: handleKeyDown,
|
|
4871
4881
|
className: `clear-button ${className}`.trim(),
|
|
@@ -6296,7 +6306,7 @@ function TooltipContent({
|
|
|
6296
6306
|
"data-slot": "tooltip-content",
|
|
6297
6307
|
sideOffset,
|
|
6298
6308
|
className: cn(
|
|
6299
|
-
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
6309
|
+
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance whitespace-pre-wrap",
|
|
6300
6310
|
className
|
|
6301
6311
|
),
|
|
6302
6312
|
...props,
|
|
@@ -6742,6 +6752,7 @@ var Truncated = ({
|
|
|
6742
6752
|
const [isTruncated, setIsTruncated] = React.useState(false);
|
|
6743
6753
|
const [measureWidth, setMeasureWidth] = React.useState(0);
|
|
6744
6754
|
const Comp = as;
|
|
6755
|
+
const isStringChildren = typeof children === "string";
|
|
6745
6756
|
const normalizedChildren = typeof children === "string" ? children.replace(/>/g, ">\u200B") : children;
|
|
6746
6757
|
const lineClampLines = typeof ellipsis === "number" ? ellipsis : typeof ellipsis === "object" ? ellipsis?.lineClamp ?? 3 : null;
|
|
6747
6758
|
const enableMeasure = Boolean(ellipsis) && !tooltipProps?.disabled;
|
|
@@ -6781,19 +6792,31 @@ var Truncated = ({
|
|
|
6781
6792
|
overflow: "hidden"
|
|
6782
6793
|
};
|
|
6783
6794
|
}, [lineClampLines, style]);
|
|
6784
|
-
const
|
|
6785
|
-
|
|
6795
|
+
const contentWhitespaceClass = React.useMemo(() => {
|
|
6796
|
+
if (!isStringChildren) return void 0;
|
|
6797
|
+
return truncationClass === "truncate" ? "whitespace-pre" : "whitespace-pre-wrap";
|
|
6798
|
+
}, [isStringChildren, truncationClass]);
|
|
6799
|
+
const baseContent = /* @__PURE__ */ jsx(
|
|
6800
|
+
Comp,
|
|
6786
6801
|
{
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6802
|
+
ref: elementRef,
|
|
6803
|
+
className: cn(truncationClass, contentWhitespaceClass, className),
|
|
6804
|
+
style: clampedStyle,
|
|
6805
|
+
children: /* @__PURE__ */ jsx(
|
|
6806
|
+
EllipsisMeasure,
|
|
6807
|
+
{
|
|
6808
|
+
enableMeasure,
|
|
6809
|
+
text: normalizedChildren,
|
|
6810
|
+
width: measureWidth,
|
|
6811
|
+
rows: lineClampLines ?? 1,
|
|
6812
|
+
expanded: false,
|
|
6813
|
+
miscDeps: [truncationClass],
|
|
6814
|
+
onEllipsis: setIsTruncated,
|
|
6815
|
+
children: () => normalizedChildren
|
|
6816
|
+
}
|
|
6817
|
+
)
|
|
6795
6818
|
}
|
|
6796
|
-
)
|
|
6819
|
+
);
|
|
6797
6820
|
let tooltipContent = normalizedChildren;
|
|
6798
6821
|
if (typeof ellipsis === "object") {
|
|
6799
6822
|
tooltipContent = ellipsis?.content ?? normalizedChildren;
|
|
@@ -6821,6 +6844,7 @@ var Truncated = ({
|
|
|
6821
6844
|
side: tooltipSide,
|
|
6822
6845
|
className: cn(
|
|
6823
6846
|
"text-white bg-sus-secondary-gray-10 max-w-xs sm:max-w-md wrap-break-word shadow-lg",
|
|
6847
|
+
isStringChildren && "whitespace-pre-wrap",
|
|
6824
6848
|
tooltipContentClassName
|
|
6825
6849
|
),
|
|
6826
6850
|
arrowClassName: cn("bg-sus-secondary-gray-10 fill-sus-secondary-gray-10", tooltipArrowClassName),
|
|
@@ -8594,7 +8618,7 @@ var sanitizeInput = (val) => {
|
|
|
8594
8618
|
if (/[%*~^]/.test(trimmed)) return "__INVALID_WILDCARD__";
|
|
8595
8619
|
if (/[%><={}\\[\]"']/u.test(trimmed)) return "__INVALID_CHAR__";
|
|
8596
8620
|
if (/\p{Cc}/u.test(val)) return "__INVALID_CONTROL_CHAR__";
|
|
8597
|
-
return
|
|
8621
|
+
return val;
|
|
8598
8622
|
};
|
|
8599
8623
|
var numericTypes = ["number"];
|
|
8600
8624
|
var dateTypes = ["date", "datemonth"];
|
|
@@ -9963,6 +9987,291 @@ var DataTable = ({
|
|
|
9963
9987
|
);
|
|
9964
9988
|
};
|
|
9965
9989
|
var DataTable_default = DataTable;
|
|
9990
|
+
var defaultValueFormatter3 = (date) => format(date, "yyyy-MM-dd'T'HH:mm:ss");
|
|
9991
|
+
var parseWithPatterns = (value) => {
|
|
9992
|
+
const patterns = ["yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM-dd"];
|
|
9993
|
+
for (const pattern of patterns) {
|
|
9994
|
+
const parsed = parse(value, pattern, /* @__PURE__ */ new Date());
|
|
9995
|
+
if (isValid(parsed)) return parsed;
|
|
9996
|
+
}
|
|
9997
|
+
return void 0;
|
|
9998
|
+
};
|
|
9999
|
+
var defaultValueParser3 = (value) => {
|
|
10000
|
+
const isoParsed = parseISO(value);
|
|
10001
|
+
if (isValid(isoParsed)) return isoParsed;
|
|
10002
|
+
return parseWithPatterns(value);
|
|
10003
|
+
};
|
|
10004
|
+
var DateTimePicker = ({
|
|
10005
|
+
value,
|
|
10006
|
+
onChange,
|
|
10007
|
+
onValueChange,
|
|
10008
|
+
disabled = false,
|
|
10009
|
+
invalid = false,
|
|
10010
|
+
allowClear = true,
|
|
10011
|
+
use24Hour = false,
|
|
10012
|
+
placeholderDate = "Select date",
|
|
10013
|
+
placeholderTime = "Select time",
|
|
10014
|
+
className,
|
|
10015
|
+
datePickerClassName,
|
|
10016
|
+
timePickerClassName,
|
|
10017
|
+
popoverContentClassName,
|
|
10018
|
+
clearAriaLabel = "Clear date time",
|
|
10019
|
+
minuteStep = 5,
|
|
10020
|
+
minDateTime,
|
|
10021
|
+
maxDateTime,
|
|
10022
|
+
valueFormatter,
|
|
10023
|
+
valueParser,
|
|
10024
|
+
datePickerProps,
|
|
10025
|
+
timePickerProps
|
|
10026
|
+
}) => {
|
|
10027
|
+
const [open, setOpen] = React__default.useState(false);
|
|
10028
|
+
const hourListRef = React__default.useRef(null);
|
|
10029
|
+
const minuteListRef = React__default.useRef(null);
|
|
10030
|
+
const parser = React__default.useMemo(() => valueParser ?? defaultValueParser3, [valueParser]);
|
|
10031
|
+
const outputFormatter = React__default.useMemo(() => valueFormatter ?? defaultValueFormatter3, [valueFormatter]);
|
|
10032
|
+
const parseInput = React__default.useCallback(
|
|
10033
|
+
(input) => {
|
|
10034
|
+
if (input === null || input === void 0) return void 0;
|
|
10035
|
+
if (input instanceof Date) return isValid(input) ? input : void 0;
|
|
10036
|
+
const parsed = parser(input);
|
|
10037
|
+
return parsed && isValid(parsed) ? parsed : void 0;
|
|
10038
|
+
},
|
|
10039
|
+
[parser]
|
|
10040
|
+
);
|
|
10041
|
+
const isControlled = value !== void 0;
|
|
10042
|
+
const parsedValue = React__default.useMemo(() => parseInput(value), [parseInput, value]);
|
|
10043
|
+
const [internalValue, setInternalValue] = React__default.useState(() => parsedValue);
|
|
10044
|
+
React__default.useEffect(() => {
|
|
10045
|
+
if (isControlled) {
|
|
10046
|
+
setInternalValue(parsedValue);
|
|
10047
|
+
}
|
|
10048
|
+
}, [isControlled, parsedValue]);
|
|
10049
|
+
const currentValue = isControlled ? parsedValue : internalValue;
|
|
10050
|
+
const emitChange = React__default.useCallback(
|
|
10051
|
+
(next) => {
|
|
10052
|
+
if (!isControlled) {
|
|
10053
|
+
setInternalValue(next);
|
|
10054
|
+
}
|
|
10055
|
+
onChange?.(next);
|
|
10056
|
+
onValueChange?.(next ? outputFormatter(next) : void 0);
|
|
10057
|
+
},
|
|
10058
|
+
[isControlled, onChange, onValueChange, outputFormatter]
|
|
10059
|
+
);
|
|
10060
|
+
const makeDateTime = React__default.useCallback((baseDate, hour, minute) => {
|
|
10061
|
+
const clampedHour = Math.min(23, Math.max(0, hour));
|
|
10062
|
+
const clampedMinute = Math.min(59, Math.max(0, minute));
|
|
10063
|
+
return new Date(
|
|
10064
|
+
baseDate.getFullYear(),
|
|
10065
|
+
baseDate.getMonth(),
|
|
10066
|
+
baseDate.getDate(),
|
|
10067
|
+
clampedHour,
|
|
10068
|
+
clampedMinute,
|
|
10069
|
+
0,
|
|
10070
|
+
0
|
|
10071
|
+
);
|
|
10072
|
+
}, []);
|
|
10073
|
+
const handleDateChange = React__default.useCallback(
|
|
10074
|
+
(nextDate) => {
|
|
10075
|
+
if (!nextDate) {
|
|
10076
|
+
emitChange(void 0);
|
|
10077
|
+
return;
|
|
10078
|
+
}
|
|
10079
|
+
emitChange(new Date(nextDate.getFullYear(), nextDate.getMonth(), nextDate.getDate(), 0, 0, 0, 0));
|
|
10080
|
+
},
|
|
10081
|
+
[emitChange]
|
|
10082
|
+
);
|
|
10083
|
+
const handleTimeApply = React__default.useCallback(
|
|
10084
|
+
(hour, minute) => {
|
|
10085
|
+
const baseDate = currentValue;
|
|
10086
|
+
if (!baseDate) return;
|
|
10087
|
+
emitChange(makeDateTime(baseDate, hour, minute));
|
|
10088
|
+
},
|
|
10089
|
+
[currentValue, emitChange, makeDateTime]
|
|
10090
|
+
);
|
|
10091
|
+
const currentHour = currentValue?.getHours();
|
|
10092
|
+
const currentMinute = currentValue?.getMinutes();
|
|
10093
|
+
const handleHourSelect = React__default.useCallback(
|
|
10094
|
+
(hour) => {
|
|
10095
|
+
handleTimeApply(hour, currentMinute ?? 0);
|
|
10096
|
+
},
|
|
10097
|
+
[currentMinute, handleTimeApply]
|
|
10098
|
+
);
|
|
10099
|
+
const handleMinuteSelect = React__default.useCallback(
|
|
10100
|
+
(minute) => {
|
|
10101
|
+
handleTimeApply(currentHour ?? 0, minute);
|
|
10102
|
+
setOpen(false);
|
|
10103
|
+
},
|
|
10104
|
+
[currentHour, handleTimeApply]
|
|
10105
|
+
);
|
|
10106
|
+
const hours = React__default.useMemo(() => Array.from({ length: 24 }, (_, index) => 23 - index), []);
|
|
10107
|
+
const minuteInterval = React__default.useMemo(() => {
|
|
10108
|
+
const safeStep = Math.min(60, Math.max(1, minuteStep));
|
|
10109
|
+
return Array.from({ length: Math.ceil(60 / safeStep) }, (_, index) => index * safeStep).filter(
|
|
10110
|
+
(value2) => value2 < 60
|
|
10111
|
+
);
|
|
10112
|
+
}, [minuteStep]);
|
|
10113
|
+
const displayLabel = React__default.useMemo(() => {
|
|
10114
|
+
if (!currentValue) return `${placeholderDate} ${placeholderTime}`;
|
|
10115
|
+
return format(currentValue, use24Hour ? "dd/MM/yyyy HH:mm" : "dd/MM/yyyy hh:mm a");
|
|
10116
|
+
}, [currentValue, placeholderDate, placeholderTime, use24Hour]);
|
|
10117
|
+
const canSelectTime = !disabled && !!currentValue;
|
|
10118
|
+
const isHourDisabled = React__default.useCallback(
|
|
10119
|
+
(hour) => {
|
|
10120
|
+
if (!currentValue) return true;
|
|
10121
|
+
const testDateTime = new Date(
|
|
10122
|
+
currentValue.getFullYear(),
|
|
10123
|
+
currentValue.getMonth(),
|
|
10124
|
+
currentValue.getDate(),
|
|
10125
|
+
hour,
|
|
10126
|
+
0,
|
|
10127
|
+
0,
|
|
10128
|
+
0
|
|
10129
|
+
);
|
|
10130
|
+
if (minDateTime && testDateTime < minDateTime) return true;
|
|
10131
|
+
if (maxDateTime && testDateTime > maxDateTime) return true;
|
|
10132
|
+
return false;
|
|
10133
|
+
},
|
|
10134
|
+
[currentValue, minDateTime, maxDateTime]
|
|
10135
|
+
);
|
|
10136
|
+
const isMinuteDisabled = React__default.useCallback(
|
|
10137
|
+
(minute) => {
|
|
10138
|
+
if (!currentValue || typeof currentHour === "undefined") return true;
|
|
10139
|
+
const testDateTime = new Date(
|
|
10140
|
+
currentValue.getFullYear(),
|
|
10141
|
+
currentValue.getMonth(),
|
|
10142
|
+
currentValue.getDate(),
|
|
10143
|
+
currentHour,
|
|
10144
|
+
minute,
|
|
10145
|
+
0,
|
|
10146
|
+
0
|
|
10147
|
+
);
|
|
10148
|
+
if (minDateTime && testDateTime < minDateTime) return true;
|
|
10149
|
+
if (maxDateTime && testDateTime > maxDateTime) return true;
|
|
10150
|
+
return false;
|
|
10151
|
+
},
|
|
10152
|
+
[currentValue, currentHour, minDateTime, maxDateTime]
|
|
10153
|
+
);
|
|
10154
|
+
const scrollToSelected = React__default.useCallback((container, selector) => {
|
|
10155
|
+
if (!container) return;
|
|
10156
|
+
const element = container.querySelector(selector);
|
|
10157
|
+
if (!element) return;
|
|
10158
|
+
const target = element.offsetTop - container.clientHeight / 2 + element.clientHeight / 2;
|
|
10159
|
+
container.scrollTo({ top: Math.max(0, target), behavior: "smooth" });
|
|
10160
|
+
}, []);
|
|
10161
|
+
React__default.useEffect(() => {
|
|
10162
|
+
if (!open) return;
|
|
10163
|
+
if (typeof currentHour === "number") {
|
|
10164
|
+
scrollToSelected(hourListRef.current, `[data-hour="${currentHour}"]`);
|
|
10165
|
+
}
|
|
10166
|
+
if (typeof currentMinute === "number") {
|
|
10167
|
+
scrollToSelected(minuteListRef.current, `[data-minute="${currentMinute}"]`);
|
|
10168
|
+
}
|
|
10169
|
+
}, [currentHour, currentMinute, open, scrollToSelected]);
|
|
10170
|
+
const handleClear = React__default.useCallback(() => {
|
|
10171
|
+
emitChange(void 0);
|
|
10172
|
+
setOpen(false);
|
|
10173
|
+
}, [emitChange]);
|
|
10174
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full", className), children: [
|
|
10175
|
+
/* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
10176
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
10177
|
+
Button,
|
|
10178
|
+
{
|
|
10179
|
+
type: "button",
|
|
10180
|
+
variant: "outline",
|
|
10181
|
+
disabled,
|
|
10182
|
+
"aria-invalid": invalid || void 0,
|
|
10183
|
+
className: cn(
|
|
10184
|
+
"group relative flex! w-full items-center justify-between rounded-md bg-white! pl-4 text-left text-sm font-medium shadow-none border border-sus-secondary-gray-8 focus-visible:ring-0 focus-visible:ring-offset-0 data-[state=open]:border-black disabled:bg-sus-secondary-gray-3!",
|
|
10185
|
+
"min-h-9",
|
|
10186
|
+
currentValue ? "text-gray-700" : "text-gray-400",
|
|
10187
|
+
invalid && "border-destructive focus-visible:border-destructive focus-visible:ring-destructive/30",
|
|
10188
|
+
allowClear && currentValue ? "pr-8" : "pr-4"
|
|
10189
|
+
),
|
|
10190
|
+
children: [
|
|
10191
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate font-light", children: displayLabel }),
|
|
10192
|
+
/* @__PURE__ */ jsx("span", { className: "flex items-center gap-2 text-black group-disabled:text-sus-secondary-gray-8 shrink-0", children: /* @__PURE__ */ jsx(SuiCalendarIcon2, { className: "h-4 w-4" }) })
|
|
10193
|
+
]
|
|
10194
|
+
}
|
|
10195
|
+
) }),
|
|
10196
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: cn("w-auto p-0", popoverContentClassName), align: "start", children: /* @__PURE__ */ jsxs("div", { className: "sm:flex", children: [
|
|
10197
|
+
/* @__PURE__ */ jsx(
|
|
10198
|
+
DatePicker,
|
|
10199
|
+
{
|
|
10200
|
+
...datePickerProps,
|
|
10201
|
+
className: cn(datePickerProps?.className, datePickerClassName),
|
|
10202
|
+
selectionMode: "single",
|
|
10203
|
+
selectedDate: currentValue,
|
|
10204
|
+
onDateSelect: handleDateChange,
|
|
10205
|
+
minDate: minDateTime,
|
|
10206
|
+
maxDate: maxDateTime
|
|
10207
|
+
}
|
|
10208
|
+
),
|
|
10209
|
+
/* @__PURE__ */ jsx(
|
|
10210
|
+
"div",
|
|
10211
|
+
{
|
|
10212
|
+
className: cn(
|
|
10213
|
+
"flex border-t sm:border-t-0 sm:border-l p-2",
|
|
10214
|
+
!canSelectTime && "opacity-60",
|
|
10215
|
+
timePickerClassName,
|
|
10216
|
+
timePickerProps?.panelClassName
|
|
10217
|
+
),
|
|
10218
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex w-full", children: [
|
|
10219
|
+
/* @__PURE__ */ jsx("div", { className: "w-14 border-r pr-1", children: /* @__PURE__ */ jsx("div", { ref: hourListRef, className: "h-[300px] overflow-y-auto space-y-1", children: hours.map((hour) => {
|
|
10220
|
+
const selected = currentHour === hour;
|
|
10221
|
+
const hourDisabled = isHourDisabled(hour);
|
|
10222
|
+
return /* @__PURE__ */ jsx(
|
|
10223
|
+
"button",
|
|
10224
|
+
{
|
|
10225
|
+
type: "button",
|
|
10226
|
+
"data-hour": hour,
|
|
10227
|
+
disabled: !canSelectTime || hourDisabled,
|
|
10228
|
+
onClick: () => handleHourSelect(hour),
|
|
10229
|
+
className: cn(
|
|
10230
|
+
"h-8 w-full rounded-md text-sm transition-colors",
|
|
10231
|
+
selected ? "bg-[#379a2a] text-white hover:bg-[#379a2a]" : "text-foreground hover:bg-sus-secondary-gray-3",
|
|
10232
|
+
(!canSelectTime || hourDisabled) && "cursor-not-allowed opacity-50"
|
|
10233
|
+
),
|
|
10234
|
+
children: String(hour).padStart(2, "0")
|
|
10235
|
+
},
|
|
10236
|
+
hour
|
|
10237
|
+
);
|
|
10238
|
+
}) }) }),
|
|
10239
|
+
/* @__PURE__ */ jsx("div", { className: "w-14 pl-1", children: /* @__PURE__ */ jsx("div", { ref: minuteListRef, className: "h-[300px] overflow-y-auto space-y-1", children: minuteInterval.map((minute) => {
|
|
10240
|
+
const selected = currentMinute === minute;
|
|
10241
|
+
const minuteDisabled = isMinuteDisabled(minute);
|
|
10242
|
+
return /* @__PURE__ */ jsx(
|
|
10243
|
+
"button",
|
|
10244
|
+
{
|
|
10245
|
+
type: "button",
|
|
10246
|
+
"data-minute": minute,
|
|
10247
|
+
disabled: !canSelectTime || minuteDisabled,
|
|
10248
|
+
onClick: () => handleMinuteSelect(minute),
|
|
10249
|
+
className: cn(
|
|
10250
|
+
"h-8 w-full rounded-md text-sm transition-colors",
|
|
10251
|
+
selected ? "bg-[#379a2a] text-white hover:bg-[#379a2a]" : "text-foreground hover:bg-sus-secondary-gray-3",
|
|
10252
|
+
(!canSelectTime || minuteDisabled) && "cursor-not-allowed opacity-50"
|
|
10253
|
+
),
|
|
10254
|
+
children: String(minute).padStart(2, "0")
|
|
10255
|
+
},
|
|
10256
|
+
minute
|
|
10257
|
+
);
|
|
10258
|
+
}) }) })
|
|
10259
|
+
] })
|
|
10260
|
+
}
|
|
10261
|
+
)
|
|
10262
|
+
] }) })
|
|
10263
|
+
] }),
|
|
10264
|
+
allowClear && !!currentValue && !disabled && /* @__PURE__ */ jsx(
|
|
10265
|
+
ClearButton,
|
|
10266
|
+
{
|
|
10267
|
+
onClick: handleClear,
|
|
10268
|
+
ariaLabel: clearAriaLabel,
|
|
10269
|
+
title: clearAriaLabel,
|
|
10270
|
+
className: "absolute right-3 top-1/2 z-10 -translate-y-1/2"
|
|
10271
|
+
}
|
|
10272
|
+
)
|
|
10273
|
+
] });
|
|
10274
|
+
};
|
|
9966
10275
|
function Dialog2(props) {
|
|
9967
10276
|
return /* @__PURE__ */ jsx(DialogPrimitive2.Root, { "data-slot": "dialog", ...props });
|
|
9968
10277
|
}
|
|
@@ -16240,7 +16549,10 @@ var DefaultHeader = ({
|
|
|
16240
16549
|
"span",
|
|
16241
16550
|
{
|
|
16242
16551
|
ref: titleRef,
|
|
16243
|
-
className: cn(
|
|
16552
|
+
className: cn(
|
|
16553
|
+
"text-lg font-semibold text-sus-green-1 truncate whitespace-pre",
|
|
16554
|
+
classNames?.title
|
|
16555
|
+
),
|
|
16244
16556
|
children: title
|
|
16245
16557
|
}
|
|
16246
16558
|
) : null;
|
|
@@ -16257,10 +16569,10 @@ var DefaultHeader = ({
|
|
|
16257
16569
|
}
|
|
16258
16570
|
) : null,
|
|
16259
16571
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
16260
|
-
subtitle ? /* @__PURE__ */ jsx("span", { className: cn("text-xs text-gray-500", classNames?.subtitle), children: subtitle }) : null,
|
|
16572
|
+
subtitle ? /* @__PURE__ */ jsx("span", { className: cn("text-xs text-gray-500 whitespace-pre-wrap", classNames?.subtitle), children: subtitle }) : null,
|
|
16261
16573
|
textElement ? isTruncated ? /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
16262
16574
|
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: textElement }),
|
|
16263
|
-
/* @__PURE__ */ jsx(TooltipContent, { children: title })
|
|
16575
|
+
/* @__PURE__ */ jsx(TooltipContent, { className: "whitespace-pre-wrap", children: title })
|
|
16264
16576
|
] }) : textElement : null
|
|
16265
16577
|
] })
|
|
16266
16578
|
] }),
|
|
@@ -16316,351 +16628,6 @@ var RightPanelContainer = ({
|
|
|
16316
16628
|
);
|
|
16317
16629
|
};
|
|
16318
16630
|
var RightPanelContainer_default = RightPanelContainer;
|
|
16319
|
-
var defaultDisplayFormatter3 = (date, use24Hour) => use24Hour ? format(date, "HH:mm") : format(date, "hh:mm a");
|
|
16320
|
-
var defaultValueFormatter3 = (date) => format(date, "HH:mm");
|
|
16321
|
-
var defaultValueParser3 = (value) => {
|
|
16322
|
-
let parsed = parse(value, "HH:mm", /* @__PURE__ */ new Date());
|
|
16323
|
-
if (isValid(parsed)) return parsed;
|
|
16324
|
-
parsed = parse(value, "HH:mm:ss", /* @__PURE__ */ new Date());
|
|
16325
|
-
if (isValid(parsed)) return parsed;
|
|
16326
|
-
parsed = parse(value, "hh:mm a", /* @__PURE__ */ new Date());
|
|
16327
|
-
if (isValid(parsed)) return parsed;
|
|
16328
|
-
return void 0;
|
|
16329
|
-
};
|
|
16330
|
-
var TimePicker = React.forwardRef(
|
|
16331
|
-
({
|
|
16332
|
-
value,
|
|
16333
|
-
onChange,
|
|
16334
|
-
onValueChange,
|
|
16335
|
-
disabled = false,
|
|
16336
|
-
className,
|
|
16337
|
-
buttonClassName,
|
|
16338
|
-
wrapperClassName,
|
|
16339
|
-
placeholder: placeholder2,
|
|
16340
|
-
use24Hour = false,
|
|
16341
|
-
iconPosition = "start",
|
|
16342
|
-
icon,
|
|
16343
|
-
allowClear = true,
|
|
16344
|
-
clearAriaLabel = "Clear time",
|
|
16345
|
-
displayFormatter,
|
|
16346
|
-
valueFormatter,
|
|
16347
|
-
valueParser,
|
|
16348
|
-
invalid = false
|
|
16349
|
-
}, ref) => {
|
|
16350
|
-
const [open, setOpen] = React.useState(false);
|
|
16351
|
-
const [hours, setHours] = React.useState("12");
|
|
16352
|
-
const [minutes, setMinutes] = React.useState("00");
|
|
16353
|
-
const [period, setPeriod] = React.useState("AM");
|
|
16354
|
-
const parser = React.useMemo(() => valueParser ?? defaultValueParser3, [valueParser]);
|
|
16355
|
-
const outputFormatter = React.useMemo(
|
|
16356
|
-
() => valueFormatter ?? defaultValueFormatter3,
|
|
16357
|
-
[valueFormatter]
|
|
16358
|
-
);
|
|
16359
|
-
const labelFormatter = React.useMemo(
|
|
16360
|
-
() => displayFormatter ?? defaultDisplayFormatter3,
|
|
16361
|
-
[displayFormatter]
|
|
16362
|
-
);
|
|
16363
|
-
const parseInput = React.useCallback(
|
|
16364
|
-
(input) => {
|
|
16365
|
-
if (input === null || input === void 0) return void 0;
|
|
16366
|
-
if (input instanceof Date) return isValid(input) ? input : void 0;
|
|
16367
|
-
const parsed = parser(input);
|
|
16368
|
-
return parsed && isValid(parsed) ? parsed : void 0;
|
|
16369
|
-
},
|
|
16370
|
-
[parser]
|
|
16371
|
-
);
|
|
16372
|
-
const parsedValue = React.useMemo(() => parseInput(value), [parseInput, value]);
|
|
16373
|
-
const hasValue = parsedValue !== void 0;
|
|
16374
|
-
React.useEffect(() => {
|
|
16375
|
-
if (parsedValue) {
|
|
16376
|
-
const hour24 = parsedValue.getHours();
|
|
16377
|
-
const minute = parsedValue.getMinutes();
|
|
16378
|
-
if (use24Hour) {
|
|
16379
|
-
setHours(String(hour24).padStart(2, "0"));
|
|
16380
|
-
} else {
|
|
16381
|
-
const newPeriod = hour24 >= 12 ? "PM" : "AM";
|
|
16382
|
-
const hour12 = hour24 === 0 ? 12 : hour24 > 12 ? hour24 - 12 : hour24;
|
|
16383
|
-
setHours(String(hour12).padStart(2, "0"));
|
|
16384
|
-
setPeriod(newPeriod);
|
|
16385
|
-
}
|
|
16386
|
-
setMinutes(String(minute).padStart(2, "0"));
|
|
16387
|
-
} else {
|
|
16388
|
-
setHours(use24Hour ? "00" : "12");
|
|
16389
|
-
setMinutes("00");
|
|
16390
|
-
setPeriod("AM");
|
|
16391
|
-
}
|
|
16392
|
-
}, [parsedValue, use24Hour]);
|
|
16393
|
-
const createTimeDate = (h, m, p) => {
|
|
16394
|
-
let hour = parseInt(h) || 0;
|
|
16395
|
-
const minute = parseInt(m) || 0;
|
|
16396
|
-
if (!use24Hour) {
|
|
16397
|
-
if (p === "PM" && hour !== 12) {
|
|
16398
|
-
hour += 12;
|
|
16399
|
-
} else if (p === "AM" && hour === 12) {
|
|
16400
|
-
hour = 0;
|
|
16401
|
-
}
|
|
16402
|
-
}
|
|
16403
|
-
const today = /* @__PURE__ */ new Date();
|
|
16404
|
-
return new Date(today.getFullYear(), today.getMonth(), today.getDate(), hour, minute, 0, 0);
|
|
16405
|
-
};
|
|
16406
|
-
const emitChange = (date) => {
|
|
16407
|
-
onChange?.(date);
|
|
16408
|
-
onValueChange?.(outputFormatter(date));
|
|
16409
|
-
};
|
|
16410
|
-
const handleClear = () => {
|
|
16411
|
-
onChange?.(void 0);
|
|
16412
|
-
onValueChange?.(void 0);
|
|
16413
|
-
};
|
|
16414
|
-
const handleHourChange = (newHour) => {
|
|
16415
|
-
const hour = parseInt(newHour) || 0;
|
|
16416
|
-
const maxHour = use24Hour ? 23 : 12;
|
|
16417
|
-
const minHour = use24Hour ? 0 : 1;
|
|
16418
|
-
if (hour <= maxHour && hour >= minHour) {
|
|
16419
|
-
setHours(newHour.padStart(2, "0"));
|
|
16420
|
-
emitChange(createTimeDate(newHour, minutes, period));
|
|
16421
|
-
}
|
|
16422
|
-
};
|
|
16423
|
-
const handleMinuteChange = (newMinute) => {
|
|
16424
|
-
const minute = parseInt(newMinute) || 0;
|
|
16425
|
-
if (minute <= 59 && minute >= 0) {
|
|
16426
|
-
setMinutes(newMinute.padStart(2, "0"));
|
|
16427
|
-
emitChange(createTimeDate(hours, newMinute, period));
|
|
16428
|
-
}
|
|
16429
|
-
};
|
|
16430
|
-
const handlePeriodToggle = () => {
|
|
16431
|
-
const newPeriod = period === "AM" ? "PM" : "AM";
|
|
16432
|
-
setPeriod(newPeriod);
|
|
16433
|
-
emitChange(createTimeDate(hours, minutes, newPeriod));
|
|
16434
|
-
};
|
|
16435
|
-
const incrementHour = () => {
|
|
16436
|
-
const hour = parseInt(hours) || 0;
|
|
16437
|
-
const maxHour = use24Hour ? 23 : 12;
|
|
16438
|
-
const minHour = use24Hour ? 0 : 1;
|
|
16439
|
-
const newHour = hour >= maxHour ? minHour : hour + 1;
|
|
16440
|
-
handleHourChange(String(newHour));
|
|
16441
|
-
};
|
|
16442
|
-
const decrementHour = () => {
|
|
16443
|
-
const hour = parseInt(hours) || 0;
|
|
16444
|
-
const maxHour = use24Hour ? 23 : 12;
|
|
16445
|
-
const minHour = use24Hour ? 0 : 1;
|
|
16446
|
-
const newHour = hour <= minHour ? maxHour : hour - 1;
|
|
16447
|
-
handleHourChange(String(newHour));
|
|
16448
|
-
};
|
|
16449
|
-
const incrementMinute = () => {
|
|
16450
|
-
const minute = parseInt(minutes) || 0;
|
|
16451
|
-
const newMinute = minute >= 59 ? 0 : minute + 1;
|
|
16452
|
-
handleMinuteChange(String(newMinute));
|
|
16453
|
-
};
|
|
16454
|
-
const decrementMinute = () => {
|
|
16455
|
-
const minute = parseInt(minutes) || 0;
|
|
16456
|
-
const newMinute = minute <= 0 ? 59 : minute - 1;
|
|
16457
|
-
handleMinuteChange(String(newMinute));
|
|
16458
|
-
};
|
|
16459
|
-
const displayValue = parsedValue ? labelFormatter(parsedValue, use24Hour) : placeholder2;
|
|
16460
|
-
const displayIcon = icon || /* @__PURE__ */ jsx(Clock, { className: "h-4 w-4" });
|
|
16461
|
-
const showClear = allowClear && hasValue && !disabled;
|
|
16462
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("relative inline-flex w-full", wrapperClassName), children: [
|
|
16463
|
-
/* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
16464
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
16465
|
-
Button,
|
|
16466
|
-
{
|
|
16467
|
-
variant: "outline",
|
|
16468
|
-
disabled,
|
|
16469
|
-
className: cn(
|
|
16470
|
-
"w-full justify-between text-left font-normal",
|
|
16471
|
-
!hasValue && "text-muted-foreground",
|
|
16472
|
-
invalid && "border-destructive focus-visible:ring-destructive",
|
|
16473
|
-
showClear && "pr-8",
|
|
16474
|
-
buttonClassName,
|
|
16475
|
-
className
|
|
16476
|
-
),
|
|
16477
|
-
children: [
|
|
16478
|
-
iconPosition === "start" && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: displayIcon }),
|
|
16479
|
-
/* @__PURE__ */ jsx(
|
|
16480
|
-
"span",
|
|
16481
|
-
{
|
|
16482
|
-
className: cn(
|
|
16483
|
-
"flex-1 truncate",
|
|
16484
|
-
iconPosition === "start" && "ml-2",
|
|
16485
|
-
iconPosition === "end" && "mr-2"
|
|
16486
|
-
),
|
|
16487
|
-
children: displayValue || placeholder2 || "Select time"
|
|
16488
|
-
}
|
|
16489
|
-
),
|
|
16490
|
-
iconPosition === "end" && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: displayIcon })
|
|
16491
|
-
]
|
|
16492
|
-
}
|
|
16493
|
-
) }),
|
|
16494
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-4", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
16495
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
16496
|
-
/* @__PURE__ */ jsx(
|
|
16497
|
-
Button,
|
|
16498
|
-
{
|
|
16499
|
-
variant: "ghost",
|
|
16500
|
-
size: "icon",
|
|
16501
|
-
className: "h-8 w-8",
|
|
16502
|
-
onClick: incrementHour,
|
|
16503
|
-
type: "button",
|
|
16504
|
-
children: /* @__PURE__ */ jsx(
|
|
16505
|
-
"svg",
|
|
16506
|
-
{
|
|
16507
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
16508
|
-
width: "16",
|
|
16509
|
-
height: "16",
|
|
16510
|
-
viewBox: "0 0 24 24",
|
|
16511
|
-
fill: "none",
|
|
16512
|
-
stroke: "currentColor",
|
|
16513
|
-
strokeWidth: "2",
|
|
16514
|
-
strokeLinecap: "round",
|
|
16515
|
-
strokeLinejoin: "round",
|
|
16516
|
-
children: /* @__PURE__ */ jsx("polyline", { points: "18 15 12 9 6 15" })
|
|
16517
|
-
}
|
|
16518
|
-
)
|
|
16519
|
-
}
|
|
16520
|
-
),
|
|
16521
|
-
/* @__PURE__ */ jsx(
|
|
16522
|
-
Input,
|
|
16523
|
-
{
|
|
16524
|
-
ref,
|
|
16525
|
-
type: "text",
|
|
16526
|
-
inputMode: "numeric",
|
|
16527
|
-
value: hours,
|
|
16528
|
-
onChange: (e) => handleHourChange(e.target.value),
|
|
16529
|
-
className: "w-16 text-center",
|
|
16530
|
-
maxLength: 2
|
|
16531
|
-
}
|
|
16532
|
-
),
|
|
16533
|
-
/* @__PURE__ */ jsx(
|
|
16534
|
-
Button,
|
|
16535
|
-
{
|
|
16536
|
-
variant: "ghost",
|
|
16537
|
-
size: "icon",
|
|
16538
|
-
className: "h-8 w-8",
|
|
16539
|
-
onClick: decrementHour,
|
|
16540
|
-
type: "button",
|
|
16541
|
-
children: /* @__PURE__ */ jsx(
|
|
16542
|
-
"svg",
|
|
16543
|
-
{
|
|
16544
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
16545
|
-
width: "16",
|
|
16546
|
-
height: "16",
|
|
16547
|
-
viewBox: "0 0 24 24",
|
|
16548
|
-
fill: "none",
|
|
16549
|
-
stroke: "currentColor",
|
|
16550
|
-
strokeWidth: "2",
|
|
16551
|
-
strokeLinecap: "round",
|
|
16552
|
-
strokeLinejoin: "round",
|
|
16553
|
-
children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
|
|
16554
|
-
}
|
|
16555
|
-
)
|
|
16556
|
-
}
|
|
16557
|
-
)
|
|
16558
|
-
] }),
|
|
16559
|
-
/* @__PURE__ */ jsx("span", { className: "text-2xl font-semibold", children: ":" }),
|
|
16560
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
16561
|
-
/* @__PURE__ */ jsx(
|
|
16562
|
-
Button,
|
|
16563
|
-
{
|
|
16564
|
-
variant: "ghost",
|
|
16565
|
-
size: "icon",
|
|
16566
|
-
className: "h-8 w-8",
|
|
16567
|
-
onClick: incrementMinute,
|
|
16568
|
-
type: "button",
|
|
16569
|
-
children: /* @__PURE__ */ jsx(
|
|
16570
|
-
"svg",
|
|
16571
|
-
{
|
|
16572
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
16573
|
-
width: "16",
|
|
16574
|
-
height: "16",
|
|
16575
|
-
viewBox: "0 0 24 24",
|
|
16576
|
-
fill: "none",
|
|
16577
|
-
stroke: "currentColor",
|
|
16578
|
-
strokeWidth: "2",
|
|
16579
|
-
strokeLinecap: "round",
|
|
16580
|
-
strokeLinejoin: "round",
|
|
16581
|
-
children: /* @__PURE__ */ jsx("polyline", { points: "18 15 12 9 6 15" })
|
|
16582
|
-
}
|
|
16583
|
-
)
|
|
16584
|
-
}
|
|
16585
|
-
),
|
|
16586
|
-
/* @__PURE__ */ jsx(
|
|
16587
|
-
Input,
|
|
16588
|
-
{
|
|
16589
|
-
type: "text",
|
|
16590
|
-
inputMode: "numeric",
|
|
16591
|
-
value: minutes,
|
|
16592
|
-
onChange: (e) => handleMinuteChange(e.target.value),
|
|
16593
|
-
className: "w-16 text-center",
|
|
16594
|
-
maxLength: 2
|
|
16595
|
-
}
|
|
16596
|
-
),
|
|
16597
|
-
/* @__PURE__ */ jsx(
|
|
16598
|
-
Button,
|
|
16599
|
-
{
|
|
16600
|
-
variant: "ghost",
|
|
16601
|
-
size: "icon",
|
|
16602
|
-
className: "h-8 w-8",
|
|
16603
|
-
onClick: decrementMinute,
|
|
16604
|
-
type: "button",
|
|
16605
|
-
children: /* @__PURE__ */ jsx(
|
|
16606
|
-
"svg",
|
|
16607
|
-
{
|
|
16608
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
16609
|
-
width: "16",
|
|
16610
|
-
height: "16",
|
|
16611
|
-
viewBox: "0 0 24 24",
|
|
16612
|
-
fill: "none",
|
|
16613
|
-
stroke: "currentColor",
|
|
16614
|
-
strokeWidth: "2",
|
|
16615
|
-
strokeLinecap: "round",
|
|
16616
|
-
strokeLinejoin: "round",
|
|
16617
|
-
children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
|
|
16618
|
-
}
|
|
16619
|
-
)
|
|
16620
|
-
}
|
|
16621
|
-
)
|
|
16622
|
-
] }),
|
|
16623
|
-
!use24Hour && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16624
|
-
/* @__PURE__ */ jsx("div", { className: "w-px h-16 bg-border mx-1" }),
|
|
16625
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
16626
|
-
/* @__PURE__ */ jsx(
|
|
16627
|
-
Button,
|
|
16628
|
-
{
|
|
16629
|
-
variant: period === "AM" ? "default" : "outline",
|
|
16630
|
-
size: "sm",
|
|
16631
|
-
className: "w-14 h-12",
|
|
16632
|
-
onClick: handlePeriodToggle,
|
|
16633
|
-
type: "button",
|
|
16634
|
-
children: "AM"
|
|
16635
|
-
}
|
|
16636
|
-
),
|
|
16637
|
-
/* @__PURE__ */ jsx(
|
|
16638
|
-
Button,
|
|
16639
|
-
{
|
|
16640
|
-
variant: period === "PM" ? "default" : "outline",
|
|
16641
|
-
size: "sm",
|
|
16642
|
-
className: "w-14 h-12",
|
|
16643
|
-
onClick: handlePeriodToggle,
|
|
16644
|
-
type: "button",
|
|
16645
|
-
children: "PM"
|
|
16646
|
-
}
|
|
16647
|
-
)
|
|
16648
|
-
] })
|
|
16649
|
-
] })
|
|
16650
|
-
] }) })
|
|
16651
|
-
] }),
|
|
16652
|
-
showClear && /* @__PURE__ */ jsx(
|
|
16653
|
-
ClearButton,
|
|
16654
|
-
{
|
|
16655
|
-
onClick: handleClear,
|
|
16656
|
-
ariaLabel: clearAriaLabel,
|
|
16657
|
-
className: "absolute right-2 top-1/2 -translate-y-1/2"
|
|
16658
|
-
}
|
|
16659
|
-
)
|
|
16660
|
-
] });
|
|
16661
|
-
}
|
|
16662
|
-
);
|
|
16663
|
-
TimePicker.displayName = "TimePicker";
|
|
16664
16631
|
|
|
16665
16632
|
// src/components/cropperModal/type.ts
|
|
16666
16633
|
var CropperModalError = class extends Error {
|
|
@@ -17755,7 +17722,7 @@ var TruncatedMouseEnterDiv = ({
|
|
|
17755
17722
|
ref: textRef,
|
|
17756
17723
|
onMouseEnter: checkTruncation,
|
|
17757
17724
|
onMouseLeave: () => setIsTruncated(false),
|
|
17758
|
-
className: cn("truncate", className),
|
|
17725
|
+
className: cn("truncate whitespace-pre", className),
|
|
17759
17726
|
children: value
|
|
17760
17727
|
}
|
|
17761
17728
|
) }),
|
|
@@ -18612,6 +18579,6 @@ function InputMentionInner({
|
|
|
18612
18579
|
}
|
|
18613
18580
|
var InputMention = forwardRef(InputMentionInner);
|
|
18614
18581
|
|
|
18615
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, dropdownMenu_default as ActionDropdown, ActionMenu, AdministrationIcon, AdvanceSearch_default as AdvanceSearch, AnalyticsIcon, ApplicationLogIcon, ArrowIcon, AuditFooter, BookmarkIcon, BriefcaseBusinessIcon, BuildingIcon, Button, SuiCalendarIcon2 as Calendar2Icon, CalendarDaysIcon, CardIcon, Carousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumbnails, Checkbox, CircleUserIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Combobox_default as Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyUserRightsIcon, CropperModal, CropperModalError, CustomActionStatusIcon, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, DashboardIcon, DataEntryIcon, DataTable_default as DataTable, DatePicker2 as DatePicker, DecreaseIcon, Dialog2 as Dialog, DialogAlert, DialogAlertProvider, DialogClose, DialogCloseButton, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogHeader2 as DialogHeader, DialogTitle2 as DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EllipsisBoxIcon, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, FactoryIcon, FileCogIcon, FileSpreadsheet, FileTextIcon, FiltersIcon, FolderIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, GridSettingsModal_default as GridSettingsModal, HamburgerMenuIcon, HandymanIcon, header_default as Header, HeaderCell_default as HeaderCell, HelpIcon, HomeIcon, HomePlusIcon, Image2 as Image, ImagePlaceholderIcon, InformationIcon, Input, InputMention, InputNumber_default as InputNumber, Label2 as Label, LoadingPage, LookupSelect, MailIcon, MainListContainer_default as MainListContainer, ManIcon, ManagementIcon, MenuIcon, MessageIcon, MessageIconInverse, MessageSquareIcon, MonthPicker2 as MonthPicker, navbar_default as Navbar, NotFoundIcon, OutlineArrowIcon, PlusIcon, PlusSearchIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PowerIcon, PreventPageLeave_default as PreventPageLeave, ProgressBar_default as ProgressBar, QuestionIcon, RadioGroupItem, RadioGroupRoot, RadioLabel, RichText, RightPanelContainer_default as RightPanelContainer, RoleIcon, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SetupIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, SuiCalendarIcon, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, TabSelect, Table, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TagListViewIcon, TextArea,
|
|
18582
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, dropdownMenu_default as ActionDropdown, ActionMenu, AdministrationIcon, AdvanceSearch_default as AdvanceSearch, AnalyticsIcon, ApplicationLogIcon, ArrowIcon, AuditFooter, BookmarkIcon, BriefcaseBusinessIcon, BuildingIcon, Button, SuiCalendarIcon2 as Calendar2Icon, CalendarDaysIcon, CardIcon, Carousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumbnails, Checkbox, CircleUserIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Combobox_default as Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyUserRightsIcon, CropperModal, CropperModalError, CustomActionStatusIcon, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, DashboardIcon, DataEntryIcon, DataTable_default as DataTable, DatePicker2 as DatePicker, DateTimePicker, DecreaseIcon, Dialog2 as Dialog, DialogAlert, DialogAlertProvider, DialogClose, DialogCloseButton, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogHeader2 as DialogHeader, DialogTitle2 as DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EllipsisBoxIcon, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, FactoryIcon, FileCogIcon, FileSpreadsheet, FileTextIcon, FiltersIcon, FolderIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, GridSettingsModal_default as GridSettingsModal, HamburgerMenuIcon, HandymanIcon, header_default as Header, HeaderCell_default as HeaderCell, HelpIcon, HomeIcon, HomePlusIcon, Image2 as Image, ImagePlaceholderIcon, InformationIcon, Input, InputMention, InputNumber_default as InputNumber, Label2 as Label, LoadingPage, LookupSelect, MailIcon, MainListContainer_default as MainListContainer, ManIcon, ManagementIcon, MenuIcon, MessageIcon, MessageIconInverse, MessageSquareIcon, MonthPicker2 as MonthPicker, navbar_default as Navbar, NotFoundIcon, OutlineArrowIcon, PlusIcon, PlusSearchIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PowerIcon, PreventPageLeave_default as PreventPageLeave, ProgressBar_default as ProgressBar, QuestionIcon, RadioGroupItem, RadioGroupRoot, RadioLabel, RichText, RightPanelContainer_default as RightPanelContainer, RoleIcon, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SetupIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, SuiCalendarIcon, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, TabSelect, Table, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TagListViewIcon, TextArea, ToolBoxIcon, Tooltip2 as Tooltip, TooltipArrow, TooltipContent2 as TooltipContent, TooltipProvider2 as TooltipProvider, TooltipTrigger2 as TooltipTrigger, TransferUserRightsIcon, TrashIcon, truncated_default as Truncated, truncatedMouseEnterDiv_default as TruncatedMouseEnterDiv, ui_exports as UI, UserActiveIcon, UserAloneIcon, UserFriendIcon, UserGroupIcon, UserIcon, UserInactiveIcon, UserNameIcon, UserProtectIcon, UsersIcon, VirtualizedCommand_default as VirtualizedCommand, WorkFlowIcon, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useBindRef_default as useBindRef, useCarousel, useControllableState_default as useControllableState, useDraftGuardStore, useFormField, useGridSettingsStore_default as useGridSettingsStore, useHover_default as useHover, useIntersectionObserver_default as useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery_default as useMediaQuery, usePreventPageLeave_default as usePreventPageLeave, usePreventPageLeaveStore_default as usePreventPageLeaveStore, useSafeBlocker, useScreenSize_default as useScreenSize, useSidebar, useTruncated_default as useTruncated, validateTokenPrefixes };
|
|
18616
18583
|
//# sourceMappingURL=index.mjs.map
|
|
18617
18584
|
//# sourceMappingURL=index.mjs.map
|