@snksergio/design-system 0.43.1 → 0.43.3

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;
@@ -4081,6 +4090,16 @@ const floatingPanelStyles = tv({
4081
4090
  "rounded-radius-xl border border-border-default outline-float shadow-sh-2xl",
4082
4091
  // Desktop (md+) — gutter top/bottom 24px
4083
4092
  "md:top-pad-4xl md:bottom-pad-4xl",
4093
+ // …e o mesmo gutter de 24px como TETO de largura, simétrico (24+24=48).
4094
+ //
4095
+ // Sem isto o painel estoura a viewport com props DEFAULT: `side="right"` ancora a
4096
+ // 24px da borda e `resizableMaxWidth` default é 800 → 800+24 = 824px de necessidade.
4097
+ // Em qualquer janela entre 768 e 824 (≥md, então sem o sheet mobile) a borda esquerda
4098
+ // ia pra fora da tela. Mesmo caso com `size={n}` grande num monitor pequeno.
4099
+ //
4100
+ // O `min`/`max` do hook de resize é em PIXEL e cego à viewport — quem clampa é isto.
4101
+ // Não regride nada: `max-width` só age quando a largura já estouraria.
4102
+ "md:max-w-[calc(100vw-48px)]",
4084
4103
  // Mobile (max-md) — sheet bottom-up colado nas bordas do device:
4085
4104
  // flush nas laterais + bottom, só top arredondado, sem outline/shadow, cap 92vh
4086
4105
  "max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:!w-auto",
@@ -13025,4 +13044,4 @@ export {
13025
13044
  DataTableActionsCell as y,
13026
13045
  DataTableEditCell as z
13027
13046
  };
13028
- //# sourceMappingURL=panel-BhXMif_f.mjs.map
13047
+ //# sourceMappingURL=panel-CCPe1H70.mjs.map