framepexls-ui-lib 0.1.4

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 (125) hide show
  1. package/dist/ActionIconButton.d.mts +11 -0
  2. package/dist/ActionIconButton.d.ts +11 -0
  3. package/dist/ActionIconButton.js +71 -0
  4. package/dist/ActionIconButton.mjs +41 -0
  5. package/dist/AppTopbar.d.mts +17 -0
  6. package/dist/AppTopbar.d.ts +17 -0
  7. package/dist/AppTopbar.js +51 -0
  8. package/dist/AppTopbar.mjs +31 -0
  9. package/dist/AvatarSquare.d.mts +16 -0
  10. package/dist/AvatarSquare.d.ts +16 -0
  11. package/dist/AvatarSquare.js +82 -0
  12. package/dist/AvatarSquare.mjs +52 -0
  13. package/dist/Badge.d.mts +13 -0
  14. package/dist/Badge.d.ts +13 -0
  15. package/dist/Badge.js +65 -0
  16. package/dist/Badge.mjs +45 -0
  17. package/dist/BadgeCluster.d.mts +17 -0
  18. package/dist/BadgeCluster.d.ts +17 -0
  19. package/dist/BadgeCluster.js +125 -0
  20. package/dist/BadgeCluster.mjs +95 -0
  21. package/dist/Breadcrumb.d.mts +11 -0
  22. package/dist/Breadcrumb.d.ts +11 -0
  23. package/dist/Breadcrumb.js +42 -0
  24. package/dist/Breadcrumb.mjs +12 -0
  25. package/dist/Button.d.mts +15 -0
  26. package/dist/Button.d.ts +15 -0
  27. package/dist/Button.js +72 -0
  28. package/dist/Button.mjs +52 -0
  29. package/dist/CalendarPanel.d.mts +13 -0
  30. package/dist/CalendarPanel.d.ts +13 -0
  31. package/dist/CalendarPanel.js +110 -0
  32. package/dist/CalendarPanel.mjs +90 -0
  33. package/dist/ChartCard.d.mts +15 -0
  34. package/dist/ChartCard.d.ts +15 -0
  35. package/dist/ChartCard.js +44 -0
  36. package/dist/ChartCard.mjs +24 -0
  37. package/dist/CheckboxPillsGroup.d.mts +28 -0
  38. package/dist/CheckboxPillsGroup.d.ts +28 -0
  39. package/dist/CheckboxPillsGroup.js +186 -0
  40. package/dist/CheckboxPillsGroup.mjs +156 -0
  41. package/dist/ColumnSelector.d.mts +17 -0
  42. package/dist/ColumnSelector.d.ts +17 -0
  43. package/dist/ColumnSelector.js +74 -0
  44. package/dist/ColumnSelector.mjs +54 -0
  45. package/dist/ComboSelect.d.mts +46 -0
  46. package/dist/ComboSelect.d.ts +46 -0
  47. package/dist/ComboSelect.js +442 -0
  48. package/dist/ComboSelect.mjs +412 -0
  49. package/dist/DateTimeField.d.mts +22 -0
  50. package/dist/DateTimeField.d.ts +22 -0
  51. package/dist/DateTimeField.js +409 -0
  52. package/dist/DateTimeField.mjs +379 -0
  53. package/dist/Dialog.d.mts +82 -0
  54. package/dist/Dialog.d.ts +82 -0
  55. package/dist/Dialog.js +408 -0
  56. package/dist/Dialog.mjs +368 -0
  57. package/dist/Dropdown.d.mts +52 -0
  58. package/dist/Dropdown.d.ts +52 -0
  59. package/dist/Dropdown.js +333 -0
  60. package/dist/Dropdown.mjs +313 -0
  61. package/dist/EmptyState.d.mts +8 -0
  62. package/dist/EmptyState.d.ts +8 -0
  63. package/dist/EmptyState.js +35 -0
  64. package/dist/EmptyState.mjs +15 -0
  65. package/dist/InfoGrid.d.mts +20 -0
  66. package/dist/InfoGrid.d.ts +20 -0
  67. package/dist/InfoGrid.js +67 -0
  68. package/dist/InfoGrid.mjs +47 -0
  69. package/dist/Input.d.mts +20 -0
  70. package/dist/Input.d.ts +20 -0
  71. package/dist/Input.js +85 -0
  72. package/dist/Input.mjs +55 -0
  73. package/dist/Money.d.mts +8 -0
  74. package/dist/Money.d.ts +8 -0
  75. package/dist/Money.js +30 -0
  76. package/dist/Money.mjs +10 -0
  77. package/dist/OrderButton.d.mts +11 -0
  78. package/dist/OrderButton.d.ts +11 -0
  79. package/dist/OrderButton.js +39 -0
  80. package/dist/OrderButton.mjs +19 -0
  81. package/dist/Pagination.d.mts +12 -0
  82. package/dist/Pagination.d.ts +12 -0
  83. package/dist/Pagination.js +71 -0
  84. package/dist/Pagination.mjs +51 -0
  85. package/dist/SearchInput.d.mts +17 -0
  86. package/dist/SearchInput.d.ts +17 -0
  87. package/dist/SearchInput.js +116 -0
  88. package/dist/SearchInput.mjs +86 -0
  89. package/dist/Select.d.mts +31 -0
  90. package/dist/Select.d.ts +31 -0
  91. package/dist/Select.js +293 -0
  92. package/dist/Select.mjs +263 -0
  93. package/dist/StatCard.d.mts +15 -0
  94. package/dist/StatCard.d.ts +15 -0
  95. package/dist/StatCard.js +47 -0
  96. package/dist/StatCard.mjs +27 -0
  97. package/dist/Steps.d.mts +31 -0
  98. package/dist/Steps.d.ts +31 -0
  99. package/dist/Steps.js +123 -0
  100. package/dist/Steps.mjs +99 -0
  101. package/dist/Table.d.mts +31 -0
  102. package/dist/Table.d.ts +31 -0
  103. package/dist/Table.js +153 -0
  104. package/dist/Table.mjs +117 -0
  105. package/dist/TimeAgo.d.mts +12 -0
  106. package/dist/TimeAgo.d.ts +12 -0
  107. package/dist/TimeAgo.js +104 -0
  108. package/dist/TimeAgo.mjs +74 -0
  109. package/dist/TimePanel.d.mts +14 -0
  110. package/dist/TimePanel.d.ts +14 -0
  111. package/dist/TimePanel.js +145 -0
  112. package/dist/TimePanel.mjs +125 -0
  113. package/dist/TimePopover.d.mts +33 -0
  114. package/dist/TimePopover.d.ts +33 -0
  115. package/dist/TimePopover.js +441 -0
  116. package/dist/TimePopover.mjs +406 -0
  117. package/dist/iconos/index.d.mts +60 -0
  118. package/dist/iconos/index.d.ts +60 -0
  119. package/dist/iconos/index.js +621 -0
  120. package/dist/iconos/index.mjs +548 -0
  121. package/dist/index.d.mts +32 -0
  122. package/dist/index.d.ts +32 -0
  123. package/dist/index.js +141 -0
  124. package/dist/index.mjs +70 -0
  125. package/package.json +178 -0
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ function EmptyState({
4
+ title = "Sin resultados",
5
+ subtitle = "Intenta cambiar el t\xE9rmino de b\xFAsqueda o los filtros."
6
+ }) {
7
+ return /* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-sm", children: [
8
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mb-4 h-14 w-14 rounded-2xl bg-slate-100 ring-1 ring-slate-200 dark:bg-white/5" }),
9
+ /* @__PURE__ */ jsx("div", { className: "text-lg font-medium", children: title }),
10
+ /* @__PURE__ */ jsx("div", { className: "text-sm text-slate-500", children: subtitle })
11
+ ] });
12
+ }
13
+ export {
14
+ EmptyState as default
15
+ };
@@ -0,0 +1,20 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+
4
+ type InfoItem = {
5
+ name: React__default.ReactNode;
6
+ description?: React__default.ReactNode;
7
+ };
8
+ type Props = {
9
+ items: InfoItem[];
10
+ /** placeholder cuando no hay valor */
11
+ placeholder?: React__default.ReactNode;
12
+ /** columnas en sm+ (1|2|3|4). default: 2 */
13
+ smCols?: 1 | 2 | 3 | 4;
14
+ /** columnas en md+ (opcional) */
15
+ mdCols?: 1 | 2 | 3 | 4;
16
+ className?: string;
17
+ };
18
+ declare function InfoGrid({ items, placeholder, smCols, mdCols, className, }: Props): react_jsx_runtime.JSX.Element;
19
+
20
+ export { type InfoItem, InfoGrid as default };
@@ -0,0 +1,20 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+
4
+ type InfoItem = {
5
+ name: React__default.ReactNode;
6
+ description?: React__default.ReactNode;
7
+ };
8
+ type Props = {
9
+ items: InfoItem[];
10
+ /** placeholder cuando no hay valor */
11
+ placeholder?: React__default.ReactNode;
12
+ /** columnas en sm+ (1|2|3|4). default: 2 */
13
+ smCols?: 1 | 2 | 3 | 4;
14
+ /** columnas en md+ (opcional) */
15
+ mdCols?: 1 | 2 | 3 | 4;
16
+ className?: string;
17
+ };
18
+ declare function InfoGrid({ items, placeholder, smCols, mdCols, className, }: Props): react_jsx_runtime.JSX.Element;
19
+
20
+ export { type InfoItem, InfoGrid as default };
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var InfoGrid_exports = {};
21
+ __export(InfoGrid_exports, {
22
+ default: () => InfoGrid
23
+ });
24
+ module.exports = __toCommonJS(InfoGrid_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ const colClass = (bp, n) => {
27
+ if (!n) return "";
28
+ const map = {
29
+ 1: `${bp}:grid-cols-1`,
30
+ 2: `${bp}:grid-cols-2`,
31
+ 3: `${bp}:grid-cols-3`,
32
+ 4: `${bp}:grid-cols-4`
33
+ };
34
+ return map[n];
35
+ };
36
+ function InfoGrid({
37
+ items,
38
+ placeholder = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-slate-400", children: "\u2014" }),
39
+ smCols = 2,
40
+ mdCols,
41
+ className
42
+ }) {
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ "dl",
45
+ {
46
+ className: [
47
+ "grid grid-cols-1 gap-x-8 gap-y-4",
48
+ colClass("sm", smCols),
49
+ colClass("md", mdCols),
50
+ className != null ? className : ""
51
+ ].join(" "),
52
+ children: items.map((it, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InfoCell, { name: it.name, description: it.description, placeholder }, i))
53
+ }
54
+ );
55
+ }
56
+ function InfoCell({
57
+ name,
58
+ description,
59
+ placeholder
60
+ }) {
61
+ const isEmptyString = typeof description === "string" && description.trim().length === 0;
62
+ const showValue = description === null || description === void 0 || isEmptyString ? placeholder : description;
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { className: "text-[13px] font-semibold text-slate-600", children: name }),
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "mt-0.5 text-sm font-medium text-slate-900 dark:text-slate-100 break-words", children: showValue })
66
+ ] });
67
+ }
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ const colClass = (bp, n) => {
4
+ if (!n) return "";
5
+ const map = {
6
+ 1: `${bp}:grid-cols-1`,
7
+ 2: `${bp}:grid-cols-2`,
8
+ 3: `${bp}:grid-cols-3`,
9
+ 4: `${bp}:grid-cols-4`
10
+ };
11
+ return map[n];
12
+ };
13
+ function InfoGrid({
14
+ items,
15
+ placeholder = /* @__PURE__ */ jsx("span", { className: "text-slate-400", children: "\u2014" }),
16
+ smCols = 2,
17
+ mdCols,
18
+ className
19
+ }) {
20
+ return /* @__PURE__ */ jsx(
21
+ "dl",
22
+ {
23
+ className: [
24
+ "grid grid-cols-1 gap-x-8 gap-y-4",
25
+ colClass("sm", smCols),
26
+ colClass("md", mdCols),
27
+ className != null ? className : ""
28
+ ].join(" "),
29
+ children: items.map((it, i) => /* @__PURE__ */ jsx(InfoCell, { name: it.name, description: it.description, placeholder }, i))
30
+ }
31
+ );
32
+ }
33
+ function InfoCell({
34
+ name,
35
+ description,
36
+ placeholder
37
+ }) {
38
+ const isEmptyString = typeof description === "string" && description.trim().length === 0;
39
+ const showValue = description === null || description === void 0 || isEmptyString ? placeholder : description;
40
+ return /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
41
+ /* @__PURE__ */ jsx("dt", { className: "text-[13px] font-semibold text-slate-600", children: name }),
42
+ /* @__PURE__ */ jsx("dd", { className: "mt-0.5 text-sm font-medium text-slate-900 dark:text-slate-100 break-words", children: showValue })
43
+ ] });
44
+ }
45
+ export {
46
+ InfoGrid as default
47
+ };
@@ -0,0 +1,20 @@
1
+ import React__default from 'react';
2
+
3
+ type InputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
4
+ error?: boolean;
5
+ leftSlot?: React__default.ReactNode;
6
+ rightSlot?: React__default.ReactNode;
7
+ clearable?: boolean;
8
+ onClear?: () => void;
9
+ tone?: "default" | "danger";
10
+ };
11
+ declare const Input: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
12
+ error?: boolean;
13
+ leftSlot?: React__default.ReactNode;
14
+ rightSlot?: React__default.ReactNode;
15
+ clearable?: boolean;
16
+ onClear?: () => void;
17
+ tone?: "default" | "danger";
18
+ } & React__default.RefAttributes<HTMLInputElement>>;
19
+
20
+ export { type InputProps, Input as default };
@@ -0,0 +1,20 @@
1
+ import React__default from 'react';
2
+
3
+ type InputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
4
+ error?: boolean;
5
+ leftSlot?: React__default.ReactNode;
6
+ rightSlot?: React__default.ReactNode;
7
+ clearable?: boolean;
8
+ onClear?: () => void;
9
+ tone?: "default" | "danger";
10
+ };
11
+ declare const Input: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
12
+ error?: boolean;
13
+ leftSlot?: React__default.ReactNode;
14
+ rightSlot?: React__default.ReactNode;
15
+ clearable?: boolean;
16
+ onClear?: () => void;
17
+ tone?: "default" | "danger";
18
+ } & React__default.RefAttributes<HTMLInputElement>>;
19
+
20
+ export { type InputProps, Input as default };
package/dist/Input.js ADDED
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
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
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var Input_exports = {};
31
+ __export(Input_exports, {
32
+ default: () => Input_default
33
+ });
34
+ module.exports = __toCommonJS(Input_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_react = __toESM(require("react"));
37
+ function cx(...a) {
38
+ return a.filter(Boolean).join(" ");
39
+ }
40
+ const baseControl = "w-full rounded-2xl border border-slate-200 bg-white px-3.5 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 shadow-sm outline-none transition focus:ring-4 focus:ring-slate-900/5 focus: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:ring-white/10";
41
+ const errorControl = "border-blue-300 focus:border-blue-300 focus:ring-blue-500/15";
42
+ const Input = import_react.default.forwardRef(
43
+ ({ className, error, leftSlot, rightSlot, clearable, onClear, tone = "default", value, onChange, ...props }, ref) => {
44
+ const showClear = clearable && !!value && !props.readOnly && !props.disabled;
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative content-center", children: [
46
+ leftSlot && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-slate-400", children: leftSlot }),
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
+ "input",
49
+ {
50
+ ref,
51
+ value,
52
+ onChange,
53
+ "aria-invalid": error ? true : void 0,
54
+ className: cx(
55
+ baseControl,
56
+ (Boolean(leftSlot) || props.type === "search") && "pl-9",
57
+ (Boolean(rightSlot) || showClear) && "pr-10",
58
+ (error || tone === "danger") && errorControl,
59
+ className
60
+ ),
61
+ ...props
62
+ }
63
+ ),
64
+ showClear ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
+ "button",
66
+ {
67
+ type: "button",
68
+ title: "Limpiar",
69
+ className: "absolute right-2.5 top-1/2 -translate-y-1/2 inline-flex h-7 w-7 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 hover:bg-slate-50 active:scale-95 dark:border-white/10 dark:bg-white/5",
70
+ onClick: (e) => {
71
+ e.preventDefault();
72
+ onClear == null ? void 0 : onClear();
73
+ const tgt = e.currentTarget.previousElementSibling;
74
+ if (tgt && onChange) {
75
+ onChange({ target: { value: "" } });
76
+ }
77
+ },
78
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { viewBox: "0 0 24 24", className: "h-4.5 w-4.5", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M18 6L6 18M6 6l12 12" }) })
79
+ }
80
+ ) : rightSlot && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-slate-400", children: rightSlot })
81
+ ] });
82
+ }
83
+ );
84
+ Input.displayName = "Input";
85
+ var Input_default = Input;
package/dist/Input.mjs ADDED
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import React from "react";
4
+ function cx(...a) {
5
+ return a.filter(Boolean).join(" ");
6
+ }
7
+ const baseControl = "w-full rounded-2xl border border-slate-200 bg-white px-3.5 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 shadow-sm outline-none transition focus:ring-4 focus:ring-slate-900/5 focus: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:ring-white/10";
8
+ const errorControl = "border-blue-300 focus:border-blue-300 focus:ring-blue-500/15";
9
+ const Input = React.forwardRef(
10
+ ({ className, error, leftSlot, rightSlot, clearable, onClear, tone = "default", value, onChange, ...props }, ref) => {
11
+ const showClear = clearable && !!value && !props.readOnly && !props.disabled;
12
+ return /* @__PURE__ */ jsxs("div", { className: "relative content-center", children: [
13
+ leftSlot && /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-slate-400", children: leftSlot }),
14
+ /* @__PURE__ */ jsx(
15
+ "input",
16
+ {
17
+ ref,
18
+ value,
19
+ onChange,
20
+ "aria-invalid": error ? true : void 0,
21
+ className: cx(
22
+ baseControl,
23
+ (Boolean(leftSlot) || props.type === "search") && "pl-9",
24
+ (Boolean(rightSlot) || showClear) && "pr-10",
25
+ (error || tone === "danger") && errorControl,
26
+ className
27
+ ),
28
+ ...props
29
+ }
30
+ ),
31
+ showClear ? /* @__PURE__ */ jsx(
32
+ "button",
33
+ {
34
+ type: "button",
35
+ title: "Limpiar",
36
+ className: "absolute right-2.5 top-1/2 -translate-y-1/2 inline-flex h-7 w-7 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-600 hover:bg-slate-50 active:scale-95 dark:border-white/10 dark:bg-white/5",
37
+ onClick: (e) => {
38
+ e.preventDefault();
39
+ onClear == null ? void 0 : onClear();
40
+ const tgt = e.currentTarget.previousElementSibling;
41
+ if (tgt && onChange) {
42
+ onChange({ target: { value: "" } });
43
+ }
44
+ },
45
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-4.5 w-4.5", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" }) })
46
+ }
47
+ ) : rightSlot && /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-slate-400", children: rightSlot })
48
+ ] });
49
+ }
50
+ );
51
+ Input.displayName = "Input";
52
+ var Input_default = Input;
53
+ export {
54
+ Input_default as default
55
+ };
@@ -0,0 +1,8 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function Money({ amount, currency }: {
4
+ amount: number;
5
+ currency?: string;
6
+ }): react_jsx_runtime.JSX.Element;
7
+
8
+ export { Money as default };
@@ -0,0 +1,8 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function Money({ amount, currency }: {
4
+ amount: number;
5
+ currency?: string;
6
+ }): react_jsx_runtime.JSX.Element;
7
+
8
+ export { Money as default };
package/dist/Money.js ADDED
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var Money_exports = {};
21
+ __export(Money_exports, {
22
+ default: () => Money
23
+ });
24
+ module.exports = __toCommonJS(Money_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ function Money({ amount, currency = "MXN" }) {
27
+ const s = amount.toLocaleString("es-MX", { style: "currency", currency });
28
+ const cls = amount > 0 ? "font-semibold text-blue-600 dark:text-blue-400" : "text-slate-600";
29
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: cls, children: s });
30
+ }
package/dist/Money.mjs ADDED
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ function Money({ amount, currency = "MXN" }) {
4
+ const s = amount.toLocaleString("es-MX", { style: "currency", currency });
5
+ const cls = amount > 0 ? "font-semibold text-blue-600 dark:text-blue-400" : "text-slate-600";
6
+ return /* @__PURE__ */ jsx("span", { className: cls, children: s });
7
+ }
8
+ export {
9
+ Money as default
10
+ };
@@ -0,0 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type Props = {
4
+ label: string;
5
+ active?: boolean;
6
+ asc?: boolean;
7
+ onClick?: () => void;
8
+ };
9
+ declare function OrderButton({ label, active, asc, onClick }: Props): react_jsx_runtime.JSX.Element;
10
+
11
+ export { OrderButton as default };
@@ -0,0 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type Props = {
4
+ label: string;
5
+ active?: boolean;
6
+ asc?: boolean;
7
+ onClick?: () => void;
8
+ };
9
+ declare function OrderButton({ label, active, asc, onClick }: Props): react_jsx_runtime.JSX.Element;
10
+
11
+ export { OrderButton as default };
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var OrderButton_exports = {};
21
+ __export(OrderButton_exports, {
22
+ default: () => OrderButton
23
+ });
24
+ module.exports = __toCommonJS(OrderButton_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ function OrderButton({ label, active, asc, onClick }) {
27
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
28
+ "button",
29
+ {
30
+ onClick,
31
+ 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
+ children: [
33
+ label,
34
+ " ",
35
+ active && (asc ? "\u2191" : "\u2193")
36
+ ]
37
+ }
38
+ );
39
+ }
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { jsxs } from "react/jsx-runtime";
3
+ function OrderButton({ label, active, asc, onClick }) {
4
+ return /* @__PURE__ */ jsxs(
5
+ "button",
6
+ {
7
+ onClick,
8
+ 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
+ children: [
10
+ label,
11
+ " ",
12
+ active && (asc ? "\u2191" : "\u2193")
13
+ ]
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ OrderButton as default
19
+ };
@@ -0,0 +1,12 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type PaginationProps = {
4
+ page: number;
5
+ totalPages: number;
6
+ onPageChange: (p: number) => void;
7
+ maxButtons?: number;
8
+ className?: string;
9
+ };
10
+ declare function Pagination({ page, totalPages, onPageChange, maxButtons, className, }: PaginationProps): react_jsx_runtime.JSX.Element;
11
+
12
+ export { type PaginationProps, Pagination as default };
@@ -0,0 +1,12 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type PaginationProps = {
4
+ page: number;
5
+ totalPages: number;
6
+ onPageChange: (p: number) => void;
7
+ maxButtons?: number;
8
+ className?: string;
9
+ };
10
+ declare function Pagination({ page, totalPages, onPageChange, maxButtons, className, }: PaginationProps): react_jsx_runtime.JSX.Element;
11
+
12
+ export { type PaginationProps, Pagination as default };
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var Pagination_exports = {};
21
+ __export(Pagination_exports, {
22
+ default: () => Pagination
23
+ });
24
+ module.exports = __toCommonJS(Pagination_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ function Pagination({
27
+ page,
28
+ totalPages,
29
+ onPageChange,
30
+ maxButtons = 7,
31
+ className = ""
32
+ }) {
33
+ const getRange = () => {
34
+ if (totalPages <= maxButtons)
35
+ return Array.from({ length: totalPages }, (_, i) => i + 1);
36
+ const siblings = 1;
37
+ const start = Math.max(2, page - siblings);
38
+ const end = Math.min(totalPages - 1, page + siblings);
39
+ const range2 = [1];
40
+ if (start > 2) range2.push("...");
41
+ for (let i = start; i <= end; i++) range2.push(i);
42
+ if (end < totalPages - 1) range2.push("...");
43
+ range2.push(totalPages);
44
+ return range2;
45
+ };
46
+ const range = getRange();
47
+ const Btn = ({
48
+ children,
49
+ active,
50
+ disabled,
51
+ onClick
52
+ }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
+ "button",
54
+ {
55
+ disabled,
56
+ onClick,
57
+ className: `h-10 min-w-10 px-3 inline-flex items-center justify-center text-[15px] font-medium transition
58
+ ${active ? "bg-blue-600 text-white rounded-2xl shadow-sm" : "rounded-none text-slate-900 hover:bg-white/60"}
59
+ ${disabled ? "opacity-40 cursor-not-allowed" : ""}`,
60
+ "aria-current": active ? "page" : void 0,
61
+ children
62
+ }
63
+ );
64
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { className: className || "w-full md:w-auto", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "inline-flex overflow-hidden rounded-2xl border border-slate-200 bg-slate-100/60 shadow-sm dark:border-white/10 dark:bg-white/5", children: [
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Btn, { disabled: page === 1, onClick: () => onPageChange(page - 1), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { viewBox: "0 0 24 24", className: "h-5 w-5", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 18l-6-6 6-6" }) }) }),
66
+ range.map(
67
+ (it, idx) => it === "..." ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "h-10 min-w-10 px-3 inline-flex items-center justify-center text-slate-500", children: "\u2026" }, `dots-${idx}`) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Btn, { active: it === page, onClick: () => onPageChange(it), children: it }, it)
68
+ ),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Btn, { disabled: page === totalPages, onClick: () => onPageChange(page + 1), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { viewBox: "0 0 24 24", className: "h-5 w-5", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9 6l6 6-6 6" }) }) })
70
+ ] }) });
71
+ }
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ function Pagination({
4
+ page,
5
+ totalPages,
6
+ onPageChange,
7
+ maxButtons = 7,
8
+ className = ""
9
+ }) {
10
+ const getRange = () => {
11
+ if (totalPages <= maxButtons)
12
+ return Array.from({ length: totalPages }, (_, i) => i + 1);
13
+ const siblings = 1;
14
+ const start = Math.max(2, page - siblings);
15
+ const end = Math.min(totalPages - 1, page + siblings);
16
+ const range2 = [1];
17
+ if (start > 2) range2.push("...");
18
+ for (let i = start; i <= end; i++) range2.push(i);
19
+ if (end < totalPages - 1) range2.push("...");
20
+ range2.push(totalPages);
21
+ return range2;
22
+ };
23
+ const range = getRange();
24
+ const Btn = ({
25
+ children,
26
+ active,
27
+ disabled,
28
+ onClick
29
+ }) => /* @__PURE__ */ jsx(
30
+ "button",
31
+ {
32
+ disabled,
33
+ onClick,
34
+ className: `h-10 min-w-10 px-3 inline-flex items-center justify-center text-[15px] font-medium transition
35
+ ${active ? "bg-blue-600 text-white rounded-2xl shadow-sm" : "rounded-none text-slate-900 hover:bg-white/60"}
36
+ ${disabled ? "opacity-40 cursor-not-allowed" : ""}`,
37
+ "aria-current": active ? "page" : void 0,
38
+ children
39
+ }
40
+ );
41
+ return /* @__PURE__ */ jsx("nav", { className: className || "w-full md:w-auto", children: /* @__PURE__ */ jsxs("div", { className: "inline-flex overflow-hidden rounded-2xl border border-slate-200 bg-slate-100/60 shadow-sm dark:border-white/10 dark:bg-white/5", children: [
42
+ /* @__PURE__ */ jsx(Btn, { disabled: page === 1, onClick: () => onPageChange(page - 1), children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-5 w-5", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M15 18l-6-6 6-6" }) }) }),
43
+ range.map(
44
+ (it, idx) => it === "..." ? /* @__PURE__ */ jsx("span", { className: "h-10 min-w-10 px-3 inline-flex items-center justify-center text-slate-500", children: "\u2026" }, `dots-${idx}`) : /* @__PURE__ */ jsx(Btn, { active: it === page, onClick: () => onPageChange(it), children: it }, it)
45
+ ),
46
+ /* @__PURE__ */ jsx(Btn, { disabled: page === totalPages, onClick: () => onPageChange(page + 1), children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-5 w-5", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M9 6l6 6-6 6" }) }) })
47
+ ] }) });
48
+ }
49
+ export {
50
+ Pagination as default
51
+ };