@bubo-squared/ui-framework 0.1.96 → 0.1.98

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 CHANGED
@@ -1129,8 +1129,10 @@ var dropdownTriggerVariants = (0, import_class_variance_authority12.cva)(
1129
1129
  {
1130
1130
  variants: {
1131
1131
  size: {
1132
- large: "h-11",
1133
- "extra-large": "h-14"
1132
+ sm: "h-8 py-1",
1133
+ md: "h-10 py-2",
1134
+ lg: "h-11",
1135
+ xl: "h-14"
1134
1136
  },
1135
1137
  status: {
1136
1138
  default: "border-(--border-secondary)",
@@ -1139,7 +1141,7 @@ var dropdownTriggerVariants = (0, import_class_variance_authority12.cva)(
1139
1141
  }
1140
1142
  },
1141
1143
  defaultVariants: {
1142
- size: "large",
1144
+ size: "lg",
1143
1145
  status: "default"
1144
1146
  }
1145
1147
  }
@@ -1147,8 +1149,10 @@ var dropdownTriggerVariants = (0, import_class_variance_authority12.cva)(
1147
1149
  var dropdownTextVariants = (0, import_class_variance_authority12.cva)("truncate", {
1148
1150
  variants: {
1149
1151
  size: {
1150
- large: "subtitle",
1151
- "extra-large": "h6-title"
1152
+ sm: "paragraph-m",
1153
+ md: "paragraph-l",
1154
+ lg: "subtitle",
1155
+ xl: "h6-title"
1152
1156
  },
1153
1157
  hasValue: {
1154
1158
  false: "text-(--color-secondary)",
@@ -1159,15 +1163,17 @@ var dropdownTextVariants = (0, import_class_variance_authority12.cva)("truncate"
1159
1163
  }
1160
1164
  },
1161
1165
  defaultVariants: {
1162
- size: "large",
1166
+ size: "lg",
1163
1167
  hasValue: false
1164
1168
  }
1165
1169
  });
1166
1170
  var dropdownIconVariants = (0, import_class_variance_authority12.cva)("flex items-center justify-center shrink-0", {
1167
1171
  variants: {
1168
1172
  size: {
1169
- large: "w-5 h-5",
1170
- "extra-large": "w-6 h-6"
1173
+ sm: "w-4 h-4",
1174
+ md: "w-5 h-5",
1175
+ lg: "w-5 h-5",
1176
+ xl: "w-6 h-6"
1171
1177
  },
1172
1178
  disabled: {
1173
1179
  false: "text-(--icon-primary)",
@@ -1175,7 +1181,7 @@ var dropdownIconVariants = (0, import_class_variance_authority12.cva)("flex item
1175
1181
  }
1176
1182
  },
1177
1183
  defaultVariants: {
1178
- size: "large",
1184
+ size: "lg",
1179
1185
  disabled: false
1180
1186
  }
1181
1187
  });
@@ -1186,7 +1192,7 @@ var Dropdown = (props) => {
1186
1192
  hint = "This is a hint text to help user.",
1187
1193
  hideHint = false,
1188
1194
  placeholder = "Placeholder text",
1189
- size = "large",
1195
+ size = "lg",
1190
1196
  status = "default",
1191
1197
  disabled,
1192
1198
  options,
@@ -1415,8 +1421,10 @@ var inputShellVariants = (0, import_class_variance_authority13.cva)(
1415
1421
  {
1416
1422
  variants: {
1417
1423
  size: {
1418
- large: "gap-2 px-2 py-2 h-11",
1419
- "extra-large": "gap-2 px-[10px] py-2 h-14"
1424
+ sm: "gap-2 px-2 py-1 h-8",
1425
+ md: "gap-2 px-2 py-2 h-10",
1426
+ lg: "gap-2 px-2 py-2 h-11",
1427
+ xl: "gap-2 px-[10px] py-2 h-14"
1420
1428
  },
1421
1429
  status: {
1422
1430
  default: "input-default",
@@ -1428,7 +1436,7 @@ var inputShellVariants = (0, import_class_variance_authority13.cva)(
1428
1436
  }
1429
1437
  },
1430
1438
  defaultVariants: {
1431
- size: "large",
1439
+ size: "lg",
1432
1440
  status: "default"
1433
1441
  }
1434
1442
  }
@@ -1456,8 +1464,10 @@ var import_jsx_runtime22 = require("react/jsx-runtime");
1456
1464
  var passwordTextVariants = (0, import_class_variance_authority14.cva)("truncate", {
1457
1465
  variants: {
1458
1466
  size: {
1459
- large: "subtitle",
1460
- "extra-large": "h6-title"
1467
+ sm: "paragraph-m",
1468
+ md: "paragraph-l",
1469
+ lg: "subtitle",
1470
+ xl: "h6-title"
1461
1471
  },
1462
1472
  disabled: {
1463
1473
  true: "text-primary-disabled",
@@ -1465,7 +1475,7 @@ var passwordTextVariants = (0, import_class_variance_authority14.cva)("truncate"
1465
1475
  }
1466
1476
  },
1467
1477
  defaultVariants: {
1468
- size: "large",
1478
+ size: "lg",
1469
1479
  disabled: false
1470
1480
  }
1471
1481
  });
@@ -1474,15 +1484,17 @@ var iconWrapperVariants = (0, import_class_variance_authority14.cva)(
1474
1484
  {
1475
1485
  variants: {
1476
1486
  size: {
1477
- large: "size-5 [&>svg]:size-5",
1478
- "extra-large": "size-6 [&>svg]:size-6"
1487
+ sm: "size-4 [&>svg]:size-4",
1488
+ md: "size-5 [&>svg]:size-5",
1489
+ lg: "size-5 [&>svg]:size-5",
1490
+ xl: "size-6 [&>svg]:size-6"
1479
1491
  },
1480
1492
  disabled: {
1481
1493
  true: "text-(--icon-primary-disabled)"
1482
1494
  }
1483
1495
  },
1484
1496
  defaultVariants: {
1485
- size: "large"
1497
+ size: "lg"
1486
1498
  }
1487
1499
  }
1488
1500
  );
@@ -1491,15 +1503,17 @@ var actionButtonVariants = (0, import_class_variance_authority14.cva)(
1491
1503
  {
1492
1504
  variants: {
1493
1505
  size: {
1494
- large: "paragraph-s",
1495
- "extra-large": "paragraph-m"
1506
+ sm: "paragraph-s",
1507
+ md: "paragraph-s",
1508
+ lg: "paragraph-s",
1509
+ xl: "paragraph-m"
1496
1510
  },
1497
1511
  disabled: {
1498
1512
  true: "cursor-default text-primary-disabled hover:text-primary-disabled"
1499
1513
  }
1500
1514
  },
1501
1515
  defaultVariants: {
1502
- size: "large"
1516
+ size: "lg"
1503
1517
  }
1504
1518
  }
1505
1519
  );
@@ -1509,7 +1523,7 @@ var PasswordInput = (props) => {
1509
1523
  hint,
1510
1524
  hideHint,
1511
1525
  placeholder = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
1512
- size = "large",
1526
+ size = "lg",
1513
1527
  status = "default",
1514
1528
  variant = "icons",
1515
1529
  disabled,
@@ -1889,8 +1903,10 @@ var sizeBase = (0, import_class_variance_authority16.cva)(
1889
1903
  {
1890
1904
  variants: {
1891
1905
  size: {
1892
- large: "h-11 [&_button]:gap-2",
1893
- "extra-large": "h-14 [&_button]:gap-3"
1906
+ sm: "h-8 [&_button]:gap-2",
1907
+ md: "h-10 [&_button]:gap-2",
1908
+ lg: "h-11 [&_button]:gap-2",
1909
+ xl: "h-14 [&_button]:gap-3"
1894
1910
  }
1895
1911
  }
1896
1912
  }
@@ -1898,15 +1914,17 @@ var sizeBase = (0, import_class_variance_authority16.cva)(
1898
1914
  var inputTextVariants = (0, import_class_variance_authority16.cva)("", {
1899
1915
  variants: {
1900
1916
  size: {
1901
- large: "subtitle",
1902
- "extra-large": "h6-title"
1917
+ sm: "paragraph-m",
1918
+ md: "paragraph-l",
1919
+ lg: "subtitle",
1920
+ xl: "h6-title"
1903
1921
  },
1904
1922
  disabled: {
1905
1923
  true: "text-primary-disabled border-(--border-secondary-disabled)"
1906
1924
  }
1907
1925
  },
1908
1926
  defaultVariants: {
1909
- size: "large"
1927
+ size: "lg"
1910
1928
  }
1911
1929
  });
1912
1930
  var wrapperStatusClass = {
@@ -1924,7 +1942,7 @@ var PhoneInput = React26.forwardRef(
1924
1942
  hint,
1925
1943
  hideHint,
1926
1944
  placeholder,
1927
- size = "large",
1945
+ size = "lg",
1928
1946
  disabled = false,
1929
1947
  status = "default",
1930
1948
  ...rest
@@ -2253,32 +2271,36 @@ var import_jsx_runtime30 = require("react/jsx-runtime");
2253
2271
  var searchTextVariants = (0, import_class_variance_authority17.cva)("truncate", {
2254
2272
  variants: {
2255
2273
  size: {
2256
- large: "subtitle",
2257
- "extra-large": "h6-title"
2274
+ sm: "paragraph-m",
2275
+ md: "paragraph-l",
2276
+ lg: "subtitle",
2277
+ xl: "h6-title"
2258
2278
  }
2259
2279
  },
2260
2280
  defaultVariants: {
2261
- size: "large"
2281
+ size: "lg"
2262
2282
  }
2263
2283
  });
2264
2284
  var iconWrapperVariants2 = (0, import_class_variance_authority17.cva)("flex items-center justify-center shrink-0 text-(--icon-primary)", {
2265
2285
  variants: {
2266
2286
  size: {
2267
- large: "size-5 [&>svg]:size-5",
2268
- "extra-large": "size-6 [&>svg]:size-6"
2287
+ sm: "size-4 [&>svg]:size-4",
2288
+ md: "size-5 [&>svg]:size-5",
2289
+ lg: "size-5 [&>svg]:size-5",
2290
+ xl: "size-6 [&>svg]:size-6"
2269
2291
  },
2270
2292
  disabled: {
2271
2293
  true: "text-(--icon-primary-disabled)"
2272
2294
  }
2273
2295
  },
2274
2296
  defaultVariants: {
2275
- size: "large"
2297
+ size: "lg"
2276
2298
  }
2277
2299
  });
2278
2300
  var SearchInput = (props) => {
2279
2301
  const {
2280
2302
  placeholder = "Search...",
2281
- size = "large",
2303
+ size = "lg",
2282
2304
  disabled,
2283
2305
  className,
2284
2306
  leadingIcon,
@@ -2327,10 +2349,16 @@ SearchInput.displayName = "SearchInput";
2327
2349
  var React29 = __toESM(require("react"), 1);
2328
2350
  var import_jsx_runtime31 = require("react/jsx-runtime");
2329
2351
  var wrapperBase2 = "flex flex-col gap-2 items-start";
2352
+ var isRangeProps = (props) => {
2353
+ return Array.isArray(props.value) || Array.isArray(props.defaultValue);
2354
+ };
2355
+ var toArray = (value) => {
2356
+ if (value === void 0) return void 0;
2357
+ return Array.isArray(value) ? value : [value];
2358
+ };
2330
2359
  var Slider = (props) => {
2331
2360
  const {
2332
2361
  display = "flat",
2333
- type = "single",
2334
2362
  tooltipPlacement = "top",
2335
2363
  tooltipFormatter,
2336
2364
  showPercentage = true,
@@ -2340,11 +2368,11 @@ var Slider = (props) => {
2340
2368
  disabled = false,
2341
2369
  value,
2342
2370
  defaultValue,
2343
- onValueChange,
2344
2371
  className
2345
2372
  } = props;
2373
+ const isRange = isRangeProps(props);
2346
2374
  const isControlled = value !== void 0;
2347
- const expectedLength = type === "multi" ? 2 : 1;
2375
+ const expectedLength = isRange ? 2 : 1;
2348
2376
  const normalizeArray = React29.useCallback(
2349
2377
  (arr, fallback) => {
2350
2378
  if (!arr || arr.length === 0) return fallback;
@@ -2358,22 +2386,25 @@ var Slider = (props) => {
2358
2386
  [expectedLength, max]
2359
2387
  );
2360
2388
  const defaultInternal = React29.useMemo(() => {
2361
- if (defaultValue) return normalizeArray(defaultValue, []);
2362
- if (type === "multi") return [min, Math.min(min + (max - min) / 4, max)];
2389
+ const defaultValueArray = toArray(defaultValue);
2390
+ if (defaultValueArray) return normalizeArray(defaultValueArray, []);
2391
+ if (isRange) return [min, Math.min(min + (max - min) / 4, max)];
2363
2392
  return [min + (max - min) / 3];
2364
- }, [defaultValue, min, max, type, normalizeArray]);
2393
+ }, [defaultValue, min, max, isRange, normalizeArray]);
2365
2394
  const [internalValue, setInternalValue] = React29.useState(
2366
- () => normalizeArray(isControlled ? value : defaultInternal, defaultInternal)
2395
+ () => normalizeArray(isControlled ? toArray(value) : defaultInternal, defaultInternal)
2367
2396
  );
2368
2397
  React29.useEffect(() => {
2369
2398
  if (isControlled) {
2370
2399
  setInternalValue(
2371
- (current2) => normalizeArray(value, current2.length ? current2 : defaultInternal)
2400
+ (current2) => normalizeArray(toArray(value), current2.length ? current2 : defaultInternal)
2372
2401
  );
2373
2402
  }
2374
2403
  }, [isControlled, value, normalizeArray, defaultInternal]);
2375
2404
  const current = internalValue;
2376
2405
  const trackRef = React29.useRef(null);
2406
+ const [draggingThumbIndex, setDraggingThumbIndex] = React29.useState(null);
2407
+ const [hoveredThumbIndex, setHoveredThumbIndex] = React29.useState(null);
2377
2408
  const clamp = (val) => {
2378
2409
  if (val < min) return min;
2379
2410
  if (val > max) return max;
@@ -2383,13 +2414,13 @@ var Slider = (props) => {
2383
2414
  if (!isControlled) {
2384
2415
  setInternalValue((prev) => {
2385
2416
  const clamped = prev.map((v) => clamp(v));
2386
- if (type === "multi" && clamped.length === 2 && step > 0) {
2417
+ if (isRange && clamped.length === 2 && step > 0) {
2387
2418
  return enforceMinGap(clamped, prev);
2388
2419
  }
2389
2420
  return clamped;
2390
2421
  });
2391
2422
  }
2392
- }, [isControlled, min, max]);
2423
+ }, [isControlled, min, max, isRange]);
2393
2424
  const snap = (val) => {
2394
2425
  const range = max - min;
2395
2426
  if (range <= 0 || step <= 0) return clamp(val);
@@ -2397,7 +2428,7 @@ var Slider = (props) => {
2397
2428
  return clamp(min + stepsFromMin * step);
2398
2429
  };
2399
2430
  const enforceMinGap = (next, prev) => {
2400
- if (type !== "multi" || next.length !== 2 || step <= 0) return next;
2431
+ if (!isRange || next.length !== 2 || step <= 0) return next;
2401
2432
  let [low, high] = next;
2402
2433
  const [prevLow, prevHigh] = prev.length === 2 ? prev : next;
2403
2434
  if (low > high) {
@@ -2422,13 +2453,17 @@ var Slider = (props) => {
2422
2453
  };
2423
2454
  const updateValue = (next) => {
2424
2455
  let normalized = normalizeArray(next, current);
2425
- if (type === "multi" && normalized.length === 2) {
2456
+ if (isRange && normalized.length === 2) {
2426
2457
  normalized = enforceMinGap(normalized, current);
2427
2458
  }
2428
2459
  if (!isControlled) {
2429
2460
  setInternalValue(normalized);
2430
2461
  }
2431
- onValueChange?.(normalized);
2462
+ if (isRangeProps(props)) {
2463
+ props.onValueChange?.([normalized[0] ?? min, normalized[1] ?? max]);
2464
+ } else {
2465
+ props.onValueChange?.(normalized[0] ?? min);
2466
+ }
2432
2467
  };
2433
2468
  const getSnappedValueFromClientX = (clientX, track) => {
2434
2469
  const rect = track.getBoundingClientRect();
@@ -2441,10 +2476,11 @@ var Slider = (props) => {
2441
2476
  if (disabled) return;
2442
2477
  const track = trackRef.current;
2443
2478
  if (!track) return;
2479
+ setDraggingThumbIndex(thumbIndex);
2444
2480
  const handlePointerMove = (event) => {
2445
2481
  if (disabled) return;
2446
2482
  const snapped = getSnappedValueFromClientX(event.clientX, track);
2447
- if (type === "multi" && current.length === 2) {
2483
+ if (isRange && current.length === 2) {
2448
2484
  const [a, b] = current;
2449
2485
  if (thumbIndex === 0) {
2450
2486
  updateValue([snapped, b]);
@@ -2458,9 +2494,11 @@ var Slider = (props) => {
2458
2494
  const handlePointerUp = () => {
2459
2495
  window.removeEventListener("pointermove", handlePointerMove);
2460
2496
  window.removeEventListener("pointerup", handlePointerUp);
2497
+ window.removeEventListener("pointercancel", handlePointerUp);
2498
+ setDraggingThumbIndex(null);
2461
2499
  };
2462
2500
  const initialSnapped = getSnappedValueFromClientX(clientX, track);
2463
- if (type === "multi" && current.length === 2) {
2501
+ if (isRange && current.length === 2) {
2464
2502
  const [a, b] = current;
2465
2503
  if (thumbIndex === 0) {
2466
2504
  updateValue([initialSnapped, b]);
@@ -2472,6 +2510,7 @@ var Slider = (props) => {
2472
2510
  }
2473
2511
  window.addEventListener("pointermove", handlePointerMove);
2474
2512
  window.addEventListener("pointerup", handlePointerUp);
2513
+ window.addEventListener("pointercancel", handlePointerUp);
2475
2514
  };
2476
2515
  const handleTrackPointerDown = (event) => {
2477
2516
  if (disabled) return;
@@ -2480,7 +2519,7 @@ var Slider = (props) => {
2480
2519
  if (!track) return;
2481
2520
  const snapped = getSnappedValueFromClientX(event.clientX, track);
2482
2521
  let thumbIndex = 0;
2483
- if (type === "multi" && current.length === 2) {
2522
+ if (isRange && current.length === 2) {
2484
2523
  const [a, b] = current;
2485
2524
  const distToA = Math.abs(snapped - a);
2486
2525
  const distToB = Math.abs(snapped - b);
@@ -2518,7 +2557,7 @@ var Slider = (props) => {
2518
2557
  event.preventDefault();
2519
2558
  }
2520
2559
  };
2521
- const [primary, secondary] = type === "multi" && current.length === 2 ? [current[0], current[1]] : [current[0], void 0];
2560
+ const [primary, secondary] = isRange && current.length === 2 ? [current[0], current[1]] : [current[0], void 0];
2522
2561
  const valueToPercent = (val) => {
2523
2562
  if (val === void 0) return 0;
2524
2563
  if (max === min) return 0;
@@ -2551,7 +2590,7 @@ var Slider = (props) => {
2551
2590
  return formatNumber(value2);
2552
2591
  };
2553
2592
  const formatNumericLabel = () => {
2554
- if (type === "multi" && secondary !== void 0) {
2593
+ if (isRange && secondary !== void 0) {
2555
2594
  if (!tooltipFormatter && showPercentage && display === "numeric") {
2556
2595
  const first = formatNumber(valueToPercent(primary));
2557
2596
  const second = formatNumber(valueToPercent(secondary));
@@ -2564,10 +2603,14 @@ var Slider = (props) => {
2564
2603
  const trackHeight = 32;
2565
2604
  const thumbWidth = 18;
2566
2605
  const thumbRadius = thumbWidth / 2;
2567
- const renderTooltipBubble = (key, percent, labelText) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2606
+ const renderTooltipBubble = (key, percent, labelText, isVisible) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2568
2607
  "div",
2569
2608
  {
2570
- className: "absolute -translate-x-1/2 flex flex-col items-center",
2609
+ className: cn(
2610
+ "absolute -translate-x-1/2 flex flex-col items-center",
2611
+ "transition-[opacity,transform] duration-150",
2612
+ isVisible ? "opacity-100 scale-100 pointer-events-auto" : "opacity-0 scale-95 pointer-events-none"
2613
+ ),
2571
2614
  style: {
2572
2615
  left: `${percent}%`,
2573
2616
  bottom: isTooltipAbove ? "100%" : void 0,
@@ -2578,17 +2621,14 @@ var Slider = (props) => {
2578
2621
  children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2579
2622
  "div",
2580
2623
  {
2581
- className: cn(
2582
- "relative rounded-4 shadow-card-md px-(--space-8) py-(--space-4)",
2583
- disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-neutral)"
2584
- ),
2624
+ className: cn("relative rounded-4 shadow-card-md px-(--space-8) py-(--space-4) bg-(--background-tooltip)"),
2585
2625
  children: [
2586
2626
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2587
2627
  "p",
2588
2628
  {
2589
2629
  className: cn(
2590
2630
  "paragraph-s",
2591
- disabled ? "text-primary-disabled" : "text-primary"
2631
+ disabled ? "text-secondary" : "text-primary"
2592
2632
  ),
2593
2633
  children: labelText
2594
2634
  }
@@ -2597,8 +2637,7 @@ var Slider = (props) => {
2597
2637
  "div",
2598
2638
  {
2599
2639
  className: cn(
2600
- "absolute left-1/2 -translate-x-1/2 w-2 h-2 rotate-45",
2601
- disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-neutral)",
2640
+ "absolute left-1/2 -translate-x-1/2 w-2 h-2 rotate-45 bg-(--background-tooltip)",
2602
2641
  isTooltipAbove ? "-bottom-1" : "-top-1"
2603
2642
  )
2604
2643
  }
@@ -2611,6 +2650,7 @@ var Slider = (props) => {
2611
2650
  );
2612
2651
  const renderHandle = (index, percent, ariaValueText) => {
2613
2652
  const val = index === 0 ? primary : secondary;
2653
+ const isDragging = draggingThumbIndex === index;
2614
2654
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2615
2655
  "button",
2616
2656
  {
@@ -2624,12 +2664,21 @@ var Slider = (props) => {
2624
2664
  tabIndex: disabled ? -1 : 0,
2625
2665
  className: cn(
2626
2666
  "absolute -translate-x-1/2 flex items-center justify-center",
2627
- "h-8 w-[18px] rounded-4",
2667
+ "h-8 w-4.5 rounded-4",
2668
+ "transition-shadow duration-150",
2669
+ !disabled && (isDragging ? "shadow-[0_0_0_12px_var(--slider-halo-color)]" : "hover:shadow-[0_0_0_8px_var(--slider-halo-color)]"),
2628
2670
  disabled ? "bg-(--icon-primary-disabled) cursor-default" : "bg-(--icon-primary-hover) outline-none focus-visible:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-primary)] cursor-pointer"
2629
2671
  ),
2630
2672
  style: {
2631
2673
  left: `${percent}%`,
2632
- top: `calc(50% - ${trackHeight / 2}px)`
2674
+ top: `calc(50% - ${trackHeight / 2}px)`,
2675
+ ["--slider-halo-color"]: "color-mix(in srgb, var(--color-brand) 10%, transparent)"
2676
+ },
2677
+ onPointerEnter: () => {
2678
+ setHoveredThumbIndex(index);
2679
+ },
2680
+ onPointerLeave: () => {
2681
+ setHoveredThumbIndex((prev) => prev === index ? null : prev);
2633
2682
  },
2634
2683
  onPointerDown: (event) => {
2635
2684
  if (disabled) return;
@@ -2644,8 +2693,18 @@ var Slider = (props) => {
2644
2693
  };
2645
2694
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: wrapperBase2, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("w-full flex flex-col gap-1", className), children: [
2646
2695
  /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "relative w-full", children: [
2647
- showTooltip && primary !== void 0 && renderTooltipBubble("primary", primaryPercent, formatDisplayValue(primary)),
2648
- showTooltip && type === "multi" && secondary !== void 0 && renderTooltipBubble("secondary", secondaryPercent, formatDisplayValue(secondary)),
2696
+ showTooltip && primary !== void 0 && renderTooltipBubble(
2697
+ "primary",
2698
+ primaryPercent,
2699
+ formatDisplayValue(primary),
2700
+ hoveredThumbIndex === 0 || draggingThumbIndex === 0
2701
+ ),
2702
+ showTooltip && isRange && secondary !== void 0 && renderTooltipBubble(
2703
+ "secondary",
2704
+ secondaryPercent,
2705
+ formatDisplayValue(secondary),
2706
+ hoveredThumbIndex === 1 || draggingThumbIndex === 1
2707
+ ),
2649
2708
  /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2650
2709
  "div",
2651
2710
  {
@@ -2671,7 +2730,7 @@ var Slider = (props) => {
2671
2730
  }
2672
2731
  ),
2673
2732
  renderHandle(0, primaryPercent, formatDisplayValue(primary)),
2674
- type === "multi" && secondary !== void 0 && renderHandle(1, secondaryPercent, formatDisplayValue(secondary))
2733
+ isRange && secondary !== void 0 && renderHandle(1, secondaryPercent, formatDisplayValue(secondary))
2675
2734
  ]
2676
2735
  }
2677
2736
  )
@@ -2881,12 +2940,14 @@ var import_jsx_runtime33 = require("react/jsx-runtime");
2881
2940
  var inputTextVariants2 = (0, import_class_variance_authority18.cva)("truncate", {
2882
2941
  variants: {
2883
2942
  size: {
2884
- large: "subtitle",
2885
- "extra-large": "h6-title"
2943
+ sm: "paragraph-m",
2944
+ md: "paragraph-l",
2945
+ lg: "subtitle",
2946
+ xl: "h6-title"
2886
2947
  }
2887
2948
  },
2888
2949
  defaultVariants: {
2889
- size: "large"
2950
+ size: "lg"
2890
2951
  }
2891
2952
  });
2892
2953
  var iconWrapperVariants3 = (0, import_class_variance_authority18.cva)(
@@ -2894,15 +2955,17 @@ var iconWrapperVariants3 = (0, import_class_variance_authority18.cva)(
2894
2955
  {
2895
2956
  variants: {
2896
2957
  size: {
2897
- large: "size-5 [&>svg]:size-5",
2898
- "extra-large": "size-6 [&>svg]:size-6"
2958
+ sm: "size-4 [&>svg]:size-4",
2959
+ md: "size-5 [&>svg]:size-5",
2960
+ lg: "size-5 [&>svg]:size-5",
2961
+ xl: "size-6 [&>svg]:size-6"
2899
2962
  },
2900
2963
  disabled: {
2901
2964
  true: "text-(--icon-primary-disabled)"
2902
2965
  }
2903
2966
  },
2904
2967
  defaultVariants: {
2905
- size: "large"
2968
+ size: "lg"
2906
2969
  }
2907
2970
  }
2908
2971
  );
@@ -2912,7 +2975,7 @@ var TextInput = (props) => {
2912
2975
  hint,
2913
2976
  hideHint,
2914
2977
  placeholder = "Placeholder text",
2915
- size = "large",
2978
+ size = "lg",
2916
2979
  status = "default",
2917
2980
  disabled = false,
2918
2981
  className,
@@ -3101,21 +3164,22 @@ var WebsiteInput = (props) => {
3101
3164
  hierarchy = "leading",
3102
3165
  protocolLabel = "http://",
3103
3166
  icon,
3104
- size = "large",
3167
+ size = "lg",
3105
3168
  disabled,
3106
3169
  className,
3107
3170
  ...rest
3108
3171
  } = props;
3109
3172
  const isLeading = hierarchy === "leading";
3173
+ const spanHeightClass = size === "xl" ? "[&>span]:h-14!" : size === "lg" ? "[&>span]:h-11!" : size === "md" ? "[&>span]:h-10!" : "[&>span]:h-8!";
3110
3174
  const baseClass = cn(
3111
3175
  "[&>span]:w-[unset] hover:bg-[unset]",
3112
3176
  !disabled && "[&:not(:focus-within):hover]:shadow-[0_0_0_var(--focus-ring-spread)_var(--background-secondary-hover)]",
3113
3177
  disabled && "bg-[unset] hover:shadow-none hover:border-(--border-secondary-disabled) border-(--border-secondary-disabled)",
3114
- size === "extra-large" ? "[&>span]:h-14!" : "[&>span]:h-11!"
3178
+ spanHeightClass
3115
3179
  );
3116
3180
  const addonTextClass = cn(
3117
3181
  "flex mb-0!",
3118
- size === "extra-large" ? "paragraph-m" : "paragraph-s",
3182
+ size === "xl" ? "paragraph-m" : size === "sm" ? "paragraph-m" : "paragraph-s",
3119
3183
  disabled ? "text-primary-disabled" : "text-primary group-hover:text-(--color-primary-hover) group-focus-within:text-(--color-primary-focus)"
3120
3184
  );
3121
3185
  const baseAddonClass = cn(
@@ -3128,7 +3192,7 @@ var WebsiteInput = (props) => {
3128
3192
  );
3129
3193
  const iconWrapperClass = cn(
3130
3194
  "flex items-center justify-center shrink-0",
3131
- size === "extra-large" ? "[&>svg]:w-6 [&>svg]:h-6" : "[&>svg]:w-5 [&>svg]:h-5",
3195
+ size === "xl" ? "[&>svg]:w-6 [&>svg]:h-6" : size === "sm" ? "[&>svg]:w-4 [&>svg]:h-4" : "[&>svg]:w-5 [&>svg]:h-5",
3132
3196
  disabled ? "text-(--icon-primary-disabled)" : "text-(--icon-primary) group-hover:text-(--icon-primary-hover) group-focus-within:text-(--icon-primary-focus)"
3133
3197
  );
3134
3198
  const leadingAddon = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: baseAddonClass, children: [