@aviala-design/spiral 1.0.0 → 2.1.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.js CHANGED
@@ -471,6 +471,10 @@ var buttonVariants = cva3(
471
471
  allRound: {
472
472
  true: "min-w-[var(--button-min-width-allround,48px)] !rounded-[var(--border-radius-allround,99px)]",
473
473
  false: "min-w-[var(--button-min-width,46px)]"
474
+ },
475
+ compact: {
476
+ true: "min-w-0",
477
+ false: ""
474
478
  }
475
479
  },
476
480
  defaultVariants: {
@@ -555,6 +559,7 @@ var Button = forwardRef3(
555
559
  variant,
556
560
  size: sizeProp,
557
561
  allRound = false,
562
+ compact,
558
563
  iconOnly: iconOnlyProp,
559
564
  asChild = false,
560
565
  loading = false,
@@ -609,7 +614,7 @@ var Button = forwardRef3(
609
614
  !iconOnly && renderIcon(rightIcon, iconLevel, void 0, "button.icon-right")
610
615
  ] });
611
616
  const classes = cn(
612
- buttonVariants({ mode, ...iconOnly ? {} : { allRound } }),
617
+ buttonVariants({ mode, ...iconOnly ? {} : { allRound }, compact }),
613
618
  iconOnly && "min-w-0",
614
619
  iconOnly && allRound && "!rounded-[var(--border-radius-allround,99px)]",
615
620
  className
@@ -3103,6 +3108,7 @@ import {
3103
3108
  useContext as useContext3,
3104
3109
  useEffect as useEffect3,
3105
3110
  useLayoutEffect as useLayoutEffect2,
3111
+ useMemo as useMemo3,
3106
3112
  useRef as useRef4,
3107
3113
  useState as useState6
3108
3114
  } from "react";
@@ -3136,10 +3142,13 @@ function useSegmentatorState(value, defaultValue, onValueChange) {
3136
3142
  const [internal, setInternal] = useState6(defaultValue ?? "");
3137
3143
  const isControlled = value !== void 0;
3138
3144
  const current = isControlled ? value : internal;
3139
- const setValue = (next) => {
3140
- if (!isControlled) setInternal(next);
3141
- onValueChange?.(next);
3142
- };
3145
+ const setValue = useCallback4(
3146
+ (next) => {
3147
+ if (!isControlled) setInternal(next);
3148
+ onValueChange?.(next);
3149
+ },
3150
+ [isControlled, onValueChange]
3151
+ );
3143
3152
  return [current, setValue];
3144
3153
  }
3145
3154
  var SEGMENTATOR_DRAG_THRESHOLD_PX = 4;
@@ -3184,6 +3193,16 @@ function getEnabledSegmentatorItems(group) {
3184
3193
  group.querySelectorAll(".aviala-segmentator-item:not(:disabled)")
3185
3194
  );
3186
3195
  }
3196
+ function applyDragPreview(group, activeItem) {
3197
+ const items = getEnabledSegmentatorItems(group);
3198
+ for (const item of items) {
3199
+ if (item === activeItem) {
3200
+ item.setAttribute("data-drag-preview", "true");
3201
+ } else {
3202
+ item.removeAttribute("data-drag-preview");
3203
+ }
3204
+ }
3205
+ }
3187
3206
  function measureItemThumbMetrics(item, group) {
3188
3207
  const groupRect = group.getBoundingClientRect();
3189
3208
  const itemRect = item.getBoundingClientRect();
@@ -3405,7 +3424,6 @@ var SegmentatorGroup = forwardRef20(
3405
3424
  const layoutKey = useThemeLayoutKey();
3406
3425
  const consumeClickRef = useRef4(false);
3407
3426
  const pointerDragRef = useRef4(null);
3408
- const [dragPreviewValue, setDragPreviewValue] = useState6(null);
3409
3427
  const [dragState, setDragState] = useState6({
3410
3428
  pressing: false,
3411
3429
  active: false
@@ -3414,9 +3432,12 @@ var SegmentatorGroup = forwardRef20(
3414
3432
  const resetPointerInteraction = useCallback4(() => {
3415
3433
  pointerDragRef.current?.cleanupWindowListeners?.();
3416
3434
  pointerDragRef.current = null;
3417
- setDragPreviewValue(null);
3418
3435
  setDragState({ pressing: false, active: false });
3419
- const thumbEl = groupRef.current?.querySelector(
3436
+ const group = groupRef.current;
3437
+ if (group) {
3438
+ applyDragPreview(group, null);
3439
+ }
3440
+ const thumbEl = group?.querySelector(
3420
3441
  ".aviala-segmentator-thumb"
3421
3442
  );
3422
3443
  if (thumbEl) {
@@ -3473,8 +3494,8 @@ var SegmentatorGroup = forwardRef20(
3473
3494
  if (itemChanged) {
3474
3495
  triggerSegmentatorHaptic("select");
3475
3496
  drag.snapUntil = performance.now() + 540;
3476
- if (nextPreviewValue) {
3477
- setDragPreviewValue(nextPreviewValue);
3497
+ if (item) {
3498
+ applyDragPreview(group, item);
3478
3499
  }
3479
3500
  }
3480
3501
  drag.previewValue = nextPreviewValue;
@@ -3550,7 +3571,7 @@ var SegmentatorGroup = forwardRef20(
3550
3571
  event.pointerId
3551
3572
  );
3552
3573
  writeThumbMetrics(metrics, false);
3553
- setDragPreviewValue(pressedValue);
3574
+ applyDragPreview(group, pressedItem);
3554
3575
  setDragState({ pressing: true, active: false });
3555
3576
  group.setPointerCapture(event.pointerId);
3556
3577
  };
@@ -3558,16 +3579,17 @@ var SegmentatorGroup = forwardRef20(
3558
3579
  return /* @__PURE__ */ jsx21(
3559
3580
  SegmentatorContext.Provider,
3560
3581
  {
3561
- value: {
3562
- value: currentValue,
3563
- onValueChange: setValue,
3564
- mode,
3565
- allRound,
3566
- disabled,
3567
- consumeClickRef,
3568
- dragPreviewValue,
3569
- isPressing: dragState.pressing
3570
- },
3582
+ value: useMemo3(
3583
+ () => ({
3584
+ value: currentValue,
3585
+ onValueChange: setValue,
3586
+ mode,
3587
+ allRound,
3588
+ disabled,
3589
+ consumeClickRef
3590
+ }),
3591
+ [currentValue, setValue, mode, allRound, disabled]
3592
+ ),
3571
3593
  children: /* @__PURE__ */ jsxs15(
3572
3594
  "div",
3573
3595
  {
@@ -3638,7 +3660,6 @@ var SegmentatorItem = forwardRef20(
3638
3660
  "data-selected": selected ? "true" : "false",
3639
3661
  "data-value": value,
3640
3662
  "data-mode": ctx.mode,
3641
- "data-drag-preview": ctx.isPressing && ctx.dragPreviewValue === value ? "true" : void 0,
3642
3663
  "data-all-round": ctx.allRound ? "true" : "false",
3643
3664
  disabled: isDisabled,
3644
3665
  className: cn("aviala-segmentator-item aviala-focus-ring", iconOnly && "min-w-0", className),
@@ -3987,7 +4008,7 @@ function usePointerDrag(ref, onMove, enabled = true) {
3987
4008
  }
3988
4009
 
3989
4010
  // src/components/color-picker/use-color-picker-state.ts
3990
- import { useCallback as useCallback6, useMemo as useMemo3, useState as useState7 } from "react";
4011
+ import { useCallback as useCallback6, useMemo as useMemo4, useState as useState7 } from "react";
3991
4012
  function useColorPickerState({
3992
4013
  value: controlledValue,
3993
4014
  defaultValue = DEFAULT_COLOR,
@@ -4010,7 +4031,7 @@ function useColorPickerState({
4010
4031
  },
4011
4032
  [controlledValue, onChange]
4012
4033
  );
4013
- const hsva = useMemo3(() => toHsva(value), [value]);
4034
+ const hsva = useMemo4(() => toHsva(value), [value]);
4014
4035
  const setHsva = useCallback6(
4015
4036
  (partial, meta) => {
4016
4037
  setValue(fromHsva({ ...hsva, ...partial }), meta);
@@ -4175,7 +4196,7 @@ function ColorPickerInputs({
4175
4196
  }
4176
4197
  ) : null,
4177
4198
  format === "hex" ? /* @__PURE__ */ jsxs19("div", { className: "aviala-color-picker-field", children: [
4178
- /* @__PURE__ */ jsx26("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ jsx26(Badge, { children: "#" }) }),
4199
+ /* @__PURE__ */ jsx26("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ jsx26(Badge, { style: "normal", children: "#" }) }),
4179
4200
  /* @__PURE__ */ jsx26(
4180
4201
  "input",
4181
4202
  {
@@ -4214,7 +4235,7 @@ function ColorPickerInputs({
4214
4235
  onKeyDown: (e) => e.key === "Enter" && commitAlpha()
4215
4236
  }
4216
4237
  ),
4217
- /* @__PURE__ */ jsx26("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ jsx26(Badge, { children: "%" }) })
4238
+ /* @__PURE__ */ jsx26("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ jsx26(Badge, { style: "normal", children: "%" }) })
4218
4239
  ] }),
4219
4240
  /* @__PURE__ */ jsxs19(
4220
4241
  Select,
@@ -4610,7 +4631,7 @@ import {
4610
4631
  useContext as useContext5,
4611
4632
  useEffect as useEffect5,
4612
4633
  useLayoutEffect as useLayoutEffect3,
4613
- useMemo as useMemo4,
4634
+ useMemo as useMemo5,
4614
4635
  useRef as useRef7,
4615
4636
  useState as useState10
4616
4637
  } from "react";
@@ -4749,6 +4770,7 @@ function Cascader({
4749
4770
  const isValueControlled = valueProp !== void 0;
4750
4771
  const open = isOpenControlled ? openProp : internalOpen;
4751
4772
  const selectedPath = isValueControlled ? valueProp ?? [] : internalValue;
4773
+ const wasOpenRef = useRef7(open);
4752
4774
  useEffect5(() => {
4753
4775
  const markWindowBlur = () => {
4754
4776
  windowBlurCloseRef.current = true;
@@ -4757,10 +4779,20 @@ function Cascader({
4757
4779
  return () => window.removeEventListener("blur", markWindowBlur, true);
4758
4780
  }, []);
4759
4781
  useEffect5(() => {
4760
- if (open) {
4761
- setActivePath(selectedPath.length > 0 ? selectedPath.slice(0, -1) : []);
4782
+ const justOpened = open && !wasOpenRef.current;
4783
+ wasOpenRef.current = open;
4784
+ if (!justOpened) return;
4785
+ if (selectedPath.length === 0) {
4786
+ setActivePath([]);
4787
+ return;
4762
4788
  }
4763
- }, [open, selectedPath]);
4789
+ const selectedOption = findOptionPath(options, selectedPath);
4790
+ if (selectedOption?.children?.length) {
4791
+ setActivePath(selectedPath);
4792
+ return;
4793
+ }
4794
+ setActivePath(selectedPath.slice(0, -1));
4795
+ }, [open, options, selectedPath]);
4764
4796
  useEffect5(() => {
4765
4797
  if (!open) {
4766
4798
  pointerDownCloseRef.current = false;
@@ -4820,7 +4852,7 @@ function Cascader({
4820
4852
  },
4821
4853
  [changeOnSelect, commitValue, expandTo, handleOpenChange, options]
4822
4854
  );
4823
- const contextValue = useMemo4(
4855
+ const contextValue = useMemo5(
4824
4856
  () => ({
4825
4857
  open,
4826
4858
  disabled,
@@ -5110,7 +5142,7 @@ function CascaderOptionsMenu({ className }) {
5110
5142
  const menuRef = useRef7(null);
5111
5143
  const columnElRefs = useRef7(/* @__PURE__ */ new Map());
5112
5144
  const [columns, setColumns] = useState10([]);
5113
- const columnPaths = useMemo4(() => {
5145
+ const columnPaths = useMemo5(() => {
5114
5146
  const paths = [[]];
5115
5147
  const expansion = activePath.length > 0 ? activePath : selectedPath.slice(0, -1);
5116
5148
  for (let index = 0; index < expansion.length; index += 1) {
@@ -5303,7 +5335,7 @@ import {
5303
5335
  useEffect as useEffect7,
5304
5336
  useId as useId4,
5305
5337
  useLayoutEffect as useLayoutEffect5,
5306
- useMemo as useMemo7,
5338
+ useMemo as useMemo8,
5307
5339
  useRef as useRef9,
5308
5340
  useState as useState11
5309
5341
  } from "react";
@@ -5511,14 +5543,14 @@ function parseDateRangeInput(text) {
5511
5543
  }
5512
5544
 
5513
5545
  // src/components/date-picker/date-picker-month-wheels.tsx
5514
- import { useMemo as useMemo6 } from "react";
5546
+ import { useMemo as useMemo7 } from "react";
5515
5547
 
5516
5548
  // src/components/date-picker/date-picker-time-wheel.tsx
5517
5549
  import {
5518
5550
  useCallback as useCallback11,
5519
5551
  useEffect as useEffect6,
5520
5552
  useLayoutEffect as useLayoutEffect4,
5521
- useMemo as useMemo5,
5553
+ useMemo as useMemo6,
5522
5554
  useRef as useRef8
5523
5555
  } from "react";
5524
5556
 
@@ -5596,7 +5628,7 @@ function DatePickerTimeWheelColumn({
5596
5628
  const wheelAccumRef = useRef8(0);
5597
5629
  const selectedValueRef = useRef8(value);
5598
5630
  selectedValueRef.current = value;
5599
- const repeatedValues = useMemo5(() => {
5631
+ const repeatedValues = useMemo6(() => {
5600
5632
  if (!loop) return [...values];
5601
5633
  return Array.from({ length: LOOP_SECTIONS }, () => values).flat();
5602
5634
  }, [loop, values]);
@@ -5864,7 +5896,7 @@ function DatePickerMonthYearWheels({
5864
5896
  const { viewMonth, setViewMonth, minDate, maxDate } = useDatePickerContext();
5865
5897
  const year = viewMonth.getFullYear();
5866
5898
  const month = viewMonth.getMonth() + 1;
5867
- const yearValues = useMemo6(() => {
5899
+ const yearValues = useMemo7(() => {
5868
5900
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
5869
5901
  const start = minDate?.getFullYear() ?? currentYear - 100;
5870
5902
  const end = maxDate?.getFullYear() ?? currentYear + 100;
@@ -6054,12 +6086,19 @@ function DatePicker(props) {
6054
6086
  setActivePanel("date");
6055
6087
  return;
6056
6088
  }
6089
+ setFocusedDay((current) => {
6090
+ if (current) return current;
6091
+ if (mode === "single" && singleValue) return startOfDay(singleValue);
6092
+ const rangeAnchor = mode === "range" ? rangeValue.from ?? rangeValue.to : void 0;
6093
+ if (rangeAnchor) return startOfDay(rangeAnchor);
6094
+ return startOfDay(/* @__PURE__ */ new Date());
6095
+ });
6057
6096
  const markPointerDown = () => {
6058
6097
  pointerDownCloseRef.current = true;
6059
6098
  };
6060
6099
  document.addEventListener("pointerdown", markPointerDown, true);
6061
6100
  return () => document.removeEventListener("pointerdown", markPointerDown, true);
6062
- }, [open]);
6101
+ }, [mode, open, rangeValue.from, rangeValue.to, singleValue]);
6063
6102
  const handleOpenChange = useCallback12(
6064
6103
  (nextOpen) => {
6065
6104
  if (disabled && nextOpen) return;
@@ -6160,19 +6199,21 @@ function DatePicker(props) {
6160
6199
  ]
6161
6200
  );
6162
6201
  const selectDate = useCallback12(
6163
- (date) => {
6202
+ (date, options) => {
6164
6203
  if (disabled || isDateDisabled(date, minDate, maxDate)) return;
6165
6204
  const day = startOfDay(date);
6166
6205
  setFocusedDay(day);
6167
6206
  if (!isSameMonth(day, viewMonth)) {
6168
6207
  setViewMonth(new Date(day.getFullYear(), day.getMonth(), 1));
6169
6208
  }
6209
+ const switchToTime = options?.switchToTime ?? enableTime;
6210
+ const shouldClose = options?.close ?? !enableTime;
6170
6211
  if (mode === "single") {
6171
6212
  const next = enableTime ? applyTimeToDate(day, timeValue.hours, timeValue.minutes) : day;
6172
6213
  commitSingle(next);
6173
- if (enableTime) {
6214
+ if (switchToTime) {
6174
6215
  setActivePanel("time");
6175
- } else {
6216
+ } else if (shouldClose) {
6176
6217
  handleOpenChange(false);
6177
6218
  }
6178
6219
  return;
@@ -6188,9 +6229,9 @@ function DatePicker(props) {
6188
6229
  if (isSameDay(day, currentFrom)) {
6189
6230
  commitRange({ from: withTime(day), to: withTime(day) });
6190
6231
  setRangeDraftFrom(void 0);
6191
- if (enableTime) {
6232
+ if (switchToTime) {
6192
6233
  setActivePanel("time");
6193
- } else {
6234
+ } else if (shouldClose) {
6194
6235
  handleOpenChange(false);
6195
6236
  }
6196
6237
  return;
@@ -6201,9 +6242,9 @@ function DatePicker(props) {
6201
6242
  to: normalized.to ? withTime(normalized.to) : void 0
6202
6243
  });
6203
6244
  setRangeDraftFrom(void 0);
6204
- if (enableTime) {
6245
+ if (switchToTime) {
6205
6246
  setActivePanel("time");
6206
- } else {
6247
+ } else if (shouldClose) {
6207
6248
  handleOpenChange(false);
6208
6249
  }
6209
6250
  },
@@ -6224,7 +6265,7 @@ function DatePicker(props) {
6224
6265
  viewMonth
6225
6266
  ]
6226
6267
  );
6227
- const contextValue = useMemo7(
6268
+ const contextValue = useMemo8(
6228
6269
  () => ({
6229
6270
  open,
6230
6271
  setOpen: handleOpenChange,
@@ -6609,7 +6650,7 @@ function DatePickerPanelFooter() {
6609
6650
  if (!enableTime) return null;
6610
6651
  const panelValue = activePanel === "time" ? "time" : "date";
6611
6652
  const isRangeMode = mode === "range";
6612
- return /* @__PURE__ */ jsxs28(
6653
+ return /* @__PURE__ */ jsx37("div", { className: "aviala-datepicker-footer-wrap", children: /* @__PURE__ */ jsxs28(
6613
6654
  SegmentatorGroup,
6614
6655
  {
6615
6656
  value: panelValue,
@@ -6640,7 +6681,7 @@ function DatePickerPanelFooter() {
6640
6681
  )
6641
6682
  ]
6642
6683
  }
6643
- );
6684
+ ) });
6644
6685
  }
6645
6686
  function monthDiff(from, to) {
6646
6687
  return (to.getFullYear() - from.getFullYear()) * 12 + (to.getMonth() - from.getMonth());
@@ -6665,9 +6706,11 @@ function DatePickerCalendar({ className }) {
6665
6706
  setActivePanel,
6666
6707
  enableTime
6667
6708
  } = useDatePickerContext();
6668
- const today = useMemo7(() => startOfDay(/* @__PURE__ */ new Date()), []);
6669
- const days = useMemo7(() => getCalendarDays(viewMonth), [viewMonth]);
6709
+ const today = useMemo8(() => startOfDay(/* @__PURE__ */ new Date()), []);
6710
+ const days = useMemo8(() => getCalendarDays(viewMonth), [viewMonth]);
6670
6711
  const prevViewMonthRef = useRef9(viewMonth);
6712
+ const dayGridRef = useRef9(null);
6713
+ const pendingDayFocusRef = useRef9(false);
6671
6714
  const [monthSlide, setMonthSlide] = useState11(null);
6672
6715
  const isMonthPanel = activePanel === "month";
6673
6716
  const isTimePanel = activePanel === "time" && enableTime;
@@ -6724,40 +6767,40 @@ function DatePickerCalendar({ className }) {
6724
6767
  outgoingMonth: previous
6725
6768
  });
6726
6769
  }, [contentView, panel, viewMonth]);
6727
- const outgoingDays = useMemo7(
6770
+ useLayoutEffect5(() => {
6771
+ if (!pendingDayFocusRef.current || !focusedDay) return;
6772
+ const grid = dayGridRef.current;
6773
+ if (!grid) return;
6774
+ const target = grid.querySelector(
6775
+ `button[data-day="${formatIsoDate(focusedDay)}"]`
6776
+ );
6777
+ if (!target || target.disabled) return;
6778
+ pendingDayFocusRef.current = false;
6779
+ target.focus();
6780
+ }, [focusedDay, days, monthSlide]);
6781
+ const outgoingDays = useMemo8(
6728
6782
  () => monthSlide ? getCalendarDays(monthSlide.outgoingMonth) : null,
6729
6783
  [monthSlide]
6730
6784
  );
6731
6785
  const handleDayKeyDown = (event, date) => {
6732
- let next = null;
6786
+ let deltaDays = 0;
6733
6787
  switch (event.key) {
6734
6788
  case "ArrowLeft":
6735
- next = new Date(date);
6736
- next.setDate(next.getDate() - 1);
6789
+ deltaDays = -1;
6737
6790
  break;
6738
6791
  case "ArrowRight":
6739
- next = new Date(date);
6740
- next.setDate(next.getDate() + 1);
6792
+ deltaDays = 1;
6741
6793
  break;
6742
6794
  case "ArrowUp":
6743
- next = new Date(date);
6744
- next.setDate(next.getDate() - 7);
6795
+ deltaDays = -7;
6745
6796
  break;
6746
6797
  case "ArrowDown":
6747
- next = new Date(date);
6748
- next.setDate(next.getDate() + 7);
6798
+ deltaDays = 7;
6749
6799
  break;
6750
6800
  case "Home":
6751
- next = new Date(date.getFullYear(), date.getMonth(), 1);
6752
- break;
6753
6801
  case "End":
6754
- next = new Date(date.getFullYear(), date.getMonth() + 1, 0);
6755
- break;
6756
6802
  case "PageUp":
6757
- next = addMonths(date, event.shiftKey ? -12 : -1);
6758
- break;
6759
6803
  case "PageDown":
6760
- next = addMonths(date, event.shiftKey ? 12 : 1);
6761
6804
  break;
6762
6805
  case "Enter":
6763
6806
  case " ":
@@ -6768,8 +6811,31 @@ function DatePickerCalendar({ className }) {
6768
6811
  return;
6769
6812
  }
6770
6813
  event.preventDefault();
6771
- if (!next) return;
6814
+ let next;
6815
+ if (event.key === "Home") {
6816
+ next = new Date(date.getFullYear(), date.getMonth(), 1);
6817
+ } else if (event.key === "End") {
6818
+ next = new Date(date.getFullYear(), date.getMonth() + 1, 0);
6819
+ } else if (event.key === "PageUp") {
6820
+ next = addMonths(date, event.shiftKey ? -12 : -1);
6821
+ } else if (event.key === "PageDown") {
6822
+ next = addMonths(date, event.shiftKey ? 12 : 1);
6823
+ } else {
6824
+ next = new Date(date);
6825
+ next.setDate(next.getDate() + deltaDays);
6826
+ let guard = 0;
6827
+ while (isDateDisabled(next, minDate, maxDate) && guard < 366) {
6828
+ next.setDate(next.getDate() + (deltaDays > 0 ? 1 : -1));
6829
+ guard += 1;
6830
+ }
6831
+ }
6772
6832
  const normalized = startOfDay(next);
6833
+ if (isDateDisabled(normalized, minDate, maxDate)) return;
6834
+ pendingDayFocusRef.current = true;
6835
+ if (mode === "single") {
6836
+ selectDate(normalized, { close: false, switchToTime: false });
6837
+ return;
6838
+ }
6773
6839
  setFocusedDay(normalized);
6774
6840
  if (!isSameMonth(normalized, viewMonth)) {
6775
6841
  setViewMonth(new Date(normalized.getFullYear(), normalized.getMonth(), 1));
@@ -6823,6 +6889,7 @@ function DatePickerCalendar({ className }) {
6823
6889
  /* @__PURE__ */ jsx37(
6824
6890
  "div",
6825
6891
  {
6892
+ ref: dayGridRef,
6826
6893
  className: "aviala-datepicker-calendar__grid",
6827
6894
  role: "grid",
6828
6895
  "aria-labelledby": `${calendarId}-label`,
@@ -6842,11 +6909,13 @@ function DatePickerCalendar({ className }) {
6842
6909
  const isToday = isSameDay(day, today);
6843
6910
  const dayDisabled = isDateDisabled(day, minDate, maxDate);
6844
6911
  const focused = focusedDay ? isSameDay(day, focusedDay) : false;
6912
+ const dayKey = formatIsoDate(day);
6845
6913
  return /* @__PURE__ */ jsxs28(
6846
6914
  "button",
6847
6915
  {
6848
6916
  type: "button",
6849
6917
  role: "gridcell",
6918
+ "data-day": dayKey,
6850
6919
  tabIndex: focused || !focusedDay && isToday ? 0 : -1,
6851
6920
  className: "aviala-datepicker-day aviala-focus-ring",
6852
6921
  "data-outside": outside ? "true" : void 0,
@@ -6876,7 +6945,7 @@ function DatePickerCalendar({ className }) {
6876
6945
  isToday ? /* @__PURE__ */ jsx37("span", { className: "aviala-datepicker-day__today-dot", "aria-hidden": true }) : null
6877
6946
  ]
6878
6947
  },
6879
- day.toISOString()
6948
+ dayKey
6880
6949
  );
6881
6950
  })
6882
6951
  },
@@ -7094,7 +7163,7 @@ import {
7094
7163
  forwardRef as forwardRef28,
7095
7164
  useCallback as useCallback13,
7096
7165
  useEffect as useEffect8,
7097
- useMemo as useMemo8,
7166
+ useMemo as useMemo9,
7098
7167
  useRef as useRef10,
7099
7168
  useState as useState12
7100
7169
  } from "react";
@@ -7196,7 +7265,7 @@ function TimePicker({
7196
7265
  },
7197
7266
  [disabled, isOpenControlled, onOpenChange]
7198
7267
  );
7199
- const contextValue = useMemo8(
7268
+ const contextValue = useMemo9(
7200
7269
  () => ({
7201
7270
  open,
7202
7271
  disabled,
@@ -7344,8 +7413,6 @@ import * as PopoverPrimitive6 from "@radix-ui/react-popover";
7344
7413
  import {
7345
7414
  forwardRef as forwardRef29,
7346
7415
  useCallback as useCallback14,
7347
- useEffect as useEffect9,
7348
- useRef as useRef11,
7349
7416
  useState as useState13
7350
7417
  } from "react";
7351
7418
 
@@ -7404,37 +7471,9 @@ function Popover({
7404
7471
  const [internalOpen, setInternalOpen] = useState13(defaultOpen);
7405
7472
  const isControlled = openProp !== void 0;
7406
7473
  const open = isControlled ? openProp : internalOpen;
7407
- const windowBlurCloseRef = useRef11(false);
7408
- const pointerDownCloseRef = useRef11(false);
7409
- useEffect9(() => {
7410
- const markWindowBlur = () => {
7411
- windowBlurCloseRef.current = true;
7412
- };
7413
- window.addEventListener("blur", markWindowBlur, true);
7414
- return () => window.removeEventListener("blur", markWindowBlur, true);
7415
- }, []);
7416
- useEffect9(() => {
7417
- if (!open) {
7418
- pointerDownCloseRef.current = false;
7419
- return;
7420
- }
7421
- const markPointerDown = () => {
7422
- pointerDownCloseRef.current = true;
7423
- };
7424
- document.addEventListener("pointerdown", markPointerDown, true);
7425
- return () => document.removeEventListener("pointerdown", markPointerDown, true);
7426
- }, [open]);
7427
7474
  const handleOpenChange = useCallback14(
7428
7475
  (nextOpen) => {
7429
- if (!nextOpen && windowBlurCloseRef.current && !pointerDownCloseRef.current) {
7430
- windowBlurCloseRef.current = false;
7431
- return;
7432
- }
7433
- windowBlurCloseRef.current = false;
7434
- pointerDownCloseRef.current = false;
7435
- if (!isControlled) {
7436
- setInternalOpen(nextOpen);
7437
- }
7476
+ if (!isControlled) setInternalOpen(nextOpen);
7438
7477
  onOpenChange?.(nextOpen);
7439
7478
  },
7440
7479
  [isControlled, onOpenChange]
@@ -7460,6 +7499,7 @@ var PopoverContent = forwardRef29(
7460
7499
  collisionPadding = 8,
7461
7500
  portalled = true,
7462
7501
  showArrow = false,
7502
+ flush = false,
7463
7503
  ...props
7464
7504
  }, ref) => {
7465
7505
  const content = /* @__PURE__ */ jsxs31(
@@ -7472,7 +7512,14 @@ var PopoverContent = forwardRef29(
7472
7512
  className: cn("aviala-popover-content", className),
7473
7513
  ...props,
7474
7514
  children: [
7475
- /* @__PURE__ */ jsx41("div", { className: cn("aviala-popover-content__surface", typographyVariants({ level: "text" })), children }),
7515
+ /* @__PURE__ */ jsx41(
7516
+ "div",
7517
+ {
7518
+ className: cn("aviala-popover-content__surface", typographyVariants({ level: "text" })),
7519
+ "data-flush": flush ? "true" : void 0,
7520
+ children
7521
+ }
7522
+ ),
7476
7523
  showArrow ? /* @__PURE__ */ jsx41(
7477
7524
  PopoverPrimitive6.Arrow,
7478
7525
  {
@@ -7500,6 +7547,135 @@ var PopoverContent = forwardRef29(
7500
7547
  );
7501
7548
  PopoverContent.displayName = PopoverPrimitive6.Content.displayName;
7502
7549
 
7550
+ // src/components/hover-popover.tsx
7551
+ import {
7552
+ useCallback as useCallback15,
7553
+ useEffect as useEffect10,
7554
+ useRef as useRef11,
7555
+ useState as useState15
7556
+ } from "react";
7557
+
7558
+ // src/components/use-coarse-pointer.ts
7559
+ import { useEffect as useEffect9, useState as useState14 } from "react";
7560
+ function useCoarsePointer() {
7561
+ const [coarse, setCoarse] = useState14(false);
7562
+ useEffect9(() => {
7563
+ if (typeof window === "undefined" || !window.matchMedia) return;
7564
+ const mq = window.matchMedia("(pointer: coarse)");
7565
+ const update = () => setCoarse(mq.matches);
7566
+ update();
7567
+ mq.addEventListener("change", update);
7568
+ return () => mq.removeEventListener("change", update);
7569
+ }, []);
7570
+ return coarse;
7571
+ }
7572
+
7573
+ // src/components/hover-popover.tsx
7574
+ import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
7575
+ function HoverPopover({
7576
+ content,
7577
+ children,
7578
+ side = "top",
7579
+ align = "center",
7580
+ sideOffset = 8,
7581
+ collisionPadding = 8,
7582
+ showArrow = true,
7583
+ openDelay = 150,
7584
+ closeDelay = 150,
7585
+ open: openProp,
7586
+ defaultOpen = false,
7587
+ onOpenChange,
7588
+ contentClassName
7589
+ }) {
7590
+ const coarse = useCoarsePointer();
7591
+ const isControlled = openProp !== void 0;
7592
+ const [internalOpen, setInternalOpen] = useState15(defaultOpen);
7593
+ const open = isControlled ? openProp : internalOpen;
7594
+ const openTimer = useRef11(void 0);
7595
+ const closeTimer = useRef11(void 0);
7596
+ const clearTimers = useCallback15(() => {
7597
+ if (openTimer.current) clearTimeout(openTimer.current);
7598
+ if (closeTimer.current) clearTimeout(closeTimer.current);
7599
+ }, []);
7600
+ const setOpen = useCallback15(
7601
+ (next) => {
7602
+ if (!isControlled) setInternalOpen(next);
7603
+ onOpenChange?.(next);
7604
+ },
7605
+ [isControlled, onOpenChange]
7606
+ );
7607
+ useEffect10(() => () => clearTimers(), [clearTimers]);
7608
+ const keyboardOpenRef = useRef11(false);
7609
+ const contentRef = useRef11(null);
7610
+ const openNow = useCallback15(() => {
7611
+ keyboardOpenRef.current = false;
7612
+ clearTimers();
7613
+ openTimer.current = setTimeout(() => setOpen(true), openDelay);
7614
+ }, [clearTimers, openDelay, setOpen]);
7615
+ const closeSoon = useCallback15(() => {
7616
+ clearTimers();
7617
+ closeTimer.current = setTimeout(() => setOpen(false), closeDelay);
7618
+ }, [clearTimers, closeDelay, setOpen]);
7619
+ if (coarse) {
7620
+ return /* @__PURE__ */ jsxs32(Popover, { open, onOpenChange: setOpen, children: [
7621
+ /* @__PURE__ */ jsx42(PopoverTrigger, { asChild: true, children }),
7622
+ /* @__PURE__ */ jsx42(
7623
+ PopoverContent,
7624
+ {
7625
+ side,
7626
+ align,
7627
+ sideOffset,
7628
+ collisionPadding,
7629
+ showArrow,
7630
+ className: contentClassName,
7631
+ children: content
7632
+ }
7633
+ )
7634
+ ] });
7635
+ }
7636
+ return /* @__PURE__ */ jsxs32(Popover, { open, onOpenChange: setOpen, children: [
7637
+ /* @__PURE__ */ jsx42(
7638
+ PopoverTrigger,
7639
+ {
7640
+ asChild: true,
7641
+ onMouseEnter: openNow,
7642
+ onMouseLeave: closeSoon,
7643
+ onKeyDown: (e) => {
7644
+ if (e.key === "Enter" || e.key === " ") keyboardOpenRef.current = true;
7645
+ },
7646
+ children
7647
+ }
7648
+ ),
7649
+ /* @__PURE__ */ jsx42(
7650
+ PopoverContent,
7651
+ {
7652
+ ref: contentRef,
7653
+ side,
7654
+ align,
7655
+ sideOffset,
7656
+ collisionPadding,
7657
+ showArrow,
7658
+ className: contentClassName,
7659
+ onOpenAutoFocus: (e) => {
7660
+ if (!keyboardOpenRef.current) e.preventDefault();
7661
+ },
7662
+ onEscapeKeyDown: (e) => {
7663
+ e.preventDefault();
7664
+ setOpen(false);
7665
+ },
7666
+ onMouseEnter: clearTimers,
7667
+ onMouseLeave: closeSoon,
7668
+ onBlur: (e) => {
7669
+ const next = e.relatedTarget;
7670
+ if (next && contentRef.current?.contains(next)) return;
7671
+ closeSoon();
7672
+ },
7673
+ children: content
7674
+ }
7675
+ )
7676
+ ] });
7677
+ }
7678
+
7503
7679
  // src/components/modal.tsx
7504
7680
  import * as DialogPrimitive from "@radix-ui/react-dialog";
7505
7681
  import { SymbolWrong as SymbolWrong2 } from "@aviala-design/icons";
@@ -7509,7 +7685,7 @@ import {
7509
7685
  forwardRef as forwardRef30,
7510
7686
  isValidElement as isValidElement13
7511
7687
  } from "react";
7512
- import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
7688
+ import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
7513
7689
  var MODAL_ICON_SIZE = 16;
7514
7690
  var modalContentVariants = cva10("aviala-modal-content", {
7515
7691
  variants: {
@@ -7532,13 +7708,13 @@ function renderModalIcon(node) {
7532
7708
  "shrink-0"
7533
7709
  )
7534
7710
  }) : node;
7535
- return /* @__PURE__ */ jsx42("span", { className: "aviala-modal__icon", "aria-hidden": true, children: content });
7711
+ return /* @__PURE__ */ jsx43("span", { className: "aviala-modal__icon", "aria-hidden": true, children: content });
7536
7712
  }
7537
7713
  var Modal = DialogPrimitive.Root;
7538
7714
  var ModalTrigger = DialogPrimitive.Trigger;
7539
7715
  var ModalPortal = DialogPrimitive.Portal;
7540
7716
  var ModalClose = DialogPrimitive.Close;
7541
- var ModalOverlay = forwardRef30(({ className, ...props }, ref) => /* @__PURE__ */ jsx42(
7717
+ var ModalOverlay = forwardRef30(({ className, ...props }, ref) => /* @__PURE__ */ jsx43(
7542
7718
  DialogPrimitive.Overlay,
7543
7719
  {
7544
7720
  ref,
@@ -7557,21 +7733,27 @@ var ModalContent = forwardRef30(
7557
7733
  onOpenAutoFocus,
7558
7734
  ...props
7559
7735
  }, ref) => {
7560
- const content = /* @__PURE__ */ jsxs32(Fragment6, { children: [
7561
- showOverlay ? /* @__PURE__ */ jsx42(ModalOverlay, {}) : null,
7562
- /* @__PURE__ */ jsx42(
7563
- DialogPrimitive.Content,
7564
- {
7565
- ref,
7566
- className: cn(modalContentVariants({ size }), className),
7567
- onOpenAutoFocus,
7568
- ...props,
7569
- children: /* @__PURE__ */ jsx42("div", { className: "aviala-modal-content__surface", children })
7570
- }
7571
- )
7736
+ const overlay = showOverlay ? /* @__PURE__ */ jsx43(ModalOverlay, {}) : null;
7737
+ const panel = /* @__PURE__ */ jsx43(
7738
+ DialogPrimitive.Content,
7739
+ {
7740
+ ref,
7741
+ className: cn(modalContentVariants({ size }), className),
7742
+ onOpenAutoFocus,
7743
+ ...props,
7744
+ children: /* @__PURE__ */ jsx43("div", { className: "aviala-modal-content__surface", children })
7745
+ }
7746
+ );
7747
+ if (!portalled) {
7748
+ return /* @__PURE__ */ jsxs33(Fragment6, { children: [
7749
+ overlay,
7750
+ panel
7751
+ ] });
7752
+ }
7753
+ return /* @__PURE__ */ jsxs33(DialogPrimitive.Portal, { children: [
7754
+ overlay,
7755
+ panel
7572
7756
  ] });
7573
- if (!portalled) return content;
7574
- return /* @__PURE__ */ jsx42(DialogPrimitive.Portal, { children: content });
7575
7757
  }
7576
7758
  );
7577
7759
  ModalContent.displayName = DialogPrimitive.Content.displayName;
@@ -7584,39 +7766,39 @@ var ModalHeader = forwardRef30(
7584
7766
  showClose = true,
7585
7767
  closeLabel = "Close dialog",
7586
7768
  ...props
7587
- }, ref) => /* @__PURE__ */ jsx42("div", { ref, className: cn("aviala-modal__header", className), ...props, children: /* @__PURE__ */ jsxs32("div", { className: "aviala-modal__header-row", children: [
7769
+ }, ref) => /* @__PURE__ */ jsx43("div", { ref, className: cn("aviala-modal__header", className), ...props, children: /* @__PURE__ */ jsxs33("div", { className: "aviala-modal__header-row", children: [
7588
7770
  showIcon ? renderModalIcon(icon) : null,
7589
- /* @__PURE__ */ jsx42("div", { className: "aviala-modal__header-main", children }),
7590
- showClose ? /* @__PURE__ */ jsx42(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx42(
7591
- Link,
7771
+ /* @__PURE__ */ jsx43("div", { className: "aviala-modal__header-main", children }),
7772
+ showClose ? /* @__PURE__ */ jsx43(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx43(
7773
+ Button,
7592
7774
  {
7593
- level: "text",
7775
+ type: "button",
7594
7776
  mode: "noBackgroundCustom",
7595
7777
  iconOnly: true,
7596
7778
  "aria-label": closeLabel,
7597
7779
  className: "aviala-modal__close",
7598
- leftIcon: /* @__PURE__ */ jsx42(SymbolWrong2, { "aria-hidden": true })
7780
+ leftIcon: /* @__PURE__ */ jsx43(SymbolWrong2, { "aria-hidden": true })
7599
7781
  }
7600
7782
  ) }) : null
7601
7783
  ] }) })
7602
7784
  );
7603
7785
  ModalHeader.displayName = "ModalHeader";
7604
- var ModalTitle = forwardRef30(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx42(DialogPrimitive.Title, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx42(Typography, { level: "text", className: cn("aviala-modal__title", className), children }) }));
7786
+ var ModalTitle = forwardRef30(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx43(DialogPrimitive.Title, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx43(Typography, { level: "text", className: cn("aviala-modal__title", className), children }) }));
7605
7787
  ModalTitle.displayName = DialogPrimitive.Title.displayName;
7606
- var ModalDescription = forwardRef30(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx42(DialogPrimitive.Description, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx42(Typography, { level: "caption", className: cn("aviala-modal__description", className), children }) }));
7788
+ var ModalDescription = forwardRef30(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx43(DialogPrimitive.Description, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx43(Typography, { level: "caption", className: cn("aviala-modal__description", className), children }) }));
7607
7789
  ModalDescription.displayName = DialogPrimitive.Description.displayName;
7608
7790
  function ModalHeaderText({
7609
7791
  title,
7610
7792
  description,
7611
7793
  ...props
7612
7794
  }) {
7613
- return /* @__PURE__ */ jsx42(ModalHeader, { ...props, children: /* @__PURE__ */ jsxs32("div", { className: "aviala-modal__header-typeface", children: [
7614
- /* @__PURE__ */ jsx42(ModalTitle, { children: title }),
7615
- description ? /* @__PURE__ */ jsx42(ModalDescription, { children: description }) : null
7795
+ return /* @__PURE__ */ jsx43(ModalHeader, { ...props, children: /* @__PURE__ */ jsxs33("div", { className: "aviala-modal__header-typeface", children: [
7796
+ /* @__PURE__ */ jsx43(ModalTitle, { children: title }),
7797
+ description ? /* @__PURE__ */ jsx43(ModalDescription, { children: description }) : null
7616
7798
  ] }) });
7617
7799
  }
7618
7800
  var ModalBody = forwardRef30(
7619
- ({ className, children, layout = "default", title, description, ...props }, ref) => /* @__PURE__ */ jsx42("div", { ref, className: cn("aviala-modal__body", className), ...props, children: layout === "text" ? /* @__PURE__ */ jsx42(
7801
+ ({ className, children, layout = "default", title, description, ...props }, ref) => /* @__PURE__ */ jsx43("div", { ref, className: cn("aviala-modal__body", className), ...props, children: layout === "text" ? /* @__PURE__ */ jsx43(
7620
7802
  Typeface,
7621
7803
  {
7622
7804
  className: "aviala-modal__body-typeface",
@@ -7628,21 +7810,21 @@ var ModalBody = forwardRef30(
7628
7810
  );
7629
7811
  ModalBody.displayName = "ModalBody";
7630
7812
  var ModalFooter = forwardRef30(
7631
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx42("div", { ref, className: cn("aviala-modal__footer", className), ...props })
7813
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx43("div", { ref, className: cn("aviala-modal__footer", className), ...props })
7632
7814
  );
7633
7815
  ModalFooter.displayName = "ModalFooter";
7634
7816
 
7635
7817
  // src/components/tooltip.tsx
7636
7818
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
7637
7819
  import { forwardRef as forwardRef31 } from "react";
7638
- import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
7820
+ import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
7639
7821
  var TOOLTIP_DELAY_DURATION = 300;
7640
7822
  function TooltipProvider({
7641
7823
  delayDuration = TOOLTIP_DELAY_DURATION,
7642
7824
  skipDelayDuration = 0,
7643
7825
  ...props
7644
7826
  }) {
7645
- return /* @__PURE__ */ jsx43(
7827
+ return /* @__PURE__ */ jsx44(
7646
7828
  TooltipPrimitive.Provider,
7647
7829
  {
7648
7830
  delayDuration,
@@ -7661,7 +7843,7 @@ var TooltipContent = forwardRef31(
7661
7843
  collisionPadding = 8,
7662
7844
  showArrow = true,
7663
7845
  ...props
7664
- }, ref) => /* @__PURE__ */ jsx43(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs33(
7846
+ }, ref) => /* @__PURE__ */ jsx44(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs34(
7665
7847
  TooltipPrimitive.Content,
7666
7848
  {
7667
7849
  ref,
@@ -7670,14 +7852,14 @@ var TooltipContent = forwardRef31(
7670
7852
  className: cn("aviala-tooltip-content", className),
7671
7853
  ...props,
7672
7854
  children: [
7673
- /* @__PURE__ */ jsx43("div", { className: cn("aviala-tooltip-content__surface", typographyVariants({ level: "caption" })), children }),
7674
- showArrow ? /* @__PURE__ */ jsx43(
7855
+ /* @__PURE__ */ jsx44("div", { className: cn("aviala-tooltip-content__surface", typographyVariants({ level: "caption" })), children }),
7856
+ showArrow ? /* @__PURE__ */ jsx44(
7675
7857
  TooltipPrimitive.Arrow,
7676
7858
  {
7677
7859
  asChild: true,
7678
7860
  width: TOOLTIP_POINTER.width,
7679
7861
  height: TOOLTIP_POINTER.height,
7680
- children: /* @__PURE__ */ jsx43(
7862
+ children: /* @__PURE__ */ jsx44(
7681
7863
  OverlayPointerSvg,
7682
7864
  {
7683
7865
  className: "aviala-tooltip-content__arrow",
@@ -7694,6 +7876,66 @@ var TooltipContent = forwardRef31(
7694
7876
  );
7695
7877
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
7696
7878
 
7879
+ // src/components/responsive-tooltip.tsx
7880
+ import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
7881
+ function ResponsiveTooltip({
7882
+ content,
7883
+ children,
7884
+ side = "top",
7885
+ align = "center",
7886
+ sideOffset = 4,
7887
+ collisionPadding = 8,
7888
+ showArrow = true,
7889
+ delayDuration = TOOLTIP_DELAY_DURATION,
7890
+ open,
7891
+ defaultOpen,
7892
+ onOpenChange,
7893
+ contentClassName
7894
+ }) {
7895
+ const coarse = useCoarsePointer();
7896
+ if (coarse) {
7897
+ return /* @__PURE__ */ jsxs35(Popover, { open, defaultOpen, onOpenChange, children: [
7898
+ /* @__PURE__ */ jsx45(PopoverTrigger, { asChild: true, children }),
7899
+ /* @__PURE__ */ jsx45(
7900
+ PopoverContent,
7901
+ {
7902
+ side,
7903
+ align,
7904
+ sideOffset,
7905
+ collisionPadding,
7906
+ showArrow,
7907
+ className: contentClassName,
7908
+ children: content
7909
+ }
7910
+ )
7911
+ ] });
7912
+ }
7913
+ return /* @__PURE__ */ jsxs35(
7914
+ Tooltip,
7915
+ {
7916
+ delayDuration,
7917
+ open,
7918
+ defaultOpen,
7919
+ onOpenChange,
7920
+ children: [
7921
+ /* @__PURE__ */ jsx45(TooltipTrigger, { asChild: true, children }),
7922
+ /* @__PURE__ */ jsx45(
7923
+ TooltipContent,
7924
+ {
7925
+ side,
7926
+ align,
7927
+ sideOffset,
7928
+ collisionPadding,
7929
+ showArrow,
7930
+ className: contentClassName,
7931
+ children: content
7932
+ }
7933
+ )
7934
+ ]
7935
+ }
7936
+ );
7937
+ }
7938
+
7697
7939
  // src/components/feedback.tsx
7698
7940
  import { cva as cva11 } from "class-variance-authority";
7699
7941
  import {
@@ -7709,7 +7951,7 @@ import {
7709
7951
  forwardRef as forwardRef32,
7710
7952
  isValidElement as isValidElement14
7711
7953
  } from "react";
7712
- import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
7954
+ import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
7713
7955
  var FEEDBACK_ICON_SIZE = 22;
7714
7956
  var feedbackVariants = cva11("aviala-feedback", {
7715
7957
  variants: {
@@ -7745,22 +7987,22 @@ function renderFeedbackIcon(node) {
7745
7987
  "shrink-0"
7746
7988
  )
7747
7989
  }) : node;
7748
- return /* @__PURE__ */ jsx44("span", { className: "aviala-feedback__icon", "aria-hidden": true, children: content });
7990
+ return /* @__PURE__ */ jsx46("span", { className: "aviala-feedback__icon", "aria-hidden": true, children: content });
7749
7991
  }
7750
7992
  function defaultStatusIcon(type, mode) {
7751
7993
  const iconMode = mode === "primary" ? "fill" : "fill";
7752
7994
  const thickness = "Regular";
7753
7995
  switch (type) {
7754
7996
  case "information":
7755
- return /* @__PURE__ */ jsx44(SymbolInformationCircle2, { thickness, mode: iconMode, "aria-hidden": true });
7997
+ return /* @__PURE__ */ jsx46(SymbolInformationCircle2, { thickness, mode: iconMode, "aria-hidden": true });
7756
7998
  case "warning":
7757
- return /* @__PURE__ */ jsx44(SymbolWarningCircle, { thickness, mode: iconMode, "aria-hidden": true });
7999
+ return /* @__PURE__ */ jsx46(SymbolWarningCircle, { thickness, mode: iconMode, "aria-hidden": true });
7758
8000
  case "wrong":
7759
- return /* @__PURE__ */ jsx44(SymbolWrongCircle2, { thickness, mode: iconMode, "aria-hidden": true });
8001
+ return /* @__PURE__ */ jsx46(SymbolWrongCircle2, { thickness, mode: iconMode, "aria-hidden": true });
7760
8002
  case "success":
7761
- return /* @__PURE__ */ jsx44(SymbolRightCircle, { thickness, mode: iconMode, "aria-hidden": true });
8003
+ return /* @__PURE__ */ jsx46(SymbolRightCircle, { thickness, mode: iconMode, "aria-hidden": true });
7762
8004
  case "normal":
7763
- return /* @__PURE__ */ jsx44(GeneralNotification, { thickness, mode: "default", "aria-hidden": true });
8005
+ return /* @__PURE__ */ jsx46(GeneralNotification, { thickness, mode: "default", "aria-hidden": true });
7764
8006
  }
7765
8007
  }
7766
8008
  var Feedback = forwardRef32(
@@ -7785,7 +8027,7 @@ var Feedback = forwardRef32(
7785
8027
  const tone = mode === "primary" ? "white" : "default";
7786
8028
  const isSmall = resolvedSize === "small";
7787
8029
  const resolvedRole = resolvedType === "wrong" ? "alert" : "status";
7788
- return /* @__PURE__ */ jsx44(
8030
+ return /* @__PURE__ */ jsx46(
7789
8031
  "div",
7790
8032
  {
7791
8033
  ref,
@@ -7799,9 +8041,9 @@ var Feedback = forwardRef32(
7799
8041
  "data-size": resolvedSize,
7800
8042
  "data-mode": mode,
7801
8043
  ...props,
7802
- children: /* @__PURE__ */ jsxs34("div", { className: "aviala-feedback__body", children: [
8044
+ children: /* @__PURE__ */ jsxs36("div", { className: "aviala-feedback__body", children: [
7803
8045
  renderFeedbackIcon(icon ?? defaultStatusIcon(resolvedType, mode)),
7804
- isSmall ? /* @__PURE__ */ jsx44(Typography, { level: "text", tone, className: "aviala-feedback__title", children: title }) : /* @__PURE__ */ jsx44(
8046
+ isSmall ? /* @__PURE__ */ jsx46(Typography, { level: "text", tone, className: "aviala-feedback__title", children: title }) : /* @__PURE__ */ jsx46(
7805
8047
  Typeface,
7806
8048
  {
7807
8049
  className: "aviala-feedback__typeface",
@@ -7811,7 +8053,7 @@ var Feedback = forwardRef32(
7811
8053
  tone
7812
8054
  }
7813
8055
  ),
7814
- action ? /* @__PURE__ */ jsx44(
8056
+ action ? /* @__PURE__ */ jsx46(
7815
8057
  Link,
7816
8058
  {
7817
8059
  level: "text",
@@ -7827,7 +8069,7 @@ var Feedback = forwardRef32(
7827
8069
  children: action
7828
8070
  }
7829
8071
  ) : null,
7830
- showClose ? /* @__PURE__ */ jsx44(
8072
+ showClose ? /* @__PURE__ */ jsx46(
7831
8073
  Link,
7832
8074
  {
7833
8075
  level: "text",
@@ -7836,7 +8078,7 @@ var Feedback = forwardRef32(
7836
8078
  href: onClose ? "#" : void 0,
7837
8079
  "aria-label": closeLabel,
7838
8080
  className: "aviala-feedback__close",
7839
- leftIcon: /* @__PURE__ */ jsx44(SymbolWrong3, { "aria-hidden": true }),
8081
+ leftIcon: /* @__PURE__ */ jsx46(SymbolWrong3, { "aria-hidden": true }),
7840
8082
  onClick: (event) => {
7841
8083
  if (onClose) {
7842
8084
  event.preventDefault();
@@ -7866,7 +8108,7 @@ import {
7866
8108
  forwardRef as forwardRef33,
7867
8109
  isValidElement as isValidElement15
7868
8110
  } from "react";
7869
- import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
8111
+ import { jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
7870
8112
  var ALERT_ICON_SIZE = 16;
7871
8113
  var alertVariants = cva12("aviala-alert", {
7872
8114
  variants: {
@@ -7902,20 +8144,20 @@ function renderAlertIcon(node) {
7902
8144
  "shrink-0"
7903
8145
  )
7904
8146
  }) : node;
7905
- return /* @__PURE__ */ jsx45("span", { className: "aviala-alert__icon", "aria-hidden": true, children: content });
8147
+ return /* @__PURE__ */ jsx47("span", { className: "aviala-alert__icon", "aria-hidden": true, children: content });
7906
8148
  }
7907
8149
  function defaultStatusIcon2(type) {
7908
8150
  const iconProps = { thickness: "Regular", mode: "fill", "aria-hidden": true };
7909
8151
  switch (type) {
7910
8152
  case "info":
7911
8153
  case "neutral":
7912
- return /* @__PURE__ */ jsx45(SymbolInformationCircle3, { ...iconProps });
8154
+ return /* @__PURE__ */ jsx47(SymbolInformationCircle3, { ...iconProps });
7913
8155
  case "warning":
7914
- return /* @__PURE__ */ jsx45(SymbolWarningCircle2, { ...iconProps });
8156
+ return /* @__PURE__ */ jsx47(SymbolWarningCircle2, { ...iconProps });
7915
8157
  case "error":
7916
- return /* @__PURE__ */ jsx45(SymbolWrongCircle3, { ...iconProps });
8158
+ return /* @__PURE__ */ jsx47(SymbolWrongCircle3, { ...iconProps });
7917
8159
  case "success":
7918
- return /* @__PURE__ */ jsx45(SymbolRightCircle2, { ...iconProps });
8160
+ return /* @__PURE__ */ jsx47(SymbolRightCircle2, { ...iconProps });
7919
8161
  }
7920
8162
  }
7921
8163
  var Alert = forwardRef33(
@@ -7944,7 +8186,7 @@ var Alert = forwardRef33(
7944
8186
  const resolvedType = type ?? "info";
7945
8187
  const resolvedRole = resolvedType === "error" ? "alert" : "status";
7946
8188
  const hasActions = showActions && (action || secondaryAction);
7947
- return /* @__PURE__ */ jsxs35(
8189
+ return /* @__PURE__ */ jsxs37(
7948
8190
  "div",
7949
8191
  {
7950
8192
  ref,
@@ -7956,9 +8198,9 @@ var Alert = forwardRef33(
7956
8198
  "data-appearance": appearance,
7957
8199
  ...props,
7958
8200
  children: [
7959
- /* @__PURE__ */ jsxs35("div", { className: "aviala-alert__body", children: [
8201
+ /* @__PURE__ */ jsxs37("div", { className: "aviala-alert__body", children: [
7960
8202
  showIcon ? renderAlertIcon(icon ?? defaultStatusIcon2(resolvedType)) : null,
7961
- isSmall ? /* @__PURE__ */ jsx45(Typography, { level: "text", className: "aviala-alert__title", children: title }) : /* @__PURE__ */ jsx45(
8203
+ isSmall ? /* @__PURE__ */ jsx47(Typography, { level: "text", className: "aviala-alert__title", children: title }) : /* @__PURE__ */ jsx47(
7962
8204
  Typeface,
7963
8205
  {
7964
8206
  className: "aviala-alert__typeface",
@@ -7967,7 +8209,7 @@ var Alert = forwardRef33(
7967
8209
  secondary: description
7968
8210
  }
7969
8211
  ),
7970
- quickAction ? /* @__PURE__ */ jsx45(
8212
+ quickAction ? /* @__PURE__ */ jsx47(
7971
8213
  Link,
7972
8214
  {
7973
8215
  level: "text",
@@ -7983,7 +8225,7 @@ var Alert = forwardRef33(
7983
8225
  children: quickAction
7984
8226
  }
7985
8227
  ) : null,
7986
- dismissible ? /* @__PURE__ */ jsx45(
8228
+ dismissible ? /* @__PURE__ */ jsx47(
7987
8229
  Link,
7988
8230
  {
7989
8231
  level: "text",
@@ -7992,7 +8234,7 @@ var Alert = forwardRef33(
7992
8234
  href: onDismiss ? "#" : void 0,
7993
8235
  "aria-label": closeLabel,
7994
8236
  className: "aviala-alert__close",
7995
- leftIcon: /* @__PURE__ */ jsx45(SymbolWrong4, { "aria-hidden": true }),
8237
+ leftIcon: /* @__PURE__ */ jsx47(SymbolWrong4, { "aria-hidden": true }),
7996
8238
  onClick: (event) => {
7997
8239
  if (onDismiss) {
7998
8240
  event.preventDefault();
@@ -8002,8 +8244,8 @@ var Alert = forwardRef33(
8002
8244
  }
8003
8245
  ) : null
8004
8246
  ] }),
8005
- hasActions ? /* @__PURE__ */ jsxs35("div", { className: "aviala-alert__actions", children: [
8006
- action ? /* @__PURE__ */ jsx45(
8247
+ hasActions ? /* @__PURE__ */ jsxs37("div", { className: "aviala-alert__actions", children: [
8248
+ action ? /* @__PURE__ */ jsx47(
8007
8249
  Link,
8008
8250
  {
8009
8251
  level: "caption",
@@ -8019,7 +8261,7 @@ var Alert = forwardRef33(
8019
8261
  children: action
8020
8262
  }
8021
8263
  ) : null,
8022
- secondaryAction ? /* @__PURE__ */ jsx45(
8264
+ secondaryAction ? /* @__PURE__ */ jsx47(
8023
8265
  Link,
8024
8266
  {
8025
8267
  level: "caption",
@@ -8053,30 +8295,30 @@ import {
8053
8295
  forwardRef as forwardRef34,
8054
8296
  isValidElement as isValidElement16
8055
8297
  } from "react";
8056
- import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
8298
+ import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
8057
8299
  var List = forwardRef34(
8058
- ({ className, title, children, ...props }, ref) => /* @__PURE__ */ jsxs36("div", { ref, className: cn("aviala-list", className), ...props, children: [
8059
- title != null ? /* @__PURE__ */ jsx46(ListTitle, { children: title }) : null,
8060
- /* @__PURE__ */ jsx46(ListGroup, { children })
8300
+ ({ className, title, children, ...props }, ref) => /* @__PURE__ */ jsxs38("div", { ref, className: cn("aviala-list", className), ...props, children: [
8301
+ title != null ? /* @__PURE__ */ jsx48(ListTitle, { children: title }) : null,
8302
+ /* @__PURE__ */ jsx48(ListGroup, { children })
8061
8303
  ] })
8062
8304
  );
8063
8305
  List.displayName = "List";
8064
8306
  var ListTitle = forwardRef34(
8065
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx46("div", { ref, className: cn("aviala-list-title", className), ...props, children: /* @__PURE__ */ jsx46("span", { className: cn(typographyVariants({ level: "text" })), children }) })
8307
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx48("div", { ref, className: cn("aviala-list-title", className), ...props, children: /* @__PURE__ */ jsx48("span", { className: cn(typographyVariants({ level: "text" })), children }) })
8066
8308
  );
8067
8309
  ListTitle.displayName = "ListTitle";
8068
8310
  var ListGroup = forwardRef34(
8069
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx46("div", { ref, className: cn("aviala-list-group", className), role: "list", ...props, children })
8311
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx48("div", { ref, className: cn("aviala-list-group", className), role: "list", ...props, children })
8070
8312
  );
8071
8313
  ListGroup.displayName = "ListGroup";
8072
8314
  function ListItemGroup({ label, children, className }) {
8073
- return /* @__PURE__ */ jsxs36("div", { className: cn("aviala-list", className), children: [
8074
- label != null ? /* @__PURE__ */ jsx46(ListTitle, { children: label }) : null,
8075
- /* @__PURE__ */ jsx46(ListGroup, { children })
8315
+ return /* @__PURE__ */ jsxs38("div", { className: cn("aviala-list", className), children: [
8316
+ label != null ? /* @__PURE__ */ jsx48(ListTitle, { children: label }) : null,
8317
+ /* @__PURE__ */ jsx48(ListGroup, { children })
8076
8318
  ] });
8077
8319
  }
8078
8320
  var ListDivider = forwardRef34(
8079
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx46(
8321
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
8080
8322
  "span",
8081
8323
  {
8082
8324
  ref,
@@ -8088,13 +8330,13 @@ var ListDivider = forwardRef34(
8088
8330
  );
8089
8331
  ListDivider.displayName = "ListDivider";
8090
8332
  var ListSeparator = forwardRef34(
8091
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx46("hr", { ref, className: cn("aviala-list-separator", className), ...props })
8333
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx48("hr", { ref, className: cn("aviala-list-separator", className), ...props })
8092
8334
  );
8093
8335
  ListSeparator.displayName = "ListSeparator";
8094
8336
  function renderLeadingIcon(node, leading) {
8095
8337
  if (leading === "none") return null;
8096
8338
  const iconSize = leading === "shaped" ? 20 : 22;
8097
- const content = node ?? (leading === "shaped" ? /* @__PURE__ */ jsx46(GeneralSetting, { "aria-hidden": true }) : /* @__PURE__ */ jsx46(GeneralSetting, { "aria-hidden": true }));
8339
+ const content = node ?? (leading === "shaped" ? /* @__PURE__ */ jsx48(GeneralSetting, { "aria-hidden": true }) : /* @__PURE__ */ jsx48(GeneralSetting, { "aria-hidden": true }));
8098
8340
  const rendered = isValidElement16(content) && typeof content.type !== "string" ? cloneElement11(content, {
8099
8341
  width: iconSize,
8100
8342
  height: iconSize,
@@ -8103,7 +8345,7 @@ function renderLeadingIcon(node, leading) {
8103
8345
  "shrink-0"
8104
8346
  )
8105
8347
  }) : content;
8106
- return /* @__PURE__ */ jsx46("span", { className: "aviala-list-item__icon", children: /* @__PURE__ */ jsx46(
8348
+ return /* @__PURE__ */ jsx48("span", { className: "aviala-list-item__icon", children: /* @__PURE__ */ jsx48(
8107
8349
  "span",
8108
8350
  {
8109
8351
  className: cn(
@@ -8134,44 +8376,44 @@ var ListItem = forwardRef34(
8134
8376
  ...props
8135
8377
  }, ref) => {
8136
8378
  const isInteractive = interactive ?? onClick != null;
8137
- const primaryAction = action ?? /* @__PURE__ */ jsx46(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ jsx46(GeneralSetting, { "aria-hidden": true }), children: actionLabel });
8379
+ const primaryAction = action ?? /* @__PURE__ */ jsx48(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ jsx48(GeneralSetting, { "aria-hidden": true }), children: actionLabel });
8138
8380
  const renderTrailing = () => {
8139
8381
  if (trailing !== void 0) return trailing;
8140
8382
  switch (itemType) {
8141
8383
  case "action":
8142
- return /* @__PURE__ */ jsxs36("div", { className: "aviala-list-item__more", children: [
8143
- /* @__PURE__ */ jsxs36("div", { className: "aviala-list-item__trailing", children: [
8384
+ return /* @__PURE__ */ jsxs38("div", { className: "aviala-list-item__more", children: [
8385
+ /* @__PURE__ */ jsxs38("div", { className: "aviala-list-item__trailing", children: [
8144
8386
  primaryAction,
8145
- secondaryAction ?? /* @__PURE__ */ jsx46(
8387
+ secondaryAction ?? /* @__PURE__ */ jsx48(
8146
8388
  Button,
8147
8389
  {
8148
8390
  mode: "default",
8149
8391
  size: "regular",
8150
8392
  iconOnly: true,
8151
8393
  "aria-label": "More",
8152
- leftIcon: /* @__PURE__ */ jsx46(GeneralSetting, { "aria-hidden": true })
8394
+ leftIcon: /* @__PURE__ */ jsx48(GeneralSetting, { "aria-hidden": true })
8153
8395
  }
8154
8396
  )
8155
8397
  ] }),
8156
- /* @__PURE__ */ jsx46(ListDivider, {}),
8157
- /* @__PURE__ */ jsx46("span", { className: "aviala-list-item__chevron", "aria-hidden": true, children: /* @__PURE__ */ jsx46(DirectionArrowRightLight2, { width: 18, height: 18 }) })
8398
+ /* @__PURE__ */ jsx48(ListDivider, {}),
8399
+ /* @__PURE__ */ jsx48("span", { className: "aviala-list-item__chevron", "aria-hidden": true, children: /* @__PURE__ */ jsx48(DirectionArrowRightLight2, { width: 18, height: 18 }) })
8158
8400
  ] });
8159
8401
  case "switch":
8160
- return /* @__PURE__ */ jsxs36("div", { className: "aviala-list-item__trailing", children: [
8402
+ return /* @__PURE__ */ jsxs38("div", { className: "aviala-list-item__trailing", children: [
8161
8403
  primaryAction,
8162
- /* @__PURE__ */ jsx46(ListDivider, {}),
8163
- /* @__PURE__ */ jsx46(Switch, { ...switchProps })
8404
+ /* @__PURE__ */ jsx48(ListDivider, {}),
8405
+ /* @__PURE__ */ jsx48(Switch, { ...switchProps })
8164
8406
  ] });
8165
8407
  case "select":
8166
8408
  default:
8167
- return /* @__PURE__ */ jsxs36("div", { className: "aviala-list-item__trailing", children: [
8409
+ return /* @__PURE__ */ jsxs38("div", { className: "aviala-list-item__trailing", children: [
8168
8410
  primaryAction,
8169
- /* @__PURE__ */ jsx46(ListDivider, {}),
8170
- /* @__PURE__ */ jsx46("span", { className: "aviala-list-item__select", children: select })
8411
+ /* @__PURE__ */ jsx48(ListDivider, {}),
8412
+ /* @__PURE__ */ jsx48("span", { className: "aviala-list-item__select", children: select })
8171
8413
  ] });
8172
8414
  }
8173
8415
  };
8174
- return /* @__PURE__ */ jsxs36(
8416
+ return /* @__PURE__ */ jsxs38(
8175
8417
  "div",
8176
8418
  {
8177
8419
  ref,
@@ -8186,8 +8428,8 @@ var ListItem = forwardRef34(
8186
8428
  ...props,
8187
8429
  children: [
8188
8430
  renderLeadingIcon(icon, leading),
8189
- /* @__PURE__ */ jsx46("div", { className: "aviala-list-item__body", children: /* @__PURE__ */ jsxs36("div", { className: "aviala-list-item__content", children: [
8190
- /* @__PURE__ */ jsx46("div", { className: "aviala-list-item__head", children: /* @__PURE__ */ jsx46(Typeface, { content: "textCaption", primary: title, secondary: subtitle }) }),
8431
+ /* @__PURE__ */ jsx48("div", { className: "aviala-list-item__body", children: /* @__PURE__ */ jsxs38("div", { className: "aviala-list-item__content", children: [
8432
+ /* @__PURE__ */ jsx48("div", { className: "aviala-list-item__head", children: /* @__PURE__ */ jsx48(Typeface, { content: "textCaption", primary: title, secondary: subtitle }) }),
8191
8433
  renderTrailing()
8192
8434
  ] }) })
8193
8435
  ]
@@ -8203,15 +8445,15 @@ import { Slot as Slot5 } from "@radix-ui/react-slot";
8203
8445
  import {
8204
8446
  createContext as createContext8,
8205
8447
  forwardRef as forwardRef35,
8206
- useCallback as useCallback15,
8448
+ useCallback as useCallback16,
8207
8449
  useContext as useContext8,
8208
- useEffect as useEffect10,
8450
+ useEffect as useEffect11,
8209
8451
  useLayoutEffect as useLayoutEffect6,
8210
- useMemo as useMemo9,
8452
+ useMemo as useMemo10,
8211
8453
  useRef as useRef12,
8212
- useState as useState14
8454
+ useState as useState16
8213
8455
  } from "react";
8214
- import { Fragment as Fragment7, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
8456
+ import { Fragment as Fragment7, jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
8215
8457
  function navigationItemButtonMode(active) {
8216
8458
  return active ? "second" : "noBackgroundCustom";
8217
8459
  }
@@ -8276,11 +8518,17 @@ function measureNavigationIndicator(group, direction) {
8276
8518
  50
8277
8519
  );
8278
8520
  if (direction === "vertical") {
8521
+ let inset = railInset;
8522
+ if (item.matches(":active")) {
8523
+ inset = readIndicatorToken(group, "--navigation-rail-inset-press", 9);
8524
+ } else if (item.matches(":hover")) {
8525
+ inset = readIndicatorToken(group, "--navigation-rail-inset-hover", 3);
8526
+ }
8279
8527
  return {
8280
8528
  x: railLeft,
8281
- y: itemRect.top - groupRect.top + railInset,
8529
+ y: itemRect.top - groupRect.top + inset,
8282
8530
  width: railWidth,
8283
- height: Math.max(0, itemRect.height - railInset * 2),
8531
+ height: Math.max(0, itemRect.height - inset * 2),
8284
8532
  visible: true
8285
8533
  };
8286
8534
  }
@@ -8379,13 +8627,13 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
8379
8627
  const layoutTrackingFrameRef = useRef12(null);
8380
8628
  const isLayoutTrackingRef = useRef12(false);
8381
8629
  const isInitialMount = useRef12(true);
8382
- const [activeRevision, setActiveRevision] = useState14(0);
8383
- const measureIndicator = useCallback15(() => {
8630
+ const [activeRevision, setActiveRevision] = useState16(0);
8631
+ const measureIndicator = useCallback16(() => {
8384
8632
  const group = groupRef.current;
8385
8633
  if (!group) return null;
8386
8634
  return measureNavigationIndicator(group, direction);
8387
8635
  }, [direction, groupRef]);
8388
- const syncIndicator = useCallback15(
8636
+ const syncIndicator = useCallback16(
8389
8637
  (metrics, instant = false) => {
8390
8638
  metricsRef.current = metrics;
8391
8639
  const el = indicatorRef.current;
@@ -8393,14 +8641,14 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
8393
8641
  },
8394
8642
  []
8395
8643
  );
8396
- const cancelLayoutTracking = useCallback15(() => {
8644
+ const cancelLayoutTracking = useCallback16(() => {
8397
8645
  if (layoutTrackingFrameRef.current != null) {
8398
8646
  cancelAnimationFrame(layoutTrackingFrameRef.current);
8399
8647
  layoutTrackingFrameRef.current = null;
8400
8648
  }
8401
8649
  isLayoutTrackingRef.current = false;
8402
8650
  }, []);
8403
- const remeasureIndicator = useCallback15(() => {
8651
+ const remeasureIndicator = useCallback16(() => {
8404
8652
  if (isLayoutTrackingRef.current) return;
8405
8653
  const metrics = measureIndicator();
8406
8654
  if (!metrics) return;
@@ -8409,7 +8657,7 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
8409
8657
  isAnimatingRef.current = false;
8410
8658
  syncIndicator(metrics, true);
8411
8659
  }, [measureIndicator, syncIndicator]);
8412
- const startExpandCollapseTracking = useCallback15(() => {
8660
+ const startExpandCollapseTracking = useCallback16(() => {
8413
8661
  const group = groupRef.current;
8414
8662
  const el = indicatorRef.current;
8415
8663
  if (!group || !el) return;
@@ -8466,7 +8714,7 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
8466
8714
  };
8467
8715
  layoutTrackingFrameRef.current = requestAnimationFrame(tick);
8468
8716
  }, [cancelLayoutTracking, groupRef, measureIndicator, syncIndicator]);
8469
- const onIndicatorRef = useCallback15((node) => {
8717
+ const onIndicatorRef = useCallback16((node) => {
8470
8718
  indicatorRef.current = node;
8471
8719
  if (node && metricsRef.current && isInitialMount.current) {
8472
8720
  applyIndicatorMetrics(node, metricsRef.current, true);
@@ -8578,6 +8826,32 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
8578
8826
  startExpandCollapseTracking,
8579
8827
  syncIndicator
8580
8828
  ]);
8829
+ useEffect11(() => {
8830
+ if (direction !== "vertical") return;
8831
+ const group = groupRef.current;
8832
+ if (!group) return;
8833
+ const refreshInteractionMetrics = () => {
8834
+ if (isLayoutTrackingRef.current || isAnimatingRef.current) return;
8835
+ const metrics = measureIndicator();
8836
+ if (!metrics) return;
8837
+ if (metricsRef.current && metricsApproxEqual2(metrics, metricsRef.current)) {
8838
+ return;
8839
+ }
8840
+ syncIndicator(metrics, false);
8841
+ };
8842
+ group.addEventListener("pointerover", refreshInteractionMetrics);
8843
+ group.addEventListener("pointerout", refreshInteractionMetrics);
8844
+ group.addEventListener("pointerdown", refreshInteractionMetrics);
8845
+ group.addEventListener("pointerup", refreshInteractionMetrics);
8846
+ group.addEventListener("pointercancel", refreshInteractionMetrics);
8847
+ return () => {
8848
+ group.removeEventListener("pointerover", refreshInteractionMetrics);
8849
+ group.removeEventListener("pointerout", refreshInteractionMetrics);
8850
+ group.removeEventListener("pointerdown", refreshInteractionMetrics);
8851
+ group.removeEventListener("pointerup", refreshInteractionMetrics);
8852
+ group.removeEventListener("pointercancel", refreshInteractionMetrics);
8853
+ };
8854
+ }, [direction, groupRef, measureIndicator, syncIndicator]);
8581
8855
  return onIndicatorRef;
8582
8856
  }
8583
8857
  var Navigation = forwardRef35(
@@ -8588,7 +8862,7 @@ var Navigation = forwardRef35(
8588
8862
  direction = "vertical",
8589
8863
  dividingLine = false,
8590
8864
  ...props
8591
- }, ref) => /* @__PURE__ */ jsx47(NavigationDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ jsx47(
8865
+ }, ref) => /* @__PURE__ */ jsx49(NavigationDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ jsx49(
8592
8866
  Tag2,
8593
8867
  {
8594
8868
  ref,
@@ -8602,7 +8876,7 @@ var Navigation = forwardRef35(
8602
8876
  );
8603
8877
  Navigation.displayName = "Navigation";
8604
8878
  var NavigationBrand = forwardRef35(
8605
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
8879
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
8606
8880
  "div",
8607
8881
  {
8608
8882
  ref,
@@ -8614,24 +8888,24 @@ var NavigationBrand = forwardRef35(
8614
8888
  NavigationBrand.displayName = "NavigationBrand";
8615
8889
  var NavigationBrandTitle = forwardRef35(({ className, asChild = false, children, ...props }, ref) => {
8616
8890
  const Comp = asChild ? Slot5 : "a";
8617
- return /* @__PURE__ */ jsx47(
8891
+ return /* @__PURE__ */ jsx49(
8618
8892
  Comp,
8619
8893
  {
8620
8894
  ref,
8621
8895
  className: cn("aviala-navigation-brand__title aviala-focus-ring", className),
8622
8896
  ...props,
8623
- children: asChild ? children : /* @__PURE__ */ jsx47(Typography, { level: "text", as: "span", children })
8897
+ children: asChild ? children : /* @__PURE__ */ jsx49(Typography, { level: "text", as: "span", children })
8624
8898
  }
8625
8899
  );
8626
8900
  });
8627
8901
  NavigationBrandTitle.displayName = "NavigationBrandTitle";
8628
- var NavigationSection = forwardRef35(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx47(
8902
+ var NavigationSection = forwardRef35(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx49(
8629
8903
  "div",
8630
8904
  {
8631
8905
  ref,
8632
8906
  className: cn("aviala-navigation-section", className),
8633
8907
  ...props,
8634
- children: /* @__PURE__ */ jsx47(Typography, { level: "caption", as: "p", children })
8908
+ children: /* @__PURE__ */ jsx49(Typography, { level: "caption", as: "p", children })
8635
8909
  }
8636
8910
  ));
8637
8911
  NavigationSection.displayName = "NavigationSection";
@@ -8645,7 +8919,7 @@ var NavigationGroup = forwardRef35(
8645
8919
  direction,
8646
8920
  layoutKey
8647
8921
  );
8648
- const setRefs = useCallback15(
8922
+ const setRefs = useCallback16(
8649
8923
  (node) => {
8650
8924
  groupRef.current = node;
8651
8925
  if (typeof ref === "function") {
@@ -8656,14 +8930,14 @@ var NavigationGroup = forwardRef35(
8656
8930
  },
8657
8931
  [ref]
8658
8932
  );
8659
- return /* @__PURE__ */ jsxs37(
8933
+ return /* @__PURE__ */ jsxs39(
8660
8934
  "div",
8661
8935
  {
8662
8936
  ref: setRefs,
8663
8937
  className: cn("aviala-navigation-group", className),
8664
8938
  ...props,
8665
8939
  children: [
8666
- /* @__PURE__ */ jsx47(
8940
+ /* @__PURE__ */ jsx49(
8667
8941
  "span",
8668
8942
  {
8669
8943
  ref: onIndicatorRef,
@@ -8689,7 +8963,7 @@ var NavigationItemGroup = forwardRef35(({ className, expanded, children, ...prop
8689
8963
  if (isCollapsed) inner.setAttribute("inert", "");
8690
8964
  else inner.removeAttribute("inert");
8691
8965
  }, [isCollapsed]);
8692
- return /* @__PURE__ */ jsx47(
8966
+ return /* @__PURE__ */ jsx49(
8693
8967
  "div",
8694
8968
  {
8695
8969
  ref,
@@ -8697,7 +8971,7 @@ var NavigationItemGroup = forwardRef35(({ className, expanded, children, ...prop
8697
8971
  "data-expanded": isCollapsible ? expanded ? "true" : "false" : void 0,
8698
8972
  "aria-hidden": isCollapsed ? true : void 0,
8699
8973
  ...props,
8700
- children: isCollapsible ? /* @__PURE__ */ jsx47("div", { ref: innerRef, className: "aviala-navigation-item-group__inner", children }) : children
8974
+ children: isCollapsible ? /* @__PURE__ */ jsx49("div", { ref: innerRef, className: "aviala-navigation-item-group__inner", children }) : children
8701
8975
  }
8702
8976
  );
8703
8977
  });
@@ -8708,7 +8982,7 @@ function renderItemIcon3(node) {
8708
8982
  level: "text",
8709
8983
  biggerSize: true
8710
8984
  });
8711
- return /* @__PURE__ */ jsx47("span", { className: "aviala-navigation-item__icon", children: content });
8985
+ return /* @__PURE__ */ jsx49("span", { className: "aviala-navigation-item__icon", children: content });
8712
8986
  }
8713
8987
  var NavigationItem = forwardRef35(
8714
8988
  ({
@@ -8725,9 +8999,9 @@ var NavigationItem = forwardRef35(
8725
8999
  const Comp = asChild ? Slot5 : "a";
8726
9000
  const isActive = active ?? ariaCurrent === "page";
8727
9001
  const mode = navigationItemButtonMode(isActive);
8728
- const controlContent = /* @__PURE__ */ jsxs37(Fragment7, { children: [
9002
+ const controlContent = /* @__PURE__ */ jsxs39(Fragment7, { children: [
8729
9003
  renderItemIcon3(leftIcon),
8730
- /* @__PURE__ */ jsx47(
9004
+ /* @__PURE__ */ jsx49(
8731
9005
  Typography,
8732
9006
  {
8733
9007
  level: "text",
@@ -8736,15 +9010,15 @@ var NavigationItem = forwardRef35(
8736
9010
  children
8737
9011
  }
8738
9012
  ),
8739
- rightIcon ? /* @__PURE__ */ jsx47("span", { className: "aviala-navigation-item__chevron", children: renderItemIcon3(rightIcon) }) : null
9013
+ rightIcon ? /* @__PURE__ */ jsx49("span", { className: "aviala-navigation-item__chevron", children: renderItemIcon3(rightIcon) }) : null
8740
9014
  ] });
8741
- return /* @__PURE__ */ jsx47(
9015
+ return /* @__PURE__ */ jsx49(
8742
9016
  "span",
8743
9017
  {
8744
9018
  className: cn("aviala-navigation-item", className),
8745
9019
  "data-item-type": itemType,
8746
9020
  "data-active": isActive ? "true" : "false",
8747
- children: /* @__PURE__ */ jsx47(
9021
+ children: /* @__PURE__ */ jsx49(
8748
9022
  Comp,
8749
9023
  {
8750
9024
  ref,
@@ -8763,7 +9037,7 @@ var NavigationItem = forwardRef35(
8763
9037
  }
8764
9038
  );
8765
9039
  NavigationItem.displayName = "NavigationItem";
8766
- var NavigationActions = forwardRef35(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx47(
9040
+ var NavigationActions = forwardRef35(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx49(
8767
9041
  "div",
8768
9042
  {
8769
9043
  ref,
@@ -8773,7 +9047,7 @@ var NavigationActions = forwardRef35(({ className, children, ...props }, ref) =>
8773
9047
  }
8774
9048
  ));
8775
9049
  NavigationActions.displayName = "NavigationActions";
8776
- var NavigationActionsSlot = forwardRef35(({ className, ...props }, ref) => /* @__PURE__ */ jsx47(
9050
+ var NavigationActionsSlot = forwardRef35(({ className, ...props }, ref) => /* @__PURE__ */ jsx49(
8777
9051
  "div",
8778
9052
  {
8779
9053
  ref,
@@ -8799,28 +9073,28 @@ function NavigationItemMenu({
8799
9073
  onOpenChange,
8800
9074
  children
8801
9075
  }) {
8802
- const [internalValue, setInternalValue] = useState14(defaultValue);
9076
+ const [internalValue, setInternalValue] = useState16(defaultValue);
8803
9077
  const isValueControlled = valueProp !== void 0;
8804
9078
  const value = isValueControlled ? valueProp : internalValue;
8805
- const [internalOpen, setInternalOpen] = useState14(false);
9079
+ const [internalOpen, setInternalOpen] = useState16(false);
8806
9080
  const isOpenControlled = openProp !== void 0;
8807
9081
  const open = isOpenControlled ? openProp : internalOpen;
8808
9082
  const closeTimerRef = useRef12(null);
8809
9083
  const openedByHoverRef = useRef12(false);
8810
- const setOpen = useCallback15(
9084
+ const setOpen = useCallback16(
8811
9085
  (nextOpen) => {
8812
9086
  if (!isOpenControlled) setInternalOpen(nextOpen);
8813
9087
  onOpenChange?.(nextOpen);
8814
9088
  },
8815
9089
  [isOpenControlled, onOpenChange]
8816
9090
  );
8817
- const cancelClose = useCallback15(() => {
9091
+ const cancelClose = useCallback16(() => {
8818
9092
  if (closeTimerRef.current != null) {
8819
9093
  window.clearTimeout(closeTimerRef.current);
8820
9094
  closeTimerRef.current = null;
8821
9095
  }
8822
9096
  }, []);
8823
- const openMenu = useCallback15(
9097
+ const openMenu = useCallback16(
8824
9098
  (viaHover) => {
8825
9099
  cancelClose();
8826
9100
  openedByHoverRef.current = viaHover;
@@ -8828,14 +9102,14 @@ function NavigationItemMenu({
8828
9102
  },
8829
9103
  [cancelClose, setOpen]
8830
9104
  );
8831
- const scheduleClose = useCallback15(() => {
9105
+ const scheduleClose = useCallback16(() => {
8832
9106
  cancelClose();
8833
9107
  closeTimerRef.current = window.setTimeout(() => {
8834
9108
  closeTimerRef.current = null;
8835
9109
  setOpen(false);
8836
9110
  }, NAVIGATION_MENU_CLOSE_DELAY_MS);
8837
9111
  }, [cancelClose, setOpen]);
8838
- const select = useCallback15(
9112
+ const select = useCallback16(
8839
9113
  (nextValue) => {
8840
9114
  if (!isValueControlled) setInternalValue(nextValue);
8841
9115
  onValueChange?.(nextValue);
@@ -8844,8 +9118,8 @@ function NavigationItemMenu({
8844
9118
  },
8845
9119
  [cancelClose, isValueControlled, onValueChange, setOpen]
8846
9120
  );
8847
- useEffect10(() => cancelClose, [cancelClose]);
8848
- const contextValue = useMemo9(
9121
+ useEffect11(() => cancelClose, [cancelClose]);
9122
+ const contextValue = useMemo10(
8849
9123
  () => ({
8850
9124
  value,
8851
9125
  hasSelection: value != null && value !== "",
@@ -8857,7 +9131,7 @@ function NavigationItemMenu({
8857
9131
  }),
8858
9132
  [cancelClose, openMenu, scheduleClose, select, value]
8859
9133
  );
8860
- const handleOpenChange = useCallback15(
9134
+ const handleOpenChange = useCallback16(
8861
9135
  (nextOpen) => {
8862
9136
  if (nextOpen) openedByHoverRef.current = false;
8863
9137
  cancelClose();
@@ -8865,7 +9139,7 @@ function NavigationItemMenu({
8865
9139
  },
8866
9140
  [cancelClose, setOpen]
8867
9141
  );
8868
- return /* @__PURE__ */ jsx47(NavigationItemMenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx47(Popover, { open, onOpenChange: handleOpenChange, children }) });
9142
+ return /* @__PURE__ */ jsx49(NavigationItemMenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx49(Popover, { open, onOpenChange: handleOpenChange, children }) });
8869
9143
  }
8870
9144
  var NavigationItemMenuTrigger = forwardRef35(
8871
9145
  ({
@@ -8879,7 +9153,7 @@ var NavigationItemMenuTrigger = forwardRef35(
8879
9153
  const menu = useNavigationItemMenuContext("NavigationItemMenuTrigger");
8880
9154
  const isActive = active ?? menu.hasSelection;
8881
9155
  const mode = navigationItemButtonMode(isActive);
8882
- return /* @__PURE__ */ jsx47(
9156
+ return /* @__PURE__ */ jsx49(
8883
9157
  "span",
8884
9158
  {
8885
9159
  className: cn("aviala-navigation-item", className),
@@ -8887,7 +9161,7 @@ var NavigationItemMenuTrigger = forwardRef35(
8887
9161
  "data-active": isActive ? "true" : "false",
8888
9162
  onMouseEnter: () => menu.openMenu(true),
8889
9163
  onMouseLeave: menu.scheduleClose,
8890
- children: /* @__PURE__ */ jsx47(PopoverPrimitive7.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs37(
9164
+ children: /* @__PURE__ */ jsx49(PopoverPrimitive7.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs39(
8891
9165
  "button",
8892
9166
  {
8893
9167
  ref,
@@ -8900,7 +9174,7 @@ var NavigationItemMenuTrigger = forwardRef35(
8900
9174
  ...props,
8901
9175
  children: [
8902
9176
  renderItemIcon3(leftIcon),
8903
- /* @__PURE__ */ jsx47(
9177
+ /* @__PURE__ */ jsx49(
8904
9178
  Typography,
8905
9179
  {
8906
9180
  level: "text",
@@ -8909,7 +9183,7 @@ var NavigationItemMenuTrigger = forwardRef35(
8909
9183
  children
8910
9184
  }
8911
9185
  ),
8912
- rightIcon ? /* @__PURE__ */ jsx47("span", { className: "aviala-navigation-item__chevron", children: renderItemIcon3(rightIcon) }) : null
9186
+ rightIcon ? /* @__PURE__ */ jsx49("span", { className: "aviala-navigation-item__chevron", children: renderItemIcon3(rightIcon) }) : null
8913
9187
  ]
8914
9188
  }
8915
9189
  ) })
@@ -8930,7 +9204,7 @@ var NavigationItemMenuContent = forwardRef35(
8930
9204
  }, ref) => {
8931
9205
  const direction = useNavigationDirection();
8932
9206
  const menu = useNavigationItemMenuContext("NavigationItemMenuContent");
8933
- return /* @__PURE__ */ jsx47(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ jsx47(
9207
+ return /* @__PURE__ */ jsx49(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ jsx49(
8934
9208
  PopoverPrimitive7.Content,
8935
9209
  {
8936
9210
  ref,
@@ -8965,7 +9239,7 @@ var NavigationItemMenuItem = forwardRef35(
8965
9239
  }, ref) => {
8966
9240
  const menu = useNavigationItemMenuContext("NavigationItemMenuItem");
8967
9241
  const isSelected = selected ?? menu.value === value;
8968
- return /* @__PURE__ */ jsxs37(
9242
+ return /* @__PURE__ */ jsxs39(
8969
9243
  "button",
8970
9244
  {
8971
9245
  ref,
@@ -8985,7 +9259,7 @@ var NavigationItemMenuItem = forwardRef35(
8985
9259
  ...props,
8986
9260
  children: [
8987
9261
  renderItemIcon3(leftIcon),
8988
- /* @__PURE__ */ jsx47(
9262
+ /* @__PURE__ */ jsx49(
8989
9263
  Typography,
8990
9264
  {
8991
9265
  level: "text",
@@ -8994,7 +9268,7 @@ var NavigationItemMenuItem = forwardRef35(
8994
9268
  children
8995
9269
  }
8996
9270
  ),
8997
- rightIcon ? /* @__PURE__ */ jsx47("span", { className: "aviala-navigation-menu-item__trailing", children: renderItemIcon3(rightIcon) }) : null
9271
+ rightIcon ? /* @__PURE__ */ jsx49("span", { className: "aviala-navigation-menu-item__trailing", children: renderItemIcon3(rightIcon) }) : null
8998
9272
  ]
8999
9273
  }
9000
9274
  );
@@ -9006,7 +9280,7 @@ NavigationItemMenuItem.displayName = "NavigationItemMenuItem";
9006
9280
  import * as SliderPrimitive from "@radix-ui/react-slider";
9007
9281
  import { cva as cva13 } from "class-variance-authority";
9008
9282
  import { forwardRef as forwardRef36 } from "react";
9009
- import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
9283
+ import { jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
9010
9284
  var sliderVariants = cva13("aviala-slider", {
9011
9285
  variants: {
9012
9286
  size: {
@@ -9040,7 +9314,7 @@ var Slider = forwardRef36(
9040
9314
  const isRange = resolvedType === "range";
9041
9315
  const resolvedDefaultValue = defaultValue ?? (isRange ? [25, 75] : [50]);
9042
9316
  const thumbCount = isRange ? Math.max(2, value?.length ?? defaultValue?.length ?? 2) : 1;
9043
- return /* @__PURE__ */ jsxs38(
9317
+ return /* @__PURE__ */ jsxs40(
9044
9318
  SliderPrimitive.Root,
9045
9319
  {
9046
9320
  ref,
@@ -9058,8 +9332,8 @@ var Slider = forwardRef36(
9058
9332
  "data-disabled": disabled ? "true" : void 0,
9059
9333
  ...props,
9060
9334
  children: [
9061
- /* @__PURE__ */ jsx48(SliderPrimitive.Track, { className: "aviala-slider__track", children: /* @__PURE__ */ jsx48(SliderPrimitive.Range, { className: "aviala-slider__range" }) }),
9062
- Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ jsx48(SliderPrimitive.Thumb, { className: "aviala-slider__thumb aviala-focus-ring" }, index))
9335
+ /* @__PURE__ */ jsx50(SliderPrimitive.Track, { className: "aviala-slider__track", children: /* @__PURE__ */ jsx50(SliderPrimitive.Range, { className: "aviala-slider__range" }) }),
9336
+ Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ jsx50(SliderPrimitive.Thumb, { className: "aviala-slider__thumb aviala-focus-ring" }, index))
9063
9337
  ]
9064
9338
  }
9065
9339
  );
@@ -9073,9 +9347,9 @@ import { cva as cva14 } from "class-variance-authority";
9073
9347
  import {
9074
9348
  forwardRef as forwardRef37,
9075
9349
  useRef as useRef13,
9076
- useState as useState15
9350
+ useState as useState17
9077
9351
  } from "react";
9078
- import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
9352
+ import { jsx as jsx51, jsxs as jsxs41 } from "react/jsx-runtime";
9079
9353
  var uploadVariants = cva14("aviala-upload aviala-focus-ring", {
9080
9354
  variants: {
9081
9355
  style: {
@@ -9106,7 +9380,7 @@ var Upload = forwardRef37(
9106
9380
  ...props
9107
9381
  }, ref) => {
9108
9382
  const inputRef = useRef13(null);
9109
- const [dragging, setDragging] = useState15(false);
9383
+ const [dragging, setDragging] = useState17(false);
9110
9384
  const resolvedStyle = style ?? "default";
9111
9385
  const allowDrag = dragAndDrop ?? resolvedStyle === "large";
9112
9386
  const openPicker = () => {
@@ -9125,7 +9399,7 @@ var Upload = forwardRef37(
9125
9399
  onChange?.(event.dataTransfer.files);
9126
9400
  }
9127
9401
  };
9128
- return /* @__PURE__ */ jsxs39(
9402
+ return /* @__PURE__ */ jsxs41(
9129
9403
  "div",
9130
9404
  {
9131
9405
  ref,
@@ -9156,7 +9430,7 @@ var Upload = forwardRef37(
9156
9430
  onDrop: handleDrop,
9157
9431
  ...props,
9158
9432
  children: [
9159
- /* @__PURE__ */ jsx49(
9433
+ /* @__PURE__ */ jsx51(
9160
9434
  "input",
9161
9435
  {
9162
9436
  ref: inputRef,
@@ -9171,8 +9445,8 @@ var Upload = forwardRef37(
9171
9445
  ...inputProps
9172
9446
  }
9173
9447
  ),
9174
- /* @__PURE__ */ jsx49("span", { className: "aviala-upload__icon", "aria-hidden": true, children: /* @__PURE__ */ jsx49(GeneralUpload, { width: 16, height: 16 }) }),
9175
- resolvedStyle === "large" ? /* @__PURE__ */ jsx49(
9448
+ /* @__PURE__ */ jsx51("span", { className: "aviala-upload__icon", "aria-hidden": true, children: /* @__PURE__ */ jsx51(GeneralUpload, { width: 16, height: 16 }) }),
9449
+ resolvedStyle === "large" ? /* @__PURE__ */ jsx51(
9176
9450
  Typeface,
9177
9451
  {
9178
9452
  className: "aviala-upload__typeface",
@@ -9180,7 +9454,7 @@ var Upload = forwardRef37(
9180
9454
  primary: title,
9181
9455
  secondary: description
9182
9456
  }
9183
- ) : /* @__PURE__ */ jsx49(Typography, { level: "text", as: "span", className: "aviala-upload__label", children: label })
9457
+ ) : /* @__PURE__ */ jsx51(Typography, { level: "text", as: "span", className: "aviala-upload__label", children: label })
9184
9458
  ]
9185
9459
  }
9186
9460
  );
@@ -9190,14 +9464,14 @@ Upload.displayName = "Upload";
9190
9464
 
9191
9465
  // src/components/scroll-picker.tsx
9192
9466
  import {
9193
- useCallback as useCallback16,
9194
- useEffect as useEffect11,
9467
+ useCallback as useCallback17,
9468
+ useEffect as useEffect12,
9195
9469
  useId as useId5,
9196
9470
  useLayoutEffect as useLayoutEffect7,
9197
- useMemo as useMemo10,
9471
+ useMemo as useMemo11,
9198
9472
  useRef as useRef14
9199
9473
  } from "react";
9200
- import { jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
9474
+ import { jsx as jsx52, jsxs as jsxs42 } from "react/jsx-runtime";
9201
9475
  var LOOP_SECTIONS2 = 3;
9202
9476
  var MIDDLE_SECTION2 = 1;
9203
9477
  function normalizeIndex2(index, length) {
@@ -9225,7 +9499,7 @@ function fractionalIndexAtScrollTop(metrics, scrollTop) {
9225
9499
  return (scrollTop - metrics.originTop) / metrics.pitch;
9226
9500
  }
9227
9501
  function ScrollPicker({ className, children, ...props }) {
9228
- return /* @__PURE__ */ jsx50("div", { className: cn("aviala-scroll-picker", className), ...props, children });
9502
+ return /* @__PURE__ */ jsx52("div", { className: cn("aviala-scroll-picker", className), ...props, children });
9229
9503
  }
9230
9504
  function ScrollPickerColumn({
9231
9505
  className,
@@ -9246,18 +9520,18 @@ function ScrollPickerColumn({
9246
9520
  const selectedValueRef = useRef14(value);
9247
9521
  const reactId = useId5();
9248
9522
  selectedValueRef.current = value;
9249
- const getIndex = useCallback16(
9523
+ const getIndex = useCallback17(
9250
9524
  (candidate) => {
9251
9525
  const index = values.findIndex((item) => Object.is(item, candidate));
9252
9526
  return index >= 0 ? index : 0;
9253
9527
  },
9254
9528
  [values]
9255
9529
  );
9256
- const repeatedValues = useMemo10(() => {
9530
+ const repeatedValues = useMemo11(() => {
9257
9531
  if (!loop) return [...values];
9258
9532
  return Array.from({ length: LOOP_SECTIONS2 }, () => values).flat();
9259
9533
  }, [loop, values]);
9260
- const scrollToIndex = useCallback16((index, behavior = "auto") => {
9534
+ const scrollToIndex = useCallback17((index, behavior = "auto") => {
9261
9535
  const container = scrollRef.current;
9262
9536
  if (!container) return;
9263
9537
  const metrics = readMetrics(container);
@@ -9265,7 +9539,7 @@ function ScrollPickerColumn({
9265
9539
  isProgrammaticScrollRef.current = true;
9266
9540
  container.scrollTo({ top: scrollTopForIndex(container, metrics, index), behavior });
9267
9541
  }, []);
9268
- const scrollToValue = useCallback16(
9542
+ const scrollToValue = useCallback17(
9269
9543
  (nextValue, behavior = "smooth") => {
9270
9544
  if (behavior === "smooth") {
9271
9545
  smoothTargetValueRef.current = nextValue;
@@ -9278,7 +9552,7 @@ function ScrollPickerColumn({
9278
9552
  },
9279
9553
  [getIndex, loop, scrollToIndex, values.length]
9280
9554
  );
9281
- const settleScroll = useCallback16(() => {
9555
+ const settleScroll = useCallback17(() => {
9282
9556
  const container = scrollRef.current;
9283
9557
  if (!container || isProgrammaticScrollRef.current) {
9284
9558
  isProgrammaticScrollRef.current = false;
@@ -9324,7 +9598,7 @@ function ScrollPickerColumn({
9324
9598
  isUserScrollingRef.current = false;
9325
9599
  wheelAccumRef.current = 0;
9326
9600
  }, [loop, onChange, values]);
9327
- const handleScroll = useCallback16(() => {
9601
+ const handleScroll = useCallback17(() => {
9328
9602
  if (isProgrammaticScrollRef.current) return;
9329
9603
  isUserScrollingRef.current = true;
9330
9604
  if (scrollEndTimerRef.current) {
@@ -9347,7 +9621,7 @@ function ScrollPickerColumn({
9347
9621
  if (Math.abs(container.scrollTop - targetTop) <= 1) return;
9348
9622
  scrollToIndex(targetIndex, "auto");
9349
9623
  }, [getIndex, loop, scrollToIndex, value, values.length]);
9350
- useEffect11(() => {
9624
+ useEffect12(() => {
9351
9625
  const container = scrollRef.current;
9352
9626
  if (!container) return;
9353
9627
  const onScrollEnd = () => {
@@ -9364,7 +9638,7 @@ function ScrollPickerColumn({
9364
9638
  }
9365
9639
  };
9366
9640
  }, [settleScroll]);
9367
- useEffect11(() => {
9641
+ useEffect12(() => {
9368
9642
  const container = scrollRef.current;
9369
9643
  if (!container) return;
9370
9644
  const onWheel = (event) => {
@@ -9422,9 +9696,9 @@ function ScrollPickerColumn({
9422
9696
  }
9423
9697
  };
9424
9698
  const selectedOptionId = `${reactId}-${getIndex(value)}`;
9425
- return /* @__PURE__ */ jsx50("div", { className: cn("aviala-scroll-picker-column", className), children: /* @__PURE__ */ jsxs40("div", { className: "aviala-scroll-picker-column__viewport", children: [
9426
- /* @__PURE__ */ jsx50("div", { className: "aviala-scroll-picker-column__highlight", "aria-hidden": true }),
9427
- /* @__PURE__ */ jsx50(
9699
+ return /* @__PURE__ */ jsx52("div", { className: cn("aviala-scroll-picker-column", className), children: /* @__PURE__ */ jsxs42("div", { className: "aviala-scroll-picker-column__viewport", children: [
9700
+ /* @__PURE__ */ jsx52("div", { className: "aviala-scroll-picker-column__highlight", "aria-hidden": true }),
9701
+ /* @__PURE__ */ jsx52(
9428
9702
  "div",
9429
9703
  {
9430
9704
  ref: scrollRef,
@@ -9435,12 +9709,12 @@ function ScrollPickerColumn({
9435
9709
  "aria-activedescendant": selectedOptionId,
9436
9710
  tabIndex: 0,
9437
9711
  onKeyDown: handleKeyDown,
9438
- children: /* @__PURE__ */ jsx50("ul", { className: "aviala-scroll-picker-column__list", children: repeatedValues.map((itemValue, index) => {
9712
+ children: /* @__PURE__ */ jsx52("ul", { className: "aviala-scroll-picker-column__list", children: repeatedValues.map((itemValue, index) => {
9439
9713
  const isSelected = Object.is(itemValue, value);
9440
9714
  const valueIndex = loop ? normalizeIndex2(index, values.length) : index;
9441
9715
  const optionId = `${reactId}-${loop ? index : valueIndex}`;
9442
9716
  const key = getValueKey?.(itemValue, index) ?? `${String(itemValue)}-${index}`;
9443
- return /* @__PURE__ */ jsx50("li", { className: "contents", children: /* @__PURE__ */ jsx50(
9717
+ return /* @__PURE__ */ jsx52("li", { className: "contents", children: /* @__PURE__ */ jsx52(
9444
9718
  ScrollPickerItem,
9445
9719
  {
9446
9720
  id: isSelected ? selectedOptionId : optionId,
@@ -9466,7 +9740,7 @@ function ScrollPickerItem({
9466
9740
  className,
9467
9741
  onSelect
9468
9742
  }) {
9469
- return /* @__PURE__ */ jsx50(
9743
+ return /* @__PURE__ */ jsx52(
9470
9744
  "button",
9471
9745
  {
9472
9746
  type: "button",
@@ -9492,11 +9766,11 @@ import { cva as cva15 } from "class-variance-authority";
9492
9766
  import {
9493
9767
  createContext as createContext9,
9494
9768
  forwardRef as forwardRef38,
9495
- useCallback as useCallback17,
9769
+ useCallback as useCallback18,
9496
9770
  useContext as useContext9,
9497
- useState as useState16
9771
+ useState as useState18
9498
9772
  } from "react";
9499
- import { Fragment as Fragment8, jsx as jsx51, jsxs as jsxs41 } from "react/jsx-runtime";
9773
+ import { Fragment as Fragment8, jsx as jsx53, jsxs as jsxs43 } from "react/jsx-runtime";
9500
9774
  var BreadcrumbSizeContext = createContext9("default");
9501
9775
  function breadcrumbTypeLevel(size) {
9502
9776
  return size === "small" ? "caption" : "text";
@@ -9515,7 +9789,7 @@ var breadcrumbVariants = cva15("aviala-breadcrumb", {
9515
9789
  var Breadcrumb = forwardRef38(
9516
9790
  ({ className, size = "default", children, ...props }, ref) => {
9517
9791
  const resolvedSize = size ?? "default";
9518
- return /* @__PURE__ */ jsx51(BreadcrumbSizeContext.Provider, { value: resolvedSize, children: /* @__PURE__ */ jsx51(
9792
+ return /* @__PURE__ */ jsx53(BreadcrumbSizeContext.Provider, { value: resolvedSize, children: /* @__PURE__ */ jsx53(
9519
9793
  "nav",
9520
9794
  {
9521
9795
  ref,
@@ -9523,7 +9797,7 @@ var Breadcrumb = forwardRef38(
9523
9797
  className: cn(breadcrumbVariants({ size: resolvedSize }), className),
9524
9798
  "data-size": resolvedSize,
9525
9799
  ...props,
9526
- children: /* @__PURE__ */ jsx51("ol", { className: "aviala-breadcrumb__list", children })
9800
+ children: /* @__PURE__ */ jsx53("ol", { className: "aviala-breadcrumb__list", children })
9527
9801
  }
9528
9802
  ) });
9529
9803
  }
@@ -9532,9 +9806,9 @@ Breadcrumb.displayName = "Breadcrumb";
9532
9806
  var BreadcrumbItem = forwardRef38(
9533
9807
  ({ className, href, current = false, icon, onClick, children, ...props }, ref) => {
9534
9808
  const size = useContext9(BreadcrumbSizeContext);
9535
- const label = /* @__PURE__ */ jsxs41(Fragment8, { children: [
9536
- icon ? /* @__PURE__ */ jsx51("span", { className: "aviala-breadcrumb-item__icon", children: icon }) : null,
9537
- children != null ? /* @__PURE__ */ jsx51(
9809
+ const label = /* @__PURE__ */ jsxs43(Fragment8, { children: [
9810
+ icon ? /* @__PURE__ */ jsx53("span", { className: "aviala-breadcrumb-item__icon", children: icon }) : null,
9811
+ children != null ? /* @__PURE__ */ jsx53(
9538
9812
  Typography,
9539
9813
  {
9540
9814
  level: breadcrumbTypeLevel(size),
@@ -9544,13 +9818,13 @@ var BreadcrumbItem = forwardRef38(
9544
9818
  }
9545
9819
  ) : null
9546
9820
  ] });
9547
- return /* @__PURE__ */ jsx51(
9821
+ return /* @__PURE__ */ jsx53(
9548
9822
  "li",
9549
9823
  {
9550
9824
  ref,
9551
9825
  className: cn("aviala-breadcrumb-item-wrap", className),
9552
9826
  ...props,
9553
- children: href != null ? /* @__PURE__ */ jsx51(
9827
+ children: href != null ? /* @__PURE__ */ jsx53(
9554
9828
  "a",
9555
9829
  {
9556
9830
  href,
@@ -9559,7 +9833,7 @@ var BreadcrumbItem = forwardRef38(
9559
9833
  "aria-current": current ? "page" : void 0,
9560
9834
  children: label
9561
9835
  }
9562
- ) : onClick != null ? /* @__PURE__ */ jsx51(
9836
+ ) : onClick != null ? /* @__PURE__ */ jsx53(
9563
9837
  "button",
9564
9838
  {
9565
9839
  type: "button",
@@ -9569,7 +9843,7 @@ var BreadcrumbItem = forwardRef38(
9569
9843
  onClick,
9570
9844
  children: label
9571
9845
  }
9572
- ) : /* @__PURE__ */ jsx51(
9846
+ ) : /* @__PURE__ */ jsx53(
9573
9847
  "span",
9574
9848
  {
9575
9849
  className: "aviala-breadcrumb-item",
@@ -9586,7 +9860,7 @@ BreadcrumbItem.displayName = "BreadcrumbItem";
9586
9860
  var BreadcrumbSeparator = forwardRef38(
9587
9861
  ({ className, children = "/", ...props }, ref) => {
9588
9862
  const size = useContext9(BreadcrumbSizeContext);
9589
- return /* @__PURE__ */ jsx51(
9863
+ return /* @__PURE__ */ jsx53(
9590
9864
  "li",
9591
9865
  {
9592
9866
  ref,
@@ -9594,7 +9868,7 @@ var BreadcrumbSeparator = forwardRef38(
9594
9868
  "aria-hidden": true,
9595
9869
  className: cn("aviala-breadcrumb-separator", className),
9596
9870
  ...props,
9597
- children: /* @__PURE__ */ jsx51(Typography, { level: breadcrumbTypeLevel(size), as: "span", children })
9871
+ children: /* @__PURE__ */ jsx53(Typography, { level: breadcrumbTypeLevel(size), as: "span", children })
9598
9872
  }
9599
9873
  );
9600
9874
  }
@@ -9609,12 +9883,12 @@ var BreadcrumbEllipsisItem = forwardRef38(
9609
9883
  children,
9610
9884
  ...props
9611
9885
  }, ref) => {
9612
- const content = /* @__PURE__ */ jsxs41(Fragment8, { children: [
9613
- /* @__PURE__ */ jsx51(Typography, { level: "text", as: "span", className: "aviala-breadcrumb-ellipsis-item__label", children }),
9614
- showChevron ? /* @__PURE__ */ jsx51("span", { className: "aviala-breadcrumb-ellipsis-item__chevron", "aria-hidden": true, children: /* @__PURE__ */ jsx51(DirectionArrowRightLight3, { width: 14, height: 14, thickness: "Light" }) }) : null
9886
+ const content = /* @__PURE__ */ jsxs43(Fragment8, { children: [
9887
+ /* @__PURE__ */ jsx53(Typography, { level: "text", as: "span", className: "aviala-breadcrumb-ellipsis-item__label", children }),
9888
+ showChevron ? /* @__PURE__ */ jsx53("span", { className: "aviala-breadcrumb-ellipsis-item__chevron", "aria-hidden": true, children: /* @__PURE__ */ jsx53(DirectionArrowRightLight3, { width: 14, height: 14, thickness: "Light" }) }) : null
9615
9889
  ] });
9616
9890
  if (href != null) {
9617
- return /* @__PURE__ */ jsx51(
9891
+ return /* @__PURE__ */ jsx53(
9618
9892
  "a",
9619
9893
  {
9620
9894
  ref,
@@ -9626,7 +9900,7 @@ var BreadcrumbEllipsisItem = forwardRef38(
9626
9900
  }
9627
9901
  );
9628
9902
  }
9629
- return /* @__PURE__ */ jsx51(
9903
+ return /* @__PURE__ */ jsx53(
9630
9904
  "button",
9631
9905
  {
9632
9906
  ref,
@@ -9653,10 +9927,10 @@ var BreadcrumbEllipsis = forwardRef38(
9653
9927
  ...props
9654
9928
  }, ref) => {
9655
9929
  const size = useContext9(BreadcrumbSizeContext);
9656
- const [uncontrolledActivated, setUncontrolledActivated] = useState16(defaultActivated);
9930
+ const [uncontrolledActivated, setUncontrolledActivated] = useState18(defaultActivated);
9657
9931
  const isControlled = activatedProp !== void 0;
9658
9932
  const activated = isControlled ? Boolean(activatedProp) : uncontrolledActivated;
9659
- const setActivated = useCallback17(
9933
+ const setActivated = useCallback18(
9660
9934
  (next) => {
9661
9935
  if (!isControlled) setUncontrolledActivated(next);
9662
9936
  onActivatedChange?.(next);
@@ -9664,8 +9938,8 @@ var BreadcrumbEllipsis = forwardRef38(
9664
9938
  [isControlled, onActivatedChange]
9665
9939
  );
9666
9940
  const iconSize = 14;
9667
- const icon = children ?? /* @__PURE__ */ jsx51(SymbolMore, { width: iconSize, height: iconSize, thickness: "Light", "aria-hidden": true });
9668
- const trigger = /* @__PURE__ */ jsx51(
9941
+ const icon = children ?? /* @__PURE__ */ jsx53(SymbolMore, { width: iconSize, height: iconSize, thickness: "Light", "aria-hidden": true });
9942
+ const trigger = /* @__PURE__ */ jsx53(
9669
9943
  "button",
9670
9944
  {
9671
9945
  type: "button",
@@ -9684,9 +9958,9 @@ var BreadcrumbEllipsis = forwardRef38(
9684
9958
  children: icon
9685
9959
  }
9686
9960
  );
9687
- return /* @__PURE__ */ jsx51("li", { ref, className: cn("aviala-breadcrumb-ellipsis-wrap", className), children: menu != null ? /* @__PURE__ */ jsxs41(Popover, { open: activated, onOpenChange: setActivated, children: [
9688
- /* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: trigger }),
9689
- /* @__PURE__ */ jsx51(
9961
+ return /* @__PURE__ */ jsx53("li", { ref, className: cn("aviala-breadcrumb-ellipsis-wrap", className), children: menu != null ? /* @__PURE__ */ jsxs43(Popover, { open: activated, onOpenChange: setActivated, children: [
9962
+ /* @__PURE__ */ jsx53(PopoverTrigger, { asChild: true, children: trigger }),
9963
+ /* @__PURE__ */ jsx53(
9690
9964
  PopoverContent,
9691
9965
  {
9692
9966
  className: "aviala-breadcrumb-ellipsis-menu",
@@ -9695,7 +9969,7 @@ var BreadcrumbEllipsis = forwardRef38(
9695
9969
  sideOffset: 7,
9696
9970
  showArrow: false,
9697
9971
  role: "menu",
9698
- children: /* @__PURE__ */ jsx51("div", { className: "aviala-breadcrumb-ellipsis-menu__items", children: menu })
9972
+ children: /* @__PURE__ */ jsx53("div", { className: "aviala-breadcrumb-ellipsis-menu__items", children: menu })
9699
9973
  }
9700
9974
  )
9701
9975
  ] }) : trigger });
@@ -9707,7 +9981,7 @@ BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
9707
9981
  import {
9708
9982
  forwardRef as forwardRef39
9709
9983
  } from "react";
9710
- import { jsx as jsx52, jsxs as jsxs42 } from "react/jsx-runtime";
9984
+ import { jsx as jsx54, jsxs as jsxs44 } from "react/jsx-runtime";
9711
9985
  var Pagehead = forwardRef39(
9712
9986
  ({
9713
9987
  className,
@@ -9718,16 +9992,16 @@ var Pagehead = forwardRef39(
9718
9992
  actions,
9719
9993
  children,
9720
9994
  ...props
9721
- }, ref) => /* @__PURE__ */ jsxs42("header", { ref, className: cn("aviala-pagehead", className), ...props, children: [
9722
- /* @__PURE__ */ jsxs42("div", { className: "aviala-pagehead__main", children: [
9723
- back != null ? /* @__PURE__ */ jsx52("div", { className: "aviala-pagehead__back", children: back }) : null,
9724
- /* @__PURE__ */ jsxs42("div", { className: "aviala-pagehead__title-block", children: [
9725
- breadcrumb != null ? /* @__PURE__ */ jsx52("div", { className: "aviala-pagehead__breadcrumb", children: breadcrumb }) : null,
9726
- title != null || description != null ? /* @__PURE__ */ jsx52("div", { className: "aviala-pagehead__title", children: /* @__PURE__ */ jsx52(Typeface, { content: "textCaption", primary: title, secondary: description }) }) : null,
9995
+ }, ref) => /* @__PURE__ */ jsxs44("header", { ref, className: cn("aviala-pagehead", className), ...props, children: [
9996
+ /* @__PURE__ */ jsxs44("div", { className: "aviala-pagehead__main", children: [
9997
+ back != null ? /* @__PURE__ */ jsx54("div", { className: "aviala-pagehead__back", children: back }) : null,
9998
+ /* @__PURE__ */ jsxs44("div", { className: "aviala-pagehead__title-block", children: [
9999
+ breadcrumb != null ? /* @__PURE__ */ jsx54("div", { className: "aviala-pagehead__breadcrumb", children: breadcrumb }) : null,
10000
+ title != null || description != null ? /* @__PURE__ */ jsx54("div", { className: "aviala-pagehead__title", children: /* @__PURE__ */ jsx54(Typeface, { content: "textCaption", primary: title, secondary: description }) }) : null,
9727
10001
  children
9728
10002
  ] })
9729
10003
  ] }),
9730
- actions != null ? /* @__PURE__ */ jsx52("div", { className: "aviala-pagehead__actions", children: actions }) : null
10004
+ actions != null ? /* @__PURE__ */ jsx54("div", { className: "aviala-pagehead__actions", children: actions }) : null
9731
10005
  ] })
9732
10006
  );
9733
10007
  Pagehead.displayName = "Pagehead";
@@ -9742,7 +10016,7 @@ import { cva as cva16 } from "class-variance-authority";
9742
10016
  import {
9743
10017
  forwardRef as forwardRef40
9744
10018
  } from "react";
9745
- import { jsx as jsx53, jsxs as jsxs43 } from "react/jsx-runtime";
10019
+ import { jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
9746
10020
  var stepsVariants = cva16("aviala-steps", {
9747
10021
  variants: {
9748
10022
  direction: {
@@ -9755,7 +10029,7 @@ var stepsVariants = cva16("aviala-steps", {
9755
10029
  }
9756
10030
  });
9757
10031
  var Steps = forwardRef40(
9758
- ({ className, direction = "horizontal", children, ...props }, ref) => /* @__PURE__ */ jsx53(
10032
+ ({ className, direction = "horizontal", children, ...props }, ref) => /* @__PURE__ */ jsx55(
9759
10033
  "div",
9760
10034
  {
9761
10035
  ref,
@@ -9770,20 +10044,20 @@ Steps.displayName = "Steps";
9770
10044
  function defaultStepsIconContent(state, index) {
9771
10045
  switch (state) {
9772
10046
  case "done":
9773
- return /* @__PURE__ */ jsx53(SymbolRight4, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
10047
+ return /* @__PURE__ */ jsx55(SymbolRight4, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
9774
10048
  case "fail":
9775
- return /* @__PURE__ */ jsx53(SymbolWrong5, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
10049
+ return /* @__PURE__ */ jsx55(SymbolWrong5, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
9776
10050
  case "warning":
9777
- return /* @__PURE__ */ jsx53(SymbolWarning, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
10051
+ return /* @__PURE__ */ jsx55(SymbolWarning, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
9778
10052
  case "waiting":
9779
10053
  case "inProgress":
9780
10054
  case "default":
9781
10055
  default:
9782
- return index != null ? /* @__PURE__ */ jsx53(Typography, { level: "caption", as: "span", className: "aviala-steps-icon__index", children: index }) : null;
10056
+ return index != null ? /* @__PURE__ */ jsx55(Typography, { level: "caption", as: "span", className: "aviala-steps-icon__index", children: index }) : null;
9783
10057
  }
9784
10058
  }
9785
10059
  var StepsIcon = forwardRef40(
9786
- ({ className, state = "default", index, children, ...props }, ref) => /* @__PURE__ */ jsx53(
10060
+ ({ className, state = "default", index, children, ...props }, ref) => /* @__PURE__ */ jsx55(
9787
10061
  "span",
9788
10062
  {
9789
10063
  ref,
@@ -9805,7 +10079,7 @@ var StepsItem = forwardRef40(
9805
10079
  icon,
9806
10080
  children,
9807
10081
  ...props
9808
- }, ref) => /* @__PURE__ */ jsxs43(
10082
+ }, ref) => /* @__PURE__ */ jsxs45(
9809
10083
  "div",
9810
10084
  {
9811
10085
  ref,
@@ -9813,9 +10087,9 @@ var StepsItem = forwardRef40(
9813
10087
  "data-state": state,
9814
10088
  ...props,
9815
10089
  children: [
9816
- icon ?? /* @__PURE__ */ jsx53(StepsIcon, { state, index }),
9817
- /* @__PURE__ */ jsxs43("div", { className: "aviala-steps-item__body", children: [
9818
- title != null ? /* @__PURE__ */ jsx53(
10090
+ icon ?? /* @__PURE__ */ jsx55(StepsIcon, { state, index }),
10091
+ /* @__PURE__ */ jsxs45("div", { className: "aviala-steps-item__body", children: [
10092
+ title != null ? /* @__PURE__ */ jsx55(
9819
10093
  Typography,
9820
10094
  {
9821
10095
  level: "subtitle",
@@ -9824,7 +10098,7 @@ var StepsItem = forwardRef40(
9824
10098
  children: title
9825
10099
  }
9826
10100
  ) : null,
9827
- description != null ? /* @__PURE__ */ jsx53(
10101
+ description != null ? /* @__PURE__ */ jsx55(
9828
10102
  Typography,
9829
10103
  {
9830
10104
  level: "text",
@@ -9848,9 +10122,9 @@ import {
9848
10122
  } from "@aviala-design/icons";
9849
10123
  import {
9850
10124
  forwardRef as forwardRef41,
9851
- useState as useState17
10125
+ useState as useState19
9852
10126
  } from "react";
9853
- import { jsx as jsx54, jsxs as jsxs44 } from "react/jsx-runtime";
10127
+ import { jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
9854
10128
  function buildPageList(page, pageCount) {
9855
10129
  if (pageCount <= 7) {
9856
10130
  return Array.from({ length: pageCount }, (_, index) => index + 1);
@@ -9873,6 +10147,16 @@ function buildPageList(page, pageCount) {
9873
10147
  }
9874
10148
  return result;
9875
10149
  }
10150
+ function ellipsisRange(pages, index) {
10151
+ const prev = pages[index - 1];
10152
+ const next = pages[index + 1];
10153
+ if (typeof prev !== "number" || typeof next !== "number") return [];
10154
+ const start = prev + 1;
10155
+ const end = next - 1;
10156
+ const range = [];
10157
+ for (let p = start; p <= end; p += 1) range.push(p);
10158
+ return range;
10159
+ }
9876
10160
  var Pagination = forwardRef41(
9877
10161
  ({
9878
10162
  className,
@@ -9891,9 +10175,10 @@ var Pagination = forwardRef41(
9891
10175
  sizeOptionLabel = (size) => `${size} \u9879`,
9892
10176
  ...props
9893
10177
  }, ref) => {
9894
- const [uncontrolledPage, setUncontrolledPage] = useState17(defaultPage);
9895
- const [uncontrolledPageSize, setUncontrolledPageSize] = useState17(defaultPageSize);
9896
- const [jumpValue, setJumpValue] = useState17("");
10178
+ const [uncontrolledPage, setUncontrolledPage] = useState19(defaultPage);
10179
+ const [uncontrolledPageSize, setUncontrolledPageSize] = useState19(defaultPageSize);
10180
+ const [jumpValue, setJumpValue] = useState19("");
10181
+ const [openEllipsis, setOpenEllipsis] = useState19(null);
9897
10182
  const page = pageProp ?? uncontrolledPage;
9898
10183
  const pageSize = pageSizeProp ?? uncontrolledPageSize;
9899
10184
  const safePageCount = Math.max(1, pageCount);
@@ -9914,7 +10199,7 @@ var Pagination = forwardRef41(
9914
10199
  setPage(parsed);
9915
10200
  setJumpValue("");
9916
10201
  };
9917
- return /* @__PURE__ */ jsxs44(
10202
+ return /* @__PURE__ */ jsxs46(
9918
10203
  "div",
9919
10204
  {
9920
10205
  ref,
@@ -9923,8 +10208,8 @@ var Pagination = forwardRef41(
9923
10208
  "aria-label": props["aria-label"] ?? "Pagination",
9924
10209
  ...props,
9925
10210
  children: [
9926
- /* @__PURE__ */ jsxs44("div", { className: "aviala-pagination__controls", children: [
9927
- /* @__PURE__ */ jsx54(
10211
+ /* @__PURE__ */ jsxs46("div", { className: "aviala-pagination__controls", children: [
10212
+ /* @__PURE__ */ jsx56(
9928
10213
  Button,
9929
10214
  {
9930
10215
  mode: "noBackgroundCustom",
@@ -9932,35 +10217,69 @@ var Pagination = forwardRef41(
9932
10217
  iconOnly: true,
9933
10218
  "aria-label": "Previous page",
9934
10219
  disabled: currentPage <= 1,
9935
- leftIcon: /* @__PURE__ */ jsx54(DirectionArrowLeftLight, { "aria-hidden": true }),
10220
+ leftIcon: /* @__PURE__ */ jsx56(DirectionArrowLeftLight, { "aria-hidden": true }),
9936
10221
  onClick: () => setPage(currentPage - 1)
9937
10222
  }
9938
10223
  ),
9939
- /* @__PURE__ */ jsx54("div", { className: "aviala-pagination__pages", children: pages.map(
9940
- (item, index) => item === "ellipsis" ? /* @__PURE__ */ jsx54(
9941
- Typography,
10224
+ /* @__PURE__ */ jsx56("div", { className: "aviala-pagination__pages", children: pages.map(
10225
+ (item, index) => item === "ellipsis" ? /* @__PURE__ */ jsxs46(
10226
+ Popover,
9942
10227
  {
9943
- level: "text",
9944
- as: "span",
9945
- className: "aviala-pagination__page",
9946
- "aria-hidden": true,
9947
- children: "\u2026"
10228
+ open: openEllipsis === index,
10229
+ onOpenChange: (open) => setOpenEllipsis(open ? index : null),
10230
+ children: [
10231
+ /* @__PURE__ */ jsx56(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx56(
10232
+ "button",
10233
+ {
10234
+ type: "button",
10235
+ "data-size": "regular",
10236
+ className: cn(
10237
+ buttonVariants({ mode: "noBackgroundCustom", compact: true }),
10238
+ "aviala-pagination__page--ellipsis"
10239
+ ),
10240
+ "aria-label": "\u66F4\u591A\u9875\u7801",
10241
+ "aria-haspopup": "menu",
10242
+ children: /* @__PURE__ */ jsx56(Typography, { level: "text", as: "span", children: "\u2026" })
10243
+ }
10244
+ ) }),
10245
+ /* @__PURE__ */ jsx56(PopoverContent, { className: "aviala-pagination__ellipsis-content", showArrow: true, flush: true, children: /* @__PURE__ */ jsx56("div", { className: "aviala-pagination__ellipsis-menu", children: ellipsisRange(pages, index).map((p) => /* @__PURE__ */ jsx56(
10246
+ "button",
10247
+ {
10248
+ type: "button",
10249
+ "data-size": "regular",
10250
+ className: cn(
10251
+ buttonVariants({ mode: "noBackgroundCustom", compact: true }),
10252
+ "aviala-pagination__ellipsis-page"
10253
+ ),
10254
+ onClick: () => {
10255
+ setPage(p);
10256
+ setOpenEllipsis(null);
10257
+ },
10258
+ children: /* @__PURE__ */ jsx56(Typography, { level: "text", as: "span", children: p })
10259
+ },
10260
+ p
10261
+ )) }) })
10262
+ ]
9948
10263
  },
9949
10264
  `ellipsis-${index}`
9950
- ) : /* @__PURE__ */ jsx54(
10265
+ ) : /* @__PURE__ */ jsx56(
9951
10266
  "button",
9952
10267
  {
9953
10268
  type: "button",
9954
- className: "aviala-pagination__page aviala-focus-ring",
10269
+ "data-size": "regular",
10270
+ className: cn(
10271
+ buttonVariants({ mode: "noBackgroundCustom", compact: true }),
10272
+ "aviala-pagination__page"
10273
+ ),
9955
10274
  "data-active": item === currentPage ? "true" : void 0,
9956
10275
  "aria-current": item === currentPage ? "page" : void 0,
9957
10276
  onClick: () => setPage(item),
9958
- children: /* @__PURE__ */ jsx54(Typography, { level: "text", as: "span", children: item })
10277
+ children: /* @__PURE__ */ jsx56(Typography, { level: "text", as: "span", children: item })
9959
10278
  },
9960
10279
  item
9961
10280
  )
9962
10281
  ) }),
9963
- /* @__PURE__ */ jsx54(
10282
+ /* @__PURE__ */ jsx56(
9964
10283
  Button,
9965
10284
  {
9966
10285
  mode: "noBackgroundCustom",
@@ -9968,14 +10287,14 @@ var Pagination = forwardRef41(
9968
10287
  iconOnly: true,
9969
10288
  "aria-label": "Next page",
9970
10289
  disabled: currentPage >= safePageCount,
9971
- leftIcon: /* @__PURE__ */ jsx54(DirectionArrowRightLight4, { "aria-hidden": true }),
10290
+ leftIcon: /* @__PURE__ */ jsx56(DirectionArrowRightLight4, { "aria-hidden": true }),
9972
10291
  onClick: () => setPage(currentPage + 1)
9973
10292
  }
9974
10293
  )
9975
10294
  ] }),
9976
- showJump ? /* @__PURE__ */ jsxs44("div", { className: "aviala-pagination__jump", children: [
9977
- /* @__PURE__ */ jsx54(Typography, { level: "text", as: "span", children: jumpLabel }),
9978
- /* @__PURE__ */ jsx54(
10295
+ showJump ? /* @__PURE__ */ jsxs46("div", { className: "aviala-pagination__jump", children: [
10296
+ /* @__PURE__ */ jsx56(Typography, { level: "text", as: "span", children: jumpLabel }),
10297
+ /* @__PURE__ */ jsx56(
9979
10298
  Input,
9980
10299
  {
9981
10300
  className: "aviala-pagination__jump-input",
@@ -9995,15 +10314,15 @@ var Pagination = forwardRef41(
9995
10314
  }
9996
10315
  )
9997
10316
  ] }) : null,
9998
- showSizeChanger ? /* @__PURE__ */ jsxs44("div", { className: "aviala-pagination__size", children: [
9999
- /* @__PURE__ */ jsx54(Typography, { level: "text", as: "span", children: sizeLabel }),
10000
- /* @__PURE__ */ jsxs44(
10317
+ showSizeChanger ? /* @__PURE__ */ jsxs46("div", { className: "aviala-pagination__size", children: [
10318
+ /* @__PURE__ */ jsx56(Typography, { level: "text", as: "span", children: sizeLabel }),
10319
+ /* @__PURE__ */ jsxs46(
10001
10320
  Select,
10002
10321
  {
10003
10322
  value: String(pageSize),
10004
10323
  onValueChange: (value) => setPageSize(Number(value)),
10005
10324
  children: [
10006
- /* @__PURE__ */ jsx54(
10325
+ /* @__PURE__ */ jsx56(
10007
10326
  SelectTrigger,
10008
10327
  {
10009
10328
  size: "regular",
@@ -10011,7 +10330,7 @@ var Pagination = forwardRef41(
10011
10330
  "aria-label": "Page size"
10012
10331
  }
10013
10332
  ),
10014
- /* @__PURE__ */ jsx54(SelectContent, { children: /* @__PURE__ */ jsx54(SelectItemGroup, { children: pageSizeOptions.map((option) => /* @__PURE__ */ jsx54(
10333
+ /* @__PURE__ */ jsx56(SelectContent, { children: /* @__PURE__ */ jsx56(SelectItemGroup, { children: pageSizeOptions.map((option) => /* @__PURE__ */ jsx56(
10015
10334
  SelectItem,
10016
10335
  {
10017
10336
  value: String(option),
@@ -10041,9 +10360,9 @@ import {
10041
10360
  forwardRef as forwardRef42,
10042
10361
  isValidElement as isValidElement17
10043
10362
  } from "react";
10044
- import { Fragment as Fragment9, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
10363
+ import { Fragment as Fragment9, jsx as jsx57, jsxs as jsxs47 } from "react/jsx-runtime";
10045
10364
  var Card = forwardRef42(
10046
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx55("div", { ref, className: cn("aviala-card", className), ...props, children })
10365
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx57("div", { ref, className: cn("aviala-card", className), ...props, children })
10047
10366
  );
10048
10367
  Card.displayName = "Card";
10049
10368
  function renderCardIcon(node) {
@@ -10056,7 +10375,7 @@ function renderCardIcon(node) {
10056
10375
  "shrink-0"
10057
10376
  )
10058
10377
  }) : node;
10059
- return /* @__PURE__ */ jsx55("span", { className: "aviala-card-head__icon", children: content });
10378
+ return /* @__PURE__ */ jsx57("span", { className: "aviala-card-head__icon", children: content });
10060
10379
  }
10061
10380
  var CardHead = forwardRef42(
10062
10381
  ({
@@ -10074,38 +10393,38 @@ var CardHead = forwardRef42(
10074
10393
  children,
10075
10394
  ...props
10076
10395
  }, ref) => {
10077
- const primaryAction = action ?? /* @__PURE__ */ jsx55(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ jsx55(GeneralSetting2, { "aria-hidden": true }), children: actionLabel });
10396
+ const primaryAction = action ?? /* @__PURE__ */ jsx57(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ jsx57(GeneralSetting2, { "aria-hidden": true }), children: actionLabel });
10078
10397
  const renderTrailing = () => {
10079
10398
  if (trailing !== void 0) return trailing;
10080
10399
  switch (slotType) {
10081
10400
  case "action":
10082
- return /* @__PURE__ */ jsxs45("div", { className: "aviala-card-head__trailing", children: [
10401
+ return /* @__PURE__ */ jsxs47("div", { className: "aviala-card-head__trailing", children: [
10083
10402
  primaryAction,
10084
- secondaryAction ?? /* @__PURE__ */ jsx55(
10403
+ secondaryAction ?? /* @__PURE__ */ jsx57(
10085
10404
  Button,
10086
10405
  {
10087
10406
  mode: "default",
10088
10407
  size: "regular",
10089
10408
  iconOnly: true,
10090
10409
  "aria-label": "More",
10091
- leftIcon: /* @__PURE__ */ jsx55(GeneralSetting2, { "aria-hidden": true })
10410
+ leftIcon: /* @__PURE__ */ jsx57(GeneralSetting2, { "aria-hidden": true })
10092
10411
  }
10093
10412
  ),
10094
- /* @__PURE__ */ jsx55("span", { className: "aviala-card__divider", "aria-hidden": true }),
10095
- /* @__PURE__ */ jsx55(DirectionArrowRightLight5, { width: 14, height: 14, "aria-hidden": true })
10413
+ /* @__PURE__ */ jsx57("span", { className: "aviala-card__divider", "aria-hidden": true }),
10414
+ /* @__PURE__ */ jsx57(DirectionArrowRightLight5, { width: 14, height: 14, "aria-hidden": true })
10096
10415
  ] });
10097
10416
  case "switch":
10098
- return /* @__PURE__ */ jsxs45("div", { className: "aviala-card-head__trailing", children: [
10417
+ return /* @__PURE__ */ jsxs47("div", { className: "aviala-card-head__trailing", children: [
10099
10418
  primaryAction,
10100
- /* @__PURE__ */ jsx55("span", { className: "aviala-card__divider", "aria-hidden": true }),
10101
- /* @__PURE__ */ jsx55(Switch, { ...switchProps })
10419
+ /* @__PURE__ */ jsx57("span", { className: "aviala-card__divider", "aria-hidden": true }),
10420
+ /* @__PURE__ */ jsx57(Switch, { ...switchProps })
10102
10421
  ] });
10103
10422
  case "select":
10104
10423
  default:
10105
- return select != null ? /* @__PURE__ */ jsx55("div", { className: "aviala-card-head__trailing", children: select }) : null;
10424
+ return select != null ? /* @__PURE__ */ jsx57("div", { className: "aviala-card-head__trailing", children: select }) : null;
10106
10425
  }
10107
10426
  };
10108
- return /* @__PURE__ */ jsxs45(
10427
+ return /* @__PURE__ */ jsxs47(
10109
10428
  "div",
10110
10429
  {
10111
10430
  ref,
@@ -10113,9 +10432,9 @@ var CardHead = forwardRef42(
10113
10432
  "data-type": slotType,
10114
10433
  ...props,
10115
10434
  children: [
10116
- /* @__PURE__ */ jsxs45("div", { className: "aviala-card-head__main", children: [
10117
- renderCardIcon(icon ?? /* @__PURE__ */ jsx55(GeneralSetting2, { "aria-hidden": true })),
10118
- /* @__PURE__ */ jsx55("div", { className: "aviala-card-head__title", children: title != null || description != null ? /* @__PURE__ */ jsx55(Typeface, { content: "textCaption", primary: title, secondary: description }) : children })
10435
+ /* @__PURE__ */ jsxs47("div", { className: "aviala-card-head__main", children: [
10436
+ renderCardIcon(icon ?? /* @__PURE__ */ jsx57(GeneralSetting2, { "aria-hidden": true })),
10437
+ /* @__PURE__ */ jsx57("div", { className: "aviala-card-head__title", children: title != null || description != null ? /* @__PURE__ */ jsx57(Typeface, { content: "textCaption", primary: title, secondary: description }) : children })
10119
10438
  ] }),
10120
10439
  renderTrailing()
10121
10440
  ]
@@ -10125,7 +10444,7 @@ var CardHead = forwardRef42(
10125
10444
  );
10126
10445
  CardHead.displayName = "CardHead";
10127
10446
  var CardBody = forwardRef42(
10128
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx55("div", { ref, className: cn("aviala-card-body", className), ...props, children: /* @__PURE__ */ jsx55("div", { className: "aviala-card-body__content", children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx55(Typography, { level: "text", as: "span", children }) : children }) })
10447
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx57("div", { ref, className: cn("aviala-card-body", className), ...props, children: /* @__PURE__ */ jsx57("div", { className: "aviala-card-body__content", children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx57(Typography, { level: "text", as: "span", children }) : children }) })
10129
10448
  );
10130
10449
  CardBody.displayName = "CardBody";
10131
10450
  var CardBottom = forwardRef42(
@@ -10141,46 +10460,46 @@ var CardBottom = forwardRef42(
10141
10460
  children,
10142
10461
  ...props
10143
10462
  }, ref) => {
10144
- const primaryAction = action ?? /* @__PURE__ */ jsx55(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ jsx55(GeneralSetting2, { "aria-hidden": true }), children: actionLabel });
10463
+ const primaryAction = action ?? /* @__PURE__ */ jsx57(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ jsx57(GeneralSetting2, { "aria-hidden": true }), children: actionLabel });
10145
10464
  const renderTrailing = () => {
10146
10465
  if (trailing !== void 0) return trailing;
10147
10466
  if (children != null) return children;
10148
10467
  switch (slotType) {
10149
10468
  case "switch":
10150
- return /* @__PURE__ */ jsxs45(Fragment9, { children: [
10469
+ return /* @__PURE__ */ jsxs47(Fragment9, { children: [
10151
10470
  primaryAction,
10152
- /* @__PURE__ */ jsx55("span", { className: "aviala-card__divider", "aria-hidden": true }),
10153
- /* @__PURE__ */ jsx55(Switch, { ...switchProps })
10471
+ /* @__PURE__ */ jsx57("span", { className: "aviala-card__divider", "aria-hidden": true }),
10472
+ /* @__PURE__ */ jsx57(Switch, { ...switchProps })
10154
10473
  ] });
10155
10474
  case "select":
10156
10475
  return select;
10157
10476
  case "action":
10158
10477
  default:
10159
- return /* @__PURE__ */ jsxs45(Fragment9, { children: [
10478
+ return /* @__PURE__ */ jsxs47(Fragment9, { children: [
10160
10479
  primaryAction,
10161
- secondaryAction ?? /* @__PURE__ */ jsx55(
10480
+ secondaryAction ?? /* @__PURE__ */ jsx57(
10162
10481
  Button,
10163
10482
  {
10164
10483
  mode: "default",
10165
10484
  size: "regular",
10166
10485
  iconOnly: true,
10167
10486
  "aria-label": "More",
10168
- leftIcon: /* @__PURE__ */ jsx55(GeneralSetting2, { "aria-hidden": true })
10487
+ leftIcon: /* @__PURE__ */ jsx57(GeneralSetting2, { "aria-hidden": true })
10169
10488
  }
10170
10489
  ),
10171
- /* @__PURE__ */ jsx55("span", { className: "aviala-card__divider", "aria-hidden": true }),
10172
- /* @__PURE__ */ jsx55(DirectionArrowRightLight5, { width: 14, height: 14, "aria-hidden": true })
10490
+ /* @__PURE__ */ jsx57("span", { className: "aviala-card__divider", "aria-hidden": true }),
10491
+ /* @__PURE__ */ jsx57(DirectionArrowRightLight5, { width: 14, height: 14, "aria-hidden": true })
10173
10492
  ] });
10174
10493
  }
10175
10494
  };
10176
- return /* @__PURE__ */ jsx55(
10495
+ return /* @__PURE__ */ jsx57(
10177
10496
  "div",
10178
10497
  {
10179
10498
  ref,
10180
10499
  className: cn("aviala-card-bottom", className),
10181
10500
  "data-type": slotType,
10182
10501
  ...props,
10183
- children: /* @__PURE__ */ jsx55("div", { className: "aviala-card-bottom__trailing", children: renderTrailing() })
10502
+ children: /* @__PURE__ */ jsx57("div", { className: "aviala-card-bottom__trailing", children: renderTrailing() })
10184
10503
  }
10185
10504
  );
10186
10505
  }
@@ -10193,9 +10512,9 @@ import {
10193
10512
  forwardRef as forwardRef43,
10194
10513
  isValidElement as isValidElement18
10195
10514
  } from "react";
10196
- import { Fragment as Fragment10, jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
10515
+ import { Fragment as Fragment10, jsx as jsx58, jsxs as jsxs48 } from "react/jsx-runtime";
10197
10516
  var Table = forwardRef43(
10198
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx56(
10517
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx58(
10199
10518
  "div",
10200
10519
  {
10201
10520
  ref,
@@ -10208,7 +10527,7 @@ var Table = forwardRef43(
10208
10527
  );
10209
10528
  Table.displayName = "Table";
10210
10529
  var TableRow = forwardRef43(
10211
- ({ className, header = false, children, ...props }, ref) => /* @__PURE__ */ jsx56(
10530
+ ({ className, header = false, children, ...props }, ref) => /* @__PURE__ */ jsx58(
10212
10531
  "div",
10213
10532
  {
10214
10533
  ref,
@@ -10222,7 +10541,7 @@ var TableRow = forwardRef43(
10222
10541
  );
10223
10542
  TableRow.displayName = "TableRow";
10224
10543
  var TableHead = forwardRef43(
10225
- ({ className, content = "text", children, ...props }, ref) => /* @__PURE__ */ jsx56(
10544
+ ({ className, content = "text", children, ...props }, ref) => /* @__PURE__ */ jsx58(
10226
10545
  "div",
10227
10546
  {
10228
10547
  ref,
@@ -10230,7 +10549,7 @@ var TableHead = forwardRef43(
10230
10549
  className: cn("aviala-table-head", className),
10231
10550
  "data-content": content,
10232
10551
  ...props,
10233
- children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx56(Typography, { level: "caption", as: "span", children }) : children
10552
+ children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx58(Typography, { level: "caption", as: "span", children }) : children
10234
10553
  }
10235
10554
  )
10236
10555
  );
@@ -10245,7 +10564,7 @@ function renderCellIcon(node) {
10245
10564
  "shrink-0"
10246
10565
  )
10247
10566
  }) : node;
10248
- return /* @__PURE__ */ jsx56("span", { className: "aviala-table-cell__icon", children: content });
10567
+ return /* @__PURE__ */ jsx58("span", { className: "aviala-table-cell__icon", children: content });
10249
10568
  }
10250
10569
  var TableCell = forwardRef43(
10251
10570
  ({
@@ -10266,29 +10585,29 @@ var TableCell = forwardRef43(
10266
10585
  if (children != null) return children;
10267
10586
  switch (content) {
10268
10587
  case "checkbox":
10269
- return /* @__PURE__ */ jsx56(Checkbox, { ...checkboxProps });
10588
+ return /* @__PURE__ */ jsx58(Checkbox, { ...checkboxProps });
10270
10589
  case "icon+text":
10271
- return /* @__PURE__ */ jsxs46(Fragment10, { children: [
10590
+ return /* @__PURE__ */ jsxs48(Fragment10, { children: [
10272
10591
  renderCellIcon(icon),
10273
- /* @__PURE__ */ jsx56("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ jsx56(Typography, { level: "text", as: "span", children: text }) })
10592
+ /* @__PURE__ */ jsx58("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ jsx58(Typography, { level: "text", as: "span", children: text }) })
10274
10593
  ] });
10275
10594
  case "people":
10276
- return /* @__PURE__ */ jsxs46(Fragment10, { children: [
10277
- people ?? /* @__PURE__ */ jsx56(Avatar, { content: "text", level: "text", children: "A" }),
10278
- /* @__PURE__ */ jsx56("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ jsx56(Typography, { level: "text", as: "span", children: text }) })
10595
+ return /* @__PURE__ */ jsxs48(Fragment10, { children: [
10596
+ people ?? /* @__PURE__ */ jsx58(Avatar, { content: "text", level: "text", children: "A" }),
10597
+ /* @__PURE__ */ jsx58("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ jsx58(Typography, { level: "text", as: "span", children: text }) })
10279
10598
  ] });
10280
10599
  case "badge":
10281
- return badge ?? /* @__PURE__ */ jsx56(Badge, { style: "theme", level: "caption", children: badgeLabel ?? "Text" });
10600
+ return badge ?? /* @__PURE__ */ jsx58(Badge, { style: "theme", level: "caption", children: badgeLabel ?? "Text" });
10282
10601
  case "switch":
10283
- return /* @__PURE__ */ jsx56(Switch, { ...switchProps });
10602
+ return /* @__PURE__ */ jsx58(Switch, { ...switchProps });
10284
10603
  case "action":
10285
- return /* @__PURE__ */ jsx56("div", { className: "aviala-table-cell__actions", children: actions });
10604
+ return /* @__PURE__ */ jsx58("div", { className: "aviala-table-cell__actions", children: actions });
10286
10605
  case "text":
10287
10606
  default:
10288
- return /* @__PURE__ */ jsx56("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ jsx56(Typography, { level: "text", as: "span", children: text }) });
10607
+ return /* @__PURE__ */ jsx58("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ jsx58(Typography, { level: "text", as: "span", children: text }) });
10289
10608
  }
10290
10609
  };
10291
- return /* @__PURE__ */ jsx56(
10610
+ return /* @__PURE__ */ jsx58(
10292
10611
  "div",
10293
10612
  {
10294
10613
  ref,
@@ -10349,6 +10668,7 @@ export {
10349
10668
  Feedback,
10350
10669
  Fieldset,
10351
10670
  FormField,
10671
+ HoverPopover,
10352
10672
  Input,
10353
10673
  InputGroup,
10354
10674
  InputGroupAddon,
@@ -10399,6 +10719,7 @@ export {
10399
10719
  RadioGroup,
10400
10720
  RadioGroupItem,
10401
10721
  RadioInput,
10722
+ ResponsiveTooltip,
10402
10723
  Scroll,
10403
10724
  ScrollPicker,
10404
10725
  ScrollPickerColumn,