@rock.star/ui 1.1.2 → 1.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +314 -282
- package/dist/index.js.map +1 -1
- package/dist/loader.css +93 -0
- package/dist/ui/index.d.ts +3 -1
- package/dist/ui/index.js +344 -298
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3553,6 +3553,37 @@ function useMediaQuery(query) {
|
|
|
3553
3553
|
return matches;
|
|
3554
3554
|
}
|
|
3555
3555
|
|
|
3556
|
+
// src/ui/farmer/div.tsx
|
|
3557
|
+
import { motion as motion5 } from "motion/react";
|
|
3558
|
+
import React9 from "react";
|
|
3559
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3560
|
+
var AnimatedDiv = React9.forwardRef(
|
|
3561
|
+
({ variants, mobileVariants, className, children, infinity, ...motionProps }, ref) => {
|
|
3562
|
+
const isDesktop = useMediaQuery("(min-width: 768px)");
|
|
3563
|
+
const selectedVariants = !isDesktop && mobileVariants ? mobileVariants : variants;
|
|
3564
|
+
return /* @__PURE__ */ jsx29(
|
|
3565
|
+
motion5.div,
|
|
3566
|
+
{
|
|
3567
|
+
ref,
|
|
3568
|
+
layout: true,
|
|
3569
|
+
className,
|
|
3570
|
+
initial: "hidden",
|
|
3571
|
+
transition: {
|
|
3572
|
+
staggerChildren: 0.1,
|
|
3573
|
+
delayChildren: 0.2
|
|
3574
|
+
},
|
|
3575
|
+
variants: selectedVariants,
|
|
3576
|
+
viewport: { once: !infinity },
|
|
3577
|
+
whileInView: "visible",
|
|
3578
|
+
...motionProps,
|
|
3579
|
+
children
|
|
3580
|
+
}
|
|
3581
|
+
);
|
|
3582
|
+
}
|
|
3583
|
+
);
|
|
3584
|
+
AnimatedDiv.displayName = "AnimatedDiv";
|
|
3585
|
+
var div_default = AnimatedDiv;
|
|
3586
|
+
|
|
3556
3587
|
// src/ui/farmer/FramerMotionVariants.ts
|
|
3557
3588
|
var activityItemAnimation = {
|
|
3558
3589
|
hidden: {
|
|
@@ -3850,9 +3881,9 @@ import { cva as cva7 } from "class-variance-authority";
|
|
|
3850
3881
|
import { useMemo as useMemo3 } from "react";
|
|
3851
3882
|
|
|
3852
3883
|
// src/ui/label.tsx
|
|
3853
|
-
import { jsx as
|
|
3884
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
3854
3885
|
function Label({ className, ...props }) {
|
|
3855
|
-
return /* @__PURE__ */
|
|
3886
|
+
return /* @__PURE__ */ jsx30(
|
|
3856
3887
|
"label",
|
|
3857
3888
|
{
|
|
3858
3889
|
"data-slot": "label",
|
|
@@ -3866,9 +3897,9 @@ function Label({ className, ...props }) {
|
|
|
3866
3897
|
}
|
|
3867
3898
|
|
|
3868
3899
|
// src/ui/field.tsx
|
|
3869
|
-
import { jsx as
|
|
3900
|
+
import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3870
3901
|
function FieldSet({ className, ...props }) {
|
|
3871
|
-
return /* @__PURE__ */
|
|
3902
|
+
return /* @__PURE__ */ jsx31(
|
|
3872
3903
|
"fieldset",
|
|
3873
3904
|
{
|
|
3874
3905
|
"data-slot": "field-set",
|
|
@@ -3885,7 +3916,7 @@ function FieldLegend({
|
|
|
3885
3916
|
variant = "legend",
|
|
3886
3917
|
...props
|
|
3887
3918
|
}) {
|
|
3888
|
-
return /* @__PURE__ */
|
|
3919
|
+
return /* @__PURE__ */ jsx31(
|
|
3889
3920
|
"legend",
|
|
3890
3921
|
{
|
|
3891
3922
|
"data-slot": "field-legend",
|
|
@@ -3899,7 +3930,7 @@ function FieldLegend({
|
|
|
3899
3930
|
);
|
|
3900
3931
|
}
|
|
3901
3932
|
function FieldGroup({ className, ...props }) {
|
|
3902
|
-
return /* @__PURE__ */
|
|
3933
|
+
return /* @__PURE__ */ jsx31(
|
|
3903
3934
|
"div",
|
|
3904
3935
|
{
|
|
3905
3936
|
"data-slot": "field-group",
|
|
@@ -3931,7 +3962,7 @@ function Field({
|
|
|
3931
3962
|
orientation = "vertical",
|
|
3932
3963
|
...props
|
|
3933
3964
|
}) {
|
|
3934
|
-
return /* @__PURE__ */
|
|
3965
|
+
return /* @__PURE__ */ jsx31(
|
|
3935
3966
|
"div",
|
|
3936
3967
|
{
|
|
3937
3968
|
role: "group",
|
|
@@ -3943,7 +3974,7 @@ function Field({
|
|
|
3943
3974
|
);
|
|
3944
3975
|
}
|
|
3945
3976
|
function FieldContent({ className, ...props }) {
|
|
3946
|
-
return /* @__PURE__ */
|
|
3977
|
+
return /* @__PURE__ */ jsx31(
|
|
3947
3978
|
"div",
|
|
3948
3979
|
{
|
|
3949
3980
|
"data-slot": "field-content",
|
|
@@ -3959,7 +3990,7 @@ function FieldLabel({
|
|
|
3959
3990
|
className,
|
|
3960
3991
|
...props
|
|
3961
3992
|
}) {
|
|
3962
|
-
return /* @__PURE__ */
|
|
3993
|
+
return /* @__PURE__ */ jsx31(
|
|
3963
3994
|
Label,
|
|
3964
3995
|
{
|
|
3965
3996
|
"data-slot": "field-label",
|
|
@@ -3973,7 +4004,7 @@ function FieldLabel({
|
|
|
3973
4004
|
);
|
|
3974
4005
|
}
|
|
3975
4006
|
function FieldTitle({ className, ...props }) {
|
|
3976
|
-
return /* @__PURE__ */
|
|
4007
|
+
return /* @__PURE__ */ jsx31(
|
|
3977
4008
|
"div",
|
|
3978
4009
|
{
|
|
3979
4010
|
"data-slot": "field-label",
|
|
@@ -3986,7 +4017,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
3986
4017
|
);
|
|
3987
4018
|
}
|
|
3988
4019
|
function FieldDescription({ className, ...props }) {
|
|
3989
|
-
return /* @__PURE__ */
|
|
4020
|
+
return /* @__PURE__ */ jsx31(
|
|
3990
4021
|
"p",
|
|
3991
4022
|
{
|
|
3992
4023
|
"data-slot": "field-description",
|
|
@@ -4016,8 +4047,8 @@ function FieldSeparator({
|
|
|
4016
4047
|
),
|
|
4017
4048
|
...props,
|
|
4018
4049
|
children: [
|
|
4019
|
-
/* @__PURE__ */
|
|
4020
|
-
children && /* @__PURE__ */
|
|
4050
|
+
/* @__PURE__ */ jsx31(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
4051
|
+
children && /* @__PURE__ */ jsx31(
|
|
4021
4052
|
"span",
|
|
4022
4053
|
{
|
|
4023
4054
|
className: "relative mx-auto block w-fit px-2 text-muted-foreground",
|
|
@@ -4048,14 +4079,14 @@ function FieldError({
|
|
|
4048
4079
|
if (uniqueErrors?.length == 1) {
|
|
4049
4080
|
return uniqueErrors[0]?.message;
|
|
4050
4081
|
}
|
|
4051
|
-
return /* @__PURE__ */
|
|
4052
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
4082
|
+
return /* @__PURE__ */ jsx31("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
4083
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx31("li", { children: error.message }, index)
|
|
4053
4084
|
) });
|
|
4054
4085
|
}, [children, errors]);
|
|
4055
4086
|
if (!content) {
|
|
4056
4087
|
return null;
|
|
4057
4088
|
}
|
|
4058
|
-
return /* @__PURE__ */
|
|
4089
|
+
return /* @__PURE__ */ jsx31(
|
|
4059
4090
|
"div",
|
|
4060
4091
|
{
|
|
4061
4092
|
role: "alert",
|
|
@@ -4070,7 +4101,7 @@ function FieldError({
|
|
|
4070
4101
|
// src/ui/image.tsx
|
|
4071
4102
|
import NextImage from "next/image";
|
|
4072
4103
|
import { useCallback as useCallback2, useState as useState5 } from "react";
|
|
4073
|
-
import { jsx as
|
|
4104
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4074
4105
|
function srcValue(src) {
|
|
4075
4106
|
if (!src) return null;
|
|
4076
4107
|
if (typeof src === "string") return src;
|
|
@@ -4090,7 +4121,7 @@ function Image({
|
|
|
4090
4121
|
onLoad,
|
|
4091
4122
|
onError,
|
|
4092
4123
|
children,
|
|
4093
|
-
fallback = /* @__PURE__ */
|
|
4124
|
+
fallback = /* @__PURE__ */ jsx32(JellyMini, { mood: "curious", className: "size-full p-4" }),
|
|
4094
4125
|
...props
|
|
4095
4126
|
}) {
|
|
4096
4127
|
const currentSrc = srcValue(src);
|
|
@@ -4111,8 +4142,8 @@ function Image({
|
|
|
4111
4142
|
setFailedSrc(currentSrc);
|
|
4112
4143
|
}, [currentSrc]);
|
|
4113
4144
|
return /* @__PURE__ */ jsxs17("section", { className: cn("relative block overflow-hidden", wrapper), children: [
|
|
4114
|
-
showSkeleton && !loaded && !failed && hasSource && /* @__PURE__ */
|
|
4115
|
-
hasSource && !failed ? /* @__PURE__ */
|
|
4145
|
+
showSkeleton && !loaded && !failed && hasSource && /* @__PURE__ */ jsx32(Skeleton, { className: "absolute inset-0 size-full" }),
|
|
4146
|
+
hasSource && !failed ? /* @__PURE__ */ jsx32(
|
|
4116
4147
|
NextImage,
|
|
4117
4148
|
{
|
|
4118
4149
|
...props,
|
|
@@ -4142,16 +4173,16 @@ function Image({
|
|
|
4142
4173
|
}
|
|
4143
4174
|
|
|
4144
4175
|
// src/ui/input-otp.tsx
|
|
4145
|
-
import * as
|
|
4176
|
+
import * as React10 from "react";
|
|
4146
4177
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
4147
4178
|
import { MinusIcon } from "lucide-react";
|
|
4148
|
-
import { jsx as
|
|
4179
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4149
4180
|
function InputOTP({
|
|
4150
4181
|
className,
|
|
4151
4182
|
containerClassName,
|
|
4152
4183
|
...props
|
|
4153
4184
|
}) {
|
|
4154
|
-
return /* @__PURE__ */
|
|
4185
|
+
return /* @__PURE__ */ jsx33(
|
|
4155
4186
|
OTPInput,
|
|
4156
4187
|
{
|
|
4157
4188
|
"data-slot": "input-otp",
|
|
@@ -4166,7 +4197,7 @@ function InputOTP({
|
|
|
4166
4197
|
);
|
|
4167
4198
|
}
|
|
4168
4199
|
function InputOTPGroup({ className, ...props }) {
|
|
4169
|
-
return /* @__PURE__ */
|
|
4200
|
+
return /* @__PURE__ */ jsx33(
|
|
4170
4201
|
"div",
|
|
4171
4202
|
{
|
|
4172
4203
|
"data-slot": "input-otp-group",
|
|
@@ -4183,7 +4214,7 @@ function InputOTPSlot({
|
|
|
4183
4214
|
className,
|
|
4184
4215
|
...props
|
|
4185
4216
|
}) {
|
|
4186
|
-
const inputOTPContext =
|
|
4217
|
+
const inputOTPContext = React10.useContext(OTPInputContext);
|
|
4187
4218
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4188
4219
|
return /* @__PURE__ */ jsxs18(
|
|
4189
4220
|
"div",
|
|
@@ -4197,20 +4228,20 @@ function InputOTPSlot({
|
|
|
4197
4228
|
...props,
|
|
4198
4229
|
children: [
|
|
4199
4230
|
char,
|
|
4200
|
-
hasFakeCaret && /* @__PURE__ */
|
|
4231
|
+
hasFakeCaret && /* @__PURE__ */ jsx33("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx33("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
4201
4232
|
]
|
|
4202
4233
|
}
|
|
4203
4234
|
);
|
|
4204
4235
|
}
|
|
4205
4236
|
function InputOTPSeparator({ ...props }) {
|
|
4206
|
-
return /* @__PURE__ */
|
|
4237
|
+
return /* @__PURE__ */ jsx33(
|
|
4207
4238
|
"div",
|
|
4208
4239
|
{
|
|
4209
4240
|
"data-slot": "input-otp-separator",
|
|
4210
4241
|
className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
|
|
4211
4242
|
role: "separator",
|
|
4212
4243
|
...props,
|
|
4213
|
-
children: /* @__PURE__ */
|
|
4244
|
+
children: /* @__PURE__ */ jsx33(MinusIcon, {})
|
|
4214
4245
|
}
|
|
4215
4246
|
);
|
|
4216
4247
|
}
|
|
@@ -4219,9 +4250,9 @@ function InputOTPSeparator({ ...props }) {
|
|
|
4219
4250
|
import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
|
|
4220
4251
|
import { useRender as useRender4 } from "@base-ui/react/use-render";
|
|
4221
4252
|
import { cva as cva8 } from "class-variance-authority";
|
|
4222
|
-
import { jsx as
|
|
4253
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4223
4254
|
function ItemGroup({ className, ...props }) {
|
|
4224
|
-
return /* @__PURE__ */
|
|
4255
|
+
return /* @__PURE__ */ jsx34(
|
|
4225
4256
|
"div",
|
|
4226
4257
|
{
|
|
4227
4258
|
role: "list",
|
|
@@ -4238,7 +4269,7 @@ function ItemSeparator({
|
|
|
4238
4269
|
className,
|
|
4239
4270
|
...props
|
|
4240
4271
|
}) {
|
|
4241
|
-
return /* @__PURE__ */
|
|
4272
|
+
return /* @__PURE__ */ jsx34(
|
|
4242
4273
|
Separator,
|
|
4243
4274
|
{
|
|
4244
4275
|
"data-slot": "item-separator",
|
|
@@ -4312,7 +4343,7 @@ function ItemMedia({
|
|
|
4312
4343
|
variant = "default",
|
|
4313
4344
|
...props
|
|
4314
4345
|
}) {
|
|
4315
|
-
return /* @__PURE__ */
|
|
4346
|
+
return /* @__PURE__ */ jsx34(
|
|
4316
4347
|
"div",
|
|
4317
4348
|
{
|
|
4318
4349
|
"data-slot": "item-media",
|
|
@@ -4323,7 +4354,7 @@ function ItemMedia({
|
|
|
4323
4354
|
);
|
|
4324
4355
|
}
|
|
4325
4356
|
function ItemContent({ className, ...props }) {
|
|
4326
|
-
return /* @__PURE__ */
|
|
4357
|
+
return /* @__PURE__ */ jsx34(
|
|
4327
4358
|
"div",
|
|
4328
4359
|
{
|
|
4329
4360
|
"data-slot": "item-content",
|
|
@@ -4336,7 +4367,7 @@ function ItemContent({ className, ...props }) {
|
|
|
4336
4367
|
);
|
|
4337
4368
|
}
|
|
4338
4369
|
function ItemTitle({ className, ...props }) {
|
|
4339
|
-
return /* @__PURE__ */
|
|
4370
|
+
return /* @__PURE__ */ jsx34(
|
|
4340
4371
|
"div",
|
|
4341
4372
|
{
|
|
4342
4373
|
"data-slot": "item-title",
|
|
@@ -4349,7 +4380,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
4349
4380
|
);
|
|
4350
4381
|
}
|
|
4351
4382
|
function ItemDescription({ className, ...props }) {
|
|
4352
|
-
return /* @__PURE__ */
|
|
4383
|
+
return /* @__PURE__ */ jsx34(
|
|
4353
4384
|
"p",
|
|
4354
4385
|
{
|
|
4355
4386
|
"data-slot": "item-description",
|
|
@@ -4362,7 +4393,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
4362
4393
|
);
|
|
4363
4394
|
}
|
|
4364
4395
|
function ItemActions({ className, ...props }) {
|
|
4365
|
-
return /* @__PURE__ */
|
|
4396
|
+
return /* @__PURE__ */ jsx34(
|
|
4366
4397
|
"div",
|
|
4367
4398
|
{
|
|
4368
4399
|
"data-slot": "item-actions",
|
|
@@ -4372,7 +4403,7 @@ function ItemActions({ className, ...props }) {
|
|
|
4372
4403
|
);
|
|
4373
4404
|
}
|
|
4374
4405
|
function ItemHeader({ className, ...props }) {
|
|
4375
|
-
return /* @__PURE__ */
|
|
4406
|
+
return /* @__PURE__ */ jsx34(
|
|
4376
4407
|
"div",
|
|
4377
4408
|
{
|
|
4378
4409
|
"data-slot": "item-header",
|
|
@@ -4385,7 +4416,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
4385
4416
|
);
|
|
4386
4417
|
}
|
|
4387
4418
|
function ItemFooter({ className, ...props }) {
|
|
4388
|
-
return /* @__PURE__ */
|
|
4419
|
+
return /* @__PURE__ */ jsx34(
|
|
4389
4420
|
"div",
|
|
4390
4421
|
{
|
|
4391
4422
|
"data-slot": "item-footer",
|
|
@@ -4429,7 +4460,7 @@ import {
|
|
|
4429
4460
|
useQueryStates
|
|
4430
4461
|
} from "nuqs";
|
|
4431
4462
|
import { NuqsAdapter } from "nuqs/adapters/next/app";
|
|
4432
|
-
import * as
|
|
4463
|
+
import * as React11 from "react";
|
|
4433
4464
|
var SEARCH_DELAY = 500;
|
|
4434
4465
|
var PRODUCT_SEARCH_DELAY = 800;
|
|
4435
4466
|
function isSearchPath(pathname) {
|
|
@@ -4451,7 +4482,7 @@ function useSearchParams() {
|
|
|
4451
4482
|
const pathname = usePathname();
|
|
4452
4483
|
const router = useRouter2();
|
|
4453
4484
|
const nativeSearchParams = useNextSearchParams();
|
|
4454
|
-
const [isPending, startTransition] =
|
|
4485
|
+
const [isPending, startTransition] = React11.useTransition();
|
|
4455
4486
|
const [params, setParams] = useQueryStates(searchParams, {
|
|
4456
4487
|
urlKeys: searchParamKeys,
|
|
4457
4488
|
history: "replace",
|
|
@@ -4459,18 +4490,18 @@ function useSearchParams() {
|
|
|
4459
4490
|
scroll: false,
|
|
4460
4491
|
startTransition
|
|
4461
4492
|
});
|
|
4462
|
-
const productQueryRef =
|
|
4463
|
-
const productNavigationQueuedRef =
|
|
4493
|
+
const productQueryRef = React11.useRef(params.query);
|
|
4494
|
+
const productNavigationQueuedRef = React11.useRef(false);
|
|
4464
4495
|
const onSearchPath = isSearchPath(pathname);
|
|
4465
4496
|
const cart = hasFlagSearchParam(nativeSearchParams, "cart");
|
|
4466
4497
|
const notification = hasFlagSearchParam(nativeSearchParams, "notification");
|
|
4467
|
-
const updateParams =
|
|
4498
|
+
const updateParams = React11.useCallback(
|
|
4468
4499
|
(values, options) => {
|
|
4469
4500
|
void setParams(values, options);
|
|
4470
4501
|
},
|
|
4471
4502
|
[setParams]
|
|
4472
4503
|
);
|
|
4473
|
-
const setQuery =
|
|
4504
|
+
const setQuery = React11.useCallback(
|
|
4474
4505
|
(value) => {
|
|
4475
4506
|
const update = setParams(
|
|
4476
4507
|
{ query: value, page: 1 },
|
|
@@ -4497,13 +4528,13 @@ function useSearchParams() {
|
|
|
4497
4528
|
},
|
|
4498
4529
|
[onSearchPath, router, setParams]
|
|
4499
4530
|
);
|
|
4500
|
-
const commitQuery =
|
|
4531
|
+
const commitQuery = React11.useCallback(() => {
|
|
4501
4532
|
const query = params.query.trim();
|
|
4502
4533
|
if (!query || onSearchPath) return;
|
|
4503
4534
|
pendingSearchFocus = true;
|
|
4504
4535
|
router.push(searchHref(query), { scroll: true });
|
|
4505
4536
|
}, [onSearchPath, params.query, router]);
|
|
4506
|
-
const setCategory =
|
|
4537
|
+
const setCategory = React11.useCallback(
|
|
4507
4538
|
(value) => {
|
|
4508
4539
|
updateParams(
|
|
4509
4540
|
{ category: value, page: 1 },
|
|
@@ -4512,7 +4543,7 @@ function useSearchParams() {
|
|
|
4512
4543
|
},
|
|
4513
4544
|
[updateParams]
|
|
4514
4545
|
);
|
|
4515
|
-
const setProductStatus =
|
|
4546
|
+
const setProductStatus = React11.useCallback(
|
|
4516
4547
|
(value) => {
|
|
4517
4548
|
updateParams(
|
|
4518
4549
|
{ productStatus: value, page: 1 },
|
|
@@ -4521,7 +4552,7 @@ function useSearchParams() {
|
|
|
4521
4552
|
},
|
|
4522
4553
|
[updateParams]
|
|
4523
4554
|
);
|
|
4524
|
-
const setUser =
|
|
4555
|
+
const setUser = React11.useCallback(
|
|
4525
4556
|
(value) => {
|
|
4526
4557
|
updateParams(
|
|
4527
4558
|
{ user: value },
|
|
@@ -4535,7 +4566,7 @@ function useSearchParams() {
|
|
|
4535
4566
|
},
|
|
4536
4567
|
[updateParams]
|
|
4537
4568
|
);
|
|
4538
|
-
const setPage =
|
|
4569
|
+
const setPage = React11.useCallback(
|
|
4539
4570
|
(value) => {
|
|
4540
4571
|
updateParams(
|
|
4541
4572
|
{ page: value },
|
|
@@ -4544,7 +4575,7 @@ function useSearchParams() {
|
|
|
4544
4575
|
},
|
|
4545
4576
|
[updateParams]
|
|
4546
4577
|
);
|
|
4547
|
-
const setUserTransaction =
|
|
4578
|
+
const setUserTransaction = React11.useCallback(
|
|
4548
4579
|
(value) => {
|
|
4549
4580
|
updateParams(
|
|
4550
4581
|
{ user: value, transaction: "", transactionPage: 1 },
|
|
@@ -4553,7 +4584,7 @@ function useSearchParams() {
|
|
|
4553
4584
|
},
|
|
4554
4585
|
[updateParams]
|
|
4555
4586
|
);
|
|
4556
|
-
const setTransactionDetail =
|
|
4587
|
+
const setTransactionDetail = React11.useCallback(
|
|
4557
4588
|
(value) => {
|
|
4558
4589
|
updateParams(
|
|
4559
4590
|
{ transaction: value },
|
|
@@ -4562,19 +4593,19 @@ function useSearchParams() {
|
|
|
4562
4593
|
},
|
|
4563
4594
|
[updateParams]
|
|
4564
4595
|
);
|
|
4565
|
-
const clearTransactionDetail =
|
|
4596
|
+
const clearTransactionDetail = React11.useCallback(() => {
|
|
4566
4597
|
updateParams(
|
|
4567
4598
|
{ transaction: "" },
|
|
4568
4599
|
{ history: "replace", shallow: false, scroll: false }
|
|
4569
4600
|
);
|
|
4570
4601
|
}, [updateParams]);
|
|
4571
|
-
const clearUserTransaction =
|
|
4602
|
+
const clearUserTransaction = React11.useCallback(() => {
|
|
4572
4603
|
updateParams(
|
|
4573
4604
|
{ user: "", transaction: "", transactionPage: 1 },
|
|
4574
4605
|
{ history: "replace", shallow: false, scroll: false }
|
|
4575
4606
|
);
|
|
4576
4607
|
}, [updateParams]);
|
|
4577
|
-
const clearAll =
|
|
4608
|
+
const clearAll = React11.useCallback(() => {
|
|
4578
4609
|
updateParams(
|
|
4579
4610
|
{
|
|
4580
4611
|
query: "",
|
|
@@ -4592,7 +4623,7 @@ function useSearchParams() {
|
|
|
4592
4623
|
}
|
|
4593
4624
|
);
|
|
4594
4625
|
}, [updateParams]);
|
|
4595
|
-
const setCart =
|
|
4626
|
+
const setCart = React11.useCallback(
|
|
4596
4627
|
(value) => {
|
|
4597
4628
|
window.history.replaceState(
|
|
4598
4629
|
null,
|
|
@@ -4602,10 +4633,10 @@ function useSearchParams() {
|
|
|
4602
4633
|
},
|
|
4603
4634
|
[nativeSearchParams, pathname]
|
|
4604
4635
|
);
|
|
4605
|
-
const toggleCart =
|
|
4636
|
+
const toggleCart = React11.useCallback(() => {
|
|
4606
4637
|
setCart(!cart);
|
|
4607
4638
|
}, [cart, setCart]);
|
|
4608
|
-
const setNotification =
|
|
4639
|
+
const setNotification = React11.useCallback(
|
|
4609
4640
|
(value) => {
|
|
4610
4641
|
window.history.replaceState(
|
|
4611
4642
|
null,
|
|
@@ -4663,15 +4694,15 @@ import {
|
|
|
4663
4694
|
BlobSpeech,
|
|
4664
4695
|
JellyBlobMascot
|
|
4665
4696
|
} from "feral-blob";
|
|
4666
|
-
import * as
|
|
4697
|
+
import * as React12 from "react";
|
|
4667
4698
|
import {
|
|
4668
4699
|
BlobSpeech as BlobSpeech2,
|
|
4669
4700
|
JellyBlobMascot as JellyBlobMascot2,
|
|
4670
4701
|
JellyBlobMascotDemo
|
|
4671
4702
|
} from "feral-blob";
|
|
4672
|
-
import { jsx as
|
|
4703
|
+
import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4673
4704
|
function JellyBlob({ ...props }) {
|
|
4674
|
-
return /* @__PURE__ */
|
|
4705
|
+
return /* @__PURE__ */ jsx35("span", { className: "inline-block", children: /* @__PURE__ */ jsx35(
|
|
4675
4706
|
JellyBlobMascot,
|
|
4676
4707
|
{
|
|
4677
4708
|
...props,
|
|
@@ -4701,7 +4732,7 @@ function JellyMini({
|
|
|
4701
4732
|
...props
|
|
4702
4733
|
}) {
|
|
4703
4734
|
const { mounted } = useMounted();
|
|
4704
|
-
return /* @__PURE__ */
|
|
4735
|
+
return /* @__PURE__ */ jsx35(
|
|
4705
4736
|
"span",
|
|
4706
4737
|
{
|
|
4707
4738
|
"aria-hidden": "true",
|
|
@@ -4709,7 +4740,7 @@ function JellyMini({
|
|
|
4709
4740
|
"inline-flex size-5 shrink-0 items-center justify-center select-none",
|
|
4710
4741
|
className
|
|
4711
4742
|
),
|
|
4712
|
-
children: mounted ? /* @__PURE__ */
|
|
4743
|
+
children: mounted ? /* @__PURE__ */ jsx35(
|
|
4713
4744
|
JellyBlobMascot,
|
|
4714
4745
|
{
|
|
4715
4746
|
...props,
|
|
@@ -4721,10 +4752,10 @@ function JellyMini({
|
|
|
4721
4752
|
}
|
|
4722
4753
|
);
|
|
4723
4754
|
}
|
|
4724
|
-
var JellyMascotContext =
|
|
4755
|
+
var JellyMascotContext = React12.createContext(null);
|
|
4725
4756
|
function useJellyMood() {
|
|
4726
|
-
const state =
|
|
4727
|
-
return
|
|
4757
|
+
const state = React12.useContext(JellyMascotContext);
|
|
4758
|
+
return React12.useCallback(
|
|
4728
4759
|
(mood) => {
|
|
4729
4760
|
if (!mood || !state) return {};
|
|
4730
4761
|
return {
|
|
@@ -4751,14 +4782,14 @@ function JellyAction({
|
|
|
4751
4782
|
...props
|
|
4752
4783
|
}) {
|
|
4753
4784
|
const preview = useJellyMood();
|
|
4754
|
-
return /* @__PURE__ */
|
|
4785
|
+
return /* @__PURE__ */ jsx35(Button, { ...props, ...withPreviewHandlers(preview, { ...props, mood }) });
|
|
4755
4786
|
}
|
|
4756
4787
|
function JellyLink({
|
|
4757
4788
|
mood,
|
|
4758
4789
|
...props
|
|
4759
4790
|
}) {
|
|
4760
4791
|
const preview = useJellyMood();
|
|
4761
|
-
return /* @__PURE__ */
|
|
4792
|
+
return /* @__PURE__ */ jsx35("a", { ...props, ...withPreviewHandlers(preview, { ...props, mood }) });
|
|
4762
4793
|
}
|
|
4763
4794
|
function JellyMascotProvider({
|
|
4764
4795
|
mood = "neutral",
|
|
@@ -4767,7 +4798,7 @@ function JellyMascotProvider({
|
|
|
4767
4798
|
...blobProps
|
|
4768
4799
|
}) {
|
|
4769
4800
|
const { mounted } = useMounted();
|
|
4770
|
-
const [previewMood, setPreviewMood] =
|
|
4801
|
+
const [previewMood, setPreviewMood] = React12.useState(
|
|
4771
4802
|
null
|
|
4772
4803
|
);
|
|
4773
4804
|
const activeMood = previewMood ?? mood;
|
|
@@ -4780,7 +4811,7 @@ function JellyMascotProvider({
|
|
|
4780
4811
|
blobProps,
|
|
4781
4812
|
setPreview: setPreviewMood
|
|
4782
4813
|
};
|
|
4783
|
-
return /* @__PURE__ */
|
|
4814
|
+
return /* @__PURE__ */ jsx35(JellyMascotContext.Provider, { value, children });
|
|
4784
4815
|
}
|
|
4785
4816
|
var SIZE_WRAPPER = {
|
|
4786
4817
|
sm: "w-20",
|
|
@@ -4792,7 +4823,7 @@ function JellyMascotFace({
|
|
|
4792
4823
|
size = "md",
|
|
4793
4824
|
className
|
|
4794
4825
|
}) {
|
|
4795
|
-
const mascot =
|
|
4826
|
+
const mascot = React12.useContext(JellyMascotContext);
|
|
4796
4827
|
if (!mascot) return null;
|
|
4797
4828
|
return /* @__PURE__ */ jsxs19(
|
|
4798
4829
|
"div",
|
|
@@ -4804,14 +4835,14 @@ function JellyMascotFace({
|
|
|
4804
4835
|
className
|
|
4805
4836
|
),
|
|
4806
4837
|
children: [
|
|
4807
|
-
mascot.speech ? /* @__PURE__ */
|
|
4838
|
+
mascot.speech ? /* @__PURE__ */ jsx35(
|
|
4808
4839
|
BlobSpeech,
|
|
4809
4840
|
{
|
|
4810
4841
|
mood: mascot.mood,
|
|
4811
4842
|
messages: { [mascot.mood]: mascot.speech }
|
|
4812
4843
|
}
|
|
4813
4844
|
) : null,
|
|
4814
|
-
mascot.mounted ? /* @__PURE__ */
|
|
4845
|
+
mascot.mounted ? /* @__PURE__ */ jsx35(
|
|
4815
4846
|
JellyBlobMascot,
|
|
4816
4847
|
{
|
|
4817
4848
|
...mascot.blobProps,
|
|
@@ -4830,15 +4861,15 @@ function JellyMascot({
|
|
|
4830
4861
|
className,
|
|
4831
4862
|
...config
|
|
4832
4863
|
}) {
|
|
4833
|
-
const existing =
|
|
4834
|
-
if (existing) return /* @__PURE__ */
|
|
4835
|
-
return /* @__PURE__ */
|
|
4864
|
+
const existing = React12.useContext(JellyMascotContext);
|
|
4865
|
+
if (existing) return /* @__PURE__ */ jsx35(JellyMascotFace, { size, className });
|
|
4866
|
+
return /* @__PURE__ */ jsx35(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsx35(JellyMascotFace, { size, className }) });
|
|
4836
4867
|
}
|
|
4837
4868
|
function JellyGroup({
|
|
4838
4869
|
children,
|
|
4839
4870
|
...config
|
|
4840
4871
|
}) {
|
|
4841
|
-
return /* @__PURE__ */
|
|
4872
|
+
return /* @__PURE__ */ jsx35(JellyMascotProvider, { ...config, children });
|
|
4842
4873
|
}
|
|
4843
4874
|
function JellyEmpty({
|
|
4844
4875
|
title,
|
|
@@ -4848,20 +4879,20 @@ function JellyEmpty({
|
|
|
4848
4879
|
className,
|
|
4849
4880
|
...config
|
|
4850
4881
|
}) {
|
|
4851
|
-
return /* @__PURE__ */
|
|
4882
|
+
return /* @__PURE__ */ jsx35(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsxs19(Empty, { className: cn("gap-4", className), children: [
|
|
4852
4883
|
/* @__PURE__ */ jsxs19(EmptyHeader, { className: "gap-2", children: [
|
|
4853
|
-
/* @__PURE__ */
|
|
4854
|
-
title ? /* @__PURE__ */
|
|
4855
|
-
description ? /* @__PURE__ */
|
|
4884
|
+
/* @__PURE__ */ jsx35(JellyMascotFace, { size }),
|
|
4885
|
+
title ? /* @__PURE__ */ jsx35(EmptyTitle, { className: "text-base font-semibold sm:text-lg", children: title }) : null,
|
|
4886
|
+
description ? /* @__PURE__ */ jsx35(EmptyDescription, { className: "max-w-sm", children: description }) : null
|
|
4856
4887
|
] }),
|
|
4857
|
-
actions ? /* @__PURE__ */
|
|
4888
|
+
actions ? /* @__PURE__ */ jsx35(EmptyContent, { children: actions }) : null
|
|
4858
4889
|
] }) });
|
|
4859
4890
|
}
|
|
4860
4891
|
|
|
4861
4892
|
// src/ui/kbd.tsx
|
|
4862
|
-
import { jsx as
|
|
4893
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4863
4894
|
function Kbd({ className, ...props }) {
|
|
4864
|
-
return /* @__PURE__ */
|
|
4895
|
+
return /* @__PURE__ */ jsx36(
|
|
4865
4896
|
"kbd",
|
|
4866
4897
|
{
|
|
4867
4898
|
"data-slot": "kbd",
|
|
@@ -4874,7 +4905,7 @@ function Kbd({ className, ...props }) {
|
|
|
4874
4905
|
);
|
|
4875
4906
|
}
|
|
4876
4907
|
function KbdGroup({ className, ...props }) {
|
|
4877
|
-
return /* @__PURE__ */
|
|
4908
|
+
return /* @__PURE__ */ jsx36(
|
|
4878
4909
|
"kbd",
|
|
4879
4910
|
{
|
|
4880
4911
|
"data-slot": "kbd-group",
|
|
@@ -4885,9 +4916,9 @@ function KbdGroup({ className, ...props }) {
|
|
|
4885
4916
|
}
|
|
4886
4917
|
|
|
4887
4918
|
// src/ui/message.tsx
|
|
4888
|
-
import { jsx as
|
|
4919
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
4889
4920
|
function MessageGroup({ className, ...props }) {
|
|
4890
|
-
return /* @__PURE__ */
|
|
4921
|
+
return /* @__PURE__ */ jsx37(
|
|
4891
4922
|
"div",
|
|
4892
4923
|
{
|
|
4893
4924
|
"data-slot": "message-group",
|
|
@@ -4901,7 +4932,7 @@ function Message({
|
|
|
4901
4932
|
align = "start",
|
|
4902
4933
|
...props
|
|
4903
4934
|
}) {
|
|
4904
|
-
return /* @__PURE__ */
|
|
4935
|
+
return /* @__PURE__ */ jsx37(
|
|
4905
4936
|
"div",
|
|
4906
4937
|
{
|
|
4907
4938
|
"data-slot": "message",
|
|
@@ -4915,7 +4946,7 @@ function Message({
|
|
|
4915
4946
|
);
|
|
4916
4947
|
}
|
|
4917
4948
|
function MessageAvatar({ className, ...props }) {
|
|
4918
|
-
return /* @__PURE__ */
|
|
4949
|
+
return /* @__PURE__ */ jsx37(
|
|
4919
4950
|
"div",
|
|
4920
4951
|
{
|
|
4921
4952
|
"data-slot": "message-avatar",
|
|
@@ -4928,7 +4959,7 @@ function MessageAvatar({ className, ...props }) {
|
|
|
4928
4959
|
);
|
|
4929
4960
|
}
|
|
4930
4961
|
function MessageContent({ className, ...props }) {
|
|
4931
|
-
return /* @__PURE__ */
|
|
4962
|
+
return /* @__PURE__ */ jsx37(
|
|
4932
4963
|
"div",
|
|
4933
4964
|
{
|
|
4934
4965
|
"data-slot": "message-content",
|
|
@@ -4941,7 +4972,7 @@ function MessageContent({ className, ...props }) {
|
|
|
4941
4972
|
);
|
|
4942
4973
|
}
|
|
4943
4974
|
function MessageHeader({ className, ...props }) {
|
|
4944
|
-
return /* @__PURE__ */
|
|
4975
|
+
return /* @__PURE__ */ jsx37(
|
|
4945
4976
|
"div",
|
|
4946
4977
|
{
|
|
4947
4978
|
"data-slot": "message-header",
|
|
@@ -4954,7 +4985,7 @@ function MessageHeader({ className, ...props }) {
|
|
|
4954
4985
|
);
|
|
4955
4986
|
}
|
|
4956
4987
|
function MessageFooter({ className, ...props }) {
|
|
4957
|
-
return /* @__PURE__ */
|
|
4988
|
+
return /* @__PURE__ */ jsx37(
|
|
4958
4989
|
"div",
|
|
4959
4990
|
{
|
|
4960
4991
|
"data-slot": "message-footer",
|
|
@@ -4975,15 +5006,15 @@ import {
|
|
|
4975
5006
|
useMessageScrollerVisibility
|
|
4976
5007
|
} from "@shadcn/react/message-scroller";
|
|
4977
5008
|
import { ArrowDownIcon } from "lucide-react";
|
|
4978
|
-
import { Fragment as Fragment2, jsx as
|
|
5009
|
+
import { Fragment as Fragment2, jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4979
5010
|
function MessageScrollerProvider(props) {
|
|
4980
|
-
return /* @__PURE__ */
|
|
5011
|
+
return /* @__PURE__ */ jsx38(MessageScrollerPrimitive.Provider, { ...props });
|
|
4981
5012
|
}
|
|
4982
5013
|
function MessageScroller({
|
|
4983
5014
|
className,
|
|
4984
5015
|
...props
|
|
4985
5016
|
}) {
|
|
4986
|
-
return /* @__PURE__ */
|
|
5017
|
+
return /* @__PURE__ */ jsx38(
|
|
4987
5018
|
MessageScrollerPrimitive.Root,
|
|
4988
5019
|
{
|
|
4989
5020
|
"data-slot": "message-scroller",
|
|
@@ -4999,7 +5030,7 @@ function MessageScrollerViewport({
|
|
|
4999
5030
|
className,
|
|
5000
5031
|
...props
|
|
5001
5032
|
}) {
|
|
5002
|
-
return /* @__PURE__ */
|
|
5033
|
+
return /* @__PURE__ */ jsx38(
|
|
5003
5034
|
MessageScrollerPrimitive.Viewport,
|
|
5004
5035
|
{
|
|
5005
5036
|
"data-slot": "message-scroller-viewport",
|
|
@@ -5015,7 +5046,7 @@ function MessageScrollerContent({
|
|
|
5015
5046
|
className,
|
|
5016
5047
|
...props
|
|
5017
5048
|
}) {
|
|
5018
|
-
return /* @__PURE__ */
|
|
5049
|
+
return /* @__PURE__ */ jsx38(
|
|
5019
5050
|
MessageScrollerPrimitive.Content,
|
|
5020
5051
|
{
|
|
5021
5052
|
"data-slot": "message-scroller-content",
|
|
@@ -5029,7 +5060,7 @@ function MessageScrollerItem({
|
|
|
5029
5060
|
scrollAnchor = false,
|
|
5030
5061
|
...props
|
|
5031
5062
|
}) {
|
|
5032
|
-
return /* @__PURE__ */
|
|
5063
|
+
return /* @__PURE__ */ jsx38(
|
|
5033
5064
|
MessageScrollerPrimitive.Item,
|
|
5034
5065
|
{
|
|
5035
5066
|
"data-slot": "message-scroller-item",
|
|
@@ -5051,7 +5082,7 @@ function MessageScrollerButton({
|
|
|
5051
5082
|
size = "icon-sm",
|
|
5052
5083
|
...props
|
|
5053
5084
|
}) {
|
|
5054
|
-
return /* @__PURE__ */
|
|
5085
|
+
return /* @__PURE__ */ jsx38(
|
|
5055
5086
|
MessageScrollerPrimitive.Button,
|
|
5056
5087
|
{
|
|
5057
5088
|
"data-slot": "message-scroller-button",
|
|
@@ -5063,11 +5094,11 @@ function MessageScrollerButton({
|
|
|
5063
5094
|
"data-[active=true]:ease-out-quint absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180",
|
|
5064
5095
|
className
|
|
5065
5096
|
),
|
|
5066
|
-
render: render ?? /* @__PURE__ */
|
|
5097
|
+
render: render ?? /* @__PURE__ */ jsx38(Button, { variant, size }),
|
|
5067
5098
|
...props,
|
|
5068
5099
|
children: children ?? /* @__PURE__ */ jsxs20(Fragment2, { children: [
|
|
5069
|
-
/* @__PURE__ */
|
|
5070
|
-
/* @__PURE__ */
|
|
5100
|
+
/* @__PURE__ */ jsx38(ArrowDownIcon, {}),
|
|
5101
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: direction === "end" ? "Scroll to end" : "Scroll to start" })
|
|
5071
5102
|
] })
|
|
5072
5103
|
}
|
|
5073
5104
|
);
|
|
@@ -5078,12 +5109,12 @@ import { clsx as clsx2 } from "clsx";
|
|
|
5078
5109
|
import {
|
|
5079
5110
|
AnimatePresence as AnimatePresence2,
|
|
5080
5111
|
animate,
|
|
5081
|
-
motion as
|
|
5112
|
+
motion as motion6,
|
|
5082
5113
|
useReducedMotion
|
|
5083
5114
|
} from "motion/react";
|
|
5084
5115
|
import { Fragment as Fragment3, useEffect as useEffect7, useId as useId2, useRef as useRef4, useState as useState9 } from "react";
|
|
5085
5116
|
import { twMerge as twMerge2 } from "tailwind-merge";
|
|
5086
|
-
import { jsx as
|
|
5117
|
+
import { jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5087
5118
|
var EASE_OUT = [0.16, 1, 0.3, 1];
|
|
5088
5119
|
var EASE_IN_OUT = [0.77, 0, 0.175, 1];
|
|
5089
5120
|
var EASE_DRAWER = [0.32, 0.72, 0, 1];
|
|
@@ -5252,7 +5283,7 @@ function OTPInput2({
|
|
|
5252
5283
|
const activeIndex = focused ? active : -1;
|
|
5253
5284
|
const message = showSuccess ? successMessage : status === "error" ? errorMessage : hint;
|
|
5254
5285
|
return /* @__PURE__ */ jsxs21("div", { className: otpCn("inline-flex flex-col gap-2", className), children: [
|
|
5255
|
-
label ? /* @__PURE__ */
|
|
5286
|
+
label ? /* @__PURE__ */ jsx39(
|
|
5256
5287
|
"label",
|
|
5257
5288
|
{
|
|
5258
5289
|
htmlFor: `${uid}-input`,
|
|
@@ -5273,7 +5304,7 @@ function OTPInput2({
|
|
|
5273
5304
|
inputRef.current?.focus();
|
|
5274
5305
|
},
|
|
5275
5306
|
children: [
|
|
5276
|
-
/* @__PURE__ */
|
|
5307
|
+
/* @__PURE__ */ jsx39(
|
|
5277
5308
|
"input",
|
|
5278
5309
|
{
|
|
5279
5310
|
ref: inputRef,
|
|
@@ -5300,7 +5331,7 @@ function OTPInput2({
|
|
|
5300
5331
|
className: "absolute inset-0 z-20 h-full w-full cursor-text bg-transparent text-transparent caret-transparent opacity-0 outline-none disabled:cursor-not-allowed"
|
|
5301
5332
|
}
|
|
5302
5333
|
),
|
|
5303
|
-
/* @__PURE__ */
|
|
5334
|
+
/* @__PURE__ */ jsx39("div", { ref: slotsRef, className: "flex items-center gap-3", children: Array.from({ length }, (_, i) => {
|
|
5304
5335
|
const char = slots[i] ?? "";
|
|
5305
5336
|
const isActive = i === activeIndex;
|
|
5306
5337
|
return /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
@@ -5317,8 +5348,8 @@ function OTPInput2({
|
|
|
5317
5348
|
disabled && "opacity-50"
|
|
5318
5349
|
),
|
|
5319
5350
|
children: [
|
|
5320
|
-
isActive && !showSuccess ? /* @__PURE__ */
|
|
5321
|
-
|
|
5351
|
+
isActive && !showSuccess ? /* @__PURE__ */ jsx39(
|
|
5352
|
+
motion6.span,
|
|
5322
5353
|
{
|
|
5323
5354
|
"aria-hidden": true,
|
|
5324
5355
|
animate: reduce ? void 0 : { opacity: [1, 1, 0, 0] },
|
|
@@ -5333,8 +5364,8 @@ function OTPInput2({
|
|
|
5333
5364
|
)
|
|
5334
5365
|
}
|
|
5335
5366
|
) : null,
|
|
5336
|
-
/* @__PURE__ */
|
|
5337
|
-
|
|
5367
|
+
/* @__PURE__ */ jsx39(AnimatePresence2, { initial: false, children: char ? /* @__PURE__ */ jsx39(
|
|
5368
|
+
motion6.span,
|
|
5338
5369
|
{
|
|
5339
5370
|
initial: reduce ? {
|
|
5340
5371
|
opacity: 0
|
|
@@ -5371,11 +5402,11 @@ function OTPInput2({
|
|
|
5371
5402
|
]
|
|
5372
5403
|
}
|
|
5373
5404
|
),
|
|
5374
|
-
i === 2 ? /* @__PURE__ */
|
|
5405
|
+
i === 2 ? /* @__PURE__ */ jsx39("span", { "aria-hidden": "true", className: "h-0.5 w-4 bg-primary" }) : null
|
|
5375
5406
|
] }, `${uid}-${i}`);
|
|
5376
5407
|
}) }),
|
|
5377
|
-
/* @__PURE__ */
|
|
5378
|
-
|
|
5408
|
+
/* @__PURE__ */ jsx39(AnimatePresence2, { children: showSuccess ? /* @__PURE__ */ jsx39(
|
|
5409
|
+
motion6.span,
|
|
5379
5410
|
{
|
|
5380
5411
|
initial: reduce ? {
|
|
5381
5412
|
opacity: 0
|
|
@@ -5416,9 +5447,9 @@ function OTPInput2({
|
|
|
5416
5447
|
strokeLinecap: "round",
|
|
5417
5448
|
strokeLinejoin: "round",
|
|
5418
5449
|
children: [
|
|
5419
|
-
/* @__PURE__ */
|
|
5420
|
-
/* @__PURE__ */
|
|
5421
|
-
|
|
5450
|
+
/* @__PURE__ */ jsx39("title", { children: "Verified" }),
|
|
5451
|
+
/* @__PURE__ */ jsx39(
|
|
5452
|
+
motion6.path,
|
|
5422
5453
|
{
|
|
5423
5454
|
d: "M5 13l4 4L19 7",
|
|
5424
5455
|
initial: reduce ? {
|
|
@@ -5446,7 +5477,7 @@ function OTPInput2({
|
|
|
5446
5477
|
]
|
|
5447
5478
|
}
|
|
5448
5479
|
),
|
|
5449
|
-
message ? /* @__PURE__ */
|
|
5480
|
+
message ? /* @__PURE__ */ jsx39(
|
|
5450
5481
|
"p",
|
|
5451
5482
|
{
|
|
5452
5483
|
"aria-live": "polite",
|
|
@@ -5469,12 +5500,12 @@ function toSlots(raw, length) {
|
|
|
5469
5500
|
|
|
5470
5501
|
// src/ui/popover.tsx
|
|
5471
5502
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
5472
|
-
import { jsx as
|
|
5503
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
5473
5504
|
function Popover({ ...props }) {
|
|
5474
|
-
return /* @__PURE__ */
|
|
5505
|
+
return /* @__PURE__ */ jsx40(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
5475
5506
|
}
|
|
5476
5507
|
function PopoverTrigger({ ...props }) {
|
|
5477
|
-
return /* @__PURE__ */
|
|
5508
|
+
return /* @__PURE__ */ jsx40(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
5478
5509
|
}
|
|
5479
5510
|
function PopoverContent({
|
|
5480
5511
|
className,
|
|
@@ -5484,7 +5515,7 @@ function PopoverContent({
|
|
|
5484
5515
|
sideOffset = 4,
|
|
5485
5516
|
...props
|
|
5486
5517
|
}) {
|
|
5487
|
-
return /* @__PURE__ */
|
|
5518
|
+
return /* @__PURE__ */ jsx40(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx40(
|
|
5488
5519
|
PopoverPrimitive.Positioner,
|
|
5489
5520
|
{
|
|
5490
5521
|
align,
|
|
@@ -5492,7 +5523,7 @@ function PopoverContent({
|
|
|
5492
5523
|
side,
|
|
5493
5524
|
sideOffset,
|
|
5494
5525
|
className: "isolate z-50",
|
|
5495
|
-
children: /* @__PURE__ */
|
|
5526
|
+
children: /* @__PURE__ */ jsx40(
|
|
5496
5527
|
PopoverPrimitive.Popup,
|
|
5497
5528
|
{
|
|
5498
5529
|
"data-slot": "popover-content",
|
|
@@ -5507,7 +5538,7 @@ function PopoverContent({
|
|
|
5507
5538
|
) });
|
|
5508
5539
|
}
|
|
5509
5540
|
function PopoverHeader({ className, ...props }) {
|
|
5510
|
-
return /* @__PURE__ */
|
|
5541
|
+
return /* @__PURE__ */ jsx40(
|
|
5511
5542
|
"div",
|
|
5512
5543
|
{
|
|
5513
5544
|
"data-slot": "popover-header",
|
|
@@ -5517,7 +5548,7 @@ function PopoverHeader({ className, ...props }) {
|
|
|
5517
5548
|
);
|
|
5518
5549
|
}
|
|
5519
5550
|
function PopoverTitle({ className, ...props }) {
|
|
5520
|
-
return /* @__PURE__ */
|
|
5551
|
+
return /* @__PURE__ */ jsx40(
|
|
5521
5552
|
PopoverPrimitive.Title,
|
|
5522
5553
|
{
|
|
5523
5554
|
"data-slot": "popover-title",
|
|
@@ -5530,7 +5561,7 @@ function PopoverDescription({
|
|
|
5530
5561
|
className,
|
|
5531
5562
|
...props
|
|
5532
5563
|
}) {
|
|
5533
|
-
return /* @__PURE__ */
|
|
5564
|
+
return /* @__PURE__ */ jsx40(
|
|
5534
5565
|
PopoverPrimitive.Description,
|
|
5535
5566
|
{
|
|
5536
5567
|
"data-slot": "popover-description",
|
|
@@ -5543,12 +5574,12 @@ function PopoverDescription({
|
|
|
5543
5574
|
// src/ui/quantity.tsx
|
|
5544
5575
|
import { NumberField } from "@base-ui/react/number-field";
|
|
5545
5576
|
import { Minus, Plus } from "@gravity-ui/icons";
|
|
5546
|
-
import * as
|
|
5547
|
-
import { jsx as
|
|
5548
|
-
var QuantityInput =
|
|
5549
|
-
const id =
|
|
5550
|
-
return /* @__PURE__ */
|
|
5551
|
-
/* @__PURE__ */
|
|
5577
|
+
import * as React13 from "react";
|
|
5578
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5579
|
+
var QuantityInput = React13.forwardRef(function QuantityInput2({ ...props }, ref) {
|
|
5580
|
+
const id = React13.useId();
|
|
5581
|
+
return /* @__PURE__ */ jsx41(NumberField.Root, { id, ...props, className: "flex flex-col items-start", children: /* @__PURE__ */ jsxs22(NumberField.Group, { className: "flex h-8 gap-1", children: [
|
|
5582
|
+
/* @__PURE__ */ jsx41(
|
|
5552
5583
|
NumberField.Decrement,
|
|
5553
5584
|
{
|
|
5554
5585
|
className: buttonVariants({
|
|
@@ -5556,10 +5587,10 @@ var QuantityInput = React12.forwardRef(function QuantityInput2({ ...props }, ref
|
|
|
5556
5587
|
size: "icon-sm",
|
|
5557
5588
|
className: "rounded-full! border-border!"
|
|
5558
5589
|
}),
|
|
5559
|
-
children: /* @__PURE__ */
|
|
5590
|
+
children: /* @__PURE__ */ jsx41(Minus, {})
|
|
5560
5591
|
}
|
|
5561
5592
|
),
|
|
5562
|
-
/* @__PURE__ */
|
|
5593
|
+
/* @__PURE__ */ jsx41(
|
|
5563
5594
|
NumberField.Input,
|
|
5564
5595
|
{
|
|
5565
5596
|
ref,
|
|
@@ -5567,7 +5598,7 @@ var QuantityInput = React12.forwardRef(function QuantityInput2({ ...props }, ref
|
|
|
5567
5598
|
"data-no-ring": true
|
|
5568
5599
|
}
|
|
5569
5600
|
),
|
|
5570
|
-
/* @__PURE__ */
|
|
5601
|
+
/* @__PURE__ */ jsx41(
|
|
5571
5602
|
NumberField.Increment,
|
|
5572
5603
|
{
|
|
5573
5604
|
className: buttonVariants({
|
|
@@ -5575,7 +5606,7 @@ var QuantityInput = React12.forwardRef(function QuantityInput2({ ...props }, ref
|
|
|
5575
5606
|
size: "icon-sm",
|
|
5576
5607
|
className: "rounded-full! border-border!"
|
|
5577
5608
|
}),
|
|
5578
|
-
children: /* @__PURE__ */
|
|
5609
|
+
children: /* @__PURE__ */ jsx41(Plus, {})
|
|
5579
5610
|
}
|
|
5580
5611
|
)
|
|
5581
5612
|
] }) });
|
|
@@ -5584,9 +5615,9 @@ var QuantityInput = React12.forwardRef(function QuantityInput2({ ...props }, ref
|
|
|
5584
5615
|
// src/ui/radio-group.tsx
|
|
5585
5616
|
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
5586
5617
|
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
5587
|
-
import { jsx as
|
|
5618
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
5588
5619
|
function RadioGroup({ className, ...props }) {
|
|
5589
|
-
return /* @__PURE__ */
|
|
5620
|
+
return /* @__PURE__ */ jsx42(
|
|
5590
5621
|
RadioGroupPrimitive,
|
|
5591
5622
|
{
|
|
5592
5623
|
"data-slot": "radio-group",
|
|
@@ -5596,7 +5627,7 @@ function RadioGroup({ className, ...props }) {
|
|
|
5596
5627
|
);
|
|
5597
5628
|
}
|
|
5598
5629
|
function RadioGroupItem({ className, ...props }) {
|
|
5599
|
-
return /* @__PURE__ */
|
|
5630
|
+
return /* @__PURE__ */ jsx42(
|
|
5600
5631
|
RadioPrimitive.Root,
|
|
5601
5632
|
{
|
|
5602
5633
|
"data-slot": "radio-group-item",
|
|
@@ -5605,12 +5636,12 @@ function RadioGroupItem({ className, ...props }) {
|
|
|
5605
5636
|
className
|
|
5606
5637
|
),
|
|
5607
5638
|
...props,
|
|
5608
|
-
children: /* @__PURE__ */
|
|
5639
|
+
children: /* @__PURE__ */ jsx42(
|
|
5609
5640
|
RadioPrimitive.Indicator,
|
|
5610
5641
|
{
|
|
5611
5642
|
"data-slot": "radio-group-indicator",
|
|
5612
5643
|
className: "flex size-4 items-center justify-center",
|
|
5613
|
-
children: /* @__PURE__ */
|
|
5644
|
+
children: /* @__PURE__ */ jsx42("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
5614
5645
|
}
|
|
5615
5646
|
)
|
|
5616
5647
|
}
|
|
@@ -5633,12 +5664,12 @@ import {
|
|
|
5633
5664
|
|
|
5634
5665
|
// src/ui/tooltip.tsx
|
|
5635
5666
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
5636
|
-
import { jsx as
|
|
5667
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5637
5668
|
function TooltipProvider({
|
|
5638
5669
|
delay = 0,
|
|
5639
5670
|
...props
|
|
5640
5671
|
}) {
|
|
5641
|
-
return /* @__PURE__ */
|
|
5672
|
+
return /* @__PURE__ */ jsx43(
|
|
5642
5673
|
TooltipPrimitive.Provider,
|
|
5643
5674
|
{
|
|
5644
5675
|
"data-slot": "tooltip-provider",
|
|
@@ -5648,10 +5679,10 @@ function TooltipProvider({
|
|
|
5648
5679
|
);
|
|
5649
5680
|
}
|
|
5650
5681
|
function Tooltip2({ ...props }) {
|
|
5651
|
-
return /* @__PURE__ */
|
|
5682
|
+
return /* @__PURE__ */ jsx43(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
|
|
5652
5683
|
}
|
|
5653
5684
|
function TooltipTrigger({ ...props }) {
|
|
5654
|
-
return /* @__PURE__ */
|
|
5685
|
+
return /* @__PURE__ */ jsx43(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
5655
5686
|
}
|
|
5656
5687
|
function TooltipContent({
|
|
5657
5688
|
className,
|
|
@@ -5662,7 +5693,7 @@ function TooltipContent({
|
|
|
5662
5693
|
children,
|
|
5663
5694
|
...props
|
|
5664
5695
|
}) {
|
|
5665
|
-
return /* @__PURE__ */
|
|
5696
|
+
return /* @__PURE__ */ jsx43(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx43(
|
|
5666
5697
|
TooltipPrimitive.Positioner,
|
|
5667
5698
|
{
|
|
5668
5699
|
align,
|
|
@@ -5681,7 +5712,7 @@ function TooltipContent({
|
|
|
5681
5712
|
...props,
|
|
5682
5713
|
children: [
|
|
5683
5714
|
children,
|
|
5684
|
-
/* @__PURE__ */
|
|
5715
|
+
/* @__PURE__ */ jsx43(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
|
|
5685
5716
|
]
|
|
5686
5717
|
}
|
|
5687
5718
|
)
|
|
@@ -5691,7 +5722,7 @@ function TooltipContent({
|
|
|
5691
5722
|
|
|
5692
5723
|
// src/ui/reui/filters.tsx
|
|
5693
5724
|
import { AlertCircleIcon, CheckIcon as CheckIcon2, PlusIcon, XIcon } from "lucide-react";
|
|
5694
|
-
import { Fragment as Fragment4, jsx as
|
|
5725
|
+
import { Fragment as Fragment4, jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5695
5726
|
var DEFAULT_I18N = {
|
|
5696
5727
|
// UI Labels
|
|
5697
5728
|
addFilter: "Filter",
|
|
@@ -5875,8 +5906,8 @@ function FilterInput({
|
|
|
5875
5906
|
className
|
|
5876
5907
|
),
|
|
5877
5908
|
children: [
|
|
5878
|
-
field?.prefix && /* @__PURE__ */
|
|
5879
|
-
/* @__PURE__ */
|
|
5909
|
+
field?.prefix && /* @__PURE__ */ jsx44(InputGroupAddon, { children: /* @__PURE__ */ jsx44(InputGroupText, { children: field.prefix }) }),
|
|
5910
|
+
/* @__PURE__ */ jsx44(
|
|
5880
5911
|
InputGroupInput,
|
|
5881
5912
|
{
|
|
5882
5913
|
ref: inputRef,
|
|
@@ -5891,22 +5922,22 @@ function FilterInput({
|
|
|
5891
5922
|
...props
|
|
5892
5923
|
}
|
|
5893
5924
|
),
|
|
5894
|
-
!isValid && validationMessage && /* @__PURE__ */
|
|
5895
|
-
/* @__PURE__ */
|
|
5896
|
-
/* @__PURE__ */
|
|
5925
|
+
!isValid && validationMessage && /* @__PURE__ */ jsx44(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxs24(Tooltip2, { children: [
|
|
5926
|
+
/* @__PURE__ */ jsx44(TooltipTrigger, { render: /* @__PURE__ */ jsx44(InputGroupButton, { size: "icon-xs" }), children: /* @__PURE__ */ jsx44(AlertCircleIcon, { className: "size-3.5 text-destructive" }) }),
|
|
5927
|
+
/* @__PURE__ */ jsx44(TooltipContent, { children: /* @__PURE__ */ jsx44("p", { className: "text-sm", children: validationMessage }) })
|
|
5897
5928
|
] }) }),
|
|
5898
|
-
field?.suffix && /* @__PURE__ */
|
|
5929
|
+
field?.suffix && /* @__PURE__ */ jsx44(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx44(InputGroupText, { children: field.suffix }) })
|
|
5899
5930
|
]
|
|
5900
5931
|
}
|
|
5901
5932
|
);
|
|
5902
5933
|
}
|
|
5903
5934
|
function FilterRemoveButton({
|
|
5904
5935
|
className,
|
|
5905
|
-
icon = /* @__PURE__ */
|
|
5936
|
+
icon = /* @__PURE__ */ jsx44(XIcon, {}),
|
|
5906
5937
|
...props
|
|
5907
5938
|
}) {
|
|
5908
5939
|
const context = useFilterContext();
|
|
5909
|
-
return /* @__PURE__ */
|
|
5940
|
+
return /* @__PURE__ */ jsx44(
|
|
5910
5941
|
Button,
|
|
5911
5942
|
{
|
|
5912
5943
|
variant: "outline",
|
|
@@ -6078,10 +6109,10 @@ function FilterOperatorDropdown({
|
|
|
6078
6109
|
);
|
|
6079
6110
|
const operatorLabel = operators.find((op) => op.value === operator)?.label || context.i18n.helpers.formatOperator(operator);
|
|
6080
6111
|
return /* @__PURE__ */ jsxs24(DropdownMenu, { children: [
|
|
6081
|
-
/* @__PURE__ */
|
|
6112
|
+
/* @__PURE__ */ jsx44(
|
|
6082
6113
|
DropdownMenuTrigger,
|
|
6083
6114
|
{
|
|
6084
|
-
render: /* @__PURE__ */
|
|
6115
|
+
render: /* @__PURE__ */ jsx44(
|
|
6085
6116
|
Button,
|
|
6086
6117
|
{
|
|
6087
6118
|
variant: "outline",
|
|
@@ -6092,7 +6123,7 @@ function FilterOperatorDropdown({
|
|
|
6092
6123
|
)
|
|
6093
6124
|
}
|
|
6094
6125
|
),
|
|
6095
|
-
/* @__PURE__ */
|
|
6126
|
+
/* @__PURE__ */ jsx44(DropdownMenuContent, { align: "start", className: "w-fit min-w-fit", children: operators.map((op) => /* @__PURE__ */ jsxs24(
|
|
6096
6127
|
DropdownMenuItem,
|
|
6097
6128
|
{
|
|
6098
6129
|
onClick: () => onChange(op.value),
|
|
@@ -6100,8 +6131,8 @@ function FilterOperatorDropdown({
|
|
|
6100
6131
|
"flex items-center justify-between data-highlighted:bg-accent data-highlighted:text-accent-foreground"
|
|
6101
6132
|
),
|
|
6102
6133
|
children: [
|
|
6103
|
-
/* @__PURE__ */
|
|
6104
|
-
/* @__PURE__ */
|
|
6134
|
+
/* @__PURE__ */ jsx44("span", { children: op.label }),
|
|
6135
|
+
/* @__PURE__ */ jsx44(
|
|
6105
6136
|
CheckIcon2,
|
|
6106
6137
|
{
|
|
6107
6138
|
className: cn(
|
|
@@ -6204,7 +6235,7 @@ function SelectOptionsPopover({
|
|
|
6204
6235
|
onCheckedChange: () => toggleOption(option),
|
|
6205
6236
|
children: [
|
|
6206
6237
|
option.icon && option.icon,
|
|
6207
|
-
/* @__PURE__ */
|
|
6238
|
+
/* @__PURE__ */ jsx44("span", { className: "truncate", children: option.label })
|
|
6208
6239
|
]
|
|
6209
6240
|
},
|
|
6210
6241
|
String(option.value)
|
|
@@ -6212,7 +6243,7 @@ function SelectOptionsPopover({
|
|
|
6212
6243
|
};
|
|
6213
6244
|
const renderMenuContent = () => /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
6214
6245
|
field.searchable !== false && /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
6215
|
-
/* @__PURE__ */
|
|
6246
|
+
/* @__PURE__ */ jsx44(
|
|
6216
6247
|
Input,
|
|
6217
6248
|
{
|
|
6218
6249
|
ref: inputRef,
|
|
@@ -6273,24 +6304,24 @@ function SelectOptionsPopover({
|
|
|
6273
6304
|
}
|
|
6274
6305
|
}
|
|
6275
6306
|
),
|
|
6276
|
-
/* @__PURE__ */
|
|
6307
|
+
/* @__PURE__ */ jsx44(DropdownMenuSeparator, {})
|
|
6277
6308
|
] }),
|
|
6278
|
-
/* @__PURE__ */
|
|
6309
|
+
/* @__PURE__ */ jsx44("div", { className: "relative flex max-h-full", children: /* @__PURE__ */ jsx44(
|
|
6279
6310
|
"div",
|
|
6280
6311
|
{
|
|
6281
6312
|
className: "flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain",
|
|
6282
6313
|
role: "listbox",
|
|
6283
6314
|
id: `${baseId}-listbox`,
|
|
6284
|
-
children: isAsync && loading && allFilteredOptions.length === 0 ? /* @__PURE__ */
|
|
6315
|
+
children: isAsync && loading && allFilteredOptions.length === 0 ? /* @__PURE__ */ jsx44("div", { className: "py-2 text-center text-sm text-muted-foreground", children: context.i18n.loadingOptions ?? DEFAULT_I18N.loadingOptions }) : isAsync && error ? /* @__PURE__ */ jsx44("div", { className: "py-2 text-center text-sm text-muted-foreground", children: context.i18n.errorLoadingOptions ?? DEFAULT_I18N.errorLoadingOptions }) : allFilteredOptions.length === 0 ? /* @__PURE__ */ jsx44("div", { className: "py-2 text-center text-sm text-muted-foreground", children: context.i18n.noResultsFound }) : field.renderOptionList ? field.renderOptionList({
|
|
6285
6316
|
options: allFilteredOptions,
|
|
6286
6317
|
highlightedIndex,
|
|
6287
6318
|
renderOption: renderOptionItem
|
|
6288
6319
|
}) : /* @__PURE__ */ jsxs24(ScrollArea, { className: "size-full min-h-0 **:data-[slot=scroll-area-scrollbar]:m-0 **:data-[slot=scroll-area-viewport]:h-full **:data-[slot=scroll-area-viewport]:overscroll-contain", children: [
|
|
6289
|
-
filteredSelectedOptions.length > 0 && /* @__PURE__ */
|
|
6320
|
+
filteredSelectedOptions.length > 0 && /* @__PURE__ */ jsx44(DropdownMenuGroup, { className: "px-1", children: filteredSelectedOptions.map(
|
|
6290
6321
|
(option, index) => renderOptionItem(option, index)
|
|
6291
6322
|
) }),
|
|
6292
|
-
filteredSelectedOptions.length > 0 && filteredUnselectedOptions.length > 0 && /* @__PURE__ */
|
|
6293
|
-
filteredUnselectedOptions.length > 0 && /* @__PURE__ */
|
|
6323
|
+
filteredSelectedOptions.length > 0 && filteredUnselectedOptions.length > 0 && /* @__PURE__ */ jsx44(DropdownMenuSeparator, { className: "mx-0" }),
|
|
6324
|
+
filteredUnselectedOptions.length > 0 && /* @__PURE__ */ jsx44(DropdownMenuGroup, { className: "px-1", children: filteredUnselectedOptions.map(
|
|
6294
6325
|
(option, index) => renderOptionItem(
|
|
6295
6326
|
option,
|
|
6296
6327
|
index + filteredSelectedOptions.length
|
|
@@ -6301,7 +6332,7 @@ function SelectOptionsPopover({
|
|
|
6301
6332
|
) })
|
|
6302
6333
|
] });
|
|
6303
6334
|
if (inline) {
|
|
6304
|
-
return /* @__PURE__ */
|
|
6335
|
+
return /* @__PURE__ */ jsx44("div", { className: "w-full", children: renderMenuContent() });
|
|
6305
6336
|
}
|
|
6306
6337
|
return /* @__PURE__ */ jsxs24(
|
|
6307
6338
|
DropdownMenu,
|
|
@@ -6314,19 +6345,19 @@ function SelectOptionsPopover({
|
|
|
6314
6345
|
}
|
|
6315
6346
|
},
|
|
6316
6347
|
children: [
|
|
6317
|
-
/* @__PURE__ */
|
|
6348
|
+
/* @__PURE__ */ jsx44(
|
|
6318
6349
|
DropdownMenuTrigger,
|
|
6319
6350
|
{
|
|
6320
|
-
render: /* @__PURE__ */
|
|
6351
|
+
render: /* @__PURE__ */ jsx44(Button, { variant: "outline", size: context.size, children: /* @__PURE__ */ jsx44("div", { className: "flex items-center gap-1.5", children: field.customValueRenderer ? field.customValueRenderer(
|
|
6321
6352
|
values,
|
|
6322
6353
|
isAsync ? resolveSelected(values) : field.options || []
|
|
6323
6354
|
) : /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
6324
|
-
selectedOptions.length > 0 && /* @__PURE__ */
|
|
6355
|
+
selectedOptions.length > 0 && /* @__PURE__ */ jsx44("div", { className: "flex items-center -space-x-1.5", children: selectedOptions.slice(0, 3).map((option) => /* @__PURE__ */ jsx44("div", { children: option.icon }, String(option.value))) }),
|
|
6325
6356
|
selectedOptions.length === 1 ? selectedOptions[0].label : selectedOptions.length > 1 ? `${selectedOptions.length} ${context.i18n.selectedCount}` : context.i18n.select
|
|
6326
6357
|
] }) }) })
|
|
6327
6358
|
}
|
|
6328
6359
|
),
|
|
6329
|
-
/* @__PURE__ */
|
|
6360
|
+
/* @__PURE__ */ jsx44(
|
|
6330
6361
|
DropdownMenuContent,
|
|
6331
6362
|
{
|
|
6332
6363
|
align: "start",
|
|
@@ -6349,10 +6380,10 @@ function FilterValueSelector({
|
|
|
6349
6380
|
return null;
|
|
6350
6381
|
}
|
|
6351
6382
|
if (field.customRenderer) {
|
|
6352
|
-
return /* @__PURE__ */
|
|
6383
|
+
return /* @__PURE__ */ jsx44(ButtonGroupText, { className: "bg-background text-start whitespace-nowrap outline-hidden hover:bg-accent aria-expanded:bg-accent dark:bg-input/30", children: field.customRenderer({ field, values, onChange, operator }) });
|
|
6353
6384
|
}
|
|
6354
6385
|
if (field.type === "text") {
|
|
6355
|
-
return /* @__PURE__ */
|
|
6386
|
+
return /* @__PURE__ */ jsx44(
|
|
6356
6387
|
FilterInput,
|
|
6357
6388
|
{
|
|
6358
6389
|
type: "text",
|
|
@@ -6367,9 +6398,9 @@ function FilterValueSelector({
|
|
|
6367
6398
|
);
|
|
6368
6399
|
}
|
|
6369
6400
|
if (field.type === "select" || field.type === "multiselect") {
|
|
6370
|
-
return /* @__PURE__ */
|
|
6401
|
+
return /* @__PURE__ */ jsx44(SelectOptionsPopover, { field, values, onChange });
|
|
6371
6402
|
}
|
|
6372
|
-
return /* @__PURE__ */
|
|
6403
|
+
return /* @__PURE__ */ jsx44(SelectOptionsPopover, { field, values, onChange });
|
|
6373
6404
|
}
|
|
6374
6405
|
var FiltersContent = ({
|
|
6375
6406
|
filters,
|
|
@@ -6401,7 +6432,7 @@ var FiltersContent = ({
|
|
|
6401
6432
|
},
|
|
6402
6433
|
[filters, onChange]
|
|
6403
6434
|
);
|
|
6404
|
-
return /* @__PURE__ */
|
|
6435
|
+
return /* @__PURE__ */ jsx44(
|
|
6405
6436
|
"div",
|
|
6406
6437
|
{
|
|
6407
6438
|
className: cn(
|
|
@@ -6423,7 +6454,7 @@ var FiltersContent = ({
|
|
|
6423
6454
|
field.icon && field.icon,
|
|
6424
6455
|
field.label
|
|
6425
6456
|
] }),
|
|
6426
|
-
/* @__PURE__ */
|
|
6457
|
+
/* @__PURE__ */ jsx44(
|
|
6427
6458
|
FilterOperatorDropdown,
|
|
6428
6459
|
{
|
|
6429
6460
|
field,
|
|
@@ -6432,7 +6463,7 @@ var FiltersContent = ({
|
|
|
6432
6463
|
onChange: (operator) => updateFilter(filter.id, { operator })
|
|
6433
6464
|
}
|
|
6434
6465
|
),
|
|
6435
|
-
/* @__PURE__ */
|
|
6466
|
+
/* @__PURE__ */ jsx44(
|
|
6436
6467
|
FilterValueSelector,
|
|
6437
6468
|
{
|
|
6438
6469
|
field,
|
|
@@ -6442,7 +6473,7 @@ var FiltersContent = ({
|
|
|
6442
6473
|
autoFocus: false
|
|
6443
6474
|
}
|
|
6444
6475
|
),
|
|
6445
|
-
/* @__PURE__ */
|
|
6476
|
+
/* @__PURE__ */ jsx44(FilterRemoveButton, { onClick: () => removeFilter(filter.id) })
|
|
6446
6477
|
]
|
|
6447
6478
|
},
|
|
6448
6479
|
filter.id
|
|
@@ -6539,7 +6570,7 @@ function FilterSubmenuContent({
|
|
|
6539
6570
|
onCheckedChange: () => onToggle(option.value, isSelected),
|
|
6540
6571
|
children: [
|
|
6541
6572
|
option.icon && option.icon,
|
|
6542
|
-
/* @__PURE__ */
|
|
6573
|
+
/* @__PURE__ */ jsx44("span", { className: "truncate", children: option.label })
|
|
6543
6574
|
]
|
|
6544
6575
|
},
|
|
6545
6576
|
String(option.value)
|
|
@@ -6552,7 +6583,7 @@ function FilterSubmenuContent({
|
|
|
6552
6583
|
}, [isActive, filteredOptions.length]);
|
|
6553
6584
|
return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col", onMouseEnter: onActive, children: [
|
|
6554
6585
|
field.searchable !== false && /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
6555
|
-
/* @__PURE__ */
|
|
6586
|
+
/* @__PURE__ */ jsx44(
|
|
6556
6587
|
Input,
|
|
6557
6588
|
{
|
|
6558
6589
|
ref: inputRef,
|
|
@@ -6615,9 +6646,9 @@ function FilterSubmenuContent({
|
|
|
6615
6646
|
}
|
|
6616
6647
|
}
|
|
6617
6648
|
),
|
|
6618
|
-
/* @__PURE__ */
|
|
6649
|
+
/* @__PURE__ */ jsx44(DropdownMenuSeparator, {})
|
|
6619
6650
|
] }),
|
|
6620
|
-
/* @__PURE__ */
|
|
6651
|
+
/* @__PURE__ */ jsx44("div", { className: "relative flex max-h-full", children: /* @__PURE__ */ jsx44(
|
|
6621
6652
|
"div",
|
|
6622
6653
|
{
|
|
6623
6654
|
className: "flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain outline-hidden",
|
|
@@ -6662,11 +6693,11 @@ function FilterSubmenuContent({
|
|
|
6662
6693
|
e.stopPropagation();
|
|
6663
6694
|
}
|
|
6664
6695
|
},
|
|
6665
|
-
children: isAsync && loading && filteredOptions.length === 0 ? /* @__PURE__ */
|
|
6696
|
+
children: isAsync && loading && filteredOptions.length === 0 ? /* @__PURE__ */ jsx44("div", { className: "py-2 text-center text-sm text-muted-foreground", children: i18n.loadingOptions ?? DEFAULT_I18N.loadingOptions }) : isAsync && error ? /* @__PURE__ */ jsx44("div", { className: "py-2 text-center text-sm text-muted-foreground", children: i18n.errorLoadingOptions ?? DEFAULT_I18N.errorLoadingOptions }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx44("div", { className: "py-2 text-center text-sm text-muted-foreground", children: i18n.noResultsFound }) : field.renderOptionList ? field.renderOptionList({
|
|
6666
6697
|
options: filteredOptions,
|
|
6667
6698
|
highlightedIndex,
|
|
6668
6699
|
renderOption: renderOptionItem
|
|
6669
|
-
}) : /* @__PURE__ */
|
|
6700
|
+
}) : /* @__PURE__ */ jsx44(ScrollArea, { className: "size-full min-h-0 **:data-[slot=scroll-area-scrollbar]:m-0 **:data-[slot=scroll-area-viewport]:h-full **:data-[slot=scroll-area-viewport]:overscroll-contain", children: /* @__PURE__ */ jsx44(DropdownMenuGroup, { children: filteredOptions.map(
|
|
6670
6701
|
(option, index) => renderOptionItem(option, index)
|
|
6671
6702
|
) }) })
|
|
6672
6703
|
}
|
|
@@ -6814,7 +6845,7 @@ function Filters({
|
|
|
6814
6845
|
}, [addFilterOpen, filteredFields.length]);
|
|
6815
6846
|
const triggerButton = useRender5({
|
|
6816
6847
|
render: trigger ?? /* @__PURE__ */ jsxs24(Button, { variant: "outline", children: [
|
|
6817
|
-
/* @__PURE__ */
|
|
6848
|
+
/* @__PURE__ */ jsx44(PlusIcon, {}),
|
|
6818
6849
|
mergedI18n.addFilter
|
|
6819
6850
|
] }),
|
|
6820
6851
|
defaultTagName: "button"
|
|
@@ -6831,7 +6862,7 @@ function Filters({
|
|
|
6831
6862
|
}),
|
|
6832
6863
|
[variant, size, radius, mergedI18n, className, trigger, allowMultiple]
|
|
6833
6864
|
);
|
|
6834
|
-
return /* @__PURE__ */
|
|
6865
|
+
return /* @__PURE__ */ jsx44(FilterContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs24(
|
|
6835
6866
|
"div",
|
|
6836
6867
|
{
|
|
6837
6868
|
className: cn(filtersContainerVariants({ variant, size }), className),
|
|
@@ -6850,7 +6881,7 @@ function Filters({
|
|
|
6850
6881
|
}
|
|
6851
6882
|
},
|
|
6852
6883
|
children: [
|
|
6853
|
-
/* @__PURE__ */
|
|
6884
|
+
/* @__PURE__ */ jsx44(DropdownMenuTrigger, { render: triggerButton }),
|
|
6854
6885
|
/* @__PURE__ */ jsxs24(
|
|
6855
6886
|
DropdownMenuContent,
|
|
6856
6887
|
{
|
|
@@ -6859,7 +6890,7 @@ function Filters({
|
|
|
6859
6890
|
children: [
|
|
6860
6891
|
showSearchInput && /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
6861
6892
|
/* @__PURE__ */ jsxs24("div", { className: "relative", children: [
|
|
6862
|
-
/* @__PURE__ */
|
|
6893
|
+
/* @__PURE__ */ jsx44(
|
|
6863
6894
|
Input,
|
|
6864
6895
|
{
|
|
6865
6896
|
ref: rootInputRef,
|
|
@@ -6931,20 +6962,20 @@ function Filters({
|
|
|
6931
6962
|
}
|
|
6932
6963
|
}
|
|
6933
6964
|
),
|
|
6934
|
-
enableShortcut && shortcutLabel && /* @__PURE__ */
|
|
6965
|
+
enableShortcut && shortcutLabel && /* @__PURE__ */ jsx44(Kbd, { className: "absolute top-1/2 right-2 -translate-y-1/2 border bg-background", children: shortcutLabel })
|
|
6935
6966
|
] }),
|
|
6936
|
-
/* @__PURE__ */
|
|
6967
|
+
/* @__PURE__ */ jsx44(DropdownMenuSeparator, {})
|
|
6937
6968
|
] }),
|
|
6938
|
-
/* @__PURE__ */
|
|
6969
|
+
/* @__PURE__ */ jsx44("div", { className: "relative flex max-h-full", children: /* @__PURE__ */ jsx44(
|
|
6939
6970
|
"div",
|
|
6940
6971
|
{
|
|
6941
6972
|
className: "flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain",
|
|
6942
6973
|
role: "listbox",
|
|
6943
6974
|
id: `${rootId}-listbox`,
|
|
6944
6975
|
onMouseEnter: () => setActiveMenu("root"),
|
|
6945
|
-
children: /* @__PURE__ */
|
|
6976
|
+
children: /* @__PURE__ */ jsx44(ScrollArea, { className: "**:data-[slot=scroll-area-scrollbar]:m-0", children: (() => {
|
|
6946
6977
|
if (filteredFields.length === 0) {
|
|
6947
|
-
return /* @__PURE__ */
|
|
6978
|
+
return /* @__PURE__ */ jsx44("div", { className: "py-2 text-center text-sm text-muted-foreground", children: mergedI18n.noFieldsFound });
|
|
6948
6979
|
}
|
|
6949
6980
|
return filteredFields.map((field, index) => {
|
|
6950
6981
|
const isHighlighted = highlightedIndex === index;
|
|
@@ -6985,16 +7016,16 @@ function Filters({
|
|
|
6985
7016
|
className: "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground",
|
|
6986
7017
|
children: [
|
|
6987
7018
|
field.icon,
|
|
6988
|
-
/* @__PURE__ */
|
|
7019
|
+
/* @__PURE__ */ jsx44("span", { children: field.label })
|
|
6989
7020
|
]
|
|
6990
7021
|
}
|
|
6991
7022
|
),
|
|
6992
|
-
/* @__PURE__ */
|
|
7023
|
+
/* @__PURE__ */ jsx44(
|
|
6993
7024
|
DropdownMenuSubContent,
|
|
6994
7025
|
{
|
|
6995
7026
|
className: "w-50",
|
|
6996
7027
|
side: "right",
|
|
6997
|
-
children: /* @__PURE__ */
|
|
7028
|
+
children: /* @__PURE__ */ jsx44(
|
|
6998
7029
|
FilterSubmenuContent,
|
|
6999
7030
|
{
|
|
7000
7031
|
field,
|
|
@@ -7079,7 +7110,7 @@ function Filters({
|
|
|
7079
7110
|
className: "data-highlighted:bg-accent data-highlighted:text-accent-foreground",
|
|
7080
7111
|
children: [
|
|
7081
7112
|
field.icon,
|
|
7082
|
-
/* @__PURE__ */
|
|
7113
|
+
/* @__PURE__ */ jsx44("span", { children: field.label })
|
|
7083
7114
|
]
|
|
7084
7115
|
},
|
|
7085
7116
|
field.key
|
|
@@ -7106,7 +7137,7 @@ function Filters({
|
|
|
7106
7137
|
field.icon && field.icon,
|
|
7107
7138
|
field.label
|
|
7108
7139
|
] }),
|
|
7109
|
-
/* @__PURE__ */
|
|
7140
|
+
/* @__PURE__ */ jsx44(
|
|
7110
7141
|
FilterOperatorDropdown,
|
|
7111
7142
|
{
|
|
7112
7143
|
field,
|
|
@@ -7115,7 +7146,7 @@ function Filters({
|
|
|
7115
7146
|
onChange: (operator) => updateFilter(filter.id, { operator })
|
|
7116
7147
|
}
|
|
7117
7148
|
),
|
|
7118
|
-
/* @__PURE__ */
|
|
7149
|
+
/* @__PURE__ */ jsx44(
|
|
7119
7150
|
FilterValueSelector,
|
|
7120
7151
|
{
|
|
7121
7152
|
field,
|
|
@@ -7125,7 +7156,7 @@ function Filters({
|
|
|
7125
7156
|
autoFocus: filter.id === lastAddedFilterId
|
|
7126
7157
|
}
|
|
7127
7158
|
),
|
|
7128
|
-
/* @__PURE__ */
|
|
7159
|
+
/* @__PURE__ */ jsx44(FilterRemoveButton, { onClick: () => removeFilter(filter.id) })
|
|
7129
7160
|
]
|
|
7130
7161
|
},
|
|
7131
7162
|
filter.id
|
|
@@ -7151,10 +7182,10 @@ var createFilterGroup = (id, label, fields, initialFilters = []) => ({
|
|
|
7151
7182
|
// src/ui/select.tsx
|
|
7152
7183
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
7153
7184
|
import { Check as Check2, ChevronDown as ChevronDown3, ChevronUp as ChevronUp2 } from "@gravity-ui/icons";
|
|
7154
|
-
import { jsx as
|
|
7185
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
7155
7186
|
var Select = SelectPrimitive.Root;
|
|
7156
7187
|
function SelectGroup({ className, ...props }) {
|
|
7157
|
-
return /* @__PURE__ */
|
|
7188
|
+
return /* @__PURE__ */ jsx45(
|
|
7158
7189
|
SelectPrimitive.Group,
|
|
7159
7190
|
{
|
|
7160
7191
|
"data-slot": "select-group",
|
|
@@ -7164,7 +7195,7 @@ function SelectGroup({ className, ...props }) {
|
|
|
7164
7195
|
);
|
|
7165
7196
|
}
|
|
7166
7197
|
function SelectValue({ className, ...props }) {
|
|
7167
|
-
return /* @__PURE__ */
|
|
7198
|
+
return /* @__PURE__ */ jsx45(
|
|
7168
7199
|
SelectPrimitive.Value,
|
|
7169
7200
|
{
|
|
7170
7201
|
"data-slot": "select-value",
|
|
@@ -7191,10 +7222,10 @@ function SelectTrigger({
|
|
|
7191
7222
|
...props,
|
|
7192
7223
|
children: [
|
|
7193
7224
|
children,
|
|
7194
|
-
/* @__PURE__ */
|
|
7225
|
+
/* @__PURE__ */ jsx45(
|
|
7195
7226
|
SelectPrimitive.Icon,
|
|
7196
7227
|
{
|
|
7197
|
-
render: /* @__PURE__ */
|
|
7228
|
+
render: /* @__PURE__ */ jsx45(ChevronDown3, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
7198
7229
|
}
|
|
7199
7230
|
)
|
|
7200
7231
|
]
|
|
@@ -7211,7 +7242,7 @@ function SelectContent({
|
|
|
7211
7242
|
alignItemWithTrigger = true,
|
|
7212
7243
|
...props
|
|
7213
7244
|
}) {
|
|
7214
|
-
return /* @__PURE__ */
|
|
7245
|
+
return /* @__PURE__ */ jsx45(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx45(
|
|
7215
7246
|
SelectPrimitive.Positioner,
|
|
7216
7247
|
{
|
|
7217
7248
|
side,
|
|
@@ -7231,9 +7262,9 @@ function SelectContent({
|
|
|
7231
7262
|
),
|
|
7232
7263
|
...props,
|
|
7233
7264
|
children: [
|
|
7234
|
-
/* @__PURE__ */
|
|
7235
|
-
/* @__PURE__ */
|
|
7236
|
-
/* @__PURE__ */
|
|
7265
|
+
/* @__PURE__ */ jsx45(SelectScrollUpButton, {}),
|
|
7266
|
+
/* @__PURE__ */ jsx45(SelectPrimitive.List, { className: "p-1", children }),
|
|
7267
|
+
/* @__PURE__ */ jsx45(SelectScrollDownButton, {})
|
|
7237
7268
|
]
|
|
7238
7269
|
}
|
|
7239
7270
|
)
|
|
@@ -7244,7 +7275,7 @@ function SelectLabel({
|
|
|
7244
7275
|
className,
|
|
7245
7276
|
...props
|
|
7246
7277
|
}) {
|
|
7247
|
-
return /* @__PURE__ */
|
|
7278
|
+
return /* @__PURE__ */ jsx45(
|
|
7248
7279
|
SelectPrimitive.GroupLabel,
|
|
7249
7280
|
{
|
|
7250
7281
|
"data-slot": "select-label",
|
|
@@ -7268,12 +7299,12 @@ function SelectItem({
|
|
|
7268
7299
|
),
|
|
7269
7300
|
...props,
|
|
7270
7301
|
children: [
|
|
7271
|
-
/* @__PURE__ */
|
|
7272
|
-
/* @__PURE__ */
|
|
7302
|
+
/* @__PURE__ */ jsx45(SelectPrimitive.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
|
|
7303
|
+
/* @__PURE__ */ jsx45(
|
|
7273
7304
|
SelectPrimitive.ItemIndicator,
|
|
7274
7305
|
{
|
|
7275
|
-
render: /* @__PURE__ */
|
|
7276
|
-
children: /* @__PURE__ */
|
|
7306
|
+
render: /* @__PURE__ */ jsx45("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
7307
|
+
children: /* @__PURE__ */ jsx45(Check2, { className: "pointer-events-none" })
|
|
7277
7308
|
}
|
|
7278
7309
|
)
|
|
7279
7310
|
]
|
|
@@ -7284,7 +7315,7 @@ function SelectSeparator({
|
|
|
7284
7315
|
className,
|
|
7285
7316
|
...props
|
|
7286
7317
|
}) {
|
|
7287
|
-
return /* @__PURE__ */
|
|
7318
|
+
return /* @__PURE__ */ jsx45(
|
|
7288
7319
|
SelectPrimitive.Separator,
|
|
7289
7320
|
{
|
|
7290
7321
|
"data-slot": "select-separator",
|
|
@@ -7297,7 +7328,7 @@ function SelectScrollUpButton({
|
|
|
7297
7328
|
className,
|
|
7298
7329
|
...props
|
|
7299
7330
|
}) {
|
|
7300
|
-
return /* @__PURE__ */
|
|
7331
|
+
return /* @__PURE__ */ jsx45(
|
|
7301
7332
|
SelectPrimitive.ScrollUpArrow,
|
|
7302
7333
|
{
|
|
7303
7334
|
"data-slot": "select-scroll-up-button",
|
|
@@ -7306,7 +7337,7 @@ function SelectScrollUpButton({
|
|
|
7306
7337
|
className
|
|
7307
7338
|
),
|
|
7308
7339
|
...props,
|
|
7309
|
-
children: /* @__PURE__ */
|
|
7340
|
+
children: /* @__PURE__ */ jsx45(ChevronUp2, {})
|
|
7310
7341
|
}
|
|
7311
7342
|
);
|
|
7312
7343
|
}
|
|
@@ -7314,7 +7345,7 @@ function SelectScrollDownButton({
|
|
|
7314
7345
|
className,
|
|
7315
7346
|
...props
|
|
7316
7347
|
}) {
|
|
7317
|
-
return /* @__PURE__ */
|
|
7348
|
+
return /* @__PURE__ */ jsx45(
|
|
7318
7349
|
SelectPrimitive.ScrollDownArrow,
|
|
7319
7350
|
{
|
|
7320
7351
|
"data-slot": "select-scroll-down-button",
|
|
@@ -7323,7 +7354,7 @@ function SelectScrollDownButton({
|
|
|
7323
7354
|
className
|
|
7324
7355
|
),
|
|
7325
7356
|
...props,
|
|
7326
|
-
children: /* @__PURE__ */
|
|
7357
|
+
children: /* @__PURE__ */ jsx45(ChevronDown3, {})
|
|
7327
7358
|
}
|
|
7328
7359
|
);
|
|
7329
7360
|
}
|
|
@@ -7333,7 +7364,7 @@ import {
|
|
|
7333
7364
|
forwardRef as forwardRef4,
|
|
7334
7365
|
useLayoutEffect
|
|
7335
7366
|
} from "react";
|
|
7336
|
-
import { jsx as
|
|
7367
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
7337
7368
|
var componentThemeClassName = "[--ic-background:#ffffff] [--ic-foreground:#111111] [--ic-primary:#111111] [--ic-secondary:#646b75] [--ic-surface-border:#e9edf2] [--ic-border:#e3e7ec] [--ic-card:#ffffff] [--ic-card-foreground:#111111] [--ic-muted:#f5f7fa] [--ic-muted-foreground:#6d7480] [--ic-accent:#f3f5f8] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] [--ic-accent-foreground:#111111] [--ic-input:#e3e7ec] [--ic-ring:rgba(17,17,17,0.16)] [--ic-destructive:#dc2626] [--ic-paper:#fcfcfd] [--ic-popover-foreground:#111111] [--ic-brand:#0ea5e9] [--ic-brand-soft:#bae6fd] [--ic-shadow-soft:0_18px_38px_-24px_rgba(15,23,42,0.35)] [--ic-chart-1:oklch(0.52_0.19_254)] [--ic-chart-2:oklch(0.74_0.11_232)] [--ic-chart-3:oklch(0.42_0.16_262)] [--ic-chart-4:oklch(0.84_0.07_228)] [--ic-chart-5:oklch(0.62_0.14_240)] [--color-background:var(--ic-background)] [--color-foreground:var(--ic-foreground)] [--color-primary:var(--ic-primary)] [--color-secondary:var(--ic-secondary)] [--color-border:var(--ic-border)] [--color-card:var(--ic-card)] [--color-card-foreground:var(--ic-card-foreground)] [--color-muted:var(--ic-muted)] [--color-muted-foreground:var(--ic-muted-foreground)] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] [--color-input:var(--ic-input)] [--color-ring:var(--ic-ring)] [--color-destructive:var(--ic-destructive)] [--color-paper:var(--ic-paper)] [--color-popover-foreground:var(--ic-popover-foreground)] [--color-brand:var(--ic-brand)] [--color-brand-soft:var(--ic-brand-soft)] [--color-chart-1:var(--ic-chart-1)] [--color-chart-2:var(--ic-chart-2)] [--color-chart-3:var(--ic-chart-3)] [--color-chart-4:var(--ic-chart-4)] [--color-chart-5:var(--ic-chart-5)] dark:[--ic-background:#111111] dark:[--ic-foreground:#f6f3ec] dark:[--ic-primary:#f6f3ec] dark:[--ic-secondary:#cbc6bb] dark:[--ic-surface-border:#2a2a25] dark:[--ic-border:#2b2a25] dark:[--ic-card:#111111] dark:[--ic-card-foreground:#f6f3ec] dark:[--ic-muted:#171716] dark:[--ic-muted-foreground:#9a958a] dark:[--ic-accent:#1a1a18] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] dark:[--ic-accent-foreground:#f6f3ec] dark:[--ic-input:#2b2a25] dark:[--ic-ring:rgba(246,243,236,0.18)] dark:[--ic-destructive:#f87171] dark:[--ic-paper:#171716] dark:[--ic-popover-foreground:#f6f3ec] dark:[--ic-brand:#38bdf8] dark:[--ic-brand-soft:#0c4a6e] dark:[--ic-shadow-soft:0_20px_44px_-28px_rgba(0,0,0,0.6)] dark:[--ic-chart-1:oklch(0.68_0.17_250)] dark:[--ic-chart-2:oklch(0.82_0.09_225)] dark:[--ic-chart-3:oklch(0.58_0.15_260)] dark:[--ic-chart-4:oklch(0.75_0.12_235)] dark:[--ic-chart-5:oklch(0.88_0.06_220)]";
|
|
7338
7369
|
var STYLE_ID = "iconiq-skeleton-styles";
|
|
7339
7370
|
var SKELETON_CSS = `
|
|
@@ -7454,7 +7485,7 @@ var Skeleton = forwardRef4(function Skeleton2({
|
|
|
7454
7485
|
...style,
|
|
7455
7486
|
"--iconiq-skeleton-duration": `${variantDuration}s`
|
|
7456
7487
|
} : style;
|
|
7457
|
-
return /* @__PURE__ */
|
|
7488
|
+
return /* @__PURE__ */ jsx46(
|
|
7458
7489
|
"div",
|
|
7459
7490
|
{
|
|
7460
7491
|
className: cn(
|
|
@@ -7468,7 +7499,7 @@ var Skeleton = forwardRef4(function Skeleton2({
|
|
|
7468
7499
|
style: animatedStyle,
|
|
7469
7500
|
...resolveSkeletonA11yProps({ animate: animate2, decorative, label }),
|
|
7470
7501
|
...props,
|
|
7471
|
-
children: showShimmer ? /* @__PURE__ */
|
|
7502
|
+
children: showShimmer ? /* @__PURE__ */ jsx46(
|
|
7472
7503
|
"span",
|
|
7473
7504
|
{
|
|
7474
7505
|
"aria-hidden": "true",
|
|
@@ -7483,7 +7514,7 @@ function SkeletonAvatar({
|
|
|
7483
7514
|
className,
|
|
7484
7515
|
...props
|
|
7485
7516
|
}) {
|
|
7486
|
-
return /* @__PURE__ */
|
|
7517
|
+
return /* @__PURE__ */ jsx46(
|
|
7487
7518
|
Skeleton,
|
|
7488
7519
|
{
|
|
7489
7520
|
className: cn("size-10", className),
|
|
@@ -7494,13 +7525,13 @@ function SkeletonAvatar({
|
|
|
7494
7525
|
);
|
|
7495
7526
|
}
|
|
7496
7527
|
function SkeletonText({ className, ...props }) {
|
|
7497
|
-
return /* @__PURE__ */
|
|
7528
|
+
return /* @__PURE__ */ jsx46(Skeleton, { className: cn("h-3", className), decorative: true, ...props });
|
|
7498
7529
|
}
|
|
7499
7530
|
function SkeletonButton({
|
|
7500
7531
|
className,
|
|
7501
7532
|
...props
|
|
7502
7533
|
}) {
|
|
7503
|
-
return /* @__PURE__ */
|
|
7534
|
+
return /* @__PURE__ */ jsx46(
|
|
7504
7535
|
Skeleton,
|
|
7505
7536
|
{
|
|
7506
7537
|
className: cn("h-9 w-24", className),
|
|
@@ -7515,11 +7546,11 @@ var ShimmerSkeleton = Skeleton;
|
|
|
7515
7546
|
// src/ui/sonner.tsx
|
|
7516
7547
|
import { GooeyToaster } from "goey-toast";
|
|
7517
7548
|
import { useTheme } from "next-themes";
|
|
7518
|
-
import { jsx as
|
|
7549
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
7519
7550
|
var Toaster = ({ closeButton = "top-left", ...props }) => {
|
|
7520
7551
|
const { theme = "system" } = useTheme();
|
|
7521
7552
|
const toasterTheme = theme === "dark" ? "dark" : "light";
|
|
7522
|
-
return /* @__PURE__ */
|
|
7553
|
+
return /* @__PURE__ */ jsx47(
|
|
7523
7554
|
GooeyToaster,
|
|
7524
7555
|
{
|
|
7525
7556
|
theme: toasterTheme,
|
|
@@ -7559,11 +7590,11 @@ import {
|
|
|
7559
7590
|
verticalListSortingStrategy
|
|
7560
7591
|
} from "@dnd-kit/sortable";
|
|
7561
7592
|
import { CSS } from "@dnd-kit/utilities";
|
|
7562
|
-
import * as
|
|
7593
|
+
import * as React16 from "react";
|
|
7563
7594
|
import * as ReactDOM from "react-dom";
|
|
7564
7595
|
|
|
7565
7596
|
// src/lib/compose-refs.ts
|
|
7566
|
-
import * as
|
|
7597
|
+
import * as React14 from "react";
|
|
7567
7598
|
function setRef(ref, value) {
|
|
7568
7599
|
if (typeof ref === "function") {
|
|
7569
7600
|
return ref(value);
|
|
@@ -7597,15 +7628,15 @@ function composeRefs(...refs) {
|
|
|
7597
7628
|
};
|
|
7598
7629
|
}
|
|
7599
7630
|
function useComposedRefs(...refs) {
|
|
7600
|
-
return
|
|
7631
|
+
return React14.useCallback(composeRefs(...refs), refs);
|
|
7601
7632
|
}
|
|
7602
7633
|
|
|
7603
7634
|
// src/hooks/use-isomorphic-layout-effect.ts
|
|
7604
|
-
import * as
|
|
7605
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
7635
|
+
import * as React15 from "react";
|
|
7636
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React15.useLayoutEffect : React15.useEffect;
|
|
7606
7637
|
|
|
7607
7638
|
// src/ui/sortable.tsx
|
|
7608
|
-
import { jsx as
|
|
7639
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
7609
7640
|
var orientationConfig = {
|
|
7610
7641
|
vertical: {
|
|
7611
7642
|
modifiers: [restrictToVerticalAxis, restrictToParentElement],
|
|
@@ -7628,9 +7659,9 @@ var CONTENT_NAME = "SortableContent";
|
|
|
7628
7659
|
var ITEM_NAME = "SortableItem";
|
|
7629
7660
|
var ITEM_HANDLE_NAME = "SortableItemHandle";
|
|
7630
7661
|
var OVERLAY_NAME = "SortableOverlay";
|
|
7631
|
-
var SortableRootContext =
|
|
7662
|
+
var SortableRootContext = React16.createContext(null);
|
|
7632
7663
|
function useSortableContext(consumerName) {
|
|
7633
|
-
const context =
|
|
7664
|
+
const context = React16.useContext(SortableRootContext);
|
|
7634
7665
|
if (!context) {
|
|
7635
7666
|
throw new Error(`\`${consumerName}\` must be used within \`${ROOT_NAME}\``);
|
|
7636
7667
|
}
|
|
@@ -7650,8 +7681,8 @@ function Sortable(props) {
|
|
|
7650
7681
|
accessibility,
|
|
7651
7682
|
...sortableProps
|
|
7652
7683
|
} = props;
|
|
7653
|
-
const id =
|
|
7654
|
-
const [activeId, setActiveId] =
|
|
7684
|
+
const id = React16.useId();
|
|
7685
|
+
const [activeId, setActiveId] = React16.useState(null);
|
|
7655
7686
|
const sensors = useSensors(
|
|
7656
7687
|
useSensor(MouseSensor),
|
|
7657
7688
|
useSensor(TouchSensor),
|
|
@@ -7659,11 +7690,11 @@ function Sortable(props) {
|
|
|
7659
7690
|
coordinateGetter: sortableKeyboardCoordinates
|
|
7660
7691
|
})
|
|
7661
7692
|
);
|
|
7662
|
-
const config =
|
|
7693
|
+
const config = React16.useMemo(
|
|
7663
7694
|
() => orientationConfig[orientation],
|
|
7664
7695
|
[orientation]
|
|
7665
7696
|
);
|
|
7666
|
-
const getItemValue =
|
|
7697
|
+
const getItemValue = React16.useCallback(
|
|
7667
7698
|
(item) => {
|
|
7668
7699
|
if (typeof item === "object" && !getItemValueProp) {
|
|
7669
7700
|
throw new Error(
|
|
@@ -7674,10 +7705,10 @@ function Sortable(props) {
|
|
|
7674
7705
|
},
|
|
7675
7706
|
[getItemValueProp]
|
|
7676
7707
|
);
|
|
7677
|
-
const items =
|
|
7708
|
+
const items = React16.useMemo(() => {
|
|
7678
7709
|
return value.map((item) => getItemValue(item));
|
|
7679
7710
|
}, [value, getItemValue]);
|
|
7680
|
-
const onDragStart =
|
|
7711
|
+
const onDragStart = React16.useCallback(
|
|
7681
7712
|
(event) => {
|
|
7682
7713
|
sortableProps.onDragStart?.(event);
|
|
7683
7714
|
if (event.activatorEvent.defaultPrevented) return;
|
|
@@ -7685,7 +7716,7 @@ function Sortable(props) {
|
|
|
7685
7716
|
},
|
|
7686
7717
|
[sortableProps.onDragStart]
|
|
7687
7718
|
);
|
|
7688
|
-
const onDragEnd =
|
|
7719
|
+
const onDragEnd = React16.useCallback(
|
|
7689
7720
|
(event) => {
|
|
7690
7721
|
sortableProps.onDragEnd?.(event);
|
|
7691
7722
|
if (event.activatorEvent.defaultPrevented) return;
|
|
@@ -7707,7 +7738,7 @@ function Sortable(props) {
|
|
|
7707
7738
|
},
|
|
7708
7739
|
[value, onValueChange, onMove, getItemValue, sortableProps.onDragEnd]
|
|
7709
7740
|
);
|
|
7710
|
-
const onDragCancel =
|
|
7741
|
+
const onDragCancel = React16.useCallback(
|
|
7711
7742
|
(event) => {
|
|
7712
7743
|
sortableProps.onDragCancel?.(event);
|
|
7713
7744
|
if (event.activatorEvent.defaultPrevented) return;
|
|
@@ -7715,7 +7746,7 @@ function Sortable(props) {
|
|
|
7715
7746
|
},
|
|
7716
7747
|
[sortableProps.onDragCancel]
|
|
7717
7748
|
);
|
|
7718
|
-
const announcements =
|
|
7749
|
+
const announcements = React16.useMemo(
|
|
7719
7750
|
() => ({
|
|
7720
7751
|
onDragStart({ active }) {
|
|
7721
7752
|
const activeValue = active.id.toString();
|
|
@@ -7757,7 +7788,7 @@ function Sortable(props) {
|
|
|
7757
7788
|
}),
|
|
7758
7789
|
[value]
|
|
7759
7790
|
);
|
|
7760
|
-
const screenReaderInstructions =
|
|
7791
|
+
const screenReaderInstructions = React16.useMemo(
|
|
7761
7792
|
() => ({
|
|
7762
7793
|
draggable: `
|
|
7763
7794
|
To pick up a sortable item, press space or enter.
|
|
@@ -7767,7 +7798,7 @@ function Sortable(props) {
|
|
|
7767
7798
|
}),
|
|
7768
7799
|
[orientation]
|
|
7769
7800
|
);
|
|
7770
|
-
const contextValue =
|
|
7801
|
+
const contextValue = React16.useMemo(
|
|
7771
7802
|
() => ({
|
|
7772
7803
|
id,
|
|
7773
7804
|
items,
|
|
@@ -7790,11 +7821,11 @@ function Sortable(props) {
|
|
|
7790
7821
|
flatCursor
|
|
7791
7822
|
]
|
|
7792
7823
|
);
|
|
7793
|
-
return /* @__PURE__ */
|
|
7824
|
+
return /* @__PURE__ */ jsx48(
|
|
7794
7825
|
SortableRootContext.Provider,
|
|
7795
7826
|
{
|
|
7796
7827
|
value: contextValue,
|
|
7797
|
-
children: /* @__PURE__ */
|
|
7828
|
+
children: /* @__PURE__ */ jsx48(
|
|
7798
7829
|
DndContext,
|
|
7799
7830
|
{
|
|
7800
7831
|
collisionDetection: collisionDetection ?? config.collisionDetection,
|
|
@@ -7815,7 +7846,7 @@ function Sortable(props) {
|
|
|
7815
7846
|
}
|
|
7816
7847
|
);
|
|
7817
7848
|
}
|
|
7818
|
-
var SortableContentContext =
|
|
7849
|
+
var SortableContentContext = React16.createContext(false);
|
|
7819
7850
|
function SortableContent(props) {
|
|
7820
7851
|
const {
|
|
7821
7852
|
strategy: strategyProp,
|
|
@@ -7843,7 +7874,7 @@ function SortableContent(props) {
|
|
|
7843
7874
|
},
|
|
7844
7875
|
enabled: !withoutSlot
|
|
7845
7876
|
});
|
|
7846
|
-
return /* @__PURE__ */
|
|
7877
|
+
return /* @__PURE__ */ jsx48(SortableContentContext.Provider, { value: true, children: /* @__PURE__ */ jsx48(
|
|
7847
7878
|
SortableContext,
|
|
7848
7879
|
{
|
|
7849
7880
|
items: context.items,
|
|
@@ -7852,9 +7883,9 @@ function SortableContent(props) {
|
|
|
7852
7883
|
}
|
|
7853
7884
|
) });
|
|
7854
7885
|
}
|
|
7855
|
-
var SortableItemContext =
|
|
7886
|
+
var SortableItemContext = React16.createContext(null);
|
|
7856
7887
|
function useSortableItemContext(consumerName) {
|
|
7857
|
-
const context =
|
|
7888
|
+
const context = React16.useContext(SortableItemContext);
|
|
7858
7889
|
if (!context) {
|
|
7859
7890
|
throw new Error(`\`${consumerName}\` must be used within \`${ITEM_NAME}\``);
|
|
7860
7891
|
}
|
|
@@ -7871,8 +7902,8 @@ function SortableItem(props) {
|
|
|
7871
7902
|
ref,
|
|
7872
7903
|
...itemProps
|
|
7873
7904
|
} = props;
|
|
7874
|
-
const inSortableContent =
|
|
7875
|
-
const inSortableOverlay =
|
|
7905
|
+
const inSortableContent = React16.useContext(SortableContentContext);
|
|
7906
|
+
const inSortableOverlay = React16.useContext(SortableOverlayContext);
|
|
7876
7907
|
if (!inSortableContent && !inSortableOverlay) {
|
|
7877
7908
|
throw new Error(
|
|
7878
7909
|
`\`${ITEM_NAME}\` must be used within \`${CONTENT_NAME}\` or \`${OVERLAY_NAME}\``
|
|
@@ -7882,7 +7913,7 @@ function SortableItem(props) {
|
|
|
7882
7913
|
throw new Error(`\`${ITEM_NAME}\` value cannot be an empty string`);
|
|
7883
7914
|
}
|
|
7884
7915
|
const context = useSortableContext(ITEM_NAME);
|
|
7885
|
-
const id =
|
|
7916
|
+
const id = React16.useId();
|
|
7886
7917
|
const {
|
|
7887
7918
|
attributes,
|
|
7888
7919
|
listeners,
|
|
@@ -7892,7 +7923,7 @@ function SortableItem(props) {
|
|
|
7892
7923
|
transition,
|
|
7893
7924
|
isDragging
|
|
7894
7925
|
} = useSortable({ id: value, disabled });
|
|
7895
|
-
const onNodeRefChange =
|
|
7926
|
+
const onNodeRefChange = React16.useCallback(
|
|
7896
7927
|
(node) => {
|
|
7897
7928
|
if (disabled) return;
|
|
7898
7929
|
setNodeRef(node);
|
|
@@ -7901,14 +7932,14 @@ function SortableItem(props) {
|
|
|
7901
7932
|
[disabled, asHandle, setNodeRef, setActivatorNodeRef]
|
|
7902
7933
|
);
|
|
7903
7934
|
const composedRef = useComposedRefs(ref, onNodeRefChange);
|
|
7904
|
-
const composedStyle =
|
|
7935
|
+
const composedStyle = React16.useMemo(() => {
|
|
7905
7936
|
return {
|
|
7906
7937
|
transform: CSS.Translate.toString(transform),
|
|
7907
7938
|
transition,
|
|
7908
7939
|
...style
|
|
7909
7940
|
};
|
|
7910
7941
|
}, [transform, transition, style]);
|
|
7911
|
-
const itemContext =
|
|
7942
|
+
const itemContext = React16.useMemo(
|
|
7912
7943
|
() => ({
|
|
7913
7944
|
id,
|
|
7914
7945
|
attributes,
|
|
@@ -7950,7 +7981,7 @@ function SortableItem(props) {
|
|
|
7950
7981
|
...isDragging && { dragging: "" }
|
|
7951
7982
|
}
|
|
7952
7983
|
});
|
|
7953
|
-
return /* @__PURE__ */
|
|
7984
|
+
return /* @__PURE__ */ jsx48(SortableItemContext.Provider, { value: itemContext, children: element });
|
|
7954
7985
|
}
|
|
7955
7986
|
function SortableItemHandle(props) {
|
|
7956
7987
|
const { disabled, className, render, ref, ...itemHandleProps } = props;
|
|
@@ -7958,7 +7989,7 @@ function SortableItemHandle(props) {
|
|
|
7958
7989
|
const itemContext = useSortableItemContext(ITEM_HANDLE_NAME);
|
|
7959
7990
|
const isDisabled = disabled ?? itemContext.disabled;
|
|
7960
7991
|
const { setActivatorNodeRef } = itemContext;
|
|
7961
|
-
const onActivatorNodeRef =
|
|
7992
|
+
const onActivatorNodeRef = React16.useCallback(
|
|
7962
7993
|
(node) => {
|
|
7963
7994
|
if (isDisabled) return;
|
|
7964
7995
|
setActivatorNodeRef(node);
|
|
@@ -7992,7 +8023,7 @@ function SortableItemHandle(props) {
|
|
|
7992
8023
|
}
|
|
7993
8024
|
});
|
|
7994
8025
|
}
|
|
7995
|
-
var SortableOverlayContext =
|
|
8026
|
+
var SortableOverlayContext = React16.createContext(false);
|
|
7996
8027
|
var dropAnimation = {
|
|
7997
8028
|
sideEffects: defaultDropAnimationSideEffects({
|
|
7998
8029
|
styles: {
|
|
@@ -8005,19 +8036,19 @@ var dropAnimation = {
|
|
|
8005
8036
|
function SortableOverlay(props) {
|
|
8006
8037
|
const { container: containerProp, children, ...overlayProps } = props;
|
|
8007
8038
|
const context = useSortableContext(OVERLAY_NAME);
|
|
8008
|
-
const [mounted, setMounted] =
|
|
8039
|
+
const [mounted, setMounted] = React16.useState(false);
|
|
8009
8040
|
useIsomorphicLayoutEffect(() => setMounted(true), []);
|
|
8010
8041
|
const container = containerProp ?? (mounted ? globalThis.document?.body : null);
|
|
8011
8042
|
if (!container) return null;
|
|
8012
8043
|
return ReactDOM.createPortal(
|
|
8013
|
-
/* @__PURE__ */
|
|
8044
|
+
/* @__PURE__ */ jsx48(
|
|
8014
8045
|
DragOverlay,
|
|
8015
8046
|
{
|
|
8016
8047
|
dropAnimation,
|
|
8017
8048
|
modifiers: context.modifiers,
|
|
8018
8049
|
className: cn(!context.flatCursor && "cursor-grabbing"),
|
|
8019
8050
|
...overlayProps,
|
|
8020
|
-
children: /* @__PURE__ */
|
|
8051
|
+
children: /* @__PURE__ */ jsx48(SortableOverlayContext.Provider, { value: true, children: context.activeId ? typeof children === "function" ? children({ value: context.activeId }) : children : null })
|
|
8021
8052
|
}
|
|
8022
8053
|
),
|
|
8023
8054
|
container
|
|
@@ -8026,13 +8057,13 @@ function SortableOverlay(props) {
|
|
|
8026
8057
|
|
|
8027
8058
|
// src/ui/switch.tsx
|
|
8028
8059
|
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
8029
|
-
import { jsx as
|
|
8060
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
8030
8061
|
function Switch({
|
|
8031
8062
|
className,
|
|
8032
8063
|
size = "default",
|
|
8033
8064
|
...props
|
|
8034
8065
|
}) {
|
|
8035
|
-
return /* @__PURE__ */
|
|
8066
|
+
return /* @__PURE__ */ jsx49(
|
|
8036
8067
|
SwitchPrimitive.Root,
|
|
8037
8068
|
{
|
|
8038
8069
|
"data-slot": "switch",
|
|
@@ -8042,7 +8073,7 @@ function Switch({
|
|
|
8042
8073
|
className
|
|
8043
8074
|
),
|
|
8044
8075
|
...props,
|
|
8045
|
-
children: /* @__PURE__ */
|
|
8076
|
+
children: /* @__PURE__ */ jsx49(
|
|
8046
8077
|
SwitchPrimitive.Thumb,
|
|
8047
8078
|
{
|
|
8048
8079
|
"data-slot": "switch-thumb",
|
|
@@ -8069,7 +8100,7 @@ import {
|
|
|
8069
8100
|
useRef as useRef6,
|
|
8070
8101
|
useState as useState12
|
|
8071
8102
|
} from "react";
|
|
8072
|
-
import { jsx as
|
|
8103
|
+
import { jsx as jsx50, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
8073
8104
|
var BellIcon = forwardRef5(
|
|
8074
8105
|
({
|
|
8075
8106
|
onMouseEnter,
|
|
@@ -8169,7 +8200,7 @@ var BellIcon = forwardRef5(
|
|
|
8169
8200
|
}
|
|
8170
8201
|
}
|
|
8171
8202
|
};
|
|
8172
|
-
return /* @__PURE__ */
|
|
8203
|
+
return /* @__PURE__ */ jsx50(LazyMotion, { features: domMin, strict: true, children: /* @__PURE__ */ jsx50(
|
|
8173
8204
|
m.div,
|
|
8174
8205
|
{
|
|
8175
8206
|
className: cn("relative inline-flex", className),
|
|
@@ -8194,8 +8225,8 @@ var BellIcon = forwardRef5(
|
|
|
8194
8225
|
variants: bellVariants,
|
|
8195
8226
|
style: { transformOrigin: "top center" },
|
|
8196
8227
|
children: [
|
|
8197
|
-
/* @__PURE__ */
|
|
8198
|
-
/* @__PURE__ */
|
|
8228
|
+
/* @__PURE__ */ jsx50(m.path, { d: "M10.268 21a2 2 0 0 0 3.464 0", variants: clapperVariants }),
|
|
8229
|
+
/* @__PURE__ */ jsx50("path", { d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" })
|
|
8199
8230
|
]
|
|
8200
8231
|
}
|
|
8201
8232
|
)
|
|
@@ -8206,7 +8237,7 @@ var BellIcon = forwardRef5(
|
|
|
8206
8237
|
BellIcon.displayName = "BellIcon";
|
|
8207
8238
|
|
|
8208
8239
|
// src/icon/icon-swap.tsx
|
|
8209
|
-
import { jsx as
|
|
8240
|
+
import { jsx as jsx51, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
8210
8241
|
function IconSwap({ active, first, second, className }) {
|
|
8211
8242
|
return /* @__PURE__ */ jsxs27(
|
|
8212
8243
|
"span",
|
|
@@ -8215,20 +8246,20 @@ function IconSwap({ active, first, second, className }) {
|
|
|
8215
8246
|
className: cn("t-icon-swap", className),
|
|
8216
8247
|
"data-state": active ? "b" : "a",
|
|
8217
8248
|
children: [
|
|
8218
|
-
/* @__PURE__ */
|
|
8219
|
-
/* @__PURE__ */
|
|
8249
|
+
/* @__PURE__ */ jsx51("span", { className: "t-icon", "data-icon": "a", children: first }),
|
|
8250
|
+
/* @__PURE__ */ jsx51("span", { className: "t-icon", "data-icon": "b", children: second })
|
|
8220
8251
|
]
|
|
8221
8252
|
}
|
|
8222
8253
|
);
|
|
8223
8254
|
}
|
|
8224
8255
|
|
|
8225
8256
|
// src/icon/loader.tsx
|
|
8226
|
-
import
|
|
8227
|
-
import { jsx as
|
|
8228
|
-
var Loader =
|
|
8257
|
+
import React17 from "react";
|
|
8258
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
8259
|
+
var Loader = React17.forwardRef(
|
|
8229
8260
|
({ className, size = 16, color = "currentColor", style, ...props }, ref) => {
|
|
8230
8261
|
const bars = Array(12).fill(0);
|
|
8231
|
-
return /* @__PURE__ */
|
|
8262
|
+
return /* @__PURE__ */ jsx52(
|
|
8232
8263
|
"div",
|
|
8233
8264
|
{
|
|
8234
8265
|
ref,
|
|
@@ -8239,7 +8270,7 @@ var Loader = React16.forwardRef(
|
|
|
8239
8270
|
...style
|
|
8240
8271
|
},
|
|
8241
8272
|
...props,
|
|
8242
|
-
children: /* @__PURE__ */
|
|
8273
|
+
children: /* @__PURE__ */ jsx52("div", { className: "loader-spinner", children: bars.map((_, i) => /* @__PURE__ */ jsx52("div", { className: "loader-bar" }, `spinner-bar-${i}`)) })
|
|
8243
8274
|
}
|
|
8244
8275
|
);
|
|
8245
8276
|
}
|
|
@@ -8268,6 +8299,7 @@ export {
|
|
|
8268
8299
|
AlertDialogPortal,
|
|
8269
8300
|
AlertDialogTitle,
|
|
8270
8301
|
AlertDialogTrigger,
|
|
8302
|
+
div_default as AnimatedDiv,
|
|
8271
8303
|
Apple,
|
|
8272
8304
|
Ariakit,
|
|
8273
8305
|
Autocomplete,
|