@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.
@@ -3,7 +3,7 @@ var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  const jsxRuntime = require("react/jsx-runtime");
6
- const sheet = require("./sheet-B68Q4-Hn.cjs");
6
+ const sheet = require("./sheet-j-d_UX7R.cjs");
7
7
  const React = require("react");
8
8
  const core = require("@dnd-kit/core");
9
9
  const sortable = require("@dnd-kit/sortable");
@@ -87,51 +87,60 @@ function AlertModal({
87
87
  }
88
88
  onConfirm?.();
89
89
  };
90
- return /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(sheet.AlertDialogContent, { className, children: [
91
- !hideClose && /* @__PURE__ */ jsxRuntime.jsx(
92
- "button",
93
- {
94
- type: "button",
95
- onClick: () => onOpenChange(false),
96
- disabled: loading,
97
- "aria-label": "Fechar",
98
- 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",
99
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" })
100
- }
101
- ),
102
- /* @__PURE__ */ jsxRuntime.jsxs(sheet.AlertDialogHeader, { children: [
103
- iconNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: alertModalIcon({ tone }), "aria-hidden": "true", children: iconNode }),
104
- /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogTitle, { children: title2 }),
105
- description && /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogDescription, { children: description })
106
- ] }),
107
- /* @__PURE__ */ jsxRuntime.jsxs(sheet.AlertDialogFooter, { children: [
108
- !hideCancel && /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
109
- avatar.Button,
110
- {
111
- type: "button",
112
- color: "secondary",
113
- variant: "outline",
114
- size: "md",
115
- fullWidth: true,
116
- disabled: loading,
117
- children: cancelLabel
118
- }
119
- ) }),
120
- /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogAction, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
121
- avatar.Button,
122
- {
123
- type: "button",
124
- color: TONE_BUTTON_COLOR[tone],
125
- variant: "filled",
126
- size: "md",
127
- fullWidth: true,
128
- loading,
129
- onClick: handleConfirm,
130
- children: confirmLabel
131
- }
132
- ) })
133
- ] })
134
- ] }) });
90
+ return /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(
91
+ sheet.AlertDialogContent,
92
+ {
93
+ className,
94
+ onEscapeKeyDown: (e) => {
95
+ if (loading) e.preventDefault();
96
+ },
97
+ children: [
98
+ !hideClose && /* @__PURE__ */ jsxRuntime.jsx(
99
+ "button",
100
+ {
101
+ type: "button",
102
+ onClick: () => onOpenChange(false),
103
+ disabled: loading,
104
+ "aria-label": "Fechar",
105
+ 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",
106
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" })
107
+ }
108
+ ),
109
+ /* @__PURE__ */ jsxRuntime.jsxs(sheet.AlertDialogHeader, { children: [
110
+ iconNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: alertModalIcon({ tone }), "aria-hidden": "true", children: iconNode }),
111
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogTitle, { children: title2 }),
112
+ description && /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogDescription, { children: description })
113
+ ] }),
114
+ /* @__PURE__ */ jsxRuntime.jsxs(sheet.AlertDialogFooter, { children: [
115
+ !hideCancel && /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
116
+ avatar.Button,
117
+ {
118
+ type: "button",
119
+ color: "secondary",
120
+ variant: "outline",
121
+ size: "md",
122
+ fullWidth: true,
123
+ disabled: loading,
124
+ children: cancelLabel
125
+ }
126
+ ) }),
127
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogAction, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
128
+ avatar.Button,
129
+ {
130
+ type: "button",
131
+ color: TONE_BUTTON_COLOR[tone],
132
+ variant: "filled",
133
+ size: "md",
134
+ fullWidth: true,
135
+ loading,
136
+ onClick: handleConfirm,
137
+ children: confirmLabel
138
+ }
139
+ ) })
140
+ ] })
141
+ ]
142
+ }
143
+ ) });
135
144
  }
136
145
  function hexToRgb(hex) {
137
146
  if (typeof hex !== "string") return null;
@@ -4099,6 +4108,16 @@ const floatingPanelStyles = avatar.tv({
4099
4108
  "rounded-radius-xl border border-border-default outline-float shadow-sh-2xl",
4100
4109
  // Desktop (md+) — gutter top/bottom 24px
4101
4110
  "md:top-pad-4xl md:bottom-pad-4xl",
4111
+ // …e o mesmo gutter de 24px como TETO de largura, simétrico (24+24=48).
4112
+ //
4113
+ // Sem isto o painel estoura a viewport com props DEFAULT: `side="right"` ancora a
4114
+ // 24px da borda e `resizableMaxWidth` default é 800 → 800+24 = 824px de necessidade.
4115
+ // Em qualquer janela entre 768 e 824 (≥md, então sem o sheet mobile) a borda esquerda
4116
+ // ia pra fora da tela. Mesmo caso com `size={n}` grande num monitor pequeno.
4117
+ //
4118
+ // O `min`/`max` do hook de resize é em PIXEL e cego à viewport — quem clampa é isto.
4119
+ // Não regride nada: `max-width` só age quando a largura já estouraria.
4120
+ "md:max-w-[calc(100vw-48px)]",
4102
4121
  // Mobile (max-md) — sheet bottom-up colado nas bordas do device:
4103
4122
  // flush nas laterais + bottom, só top arredondado, sem outline/shadow, cap 92vh
4104
4123
  "max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:!w-auto",
@@ -13041,4 +13060,4 @@ exports.useColumnResize = useColumnResize;
13041
13060
  exports.useColumnWidths = useColumnWidths;
13042
13061
  exports.useDataTableContext = useDataTableContext;
13043
13062
  exports.useFloatingPanelResize = useFloatingPanelResize;
13044
- //# sourceMappingURL=panel-D43Xnc-N.cjs.map
13063
+ //# sourceMappingURL=panel-CvfP8eP1.cjs.map