@snksergio/design-system 0.41.0 → 0.42.1

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.
Files changed (28) hide show
  1. package/dist-lib/chunks/{panel-DtU3KlKY.cjs → panel-BSyHW2J5.cjs} +120 -94
  2. package/dist-lib/chunks/panel-BSyHW2J5.cjs.map +1 -0
  3. package/dist-lib/chunks/{panel-Bje0kUTh.mjs → panel-CMRliQb2.mjs} +95 -69
  4. package/dist-lib/chunks/panel-CMRliQb2.mjs.map +1 -0
  5. package/dist-lib/chunks/{textarea-K20CL_gF.cjs → sheet-B68Q4-Hn.cjs} +206 -206
  6. package/dist-lib/chunks/sheet-B68Q4-Hn.cjs.map +1 -0
  7. package/dist-lib/chunks/{textarea-BPRIHZVd.mjs → sheet-BgA2g6m4.mjs} +206 -206
  8. package/dist-lib/chunks/sheet-BgA2g6m4.mjs.map +1 -0
  9. package/dist-lib/index.cjs +16 -16
  10. package/dist-lib/index.cjs.map +1 -1
  11. package/dist-lib/index.mjs +82 -82
  12. package/dist-lib/index.mjs.map +1 -1
  13. package/dist-lib/preview/clientes.cjs +2 -2
  14. package/dist-lib/preview/clientes.mjs +2 -2
  15. package/dist-lib/shadcn.cjs +50 -50
  16. package/dist-lib/shadcn.mjs +1 -1
  17. package/dist-lib/src/components/ui/ColorPicker/color-picker.d.ts.map +1 -1
  18. package/dist-lib/src/components/ui/DataTable/builders/column-builders.d.ts.map +1 -1
  19. package/dist-lib/src/components/ui/DataTable/parts/data-table-actions-cell.d.ts +7 -3
  20. package/dist-lib/src/components/ui/DataTable/parts/data-table-actions-cell.d.ts.map +1 -1
  21. package/dist-lib/src/components/ui/DataTable/utils/action-slots.d.ts +76 -0
  22. package/dist-lib/src/components/ui/DataTable/utils/action-slots.d.ts.map +1 -0
  23. package/dist-lib/src/components/ui/DataTable/utils/calculate-column-widths.d.ts.map +1 -1
  24. package/package.json +208 -207
  25. package/dist-lib/chunks/panel-Bje0kUTh.mjs.map +0 -1
  26. package/dist-lib/chunks/panel-DtU3KlKY.cjs.map +0 -1
  27. package/dist-lib/chunks/textarea-BPRIHZVd.mjs.map +0 -1
  28. package/dist-lib/chunks/textarea-K20CL_gF.cjs.map +0 -1
@@ -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 textarea = require("./textarea-K20CL_gF.cjs");
6
+ const sheet = require("./sheet-B68Q4-Hn.cjs");
7
7
  const React = require("react");
8
8
  const core = require("@dnd-kit/core");
9
9
  const sortable = require("@dnd-kit/sortable");
@@ -87,7 +87,7 @@ function AlertModal({
87
87
  }
88
88
  onConfirm?.();
89
89
  };
90
- return /* @__PURE__ */ jsxRuntime.jsx(textarea.AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(textarea.AlertDialogContent, { className, children: [
90
+ return /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(sheet.AlertDialogContent, { className, children: [
91
91
  !hideClose && /* @__PURE__ */ jsxRuntime.jsx(
92
92
  "button",
93
93
  {
@@ -99,13 +99,13 @@ function AlertModal({
99
99
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" })
100
100
  }
101
101
  ),
102
- /* @__PURE__ */ jsxRuntime.jsxs(textarea.AlertDialogHeader, { children: [
102
+ /* @__PURE__ */ jsxRuntime.jsxs(sheet.AlertDialogHeader, { children: [
103
103
  iconNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: alertModalIcon({ tone }), "aria-hidden": "true", children: iconNode }),
104
- /* @__PURE__ */ jsxRuntime.jsx(textarea.AlertDialogTitle, { children: title2 }),
105
- description && /* @__PURE__ */ jsxRuntime.jsx(textarea.AlertDialogDescription, { children: description })
104
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogTitle, { children: title2 }),
105
+ description && /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogDescription, { children: description })
106
106
  ] }),
107
- /* @__PURE__ */ jsxRuntime.jsxs(textarea.AlertDialogFooter, { children: [
108
- !hideCancel && /* @__PURE__ */ jsxRuntime.jsx(textarea.AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
107
+ /* @__PURE__ */ jsxRuntime.jsxs(sheet.AlertDialogFooter, { children: [
108
+ !hideCancel && /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
109
109
  avatar.Button,
110
110
  {
111
111
  type: "button",
@@ -117,7 +117,7 @@ function AlertModal({
117
117
  children: cancelLabel
118
118
  }
119
119
  ) }),
120
- /* @__PURE__ */ jsxRuntime.jsx(textarea.AlertDialogAction, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
120
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.AlertDialogAction, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
121
121
  avatar.Button,
122
122
  {
123
123
  type: "button",
@@ -497,7 +497,7 @@ const FormFieldTextarea = React.forwardRef(
497
497
  id,
498
498
  disabled: textareaProps.disabled,
499
499
  children: ({ id: fieldId, state: fieldState }) => /* @__PURE__ */ jsxRuntime.jsx(
500
- textarea.Textarea,
500
+ sheet.Textarea,
501
501
  {
502
502
  ref,
503
503
  id: fieldId,
@@ -542,7 +542,7 @@ function FormFieldSelect({
542
542
  id,
543
543
  disabled,
544
544
  children: ({ id: fieldId, state: fieldState }) => /* @__PURE__ */ jsxRuntime.jsxs(
545
- textarea.Select,
545
+ sheet.Select,
546
546
  {
547
547
  value,
548
548
  defaultValue,
@@ -550,16 +550,16 @@ function FormFieldSelect({
550
550
  disabled,
551
551
  children: [
552
552
  /* @__PURE__ */ jsxRuntime.jsx(
553
- textarea.SelectTrigger,
553
+ sheet.SelectTrigger,
554
554
  {
555
555
  id: fieldId,
556
556
  state: fieldState,
557
557
  className: triggerClassName,
558
- children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, { placeholder })
558
+ children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, { placeholder })
559
559
  }
560
560
  ),
561
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectContent, { className: contentClassName, children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
562
- textarea.SelectItem,
561
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectContent, { className: contentClassName, children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
562
+ sheet.SelectItem,
563
563
  {
564
564
  value: opt.value,
565
565
  disabled: opt.disabled,
@@ -604,7 +604,7 @@ const FormFieldCheckbox = React.forwardRef(
604
604
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: avatar.cn(formFieldRoot(), "gap-[5px]", className), children: [
605
605
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-gp-md", children: [
606
606
  /* @__PURE__ */ jsxRuntime.jsx(
607
- textarea.Checkbox,
607
+ sheet.Checkbox,
608
608
  {
609
609
  ref,
610
610
  id,
@@ -665,7 +665,7 @@ const FormFieldSwitch = React.forwardRef(
665
665
  message = successMessage;
666
666
  messageState = "success";
667
667
  }
668
- const switchEl = /* @__PURE__ */ jsxRuntime.jsx(textarea.Switch, { ref, id, disabled, ...switchProps });
668
+ const switchEl = /* @__PURE__ */ jsxRuntime.jsx(sheet.Switch, { ref, id, disabled, ...switchProps });
669
669
  const labelEl = label && /* @__PURE__ */ jsxRuntime.jsxs(
670
670
  "label",
671
671
  {
@@ -2474,7 +2474,7 @@ function ColsPanel({
2474
2474
  }
2475
2475
  ),
2476
2476
  /* @__PURE__ */ jsxRuntime.jsx(
2477
- textarea.Checkbox,
2477
+ sheet.Checkbox,
2478
2478
  {
2479
2479
  id: `col-vis-${col.key}`,
2480
2480
  checked,
@@ -3114,7 +3114,7 @@ function AddViewModal({ open, onClose, onSubmit }) {
3114
3114
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: toggleLabel(), children: "Tornar esta visão pública" }),
3115
3115
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: toggleDesc(), children: "Outros usuários da sua equipe poderão visualizar e usar esta visão" })
3116
3116
  ] }),
3117
- /* @__PURE__ */ jsxRuntime.jsx(textarea.Switch, { checked: isPublic, onCheckedChange: setIsPublic })
3117
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.Switch, { checked: isPublic, onCheckedChange: setIsPublic })
3118
3118
  ] })
3119
3119
  ] }),
3120
3120
  /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: foot(), children: [
@@ -3537,38 +3537,38 @@ function FilterRowEditor({
3537
3537
  }
3538
3538
  ) }),
3539
3539
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full sm:flex-[0.7_1_0%] sm:basis-0 min-w-0 sm:min-w-[80px]", children: /* @__PURE__ */ jsxRuntime.jsxs(
3540
- textarea.Select,
3540
+ sheet.Select,
3541
3541
  {
3542
3542
  value: effectiveOp,
3543
3543
  onValueChange: (v) => onChange({ ...filter, op: v }),
3544
3544
  children: [
3545
3545
  /* @__PURE__ */ jsxRuntime.jsx(
3546
- textarea.SelectTrigger,
3546
+ sheet.SelectTrigger,
3547
3547
  {
3548
3548
  className: avatar.cn(FIELD_BASE, "px-pad-xl gap-gp-md"),
3549
3549
  "aria-label": "Operador",
3550
- children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, {})
3550
+ children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, {})
3551
3551
  }
3552
3552
  ),
3553
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectContent, { children: operators.map((o) => /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: o.id, children: o.label }, o.id)) })
3553
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectContent, { children: operators.map((o) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: o.id, children: o.label }, o.id)) })
3554
3554
  ]
3555
3555
  }
3556
3556
  ) }),
3557
3557
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full sm:flex-[1.3_1_0%] sm:basis-0 min-w-0", children: customValueInput ? customValueInput : isSelect ? /* @__PURE__ */ jsxRuntime.jsxs(
3558
- textarea.Select,
3558
+ sheet.Select,
3559
3559
  {
3560
3560
  value: stringValue,
3561
3561
  onValueChange: (v) => onChange({ ...filter, value: v }),
3562
3562
  children: [
3563
3563
  /* @__PURE__ */ jsxRuntime.jsx(
3564
- textarea.SelectTrigger,
3564
+ sheet.SelectTrigger,
3565
3565
  {
3566
3566
  className: avatar.cn(FIELD_BASE, "px-pad-xl gap-gp-md"),
3567
3567
  "aria-label": "Valor",
3568
- children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, { placeholder: "Selecione…" })
3568
+ children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, { placeholder: "Selecione…" })
3569
3569
  }
3570
3570
  ),
3571
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectContent, { children: col.options?.map((o) => /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: o.value, children: o.label }, o.value)) })
3571
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectContent, { children: col.options?.map((o) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: o.value, children: o.label }, o.value)) })
3572
3572
  ]
3573
3573
  }
3574
3574
  ) : /* @__PURE__ */ jsxRuntime.jsx(
@@ -4754,7 +4754,7 @@ const DateColumnType = {
4754
4754
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "size-icon-xs text-fg-muted shrink-0" })
4755
4755
  ] }) }),
4756
4756
  /* @__PURE__ */ jsxRuntime.jsx(avatar.PopoverContent, { align: "start", className: "p-pad-md w-auto", children: isRange ? /* @__PURE__ */ jsxRuntime.jsx(
4757
- textarea.Calendar,
4757
+ sheet.Calendar,
4758
4758
  {
4759
4759
  mode: "range",
4760
4760
  selected: Array.isArray(value) ? { from: toDate(value[0]), to: toDate(value[1]) } : { from: void 0, to: void 0 },
@@ -4766,7 +4766,7 @@ const DateColumnType = {
4766
4766
  }
4767
4767
  }
4768
4768
  ) : /* @__PURE__ */ jsxRuntime.jsx(
4769
- textarea.Calendar,
4769
+ sheet.Calendar,
4770
4770
  {
4771
4771
  mode: "single",
4772
4772
  selected: toDate(value),
@@ -4784,7 +4784,7 @@ const DateColumnType = {
4784
4784
  to: toDate(value[1])
4785
4785
  };
4786
4786
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-pad-md", children: /* @__PURE__ */ jsxRuntime.jsx(
4787
- textarea.Calendar,
4787
+ sheet.Calendar,
4788
4788
  {
4789
4789
  mode: "range",
4790
4790
  selected: range,
@@ -4798,7 +4798,7 @@ const DateColumnType = {
4798
4798
  ) });
4799
4799
  }
4800
4800
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-pad-md", children: /* @__PURE__ */ jsxRuntime.jsx(
4801
- textarea.Calendar,
4801
+ sheet.Calendar,
4802
4802
  {
4803
4803
  mode: "single",
4804
4804
  selected: toDate(value),
@@ -4869,9 +4869,9 @@ const SelectColumnType = {
4869
4869
  if (operator === "isEmpty" || operator === "isNotEmpty") {
4870
4870
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-fg-muted text-body-sm pl-pad-md", children: "(sem valor)" });
4871
4871
  }
4872
- return /* @__PURE__ */ jsxRuntime.jsxs(textarea.Select, { value: toScalar(value), onValueChange: (v) => onChange(v), children: [
4873
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectTrigger, { className: FILTER_FIELD_SIZE, children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, { placeholder: "Selecionar..." }) }),
4874
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectContent, { children: options?.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: String(opt.value), children: opt.label }, String(opt.value))) })
4872
+ return /* @__PURE__ */ jsxRuntime.jsxs(sheet.Select, { value: toScalar(value), onValueChange: (v) => onChange(v), children: [
4873
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectTrigger, { className: FILTER_FIELD_SIZE, children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, { placeholder: "Selecionar..." }) }),
4874
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectContent, { children: options?.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: String(opt.value), children: opt.label }, String(opt.value))) })
4875
4875
  ] });
4876
4876
  },
4877
4877
  renderFastFilterInput: ({ value, onChange, options, onClose }) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -4932,7 +4932,7 @@ function MultiSelectDropdown({
4932
4932
  ),
4933
4933
  children: [
4934
4934
  /* @__PURE__ */ jsxRuntime.jsx(
4935
- textarea.Checkbox,
4935
+ sheet.Checkbox,
4936
4936
  {
4937
4937
  checked: isChecked,
4938
4938
  onCheckedChange: () => toggle(opt.value),
@@ -5029,15 +5029,15 @@ const BooleanColumnType = {
5029
5029
  type: "boolean",
5030
5030
  operators: [{ id: "equals", label: "é" }],
5031
5031
  renderFilterInput: ({ value, onChange }) => /* @__PURE__ */ jsxRuntime.jsxs(
5032
- textarea.Select,
5032
+ sheet.Select,
5033
5033
  {
5034
5034
  value: toBoolStr(value),
5035
5035
  onValueChange: (v) => onChange(v === "true"),
5036
5036
  children: [
5037
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectTrigger, { className: FILTER_FIELD_SIZE, children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, { placeholder: "Selecionar..." }) }),
5038
- /* @__PURE__ */ jsxRuntime.jsxs(textarea.SelectContent, { children: [
5039
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: "true", children: "Sim" }),
5040
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: "false", children: "Não" })
5037
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectTrigger, { className: FILTER_FIELD_SIZE, children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, { placeholder: "Selecionar..." }) }),
5038
+ /* @__PURE__ */ jsxRuntime.jsxs(sheet.SelectContent, { children: [
5039
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: "true", children: "Sim" }),
5040
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: "false", children: "Não" })
5041
5041
  ] })
5042
5042
  ]
5043
5043
  }
@@ -5494,25 +5494,25 @@ const UserColumnType = {
5494
5494
  { id: "isAnyOf", label: "é um de" }
5495
5495
  ],
5496
5496
  renderFilterInput: ({ value, onChange, options }) => /* @__PURE__ */ jsxRuntime.jsxs(
5497
- textarea.Select,
5497
+ sheet.Select,
5498
5498
  {
5499
5499
  value: value == null ? "" : String(value),
5500
5500
  onValueChange: (v) => onChange(v),
5501
5501
  children: [
5502
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectTrigger, { className: FILTER_FIELD_SIZE, children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, { placeholder: "Selecione usuário..." }) }),
5503
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectContent, { children: (options ?? []).map((o) => /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
5502
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectTrigger, { className: FILTER_FIELD_SIZE, children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, { placeholder: "Selecione usuário..." }) }),
5503
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectContent, { children: (options ?? []).map((o) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
5504
5504
  ]
5505
5505
  }
5506
5506
  ),
5507
5507
  renderFastFilterInput: ({ value, onChange, options }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-pad-md", children: /* @__PURE__ */ jsxRuntime.jsxs(
5508
- textarea.Select,
5508
+ sheet.Select,
5509
5509
  {
5510
5510
  defaultOpen: true,
5511
5511
  value: value == null ? "" : String(value),
5512
5512
  onValueChange: (v) => onChange(v),
5513
5513
  children: [
5514
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, { placeholder: "Selecione usuário..." }) }),
5515
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectContent, { children: (options ?? []).map((o) => /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
5514
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, { placeholder: "Selecione usuário..." }) }),
5515
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectContent, { children: (options ?? []).map((o) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
5516
5516
  ]
5517
5517
  }
5518
5518
  ) }),
@@ -5580,25 +5580,25 @@ const BadgeColumnType = {
5580
5580
  { id: "isAnyOf", label: "é um de" }
5581
5581
  ],
5582
5582
  renderFilterInput: ({ value, onChange, options }) => /* @__PURE__ */ jsxRuntime.jsxs(
5583
- textarea.Select,
5583
+ sheet.Select,
5584
5584
  {
5585
5585
  value: value == null ? "" : String(value),
5586
5586
  onValueChange: (v) => onChange(v),
5587
5587
  children: [
5588
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectTrigger, { className: FILTER_FIELD_SIZE, children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, { placeholder: "Selecione..." }) }),
5589
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectContent, { children: (options ?? []).map((o) => /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
5588
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectTrigger, { className: FILTER_FIELD_SIZE, children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, { placeholder: "Selecione..." }) }),
5589
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectContent, { children: (options ?? []).map((o) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
5590
5590
  ]
5591
5591
  }
5592
5592
  ),
5593
5593
  renderFastFilterInput: ({ value, onChange, options }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-pad-md", children: /* @__PURE__ */ jsxRuntime.jsxs(
5594
- textarea.Select,
5594
+ sheet.Select,
5595
5595
  {
5596
5596
  defaultOpen: true,
5597
5597
  value: value == null ? "" : String(value),
5598
5598
  onValueChange: (v) => onChange(v),
5599
5599
  children: [
5600
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, { placeholder: "Selecione..." }) }),
5601
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectContent, { children: (options ?? []).map((o) => /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
5600
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, { placeholder: "Selecione..." }) }),
5601
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectContent, { children: (options ?? []).map((o) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
5602
5602
  ]
5603
5603
  }
5604
5604
  ) }),
@@ -5667,7 +5667,7 @@ const TagsColumnType = {
5667
5667
  className: "flex items-center gap-gp-md p-pad-xs rounded-radius-sm hover:bg-bg-muted cursor-pointer",
5668
5668
  children: [
5669
5669
  /* @__PURE__ */ jsxRuntime.jsx(
5670
- textarea.Checkbox,
5670
+ sheet.Checkbox,
5671
5671
  {
5672
5672
  checked: selected.has(String(o.value)),
5673
5673
  onCheckedChange: () => toggle(String(o.value))
@@ -5694,7 +5694,7 @@ const TagsColumnType = {
5694
5694
  className: "flex items-center gap-gp-md p-pad-xs rounded-radius-sm hover:bg-bg-muted cursor-pointer",
5695
5695
  children: [
5696
5696
  /* @__PURE__ */ jsxRuntime.jsx(
5697
- textarea.Checkbox,
5697
+ sheet.Checkbox,
5698
5698
  {
5699
5699
  checked: selected.has(String(o.value)),
5700
5700
  onCheckedChange: () => toggle(String(o.value))
@@ -5788,7 +5788,7 @@ const DatetimeColumnType = {
5788
5788
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarClock, { className: "size-icon-xs text-fg-muted shrink-0" })
5789
5789
  ] }) }),
5790
5790
  /* @__PURE__ */ jsxRuntime.jsx(avatar.PopoverContent, { align: "start", className: "p-pad-md w-auto", children: isRange ? /* @__PURE__ */ jsxRuntime.jsx(
5791
- textarea.Calendar,
5791
+ sheet.Calendar,
5792
5792
  {
5793
5793
  mode: "range",
5794
5794
  selected: Array.isArray(value) ? { from: toDate(value[0]), to: toDate(value[1]) } : { from: void 0, to: void 0 },
@@ -5800,7 +5800,7 @@ const DatetimeColumnType = {
5800
5800
  }
5801
5801
  }
5802
5802
  ) : /* @__PURE__ */ jsxRuntime.jsx(
5803
- textarea.Calendar,
5803
+ sheet.Calendar,
5804
5804
  {
5805
5805
  mode: "single",
5806
5806
  selected: toDate(value),
@@ -5814,7 +5814,7 @@ const DatetimeColumnType = {
5814
5814
  if (isRange) {
5815
5815
  const range = { from: toDate(value[0]), to: toDate(value[1]) };
5816
5816
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-pad-md", children: /* @__PURE__ */ jsxRuntime.jsx(
5817
- textarea.Calendar,
5817
+ sheet.Calendar,
5818
5818
  {
5819
5819
  mode: "range",
5820
5820
  selected: range,
@@ -5825,7 +5825,7 @@ const DatetimeColumnType = {
5825
5825
  ) });
5826
5826
  }
5827
5827
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-pad-md", children: /* @__PURE__ */ jsxRuntime.jsx(
5828
- textarea.Calendar,
5828
+ sheet.Calendar,
5829
5829
  {
5830
5830
  mode: "single",
5831
5831
  selected: toDate(value),
@@ -6083,7 +6083,7 @@ function FooterTable({
6083
6083
  const safePage = Math.min(Math.max(1, page), lastPage);
6084
6084
  const start = totalCount === 0 ? 0 : (safePage - 1) * pageSize + 1;
6085
6085
  const end = Math.min(safePage * pageSize, totalCount);
6086
- const pages = textarea.getPaginationRange(safePage, lastPage);
6086
+ const pages = sheet.getPaginationRange(safePage, lastPage);
6087
6087
  const fmt = (n) => n.toLocaleString(locale);
6088
6088
  return /* @__PURE__ */ jsxRuntime.jsxs(
6089
6089
  "footer",
@@ -6100,7 +6100,7 @@ function FooterTable({
6100
6100
  !hidePageSize && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "inline-flex items-center gap-gp-md text-fg-muted", children: [
6101
6101
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: pageSizeLabel }),
6102
6102
  /* @__PURE__ */ jsxRuntime.jsxs(
6103
- textarea.Select,
6103
+ sheet.Select,
6104
6104
  {
6105
6105
  value: String(pageSize),
6106
6106
  onValueChange: (v) => {
@@ -6109,14 +6109,14 @@ function FooterTable({
6109
6109
  },
6110
6110
  children: [
6111
6111
  /* @__PURE__ */ jsxRuntime.jsx(
6112
- textarea.SelectTrigger,
6112
+ sheet.SelectTrigger,
6113
6113
  {
6114
6114
  className: "min-h-form-md w-auto pl-pad-2xl pr-pad-xl gap-gp-lg",
6115
6115
  "aria-label": pageSizeLabel,
6116
- children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, {})
6116
+ children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, {})
6117
6117
  }
6118
6118
  ),
6119
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectContent, { children: pageSizeOptions.map((n) => /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: String(n), children: n }, n)) })
6119
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectContent, { children: pageSizeOptions.map((n) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: String(n), children: n }, n)) })
6120
6120
  ]
6121
6121
  }
6122
6122
  )
@@ -6139,24 +6139,24 @@ function FooterTable({
6139
6139
  selectionCount > 1 ? "s" : ""
6140
6140
  ] })
6141
6141
  ] }),
6142
- /* @__PURE__ */ jsxRuntime.jsxs(textarea.Pagination, { className: "max-sm:w-full max-sm:justify-center", children: [
6142
+ /* @__PURE__ */ jsxRuntime.jsxs(sheet.Pagination, { className: "max-sm:w-full max-sm:justify-center", children: [
6143
6143
  !hideFirstLast && /* @__PURE__ */ jsxRuntime.jsx(
6144
- textarea.PaginationFirst,
6144
+ sheet.PaginationFirst,
6145
6145
  {
6146
6146
  onClick: () => onPageChange(1),
6147
6147
  disabled: safePage === 1
6148
6148
  }
6149
6149
  ),
6150
6150
  /* @__PURE__ */ jsxRuntime.jsx(
6151
- textarea.PaginationPrevious,
6151
+ sheet.PaginationPrevious,
6152
6152
  {
6153
6153
  onClick: () => onPageChange(Math.max(1, safePage - 1)),
6154
6154
  disabled: safePage === 1
6155
6155
  }
6156
6156
  ),
6157
- /* @__PURE__ */ jsxRuntime.jsx(textarea.PaginationContent, { children: pages.map(
6158
- (p, i) => p === "ellipsis" ? /* @__PURE__ */ jsxRuntime.jsx(textarea.PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(textarea.PaginationEllipsis, {}) }, `e-${i}`) : /* @__PURE__ */ jsxRuntime.jsx(textarea.PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
6159
- textarea.PaginationLink,
6157
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.PaginationContent, { children: pages.map(
6158
+ (p, i) => p === "ellipsis" ? /* @__PURE__ */ jsxRuntime.jsx(sheet.PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(sheet.PaginationEllipsis, {}) }, `e-${i}`) : /* @__PURE__ */ jsxRuntime.jsx(sheet.PaginationItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
6159
+ sheet.PaginationLink,
6160
6160
  {
6161
6161
  isActive: p === safePage,
6162
6162
  onClick: () => onPageChange(p),
@@ -6166,14 +6166,14 @@ function FooterTable({
6166
6166
  ) }, p)
6167
6167
  ) }),
6168
6168
  /* @__PURE__ */ jsxRuntime.jsx(
6169
- textarea.PaginationNext,
6169
+ sheet.PaginationNext,
6170
6170
  {
6171
6171
  onClick: () => onPageChange(Math.min(lastPage, safePage + 1)),
6172
6172
  disabled: safePage === lastPage
6173
6173
  }
6174
6174
  ),
6175
6175
  !hideFirstLast && /* @__PURE__ */ jsxRuntime.jsx(
6176
- textarea.PaginationLast,
6176
+ sheet.PaginationLast,
6177
6177
  {
6178
6178
  onClick: () => onPageChange(lastPage),
6179
6179
  disabled: safePage === lastPage
@@ -6791,7 +6791,7 @@ function KanbanCardOuter({
6791
6791
  ...a11yProps,
6792
6792
  children: [
6793
6793
  showCheckbox && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cardCheck({ selected }), onClick: handleStop, onPointerDown: handleStop, children: /* @__PURE__ */ jsxRuntime.jsx(
6794
- textarea.Checkbox,
6794
+ sheet.Checkbox,
6795
6795
  {
6796
6796
  checked: selected,
6797
6797
  onCheckedChange: () => onToggleSelect?.(card$1.id),
@@ -7028,7 +7028,7 @@ function ListItem({
7028
7028
  }
7029
7029
  ),
7030
7030
  selectable && /* @__PURE__ */ jsxRuntime.jsx("span", { className: s.checkbox(), onClick: stop, onPointerDown: stop, children: /* @__PURE__ */ jsxRuntime.jsx(
7031
- textarea.Checkbox,
7031
+ sheet.Checkbox,
7032
7032
  {
7033
7033
  checked: state.selected,
7034
7034
  onCheckedChange: () => onToggleSelect?.(item.id),
@@ -8028,6 +8028,38 @@ function measureTextWidth(text, font) {
8028
8028
  if (!ctx) return 0;
8029
8029
  return ctx.measureText(text).width;
8030
8030
  }
8031
+ const ACTIONS_INLINE_MAX = 3;
8032
+ function actionsWidthForSlots(slots) {
8033
+ return 30 * Math.max(1, slots) + 14;
8034
+ }
8035
+ function oculta(a, row) {
8036
+ return typeof a.hidden === "function" ? a.hidden(row) : !!a.hidden;
8037
+ }
8038
+ function splitActionSlots(actions, row) {
8039
+ const visiveis = actions.filter((a) => !oculta(a, row));
8040
+ if (visiveis.length === 0) return { inline: [], menu: [] };
8041
+ if (visiveis.some((a) => a.showInMenu)) {
8042
+ return {
8043
+ inline: visiveis.filter((a) => !a.showInMenu),
8044
+ menu: visiveis.filter((a) => a.showInMenu)
8045
+ };
8046
+ }
8047
+ if (visiveis.length <= ACTIONS_INLINE_MAX) return { inline: visiveis, menu: [] };
8048
+ return { inline: [], menu: visiveis };
8049
+ }
8050
+ function countActionSlots(split) {
8051
+ return split.inline.length + (split.menu.length > 0 ? 1 : 0);
8052
+ }
8053
+ function measureActionsWidth(getActions, rows) {
8054
+ if (!getActions || rows.length === 0) return null;
8055
+ let maxSlots = 0;
8056
+ for (const row of rows) {
8057
+ const slots = countActionSlots(splitActionSlots(getActions({ row }), row));
8058
+ if (slots > maxSlots) maxSlots = slots;
8059
+ }
8060
+ if (maxSlots === 0) return null;
8061
+ return actionsWidthForSlots(maxSlots);
8062
+ }
8031
8063
  function getFieldValue(row, field) {
8032
8064
  if (!field.includes(".")) {
8033
8065
  return row[field];
@@ -8067,7 +8099,7 @@ function calculateColumnWidths(columns, rows, options) {
8067
8099
  for (const col of columns) {
8068
8100
  const field = String(col.field);
8069
8101
  if (col.type === "actions") {
8070
- const w = col.minWidth ?? ACTIONS_COLUMN_WIDTH;
8102
+ const w = col.width ?? col.minWidth ?? measureActionsWidth(col.getActions, rows.slice(0, sampleSize)) ?? ACTIONS_COLUMN_WIDTH;
8071
8103
  widths[field] = w;
8072
8104
  totalContentWidth += w;
8073
8105
  continue;
@@ -9862,13 +9894,8 @@ function DataTableActionsCell({
9862
9894
  row,
9863
9895
  actions
9864
9896
  }) {
9865
- const visible = actions.filter((a) => {
9866
- if (typeof a.hidden === "function") return !a.hidden(row);
9867
- return !a.hidden;
9868
- });
9869
- const inlineActions = visible.filter((a) => !a.showInMenu);
9870
- const menuActions = visible.filter((a) => a.showInMenu);
9871
- if (visible.length === 0) return null;
9897
+ const { inline: inlineActions, menu: menuActions } = splitActionSlots(actions, row);
9898
+ if (inlineActions.length === 0 && menuActions.length === 0) return null;
9872
9899
  const resolveDisabled = (a) => {
9873
9900
  if (typeof a.disabled === "function") return a.disabled(row);
9874
9901
  return !!a.disabled;
@@ -10211,9 +10238,9 @@ function SelectEditor({
10211
10238
  }
10212
10239
  },
10213
10240
  className: "w-full",
10214
- children: /* @__PURE__ */ jsxRuntime.jsxs(textarea.Select, { defaultOpen: !disabled, value, onValueChange: onChange, disabled, children: [
10215
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectTrigger, { className: "h-form-sm min-h-form-sm rounded-radius-sm", children: /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectValue, { placeholder: "Selecionar..." }) }),
10216
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectContent, { children: options.map((o) => /* @__PURE__ */ jsxRuntime.jsx(textarea.SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
10241
+ children: /* @__PURE__ */ jsxRuntime.jsxs(sheet.Select, { defaultOpen: !disabled, value, onValueChange: onChange, disabled, children: [
10242
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectTrigger, { className: "h-form-sm min-h-form-sm rounded-radius-sm", children: /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectValue, { placeholder: "Selecionar..." }) }),
10243
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectContent, { children: options.map((o) => /* @__PURE__ */ jsxRuntime.jsx(sheet.SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
10217
10244
  ] })
10218
10245
  }
10219
10246
  );
@@ -10437,7 +10464,7 @@ function DataTableRowInner({
10437
10464
  className: rowClassName,
10438
10465
  children: [
10439
10466
  selectionEnabled && /* @__PURE__ */ jsxRuntime.jsx(TableCell, { width: SELECTION_COLUMN_WIDTH, align: "center", purpose: "selection", children: /* @__PURE__ */ jsxRuntime.jsx(
10440
- textarea.Checkbox,
10467
+ sheet.Checkbox,
10441
10468
  {
10442
10469
  checked: selected,
10443
10470
  onCheckedChange: () => handlers.current.toggleRowSelection(row),
@@ -11897,7 +11924,7 @@ function DataTableInternal(props, ref) {
11897
11924
  align: "center",
11898
11925
  purpose: "selection",
11899
11926
  children: /* @__PURE__ */ jsxRuntime.jsx(
11900
- textarea.Checkbox,
11927
+ sheet.Checkbox,
11901
11928
  {
11902
11929
  checked: selection.isPageSelected(rowsToRender) ? true : selection.isPageIndeterminate(rowsToRender) ? "indeterminate" : false,
11903
11930
  onCheckedChange: () => selection.togglePage(rowsToRender),
@@ -12151,7 +12178,7 @@ function DataTableInternal(props, ref) {
12151
12178
  onClick: props.onRowClick ? () => props.onRowClick?.(row) : void 0,
12152
12179
  header: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12153
12180
  selectionConfig.enabled && /* @__PURE__ */ jsxRuntime.jsx(
12154
- textarea.Checkbox,
12181
+ sheet.Checkbox,
12155
12182
  {
12156
12183
  checked: isSel,
12157
12184
  onCheckedChange: () => selection.toggleRow(row),
@@ -12820,13 +12847,13 @@ function PanelHeader({
12820
12847
  }) {
12821
12848
  return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: avatar.cn(panelHeader(), className), children: [
12822
12849
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: panelHeaderText(), children: [
12823
- title2 && /* @__PURE__ */ jsxRuntime.jsx(textarea.SheetTitle, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("h2", { className: panelTitle(), children: [
12850
+ title2 && /* @__PURE__ */ jsxRuntime.jsx(sheet.SheetTitle, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("h2", { className: panelTitle(), children: [
12824
12851
  TitleIcon && /* @__PURE__ */ jsxRuntime.jsx(TitleIcon, { className: panelTitleIcon(), strokeWidth: 1.8 }),
12825
12852
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: title2 })
12826
12853
  ] }) }),
12827
- description && /* @__PURE__ */ jsxRuntime.jsx(textarea.SheetDescription, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: panelDescription(), children: description }) })
12854
+ description && /* @__PURE__ */ jsxRuntime.jsx(sheet.SheetDescription, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: panelDescription(), children: description }) })
12828
12855
  ] }),
12829
- !hideClose && /* @__PURE__ */ jsxRuntime.jsx(textarea.SheetClose, { className: panelClose(), "aria-label": "Fechar", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 18, strokeWidth: 1.7 }) })
12856
+ !hideClose && /* @__PURE__ */ jsxRuntime.jsx(sheet.SheetClose, { className: panelClose(), "aria-label": "Fechar", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 18, strokeWidth: 1.7 }) })
12830
12857
  ] });
12831
12858
  }
12832
12859
  function PanelBody({ children, className }) {
@@ -12880,10 +12907,10 @@ function Panel({
12880
12907
  className
12881
12908
  }) {
12882
12909
  const sizeClass = resolveSize(size);
12883
- return /* @__PURE__ */ jsxRuntime.jsxs(textarea.Sheet, { open, defaultOpen, onOpenChange, children: [
12884
- trigger && /* @__PURE__ */ jsxRuntime.jsx(textarea.SheetTrigger, { asChild: true, children: trigger }),
12910
+ return /* @__PURE__ */ jsxRuntime.jsxs(sheet.Sheet, { open, defaultOpen, onOpenChange, children: [
12911
+ trigger && /* @__PURE__ */ jsxRuntime.jsx(sheet.SheetTrigger, { asChild: true, children: trigger }),
12885
12912
  /* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Portal, { children: [
12886
- /* @__PURE__ */ jsxRuntime.jsx(textarea.SheetOverlay, {}),
12913
+ /* @__PURE__ */ jsxRuntime.jsx(sheet.SheetOverlay, {}),
12887
12914
  /* @__PURE__ */ jsxRuntime.jsxs(
12888
12915
  SheetPrimitive__namespace.Content,
12889
12916
  {
@@ -12912,7 +12939,6 @@ function Panel({
12912
12939
  ] })
12913
12940
  ] });
12914
12941
  }
12915
- exports.ACTIONS_COLUMN_WIDTH = ACTIONS_COLUMN_WIDTH;
12916
12942
  exports.AddViewModal = AddViewModal;
12917
12943
  exports.AlertModal = AlertModal;
12918
12944
  exports.Avatar = Avatar;
@@ -12990,4 +13016,4 @@ exports.useColumnResize = useColumnResize;
12990
13016
  exports.useColumnWidths = useColumnWidths;
12991
13017
  exports.useDataTableContext = useDataTableContext;
12992
13018
  exports.useFloatingPanelResize = useFloatingPanelResize;
12993
- //# sourceMappingURL=panel-DtU3KlKY.cjs.map
13019
+ //# sourceMappingURL=panel-BSyHW2J5.cjs.map