@partrunner-ai/ui 2.3.2 → 2.4.0
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/index.cjs +160 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.js +160 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/styles/light.css +86 -0
- package/styles/theme.css +86 -0
- package/styles/ui.css +86 -0
package/dist/index.cjs
CHANGED
|
@@ -5115,6 +5115,165 @@ var Skeleton = react.forwardRef(function Skeleton2({ shape = "block", width, hei
|
|
|
5115
5115
|
}
|
|
5116
5116
|
);
|
|
5117
5117
|
});
|
|
5118
|
+
var CELL_WIDTHS = [72, 54, 86, 44, 64, 78, 50, 68];
|
|
5119
|
+
function Bar({ w, h = 14, shape = "text" }) {
|
|
5120
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { shape, width: w, height: h });
|
|
5121
|
+
}
|
|
5122
|
+
function PageHead() {
|
|
5123
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__head", children: [
|
|
5124
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 220, h: 26, shape: "block" }),
|
|
5125
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 340, h: 14 })
|
|
5126
|
+
] });
|
|
5127
|
+
}
|
|
5128
|
+
function TableLayout({ rows, columns }) {
|
|
5129
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5130
|
+
/* @__PURE__ */ jsxRuntime.jsx(PageHead, {}),
|
|
5131
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__toolbar", children: [
|
|
5132
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 260, height: 36, className: "pr-page-skeleton__field" }),
|
|
5133
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 96, height: 32, className: "pr-page-skeleton__pill" }),
|
|
5134
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 112, height: 32, className: "pr-page-skeleton__pill" }),
|
|
5135
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pr-page-skeleton__spacer" }),
|
|
5136
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 120, height: 36, className: "pr-page-skeleton__field" })
|
|
5137
|
+
] }),
|
|
5138
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__panel", children: [
|
|
5139
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pr-page-skeleton__row pr-page-skeleton__row--head", children: Array.from({ length: columns }, (_, c) => /* @__PURE__ */ jsxRuntime.jsx(Bar, { w: `${40 + c * 13 % 30}%`, h: 11 }, c)) }),
|
|
5140
|
+
Array.from({ length: rows }, (_, r) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pr-page-skeleton__row", children: Array.from({ length: columns }, (_2, c) => /* @__PURE__ */ jsxRuntime.jsx(Bar, { w: `${CELL_WIDTHS[(r * 3 + c * 5) % CELL_WIDTHS.length]}%` }, c)) }, r))
|
|
5141
|
+
] })
|
|
5142
|
+
] });
|
|
5143
|
+
}
|
|
5144
|
+
function DashboardLayout() {
|
|
5145
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5146
|
+
/* @__PURE__ */ jsxRuntime.jsx(PageHead, {}),
|
|
5147
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pr-page-skeleton__kpis", children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__panel pr-page-skeleton__kpi", children: [
|
|
5148
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: "45%", h: 11 }),
|
|
5149
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: "60%", h: 28, shape: "block" }),
|
|
5150
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: "35%", h: 11 })
|
|
5151
|
+
] }, i)) }),
|
|
5152
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__split", children: [
|
|
5153
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__panel pr-page-skeleton__chart", children: [
|
|
5154
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 160, h: 16 }),
|
|
5155
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "pr-page-skeleton__chart-area" })
|
|
5156
|
+
] }),
|
|
5157
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__panel pr-page-skeleton__list", children: [
|
|
5158
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 120, h: 16 }),
|
|
5159
|
+
[0, 1, 2, 3, 4].map((i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__item", children: [
|
|
5160
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { shape: "circle", width: 28, height: 28 }),
|
|
5161
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__item-text", children: [
|
|
5162
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: `${70 - i * 6}%` }),
|
|
5163
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: "40%", h: 11 })
|
|
5164
|
+
] })
|
|
5165
|
+
] }, i))
|
|
5166
|
+
] })
|
|
5167
|
+
] })
|
|
5168
|
+
] });
|
|
5169
|
+
}
|
|
5170
|
+
function DetailLayout() {
|
|
5171
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5172
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 84, h: 14 }),
|
|
5173
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__head", children: [
|
|
5174
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 280, h: 28, shape: "block" }),
|
|
5175
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__meta", children: [
|
|
5176
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 72, h: 22, shape: "block" }),
|
|
5177
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 120, h: 12 }),
|
|
5178
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 96, h: 12 })
|
|
5179
|
+
] })
|
|
5180
|
+
] }),
|
|
5181
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__split pr-page-skeleton__split--detail", children: [
|
|
5182
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__panel pr-page-skeleton__card", children: [
|
|
5183
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 140, h: 16 }),
|
|
5184
|
+
[96, 100, 88, 94, 60].map((w, i) => /* @__PURE__ */ jsxRuntime.jsx(Bar, { w: `${w}%` }, i)),
|
|
5185
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pr-page-skeleton__gap" }),
|
|
5186
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 120, h: 16 }),
|
|
5187
|
+
[100, 82, 90, 48].map((w, i) => /* @__PURE__ */ jsxRuntime.jsx(Bar, { w: `${w}%` }, i))
|
|
5188
|
+
] }),
|
|
5189
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__panel pr-page-skeleton__card", children: [
|
|
5190
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 100, h: 16 }),
|
|
5191
|
+
[0, 1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__kv", children: [
|
|
5192
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 72, h: 11 }),
|
|
5193
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: `${60 - i * 5}%` })
|
|
5194
|
+
] }, i))
|
|
5195
|
+
] })
|
|
5196
|
+
] })
|
|
5197
|
+
] });
|
|
5198
|
+
}
|
|
5199
|
+
function CardsLayout() {
|
|
5200
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5201
|
+
/* @__PURE__ */ jsxRuntime.jsx(PageHead, {}),
|
|
5202
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pr-page-skeleton__grid", children: [0, 1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__panel pr-page-skeleton__card", children: [
|
|
5203
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: "55%", h: 18 }),
|
|
5204
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: "92%" }),
|
|
5205
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: "68%" }),
|
|
5206
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__footer", children: [
|
|
5207
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 64, h: 22, shape: "block" }),
|
|
5208
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 80, h: 12 })
|
|
5209
|
+
] })
|
|
5210
|
+
] }, i)) })
|
|
5211
|
+
] });
|
|
5212
|
+
}
|
|
5213
|
+
function ChatLayout() {
|
|
5214
|
+
const bubbles = [
|
|
5215
|
+
["in", 52],
|
|
5216
|
+
["out", 38],
|
|
5217
|
+
["in", 64],
|
|
5218
|
+
["out", 44]
|
|
5219
|
+
];
|
|
5220
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__chat", children: [
|
|
5221
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pr-page-skeleton__panel pr-page-skeleton__convs", children: Array.from({ length: 8 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__item", children: [
|
|
5222
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { shape: "circle", width: 36, height: 36 }),
|
|
5223
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__item-text", children: [
|
|
5224
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: `${68 - i % 3 * 10}%` }),
|
|
5225
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: `${88 - i % 4 * 8}%`, h: 11 })
|
|
5226
|
+
] })
|
|
5227
|
+
] }, i)) }),
|
|
5228
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__panel pr-page-skeleton__pane", children: [
|
|
5229
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__item", children: [
|
|
5230
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { shape: "circle", width: 36, height: 36 }),
|
|
5231
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: 160, h: 16 })
|
|
5232
|
+
] }),
|
|
5233
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pr-page-skeleton__messages", children: bubbles.map(([side, w], i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pr-page-skeleton__bubble", "data-side": side, style: { width: `${w}%` }, children: [
|
|
5234
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: "90%" }),
|
|
5235
|
+
/* @__PURE__ */ jsxRuntime.jsx(Bar, { w: "55%" })
|
|
5236
|
+
] }, i)) }),
|
|
5237
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { height: 44, className: "pr-page-skeleton__field" })
|
|
5238
|
+
] })
|
|
5239
|
+
] });
|
|
5240
|
+
}
|
|
5241
|
+
var PageSkeleton = react.forwardRef(function PageSkeleton2({ variant = "table", label = "Cargando\u2026", rows = 8, columns = 5, className, ...rest }, ref) {
|
|
5242
|
+
let layout;
|
|
5243
|
+
switch (variant) {
|
|
5244
|
+
case "dashboard":
|
|
5245
|
+
layout = /* @__PURE__ */ jsxRuntime.jsx(DashboardLayout, {});
|
|
5246
|
+
break;
|
|
5247
|
+
case "detail":
|
|
5248
|
+
layout = /* @__PURE__ */ jsxRuntime.jsx(DetailLayout, {});
|
|
5249
|
+
break;
|
|
5250
|
+
case "cards":
|
|
5251
|
+
layout = /* @__PURE__ */ jsxRuntime.jsx(CardsLayout, {});
|
|
5252
|
+
break;
|
|
5253
|
+
case "chat":
|
|
5254
|
+
layout = /* @__PURE__ */ jsxRuntime.jsx(ChatLayout, {});
|
|
5255
|
+
break;
|
|
5256
|
+
default:
|
|
5257
|
+
layout = /* @__PURE__ */ jsxRuntime.jsx(TableLayout, { rows, columns });
|
|
5258
|
+
}
|
|
5259
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5260
|
+
"div",
|
|
5261
|
+
{
|
|
5262
|
+
ref,
|
|
5263
|
+
role: "status",
|
|
5264
|
+
"aria-busy": "true",
|
|
5265
|
+
"data-pr-loading": "",
|
|
5266
|
+
...rest,
|
|
5267
|
+
"data-slot": "page-skeleton",
|
|
5268
|
+
"data-variant": variant,
|
|
5269
|
+
className: ["pr-page-skeleton", className].filter(Boolean).join(" "),
|
|
5270
|
+
children: [
|
|
5271
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pr-visually-hidden", children: label }),
|
|
5272
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pr-page-skeleton__body", "aria-hidden": true, children: layout })
|
|
5273
|
+
]
|
|
5274
|
+
}
|
|
5275
|
+
);
|
|
5276
|
+
});
|
|
5118
5277
|
var Stepper = react.forwardRef(function Stepper2({
|
|
5119
5278
|
steps,
|
|
5120
5279
|
current,
|
|
@@ -7166,6 +7325,7 @@ exports.NavigationTabs = NavigationTabs;
|
|
|
7166
7325
|
exports.OtpInput = OtpInput;
|
|
7167
7326
|
exports.Page = Page;
|
|
7168
7327
|
exports.PageHeader = PageHeader;
|
|
7328
|
+
exports.PageSkeleton = PageSkeleton;
|
|
7169
7329
|
exports.Pagination = Pagination;
|
|
7170
7330
|
exports.Popover = Popover;
|
|
7171
7331
|
exports.PopoverContent = PopoverContent;
|