acai-ui-library 0.1.21 → 0.1.22
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/components/app-launcher.cjs +231 -0
- package/dist/components/app-launcher.cjs.map +1 -0
- package/dist/components/app-launcher.d.cts +24 -0
- package/dist/components/app-launcher.d.ts +24 -0
- package/dist/components/app-launcher.js +197 -0
- package/dist/components/app-launcher.js.map +1 -0
- package/dist/components/calendar.cjs +13 -5
- package/dist/components/calendar.cjs.map +1 -1
- package/dist/components/calendar.js +15 -7
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/date-picker.cjs +17 -7
- package/dist/components/date-picker.cjs.map +1 -1
- package/dist/components/date-picker.js +23 -13
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-time-picker.cjs +13 -5
- package/dist/components/date-time-picker.cjs.map +1 -1
- package/dist/components/date-time-picker.js +28 -20
- package/dist/components/date-time-picker.js.map +1 -1
- package/dist/components/help-widget/app-id-typecheck.cjs +34 -0
- package/dist/components/help-widget/app-id-typecheck.cjs.map +1 -0
- package/dist/components/help-widget/app-id-typecheck.d.cts +17 -0
- package/dist/components/help-widget/app-id-typecheck.d.ts +17 -0
- package/dist/components/help-widget/app-id-typecheck.js +8 -0
- package/dist/components/help-widget/app-id-typecheck.js.map +1 -0
- package/dist/components/help-widget/consent-dialog.cjs +276 -0
- package/dist/components/help-widget/consent-dialog.cjs.map +1 -0
- package/dist/components/help-widget/consent-dialog.d.cts +17 -0
- package/dist/components/help-widget/consent-dialog.d.ts +17 -0
- package/dist/components/help-widget/consent-dialog.js +239 -0
- package/dist/components/help-widget/consent-dialog.js.map +1 -0
- package/dist/components/help-widget/help-session-banner.cjs +85 -0
- package/dist/components/help-widget/help-session-banner.cjs.map +1 -0
- package/dist/components/help-widget/help-session-banner.d.cts +17 -0
- package/dist/components/help-widget/help-session-banner.d.ts +17 -0
- package/dist/components/help-widget/help-session-banner.js +50 -0
- package/dist/components/help-widget/help-session-banner.js.map +1 -0
- package/dist/components/help-widget/help-widget.cjs +503 -0
- package/dist/components/help-widget/help-widget.cjs.map +1 -0
- package/dist/components/help-widget/help-widget.d.cts +32 -0
- package/dist/components/help-widget/help-widget.d.ts +32 -0
- package/dist/components/help-widget/help-widget.js +468 -0
- package/dist/components/help-widget/help-widget.js.map +1 -0
- package/dist/components/help-widget/highlight-overlay.cjs +84 -0
- package/dist/components/help-widget/highlight-overlay.cjs.map +1 -0
- package/dist/components/help-widget/highlight-overlay.d.cts +24 -0
- package/dist/components/help-widget/highlight-overlay.d.ts +24 -0
- package/dist/components/help-widget/highlight-overlay.js +49 -0
- package/dist/components/help-widget/highlight-overlay.js.map +1 -0
- package/dist/components/help-widget/use-help-session.cjs +85 -0
- package/dist/components/help-widget/use-help-session.cjs.map +1 -0
- package/dist/components/help-widget/use-help-session.d.cts +46 -0
- package/dist/components/help-widget/use-help-session.d.ts +46 -0
- package/dist/components/help-widget/use-help-session.js +50 -0
- package/dist/components/help-widget/use-help-session.js.map +1 -0
- package/dist/index.cjs +580 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +615 -126
- package/dist/index.js.map +1 -1
- package/dist/lib/app-ids.cjs +58 -0
- package/dist/lib/app-ids.cjs.map +1 -0
- package/dist/lib/app-ids.d.cts +12 -0
- package/dist/lib/app-ids.d.ts +12 -0
- package/dist/lib/app-ids.js +32 -0
- package/dist/lib/app-ids.js.map +1 -0
- package/dist/lib/mask-snapshot.cjs +66 -0
- package/dist/lib/mask-snapshot.cjs.map +1 -0
- package/dist/lib/mask-snapshot.d.cts +16 -0
- package/dist/lib/mask-snapshot.d.ts +16 -0
- package/dist/lib/mask-snapshot.js +41 -0
- package/dist/lib/mask-snapshot.js.map +1 -0
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -3680,8 +3680,14 @@ PaginationInfo.displayName = "PaginationInfo";
|
|
|
3680
3680
|
|
|
3681
3681
|
// src/components/calendar.tsx
|
|
3682
3682
|
import { DayPicker } from "react-day-picker";
|
|
3683
|
-
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight6 } from "lucide-react";
|
|
3684
|
-
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
3683
|
+
import { ChevronDown as ChevronDown4, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight6 } from "lucide-react";
|
|
3684
|
+
import { Fragment as Fragment2, jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3685
|
+
function CalendarSelect({ children, ...selectProps }) {
|
|
3686
|
+
return /* @__PURE__ */ jsxs32(Fragment2, { children: [
|
|
3687
|
+
/* @__PURE__ */ jsx48("select", { ...selectProps, children }),
|
|
3688
|
+
/* @__PURE__ */ jsx48(ChevronDown4, { "aria-hidden": "true", className: "pointer-events-none absolute end-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" })
|
|
3689
|
+
] });
|
|
3690
|
+
}
|
|
3685
3691
|
var DEFAULT_YEARS_BACK = 10;
|
|
3686
3692
|
var DEFAULT_YEARS_FORWARD = 10;
|
|
3687
3693
|
function Calendar({
|
|
@@ -3704,16 +3710,16 @@ function Calendar({
|
|
|
3704
3710
|
showOutsideDays,
|
|
3705
3711
|
className: cn("w-[260px] rounded-lg p-3", className),
|
|
3706
3712
|
classNames: {
|
|
3707
|
-
months: "flex flex-col",
|
|
3713
|
+
months: "relative flex flex-col",
|
|
3708
3714
|
month: "space-y-3",
|
|
3709
3715
|
month_caption: "relative flex h-8 items-center justify-center",
|
|
3710
3716
|
caption_label: "text-sm font-medium hidden",
|
|
3711
|
-
nav: "flex items-center",
|
|
3717
|
+
nav: "absolute inset-x-0 top-0 flex h-8 items-center",
|
|
3712
3718
|
button_previous: cn(
|
|
3713
|
-
"absolute start-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
|
|
3719
|
+
"absolute start-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
|
|
3714
3720
|
),
|
|
3715
3721
|
button_next: cn(
|
|
3716
|
-
"absolute end-0 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
|
|
3722
|
+
"absolute end-0 top-1/2 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-md bg-transparent p-0 text-muted-foreground hover:bg-muted hover:text-foreground transition-colors cursor-pointer border-none"
|
|
3717
3723
|
),
|
|
3718
3724
|
month_grid: "w-full border-collapse",
|
|
3719
3725
|
weekdays: "flex w-full",
|
|
@@ -3730,8 +3736,9 @@ function Calendar({
|
|
|
3730
3736
|
disabled: "[&>button]:text-muted-foreground [&>button]:opacity-40 [&>button]:cursor-default",
|
|
3731
3737
|
range_middle: "[&>button]:bg-accent [&>button]:text-accent-foreground [&>button]:rounded-none",
|
|
3732
3738
|
range_start: "[&>button]:rounded-e-none",
|
|
3739
|
+
dropdown_root: "relative",
|
|
3733
3740
|
dropdowns: "flex items-center gap-1.5 justify-center",
|
|
3734
|
-
dropdown: "h-7 rounded-md border border-input bg-background
|
|
3741
|
+
dropdown: "h-7 appearance-none rounded-md border border-input bg-background ps-2 pe-6 text-xs font-medium text-foreground cursor-pointer outline-none accent-primary focus:border-ring focus:ring-[2px] focus:ring-ring/20 [&>option:checked]:bg-primary [&>option:checked]:text-primary-foreground [&>option]:py-1",
|
|
3735
3742
|
months_dropdown: "w-[104px]",
|
|
3736
3743
|
years_dropdown: "w-[72px]",
|
|
3737
3744
|
hidden: "invisible",
|
|
@@ -3739,6 +3746,7 @@ function Calendar({
|
|
|
3739
3746
|
},
|
|
3740
3747
|
captionLayout,
|
|
3741
3748
|
components: {
|
|
3749
|
+
Select: CalendarSelect,
|
|
3742
3750
|
Chevron: ({ orientation }) => {
|
|
3743
3751
|
const Icon2 = orientation === "left" ? ChevronLeft2 : ChevronRight6;
|
|
3744
3752
|
return /* @__PURE__ */ jsx48(Icon2, { className: "size-4" });
|
|
@@ -3753,9 +3761,11 @@ Calendar.displayName = "Calendar";
|
|
|
3753
3761
|
// src/components/date-picker.tsx
|
|
3754
3762
|
import * as React44 from "react";
|
|
3755
3763
|
import { CalendarIcon } from "lucide-react";
|
|
3756
|
-
import { jsx as jsx49, jsxs as
|
|
3764
|
+
import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3757
3765
|
function formatDate(d) {
|
|
3758
|
-
|
|
3766
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
3767
|
+
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
3768
|
+
return `${day}/${month}/${d.getFullYear()}`;
|
|
3759
3769
|
}
|
|
3760
3770
|
function DatePicker({
|
|
3761
3771
|
date,
|
|
@@ -3776,10 +3786,10 @@ function DatePicker({
|
|
|
3776
3786
|
if (range.from) return formatDate(range.from);
|
|
3777
3787
|
return /* @__PURE__ */ jsx49("span", { children: placeholder });
|
|
3778
3788
|
}
|
|
3779
|
-
return date
|
|
3789
|
+
return formatDate(date);
|
|
3780
3790
|
}, [date, mode, placeholder]);
|
|
3781
|
-
return /* @__PURE__ */
|
|
3782
|
-
/* @__PURE__ */ jsx49(PopoverTrigger, { asChild: true, children: /* @__PURE__ */
|
|
3791
|
+
return /* @__PURE__ */ jsxs33(Popover, { children: [
|
|
3792
|
+
/* @__PURE__ */ jsx49(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs33(
|
|
3783
3793
|
Button,
|
|
3784
3794
|
{
|
|
3785
3795
|
variant: "outline",
|
|
@@ -3794,7 +3804,7 @@ function DatePicker({
|
|
|
3794
3804
|
]
|
|
3795
3805
|
}
|
|
3796
3806
|
) }),
|
|
3797
|
-
/* @__PURE__ */ jsx49(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */
|
|
3807
|
+
/* @__PURE__ */ jsx49(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxs33("div", { className: "flex", children: [
|
|
3798
3808
|
presets && presets.length > 0 && /* @__PURE__ */ jsx49("div", { className: "flex flex-col gap-1 border-e p-2 min-w-[140px]", children: presets.map((preset) => /* @__PURE__ */ jsx49(
|
|
3799
3809
|
Button,
|
|
3800
3810
|
{
|
|
@@ -3832,7 +3842,7 @@ function DatePicker({
|
|
|
3832
3842
|
// src/components/time-picker.tsx
|
|
3833
3843
|
import * as React45 from "react";
|
|
3834
3844
|
import { ClockIcon } from "lucide-react";
|
|
3835
|
-
import { jsx as jsx50, jsxs as
|
|
3845
|
+
import { jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3836
3846
|
var TIME_VALUE_PATTERN = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
|
3837
3847
|
var MINUTES_PER_DAY = 24 * 60;
|
|
3838
3848
|
var NOON = 12 * 60;
|
|
@@ -3971,7 +3981,7 @@ function TimePickerPanel({
|
|
|
3971
3981
|
);
|
|
3972
3982
|
};
|
|
3973
3983
|
const hourCells = hourCycle === 24 ? Array.from({ length: 24 }, (_, hour) => hour) : [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
3974
|
-
return /* @__PURE__ */
|
|
3984
|
+
return /* @__PURE__ */ jsxs34("div", { className: cn("flex items-start divide-x divide-border", className), children: [
|
|
3975
3985
|
/* @__PURE__ */ jsx50("div", { className: cn(columnClasses), role: "group", "aria-label": hourLabel, children: hourCells.map((cell) => {
|
|
3976
3986
|
const hour = hourCycle === 24 ? cell : to24Hour(cell, activePeriod);
|
|
3977
3987
|
const label = pad2(cell);
|
|
@@ -4040,8 +4050,8 @@ var TimePicker = React45.forwardRef(
|
|
|
4040
4050
|
}, ref) => {
|
|
4041
4051
|
const selected = parseTimeValue(value);
|
|
4042
4052
|
const label = selected === void 0 ? placeholder : formatTimeLabel(selected, hourCycle);
|
|
4043
|
-
return /* @__PURE__ */
|
|
4044
|
-
/* @__PURE__ */ jsx50(PopoverTrigger, { asChild: true, children: /* @__PURE__ */
|
|
4053
|
+
return /* @__PURE__ */ jsxs34(Popover, { open, onOpenChange, children: [
|
|
4054
|
+
/* @__PURE__ */ jsx50(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs34(
|
|
4045
4055
|
Button,
|
|
4046
4056
|
{
|
|
4047
4057
|
ref,
|
|
@@ -4062,7 +4072,7 @@ var TimePicker = React45.forwardRef(
|
|
|
4062
4072
|
]
|
|
4063
4073
|
}
|
|
4064
4074
|
) }),
|
|
4065
|
-
/* @__PURE__ */
|
|
4075
|
+
/* @__PURE__ */ jsxs34(
|
|
4066
4076
|
PopoverContent,
|
|
4067
4077
|
{
|
|
4068
4078
|
className: cn("w-auto p-0", contentClassName),
|
|
@@ -4104,7 +4114,7 @@ TimePicker.displayName = "TimePicker";
|
|
|
4104
4114
|
// src/components/date-time-picker.tsx
|
|
4105
4115
|
import * as React46 from "react";
|
|
4106
4116
|
import { CalendarClockIcon } from "lucide-react";
|
|
4107
|
-
import { jsx as jsx51, jsxs as
|
|
4117
|
+
import { jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4108
4118
|
function startOfDay(date) {
|
|
4109
4119
|
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
4110
4120
|
}
|
|
@@ -4231,8 +4241,8 @@ var DateTimePicker = React46.forwardRef(
|
|
|
4231
4241
|
setDraft(withTime(draft ?? activeDay, minutes));
|
|
4232
4242
|
};
|
|
4233
4243
|
const label = value ? formatValue?.(value) ?? `${value.toLocaleDateString()} ${formatTimeLabel(minutesOfDay(value), hourCycle)}` : placeholder;
|
|
4234
|
-
return /* @__PURE__ */
|
|
4235
|
-
/* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */
|
|
4244
|
+
return /* @__PURE__ */ jsxs35(Popover, { open: isOpen, onOpenChange: handleOpenChange, children: [
|
|
4245
|
+
/* @__PURE__ */ jsx51(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs35(
|
|
4236
4246
|
Button,
|
|
4237
4247
|
{
|
|
4238
4248
|
ref,
|
|
@@ -4253,14 +4263,14 @@ var DateTimePicker = React46.forwardRef(
|
|
|
4253
4263
|
]
|
|
4254
4264
|
}
|
|
4255
4265
|
) }),
|
|
4256
|
-
/* @__PURE__ */
|
|
4266
|
+
/* @__PURE__ */ jsxs35(
|
|
4257
4267
|
PopoverContent,
|
|
4258
4268
|
{
|
|
4259
4269
|
className: cn("w-auto p-0", contentClassName),
|
|
4260
4270
|
align,
|
|
4261
4271
|
"aria-label": ariaLabel ?? placeholder,
|
|
4262
4272
|
children: [
|
|
4263
|
-
/* @__PURE__ */
|
|
4273
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex flex-col sm:flex-row sm:items-start sm:divide-x sm:divide-border", children: [
|
|
4264
4274
|
/* @__PURE__ */ jsx51(
|
|
4265
4275
|
Calendar,
|
|
4266
4276
|
{
|
|
@@ -4274,7 +4284,7 @@ var DateTimePicker = React46.forwardRef(
|
|
|
4274
4284
|
autoFocus: true
|
|
4275
4285
|
}
|
|
4276
4286
|
),
|
|
4277
|
-
/* @__PURE__ */
|
|
4287
|
+
/* @__PURE__ */ jsxs35("div", { className: "border-t border-border p-2 sm:border-t-0", children: [
|
|
4278
4288
|
/* @__PURE__ */ jsx51("div", { className: "px-1 pb-1 text-xs font-medium uppercase tracking-wider text-muted-foreground", children: timeLabel }),
|
|
4279
4289
|
/* @__PURE__ */ jsx51(
|
|
4280
4290
|
TimePickerPanel,
|
|
@@ -4289,7 +4299,7 @@ var DateTimePicker = React46.forwardRef(
|
|
|
4289
4299
|
)
|
|
4290
4300
|
] })
|
|
4291
4301
|
] }),
|
|
4292
|
-
/* @__PURE__ */
|
|
4302
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2 border-t border-border p-2", children: [
|
|
4293
4303
|
clearable && /* @__PURE__ */ jsx51(
|
|
4294
4304
|
Button,
|
|
4295
4305
|
{
|
|
@@ -4302,7 +4312,7 @@ var DateTimePicker = React46.forwardRef(
|
|
|
4302
4312
|
children: clearLabel
|
|
4303
4313
|
}
|
|
4304
4314
|
),
|
|
4305
|
-
/* @__PURE__ */
|
|
4315
|
+
/* @__PURE__ */ jsxs35("div", { className: "ms-auto flex items-center gap-2", children: [
|
|
4306
4316
|
/* @__PURE__ */ jsx51(
|
|
4307
4317
|
Button,
|
|
4308
4318
|
{
|
|
@@ -4339,7 +4349,7 @@ DateTimePicker.displayName = "DateTimePicker";
|
|
|
4339
4349
|
import * as React47 from "react";
|
|
4340
4350
|
import { Command as CommandPrimitive } from "cmdk";
|
|
4341
4351
|
import { Search } from "lucide-react";
|
|
4342
|
-
import { jsx as jsx52, jsxs as
|
|
4352
|
+
import { jsx as jsx52, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4343
4353
|
var Command = React47.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx52(
|
|
4344
4354
|
CommandPrimitive,
|
|
4345
4355
|
{
|
|
@@ -4355,7 +4365,7 @@ Command.displayName = CommandPrimitive.displayName;
|
|
|
4355
4365
|
var CommandDialog = ({ children, ...props }) => {
|
|
4356
4366
|
return /* @__PURE__ */ jsx52(Dialog, { ...props, children: /* @__PURE__ */ jsx52(DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ jsx52(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
|
4357
4367
|
};
|
|
4358
|
-
var CommandInput = React47.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
4368
|
+
var CommandInput = React47.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs36("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
4359
4369
|
/* @__PURE__ */ jsx52(Search, { className: "me-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
4360
4370
|
/* @__PURE__ */ jsx52(
|
|
4361
4371
|
CommandPrimitive.Input,
|
|
@@ -4414,7 +4424,7 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
|
4414
4424
|
import * as React48 from "react";
|
|
4415
4425
|
import useEmblaCarousel from "embla-carousel-react";
|
|
4416
4426
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
4417
|
-
import { jsx as jsx53, jsxs as
|
|
4427
|
+
import { jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4418
4428
|
var CarouselContext = React48.createContext(null);
|
|
4419
4429
|
function useCarousel() {
|
|
4420
4430
|
const context = React48.useContext(CarouselContext);
|
|
@@ -4479,7 +4489,7 @@ CarouselItem.displayName = "CarouselItem";
|
|
|
4479
4489
|
var CarouselPrevious = React48.forwardRef(
|
|
4480
4490
|
({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
4481
4491
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
4482
|
-
return /* @__PURE__ */
|
|
4492
|
+
return /* @__PURE__ */ jsxs37(Button, { ref, variant, size, className: cn("absolute h-8 w-8 rounded-full", orientation === "horizontal" ? "-start-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev, ...props, children: [
|
|
4483
4493
|
/* @__PURE__ */ jsx53(ArrowLeft, { className: "h-4 w-4" }),
|
|
4484
4494
|
/* @__PURE__ */ jsx53("span", { className: "sr-only", children: "Previous slide" })
|
|
4485
4495
|
] });
|
|
@@ -4489,7 +4499,7 @@ CarouselPrevious.displayName = "CarouselPrevious";
|
|
|
4489
4499
|
var CarouselNext = React48.forwardRef(
|
|
4490
4500
|
({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
4491
4501
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
4492
|
-
return /* @__PURE__ */
|
|
4502
|
+
return /* @__PURE__ */ jsxs37(Button, { ref, variant, size, className: cn("absolute h-8 w-8 rounded-full", orientation === "horizontal" ? "-end-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext, ...props, children: [
|
|
4493
4503
|
/* @__PURE__ */ jsx53(ArrowRight, { className: "h-4 w-4" }),
|
|
4494
4504
|
/* @__PURE__ */ jsx53("span", { className: "sr-only", children: "Next slide" })
|
|
4495
4505
|
] });
|
|
@@ -4500,7 +4510,7 @@ CarouselNext.displayName = "CarouselNext";
|
|
|
4500
4510
|
// src/components/chart.tsx
|
|
4501
4511
|
import * as React49 from "react";
|
|
4502
4512
|
import * as RechartsPrimitive from "recharts";
|
|
4503
|
-
import { Fragment as
|
|
4513
|
+
import { Fragment as Fragment3, jsx as jsx54, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4504
4514
|
var THEMES = { light: "", dark: ".dark" };
|
|
4505
4515
|
var ChartContext = React49.createContext(null);
|
|
4506
4516
|
function useChart() {
|
|
@@ -4511,7 +4521,7 @@ function useChart() {
|
|
|
4511
4521
|
var ChartContainer = React49.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
4512
4522
|
const uniqueId = React49.useId();
|
|
4513
4523
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
4514
|
-
return /* @__PURE__ */ jsx54(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */
|
|
4524
|
+
return /* @__PURE__ */ jsx54(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs38(
|
|
4515
4525
|
"div",
|
|
4516
4526
|
{
|
|
4517
4527
|
"data-chart": chartId,
|
|
@@ -4566,13 +4576,13 @@ var ChartTooltipContent = React49.forwardRef(
|
|
|
4566
4576
|
return /* @__PURE__ */ jsx54("div", { className: cn("font-medium", labelClassName), children: value });
|
|
4567
4577
|
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
|
|
4568
4578
|
if (!active || !payload?.length) return null;
|
|
4569
|
-
return /* @__PURE__ */
|
|
4579
|
+
return /* @__PURE__ */ jsxs38("div", { ref, className: cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className), children: [
|
|
4570
4580
|
tooltipLabel,
|
|
4571
4581
|
/* @__PURE__ */ jsx54("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
|
|
4572
4582
|
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
4573
4583
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
4574
4584
|
const indicatorColor = color || item.payload?.fill || item.color;
|
|
4575
|
-
return /* @__PURE__ */ jsx54("div", { className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"), children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */
|
|
4585
|
+
return /* @__PURE__ */ jsx54("div", { className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"), children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs38(Fragment3, { children: [
|
|
4576
4586
|
!hideIndicator && /* @__PURE__ */ jsx54(
|
|
4577
4587
|
"div",
|
|
4578
4588
|
{
|
|
@@ -4585,7 +4595,7 @@ var ChartTooltipContent = React49.forwardRef(
|
|
|
4585
4595
|
style: { "--color-bg": indicatorColor, "--color-border": indicatorColor }
|
|
4586
4596
|
}
|
|
4587
4597
|
),
|
|
4588
|
-
/* @__PURE__ */
|
|
4598
|
+
/* @__PURE__ */ jsxs38("div", { className: cn("flex flex-1 justify-between leading-none", hideIndicator ? "gap-2" : "gap-2"), children: [
|
|
4589
4599
|
/* @__PURE__ */ jsx54("div", { className: "grid gap-1.5", children: /* @__PURE__ */ jsx54("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name }) }),
|
|
4590
4600
|
item.value !== void 0 && /* @__PURE__ */ jsx54("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
|
|
4591
4601
|
] })
|
|
@@ -4602,7 +4612,7 @@ var ChartLegendContent = React49.forwardRef(({ className, hideIcon = false, payl
|
|
|
4602
4612
|
return /* @__PURE__ */ jsx54("div", { ref, className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className), children: payload.map((item) => {
|
|
4603
4613
|
const key = `${nameKey || item.dataKey || "value"}`;
|
|
4604
4614
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
4605
|
-
return /* @__PURE__ */
|
|
4615
|
+
return /* @__PURE__ */ jsxs38("div", { className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"), children: [
|
|
4606
4616
|
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx54(itemConfig.icon, {}) : /* @__PURE__ */ jsx54("div", { className: "h-2 w-2 shrink-0 rounded-[2px]", style: { backgroundColor: item.color } }),
|
|
4607
4617
|
itemConfig?.label
|
|
4608
4618
|
] }, item.value);
|
|
@@ -4624,11 +4634,11 @@ function getPayloadConfigFromPayload(config, payload, key) {
|
|
|
4624
4634
|
// src/components/dashboard-header.tsx
|
|
4625
4635
|
import * as React50 from "react";
|
|
4626
4636
|
import { Search as Search2, Bell } from "lucide-react";
|
|
4627
|
-
import { jsx as jsx55, jsxs as
|
|
4637
|
+
import { jsx as jsx55, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4628
4638
|
var DashboardHeader = React50.forwardRef(
|
|
4629
4639
|
({ title, onSearch, notificationCount, user, className, ...props }, ref) => {
|
|
4630
4640
|
const [searchQuery, setSearchQuery] = React50.useState("");
|
|
4631
|
-
return /* @__PURE__ */
|
|
4641
|
+
return /* @__PURE__ */ jsxs39(
|
|
4632
4642
|
"header",
|
|
4633
4643
|
{
|
|
4634
4644
|
ref,
|
|
@@ -4639,8 +4649,8 @@ var DashboardHeader = React50.forwardRef(
|
|
|
4639
4649
|
...props,
|
|
4640
4650
|
children: [
|
|
4641
4651
|
title && /* @__PURE__ */ jsx55("h1", { className: "truncate text-base font-semibold text-foreground", children: title }),
|
|
4642
|
-
/* @__PURE__ */
|
|
4643
|
-
onSearch && /* @__PURE__ */
|
|
4652
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-3", children: [
|
|
4653
|
+
onSearch && /* @__PURE__ */ jsxs39("div", { className: "flex h-9 w-[260px] items-center gap-2 rounded-md border border-input bg-background px-3 transition-[border-color,box-shadow] duration-150 focus-within:border-[var(--hc-primary-500)] focus-within:ring-[3px] focus-within:ring-[color-mix(in_srgb,var(--hc-primary-500)_22%,transparent)]", children: [
|
|
4644
4654
|
/* @__PURE__ */ jsx55(Search2, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
4645
4655
|
/* @__PURE__ */ jsx55(
|
|
4646
4656
|
"input",
|
|
@@ -4657,7 +4667,7 @@ var DashboardHeader = React50.forwardRef(
|
|
|
4657
4667
|
}
|
|
4658
4668
|
)
|
|
4659
4669
|
] }),
|
|
4660
|
-
/* @__PURE__ */
|
|
4670
|
+
/* @__PURE__ */ jsxs39("div", { className: "relative", children: [
|
|
4661
4671
|
/* @__PURE__ */ jsx55(
|
|
4662
4672
|
"button",
|
|
4663
4673
|
{
|
|
@@ -4676,8 +4686,8 @@ var DashboardHeader = React50.forwardRef(
|
|
|
4676
4686
|
}
|
|
4677
4687
|
)
|
|
4678
4688
|
] }),
|
|
4679
|
-
user && /* @__PURE__ */
|
|
4680
|
-
/* @__PURE__ */
|
|
4689
|
+
user && /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-3 ps-3 border-s border-[var(--hc-color-border-subtle)]", children: [
|
|
4690
|
+
/* @__PURE__ */ jsxs39("div", { className: "text-end leading-tight", children: [
|
|
4681
4691
|
/* @__PURE__ */ jsx55("p", { className: "text-sm font-semibold text-foreground", children: user.name }),
|
|
4682
4692
|
/* @__PURE__ */ jsx55("p", { className: "text-xs text-muted-foreground", children: user.role })
|
|
4683
4693
|
] }),
|
|
@@ -4694,7 +4704,7 @@ DashboardHeader.displayName = "DashboardHeader";
|
|
|
4694
4704
|
// src/components/app-header.tsx
|
|
4695
4705
|
import * as React51 from "react";
|
|
4696
4706
|
import { Search as Search3, Bell as Bell2, Moon } from "lucide-react";
|
|
4697
|
-
import { jsx as jsx56, jsxs as
|
|
4707
|
+
import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4698
4708
|
var AppHeader = React51.forwardRef(
|
|
4699
4709
|
({
|
|
4700
4710
|
onSearch,
|
|
@@ -4708,7 +4718,7 @@ var AppHeader = React51.forwardRef(
|
|
|
4708
4718
|
...props
|
|
4709
4719
|
}, ref) => {
|
|
4710
4720
|
const [searchQuery, setSearchQuery] = React51.useState("");
|
|
4711
|
-
return /* @__PURE__ */
|
|
4721
|
+
return /* @__PURE__ */ jsxs40(
|
|
4712
4722
|
"header",
|
|
4713
4723
|
{
|
|
4714
4724
|
ref,
|
|
@@ -4718,7 +4728,7 @@ var AppHeader = React51.forwardRef(
|
|
|
4718
4728
|
),
|
|
4719
4729
|
...props,
|
|
4720
4730
|
children: [
|
|
4721
|
-
onSearch && /* @__PURE__ */
|
|
4731
|
+
onSearch && /* @__PURE__ */ jsxs40("div", { className: "flex h-9 w-[300px] items-center gap-2 rounded-md border border-input bg-background px-3 transition-[border-color,box-shadow] duration-150 focus-within:border-[var(--hc-primary-500)] focus-within:ring-[3px] focus-within:ring-[color-mix(in_srgb,var(--hc-primary-500)_22%,transparent)]", children: [
|
|
4722
4732
|
/* @__PURE__ */ jsx56(Search3, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
4723
4733
|
/* @__PURE__ */ jsx56(
|
|
4724
4734
|
"input",
|
|
@@ -4735,7 +4745,7 @@ var AppHeader = React51.forwardRef(
|
|
|
4735
4745
|
}
|
|
4736
4746
|
)
|
|
4737
4747
|
] }),
|
|
4738
|
-
/* @__PURE__ */
|
|
4748
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2", children: [
|
|
4739
4749
|
showThemeToggle && /* @__PURE__ */ jsx56(
|
|
4740
4750
|
"button",
|
|
4741
4751
|
{
|
|
@@ -4746,7 +4756,7 @@ var AppHeader = React51.forwardRef(
|
|
|
4746
4756
|
children: /* @__PURE__ */ jsx56(Moon, { className: "size-[18px]" })
|
|
4747
4757
|
}
|
|
4748
4758
|
),
|
|
4749
|
-
/* @__PURE__ */
|
|
4759
|
+
/* @__PURE__ */ jsxs40(
|
|
4750
4760
|
"button",
|
|
4751
4761
|
{
|
|
4752
4762
|
type: "button",
|
|
@@ -4765,8 +4775,8 @@ var AppHeader = React51.forwardRef(
|
|
|
4765
4775
|
]
|
|
4766
4776
|
}
|
|
4767
4777
|
),
|
|
4768
|
-
user && /* @__PURE__ */
|
|
4769
|
-
/* @__PURE__ */
|
|
4778
|
+
user && /* @__PURE__ */ jsxs40("div", { className: "ms-1 flex items-center gap-3 ps-3 border-s border-[var(--hc-color-border-subtle)]", children: [
|
|
4779
|
+
/* @__PURE__ */ jsxs40("div", { className: "text-end leading-tight", children: [
|
|
4770
4780
|
/* @__PURE__ */ jsx56("p", { className: "text-sm font-semibold text-foreground", children: user.name }),
|
|
4771
4781
|
/* @__PURE__ */ jsx56("p", { className: "text-xs text-muted-foreground truncate max-w-[160px]", children: user.email })
|
|
4772
4782
|
] }),
|
|
@@ -4780,8 +4790,168 @@ var AppHeader = React51.forwardRef(
|
|
|
4780
4790
|
);
|
|
4781
4791
|
AppHeader.displayName = "AppHeader";
|
|
4782
4792
|
|
|
4793
|
+
// src/components/app-launcher.tsx
|
|
4794
|
+
import * as React52 from "react";
|
|
4795
|
+
import { LayoutGrid, Pin } from "lucide-react";
|
|
4796
|
+
import { Fragment as Fragment4, jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4797
|
+
function loadPinnedIds(storageKey) {
|
|
4798
|
+
if (typeof window === "undefined") return [];
|
|
4799
|
+
try {
|
|
4800
|
+
return JSON.parse(localStorage.getItem(storageKey) ?? "[]");
|
|
4801
|
+
} catch {
|
|
4802
|
+
return [];
|
|
4803
|
+
}
|
|
4804
|
+
}
|
|
4805
|
+
var DefaultTrigger = React52.forwardRef(
|
|
4806
|
+
({ active }, ref) => /* @__PURE__ */ jsx57(
|
|
4807
|
+
"button",
|
|
4808
|
+
{
|
|
4809
|
+
ref,
|
|
4810
|
+
type: "button",
|
|
4811
|
+
"aria-label": "Apps",
|
|
4812
|
+
className: cn(
|
|
4813
|
+
"flex size-9 items-center justify-center rounded-md transition-colors",
|
|
4814
|
+
active ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted/70 hover:text-foreground"
|
|
4815
|
+
),
|
|
4816
|
+
children: /* @__PURE__ */ jsx57(LayoutGrid, { className: "size-[18px]" })
|
|
4817
|
+
}
|
|
4818
|
+
)
|
|
4819
|
+
);
|
|
4820
|
+
DefaultTrigger.displayName = "AppLauncherDefaultTrigger";
|
|
4821
|
+
function AppTile({
|
|
4822
|
+
app,
|
|
4823
|
+
pinned,
|
|
4824
|
+
pinningEnabled,
|
|
4825
|
+
onLaunch,
|
|
4826
|
+
onTogglePin
|
|
4827
|
+
}) {
|
|
4828
|
+
return /* @__PURE__ */ jsxs41(
|
|
4829
|
+
"button",
|
|
4830
|
+
{
|
|
4831
|
+
type: "button",
|
|
4832
|
+
onClick: () => onLaunch(app),
|
|
4833
|
+
className: "group relative flex flex-col items-center gap-2 rounded-xl p-2.5 text-center outline-none transition-colors duration-150 hover:bg-muted/60 focus-visible:bg-muted/60",
|
|
4834
|
+
children: [
|
|
4835
|
+
pinningEnabled && /* @__PURE__ */ jsx57(
|
|
4836
|
+
"span",
|
|
4837
|
+
{
|
|
4838
|
+
role: "button",
|
|
4839
|
+
tabIndex: 0,
|
|
4840
|
+
"aria-label": pinned ? "Unpin app" : "Pin app",
|
|
4841
|
+
onClick: (e) => {
|
|
4842
|
+
e.stopPropagation();
|
|
4843
|
+
onTogglePin(app.id);
|
|
4844
|
+
},
|
|
4845
|
+
onKeyDown: (e) => {
|
|
4846
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
4847
|
+
e.stopPropagation();
|
|
4848
|
+
e.preventDefault();
|
|
4849
|
+
onTogglePin(app.id);
|
|
4850
|
+
}
|
|
4851
|
+
},
|
|
4852
|
+
className: cn(
|
|
4853
|
+
"absolute right-1 top-1 z-10 flex h-5 w-5 items-center justify-center rounded-full text-muted-foreground transition-opacity",
|
|
4854
|
+
pinned ? "text-primary opacity-100" : "opacity-0 hover:text-foreground group-hover:opacity-100"
|
|
4855
|
+
),
|
|
4856
|
+
children: /* @__PURE__ */ jsx57(Pin, { className: cn("size-3", pinned && "fill-current") })
|
|
4857
|
+
}
|
|
4858
|
+
),
|
|
4859
|
+
/* @__PURE__ */ jsx57("span", { className: "relative flex h-12 w-12 items-center justify-center rounded-2xl bg-muted/50 shadow-sm ring-1 ring-border/60 transition-transform duration-150 group-hover:scale-[1.06] group-hover:shadow-md", children: app.iconUrl ? /* @__PURE__ */ jsx57("img", { src: app.iconUrl, alt: "", className: "h-full w-full rounded-2xl object-contain p-2" }) : /* @__PURE__ */ jsx57("span", { className: "flex h-full w-full items-center justify-center rounded-2xl text-sm font-semibold text-primary", children: app.displayName.slice(0, 1).toUpperCase() }) }),
|
|
4860
|
+
/* @__PURE__ */ jsx57("span", { className: "line-clamp-2 text-[11px] font-medium leading-tight text-foreground", children: app.displayName })
|
|
4861
|
+
]
|
|
4862
|
+
}
|
|
4863
|
+
);
|
|
4864
|
+
}
|
|
4865
|
+
var AppLauncher = React52.forwardRef(
|
|
4866
|
+
({
|
|
4867
|
+
apps,
|
|
4868
|
+
isLoading = false,
|
|
4869
|
+
onLaunch,
|
|
4870
|
+
title = "Apps",
|
|
4871
|
+
emptyLabel = "No apps available",
|
|
4872
|
+
pinStorageKey,
|
|
4873
|
+
maxPins = 4,
|
|
4874
|
+
trigger,
|
|
4875
|
+
open,
|
|
4876
|
+
onOpenChange,
|
|
4877
|
+
className
|
|
4878
|
+
}, ref) => {
|
|
4879
|
+
const [internalOpen, setInternalOpen] = React52.useState(false);
|
|
4880
|
+
const isOpen = open ?? internalOpen;
|
|
4881
|
+
const setOpen = onOpenChange ?? setInternalOpen;
|
|
4882
|
+
const [pinnedIds, setPinnedIds] = React52.useState([]);
|
|
4883
|
+
React52.useEffect(() => {
|
|
4884
|
+
if (pinStorageKey) setPinnedIds(loadPinnedIds(pinStorageKey));
|
|
4885
|
+
}, [pinStorageKey]);
|
|
4886
|
+
const togglePin = (id) => {
|
|
4887
|
+
if (!pinStorageKey) return;
|
|
4888
|
+
setPinnedIds((prev) => {
|
|
4889
|
+
const next = prev.includes(id) ? prev.filter((p) => p !== id) : [...prev, id].slice(-maxPins);
|
|
4890
|
+
localStorage.setItem(pinStorageKey, JSON.stringify(next));
|
|
4891
|
+
return next;
|
|
4892
|
+
});
|
|
4893
|
+
};
|
|
4894
|
+
const handleLaunch = (app) => {
|
|
4895
|
+
onLaunch(app);
|
|
4896
|
+
setOpen(false);
|
|
4897
|
+
};
|
|
4898
|
+
const pinningEnabled = !!pinStorageKey;
|
|
4899
|
+
const pinnedApps = pinningEnabled ? pinnedIds.map((id) => apps.find((a) => a.id === id)).filter((a) => !!a) : [];
|
|
4900
|
+
const restApps = pinningEnabled ? apps.filter((a) => !pinnedIds.includes(a.id)) : apps;
|
|
4901
|
+
return /* @__PURE__ */ jsxs41(Popover, { open: isOpen, onOpenChange: setOpen, children: [
|
|
4902
|
+
/* @__PURE__ */ jsx57(PopoverTrigger, { asChild: true, children: trigger ?? /* @__PURE__ */ jsx57(DefaultTrigger, { ref, active: isOpen }) }),
|
|
4903
|
+
/* @__PURE__ */ jsx57(
|
|
4904
|
+
PopoverContent,
|
|
4905
|
+
{
|
|
4906
|
+
align: "end",
|
|
4907
|
+
sideOffset: 10,
|
|
4908
|
+
className: cn("w-[22rem] border-none bg-transparent p-0 shadow-none", className),
|
|
4909
|
+
children: /* @__PURE__ */ jsxs41("div", { className: "overflow-hidden rounded-2xl border border-border/60 bg-card shadow-2xl shadow-black/10 ring-1 ring-border/50 dark:shadow-black/40", children: [
|
|
4910
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between px-4 pb-3 pt-4", children: [
|
|
4911
|
+
/* @__PURE__ */ jsx57("span", { className: "text-[13px] font-semibold tracking-tight text-foreground", children: title }),
|
|
4912
|
+
/* @__PURE__ */ jsx57("span", { className: "text-[11px] font-medium text-muted-foreground", children: apps.length > 0 ? apps.length : "" })
|
|
4913
|
+
] }),
|
|
4914
|
+
/* @__PURE__ */ jsx57("div", { className: "max-h-96 overflow-y-auto px-2 pb-3", children: isLoading ? /* @__PURE__ */ jsx57("div", { className: "grid grid-cols-4 gap-1 p-1", children: Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsxs41("div", { className: "flex flex-col items-center gap-2 rounded-xl p-2.5", children: [
|
|
4915
|
+
/* @__PURE__ */ jsx57("div", { className: "h-12 w-12 animate-pulse rounded-2xl bg-muted/60" }),
|
|
4916
|
+
/* @__PURE__ */ jsx57("div", { className: "h-2.5 w-10 animate-pulse rounded-full bg-muted/60" })
|
|
4917
|
+
] }, i)) }) : apps.length === 0 ? /* @__PURE__ */ jsx57("p", { className: "py-10 text-center text-sm text-muted-foreground", children: emptyLabel }) : /* @__PURE__ */ jsxs41(Fragment4, { children: [
|
|
4918
|
+
pinnedApps.length > 0 && /* @__PURE__ */ jsxs41(Fragment4, { children: [
|
|
4919
|
+
/* @__PURE__ */ jsx57("div", { className: "px-1 pb-1.5 pt-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: "Pinned" }),
|
|
4920
|
+
/* @__PURE__ */ jsx57("div", { className: "grid grid-cols-4 gap-1", children: pinnedApps.map((app) => /* @__PURE__ */ jsx57(
|
|
4921
|
+
AppTile,
|
|
4922
|
+
{
|
|
4923
|
+
app,
|
|
4924
|
+
pinned: true,
|
|
4925
|
+
pinningEnabled,
|
|
4926
|
+
onLaunch: handleLaunch,
|
|
4927
|
+
onTogglePin: togglePin
|
|
4928
|
+
},
|
|
4929
|
+
app.id
|
|
4930
|
+
)) }),
|
|
4931
|
+
/* @__PURE__ */ jsx57("div", { className: "my-2 border-t border-border/60" })
|
|
4932
|
+
] }),
|
|
4933
|
+
/* @__PURE__ */ jsx57("div", { className: "grid grid-cols-4 gap-1", children: restApps.map((app) => /* @__PURE__ */ jsx57(
|
|
4934
|
+
AppTile,
|
|
4935
|
+
{
|
|
4936
|
+
app,
|
|
4937
|
+
pinned: false,
|
|
4938
|
+
pinningEnabled,
|
|
4939
|
+
onLaunch: handleLaunch,
|
|
4940
|
+
onTogglePin: togglePin
|
|
4941
|
+
},
|
|
4942
|
+
app.id
|
|
4943
|
+
)) })
|
|
4944
|
+
] }) })
|
|
4945
|
+
] })
|
|
4946
|
+
}
|
|
4947
|
+
)
|
|
4948
|
+
] });
|
|
4949
|
+
}
|
|
4950
|
+
);
|
|
4951
|
+
AppLauncher.displayName = "AppLauncher";
|
|
4952
|
+
|
|
4783
4953
|
// src/components/icon/bell-icon.tsx
|
|
4784
|
-
import { jsx as
|
|
4954
|
+
import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4785
4955
|
function BellIcon({
|
|
4786
4956
|
size = 20,
|
|
4787
4957
|
width,
|
|
@@ -4789,7 +4959,7 @@ function BellIcon({
|
|
|
4789
4959
|
fill = "none",
|
|
4790
4960
|
...props
|
|
4791
4961
|
}) {
|
|
4792
|
-
return /* @__PURE__ */
|
|
4962
|
+
return /* @__PURE__ */ jsxs42(
|
|
4793
4963
|
"svg",
|
|
4794
4964
|
{
|
|
4795
4965
|
viewBox: "0 0 20 20",
|
|
@@ -4799,7 +4969,7 @@ function BellIcon({
|
|
|
4799
4969
|
"aria-hidden": "true",
|
|
4800
4970
|
...props,
|
|
4801
4971
|
children: [
|
|
4802
|
-
/* @__PURE__ */
|
|
4972
|
+
/* @__PURE__ */ jsx58(
|
|
4803
4973
|
"path",
|
|
4804
4974
|
{
|
|
4805
4975
|
d: "M10 2.75a3.5 3.5 0 0 0-3.5 3.5v1.137c0 .647-.215 1.276-.611 1.788l-.82 1.062A2.25 2.25 0 0 0 6.85 13.75h6.3a2.25 2.25 0 0 0 1.781-3.513l-.82-1.062A2.935 2.935 0 0 1 13.5 7.387V6.25A3.5 3.5 0 0 0 10 2.75Z",
|
|
@@ -4809,7 +4979,7 @@ function BellIcon({
|
|
|
4809
4979
|
strokeLinejoin: "round"
|
|
4810
4980
|
}
|
|
4811
4981
|
),
|
|
4812
|
-
/* @__PURE__ */
|
|
4982
|
+
/* @__PURE__ */ jsx58(
|
|
4813
4983
|
"path",
|
|
4814
4984
|
{
|
|
4815
4985
|
d: "M8.25 15.25a1.75 1.75 0 0 0 3.5 0",
|
|
@@ -4825,18 +4995,18 @@ function BellIcon({
|
|
|
4825
4995
|
}
|
|
4826
4996
|
|
|
4827
4997
|
// src/components/icon/icon-info-line-icon.tsx
|
|
4828
|
-
import { jsx as
|
|
4998
|
+
import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4829
4999
|
function IconInfoLineIcon({ size = 16, width, height, fill, title, ...props }) {
|
|
4830
|
-
return /* @__PURE__ */
|
|
4831
|
-
/* @__PURE__ */
|
|
4832
|
-
title ? /* @__PURE__ */
|
|
5000
|
+
return /* @__PURE__ */ jsxs43("svg", { viewBox: "0 0 16 16", width: width ?? size, height: height ?? size, fill: fill ?? "none", "aria-hidden": title ? void 0 : true, role: title ? "img" : "presentation", ...props, children: [
|
|
5001
|
+
/* @__PURE__ */ jsx59("path", { d: "M7.99992 5.33333H8.00525M7.99992 10.6667V7.33333M14.6666 8C14.6666 11.682 11.6819 14.6667 7.99992 14.6667C4.31792 14.6667 1.33325 11.682 1.33325 8C1.33325 4.318 4.31792 1.33333 7.99992 1.33333C11.6819 1.33333 14.6666 4.318 14.6666 8Z", stroke: "black", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
5002
|
+
title ? /* @__PURE__ */ jsx59("title", { children: title }) : null
|
|
4833
5003
|
] });
|
|
4834
5004
|
}
|
|
4835
5005
|
|
|
4836
5006
|
// src/components/sonner.tsx
|
|
4837
5007
|
import { useTheme } from "next-themes";
|
|
4838
5008
|
import { Toaster as Sonner, toast as sonnerToast } from "sonner";
|
|
4839
|
-
import { jsx as
|
|
5009
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
4840
5010
|
var TOAST_DURATION_MS = 4e3;
|
|
4841
5011
|
var ERROR_TOAST_MS = 7e3;
|
|
4842
5012
|
var TOKENS = {
|
|
@@ -4862,7 +5032,7 @@ var CLASS_NAMES = {
|
|
|
4862
5032
|
var TOAST_BOTTOM_OFFSET = "calc(16px + env(safe-area-inset-bottom, 0px))";
|
|
4863
5033
|
var Toaster = ({ style, toastOptions, ...props }) => {
|
|
4864
5034
|
const { resolvedTheme, forcedTheme } = useTheme();
|
|
4865
|
-
return /* @__PURE__ */
|
|
5035
|
+
return /* @__PURE__ */ jsx60(
|
|
4866
5036
|
Sonner,
|
|
4867
5037
|
{
|
|
4868
5038
|
theme: (forcedTheme ?? resolvedTheme) === "dark" ? "dark" : "light",
|
|
@@ -4900,8 +5070,8 @@ var toast = Object.assign(
|
|
|
4900
5070
|
);
|
|
4901
5071
|
|
|
4902
5072
|
// src/components/typography.tsx
|
|
4903
|
-
import * as
|
|
4904
|
-
import { jsx as
|
|
5073
|
+
import * as React53 from "react";
|
|
5074
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
4905
5075
|
var weightMap = {
|
|
4906
5076
|
extrabold: "font-extrabold",
|
|
4907
5077
|
bold: "font-bold",
|
|
@@ -4923,44 +5093,44 @@ function resolveColor(color, defaultColorClass) {
|
|
|
4923
5093
|
if (!color || color === "default") return defaultColorClass;
|
|
4924
5094
|
return colorMap[color];
|
|
4925
5095
|
}
|
|
4926
|
-
var H1 =
|
|
4927
|
-
({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */
|
|
5096
|
+
var H1 = React53.forwardRef(
|
|
5097
|
+
({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ jsx61("h1", { ref, className: cn("scroll-m-20 text-3xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
|
|
4928
5098
|
);
|
|
4929
5099
|
H1.displayName = "H1";
|
|
4930
|
-
var H2 =
|
|
4931
|
-
({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */
|
|
5100
|
+
var H2 = React53.forwardRef(
|
|
5101
|
+
({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ jsx61("h2", { ref, className: cn("scroll-m-20 text-2xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
|
|
4932
5102
|
);
|
|
4933
5103
|
H2.displayName = "H2";
|
|
4934
|
-
var H3 =
|
|
4935
|
-
({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */
|
|
5104
|
+
var H3 = React53.forwardRef(
|
|
5105
|
+
({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ jsx61("h3", { ref, className: cn("scroll-m-20 text-xl tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
|
|
4936
5106
|
);
|
|
4937
5107
|
H3.displayName = "H3";
|
|
4938
|
-
var H4 =
|
|
4939
|
-
({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */
|
|
5108
|
+
var H4 = React53.forwardRef(
|
|
5109
|
+
({ className, weight = "semibold", color, children, ...props }, ref) => /* @__PURE__ */ jsx61("h4", { ref, className: cn("scroll-m-20 text-lg tracking-tight", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props, children })
|
|
4940
5110
|
);
|
|
4941
5111
|
H4.displayName = "H4";
|
|
4942
|
-
var Body =
|
|
4943
|
-
({ className, weight = "regular", color, ...props }, ref) => /* @__PURE__ */
|
|
5112
|
+
var Body = React53.forwardRef(
|
|
5113
|
+
({ className, weight = "regular", color, ...props }, ref) => /* @__PURE__ */ jsx61("p", { ref, className: cn("text-base leading-7", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props })
|
|
4944
5114
|
);
|
|
4945
5115
|
Body.displayName = "Body";
|
|
4946
|
-
var Small =
|
|
4947
|
-
({ className, weight = "regular", color, ...props }, ref) => /* @__PURE__ */
|
|
5116
|
+
var Small = React53.forwardRef(
|
|
5117
|
+
({ className, weight = "regular", color, ...props }, ref) => /* @__PURE__ */ jsx61("p", { ref, className: cn("text-sm", resolveColor(color, "text-muted-foreground"), weightMap[weight], className), ...props })
|
|
4948
5118
|
);
|
|
4949
5119
|
Small.displayName = "Small";
|
|
4950
|
-
var Caption =
|
|
4951
|
-
({ className, weight = "regular", color, ...props }, ref) => /* @__PURE__ */
|
|
5120
|
+
var Caption = React53.forwardRef(
|
|
5121
|
+
({ className, weight = "regular", color, ...props }, ref) => /* @__PURE__ */ jsx61("p", { ref, className: cn("text-xs", resolveColor(color, "text-muted-foreground"), weightMap[weight], className), ...props })
|
|
4952
5122
|
);
|
|
4953
5123
|
Caption.displayName = "Caption";
|
|
4954
|
-
var Lead =
|
|
4955
|
-
({ className, weight = "medium", color, ...props }, ref) => /* @__PURE__ */
|
|
5124
|
+
var Lead = React53.forwardRef(
|
|
5125
|
+
({ className, weight = "medium", color, ...props }, ref) => /* @__PURE__ */ jsx61("p", { ref, className: cn("text-lg", resolveColor(color, "text-foreground"), weightMap[weight], className), ...props })
|
|
4956
5126
|
);
|
|
4957
5127
|
Lead.displayName = "Lead";
|
|
4958
|
-
var Muted =
|
|
4959
|
-
({ className, weight = "regular", color, ...props }, ref) => /* @__PURE__ */
|
|
5128
|
+
var Muted = React53.forwardRef(
|
|
5129
|
+
({ className, weight = "regular", color, ...props }, ref) => /* @__PURE__ */ jsx61("p", { ref, className: cn("text-sm", resolveColor(color, "text-muted-foreground"), weightMap[weight], className), ...props })
|
|
4960
5130
|
);
|
|
4961
5131
|
Muted.displayName = "Muted";
|
|
4962
|
-
var Code =
|
|
4963
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
5132
|
+
var Code = React53.forwardRef(
|
|
5133
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx61(
|
|
4964
5134
|
"code",
|
|
4965
5135
|
{
|
|
4966
5136
|
ref,
|
|
@@ -4977,14 +5147,14 @@ Code.displayName = "Code";
|
|
|
4977
5147
|
// src/components/theme-provider.tsx
|
|
4978
5148
|
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
|
4979
5149
|
import { useTheme as useTheme2 } from "next-themes";
|
|
4980
|
-
import { jsx as
|
|
5150
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
4981
5151
|
function ThemeProvider({ children, ...props }) {
|
|
4982
|
-
return /* @__PURE__ */
|
|
5152
|
+
return /* @__PURE__ */ jsx62(NextThemesProvider, { ...props, children });
|
|
4983
5153
|
}
|
|
4984
5154
|
|
|
4985
5155
|
// src/components/banner.tsx
|
|
4986
|
-
import * as
|
|
4987
|
-
import { jsx as
|
|
5156
|
+
import * as React54 from "react";
|
|
5157
|
+
import { jsx as jsx63, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
4988
5158
|
var variantStyles = {
|
|
4989
5159
|
primary: "bg-[var(--hc-banner-primary-bg)] border border-[var(--hc-primary-200)]",
|
|
4990
5160
|
muted: "bg-[var(--hc-color-muted)] border border-[var(--hc-color-border)]",
|
|
@@ -4999,23 +5169,23 @@ var iconBgStyles = {
|
|
|
4999
5169
|
warning: "bg-[var(--hc-color-warning)]",
|
|
5000
5170
|
destructive: "bg-[var(--hc-color-destructive)]"
|
|
5001
5171
|
};
|
|
5002
|
-
var Banner =
|
|
5003
|
-
({ variant = "primary", icon, title, description, action, className, children, ...props }, ref) => /* @__PURE__ */
|
|
5172
|
+
var Banner = React54.forwardRef(
|
|
5173
|
+
({ variant = "primary", icon, title, description, action, className, children, ...props }, ref) => /* @__PURE__ */ jsx63(
|
|
5004
5174
|
"div",
|
|
5005
5175
|
{
|
|
5006
5176
|
ref,
|
|
5007
5177
|
className: cn("rounded-lg px-6 py-5", variantStyles[variant], className),
|
|
5008
5178
|
...props,
|
|
5009
|
-
children: /* @__PURE__ */
|
|
5010
|
-
/* @__PURE__ */
|
|
5011
|
-
icon && /* @__PURE__ */
|
|
5012
|
-
/* @__PURE__ */
|
|
5013
|
-
title && /* @__PURE__ */
|
|
5014
|
-
description && /* @__PURE__ */
|
|
5179
|
+
children: /* @__PURE__ */ jsxs44("div", { className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4", children: [
|
|
5180
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-3", children: [
|
|
5181
|
+
icon && /* @__PURE__ */ jsx63("div", { className: cn("h-10 w-10 rounded-full flex items-center justify-center shrink-0 text-white", iconBgStyles[variant]), children: icon }),
|
|
5182
|
+
/* @__PURE__ */ jsxs44("div", { children: [
|
|
5183
|
+
title && /* @__PURE__ */ jsx63("p", { className: "text-sm font-bold text-foreground", children: title }),
|
|
5184
|
+
description && /* @__PURE__ */ jsx63("p", { className: "text-xs mt-0.5 text-muted-foreground", children: description }),
|
|
5015
5185
|
children
|
|
5016
5186
|
] })
|
|
5017
5187
|
] }),
|
|
5018
|
-
action && /* @__PURE__ */
|
|
5188
|
+
action && /* @__PURE__ */ jsx63("div", { className: "shrink-0", children: action })
|
|
5019
5189
|
] })
|
|
5020
5190
|
}
|
|
5021
5191
|
)
|
|
@@ -5023,8 +5193,8 @@ var Banner = React53.forwardRef(
|
|
|
5023
5193
|
Banner.displayName = "Banner";
|
|
5024
5194
|
|
|
5025
5195
|
// src/components/impersonation-banner.tsx
|
|
5026
|
-
import * as
|
|
5027
|
-
import { Fragment as
|
|
5196
|
+
import * as React55 from "react";
|
|
5197
|
+
import { Fragment as Fragment5, jsx as jsx64, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5028
5198
|
function toMs(value) {
|
|
5029
5199
|
if (value instanceof Date) return value.getTime();
|
|
5030
5200
|
if (typeof value === "number") return value;
|
|
@@ -5039,21 +5209,21 @@ function formatRemaining(ms) {
|
|
|
5039
5209
|
const pad = (n) => String(n).padStart(2, "0");
|
|
5040
5210
|
return h > 0 ? `${h}:${pad(m)}:${pad(s)}` : `${m}:${pad(s)}`;
|
|
5041
5211
|
}
|
|
5042
|
-
var ImpersonationBanner =
|
|
5212
|
+
var ImpersonationBanner = React55.forwardRef(
|
|
5043
5213
|
({ actorLabel, mode, expiresAt, onExit, targetLabel, ops, inline = false, onExpire, className }, ref) => {
|
|
5044
5214
|
const endMs = toMs(expiresAt);
|
|
5045
|
-
const [now, setNow] =
|
|
5215
|
+
const [now, setNow] = React55.useState(() => Date.now());
|
|
5046
5216
|
const remaining = endMs - now;
|
|
5047
5217
|
const expired = remaining <= 0;
|
|
5048
|
-
const onExpireRef =
|
|
5218
|
+
const onExpireRef = React55.useRef(onExpire);
|
|
5049
5219
|
onExpireRef.current = onExpire;
|
|
5050
|
-
|
|
5220
|
+
React55.useEffect(() => {
|
|
5051
5221
|
if (expired) return void 0;
|
|
5052
5222
|
const timer = setInterval(() => setNow(Date.now()), 1e3);
|
|
5053
5223
|
return () => clearInterval(timer);
|
|
5054
5224
|
}, [expired]);
|
|
5055
|
-
const firedFor =
|
|
5056
|
-
|
|
5225
|
+
const firedFor = React55.useRef(null);
|
|
5226
|
+
React55.useEffect(() => {
|
|
5057
5227
|
if (expired && firedFor.current !== endMs) {
|
|
5058
5228
|
firedFor.current = endMs;
|
|
5059
5229
|
onExpireRef.current?.();
|
|
@@ -5062,9 +5232,9 @@ var ImpersonationBanner = React54.forwardRef(
|
|
|
5062
5232
|
const isRead = mode === "READ";
|
|
5063
5233
|
const modeText = isRead ? "Read-only" : "Changes allowed";
|
|
5064
5234
|
const opsText = ops && ops.length > 0 ? ops.join(", ") : null;
|
|
5065
|
-
return /* @__PURE__ */
|
|
5066
|
-
inline ? null : /* @__PURE__ */
|
|
5067
|
-
/* @__PURE__ */
|
|
5235
|
+
return /* @__PURE__ */ jsxs45(Fragment5, { children: [
|
|
5236
|
+
inline ? null : /* @__PURE__ */ jsx64("div", { "aria-hidden": "true", className: "h-12", "data-impersonation-spacer": "" }),
|
|
5237
|
+
/* @__PURE__ */ jsxs45(
|
|
5068
5238
|
"div",
|
|
5069
5239
|
{
|
|
5070
5240
|
ref,
|
|
@@ -5078,19 +5248,19 @@ var ImpersonationBanner = React54.forwardRef(
|
|
|
5078
5248
|
className
|
|
5079
5249
|
),
|
|
5080
5250
|
children: [
|
|
5081
|
-
/* @__PURE__ */
|
|
5082
|
-
/* @__PURE__ */
|
|
5083
|
-
/* @__PURE__ */
|
|
5084
|
-
targetLabel ? /* @__PURE__ */
|
|
5251
|
+
/* @__PURE__ */ jsx64("span", { className: "shrink-0 rounded px-2 py-0.5 text-xs font-bold uppercase tracking-wide ring-1 ring-current", children: "Support session" }),
|
|
5252
|
+
/* @__PURE__ */ jsxs45("p", { className: "min-w-0 flex-1 truncate", children: [
|
|
5253
|
+
/* @__PURE__ */ jsx64("span", { className: "font-semibold", children: actorLabel }),
|
|
5254
|
+
targetLabel ? /* @__PURE__ */ jsxs45(Fragment5, { children: [
|
|
5085
5255
|
" is acting as ",
|
|
5086
|
-
/* @__PURE__ */
|
|
5256
|
+
/* @__PURE__ */ jsx64("span", { className: "font-semibold", children: targetLabel })
|
|
5087
5257
|
] }) : " is acting as this user",
|
|
5088
5258
|
" \xB7 ",
|
|
5089
|
-
/* @__PURE__ */
|
|
5090
|
-
opsText ? /* @__PURE__ */
|
|
5259
|
+
/* @__PURE__ */ jsx64("span", { "data-testid": "impersonation-mode", children: modeText }),
|
|
5260
|
+
opsText ? /* @__PURE__ */ jsx64("span", { className: "hidden sm:inline", children: ` (${opsText})` }) : null
|
|
5091
5261
|
] }),
|
|
5092
|
-
/* @__PURE__ */
|
|
5093
|
-
/* @__PURE__ */
|
|
5262
|
+
/* @__PURE__ */ jsx64("span", { className: "shrink-0 tabular-nums", "aria-live": "off", title: "Time left in this support session", children: /* @__PURE__ */ jsx64("time", { "data-testid": "impersonation-countdown", dateTime: new Date(endMs).toISOString(), children: expired ? "Expired" : formatRemaining(remaining) }) }),
|
|
5263
|
+
/* @__PURE__ */ jsx64(
|
|
5094
5264
|
"button",
|
|
5095
5265
|
{
|
|
5096
5266
|
type: "button",
|
|
@@ -5111,20 +5281,20 @@ var ImpersonationBanner = React54.forwardRef(
|
|
|
5111
5281
|
ImpersonationBanner.displayName = "ImpersonationBanner";
|
|
5112
5282
|
|
|
5113
5283
|
// src/components/read-only-guard.tsx
|
|
5114
|
-
import { Fragment as
|
|
5284
|
+
import { Fragment as Fragment6, jsx as jsx65, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5115
5285
|
var READ_ONLY_REASON = "Read-only support session: this action is turned off.";
|
|
5116
5286
|
function isGuarded({ mode, ops, op = "WRITE" }) {
|
|
5117
5287
|
if (ops) return !ops.includes(op);
|
|
5118
5288
|
return mode === "READ";
|
|
5119
5289
|
}
|
|
5120
5290
|
function ReadOnlyGuard({ mode, ops, op = "WRITE", reason = READ_ONLY_REASON, className, children }) {
|
|
5121
|
-
if (!isGuarded({ mode, ops, op })) return /* @__PURE__ */
|
|
5291
|
+
if (!isGuarded({ mode, ops, op })) return /* @__PURE__ */ jsx65(Fragment6, { children });
|
|
5122
5292
|
const swallow = (e) => {
|
|
5123
5293
|
e.preventDefault();
|
|
5124
5294
|
e.stopPropagation();
|
|
5125
5295
|
};
|
|
5126
|
-
return /* @__PURE__ */
|
|
5127
|
-
/* @__PURE__ */
|
|
5296
|
+
return /* @__PURE__ */ jsx65(TooltipProvider, { delayDuration: 150, children: /* @__PURE__ */ jsxs46(Tooltip, { children: [
|
|
5297
|
+
/* @__PURE__ */ jsx65(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx65(
|
|
5128
5298
|
"span",
|
|
5129
5299
|
{
|
|
5130
5300
|
tabIndex: 0,
|
|
@@ -5133,16 +5303,16 @@ function ReadOnlyGuard({ mode, ops, op = "WRITE", reason = READ_ONLY_REASON, cla
|
|
|
5133
5303
|
className: cn("inline-flex cursor-not-allowed", className),
|
|
5134
5304
|
onClickCapture: swallow,
|
|
5135
5305
|
onSubmitCapture: swallow,
|
|
5136
|
-
children: /* @__PURE__ */
|
|
5306
|
+
children: /* @__PURE__ */ jsx65("fieldset", { disabled: true, className: "contents", children })
|
|
5137
5307
|
}
|
|
5138
5308
|
) }),
|
|
5139
|
-
/* @__PURE__ */
|
|
5309
|
+
/* @__PURE__ */ jsx65(TooltipContent, { children: reason })
|
|
5140
5310
|
] }) });
|
|
5141
5311
|
}
|
|
5142
5312
|
ReadOnlyGuard.displayName = "ReadOnlyGuard";
|
|
5143
5313
|
|
|
5144
5314
|
// src/lib/impersonation.ts
|
|
5145
|
-
import * as
|
|
5315
|
+
import * as React56 from "react";
|
|
5146
5316
|
var OPERATION_CLASSES = ["READ", "WRITE", "DESTRUCTIVE", "FINANCIAL", "SECURITY"];
|
|
5147
5317
|
var PLATFORM_BLOCKED = /* @__PURE__ */ new Set(["FINANCIAL", "SECURITY"]);
|
|
5148
5318
|
var INACTIVE_IMPERSONATION = Object.freeze({
|
|
@@ -5206,10 +5376,10 @@ function readImpersonation(token, now = Date.now()) {
|
|
|
5206
5376
|
};
|
|
5207
5377
|
}
|
|
5208
5378
|
function useImpersonation(token) {
|
|
5209
|
-
const [tick, setTick] =
|
|
5210
|
-
const state =
|
|
5379
|
+
const [tick, setTick] = React56.useState(0);
|
|
5380
|
+
const state = React56.useMemo(() => readImpersonation(token), [token, tick]);
|
|
5211
5381
|
const expiresAtMs = state.expiresAt?.getTime() ?? null;
|
|
5212
|
-
|
|
5382
|
+
React56.useEffect(() => {
|
|
5213
5383
|
if (expiresAtMs === null) return void 0;
|
|
5214
5384
|
const delay = Math.max(0, expiresAtMs - Date.now());
|
|
5215
5385
|
const timer = setTimeout(() => setTick((t) => t + 1), Math.min(delay + 50, 2147e6));
|
|
@@ -5217,6 +5387,316 @@ function useImpersonation(token) {
|
|
|
5217
5387
|
}, [expiresAtMs]);
|
|
5218
5388
|
return state;
|
|
5219
5389
|
}
|
|
5390
|
+
|
|
5391
|
+
// src/components/help-widget/help-widget.tsx
|
|
5392
|
+
import * as React60 from "react";
|
|
5393
|
+
|
|
5394
|
+
// src/components/help-widget/consent-dialog.tsx
|
|
5395
|
+
import { jsx as jsx66, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5396
|
+
function ConsentDialog({ open, onAllow, onDeny }) {
|
|
5397
|
+
return /* @__PURE__ */ jsx66(AlertDialog, { open, children: /* @__PURE__ */ jsxs47(AlertDialogContent, { size: "sm", children: [
|
|
5398
|
+
/* @__PURE__ */ jsxs47(AlertDialogHeader, { children: [
|
|
5399
|
+
/* @__PURE__ */ jsx66(AlertDialogTitle, { children: "Start a support session?" }),
|
|
5400
|
+
/* @__PURE__ */ jsx66(AlertDialogDescription, { children: "An AI assistant will see this page and may be recorded (chat and voice). A human can join for anything it cannot resolve. You can stop the session at any time." })
|
|
5401
|
+
] }),
|
|
5402
|
+
/* @__PURE__ */ jsxs47(AlertDialogFooter, { children: [
|
|
5403
|
+
/* @__PURE__ */ jsx66(AlertDialogCancel, { onClick: onDeny, children: "Deny" }),
|
|
5404
|
+
/* @__PURE__ */ jsx66(AlertDialogAction, { onClick: onAllow, children: "Allow" })
|
|
5405
|
+
] })
|
|
5406
|
+
] }) });
|
|
5407
|
+
}
|
|
5408
|
+
|
|
5409
|
+
// src/components/help-widget/help-session-banner.tsx
|
|
5410
|
+
import * as React57 from "react";
|
|
5411
|
+
import { Fragment as Fragment7, jsx as jsx67, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
5412
|
+
var HelpSessionBanner = React57.forwardRef(
|
|
5413
|
+
({ onRevoke, className }, ref) => {
|
|
5414
|
+
return /* @__PURE__ */ jsxs48(Fragment7, { children: [
|
|
5415
|
+
/* @__PURE__ */ jsx67("div", { "aria-hidden": "true", className: "h-12", "data-help-session-spacer": "" }),
|
|
5416
|
+
/* @__PURE__ */ jsxs48(
|
|
5417
|
+
"div",
|
|
5418
|
+
{
|
|
5419
|
+
ref,
|
|
5420
|
+
role: "status",
|
|
5421
|
+
"data-help-session-banner": "",
|
|
5422
|
+
className: cn(
|
|
5423
|
+
"fixed inset-x-0 top-0 z-[2147483000]",
|
|
5424
|
+
"flex h-12 items-center gap-3 border-b-2 border-border bg-primary px-4 text-sm font-medium text-primary-foreground shadow-md",
|
|
5425
|
+
className
|
|
5426
|
+
),
|
|
5427
|
+
children: [
|
|
5428
|
+
/* @__PURE__ */ jsx67("span", { className: "shrink-0 rounded px-2 py-0.5 text-xs font-bold uppercase tracking-wide ring-1 ring-current", children: "Support session" }),
|
|
5429
|
+
/* @__PURE__ */ jsx67("p", { className: "min-w-0 flex-1 truncate", children: "AI support is active on this page and may be recorded." }),
|
|
5430
|
+
/* @__PURE__ */ jsx67(
|
|
5431
|
+
"button",
|
|
5432
|
+
{
|
|
5433
|
+
type: "button",
|
|
5434
|
+
onClick: onRevoke,
|
|
5435
|
+
className: "shrink-0 rounded-md bg-background px-3 py-1 text-sm font-semibold text-foreground hover:bg-background/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
5436
|
+
children: "Stop"
|
|
5437
|
+
}
|
|
5438
|
+
)
|
|
5439
|
+
]
|
|
5440
|
+
}
|
|
5441
|
+
)
|
|
5442
|
+
] });
|
|
5443
|
+
}
|
|
5444
|
+
);
|
|
5445
|
+
HelpSessionBanner.displayName = "HelpSessionBanner";
|
|
5446
|
+
|
|
5447
|
+
// src/components/help-widget/highlight-overlay.tsx
|
|
5448
|
+
import * as React58 from "react";
|
|
5449
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
5450
|
+
function findTarget({ selector, role, name }) {
|
|
5451
|
+
if (selector) return document.querySelector(selector);
|
|
5452
|
+
if (role) {
|
|
5453
|
+
const candidates = document.querySelectorAll(`[role="${role}"]`);
|
|
5454
|
+
for (const el of candidates) {
|
|
5455
|
+
const accessibleName = el.getAttribute("aria-label") ?? el.textContent?.trim() ?? "";
|
|
5456
|
+
if (!name || accessibleName.includes(name)) return el;
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
return null;
|
|
5460
|
+
}
|
|
5461
|
+
function HighlightOverlay({ target, onDismiss }) {
|
|
5462
|
+
const [rect, setRect] = React58.useState(null);
|
|
5463
|
+
React58.useEffect(() => {
|
|
5464
|
+
if (!target) {
|
|
5465
|
+
setRect(null);
|
|
5466
|
+
onDismiss?.();
|
|
5467
|
+
return;
|
|
5468
|
+
}
|
|
5469
|
+
const el = findTarget(target);
|
|
5470
|
+
setRect(el ? el.getBoundingClientRect() : null);
|
|
5471
|
+
}, [target, onDismiss]);
|
|
5472
|
+
if (!target || !rect) return null;
|
|
5473
|
+
return /* @__PURE__ */ jsx68(
|
|
5474
|
+
"div",
|
|
5475
|
+
{
|
|
5476
|
+
"data-help-widget-highlight": "",
|
|
5477
|
+
role: "presentation",
|
|
5478
|
+
"aria-hidden": "true",
|
|
5479
|
+
style: {
|
|
5480
|
+
position: "fixed",
|
|
5481
|
+
left: rect.left - 4,
|
|
5482
|
+
top: rect.top - 4,
|
|
5483
|
+
width: rect.width + 8,
|
|
5484
|
+
height: rect.height + 8,
|
|
5485
|
+
pointerEvents: "none",
|
|
5486
|
+
zIndex: 2147483e3
|
|
5487
|
+
},
|
|
5488
|
+
className: "rounded-md ring-2 ring-primary ring-offset-2"
|
|
5489
|
+
}
|
|
5490
|
+
);
|
|
5491
|
+
}
|
|
5492
|
+
|
|
5493
|
+
// src/components/help-widget/use-help-session.ts
|
|
5494
|
+
import * as React59 from "react";
|
|
5495
|
+
function defaultCreateSession(baseUrl) {
|
|
5496
|
+
return async (request) => {
|
|
5497
|
+
const res = await fetch(`${baseUrl}/support/ai/session`, {
|
|
5498
|
+
method: "POST",
|
|
5499
|
+
headers: { "Content-Type": "application/json" },
|
|
5500
|
+
body: JSON.stringify(request)
|
|
5501
|
+
});
|
|
5502
|
+
if (!res.ok) throw new Error(`support/ai/session failed: ${res.status}`);
|
|
5503
|
+
return await res.json();
|
|
5504
|
+
};
|
|
5505
|
+
}
|
|
5506
|
+
async function defaultConnectRoom(session) {
|
|
5507
|
+
const { Room } = await import("livekit-client");
|
|
5508
|
+
const room = new Room();
|
|
5509
|
+
await room.connect(session.url, session.token);
|
|
5510
|
+
return { disconnect: () => room.disconnect() };
|
|
5511
|
+
}
|
|
5512
|
+
function useHelpSession({
|
|
5513
|
+
appId,
|
|
5514
|
+
route,
|
|
5515
|
+
createSession,
|
|
5516
|
+
connectRoom = defaultConnectRoom,
|
|
5517
|
+
baseUrl = ""
|
|
5518
|
+
}) {
|
|
5519
|
+
const [status, setStatus] = React59.useState("idle");
|
|
5520
|
+
const [language, setLanguage] = React59.useState("en");
|
|
5521
|
+
const connectionRef = React59.useRef(null);
|
|
5522
|
+
const createSessionRef = React59.useRef(createSession ?? defaultCreateSession(baseUrl));
|
|
5523
|
+
createSessionRef.current = createSession ?? defaultCreateSession(baseUrl);
|
|
5524
|
+
const requestSession = React59.useCallback(() => setStatus("consent-pending"), []);
|
|
5525
|
+
const deny = React59.useCallback(() => setStatus("idle"), []);
|
|
5526
|
+
const allow = React59.useCallback(async () => {
|
|
5527
|
+
const session = await createSessionRef.current({ appId, language, route });
|
|
5528
|
+
connectionRef.current = await connectRoom(session);
|
|
5529
|
+
setStatus("active");
|
|
5530
|
+
}, [appId, language, route, connectRoom]);
|
|
5531
|
+
const stop = React59.useCallback(() => {
|
|
5532
|
+
connectionRef.current?.disconnect();
|
|
5533
|
+
connectionRef.current = null;
|
|
5534
|
+
setStatus("idle");
|
|
5535
|
+
}, []);
|
|
5536
|
+
React59.useEffect(() => () => connectionRef.current?.disconnect(), []);
|
|
5537
|
+
return { status, language, setLanguage, requestSession, allow, deny, stop };
|
|
5538
|
+
}
|
|
5539
|
+
|
|
5540
|
+
// src/components/help-widget/help-widget.tsx
|
|
5541
|
+
import { jsx as jsx69, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
5542
|
+
var LANGUAGE_LABELS = {
|
|
5543
|
+
en: "English",
|
|
5544
|
+
hi: "Hindi",
|
|
5545
|
+
mr: "Marathi"
|
|
5546
|
+
};
|
|
5547
|
+
function HelpWidget({
|
|
5548
|
+
appId,
|
|
5549
|
+
route,
|
|
5550
|
+
defaultLanguage = "en",
|
|
5551
|
+
createSession,
|
|
5552
|
+
connectRoom,
|
|
5553
|
+
baseUrl,
|
|
5554
|
+
highlightTarget = null,
|
|
5555
|
+
className
|
|
5556
|
+
}) {
|
|
5557
|
+
const [open, setOpen] = React60.useState(false);
|
|
5558
|
+
const { status, language, setLanguage, requestSession, allow, deny, stop } = useHelpSession({
|
|
5559
|
+
appId,
|
|
5560
|
+
route,
|
|
5561
|
+
createSession,
|
|
5562
|
+
connectRoom,
|
|
5563
|
+
baseUrl
|
|
5564
|
+
});
|
|
5565
|
+
React60.useEffect(() => {
|
|
5566
|
+
setLanguage(defaultLanguage);
|
|
5567
|
+
}, []);
|
|
5568
|
+
return /* @__PURE__ */ jsxs49("div", { className: cn("relative", className), "data-help-widget": "", children: [
|
|
5569
|
+
status === "active" ? /* @__PURE__ */ jsx69(HelpSessionBanner, { onRevoke: stop }) : null,
|
|
5570
|
+
/* @__PURE__ */ jsx69(HighlightOverlay, { target: status === "active" ? highlightTarget : null }),
|
|
5571
|
+
/* @__PURE__ */ jsx69(
|
|
5572
|
+
"button",
|
|
5573
|
+
{
|
|
5574
|
+
type: "button",
|
|
5575
|
+
"aria-haspopup": "dialog",
|
|
5576
|
+
"aria-expanded": open,
|
|
5577
|
+
onClick: () => {
|
|
5578
|
+
setOpen(true);
|
|
5579
|
+
if (status === "idle") requestSession();
|
|
5580
|
+
},
|
|
5581
|
+
className: "fixed bottom-6 end-6 z-[2147482999] rounded-full bg-primary px-4 py-2 text-sm font-semibold text-primary-foreground shadow-lg hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
5582
|
+
children: "Help"
|
|
5583
|
+
}
|
|
5584
|
+
),
|
|
5585
|
+
/* @__PURE__ */ jsx69(
|
|
5586
|
+
ConsentDialog,
|
|
5587
|
+
{
|
|
5588
|
+
open: open && status === "consent-pending",
|
|
5589
|
+
onAllow: () => {
|
|
5590
|
+
void allow();
|
|
5591
|
+
},
|
|
5592
|
+
onDeny: () => {
|
|
5593
|
+
deny();
|
|
5594
|
+
setOpen(false);
|
|
5595
|
+
}
|
|
5596
|
+
}
|
|
5597
|
+
),
|
|
5598
|
+
open ? /* @__PURE__ */ jsxs49(
|
|
5599
|
+
"div",
|
|
5600
|
+
{
|
|
5601
|
+
role: "dialog",
|
|
5602
|
+
"aria-label": "Help chat",
|
|
5603
|
+
"data-help-widget-panel": "",
|
|
5604
|
+
className: "fixed bottom-20 end-6 z-[2147482999] flex h-96 w-80 flex-col gap-3 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-xl",
|
|
5605
|
+
children: [
|
|
5606
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center justify-between gap-2", children: [
|
|
5607
|
+
/* @__PURE__ */ jsx69("label", { htmlFor: "help-widget-language", className: "text-xs font-medium text-muted-foreground", children: "Language" }),
|
|
5608
|
+
/* @__PURE__ */ jsx69(
|
|
5609
|
+
"select",
|
|
5610
|
+
{
|
|
5611
|
+
id: "help-widget-language",
|
|
5612
|
+
value: language,
|
|
5613
|
+
onChange: (e) => setLanguage(e.target.value),
|
|
5614
|
+
className: "rounded border border-border bg-background px-2 py-1 text-xs",
|
|
5615
|
+
children: Object.entries(LANGUAGE_LABELS).map(([value, label]) => /* @__PURE__ */ jsx69("option", { value, children: label }, value))
|
|
5616
|
+
}
|
|
5617
|
+
)
|
|
5618
|
+
] }),
|
|
5619
|
+
/* @__PURE__ */ jsx69("div", { "data-help-widget-chat": "", className: "flex-1 overflow-y-auto text-sm text-muted-foreground", children: status === "active" ? "Chat and voice are active." : "Waiting for consent." }),
|
|
5620
|
+
/* @__PURE__ */ jsx69(
|
|
5621
|
+
"button",
|
|
5622
|
+
{
|
|
5623
|
+
type: "button",
|
|
5624
|
+
onClick: () => setOpen(false),
|
|
5625
|
+
className: "self-end rounded-md px-3 py-1 text-sm font-medium text-muted-foreground hover:text-foreground",
|
|
5626
|
+
children: "Close"
|
|
5627
|
+
}
|
|
5628
|
+
)
|
|
5629
|
+
]
|
|
5630
|
+
}
|
|
5631
|
+
) : null
|
|
5632
|
+
] });
|
|
5633
|
+
}
|
|
5634
|
+
|
|
5635
|
+
// src/lib/app-ids.ts
|
|
5636
|
+
var SUPPORT_APP_IDS = [
|
|
5637
|
+
"bill",
|
|
5638
|
+
"books",
|
|
5639
|
+
"contract",
|
|
5640
|
+
"crm",
|
|
5641
|
+
"hear",
|
|
5642
|
+
"hire",
|
|
5643
|
+
"interviewer",
|
|
5644
|
+
"itam",
|
|
5645
|
+
"itom",
|
|
5646
|
+
"itsm",
|
|
5647
|
+
"mobile",
|
|
5648
|
+
"notes",
|
|
5649
|
+
"pay",
|
|
5650
|
+
"people",
|
|
5651
|
+
"procure",
|
|
5652
|
+
"projects",
|
|
5653
|
+
"sign",
|
|
5654
|
+
"space",
|
|
5655
|
+
"spend",
|
|
5656
|
+
"transcribe",
|
|
5657
|
+
"workspace"
|
|
5658
|
+
];
|
|
5659
|
+
function isSupportAppId(value) {
|
|
5660
|
+
return typeof value === "string" && SUPPORT_APP_IDS.includes(value);
|
|
5661
|
+
}
|
|
5662
|
+
|
|
5663
|
+
// src/lib/mask-snapshot.ts
|
|
5664
|
+
var MASK = "[masked]";
|
|
5665
|
+
var PATTERNS = [
|
|
5666
|
+
// PAN: AAAAA9999A
|
|
5667
|
+
/\b[A-Z]{5}[0-9]{4}[A-Z]\b/g,
|
|
5668
|
+
// Aadhaar: 12 digits, optionally grouped as 4-4-4 with spaces or hyphens
|
|
5669
|
+
/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}\b/g,
|
|
5670
|
+
// IFSC: AAAA0999999
|
|
5671
|
+
/\b[A-Z]{4}0[A-Z0-9]{6}\b/g,
|
|
5672
|
+
// Bare bank account numbers: 9 to 18 digits not already matched as Aadhaar above
|
|
5673
|
+
/\b\d{9,18}\b/g
|
|
5674
|
+
];
|
|
5675
|
+
function redactText(text) {
|
|
5676
|
+
return PATTERNS.reduce((acc, pattern) => acc.replace(pattern, MASK), text);
|
|
5677
|
+
}
|
|
5678
|
+
function maskControls(root) {
|
|
5679
|
+
const controls = root.querySelectorAll(
|
|
5680
|
+
"input, textarea, select"
|
|
5681
|
+
);
|
|
5682
|
+
controls.forEach((el) => {
|
|
5683
|
+
if ("value" in el) el.setAttribute("data-help-widget-masked-value", MASK);
|
|
5684
|
+
});
|
|
5685
|
+
}
|
|
5686
|
+
function maskSnapshot(root = document.body) {
|
|
5687
|
+
const clone = root.cloneNode(true);
|
|
5688
|
+
const container = clone instanceof Document ? clone.body : clone;
|
|
5689
|
+
maskControls(container);
|
|
5690
|
+
const controls = container.querySelectorAll(
|
|
5691
|
+
"input, textarea, select"
|
|
5692
|
+
);
|
|
5693
|
+
controls.forEach((el) => {
|
|
5694
|
+
const replacement = container.ownerDocument?.createTextNode(MASK) ?? document.createTextNode(MASK);
|
|
5695
|
+
el.replaceWith(replacement);
|
|
5696
|
+
});
|
|
5697
|
+
const text = container.textContent ?? "";
|
|
5698
|
+
return redactText(text);
|
|
5699
|
+
}
|
|
5220
5700
|
export {
|
|
5221
5701
|
Accordion,
|
|
5222
5702
|
AccordionContent,
|
|
@@ -5239,6 +5719,7 @@ export {
|
|
|
5239
5719
|
AlertDialogTrigger,
|
|
5240
5720
|
AlertTitle,
|
|
5241
5721
|
AppHeader,
|
|
5722
|
+
AppLauncher,
|
|
5242
5723
|
AspectRatio,
|
|
5243
5724
|
Avatar,
|
|
5244
5725
|
AvatarFallback,
|
|
@@ -5291,6 +5772,7 @@ export {
|
|
|
5291
5772
|
CommandList,
|
|
5292
5773
|
CommandSeparator,
|
|
5293
5774
|
CommandShortcut,
|
|
5775
|
+
ConsentDialog,
|
|
5294
5776
|
ContextMenu,
|
|
5295
5777
|
ContextMenuCheckboxItem,
|
|
5296
5778
|
ContextMenuContent,
|
|
@@ -5361,6 +5843,9 @@ export {
|
|
|
5361
5843
|
H2,
|
|
5362
5844
|
H3,
|
|
5363
5845
|
H4,
|
|
5846
|
+
HelpSessionBanner,
|
|
5847
|
+
HelpWidget,
|
|
5848
|
+
HighlightOverlay,
|
|
5364
5849
|
HoverCard,
|
|
5365
5850
|
HoverCardContent,
|
|
5366
5851
|
HoverCardTrigger,
|
|
@@ -5428,6 +5913,7 @@ export {
|
|
|
5428
5913
|
ResizableHandle,
|
|
5429
5914
|
ResizablePanel,
|
|
5430
5915
|
ResizablePanelGroup,
|
|
5916
|
+
SUPPORT_APP_IDS,
|
|
5431
5917
|
ScrollArea,
|
|
5432
5918
|
ScrollBar,
|
|
5433
5919
|
Select,
|
|
@@ -5507,6 +5993,8 @@ export {
|
|
|
5507
5993
|
formatRemaining,
|
|
5508
5994
|
inputVariants,
|
|
5509
5995
|
isGuarded,
|
|
5996
|
+
isSupportAppId,
|
|
5997
|
+
maskSnapshot,
|
|
5510
5998
|
modeOfOps,
|
|
5511
5999
|
navigationMenuTriggerStyle,
|
|
5512
6000
|
readImpersonation,
|
|
@@ -5515,6 +6003,7 @@ export {
|
|
|
5515
6003
|
toast,
|
|
5516
6004
|
toggleVariants,
|
|
5517
6005
|
useFormField,
|
|
6006
|
+
useHelpSession,
|
|
5518
6007
|
useImpersonation,
|
|
5519
6008
|
useSidebar,
|
|
5520
6009
|
useTheme2 as useTheme
|