@snksergio/design-system 0.42.0 → 0.43.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/{kpi-delta-DaDwKOaP.mjs → kpi-delta-B_1xjDu_.mjs} +2 -2
- package/dist-lib/chunks/{kpi-delta-DaDwKOaP.mjs.map → kpi-delta-B_1xjDu_.mjs.map} +1 -1
- package/dist-lib/chunks/{kpi-delta-DAfakvFp.cjs → kpi-delta-CXGg2nBx.cjs} +2 -2
- package/dist-lib/chunks/{kpi-delta-DAfakvFp.cjs.map → kpi-delta-CXGg2nBx.cjs.map} +1 -1
- package/dist-lib/chunks/{panel-INPypAHe.cjs → panel-C3fekbdr.cjs} +118 -97
- package/dist-lib/chunks/panel-C3fekbdr.cjs.map +1 -0
- package/dist-lib/chunks/{panel-BI52RBEn.mjs → panel-UwUWfDLf.mjs} +35 -14
- package/dist-lib/chunks/panel-UwUWfDLf.mjs.map +1 -0
- package/dist-lib/chunks/{textarea-K20CL_gF.cjs → sheet-B68Q4-Hn.cjs} +206 -206
- package/dist-lib/chunks/sheet-B68Q4-Hn.cjs.map +1 -0
- package/dist-lib/chunks/{textarea-BPRIHZVd.mjs → sheet-BgA2g6m4.mjs} +206 -206
- package/dist-lib/chunks/sheet-BgA2g6m4.mjs.map +1 -0
- package/dist-lib/chunks/{useTheme-3iZAognE.cjs → useTheme-C9Y6vxTf.cjs} +103 -52
- package/dist-lib/chunks/useTheme-C9Y6vxTf.cjs.map +1 -0
- package/dist-lib/chunks/{useTheme-B3ZakPqk.mjs → useTheme-DCmzLBUR.mjs} +103 -52
- package/dist-lib/chunks/{useTheme-3iZAognE.cjs.map → useTheme-DCmzLBUR.mjs.map} +1 -1
- package/dist-lib/index.cjs +17 -17
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.mjs +11 -11
- package/dist-lib/index.mjs.map +1 -1
- package/dist-lib/preview/chat.cjs +1 -1
- package/dist-lib/preview/chat.mjs +1 -1
- package/dist-lib/preview/clientes.cjs +8 -14
- package/dist-lib/preview/clientes.cjs.map +1 -1
- package/dist-lib/preview/clientes.mjs +8 -14
- package/dist-lib/preview/clientes.mjs.map +1 -1
- package/dist-lib/preview/dashboard.cjs +2 -2
- package/dist-lib/preview/dashboard.mjs +2 -2
- package/dist-lib/shadcn.cjs +50 -50
- package/dist-lib/shadcn.mjs +1 -1
- package/dist-lib/src/components/ui/ColorPicker/color-picker.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/column-types/definitions/date-column-type.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/column-types/definitions/datetime-column-type.d.ts.map +1 -1
- package/dist-lib/src/components/ui/DataTable/utils/calculate-column-widths.d.ts.map +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.styles.d.ts +82 -3
- package/dist-lib/src/components/ui/SingleMenuSidebar/single-menu-sidebar.styles.d.ts.map +1 -1
- package/dist-lib/src/preview/pages/ChatV2/components/FiltersColumn/filters-column.styles.d.ts +3 -3
- package/dist-lib/src/preview/pages/ClientesShowcase/ClientesShowcase.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist-lib/chunks/panel-BI52RBEn.mjs.map +0 -1
- package/dist-lib/chunks/panel-INPypAHe.cjs.map +0 -1
- package/dist-lib/chunks/textarea-BPRIHZVd.mjs.map +0 -1
- package/dist-lib/chunks/textarea-K20CL_gF.cjs.map +0 -1
- package/dist-lib/chunks/useTheme-B3ZakPqk.mjs.map +0 -1
|
@@ -2,14 +2,14 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
5
|
-
import { A as AlertDialog, c as AlertDialogContent, f as AlertDialogHeader, i as AlertDialogTitle, d as AlertDialogDescription, e as AlertDialogFooter, b as AlertDialogCancel, a as AlertDialogAction, T as Textarea, S as Select, D as SelectTrigger, E as SelectValue, u as SelectContent, w as SelectItem, l as Checkbox, Q as Switch, C as Calendar$1, R as getPaginationRange, P as Pagination, o as PaginationFirst, t as PaginationPrevious, m as PaginationContent, p as PaginationItem, n as PaginationEllipsis, r as PaginationLink, s as PaginationNext, q as PaginationLast, N as SheetTitle, I as SheetDescription, G as SheetClose, F as Sheet, O as SheetTrigger, L as SheetOverlay } from "./
|
|
5
|
+
import { A as AlertDialog, c as AlertDialogContent, f as AlertDialogHeader, i as AlertDialogTitle, d as AlertDialogDescription, e as AlertDialogFooter, b as AlertDialogCancel, a as AlertDialogAction, T as Textarea, S as Select, D as SelectTrigger, E as SelectValue, u as SelectContent, w as SelectItem, l as Checkbox, Q as Switch, C as Calendar$1, R as getPaginationRange, P as Pagination, o as PaginationFirst, t as PaginationPrevious, m as PaginationContent, p as PaginationItem, n as PaginationEllipsis, r as PaginationLink, s as PaginationNext, q as PaginationLast, N as SheetTitle, I as SheetDescription, G as SheetClose, F as Sheet, O as SheetTrigger, L as SheetOverlay } from "./sheet-BgA2g6m4.mjs";
|
|
6
6
|
import { forwardRef, createContext, useContext, useId, useState, useRef, useCallback, useEffect, useMemo, Fragment as Fragment$1, useImperativeHandle, memo } from "react";
|
|
7
7
|
import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCorners, DragOverlay, useDroppable, useDraggable, closestCenter } from "@dnd-kit/core";
|
|
8
8
|
import { useSortable, sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy, arrayMove } from "@dnd-kit/sortable";
|
|
9
9
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
10
10
|
import { t as tv, B as Button, c as cn, R as InputGroup, U as InputGroupInput, S as InputGroupAddon, V as InputGroupText, X as Popover, $ as PopoverTrigger, _ as PopoverContent, f as Command, j as CommandInput, l as CommandList, h as CommandEmpty, i as CommandGroup, k as CommandItem, y as DropdownMenu, Q as DropdownMenuTrigger, E as DropdownMenuContent, H as DropdownMenuLabel, L as DropdownMenuSeparator, G as DropdownMenuItem, D as Dialog, p as DialogContent, o as DialogClose, w as DialogTitle, q as DialogDescription, Y as PopoverAnchor } from "./avatar-DFWEwBKu.mjs";
|
|
11
11
|
import { X, CheckCircle2, AlertCircle, AlertTriangle, Info, ChevronDown, Check, ArrowUp, ArrowDown, ArrowUpDown, Search, CircleX, MoreHorizontal, Filter, ChevronLeft, GripVertical, Pin, PinOff, Plus, Trash2, Eye, Users, ChevronRight, Columns, SlidersHorizontal, Minimize2, Maximize2, Type, Hash, Calendar, ToggleLeft, DollarSign, Percent, AtSign, Phone, Link, ExternalLink, User, Tag, Tags, CalendarClock, Inbox, SearchX, FilterX, PinIcon, EyeOff, Loader2, Copy, Rows3, LayoutGrid, Settings2, RefreshCw, Table as Table$1, FileText, List as List$1, Rows4, Rows2 } from "lucide-react";
|
|
12
|
-
import { C as Chip, w as useMediaQuery } from "./useTheme-
|
|
12
|
+
import { C as Chip, w as useMediaQuery } from "./useTheme-DCmzLBUR.mjs";
|
|
13
13
|
import { I as Input } from "./input-CfmzMYtd.mjs";
|
|
14
14
|
import { createPortal } from "react-dom";
|
|
15
15
|
import { Draggable, Droppable, DragDropContext } from "@hello-pangea/dnd";
|
|
@@ -4694,14 +4694,24 @@ const NumberColumnType = {
|
|
|
4694
4694
|
defaultSortable: true,
|
|
4695
4695
|
defaultIcon: Hash
|
|
4696
4696
|
};
|
|
4697
|
-
const
|
|
4697
|
+
const ptBrData = new Intl.DateTimeFormat("pt-BR", {
|
|
4698
|
+
day: "2-digit",
|
|
4699
|
+
month: "2-digit",
|
|
4700
|
+
year: "numeric"
|
|
4701
|
+
});
|
|
4702
|
+
const ptBrCompacto = new Intl.DateTimeFormat("pt-BR", {
|
|
4698
4703
|
day: "2-digit",
|
|
4699
4704
|
month: "short"
|
|
4700
4705
|
});
|
|
4706
|
+
function formatData(v) {
|
|
4707
|
+
const d = toDate(v);
|
|
4708
|
+
if (!d) return "";
|
|
4709
|
+
return ptBrData.format(d);
|
|
4710
|
+
}
|
|
4701
4711
|
function formatShort$1(v) {
|
|
4702
4712
|
const d = toDate(v);
|
|
4703
4713
|
if (!d) return "";
|
|
4704
|
-
return
|
|
4714
|
+
return ptBrCompacto.format(d).replace(".", "");
|
|
4705
4715
|
}
|
|
4706
4716
|
const DateColumnType = {
|
|
4707
4717
|
type: "date",
|
|
@@ -4827,8 +4837,16 @@ const DateColumnType = {
|
|
|
4827
4837
|
return null;
|
|
4828
4838
|
},
|
|
4829
4839
|
/* G.2 slots */
|
|
4830
|
-
|
|
4831
|
-
|
|
4840
|
+
// `column.valueFormatter` vence o formato do tipo — é o escape hatch pra quem quer
|
|
4841
|
+
// outro formato (mês escrito, ISO, relativo) sem escrever `render` inteiro.
|
|
4842
|
+
//
|
|
4843
|
+
// Isso é o que o próprio `CellRenderProps` já prometia: o campo `column` existe ali
|
|
4844
|
+
// com o comentário "campos auxiliares como valueFormatter", e o JSDoc de `formatValue`
|
|
4845
|
+
// diz "aplicado quando consumer não passa `column.valueFormatter`". Nenhum column-type
|
|
4846
|
+
// lia esse campo, então na prática `valueFormatter` num `type: "date"` mudava export,
|
|
4847
|
+
// totalizador e clipboard e **não mudava a célula** — a doc afirmava o contrário.
|
|
4848
|
+
renderCell: ({ value, column: column2 }) => /* @__PURE__ */ jsx("span", { className: "text-fg-muted tabular-nums", children: column2?.valueFormatter ? column2.valueFormatter(value) : formatData(value) }),
|
|
4849
|
+
formatValue: (v) => formatData(v),
|
|
4832
4850
|
defaultAlign: "left",
|
|
4833
4851
|
defaultWidth: 130,
|
|
4834
4852
|
defaultSortable: true,
|
|
@@ -5724,9 +5742,10 @@ const ptBrShort = new Intl.DateTimeFormat("pt-BR", {
|
|
|
5724
5742
|
day: "2-digit",
|
|
5725
5743
|
month: "short"
|
|
5726
5744
|
});
|
|
5727
|
-
const
|
|
5745
|
+
const ptBrDataHora = new Intl.DateTimeFormat("pt-BR", {
|
|
5728
5746
|
day: "2-digit",
|
|
5729
|
-
month: "
|
|
5747
|
+
month: "2-digit",
|
|
5748
|
+
year: "numeric",
|
|
5730
5749
|
hour: "2-digit",
|
|
5731
5750
|
minute: "2-digit"
|
|
5732
5751
|
});
|
|
@@ -5735,10 +5754,10 @@ function formatShort(v) {
|
|
|
5735
5754
|
if (!d) return "";
|
|
5736
5755
|
return ptBrShort.format(d).replace(".", "");
|
|
5737
5756
|
}
|
|
5738
|
-
function
|
|
5757
|
+
function formatDataHora(v) {
|
|
5739
5758
|
const d = toDate(v);
|
|
5740
5759
|
if (!d) return "";
|
|
5741
|
-
return
|
|
5760
|
+
return ptBrDataHora.format(d).replace(",", "");
|
|
5742
5761
|
}
|
|
5743
5762
|
const DatetimeColumnType = {
|
|
5744
5763
|
type: "datetime",
|
|
@@ -5851,8 +5870,9 @@ const DatetimeColumnType = {
|
|
|
5851
5870
|
if (operator === "lte") return cellDay <= filterDay;
|
|
5852
5871
|
return null;
|
|
5853
5872
|
},
|
|
5854
|
-
|
|
5855
|
-
|
|
5873
|
+
// `column.valueFormatter` vence o formato do tipo — mesmo escape hatch do `date`.
|
|
5874
|
+
renderCell: ({ value, column: column2 }) => /* @__PURE__ */ jsx("span", { className: "text-fg-muted tabular-nums", children: column2?.valueFormatter ? column2.valueFormatter(value) : formatDataHora(value) }),
|
|
5875
|
+
formatValue: (v) => formatDataHora(v),
|
|
5856
5876
|
defaultAlign: "left",
|
|
5857
5877
|
defaultWidth: 160,
|
|
5858
5878
|
defaultSortable: true,
|
|
@@ -8152,6 +8172,7 @@ function calculateColumnWidths(columns, rows, options) {
|
|
|
8152
8172
|
growable = stillGrowable;
|
|
8153
8173
|
if (consumedThisPass < 0.5) break;
|
|
8154
8174
|
}
|
|
8175
|
+
const larguraFixa = columns.filter(isFixed).reduce((soma, col) => soma + (widths[String(col.field)] ?? 0), 0);
|
|
8155
8176
|
let lastFlexField;
|
|
8156
8177
|
let roundedTotal = 0;
|
|
8157
8178
|
for (const col of targets) {
|
|
@@ -8162,7 +8183,7 @@ function calculateColumnWidths(columns, rows, options) {
|
|
|
8162
8183
|
if (!maxed) lastFlexField = f;
|
|
8163
8184
|
}
|
|
8164
8185
|
if (lastFlexField !== void 0) {
|
|
8165
|
-
const residue = Math.round(containerWidth) - roundedTotal;
|
|
8186
|
+
const residue = Math.round(containerWidth) - larguraFixa - roundedTotal;
|
|
8166
8187
|
if (residue !== 0) {
|
|
8167
8188
|
widths[lastFlexField] = Math.max(0, widths[lastFlexField] + residue);
|
|
8168
8189
|
}
|
|
@@ -13000,4 +13021,4 @@ export {
|
|
|
13000
13021
|
DataTableActionsCell as y,
|
|
13001
13022
|
DataTableEditCell as z
|
|
13002
13023
|
};
|
|
13003
|
-
//# sourceMappingURL=panel-
|
|
13024
|
+
//# sourceMappingURL=panel-UwUWfDLf.mjs.map
|