@snksergio/design-system 0.43.0 → 0.43.2

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.
@@ -2,7 +2,7 @@ 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 "./sheet-BgA2g6m4.mjs";
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-D1vQth7X.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";
@@ -69,51 +69,60 @@ function AlertModal({
69
69
  }
70
70
  onConfirm?.();
71
71
  };
72
- return /* @__PURE__ */ jsx(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(AlertDialogContent, { className, children: [
73
- !hideClose && /* @__PURE__ */ jsx(
74
- "button",
75
- {
76
- type: "button",
77
- onClick: () => onOpenChange(false),
78
- disabled: loading,
79
- "aria-label": "Fechar",
80
- className: "absolute top-pad-lg right-pad-lg z-10 grid place-items-center size-form-sm rounded-radius-md bg-transparent text-fg-muted opacity-55 transition-[background-color,color,opacity] outline-none hover:bg-bg-muted hover:text-fg-default hover:opacity-100 focus-visible:opacity-100 focus-visible:shadow-sh-ring disabled:pointer-events-none",
81
- children: /* @__PURE__ */ jsx(X, { className: "size-4" })
82
- }
83
- ),
84
- /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
85
- iconNode && /* @__PURE__ */ jsx("div", { className: alertModalIcon({ tone }), "aria-hidden": "true", children: iconNode }),
86
- /* @__PURE__ */ jsx(AlertDialogTitle, { children: title2 }),
87
- description && /* @__PURE__ */ jsx(AlertDialogDescription, { children: description })
88
- ] }),
89
- /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
90
- !hideCancel && /* @__PURE__ */ jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsx(
91
- Button,
92
- {
93
- type: "button",
94
- color: "secondary",
95
- variant: "outline",
96
- size: "md",
97
- fullWidth: true,
98
- disabled: loading,
99
- children: cancelLabel
100
- }
101
- ) }),
102
- /* @__PURE__ */ jsx(AlertDialogAction, { asChild: true, children: /* @__PURE__ */ jsx(
103
- Button,
104
- {
105
- type: "button",
106
- color: TONE_BUTTON_COLOR[tone],
107
- variant: "filled",
108
- size: "md",
109
- fullWidth: true,
110
- loading,
111
- onClick: handleConfirm,
112
- children: confirmLabel
113
- }
114
- ) })
115
- ] })
116
- ] }) });
72
+ return /* @__PURE__ */ jsx(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(
73
+ AlertDialogContent,
74
+ {
75
+ className,
76
+ onEscapeKeyDown: (e) => {
77
+ if (loading) e.preventDefault();
78
+ },
79
+ children: [
80
+ !hideClose && /* @__PURE__ */ jsx(
81
+ "button",
82
+ {
83
+ type: "button",
84
+ onClick: () => onOpenChange(false),
85
+ disabled: loading,
86
+ "aria-label": "Fechar",
87
+ className: "absolute top-pad-lg right-pad-lg z-10 grid place-items-center size-form-sm rounded-radius-md bg-transparent text-fg-muted opacity-55 transition-[background-color,color,opacity] outline-none hover:bg-bg-muted hover:text-fg-default hover:opacity-100 focus-visible:opacity-100 focus-visible:shadow-sh-ring disabled:pointer-events-none",
88
+ children: /* @__PURE__ */ jsx(X, { className: "size-4" })
89
+ }
90
+ ),
91
+ /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
92
+ iconNode && /* @__PURE__ */ jsx("div", { className: alertModalIcon({ tone }), "aria-hidden": "true", children: iconNode }),
93
+ /* @__PURE__ */ jsx(AlertDialogTitle, { children: title2 }),
94
+ description && /* @__PURE__ */ jsx(AlertDialogDescription, { children: description })
95
+ ] }),
96
+ /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
97
+ !hideCancel && /* @__PURE__ */ jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsx(
98
+ Button,
99
+ {
100
+ type: "button",
101
+ color: "secondary",
102
+ variant: "outline",
103
+ size: "md",
104
+ fullWidth: true,
105
+ disabled: loading,
106
+ children: cancelLabel
107
+ }
108
+ ) }),
109
+ /* @__PURE__ */ jsx(AlertDialogAction, { asChild: true, children: /* @__PURE__ */ jsx(
110
+ Button,
111
+ {
112
+ type: "button",
113
+ color: TONE_BUTTON_COLOR[tone],
114
+ variant: "filled",
115
+ size: "md",
116
+ fullWidth: true,
117
+ loading,
118
+ onClick: handleConfirm,
119
+ children: confirmLabel
120
+ }
121
+ ) })
122
+ ] })
123
+ ]
124
+ }
125
+ ) });
117
126
  }
118
127
  function hexToRgb(hex) {
119
128
  if (typeof hex !== "string") return null;
@@ -3149,6 +3158,10 @@ function TableToolbarViews({
3149
3158
  []
3150
3159
  );
3151
3160
  const [tabViewIds, setTabViewIds] = useState(initialIds);
3161
+ useRef(null);
3162
+ useEffect(() => {
3163
+ return;
3164
+ }, [views, maxCustomTabs, maxTabs, myOwnerKey]);
3152
3165
  const prevIdsRef = useRef(views.map((v) => v.id));
3153
3166
  useEffect(() => {
3154
3167
  const currentIds = views.map((v) => v.id);
@@ -13021,4 +13034,4 @@ export {
13021
13034
  DataTableActionsCell as y,
13022
13035
  DataTableEditCell as z
13023
13036
  };
13024
- //# sourceMappingURL=panel-UwUWfDLf.mjs.map
13037
+ //# sourceMappingURL=panel-DFhNjXRJ.mjs.map