framepexls-ui-lib 0.2.8 → 0.2.10

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 (95) hide show
  1. package/dist/AppTopbar.js +1 -1
  2. package/dist/AppTopbar.mjs +1 -1
  3. package/dist/AvatarGroup.js +7 -2
  4. package/dist/AvatarGroup.mjs +7 -2
  5. package/dist/Badge.js +6 -1
  6. package/dist/Badge.mjs +6 -1
  7. package/dist/BadgeCluster.js +1 -1
  8. package/dist/BadgeCluster.mjs +1 -1
  9. package/dist/Breadcrumb.js +46 -2
  10. package/dist/Breadcrumb.mjs +46 -2
  11. package/dist/Button.js +8 -2
  12. package/dist/Button.mjs +8 -2
  13. package/dist/CalendarPanel.js +45 -26
  14. package/dist/CalendarPanel.mjs +45 -26
  15. package/dist/Card.js +7 -2
  16. package/dist/Card.mjs +7 -2
  17. package/dist/Checkbox.js +51 -18
  18. package/dist/Checkbox.mjs +51 -18
  19. package/dist/ColorPicker.js +9 -4
  20. package/dist/ColorPicker.mjs +9 -4
  21. package/dist/ColumnSelector.js +1 -1
  22. package/dist/ColumnSelector.mjs +1 -1
  23. package/dist/ComboSelect.js +11 -4
  24. package/dist/ComboSelect.mjs +11 -4
  25. package/dist/DateTimeField.js +8 -2
  26. package/dist/DateTimeField.mjs +8 -2
  27. package/dist/Dialog.js +2 -2
  28. package/dist/Dialog.mjs +2 -2
  29. package/dist/Drawer.js +2 -2
  30. package/dist/Drawer.mjs +2 -2
  31. package/dist/Dropdown.js +14 -10
  32. package/dist/Dropdown.mjs +14 -10
  33. package/dist/FiltersMultiSelect.js +1 -1
  34. package/dist/FiltersMultiSelect.mjs +1 -1
  35. package/dist/Input.js +23 -0
  36. package/dist/Input.mjs +23 -0
  37. package/dist/KpiCard.js +26 -2
  38. package/dist/KpiCard.mjs +26 -2
  39. package/dist/Link.js +16 -2
  40. package/dist/Link.mjs +16 -2
  41. package/dist/MediaCard.js +18 -11
  42. package/dist/MediaCard.mjs +18 -11
  43. package/dist/MediaSelector.js +9 -8
  44. package/dist/MediaSelector.mjs +9 -8
  45. package/dist/MotionProvider.d.mts +9 -0
  46. package/dist/MotionProvider.d.ts +9 -0
  47. package/dist/MotionProvider.js +29 -0
  48. package/dist/MotionProvider.mjs +9 -0
  49. package/dist/MultiComboSelect.js +6 -4
  50. package/dist/MultiComboSelect.mjs +6 -4
  51. package/dist/Pagination.js +65 -29
  52. package/dist/Pagination.mjs +65 -29
  53. package/dist/ReviewHistory.js +8 -6
  54. package/dist/ReviewHistory.mjs +8 -6
  55. package/dist/SearchInput.js +16 -2
  56. package/dist/SearchInput.mjs +16 -2
  57. package/dist/Select.js +12 -5
  58. package/dist/Select.mjs +12 -5
  59. package/dist/Sidebar.js +23 -5
  60. package/dist/Sidebar.mjs +23 -5
  61. package/dist/StatCard.js +17 -1
  62. package/dist/StatCard.mjs +19 -3
  63. package/dist/Steps.js +51 -37
  64. package/dist/Steps.mjs +51 -37
  65. package/dist/StorageUsage.js +6 -2
  66. package/dist/StorageUsage.mjs +6 -2
  67. package/dist/Table.d.mts +5 -1
  68. package/dist/Table.d.ts +5 -1
  69. package/dist/Table.js +31 -4
  70. package/dist/Table.mjs +30 -4
  71. package/dist/Textarea.js +42 -17
  72. package/dist/Textarea.mjs +43 -18
  73. package/dist/TimePanel.js +1 -1
  74. package/dist/TimePanel.mjs +1 -1
  75. package/dist/TimePopover.js +116 -83
  76. package/dist/TimePopover.mjs +116 -83
  77. package/dist/TimeRangeField.js +1 -1
  78. package/dist/TimeRangeField.mjs +1 -1
  79. package/dist/Toast.js +1 -5
  80. package/dist/Toast.mjs +1 -5
  81. package/dist/Tooltip.js +28 -19
  82. package/dist/Tooltip.mjs +28 -19
  83. package/dist/UploadCard.js +34 -21
  84. package/dist/UploadCard.mjs +34 -21
  85. package/dist/animations-CHrNeawW.d.mts +28 -0
  86. package/dist/animations-CHrNeawW.d.ts +28 -0
  87. package/dist/animations.d.mts +2 -0
  88. package/dist/animations.d.ts +2 -0
  89. package/dist/animations.js +75 -0
  90. package/dist/animations.mjs +42 -0
  91. package/dist/index.d.mts +4 -1
  92. package/dist/index.d.ts +4 -1
  93. package/dist/index.js +8 -0
  94. package/dist/index.mjs +18 -13
  95. package/package.json +4 -4
package/dist/Checkbox.js CHANGED
@@ -34,10 +34,11 @@ __export(Checkbox_exports, {
34
34
  module.exports = __toCommonJS(Checkbox_exports);
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = __toESM(require("react"));
37
+ var import_framer_motion = require("framer-motion");
37
38
  function cx(...a) {
38
39
  return a.filter(Boolean).join(" ");
39
40
  }
40
- const baseInput = "rounded border border-slate-300 text-blue-600 shadow-sm outline-none focus:ring-4 focus:ring-blue-300/40 disabled:opacity-60 disabled:cursor-not-allowed dark:border-white/10";
41
+ const baseInput = "appearance-none grid place-items-center rounded border border-slate-300 bg-white shadow-sm outline-none focus:ring-4 focus:ring-blue-300/40 checked:bg-blue-600 checked:border-blue-600 disabled:opacity-60 disabled:cursor-not-allowed dark:border-white/10 dark:bg-white/10 dark:checked:bg-blue-500 dark:checked:border-blue-500";
41
42
  const sizeMap = {
42
43
  sm: "h-4 w-4",
43
44
  md: "h-5 w-5",
@@ -59,6 +60,11 @@ const Checkbox = import_react.default.forwardRef(
59
60
  }, ref) => {
60
61
  const internalId = (0, import_react.useId)();
61
62
  const inputRef = (0, import_react.useRef)(null);
63
+ const [animChecked, setAnimChecked] = import_react.default.useState(() => {
64
+ var _a, _b;
65
+ const p = props;
66
+ return Boolean((_b = (_a = p.checked) != null ? _a : p.defaultChecked) != null ? _b : false);
67
+ });
62
68
  (0, import_react.useEffect)(() => {
63
69
  if (!ref) return;
64
70
  if (typeof ref === "function") ref(inputRef.current);
@@ -67,28 +73,55 @@ const Checkbox = import_react.default.forwardRef(
67
73
  (0, import_react.useEffect)(() => {
68
74
  if (inputRef.current) inputRef.current.indeterminate = !!indeterminate;
69
75
  }, [indeterminate]);
76
+ (0, import_react.useEffect)(() => {
77
+ var _a;
78
+ setAnimChecked(Boolean((_a = inputRef.current) == null ? void 0 : _a.checked));
79
+ }, []);
80
+ (0, import_react.useEffect)(() => {
81
+ if (Object.prototype.hasOwnProperty.call(props, "checked")) {
82
+ setAnimChecked(Boolean(props.checked));
83
+ }
84
+ }, [props.checked]);
70
85
  if (unstyled) {
71
86
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ref: inputRef, id, type: "checkbox", ...props });
72
87
  }
73
88
  const descId = description ? `${id != null ? id : internalId}-desc` : void 0;
74
89
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: cx("inline-flex select-none items-start gap-2", className), children: [
75
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
- "input",
77
- {
78
- ref: inputRef,
79
- id: id != null ? id : internalId,
80
- type: "checkbox",
81
- "aria-invalid": error ? true : void 0,
82
- "aria-describedby": descId,
83
- className: cx(
84
- baseInput,
85
- sizeMap[size],
86
- (error || tone === "danger") && "border-blue-400 focus:ring-blue-500/30",
87
- inputClassName
88
- ),
89
- ...props
90
- }
91
- ),
90
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "relative inline-grid place-items-center", children: [
91
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
+ "input",
93
+ {
94
+ ref: inputRef,
95
+ id: id != null ? id : internalId,
96
+ type: "checkbox",
97
+ "aria-invalid": error ? true : void 0,
98
+ "aria-describedby": descId,
99
+ className: cx(
100
+ baseInput,
101
+ sizeMap[size],
102
+ (error || tone === "danger") && "border-blue-400 focus:ring-blue-500/30",
103
+ inputClassName
104
+ ),
105
+ onChange: (e) => {
106
+ var _a;
107
+ setAnimChecked(e.currentTarget.checked || !!indeterminate);
108
+ (_a = props.onChange) == null ? void 0 : _a.call(props, e);
109
+ },
110
+ ...props
111
+ }
112
+ ),
113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
114
+ import_framer_motion.motion.svg,
115
+ {
116
+ viewBox: "0 0 24 24",
117
+ className: cx("pointer-events-none absolute", size === "sm" ? "h-4 w-4" : size === "lg" ? "h-6 w-6" : "h-5 w-5"),
118
+ initial: { pathLength: 0, opacity: 0 },
119
+ animate: { pathLength: animChecked || !!indeterminate ? 1 : 0, opacity: animChecked || !!indeterminate ? 1 : 0 },
120
+ transition: { duration: 0.18, ease: "easeOut" },
121
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.motion.path, { d: "M5 12l4 4L19 7", stroke: "white", strokeWidth: 2.5, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" })
122
+ }
123
+ )
124
+ ] }),
92
125
  (label || description) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "leading-tight", children: [
93
126
  label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm text-slate-700 dark:text-slate-200", children: label }),
94
127
  description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: descId, className: "text-[12px] text-slate-500 dark:text-slate-400", children: description })
package/dist/Checkbox.mjs CHANGED
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import React, { useEffect, useId, useRef } from "react";
4
+ import { motion } from "framer-motion";
4
5
  function cx(...a) {
5
6
  return a.filter(Boolean).join(" ");
6
7
  }
7
- const baseInput = "rounded border border-slate-300 text-blue-600 shadow-sm outline-none focus:ring-4 focus:ring-blue-300/40 disabled:opacity-60 disabled:cursor-not-allowed dark:border-white/10";
8
+ const baseInput = "appearance-none grid place-items-center rounded border border-slate-300 bg-white shadow-sm outline-none focus:ring-4 focus:ring-blue-300/40 checked:bg-blue-600 checked:border-blue-600 disabled:opacity-60 disabled:cursor-not-allowed dark:border-white/10 dark:bg-white/10 dark:checked:bg-blue-500 dark:checked:border-blue-500";
8
9
  const sizeMap = {
9
10
  sm: "h-4 w-4",
10
11
  md: "h-5 w-5",
@@ -26,6 +27,11 @@ const Checkbox = React.forwardRef(
26
27
  }, ref) => {
27
28
  const internalId = useId();
28
29
  const inputRef = useRef(null);
30
+ const [animChecked, setAnimChecked] = React.useState(() => {
31
+ var _a, _b;
32
+ const p = props;
33
+ return Boolean((_b = (_a = p.checked) != null ? _a : p.defaultChecked) != null ? _b : false);
34
+ });
29
35
  useEffect(() => {
30
36
  if (!ref) return;
31
37
  if (typeof ref === "function") ref(inputRef.current);
@@ -34,28 +40,55 @@ const Checkbox = React.forwardRef(
34
40
  useEffect(() => {
35
41
  if (inputRef.current) inputRef.current.indeterminate = !!indeterminate;
36
42
  }, [indeterminate]);
43
+ useEffect(() => {
44
+ var _a;
45
+ setAnimChecked(Boolean((_a = inputRef.current) == null ? void 0 : _a.checked));
46
+ }, []);
47
+ useEffect(() => {
48
+ if (Object.prototype.hasOwnProperty.call(props, "checked")) {
49
+ setAnimChecked(Boolean(props.checked));
50
+ }
51
+ }, [props.checked]);
37
52
  if (unstyled) {
38
53
  return /* @__PURE__ */ jsx("input", { ref: inputRef, id, type: "checkbox", ...props });
39
54
  }
40
55
  const descId = description ? `${id != null ? id : internalId}-desc` : void 0;
41
56
  return /* @__PURE__ */ jsxs("label", { className: cx("inline-flex select-none items-start gap-2", className), children: [
42
- /* @__PURE__ */ jsx(
43
- "input",
44
- {
45
- ref: inputRef,
46
- id: id != null ? id : internalId,
47
- type: "checkbox",
48
- "aria-invalid": error ? true : void 0,
49
- "aria-describedby": descId,
50
- className: cx(
51
- baseInput,
52
- sizeMap[size],
53
- (error || tone === "danger") && "border-blue-400 focus:ring-blue-500/30",
54
- inputClassName
55
- ),
56
- ...props
57
- }
58
- ),
57
+ /* @__PURE__ */ jsxs("span", { className: "relative inline-grid place-items-center", children: [
58
+ /* @__PURE__ */ jsx(
59
+ "input",
60
+ {
61
+ ref: inputRef,
62
+ id: id != null ? id : internalId,
63
+ type: "checkbox",
64
+ "aria-invalid": error ? true : void 0,
65
+ "aria-describedby": descId,
66
+ className: cx(
67
+ baseInput,
68
+ sizeMap[size],
69
+ (error || tone === "danger") && "border-blue-400 focus:ring-blue-500/30",
70
+ inputClassName
71
+ ),
72
+ onChange: (e) => {
73
+ var _a;
74
+ setAnimChecked(e.currentTarget.checked || !!indeterminate);
75
+ (_a = props.onChange) == null ? void 0 : _a.call(props, e);
76
+ },
77
+ ...props
78
+ }
79
+ ),
80
+ /* @__PURE__ */ jsx(
81
+ motion.svg,
82
+ {
83
+ viewBox: "0 0 24 24",
84
+ className: cx("pointer-events-none absolute", size === "sm" ? "h-4 w-4" : size === "lg" ? "h-6 w-6" : "h-5 w-5"),
85
+ initial: { pathLength: 0, opacity: 0 },
86
+ animate: { pathLength: animChecked || !!indeterminate ? 1 : 0, opacity: animChecked || !!indeterminate ? 1 : 0 },
87
+ transition: { duration: 0.18, ease: "easeOut" },
88
+ children: /* @__PURE__ */ jsx(motion.path, { d: "M5 12l4 4L19 7", stroke: "white", strokeWidth: 2.5, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" })
89
+ }
90
+ )
91
+ ] }),
59
92
  (label || description) && /* @__PURE__ */ jsxs("span", { className: "leading-tight", children: [
60
93
  label && /* @__PURE__ */ jsx("span", { className: "text-sm text-slate-700 dark:text-slate-200", children: label }),
61
94
  description && /* @__PURE__ */ jsx("div", { id: descId, className: "text-[12px] text-slate-500 dark:text-slate-400", children: description })
@@ -37,6 +37,8 @@ var import_react = __toESM(require("react"));
37
37
  var import_Input = __toESM(require("./Input"));
38
38
  var import_Button = __toESM(require("./Button"));
39
39
  var import_Dialog = __toESM(require("./Dialog"));
40
+ var import_framer_motion = require("framer-motion");
41
+ var import_animations = require("./animations");
40
42
  function clamp(v, min = 0, max = 255) {
41
43
  return Math.max(min, Math.min(max, v));
42
44
  }
@@ -127,13 +129,16 @@ function ColorPicker({ value, onChange, presets = DEFAULTS, className, label })
127
129
  };
128
130
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className, children: [
129
131
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
130
- "button",
132
+ import_framer_motion.motion.button,
131
133
  {
132
134
  type: "button",
133
135
  onClick: () => setOpen(true),
134
136
  title: hex,
135
- className: "h-9 w-9 rounded-xl border border-slate-300 shadow-sm outline-none ring-0 transition hover:scale-105 active:scale-95 dark:border-white/10",
136
- style: { backgroundColor: hex }
137
+ className: "h-9 w-9 rounded-xl border border-slate-300 shadow-sm outline-none ring-0 transition dark:border-white/10",
138
+ style: { backgroundColor: hex },
139
+ whileHover: { scale: 1.05 },
140
+ whileTap: { scale: 0.96 },
141
+ transition: import_animations.microTransition
137
142
  }
138
143
  ),
139
144
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Dialog.default, { open, onClose: () => setOpen(false), size: "md", children: [
@@ -146,7 +151,7 @@ function ColorPicker({ value, onChange, presets = DEFAULTS, className, label })
146
151
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Input.default, { placeholder: "r, g, b", value: rgb, onChange: (e) => setRgb(e.target.value), onBlur: () => commitRgb(rgb) })
147
152
  ] })
148
153
  ] }),
149
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-3 grid grid-cols-9 gap-1", children: presets.map((c) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", title: c, className: "h-7 w-7 rounded-lg border border-slate-300 shadow-sm transition hover:scale-105 active:scale-95 dark:border-white/10", style: { backgroundColor: c }, onClick: () => setHex(c) }, c)) })
154
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-3 grid grid-cols-9 gap-1", children: presets.map((c) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.motion.button, { type: "button", title: c, className: "h-7 w-7 rounded-lg border border-slate-300 shadow-sm dark:border-white/10", style: { backgroundColor: c }, onClick: () => setHex(c), whileHover: { scale: 1.07 }, whileTap: { scale: 0.96 }, transition: import_animations.microTransition }, c)) })
150
155
  ] }),
151
156
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Dialog.default.Footer, { align: "end", children: [
152
157
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { variant: "secondary", onClick: () => setOpen(false), children: "Cancelar" }),
@@ -4,6 +4,8 @@ import React from "react";
4
4
  import Input from "./Input";
5
5
  import Button from "./Button";
6
6
  import Dialog from "./Dialog";
7
+ import { motion } from "framer-motion";
8
+ import { microTransition } from "./animations";
7
9
  function clamp(v, min = 0, max = 255) {
8
10
  return Math.max(min, Math.min(max, v));
9
11
  }
@@ -94,13 +96,16 @@ function ColorPicker({ value, onChange, presets = DEFAULTS, className, label })
94
96
  };
95
97
  return /* @__PURE__ */ jsxs("div", { className, children: [
96
98
  /* @__PURE__ */ jsx(
97
- "button",
99
+ motion.button,
98
100
  {
99
101
  type: "button",
100
102
  onClick: () => setOpen(true),
101
103
  title: hex,
102
- className: "h-9 w-9 rounded-xl border border-slate-300 shadow-sm outline-none ring-0 transition hover:scale-105 active:scale-95 dark:border-white/10",
103
- style: { backgroundColor: hex }
104
+ className: "h-9 w-9 rounded-xl border border-slate-300 shadow-sm outline-none ring-0 transition dark:border-white/10",
105
+ style: { backgroundColor: hex },
106
+ whileHover: { scale: 1.05 },
107
+ whileTap: { scale: 0.96 },
108
+ transition: microTransition
104
109
  }
105
110
  ),
106
111
  /* @__PURE__ */ jsxs(Dialog, { open, onClose: () => setOpen(false), size: "md", children: [
@@ -113,7 +118,7 @@ function ColorPicker({ value, onChange, presets = DEFAULTS, className, label })
113
118
  /* @__PURE__ */ jsx(Input, { placeholder: "r, g, b", value: rgb, onChange: (e) => setRgb(e.target.value), onBlur: () => commitRgb(rgb) })
114
119
  ] })
115
120
  ] }),
116
- /* @__PURE__ */ jsx("div", { className: "mt-3 grid grid-cols-9 gap-1", children: presets.map((c) => /* @__PURE__ */ jsx("button", { type: "button", title: c, className: "h-7 w-7 rounded-lg border border-slate-300 shadow-sm transition hover:scale-105 active:scale-95 dark:border-white/10", style: { backgroundColor: c }, onClick: () => setHex(c) }, c)) })
121
+ /* @__PURE__ */ jsx("div", { className: "mt-3 grid grid-cols-9 gap-1", children: presets.map((c) => /* @__PURE__ */ jsx(motion.button, { type: "button", title: c, className: "h-7 w-7 rounded-lg border border-slate-300 shadow-sm dark:border-white/10", style: { backgroundColor: c }, onClick: () => setHex(c), whileHover: { scale: 1.07 }, whileTap: { scale: 0.96 }, transition: microTransition }, c)) })
117
122
  ] }),
118
123
  /* @__PURE__ */ jsxs(Dialog.Footer, { align: "end", children: [
119
124
  /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: () => setOpen(false), children: "Cancelar" }),
@@ -61,7 +61,7 @@ function ColumnSelector({
61
61
  initial: { opacity: 0, y: 6 },
62
62
  animate: { opacity: 1, y: 0 },
63
63
  exit: { opacity: 0, y: -6 },
64
- className: "absolute right-0 z-20 mt-2 w-64 overflow-hidden rounded-2xl border border-slate-200 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-[#0b0a0a]",
64
+ className: "absolute right-0 z-20 mt-2 w-64 overflow-hidden rounded-2xl border border-slate-200 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-[var(--fx-surface)]",
65
65
  children: items.map(({ key, label }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
66
66
  "label",
67
67
  {
@@ -28,7 +28,7 @@ function ColumnSelector({
28
28
  initial: { opacity: 0, y: 6 },
29
29
  animate: { opacity: 1, y: 0 },
30
30
  exit: { opacity: 0, y: -6 },
31
- className: "absolute right-0 z-20 mt-2 w-64 overflow-hidden rounded-2xl border border-slate-200 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-[#0b0a0a]",
31
+ className: "absolute right-0 z-20 mt-2 w-64 overflow-hidden rounded-2xl border border-slate-200 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-[var(--fx-surface)]",
32
32
  children: items.map(({ key, label }) => /* @__PURE__ */ jsxs(
33
33
  "label",
34
34
  {
@@ -38,6 +38,8 @@ var import_react_dom = require("react-dom");
38
38
  var import_AvatarSquare = __toESM(require("./AvatarSquare"));
39
39
  var import_Input = __toESM(require("./Input"));
40
40
  var import_Button = __toESM(require("./Button"));
41
+ var import_framer_motion = require("framer-motion");
42
+ var import_animations = require("./animations");
41
43
  const cx = (...a) => a.filter(Boolean).join(" ");
42
44
  const controlShell = "relative w-full rounded-2xl border border-slate-200 bg-white text-sm text-slate-900 placeholder:text-slate-400 shadow-sm outline-none transition focus-within:ring-4 focus-within:ring-slate-900/5 focus-within:border-slate-300 disabled:opacity-60 disabled:cursor-not-allowed dark:border-white/10 dark:bg-white/10 dark:text-slate-100 dark:placeholder:text-slate-400 dark:focus-within:ring-white/10";
43
45
  const isFocusableOrInteractive = (el) => {
@@ -278,7 +280,7 @@ function ComboSelect({
278
280
  ]
279
281
  }
280
282
  );
281
- const dropdown = open && dropStyle ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
283
+ const dropdown = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: open && dropStyle ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
282
284
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
283
285
  "div",
284
286
  {
@@ -295,13 +297,18 @@ function ComboSelect({
295
297
  }
296
298
  ),
297
299
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
298
- "div",
300
+ import_framer_motion.motion.div,
299
301
  {
300
302
  ref: dropRef,
301
303
  role: "listbox",
302
304
  id: listId,
303
305
  style: dropStyle,
304
- className: "overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-xl dark:border-white/10 dark:bg-[#0b0a0a]",
306
+ variants: import_animations.popOver,
307
+ initial: "initial",
308
+ animate: "animate",
309
+ exit: "exit",
310
+ transition: import_animations.menuTransition,
311
+ className: "overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-xl dark:border-white/10 dark:bg-[var(--fx-surface)]",
305
312
  children: filteredRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-3 py-2 text-sm text-slate-500 dark:text-slate-400", children: noResultsText }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: "max-h-[inherit] overflow-auto py-1 text-sm", children: filteredRows.map((row, i) => {
306
313
  if (row.kind === "section") {
307
314
  const Header = renderSectionHeader != null ? renderSectionHeader : DefaultSectionHeader;
@@ -348,7 +355,7 @@ function ComboSelect({
348
355
  }) })
349
356
  }
350
357
  )
351
- ] }) : null;
358
+ ] }) : null });
352
359
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
353
360
  "div",
354
361
  {
@@ -5,6 +5,8 @@ import { createPortal } from "react-dom";
5
5
  import AvatarSquare from "./AvatarSquare";
6
6
  import Input from "./Input";
7
7
  import Button from "./Button";
8
+ import { AnimatePresence, motion } from "framer-motion";
9
+ import { popOver, menuTransition } from "./animations";
8
10
  const cx = (...a) => a.filter(Boolean).join(" ");
9
11
  const controlShell = "relative w-full rounded-2xl border border-slate-200 bg-white text-sm text-slate-900 placeholder:text-slate-400 shadow-sm outline-none transition focus-within:ring-4 focus-within:ring-slate-900/5 focus-within:border-slate-300 disabled:opacity-60 disabled:cursor-not-allowed dark:border-white/10 dark:bg-white/10 dark:text-slate-100 dark:placeholder:text-slate-400 dark:focus-within:ring-white/10";
10
12
  const isFocusableOrInteractive = (el) => {
@@ -245,7 +247,7 @@ function ComboSelect({
245
247
  ]
246
248
  }
247
249
  );
248
- const dropdown = open && dropStyle ? /* @__PURE__ */ jsxs(Fragment, { children: [
250
+ const dropdown = /* @__PURE__ */ jsx(AnimatePresence, { children: open && dropStyle ? /* @__PURE__ */ jsxs(Fragment, { children: [
249
251
  /* @__PURE__ */ jsx(
250
252
  "div",
251
253
  {
@@ -262,13 +264,18 @@ function ComboSelect({
262
264
  }
263
265
  ),
264
266
  /* @__PURE__ */ jsx(
265
- "div",
267
+ motion.div,
266
268
  {
267
269
  ref: dropRef,
268
270
  role: "listbox",
269
271
  id: listId,
270
272
  style: dropStyle,
271
- className: "overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-xl dark:border-white/10 dark:bg-[#0b0a0a]",
273
+ variants: popOver,
274
+ initial: "initial",
275
+ animate: "animate",
276
+ exit: "exit",
277
+ transition: menuTransition,
278
+ className: "overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-xl dark:border-white/10 dark:bg-[var(--fx-surface)]",
272
279
  children: filteredRows.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-3 py-2 text-sm text-slate-500 dark:text-slate-400", children: noResultsText }) : /* @__PURE__ */ jsx("ul", { className: "max-h-[inherit] overflow-auto py-1 text-sm", children: filteredRows.map((row, i) => {
273
280
  if (row.kind === "section") {
274
281
  const Header = renderSectionHeader != null ? renderSectionHeader : DefaultSectionHeader;
@@ -315,7 +322,7 @@ function ComboSelect({
315
322
  }) })
316
323
  }
317
324
  )
318
- ] }) : null;
325
+ ] }) : null });
319
326
  return /* @__PURE__ */ jsxs(
320
327
  "div",
321
328
  {
@@ -39,6 +39,8 @@ var import_Input = __toESM(require("./Input"));
39
39
  var import_Button = __toESM(require("./Button"));
40
40
  var import_CalendarPanel = __toESM(require("./CalendarPanel"));
41
41
  var import_TimePopover = __toESM(require("./TimePopover"));
42
+ var import_framer_motion = require("framer-motion");
43
+ var import_animations = require("./animations");
42
44
  const pad2 = (n) => n < 10 ? `0${n}` : String(n);
43
45
  const DATE_ONLY_REGEX = /^\d{4}-\d{2}-\d{2}$/;
44
46
  const fmtISODate = (d) => `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}`;
@@ -245,12 +247,16 @@ function DateTimeField({
245
247
  const timeBtnRef = (0, import_react.useRef)(null);
246
248
  const [showTimePop, setShowTimePop] = (0, import_react.useState)(false);
247
249
  const popover = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
248
- "div",
250
+ import_framer_motion.motion.div,
249
251
  {
252
+ variants: import_animations.popOver,
253
+ initial: "initial",
254
+ animate: "animate",
255
+ transition: import_animations.menuTransition,
250
256
  ref: popRef,
251
257
  style: stylePop,
252
258
  "data-dtf-pop": true,
253
- className: "w-1/3 overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-xl dark:border-white/10 dark:bg-[#0b0a0a]",
259
+ className: "w-1/3 overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-xl dark:border-white/10 dark:bg-[var(--fx-surface)]",
254
260
  children: [
255
261
  type !== "time" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
256
262
  import_CalendarPanel.default,
@@ -6,6 +6,8 @@ import Input from "./Input";
6
6
  import Button from "./Button";
7
7
  import CalendarPanel from "./CalendarPanel";
8
8
  import TimePopover from "./TimePopover";
9
+ import { motion } from "framer-motion";
10
+ import { popOver, menuTransition } from "./animations";
9
11
  const pad2 = (n) => n < 10 ? `0${n}` : String(n);
10
12
  const DATE_ONLY_REGEX = /^\d{4}-\d{2}-\d{2}$/;
11
13
  const fmtISODate = (d) => `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}`;
@@ -212,12 +214,16 @@ function DateTimeField({
212
214
  const timeBtnRef = useRef(null);
213
215
  const [showTimePop, setShowTimePop] = useState(false);
214
216
  const popover = /* @__PURE__ */ jsxs(
215
- "div",
217
+ motion.div,
216
218
  {
219
+ variants: popOver,
220
+ initial: "initial",
221
+ animate: "animate",
222
+ transition: menuTransition,
217
223
  ref: popRef,
218
224
  style: stylePop,
219
225
  "data-dtf-pop": true,
220
- className: "w-1/3 overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-xl dark:border-white/10 dark:bg-[#0b0a0a]",
226
+ className: "w-1/3 overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-xl dark:border-white/10 dark:bg-[var(--fx-surface)]",
221
227
  children: [
222
228
  type !== "time" && /* @__PURE__ */ jsx(
223
229
  CalendarPanel,
package/dist/Dialog.js CHANGED
@@ -170,7 +170,7 @@ function DialogBase({
170
170
  ref: containerRef,
171
171
  className: cx(
172
172
  "w-full overflow-hidden rounded-3xl border border-slate-200 bg-white shadow-xl",
173
- "dark:border-white/10 dark:bg-[#0b0a0a]",
173
+ "dark:border-white/10 dark:bg-[var(--fx-surface)]",
174
174
  size === "full" ? "flex h-[calc(100vh-2rem)] flex-col" : "flex max-h-[88vh] flex-col",
175
175
  sizeToMaxW[size],
176
176
  className
@@ -249,7 +249,7 @@ function DialogFooter({
249
249
  "sticky bottom-0 z-10 flex items-center gap-2 rounded-b-3xl border-t border-slate-200",
250
250
  "bg-white px-6 py-4 text-sm",
251
251
  "[box-shadow:inset_0_8px_10px_-8px_rgba(2,6,23,0.10)]",
252
- "dark:border-white/10 dark:bg-[#0b0a0a] dark:[box-shadow:inset_0_8px_10px_-8px_rgba(255,255,255,0.08)]",
252
+ "dark:border-white/10 dark:bg-[var(--fx-surface)] dark:[box-shadow:inset_0_8px_10px_-8px_rgba(255,255,255,0.08)]",
253
253
  map[align]
254
254
  ),
255
255
  children
package/dist/Dialog.mjs CHANGED
@@ -130,7 +130,7 @@ function DialogBase({
130
130
  ref: containerRef,
131
131
  className: cx(
132
132
  "w-full overflow-hidden rounded-3xl border border-slate-200 bg-white shadow-xl",
133
- "dark:border-white/10 dark:bg-[#0b0a0a]",
133
+ "dark:border-white/10 dark:bg-[var(--fx-surface)]",
134
134
  size === "full" ? "flex h-[calc(100vh-2rem)] flex-col" : "flex max-h-[88vh] flex-col",
135
135
  sizeToMaxW[size],
136
136
  className
@@ -209,7 +209,7 @@ function DialogFooter({
209
209
  "sticky bottom-0 z-10 flex items-center gap-2 rounded-b-3xl border-t border-slate-200",
210
210
  "bg-white px-6 py-4 text-sm",
211
211
  "[box-shadow:inset_0_8px_10px_-8px_rgba(2,6,23,0.10)]",
212
- "dark:border-white/10 dark:bg-[#0b0a0a] dark:[box-shadow:inset_0_8px_10px_-8px_rgba(255,255,255,0.08)]",
212
+ "dark:border-white/10 dark:bg-[var(--fx-surface)] dark:[box-shadow:inset_0_8px_10px_-8px_rgba(255,255,255,0.08)]",
213
213
  map[align]
214
214
  ),
215
215
  children
package/dist/Drawer.js CHANGED
@@ -83,7 +83,7 @@ function Root({
83
83
  "aria-modal": "true",
84
84
  "aria-labelledby": labelId,
85
85
  className: [
86
- "absolute right-0 top-0 h-full bg-white shadow-2xl dark:bg-[#0b0a0a]",
86
+ "absolute right-0 top-0 h-full bg-white shadow-2xl dark:bg-[var(--fx-surface)]",
87
87
  widthClass,
88
88
  "flex flex-col",
89
89
  className != null ? className : ""
@@ -121,7 +121,7 @@ function Footer({ className, children, sticky }) {
121
121
  {
122
122
  className: [
123
123
  "border-t border-slate-200/70 px-5 py-4 dark:border-white/10",
124
- sticky ? "backdrop-blur supports-[backdrop-filter]:bg-white/60 dark:supports-[backdrop-filter]:bg-[#0b0a0a]/60" : "",
124
+ sticky ? "backdrop-blur supports-[backdrop-filter]:bg-white/60 dark:supports-[backdrop-filter]:bg-[var(--fx-surface)]/60" : "",
125
125
  className != null ? className : ""
126
126
  ].join(" "),
127
127
  children
package/dist/Drawer.mjs CHANGED
@@ -46,7 +46,7 @@ function Root({
46
46
  "aria-modal": "true",
47
47
  "aria-labelledby": labelId,
48
48
  className: [
49
- "absolute right-0 top-0 h-full bg-white shadow-2xl dark:bg-[#0b0a0a]",
49
+ "absolute right-0 top-0 h-full bg-white shadow-2xl dark:bg-[var(--fx-surface)]",
50
50
  widthClass,
51
51
  "flex flex-col",
52
52
  className != null ? className : ""
@@ -84,7 +84,7 @@ function Footer({ className, children, sticky }) {
84
84
  {
85
85
  className: [
86
86
  "border-t border-slate-200/70 px-5 py-4 dark:border-white/10",
87
- sticky ? "backdrop-blur supports-[backdrop-filter]:bg-white/60 dark:supports-[backdrop-filter]:bg-[#0b0a0a]/60" : "",
87
+ sticky ? "backdrop-blur supports-[backdrop-filter]:bg-white/60 dark:supports-[backdrop-filter]:bg-[var(--fx-surface)]/60" : "",
88
88
  className != null ? className : ""
89
89
  ].join(" "),
90
90
  children
package/dist/Dropdown.js CHANGED
@@ -41,6 +41,8 @@ module.exports = __toCommonJS(Dropdown_exports);
41
41
  var import_jsx_runtime = require("react/jsx-runtime");
42
42
  var import_react = __toESM(require("react"));
43
43
  var import_react_dom = require("react-dom");
44
+ var import_framer_motion = require("framer-motion");
45
+ var import_animations = require("./animations");
44
46
  var import_iconos = require("./iconos/index");
45
47
  var import_Button = __toESM(require("./Button"));
46
48
  const DropdownCtx = (0, import_react.createContext)(null);
@@ -263,16 +265,20 @@ function Content({
263
265
  }
264
266
  return out;
265
267
  }, [children, isAllowed, defaultHideUnauthorized]);
266
- if (!open) return null;
267
- return (0, import_react_dom.createPortal)(
268
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
269
- "div",
268
+ return typeof document !== "undefined" ? (0, import_react_dom.createPortal)(
269
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: open ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
270
+ import_framer_motion.motion.div,
270
271
  {
271
272
  role: "menu",
272
273
  id: menuId,
273
274
  "aria-labelledby": labelId,
274
275
  ref: menuRef,
275
276
  onKeyDown,
277
+ variants: import_animations.popOver,
278
+ initial: "initial",
279
+ animate: "animate",
280
+ exit: "exit",
281
+ transition: import_animations.menuTransition,
276
282
  style: {
277
283
  position: "fixed",
278
284
  top: pos.top,
@@ -282,18 +288,16 @@ function Content({
282
288
  },
283
289
  className: [
284
290
  "z-[9999] overflow-auto rounded-2xl border border-slate-200/80 bg-white p-1.5 shadow-xl",
285
- "data-[open=false]:pointer-events-none data-[open=false]:opacity-0 data-[open=false]:scale-95",
286
- "data-[open=true]:opacity-100 data-[open=true]:scale-100 transition",
287
291
  pos.origin === "top-right" ? "origin-top-right" : "origin-top-left",
288
- "dark:border-white/10 dark:bg-[#0b0a0a]",
292
+ "dark:border-white/10 dark:bg-[var(--fx-surface)]",
289
293
  className
290
294
  ].join(" "),
291
- "data-open": "true",
295
+ "data-open": open ? "true" : "false",
292
296
  children: normalizedChildren
293
297
  }
294
- ),
298
+ ) : null }),
295
299
  document.body
296
- );
300
+ ) : null;
297
301
  }
298
302
  function Label({ children }) {
299
303
  const { labelId } = useDropdown();
package/dist/Dropdown.mjs CHANGED
@@ -11,6 +11,8 @@ import React, {
11
11
  useState
12
12
  } from "react";
13
13
  import { createPortal } from "react-dom";
14
+ import { AnimatePresence, motion } from "framer-motion";
15
+ import { popOver, menuTransition } from "./animations";
14
16
  import { MenuPuntosVerticalIcon } from "./iconos/index";
15
17
  import Button from "./Button";
16
18
  const DropdownCtx = createContext(null);
@@ -233,16 +235,20 @@ function Content({
233
235
  }
234
236
  return out;
235
237
  }, [children, isAllowed, defaultHideUnauthorized]);
236
- if (!open) return null;
237
- return createPortal(
238
- /* @__PURE__ */ jsx(
239
- "div",
238
+ return typeof document !== "undefined" ? createPortal(
239
+ /* @__PURE__ */ jsx(AnimatePresence, { children: open ? /* @__PURE__ */ jsx(
240
+ motion.div,
240
241
  {
241
242
  role: "menu",
242
243
  id: menuId,
243
244
  "aria-labelledby": labelId,
244
245
  ref: menuRef,
245
246
  onKeyDown,
247
+ variants: popOver,
248
+ initial: "initial",
249
+ animate: "animate",
250
+ exit: "exit",
251
+ transition: menuTransition,
246
252
  style: {
247
253
  position: "fixed",
248
254
  top: pos.top,
@@ -252,18 +258,16 @@ function Content({
252
258
  },
253
259
  className: [
254
260
  "z-[9999] overflow-auto rounded-2xl border border-slate-200/80 bg-white p-1.5 shadow-xl",
255
- "data-[open=false]:pointer-events-none data-[open=false]:opacity-0 data-[open=false]:scale-95",
256
- "data-[open=true]:opacity-100 data-[open=true]:scale-100 transition",
257
261
  pos.origin === "top-right" ? "origin-top-right" : "origin-top-left",
258
- "dark:border-white/10 dark:bg-[#0b0a0a]",
262
+ "dark:border-white/10 dark:bg-[var(--fx-surface)]",
259
263
  className
260
264
  ].join(" "),
261
- "data-open": "true",
265
+ "data-open": open ? "true" : "false",
262
266
  children: normalizedChildren
263
267
  }
264
- ),
268
+ ) : null }),
265
269
  document.body
266
- );
270
+ ) : null;
267
271
  }
268
272
  function Label({ children }) {
269
273
  const { labelId } = useDropdown();