@douglasneuroinformatics/libui 4.1.1 → 4.2.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/{chunk-655XRTXX.js → chunk-ARKHRGTL.js} +15 -9
- package/dist/{chunk-655XRTXX.js.map → chunk-ARKHRGTL.js.map} +1 -1
- package/dist/{chunk-KI6BSSS6.js → chunk-ZIAKQCCQ.js} +2 -2
- package/dist/components.d.ts +9 -2
- package/dist/components.js +167 -83
- package/dist/components.js.map +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +2 -2
- package/dist/i18n.d.ts +2 -2
- package/dist/i18n.js +1 -1
- package/dist/{types-Dm7os_cB.d.ts → types-DHTtLrqP.d.ts} +15 -8
- package/package.json +2 -2
- package/src/components/Form/Form.tsx +3 -2
- package/src/components/OneTimePasswordInput/OneTimePasswordInput.spec.tsx +19 -0
- package/src/components/OneTimePasswordInput/OneTimePasswordInput.stories.tsx +27 -0
- package/src/components/OneTimePasswordInput/OneTimePasswordInput.tsx +109 -0
- package/src/components/OneTimePasswordInput/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/i18n/translations/libui.json +14 -8
- /package/dist/{chunk-KI6BSSS6.js.map → chunk-ZIAKQCCQ.js.map} +0 -0
package/dist/components.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
useNotificationsStore,
|
|
6
6
|
useTheme,
|
|
7
7
|
useTranslation
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-ZIAKQCCQ.js";
|
|
9
|
+
import "./chunk-ARKHRGTL.js";
|
|
10
10
|
import {
|
|
11
11
|
cn
|
|
12
12
|
} from "./chunk-HCQE34RL.js";
|
|
@@ -3560,7 +3560,7 @@ var Form = ({
|
|
|
3560
3560
|
};
|
|
3561
3561
|
const isGrouped = Array.isArray(content);
|
|
3562
3562
|
const revalidate = () => {
|
|
3563
|
-
const hasErrors = Object.keys(errors).length > 0;
|
|
3563
|
+
const hasErrors = Object.keys(errors).length > 0 || rootErrors.length;
|
|
3564
3564
|
if (hasErrors) {
|
|
3565
3565
|
validationSchema.safeParseAsync(values).then((result) => {
|
|
3566
3566
|
if (!result.success) {
|
|
@@ -3570,7 +3570,8 @@ var Form = ({
|
|
|
3570
3570
|
}
|
|
3571
3571
|
};
|
|
3572
3572
|
useEffect10(() => {
|
|
3573
|
-
|
|
3573
|
+
setErrors({});
|
|
3574
|
+
setRootErrors([]);
|
|
3574
3575
|
}, [resolvedLanguage]);
|
|
3575
3576
|
const isSuspended = Boolean(suspendWhileSubmitting && isSubmitting);
|
|
3576
3577
|
return /* @__PURE__ */ jsxs47(
|
|
@@ -4217,29 +4218,111 @@ var NotificationHub = ({ timeout = 5e3 }) => {
|
|
|
4217
4218
|
)) }) });
|
|
4218
4219
|
};
|
|
4219
4220
|
|
|
4221
|
+
// src/components/OneTimePasswordInput/OneTimePasswordInput.tsx
|
|
4222
|
+
import { useEffect as useEffect11, useRef as useRef5, useState as useState9 } from "react";
|
|
4223
|
+
import { jsx as jsx154 } from "react/jsx-runtime";
|
|
4224
|
+
var CODE_LENGTH = 6;
|
|
4225
|
+
var EMPTY_CODE = Object.freeze(Array(CODE_LENGTH).fill(null));
|
|
4226
|
+
function getUpdatedDigits(digits, index, value) {
|
|
4227
|
+
const updatedDigits = [...digits];
|
|
4228
|
+
updatedDigits[index] = value;
|
|
4229
|
+
return updatedDigits;
|
|
4230
|
+
}
|
|
4231
|
+
var OneTimePasswordInput = ({ className, onComplete, ...props }) => {
|
|
4232
|
+
const notifications = useNotificationsStore();
|
|
4233
|
+
const { t } = useTranslation("libui");
|
|
4234
|
+
const [digits, setDigits] = useState9([...EMPTY_CODE]);
|
|
4235
|
+
const inputRefs = digits.map(() => useRef5(null));
|
|
4236
|
+
useEffect11(() => {
|
|
4237
|
+
const isComplete = digits.every((value) => Number.isInteger(value));
|
|
4238
|
+
if (isComplete) {
|
|
4239
|
+
void onComplete(parseInt(digits.join("")));
|
|
4240
|
+
setDigits([...EMPTY_CODE]);
|
|
4241
|
+
}
|
|
4242
|
+
}, [digits]);
|
|
4243
|
+
const focusNext = (index) => inputRefs[index + 1 === digits.length ? 0 : index + 1]?.current?.focus();
|
|
4244
|
+
const focusPrev = (index) => inputRefs[index - 1 >= 0 ? index - 1 : digits.length - 1]?.current?.focus();
|
|
4245
|
+
const handleChange = (e, index) => {
|
|
4246
|
+
let value;
|
|
4247
|
+
if (e.target.value === "") {
|
|
4248
|
+
value = null;
|
|
4249
|
+
} else if (Number.isInteger(parseInt(e.target.value))) {
|
|
4250
|
+
value = parseInt(e.target.value);
|
|
4251
|
+
} else {
|
|
4252
|
+
return;
|
|
4253
|
+
}
|
|
4254
|
+
setDigits((prevDigits) => getUpdatedDigits(prevDigits, index, value));
|
|
4255
|
+
focusNext(index);
|
|
4256
|
+
};
|
|
4257
|
+
const handleKeyDown = (e, index) => {
|
|
4258
|
+
switch (e.key) {
|
|
4259
|
+
case "ArrowLeft":
|
|
4260
|
+
focusPrev(index);
|
|
4261
|
+
break;
|
|
4262
|
+
case "ArrowRight":
|
|
4263
|
+
focusNext(index);
|
|
4264
|
+
break;
|
|
4265
|
+
case "Backspace":
|
|
4266
|
+
setDigits((prevDigits) => getUpdatedDigits(prevDigits, index - 1, null));
|
|
4267
|
+
focusPrev(index);
|
|
4268
|
+
}
|
|
4269
|
+
};
|
|
4270
|
+
const handlePaste = (e) => {
|
|
4271
|
+
e.preventDefault();
|
|
4272
|
+
const pastedDigits = e.clipboardData.getData("text/plain").split("").slice(0, CODE_LENGTH).map((value) => parseInt(value));
|
|
4273
|
+
const isValid = pastedDigits.length === CODE_LENGTH && pastedDigits.every((value) => Number.isInteger(value));
|
|
4274
|
+
if (isValid) {
|
|
4275
|
+
setDigits(pastedDigits);
|
|
4276
|
+
} else {
|
|
4277
|
+
notifications.addNotification({
|
|
4278
|
+
message: t("oneTimePasswordInput.invalidCodeFormat"),
|
|
4279
|
+
type: "warning"
|
|
4280
|
+
});
|
|
4281
|
+
}
|
|
4282
|
+
};
|
|
4283
|
+
return /* @__PURE__ */ jsx154("div", { className: cn("flex gap-2", className), ...props, children: digits.map((_, index) => /* @__PURE__ */ jsx154(
|
|
4284
|
+
"input",
|
|
4285
|
+
{
|
|
4286
|
+
className: "w-1/6 rounded-md border border-slate-300 bg-transparent p-2 shadow-xs hover:border-slate-300 focus:border-sky-800 focus:outline-hidden dark:border-slate-600 dark:hover:border-slate-400 dark:focus:border-sky-500",
|
|
4287
|
+
maxLength: 1,
|
|
4288
|
+
ref: inputRefs[index],
|
|
4289
|
+
type: "text",
|
|
4290
|
+
value: digits[index] ?? "",
|
|
4291
|
+
onChange: (e) => {
|
|
4292
|
+
handleChange(e, index);
|
|
4293
|
+
},
|
|
4294
|
+
onKeyDown: (e) => {
|
|
4295
|
+
handleKeyDown(e, index);
|
|
4296
|
+
},
|
|
4297
|
+
onPaste: handlePaste
|
|
4298
|
+
},
|
|
4299
|
+
index
|
|
4300
|
+
)) });
|
|
4301
|
+
};
|
|
4302
|
+
|
|
4220
4303
|
// src/components/Pagination/PaginationContent.tsx
|
|
4221
4304
|
import "react";
|
|
4222
|
-
import { jsx as
|
|
4223
|
-
var PaginationContent = ({ className, ...props }) => /* @__PURE__ */
|
|
4305
|
+
import { jsx as jsx155 } from "react/jsx-runtime";
|
|
4306
|
+
var PaginationContent = ({ className, ...props }) => /* @__PURE__ */ jsx155("ul", { className: cn("flex flex-row items-center gap-1", className), ...props });
|
|
4224
4307
|
|
|
4225
4308
|
// src/components/Pagination/PaginationEllipsis.tsx
|
|
4226
4309
|
import "react";
|
|
4227
4310
|
import { MoreHorizontalIcon as MoreHorizontalIcon2 } from "lucide-react";
|
|
4228
|
-
import { jsx as
|
|
4311
|
+
import { jsx as jsx156, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
4229
4312
|
var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs55("span", { "aria-hidden": true, className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [
|
|
4230
|
-
/* @__PURE__ */
|
|
4231
|
-
/* @__PURE__ */
|
|
4313
|
+
/* @__PURE__ */ jsx156(MoreHorizontalIcon2, { className: "h-4 w-4" }),
|
|
4314
|
+
/* @__PURE__ */ jsx156("span", { className: "sr-only", children: "More pages" })
|
|
4232
4315
|
] });
|
|
4233
4316
|
|
|
4234
4317
|
// src/components/Pagination/PaginationItem.tsx
|
|
4235
4318
|
import "react";
|
|
4236
|
-
import { jsx as
|
|
4237
|
-
var PaginationItem = ({ className, ...props }) => /* @__PURE__ */
|
|
4319
|
+
import { jsx as jsx157 } from "react/jsx-runtime";
|
|
4320
|
+
var PaginationItem = ({ className, ...props }) => /* @__PURE__ */ jsx157("li", { className, ...props });
|
|
4238
4321
|
|
|
4239
4322
|
// src/components/Pagination/PaginationLink.tsx
|
|
4240
4323
|
import "react";
|
|
4241
|
-
import { jsx as
|
|
4242
|
-
var PaginationLink = ({ children, className, isActive, size = "icon", ...props }) => /* @__PURE__ */
|
|
4324
|
+
import { jsx as jsx158 } from "react/jsx-runtime";
|
|
4325
|
+
var PaginationLink = ({ children, className, isActive, size = "icon", ...props }) => /* @__PURE__ */ jsx158(
|
|
4243
4326
|
"a",
|
|
4244
4327
|
{
|
|
4245
4328
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -4258,30 +4341,30 @@ var PaginationLink = ({ children, className, isActive, size = "icon", ...props }
|
|
|
4258
4341
|
// src/components/Pagination/PaginationNext.tsx
|
|
4259
4342
|
import "react";
|
|
4260
4343
|
import { ChevronRightIcon as ChevronRightIcon5 } from "lucide-react";
|
|
4261
|
-
import { jsx as
|
|
4344
|
+
import { jsx as jsx159, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
4262
4345
|
var PaginationNext = ({ className, ...props }) => {
|
|
4263
4346
|
const { t } = useTranslation("libui");
|
|
4264
4347
|
return /* @__PURE__ */ jsxs56(PaginationLink, { "aria-label": "Go to next page", className: cn("gap-1 pr-2.5", className), size: "md", ...props, children: [
|
|
4265
|
-
/* @__PURE__ */
|
|
4266
|
-
/* @__PURE__ */
|
|
4348
|
+
/* @__PURE__ */ jsx159("span", { children: t("pagination.next") }),
|
|
4349
|
+
/* @__PURE__ */ jsx159(ChevronRightIcon5, { className: "h-4 w-4" })
|
|
4267
4350
|
] });
|
|
4268
4351
|
};
|
|
4269
4352
|
|
|
4270
4353
|
// src/components/Pagination/PaginationPrevious.tsx
|
|
4271
4354
|
import { ChevronLeftIcon } from "lucide-react";
|
|
4272
|
-
import { jsx as
|
|
4355
|
+
import { jsx as jsx160, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
4273
4356
|
var PaginationPrevious = ({ className, ...props }) => {
|
|
4274
4357
|
const { t } = useTranslation("libui");
|
|
4275
4358
|
return /* @__PURE__ */ jsxs57(PaginationLink, { "aria-label": "Go to previous page", className: cn("gap-1 pl-2.5", className), size: "md", ...props, children: [
|
|
4276
|
-
/* @__PURE__ */
|
|
4277
|
-
/* @__PURE__ */
|
|
4359
|
+
/* @__PURE__ */ jsx160(ChevronLeftIcon, { className: "h-4 w-4" }),
|
|
4360
|
+
/* @__PURE__ */ jsx160("span", { children: t("pagination.previous") })
|
|
4278
4361
|
] });
|
|
4279
4362
|
};
|
|
4280
4363
|
|
|
4281
4364
|
// src/components/Pagination/PaginationRoot.tsx
|
|
4282
4365
|
import "react";
|
|
4283
|
-
import { jsx as
|
|
4284
|
-
var PaginationRoot = ({ className, ...props }) => /* @__PURE__ */
|
|
4366
|
+
import { jsx as jsx161 } from "react/jsx-runtime";
|
|
4367
|
+
var PaginationRoot = ({ className, ...props }) => /* @__PURE__ */ jsx161(
|
|
4285
4368
|
"nav",
|
|
4286
4369
|
{
|
|
4287
4370
|
"aria-label": "pagination",
|
|
@@ -4304,15 +4387,15 @@ var Pagination = Object.assign(PaginationRoot, {
|
|
|
4304
4387
|
// src/components/Progress/Progress.tsx
|
|
4305
4388
|
import { forwardRef as forwardRef95 } from "react";
|
|
4306
4389
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
4307
|
-
import { jsx as
|
|
4390
|
+
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
4308
4391
|
var Progress = forwardRef95(function Progress2({ className, value, ...props }, ref) {
|
|
4309
|
-
return /* @__PURE__ */
|
|
4392
|
+
return /* @__PURE__ */ jsx162(
|
|
4310
4393
|
ProgressPrimitive.Root,
|
|
4311
4394
|
{
|
|
4312
4395
|
className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
|
|
4313
4396
|
ref,
|
|
4314
4397
|
...props,
|
|
4315
|
-
children: /* @__PURE__ */
|
|
4398
|
+
children: /* @__PURE__ */ jsx162(
|
|
4316
4399
|
ProgressPrimitive.Indicator,
|
|
4317
4400
|
{
|
|
4318
4401
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
@@ -4331,8 +4414,8 @@ import { Panel } from "react-resizable-panels";
|
|
|
4331
4414
|
import "react";
|
|
4332
4415
|
import { GripVertical } from "lucide-react";
|
|
4333
4416
|
import { PanelResizeHandle } from "react-resizable-panels";
|
|
4334
|
-
import { jsx as
|
|
4335
|
-
var ResizableHandle = ({ className, withHandle, ...props }) => /* @__PURE__ */
|
|
4417
|
+
import { jsx as jsx163 } from "react/jsx-runtime";
|
|
4418
|
+
var ResizableHandle = ({ className, withHandle, ...props }) => /* @__PURE__ */ jsx163(
|
|
4336
4419
|
PanelResizeHandle,
|
|
4337
4420
|
{
|
|
4338
4421
|
className: cn(
|
|
@@ -4340,15 +4423,15 @@ var ResizableHandle = ({ className, withHandle, ...props }) => /* @__PURE__ */ j
|
|
|
4340
4423
|
className
|
|
4341
4424
|
),
|
|
4342
4425
|
...props,
|
|
4343
|
-
children: withHandle && /* @__PURE__ */
|
|
4426
|
+
children: withHandle && /* @__PURE__ */ jsx163("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx163(GripVertical, { className: "h-2.5 w-2.5" }) })
|
|
4344
4427
|
}
|
|
4345
4428
|
);
|
|
4346
4429
|
|
|
4347
4430
|
// src/components/Resizable/ResizablePanelGroup.tsx
|
|
4348
4431
|
import "react";
|
|
4349
4432
|
import { PanelGroup } from "react-resizable-panels";
|
|
4350
|
-
import { jsx as
|
|
4351
|
-
var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */
|
|
4433
|
+
import { jsx as jsx164 } from "react/jsx-runtime";
|
|
4434
|
+
var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsx164(
|
|
4352
4435
|
PanelGroup,
|
|
4353
4436
|
{
|
|
4354
4437
|
className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
|
|
@@ -4357,8 +4440,8 @@ var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsx163(
|
|
|
4357
4440
|
);
|
|
4358
4441
|
|
|
4359
4442
|
// src/components/Resizable/Resizable.tsx
|
|
4360
|
-
import { Fragment as Fragment2, jsx as
|
|
4361
|
-
var ResizableRoot = ({ children }) => /* @__PURE__ */
|
|
4443
|
+
import { Fragment as Fragment2, jsx as jsx165 } from "react/jsx-runtime";
|
|
4444
|
+
var ResizableRoot = ({ children }) => /* @__PURE__ */ jsx165(Fragment2, { children });
|
|
4362
4445
|
var Resizable = Object.assign(ResizableRoot, {
|
|
4363
4446
|
Handle: ResizableHandle,
|
|
4364
4447
|
Panel,
|
|
@@ -4367,7 +4450,7 @@ var Resizable = Object.assign(ResizableRoot, {
|
|
|
4367
4450
|
|
|
4368
4451
|
// src/components/SearchBar/SearchBar.tsx
|
|
4369
4452
|
import { SearchIcon as SearchIcon2 } from "lucide-react";
|
|
4370
|
-
import { jsx as
|
|
4453
|
+
import { jsx as jsx166, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
4371
4454
|
var SearchBar = ({
|
|
4372
4455
|
className,
|
|
4373
4456
|
onClick,
|
|
@@ -4379,8 +4462,8 @@ var SearchBar = ({
|
|
|
4379
4462
|
}) => {
|
|
4380
4463
|
const { t } = useTranslation("libui");
|
|
4381
4464
|
return /* @__PURE__ */ jsxs58("form", { className: cn("relative", className), ...props, children: [
|
|
4382
|
-
/* @__PURE__ */
|
|
4383
|
-
/* @__PURE__ */
|
|
4465
|
+
/* @__PURE__ */ jsx166(SearchIcon2, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
|
|
4466
|
+
/* @__PURE__ */ jsx166(
|
|
4384
4467
|
Input,
|
|
4385
4468
|
{
|
|
4386
4469
|
className: "pl-8",
|
|
@@ -4400,9 +4483,9 @@ var SearchBar = ({
|
|
|
4400
4483
|
// src/components/Separator/Separator.tsx
|
|
4401
4484
|
import { forwardRef as forwardRef96 } from "react";
|
|
4402
4485
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4403
|
-
import { jsx as
|
|
4486
|
+
import { jsx as jsx167 } from "react/jsx-runtime";
|
|
4404
4487
|
var Separator5 = forwardRef96(function Separator6({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
|
|
4405
|
-
return /* @__PURE__ */
|
|
4488
|
+
return /* @__PURE__ */ jsx167(
|
|
4406
4489
|
SeparatorPrimitive.Root,
|
|
4407
4490
|
{
|
|
4408
4491
|
className: cn(
|
|
@@ -4424,13 +4507,13 @@ import { Close as Close3, Portal as Portal12, Root as Root18, Trigger as Trigger
|
|
|
4424
4507
|
|
|
4425
4508
|
// src/components/Sheet/SheetBody.tsx
|
|
4426
4509
|
import "react";
|
|
4427
|
-
import { jsx as
|
|
4510
|
+
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
4428
4511
|
var SheetBody = ({
|
|
4429
4512
|
children,
|
|
4430
4513
|
className,
|
|
4431
4514
|
...props
|
|
4432
4515
|
}) => {
|
|
4433
|
-
return /* @__PURE__ */
|
|
4516
|
+
return /* @__PURE__ */ jsx168("div", { className: cn("py-4", className), ...props, children });
|
|
4434
4517
|
};
|
|
4435
4518
|
|
|
4436
4519
|
// src/components/Sheet/SheetContent.tsx
|
|
@@ -4442,9 +4525,9 @@ import { XIcon as XIcon3 } from "lucide-react";
|
|
|
4442
4525
|
// src/components/Sheet/SheetOverlay.tsx
|
|
4443
4526
|
import { forwardRef as forwardRef97 } from "react";
|
|
4444
4527
|
import { Overlay as Overlay3 } from "@radix-ui/react-dialog";
|
|
4445
|
-
import { jsx as
|
|
4528
|
+
import { jsx as jsx169 } from "react/jsx-runtime";
|
|
4446
4529
|
var SheetOverlay = forwardRef97(function SheetOverlay2({ className, ...props }, ref) {
|
|
4447
|
-
return /* @__PURE__ */
|
|
4530
|
+
return /* @__PURE__ */ jsx169(
|
|
4448
4531
|
Overlay3,
|
|
4449
4532
|
{
|
|
4450
4533
|
className: cn(
|
|
@@ -4458,7 +4541,7 @@ var SheetOverlay = forwardRef97(function SheetOverlay2({ className, ...props },
|
|
|
4458
4541
|
});
|
|
4459
4542
|
|
|
4460
4543
|
// src/components/Sheet/SheetContent.tsx
|
|
4461
|
-
import { jsx as
|
|
4544
|
+
import { jsx as jsx170, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
4462
4545
|
var sheetVariants = cva5(
|
|
4463
4546
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
4464
4547
|
{
|
|
@@ -4477,12 +4560,12 @@ var sheetVariants = cva5(
|
|
|
4477
4560
|
);
|
|
4478
4561
|
var SheetContent = React49.forwardRef(function SheetContent2({ children, className, side = "right", ...props }, ref) {
|
|
4479
4562
|
return /* @__PURE__ */ jsxs59(Portal11, { children: [
|
|
4480
|
-
/* @__PURE__ */
|
|
4563
|
+
/* @__PURE__ */ jsx170(SheetOverlay, {}),
|
|
4481
4564
|
/* @__PURE__ */ jsxs59(Content11, { className: cn(sheetVariants({ side }), className), ref, ...props, children: [
|
|
4482
4565
|
children,
|
|
4483
4566
|
/* @__PURE__ */ jsxs59(Close2, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
4484
|
-
/* @__PURE__ */
|
|
4485
|
-
/* @__PURE__ */
|
|
4567
|
+
/* @__PURE__ */ jsx170(XIcon3, { className: "h-4 w-4" }),
|
|
4568
|
+
/* @__PURE__ */ jsx170("span", { className: "sr-only", children: "Close" })
|
|
4486
4569
|
] })
|
|
4487
4570
|
] })
|
|
4488
4571
|
] });
|
|
@@ -4491,28 +4574,28 @@ var SheetContent = React49.forwardRef(function SheetContent2({ children, classNa
|
|
|
4491
4574
|
// src/components/Sheet/SheetDescription.tsx
|
|
4492
4575
|
import { forwardRef as forwardRef99 } from "react";
|
|
4493
4576
|
import { Description as Description3 } from "@radix-ui/react-dialog";
|
|
4494
|
-
import { jsx as
|
|
4577
|
+
import { jsx as jsx171 } from "react/jsx-runtime";
|
|
4495
4578
|
var SheetDescription = forwardRef99(function SheetDescription2({ className, ...props }, ref) {
|
|
4496
|
-
return /* @__PURE__ */
|
|
4579
|
+
return /* @__PURE__ */ jsx171(Description3, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
|
|
4497
4580
|
});
|
|
4498
4581
|
|
|
4499
4582
|
// src/components/Sheet/SheetFooter.tsx
|
|
4500
4583
|
import "react";
|
|
4501
|
-
import { jsx as
|
|
4502
|
-
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
4584
|
+
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
4585
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx172("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
4503
4586
|
|
|
4504
4587
|
// src/components/Sheet/SheetHeader.tsx
|
|
4505
4588
|
import "react";
|
|
4506
|
-
import { jsx as
|
|
4507
|
-
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
4589
|
+
import { jsx as jsx173 } from "react/jsx-runtime";
|
|
4590
|
+
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx173("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
4508
4591
|
|
|
4509
4592
|
// src/components/Sheet/SheetTitle.tsx
|
|
4510
4593
|
import { forwardRef as forwardRef100 } from "react";
|
|
4511
4594
|
import { Title as Title3 } from "@radix-ui/react-dialog";
|
|
4512
|
-
import { jsx as
|
|
4595
|
+
import { jsx as jsx174 } from "react/jsx-runtime";
|
|
4513
4596
|
var SheetTitle = forwardRef100(
|
|
4514
4597
|
function SheetTitle2({ className, ...props }, ref) {
|
|
4515
|
-
return /* @__PURE__ */
|
|
4598
|
+
return /* @__PURE__ */ jsx174(Title3, { className: cn("text-lg font-semibold text-foreground", className), ref, ...props });
|
|
4516
4599
|
}
|
|
4517
4600
|
);
|
|
4518
4601
|
|
|
@@ -4530,9 +4613,9 @@ var Sheet = Object.assign(Root18.bind(null), {
|
|
|
4530
4613
|
});
|
|
4531
4614
|
|
|
4532
4615
|
// src/components/Spinner/Spinner.tsx
|
|
4533
|
-
import { jsx as
|
|
4616
|
+
import { jsx as jsx175 } from "react/jsx-runtime";
|
|
4534
4617
|
var Spinner = ({ className, ...props }) => {
|
|
4535
|
-
return /* @__PURE__ */
|
|
4618
|
+
return /* @__PURE__ */ jsx175("div", { className: cn("flex h-full w-full items-center justify-center", className), ...props, children: /* @__PURE__ */ jsx175(
|
|
4536
4619
|
"span",
|
|
4537
4620
|
{
|
|
4538
4621
|
className: "relative animate-spinner overflow-hidden text-slate-900 dark:text-slate-100",
|
|
@@ -4550,8 +4633,8 @@ var Spinner = ({ className, ...props }) => {
|
|
|
4550
4633
|
|
|
4551
4634
|
// src/components/SpinnerIcon/SpinnerIcon.tsx
|
|
4552
4635
|
import "react";
|
|
4553
|
-
import { jsx as
|
|
4554
|
-
var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */
|
|
4636
|
+
import { jsx as jsx176 } from "react/jsx-runtime";
|
|
4637
|
+
var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */ jsx176(
|
|
4555
4638
|
"svg",
|
|
4556
4639
|
{
|
|
4557
4640
|
className: cn("animate-spin", className),
|
|
@@ -4565,25 +4648,25 @@ var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */ jsx175(
|
|
|
4565
4648
|
width: "24",
|
|
4566
4649
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4567
4650
|
...props,
|
|
4568
|
-
children: /* @__PURE__ */
|
|
4651
|
+
children: /* @__PURE__ */ jsx176("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
4569
4652
|
}
|
|
4570
4653
|
);
|
|
4571
4654
|
|
|
4572
4655
|
// src/components/StatisticCard/StatisticCard.tsx
|
|
4573
|
-
import { useEffect as
|
|
4656
|
+
import { useEffect as useEffect12 } from "react";
|
|
4574
4657
|
import { motion as motion6, useSpring, useTransform } from "motion/react";
|
|
4575
|
-
import { jsx as
|
|
4658
|
+
import { jsx as jsx177, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
4576
4659
|
var StatisticCard = ({ className, icon, label, value, ...props }) => {
|
|
4577
4660
|
const spring = useSpring(0, { bounce: 0 });
|
|
4578
4661
|
const rounded = useTransform(spring, (latest) => Math.floor(latest));
|
|
4579
|
-
|
|
4662
|
+
useEffect12(() => {
|
|
4580
4663
|
spring.set(value);
|
|
4581
4664
|
}, [spring, value]);
|
|
4582
4665
|
return /* @__PURE__ */ jsxs60(Card, { className: cn("flex w-full rounded-lg p-4", className), ...props, children: [
|
|
4583
|
-
icon && /* @__PURE__ */
|
|
4666
|
+
icon && /* @__PURE__ */ jsx177("div", { className: "mr-2 flex items-center justify-center text-4xl", children: icon }),
|
|
4584
4667
|
/* @__PURE__ */ jsxs60("div", { className: "w-full text-center", children: [
|
|
4585
|
-
/* @__PURE__ */
|
|
4586
|
-
/* @__PURE__ */
|
|
4668
|
+
/* @__PURE__ */ jsx177(motion6.h3, { className: "title-font text-2xl font-semibold text-slate-900 dark:text-slate-100 sm:text-3xl", children: rounded }),
|
|
4669
|
+
/* @__PURE__ */ jsx177("p", { className: "font-medium leading-relaxed", children: label })
|
|
4587
4670
|
] })
|
|
4588
4671
|
] });
|
|
4589
4672
|
};
|
|
@@ -4591,9 +4674,9 @@ var StatisticCard = ({ className, icon, label, value, ...props }) => {
|
|
|
4591
4674
|
// src/components/Switch/Switch.tsx
|
|
4592
4675
|
import { forwardRef as forwardRef101 } from "react";
|
|
4593
4676
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
4594
|
-
import { jsx as
|
|
4677
|
+
import { jsx as jsx178 } from "react/jsx-runtime";
|
|
4595
4678
|
var Switch = forwardRef101(function Switch2({ className, ...props }, ref) {
|
|
4596
|
-
return /* @__PURE__ */
|
|
4679
|
+
return /* @__PURE__ */ jsx178(
|
|
4597
4680
|
SwitchPrimitives.Root,
|
|
4598
4681
|
{
|
|
4599
4682
|
className: cn(
|
|
@@ -4602,7 +4685,7 @@ var Switch = forwardRef101(function Switch2({ className, ...props }, ref) {
|
|
|
4602
4685
|
),
|
|
4603
4686
|
...props,
|
|
4604
4687
|
ref,
|
|
4605
|
-
children: /* @__PURE__ */
|
|
4688
|
+
children: /* @__PURE__ */ jsx178(
|
|
4606
4689
|
SwitchPrimitives.Thumb,
|
|
4607
4690
|
{
|
|
4608
4691
|
className: cn(
|
|
@@ -4617,9 +4700,9 @@ var Switch = forwardRef101(function Switch2({ className, ...props }, ref) {
|
|
|
4617
4700
|
// src/components/Tabs/TabsContent.tsx
|
|
4618
4701
|
import { forwardRef as forwardRef102 } from "react";
|
|
4619
4702
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4620
|
-
import { jsx as
|
|
4703
|
+
import { jsx as jsx179 } from "react/jsx-runtime";
|
|
4621
4704
|
var TabsContent = forwardRef102(function TabsContent2({ className, ...props }, ref) {
|
|
4622
|
-
return /* @__PURE__ */
|
|
4705
|
+
return /* @__PURE__ */ jsx179(
|
|
4623
4706
|
TabsPrimitive.Content,
|
|
4624
4707
|
{
|
|
4625
4708
|
className: cn(
|
|
@@ -4635,9 +4718,9 @@ var TabsContent = forwardRef102(function TabsContent2({ className, ...props }, r
|
|
|
4635
4718
|
// src/components/Tabs/TabsList.tsx
|
|
4636
4719
|
import { forwardRef as forwardRef103 } from "react";
|
|
4637
4720
|
import * as TabsPrimitive2 from "@radix-ui/react-tabs";
|
|
4638
|
-
import { jsx as
|
|
4721
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
4639
4722
|
var TabsList = forwardRef103(function TabsList2({ className, ...props }, ref) {
|
|
4640
|
-
return /* @__PURE__ */
|
|
4723
|
+
return /* @__PURE__ */ jsx180(
|
|
4641
4724
|
TabsPrimitive2.List,
|
|
4642
4725
|
{
|
|
4643
4726
|
className: cn(
|
|
@@ -4653,19 +4736,19 @@ var TabsList = forwardRef103(function TabsList2({ className, ...props }, ref) {
|
|
|
4653
4736
|
// src/components/Tabs/TabsRoot.tsx
|
|
4654
4737
|
import { forwardRef as forwardRef104 } from "react";
|
|
4655
4738
|
import { Root as Root20 } from "@radix-ui/react-tabs";
|
|
4656
|
-
import { jsx as
|
|
4739
|
+
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
4657
4740
|
var TabsRoot = forwardRef104(
|
|
4658
4741
|
function TabsRoot2(props, ref) {
|
|
4659
|
-
return /* @__PURE__ */
|
|
4742
|
+
return /* @__PURE__ */ jsx181(Root20, { ref, ...props });
|
|
4660
4743
|
}
|
|
4661
4744
|
);
|
|
4662
4745
|
|
|
4663
4746
|
// src/components/Tabs/TabsTrigger.tsx
|
|
4664
4747
|
import { forwardRef as forwardRef105 } from "react";
|
|
4665
4748
|
import * as TabsPrimitive3 from "@radix-ui/react-tabs";
|
|
4666
|
-
import { jsx as
|
|
4749
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
4667
4750
|
var TabsTrigger = forwardRef105(function TabsTrigger2({ className, ...props }, ref) {
|
|
4668
|
-
return /* @__PURE__ */
|
|
4751
|
+
return /* @__PURE__ */ jsx182(
|
|
4669
4752
|
TabsPrimitive3.Trigger,
|
|
4670
4753
|
{
|
|
4671
4754
|
className: cn(
|
|
@@ -4687,7 +4770,7 @@ var Tabs = Object.assign(TabsRoot, {
|
|
|
4687
4770
|
|
|
4688
4771
|
// src/components/ThemeToggle/ThemeToggle.tsx
|
|
4689
4772
|
import { MoonIcon, SunIcon } from "lucide-react";
|
|
4690
|
-
import { jsx as
|
|
4773
|
+
import { jsx as jsx183, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
4691
4774
|
var ThemeToggle = ({ onClick, variant = "outline", ...props }) => {
|
|
4692
4775
|
const [theme, setTheme] = useTheme();
|
|
4693
4776
|
const toggleTheme = () => {
|
|
@@ -4704,8 +4787,8 @@ var ThemeToggle = ({ onClick, variant = "outline", ...props }) => {
|
|
|
4704
4787
|
},
|
|
4705
4788
|
...props,
|
|
4706
4789
|
children: [
|
|
4707
|
-
/* @__PURE__ */
|
|
4708
|
-
/* @__PURE__ */
|
|
4790
|
+
/* @__PURE__ */ jsx183(SunIcon, { className: "rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
4791
|
+
/* @__PURE__ */ jsx183(MoonIcon, { className: "absolute rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
|
|
4709
4792
|
]
|
|
4710
4793
|
}
|
|
4711
4794
|
);
|
|
@@ -4714,10 +4797,10 @@ var ThemeToggle = ({ onClick, variant = "outline", ...props }) => {
|
|
|
4714
4797
|
// src/components/Tooltip/TooltipContent.tsx
|
|
4715
4798
|
import * as React53 from "react";
|
|
4716
4799
|
import { Content as Content13 } from "@radix-ui/react-tooltip";
|
|
4717
|
-
import { jsx as
|
|
4800
|
+
import { jsx as jsx184 } from "react/jsx-runtime";
|
|
4718
4801
|
var TooltipContent = React53.forwardRef(
|
|
4719
4802
|
function TooltipContent2({ className, collisionPadding = 0, sideOffset = 4, ...props }, ref) {
|
|
4720
|
-
return /* @__PURE__ */
|
|
4803
|
+
return /* @__PURE__ */ jsx184(
|
|
4721
4804
|
Content13,
|
|
4722
4805
|
{
|
|
4723
4806
|
className: cn(
|
|
@@ -4736,7 +4819,7 @@ var TooltipContent = React53.forwardRef(
|
|
|
4736
4819
|
// src/components/Tooltip/TooltipRoot.tsx
|
|
4737
4820
|
import "react";
|
|
4738
4821
|
import { Provider, Root as Root21 } from "@radix-ui/react-tooltip";
|
|
4739
|
-
import { jsx as
|
|
4822
|
+
import { jsx as jsx185 } from "react/jsx-runtime";
|
|
4740
4823
|
var TooltipRoot = ({
|
|
4741
4824
|
children,
|
|
4742
4825
|
delayDuration = 0,
|
|
@@ -4744,15 +4827,15 @@ var TooltipRoot = ({
|
|
|
4744
4827
|
open,
|
|
4745
4828
|
skipDelayDuration = 300
|
|
4746
4829
|
}) => {
|
|
4747
|
-
return /* @__PURE__ */
|
|
4830
|
+
return /* @__PURE__ */ jsx185(Provider, { delayDuration, skipDelayDuration, children: /* @__PURE__ */ jsx185(Root21, { open, onOpenChange, children }) });
|
|
4748
4831
|
};
|
|
4749
4832
|
|
|
4750
4833
|
// src/components/Tooltip/TooltipTrigger.tsx
|
|
4751
4834
|
import { forwardRef as forwardRef107 } from "react";
|
|
4752
4835
|
import { Trigger as Trigger12 } from "@radix-ui/react-tooltip";
|
|
4753
|
-
import { jsx as
|
|
4836
|
+
import { jsx as jsx186 } from "react/jsx-runtime";
|
|
4754
4837
|
var TooltipTrigger = forwardRef107(function TooltipTrigger2({ variant = "outline", ...props }, ref) {
|
|
4755
|
-
return /* @__PURE__ */
|
|
4838
|
+
return /* @__PURE__ */ jsx186(Trigger12, { asChild: true, ref, children: /* @__PURE__ */ jsx186(Button, { variant, ...props }) });
|
|
4756
4839
|
});
|
|
4757
4840
|
|
|
4758
4841
|
// src/components/Tooltip/Tooltip.tsx
|
|
@@ -4796,6 +4879,7 @@ export {
|
|
|
4796
4879
|
ListboxDropdown,
|
|
4797
4880
|
MenuBar,
|
|
4798
4881
|
NotificationHub,
|
|
4882
|
+
OneTimePasswordInput,
|
|
4799
4883
|
Pagination,
|
|
4800
4884
|
Popover,
|
|
4801
4885
|
Progress,
|