@snksergio/design-system 0.40.0 → 0.42.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-lib/chunks/{avatar-DQYiVRlE.mjs → avatar-DFWEwBKu.mjs} +101 -51
- package/dist-lib/chunks/avatar-DFWEwBKu.mjs.map +1 -0
- package/dist-lib/chunks/{avatar-BiaG9OJS.cjs → avatar-eM5txRFZ.cjs} +53 -1
- package/dist-lib/chunks/avatar-eM5txRFZ.cjs.map +1 -0
- package/dist-lib/chunks/{input-CaC0B-_v.mjs → input-CfmzMYtd.mjs} +2 -2
- package/dist-lib/chunks/{input-CaC0B-_v.mjs.map → input-CfmzMYtd.mjs.map} +1 -1
- package/dist-lib/chunks/{input-DMH5rSP1.cjs → input-az2SuVXQ.cjs} +2 -2
- package/dist-lib/chunks/{input-DMH5rSP1.cjs.map → input-az2SuVXQ.cjs.map} +1 -1
- package/dist-lib/chunks/{kpi-delta-NnEu4oIs.cjs → kpi-delta-DAfakvFp.cjs} +3 -3
- package/dist-lib/chunks/{kpi-delta-NnEu4oIs.cjs.map → kpi-delta-DAfakvFp.cjs.map} +1 -1
- package/dist-lib/chunks/{kpi-delta-CjR0OsdC.mjs → kpi-delta-DaDwKOaP.mjs} +3 -3
- package/dist-lib/chunks/{kpi-delta-CjR0OsdC.mjs.map → kpi-delta-DaDwKOaP.mjs.map} +1 -1
- package/dist-lib/chunks/{page-header-DEGbgT4w.mjs → page-header--cPS_Z-a.mjs} +2 -2
- package/dist-lib/chunks/{page-header-DEGbgT4w.mjs.map → page-header--cPS_Z-a.mjs.map} +1 -1
- package/dist-lib/chunks/{page-header-Cp_9Wog4.cjs → page-header-DvAJoEfb.cjs} +2 -2
- package/dist-lib/chunks/{page-header-Cp_9Wog4.cjs.map → page-header-DvAJoEfb.cjs.map} +1 -1
- package/dist-lib/chunks/{panel-B1xKDbjB.mjs → panel-BI52RBEn.mjs} +98 -72
- package/dist-lib/chunks/panel-BI52RBEn.mjs.map +1 -0
- package/dist-lib/chunks/{panel-ma7e3s4C.cjs → panel-INPypAHe.cjs} +40 -14
- package/dist-lib/chunks/panel-INPypAHe.cjs.map +1 -0
- package/dist-lib/chunks/{textarea-DivoQmJw.mjs → textarea-BPRIHZVd.mjs} +2 -2
- package/dist-lib/chunks/{textarea-DivoQmJw.mjs.map → textarea-BPRIHZVd.mjs.map} +1 -1
- package/dist-lib/chunks/{textarea-c80RFmMP.cjs → textarea-K20CL_gF.cjs} +2 -2
- package/dist-lib/chunks/{textarea-c80RFmMP.cjs.map → textarea-K20CL_gF.cjs.map} +1 -1
- package/dist-lib/chunks/{tooltip-pvZ_X-Ub.cjs → toggle-group-BEPs3e0Y.cjs} +2 -54
- package/dist-lib/chunks/toggle-group-BEPs3e0Y.cjs.map +1 -0
- package/dist-lib/chunks/{tooltip-mMF4YHZg.mjs → toggle-group-XMO6ReVo.mjs} +77 -127
- package/dist-lib/chunks/toggle-group-XMO6ReVo.mjs.map +1 -0
- package/dist-lib/chunks/{useTheme-BD0nloAv.cjs → useTheme-3iZAognE.cjs} +876 -73
- package/dist-lib/chunks/useTheme-3iZAognE.cjs.map +1 -0
- package/dist-lib/chunks/{useTheme-D1QVzZDW.mjs → useTheme-B3ZakPqk.mjs} +886 -83
- package/dist-lib/chunks/useTheme-B3ZakPqk.mjs.map +1 -0
- package/dist-lib/index.cjs +41 -733
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.mjs +166 -858
- package/dist-lib/index.mjs.map +1 -1
- package/dist-lib/preview/chat.cjs +3 -3
- package/dist-lib/preview/chat.mjs +3 -3
- package/dist-lib/preview/clientes.cjs +6 -6
- package/dist-lib/preview/clientes.mjs +6 -6
- package/dist-lib/preview/dashboard.cjs +4 -4
- package/dist-lib/preview/dashboard.mjs +4 -4
- package/dist-lib/shadcn.cjs +112 -112
- package/dist-lib/shadcn.mjs +136 -136
- package/dist-lib/src/components/ui/AppShell/app-shell.d.ts +1 -1
- package/dist-lib/src/components/ui/AppShell/app-shell.d.ts.map +1 -1
- package/dist-lib/src/components/ui/AppShell/app-shell.styles.d.ts +45 -1
- package/dist-lib/src/components/ui/AppShell/app-shell.styles.d.ts.map +1 -1
- package/dist-lib/src/components/ui/AppShell/app-shell.types.d.ts +106 -3
- package/dist-lib/src/components/ui/AppShell/app-shell.types.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/builders/column-builders.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/parts/data-table-actions-cell.d.ts +7 -3
- package/dist-lib/src/components/ui/DataTable/parts/data-table-actions-cell.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/utils/action-slots.d.ts +76 -0
- package/dist-lib/src/components/ui/DataTable/utils/action-slots.d.ts.map +1 -0
- package/dist-lib/src/components/ui/DataTable/utils/calculate-column-widths.d.ts.map +1 -1
- package/dist-lib/src/components/ui/MenuSidebar/index.d.ts +2 -2
- package/dist-lib/src/components/ui/MenuSidebar/index.d.ts.map +1 -1
- package/dist-lib/src/components/ui/SingleMenuSidebar/category.d.ts +1 -1
- package/dist-lib/src/components/ui/SingleMenuSidebar/category.d.ts.map +1 -1
- package/dist-lib/src/components/ui/SingleMenuSidebar/menu-item.d.ts +25 -1
- package/dist-lib/src/components/ui/SingleMenuSidebar/menu-item.d.ts.map +1 -1
- package/dist-lib/src/components/ui/SingleMenuSidebar/single-menu-sidebar.d.ts +1 -1
- package/dist-lib/src/components/ui/SingleMenuSidebar/single-menu-sidebar.d.ts.map +1 -1
- package/dist-lib/src/components/ui/SingleMenuSidebar/single-menu-sidebar.types.d.ts +57 -2
- package/dist-lib/src/components/ui/SingleMenuSidebar/single-menu-sidebar.types.d.ts.map +1 -1
- package/dist-lib/src/utils/nav-link.d.ts.map +1 -0
- package/package.json +2 -1
- package/dist-lib/chunks/avatar-BiaG9OJS.cjs.map +0 -1
- package/dist-lib/chunks/avatar-DQYiVRlE.mjs.map +0 -1
- package/dist-lib/chunks/panel-B1xKDbjB.mjs.map +0 -1
- package/dist-lib/chunks/panel-ma7e3s4C.cjs.map +0 -1
- package/dist-lib/chunks/tooltip-mMF4YHZg.mjs.map +0 -1
- package/dist-lib/chunks/tooltip-pvZ_X-Ub.cjs.map +0 -1
- package/dist-lib/chunks/useTheme-BD0nloAv.cjs.map +0 -1
- package/dist-lib/chunks/useTheme-D1QVzZDW.mjs.map +0 -1
- package/dist-lib/src/components/ui/MenuSidebar/nav-link.d.ts.map +0 -1
- /package/dist-lib/src/{components/ui/MenuSidebar → utils}/nav-link.d.ts +0 -0
package/dist-lib/index.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { g as getContrastTextColor, a as FormField, e as Avatar, i as isFilterEntryActive, f as FilterPopover, T as ToolbarToolButton, h as ButtonGroup, j as ToolbarSimpleFilterDrawer, k as
|
|
2
|
-
import {
|
|
3
|
-
import { C as Chip } from "./chunks/useTheme-
|
|
4
|
-
import { A as A2, a, b as b2, H as H2, c as c2, d as d2, e, f, g, M as M2, S as S2, h, i, j, k, l, m, U as U2,
|
|
5
|
-
import { t as tv,
|
|
6
|
-
import {
|
|
1
|
+
import { g as getContrastTextColor, a as FormField, e as Avatar, i as isFilterEntryActive, f as FilterPopover, T as ToolbarToolButton, h as ButtonGroup, j as ToolbarSimpleFilterDrawer, k as TableToolbar, l as ToolbarActions, m as ToolbarFilterButton, n as ToolbarSearch, o as ToolbarApplied, q as ToolbarTabs, r as columnTypeRegistry, L as ListItem, s as List } from "./chunks/panel-BI52RBEn.mjs";
|
|
2
|
+
import { t, A, B, u, C, v, w, x, D, y, z, E, G, H, I, J, K, M, d, N, O, Q, R, S, F, b, U, c, V, W, P, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, p, ai, aj, ak, al, am } from "./chunks/panel-BI52RBEn.mjs";
|
|
3
|
+
import { C as Chip } from "./chunks/useTheme-B3ZakPqk.mjs";
|
|
4
|
+
import { A as A2, a, b as b2, H as H2, c as c2, d as d2, e, f, g, M as M2, S as S2, h, i, j, k, l, m, n, U as U2, o, p as p2, q, r, s, t as t2, v as v2, w as w2, u as u2 } from "./chunks/useTheme-B3ZakPqk.mjs";
|
|
5
|
+
import { t as tv, X as Popover, $ as PopoverTrigger, _ as PopoverContent, B as Button, D as Dialog, x as DialogTrigger, c as cn, p as DialogContent, w as DialogTitle, Y as PopoverAnchor, o as DialogClose, q as DialogDescription, a0 as Tooltip, a3 as TooltipTrigger, a1 as TooltipContent, y as DropdownMenu, Q as DropdownMenuTrigger, E as DropdownMenuContent, L as DropdownMenuSeparator, G as DropdownMenuItem } from "./chunks/avatar-DFWEwBKu.mjs";
|
|
6
|
+
import { R as R2, S as S3, T, U as U3, V as V2, W as W2, z as z2, H as H3, J as J2, K as K2, a9 as a92, a8 as a82 } from "./chunks/avatar-DFWEwBKu.mjs";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
8
|
import * as React from "react";
|
|
9
|
-
import { forwardRef, useId, useState, Fragment as Fragment$1, isValidElement, useCallback, useMemo, createElement, useRef, useEffect, useLayoutEffect
|
|
10
|
-
import { l as Checkbox, C as Calendar, T as Textarea } from "./chunks/textarea-
|
|
11
|
-
import { G as
|
|
12
|
-
import { Check, MoreHorizontal, SlidersHorizontal, Calendar as Calendar$1, AlertCircle, CheckCheck, Clock, MoreVertical, Ban, X as X2, CalendarDays, ChevronDown, ChevronLeft, ChevronRight,
|
|
9
|
+
import { forwardRef, useId, useState, Fragment as Fragment$1, isValidElement, useCallback, useMemo, createElement, useRef, useEffect, useLayoutEffect } from "react";
|
|
10
|
+
import { l as Checkbox, C as Calendar, T as Textarea } from "./chunks/textarea-BPRIHZVd.mjs";
|
|
11
|
+
import { G as G2, H as H4, F as F2, O as O2 } from "./chunks/textarea-BPRIHZVd.mjs";
|
|
12
|
+
import { Check, MoreHorizontal, SlidersHorizontal, Calendar as Calendar$1, AlertCircle, CheckCheck, Clock, MoreVertical, Ban, X as X2, CalendarDays, ChevronDown, ChevronLeft, ChevronRight, RefreshCw, OctagonX, TriangleAlert, CircleCheck, Info, Bell } from "lucide-react";
|
|
13
13
|
import { Reply } from "lucide-react";
|
|
14
|
-
import {
|
|
15
|
-
import { B as B2,
|
|
14
|
+
import { ay as Separator } from "./chunks/toggle-group-XMO6ReVo.mjs";
|
|
15
|
+
import { B as B2, aH } from "./chunks/toggle-group-XMO6ReVo.mjs";
|
|
16
16
|
import "@radix-ui/react-aspect-ratio";
|
|
17
17
|
import "react-day-picker";
|
|
18
18
|
import "@radix-ui/react-collapsible";
|
|
19
|
-
import { I as Input } from "./chunks/input-
|
|
20
|
-
import { i as i2 } from "./chunks/input-
|
|
19
|
+
import { I as Input } from "./chunks/input-CfmzMYtd.mjs";
|
|
20
|
+
import { i as i2 } from "./chunks/input-CfmzMYtd.mjs";
|
|
21
21
|
import { toast as toast$1 } from "sonner";
|
|
22
|
-
import { a as a10, b as b3, K as
|
|
23
|
-
import { P as
|
|
22
|
+
import { a as a10, b as b3, K as K3 } from "./chunks/kpi-delta-DaDwKOaP.mjs";
|
|
23
|
+
import { P as P2, p as p3 } from "./chunks/page-header--cPS_Z-a.mjs";
|
|
24
24
|
import * as RechartsPrimitive from "recharts";
|
|
25
25
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
26
26
|
import "@hello-pangea/dnd";
|
|
@@ -1009,7 +1009,7 @@ function actionColumn(opts) {
|
|
|
1009
1009
|
field: "_actions",
|
|
1010
1010
|
headerName: "",
|
|
1011
1011
|
type: "actions",
|
|
1012
|
-
width: opts.width
|
|
1012
|
+
...opts.width !== void 0 ? { width: opts.width } : {},
|
|
1013
1013
|
pinned: "right",
|
|
1014
1014
|
getActions: opts.getActions
|
|
1015
1015
|
};
|
|
@@ -3774,7 +3774,7 @@ function resolveIsImage(value, preview, accept) {
|
|
|
3774
3774
|
}
|
|
3775
3775
|
function matchesAccept(file, accept) {
|
|
3776
3776
|
if (!accept) return true;
|
|
3777
|
-
const tokens = accept.split(",").map((
|
|
3777
|
+
const tokens = accept.split(",").map((t3) => t3.trim().toLowerCase());
|
|
3778
3778
|
const name = file.name.toLowerCase();
|
|
3779
3779
|
const mime = file.type.toLowerCase();
|
|
3780
3780
|
return tokens.some((token) => {
|
|
@@ -4035,7 +4035,7 @@ const messageBubbleStyles = tv({
|
|
|
4035
4035
|
tail: true
|
|
4036
4036
|
}
|
|
4037
4037
|
});
|
|
4038
|
-
const styles
|
|
4038
|
+
const styles = messageBubbleStyles();
|
|
4039
4039
|
function handleMediaKeyDown(event, onMediaClick) {
|
|
4040
4040
|
if (!onMediaClick) return;
|
|
4041
4041
|
if (event.key === "Enter" || event.key === " ") {
|
|
@@ -4070,12 +4070,12 @@ function MessageMediaRenderer({
|
|
|
4070
4070
|
}) {
|
|
4071
4071
|
switch (mediaType) {
|
|
4072
4072
|
case "image":
|
|
4073
|
-
return /* @__PURE__ */ jsx("div", { className: styles
|
|
4073
|
+
return /* @__PURE__ */ jsx("div", { className: styles.media(), children: mediaUrl ? /* @__PURE__ */ jsx(
|
|
4074
4074
|
"img",
|
|
4075
4075
|
{
|
|
4076
4076
|
src: mediaUrl,
|
|
4077
4077
|
alt: body2 || "Imagem",
|
|
4078
|
-
className: styles
|
|
4078
|
+
className: styles.mediaImage(),
|
|
4079
4079
|
role: onMediaClick ? "button" : void 0,
|
|
4080
4080
|
tabIndex: onMediaClick ? 0 : void 0,
|
|
4081
4081
|
onClick: onMediaClick,
|
|
@@ -4083,19 +4083,19 @@ function MessageMediaRenderer({
|
|
|
4083
4083
|
}
|
|
4084
4084
|
) : null });
|
|
4085
4085
|
case "audio":
|
|
4086
|
-
return /* @__PURE__ */ jsx("div", { className: styles
|
|
4086
|
+
return /* @__PURE__ */ jsx("div", { className: styles.media(), children: mediaUrl ? (
|
|
4087
4087
|
// eslint-disable-next-line jsx-a11y/media-has-caption
|
|
4088
|
-
/* @__PURE__ */ jsx("audio", { controls: true, src: mediaUrl, className: styles
|
|
4088
|
+
/* @__PURE__ */ jsx("audio", { controls: true, src: mediaUrl, className: styles.mediaAudio() })
|
|
4089
4089
|
) : null });
|
|
4090
4090
|
case "video":
|
|
4091
|
-
return /* @__PURE__ */ jsx("div", { className: styles
|
|
4091
|
+
return /* @__PURE__ */ jsx("div", { className: styles.media(), children: mediaUrl ? (
|
|
4092
4092
|
// eslint-disable-next-line jsx-a11y/media-has-caption
|
|
4093
4093
|
/* @__PURE__ */ jsx(
|
|
4094
4094
|
"video",
|
|
4095
4095
|
{
|
|
4096
4096
|
controls: true,
|
|
4097
4097
|
src: mediaUrl,
|
|
4098
|
-
className: styles
|
|
4098
|
+
className: styles.mediaVideo(),
|
|
4099
4099
|
role: onMediaClick ? "button" : void 0,
|
|
4100
4100
|
tabIndex: onMediaClick ? 0 : void 0,
|
|
4101
4101
|
onClick: onMediaClick,
|
|
@@ -4104,18 +4104,18 @@ function MessageMediaRenderer({
|
|
|
4104
4104
|
)
|
|
4105
4105
|
) : null });
|
|
4106
4106
|
case "document":
|
|
4107
|
-
return /* @__PURE__ */ jsxs("div", { className: styles
|
|
4107
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.mediaDoc(), children: [
|
|
4108
4108
|
/* @__PURE__ */ jsx(
|
|
4109
4109
|
Icon,
|
|
4110
4110
|
{
|
|
4111
4111
|
name: "line-file",
|
|
4112
4112
|
size: "lg",
|
|
4113
|
-
className: styles
|
|
4113
|
+
className: styles.mediaDocIcon()
|
|
4114
4114
|
}
|
|
4115
4115
|
),
|
|
4116
|
-
/* @__PURE__ */ jsxs("div", { className: styles
|
|
4117
|
-
/* @__PURE__ */ jsx("span", { className: styles
|
|
4118
|
-
/* @__PURE__ */ jsx("span", { className: styles
|
|
4116
|
+
/* @__PURE__ */ jsxs("div", { className: styles.mediaDocInfo(), children: [
|
|
4117
|
+
/* @__PURE__ */ jsx("span", { className: styles.mediaDocName(), children: body2 || "Documento" }),
|
|
4118
|
+
/* @__PURE__ */ jsx("span", { className: styles.mediaDocHint(), children: "Toque para baixar" })
|
|
4119
4119
|
] }),
|
|
4120
4120
|
mediaUrl ? /* @__PURE__ */ jsx(
|
|
4121
4121
|
Button,
|
|
@@ -4137,7 +4137,7 @@ function MessageMediaRenderer({
|
|
|
4137
4137
|
href: mediaUrl,
|
|
4138
4138
|
target: "_blank",
|
|
4139
4139
|
rel: "noopener noreferrer",
|
|
4140
|
-
className: styles
|
|
4140
|
+
className: styles.mediaLocation(),
|
|
4141
4141
|
onClick: onMediaClick,
|
|
4142
4142
|
children: [
|
|
4143
4143
|
/* @__PURE__ */ jsx(
|
|
@@ -4145,37 +4145,37 @@ function MessageMediaRenderer({
|
|
|
4145
4145
|
{
|
|
4146
4146
|
name: "line-pin",
|
|
4147
4147
|
size: "md",
|
|
4148
|
-
className: styles
|
|
4148
|
+
className: styles.mediaLocationIcon()
|
|
4149
4149
|
}
|
|
4150
4150
|
),
|
|
4151
4151
|
/* @__PURE__ */ jsx("span", { children: body2 || "Ver localização" })
|
|
4152
4152
|
]
|
|
4153
4153
|
}
|
|
4154
|
-
) : /* @__PURE__ */ jsxs("div", { className: styles
|
|
4154
|
+
) : /* @__PURE__ */ jsxs("div", { className: styles.mediaLocation(), children: [
|
|
4155
4155
|
/* @__PURE__ */ jsx(
|
|
4156
4156
|
Icon,
|
|
4157
4157
|
{
|
|
4158
4158
|
name: "line-pin",
|
|
4159
4159
|
size: "md",
|
|
4160
|
-
className: styles
|
|
4160
|
+
className: styles.mediaLocationIcon()
|
|
4161
4161
|
}
|
|
4162
4162
|
),
|
|
4163
4163
|
/* @__PURE__ */ jsx("span", { children: body2 || "Localização" })
|
|
4164
4164
|
] });
|
|
4165
4165
|
case "vcard":
|
|
4166
4166
|
case "contact":
|
|
4167
|
-
return /* @__PURE__ */ jsxs("div", { className: styles
|
|
4167
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.mediaContact(), children: [
|
|
4168
4168
|
/* @__PURE__ */ jsx(
|
|
4169
4169
|
Icon,
|
|
4170
4170
|
{
|
|
4171
4171
|
name: "line-user",
|
|
4172
4172
|
size: "lg",
|
|
4173
|
-
className: styles
|
|
4173
|
+
className: styles.mediaDocIcon()
|
|
4174
4174
|
}
|
|
4175
4175
|
),
|
|
4176
|
-
/* @__PURE__ */ jsxs("div", { className: styles
|
|
4177
|
-
/* @__PURE__ */ jsx("span", { className: styles
|
|
4178
|
-
/* @__PURE__ */ jsx("span", { className: styles
|
|
4176
|
+
/* @__PURE__ */ jsxs("div", { className: styles.mediaContactInfo(), children: [
|
|
4177
|
+
/* @__PURE__ */ jsx("span", { className: styles.mediaContactName(), children: body2 || "Contato" }),
|
|
4178
|
+
/* @__PURE__ */ jsx("span", { className: styles.mediaContactHint(), children: "Cartão de contato" })
|
|
4179
4179
|
] })
|
|
4180
4180
|
] });
|
|
4181
4181
|
case "text":
|
|
@@ -4971,698 +4971,6 @@ const MonthYearPicker = forwardRef(function MonthYearPicker2({
|
|
|
4971
4971
|
] });
|
|
4972
4972
|
});
|
|
4973
4973
|
MonthYearPicker.displayName = "MonthYearPicker";
|
|
4974
|
-
const SingleMenuSidebarContext = createContext({
|
|
4975
|
-
expanded: true,
|
|
4976
|
-
isHoverExpand: false,
|
|
4977
|
-
toggle: () => {
|
|
4978
|
-
},
|
|
4979
|
-
openCategoryId: null,
|
|
4980
|
-
setOpenCategoryId: () => {
|
|
4981
|
-
}
|
|
4982
|
-
});
|
|
4983
|
-
function useSingleMenuSidebar() {
|
|
4984
|
-
return useContext(SingleMenuSidebarContext);
|
|
4985
|
-
}
|
|
4986
|
-
function useSingleMenuSidebarState(defaultExpanded, controlledExpanded, onExpandedChange) {
|
|
4987
|
-
const [internal, setInternal] = useState(defaultExpanded);
|
|
4988
|
-
const isControlled = controlledExpanded !== void 0;
|
|
4989
|
-
const expanded = isControlled ? controlledExpanded : internal;
|
|
4990
|
-
const [lockedOpen, setLockedOpen] = useState(defaultExpanded);
|
|
4991
|
-
const [hoverOpen, setHoverOpen] = useState(false);
|
|
4992
|
-
const hoverTimeoutRef = useRef(null);
|
|
4993
|
-
const suppressHoverRef = useRef(false);
|
|
4994
|
-
const suppressTimerRef = useRef(null);
|
|
4995
|
-
const setExpanded = useCallback(
|
|
4996
|
-
(v3) => {
|
|
4997
|
-
if (!isControlled) setInternal(v3);
|
|
4998
|
-
onExpandedChange?.(v3);
|
|
4999
|
-
},
|
|
5000
|
-
[isControlled, onExpandedChange]
|
|
5001
|
-
);
|
|
5002
|
-
const toggle = useCallback(() => {
|
|
5003
|
-
const next = !lockedOpen;
|
|
5004
|
-
setLockedOpen(next);
|
|
5005
|
-
setHoverOpen(false);
|
|
5006
|
-
if (!next) {
|
|
5007
|
-
suppressHoverRef.current = true;
|
|
5008
|
-
if (suppressTimerRef.current) clearTimeout(suppressTimerRef.current);
|
|
5009
|
-
suppressTimerRef.current = setTimeout(() => {
|
|
5010
|
-
suppressHoverRef.current = false;
|
|
5011
|
-
}, 500);
|
|
5012
|
-
}
|
|
5013
|
-
setExpanded(next);
|
|
5014
|
-
}, [lockedOpen, setExpanded]);
|
|
5015
|
-
const onMouseEnter = useCallback(() => {
|
|
5016
|
-
if (lockedOpen) return;
|
|
5017
|
-
if (suppressHoverRef.current) return;
|
|
5018
|
-
if (hoverTimeoutRef.current) {
|
|
5019
|
-
clearTimeout(hoverTimeoutRef.current);
|
|
5020
|
-
hoverTimeoutRef.current = null;
|
|
5021
|
-
}
|
|
5022
|
-
setHoverOpen(true);
|
|
5023
|
-
setExpanded(true);
|
|
5024
|
-
}, [lockedOpen, setExpanded]);
|
|
5025
|
-
const onMouseLeave = useCallback(() => {
|
|
5026
|
-
if (lockedOpen) return;
|
|
5027
|
-
hoverTimeoutRef.current = setTimeout(() => {
|
|
5028
|
-
setHoverOpen(false);
|
|
5029
|
-
setExpanded(false);
|
|
5030
|
-
}, 200);
|
|
5031
|
-
}, [lockedOpen, setExpanded]);
|
|
5032
|
-
useEffect(() => {
|
|
5033
|
-
return () => {
|
|
5034
|
-
if (hoverTimeoutRef.current) clearTimeout(hoverTimeoutRef.current);
|
|
5035
|
-
if (suppressTimerRef.current) clearTimeout(suppressTimerRef.current);
|
|
5036
|
-
};
|
|
5037
|
-
}, []);
|
|
5038
|
-
const isHoverExpand = hoverOpen && !lockedOpen;
|
|
5039
|
-
const [openCategoryId, setOpenCategoryId] = useState(null);
|
|
5040
|
-
return {
|
|
5041
|
-
expanded,
|
|
5042
|
-
isHoverExpand,
|
|
5043
|
-
toggle,
|
|
5044
|
-
onMouseEnter,
|
|
5045
|
-
onMouseLeave,
|
|
5046
|
-
openCategoryId,
|
|
5047
|
-
setOpenCategoryId
|
|
5048
|
-
};
|
|
5049
|
-
}
|
|
5050
|
-
const sidebarRoot = tv({
|
|
5051
|
-
base: [
|
|
5052
|
-
"relative flex h-full flex-col overflow-x-hidden",
|
|
5053
|
-
"border-r border-border-sidebar bg-bg-sidebar",
|
|
5054
|
-
"transition-[width] duration-300 ease-in-out"
|
|
5055
|
-
],
|
|
5056
|
-
variants: {
|
|
5057
|
-
// Mobile (< md): expandida = 100% da largura; recolhida = SOME (hidden).
|
|
5058
|
-
// Desktop (md+): largura fixa, expandida (280px) ou recolhida (rail 80px).
|
|
5059
|
-
expanded: {
|
|
5060
|
-
true: "w-full md:w-[280px]",
|
|
5061
|
-
false: "hidden md:flex md:w-20"
|
|
5062
|
-
}
|
|
5063
|
-
},
|
|
5064
|
-
defaultVariants: {
|
|
5065
|
-
expanded: true
|
|
5066
|
-
}
|
|
5067
|
-
});
|
|
5068
|
-
const category = tv({
|
|
5069
|
-
slots: {
|
|
5070
|
-
root: "flex items-center rounded-radius-lg cursor-pointer transition-all",
|
|
5071
|
-
text: "flex-1 text-left text-body-sm whitespace-nowrap overflow-hidden text-ellipsis",
|
|
5072
|
-
// SVG do consumidor (ícone bare do lucide vem 24px) dimensionado no slot → 18px
|
|
5073
|
-
icon: "grid size-[18px] shrink-0 place-items-center [&>svg]:size-[18px]",
|
|
5074
|
-
chevron: "size-icon-sm shrink-0 transition-transform"
|
|
5075
|
-
},
|
|
5076
|
-
variants: {
|
|
5077
|
-
// selected = folha ativa OU pai que contém o item ativo → card cheio
|
|
5078
|
-
// default = nada marcado (inclui pai apenas aberto, sem filho ativo)
|
|
5079
|
-
state: {
|
|
5080
|
-
selected: {
|
|
5081
|
-
root: "bg-bg-sidebar-accent shadow-sh-sm",
|
|
5082
|
-
text: "font-bold text-fg-brand",
|
|
5083
|
-
icon: "text-fg-brand",
|
|
5084
|
-
chevron: "text-fg-brand"
|
|
5085
|
-
},
|
|
5086
|
-
default: {
|
|
5087
|
-
root: "hover:bg-bg-sidebar-accent",
|
|
5088
|
-
text: "font-medium text-fg-default",
|
|
5089
|
-
icon: "text-fg-muted",
|
|
5090
|
-
chevron: "text-fg-subtle"
|
|
5091
|
-
}
|
|
5092
|
-
},
|
|
5093
|
-
collapsed: {
|
|
5094
|
-
true: { root: "justify-center px-0 size-form-xl" },
|
|
5095
|
-
false: { root: "w-full gap-gp-lg px-pad-2xl py-pad-xl" }
|
|
5096
|
-
}
|
|
5097
|
-
},
|
|
5098
|
-
defaultVariants: {
|
|
5099
|
-
state: "default",
|
|
5100
|
-
collapsed: false
|
|
5101
|
-
}
|
|
5102
|
-
});
|
|
5103
|
-
const menuItem = tv({
|
|
5104
|
-
slots: {
|
|
5105
|
-
root: "flex h-[38px] items-center gap-[18px] pl-[18px] pr-pad-2xl cursor-pointer transition-colors hover:bg-bg-sidebar-accent",
|
|
5106
|
-
border: "h-full w-0 shrink-0",
|
|
5107
|
-
text: "text-body-sm text-left"
|
|
5108
|
-
},
|
|
5109
|
-
variants: {
|
|
5110
|
-
selected: {
|
|
5111
|
-
true: {
|
|
5112
|
-
border: "border-l-[3px] border-border-brand",
|
|
5113
|
-
text: "font-semibold text-fg-default"
|
|
5114
|
-
},
|
|
5115
|
-
false: {
|
|
5116
|
-
border: "border-l border-border-subtle",
|
|
5117
|
-
text: "font-medium text-fg-muted"
|
|
5118
|
-
}
|
|
5119
|
-
}
|
|
5120
|
-
},
|
|
5121
|
-
defaultVariants: {
|
|
5122
|
-
selected: false
|
|
5123
|
-
}
|
|
5124
|
-
});
|
|
5125
|
-
const styles = {
|
|
5126
|
-
// Header
|
|
5127
|
-
header: {
|
|
5128
|
-
wrapper: "flex h-layout-navbar items-center overflow-hidden px-pad-4xl py-pad-md shrink-0",
|
|
5129
|
-
wrapperCollapsed: "justify-center px-0",
|
|
5130
|
-
inner: "flex items-center gap-gp-md",
|
|
5131
|
-
logo: "shrink-0",
|
|
5132
|
-
title: "text-title-sm font-bold text-fg-default whitespace-nowrap",
|
|
5133
|
-
collapseBtn: "ml-auto shrink-0 cursor-pointer rounded-radius-md p-pad-xs text-fg-subtle hover:bg-bg-sidebar-accent hover:text-fg-muted transition-colors",
|
|
5134
|
-
expandBtn: "absolute right-0 top-16 translate-x-1/2 z-10 cursor-pointer rounded-radius-full bg-bg-surface border border-border-default p-pad-xs shadow-sh-sm text-fg-subtle hover:text-fg-muted transition-colors",
|
|
5135
|
-
expandBtnIcon: "size-icon-sm"
|
|
5136
|
-
},
|
|
5137
|
-
// Module selector
|
|
5138
|
-
module: {
|
|
5139
|
-
trigger: "flex w-full cursor-pointer items-center gap-gp-lg rounded-radius-md bg-bg-sidebar-accent py-pad-md pl-pad-md pr-pad-2xl shadow-sh-sm transition-colors hover:bg-bg-sidebar-accent-hover focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring-brand",
|
|
5140
|
-
iconContainer: "flex size-icon-xl shrink-0 items-center justify-center rounded-radius-md bg-bg-brand text-fg-on-brand",
|
|
5141
|
-
textContainer: "flex flex-col items-start gap-gp-xs overflow-hidden",
|
|
5142
|
-
title: "text-body-md font-bold leading-4 text-fg-default truncate text-left",
|
|
5143
|
-
subtitle: "text-caption-sm font-semibold text-fg-subtle text-left",
|
|
5144
|
-
chevron: "ml-auto shrink-0 size-icon-sm text-fg-subtle",
|
|
5145
|
-
dropdownItem: "flex items-center gap-gp-lg cursor-pointer",
|
|
5146
|
-
// selecionado: realça a linha (bg-brand-subtle) + label/check em fg-brand
|
|
5147
|
-
dropdownItemSelected: "bg-bg-brand-subtle text-fg-brand",
|
|
5148
|
-
// [&>svg]:!text-fg-on-brand: o DropdownMenuItem força [&_svg]:text-fg-muted
|
|
5149
|
-
// (+ fg-default no hover) em TODOS os svgs descendentes — o ! garante que o
|
|
5150
|
-
// ícone do chip siga fg-on-brand igual ao trigger (branco light / preto dark).
|
|
5151
|
-
dropdownItemIcon: "flex size-icon-lg shrink-0 items-center justify-center rounded-radius-sm bg-bg-brand [&>svg]:size-icon-sm [&>svg]:!text-fg-on-brand",
|
|
5152
|
-
dropdownItemLabel: "flex-1 text-body-md font-medium",
|
|
5153
|
-
dropdownItemCheck: "ml-auto shrink-0 size-icon-sm !text-fg-brand"
|
|
5154
|
-
},
|
|
5155
|
-
// Search
|
|
5156
|
-
search: {
|
|
5157
|
-
wrapper: "flex w-full items-center justify-between rounded-radius-lg bg-bg-muted py-pad-sm pl-pad-lg pr-pad-sm transition-all focus-within:bg-bg-surface focus-within:ring-4 focus-within:ring-ring-brand",
|
|
5158
|
-
inner: "flex flex-1 items-center gap-gp-md opacity-60 focus-within:opacity-100",
|
|
5159
|
-
icon: "shrink-0 size-icon-sm text-fg-muted",
|
|
5160
|
-
text: "text-body-sm font-medium text-fg-default placeholder:text-fg-subtle",
|
|
5161
|
-
shortcutBadge: "shrink-0 flex items-center justify-center rounded-radius-md bg-bg-surface px-pad-md py-pad-xs shadow-sh-sm",
|
|
5162
|
-
shortcutText: "text-body-sm font-medium text-fg-muted"
|
|
5163
|
-
},
|
|
5164
|
-
// Footer
|
|
5165
|
-
footer: {
|
|
5166
|
-
wrapper: "px-pad-lg py-pad-xl",
|
|
5167
|
-
button: "flex w-full cursor-pointer items-center gap-gp-lg rounded-radius-lg bg-bg-sidebar-accent px-pad-2xl py-pad-xl transition-colors hover:bg-bg-sidebar-accent-hover focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring-brand",
|
|
5168
|
-
avatar: "flex size-form-sm shrink-0 items-center justify-center rounded-radius-full bg-bg-muted overflow-hidden",
|
|
5169
|
-
avatarIcon: "shrink-0 size-icon-sm text-fg-muted",
|
|
5170
|
-
textContainer: "flex flex-col items-start gap-gp-2xs overflow-hidden",
|
|
5171
|
-
name: "text-body-sm font-semibold text-fg-default truncate w-full text-left",
|
|
5172
|
-
email: "text-caption-sm font-medium text-fg-muted truncate w-full text-left",
|
|
5173
|
-
chevron: "ml-auto shrink-0 size-icon-sm text-fg-subtle",
|
|
5174
|
-
dropdownLabel: "flex flex-col gap-gp-2xs px-pad-sm py-pad-xs normal-case tracking-normal",
|
|
5175
|
-
dropdownLabelName: "text-body-md font-semibold",
|
|
5176
|
-
dropdownLabelEmail: "text-caption-md font-normal text-fg-muted",
|
|
5177
|
-
dropdownItem: "flex items-center gap-gp-md cursor-pointer",
|
|
5178
|
-
dropdownItemIcon: "size-icon-sm shrink-0"
|
|
5179
|
-
},
|
|
5180
|
-
// Layout
|
|
5181
|
-
// Fade do conteúdo textual durante a transição de largura (evita wrap visível)
|
|
5182
|
-
textFadeIn: "animate-in fade-in-0 duration-200",
|
|
5183
|
-
divider: "mx-pad-3xl h-px bg-border-sidebar",
|
|
5184
|
-
sectionPadding: "flex flex-col gap-gp-2xl px-pad-3xl py-pad-4xl shrink-0 overflow-hidden",
|
|
5185
|
-
navContainer: "scrollbar-thin flex flex-1 flex-col overflow-y-auto overflow-x-hidden py-pad-4xl",
|
|
5186
|
-
navContainerExpanded: "px-pad-3xl",
|
|
5187
|
-
navContainerCollapsed: "items-center",
|
|
5188
|
-
navList: "flex flex-col",
|
|
5189
|
-
subItemList: "flex flex-col py-pad-lg"
|
|
5190
|
-
};
|
|
5191
|
-
function SingleMenuHeader({
|
|
5192
|
-
logo,
|
|
5193
|
-
title: title2,
|
|
5194
|
-
showToggleIndicator = false
|
|
5195
|
-
}) {
|
|
5196
|
-
const { expanded, isHoverExpand, toggle } = useSingleMenuSidebar();
|
|
5197
|
-
const isFlipped = isHoverExpand || !expanded;
|
|
5198
|
-
return /* @__PURE__ */ jsxs(
|
|
5199
|
-
"div",
|
|
5200
|
-
{
|
|
5201
|
-
className: cn(
|
|
5202
|
-
styles.header.wrapper,
|
|
5203
|
-
!expanded && styles.header.wrapperCollapsed
|
|
5204
|
-
),
|
|
5205
|
-
children: [
|
|
5206
|
-
/* @__PURE__ */ jsxs("div", { className: styles.header.inner, children: [
|
|
5207
|
-
/* @__PURE__ */ jsx("div", { className: styles.header.logo, children: logo }),
|
|
5208
|
-
expanded && /* @__PURE__ */ jsx("span", { className: cn(styles.header.title, styles.textFadeIn), children: title2 })
|
|
5209
|
-
] }),
|
|
5210
|
-
expanded ? /* @__PURE__ */ jsx(
|
|
5211
|
-
"button",
|
|
5212
|
-
{
|
|
5213
|
-
type: "button",
|
|
5214
|
-
onClick: toggle,
|
|
5215
|
-
className: styles.header.collapseBtn,
|
|
5216
|
-
"aria-label": isFlipped ? "Expandir sidebar" : "Recolher sidebar",
|
|
5217
|
-
children: /* @__PURE__ */ jsx(
|
|
5218
|
-
PanelLeftClose,
|
|
5219
|
-
{
|
|
5220
|
-
className: cn(
|
|
5221
|
-
"size-icon-sm transition-transform duration-300",
|
|
5222
|
-
isFlipped && "rotate-180"
|
|
5223
|
-
)
|
|
5224
|
-
}
|
|
5225
|
-
)
|
|
5226
|
-
}
|
|
5227
|
-
) : showToggleIndicator ? /* @__PURE__ */ jsx(
|
|
5228
|
-
"button",
|
|
5229
|
-
{
|
|
5230
|
-
type: "button",
|
|
5231
|
-
onClick: toggle,
|
|
5232
|
-
className: styles.header.expandBtn,
|
|
5233
|
-
"aria-label": "Expandir sidebar",
|
|
5234
|
-
children: /* @__PURE__ */ jsx(
|
|
5235
|
-
PanelLeftClose,
|
|
5236
|
-
{
|
|
5237
|
-
className: cn(
|
|
5238
|
-
styles.header.expandBtnIcon,
|
|
5239
|
-
"transition-transform duration-300 rotate-180"
|
|
5240
|
-
)
|
|
5241
|
-
}
|
|
5242
|
-
)
|
|
5243
|
-
}
|
|
5244
|
-
) : null
|
|
5245
|
-
]
|
|
5246
|
-
}
|
|
5247
|
-
);
|
|
5248
|
-
}
|
|
5249
|
-
SingleMenuHeader.displayName = "SingleMenuHeader";
|
|
5250
|
-
function SingleMenuModuleSelector({
|
|
5251
|
-
icon,
|
|
5252
|
-
title: title2,
|
|
5253
|
-
subtitle,
|
|
5254
|
-
options,
|
|
5255
|
-
onModuleChange
|
|
5256
|
-
}) {
|
|
5257
|
-
const s2 = styles.module;
|
|
5258
|
-
const triggerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5259
|
-
/* @__PURE__ */ jsx("div", { className: s2.iconContainer, children: icon }),
|
|
5260
|
-
/* @__PURE__ */ jsxs("div", { className: s2.textContainer, children: [
|
|
5261
|
-
/* @__PURE__ */ jsx("span", { className: s2.title, children: title2 }),
|
|
5262
|
-
/* @__PURE__ */ jsx("span", { className: s2.subtitle, children: subtitle })
|
|
5263
|
-
] }),
|
|
5264
|
-
/* @__PURE__ */ jsx(ChevronsUpDown, { className: s2.chevron })
|
|
5265
|
-
] });
|
|
5266
|
-
if (!options || options.length === 0) {
|
|
5267
|
-
return /* @__PURE__ */ jsx("div", { className: s2.trigger, children: triggerContent });
|
|
5268
|
-
}
|
|
5269
|
-
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
5270
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { className: s2.trigger, children: triggerContent }),
|
|
5271
|
-
/* @__PURE__ */ jsx(DropdownMenuContent, { side: "bottom", sideOffset: 4, align: "start", children: options.map((option) => {
|
|
5272
|
-
const isSelected = option.label === title2;
|
|
5273
|
-
return /* @__PURE__ */ jsxs(
|
|
5274
|
-
DropdownMenuItem,
|
|
5275
|
-
{
|
|
5276
|
-
className: cn(
|
|
5277
|
-
s2.dropdownItem,
|
|
5278
|
-
isSelected && s2.dropdownItemSelected
|
|
5279
|
-
),
|
|
5280
|
-
onClick: () => onModuleChange?.(option.id),
|
|
5281
|
-
children: [
|
|
5282
|
-
/* @__PURE__ */ jsx("div", { className: s2.dropdownItemIcon, children: option.icon }),
|
|
5283
|
-
/* @__PURE__ */ jsx("span", { className: s2.dropdownItemLabel, children: option.label }),
|
|
5284
|
-
isSelected && /* @__PURE__ */ jsx(Check, { className: s2.dropdownItemCheck })
|
|
5285
|
-
]
|
|
5286
|
-
},
|
|
5287
|
-
option.id
|
|
5288
|
-
);
|
|
5289
|
-
}) })
|
|
5290
|
-
] });
|
|
5291
|
-
}
|
|
5292
|
-
SingleMenuModuleSelector.displayName = "SingleMenuModuleSelector";
|
|
5293
|
-
function SingleMenuSearch({
|
|
5294
|
-
placeholder = "Buscar",
|
|
5295
|
-
onOpen
|
|
5296
|
-
}) {
|
|
5297
|
-
const s2 = styles.search;
|
|
5298
|
-
return /* @__PURE__ */ jsxs("button", { type: "button", onClick: onOpen, className: s2.wrapper, children: [
|
|
5299
|
-
/* @__PURE__ */ jsxs("div", { className: s2.inner, children: [
|
|
5300
|
-
/* @__PURE__ */ jsx(Search, { className: s2.icon }),
|
|
5301
|
-
/* @__PURE__ */ jsx("span", { className: s2.text, children: placeholder })
|
|
5302
|
-
] }),
|
|
5303
|
-
/* @__PURE__ */ jsx("div", { className: s2.shortcutBadge, children: /* @__PURE__ */ jsx("span", { className: s2.shortcutText, children: "⌘K" }) })
|
|
5304
|
-
] });
|
|
5305
|
-
}
|
|
5306
|
-
SingleMenuSearch.displayName = "SingleMenuSearch";
|
|
5307
|
-
function SingleMenuCommand({
|
|
5308
|
-
open,
|
|
5309
|
-
onOpenChange,
|
|
5310
|
-
categories,
|
|
5311
|
-
placeholder = "Buscar no menu…",
|
|
5312
|
-
onSelect,
|
|
5313
|
-
custom
|
|
5314
|
-
}) {
|
|
5315
|
-
const leaves = categories.filter((c3) => !c3.items?.length);
|
|
5316
|
-
const groups = categories.filter((c3) => c3.items?.length);
|
|
5317
|
-
const handle = (id, parentId) => {
|
|
5318
|
-
onSelect(id, parentId);
|
|
5319
|
-
onOpenChange(false);
|
|
5320
|
-
};
|
|
5321
|
-
return /* @__PURE__ */ jsxs(CommandDialog, { open, onOpenChange, children: [
|
|
5322
|
-
/* @__PURE__ */ jsx(CommandInput, { placeholder }),
|
|
5323
|
-
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
5324
|
-
/* @__PURE__ */ jsx(CommandEmpty, { children: "Nenhum resultado." }),
|
|
5325
|
-
custom ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5326
|
-
leaves.length > 0 && /* @__PURE__ */ jsx(CommandGroup, { heading: "Menu", children: leaves.map((c3) => /* @__PURE__ */ jsxs(
|
|
5327
|
-
CommandItem,
|
|
5328
|
-
{
|
|
5329
|
-
value: c3.label,
|
|
5330
|
-
onSelect: () => handle(c3.id),
|
|
5331
|
-
children: [
|
|
5332
|
-
c3.icon,
|
|
5333
|
-
/* @__PURE__ */ jsx("span", { children: c3.label })
|
|
5334
|
-
]
|
|
5335
|
-
},
|
|
5336
|
-
c3.id
|
|
5337
|
-
)) }),
|
|
5338
|
-
groups.map((cat) => /* @__PURE__ */ jsx(CommandGroup, { heading: cat.label, children: cat.items.map((item) => /* @__PURE__ */ jsx(
|
|
5339
|
-
CommandItem,
|
|
5340
|
-
{
|
|
5341
|
-
value: `${cat.label} ${item.label}`,
|
|
5342
|
-
onSelect: () => handle(item.id, cat.id),
|
|
5343
|
-
children: /* @__PURE__ */ jsx("span", { children: item.label })
|
|
5344
|
-
},
|
|
5345
|
-
item.id
|
|
5346
|
-
)) }, cat.id))
|
|
5347
|
-
] })
|
|
5348
|
-
] })
|
|
5349
|
-
] });
|
|
5350
|
-
}
|
|
5351
|
-
SingleMenuCommand.displayName = "SingleMenuCommand";
|
|
5352
|
-
function SingleMenuItem({
|
|
5353
|
-
label,
|
|
5354
|
-
selected = false,
|
|
5355
|
-
onClick
|
|
5356
|
-
}) {
|
|
5357
|
-
const s2 = menuItem({ selected });
|
|
5358
|
-
return /* @__PURE__ */ jsxs("button", { type: "button", onClick, className: s2.root(), children: [
|
|
5359
|
-
/* @__PURE__ */ jsx("div", { className: s2.border() }),
|
|
5360
|
-
/* @__PURE__ */ jsx("span", { className: s2.text(), children: label })
|
|
5361
|
-
] });
|
|
5362
|
-
}
|
|
5363
|
-
SingleMenuItem.displayName = "SingleMenuItem";
|
|
5364
|
-
function SingleMenuCategory({
|
|
5365
|
-
id,
|
|
5366
|
-
icon,
|
|
5367
|
-
label,
|
|
5368
|
-
active = false,
|
|
5369
|
-
items,
|
|
5370
|
-
activeItemId,
|
|
5371
|
-
onItemClick,
|
|
5372
|
-
onCategoryClick
|
|
5373
|
-
}) {
|
|
5374
|
-
const { expanded, openCategoryId, setOpenCategoryId } = useSingleMenuSidebar();
|
|
5375
|
-
const hasItems = !!items && items.length > 0;
|
|
5376
|
-
const isOpen = hasItems ? openCategoryId === id : false;
|
|
5377
|
-
const isLeafActive = !hasItems && (activeItemId !== void 0 ? activeItemId === id : !!active);
|
|
5378
|
-
const containsActive = hasItems && items.some((item) => item.id === activeItemId);
|
|
5379
|
-
const selected = !expanded ? hasItems ? isOpen || containsActive : isLeafActive : hasItems ? isOpen : isLeafActive && openCategoryId == null;
|
|
5380
|
-
const state = selected ? "selected" : "default";
|
|
5381
|
-
const s2 = category({ state, collapsed: !expanded });
|
|
5382
|
-
const handleToggle = () => {
|
|
5383
|
-
if (hasItems) {
|
|
5384
|
-
setOpenCategoryId(isOpen ? null : id);
|
|
5385
|
-
onCategoryClick?.();
|
|
5386
|
-
} else {
|
|
5387
|
-
onItemClick?.(id);
|
|
5388
|
-
setOpenCategoryId(null);
|
|
5389
|
-
onCategoryClick?.();
|
|
5390
|
-
}
|
|
5391
|
-
};
|
|
5392
|
-
if (!expanded) {
|
|
5393
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
5394
|
-
/* @__PURE__ */ jsx(
|
|
5395
|
-
TooltipTrigger,
|
|
5396
|
-
{
|
|
5397
|
-
role: "button",
|
|
5398
|
-
tabIndex: 0,
|
|
5399
|
-
onClick: handleToggle,
|
|
5400
|
-
onKeyDown: (e2) => {
|
|
5401
|
-
if (e2.key === "Enter" || e2.key === " ") {
|
|
5402
|
-
e2.preventDefault();
|
|
5403
|
-
handleToggle();
|
|
5404
|
-
}
|
|
5405
|
-
},
|
|
5406
|
-
className: s2.root(),
|
|
5407
|
-
children: /* @__PURE__ */ jsx("span", { className: s2.icon(), children: icon })
|
|
5408
|
-
}
|
|
5409
|
-
),
|
|
5410
|
-
/* @__PURE__ */ jsx(TooltipContent, { side: "right", sideOffset: 8, children: label })
|
|
5411
|
-
] });
|
|
5412
|
-
}
|
|
5413
|
-
if (!hasItems) {
|
|
5414
|
-
return /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleToggle, className: s2.root(), children: [
|
|
5415
|
-
/* @__PURE__ */ jsx("span", { className: s2.icon(), children: icon }),
|
|
5416
|
-
/* @__PURE__ */ jsx("span", { className: cn(s2.text(), styles.textFadeIn), children: label })
|
|
5417
|
-
] });
|
|
5418
|
-
}
|
|
5419
|
-
return /* @__PURE__ */ jsxs(
|
|
5420
|
-
Collapsible,
|
|
5421
|
-
{
|
|
5422
|
-
open: isOpen,
|
|
5423
|
-
onOpenChange: (open) => {
|
|
5424
|
-
setOpenCategoryId(open ? id : null);
|
|
5425
|
-
onCategoryClick?.();
|
|
5426
|
-
},
|
|
5427
|
-
children: [
|
|
5428
|
-
/* @__PURE__ */ jsxs(CollapsibleTrigger, { className: s2.root(), children: [
|
|
5429
|
-
/* @__PURE__ */ jsx("span", { className: s2.icon(), children: icon }),
|
|
5430
|
-
/* @__PURE__ */ jsx("span", { className: cn(s2.text(), styles.textFadeIn), children: label }),
|
|
5431
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: cn(s2.chevron(), isOpen && "rotate-180") })
|
|
5432
|
-
] }),
|
|
5433
|
-
/* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: styles.subItemList, children: items.map((item) => /* @__PURE__ */ jsx(
|
|
5434
|
-
SingleMenuItem,
|
|
5435
|
-
{
|
|
5436
|
-
label: item.label,
|
|
5437
|
-
selected: item.id === activeItemId,
|
|
5438
|
-
onClick: () => onItemClick?.(item.id)
|
|
5439
|
-
},
|
|
5440
|
-
item.id
|
|
5441
|
-
)) }) })
|
|
5442
|
-
]
|
|
5443
|
-
}
|
|
5444
|
-
);
|
|
5445
|
-
}
|
|
5446
|
-
SingleMenuCategory.displayName = "SingleMenuCategory";
|
|
5447
|
-
function SingleMenuFooter({
|
|
5448
|
-
name,
|
|
5449
|
-
email,
|
|
5450
|
-
avatar,
|
|
5451
|
-
actions,
|
|
5452
|
-
onAction
|
|
5453
|
-
}) {
|
|
5454
|
-
const { expanded } = useSingleMenuSidebar();
|
|
5455
|
-
const s2 = styles.footer;
|
|
5456
|
-
const triggerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5457
|
-
/* @__PURE__ */ jsx("div", { className: s2.avatar, children: avatar ?? /* @__PURE__ */ jsx(User, { className: s2.avatarIcon }) }),
|
|
5458
|
-
expanded && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5459
|
-
/* @__PURE__ */ jsxs("div", { className: s2.textContainer, children: [
|
|
5460
|
-
/* @__PURE__ */ jsx("span", { className: s2.name, children: name }),
|
|
5461
|
-
/* @__PURE__ */ jsx("span", { className: s2.email, children: email })
|
|
5462
|
-
] }),
|
|
5463
|
-
/* @__PURE__ */ jsx(ChevronsUpDown, { className: s2.chevron })
|
|
5464
|
-
] })
|
|
5465
|
-
] });
|
|
5466
|
-
if (!actions || actions.length === 0) {
|
|
5467
|
-
return /* @__PURE__ */ jsx("div", { className: s2.wrapper, children: /* @__PURE__ */ jsx("div", { className: cn(s2.button, !expanded && "justify-center px-0"), children: triggerContent }) });
|
|
5468
|
-
}
|
|
5469
|
-
return /* @__PURE__ */ jsx("div", { className: s2.wrapper, children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
5470
|
-
/* @__PURE__ */ jsx(
|
|
5471
|
-
DropdownMenuTrigger,
|
|
5472
|
-
{
|
|
5473
|
-
className: cn(s2.button, !expanded && "justify-center px-0"),
|
|
5474
|
-
children: triggerContent
|
|
5475
|
-
}
|
|
5476
|
-
),
|
|
5477
|
-
/* @__PURE__ */ jsxs(
|
|
5478
|
-
DropdownMenuContent,
|
|
5479
|
-
{
|
|
5480
|
-
side: expanded ? "top" : "right",
|
|
5481
|
-
sideOffset: 8,
|
|
5482
|
-
align: expanded ? "end" : "start",
|
|
5483
|
-
children: [
|
|
5484
|
-
/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsxs(DropdownMenuLabel, { className: s2.dropdownLabel, children: [
|
|
5485
|
-
/* @__PURE__ */ jsx("span", { className: s2.dropdownLabelName, children: name }),
|
|
5486
|
-
/* @__PURE__ */ jsx("span", { className: s2.dropdownLabelEmail, children: email })
|
|
5487
|
-
] }) }),
|
|
5488
|
-
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
5489
|
-
actions.map((action) => /* @__PURE__ */ jsxs(
|
|
5490
|
-
DropdownMenuItem,
|
|
5491
|
-
{
|
|
5492
|
-
variant: action.variant === "destructive" ? "destructive" : "default",
|
|
5493
|
-
onClick: () => onAction?.(action.id),
|
|
5494
|
-
className: s2.dropdownItem,
|
|
5495
|
-
children: [
|
|
5496
|
-
action.icon && /* @__PURE__ */ jsx("span", { className: s2.dropdownItemIcon, children: action.icon }),
|
|
5497
|
-
/* @__PURE__ */ jsx("span", { children: action.label })
|
|
5498
|
-
]
|
|
5499
|
-
},
|
|
5500
|
-
action.id
|
|
5501
|
-
))
|
|
5502
|
-
]
|
|
5503
|
-
}
|
|
5504
|
-
)
|
|
5505
|
-
] }) });
|
|
5506
|
-
}
|
|
5507
|
-
SingleMenuFooter.displayName = "SingleMenuFooter";
|
|
5508
|
-
function SingleMenuSidebar({
|
|
5509
|
-
logo,
|
|
5510
|
-
title: title2,
|
|
5511
|
-
module,
|
|
5512
|
-
modules,
|
|
5513
|
-
activeModuleId,
|
|
5514
|
-
defaultModuleId,
|
|
5515
|
-
onModuleChange,
|
|
5516
|
-
showSearch = true,
|
|
5517
|
-
searchPlaceholder,
|
|
5518
|
-
searchCommand,
|
|
5519
|
-
categories,
|
|
5520
|
-
activeItemId,
|
|
5521
|
-
onItemClick,
|
|
5522
|
-
user,
|
|
5523
|
-
defaultExpanded = true,
|
|
5524
|
-
expanded: controlledExpanded,
|
|
5525
|
-
onExpandedChange,
|
|
5526
|
-
showToggleIndicator = false,
|
|
5527
|
-
className,
|
|
5528
|
-
...props
|
|
5529
|
-
}) {
|
|
5530
|
-
const {
|
|
5531
|
-
expanded,
|
|
5532
|
-
isHoverExpand,
|
|
5533
|
-
toggle,
|
|
5534
|
-
onMouseEnter,
|
|
5535
|
-
onMouseLeave,
|
|
5536
|
-
openCategoryId,
|
|
5537
|
-
setOpenCategoryId
|
|
5538
|
-
} = useSingleMenuSidebarState(
|
|
5539
|
-
defaultExpanded,
|
|
5540
|
-
controlledExpanded,
|
|
5541
|
-
onExpandedChange
|
|
5542
|
-
);
|
|
5543
|
-
const hasModules = !!modules && modules.length > 0;
|
|
5544
|
-
const [internalModuleId, setInternalModuleId] = useState(
|
|
5545
|
-
defaultModuleId ?? modules?.[0]?.id
|
|
5546
|
-
);
|
|
5547
|
-
const currentModuleId = activeModuleId ?? internalModuleId;
|
|
5548
|
-
const activeModule = hasModules ? modules.find((m2) => m2.id === currentModuleId) ?? modules[0] : void 0;
|
|
5549
|
-
const handleModuleChange = (id) => {
|
|
5550
|
-
if (activeModuleId === void 0) setInternalModuleId(id);
|
|
5551
|
-
onModuleChange?.(id);
|
|
5552
|
-
};
|
|
5553
|
-
const moduleDisplay = hasModules ? {
|
|
5554
|
-
icon: activeModule.icon,
|
|
5555
|
-
title: activeModule.title,
|
|
5556
|
-
subtitle: activeModule.subtitle ?? "",
|
|
5557
|
-
options: modules.map((m2) => ({
|
|
5558
|
-
id: m2.id,
|
|
5559
|
-
label: m2.title,
|
|
5560
|
-
icon: m2.icon
|
|
5561
|
-
})),
|
|
5562
|
-
onModuleChange: handleModuleChange
|
|
5563
|
-
} : module;
|
|
5564
|
-
const effectiveCategories = hasModules ? activeModule.categories : categories ?? [];
|
|
5565
|
-
const [commandOpen, setCommandOpen] = useState(false);
|
|
5566
|
-
useEffect(() => {
|
|
5567
|
-
if (!showSearch) return;
|
|
5568
|
-
const onKey = (e2) => {
|
|
5569
|
-
if (e2.key.toLowerCase() === "k" && (e2.metaKey || e2.ctrlKey)) {
|
|
5570
|
-
e2.preventDefault();
|
|
5571
|
-
setCommandOpen((o2) => !o2);
|
|
5572
|
-
}
|
|
5573
|
-
};
|
|
5574
|
-
document.addEventListener("keydown", onKey);
|
|
5575
|
-
return () => document.removeEventListener("keydown", onKey);
|
|
5576
|
-
}, [showSearch]);
|
|
5577
|
-
const selectFromSearch = (id, parentId) => {
|
|
5578
|
-
onItemClick?.(id);
|
|
5579
|
-
setOpenCategoryId(parentId ?? null);
|
|
5580
|
-
};
|
|
5581
|
-
const resolvedOpenCategoryId = openCategoryId ?? effectiveCategories.find(
|
|
5582
|
-
(cat) => cat.items?.some((item) => item.id === activeItemId)
|
|
5583
|
-
)?.id ?? null;
|
|
5584
|
-
const contextValue = useMemo(
|
|
5585
|
-
() => ({
|
|
5586
|
-
expanded,
|
|
5587
|
-
isHoverExpand,
|
|
5588
|
-
toggle,
|
|
5589
|
-
openCategoryId: resolvedOpenCategoryId,
|
|
5590
|
-
setOpenCategoryId
|
|
5591
|
-
}),
|
|
5592
|
-
[
|
|
5593
|
-
expanded,
|
|
5594
|
-
isHoverExpand,
|
|
5595
|
-
toggle,
|
|
5596
|
-
resolvedOpenCategoryId,
|
|
5597
|
-
setOpenCategoryId
|
|
5598
|
-
]
|
|
5599
|
-
);
|
|
5600
|
-
return /* @__PURE__ */ jsxs(SingleMenuSidebarContext.Provider, { value: contextValue, children: [
|
|
5601
|
-
/* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs(
|
|
5602
|
-
"aside",
|
|
5603
|
-
{
|
|
5604
|
-
"aria-label": "Navegação lateral",
|
|
5605
|
-
className: cn(sidebarRoot({ expanded }), className),
|
|
5606
|
-
onMouseEnter,
|
|
5607
|
-
onMouseLeave,
|
|
5608
|
-
...props,
|
|
5609
|
-
children: [
|
|
5610
|
-
/* @__PURE__ */ jsx(
|
|
5611
|
-
SingleMenuHeader,
|
|
5612
|
-
{
|
|
5613
|
-
logo,
|
|
5614
|
-
title: title2,
|
|
5615
|
-
showToggleIndicator
|
|
5616
|
-
}
|
|
5617
|
-
),
|
|
5618
|
-
/* @__PURE__ */ jsx("div", { className: styles.divider }),
|
|
5619
|
-
expanded && (moduleDisplay || showSearch) && /* @__PURE__ */ jsxs("div", { className: cn(styles.sectionPadding, styles.textFadeIn), children: [
|
|
5620
|
-
moduleDisplay && /* @__PURE__ */ jsx(SingleMenuModuleSelector, { ...moduleDisplay }),
|
|
5621
|
-
showSearch && /* @__PURE__ */ jsx(
|
|
5622
|
-
SingleMenuSearch,
|
|
5623
|
-
{
|
|
5624
|
-
placeholder: searchPlaceholder,
|
|
5625
|
-
onOpen: () => setCommandOpen(true)
|
|
5626
|
-
}
|
|
5627
|
-
)
|
|
5628
|
-
] }),
|
|
5629
|
-
expanded && /* @__PURE__ */ jsx("div", { className: styles.divider }),
|
|
5630
|
-
/* @__PURE__ */ jsx(
|
|
5631
|
-
"nav",
|
|
5632
|
-
{
|
|
5633
|
-
className: cn(
|
|
5634
|
-
styles.navContainer,
|
|
5635
|
-
expanded ? styles.navContainerExpanded : styles.navContainerCollapsed
|
|
5636
|
-
),
|
|
5637
|
-
children: /* @__PURE__ */ jsx("div", { className: styles.navList, children: effectiveCategories.map((cat) => /* @__PURE__ */ jsx(
|
|
5638
|
-
SingleMenuCategory,
|
|
5639
|
-
{
|
|
5640
|
-
...cat,
|
|
5641
|
-
activeItemId,
|
|
5642
|
-
onItemClick
|
|
5643
|
-
},
|
|
5644
|
-
cat.id
|
|
5645
|
-
)) })
|
|
5646
|
-
}
|
|
5647
|
-
),
|
|
5648
|
-
/* @__PURE__ */ jsx(SingleMenuFooter, { ...user })
|
|
5649
|
-
]
|
|
5650
|
-
}
|
|
5651
|
-
) }),
|
|
5652
|
-
showSearch && /* @__PURE__ */ jsx(
|
|
5653
|
-
SingleMenuCommand,
|
|
5654
|
-
{
|
|
5655
|
-
open: commandOpen,
|
|
5656
|
-
onOpenChange: setCommandOpen,
|
|
5657
|
-
categories: effectiveCategories,
|
|
5658
|
-
placeholder: searchPlaceholder,
|
|
5659
|
-
onSelect: selectFromSearch,
|
|
5660
|
-
custom: searchCommand
|
|
5661
|
-
}
|
|
5662
|
-
)
|
|
5663
|
-
] });
|
|
5664
|
-
}
|
|
5665
|
-
SingleMenuSidebar.displayName = "SingleMenuSidebar";
|
|
5666
4974
|
const spinnerStyles = tv({
|
|
5667
4975
|
base: ["inline-block shrink-0", "animate-spin motion-reduce:animate-none"],
|
|
5668
4976
|
variants: {
|
|
@@ -5914,16 +5222,16 @@ function rotationLambda(deltaLambda) {
|
|
|
5914
5222
|
function rotationPhiGamma(deltaPhi, deltaGamma) {
|
|
5915
5223
|
var cosDeltaPhi = cos(deltaPhi), sinDeltaPhi = sin(deltaPhi), cosDeltaGamma = cos(deltaGamma), sinDeltaGamma = sin(deltaGamma);
|
|
5916
5224
|
function rotation2(lambda, phi) {
|
|
5917
|
-
var cosPhi = cos(phi), x2 = cos(lambda) * cosPhi, y2 = sin(lambda) * cosPhi,
|
|
5225
|
+
var cosPhi = cos(phi), x2 = cos(lambda) * cosPhi, y2 = sin(lambda) * cosPhi, z3 = sin(phi), k2 = z3 * cosDeltaPhi + x2 * sinDeltaPhi;
|
|
5918
5226
|
return [
|
|
5919
|
-
atan2(y2 * cosDeltaGamma - k2 * sinDeltaGamma, x2 * cosDeltaPhi -
|
|
5227
|
+
atan2(y2 * cosDeltaGamma - k2 * sinDeltaGamma, x2 * cosDeltaPhi - z3 * sinDeltaPhi),
|
|
5920
5228
|
asin(k2 * cosDeltaGamma + y2 * sinDeltaGamma)
|
|
5921
5229
|
];
|
|
5922
5230
|
}
|
|
5923
5231
|
rotation2.invert = function(lambda, phi) {
|
|
5924
|
-
var cosPhi = cos(phi), x2 = cos(lambda) * cosPhi, y2 = sin(lambda) * cosPhi,
|
|
5232
|
+
var cosPhi = cos(phi), x2 = cos(lambda) * cosPhi, y2 = sin(lambda) * cosPhi, z3 = sin(phi), k2 = z3 * cosDeltaGamma - y2 * sinDeltaGamma;
|
|
5925
5233
|
return [
|
|
5926
|
-
atan2(y2 * cosDeltaGamma +
|
|
5234
|
+
atan2(y2 * cosDeltaGamma + z3 * sinDeltaGamma, x2 * cosDeltaPhi + k2 * sinDeltaPhi),
|
|
5927
5235
|
asin(k2 * cosDeltaPhi - x2 * sinDeltaPhi)
|
|
5928
5236
|
];
|
|
5929
5237
|
};
|
|
@@ -5952,8 +5260,8 @@ function circleStream(stream, radius, delta, direction, t0, t1) {
|
|
|
5952
5260
|
t1 = circleRadius(cosRadius, t1);
|
|
5953
5261
|
if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;
|
|
5954
5262
|
}
|
|
5955
|
-
for (var point,
|
|
5956
|
-
point = spherical([cosRadius, -sinRadius * cos(
|
|
5263
|
+
for (var point, t3 = t0; direction > 0 ? t3 > t1 : t3 < t1; t3 -= step) {
|
|
5264
|
+
point = spherical([cosRadius, -sinRadius * cos(t3), -sinRadius * sin(t3)]);
|
|
5957
5265
|
stream.point(point[0], point[1]);
|
|
5958
5266
|
}
|
|
5959
5267
|
}
|
|
@@ -6294,19 +5602,19 @@ function clipCircle(radius) {
|
|
|
6294
5602
|
}
|
|
6295
5603
|
point0 = point2;
|
|
6296
5604
|
} else if (notHemisphere && point0 && smallRadius ^ v3) {
|
|
6297
|
-
var
|
|
6298
|
-
if (!(c3 & c0) && (
|
|
5605
|
+
var t3;
|
|
5606
|
+
if (!(c3 & c0) && (t3 = intersect(point1, point0, true))) {
|
|
6299
5607
|
clean = 0;
|
|
6300
5608
|
if (smallRadius) {
|
|
6301
5609
|
stream.lineStart();
|
|
6302
|
-
stream.point(
|
|
6303
|
-
stream.point(
|
|
5610
|
+
stream.point(t3[0][0], t3[0][1]);
|
|
5611
|
+
stream.point(t3[1][0], t3[1][1]);
|
|
6304
5612
|
stream.lineEnd();
|
|
6305
5613
|
} else {
|
|
6306
|
-
stream.point(
|
|
5614
|
+
stream.point(t3[1][0], t3[1][1]);
|
|
6307
5615
|
stream.lineEnd();
|
|
6308
5616
|
stream.lineStart();
|
|
6309
|
-
stream.point(
|
|
5617
|
+
stream.point(t3[0][0], t3[0][1], 3);
|
|
6310
5618
|
}
|
|
6311
5619
|
}
|
|
6312
5620
|
}
|
|
@@ -6332,16 +5640,16 @@ function clipCircle(radius) {
|
|
|
6332
5640
|
if (!determinant) return !two && a11;
|
|
6333
5641
|
var c1 = cr * n2n2 / determinant, c22 = -cr * n1n2 / determinant, n1xn2 = cartesianCross(n1, n2), A3 = cartesianScale(n1, c1), B3 = cartesianScale(n2, c22);
|
|
6334
5642
|
cartesianAddInPlace(A3, B3);
|
|
6335
|
-
var u3 = n1xn2, w3 = cartesianDot(A3, u3), uu = cartesianDot(u3, u3),
|
|
6336
|
-
if (
|
|
6337
|
-
var t3 = sqrt(
|
|
5643
|
+
var u3 = n1xn2, w3 = cartesianDot(A3, u3), uu = cartesianDot(u3, u3), t22 = w3 * w3 - uu * (cartesianDot(A3, A3) - 1);
|
|
5644
|
+
if (t22 < 0) return;
|
|
5645
|
+
var t3 = sqrt(t22), q2 = cartesianScale(u3, (-w3 - t3) / uu);
|
|
6338
5646
|
cartesianAddInPlace(q2, A3);
|
|
6339
5647
|
q2 = spherical(q2);
|
|
6340
5648
|
if (!two) return q2;
|
|
6341
|
-
var lambda0 = a11[0], lambda1 = b4[0], phi0 = a11[1], phi1 = b4[1],
|
|
6342
|
-
if (lambda1 < lambda0)
|
|
5649
|
+
var lambda0 = a11[0], lambda1 = b4[0], phi0 = a11[1], phi1 = b4[1], z3;
|
|
5650
|
+
if (lambda1 < lambda0) z3 = lambda0, lambda0 = lambda1, lambda1 = z3;
|
|
6343
5651
|
var delta2 = lambda1 - lambda0, polar = abs(delta2 - pi) < epsilon, meridian = polar || delta2 < epsilon;
|
|
6344
|
-
if (!polar && phi1 < phi0)
|
|
5652
|
+
if (!polar && phi1 < phi0) z3 = phi0, phi0 = phi1, phi1 = z3;
|
|
6345
5653
|
if (meridian ? polar ? phi0 + phi1 > 0 ^ q2[1] < (abs(q2[0] - lambda0) < epsilon ? phi0 : phi1) : phi0 <= q2[1] && q2[1] <= phi1 : delta2 > pi ^ (lambda0 <= q2[0] && q2[0] <= lambda1)) {
|
|
6346
5654
|
var q1 = cartesianScale(u3, (-w3 + t3) / uu);
|
|
6347
5655
|
cartesianAddInPlace(q1, A3);
|
|
@@ -6410,11 +5718,11 @@ function clipRectangle(x02, y02, x12, y12) {
|
|
|
6410
5718
|
return x02 <= x2 && x2 <= x12 && y02 <= y2 && y2 <= y12;
|
|
6411
5719
|
}
|
|
6412
5720
|
function interpolate(from, to, direction, stream) {
|
|
6413
|
-
var a11 = 0,
|
|
6414
|
-
if (from == null || (a11 = corner(from, direction)) !== (
|
|
5721
|
+
var a11 = 0, a12 = 0;
|
|
5722
|
+
if (from == null || (a11 = corner(from, direction)) !== (a12 = corner(to, direction)) || comparePoint(from, to) < 0 ^ direction > 0) {
|
|
6415
5723
|
do
|
|
6416
5724
|
stream.point(a11 === 0 || a11 === 3 ? x02 : x12, a11 > 1 ? y12 : y02);
|
|
6417
|
-
while ((a11 = (a11 + direction + 4) % 4) !==
|
|
5725
|
+
while ((a11 = (a11 + direction + 4) % 4) !== a12);
|
|
6418
5726
|
} else {
|
|
6419
5727
|
stream.point(to[0], to[1]);
|
|
6420
5728
|
}
|
|
@@ -6444,12 +5752,12 @@ function clipRectangle(x02, y02, x12, y12) {
|
|
|
6444
5752
|
function polygonInside() {
|
|
6445
5753
|
var winding = 0;
|
|
6446
5754
|
for (var i3 = 0, n2 = polygon.length; i3 < n2; ++i3) {
|
|
6447
|
-
for (var ring2 = polygon[i3], j2 = 1, m2 = ring2.length, point2 = ring2[0], a02,
|
|
6448
|
-
a02 = b0,
|
|
6449
|
-
if (
|
|
6450
|
-
if (b1 > y12 && (b0 - a02) * (y12 -
|
|
5755
|
+
for (var ring2 = polygon[i3], j2 = 1, m2 = ring2.length, point2 = ring2[0], a02, a12, b0 = point2[0], b1 = point2[1]; j2 < m2; ++j2) {
|
|
5756
|
+
a02 = b0, a12 = b1, point2 = ring2[j2], b0 = point2[0], b1 = point2[1];
|
|
5757
|
+
if (a12 <= y12) {
|
|
5758
|
+
if (b1 > y12 && (b0 - a02) * (y12 - a12) > (b1 - a12) * (x02 - a02)) ++winding;
|
|
6451
5759
|
} else {
|
|
6452
|
-
if (b1 <= y12 && (b0 - a02) * (y12 -
|
|
5760
|
+
if (b1 <= y12 && (b0 - a02) * (y12 - a12) < (b1 - a12) * (x02 - a02)) --winding;
|
|
6453
5761
|
}
|
|
6454
5762
|
}
|
|
6455
5763
|
}
|
|
@@ -6611,10 +5919,10 @@ function centroidPointFirstLine(x2, y2) {
|
|
|
6611
5919
|
centroidPoint(x0$1 = x2, y0$1 = y2);
|
|
6612
5920
|
}
|
|
6613
5921
|
function centroidPointLine(x2, y2) {
|
|
6614
|
-
var dx = x2 - x0$1, dy = y2 - y0$1,
|
|
6615
|
-
X1 +=
|
|
6616
|
-
Y1 +=
|
|
6617
|
-
Z1 +=
|
|
5922
|
+
var dx = x2 - x0$1, dy = y2 - y0$1, z3 = sqrt(dx * dx + dy * dy);
|
|
5923
|
+
X1 += z3 * (x0$1 + x2) / 2;
|
|
5924
|
+
Y1 += z3 * (y0$1 + y2) / 2;
|
|
5925
|
+
Z1 += z3;
|
|
6618
5926
|
centroidPoint(x0$1 = x2, y0$1 = y2);
|
|
6619
5927
|
}
|
|
6620
5928
|
function centroidLineEnd() {
|
|
@@ -6631,14 +5939,14 @@ function centroidPointFirstRing(x2, y2) {
|
|
|
6631
5939
|
centroidPoint(x00$1 = x0$1 = x2, y00$1 = y0$1 = y2);
|
|
6632
5940
|
}
|
|
6633
5941
|
function centroidPointRing(x2, y2) {
|
|
6634
|
-
var dx = x2 - x0$1, dy = y2 - y0$1,
|
|
6635
|
-
X1 +=
|
|
6636
|
-
Y1 +=
|
|
6637
|
-
Z1 +=
|
|
6638
|
-
|
|
6639
|
-
X22 +=
|
|
6640
|
-
Y2 +=
|
|
6641
|
-
Z2 +=
|
|
5942
|
+
var dx = x2 - x0$1, dy = y2 - y0$1, z3 = sqrt(dx * dx + dy * dy);
|
|
5943
|
+
X1 += z3 * (x0$1 + x2) / 2;
|
|
5944
|
+
Y1 += z3 * (y0$1 + y2) / 2;
|
|
5945
|
+
Z1 += z3;
|
|
5946
|
+
z3 = y0$1 * x2 - x0$1 * y2;
|
|
5947
|
+
X22 += z3 * (x0$1 + x2);
|
|
5948
|
+
Y2 += z3 * (y0$1 + y2);
|
|
5949
|
+
Z2 += z3 * 3;
|
|
6642
5950
|
centroidPoint(x0$1 = x2, y0$1 = y2);
|
|
6643
5951
|
}
|
|
6644
5952
|
function PathContext(context) {
|
|
@@ -6923,14 +6231,14 @@ function resampleNone(project) {
|
|
|
6923
6231
|
});
|
|
6924
6232
|
}
|
|
6925
6233
|
function resample$1(project, delta2) {
|
|
6926
|
-
function resampleLineTo(x02, y02, lambda0, a02, b0, c0, x12, y12, lambda1,
|
|
6234
|
+
function resampleLineTo(x02, y02, lambda0, a02, b0, c0, x12, y12, lambda1, a12, b1, c1, depth, stream) {
|
|
6927
6235
|
var dx = x12 - x02, dy = y12 - y02, d22 = dx * dx + dy * dy;
|
|
6928
6236
|
if (d22 > 4 * delta2 && depth--) {
|
|
6929
|
-
var a11 = a02 +
|
|
6930
|
-
if (dz * dz / d22 > delta2 || abs((dx * dx2 + dy * dy2) / d22 - 0.5) > 0.3 || a02 *
|
|
6237
|
+
var a11 = a02 + a12, b4 = b0 + b1, c3 = c0 + c1, m2 = sqrt(a11 * a11 + b4 * b4 + c3 * c3), phi2 = asin(c3 /= m2), lambda2 = abs(abs(c3) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b4, a11), p4 = project(lambda2, phi2), x2 = p4[0], y2 = p4[1], dx2 = x2 - x02, dy2 = y2 - y02, dz = dy * dx2 - dx * dy2;
|
|
6238
|
+
if (dz * dz / d22 > delta2 || abs((dx * dx2 + dy * dy2) / d22 - 0.5) > 0.3 || a02 * a12 + b0 * b1 + c0 * c1 < cosMinDistance) {
|
|
6931
6239
|
resampleLineTo(x02, y02, lambda0, a02, b0, c0, x2, y2, lambda2, a11 /= m2, b4 /= m2, c3, depth, stream);
|
|
6932
6240
|
stream.point(x2, y2);
|
|
6933
|
-
resampleLineTo(x2, y2, lambda2, a11, b4, c3, x12, y12, lambda1,
|
|
6241
|
+
resampleLineTo(x2, y2, lambda2, a11, b4, c3, x12, y12, lambda1, a12, b1, c1, depth, stream);
|
|
6934
6242
|
}
|
|
6935
6243
|
}
|
|
6936
6244
|
}
|
|
@@ -7128,8 +6436,8 @@ function mercatorProjection(project) {
|
|
|
7128
6436
|
return arguments.length ? (_2 == null ? x02 = y02 = x12 = y12 = null : (x02 = +_2[0][0], y02 = +_2[0][1], x12 = +_2[1][0], y12 = +_2[1][1]), reclip()) : x02 == null ? null : [[x02, y02], [x12, y12]];
|
|
7129
6437
|
};
|
|
7130
6438
|
function reclip() {
|
|
7131
|
-
var k2 = pi * scale(),
|
|
7132
|
-
return clipExtent(x02 == null ? [[
|
|
6439
|
+
var k2 = pi * scale(), t3 = m2(rotation(m2.rotate()).invert([0, 0]));
|
|
6440
|
+
return clipExtent(x02 == null ? [[t3[0] - k2, t3[1] - k2], [t3[0] + k2, t3[1] + k2]] : project === mercatorRaw ? [[Math.max(t3[0] - k2, x02), y02], [Math.min(t3[0] + k2, x12), y12]] : [[x02, Math.max(t3[1] - k2, y02)], [x12, Math.min(t3[1] + k2, y12)]]);
|
|
7133
6441
|
}
|
|
7134
6442
|
return reclip();
|
|
7135
6443
|
}
|
|
@@ -7149,8 +6457,8 @@ function transform(transform2) {
|
|
|
7149
6457
|
};
|
|
7150
6458
|
}
|
|
7151
6459
|
function reverse(array, n2) {
|
|
7152
|
-
var
|
|
7153
|
-
while (i3 < --j2)
|
|
6460
|
+
var t3, j2 = array.length, i3 = j2 - n2;
|
|
6461
|
+
while (i3 < --j2) t3 = array[i3], array[i3++] = array[j2], array[j2] = t3;
|
|
7154
6462
|
}
|
|
7155
6463
|
function topojsonFeature(topology, o2) {
|
|
7156
6464
|
if (typeof o2 === "string") o2 = topology.objects[o2];
|
|
@@ -7326,8 +6634,8 @@ const ChoroplethMap = forwardRef(
|
|
|
7326
6634
|
if (value === void 0 || !Number.isFinite(value)) return noDataVar;
|
|
7327
6635
|
if (colorScale) return colorScale(value, { min, max });
|
|
7328
6636
|
const range = max - min;
|
|
7329
|
-
const
|
|
7330
|
-
const clamped = Math.max(0, Math.min(1,
|
|
6637
|
+
const t3 = range > 0 ? (value - min) / range : 1;
|
|
6638
|
+
const clamped = Math.max(0, Math.min(1, t3));
|
|
7331
6639
|
const pct = 12 + clamped * 88;
|
|
7332
6640
|
return `color-mix(in srgb, ${scaleVar} ${pct}%, ${surfaceVar})`;
|
|
7333
6641
|
};
|
|
@@ -7753,8 +7061,8 @@ function useDataList({
|
|
|
7753
7061
|
onQueryChangeRef.current = onQueryChange;
|
|
7754
7062
|
useEffect(() => {
|
|
7755
7063
|
if (mode !== "server") return;
|
|
7756
|
-
const
|
|
7757
|
-
return () => clearTimeout(
|
|
7064
|
+
const t3 = setTimeout(() => onQueryChangeRef.current?.(query), 250);
|
|
7065
|
+
return () => clearTimeout(t3);
|
|
7758
7066
|
}, [mode, query]);
|
|
7759
7067
|
const setSearch = useCallback((search) => {
|
|
7760
7068
|
setActiveViewId(null);
|
|
@@ -8474,7 +7782,7 @@ const STRIP_SONNER_BOX = {
|
|
|
8474
7782
|
function show(opts, status) {
|
|
8475
7783
|
const { duration, position, id, ...card } = opts;
|
|
8476
7784
|
return toast$1.custom(
|
|
8477
|
-
(
|
|
7785
|
+
(t3) => /* @__PURE__ */ jsx(ToastCard, { ...card, status, toastId: t3 }),
|
|
8478
7786
|
{ duration, position, id, classNames: STRIP_SONNER_BOX }
|
|
8479
7787
|
);
|
|
8480
7788
|
}
|
|
@@ -8560,14 +7868,14 @@ function useBrand(options) {
|
|
|
8560
7868
|
return { brand, brands, current, setBrand, toggle, isBrand };
|
|
8561
7869
|
}
|
|
8562
7870
|
export {
|
|
8563
|
-
|
|
7871
|
+
t as AddViewModal,
|
|
8564
7872
|
A as AlertModal,
|
|
8565
7873
|
A2 as AppShell,
|
|
8566
7874
|
Avatar,
|
|
8567
7875
|
BRANDS,
|
|
8568
7876
|
B2 as Badge,
|
|
8569
7877
|
B as BulkActionButton,
|
|
8570
|
-
|
|
7878
|
+
u as BulkActionsBar,
|
|
8571
7879
|
Button,
|
|
8572
7880
|
ButtonGroup,
|
|
8573
7881
|
CardCheckbox,
|
|
@@ -8583,38 +7891,38 @@ export {
|
|
|
8583
7891
|
ChoroplethMap,
|
|
8584
7892
|
ColorPicker,
|
|
8585
7893
|
C as ColsPanel,
|
|
8586
|
-
|
|
8587
|
-
|
|
7894
|
+
v as ColsPopover,
|
|
7895
|
+
w as Combobox,
|
|
8588
7896
|
ConversationListItem,
|
|
8589
7897
|
DEFAULT_COLOR_PRESETS,
|
|
8590
|
-
|
|
7898
|
+
x as DEFAULT_FILTER_OPERATORS,
|
|
8591
7899
|
DEFAULT_MESSAGE_VARIABLES,
|
|
8592
7900
|
DataList,
|
|
8593
7901
|
D as DataTable,
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
|
|
7902
|
+
y as DataTableActionsCell,
|
|
7903
|
+
z as DataTableEditCell,
|
|
7904
|
+
E as DataTableEmpty,
|
|
7905
|
+
G as DataTableFloatingBulkBar,
|
|
7906
|
+
H as DataTableLoading,
|
|
7907
|
+
I as DataTableNoResults,
|
|
7908
|
+
J as DataTableTotalizerRow,
|
|
8601
7909
|
DatePicker,
|
|
8602
7910
|
DateSeparatorChip,
|
|
8603
7911
|
EmptyState,
|
|
8604
|
-
|
|
7912
|
+
K as FLOATING_PANEL_SIZE_PX,
|
|
8605
7913
|
FileUploadField,
|
|
8606
|
-
|
|
7914
|
+
M as FilterPanel,
|
|
8607
7915
|
FilterPopover,
|
|
8608
7916
|
d as FloatingPanel,
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
7917
|
+
N as FloatingPanelField,
|
|
7918
|
+
O as FloatingPanelSection,
|
|
7919
|
+
Q as FooterTable,
|
|
7920
|
+
R as FooterTableSkeleton,
|
|
8613
7921
|
FormField,
|
|
8614
|
-
|
|
7922
|
+
S as FormFieldCheckbox,
|
|
8615
7923
|
F as FormFieldInput,
|
|
8616
7924
|
b as FormFieldSelect,
|
|
8617
|
-
|
|
7925
|
+
U as FormFieldSwitch,
|
|
8618
7926
|
c as FormFieldTextarea,
|
|
8619
7927
|
H2 as Header,
|
|
8620
7928
|
c2 as HeaderBreadcrumb,
|
|
@@ -8624,16 +7932,16 @@ export {
|
|
|
8624
7932
|
g as HeaderThemeSwitcher,
|
|
8625
7933
|
Icon,
|
|
8626
7934
|
Input,
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
|
|
7935
|
+
R2 as InputGroup,
|
|
7936
|
+
S3 as InputGroupAddon,
|
|
7937
|
+
T as InputGroupButton,
|
|
7938
|
+
U3 as InputGroupInput,
|
|
7939
|
+
V2 as InputGroupText,
|
|
7940
|
+
W2 as InputGroupTextarea,
|
|
7941
|
+
V as Kanban,
|
|
8634
7942
|
a10 as Kpi,
|
|
8635
7943
|
b3 as KpiDelta,
|
|
8636
|
-
|
|
7944
|
+
K3 as KpiGroup,
|
|
8637
7945
|
List,
|
|
8638
7946
|
ListItem,
|
|
8639
7947
|
MarkdownText,
|
|
@@ -8645,23 +7953,23 @@ export {
|
|
|
8645
7953
|
MessageVariablesPicker,
|
|
8646
7954
|
Modal,
|
|
8647
7955
|
MonthYearPicker,
|
|
8648
|
-
|
|
8649
|
-
|
|
7956
|
+
W as MoreMenu,
|
|
7957
|
+
z2 as MoreMenuCheckboxItem,
|
|
8650
7958
|
DropdownMenuItem as MoreMenuItem,
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
7959
|
+
H3 as MoreMenuLabel,
|
|
7960
|
+
J2 as MoreMenuRadioGroup,
|
|
7961
|
+
K2 as MoreMenuRadioItem,
|
|
8654
7962
|
DropdownMenuSeparator as MoreMenuSeparator,
|
|
8655
|
-
|
|
7963
|
+
P2 as PageHeader,
|
|
8656
7964
|
P as Panel,
|
|
8657
|
-
|
|
8658
|
-
|
|
7965
|
+
X as PanelBody,
|
|
7966
|
+
G2 as PanelCloseAction,
|
|
8659
7967
|
H4 as PanelContent,
|
|
8660
|
-
|
|
8661
|
-
|
|
7968
|
+
Y as PanelFooter,
|
|
7969
|
+
Z as PanelHeader,
|
|
8662
7970
|
F2 as PanelRoot,
|
|
8663
|
-
|
|
8664
|
-
|
|
7971
|
+
O2 as PanelTrigger,
|
|
7972
|
+
_ as SELECTION_COLUMN_WIDTH,
|
|
8665
7973
|
S2 as SidebarBrandIcon,
|
|
8666
7974
|
h as SidebarItem,
|
|
8667
7975
|
i as SidebarPanel,
|
|
@@ -8669,43 +7977,43 @@ export {
|
|
|
8669
7977
|
k as SidebarRail,
|
|
8670
7978
|
l as SidebarSection,
|
|
8671
7979
|
m as SidebarSubgroup,
|
|
8672
|
-
SingleMenuSidebar,
|
|
8673
|
-
|
|
8674
|
-
|
|
7980
|
+
n as SingleMenuSidebar,
|
|
7981
|
+
$ as SortPanel,
|
|
7982
|
+
a0 as SortPopover,
|
|
8675
7983
|
Spinner,
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
7984
|
+
a1 as TABLE_HEADER_HEIGHT,
|
|
7985
|
+
a2 as Table,
|
|
7986
|
+
a3 as TableBody,
|
|
7987
|
+
a4 as TableCardRow,
|
|
7988
|
+
a5 as TableCell,
|
|
7989
|
+
a6 as TableHead,
|
|
7990
|
+
a7 as TableHeadCell,
|
|
7991
|
+
a8 as TableRow,
|
|
8684
7992
|
TableToolbar,
|
|
8685
|
-
|
|
7993
|
+
a9 as TableToolbarViews,
|
|
8686
7994
|
ToastCard,
|
|
8687
7995
|
ToolbarApplied,
|
|
8688
|
-
|
|
7996
|
+
aa as ToolbarDivider,
|
|
8689
7997
|
ToolbarFilterControl,
|
|
8690
7998
|
ToolbarMobileDialog,
|
|
8691
7999
|
ToolbarMobileSection,
|
|
8692
8000
|
ToolbarMobileSheet,
|
|
8693
|
-
|
|
8001
|
+
ab as ToolbarSaveButton,
|
|
8694
8002
|
ToolbarSearch,
|
|
8695
|
-
|
|
8696
|
-
|
|
8003
|
+
ac as ToolbarSegmented,
|
|
8004
|
+
ad as ToolbarSettingsMenu,
|
|
8697
8005
|
ToolbarSimpleFilterDrawer,
|
|
8698
8006
|
ToolbarTabs,
|
|
8699
8007
|
ToolbarToolButton,
|
|
8700
8008
|
U2 as UserMenu,
|
|
8701
|
-
|
|
8009
|
+
ae as ViewsPopover,
|
|
8702
8010
|
actionColumn,
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8011
|
+
af as avatarVariants,
|
|
8012
|
+
aH as badgeVariants,
|
|
8013
|
+
a92 as buttonVariants,
|
|
8706
8014
|
cardCheckbox,
|
|
8707
|
-
|
|
8708
|
-
|
|
8015
|
+
o as chipCount,
|
|
8016
|
+
p2 as chipVariants,
|
|
8709
8017
|
colorPickerStyles,
|
|
8710
8018
|
columnTypeRegistry,
|
|
8711
8019
|
conversationListItemStyles,
|
|
@@ -8715,15 +8023,15 @@ export {
|
|
|
8715
8023
|
dateSeparatorChipStyles,
|
|
8716
8024
|
emailColumn,
|
|
8717
8025
|
emptyStateStyles,
|
|
8718
|
-
|
|
8026
|
+
ag as floatingPanelStyles,
|
|
8719
8027
|
iconStyles,
|
|
8720
8028
|
icons,
|
|
8721
|
-
|
|
8029
|
+
a82 as inputGroupVariants,
|
|
8722
8030
|
i2 as inputVariants,
|
|
8723
|
-
|
|
8031
|
+
q as isExternalHref,
|
|
8724
8032
|
isFilterEntryActive,
|
|
8725
|
-
|
|
8726
|
-
|
|
8033
|
+
r as isHashHref,
|
|
8034
|
+
s as isModifiedClick,
|
|
8727
8035
|
markdownTextStyles,
|
|
8728
8036
|
messageAckStyles,
|
|
8729
8037
|
messageBubbleStyles,
|
|
@@ -8731,23 +8039,23 @@ export {
|
|
|
8731
8039
|
messageVariablesPickerStyles,
|
|
8732
8040
|
numberColumn,
|
|
8733
8041
|
p3 as pageHeaderStyles,
|
|
8734
|
-
|
|
8042
|
+
ah as panelContainer,
|
|
8735
8043
|
phoneColumn,
|
|
8736
8044
|
p as presetView,
|
|
8737
|
-
|
|
8738
|
-
|
|
8045
|
+
ai as savedViewsMockService,
|
|
8046
|
+
t2 as shouldPreventNavigation,
|
|
8739
8047
|
statusColumn,
|
|
8740
8048
|
textColumn,
|
|
8741
8049
|
toast,
|
|
8742
8050
|
toastVariants,
|
|
8743
8051
|
useBrand,
|
|
8744
8052
|
useChart,
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8053
|
+
aj as useColumnResize,
|
|
8054
|
+
ak as useColumnWidths,
|
|
8055
|
+
v2 as useControllable,
|
|
8056
|
+
al as useDataTableContext,
|
|
8057
|
+
am as useFloatingPanelResize,
|
|
8058
|
+
w2 as useMediaQuery,
|
|
8751
8059
|
u2 as useTheme,
|
|
8752
8060
|
useToolbarFilterControl,
|
|
8753
8061
|
useToolbarFilters,
|