framepexls-ui-lib 0.1.13 → 0.1.15
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.
- package/dist/ActionIconButton.d.mts +1 -0
- package/dist/ActionIconButton.d.ts +1 -0
- package/dist/ActionIconButton.js +12 -9
- package/dist/ActionIconButton.mjs +13 -10
- package/dist/AppTopbar.js +23 -6
- package/dist/AppTopbar.mjs +13 -6
- package/dist/AvatarGroup.d.mts +14 -0
- package/dist/AvatarGroup.d.ts +14 -0
- package/dist/AvatarGroup.js +77 -0
- package/dist/AvatarGroup.mjs +47 -0
- package/dist/AvatarSquare.d.mts +2 -5
- package/dist/AvatarSquare.d.ts +2 -5
- package/dist/AvatarSquare.js +52 -3
- package/dist/AvatarSquare.mjs +52 -3
- package/dist/Badge.d.mts +2 -1
- package/dist/Badge.d.ts +2 -1
- package/dist/Badge.js +3 -1
- package/dist/Badge.mjs +3 -1
- package/dist/BadgeCluster.js +3 -3
- package/dist/BadgeCluster.mjs +3 -3
- package/dist/Button.d.mts +3 -4
- package/dist/Button.d.ts +3 -4
- package/dist/Button.js +96 -8
- package/dist/Button.mjs +86 -8
- package/dist/CalendarPanel.js +20 -3
- package/dist/CalendarPanel.mjs +10 -3
- package/dist/Card.d.mts +6 -0
- package/dist/Card.d.ts +6 -0
- package/dist/Card.js +52 -0
- package/dist/Card.mjs +22 -0
- package/dist/CheckboxPillsGroup.d.mts +2 -1
- package/dist/CheckboxPillsGroup.d.ts +2 -1
- package/dist/CheckboxPillsGroup.js +16 -12
- package/dist/CheckboxPillsGroup.mjs +16 -12
- package/dist/ColumnSelector.js +16 -2
- package/dist/ColumnSelector.mjs +6 -2
- package/dist/ComboSelect.d.mts +0 -2
- package/dist/ComboSelect.d.ts +0 -2
- package/dist/ComboSelect.js +8 -4
- package/dist/ComboSelect.mjs +8 -4
- package/dist/DateTimeField.d.mts +0 -5
- package/dist/DateTimeField.d.ts +0 -5
- package/dist/DateTimeField.js +17 -8
- package/dist/DateTimeField.mjs +17 -8
- package/dist/Dialog.d.mts +2 -5
- package/dist/Dialog.d.ts +2 -5
- package/dist/Dialog.js +21 -22
- package/dist/Dialog.mjs +21 -22
- package/dist/Drawer.d.mts +38 -0
- package/dist/Drawer.d.ts +38 -0
- package/dist/Drawer.js +139 -0
- package/dist/Drawer.mjs +102 -0
- package/dist/Dropdown.d.mts +0 -3
- package/dist/Dropdown.d.ts +0 -3
- package/dist/Dropdown.js +61 -42
- package/dist/Dropdown.mjs +51 -42
- package/dist/FiltersMultiSelect.d.mts +28 -0
- package/dist/FiltersMultiSelect.d.ts +28 -0
- package/dist/FiltersMultiSelect.js +136 -0
- package/dist/FiltersMultiSelect.mjs +106 -0
- package/dist/Input.d.mts +2 -0
- package/dist/Input.d.ts +2 -0
- package/dist/Input.js +20 -5
- package/dist/Input.mjs +20 -5
- package/dist/Link.d.mts +15 -0
- package/dist/Link.d.ts +15 -0
- package/dist/Link.js +93 -0
- package/dist/Link.mjs +63 -0
- package/dist/MediaCard.d.mts +15 -0
- package/dist/MediaCard.d.ts +15 -0
- package/dist/MediaCard.js +153 -0
- package/dist/MediaCard.mjs +123 -0
- package/dist/MediaSelector.d.mts +48 -0
- package/dist/MediaSelector.d.ts +48 -0
- package/dist/MediaSelector.js +225 -0
- package/dist/MediaSelector.mjs +195 -0
- package/dist/Money.d.mts +2 -1
- package/dist/Money.d.ts +2 -1
- package/dist/Money.js +26 -2
- package/dist/Money.mjs +26 -2
- package/dist/MultiComboSelect.js +6 -11
- package/dist/MultiComboSelect.mjs +6 -11
- package/dist/OrderButton.js +13 -1
- package/dist/OrderButton.mjs +3 -1
- package/dist/Pagination.d.mts +2 -1
- package/dist/Pagination.d.ts +2 -1
- package/dist/Pagination.js +40 -3
- package/dist/Pagination.mjs +30 -3
- package/dist/ReviewHistory.js +3 -9
- package/dist/ReviewHistory.mjs +3 -9
- package/dist/SearchInput.js +17 -42
- package/dist/SearchInput.mjs +17 -42
- package/dist/Select.js +5 -2
- package/dist/Select.mjs +5 -2
- package/dist/Sidebar.d.mts +2 -3
- package/dist/Sidebar.d.ts +2 -3
- package/dist/Sidebar.js +132 -24
- package/dist/Sidebar.mjs +132 -24
- package/dist/Steps.d.mts +0 -2
- package/dist/Steps.d.ts +0 -2
- package/dist/Steps.js +19 -6
- package/dist/Steps.mjs +9 -6
- package/dist/Table.js +3 -1
- package/dist/Table.mjs +3 -1
- package/dist/TimePanel.js +21 -7
- package/dist/TimePanel.mjs +11 -7
- package/dist/TimePopover.js +32 -15
- package/dist/TimePopover.mjs +32 -15
- package/dist/TimeRangeField.js +13 -6
- package/dist/TimeRangeField.mjs +13 -6
- package/dist/Toast.d.mts +53 -0
- package/dist/Toast.d.ts +53 -0
- package/dist/Toast.js +273 -0
- package/dist/Toast.mjs +238 -0
- package/dist/Tooltip.d.mts +15 -0
- package/dist/Tooltip.d.ts +15 -0
- package/dist/Tooltip.js +135 -0
- package/dist/Tooltip.mjs +105 -0
- package/dist/UploadCard.d.mts +27 -0
- package/dist/UploadCard.d.ts +27 -0
- package/dist/UploadCard.js +143 -0
- package/dist/UploadCard.mjs +113 -0
- package/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +33 -1
- package/dist/index.mjs +78 -57
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import ComboSelect from "./ComboSelect";
|
|
5
5
|
import Dialog from "./Dialog";
|
|
6
|
+
import Button from "./Button";
|
|
6
7
|
import Badge from "./Badge";
|
|
7
8
|
function MultiComboSelect({
|
|
8
9
|
options,
|
|
@@ -66,8 +67,9 @@ function MultiComboSelect({
|
|
|
66
67
|
return /* @__PURE__ */ jsx(Badge, { tone: "slate", size: "sm", onClick: () => toggle(v), title: "Quitar", children: opt.label }, v);
|
|
67
68
|
}),
|
|
68
69
|
enableDialog && value.length > maxVisibleTags && /* @__PURE__ */ jsxs(
|
|
69
|
-
|
|
70
|
+
Button,
|
|
70
71
|
{
|
|
72
|
+
unstyled: true,
|
|
71
73
|
type: "button",
|
|
72
74
|
className: "inline-flex items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-0.5 text-xs text-slate-700 hover:bg-slate-50 active:scale-95 dark:border-white/10 dark:bg-white/10 dark:text-slate-200",
|
|
73
75
|
onClick: () => setDialogOpen(true),
|
|
@@ -94,8 +96,9 @@ function MultiComboSelect({
|
|
|
94
96
|
/* @__PURE__ */ jsx("span", { className: "truncate", children: opt.label })
|
|
95
97
|
] }),
|
|
96
98
|
/* @__PURE__ */ jsx(
|
|
97
|
-
|
|
99
|
+
Button,
|
|
98
100
|
{
|
|
101
|
+
unstyled: true,
|
|
99
102
|
type: "button",
|
|
100
103
|
className: "inline-flex h-8 items-center justify-center rounded-lg border border-slate-300/80 bg-white px-2 text-xs text-slate-700 hover:bg-slate-50 active:scale-95 dark:border-white/10 dark:bg-white/5 dark:text-slate-200 dark:hover:bg-white/10",
|
|
101
104
|
onClick: () => toggle(v),
|
|
@@ -105,15 +108,7 @@ function MultiComboSelect({
|
|
|
105
108
|
] }, v);
|
|
106
109
|
})
|
|
107
110
|
] }) }),
|
|
108
|
-
/* @__PURE__ */ jsx(Dialog.Footer, { align: "end", children: /* @__PURE__ */ jsx(
|
|
109
|
-
"button",
|
|
110
|
-
{
|
|
111
|
-
type: "button",
|
|
112
|
-
className: "inline-flex h-10 items-center gap-2 rounded-xl border border-slate-300/80 bg-white px-4 text-sm font-medium text-slate-700 shadow-sm hover:bg-slate-50 dark:border-white/10 dark:bg-white/5 dark:text-slate-200 dark:hover:bg-white/10",
|
|
113
|
-
onClick: () => setDialogOpen(false),
|
|
114
|
-
children: "Cerrar"
|
|
115
|
-
}
|
|
116
|
-
) })
|
|
111
|
+
/* @__PURE__ */ jsx(Dialog.Footer, { align: "end", children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "md", className: "shadow-sm", onClick: () => setDialogOpen(false), children: "Cerrar" }) })
|
|
117
112
|
] })
|
|
118
113
|
] });
|
|
119
114
|
}
|
package/dist/OrderButton.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
10
|
for (var name in all)
|
|
@@ -16,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
18
|
}
|
|
17
19
|
return to;
|
|
18
20
|
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
19
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
30
|
var OrderButton_exports = {};
|
|
21
31
|
__export(OrderButton_exports, {
|
|
@@ -23,10 +33,12 @@ __export(OrderButton_exports, {
|
|
|
23
33
|
});
|
|
24
34
|
module.exports = __toCommonJS(OrderButton_exports);
|
|
25
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_Button = __toESM(require("./Button"));
|
|
26
37
|
function OrderButton({ label, active, asc, onClick }) {
|
|
27
38
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
28
|
-
|
|
39
|
+
import_Button.default,
|
|
29
40
|
{
|
|
41
|
+
unstyled: true,
|
|
30
42
|
onClick,
|
|
31
43
|
className: "rounded-xl border border-slate-200 px-3 py-2 text-sm hover:bg-slate-50 dark:border-white/10 dark:hover:bg-white/5",
|
|
32
44
|
children: [
|
package/dist/OrderButton.mjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Button from "./Button";
|
|
3
4
|
function OrderButton({ label, active, asc, onClick }) {
|
|
4
5
|
return /* @__PURE__ */ jsxs(
|
|
5
|
-
|
|
6
|
+
Button,
|
|
6
7
|
{
|
|
8
|
+
unstyled: true,
|
|
7
9
|
onClick,
|
|
8
10
|
className: "rounded-xl border border-slate-200 px-3 py-2 text-sm hover:bg-slate-50 dark:border-white/10 dark:hover:bg-white/5",
|
|
9
11
|
children: [
|
package/dist/Pagination.d.mts
CHANGED
|
@@ -6,7 +6,8 @@ type PaginationProps = {
|
|
|
6
6
|
onPageChange: (p: number) => void;
|
|
7
7
|
maxButtons?: number;
|
|
8
8
|
className?: string;
|
|
9
|
+
color?: "slate" | "gray" | "zinc" | "neutral" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
9
10
|
};
|
|
10
|
-
declare function Pagination({ page, totalPages, onPageChange, maxButtons, className, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare function Pagination({ page, totalPages, onPageChange, maxButtons, className, color, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
11
12
|
|
|
12
13
|
export { type PaginationProps, Pagination as default };
|
package/dist/Pagination.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ type PaginationProps = {
|
|
|
6
6
|
onPageChange: (p: number) => void;
|
|
7
7
|
maxButtons?: number;
|
|
8
8
|
className?: string;
|
|
9
|
+
color?: "slate" | "gray" | "zinc" | "neutral" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
9
10
|
};
|
|
10
|
-
declare function Pagination({ page, totalPages, onPageChange, maxButtons, className, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare function Pagination({ page, totalPages, onPageChange, maxButtons, className, color, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
11
12
|
|
|
12
13
|
export { type PaginationProps, Pagination as default };
|
package/dist/Pagination.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
10
|
for (var name in all)
|
|
@@ -16,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
18
|
}
|
|
17
19
|
return to;
|
|
18
20
|
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
19
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
30
|
var Pagination_exports = {};
|
|
21
31
|
__export(Pagination_exports, {
|
|
@@ -23,12 +33,14 @@ __export(Pagination_exports, {
|
|
|
23
33
|
});
|
|
24
34
|
module.exports = __toCommonJS(Pagination_exports);
|
|
25
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_Button = __toESM(require("./Button"));
|
|
26
37
|
function Pagination({
|
|
27
38
|
page,
|
|
28
39
|
totalPages,
|
|
29
40
|
onPageChange,
|
|
30
41
|
maxButtons = 7,
|
|
31
|
-
className = ""
|
|
42
|
+
className = "",
|
|
43
|
+
color = "blue"
|
|
32
44
|
}) {
|
|
33
45
|
const getRange = () => {
|
|
34
46
|
if (totalPages <= maxButtons)
|
|
@@ -44,18 +56,43 @@ function Pagination({
|
|
|
44
56
|
return range2;
|
|
45
57
|
};
|
|
46
58
|
const range = getRange();
|
|
59
|
+
const ACTIVE = {
|
|
60
|
+
slate: "bg-slate-600 text-white",
|
|
61
|
+
gray: "bg-gray-600 text-white",
|
|
62
|
+
zinc: "bg-zinc-600 text-white",
|
|
63
|
+
neutral: "bg-neutral-600 text-white",
|
|
64
|
+
stone: "bg-stone-600 text-white",
|
|
65
|
+
red: "bg-red-600 text-white",
|
|
66
|
+
orange: "bg-orange-600 text-white",
|
|
67
|
+
amber: "bg-amber-600 text-white",
|
|
68
|
+
yellow: "bg-yellow-500 text-slate-900",
|
|
69
|
+
lime: "bg-lime-600 text-white",
|
|
70
|
+
green: "bg-green-600 text-white",
|
|
71
|
+
emerald: "bg-emerald-600 text-white",
|
|
72
|
+
teal: "bg-teal-600 text-white",
|
|
73
|
+
cyan: "bg-cyan-600 text-white",
|
|
74
|
+
sky: "bg-sky-600 text-white",
|
|
75
|
+
blue: "bg-blue-600 text-white",
|
|
76
|
+
indigo: "bg-indigo-600 text-white",
|
|
77
|
+
violet: "bg-violet-600 text-white",
|
|
78
|
+
purple: "bg-purple-600 text-white",
|
|
79
|
+
fuchsia: "bg-fuchsia-600 text-white",
|
|
80
|
+
pink: "bg-pink-600 text-white",
|
|
81
|
+
rose: "bg-rose-600 text-white"
|
|
82
|
+
};
|
|
47
83
|
const Btn = ({
|
|
48
84
|
children,
|
|
49
85
|
active,
|
|
50
86
|
disabled,
|
|
51
87
|
onClick
|
|
52
88
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
-
|
|
89
|
+
import_Button.default,
|
|
54
90
|
{
|
|
91
|
+
unstyled: true,
|
|
55
92
|
disabled,
|
|
56
93
|
onClick,
|
|
57
94
|
className: `h-10 min-w-10 px-3 inline-flex items-center justify-center text-[15px] font-medium transition
|
|
58
|
-
${active ?
|
|
95
|
+
${active ? `${ACTIVE[color]} rounded-2xl shadow-sm` : "rounded-none text-slate-900 hover:bg-white/60"}
|
|
59
96
|
${disabled ? "opacity-40 cursor-not-allowed" : ""}`,
|
|
60
97
|
"aria-current": active ? "page" : void 0,
|
|
61
98
|
children
|
package/dist/Pagination.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Button from "./Button";
|
|
3
4
|
function Pagination({
|
|
4
5
|
page,
|
|
5
6
|
totalPages,
|
|
6
7
|
onPageChange,
|
|
7
8
|
maxButtons = 7,
|
|
8
|
-
className = ""
|
|
9
|
+
className = "",
|
|
10
|
+
color = "blue"
|
|
9
11
|
}) {
|
|
10
12
|
const getRange = () => {
|
|
11
13
|
if (totalPages <= maxButtons)
|
|
@@ -21,18 +23,43 @@ function Pagination({
|
|
|
21
23
|
return range2;
|
|
22
24
|
};
|
|
23
25
|
const range = getRange();
|
|
26
|
+
const ACTIVE = {
|
|
27
|
+
slate: "bg-slate-600 text-white",
|
|
28
|
+
gray: "bg-gray-600 text-white",
|
|
29
|
+
zinc: "bg-zinc-600 text-white",
|
|
30
|
+
neutral: "bg-neutral-600 text-white",
|
|
31
|
+
stone: "bg-stone-600 text-white",
|
|
32
|
+
red: "bg-red-600 text-white",
|
|
33
|
+
orange: "bg-orange-600 text-white",
|
|
34
|
+
amber: "bg-amber-600 text-white",
|
|
35
|
+
yellow: "bg-yellow-500 text-slate-900",
|
|
36
|
+
lime: "bg-lime-600 text-white",
|
|
37
|
+
green: "bg-green-600 text-white",
|
|
38
|
+
emerald: "bg-emerald-600 text-white",
|
|
39
|
+
teal: "bg-teal-600 text-white",
|
|
40
|
+
cyan: "bg-cyan-600 text-white",
|
|
41
|
+
sky: "bg-sky-600 text-white",
|
|
42
|
+
blue: "bg-blue-600 text-white",
|
|
43
|
+
indigo: "bg-indigo-600 text-white",
|
|
44
|
+
violet: "bg-violet-600 text-white",
|
|
45
|
+
purple: "bg-purple-600 text-white",
|
|
46
|
+
fuchsia: "bg-fuchsia-600 text-white",
|
|
47
|
+
pink: "bg-pink-600 text-white",
|
|
48
|
+
rose: "bg-rose-600 text-white"
|
|
49
|
+
};
|
|
24
50
|
const Btn = ({
|
|
25
51
|
children,
|
|
26
52
|
active,
|
|
27
53
|
disabled,
|
|
28
54
|
onClick
|
|
29
55
|
}) => /* @__PURE__ */ jsx(
|
|
30
|
-
|
|
56
|
+
Button,
|
|
31
57
|
{
|
|
58
|
+
unstyled: true,
|
|
32
59
|
disabled,
|
|
33
60
|
onClick,
|
|
34
61
|
className: `h-10 min-w-10 px-3 inline-flex items-center justify-center text-[15px] font-medium transition
|
|
35
|
-
${active ?
|
|
62
|
+
${active ? `${ACTIVE[color]} rounded-2xl shadow-sm` : "rounded-none text-slate-900 hover:bg-white/60"}
|
|
36
63
|
${disabled ? "opacity-40 cursor-not-allowed" : ""}`,
|
|
37
64
|
"aria-current": active ? "page" : void 0,
|
|
38
65
|
children
|
package/dist/ReviewHistory.js
CHANGED
|
@@ -35,6 +35,7 @@ __export(ReviewHistory_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(ReviewHistory_exports);
|
|
36
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
37
|
var import_Dialog = __toESM(require("./Dialog"));
|
|
38
|
+
var import_Button = __toESM(require("./Button"));
|
|
38
39
|
var import_Badge = __toESM(require("./Badge"));
|
|
39
40
|
function ReviewHistory({
|
|
40
41
|
items,
|
|
@@ -59,7 +60,7 @@ function ReviewHistory({
|
|
|
59
60
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-1 text-xs text-muted", children: r.by_name || r.by_email ? `${(_a = r.by_name) != null ? _a : ""} ${r.by_email ? `\xB7 ${r.by_email}` : ""}` : r.user_id ? "Usuario interno" : "Invitado" })
|
|
60
61
|
] }, r.id);
|
|
61
62
|
}) }),
|
|
62
|
-
items.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pt-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
items.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pt-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { unstyled: true, className: "text-sm text-blue-600 hover:underline dark:text-blue-400", onClick: onViewAll, children: "Ver todos" }) })
|
|
63
64
|
] });
|
|
64
65
|
}
|
|
65
66
|
function ReviewHistoryDialog({
|
|
@@ -83,14 +84,7 @@ function ReviewHistoryDialog({
|
|
|
83
84
|
] }, r.id);
|
|
84
85
|
})
|
|
85
86
|
] }) }),
|
|
86
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Dialog.default.Footer, { align: "end", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
|
-
"button",
|
|
88
|
-
{
|
|
89
|
-
className: "inline-flex h-10 items-center gap-2 rounded-xl border border-slate-300/80 bg-white px-4 text-sm font-medium text-slate-700 shadow-sm hover:bg-slate-50 dark:border-white/10 dark:bg-white/5 dark:text-slate-200 dark:hover:bg-white/10",
|
|
90
|
-
onClick: onClose,
|
|
91
|
-
children: "Cerrar"
|
|
92
|
-
}
|
|
93
|
-
) })
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Dialog.default.Footer, { align: "end", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, { variant: "secondary", size: "md", className: "shadow-sm", onClick: onClose, children: "Cerrar" }) })
|
|
94
88
|
] });
|
|
95
89
|
}
|
|
96
90
|
function formatDateTime(value) {
|
package/dist/ReviewHistory.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Dialog from "./Dialog";
|
|
4
|
+
import Button from "./Button";
|
|
4
5
|
import Badge from "./Badge";
|
|
5
6
|
function ReviewHistory({
|
|
6
7
|
items,
|
|
@@ -25,7 +26,7 @@ function ReviewHistory({
|
|
|
25
26
|
/* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted", children: r.by_name || r.by_email ? `${(_a = r.by_name) != null ? _a : ""} ${r.by_email ? `\xB7 ${r.by_email}` : ""}` : r.user_id ? "Usuario interno" : "Invitado" })
|
|
26
27
|
] }, r.id);
|
|
27
28
|
}) }),
|
|
28
|
-
items.length > 3 && /* @__PURE__ */ jsx("div", { className: "pt-1", children: /* @__PURE__ */ jsx(
|
|
29
|
+
items.length > 3 && /* @__PURE__ */ jsx("div", { className: "pt-1", children: /* @__PURE__ */ jsx(Button, { unstyled: true, className: "text-sm text-blue-600 hover:underline dark:text-blue-400", onClick: onViewAll, children: "Ver todos" }) })
|
|
29
30
|
] });
|
|
30
31
|
}
|
|
31
32
|
function ReviewHistoryDialog({
|
|
@@ -49,14 +50,7 @@ function ReviewHistoryDialog({
|
|
|
49
50
|
] }, r.id);
|
|
50
51
|
})
|
|
51
52
|
] }) }),
|
|
52
|
-
/* @__PURE__ */ jsx(Dialog.Footer, { align: "end", children: /* @__PURE__ */ jsx(
|
|
53
|
-
"button",
|
|
54
|
-
{
|
|
55
|
-
className: "inline-flex h-10 items-center gap-2 rounded-xl border border-slate-300/80 bg-white px-4 text-sm font-medium text-slate-700 shadow-sm hover:bg-slate-50 dark:border-white/10 dark:bg-white/5 dark:text-slate-200 dark:hover:bg-white/10",
|
|
56
|
-
onClick: onClose,
|
|
57
|
-
children: "Cerrar"
|
|
58
|
-
}
|
|
59
|
-
) })
|
|
53
|
+
/* @__PURE__ */ jsx(Dialog.Footer, { align: "end", children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "md", className: "shadow-sm", onClick: onClose, children: "Cerrar" }) })
|
|
60
54
|
] });
|
|
61
55
|
}
|
|
62
56
|
function formatDateTime(value) {
|
package/dist/SearchInput.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(SearchInput_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(SearchInput_exports);
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_Input = __toESM(require("./Input"));
|
|
37
38
|
function SearchInput({
|
|
38
39
|
value,
|
|
39
40
|
onChange,
|
|
@@ -53,7 +54,7 @@ function SearchInput({
|
|
|
53
54
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { htmlFor: inputId, className: `relative ${widthClasses} ${className != null ? className : ""}`, children: [
|
|
54
55
|
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: label }),
|
|
55
56
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
-
|
|
57
|
+
import_Input.default,
|
|
57
58
|
{
|
|
58
59
|
id: inputId,
|
|
59
60
|
type: "search",
|
|
@@ -62,54 +63,28 @@ function SearchInput({
|
|
|
62
63
|
disabled,
|
|
63
64
|
onChange: (e) => onChange(e.target.value),
|
|
64
65
|
placeholder: placeholder != null ? placeholder : "Buscar...",
|
|
65
|
-
|
|
66
|
-
"w-full rounded-2xl border bg-white px-4 py-2.5 text-sm outline-none ring-0",
|
|
67
|
-
"pr-10",
|
|
68
|
-
// espacio para el icono
|
|
69
|
-
"placeholder:text-slate-400",
|
|
70
|
-
"border-slate-200 focus:border-blue-300 focus:ring-2 focus:ring-blue-200",
|
|
71
|
-
"dark:border-white/10 dark:bg-[#0e0d0e] dark:focus:border-blue-500 dark:focus:ring-blue-900/40",
|
|
72
|
-
disabled ? "opacity-60 cursor-not-allowed" : ""
|
|
73
|
-
].join(" "),
|
|
66
|
+
clearable,
|
|
74
67
|
onKeyDown: (e) => {
|
|
75
68
|
if (clearable && !disabled && value && e.key === "Escape") {
|
|
76
69
|
e.preventDefault();
|
|
77
70
|
clear();
|
|
78
71
|
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
83
|
-
"svg",
|
|
84
|
-
{
|
|
85
|
-
viewBox: "0 0 24 24",
|
|
86
|
-
className: "pointer-events-none absolute right-3 top-1/2 h-5 w-5 -translate-y-1/2 opacity-50",
|
|
87
|
-
fill: "none",
|
|
88
|
-
stroke: "currentColor",
|
|
89
|
-
strokeWidth: "2",
|
|
90
|
-
"aria-hidden": "true",
|
|
91
|
-
children: [
|
|
92
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m21 21-4.3-4.3" }),
|
|
93
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "11", cy: "11", r: "7" })
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
clearable && !disabled && value && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
|
-
"button",
|
|
99
|
-
{
|
|
100
|
-
type: "button",
|
|
101
|
-
onClick: clear,
|
|
102
|
-
className: "absolute right-9 top-1/2 -translate-y-1/2 grid h-6 w-6 place-items-center rounded-md text-slate-400 hover:text-slate-700 hover:bg-slate-100 dark:hover:bg-white/10",
|
|
103
|
-
"aria-label": "Limpiar b\xFAsqueda",
|
|
104
|
-
title: "Limpiar",
|
|
105
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { viewBox: "0 0 20 20", className: "h-4 w-4", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
|
-
"path",
|
|
72
|
+
},
|
|
73
|
+
rightSlot: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
74
|
+
"svg",
|
|
107
75
|
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
76
|
+
viewBox: "0 0 24 24",
|
|
77
|
+
className: "h-5 w-5 opacity-50",
|
|
78
|
+
fill: "none",
|
|
79
|
+
stroke: "currentColor",
|
|
80
|
+
strokeWidth: "2",
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m21 21-4.3-4.3" }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "11", cy: "11", r: "7" })
|
|
85
|
+
]
|
|
111
86
|
}
|
|
112
|
-
)
|
|
87
|
+
)
|
|
113
88
|
}
|
|
114
89
|
)
|
|
115
90
|
] });
|
package/dist/SearchInput.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
|
+
import Input from "./Input";
|
|
4
5
|
function SearchInput({
|
|
5
6
|
value,
|
|
6
7
|
onChange,
|
|
@@ -20,7 +21,7 @@ function SearchInput({
|
|
|
20
21
|
return /* @__PURE__ */ jsxs("label", { htmlFor: inputId, className: `relative ${widthClasses} ${className != null ? className : ""}`, children: [
|
|
21
22
|
label && /* @__PURE__ */ jsx("span", { className: "sr-only", children: label }),
|
|
22
23
|
/* @__PURE__ */ jsx(
|
|
23
|
-
|
|
24
|
+
Input,
|
|
24
25
|
{
|
|
25
26
|
id: inputId,
|
|
26
27
|
type: "search",
|
|
@@ -29,54 +30,28 @@ function SearchInput({
|
|
|
29
30
|
disabled,
|
|
30
31
|
onChange: (e) => onChange(e.target.value),
|
|
31
32
|
placeholder: placeholder != null ? placeholder : "Buscar...",
|
|
32
|
-
|
|
33
|
-
"w-full rounded-2xl border bg-white px-4 py-2.5 text-sm outline-none ring-0",
|
|
34
|
-
"pr-10",
|
|
35
|
-
// espacio para el icono
|
|
36
|
-
"placeholder:text-slate-400",
|
|
37
|
-
"border-slate-200 focus:border-blue-300 focus:ring-2 focus:ring-blue-200",
|
|
38
|
-
"dark:border-white/10 dark:bg-[#0e0d0e] dark:focus:border-blue-500 dark:focus:ring-blue-900/40",
|
|
39
|
-
disabled ? "opacity-60 cursor-not-allowed" : ""
|
|
40
|
-
].join(" "),
|
|
33
|
+
clearable,
|
|
41
34
|
onKeyDown: (e) => {
|
|
42
35
|
if (clearable && !disabled && value && e.key === "Escape") {
|
|
43
36
|
e.preventDefault();
|
|
44
37
|
clear();
|
|
45
38
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/* @__PURE__ */ jsxs(
|
|
50
|
-
"svg",
|
|
51
|
-
{
|
|
52
|
-
viewBox: "0 0 24 24",
|
|
53
|
-
className: "pointer-events-none absolute right-3 top-1/2 h-5 w-5 -translate-y-1/2 opacity-50",
|
|
54
|
-
fill: "none",
|
|
55
|
-
stroke: "currentColor",
|
|
56
|
-
strokeWidth: "2",
|
|
57
|
-
"aria-hidden": "true",
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" }),
|
|
60
|
-
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "7" })
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
clearable && !disabled && value && /* @__PURE__ */ jsx(
|
|
65
|
-
"button",
|
|
66
|
-
{
|
|
67
|
-
type: "button",
|
|
68
|
-
onClick: clear,
|
|
69
|
-
className: "absolute right-9 top-1/2 -translate-y-1/2 grid h-6 w-6 place-items-center rounded-md text-slate-400 hover:text-slate-700 hover:bg-slate-100 dark:hover:bg-white/10",
|
|
70
|
-
"aria-label": "Limpiar b\xFAsqueda",
|
|
71
|
-
title: "Limpiar",
|
|
72
|
-
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", className: "h-4 w-4", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
73
|
-
"path",
|
|
39
|
+
},
|
|
40
|
+
rightSlot: /* @__PURE__ */ jsxs(
|
|
41
|
+
"svg",
|
|
74
42
|
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
className: "h-5 w-5 opacity-50",
|
|
45
|
+
fill: "none",
|
|
46
|
+
stroke: "currentColor",
|
|
47
|
+
strokeWidth: "2",
|
|
48
|
+
"aria-hidden": "true",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" }),
|
|
51
|
+
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "7" })
|
|
52
|
+
]
|
|
78
53
|
}
|
|
79
|
-
)
|
|
54
|
+
)
|
|
80
55
|
}
|
|
81
56
|
)
|
|
82
57
|
] });
|
package/dist/Select.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(Select_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(Select_exports);
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_Button = __toESM(require("./Button"));
|
|
37
38
|
const S = {
|
|
38
39
|
sm: { h: "h-8", text: "text-[13px]", radius: "rounded-xl", padX: "px-3", itemPad: "px-3 py-1.5" },
|
|
39
40
|
md: { h: "h-10", text: "text-sm", radius: "rounded-2xl", padX: "px-3.5", itemPad: "px-3.5 py-2" },
|
|
@@ -162,8 +163,9 @@ function ModernSelect({
|
|
|
162
163
|
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mb-1.5 text-[13px] font-semibold", children: label }),
|
|
163
164
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
|
|
164
165
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
165
|
-
|
|
166
|
+
import_Button.default,
|
|
166
167
|
{
|
|
168
|
+
unstyled: true,
|
|
167
169
|
ref: btnRef,
|
|
168
170
|
id: selectId,
|
|
169
171
|
type: "button",
|
|
@@ -202,8 +204,9 @@ function ModernSelect({
|
|
|
202
204
|
}
|
|
203
205
|
),
|
|
204
206
|
clearable && value !== "" && !disabled && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
205
|
-
|
|
207
|
+
import_Button.default,
|
|
206
208
|
{
|
|
209
|
+
unstyled: true,
|
|
207
210
|
type: "button",
|
|
208
211
|
onClick: clear,
|
|
209
212
|
className: "absolute right-9 top-1/2 -translate-y-1/2 grid h-6 w-6 place-items-center rounded-md text-slate-400 hover:text-slate-700 hover:bg-slate-100 dark:hover:bg-white/10",
|
package/dist/Select.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
|
+
import Button from "./Button";
|
|
4
5
|
const S = {
|
|
5
6
|
sm: { h: "h-8", text: "text-[13px]", radius: "rounded-xl", padX: "px-3", itemPad: "px-3 py-1.5" },
|
|
6
7
|
md: { h: "h-10", text: "text-sm", radius: "rounded-2xl", padX: "px-3.5", itemPad: "px-3.5 py-2" },
|
|
@@ -129,8 +130,9 @@ function ModernSelect({
|
|
|
129
130
|
label && /* @__PURE__ */ jsx("div", { className: "mb-1.5 text-[13px] font-semibold", children: label }),
|
|
130
131
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
131
132
|
/* @__PURE__ */ jsx(
|
|
132
|
-
|
|
133
|
+
Button,
|
|
133
134
|
{
|
|
135
|
+
unstyled: true,
|
|
134
136
|
ref: btnRef,
|
|
135
137
|
id: selectId,
|
|
136
138
|
type: "button",
|
|
@@ -169,8 +171,9 @@ function ModernSelect({
|
|
|
169
171
|
}
|
|
170
172
|
),
|
|
171
173
|
clearable && value !== "" && !disabled && /* @__PURE__ */ jsx(
|
|
172
|
-
|
|
174
|
+
Button,
|
|
173
175
|
{
|
|
176
|
+
unstyled: true,
|
|
174
177
|
type: "button",
|
|
175
178
|
onClick: clear,
|
|
176
179
|
className: "absolute right-9 top-1/2 -translate-y-1/2 grid h-6 w-6 place-items-center rounded-md text-slate-400 hover:text-slate-700 hover:bg-slate-100 dark:hover:bg-white/10",
|
package/dist/Sidebar.d.mts
CHANGED
|
@@ -23,13 +23,12 @@ type SidebarProps = {
|
|
|
23
23
|
user?: SidebarUser;
|
|
24
24
|
userMenuSlot?: React__default.ReactNode;
|
|
25
25
|
onBrandClick?: () => void;
|
|
26
|
-
/** LocalStorage key para persistir colapsado */
|
|
27
26
|
collapsedKey?: string;
|
|
28
|
-
/** Rotulación de marca, valores por defecto mantienen estilos existentes */
|
|
29
27
|
brandInitials?: string;
|
|
30
28
|
brandTitle?: string;
|
|
31
29
|
brandSubtitle?: string;
|
|
30
|
+
color?: "slate" | "gray" | "zinc" | "neutral" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
32
31
|
};
|
|
33
|
-
declare function Sidebar({ items, activeKey, onNavigate, user, userMenuSlot, onBrandClick, collapsedKey, brandInitials, brandTitle, brandSubtitle, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare function Sidebar({ items, activeKey, onNavigate, user, userMenuSlot, onBrandClick, collapsedKey, brandInitials, brandTitle, brandSubtitle, color, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
34
33
|
|
|
35
34
|
export { type SidebarItem, type SidebarProps, type SidebarUser, Sidebar as default };
|
package/dist/Sidebar.d.ts
CHANGED
|
@@ -23,13 +23,12 @@ type SidebarProps = {
|
|
|
23
23
|
user?: SidebarUser;
|
|
24
24
|
userMenuSlot?: React__default.ReactNode;
|
|
25
25
|
onBrandClick?: () => void;
|
|
26
|
-
/** LocalStorage key para persistir colapsado */
|
|
27
26
|
collapsedKey?: string;
|
|
28
|
-
/** Rotulación de marca, valores por defecto mantienen estilos existentes */
|
|
29
27
|
brandInitials?: string;
|
|
30
28
|
brandTitle?: string;
|
|
31
29
|
brandSubtitle?: string;
|
|
30
|
+
color?: "slate" | "gray" | "zinc" | "neutral" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
32
31
|
};
|
|
33
|
-
declare function Sidebar({ items, activeKey, onNavigate, user, userMenuSlot, onBrandClick, collapsedKey, brandInitials, brandTitle, brandSubtitle, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare function Sidebar({ items, activeKey, onNavigate, user, userMenuSlot, onBrandClick, collapsedKey, brandInitials, brandTitle, brandSubtitle, color, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
34
33
|
|
|
35
34
|
export { type SidebarItem, type SidebarProps, type SidebarUser, Sidebar as default };
|