@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.cjs +788 -469
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +115 -4
- package/dist/index.d.ts +115 -4
- package/dist/index.js +723 -402
- package/dist/index.js.map +1 -1
- package/dist/props.json +7 -1
- package/dist/styles.css +13 -5
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -77,6 +77,7 @@ __export(index_exports, {
|
|
|
77
77
|
Feedback: () => Feedback,
|
|
78
78
|
Fieldset: () => Fieldset,
|
|
79
79
|
FormField: () => FormField,
|
|
80
|
+
HoverPopover: () => HoverPopover,
|
|
80
81
|
Input: () => Input,
|
|
81
82
|
InputGroup: () => InputGroup,
|
|
82
83
|
InputGroupAddon: () => InputGroupAddon,
|
|
@@ -127,6 +128,7 @@ __export(index_exports, {
|
|
|
127
128
|
RadioGroup: () => RadioGroup,
|
|
128
129
|
RadioGroupItem: () => RadioGroupItem,
|
|
129
130
|
RadioInput: () => RadioInput,
|
|
131
|
+
ResponsiveTooltip: () => ResponsiveTooltip,
|
|
130
132
|
Scroll: () => Scroll,
|
|
131
133
|
ScrollPicker: () => ScrollPicker,
|
|
132
134
|
ScrollPickerColumn: () => ScrollPickerColumn,
|
|
@@ -643,6 +645,10 @@ var buttonVariants = (0, import_class_variance_authority3.cva)(
|
|
|
643
645
|
allRound: {
|
|
644
646
|
true: "min-w-[var(--button-min-width-allround,48px)] !rounded-[var(--border-radius-allround,99px)]",
|
|
645
647
|
false: "min-w-[var(--button-min-width,46px)]"
|
|
648
|
+
},
|
|
649
|
+
compact: {
|
|
650
|
+
true: "min-w-0",
|
|
651
|
+
false: ""
|
|
646
652
|
}
|
|
647
653
|
},
|
|
648
654
|
defaultVariants: {
|
|
@@ -727,6 +733,7 @@ var Button = (0, import_react6.forwardRef)(
|
|
|
727
733
|
variant,
|
|
728
734
|
size: sizeProp,
|
|
729
735
|
allRound = false,
|
|
736
|
+
compact,
|
|
730
737
|
iconOnly: iconOnlyProp,
|
|
731
738
|
asChild = false,
|
|
732
739
|
loading = false,
|
|
@@ -781,7 +788,7 @@ var Button = (0, import_react6.forwardRef)(
|
|
|
781
788
|
!iconOnly && renderIcon(rightIcon, iconLevel, void 0, "button.icon-right")
|
|
782
789
|
] });
|
|
783
790
|
const classes = cn(
|
|
784
|
-
buttonVariants({ mode, ...iconOnly ? {} : { allRound } }),
|
|
791
|
+
buttonVariants({ mode, ...iconOnly ? {} : { allRound }, compact }),
|
|
785
792
|
iconOnly && "min-w-0",
|
|
786
793
|
iconOnly && allRound && "!rounded-[var(--border-radius-allround,99px)]",
|
|
787
794
|
className
|
|
@@ -3240,10 +3247,13 @@ function useSegmentatorState(value, defaultValue, onValueChange) {
|
|
|
3240
3247
|
const [internal, setInternal] = (0, import_react23.useState)(defaultValue ?? "");
|
|
3241
3248
|
const isControlled = value !== void 0;
|
|
3242
3249
|
const current = isControlled ? value : internal;
|
|
3243
|
-
const setValue = (
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3250
|
+
const setValue = (0, import_react23.useCallback)(
|
|
3251
|
+
(next) => {
|
|
3252
|
+
if (!isControlled) setInternal(next);
|
|
3253
|
+
onValueChange?.(next);
|
|
3254
|
+
},
|
|
3255
|
+
[isControlled, onValueChange]
|
|
3256
|
+
);
|
|
3247
3257
|
return [current, setValue];
|
|
3248
3258
|
}
|
|
3249
3259
|
var SEGMENTATOR_DRAG_THRESHOLD_PX = 4;
|
|
@@ -3288,6 +3298,16 @@ function getEnabledSegmentatorItems(group) {
|
|
|
3288
3298
|
group.querySelectorAll(".aviala-segmentator-item:not(:disabled)")
|
|
3289
3299
|
);
|
|
3290
3300
|
}
|
|
3301
|
+
function applyDragPreview(group, activeItem) {
|
|
3302
|
+
const items = getEnabledSegmentatorItems(group);
|
|
3303
|
+
for (const item of items) {
|
|
3304
|
+
if (item === activeItem) {
|
|
3305
|
+
item.setAttribute("data-drag-preview", "true");
|
|
3306
|
+
} else {
|
|
3307
|
+
item.removeAttribute("data-drag-preview");
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3291
3311
|
function measureItemThumbMetrics(item, group) {
|
|
3292
3312
|
const groupRect = group.getBoundingClientRect();
|
|
3293
3313
|
const itemRect = item.getBoundingClientRect();
|
|
@@ -3509,7 +3529,6 @@ var SegmentatorGroup = (0, import_react23.forwardRef)(
|
|
|
3509
3529
|
const layoutKey = useThemeLayoutKey();
|
|
3510
3530
|
const consumeClickRef = (0, import_react23.useRef)(false);
|
|
3511
3531
|
const pointerDragRef = (0, import_react23.useRef)(null);
|
|
3512
|
-
const [dragPreviewValue, setDragPreviewValue] = (0, import_react23.useState)(null);
|
|
3513
3532
|
const [dragState, setDragState] = (0, import_react23.useState)({
|
|
3514
3533
|
pressing: false,
|
|
3515
3534
|
active: false
|
|
@@ -3518,9 +3537,12 @@ var SegmentatorGroup = (0, import_react23.forwardRef)(
|
|
|
3518
3537
|
const resetPointerInteraction = (0, import_react23.useCallback)(() => {
|
|
3519
3538
|
pointerDragRef.current?.cleanupWindowListeners?.();
|
|
3520
3539
|
pointerDragRef.current = null;
|
|
3521
|
-
setDragPreviewValue(null);
|
|
3522
3540
|
setDragState({ pressing: false, active: false });
|
|
3523
|
-
const
|
|
3541
|
+
const group = groupRef.current;
|
|
3542
|
+
if (group) {
|
|
3543
|
+
applyDragPreview(group, null);
|
|
3544
|
+
}
|
|
3545
|
+
const thumbEl = group?.querySelector(
|
|
3524
3546
|
".aviala-segmentator-thumb"
|
|
3525
3547
|
);
|
|
3526
3548
|
if (thumbEl) {
|
|
@@ -3577,8 +3599,8 @@ var SegmentatorGroup = (0, import_react23.forwardRef)(
|
|
|
3577
3599
|
if (itemChanged) {
|
|
3578
3600
|
triggerSegmentatorHaptic("select");
|
|
3579
3601
|
drag.snapUntil = performance.now() + 540;
|
|
3580
|
-
if (
|
|
3581
|
-
|
|
3602
|
+
if (item) {
|
|
3603
|
+
applyDragPreview(group, item);
|
|
3582
3604
|
}
|
|
3583
3605
|
}
|
|
3584
3606
|
drag.previewValue = nextPreviewValue;
|
|
@@ -3654,7 +3676,7 @@ var SegmentatorGroup = (0, import_react23.forwardRef)(
|
|
|
3654
3676
|
event.pointerId
|
|
3655
3677
|
);
|
|
3656
3678
|
writeThumbMetrics(metrics, false);
|
|
3657
|
-
|
|
3679
|
+
applyDragPreview(group, pressedItem);
|
|
3658
3680
|
setDragState({ pressing: true, active: false });
|
|
3659
3681
|
group.setPointerCapture(event.pointerId);
|
|
3660
3682
|
};
|
|
@@ -3662,16 +3684,17 @@ var SegmentatorGroup = (0, import_react23.forwardRef)(
|
|
|
3662
3684
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3663
3685
|
SegmentatorContext.Provider,
|
|
3664
3686
|
{
|
|
3665
|
-
value:
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3687
|
+
value: (0, import_react23.useMemo)(
|
|
3688
|
+
() => ({
|
|
3689
|
+
value: currentValue,
|
|
3690
|
+
onValueChange: setValue,
|
|
3691
|
+
mode,
|
|
3692
|
+
allRound,
|
|
3693
|
+
disabled,
|
|
3694
|
+
consumeClickRef
|
|
3695
|
+
}),
|
|
3696
|
+
[currentValue, setValue, mode, allRound, disabled]
|
|
3697
|
+
),
|
|
3675
3698
|
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3676
3699
|
"div",
|
|
3677
3700
|
{
|
|
@@ -3742,7 +3765,6 @@ var SegmentatorItem = (0, import_react23.forwardRef)(
|
|
|
3742
3765
|
"data-selected": selected ? "true" : "false",
|
|
3743
3766
|
"data-value": value,
|
|
3744
3767
|
"data-mode": ctx.mode,
|
|
3745
|
-
"data-drag-preview": ctx.isPressing && ctx.dragPreviewValue === value ? "true" : void 0,
|
|
3746
3768
|
"data-all-round": ctx.allRound ? "true" : "false",
|
|
3747
3769
|
disabled: isDisabled,
|
|
3748
3770
|
className: cn("aviala-segmentator-item aviala-focus-ring", iconOnly && "min-w-0", className),
|
|
@@ -4276,7 +4298,7 @@ function ColorPickerInputs({
|
|
|
4276
4298
|
}
|
|
4277
4299
|
) : null,
|
|
4278
4300
|
format === "hex" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "aviala-color-picker-field", children: [
|
|
4279
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Badge, { children: "#" }) }),
|
|
4301
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Badge, { style: "normal", children: "#" }) }),
|
|
4280
4302
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4281
4303
|
"input",
|
|
4282
4304
|
{
|
|
@@ -4315,7 +4337,7 @@ function ColorPickerInputs({
|
|
|
4315
4337
|
onKeyDown: (e) => e.key === "Enter" && commitAlpha()
|
|
4316
4338
|
}
|
|
4317
4339
|
),
|
|
4318
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Badge, { children: "%" }) })
|
|
4340
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "aviala-color-picker-field__badge-area", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Badge, { style: "normal", children: "%" }) })
|
|
4319
4341
|
] }),
|
|
4320
4342
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4321
4343
|
Select,
|
|
@@ -4835,6 +4857,7 @@ function Cascader({
|
|
|
4835
4857
|
const isValueControlled = valueProp !== void 0;
|
|
4836
4858
|
const open = isOpenControlled ? openProp : internalOpen;
|
|
4837
4859
|
const selectedPath = isValueControlled ? valueProp ?? [] : internalValue;
|
|
4860
|
+
const wasOpenRef = (0, import_react35.useRef)(open);
|
|
4838
4861
|
(0, import_react35.useEffect)(() => {
|
|
4839
4862
|
const markWindowBlur = () => {
|
|
4840
4863
|
windowBlurCloseRef.current = true;
|
|
@@ -4843,10 +4866,20 @@ function Cascader({
|
|
|
4843
4866
|
return () => window.removeEventListener("blur", markWindowBlur, true);
|
|
4844
4867
|
}, []);
|
|
4845
4868
|
(0, import_react35.useEffect)(() => {
|
|
4846
|
-
|
|
4847
|
-
|
|
4869
|
+
const justOpened = open && !wasOpenRef.current;
|
|
4870
|
+
wasOpenRef.current = open;
|
|
4871
|
+
if (!justOpened) return;
|
|
4872
|
+
if (selectedPath.length === 0) {
|
|
4873
|
+
setActivePath([]);
|
|
4874
|
+
return;
|
|
4875
|
+
}
|
|
4876
|
+
const selectedOption = findOptionPath(options, selectedPath);
|
|
4877
|
+
if (selectedOption?.children?.length) {
|
|
4878
|
+
setActivePath(selectedPath);
|
|
4879
|
+
return;
|
|
4848
4880
|
}
|
|
4849
|
-
|
|
4881
|
+
setActivePath(selectedPath.slice(0, -1));
|
|
4882
|
+
}, [open, options, selectedPath]);
|
|
4850
4883
|
(0, import_react35.useEffect)(() => {
|
|
4851
4884
|
if (!open) {
|
|
4852
4885
|
pointerDownCloseRef.current = false;
|
|
@@ -6120,12 +6153,19 @@ function DatePicker(props) {
|
|
|
6120
6153
|
setActivePanel("date");
|
|
6121
6154
|
return;
|
|
6122
6155
|
}
|
|
6156
|
+
setFocusedDay((current) => {
|
|
6157
|
+
if (current) return current;
|
|
6158
|
+
if (mode === "single" && singleValue) return startOfDay(singleValue);
|
|
6159
|
+
const rangeAnchor = mode === "range" ? rangeValue.from ?? rangeValue.to : void 0;
|
|
6160
|
+
if (rangeAnchor) return startOfDay(rangeAnchor);
|
|
6161
|
+
return startOfDay(/* @__PURE__ */ new Date());
|
|
6162
|
+
});
|
|
6123
6163
|
const markPointerDown = () => {
|
|
6124
6164
|
pointerDownCloseRef.current = true;
|
|
6125
6165
|
};
|
|
6126
6166
|
document.addEventListener("pointerdown", markPointerDown, true);
|
|
6127
6167
|
return () => document.removeEventListener("pointerdown", markPointerDown, true);
|
|
6128
|
-
}, [open]);
|
|
6168
|
+
}, [mode, open, rangeValue.from, rangeValue.to, singleValue]);
|
|
6129
6169
|
const handleOpenChange = (0, import_react39.useCallback)(
|
|
6130
6170
|
(nextOpen) => {
|
|
6131
6171
|
if (disabled && nextOpen) return;
|
|
@@ -6226,19 +6266,21 @@ function DatePicker(props) {
|
|
|
6226
6266
|
]
|
|
6227
6267
|
);
|
|
6228
6268
|
const selectDate = (0, import_react39.useCallback)(
|
|
6229
|
-
(date) => {
|
|
6269
|
+
(date, options) => {
|
|
6230
6270
|
if (disabled || isDateDisabled(date, minDate, maxDate)) return;
|
|
6231
6271
|
const day = startOfDay(date);
|
|
6232
6272
|
setFocusedDay(day);
|
|
6233
6273
|
if (!isSameMonth(day, viewMonth)) {
|
|
6234
6274
|
setViewMonth(new Date(day.getFullYear(), day.getMonth(), 1));
|
|
6235
6275
|
}
|
|
6276
|
+
const switchToTime = options?.switchToTime ?? enableTime;
|
|
6277
|
+
const shouldClose = options?.close ?? !enableTime;
|
|
6236
6278
|
if (mode === "single") {
|
|
6237
6279
|
const next = enableTime ? applyTimeToDate(day, timeValue.hours, timeValue.minutes) : day;
|
|
6238
6280
|
commitSingle(next);
|
|
6239
|
-
if (
|
|
6281
|
+
if (switchToTime) {
|
|
6240
6282
|
setActivePanel("time");
|
|
6241
|
-
} else {
|
|
6283
|
+
} else if (shouldClose) {
|
|
6242
6284
|
handleOpenChange(false);
|
|
6243
6285
|
}
|
|
6244
6286
|
return;
|
|
@@ -6254,9 +6296,9 @@ function DatePicker(props) {
|
|
|
6254
6296
|
if (isSameDay(day, currentFrom)) {
|
|
6255
6297
|
commitRange({ from: withTime(day), to: withTime(day) });
|
|
6256
6298
|
setRangeDraftFrom(void 0);
|
|
6257
|
-
if (
|
|
6299
|
+
if (switchToTime) {
|
|
6258
6300
|
setActivePanel("time");
|
|
6259
|
-
} else {
|
|
6301
|
+
} else if (shouldClose) {
|
|
6260
6302
|
handleOpenChange(false);
|
|
6261
6303
|
}
|
|
6262
6304
|
return;
|
|
@@ -6267,9 +6309,9 @@ function DatePicker(props) {
|
|
|
6267
6309
|
to: normalized.to ? withTime(normalized.to) : void 0
|
|
6268
6310
|
});
|
|
6269
6311
|
setRangeDraftFrom(void 0);
|
|
6270
|
-
if (
|
|
6312
|
+
if (switchToTime) {
|
|
6271
6313
|
setActivePanel("time");
|
|
6272
|
-
} else {
|
|
6314
|
+
} else if (shouldClose) {
|
|
6273
6315
|
handleOpenChange(false);
|
|
6274
6316
|
}
|
|
6275
6317
|
},
|
|
@@ -6675,7 +6717,7 @@ function DatePickerPanelFooter() {
|
|
|
6675
6717
|
if (!enableTime) return null;
|
|
6676
6718
|
const panelValue = activePanel === "time" ? "time" : "date";
|
|
6677
6719
|
const isRangeMode = mode === "range";
|
|
6678
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "aviala-datepicker-footer-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6679
6721
|
SegmentatorGroup,
|
|
6680
6722
|
{
|
|
6681
6723
|
value: panelValue,
|
|
@@ -6706,7 +6748,7 @@ function DatePickerPanelFooter() {
|
|
|
6706
6748
|
)
|
|
6707
6749
|
]
|
|
6708
6750
|
}
|
|
6709
|
-
);
|
|
6751
|
+
) });
|
|
6710
6752
|
}
|
|
6711
6753
|
function monthDiff(from, to) {
|
|
6712
6754
|
return (to.getFullYear() - from.getFullYear()) * 12 + (to.getMonth() - from.getMonth());
|
|
@@ -6734,6 +6776,8 @@ function DatePickerCalendar({ className }) {
|
|
|
6734
6776
|
const today = (0, import_react39.useMemo)(() => startOfDay(/* @__PURE__ */ new Date()), []);
|
|
6735
6777
|
const days = (0, import_react39.useMemo)(() => getCalendarDays(viewMonth), [viewMonth]);
|
|
6736
6778
|
const prevViewMonthRef = (0, import_react39.useRef)(viewMonth);
|
|
6779
|
+
const dayGridRef = (0, import_react39.useRef)(null);
|
|
6780
|
+
const pendingDayFocusRef = (0, import_react39.useRef)(false);
|
|
6737
6781
|
const [monthSlide, setMonthSlide] = (0, import_react39.useState)(null);
|
|
6738
6782
|
const isMonthPanel = activePanel === "month";
|
|
6739
6783
|
const isTimePanel = activePanel === "time" && enableTime;
|
|
@@ -6790,40 +6834,40 @@ function DatePickerCalendar({ className }) {
|
|
|
6790
6834
|
outgoingMonth: previous
|
|
6791
6835
|
});
|
|
6792
6836
|
}, [contentView, panel, viewMonth]);
|
|
6837
|
+
(0, import_react39.useLayoutEffect)(() => {
|
|
6838
|
+
if (!pendingDayFocusRef.current || !focusedDay) return;
|
|
6839
|
+
const grid = dayGridRef.current;
|
|
6840
|
+
if (!grid) return;
|
|
6841
|
+
const target = grid.querySelector(
|
|
6842
|
+
`button[data-day="${formatIsoDate(focusedDay)}"]`
|
|
6843
|
+
);
|
|
6844
|
+
if (!target || target.disabled) return;
|
|
6845
|
+
pendingDayFocusRef.current = false;
|
|
6846
|
+
target.focus();
|
|
6847
|
+
}, [focusedDay, days, monthSlide]);
|
|
6793
6848
|
const outgoingDays = (0, import_react39.useMemo)(
|
|
6794
6849
|
() => monthSlide ? getCalendarDays(monthSlide.outgoingMonth) : null,
|
|
6795
6850
|
[monthSlide]
|
|
6796
6851
|
);
|
|
6797
6852
|
const handleDayKeyDown = (event, date) => {
|
|
6798
|
-
let
|
|
6853
|
+
let deltaDays = 0;
|
|
6799
6854
|
switch (event.key) {
|
|
6800
6855
|
case "ArrowLeft":
|
|
6801
|
-
|
|
6802
|
-
next.setDate(next.getDate() - 1);
|
|
6856
|
+
deltaDays = -1;
|
|
6803
6857
|
break;
|
|
6804
6858
|
case "ArrowRight":
|
|
6805
|
-
|
|
6806
|
-
next.setDate(next.getDate() + 1);
|
|
6859
|
+
deltaDays = 1;
|
|
6807
6860
|
break;
|
|
6808
6861
|
case "ArrowUp":
|
|
6809
|
-
|
|
6810
|
-
next.setDate(next.getDate() - 7);
|
|
6862
|
+
deltaDays = -7;
|
|
6811
6863
|
break;
|
|
6812
6864
|
case "ArrowDown":
|
|
6813
|
-
|
|
6814
|
-
next.setDate(next.getDate() + 7);
|
|
6865
|
+
deltaDays = 7;
|
|
6815
6866
|
break;
|
|
6816
6867
|
case "Home":
|
|
6817
|
-
next = new Date(date.getFullYear(), date.getMonth(), 1);
|
|
6818
|
-
break;
|
|
6819
6868
|
case "End":
|
|
6820
|
-
next = new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
6821
|
-
break;
|
|
6822
6869
|
case "PageUp":
|
|
6823
|
-
next = addMonths(date, event.shiftKey ? -12 : -1);
|
|
6824
|
-
break;
|
|
6825
6870
|
case "PageDown":
|
|
6826
|
-
next = addMonths(date, event.shiftKey ? 12 : 1);
|
|
6827
6871
|
break;
|
|
6828
6872
|
case "Enter":
|
|
6829
6873
|
case " ":
|
|
@@ -6834,8 +6878,31 @@ function DatePickerCalendar({ className }) {
|
|
|
6834
6878
|
return;
|
|
6835
6879
|
}
|
|
6836
6880
|
event.preventDefault();
|
|
6837
|
-
|
|
6881
|
+
let next;
|
|
6882
|
+
if (event.key === "Home") {
|
|
6883
|
+
next = new Date(date.getFullYear(), date.getMonth(), 1);
|
|
6884
|
+
} else if (event.key === "End") {
|
|
6885
|
+
next = new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
6886
|
+
} else if (event.key === "PageUp") {
|
|
6887
|
+
next = addMonths(date, event.shiftKey ? -12 : -1);
|
|
6888
|
+
} else if (event.key === "PageDown") {
|
|
6889
|
+
next = addMonths(date, event.shiftKey ? 12 : 1);
|
|
6890
|
+
} else {
|
|
6891
|
+
next = new Date(date);
|
|
6892
|
+
next.setDate(next.getDate() + deltaDays);
|
|
6893
|
+
let guard = 0;
|
|
6894
|
+
while (isDateDisabled(next, minDate, maxDate) && guard < 366) {
|
|
6895
|
+
next.setDate(next.getDate() + (deltaDays > 0 ? 1 : -1));
|
|
6896
|
+
guard += 1;
|
|
6897
|
+
}
|
|
6898
|
+
}
|
|
6838
6899
|
const normalized = startOfDay(next);
|
|
6900
|
+
if (isDateDisabled(normalized, minDate, maxDate)) return;
|
|
6901
|
+
pendingDayFocusRef.current = true;
|
|
6902
|
+
if (mode === "single") {
|
|
6903
|
+
selectDate(normalized, { close: false, switchToTime: false });
|
|
6904
|
+
return;
|
|
6905
|
+
}
|
|
6839
6906
|
setFocusedDay(normalized);
|
|
6840
6907
|
if (!isSameMonth(normalized, viewMonth)) {
|
|
6841
6908
|
setViewMonth(new Date(normalized.getFullYear(), normalized.getMonth(), 1));
|
|
@@ -6889,6 +6956,7 @@ function DatePickerCalendar({ className }) {
|
|
|
6889
6956
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6890
6957
|
"div",
|
|
6891
6958
|
{
|
|
6959
|
+
ref: dayGridRef,
|
|
6892
6960
|
className: "aviala-datepicker-calendar__grid",
|
|
6893
6961
|
role: "grid",
|
|
6894
6962
|
"aria-labelledby": `${calendarId}-label`,
|
|
@@ -6908,11 +6976,13 @@ function DatePickerCalendar({ className }) {
|
|
|
6908
6976
|
const isToday = isSameDay(day, today);
|
|
6909
6977
|
const dayDisabled = isDateDisabled(day, minDate, maxDate);
|
|
6910
6978
|
const focused = focusedDay ? isSameDay(day, focusedDay) : false;
|
|
6979
|
+
const dayKey = formatIsoDate(day);
|
|
6911
6980
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6912
6981
|
"button",
|
|
6913
6982
|
{
|
|
6914
6983
|
type: "button",
|
|
6915
6984
|
role: "gridcell",
|
|
6985
|
+
"data-day": dayKey,
|
|
6916
6986
|
tabIndex: focused || !focusedDay && isToday ? 0 : -1,
|
|
6917
6987
|
className: "aviala-datepicker-day aviala-focus-ring",
|
|
6918
6988
|
"data-outside": outside ? "true" : void 0,
|
|
@@ -6942,7 +7012,7 @@ function DatePickerCalendar({ className }) {
|
|
|
6942
7012
|
isToday ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "aviala-datepicker-day__today-dot", "aria-hidden": true }) : null
|
|
6943
7013
|
]
|
|
6944
7014
|
},
|
|
6945
|
-
|
|
7015
|
+
dayKey
|
|
6946
7016
|
);
|
|
6947
7017
|
})
|
|
6948
7018
|
},
|
|
@@ -7457,37 +7527,9 @@ function Popover({
|
|
|
7457
7527
|
const [internalOpen, setInternalOpen] = (0, import_react42.useState)(defaultOpen);
|
|
7458
7528
|
const isControlled = openProp !== void 0;
|
|
7459
7529
|
const open = isControlled ? openProp : internalOpen;
|
|
7460
|
-
const windowBlurCloseRef = (0, import_react42.useRef)(false);
|
|
7461
|
-
const pointerDownCloseRef = (0, import_react42.useRef)(false);
|
|
7462
|
-
(0, import_react42.useEffect)(() => {
|
|
7463
|
-
const markWindowBlur = () => {
|
|
7464
|
-
windowBlurCloseRef.current = true;
|
|
7465
|
-
};
|
|
7466
|
-
window.addEventListener("blur", markWindowBlur, true);
|
|
7467
|
-
return () => window.removeEventListener("blur", markWindowBlur, true);
|
|
7468
|
-
}, []);
|
|
7469
|
-
(0, import_react42.useEffect)(() => {
|
|
7470
|
-
if (!open) {
|
|
7471
|
-
pointerDownCloseRef.current = false;
|
|
7472
|
-
return;
|
|
7473
|
-
}
|
|
7474
|
-
const markPointerDown = () => {
|
|
7475
|
-
pointerDownCloseRef.current = true;
|
|
7476
|
-
};
|
|
7477
|
-
document.addEventListener("pointerdown", markPointerDown, true);
|
|
7478
|
-
return () => document.removeEventListener("pointerdown", markPointerDown, true);
|
|
7479
|
-
}, [open]);
|
|
7480
7530
|
const handleOpenChange = (0, import_react42.useCallback)(
|
|
7481
7531
|
(nextOpen) => {
|
|
7482
|
-
if (!nextOpen
|
|
7483
|
-
windowBlurCloseRef.current = false;
|
|
7484
|
-
return;
|
|
7485
|
-
}
|
|
7486
|
-
windowBlurCloseRef.current = false;
|
|
7487
|
-
pointerDownCloseRef.current = false;
|
|
7488
|
-
if (!isControlled) {
|
|
7489
|
-
setInternalOpen(nextOpen);
|
|
7490
|
-
}
|
|
7532
|
+
if (!isControlled) setInternalOpen(nextOpen);
|
|
7491
7533
|
onOpenChange?.(nextOpen);
|
|
7492
7534
|
},
|
|
7493
7535
|
[isControlled, onOpenChange]
|
|
@@ -7513,6 +7555,7 @@ var PopoverContent = (0, import_react42.forwardRef)(
|
|
|
7513
7555
|
collisionPadding = 8,
|
|
7514
7556
|
portalled = true,
|
|
7515
7557
|
showArrow = false,
|
|
7558
|
+
flush = false,
|
|
7516
7559
|
...props
|
|
7517
7560
|
}, ref) => {
|
|
7518
7561
|
const content = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
@@ -7525,7 +7568,14 @@ var PopoverContent = (0, import_react42.forwardRef)(
|
|
|
7525
7568
|
className: cn("aviala-popover-content", className),
|
|
7526
7569
|
...props,
|
|
7527
7570
|
children: [
|
|
7528
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7571
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7572
|
+
"div",
|
|
7573
|
+
{
|
|
7574
|
+
className: cn("aviala-popover-content__surface", typographyVariants({ level: "text" })),
|
|
7575
|
+
"data-flush": flush ? "true" : void 0,
|
|
7576
|
+
children
|
|
7577
|
+
}
|
|
7578
|
+
),
|
|
7529
7579
|
showArrow ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7530
7580
|
PopoverPrimitive6.Arrow,
|
|
7531
7581
|
{
|
|
@@ -7553,12 +7603,136 @@ var PopoverContent = (0, import_react42.forwardRef)(
|
|
|
7553
7603
|
);
|
|
7554
7604
|
PopoverContent.displayName = PopoverPrimitive6.Content.displayName;
|
|
7555
7605
|
|
|
7606
|
+
// src/components/hover-popover.tsx
|
|
7607
|
+
var import_react44 = require("react");
|
|
7608
|
+
|
|
7609
|
+
// src/components/use-coarse-pointer.ts
|
|
7610
|
+
var import_react43 = require("react");
|
|
7611
|
+
function useCoarsePointer() {
|
|
7612
|
+
const [coarse, setCoarse] = (0, import_react43.useState)(false);
|
|
7613
|
+
(0, import_react43.useEffect)(() => {
|
|
7614
|
+
if (typeof window === "undefined" || !window.matchMedia) return;
|
|
7615
|
+
const mq = window.matchMedia("(pointer: coarse)");
|
|
7616
|
+
const update = () => setCoarse(mq.matches);
|
|
7617
|
+
update();
|
|
7618
|
+
mq.addEventListener("change", update);
|
|
7619
|
+
return () => mq.removeEventListener("change", update);
|
|
7620
|
+
}, []);
|
|
7621
|
+
return coarse;
|
|
7622
|
+
}
|
|
7623
|
+
|
|
7624
|
+
// src/components/hover-popover.tsx
|
|
7625
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
7626
|
+
function HoverPopover({
|
|
7627
|
+
content,
|
|
7628
|
+
children,
|
|
7629
|
+
side = "top",
|
|
7630
|
+
align = "center",
|
|
7631
|
+
sideOffset = 8,
|
|
7632
|
+
collisionPadding = 8,
|
|
7633
|
+
showArrow = true,
|
|
7634
|
+
openDelay = 150,
|
|
7635
|
+
closeDelay = 150,
|
|
7636
|
+
open: openProp,
|
|
7637
|
+
defaultOpen = false,
|
|
7638
|
+
onOpenChange,
|
|
7639
|
+
contentClassName
|
|
7640
|
+
}) {
|
|
7641
|
+
const coarse = useCoarsePointer();
|
|
7642
|
+
const isControlled = openProp !== void 0;
|
|
7643
|
+
const [internalOpen, setInternalOpen] = (0, import_react44.useState)(defaultOpen);
|
|
7644
|
+
const open = isControlled ? openProp : internalOpen;
|
|
7645
|
+
const openTimer = (0, import_react44.useRef)(void 0);
|
|
7646
|
+
const closeTimer = (0, import_react44.useRef)(void 0);
|
|
7647
|
+
const clearTimers = (0, import_react44.useCallback)(() => {
|
|
7648
|
+
if (openTimer.current) clearTimeout(openTimer.current);
|
|
7649
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
7650
|
+
}, []);
|
|
7651
|
+
const setOpen = (0, import_react44.useCallback)(
|
|
7652
|
+
(next) => {
|
|
7653
|
+
if (!isControlled) setInternalOpen(next);
|
|
7654
|
+
onOpenChange?.(next);
|
|
7655
|
+
},
|
|
7656
|
+
[isControlled, onOpenChange]
|
|
7657
|
+
);
|
|
7658
|
+
(0, import_react44.useEffect)(() => () => clearTimers(), [clearTimers]);
|
|
7659
|
+
const keyboardOpenRef = (0, import_react44.useRef)(false);
|
|
7660
|
+
const contentRef = (0, import_react44.useRef)(null);
|
|
7661
|
+
const openNow = (0, import_react44.useCallback)(() => {
|
|
7662
|
+
keyboardOpenRef.current = false;
|
|
7663
|
+
clearTimers();
|
|
7664
|
+
openTimer.current = setTimeout(() => setOpen(true), openDelay);
|
|
7665
|
+
}, [clearTimers, openDelay, setOpen]);
|
|
7666
|
+
const closeSoon = (0, import_react44.useCallback)(() => {
|
|
7667
|
+
clearTimers();
|
|
7668
|
+
closeTimer.current = setTimeout(() => setOpen(false), closeDelay);
|
|
7669
|
+
}, [clearTimers, closeDelay, setOpen]);
|
|
7670
|
+
if (coarse) {
|
|
7671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
7672
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PopoverTrigger, { asChild: true, children }),
|
|
7673
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7674
|
+
PopoverContent,
|
|
7675
|
+
{
|
|
7676
|
+
side,
|
|
7677
|
+
align,
|
|
7678
|
+
sideOffset,
|
|
7679
|
+
collisionPadding,
|
|
7680
|
+
showArrow,
|
|
7681
|
+
className: contentClassName,
|
|
7682
|
+
children: content
|
|
7683
|
+
}
|
|
7684
|
+
)
|
|
7685
|
+
] });
|
|
7686
|
+
}
|
|
7687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
7688
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7689
|
+
PopoverTrigger,
|
|
7690
|
+
{
|
|
7691
|
+
asChild: true,
|
|
7692
|
+
onMouseEnter: openNow,
|
|
7693
|
+
onMouseLeave: closeSoon,
|
|
7694
|
+
onKeyDown: (e) => {
|
|
7695
|
+
if (e.key === "Enter" || e.key === " ") keyboardOpenRef.current = true;
|
|
7696
|
+
},
|
|
7697
|
+
children
|
|
7698
|
+
}
|
|
7699
|
+
),
|
|
7700
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7701
|
+
PopoverContent,
|
|
7702
|
+
{
|
|
7703
|
+
ref: contentRef,
|
|
7704
|
+
side,
|
|
7705
|
+
align,
|
|
7706
|
+
sideOffset,
|
|
7707
|
+
collisionPadding,
|
|
7708
|
+
showArrow,
|
|
7709
|
+
className: contentClassName,
|
|
7710
|
+
onOpenAutoFocus: (e) => {
|
|
7711
|
+
if (!keyboardOpenRef.current) e.preventDefault();
|
|
7712
|
+
},
|
|
7713
|
+
onEscapeKeyDown: (e) => {
|
|
7714
|
+
e.preventDefault();
|
|
7715
|
+
setOpen(false);
|
|
7716
|
+
},
|
|
7717
|
+
onMouseEnter: clearTimers,
|
|
7718
|
+
onMouseLeave: closeSoon,
|
|
7719
|
+
onBlur: (e) => {
|
|
7720
|
+
const next = e.relatedTarget;
|
|
7721
|
+
if (next && contentRef.current?.contains(next)) return;
|
|
7722
|
+
closeSoon();
|
|
7723
|
+
},
|
|
7724
|
+
children: content
|
|
7725
|
+
}
|
|
7726
|
+
)
|
|
7727
|
+
] });
|
|
7728
|
+
}
|
|
7729
|
+
|
|
7556
7730
|
// src/components/modal.tsx
|
|
7557
7731
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
7558
7732
|
var import_icons15 = require("@aviala-design/icons");
|
|
7559
7733
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
7560
|
-
var
|
|
7561
|
-
var
|
|
7734
|
+
var import_react45 = require("react");
|
|
7735
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
7562
7736
|
var MODAL_ICON_SIZE = 16;
|
|
7563
7737
|
var modalContentVariants = (0, import_class_variance_authority10.cva)("aviala-modal-content", {
|
|
7564
7738
|
variants: {
|
|
@@ -7573,7 +7747,7 @@ var modalContentVariants = (0, import_class_variance_authority10.cva)("aviala-mo
|
|
|
7573
7747
|
});
|
|
7574
7748
|
function renderModalIcon(node) {
|
|
7575
7749
|
if (!node) return null;
|
|
7576
|
-
const content = (0,
|
|
7750
|
+
const content = (0, import_react45.isValidElement)(node) && typeof node.type !== "string" ? (0, import_react45.cloneElement)(node, {
|
|
7577
7751
|
width: MODAL_ICON_SIZE,
|
|
7578
7752
|
height: MODAL_ICON_SIZE,
|
|
7579
7753
|
className: cn(
|
|
@@ -7581,13 +7755,13 @@ function renderModalIcon(node) {
|
|
|
7581
7755
|
"shrink-0"
|
|
7582
7756
|
)
|
|
7583
7757
|
}) : node;
|
|
7584
|
-
return /* @__PURE__ */ (0,
|
|
7758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "aviala-modal__icon", "aria-hidden": true, children: content });
|
|
7585
7759
|
}
|
|
7586
7760
|
var Modal = DialogPrimitive.Root;
|
|
7587
7761
|
var ModalTrigger = DialogPrimitive.Trigger;
|
|
7588
7762
|
var ModalPortal = DialogPrimitive.Portal;
|
|
7589
7763
|
var ModalClose = DialogPrimitive.Close;
|
|
7590
|
-
var ModalOverlay = (0,
|
|
7764
|
+
var ModalOverlay = (0, import_react45.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7591
7765
|
DialogPrimitive.Overlay,
|
|
7592
7766
|
{
|
|
7593
7767
|
ref,
|
|
@@ -7596,7 +7770,7 @@ var ModalOverlay = (0, import_react43.forwardRef)(({ className, ...props }, ref)
|
|
|
7596
7770
|
}
|
|
7597
7771
|
));
|
|
7598
7772
|
ModalOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
7599
|
-
var ModalContent = (0,
|
|
7773
|
+
var ModalContent = (0, import_react45.forwardRef)(
|
|
7600
7774
|
({
|
|
7601
7775
|
className,
|
|
7602
7776
|
children,
|
|
@@ -7606,25 +7780,31 @@ var ModalContent = (0, import_react43.forwardRef)(
|
|
|
7606
7780
|
onOpenAutoFocus,
|
|
7607
7781
|
...props
|
|
7608
7782
|
}, ref) => {
|
|
7609
|
-
const
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7783
|
+
const overlay = showOverlay ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ModalOverlay, {}) : null;
|
|
7784
|
+
const panel = /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7785
|
+
DialogPrimitive.Content,
|
|
7786
|
+
{
|
|
7787
|
+
ref,
|
|
7788
|
+
className: cn(modalContentVariants({ size }), className),
|
|
7789
|
+
onOpenAutoFocus,
|
|
7790
|
+
...props,
|
|
7791
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "aviala-modal-content__surface", children })
|
|
7792
|
+
}
|
|
7793
|
+
);
|
|
7794
|
+
if (!portalled) {
|
|
7795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
7796
|
+
overlay,
|
|
7797
|
+
panel
|
|
7798
|
+
] });
|
|
7799
|
+
}
|
|
7800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(DialogPrimitive.Portal, { children: [
|
|
7801
|
+
overlay,
|
|
7802
|
+
panel
|
|
7621
7803
|
] });
|
|
7622
|
-
if (!portalled) return content;
|
|
7623
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DialogPrimitive.Portal, { children: content });
|
|
7624
7804
|
}
|
|
7625
7805
|
);
|
|
7626
7806
|
ModalContent.displayName = DialogPrimitive.Content.displayName;
|
|
7627
|
-
var ModalHeader = (0,
|
|
7807
|
+
var ModalHeader = (0, import_react45.forwardRef)(
|
|
7628
7808
|
({
|
|
7629
7809
|
className,
|
|
7630
7810
|
children,
|
|
@@ -7633,39 +7813,39 @@ var ModalHeader = (0, import_react43.forwardRef)(
|
|
|
7633
7813
|
showClose = true,
|
|
7634
7814
|
closeLabel = "Close dialog",
|
|
7635
7815
|
...props
|
|
7636
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7816
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { ref, className: cn("aviala-modal__header", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "aviala-modal__header-row", children: [
|
|
7637
7817
|
showIcon ? renderModalIcon(icon) : null,
|
|
7638
|
-
/* @__PURE__ */ (0,
|
|
7639
|
-
showClose ? /* @__PURE__ */ (0,
|
|
7640
|
-
|
|
7818
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "aviala-modal__header-main", children }),
|
|
7819
|
+
showClose ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7820
|
+
Button,
|
|
7641
7821
|
{
|
|
7642
|
-
|
|
7822
|
+
type: "button",
|
|
7643
7823
|
mode: "noBackgroundCustom",
|
|
7644
7824
|
iconOnly: true,
|
|
7645
7825
|
"aria-label": closeLabel,
|
|
7646
7826
|
className: "aviala-modal__close",
|
|
7647
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
7827
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons15.SymbolWrong, { "aria-hidden": true })
|
|
7648
7828
|
}
|
|
7649
7829
|
) }) : null
|
|
7650
7830
|
] }) })
|
|
7651
7831
|
);
|
|
7652
7832
|
ModalHeader.displayName = "ModalHeader";
|
|
7653
|
-
var ModalTitle = (0,
|
|
7833
|
+
var ModalTitle = (0, import_react45.forwardRef)(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DialogPrimitive.Title, { ref, asChild: true, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Typography, { level: "text", className: cn("aviala-modal__title", className), children }) }));
|
|
7654
7834
|
ModalTitle.displayName = DialogPrimitive.Title.displayName;
|
|
7655
|
-
var ModalDescription = (0,
|
|
7835
|
+
var ModalDescription = (0, import_react45.forwardRef)(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DialogPrimitive.Description, { ref, asChild: true, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Typography, { level: "caption", className: cn("aviala-modal__description", className), children }) }));
|
|
7656
7836
|
ModalDescription.displayName = DialogPrimitive.Description.displayName;
|
|
7657
7837
|
function ModalHeaderText({
|
|
7658
7838
|
title,
|
|
7659
7839
|
description,
|
|
7660
7840
|
...props
|
|
7661
7841
|
}) {
|
|
7662
|
-
return /* @__PURE__ */ (0,
|
|
7663
|
-
/* @__PURE__ */ (0,
|
|
7664
|
-
description ? /* @__PURE__ */ (0,
|
|
7842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ModalHeader, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "aviala-modal__header-typeface", children: [
|
|
7843
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ModalTitle, { children: title }),
|
|
7844
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ModalDescription, { children: description }) : null
|
|
7665
7845
|
] }) });
|
|
7666
7846
|
}
|
|
7667
|
-
var ModalBody = (0,
|
|
7668
|
-
({ className, children, layout = "default", title, description, ...props }, ref) => /* @__PURE__ */ (0,
|
|
7847
|
+
var ModalBody = (0, import_react45.forwardRef)(
|
|
7848
|
+
({ className, children, layout = "default", title, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { ref, className: cn("aviala-modal__body", className), ...props, children: layout === "text" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7669
7849
|
Typeface,
|
|
7670
7850
|
{
|
|
7671
7851
|
className: "aviala-modal__body-typeface",
|
|
@@ -7676,22 +7856,22 @@ var ModalBody = (0, import_react43.forwardRef)(
|
|
|
7676
7856
|
) : children })
|
|
7677
7857
|
);
|
|
7678
7858
|
ModalBody.displayName = "ModalBody";
|
|
7679
|
-
var ModalFooter = (0,
|
|
7680
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
7859
|
+
var ModalFooter = (0, import_react45.forwardRef)(
|
|
7860
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { ref, className: cn("aviala-modal__footer", className), ...props })
|
|
7681
7861
|
);
|
|
7682
7862
|
ModalFooter.displayName = "ModalFooter";
|
|
7683
7863
|
|
|
7684
7864
|
// src/components/tooltip.tsx
|
|
7685
7865
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
7686
|
-
var
|
|
7687
|
-
var
|
|
7866
|
+
var import_react46 = require("react");
|
|
7867
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
7688
7868
|
var TOOLTIP_DELAY_DURATION = 300;
|
|
7689
7869
|
function TooltipProvider({
|
|
7690
7870
|
delayDuration = TOOLTIP_DELAY_DURATION,
|
|
7691
7871
|
skipDelayDuration = 0,
|
|
7692
7872
|
...props
|
|
7693
7873
|
}) {
|
|
7694
|
-
return /* @__PURE__ */ (0,
|
|
7874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7695
7875
|
TooltipPrimitive.Provider,
|
|
7696
7876
|
{
|
|
7697
7877
|
delayDuration,
|
|
@@ -7702,7 +7882,7 @@ function TooltipProvider({
|
|
|
7702
7882
|
}
|
|
7703
7883
|
var Tooltip = TooltipPrimitive.Root;
|
|
7704
7884
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
7705
|
-
var TooltipContent = (0,
|
|
7885
|
+
var TooltipContent = (0, import_react46.forwardRef)(
|
|
7706
7886
|
({
|
|
7707
7887
|
className,
|
|
7708
7888
|
children,
|
|
@@ -7710,7 +7890,7 @@ var TooltipContent = (0, import_react44.forwardRef)(
|
|
|
7710
7890
|
collisionPadding = 8,
|
|
7711
7891
|
showArrow = true,
|
|
7712
7892
|
...props
|
|
7713
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
7893
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
7714
7894
|
TooltipPrimitive.Content,
|
|
7715
7895
|
{
|
|
7716
7896
|
ref,
|
|
@@ -7719,14 +7899,14 @@ var TooltipContent = (0, import_react44.forwardRef)(
|
|
|
7719
7899
|
className: cn("aviala-tooltip-content", className),
|
|
7720
7900
|
...props,
|
|
7721
7901
|
children: [
|
|
7722
|
-
/* @__PURE__ */ (0,
|
|
7723
|
-
showArrow ? /* @__PURE__ */ (0,
|
|
7902
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cn("aviala-tooltip-content__surface", typographyVariants({ level: "caption" })), children }),
|
|
7903
|
+
showArrow ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7724
7904
|
TooltipPrimitive.Arrow,
|
|
7725
7905
|
{
|
|
7726
7906
|
asChild: true,
|
|
7727
7907
|
width: TOOLTIP_POINTER.width,
|
|
7728
7908
|
height: TOOLTIP_POINTER.height,
|
|
7729
|
-
children: /* @__PURE__ */ (0,
|
|
7909
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7730
7910
|
OverlayPointerSvg,
|
|
7731
7911
|
{
|
|
7732
7912
|
className: "aviala-tooltip-content__arrow",
|
|
@@ -7743,11 +7923,71 @@ var TooltipContent = (0, import_react44.forwardRef)(
|
|
|
7743
7923
|
);
|
|
7744
7924
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
7745
7925
|
|
|
7926
|
+
// src/components/responsive-tooltip.tsx
|
|
7927
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
7928
|
+
function ResponsiveTooltip({
|
|
7929
|
+
content,
|
|
7930
|
+
children,
|
|
7931
|
+
side = "top",
|
|
7932
|
+
align = "center",
|
|
7933
|
+
sideOffset = 4,
|
|
7934
|
+
collisionPadding = 8,
|
|
7935
|
+
showArrow = true,
|
|
7936
|
+
delayDuration = TOOLTIP_DELAY_DURATION,
|
|
7937
|
+
open,
|
|
7938
|
+
defaultOpen,
|
|
7939
|
+
onOpenChange,
|
|
7940
|
+
contentClassName
|
|
7941
|
+
}) {
|
|
7942
|
+
const coarse = useCoarsePointer();
|
|
7943
|
+
if (coarse) {
|
|
7944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Popover, { open, defaultOpen, onOpenChange, children: [
|
|
7945
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopoverTrigger, { asChild: true, children }),
|
|
7946
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7947
|
+
PopoverContent,
|
|
7948
|
+
{
|
|
7949
|
+
side,
|
|
7950
|
+
align,
|
|
7951
|
+
sideOffset,
|
|
7952
|
+
collisionPadding,
|
|
7953
|
+
showArrow,
|
|
7954
|
+
className: contentClassName,
|
|
7955
|
+
children: content
|
|
7956
|
+
}
|
|
7957
|
+
)
|
|
7958
|
+
] });
|
|
7959
|
+
}
|
|
7960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
7961
|
+
Tooltip,
|
|
7962
|
+
{
|
|
7963
|
+
delayDuration,
|
|
7964
|
+
open,
|
|
7965
|
+
defaultOpen,
|
|
7966
|
+
onOpenChange,
|
|
7967
|
+
children: [
|
|
7968
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipTrigger, { asChild: true, children }),
|
|
7969
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7970
|
+
TooltipContent,
|
|
7971
|
+
{
|
|
7972
|
+
side,
|
|
7973
|
+
align,
|
|
7974
|
+
sideOffset,
|
|
7975
|
+
collisionPadding,
|
|
7976
|
+
showArrow,
|
|
7977
|
+
className: contentClassName,
|
|
7978
|
+
children: content
|
|
7979
|
+
}
|
|
7980
|
+
)
|
|
7981
|
+
]
|
|
7982
|
+
}
|
|
7983
|
+
);
|
|
7984
|
+
}
|
|
7985
|
+
|
|
7746
7986
|
// src/components/feedback.tsx
|
|
7747
7987
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
7748
7988
|
var import_icons16 = require("@aviala-design/icons");
|
|
7749
|
-
var
|
|
7750
|
-
var
|
|
7989
|
+
var import_react47 = require("react");
|
|
7990
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
7751
7991
|
var FEEDBACK_ICON_SIZE = 22;
|
|
7752
7992
|
var feedbackVariants = (0, import_class_variance_authority11.cva)("aviala-feedback", {
|
|
7753
7993
|
variants: {
|
|
@@ -7775,7 +8015,7 @@ var feedbackVariants = (0, import_class_variance_authority11.cva)("aviala-feedba
|
|
|
7775
8015
|
});
|
|
7776
8016
|
function renderFeedbackIcon(node) {
|
|
7777
8017
|
if (!node) return null;
|
|
7778
|
-
const content = (0,
|
|
8018
|
+
const content = (0, import_react47.isValidElement)(node) && typeof node.type !== "string" ? (0, import_react47.cloneElement)(node, {
|
|
7779
8019
|
width: FEEDBACK_ICON_SIZE,
|
|
7780
8020
|
height: FEEDBACK_ICON_SIZE,
|
|
7781
8021
|
className: cn(
|
|
@@ -7783,25 +8023,25 @@ function renderFeedbackIcon(node) {
|
|
|
7783
8023
|
"shrink-0"
|
|
7784
8024
|
)
|
|
7785
8025
|
}) : node;
|
|
7786
|
-
return /* @__PURE__ */ (0,
|
|
8026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "aviala-feedback__icon", "aria-hidden": true, children: content });
|
|
7787
8027
|
}
|
|
7788
8028
|
function defaultStatusIcon(type, mode) {
|
|
7789
8029
|
const iconMode = mode === "primary" ? "fill" : "fill";
|
|
7790
8030
|
const thickness = "Regular";
|
|
7791
8031
|
switch (type) {
|
|
7792
8032
|
case "information":
|
|
7793
|
-
return /* @__PURE__ */ (0,
|
|
8033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons16.SymbolInformationCircle, { thickness, mode: iconMode, "aria-hidden": true });
|
|
7794
8034
|
case "warning":
|
|
7795
|
-
return /* @__PURE__ */ (0,
|
|
8035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons16.SymbolWarningCircle, { thickness, mode: iconMode, "aria-hidden": true });
|
|
7796
8036
|
case "wrong":
|
|
7797
|
-
return /* @__PURE__ */ (0,
|
|
8037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons16.SymbolWrongCircle, { thickness, mode: iconMode, "aria-hidden": true });
|
|
7798
8038
|
case "success":
|
|
7799
|
-
return /* @__PURE__ */ (0,
|
|
8039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons16.SymbolRightCircle, { thickness, mode: iconMode, "aria-hidden": true });
|
|
7800
8040
|
case "normal":
|
|
7801
|
-
return /* @__PURE__ */ (0,
|
|
8041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons16.GeneralNotification, { thickness, mode: "default", "aria-hidden": true });
|
|
7802
8042
|
}
|
|
7803
8043
|
}
|
|
7804
|
-
var Feedback = (0,
|
|
8044
|
+
var Feedback = (0, import_react47.forwardRef)(
|
|
7805
8045
|
({
|
|
7806
8046
|
className,
|
|
7807
8047
|
type = "information",
|
|
@@ -7823,7 +8063,7 @@ var Feedback = (0, import_react45.forwardRef)(
|
|
|
7823
8063
|
const tone = mode === "primary" ? "white" : "default";
|
|
7824
8064
|
const isSmall = resolvedSize === "small";
|
|
7825
8065
|
const resolvedRole = resolvedType === "wrong" ? "alert" : "status";
|
|
7826
|
-
return /* @__PURE__ */ (0,
|
|
8066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7827
8067
|
"div",
|
|
7828
8068
|
{
|
|
7829
8069
|
ref,
|
|
@@ -7837,9 +8077,9 @@ var Feedback = (0, import_react45.forwardRef)(
|
|
|
7837
8077
|
"data-size": resolvedSize,
|
|
7838
8078
|
"data-mode": mode,
|
|
7839
8079
|
...props,
|
|
7840
|
-
children: /* @__PURE__ */ (0,
|
|
8080
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "aviala-feedback__body", children: [
|
|
7841
8081
|
renderFeedbackIcon(icon ?? defaultStatusIcon(resolvedType, mode)),
|
|
7842
|
-
isSmall ? /* @__PURE__ */ (0,
|
|
8082
|
+
isSmall ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Typography, { level: "text", tone, className: "aviala-feedback__title", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7843
8083
|
Typeface,
|
|
7844
8084
|
{
|
|
7845
8085
|
className: "aviala-feedback__typeface",
|
|
@@ -7849,7 +8089,7 @@ var Feedback = (0, import_react45.forwardRef)(
|
|
|
7849
8089
|
tone
|
|
7850
8090
|
}
|
|
7851
8091
|
),
|
|
7852
|
-
action ? /* @__PURE__ */ (0,
|
|
8092
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7853
8093
|
Link,
|
|
7854
8094
|
{
|
|
7855
8095
|
level: "text",
|
|
@@ -7865,7 +8105,7 @@ var Feedback = (0, import_react45.forwardRef)(
|
|
|
7865
8105
|
children: action
|
|
7866
8106
|
}
|
|
7867
8107
|
) : null,
|
|
7868
|
-
showClose ? /* @__PURE__ */ (0,
|
|
8108
|
+
showClose ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7869
8109
|
Link,
|
|
7870
8110
|
{
|
|
7871
8111
|
level: "text",
|
|
@@ -7874,7 +8114,7 @@ var Feedback = (0, import_react45.forwardRef)(
|
|
|
7874
8114
|
href: onClose ? "#" : void 0,
|
|
7875
8115
|
"aria-label": closeLabel,
|
|
7876
8116
|
className: "aviala-feedback__close",
|
|
7877
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
8117
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons16.SymbolWrong, { "aria-hidden": true }),
|
|
7878
8118
|
onClick: (event) => {
|
|
7879
8119
|
if (onClose) {
|
|
7880
8120
|
event.preventDefault();
|
|
@@ -7893,8 +8133,8 @@ Feedback.displayName = "Feedback";
|
|
|
7893
8133
|
// src/components/alert.tsx
|
|
7894
8134
|
var import_icons17 = require("@aviala-design/icons");
|
|
7895
8135
|
var import_class_variance_authority12 = require("class-variance-authority");
|
|
7896
|
-
var
|
|
7897
|
-
var
|
|
8136
|
+
var import_react48 = require("react");
|
|
8137
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
7898
8138
|
var ALERT_ICON_SIZE = 16;
|
|
7899
8139
|
var alertVariants = (0, import_class_variance_authority12.cva)("aviala-alert", {
|
|
7900
8140
|
variants: {
|
|
@@ -7922,7 +8162,7 @@ var alertVariants = (0, import_class_variance_authority12.cva)("aviala-alert", {
|
|
|
7922
8162
|
});
|
|
7923
8163
|
function renderAlertIcon(node) {
|
|
7924
8164
|
if (!node) return null;
|
|
7925
|
-
const content = (0,
|
|
8165
|
+
const content = (0, import_react48.isValidElement)(node) && typeof node.type !== "string" ? (0, import_react48.cloneElement)(node, {
|
|
7926
8166
|
width: ALERT_ICON_SIZE,
|
|
7927
8167
|
height: ALERT_ICON_SIZE,
|
|
7928
8168
|
className: cn(
|
|
@@ -7930,23 +8170,23 @@ function renderAlertIcon(node) {
|
|
|
7930
8170
|
"shrink-0"
|
|
7931
8171
|
)
|
|
7932
8172
|
}) : node;
|
|
7933
|
-
return /* @__PURE__ */ (0,
|
|
8173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "aviala-alert__icon", "aria-hidden": true, children: content });
|
|
7934
8174
|
}
|
|
7935
8175
|
function defaultStatusIcon2(type) {
|
|
7936
8176
|
const iconProps = { thickness: "Regular", mode: "fill", "aria-hidden": true };
|
|
7937
8177
|
switch (type) {
|
|
7938
8178
|
case "info":
|
|
7939
8179
|
case "neutral":
|
|
7940
|
-
return /* @__PURE__ */ (0,
|
|
8180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons17.SymbolInformationCircle, { ...iconProps });
|
|
7941
8181
|
case "warning":
|
|
7942
|
-
return /* @__PURE__ */ (0,
|
|
8182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons17.SymbolWarningCircle, { ...iconProps });
|
|
7943
8183
|
case "error":
|
|
7944
|
-
return /* @__PURE__ */ (0,
|
|
8184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons17.SymbolWrongCircle, { ...iconProps });
|
|
7945
8185
|
case "success":
|
|
7946
|
-
return /* @__PURE__ */ (0,
|
|
8186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons17.SymbolRightCircle, { ...iconProps });
|
|
7947
8187
|
}
|
|
7948
8188
|
}
|
|
7949
|
-
var Alert = (0,
|
|
8189
|
+
var Alert = (0, import_react48.forwardRef)(
|
|
7950
8190
|
({
|
|
7951
8191
|
className,
|
|
7952
8192
|
type = "info",
|
|
@@ -7972,7 +8212,7 @@ var Alert = (0, import_react46.forwardRef)(
|
|
|
7972
8212
|
const resolvedType = type ?? "info";
|
|
7973
8213
|
const resolvedRole = resolvedType === "error" ? "alert" : "status";
|
|
7974
8214
|
const hasActions = showActions && (action || secondaryAction);
|
|
7975
|
-
return /* @__PURE__ */ (0,
|
|
8215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
7976
8216
|
"div",
|
|
7977
8217
|
{
|
|
7978
8218
|
ref,
|
|
@@ -7984,9 +8224,9 @@ var Alert = (0, import_react46.forwardRef)(
|
|
|
7984
8224
|
"data-appearance": appearance,
|
|
7985
8225
|
...props,
|
|
7986
8226
|
children: [
|
|
7987
|
-
/* @__PURE__ */ (0,
|
|
8227
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "aviala-alert__body", children: [
|
|
7988
8228
|
showIcon ? renderAlertIcon(icon ?? defaultStatusIcon2(resolvedType)) : null,
|
|
7989
|
-
isSmall ? /* @__PURE__ */ (0,
|
|
8229
|
+
isSmall ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Typography, { level: "text", className: "aviala-alert__title", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7990
8230
|
Typeface,
|
|
7991
8231
|
{
|
|
7992
8232
|
className: "aviala-alert__typeface",
|
|
@@ -7995,7 +8235,7 @@ var Alert = (0, import_react46.forwardRef)(
|
|
|
7995
8235
|
secondary: description
|
|
7996
8236
|
}
|
|
7997
8237
|
),
|
|
7998
|
-
quickAction ? /* @__PURE__ */ (0,
|
|
8238
|
+
quickAction ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7999
8239
|
Link,
|
|
8000
8240
|
{
|
|
8001
8241
|
level: "text",
|
|
@@ -8011,7 +8251,7 @@ var Alert = (0, import_react46.forwardRef)(
|
|
|
8011
8251
|
children: quickAction
|
|
8012
8252
|
}
|
|
8013
8253
|
) : null,
|
|
8014
|
-
dismissible ? /* @__PURE__ */ (0,
|
|
8254
|
+
dismissible ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
8015
8255
|
Link,
|
|
8016
8256
|
{
|
|
8017
8257
|
level: "text",
|
|
@@ -8020,7 +8260,7 @@ var Alert = (0, import_react46.forwardRef)(
|
|
|
8020
8260
|
href: onDismiss ? "#" : void 0,
|
|
8021
8261
|
"aria-label": closeLabel,
|
|
8022
8262
|
className: "aviala-alert__close",
|
|
8023
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
8263
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons17.SymbolWrong, { "aria-hidden": true }),
|
|
8024
8264
|
onClick: (event) => {
|
|
8025
8265
|
if (onDismiss) {
|
|
8026
8266
|
event.preventDefault();
|
|
@@ -8030,8 +8270,8 @@ var Alert = (0, import_react46.forwardRef)(
|
|
|
8030
8270
|
}
|
|
8031
8271
|
) : null
|
|
8032
8272
|
] }),
|
|
8033
|
-
hasActions ? /* @__PURE__ */ (0,
|
|
8034
|
-
action ? /* @__PURE__ */ (0,
|
|
8273
|
+
hasActions ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "aviala-alert__actions", children: [
|
|
8274
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
8035
8275
|
Link,
|
|
8036
8276
|
{
|
|
8037
8277
|
level: "caption",
|
|
@@ -8047,7 +8287,7 @@ var Alert = (0, import_react46.forwardRef)(
|
|
|
8047
8287
|
children: action
|
|
8048
8288
|
}
|
|
8049
8289
|
) : null,
|
|
8050
|
-
secondaryAction ? /* @__PURE__ */ (0,
|
|
8290
|
+
secondaryAction ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
8051
8291
|
Link,
|
|
8052
8292
|
{
|
|
8053
8293
|
level: "caption",
|
|
@@ -8073,31 +8313,31 @@ Alert.displayName = "Alert";
|
|
|
8073
8313
|
|
|
8074
8314
|
// src/components/list.tsx
|
|
8075
8315
|
var import_icons18 = require("@aviala-design/icons");
|
|
8076
|
-
var
|
|
8077
|
-
var
|
|
8078
|
-
var List = (0,
|
|
8079
|
-
({ className, title, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8080
|
-
title != null ? /* @__PURE__ */ (0,
|
|
8081
|
-
/* @__PURE__ */ (0,
|
|
8316
|
+
var import_react49 = require("react");
|
|
8317
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
8318
|
+
var List = (0, import_react49.forwardRef)(
|
|
8319
|
+
({ className, title, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { ref, className: cn("aviala-list", className), ...props, children: [
|
|
8320
|
+
title != null ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ListTitle, { children: title }) : null,
|
|
8321
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ListGroup, { children })
|
|
8082
8322
|
] })
|
|
8083
8323
|
);
|
|
8084
8324
|
List.displayName = "List";
|
|
8085
|
-
var ListTitle = (0,
|
|
8086
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8325
|
+
var ListTitle = (0, import_react49.forwardRef)(
|
|
8326
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { ref, className: cn("aviala-list-title", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: cn(typographyVariants({ level: "text" })), children }) })
|
|
8087
8327
|
);
|
|
8088
8328
|
ListTitle.displayName = "ListTitle";
|
|
8089
|
-
var ListGroup = (0,
|
|
8090
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8329
|
+
var ListGroup = (0, import_react49.forwardRef)(
|
|
8330
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { ref, className: cn("aviala-list-group", className), role: "list", ...props, children })
|
|
8091
8331
|
);
|
|
8092
8332
|
ListGroup.displayName = "ListGroup";
|
|
8093
8333
|
function ListItemGroup({ label, children, className }) {
|
|
8094
|
-
return /* @__PURE__ */ (0,
|
|
8095
|
-
label != null ? /* @__PURE__ */ (0,
|
|
8096
|
-
/* @__PURE__ */ (0,
|
|
8334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("aviala-list", className), children: [
|
|
8335
|
+
label != null ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ListTitle, { children: label }) : null,
|
|
8336
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ListGroup, { children })
|
|
8097
8337
|
] });
|
|
8098
8338
|
}
|
|
8099
|
-
var ListDivider = (0,
|
|
8100
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8339
|
+
var ListDivider = (0, import_react49.forwardRef)(
|
|
8340
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8101
8341
|
"span",
|
|
8102
8342
|
{
|
|
8103
8343
|
ref,
|
|
@@ -8108,15 +8348,15 @@ var ListDivider = (0, import_react47.forwardRef)(
|
|
|
8108
8348
|
)
|
|
8109
8349
|
);
|
|
8110
8350
|
ListDivider.displayName = "ListDivider";
|
|
8111
|
-
var ListSeparator = (0,
|
|
8112
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8351
|
+
var ListSeparator = (0, import_react49.forwardRef)(
|
|
8352
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("hr", { ref, className: cn("aviala-list-separator", className), ...props })
|
|
8113
8353
|
);
|
|
8114
8354
|
ListSeparator.displayName = "ListSeparator";
|
|
8115
8355
|
function renderLeadingIcon(node, leading) {
|
|
8116
8356
|
if (leading === "none") return null;
|
|
8117
8357
|
const iconSize = leading === "shaped" ? 20 : 22;
|
|
8118
|
-
const content = node ?? (leading === "shaped" ? /* @__PURE__ */ (0,
|
|
8119
|
-
const rendered = (0,
|
|
8358
|
+
const content = node ?? (leading === "shaped" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons18.GeneralSetting, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons18.GeneralSetting, { "aria-hidden": true }));
|
|
8359
|
+
const rendered = (0, import_react49.isValidElement)(content) && typeof content.type !== "string" ? (0, import_react49.cloneElement)(content, {
|
|
8120
8360
|
width: iconSize,
|
|
8121
8361
|
height: iconSize,
|
|
8122
8362
|
className: cn(
|
|
@@ -8124,7 +8364,7 @@ function renderLeadingIcon(node, leading) {
|
|
|
8124
8364
|
"shrink-0"
|
|
8125
8365
|
)
|
|
8126
8366
|
}) : content;
|
|
8127
|
-
return /* @__PURE__ */ (0,
|
|
8367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "aviala-list-item__icon", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8128
8368
|
"span",
|
|
8129
8369
|
{
|
|
8130
8370
|
className: cn(
|
|
@@ -8134,7 +8374,7 @@ function renderLeadingIcon(node, leading) {
|
|
|
8134
8374
|
}
|
|
8135
8375
|
) });
|
|
8136
8376
|
}
|
|
8137
|
-
var ListItem = (0,
|
|
8377
|
+
var ListItem = (0, import_react49.forwardRef)(
|
|
8138
8378
|
({
|
|
8139
8379
|
className,
|
|
8140
8380
|
itemType = "select",
|
|
@@ -8155,44 +8395,44 @@ var ListItem = (0, import_react47.forwardRef)(
|
|
|
8155
8395
|
...props
|
|
8156
8396
|
}, ref) => {
|
|
8157
8397
|
const isInteractive = interactive ?? onClick != null;
|
|
8158
|
-
const primaryAction = action ?? /* @__PURE__ */ (0,
|
|
8398
|
+
const primaryAction = action ?? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons18.GeneralSetting, { "aria-hidden": true }), children: actionLabel });
|
|
8159
8399
|
const renderTrailing = () => {
|
|
8160
8400
|
if (trailing !== void 0) return trailing;
|
|
8161
8401
|
switch (itemType) {
|
|
8162
8402
|
case "action":
|
|
8163
|
-
return /* @__PURE__ */ (0,
|
|
8164
|
-
/* @__PURE__ */ (0,
|
|
8403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "aviala-list-item__more", children: [
|
|
8404
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "aviala-list-item__trailing", children: [
|
|
8165
8405
|
primaryAction,
|
|
8166
|
-
secondaryAction ?? /* @__PURE__ */ (0,
|
|
8406
|
+
secondaryAction ?? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8167
8407
|
Button,
|
|
8168
8408
|
{
|
|
8169
8409
|
mode: "default",
|
|
8170
8410
|
size: "regular",
|
|
8171
8411
|
iconOnly: true,
|
|
8172
8412
|
"aria-label": "More",
|
|
8173
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
8413
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons18.GeneralSetting, { "aria-hidden": true })
|
|
8174
8414
|
}
|
|
8175
8415
|
)
|
|
8176
8416
|
] }),
|
|
8177
|
-
/* @__PURE__ */ (0,
|
|
8178
|
-
/* @__PURE__ */ (0,
|
|
8417
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ListDivider, {}),
|
|
8418
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "aviala-list-item__chevron", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons18.DirectionArrowRightLight, { width: 18, height: 18 }) })
|
|
8179
8419
|
] });
|
|
8180
8420
|
case "switch":
|
|
8181
|
-
return /* @__PURE__ */ (0,
|
|
8421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "aviala-list-item__trailing", children: [
|
|
8182
8422
|
primaryAction,
|
|
8183
|
-
/* @__PURE__ */ (0,
|
|
8184
|
-
/* @__PURE__ */ (0,
|
|
8423
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ListDivider, {}),
|
|
8424
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Switch, { ...switchProps })
|
|
8185
8425
|
] });
|
|
8186
8426
|
case "select":
|
|
8187
8427
|
default:
|
|
8188
|
-
return /* @__PURE__ */ (0,
|
|
8428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "aviala-list-item__trailing", children: [
|
|
8189
8429
|
primaryAction,
|
|
8190
|
-
/* @__PURE__ */ (0,
|
|
8191
|
-
/* @__PURE__ */ (0,
|
|
8430
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ListDivider, {}),
|
|
8431
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "aviala-list-item__select", children: select })
|
|
8192
8432
|
] });
|
|
8193
8433
|
}
|
|
8194
8434
|
};
|
|
8195
|
-
return /* @__PURE__ */ (0,
|
|
8435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
8196
8436
|
"div",
|
|
8197
8437
|
{
|
|
8198
8438
|
ref,
|
|
@@ -8207,8 +8447,8 @@ var ListItem = (0, import_react47.forwardRef)(
|
|
|
8207
8447
|
...props,
|
|
8208
8448
|
children: [
|
|
8209
8449
|
renderLeadingIcon(icon, leading),
|
|
8210
|
-
/* @__PURE__ */ (0,
|
|
8211
|
-
/* @__PURE__ */ (0,
|
|
8450
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "aviala-list-item__body", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "aviala-list-item__content", children: [
|
|
8451
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "aviala-list-item__head", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Typeface, { content: "textCaption", primary: title, secondary: subtitle }) }),
|
|
8212
8452
|
renderTrailing()
|
|
8213
8453
|
] }) })
|
|
8214
8454
|
]
|
|
@@ -8221,14 +8461,14 @@ ListItem.displayName = "ListItem";
|
|
|
8221
8461
|
// src/components/navigation.tsx
|
|
8222
8462
|
var PopoverPrimitive7 = __toESM(require("@radix-ui/react-popover"), 1);
|
|
8223
8463
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
8224
|
-
var
|
|
8225
|
-
var
|
|
8464
|
+
var import_react50 = require("react");
|
|
8465
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
8226
8466
|
function navigationItemButtonMode(active) {
|
|
8227
8467
|
return active ? "second" : "noBackgroundCustom";
|
|
8228
8468
|
}
|
|
8229
|
-
var NavigationDirectionContext = (0,
|
|
8469
|
+
var NavigationDirectionContext = (0, import_react50.createContext)("vertical");
|
|
8230
8470
|
function useNavigationDirection() {
|
|
8231
|
-
return (0,
|
|
8471
|
+
return (0, import_react50.useContext)(NavigationDirectionContext);
|
|
8232
8472
|
}
|
|
8233
8473
|
var NAVIGATION_ANIMATION_MS_FALLBACK = 300;
|
|
8234
8474
|
var NAVIGATION_ANIMATION_EASING_FALLBACK = "cubic-bezier(0.33, 1, 0.68, 1)";
|
|
@@ -8287,11 +8527,17 @@ function measureNavigationIndicator(group, direction) {
|
|
|
8287
8527
|
50
|
|
8288
8528
|
);
|
|
8289
8529
|
if (direction === "vertical") {
|
|
8530
|
+
let inset = railInset;
|
|
8531
|
+
if (item.matches(":active")) {
|
|
8532
|
+
inset = readIndicatorToken(group, "--navigation-rail-inset-press", 9);
|
|
8533
|
+
} else if (item.matches(":hover")) {
|
|
8534
|
+
inset = readIndicatorToken(group, "--navigation-rail-inset-hover", 3);
|
|
8535
|
+
}
|
|
8290
8536
|
return {
|
|
8291
8537
|
x: railLeft,
|
|
8292
|
-
y: itemRect.top - groupRect.top +
|
|
8538
|
+
y: itemRect.top - groupRect.top + inset,
|
|
8293
8539
|
width: railWidth,
|
|
8294
|
-
height: Math.max(0, itemRect.height -
|
|
8540
|
+
height: Math.max(0, itemRect.height - inset * 2),
|
|
8295
8541
|
visible: true
|
|
8296
8542
|
};
|
|
8297
8543
|
}
|
|
@@ -8382,21 +8628,21 @@ function runIndicatorAnimation(el, group, start, next, durationMs, easing, gener
|
|
|
8382
8628
|
};
|
|
8383
8629
|
}
|
|
8384
8630
|
function useNavigationIndicator(groupRef, direction, layoutKey) {
|
|
8385
|
-
const indicatorRef = (0,
|
|
8386
|
-
const metricsRef = (0,
|
|
8387
|
-
const animationRef = (0,
|
|
8388
|
-
const animationGenerationRef = (0,
|
|
8389
|
-
const isAnimatingRef = (0,
|
|
8390
|
-
const layoutTrackingFrameRef = (0,
|
|
8391
|
-
const isLayoutTrackingRef = (0,
|
|
8392
|
-
const isInitialMount = (0,
|
|
8393
|
-
const [activeRevision, setActiveRevision] = (0,
|
|
8394
|
-
const measureIndicator = (0,
|
|
8631
|
+
const indicatorRef = (0, import_react50.useRef)(null);
|
|
8632
|
+
const metricsRef = (0, import_react50.useRef)(null);
|
|
8633
|
+
const animationRef = (0, import_react50.useRef)(null);
|
|
8634
|
+
const animationGenerationRef = (0, import_react50.useRef)(0);
|
|
8635
|
+
const isAnimatingRef = (0, import_react50.useRef)(false);
|
|
8636
|
+
const layoutTrackingFrameRef = (0, import_react50.useRef)(null);
|
|
8637
|
+
const isLayoutTrackingRef = (0, import_react50.useRef)(false);
|
|
8638
|
+
const isInitialMount = (0, import_react50.useRef)(true);
|
|
8639
|
+
const [activeRevision, setActiveRevision] = (0, import_react50.useState)(0);
|
|
8640
|
+
const measureIndicator = (0, import_react50.useCallback)(() => {
|
|
8395
8641
|
const group = groupRef.current;
|
|
8396
8642
|
if (!group) return null;
|
|
8397
8643
|
return measureNavigationIndicator(group, direction);
|
|
8398
8644
|
}, [direction, groupRef]);
|
|
8399
|
-
const syncIndicator = (0,
|
|
8645
|
+
const syncIndicator = (0, import_react50.useCallback)(
|
|
8400
8646
|
(metrics, instant = false) => {
|
|
8401
8647
|
metricsRef.current = metrics;
|
|
8402
8648
|
const el = indicatorRef.current;
|
|
@@ -8404,14 +8650,14 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
|
|
|
8404
8650
|
},
|
|
8405
8651
|
[]
|
|
8406
8652
|
);
|
|
8407
|
-
const cancelLayoutTracking = (0,
|
|
8653
|
+
const cancelLayoutTracking = (0, import_react50.useCallback)(() => {
|
|
8408
8654
|
if (layoutTrackingFrameRef.current != null) {
|
|
8409
8655
|
cancelAnimationFrame(layoutTrackingFrameRef.current);
|
|
8410
8656
|
layoutTrackingFrameRef.current = null;
|
|
8411
8657
|
}
|
|
8412
8658
|
isLayoutTrackingRef.current = false;
|
|
8413
8659
|
}, []);
|
|
8414
|
-
const remeasureIndicator = (0,
|
|
8660
|
+
const remeasureIndicator = (0, import_react50.useCallback)(() => {
|
|
8415
8661
|
if (isLayoutTrackingRef.current) return;
|
|
8416
8662
|
const metrics = measureIndicator();
|
|
8417
8663
|
if (!metrics) return;
|
|
@@ -8420,7 +8666,7 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
|
|
|
8420
8666
|
isAnimatingRef.current = false;
|
|
8421
8667
|
syncIndicator(metrics, true);
|
|
8422
8668
|
}, [measureIndicator, syncIndicator]);
|
|
8423
|
-
const startExpandCollapseTracking = (0,
|
|
8669
|
+
const startExpandCollapseTracking = (0, import_react50.useCallback)(() => {
|
|
8424
8670
|
const group = groupRef.current;
|
|
8425
8671
|
const el = indicatorRef.current;
|
|
8426
8672
|
if (!group || !el) return;
|
|
@@ -8477,14 +8723,14 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
|
|
|
8477
8723
|
};
|
|
8478
8724
|
layoutTrackingFrameRef.current = requestAnimationFrame(tick);
|
|
8479
8725
|
}, [cancelLayoutTracking, groupRef, measureIndicator, syncIndicator]);
|
|
8480
|
-
const onIndicatorRef = (0,
|
|
8726
|
+
const onIndicatorRef = (0, import_react50.useCallback)((node) => {
|
|
8481
8727
|
indicatorRef.current = node;
|
|
8482
8728
|
if (node && metricsRef.current && isInitialMount.current) {
|
|
8483
8729
|
applyIndicatorMetrics(node, metricsRef.current, true);
|
|
8484
8730
|
isInitialMount.current = false;
|
|
8485
8731
|
}
|
|
8486
8732
|
}, []);
|
|
8487
|
-
(0,
|
|
8733
|
+
(0, import_react50.useLayoutEffect)(() => {
|
|
8488
8734
|
const group = groupRef.current;
|
|
8489
8735
|
const next = measureIndicator();
|
|
8490
8736
|
if (!next) return;
|
|
@@ -8532,7 +8778,7 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
|
|
|
8532
8778
|
syncIndicator,
|
|
8533
8779
|
groupRef
|
|
8534
8780
|
]);
|
|
8535
|
-
(0,
|
|
8781
|
+
(0, import_react50.useLayoutEffect)(() => {
|
|
8536
8782
|
const group = groupRef.current;
|
|
8537
8783
|
if (!group) return;
|
|
8538
8784
|
const observer = new MutationObserver((mutations) => {
|
|
@@ -8589,9 +8835,35 @@ function useNavigationIndicator(groupRef, direction, layoutKey) {
|
|
|
8589
8835
|
startExpandCollapseTracking,
|
|
8590
8836
|
syncIndicator
|
|
8591
8837
|
]);
|
|
8838
|
+
(0, import_react50.useEffect)(() => {
|
|
8839
|
+
if (direction !== "vertical") return;
|
|
8840
|
+
const group = groupRef.current;
|
|
8841
|
+
if (!group) return;
|
|
8842
|
+
const refreshInteractionMetrics = () => {
|
|
8843
|
+
if (isLayoutTrackingRef.current || isAnimatingRef.current) return;
|
|
8844
|
+
const metrics = measureIndicator();
|
|
8845
|
+
if (!metrics) return;
|
|
8846
|
+
if (metricsRef.current && metricsApproxEqual2(metrics, metricsRef.current)) {
|
|
8847
|
+
return;
|
|
8848
|
+
}
|
|
8849
|
+
syncIndicator(metrics, false);
|
|
8850
|
+
};
|
|
8851
|
+
group.addEventListener("pointerover", refreshInteractionMetrics);
|
|
8852
|
+
group.addEventListener("pointerout", refreshInteractionMetrics);
|
|
8853
|
+
group.addEventListener("pointerdown", refreshInteractionMetrics);
|
|
8854
|
+
group.addEventListener("pointerup", refreshInteractionMetrics);
|
|
8855
|
+
group.addEventListener("pointercancel", refreshInteractionMetrics);
|
|
8856
|
+
return () => {
|
|
8857
|
+
group.removeEventListener("pointerover", refreshInteractionMetrics);
|
|
8858
|
+
group.removeEventListener("pointerout", refreshInteractionMetrics);
|
|
8859
|
+
group.removeEventListener("pointerdown", refreshInteractionMetrics);
|
|
8860
|
+
group.removeEventListener("pointerup", refreshInteractionMetrics);
|
|
8861
|
+
group.removeEventListener("pointercancel", refreshInteractionMetrics);
|
|
8862
|
+
};
|
|
8863
|
+
}, [direction, groupRef, measureIndicator, syncIndicator]);
|
|
8592
8864
|
return onIndicatorRef;
|
|
8593
8865
|
}
|
|
8594
|
-
var Navigation = (0,
|
|
8866
|
+
var Navigation = (0, import_react50.forwardRef)(
|
|
8595
8867
|
({
|
|
8596
8868
|
className,
|
|
8597
8869
|
as: Tag2 = "nav",
|
|
@@ -8599,7 +8871,7 @@ var Navigation = (0, import_react48.forwardRef)(
|
|
|
8599
8871
|
direction = "vertical",
|
|
8600
8872
|
dividingLine = false,
|
|
8601
8873
|
...props
|
|
8602
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
8874
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NavigationDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8603
8875
|
Tag2,
|
|
8604
8876
|
{
|
|
8605
8877
|
ref,
|
|
@@ -8612,8 +8884,8 @@ var Navigation = (0, import_react48.forwardRef)(
|
|
|
8612
8884
|
) })
|
|
8613
8885
|
);
|
|
8614
8886
|
Navigation.displayName = "Navigation";
|
|
8615
|
-
var NavigationBrand = (0,
|
|
8616
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8887
|
+
var NavigationBrand = (0, import_react50.forwardRef)(
|
|
8888
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8617
8889
|
"div",
|
|
8618
8890
|
{
|
|
8619
8891
|
ref,
|
|
@@ -8623,40 +8895,40 @@ var NavigationBrand = (0, import_react48.forwardRef)(
|
|
|
8623
8895
|
)
|
|
8624
8896
|
);
|
|
8625
8897
|
NavigationBrand.displayName = "NavigationBrand";
|
|
8626
|
-
var NavigationBrandTitle = (0,
|
|
8898
|
+
var NavigationBrandTitle = (0, import_react50.forwardRef)(({ className, asChild = false, children, ...props }, ref) => {
|
|
8627
8899
|
const Comp = asChild ? import_react_slot5.Slot : "a";
|
|
8628
|
-
return /* @__PURE__ */ (0,
|
|
8900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8629
8901
|
Comp,
|
|
8630
8902
|
{
|
|
8631
8903
|
ref,
|
|
8632
8904
|
className: cn("aviala-navigation-brand__title aviala-focus-ring", className),
|
|
8633
8905
|
...props,
|
|
8634
|
-
children: asChild ? children : /* @__PURE__ */ (0,
|
|
8906
|
+
children: asChild ? children : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Typography, { level: "text", as: "span", children })
|
|
8635
8907
|
}
|
|
8636
8908
|
);
|
|
8637
8909
|
});
|
|
8638
8910
|
NavigationBrandTitle.displayName = "NavigationBrandTitle";
|
|
8639
|
-
var NavigationSection = (0,
|
|
8911
|
+
var NavigationSection = (0, import_react50.forwardRef)(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8640
8912
|
"div",
|
|
8641
8913
|
{
|
|
8642
8914
|
ref,
|
|
8643
8915
|
className: cn("aviala-navigation-section", className),
|
|
8644
8916
|
...props,
|
|
8645
|
-
children: /* @__PURE__ */ (0,
|
|
8917
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Typography, { level: "caption", as: "p", children })
|
|
8646
8918
|
}
|
|
8647
8919
|
));
|
|
8648
8920
|
NavigationSection.displayName = "NavigationSection";
|
|
8649
|
-
var NavigationGroup = (0,
|
|
8921
|
+
var NavigationGroup = (0, import_react50.forwardRef)(
|
|
8650
8922
|
({ className, children, ...props }, ref) => {
|
|
8651
8923
|
const direction = useNavigationDirection();
|
|
8652
8924
|
const layoutKey = useThemeLayoutKey();
|
|
8653
|
-
const groupRef = (0,
|
|
8925
|
+
const groupRef = (0, import_react50.useRef)(null);
|
|
8654
8926
|
const onIndicatorRef = useNavigationIndicator(
|
|
8655
8927
|
groupRef,
|
|
8656
8928
|
direction,
|
|
8657
8929
|
layoutKey
|
|
8658
8930
|
);
|
|
8659
|
-
const setRefs = (0,
|
|
8931
|
+
const setRefs = (0, import_react50.useCallback)(
|
|
8660
8932
|
(node) => {
|
|
8661
8933
|
groupRef.current = node;
|
|
8662
8934
|
if (typeof ref === "function") {
|
|
@@ -8667,14 +8939,14 @@ var NavigationGroup = (0, import_react48.forwardRef)(
|
|
|
8667
8939
|
},
|
|
8668
8940
|
[ref]
|
|
8669
8941
|
);
|
|
8670
|
-
return /* @__PURE__ */ (0,
|
|
8942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
8671
8943
|
"div",
|
|
8672
8944
|
{
|
|
8673
8945
|
ref: setRefs,
|
|
8674
8946
|
className: cn("aviala-navigation-group", className),
|
|
8675
8947
|
...props,
|
|
8676
8948
|
children: [
|
|
8677
|
-
/* @__PURE__ */ (0,
|
|
8949
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8678
8950
|
"span",
|
|
8679
8951
|
{
|
|
8680
8952
|
ref: onIndicatorRef,
|
|
@@ -8690,17 +8962,17 @@ var NavigationGroup = (0, import_react48.forwardRef)(
|
|
|
8690
8962
|
}
|
|
8691
8963
|
);
|
|
8692
8964
|
NavigationGroup.displayName = "NavigationGroup";
|
|
8693
|
-
var NavigationItemGroup = (0,
|
|
8965
|
+
var NavigationItemGroup = (0, import_react50.forwardRef)(({ className, expanded, children, ...props }, ref) => {
|
|
8694
8966
|
const isCollapsible = expanded !== void 0;
|
|
8695
8967
|
const isCollapsed = isCollapsible && !expanded;
|
|
8696
|
-
const innerRef = (0,
|
|
8697
|
-
(0,
|
|
8968
|
+
const innerRef = (0, import_react50.useRef)(null);
|
|
8969
|
+
(0, import_react50.useLayoutEffect)(() => {
|
|
8698
8970
|
const inner = innerRef.current;
|
|
8699
8971
|
if (!inner) return;
|
|
8700
8972
|
if (isCollapsed) inner.setAttribute("inert", "");
|
|
8701
8973
|
else inner.removeAttribute("inert");
|
|
8702
8974
|
}, [isCollapsed]);
|
|
8703
|
-
return /* @__PURE__ */ (0,
|
|
8975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8704
8976
|
"div",
|
|
8705
8977
|
{
|
|
8706
8978
|
ref,
|
|
@@ -8708,7 +8980,7 @@ var NavigationItemGroup = (0, import_react48.forwardRef)(({ className, expanded,
|
|
|
8708
8980
|
"data-expanded": isCollapsible ? expanded ? "true" : "false" : void 0,
|
|
8709
8981
|
"aria-hidden": isCollapsed ? true : void 0,
|
|
8710
8982
|
...props,
|
|
8711
|
-
children: isCollapsible ? /* @__PURE__ */ (0,
|
|
8983
|
+
children: isCollapsible ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { ref: innerRef, className: "aviala-navigation-item-group__inner", children }) : children
|
|
8712
8984
|
}
|
|
8713
8985
|
);
|
|
8714
8986
|
});
|
|
@@ -8719,9 +8991,9 @@ function renderItemIcon3(node) {
|
|
|
8719
8991
|
level: "text",
|
|
8720
8992
|
biggerSize: true
|
|
8721
8993
|
});
|
|
8722
|
-
return /* @__PURE__ */ (0,
|
|
8994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "aviala-navigation-item__icon", children: content });
|
|
8723
8995
|
}
|
|
8724
|
-
var NavigationItem = (0,
|
|
8996
|
+
var NavigationItem = (0, import_react50.forwardRef)(
|
|
8725
8997
|
({
|
|
8726
8998
|
className,
|
|
8727
8999
|
active,
|
|
@@ -8736,9 +9008,9 @@ var NavigationItem = (0, import_react48.forwardRef)(
|
|
|
8736
9008
|
const Comp = asChild ? import_react_slot5.Slot : "a";
|
|
8737
9009
|
const isActive = active ?? ariaCurrent === "page";
|
|
8738
9010
|
const mode = navigationItemButtonMode(isActive);
|
|
8739
|
-
const controlContent = /* @__PURE__ */ (0,
|
|
9011
|
+
const controlContent = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
8740
9012
|
renderItemIcon3(leftIcon),
|
|
8741
|
-
/* @__PURE__ */ (0,
|
|
9013
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8742
9014
|
Typography,
|
|
8743
9015
|
{
|
|
8744
9016
|
level: "text",
|
|
@@ -8747,15 +9019,15 @@ var NavigationItem = (0, import_react48.forwardRef)(
|
|
|
8747
9019
|
children
|
|
8748
9020
|
}
|
|
8749
9021
|
),
|
|
8750
|
-
rightIcon ? /* @__PURE__ */ (0,
|
|
9022
|
+
rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "aviala-navigation-item__chevron", children: renderItemIcon3(rightIcon) }) : null
|
|
8751
9023
|
] });
|
|
8752
|
-
return /* @__PURE__ */ (0,
|
|
9024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8753
9025
|
"span",
|
|
8754
9026
|
{
|
|
8755
9027
|
className: cn("aviala-navigation-item", className),
|
|
8756
9028
|
"data-item-type": itemType,
|
|
8757
9029
|
"data-active": isActive ? "true" : "false",
|
|
8758
|
-
children: /* @__PURE__ */ (0,
|
|
9030
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8759
9031
|
Comp,
|
|
8760
9032
|
{
|
|
8761
9033
|
ref,
|
|
@@ -8774,7 +9046,7 @@ var NavigationItem = (0, import_react48.forwardRef)(
|
|
|
8774
9046
|
}
|
|
8775
9047
|
);
|
|
8776
9048
|
NavigationItem.displayName = "NavigationItem";
|
|
8777
|
-
var NavigationActions = (0,
|
|
9049
|
+
var NavigationActions = (0, import_react50.forwardRef)(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8778
9050
|
"div",
|
|
8779
9051
|
{
|
|
8780
9052
|
ref,
|
|
@@ -8784,7 +9056,7 @@ var NavigationActions = (0, import_react48.forwardRef)(({ className, children, .
|
|
|
8784
9056
|
}
|
|
8785
9057
|
));
|
|
8786
9058
|
NavigationActions.displayName = "NavigationActions";
|
|
8787
|
-
var NavigationActionsSlot = (0,
|
|
9059
|
+
var NavigationActionsSlot = (0, import_react50.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8788
9060
|
"div",
|
|
8789
9061
|
{
|
|
8790
9062
|
ref,
|
|
@@ -8794,9 +9066,9 @@ var NavigationActionsSlot = (0, import_react48.forwardRef)(({ className, ...prop
|
|
|
8794
9066
|
));
|
|
8795
9067
|
NavigationActionsSlot.displayName = "NavigationActionsSlot";
|
|
8796
9068
|
var NAVIGATION_MENU_CLOSE_DELAY_MS = 150;
|
|
8797
|
-
var NavigationItemMenuContext = (0,
|
|
9069
|
+
var NavigationItemMenuContext = (0, import_react50.createContext)(null);
|
|
8798
9070
|
function useNavigationItemMenuContext(component) {
|
|
8799
|
-
const context = (0,
|
|
9071
|
+
const context = (0, import_react50.useContext)(NavigationItemMenuContext);
|
|
8800
9072
|
if (!context) {
|
|
8801
9073
|
throw new Error(`${component} must be used within <NavigationItemMenu>`);
|
|
8802
9074
|
}
|
|
@@ -8810,28 +9082,28 @@ function NavigationItemMenu({
|
|
|
8810
9082
|
onOpenChange,
|
|
8811
9083
|
children
|
|
8812
9084
|
}) {
|
|
8813
|
-
const [internalValue, setInternalValue] = (0,
|
|
9085
|
+
const [internalValue, setInternalValue] = (0, import_react50.useState)(defaultValue);
|
|
8814
9086
|
const isValueControlled = valueProp !== void 0;
|
|
8815
9087
|
const value = isValueControlled ? valueProp : internalValue;
|
|
8816
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
9088
|
+
const [internalOpen, setInternalOpen] = (0, import_react50.useState)(false);
|
|
8817
9089
|
const isOpenControlled = openProp !== void 0;
|
|
8818
9090
|
const open = isOpenControlled ? openProp : internalOpen;
|
|
8819
|
-
const closeTimerRef = (0,
|
|
8820
|
-
const openedByHoverRef = (0,
|
|
8821
|
-
const setOpen = (0,
|
|
9091
|
+
const closeTimerRef = (0, import_react50.useRef)(null);
|
|
9092
|
+
const openedByHoverRef = (0, import_react50.useRef)(false);
|
|
9093
|
+
const setOpen = (0, import_react50.useCallback)(
|
|
8822
9094
|
(nextOpen) => {
|
|
8823
9095
|
if (!isOpenControlled) setInternalOpen(nextOpen);
|
|
8824
9096
|
onOpenChange?.(nextOpen);
|
|
8825
9097
|
},
|
|
8826
9098
|
[isOpenControlled, onOpenChange]
|
|
8827
9099
|
);
|
|
8828
|
-
const cancelClose = (0,
|
|
9100
|
+
const cancelClose = (0, import_react50.useCallback)(() => {
|
|
8829
9101
|
if (closeTimerRef.current != null) {
|
|
8830
9102
|
window.clearTimeout(closeTimerRef.current);
|
|
8831
9103
|
closeTimerRef.current = null;
|
|
8832
9104
|
}
|
|
8833
9105
|
}, []);
|
|
8834
|
-
const openMenu = (0,
|
|
9106
|
+
const openMenu = (0, import_react50.useCallback)(
|
|
8835
9107
|
(viaHover) => {
|
|
8836
9108
|
cancelClose();
|
|
8837
9109
|
openedByHoverRef.current = viaHover;
|
|
@@ -8839,14 +9111,14 @@ function NavigationItemMenu({
|
|
|
8839
9111
|
},
|
|
8840
9112
|
[cancelClose, setOpen]
|
|
8841
9113
|
);
|
|
8842
|
-
const scheduleClose = (0,
|
|
9114
|
+
const scheduleClose = (0, import_react50.useCallback)(() => {
|
|
8843
9115
|
cancelClose();
|
|
8844
9116
|
closeTimerRef.current = window.setTimeout(() => {
|
|
8845
9117
|
closeTimerRef.current = null;
|
|
8846
9118
|
setOpen(false);
|
|
8847
9119
|
}, NAVIGATION_MENU_CLOSE_DELAY_MS);
|
|
8848
9120
|
}, [cancelClose, setOpen]);
|
|
8849
|
-
const select = (0,
|
|
9121
|
+
const select = (0, import_react50.useCallback)(
|
|
8850
9122
|
(nextValue) => {
|
|
8851
9123
|
if (!isValueControlled) setInternalValue(nextValue);
|
|
8852
9124
|
onValueChange?.(nextValue);
|
|
@@ -8855,8 +9127,8 @@ function NavigationItemMenu({
|
|
|
8855
9127
|
},
|
|
8856
9128
|
[cancelClose, isValueControlled, onValueChange, setOpen]
|
|
8857
9129
|
);
|
|
8858
|
-
(0,
|
|
8859
|
-
const contextValue = (0,
|
|
9130
|
+
(0, import_react50.useEffect)(() => cancelClose, [cancelClose]);
|
|
9131
|
+
const contextValue = (0, import_react50.useMemo)(
|
|
8860
9132
|
() => ({
|
|
8861
9133
|
value,
|
|
8862
9134
|
hasSelection: value != null && value !== "",
|
|
@@ -8868,7 +9140,7 @@ function NavigationItemMenu({
|
|
|
8868
9140
|
}),
|
|
8869
9141
|
[cancelClose, openMenu, scheduleClose, select, value]
|
|
8870
9142
|
);
|
|
8871
|
-
const handleOpenChange = (0,
|
|
9143
|
+
const handleOpenChange = (0, import_react50.useCallback)(
|
|
8872
9144
|
(nextOpen) => {
|
|
8873
9145
|
if (nextOpen) openedByHoverRef.current = false;
|
|
8874
9146
|
cancelClose();
|
|
@@ -8876,9 +9148,9 @@ function NavigationItemMenu({
|
|
|
8876
9148
|
},
|
|
8877
9149
|
[cancelClose, setOpen]
|
|
8878
9150
|
);
|
|
8879
|
-
return /* @__PURE__ */ (0,
|
|
9151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NavigationItemMenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Popover, { open, onOpenChange: handleOpenChange, children }) });
|
|
8880
9152
|
}
|
|
8881
|
-
var NavigationItemMenuTrigger = (0,
|
|
9153
|
+
var NavigationItemMenuTrigger = (0, import_react50.forwardRef)(
|
|
8882
9154
|
({
|
|
8883
9155
|
className,
|
|
8884
9156
|
active,
|
|
@@ -8890,7 +9162,7 @@ var NavigationItemMenuTrigger = (0, import_react48.forwardRef)(
|
|
|
8890
9162
|
const menu = useNavigationItemMenuContext("NavigationItemMenuTrigger");
|
|
8891
9163
|
const isActive = active ?? menu.hasSelection;
|
|
8892
9164
|
const mode = navigationItemButtonMode(isActive);
|
|
8893
|
-
return /* @__PURE__ */ (0,
|
|
9165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8894
9166
|
"span",
|
|
8895
9167
|
{
|
|
8896
9168
|
className: cn("aviala-navigation-item", className),
|
|
@@ -8898,7 +9170,7 @@ var NavigationItemMenuTrigger = (0, import_react48.forwardRef)(
|
|
|
8898
9170
|
"data-active": isActive ? "true" : "false",
|
|
8899
9171
|
onMouseEnter: () => menu.openMenu(true),
|
|
8900
9172
|
onMouseLeave: menu.scheduleClose,
|
|
8901
|
-
children: /* @__PURE__ */ (0,
|
|
9173
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PopoverPrimitive7.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
8902
9174
|
"button",
|
|
8903
9175
|
{
|
|
8904
9176
|
ref,
|
|
@@ -8911,7 +9183,7 @@ var NavigationItemMenuTrigger = (0, import_react48.forwardRef)(
|
|
|
8911
9183
|
...props,
|
|
8912
9184
|
children: [
|
|
8913
9185
|
renderItemIcon3(leftIcon),
|
|
8914
|
-
/* @__PURE__ */ (0,
|
|
9186
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8915
9187
|
Typography,
|
|
8916
9188
|
{
|
|
8917
9189
|
level: "text",
|
|
@@ -8920,7 +9192,7 @@ var NavigationItemMenuTrigger = (0, import_react48.forwardRef)(
|
|
|
8920
9192
|
children
|
|
8921
9193
|
}
|
|
8922
9194
|
),
|
|
8923
|
-
rightIcon ? /* @__PURE__ */ (0,
|
|
9195
|
+
rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "aviala-navigation-item__chevron", children: renderItemIcon3(rightIcon) }) : null
|
|
8924
9196
|
]
|
|
8925
9197
|
}
|
|
8926
9198
|
) })
|
|
@@ -8929,7 +9201,7 @@ var NavigationItemMenuTrigger = (0, import_react48.forwardRef)(
|
|
|
8929
9201
|
}
|
|
8930
9202
|
);
|
|
8931
9203
|
NavigationItemMenuTrigger.displayName = "NavigationItemMenuTrigger";
|
|
8932
|
-
var NavigationItemMenuContent = (0,
|
|
9204
|
+
var NavigationItemMenuContent = (0, import_react50.forwardRef)(
|
|
8933
9205
|
({
|
|
8934
9206
|
className,
|
|
8935
9207
|
side,
|
|
@@ -8941,7 +9213,7 @@ var NavigationItemMenuContent = (0, import_react48.forwardRef)(
|
|
|
8941
9213
|
}, ref) => {
|
|
8942
9214
|
const direction = useNavigationDirection();
|
|
8943
9215
|
const menu = useNavigationItemMenuContext("NavigationItemMenuContent");
|
|
8944
|
-
return /* @__PURE__ */ (0,
|
|
9216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
8945
9217
|
PopoverPrimitive7.Content,
|
|
8946
9218
|
{
|
|
8947
9219
|
ref,
|
|
@@ -8962,7 +9234,7 @@ var NavigationItemMenuContent = (0, import_react48.forwardRef)(
|
|
|
8962
9234
|
}
|
|
8963
9235
|
);
|
|
8964
9236
|
NavigationItemMenuContent.displayName = "NavigationItemMenuContent";
|
|
8965
|
-
var NavigationItemMenuItem = (0,
|
|
9237
|
+
var NavigationItemMenuItem = (0, import_react50.forwardRef)(
|
|
8966
9238
|
({
|
|
8967
9239
|
className,
|
|
8968
9240
|
value,
|
|
@@ -8976,7 +9248,7 @@ var NavigationItemMenuItem = (0, import_react48.forwardRef)(
|
|
|
8976
9248
|
}, ref) => {
|
|
8977
9249
|
const menu = useNavigationItemMenuContext("NavigationItemMenuItem");
|
|
8978
9250
|
const isSelected = selected ?? menu.value === value;
|
|
8979
|
-
return /* @__PURE__ */ (0,
|
|
9251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
8980
9252
|
"button",
|
|
8981
9253
|
{
|
|
8982
9254
|
ref,
|
|
@@ -8996,7 +9268,7 @@ var NavigationItemMenuItem = (0, import_react48.forwardRef)(
|
|
|
8996
9268
|
...props,
|
|
8997
9269
|
children: [
|
|
8998
9270
|
renderItemIcon3(leftIcon),
|
|
8999
|
-
/* @__PURE__ */ (0,
|
|
9271
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9000
9272
|
Typography,
|
|
9001
9273
|
{
|
|
9002
9274
|
level: "text",
|
|
@@ -9005,7 +9277,7 @@ var NavigationItemMenuItem = (0, import_react48.forwardRef)(
|
|
|
9005
9277
|
children
|
|
9006
9278
|
}
|
|
9007
9279
|
),
|
|
9008
|
-
rightIcon ? /* @__PURE__ */ (0,
|
|
9280
|
+
rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "aviala-navigation-menu-item__trailing", children: renderItemIcon3(rightIcon) }) : null
|
|
9009
9281
|
]
|
|
9010
9282
|
}
|
|
9011
9283
|
);
|
|
@@ -9016,8 +9288,8 @@ NavigationItemMenuItem.displayName = "NavigationItemMenuItem";
|
|
|
9016
9288
|
// src/components/slider.tsx
|
|
9017
9289
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
9018
9290
|
var import_class_variance_authority13 = require("class-variance-authority");
|
|
9019
|
-
var
|
|
9020
|
-
var
|
|
9291
|
+
var import_react51 = require("react");
|
|
9292
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
9021
9293
|
var sliderVariants = (0, import_class_variance_authority13.cva)("aviala-slider", {
|
|
9022
9294
|
variants: {
|
|
9023
9295
|
size: {
|
|
@@ -9034,7 +9306,7 @@ var sliderVariants = (0, import_class_variance_authority13.cva)("aviala-slider",
|
|
|
9034
9306
|
type: "default"
|
|
9035
9307
|
}
|
|
9036
9308
|
});
|
|
9037
|
-
var Slider = (0,
|
|
9309
|
+
var Slider = (0, import_react51.forwardRef)(
|
|
9038
9310
|
({
|
|
9039
9311
|
className,
|
|
9040
9312
|
size = "default",
|
|
@@ -9051,7 +9323,7 @@ var Slider = (0, import_react49.forwardRef)(
|
|
|
9051
9323
|
const isRange = resolvedType === "range";
|
|
9052
9324
|
const resolvedDefaultValue = defaultValue ?? (isRange ? [25, 75] : [50]);
|
|
9053
9325
|
const thumbCount = isRange ? Math.max(2, value?.length ?? defaultValue?.length ?? 2) : 1;
|
|
9054
|
-
return /* @__PURE__ */ (0,
|
|
9326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
9055
9327
|
SliderPrimitive.Root,
|
|
9056
9328
|
{
|
|
9057
9329
|
ref,
|
|
@@ -9069,8 +9341,8 @@ var Slider = (0, import_react49.forwardRef)(
|
|
|
9069
9341
|
"data-disabled": disabled ? "true" : void 0,
|
|
9070
9342
|
...props,
|
|
9071
9343
|
children: [
|
|
9072
|
-
/* @__PURE__ */ (0,
|
|
9073
|
-
Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ (0,
|
|
9344
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SliderPrimitive.Track, { className: "aviala-slider__track", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SliderPrimitive.Range, { className: "aviala-slider__range" }) }),
|
|
9345
|
+
Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SliderPrimitive.Thumb, { className: "aviala-slider__thumb aviala-focus-ring" }, index))
|
|
9074
9346
|
]
|
|
9075
9347
|
}
|
|
9076
9348
|
);
|
|
@@ -9081,8 +9353,8 @@ Slider.displayName = "Slider";
|
|
|
9081
9353
|
// src/components/upload.tsx
|
|
9082
9354
|
var import_icons19 = require("@aviala-design/icons");
|
|
9083
9355
|
var import_class_variance_authority14 = require("class-variance-authority");
|
|
9084
|
-
var
|
|
9085
|
-
var
|
|
9356
|
+
var import_react52 = require("react");
|
|
9357
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
9086
9358
|
var uploadVariants = (0, import_class_variance_authority14.cva)("aviala-upload aviala-focus-ring", {
|
|
9087
9359
|
variants: {
|
|
9088
9360
|
style: {
|
|
@@ -9094,7 +9366,7 @@ var uploadVariants = (0, import_class_variance_authority14.cva)("aviala-upload a
|
|
|
9094
9366
|
style: "default"
|
|
9095
9367
|
}
|
|
9096
9368
|
});
|
|
9097
|
-
var Upload = (0,
|
|
9369
|
+
var Upload = (0, import_react52.forwardRef)(
|
|
9098
9370
|
({
|
|
9099
9371
|
className,
|
|
9100
9372
|
style = "default",
|
|
@@ -9112,8 +9384,8 @@ var Upload = (0, import_react50.forwardRef)(
|
|
|
9112
9384
|
onDrop,
|
|
9113
9385
|
...props
|
|
9114
9386
|
}, ref) => {
|
|
9115
|
-
const inputRef = (0,
|
|
9116
|
-
const [dragging, setDragging] = (0,
|
|
9387
|
+
const inputRef = (0, import_react52.useRef)(null);
|
|
9388
|
+
const [dragging, setDragging] = (0, import_react52.useState)(false);
|
|
9117
9389
|
const resolvedStyle = style ?? "default";
|
|
9118
9390
|
const allowDrag = dragAndDrop ?? resolvedStyle === "large";
|
|
9119
9391
|
const openPicker = () => {
|
|
@@ -9132,7 +9404,7 @@ var Upload = (0, import_react50.forwardRef)(
|
|
|
9132
9404
|
onChange?.(event.dataTransfer.files);
|
|
9133
9405
|
}
|
|
9134
9406
|
};
|
|
9135
|
-
return /* @__PURE__ */ (0,
|
|
9407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
9136
9408
|
"div",
|
|
9137
9409
|
{
|
|
9138
9410
|
ref,
|
|
@@ -9163,7 +9435,7 @@ var Upload = (0, import_react50.forwardRef)(
|
|
|
9163
9435
|
onDrop: handleDrop,
|
|
9164
9436
|
...props,
|
|
9165
9437
|
children: [
|
|
9166
|
-
/* @__PURE__ */ (0,
|
|
9438
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
9167
9439
|
"input",
|
|
9168
9440
|
{
|
|
9169
9441
|
ref: inputRef,
|
|
@@ -9178,8 +9450,8 @@ var Upload = (0, import_react50.forwardRef)(
|
|
|
9178
9450
|
...inputProps
|
|
9179
9451
|
}
|
|
9180
9452
|
),
|
|
9181
|
-
/* @__PURE__ */ (0,
|
|
9182
|
-
resolvedStyle === "large" ? /* @__PURE__ */ (0,
|
|
9453
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "aviala-upload__icon", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons19.GeneralUpload, { width: 16, height: 16 }) }),
|
|
9454
|
+
resolvedStyle === "large" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
9183
9455
|
Typeface,
|
|
9184
9456
|
{
|
|
9185
9457
|
className: "aviala-upload__typeface",
|
|
@@ -9187,7 +9459,7 @@ var Upload = (0, import_react50.forwardRef)(
|
|
|
9187
9459
|
primary: title,
|
|
9188
9460
|
secondary: description
|
|
9189
9461
|
}
|
|
9190
|
-
) : /* @__PURE__ */ (0,
|
|
9462
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Typography, { level: "text", as: "span", className: "aviala-upload__label", children: label })
|
|
9191
9463
|
]
|
|
9192
9464
|
}
|
|
9193
9465
|
);
|
|
@@ -9196,8 +9468,8 @@ var Upload = (0, import_react50.forwardRef)(
|
|
|
9196
9468
|
Upload.displayName = "Upload";
|
|
9197
9469
|
|
|
9198
9470
|
// src/components/scroll-picker.tsx
|
|
9199
|
-
var
|
|
9200
|
-
var
|
|
9471
|
+
var import_react53 = require("react");
|
|
9472
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
9201
9473
|
var LOOP_SECTIONS2 = 3;
|
|
9202
9474
|
var MIDDLE_SECTION2 = 1;
|
|
9203
9475
|
function normalizeIndex2(index, length) {
|
|
@@ -9225,7 +9497,7 @@ function fractionalIndexAtScrollTop(metrics, scrollTop) {
|
|
|
9225
9497
|
return (scrollTop - metrics.originTop) / metrics.pitch;
|
|
9226
9498
|
}
|
|
9227
9499
|
function ScrollPicker({ className, children, ...props }) {
|
|
9228
|
-
return /* @__PURE__ */ (0,
|
|
9500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: cn("aviala-scroll-picker", className), ...props, children });
|
|
9229
9501
|
}
|
|
9230
9502
|
function ScrollPickerColumn({
|
|
9231
9503
|
className,
|
|
@@ -9237,27 +9509,27 @@ function ScrollPickerColumn({
|
|
|
9237
9509
|
formatValue,
|
|
9238
9510
|
getValueKey
|
|
9239
9511
|
}) {
|
|
9240
|
-
const scrollRef = (0,
|
|
9241
|
-
const isUserScrollingRef = (0,
|
|
9242
|
-
const isProgrammaticScrollRef = (0,
|
|
9243
|
-
const smoothTargetValueRef = (0,
|
|
9244
|
-
const scrollEndTimerRef = (0,
|
|
9245
|
-
const wheelAccumRef = (0,
|
|
9246
|
-
const selectedValueRef = (0,
|
|
9247
|
-
const reactId = (0,
|
|
9512
|
+
const scrollRef = (0, import_react53.useRef)(null);
|
|
9513
|
+
const isUserScrollingRef = (0, import_react53.useRef)(false);
|
|
9514
|
+
const isProgrammaticScrollRef = (0, import_react53.useRef)(false);
|
|
9515
|
+
const smoothTargetValueRef = (0, import_react53.useRef)(null);
|
|
9516
|
+
const scrollEndTimerRef = (0, import_react53.useRef)(void 0);
|
|
9517
|
+
const wheelAccumRef = (0, import_react53.useRef)(0);
|
|
9518
|
+
const selectedValueRef = (0, import_react53.useRef)(value);
|
|
9519
|
+
const reactId = (0, import_react53.useId)();
|
|
9248
9520
|
selectedValueRef.current = value;
|
|
9249
|
-
const getIndex = (0,
|
|
9521
|
+
const getIndex = (0, import_react53.useCallback)(
|
|
9250
9522
|
(candidate) => {
|
|
9251
9523
|
const index = values.findIndex((item) => Object.is(item, candidate));
|
|
9252
9524
|
return index >= 0 ? index : 0;
|
|
9253
9525
|
},
|
|
9254
9526
|
[values]
|
|
9255
9527
|
);
|
|
9256
|
-
const repeatedValues = (0,
|
|
9528
|
+
const repeatedValues = (0, import_react53.useMemo)(() => {
|
|
9257
9529
|
if (!loop) return [...values];
|
|
9258
9530
|
return Array.from({ length: LOOP_SECTIONS2 }, () => values).flat();
|
|
9259
9531
|
}, [loop, values]);
|
|
9260
|
-
const scrollToIndex = (0,
|
|
9532
|
+
const scrollToIndex = (0, import_react53.useCallback)((index, behavior = "auto") => {
|
|
9261
9533
|
const container = scrollRef.current;
|
|
9262
9534
|
if (!container) return;
|
|
9263
9535
|
const metrics = readMetrics(container);
|
|
@@ -9265,7 +9537,7 @@ function ScrollPickerColumn({
|
|
|
9265
9537
|
isProgrammaticScrollRef.current = true;
|
|
9266
9538
|
container.scrollTo({ top: scrollTopForIndex(container, metrics, index), behavior });
|
|
9267
9539
|
}, []);
|
|
9268
|
-
const scrollToValue = (0,
|
|
9540
|
+
const scrollToValue = (0, import_react53.useCallback)(
|
|
9269
9541
|
(nextValue, behavior = "smooth") => {
|
|
9270
9542
|
if (behavior === "smooth") {
|
|
9271
9543
|
smoothTargetValueRef.current = nextValue;
|
|
@@ -9278,7 +9550,7 @@ function ScrollPickerColumn({
|
|
|
9278
9550
|
},
|
|
9279
9551
|
[getIndex, loop, scrollToIndex, values.length]
|
|
9280
9552
|
);
|
|
9281
|
-
const settleScroll = (0,
|
|
9553
|
+
const settleScroll = (0, import_react53.useCallback)(() => {
|
|
9282
9554
|
const container = scrollRef.current;
|
|
9283
9555
|
if (!container || isProgrammaticScrollRef.current) {
|
|
9284
9556
|
isProgrammaticScrollRef.current = false;
|
|
@@ -9324,7 +9596,7 @@ function ScrollPickerColumn({
|
|
|
9324
9596
|
isUserScrollingRef.current = false;
|
|
9325
9597
|
wheelAccumRef.current = 0;
|
|
9326
9598
|
}, [loop, onChange, values]);
|
|
9327
|
-
const handleScroll = (0,
|
|
9599
|
+
const handleScroll = (0, import_react53.useCallback)(() => {
|
|
9328
9600
|
if (isProgrammaticScrollRef.current) return;
|
|
9329
9601
|
isUserScrollingRef.current = true;
|
|
9330
9602
|
if (scrollEndTimerRef.current) {
|
|
@@ -9332,7 +9604,7 @@ function ScrollPickerColumn({
|
|
|
9332
9604
|
}
|
|
9333
9605
|
scrollEndTimerRef.current = setTimeout(settleScroll, WHEEL_SCROLL_END_MS);
|
|
9334
9606
|
}, [settleScroll]);
|
|
9335
|
-
(0,
|
|
9607
|
+
(0, import_react53.useLayoutEffect)(() => {
|
|
9336
9608
|
if (isUserScrollingRef.current) return;
|
|
9337
9609
|
if (smoothTargetValueRef.current != null && Object.is(smoothTargetValueRef.current, value)) {
|
|
9338
9610
|
return;
|
|
@@ -9347,7 +9619,7 @@ function ScrollPickerColumn({
|
|
|
9347
9619
|
if (Math.abs(container.scrollTop - targetTop) <= 1) return;
|
|
9348
9620
|
scrollToIndex(targetIndex, "auto");
|
|
9349
9621
|
}, [getIndex, loop, scrollToIndex, value, values.length]);
|
|
9350
|
-
(0,
|
|
9622
|
+
(0, import_react53.useEffect)(() => {
|
|
9351
9623
|
const container = scrollRef.current;
|
|
9352
9624
|
if (!container) return;
|
|
9353
9625
|
const onScrollEnd = () => {
|
|
@@ -9364,7 +9636,7 @@ function ScrollPickerColumn({
|
|
|
9364
9636
|
}
|
|
9365
9637
|
};
|
|
9366
9638
|
}, [settleScroll]);
|
|
9367
|
-
(0,
|
|
9639
|
+
(0, import_react53.useEffect)(() => {
|
|
9368
9640
|
const container = scrollRef.current;
|
|
9369
9641
|
if (!container) return;
|
|
9370
9642
|
const onWheel = (event) => {
|
|
@@ -9422,9 +9694,9 @@ function ScrollPickerColumn({
|
|
|
9422
9694
|
}
|
|
9423
9695
|
};
|
|
9424
9696
|
const selectedOptionId = `${reactId}-${getIndex(value)}`;
|
|
9425
|
-
return /* @__PURE__ */ (0,
|
|
9426
|
-
/* @__PURE__ */ (0,
|
|
9427
|
-
/* @__PURE__ */ (0,
|
|
9697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: cn("aviala-scroll-picker-column", className), children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "aviala-scroll-picker-column__viewport", children: [
|
|
9698
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "aviala-scroll-picker-column__highlight", "aria-hidden": true }),
|
|
9699
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9428
9700
|
"div",
|
|
9429
9701
|
{
|
|
9430
9702
|
ref: scrollRef,
|
|
@@ -9435,12 +9707,12 @@ function ScrollPickerColumn({
|
|
|
9435
9707
|
"aria-activedescendant": selectedOptionId,
|
|
9436
9708
|
tabIndex: 0,
|
|
9437
9709
|
onKeyDown: handleKeyDown,
|
|
9438
|
-
children: /* @__PURE__ */ (0,
|
|
9710
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { className: "aviala-scroll-picker-column__list", children: repeatedValues.map((itemValue, index) => {
|
|
9439
9711
|
const isSelected = Object.is(itemValue, value);
|
|
9440
9712
|
const valueIndex = loop ? normalizeIndex2(index, values.length) : index;
|
|
9441
9713
|
const optionId = `${reactId}-${loop ? index : valueIndex}`;
|
|
9442
9714
|
const key = getValueKey?.(itemValue, index) ?? `${String(itemValue)}-${index}`;
|
|
9443
|
-
return /* @__PURE__ */ (0,
|
|
9715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { className: "contents", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9444
9716
|
ScrollPickerItem,
|
|
9445
9717
|
{
|
|
9446
9718
|
id: isSelected ? selectedOptionId : optionId,
|
|
@@ -9466,7 +9738,7 @@ function ScrollPickerItem({
|
|
|
9466
9738
|
className,
|
|
9467
9739
|
onSelect
|
|
9468
9740
|
}) {
|
|
9469
|
-
return /* @__PURE__ */ (0,
|
|
9741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9470
9742
|
"button",
|
|
9471
9743
|
{
|
|
9472
9744
|
type: "button",
|
|
@@ -9489,9 +9761,9 @@ function ScrollPickerItem({
|
|
|
9489
9761
|
// src/components/breadcrumb.tsx
|
|
9490
9762
|
var import_icons20 = require("@aviala-design/icons");
|
|
9491
9763
|
var import_class_variance_authority15 = require("class-variance-authority");
|
|
9492
|
-
var
|
|
9493
|
-
var
|
|
9494
|
-
var BreadcrumbSizeContext = (0,
|
|
9764
|
+
var import_react54 = require("react");
|
|
9765
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
9766
|
+
var BreadcrumbSizeContext = (0, import_react54.createContext)("default");
|
|
9495
9767
|
function breadcrumbTypeLevel(size) {
|
|
9496
9768
|
return size === "small" ? "caption" : "text";
|
|
9497
9769
|
}
|
|
@@ -9506,10 +9778,10 @@ var breadcrumbVariants = (0, import_class_variance_authority15.cva)("aviala-brea
|
|
|
9506
9778
|
size: "default"
|
|
9507
9779
|
}
|
|
9508
9780
|
});
|
|
9509
|
-
var Breadcrumb = (0,
|
|
9781
|
+
var Breadcrumb = (0, import_react54.forwardRef)(
|
|
9510
9782
|
({ className, size = "default", children, ...props }, ref) => {
|
|
9511
9783
|
const resolvedSize = size ?? "default";
|
|
9512
|
-
return /* @__PURE__ */ (0,
|
|
9784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(BreadcrumbSizeContext.Provider, { value: resolvedSize, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9513
9785
|
"nav",
|
|
9514
9786
|
{
|
|
9515
9787
|
ref,
|
|
@@ -9517,18 +9789,18 @@ var Breadcrumb = (0, import_react52.forwardRef)(
|
|
|
9517
9789
|
className: cn(breadcrumbVariants({ size: resolvedSize }), className),
|
|
9518
9790
|
"data-size": resolvedSize,
|
|
9519
9791
|
...props,
|
|
9520
|
-
children: /* @__PURE__ */ (0,
|
|
9792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ol", { className: "aviala-breadcrumb__list", children })
|
|
9521
9793
|
}
|
|
9522
9794
|
) });
|
|
9523
9795
|
}
|
|
9524
9796
|
);
|
|
9525
9797
|
Breadcrumb.displayName = "Breadcrumb";
|
|
9526
|
-
var BreadcrumbItem = (0,
|
|
9798
|
+
var BreadcrumbItem = (0, import_react54.forwardRef)(
|
|
9527
9799
|
({ className, href, current = false, icon, onClick, children, ...props }, ref) => {
|
|
9528
|
-
const size = (0,
|
|
9529
|
-
const label = /* @__PURE__ */ (0,
|
|
9530
|
-
icon ? /* @__PURE__ */ (0,
|
|
9531
|
-
children != null ? /* @__PURE__ */ (0,
|
|
9800
|
+
const size = (0, import_react54.useContext)(BreadcrumbSizeContext);
|
|
9801
|
+
const label = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
9802
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "aviala-breadcrumb-item__icon", children: icon }) : null,
|
|
9803
|
+
children != null ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9532
9804
|
Typography,
|
|
9533
9805
|
{
|
|
9534
9806
|
level: breadcrumbTypeLevel(size),
|
|
@@ -9538,13 +9810,13 @@ var BreadcrumbItem = (0, import_react52.forwardRef)(
|
|
|
9538
9810
|
}
|
|
9539
9811
|
) : null
|
|
9540
9812
|
] });
|
|
9541
|
-
return /* @__PURE__ */ (0,
|
|
9813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9542
9814
|
"li",
|
|
9543
9815
|
{
|
|
9544
9816
|
ref,
|
|
9545
9817
|
className: cn("aviala-breadcrumb-item-wrap", className),
|
|
9546
9818
|
...props,
|
|
9547
|
-
children: href != null ? /* @__PURE__ */ (0,
|
|
9819
|
+
children: href != null ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9548
9820
|
"a",
|
|
9549
9821
|
{
|
|
9550
9822
|
href,
|
|
@@ -9553,7 +9825,7 @@ var BreadcrumbItem = (0, import_react52.forwardRef)(
|
|
|
9553
9825
|
"aria-current": current ? "page" : void 0,
|
|
9554
9826
|
children: label
|
|
9555
9827
|
}
|
|
9556
|
-
) : onClick != null ? /* @__PURE__ */ (0,
|
|
9828
|
+
) : onClick != null ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9557
9829
|
"button",
|
|
9558
9830
|
{
|
|
9559
9831
|
type: "button",
|
|
@@ -9563,7 +9835,7 @@ var BreadcrumbItem = (0, import_react52.forwardRef)(
|
|
|
9563
9835
|
onClick,
|
|
9564
9836
|
children: label
|
|
9565
9837
|
}
|
|
9566
|
-
) : /* @__PURE__ */ (0,
|
|
9838
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9567
9839
|
"span",
|
|
9568
9840
|
{
|
|
9569
9841
|
className: "aviala-breadcrumb-item",
|
|
@@ -9577,10 +9849,10 @@ var BreadcrumbItem = (0, import_react52.forwardRef)(
|
|
|
9577
9849
|
}
|
|
9578
9850
|
);
|
|
9579
9851
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
9580
|
-
var BreadcrumbSeparator = (0,
|
|
9852
|
+
var BreadcrumbSeparator = (0, import_react54.forwardRef)(
|
|
9581
9853
|
({ className, children = "/", ...props }, ref) => {
|
|
9582
|
-
const size = (0,
|
|
9583
|
-
return /* @__PURE__ */ (0,
|
|
9854
|
+
const size = (0, import_react54.useContext)(BreadcrumbSizeContext);
|
|
9855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9584
9856
|
"li",
|
|
9585
9857
|
{
|
|
9586
9858
|
ref,
|
|
@@ -9588,13 +9860,13 @@ var BreadcrumbSeparator = (0, import_react52.forwardRef)(
|
|
|
9588
9860
|
"aria-hidden": true,
|
|
9589
9861
|
className: cn("aviala-breadcrumb-separator", className),
|
|
9590
9862
|
...props,
|
|
9591
|
-
children: /* @__PURE__ */ (0,
|
|
9863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Typography, { level: breadcrumbTypeLevel(size), as: "span", children })
|
|
9592
9864
|
}
|
|
9593
9865
|
);
|
|
9594
9866
|
}
|
|
9595
9867
|
);
|
|
9596
9868
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
9597
|
-
var BreadcrumbEllipsisItem = (0,
|
|
9869
|
+
var BreadcrumbEllipsisItem = (0, import_react54.forwardRef)(
|
|
9598
9870
|
({
|
|
9599
9871
|
className,
|
|
9600
9872
|
href,
|
|
@@ -9603,12 +9875,12 @@ var BreadcrumbEllipsisItem = (0, import_react52.forwardRef)(
|
|
|
9603
9875
|
children,
|
|
9604
9876
|
...props
|
|
9605
9877
|
}, ref) => {
|
|
9606
|
-
const content = /* @__PURE__ */ (0,
|
|
9607
|
-
/* @__PURE__ */ (0,
|
|
9608
|
-
showChevron ? /* @__PURE__ */ (0,
|
|
9878
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
9879
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Typography, { level: "text", as: "span", className: "aviala-breadcrumb-ellipsis-item__label", children }),
|
|
9880
|
+
showChevron ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "aviala-breadcrumb-ellipsis-item__chevron", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons20.DirectionArrowRightLight, { width: 14, height: 14, thickness: "Light" }) }) : null
|
|
9609
9881
|
] });
|
|
9610
9882
|
if (href != null) {
|
|
9611
|
-
return /* @__PURE__ */ (0,
|
|
9883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9612
9884
|
"a",
|
|
9613
9885
|
{
|
|
9614
9886
|
ref,
|
|
@@ -9620,7 +9892,7 @@ var BreadcrumbEllipsisItem = (0, import_react52.forwardRef)(
|
|
|
9620
9892
|
}
|
|
9621
9893
|
);
|
|
9622
9894
|
}
|
|
9623
|
-
return /* @__PURE__ */ (0,
|
|
9895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9624
9896
|
"button",
|
|
9625
9897
|
{
|
|
9626
9898
|
ref,
|
|
@@ -9634,7 +9906,7 @@ var BreadcrumbEllipsisItem = (0, import_react52.forwardRef)(
|
|
|
9634
9906
|
}
|
|
9635
9907
|
);
|
|
9636
9908
|
BreadcrumbEllipsisItem.displayName = "BreadcrumbEllipsisItem";
|
|
9637
|
-
var BreadcrumbEllipsis = (0,
|
|
9909
|
+
var BreadcrumbEllipsis = (0, import_react54.forwardRef)(
|
|
9638
9910
|
({
|
|
9639
9911
|
className,
|
|
9640
9912
|
children,
|
|
@@ -9646,11 +9918,11 @@ var BreadcrumbEllipsis = (0, import_react52.forwardRef)(
|
|
|
9646
9918
|
"aria-label": ariaLabel,
|
|
9647
9919
|
...props
|
|
9648
9920
|
}, ref) => {
|
|
9649
|
-
const size = (0,
|
|
9650
|
-
const [uncontrolledActivated, setUncontrolledActivated] = (0,
|
|
9921
|
+
const size = (0, import_react54.useContext)(BreadcrumbSizeContext);
|
|
9922
|
+
const [uncontrolledActivated, setUncontrolledActivated] = (0, import_react54.useState)(defaultActivated);
|
|
9651
9923
|
const isControlled = activatedProp !== void 0;
|
|
9652
9924
|
const activated = isControlled ? Boolean(activatedProp) : uncontrolledActivated;
|
|
9653
|
-
const setActivated = (0,
|
|
9925
|
+
const setActivated = (0, import_react54.useCallback)(
|
|
9654
9926
|
(next) => {
|
|
9655
9927
|
if (!isControlled) setUncontrolledActivated(next);
|
|
9656
9928
|
onActivatedChange?.(next);
|
|
@@ -9658,8 +9930,8 @@ var BreadcrumbEllipsis = (0, import_react52.forwardRef)(
|
|
|
9658
9930
|
[isControlled, onActivatedChange]
|
|
9659
9931
|
);
|
|
9660
9932
|
const iconSize = 14;
|
|
9661
|
-
const icon = children ?? /* @__PURE__ */ (0,
|
|
9662
|
-
const trigger = /* @__PURE__ */ (0,
|
|
9933
|
+
const icon = children ?? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons20.SymbolMore, { width: iconSize, height: iconSize, thickness: "Light", "aria-hidden": true });
|
|
9934
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9663
9935
|
"button",
|
|
9664
9936
|
{
|
|
9665
9937
|
type: "button",
|
|
@@ -9678,9 +9950,9 @@ var BreadcrumbEllipsis = (0, import_react52.forwardRef)(
|
|
|
9678
9950
|
children: icon
|
|
9679
9951
|
}
|
|
9680
9952
|
);
|
|
9681
|
-
return /* @__PURE__ */ (0,
|
|
9682
|
-
/* @__PURE__ */ (0,
|
|
9683
|
-
/* @__PURE__ */ (0,
|
|
9953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { ref, className: cn("aviala-breadcrumb-ellipsis-wrap", className), children: menu != null ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Popover, { open: activated, onOpenChange: setActivated, children: [
|
|
9954
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PopoverTrigger, { asChild: true, children: trigger }),
|
|
9955
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9684
9956
|
PopoverContent,
|
|
9685
9957
|
{
|
|
9686
9958
|
className: "aviala-breadcrumb-ellipsis-menu",
|
|
@@ -9689,7 +9961,7 @@ var BreadcrumbEllipsis = (0, import_react52.forwardRef)(
|
|
|
9689
9961
|
sideOffset: 7,
|
|
9690
9962
|
showArrow: false,
|
|
9691
9963
|
role: "menu",
|
|
9692
|
-
children: /* @__PURE__ */ (0,
|
|
9964
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "aviala-breadcrumb-ellipsis-menu__items", children: menu })
|
|
9693
9965
|
}
|
|
9694
9966
|
)
|
|
9695
9967
|
] }) : trigger });
|
|
@@ -9698,9 +9970,9 @@ var BreadcrumbEllipsis = (0, import_react52.forwardRef)(
|
|
|
9698
9970
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
9699
9971
|
|
|
9700
9972
|
// src/components/pagehead.tsx
|
|
9701
|
-
var
|
|
9702
|
-
var
|
|
9703
|
-
var Pagehead = (0,
|
|
9973
|
+
var import_react55 = require("react");
|
|
9974
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
9975
|
+
var Pagehead = (0, import_react55.forwardRef)(
|
|
9704
9976
|
({
|
|
9705
9977
|
className,
|
|
9706
9978
|
back,
|
|
@@ -9710,16 +9982,16 @@ var Pagehead = (0, import_react53.forwardRef)(
|
|
|
9710
9982
|
actions,
|
|
9711
9983
|
children,
|
|
9712
9984
|
...props
|
|
9713
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
9714
|
-
/* @__PURE__ */ (0,
|
|
9715
|
-
back != null ? /* @__PURE__ */ (0,
|
|
9716
|
-
/* @__PURE__ */ (0,
|
|
9717
|
-
breadcrumb != null ? /* @__PURE__ */ (0,
|
|
9718
|
-
title != null || description != null ? /* @__PURE__ */ (0,
|
|
9985
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("header", { ref, className: cn("aviala-pagehead", className), ...props, children: [
|
|
9986
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "aviala-pagehead__main", children: [
|
|
9987
|
+
back != null ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "aviala-pagehead__back", children: back }) : null,
|
|
9988
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "aviala-pagehead__title-block", children: [
|
|
9989
|
+
breadcrumb != null ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "aviala-pagehead__breadcrumb", children: breadcrumb }) : null,
|
|
9990
|
+
title != null || description != null ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "aviala-pagehead__title", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Typeface, { content: "textCaption", primary: title, secondary: description }) }) : null,
|
|
9719
9991
|
children
|
|
9720
9992
|
] })
|
|
9721
9993
|
] }),
|
|
9722
|
-
actions != null ? /* @__PURE__ */ (0,
|
|
9994
|
+
actions != null ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "aviala-pagehead__actions", children: actions }) : null
|
|
9723
9995
|
] })
|
|
9724
9996
|
);
|
|
9725
9997
|
Pagehead.displayName = "Pagehead";
|
|
@@ -9727,8 +9999,8 @@ Pagehead.displayName = "Pagehead";
|
|
|
9727
9999
|
// src/components/steps.tsx
|
|
9728
10000
|
var import_icons21 = require("@aviala-design/icons");
|
|
9729
10001
|
var import_class_variance_authority16 = require("class-variance-authority");
|
|
9730
|
-
var
|
|
9731
|
-
var
|
|
10002
|
+
var import_react56 = require("react");
|
|
10003
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
9732
10004
|
var stepsVariants = (0, import_class_variance_authority16.cva)("aviala-steps", {
|
|
9733
10005
|
variants: {
|
|
9734
10006
|
direction: {
|
|
@@ -9740,8 +10012,8 @@ var stepsVariants = (0, import_class_variance_authority16.cva)("aviala-steps", {
|
|
|
9740
10012
|
direction: "horizontal"
|
|
9741
10013
|
}
|
|
9742
10014
|
});
|
|
9743
|
-
var Steps = (0,
|
|
9744
|
-
({ className, direction = "horizontal", children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10015
|
+
var Steps = (0, import_react56.forwardRef)(
|
|
10016
|
+
({ className, direction = "horizontal", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
9745
10017
|
"div",
|
|
9746
10018
|
{
|
|
9747
10019
|
ref,
|
|
@@ -9756,20 +10028,20 @@ Steps.displayName = "Steps";
|
|
|
9756
10028
|
function defaultStepsIconContent(state, index) {
|
|
9757
10029
|
switch (state) {
|
|
9758
10030
|
case "done":
|
|
9759
|
-
return /* @__PURE__ */ (0,
|
|
10031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_icons21.SymbolRight, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
|
|
9760
10032
|
case "fail":
|
|
9761
|
-
return /* @__PURE__ */ (0,
|
|
10033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_icons21.SymbolWrong, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
|
|
9762
10034
|
case "warning":
|
|
9763
|
-
return /* @__PURE__ */ (0,
|
|
10035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_icons21.SymbolWarning, { width: 12, height: 12, thickness: "Bold", "aria-hidden": true });
|
|
9764
10036
|
case "waiting":
|
|
9765
10037
|
case "inProgress":
|
|
9766
10038
|
case "default":
|
|
9767
10039
|
default:
|
|
9768
|
-
return index != null ? /* @__PURE__ */ (0,
|
|
10040
|
+
return index != null ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Typography, { level: "caption", as: "span", className: "aviala-steps-icon__index", children: index }) : null;
|
|
9769
10041
|
}
|
|
9770
10042
|
}
|
|
9771
|
-
var StepsIcon = (0,
|
|
9772
|
-
({ className, state = "default", index, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10043
|
+
var StepsIcon = (0, import_react56.forwardRef)(
|
|
10044
|
+
({ className, state = "default", index, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
9773
10045
|
"span",
|
|
9774
10046
|
{
|
|
9775
10047
|
ref,
|
|
@@ -9781,7 +10053,7 @@ var StepsIcon = (0, import_react54.forwardRef)(
|
|
|
9781
10053
|
)
|
|
9782
10054
|
);
|
|
9783
10055
|
StepsIcon.displayName = "StepsIcon";
|
|
9784
|
-
var StepsItem = (0,
|
|
10056
|
+
var StepsItem = (0, import_react56.forwardRef)(
|
|
9785
10057
|
({
|
|
9786
10058
|
className,
|
|
9787
10059
|
state = "default",
|
|
@@ -9791,7 +10063,7 @@ var StepsItem = (0, import_react54.forwardRef)(
|
|
|
9791
10063
|
icon,
|
|
9792
10064
|
children,
|
|
9793
10065
|
...props
|
|
9794
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
10066
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
9795
10067
|
"div",
|
|
9796
10068
|
{
|
|
9797
10069
|
ref,
|
|
@@ -9799,9 +10071,9 @@ var StepsItem = (0, import_react54.forwardRef)(
|
|
|
9799
10071
|
"data-state": state,
|
|
9800
10072
|
...props,
|
|
9801
10073
|
children: [
|
|
9802
|
-
icon ?? /* @__PURE__ */ (0,
|
|
9803
|
-
/* @__PURE__ */ (0,
|
|
9804
|
-
title != null ? /* @__PURE__ */ (0,
|
|
10074
|
+
icon ?? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StepsIcon, { state, index }),
|
|
10075
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "aviala-steps-item__body", children: [
|
|
10076
|
+
title != null ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
9805
10077
|
Typography,
|
|
9806
10078
|
{
|
|
9807
10079
|
level: "subtitle",
|
|
@@ -9810,7 +10082,7 @@ var StepsItem = (0, import_react54.forwardRef)(
|
|
|
9810
10082
|
children: title
|
|
9811
10083
|
}
|
|
9812
10084
|
) : null,
|
|
9813
|
-
description != null ? /* @__PURE__ */ (0,
|
|
10085
|
+
description != null ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
9814
10086
|
Typography,
|
|
9815
10087
|
{
|
|
9816
10088
|
level: "text",
|
|
@@ -9829,8 +10101,8 @@ StepsItem.displayName = "StepsItem";
|
|
|
9829
10101
|
|
|
9830
10102
|
// src/components/pagination.tsx
|
|
9831
10103
|
var import_icons22 = require("@aviala-design/icons");
|
|
9832
|
-
var
|
|
9833
|
-
var
|
|
10104
|
+
var import_react57 = require("react");
|
|
10105
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
9834
10106
|
function buildPageList(page, pageCount) {
|
|
9835
10107
|
if (pageCount <= 7) {
|
|
9836
10108
|
return Array.from({ length: pageCount }, (_, index) => index + 1);
|
|
@@ -9853,7 +10125,17 @@ function buildPageList(page, pageCount) {
|
|
|
9853
10125
|
}
|
|
9854
10126
|
return result;
|
|
9855
10127
|
}
|
|
9856
|
-
|
|
10128
|
+
function ellipsisRange(pages, index) {
|
|
10129
|
+
const prev = pages[index - 1];
|
|
10130
|
+
const next = pages[index + 1];
|
|
10131
|
+
if (typeof prev !== "number" || typeof next !== "number") return [];
|
|
10132
|
+
const start = prev + 1;
|
|
10133
|
+
const end = next - 1;
|
|
10134
|
+
const range = [];
|
|
10135
|
+
for (let p = start; p <= end; p += 1) range.push(p);
|
|
10136
|
+
return range;
|
|
10137
|
+
}
|
|
10138
|
+
var Pagination = (0, import_react57.forwardRef)(
|
|
9857
10139
|
({
|
|
9858
10140
|
className,
|
|
9859
10141
|
page: pageProp,
|
|
@@ -9871,9 +10153,10 @@ var Pagination = (0, import_react55.forwardRef)(
|
|
|
9871
10153
|
sizeOptionLabel = (size) => `${size} \u9879`,
|
|
9872
10154
|
...props
|
|
9873
10155
|
}, ref) => {
|
|
9874
|
-
const [uncontrolledPage, setUncontrolledPage] = (0,
|
|
9875
|
-
const [uncontrolledPageSize, setUncontrolledPageSize] = (0,
|
|
9876
|
-
const [jumpValue, setJumpValue] = (0,
|
|
10156
|
+
const [uncontrolledPage, setUncontrolledPage] = (0, import_react57.useState)(defaultPage);
|
|
10157
|
+
const [uncontrolledPageSize, setUncontrolledPageSize] = (0, import_react57.useState)(defaultPageSize);
|
|
10158
|
+
const [jumpValue, setJumpValue] = (0, import_react57.useState)("");
|
|
10159
|
+
const [openEllipsis, setOpenEllipsis] = (0, import_react57.useState)(null);
|
|
9877
10160
|
const page = pageProp ?? uncontrolledPage;
|
|
9878
10161
|
const pageSize = pageSizeProp ?? uncontrolledPageSize;
|
|
9879
10162
|
const safePageCount = Math.max(1, pageCount);
|
|
@@ -9894,7 +10177,7 @@ var Pagination = (0, import_react55.forwardRef)(
|
|
|
9894
10177
|
setPage(parsed);
|
|
9895
10178
|
setJumpValue("");
|
|
9896
10179
|
};
|
|
9897
|
-
return /* @__PURE__ */ (0,
|
|
10180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
9898
10181
|
"div",
|
|
9899
10182
|
{
|
|
9900
10183
|
ref,
|
|
@@ -9903,8 +10186,8 @@ var Pagination = (0, import_react55.forwardRef)(
|
|
|
9903
10186
|
"aria-label": props["aria-label"] ?? "Pagination",
|
|
9904
10187
|
...props,
|
|
9905
10188
|
children: [
|
|
9906
|
-
/* @__PURE__ */ (0,
|
|
9907
|
-
/* @__PURE__ */ (0,
|
|
10189
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "aviala-pagination__controls", children: [
|
|
10190
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
9908
10191
|
Button,
|
|
9909
10192
|
{
|
|
9910
10193
|
mode: "noBackgroundCustom",
|
|
@@ -9912,35 +10195,69 @@ var Pagination = (0, import_react55.forwardRef)(
|
|
|
9912
10195
|
iconOnly: true,
|
|
9913
10196
|
"aria-label": "Previous page",
|
|
9914
10197
|
disabled: currentPage <= 1,
|
|
9915
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
10198
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_icons22.DirectionArrowLeftLight, { "aria-hidden": true }),
|
|
9916
10199
|
onClick: () => setPage(currentPage - 1)
|
|
9917
10200
|
}
|
|
9918
10201
|
),
|
|
9919
|
-
/* @__PURE__ */ (0,
|
|
9920
|
-
(item, index) => item === "ellipsis" ? /* @__PURE__ */ (0,
|
|
9921
|
-
|
|
10202
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "aviala-pagination__pages", children: pages.map(
|
|
10203
|
+
(item, index) => item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
10204
|
+
Popover,
|
|
9922
10205
|
{
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
10206
|
+
open: openEllipsis === index,
|
|
10207
|
+
onOpenChange: (open) => setOpenEllipsis(open ? index : null),
|
|
10208
|
+
children: [
|
|
10209
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
10210
|
+
"button",
|
|
10211
|
+
{
|
|
10212
|
+
type: "button",
|
|
10213
|
+
"data-size": "regular",
|
|
10214
|
+
className: cn(
|
|
10215
|
+
buttonVariants({ mode: "noBackgroundCustom", compact: true }),
|
|
10216
|
+
"aviala-pagination__page--ellipsis"
|
|
10217
|
+
),
|
|
10218
|
+
"aria-label": "\u66F4\u591A\u9875\u7801",
|
|
10219
|
+
"aria-haspopup": "menu",
|
|
10220
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography, { level: "text", as: "span", children: "\u2026" })
|
|
10221
|
+
}
|
|
10222
|
+
) }),
|
|
10223
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PopoverContent, { className: "aviala-pagination__ellipsis-content", showArrow: true, flush: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "aviala-pagination__ellipsis-menu", children: ellipsisRange(pages, index).map((p) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
10224
|
+
"button",
|
|
10225
|
+
{
|
|
10226
|
+
type: "button",
|
|
10227
|
+
"data-size": "regular",
|
|
10228
|
+
className: cn(
|
|
10229
|
+
buttonVariants({ mode: "noBackgroundCustom", compact: true }),
|
|
10230
|
+
"aviala-pagination__ellipsis-page"
|
|
10231
|
+
),
|
|
10232
|
+
onClick: () => {
|
|
10233
|
+
setPage(p);
|
|
10234
|
+
setOpenEllipsis(null);
|
|
10235
|
+
},
|
|
10236
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography, { level: "text", as: "span", children: p })
|
|
10237
|
+
},
|
|
10238
|
+
p
|
|
10239
|
+
)) }) })
|
|
10240
|
+
]
|
|
9928
10241
|
},
|
|
9929
10242
|
`ellipsis-${index}`
|
|
9930
|
-
) : /* @__PURE__ */ (0,
|
|
10243
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
9931
10244
|
"button",
|
|
9932
10245
|
{
|
|
9933
10246
|
type: "button",
|
|
9934
|
-
|
|
10247
|
+
"data-size": "regular",
|
|
10248
|
+
className: cn(
|
|
10249
|
+
buttonVariants({ mode: "noBackgroundCustom", compact: true }),
|
|
10250
|
+
"aviala-pagination__page"
|
|
10251
|
+
),
|
|
9935
10252
|
"data-active": item === currentPage ? "true" : void 0,
|
|
9936
10253
|
"aria-current": item === currentPage ? "page" : void 0,
|
|
9937
10254
|
onClick: () => setPage(item),
|
|
9938
|
-
children: /* @__PURE__ */ (0,
|
|
10255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography, { level: "text", as: "span", children: item })
|
|
9939
10256
|
},
|
|
9940
10257
|
item
|
|
9941
10258
|
)
|
|
9942
10259
|
) }),
|
|
9943
|
-
/* @__PURE__ */ (0,
|
|
10260
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
9944
10261
|
Button,
|
|
9945
10262
|
{
|
|
9946
10263
|
mode: "noBackgroundCustom",
|
|
@@ -9948,14 +10265,14 @@ var Pagination = (0, import_react55.forwardRef)(
|
|
|
9948
10265
|
iconOnly: true,
|
|
9949
10266
|
"aria-label": "Next page",
|
|
9950
10267
|
disabled: currentPage >= safePageCount,
|
|
9951
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
10268
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_icons22.DirectionArrowRightLight, { "aria-hidden": true }),
|
|
9952
10269
|
onClick: () => setPage(currentPage + 1)
|
|
9953
10270
|
}
|
|
9954
10271
|
)
|
|
9955
10272
|
] }),
|
|
9956
|
-
showJump ? /* @__PURE__ */ (0,
|
|
9957
|
-
/* @__PURE__ */ (0,
|
|
9958
|
-
/* @__PURE__ */ (0,
|
|
10273
|
+
showJump ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "aviala-pagination__jump", children: [
|
|
10274
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography, { level: "text", as: "span", children: jumpLabel }),
|
|
10275
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
9959
10276
|
Input,
|
|
9960
10277
|
{
|
|
9961
10278
|
className: "aviala-pagination__jump-input",
|
|
@@ -9975,15 +10292,15 @@ var Pagination = (0, import_react55.forwardRef)(
|
|
|
9975
10292
|
}
|
|
9976
10293
|
)
|
|
9977
10294
|
] }) : null,
|
|
9978
|
-
showSizeChanger ? /* @__PURE__ */ (0,
|
|
9979
|
-
/* @__PURE__ */ (0,
|
|
9980
|
-
/* @__PURE__ */ (0,
|
|
10295
|
+
showSizeChanger ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "aviala-pagination__size", children: [
|
|
10296
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Typography, { level: "text", as: "span", children: sizeLabel }),
|
|
10297
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
9981
10298
|
Select,
|
|
9982
10299
|
{
|
|
9983
10300
|
value: String(pageSize),
|
|
9984
10301
|
onValueChange: (value) => setPageSize(Number(value)),
|
|
9985
10302
|
children: [
|
|
9986
|
-
/* @__PURE__ */ (0,
|
|
10303
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
9987
10304
|
SelectTrigger,
|
|
9988
10305
|
{
|
|
9989
10306
|
size: "regular",
|
|
@@ -9991,7 +10308,7 @@ var Pagination = (0, import_react55.forwardRef)(
|
|
|
9991
10308
|
"aria-label": "Page size"
|
|
9992
10309
|
}
|
|
9993
10310
|
),
|
|
9994
|
-
/* @__PURE__ */ (0,
|
|
10311
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectContent, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectItemGroup, { children: pageSizeOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
9995
10312
|
SelectItem,
|
|
9996
10313
|
{
|
|
9997
10314
|
value: String(option),
|
|
@@ -10013,15 +10330,15 @@ Pagination.displayName = "Pagination";
|
|
|
10013
10330
|
|
|
10014
10331
|
// src/components/card.tsx
|
|
10015
10332
|
var import_icons23 = require("@aviala-design/icons");
|
|
10016
|
-
var
|
|
10017
|
-
var
|
|
10018
|
-
var Card = (0,
|
|
10019
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10333
|
+
var import_react58 = require("react");
|
|
10334
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
10335
|
+
var Card = (0, import_react58.forwardRef)(
|
|
10336
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { ref, className: cn("aviala-card", className), ...props, children })
|
|
10020
10337
|
);
|
|
10021
10338
|
Card.displayName = "Card";
|
|
10022
10339
|
function renderCardIcon(node) {
|
|
10023
10340
|
if (!node) return null;
|
|
10024
|
-
const content = (0,
|
|
10341
|
+
const content = (0, import_react58.isValidElement)(node) && typeof node.type !== "string" ? (0, import_react58.cloneElement)(node, {
|
|
10025
10342
|
width: 14,
|
|
10026
10343
|
height: 14,
|
|
10027
10344
|
className: cn(
|
|
@@ -10029,9 +10346,9 @@ function renderCardIcon(node) {
|
|
|
10029
10346
|
"shrink-0"
|
|
10030
10347
|
)
|
|
10031
10348
|
}) : node;
|
|
10032
|
-
return /* @__PURE__ */ (0,
|
|
10349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "aviala-card-head__icon", children: content });
|
|
10033
10350
|
}
|
|
10034
|
-
var CardHead = (0,
|
|
10351
|
+
var CardHead = (0, import_react58.forwardRef)(
|
|
10035
10352
|
({
|
|
10036
10353
|
className,
|
|
10037
10354
|
slotType = "select",
|
|
@@ -10047,38 +10364,38 @@ var CardHead = (0, import_react56.forwardRef)(
|
|
|
10047
10364
|
children,
|
|
10048
10365
|
...props
|
|
10049
10366
|
}, ref) => {
|
|
10050
|
-
const primaryAction = action ?? /* @__PURE__ */ (0,
|
|
10367
|
+
const primaryAction = action ?? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons23.GeneralSetting, { "aria-hidden": true }), children: actionLabel });
|
|
10051
10368
|
const renderTrailing = () => {
|
|
10052
10369
|
if (trailing !== void 0) return trailing;
|
|
10053
10370
|
switch (slotType) {
|
|
10054
10371
|
case "action":
|
|
10055
|
-
return /* @__PURE__ */ (0,
|
|
10372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "aviala-card-head__trailing", children: [
|
|
10056
10373
|
primaryAction,
|
|
10057
|
-
secondaryAction ?? /* @__PURE__ */ (0,
|
|
10374
|
+
secondaryAction ?? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
10058
10375
|
Button,
|
|
10059
10376
|
{
|
|
10060
10377
|
mode: "default",
|
|
10061
10378
|
size: "regular",
|
|
10062
10379
|
iconOnly: true,
|
|
10063
10380
|
"aria-label": "More",
|
|
10064
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
10381
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons23.GeneralSetting, { "aria-hidden": true })
|
|
10065
10382
|
}
|
|
10066
10383
|
),
|
|
10067
|
-
/* @__PURE__ */ (0,
|
|
10068
|
-
/* @__PURE__ */ (0,
|
|
10384
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "aviala-card__divider", "aria-hidden": true }),
|
|
10385
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons23.DirectionArrowRightLight, { width: 14, height: 14, "aria-hidden": true })
|
|
10069
10386
|
] });
|
|
10070
10387
|
case "switch":
|
|
10071
|
-
return /* @__PURE__ */ (0,
|
|
10388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "aviala-card-head__trailing", children: [
|
|
10072
10389
|
primaryAction,
|
|
10073
|
-
/* @__PURE__ */ (0,
|
|
10074
|
-
/* @__PURE__ */ (0,
|
|
10390
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "aviala-card__divider", "aria-hidden": true }),
|
|
10391
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Switch, { ...switchProps })
|
|
10075
10392
|
] });
|
|
10076
10393
|
case "select":
|
|
10077
10394
|
default:
|
|
10078
|
-
return select != null ? /* @__PURE__ */ (0,
|
|
10395
|
+
return select != null ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "aviala-card-head__trailing", children: select }) : null;
|
|
10079
10396
|
}
|
|
10080
10397
|
};
|
|
10081
|
-
return /* @__PURE__ */ (0,
|
|
10398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
10082
10399
|
"div",
|
|
10083
10400
|
{
|
|
10084
10401
|
ref,
|
|
@@ -10086,9 +10403,9 @@ var CardHead = (0, import_react56.forwardRef)(
|
|
|
10086
10403
|
"data-type": slotType,
|
|
10087
10404
|
...props,
|
|
10088
10405
|
children: [
|
|
10089
|
-
/* @__PURE__ */ (0,
|
|
10090
|
-
renderCardIcon(icon ?? /* @__PURE__ */ (0,
|
|
10091
|
-
/* @__PURE__ */ (0,
|
|
10406
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "aviala-card-head__main", children: [
|
|
10407
|
+
renderCardIcon(icon ?? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons23.GeneralSetting, { "aria-hidden": true })),
|
|
10408
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "aviala-card-head__title", children: title != null || description != null ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Typeface, { content: "textCaption", primary: title, secondary: description }) : children })
|
|
10092
10409
|
] }),
|
|
10093
10410
|
renderTrailing()
|
|
10094
10411
|
]
|
|
@@ -10097,11 +10414,11 @@ var CardHead = (0, import_react56.forwardRef)(
|
|
|
10097
10414
|
}
|
|
10098
10415
|
);
|
|
10099
10416
|
CardHead.displayName = "CardHead";
|
|
10100
|
-
var CardBody = (0,
|
|
10101
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10417
|
+
var CardBody = (0, import_react58.forwardRef)(
|
|
10418
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { ref, className: cn("aviala-card-body", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "aviala-card-body__content", children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Typography, { level: "text", as: "span", children }) : children }) })
|
|
10102
10419
|
);
|
|
10103
10420
|
CardBody.displayName = "CardBody";
|
|
10104
|
-
var CardBottom = (0,
|
|
10421
|
+
var CardBottom = (0, import_react58.forwardRef)(
|
|
10105
10422
|
({
|
|
10106
10423
|
className,
|
|
10107
10424
|
slotType = "action",
|
|
@@ -10114,46 +10431,46 @@ var CardBottom = (0, import_react56.forwardRef)(
|
|
|
10114
10431
|
children,
|
|
10115
10432
|
...props
|
|
10116
10433
|
}, ref) => {
|
|
10117
|
-
const primaryAction = action ?? /* @__PURE__ */ (0,
|
|
10434
|
+
const primaryAction = action ?? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { mode: "primary", size: "regular", leftIcon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons23.GeneralSetting, { "aria-hidden": true }), children: actionLabel });
|
|
10118
10435
|
const renderTrailing = () => {
|
|
10119
10436
|
if (trailing !== void 0) return trailing;
|
|
10120
10437
|
if (children != null) return children;
|
|
10121
10438
|
switch (slotType) {
|
|
10122
10439
|
case "switch":
|
|
10123
|
-
return /* @__PURE__ */ (0,
|
|
10440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
10124
10441
|
primaryAction,
|
|
10125
|
-
/* @__PURE__ */ (0,
|
|
10126
|
-
/* @__PURE__ */ (0,
|
|
10442
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "aviala-card__divider", "aria-hidden": true }),
|
|
10443
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Switch, { ...switchProps })
|
|
10127
10444
|
] });
|
|
10128
10445
|
case "select":
|
|
10129
10446
|
return select;
|
|
10130
10447
|
case "action":
|
|
10131
10448
|
default:
|
|
10132
|
-
return /* @__PURE__ */ (0,
|
|
10449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
10133
10450
|
primaryAction,
|
|
10134
|
-
secondaryAction ?? /* @__PURE__ */ (0,
|
|
10451
|
+
secondaryAction ?? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
10135
10452
|
Button,
|
|
10136
10453
|
{
|
|
10137
10454
|
mode: "default",
|
|
10138
10455
|
size: "regular",
|
|
10139
10456
|
iconOnly: true,
|
|
10140
10457
|
"aria-label": "More",
|
|
10141
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
10458
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons23.GeneralSetting, { "aria-hidden": true })
|
|
10142
10459
|
}
|
|
10143
10460
|
),
|
|
10144
|
-
/* @__PURE__ */ (0,
|
|
10145
|
-
/* @__PURE__ */ (0,
|
|
10461
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "aviala-card__divider", "aria-hidden": true }),
|
|
10462
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons23.DirectionArrowRightLight, { width: 14, height: 14, "aria-hidden": true })
|
|
10146
10463
|
] });
|
|
10147
10464
|
}
|
|
10148
10465
|
};
|
|
10149
|
-
return /* @__PURE__ */ (0,
|
|
10466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
10150
10467
|
"div",
|
|
10151
10468
|
{
|
|
10152
10469
|
ref,
|
|
10153
10470
|
className: cn("aviala-card-bottom", className),
|
|
10154
10471
|
"data-type": slotType,
|
|
10155
10472
|
...props,
|
|
10156
|
-
children: /* @__PURE__ */ (0,
|
|
10473
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "aviala-card-bottom__trailing", children: renderTrailing() })
|
|
10157
10474
|
}
|
|
10158
10475
|
);
|
|
10159
10476
|
}
|
|
@@ -10161,10 +10478,10 @@ var CardBottom = (0, import_react56.forwardRef)(
|
|
|
10161
10478
|
CardBottom.displayName = "CardBottom";
|
|
10162
10479
|
|
|
10163
10480
|
// src/components/table.tsx
|
|
10164
|
-
var
|
|
10165
|
-
var
|
|
10166
|
-
var Table = (0,
|
|
10167
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10481
|
+
var import_react59 = require("react");
|
|
10482
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
10483
|
+
var Table = (0, import_react59.forwardRef)(
|
|
10484
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
10168
10485
|
"div",
|
|
10169
10486
|
{
|
|
10170
10487
|
ref,
|
|
@@ -10176,8 +10493,8 @@ var Table = (0, import_react57.forwardRef)(
|
|
|
10176
10493
|
)
|
|
10177
10494
|
);
|
|
10178
10495
|
Table.displayName = "Table";
|
|
10179
|
-
var TableRow = (0,
|
|
10180
|
-
({ className, header = false, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10496
|
+
var TableRow = (0, import_react59.forwardRef)(
|
|
10497
|
+
({ className, header = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
10181
10498
|
"div",
|
|
10182
10499
|
{
|
|
10183
10500
|
ref,
|
|
@@ -10190,8 +10507,8 @@ var TableRow = (0, import_react57.forwardRef)(
|
|
|
10190
10507
|
)
|
|
10191
10508
|
);
|
|
10192
10509
|
TableRow.displayName = "TableRow";
|
|
10193
|
-
var TableHead = (0,
|
|
10194
|
-
({ className, content = "text", children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10510
|
+
var TableHead = (0, import_react59.forwardRef)(
|
|
10511
|
+
({ className, content = "text", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
10195
10512
|
"div",
|
|
10196
10513
|
{
|
|
10197
10514
|
ref,
|
|
@@ -10199,14 +10516,14 @@ var TableHead = (0, import_react57.forwardRef)(
|
|
|
10199
10516
|
className: cn("aviala-table-head", className),
|
|
10200
10517
|
"data-content": content,
|
|
10201
10518
|
...props,
|
|
10202
|
-
children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ (0,
|
|
10519
|
+
children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Typography, { level: "caption", as: "span", children }) : children
|
|
10203
10520
|
}
|
|
10204
10521
|
)
|
|
10205
10522
|
);
|
|
10206
10523
|
TableHead.displayName = "TableHead";
|
|
10207
10524
|
function renderCellIcon(node) {
|
|
10208
10525
|
if (!node) return null;
|
|
10209
|
-
const content = (0,
|
|
10526
|
+
const content = (0, import_react59.isValidElement)(node) && typeof node.type !== "string" ? (0, import_react59.cloneElement)(node, {
|
|
10210
10527
|
width: 16,
|
|
10211
10528
|
height: 16,
|
|
10212
10529
|
className: cn(
|
|
@@ -10214,9 +10531,9 @@ function renderCellIcon(node) {
|
|
|
10214
10531
|
"shrink-0"
|
|
10215
10532
|
)
|
|
10216
10533
|
}) : node;
|
|
10217
|
-
return /* @__PURE__ */ (0,
|
|
10534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "aviala-table-cell__icon", children: content });
|
|
10218
10535
|
}
|
|
10219
|
-
var TableCell = (0,
|
|
10536
|
+
var TableCell = (0, import_react59.forwardRef)(
|
|
10220
10537
|
({
|
|
10221
10538
|
className,
|
|
10222
10539
|
content = "text",
|
|
@@ -10235,29 +10552,29 @@ var TableCell = (0, import_react57.forwardRef)(
|
|
|
10235
10552
|
if (children != null) return children;
|
|
10236
10553
|
switch (content) {
|
|
10237
10554
|
case "checkbox":
|
|
10238
|
-
return /* @__PURE__ */ (0,
|
|
10555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Checkbox, { ...checkboxProps });
|
|
10239
10556
|
case "icon+text":
|
|
10240
|
-
return /* @__PURE__ */ (0,
|
|
10557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
10241
10558
|
renderCellIcon(icon),
|
|
10242
|
-
/* @__PURE__ */ (0,
|
|
10559
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Typography, { level: "text", as: "span", children: text }) })
|
|
10243
10560
|
] });
|
|
10244
10561
|
case "people":
|
|
10245
|
-
return /* @__PURE__ */ (0,
|
|
10246
|
-
people ?? /* @__PURE__ */ (0,
|
|
10247
|
-
/* @__PURE__ */ (0,
|
|
10562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
10563
|
+
people ?? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Avatar, { content: "text", level: "text", children: "A" }),
|
|
10564
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Typography, { level: "text", as: "span", children: text }) })
|
|
10248
10565
|
] });
|
|
10249
10566
|
case "badge":
|
|
10250
|
-
return badge ?? /* @__PURE__ */ (0,
|
|
10567
|
+
return badge ?? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Badge, { style: "theme", level: "caption", children: badgeLabel ?? "Text" });
|
|
10251
10568
|
case "switch":
|
|
10252
|
-
return /* @__PURE__ */ (0,
|
|
10569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Switch, { ...switchProps });
|
|
10253
10570
|
case "action":
|
|
10254
|
-
return /* @__PURE__ */ (0,
|
|
10571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "aviala-table-cell__actions", children: actions });
|
|
10255
10572
|
case "text":
|
|
10256
10573
|
default:
|
|
10257
|
-
return /* @__PURE__ */ (0,
|
|
10574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "aviala-table-cell__text", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Typography, { level: "text", as: "span", children: text }) });
|
|
10258
10575
|
}
|
|
10259
10576
|
};
|
|
10260
|
-
return /* @__PURE__ */ (0,
|
|
10577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
10261
10578
|
"div",
|
|
10262
10579
|
{
|
|
10263
10580
|
ref,
|
|
@@ -10319,6 +10636,7 @@ TableCell.displayName = "TableCell";
|
|
|
10319
10636
|
Feedback,
|
|
10320
10637
|
Fieldset,
|
|
10321
10638
|
FormField,
|
|
10639
|
+
HoverPopover,
|
|
10322
10640
|
Input,
|
|
10323
10641
|
InputGroup,
|
|
10324
10642
|
InputGroupAddon,
|
|
@@ -10369,6 +10687,7 @@ TableCell.displayName = "TableCell";
|
|
|
10369
10687
|
RadioGroup,
|
|
10370
10688
|
RadioGroupItem,
|
|
10371
10689
|
RadioInput,
|
|
10690
|
+
ResponsiveTooltip,
|
|
10372
10691
|
Scroll,
|
|
10373
10692
|
ScrollPicker,
|
|
10374
10693
|
ScrollPickerColumn,
|