@underverse-ui/underverse 1.0.92 → 1.0.94

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@underverse-ui/underverse",
3
- "version": "1.0.92",
3
+ "version": "1.0.94",
4
4
  "sourceEntry": "src/index.ts",
5
5
  "totalExports": 225,
6
6
  "exports": [
package/dist/index.cjs CHANGED
@@ -666,13 +666,13 @@ var Card = import_react2.default.forwardRef(
666
666
  "h3",
667
667
  {
668
668
  className: cn(
669
- "min-w-0 text-base md:text-lg font-semibold leading-tight tracking-tight break-words [overflow-wrap:anywhere] transition-colors duration-200 max-md:text-sm",
669
+ "min-w-0 text-base md:text-lg font-semibold leading-tight tracking-tight wrap-anywhere transition-colors duration-200 max-md:text-sm",
670
670
  hoverable && "group-hover:text-primary"
671
671
  ),
672
672
  children: title
673
673
  }
674
674
  ),
675
- description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "min-w-0 text-sm md:text-base text-muted-foreground leading-relaxed break-words [overflow-wrap:anywhere]", children: description })
675
+ description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "min-w-0 text-sm md:text-base text-muted-foreground leading-relaxed wrap-anywhere", children: description })
676
676
  ] }),
677
677
  children && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn("relative", defaultPaddingX, defaultPaddingY, contentClassName), children }),
678
678
  footer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -2940,6 +2940,25 @@ var variantStyles2 = {
2940
2940
  success: "bg-success text-success-foreground border-success/20"
2941
2941
  };
2942
2942
  var clamp = (value, min, max) => Math.max(min, Math.min(max, value));
2943
+ function composeEventHandlers(theirHandler, ourHandler) {
2944
+ return (event) => {
2945
+ theirHandler?.(event);
2946
+ ourHandler(event);
2947
+ };
2948
+ }
2949
+ function setRefValue(ref, value) {
2950
+ if (!ref) return;
2951
+ if (typeof ref === "function") {
2952
+ ref(value);
2953
+ return;
2954
+ }
2955
+ ref.current = value;
2956
+ }
2957
+ function mergeRefs(...refs) {
2958
+ return (value) => {
2959
+ refs.forEach((ref) => setRefValue(ref, value));
2960
+ };
2961
+ }
2943
2962
  function getTransformOrigin(side) {
2944
2963
  switch (side) {
2945
2964
  case "top":
@@ -2991,7 +3010,8 @@ var Tooltip = ({
2991
3010
  delay = { open: 200, close: 300 },
2992
3011
  className,
2993
3012
  disabled = false,
2994
- variant = "default"
3013
+ variant = "default",
3014
+ asChild = true
2995
3015
  }) => {
2996
3016
  const [isOpen, setIsOpen] = React9.useState(false);
2997
3017
  const isMounted = useHydrated();
@@ -3110,37 +3130,32 @@ var Tooltip = ({
3110
3130
  if (disabled || !content) {
3111
3131
  return children;
3112
3132
  }
3133
+ const childProps = children.props;
3134
+ const childRef = children.ref ?? childProps.ref;
3135
+ const triggerProps = {
3136
+ ref: mergeRefs(childRef, (node) => {
3137
+ triggerRef.current = node;
3138
+ }),
3139
+ "data-underverse-tooltip-trigger": triggerSelector,
3140
+ onMouseEnter: composeEventHandlers(childProps.onMouseEnter, (e) => {
3141
+ triggerRef.current = e.currentTarget;
3142
+ handleMouseEnter();
3143
+ }),
3144
+ onMouseLeave: composeEventHandlers(childProps.onMouseLeave, (e) => {
3145
+ triggerRef.current = e.currentTarget;
3146
+ handleMouseLeave();
3147
+ }),
3148
+ onFocus: composeEventHandlers(childProps.onFocus, (e) => {
3149
+ triggerRef.current = e.currentTarget;
3150
+ handleFocus();
3151
+ }),
3152
+ onBlur: composeEventHandlers(childProps.onBlur, () => {
3153
+ handleBlur();
3154
+ })
3155
+ };
3156
+ const trigger = asChild ? React9.cloneElement(children, triggerProps) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { ...triggerProps, children });
3113
3157
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
3114
- (() => {
3115
- const TriggerComponent = children.type;
3116
- const triggerProps = children.props;
3117
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3118
- TriggerComponent,
3119
- {
3120
- ...triggerProps,
3121
- "data-underverse-tooltip-trigger": triggerSelector,
3122
- onMouseEnter: (e) => {
3123
- triggerRef.current = e.currentTarget;
3124
- handleMouseEnter();
3125
- if (typeof triggerProps.onMouseEnter === "function") triggerProps.onMouseEnter(e);
3126
- },
3127
- onMouseLeave: (e) => {
3128
- triggerRef.current = e.currentTarget;
3129
- handleMouseLeave();
3130
- if (typeof triggerProps.onMouseLeave === "function") triggerProps.onMouseLeave(e);
3131
- },
3132
- onFocus: (e) => {
3133
- triggerRef.current = e.currentTarget;
3134
- handleFocus();
3135
- if (typeof triggerProps.onFocus === "function") triggerProps.onFocus(e);
3136
- },
3137
- onBlur: (e) => {
3138
- handleBlur();
3139
- if (typeof triggerProps.onBlur === "function") triggerProps.onBlur(e);
3140
- }
3141
- }
3142
- );
3143
- })(),
3158
+ trigger,
3144
3159
  isMounted && isOpen && (0, import_react_dom.createPortal)(
3145
3160
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3146
3161
  "div",
@@ -9754,7 +9769,7 @@ function WheelColumn({
9754
9769
  ref: scrollRef,
9755
9770
  className: cn(
9756
9771
  "h-full overflow-y-auto overscroll-contain snap-y snap-mandatory",
9757
- "select-none cursor-grab active:cursor-grabbing",
9772
+ "select-none",
9758
9773
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-xl",
9759
9774
  "[scrollbar-width:none] [-ms-overflow-style:none]",
9760
9775
  "[&::-webkit-scrollbar]:hidden"
@@ -9765,15 +9780,7 @@ function WheelColumn({
9765
9780
  tabIndex: focused ? 0 : -1,
9766
9781
  onKeyDown: (e) => onKeyDown(e, column),
9767
9782
  onFocus: () => setFocusedColumn(column),
9768
- onScroll: () => {
9769
- if (draggingRef.current) return;
9770
- if (inertialRef.current) return;
9771
- handleScroll();
9772
- },
9773
- onPointerDown,
9774
- onPointerMove,
9775
- onPointerUp: (e) => endDrag(e.pointerId),
9776
- onPointerCancel: (e) => endDrag(e.pointerId),
9783
+ onScroll: handleScroll,
9777
9784
  children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: extendedItems.map((n, index) => {
9778
9785
  const dist = Math.abs(index - currentVirtual);
9779
9786
  const distForVisual = Math.min(dist, 2);
@@ -11236,7 +11243,7 @@ function WheelColumn2({
11236
11243
  ref: scrollRef,
11237
11244
  className: cn(
11238
11245
  "h-full overflow-y-auto overscroll-contain snap-y snap-mandatory",
11239
- "select-none cursor-grab active:cursor-grabbing",
11246
+ "select-none",
11240
11247
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-xl",
11241
11248
  "[scrollbar-width:none] [-ms-overflow-style:none]",
11242
11249
  "[&::-webkit-scrollbar]:hidden"
@@ -11247,15 +11254,7 @@ function WheelColumn2({
11247
11254
  tabIndex: focused ? 0 : -1,
11248
11255
  onKeyDown: (e) => onKeyDown(e, column),
11249
11256
  onFocus: () => setFocusedColumn(column),
11250
- onScroll: () => {
11251
- if (draggingRef.current) return;
11252
- if (inertialRef.current) return;
11253
- handleScroll();
11254
- },
11255
- onPointerDown,
11256
- onPointerMove,
11257
- onPointerUp: (e) => endDrag(e.pointerId),
11258
- onPointerCancel: (e) => endDrag(e.pointerId),
11257
+ onScroll: handleScroll,
11259
11258
  children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: extendedItems.map((n, index) => {
11260
11259
  const dist = Math.abs(index - currentVirtual);
11261
11260
  const distForVisual = Math.min(dist, 2);
@@ -11330,6 +11329,14 @@ function formatTime2({ h, m, s, p }, fmt, includeSeconds) {
11330
11329
  const base2 = `${pad(h)}:${pad(m)}`;
11331
11330
  return includeSeconds ? `${base2}:${pad(s)}` : base2;
11332
11331
  }
11332
+ function isCompleteTimeInput(input, fmt, includeSeconds) {
11333
+ const trimmed = input.trim().toUpperCase();
11334
+ if (!trimmed) return false;
11335
+ if (fmt === "12") {
11336
+ return includeSeconds ? /^\d{1,2}:\d{2}:\d{2}\s?(AM|PM)$/.test(trimmed) : /^\d{1,2}:\d{2}\s?(AM|PM)$/.test(trimmed);
11337
+ }
11338
+ return includeSeconds ? /^\d{1,2}:\d{2}:\d{2}$/.test(trimmed) : /^\d{1,2}:\d{2}$/.test(trimmed);
11339
+ }
11333
11340
  var PRESETS = {
11334
11341
  morning: { h: 9, m: 0, s: 0, icon: import_lucide_react18.Coffee, label: "Morning", color: "from-amber-400 to-orange-400" },
11335
11342
  afternoon: { h: 14, m: 0, s: 0, icon: import_lucide_react18.Sun, label: "Afternoon", color: "from-yellow-400 to-amber-400" },
@@ -11371,24 +11378,38 @@ function TimePicker({
11371
11378
  ...rest
11372
11379
  }) {
11373
11380
  const tv = useSmartTranslations("ValidationInput");
11381
+ const autoId = React31.useId();
11374
11382
  const isControlled = value !== void 0;
11375
11383
  const now = /* @__PURE__ */ new Date();
11376
11384
  const initial = parseTime(isControlled ? value : defaultValue, format, includeSeconds) || (format === "12" ? { h: now.getHours() % 12 || 12, m: now.getMinutes(), s: now.getSeconds(), p: now.getHours() >= 12 ? "PM" : "AM" } : { h: now.getHours(), m: now.getMinutes(), s: now.getSeconds() });
11377
11385
  const [open, setOpen] = React31.useState(false);
11378
11386
  const [parts, setParts] = React31.useState(initial);
11379
- const [manualInput, setManualInput] = React31.useState("");
11387
+ const [manualInput, setManualInput] = React31.useState(formatTime2(initial, format, includeSeconds));
11388
+ const [isDirectEditing, setIsDirectEditing] = React31.useState(false);
11380
11389
  const [focusedColumn, setFocusedColumn] = React31.useState(null);
11381
11390
  const [localRequiredError, setLocalRequiredError] = React31.useState();
11382
11391
  const [hasCommittedValue, setHasCommittedValue] = React31.useState(Boolean(isControlled ? value : defaultValue));
11383
11392
  const hourScrollRef = React31.useRef(null);
11384
11393
  const minuteScrollRef = React31.useRef(null);
11385
11394
  const secondScrollRef = React31.useRef(null);
11395
+ const periodRef = React31.useRef(null);
11396
+ const directEditInputRef = React31.useRef(null);
11397
+ const triggerId = `time-picker-trigger-${autoId}`;
11398
+ const labelId = label ? `time-picker-label-${autoId}` : void 0;
11386
11399
  React31.useEffect(() => {
11387
11400
  if (isControlled) {
11388
11401
  const parsed = parseTime(value, format, includeSeconds);
11389
11402
  if (parsed) setParts(parsed);
11390
11403
  }
11391
11404
  }, [value, isControlled, format, includeSeconds]);
11405
+ React31.useEffect(() => {
11406
+ setManualInput(formatTime2(parts, format, includeSeconds));
11407
+ }, [format, includeSeconds, parts]);
11408
+ React31.useEffect(() => {
11409
+ if (!isDirectEditing) return;
11410
+ directEditInputRef.current?.focus();
11411
+ directEditInputRef.current?.select();
11412
+ }, [isDirectEditing]);
11392
11413
  React31.useEffect(() => {
11393
11414
  if (isControlled) {
11394
11415
  setHasCommittedValue(Boolean(value));
@@ -11479,6 +11500,15 @@ function TimePicker({
11479
11500
  setLocalRequiredError(void 0);
11480
11501
  }
11481
11502
  }, [disabled, hasCommittedValue, required]);
11503
+ const focusColumn = React31.useCallback((column) => {
11504
+ if (!column) return;
11505
+ const target = column === "hour" ? hourScrollRef.current : column === "minute" ? minuteScrollRef.current : column === "second" ? secondScrollRef.current : periodRef.current;
11506
+ target?.focus({ preventScroll: true });
11507
+ }, []);
11508
+ React31.useEffect(() => {
11509
+ if (variant !== "inline" && !open) return;
11510
+ focusColumn(focusedColumn);
11511
+ }, [focusColumn, focusedColumn, open, variant]);
11482
11512
  const handleKeyDown2 = (e, column) => {
11483
11513
  if (!["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End", "PageUp", "PageDown"].includes(e.key)) return;
11484
11514
  e.preventDefault();
@@ -11522,6 +11552,7 @@ function TimePicker({
11522
11552
  }
11523
11553
  tryUpdate(newParts);
11524
11554
  };
11555
+ const display = formatTime2(parts, format, includeSeconds);
11525
11556
  const setNow = () => {
11526
11557
  const now2 = /* @__PURE__ */ new Date();
11527
11558
  const h = now2.getHours();
@@ -11547,6 +11578,7 @@ function TimePicker({
11547
11578
  };
11548
11579
  const handleManualInput = (input) => {
11549
11580
  setManualInput(input);
11581
+ if (!isCompleteTimeInput(input, format, includeSeconds)) return;
11550
11582
  const parsed = parseTime(input, format, includeSeconds);
11551
11583
  if (parsed) {
11552
11584
  const timeStr = formatTime2(parsed, format, includeSeconds);
@@ -11555,6 +11587,53 @@ function TimePicker({
11555
11587
  }
11556
11588
  }
11557
11589
  };
11590
+ const commitManualInput = React31.useCallback(
11591
+ (input) => {
11592
+ const trimmed = input.trim();
11593
+ if (!trimmed) {
11594
+ setManualInput(display);
11595
+ return false;
11596
+ }
11597
+ if (!isCompleteTimeInput(trimmed, format, includeSeconds)) {
11598
+ setManualInput(display);
11599
+ return false;
11600
+ }
11601
+ const parsed = parseTime(trimmed, format, includeSeconds);
11602
+ if (!parsed) {
11603
+ setManualInput(display);
11604
+ return false;
11605
+ }
11606
+ const timeStr = formatTime2(parsed, format, includeSeconds);
11607
+ if (!isTimeInRange(timeStr) || isTimeDisabled(timeStr)) {
11608
+ setManualInput(display);
11609
+ return false;
11610
+ }
11611
+ const updated = tryUpdate(parsed);
11612
+ if (!updated) {
11613
+ setManualInput(display);
11614
+ return false;
11615
+ }
11616
+ setManualInput(timeStr);
11617
+ return true;
11618
+ },
11619
+ [display, format, includeSeconds, isTimeDisabled, isTimeInRange, tryUpdate]
11620
+ );
11621
+ const startDirectEdit = React31.useCallback(() => {
11622
+ if (disabled) return;
11623
+ setManualInput(display);
11624
+ setIsDirectEditing(true);
11625
+ }, [disabled, display]);
11626
+ const stopDirectEdit = React31.useCallback(
11627
+ (mode) => {
11628
+ if (mode === "commit") {
11629
+ commitManualInput(manualInput);
11630
+ } else {
11631
+ setManualInput(display);
11632
+ }
11633
+ setIsDirectEditing(false);
11634
+ },
11635
+ [commitManualInput, display, manualInput]
11636
+ );
11558
11637
  const handleCustomPreset = (time) => {
11559
11638
  const parsed = parseTime(time, format, includeSeconds);
11560
11639
  if (parsed) {
@@ -11622,13 +11701,14 @@ function TimePicker({
11622
11701
  const shouldMatchTriggerWidth = matchTriggerWidth ?? variant !== "compact";
11623
11702
  const compactPanel = variant === "compact";
11624
11703
  const effectiveError = error ?? localRequiredError;
11625
- const display = formatTime2(parts, format, includeSeconds);
11626
11704
  const trigger = variant === "inline" ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
11627
11705
  "button",
11628
11706
  {
11707
+ id: triggerId,
11629
11708
  type: "button",
11630
11709
  disabled,
11631
11710
  "aria-label": "Select time",
11711
+ "aria-labelledby": labelId,
11632
11712
  "aria-haspopup": "dialog",
11633
11713
  "aria-expanded": open,
11634
11714
  "aria-required": required,
@@ -11665,10 +11745,10 @@ function TimePicker({
11665
11745
  {
11666
11746
  className: cn(
11667
11747
  "truncate font-medium transition-colors duration-200",
11668
- !value && !defaultValue && "text-muted-foreground",
11669
- value || defaultValue ? "text-foreground" : ""
11748
+ !hasCommittedValue && "text-muted-foreground",
11749
+ hasCommittedValue ? "text-foreground" : ""
11670
11750
  ),
11671
- children: value || defaultValue ? display : placeholder
11751
+ children: hasCommittedValue ? display : placeholder
11672
11752
  }
11673
11753
  )
11674
11754
  ] }),
@@ -11688,13 +11768,51 @@ function TimePicker({
11688
11768
  tryUpdate(next);
11689
11769
  };
11690
11770
  const timePickerContent = /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn(panelSz.stackGap, compactPanel && "space-y-2.5"), children: [
11691
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("flex items-center justify-center py-1", compactPanel && "py-0.5"), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: cn(panelSz.timeText, "font-bold tabular-nums tracking-wide text-foreground underline underline-offset-8 decoration-primary/60"), children: display }) }),
11771
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("flex items-center justify-center py-1", compactPanel && "py-0.5"), children: isDirectEditing ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11772
+ "input",
11773
+ {
11774
+ ref: directEditInputRef,
11775
+ type: "text",
11776
+ value: manualInput,
11777
+ onChange: (e) => setManualInput(e.target.value),
11778
+ onBlur: () => stopDirectEdit("commit"),
11779
+ onKeyDown: (e) => {
11780
+ if (e.key === "Enter") {
11781
+ e.preventDefault();
11782
+ stopDirectEdit("commit");
11783
+ }
11784
+ if (e.key === "Escape") {
11785
+ e.preventDefault();
11786
+ stopDirectEdit("cancel");
11787
+ }
11788
+ },
11789
+ "aria-label": "Edit time value",
11790
+ className: cn(
11791
+ panelSz.timeText,
11792
+ "min-w-0 w-36 bg-transparent border-b border-primary/60 text-center font-bold tabular-nums tracking-wide text-foreground",
11793
+ "focus:outline-none focus:border-primary"
11794
+ )
11795
+ }
11796
+ ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11797
+ "button",
11798
+ {
11799
+ type: "button",
11800
+ onClick: startDirectEdit,
11801
+ className: cn(
11802
+ panelSz.timeText,
11803
+ "font-bold tabular-nums tracking-wide text-foreground underline underline-offset-8 decoration-primary/60",
11804
+ "rounded-md px-2 transition-colors hover:text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50"
11805
+ ),
11806
+ "aria-label": "Edit selected time",
11807
+ children: display
11808
+ }
11809
+ ) }),
11692
11810
  allowManualInput && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative", children: [
11693
11811
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11694
11812
  Input_default,
11695
11813
  {
11696
11814
  placeholder: format === "12" ? "02:30 PM" : "14:30",
11697
- value: manualInput || display,
11815
+ value: manualInput,
11698
11816
  onChange: (e) => handleManualInput(e.target.value),
11699
11817
  size: panelSz.inputSize,
11700
11818
  variant: "outlined",
@@ -11844,9 +11962,11 @@ function TimePicker({
11844
11962
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11845
11963
  "div",
11846
11964
  {
11965
+ ref: periodRef,
11847
11966
  className: cn("flex flex-col p-1 rounded-xl bg-muted/30", panelSz.periodGap),
11848
11967
  role: "radiogroup",
11849
11968
  "aria-label": "Select AM or PM",
11969
+ "aria-labelledby": labelId,
11850
11970
  tabIndex: focusedColumn === "period" ? 0 : -1,
11851
11971
  onKeyDown: (e) => handleKeyDown2(e, "period"),
11852
11972
  onFocus: () => setFocusedColumn("period"),
@@ -11942,10 +12062,17 @@ function TimePicker({
11942
12062
  ] });
11943
12063
  if (variant === "inline") {
11944
12064
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "w-fit max-w-full", ...rest, children: [
11945
- label && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center justify-between mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("label", { className: cn(sz.label, "font-semibold", disabled ? "text-muted-foreground" : "text-foreground", effectiveError && "text-destructive"), children: [
11946
- label,
11947
- required && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-destructive ml-1", children: "*" })
11948
- ] }) }),
12065
+ label && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center justify-between mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
12066
+ "label",
12067
+ {
12068
+ id: labelId,
12069
+ className: cn(sz.label, "font-semibold", disabled ? "text-muted-foreground" : "text-foreground", effectiveError && "text-destructive"),
12070
+ children: [
12071
+ label,
12072
+ required && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-destructive ml-1", children: "*" })
12073
+ ]
12074
+ }
12075
+ ) }),
11949
12076
  /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11950
12077
  "input",
11951
12078
  {
@@ -11982,6 +12109,8 @@ function TimePicker({
11982
12109
  label && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center justify-between mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
11983
12110
  "label",
11984
12111
  {
12112
+ id: labelId,
12113
+ htmlFor: triggerId,
11985
12114
  className: cn(
11986
12115
  sz.label,
11987
12116
  "font-semibold",
@@ -17123,7 +17252,7 @@ function CategoryTreeSelect(props) {
17123
17252
  // View-only mode: just display the name with folder icon
17124
17253
  /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn("flex min-w-0 items-center", TREE_NODE_GAP_CLASS), children: [
17125
17254
  category.icon ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-4 w-4 shrink-0 flex items-center justify-center text-muted-foreground/60", children: category.icon }) : hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.FolderTree, { className: "h-4 w-4 shrink-0 text-muted-foreground/60" }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-muted-foreground/40" }),
17126
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "min-w-0 text-sm font-medium leading-snug break-words [overflow-wrap:anywhere]", children: category.name })
17255
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "min-w-0 text-sm font-medium leading-snug wrap-anywhere", children: category.name })
17127
17256
  ] })
17128
17257
  ) : (
17129
17258
  // Single/Multi select mode: icon + text + badge
@@ -17133,7 +17262,7 @@ function CategoryTreeSelect(props) {
17133
17262
  "span",
17134
17263
  {
17135
17264
  className: cn(
17136
- "min-w-0 flex-1 text-sm leading-snug break-words [overflow-wrap:anywhere] transition-all duration-200",
17265
+ "min-w-0 flex-1 text-sm leading-snug wrap-anywhere transition-all duration-200",
17137
17266
  isSelected ? "font-semibold text-primary" : "text-foreground/80",
17138
17267
  !isSelectable && "text-foreground"
17139
17268
  ),