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,11 @@
1
+ import React__default from 'react';
2
+
3
+ declare const ActionIconButton: React__default.ForwardRefExoticComponent<{
4
+ title?: string;
5
+ danger?: boolean;
6
+ loading?: boolean;
7
+ size?: "sm" | "md" | "lg";
8
+ className?: string;
9
+ } & React__default.ButtonHTMLAttributes<HTMLButtonElement> & React__default.RefAttributes<HTMLButtonElement>>;
10
+
11
+ export { ActionIconButton as default };
@@ -0,0 +1,11 @@
1
+ import React__default from 'react';
2
+
3
+ declare const ActionIconButton: React__default.ForwardRefExoticComponent<{
4
+ title?: string;
5
+ danger?: boolean;
6
+ loading?: boolean;
7
+ size?: "sm" | "md" | "lg";
8
+ className?: string;
9
+ } & React__default.ButtonHTMLAttributes<HTMLButtonElement> & React__default.RefAttributes<HTMLButtonElement>>;
10
+
11
+ export { ActionIconButton as default };
@@ -0,0 +1,71 @@
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 ActionIconButton_exports = {};
31
+ __export(ActionIconButton_exports, {
32
+ default: () => ActionIconButton_default
33
+ });
34
+ module.exports = __toCommonJS(ActionIconButton_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_react = __toESM(require("react"));
37
+ const ActionIconButton = import_react.default.forwardRef(
38
+ ({
39
+ children,
40
+ title,
41
+ danger,
42
+ loading = false,
43
+ disabled,
44
+ size = "md",
45
+ className = "",
46
+ type = "button",
47
+ ...rest
48
+ }, ref) => {
49
+ const sizeCls = size === "sm" ? "h-8 w-8" : size === "lg" ? "h-10 w-10" : "h-9 w-9";
50
+ const base = "inline-flex items-center justify-center rounded-xl border transition hover:scale-105 active:scale-95 focus:outline-none focus-visible:ring-2 disabled:opacity-60 disabled:cursor-not-allowed";
51
+ const tone = danger ? "border-blue-200/70 bg-blue-50 text-blue-700 hover:bg-blue-100 dark:border-blue-800/50 dark:bg-blue-900/20 dark:hover:bg-blue-900/30 dark:text-blue-200" : "border-slate-200 bg-white text-slate-700 hover:bg-slate-50 dark:border-white/10 dark:bg-white/5 dark:hover:bg-white/10 dark:text-slate-200";
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
+ "button",
54
+ {
55
+ ref,
56
+ type,
57
+ title,
58
+ "aria-label": title,
59
+ disabled: disabled || loading,
60
+ className: `${base} ${tone} ${sizeCls} ${className}`,
61
+ ...rest,
62
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { viewBox: "0 0 24 24", className: "h-4.5 w-4.5 animate-spin", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "9", className: "opacity-25" }),
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M21 12a9 9 0 0 0-9-9", className: "opacity-90" })
65
+ ] }) : children
66
+ }
67
+ );
68
+ }
69
+ );
70
+ ActionIconButton.displayName = "ActionIconButton";
71
+ var ActionIconButton_default = ActionIconButton;
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import React from "react";
4
+ const ActionIconButton = React.forwardRef(
5
+ ({
6
+ children,
7
+ title,
8
+ danger,
9
+ loading = false,
10
+ disabled,
11
+ size = "md",
12
+ className = "",
13
+ type = "button",
14
+ ...rest
15
+ }, ref) => {
16
+ const sizeCls = size === "sm" ? "h-8 w-8" : size === "lg" ? "h-10 w-10" : "h-9 w-9";
17
+ const base = "inline-flex items-center justify-center rounded-xl border transition hover:scale-105 active:scale-95 focus:outline-none focus-visible:ring-2 disabled:opacity-60 disabled:cursor-not-allowed";
18
+ const tone = danger ? "border-blue-200/70 bg-blue-50 text-blue-700 hover:bg-blue-100 dark:border-blue-800/50 dark:bg-blue-900/20 dark:hover:bg-blue-900/30 dark:text-blue-200" : "border-slate-200 bg-white text-slate-700 hover:bg-slate-50 dark:border-white/10 dark:bg-white/5 dark:hover:bg-white/10 dark:text-slate-200";
19
+ return /* @__PURE__ */ jsx(
20
+ "button",
21
+ {
22
+ ref,
23
+ type,
24
+ title,
25
+ "aria-label": title,
26
+ disabled: disabled || loading,
27
+ className: `${base} ${tone} ${sizeCls} ${className}`,
28
+ ...rest,
29
+ children: loading ? /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", className: "h-4.5 w-4.5 animate-spin", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
30
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9", className: "opacity-25" }),
31
+ /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 0 0-9-9", className: "opacity-90" })
32
+ ] }) : children
33
+ }
34
+ );
35
+ }
36
+ );
37
+ ActionIconButton.displayName = "ActionIconButton";
38
+ var ActionIconButton_default = ActionIconButton;
39
+ export {
40
+ ActionIconButton_default as default
41
+ };
@@ -0,0 +1,17 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type Props = {
4
+ title: string;
5
+ subtitle?: string;
6
+ primary?: {
7
+ label: string;
8
+ onClick?: () => void;
9
+ };
10
+ secondary?: {
11
+ label: string;
12
+ onClick?: () => void;
13
+ };
14
+ };
15
+ declare function AppTopbar({ title, subtitle, secondary, primary }: Props): react_jsx_runtime.JSX.Element;
16
+
17
+ export { AppTopbar as default };
@@ -0,0 +1,17 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type Props = {
4
+ title: string;
5
+ subtitle?: string;
6
+ primary?: {
7
+ label: string;
8
+ onClick?: () => void;
9
+ };
10
+ secondary?: {
11
+ label: string;
12
+ onClick?: () => void;
13
+ };
14
+ };
15
+ declare function AppTopbar({ title, subtitle, secondary, primary }: Props): react_jsx_runtime.JSX.Element;
16
+
17
+ export { AppTopbar as default };
@@ -0,0 +1,51 @@
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 AppTopbar_exports = {};
21
+ __export(AppTopbar_exports, {
22
+ default: () => AppTopbar
23
+ });
24
+ module.exports = __toCommonJS(AppTopbar_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ function AppTopbar({ title, subtitle, secondary, primary }) {
27
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "sticky top-0 z-30 border-b border-black/5 bg-white backdrop-blur-xl dark:bg-[#0b0a0a]/60", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-4 sm:px-6 xl:px-8 xl:pl-20", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex h-16 items-center justify-between", children: [
28
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
29
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-lg font-semibold tracking-tight", children: title }),
30
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-slate-500", children: subtitle })
31
+ ] }) }),
32
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
33
+ secondary && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
34
+ "button",
35
+ {
36
+ onClick: secondary.onClick,
37
+ className: "rounded-xl border border-slate-200 px-3 py-2 text-sm font-medium shadow-sm hover:bg-slate-50 dark:border-white/10 dark:hover:bg-white/5",
38
+ children: secondary.label
39
+ }
40
+ ),
41
+ primary && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
+ "button",
43
+ {
44
+ onClick: primary.onClick,
45
+ className: "rounded-xl bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-700",
46
+ children: primary.label
47
+ }
48
+ )
49
+ ] })
50
+ ] }) }) });
51
+ }
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ function AppTopbar({ title, subtitle, secondary, primary }) {
4
+ return /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-30 border-b border-black/5 bg-white backdrop-blur-xl dark:bg-[#0b0a0a]/60", children: /* @__PURE__ */ jsx("div", { className: "px-4 sm:px-6 xl:px-8 xl:pl-20", children: /* @__PURE__ */ jsxs("div", { className: "flex h-16 items-center justify-between", children: [
5
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxs("div", { children: [
6
+ /* @__PURE__ */ jsx("h1", { className: "text-lg font-semibold tracking-tight", children: title }),
7
+ subtitle && /* @__PURE__ */ jsx("p", { className: "text-xs text-slate-500", children: subtitle })
8
+ ] }) }),
9
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
10
+ secondary && /* @__PURE__ */ jsx(
11
+ "button",
12
+ {
13
+ onClick: secondary.onClick,
14
+ className: "rounded-xl border border-slate-200 px-3 py-2 text-sm font-medium shadow-sm hover:bg-slate-50 dark:border-white/10 dark:hover:bg-white/5",
15
+ children: secondary.label
16
+ }
17
+ ),
18
+ primary && /* @__PURE__ */ jsx(
19
+ "button",
20
+ {
21
+ onClick: primary.onClick,
22
+ className: "rounded-xl bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-700",
23
+ children: primary.label
24
+ }
25
+ )
26
+ ] })
27
+ ] }) }) });
28
+ }
29
+ export {
30
+ AppTopbar as default
31
+ };
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type Props = {
4
+ size?: number;
5
+ /** URL de la imagen */
6
+ src?: string | null;
7
+ /** Texto alternativo para la imagen */
8
+ alt?: string;
9
+ /** Clases extra para ajustar estilos */
10
+ className?: string;
11
+ /** Radio del borde (por si quieres otra forma) */
12
+ radiusClass?: string;
13
+ };
14
+ declare function AvatarSquare({ size, src, alt, className, radiusClass, }: Props): react_jsx_runtime.JSX.Element;
15
+
16
+ export { AvatarSquare as default };
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type Props = {
4
+ size?: number;
5
+ /** URL de la imagen */
6
+ src?: string | null;
7
+ /** Texto alternativo para la imagen */
8
+ alt?: string;
9
+ /** Clases extra para ajustar estilos */
10
+ className?: string;
11
+ /** Radio del borde (por si quieres otra forma) */
12
+ radiusClass?: string;
13
+ };
14
+ declare function AvatarSquare({ size, src, alt, className, radiusClass, }: Props): react_jsx_runtime.JSX.Element;
15
+
16
+ export { AvatarSquare as default };
@@ -0,0 +1,82 @@
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 AvatarSquare_exports = {};
31
+ __export(AvatarSquare_exports, {
32
+ default: () => AvatarSquare
33
+ });
34
+ module.exports = __toCommonJS(AvatarSquare_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_react = __toESM(require("react"));
37
+ var import_image = __toESM(require("next/image"));
38
+ function AvatarSquare({
39
+ size = 32,
40
+ src,
41
+ alt = "",
42
+ className = "",
43
+ radiusClass = "rounded-xl"
44
+ }) {
45
+ const [error, setError] = import_react.default.useState(false);
46
+ const showImg = !!src && !error;
47
+ const boxStyle = { width: size, height: size };
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
49
+ "div",
50
+ {
51
+ style: boxStyle,
52
+ className: [
53
+ "relative shrink-0 overflow-hidden ring-1",
54
+ radiusClass,
55
+ "ring-blue-300/40 dark:ring-blue-300/20",
56
+ className
57
+ ].join(" "),
58
+ children: showImg ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
+ import_image.default,
60
+ {
61
+ src,
62
+ alt,
63
+ fill: true,
64
+ className: "object-cover",
65
+ sizes: `${size}px`,
66
+ priority: false,
67
+ onError: () => setError(true),
68
+ draggable: false
69
+ }
70
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
+ "div",
72
+ {
73
+ className: [
74
+ "h-full w-full",
75
+ radiusClass,
76
+ "bg-gradient-to-br from-blue-100 to-blue-200 dark:from-blue-900/20 dark:to-blue-800/20"
77
+ ].join(" ")
78
+ }
79
+ )
80
+ }
81
+ );
82
+ }
@@ -0,0 +1,52 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import React from "react";
4
+ import Image from "next/image";
5
+ function AvatarSquare({
6
+ size = 32,
7
+ src,
8
+ alt = "",
9
+ className = "",
10
+ radiusClass = "rounded-xl"
11
+ }) {
12
+ const [error, setError] = React.useState(false);
13
+ const showImg = !!src && !error;
14
+ const boxStyle = { width: size, height: size };
15
+ return /* @__PURE__ */ jsx(
16
+ "div",
17
+ {
18
+ style: boxStyle,
19
+ className: [
20
+ "relative shrink-0 overflow-hidden ring-1",
21
+ radiusClass,
22
+ "ring-blue-300/40 dark:ring-blue-300/20",
23
+ className
24
+ ].join(" "),
25
+ children: showImg ? /* @__PURE__ */ jsx(
26
+ Image,
27
+ {
28
+ src,
29
+ alt,
30
+ fill: true,
31
+ className: "object-cover",
32
+ sizes: `${size}px`,
33
+ priority: false,
34
+ onError: () => setError(true),
35
+ draggable: false
36
+ }
37
+ ) : /* @__PURE__ */ jsx(
38
+ "div",
39
+ {
40
+ className: [
41
+ "h-full w-full",
42
+ radiusClass,
43
+ "bg-gradient-to-br from-blue-100 to-blue-200 dark:from-blue-900/20 dark:to-blue-800/20"
44
+ ].join(" ")
45
+ }
46
+ )
47
+ }
48
+ );
49
+ }
50
+ export {
51
+ AvatarSquare as default
52
+ };
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+
4
+ type Tone = "emerald" | "indigo" | "amber" | "slate" | "rose" | "sky" | "violet" | "cyan" | "teal" | "pink" | "orange" | "lime";
5
+ declare function Badge({ tone, children, onClick, title, className, }: {
6
+ tone?: Tone;
7
+ children: React__default.ReactNode;
8
+ onClick?: (e: React__default.MouseEvent) => void;
9
+ title?: string;
10
+ className?: string;
11
+ }): react_jsx_runtime.JSX.Element;
12
+
13
+ export { type Tone, Badge as default };
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React__default from 'react';
3
+
4
+ type Tone = "emerald" | "indigo" | "amber" | "slate" | "rose" | "sky" | "violet" | "cyan" | "teal" | "pink" | "orange" | "lime";
5
+ declare function Badge({ tone, children, onClick, title, className, }: {
6
+ tone?: Tone;
7
+ children: React__default.ReactNode;
8
+ onClick?: (e: React__default.MouseEvent) => void;
9
+ title?: string;
10
+ className?: string;
11
+ }): react_jsx_runtime.JSX.Element;
12
+
13
+ export { type Tone, Badge as default };
package/dist/Badge.js ADDED
@@ -0,0 +1,65 @@
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 Badge_exports = {};
21
+ __export(Badge_exports, {
22
+ default: () => Badge
23
+ });
24
+ module.exports = __toCommonJS(Badge_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ const tones = {
27
+ emerald: "bg-emerald-100 text-emerald-700 ring-1 ring-emerald-200",
28
+ indigo: "bg-indigo-100 text-indigo-700 ring-1 ring-indigo-200",
29
+ amber: "bg-amber-100 text-amber-700 ring-1 ring-amber-200",
30
+ slate: "bg-slate-100 text-slate-700 ring-1 ring-slate-200",
31
+ rose: "bg-rose-100 text-rose-700 ring-1 ring-rose-200",
32
+ sky: "bg-sky-100 text-sky-700 ring-1 ring-sky-200",
33
+ violet: "bg-blue-100 text-blue-700 ring-1 ring-blue-200",
34
+ cyan: "bg-cyan-100 text-cyan-700 ring-1 ring-cyan-200",
35
+ teal: "bg-teal-100 text-teal-700 ring-1 ring-teal-200",
36
+ pink: "bg-pink-100 text-pink-700 ring-1 ring-pink-200",
37
+ orange: "bg-orange-100 text-orange-700 ring-1 ring-orange-200",
38
+ lime: "bg-lime-100 text-lime-700 ring-1 ring-lime-200"
39
+ };
40
+ function Badge({
41
+ tone = "slate",
42
+ children,
43
+ onClick,
44
+ title,
45
+ className = ""
46
+ }) {
47
+ const clickable = typeof onClick === "function";
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
49
+ "span",
50
+ {
51
+ title,
52
+ onClick,
53
+ className: [
54
+ "inline-flex items-center gap-2 rounded-full px-2.5 py-1 text-xs font-semibold truncate",
55
+ tones[tone],
56
+ clickable ? "cursor-pointer hover:opacity-90 active:scale-[0.98]" : "",
57
+ className
58
+ ].join(" "),
59
+ children: [
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "inline-block h-1.5 w-1.5 rounded-full bg-current opacity-70" }),
61
+ children
62
+ ]
63
+ }
64
+ );
65
+ }
package/dist/Badge.mjs ADDED
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ const tones = {
4
+ emerald: "bg-emerald-100 text-emerald-700 ring-1 ring-emerald-200",
5
+ indigo: "bg-indigo-100 text-indigo-700 ring-1 ring-indigo-200",
6
+ amber: "bg-amber-100 text-amber-700 ring-1 ring-amber-200",
7
+ slate: "bg-slate-100 text-slate-700 ring-1 ring-slate-200",
8
+ rose: "bg-rose-100 text-rose-700 ring-1 ring-rose-200",
9
+ sky: "bg-sky-100 text-sky-700 ring-1 ring-sky-200",
10
+ violet: "bg-blue-100 text-blue-700 ring-1 ring-blue-200",
11
+ cyan: "bg-cyan-100 text-cyan-700 ring-1 ring-cyan-200",
12
+ teal: "bg-teal-100 text-teal-700 ring-1 ring-teal-200",
13
+ pink: "bg-pink-100 text-pink-700 ring-1 ring-pink-200",
14
+ orange: "bg-orange-100 text-orange-700 ring-1 ring-orange-200",
15
+ lime: "bg-lime-100 text-lime-700 ring-1 ring-lime-200"
16
+ };
17
+ function Badge({
18
+ tone = "slate",
19
+ children,
20
+ onClick,
21
+ title,
22
+ className = ""
23
+ }) {
24
+ const clickable = typeof onClick === "function";
25
+ return /* @__PURE__ */ jsxs(
26
+ "span",
27
+ {
28
+ title,
29
+ onClick,
30
+ className: [
31
+ "inline-flex items-center gap-2 rounded-full px-2.5 py-1 text-xs font-semibold truncate",
32
+ tones[tone],
33
+ clickable ? "cursor-pointer hover:opacity-90 active:scale-[0.98]" : "",
34
+ className
35
+ ].join(" "),
36
+ children: [
37
+ /* @__PURE__ */ jsx("span", { className: "inline-block h-1.5 w-1.5 rounded-full bg-current opacity-70" }),
38
+ children
39
+ ]
40
+ }
41
+ );
42
+ }
43
+ export {
44
+ Badge as default
45
+ };
@@ -0,0 +1,17 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Tone } from './Badge.mjs';
3
+ import 'react';
4
+
5
+ type Item = {
6
+ label: string;
7
+ tone: Tone;
8
+ };
9
+ declare function BadgeCluster({ items, max, align, className, usePortal, }: {
10
+ items: Item[];
11
+ max?: number;
12
+ align?: "left" | "right";
13
+ className?: string;
14
+ usePortal?: boolean;
15
+ }): react_jsx_runtime.JSX.Element;
16
+
17
+ export { BadgeCluster as default };
@@ -0,0 +1,17 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Tone } from './Badge.js';
3
+ import 'react';
4
+
5
+ type Item = {
6
+ label: string;
7
+ tone: Tone;
8
+ };
9
+ declare function BadgeCluster({ items, max, align, className, usePortal, }: {
10
+ items: Item[];
11
+ max?: number;
12
+ align?: "left" | "right";
13
+ className?: string;
14
+ usePortal?: boolean;
15
+ }): react_jsx_runtime.JSX.Element;
16
+
17
+ export { BadgeCluster as default };