@j3m-quantum/ui 0.1.0 → 0.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/index.cjs +566 -246
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +82 -27
- package/dist/index.d.ts +82 -27
- package/dist/index.js +558 -245
- package/dist/index.js.map +1 -1
- package/dist/styles/base-theme.css +124 -0
- package/dist/styles/index.css +7 -4
- package/package.json +31 -11
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React10 from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
@@ -7,7 +7,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
9
9
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
10
|
-
import { CheckIcon, CircleIcon, ChevronDownIcon, ChevronUpIcon, MinusIcon, ChevronLeftIcon, ChevronRightIcon, ArrowLeft, ArrowRight, Loader2Icon, OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon, ChevronRight, MoreHorizontal, MoreHorizontalIcon,
|
|
10
|
+
import { X, CheckIcon, CircleIcon, ChevronDownIcon, ChevronUpIcon, MinusIcon, ChevronLeftIcon, ChevronRightIcon, ArrowLeft, ArrowRight, Loader2Icon, OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon, ChevronRight, MoreHorizontal, MoreHorizontalIcon, SearchIcon, XIcon, GripVerticalIcon, PanelLeftIcon } from 'lucide-react';
|
|
11
11
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
12
12
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
13
13
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
@@ -44,8 +44,8 @@ import * as ResizablePrimitive from 'react-resizable-panels';
|
|
|
44
44
|
// src/hooks/use-mobile.ts
|
|
45
45
|
var MOBILE_BREAKPOINT = 768;
|
|
46
46
|
function useIsMobile() {
|
|
47
|
-
const [isMobile, setIsMobile] =
|
|
48
|
-
|
|
47
|
+
const [isMobile, setIsMobile] = React10.useState(void 0);
|
|
48
|
+
React10.useEffect(() => {
|
|
49
49
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
50
50
|
const onChange = () => {
|
|
51
51
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -60,24 +60,73 @@ function cn(...inputs) {
|
|
|
60
60
|
return twMerge(clsx(inputs));
|
|
61
61
|
}
|
|
62
62
|
var buttonVariants = cva(
|
|
63
|
-
|
|
63
|
+
// Base styles - shared across all variants
|
|
64
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
64
65
|
{
|
|
65
66
|
variants: {
|
|
66
67
|
variant: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
// Primary CTA - J3M Orange
|
|
69
|
+
default: [
|
|
70
|
+
"text-[var(--color-text-on-accent)]",
|
|
71
|
+
"bg-[var(--j3m-primary-300)]",
|
|
72
|
+
"hover:bg-[var(--j3m-primary-400)]",
|
|
73
|
+
"active:bg-[var(--j3m-primary-500)]",
|
|
74
|
+
"focus-visible:ring-[var(--j3m-primary-300)]",
|
|
75
|
+
"rounded-[var(--j3m-radius-2xs)]",
|
|
76
|
+
"shadow-sm"
|
|
77
|
+
].join(" "),
|
|
78
|
+
// Secondary - Neutral surface
|
|
79
|
+
secondary: [
|
|
80
|
+
"text-[var(--color-text-main)]",
|
|
81
|
+
"bg-[var(--j3m-neutral-200)]",
|
|
82
|
+
"hover:bg-[var(--j3m-neutral-300)]",
|
|
83
|
+
"active:bg-[var(--j3m-neutral-400)]",
|
|
84
|
+
"focus-visible:ring-[var(--j3m-neutral-400)]",
|
|
85
|
+
"rounded-[var(--j3m-radius-2xs)]"
|
|
86
|
+
].join(" "),
|
|
87
|
+
// Outline - Border only
|
|
88
|
+
outline: [
|
|
89
|
+
"text-[var(--color-text-main)]",
|
|
90
|
+
"bg-transparent",
|
|
91
|
+
"border border-[var(--color-border-strong)]",
|
|
92
|
+
"hover:bg-[var(--j3m-neutral-200)]",
|
|
93
|
+
"active:bg-[var(--j3m-neutral-300)]",
|
|
94
|
+
"focus-visible:ring-[var(--j3m-neutral-400)]",
|
|
95
|
+
"rounded-[var(--j3m-radius-2xs)]"
|
|
96
|
+
].join(" "),
|
|
97
|
+
// Ghost - Minimal
|
|
98
|
+
ghost: [
|
|
99
|
+
"text-[var(--color-text-muted)]",
|
|
100
|
+
"bg-transparent",
|
|
101
|
+
"hover:bg-[var(--j3m-neutral-200)]",
|
|
102
|
+
"hover:text-[var(--color-text-main)]",
|
|
103
|
+
"active:bg-[var(--j3m-neutral-300)]",
|
|
104
|
+
"focus-visible:ring-[var(--j3m-neutral-400)]",
|
|
105
|
+
"rounded-[var(--j3m-radius-2xs)]"
|
|
106
|
+
].join(" "),
|
|
107
|
+
// Destructive - Error/danger actions
|
|
108
|
+
destructive: [
|
|
109
|
+
"text-[var(--color-text-on-accent)]",
|
|
110
|
+
"bg-[var(--j3m-red-100)]",
|
|
111
|
+
"hover:bg-[var(--j3m-red-200)]",
|
|
112
|
+
"active:bg-[var(--j3m-red-200)]",
|
|
113
|
+
"focus-visible:ring-[var(--j3m-red-100)]",
|
|
114
|
+
"rounded-[var(--j3m-radius-2xs)]",
|
|
115
|
+
"shadow-sm"
|
|
116
|
+
].join(" "),
|
|
117
|
+
// Link - Text only
|
|
118
|
+
link: [
|
|
119
|
+
"text-[var(--j3m-primary-300)]",
|
|
120
|
+
"underline-offset-4",
|
|
121
|
+
"hover:underline",
|
|
122
|
+
"hover:text-[var(--j3m-primary-400)]"
|
|
123
|
+
].join(" ")
|
|
73
124
|
},
|
|
74
125
|
size: {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
lg: "h-
|
|
78
|
-
icon: "
|
|
79
|
-
"icon-sm": "size-8",
|
|
80
|
-
"icon-lg": "size-10"
|
|
126
|
+
sm: "h-8 px-[var(--j3m-spacing-s)] text-xs",
|
|
127
|
+
default: "h-10 px-[var(--j3m-spacing-m)] py-[var(--j3m-spacing-xs)] text-sm",
|
|
128
|
+
lg: "h-12 px-[var(--j3m-spacing-xl)] text-base",
|
|
129
|
+
icon: "h-10 w-10"
|
|
81
130
|
}
|
|
82
131
|
},
|
|
83
132
|
defaultVariants: {
|
|
@@ -86,23 +135,20 @@ var buttonVariants = cva(
|
|
|
86
135
|
}
|
|
87
136
|
}
|
|
88
137
|
);
|
|
89
|
-
|
|
90
|
-
className,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
}
|
|
138
|
+
var Button = React10.forwardRef(
|
|
139
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
140
|
+
const Comp = asChild ? Slot : "button";
|
|
141
|
+
return /* @__PURE__ */ jsx(
|
|
142
|
+
Comp,
|
|
143
|
+
{
|
|
144
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
145
|
+
ref,
|
|
146
|
+
...props
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
Button.displayName = "Button";
|
|
106
152
|
function Separator({
|
|
107
153
|
className,
|
|
108
154
|
orientation = "horizontal",
|
|
@@ -188,22 +234,59 @@ function ButtonGroupSeparator({
|
|
|
188
234
|
}
|
|
189
235
|
);
|
|
190
236
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
237
|
+
var Input = React10.forwardRef(
|
|
238
|
+
({ className, type, ...props }, ref) => {
|
|
239
|
+
return /* @__PURE__ */ jsx(
|
|
240
|
+
"input",
|
|
241
|
+
{
|
|
242
|
+
type,
|
|
243
|
+
"data-slot": "input",
|
|
244
|
+
className: cn(
|
|
245
|
+
// Base
|
|
246
|
+
"flex h-10 w-full min-w-0 text-sm",
|
|
247
|
+
"px-[var(--j3m-spacing-s)] py-[var(--j3m-spacing-xs)]",
|
|
248
|
+
"rounded-[var(--j3m-radius-2xs)]",
|
|
249
|
+
// Colors
|
|
250
|
+
"bg-[var(--color-bg-surface)]",
|
|
251
|
+
"text-[var(--color-text-main)]",
|
|
252
|
+
"border border-[var(--color-border-subtle)]",
|
|
253
|
+
// Placeholder
|
|
254
|
+
"placeholder:text-[var(--color-text-soft)]",
|
|
255
|
+
// Focus state
|
|
256
|
+
"focus-visible:outline-none",
|
|
257
|
+
"focus-visible:ring-2",
|
|
258
|
+
"focus-visible:ring-[var(--j3m-primary-300)]",
|
|
259
|
+
"focus-visible:ring-offset-1",
|
|
260
|
+
"focus-visible:border-[var(--j3m-primary-300)]",
|
|
261
|
+
// Hover state
|
|
262
|
+
"hover:border-[var(--color-border-strong)]",
|
|
263
|
+
// Disabled state
|
|
264
|
+
"disabled:cursor-not-allowed",
|
|
265
|
+
"disabled:opacity-50",
|
|
266
|
+
"disabled:bg-[var(--color-bg-subtle)]",
|
|
267
|
+
// Error state (via aria-invalid)
|
|
268
|
+
"aria-invalid:border-[var(--j3m-red-100)]",
|
|
269
|
+
"aria-invalid:focus-visible:ring-[var(--j3m-red-100)]",
|
|
270
|
+
// File input
|
|
271
|
+
"file:border-0",
|
|
272
|
+
"file:bg-transparent",
|
|
273
|
+
"file:text-sm",
|
|
274
|
+
"file:font-medium",
|
|
275
|
+
"file:text-[var(--color-text-main)]",
|
|
276
|
+
// Selection
|
|
277
|
+
"selection:bg-[var(--j3m-primary-100)]",
|
|
278
|
+
"selection:text-[var(--color-text-main)]",
|
|
279
|
+
// Transition
|
|
280
|
+
"transition-colors duration-150",
|
|
281
|
+
className
|
|
282
|
+
),
|
|
283
|
+
ref,
|
|
284
|
+
...props
|
|
285
|
+
}
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
Input.displayName = "Input";
|
|
207
290
|
function Textarea({ className, ...props }) {
|
|
208
291
|
return /* @__PURE__ */ jsx(
|
|
209
292
|
"textarea",
|
|
@@ -451,7 +534,7 @@ function Slider({
|
|
|
451
534
|
max = 100,
|
|
452
535
|
...props
|
|
453
536
|
}) {
|
|
454
|
-
const _values =
|
|
537
|
+
const _values = React10.useMemo(
|
|
455
538
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
456
539
|
[value, defaultValue, min, max]
|
|
457
540
|
);
|
|
@@ -737,7 +820,7 @@ function Toggle({
|
|
|
737
820
|
}
|
|
738
821
|
);
|
|
739
822
|
}
|
|
740
|
-
var ToggleGroupContext =
|
|
823
|
+
var ToggleGroupContext = React10.createContext({
|
|
741
824
|
size: "default",
|
|
742
825
|
variant: "default",
|
|
743
826
|
spacing: 0
|
|
@@ -774,7 +857,7 @@ function ToggleGroupItem({
|
|
|
774
857
|
size,
|
|
775
858
|
...props
|
|
776
859
|
}) {
|
|
777
|
-
const context =
|
|
860
|
+
const context = React10.useContext(ToggleGroupContext);
|
|
778
861
|
return /* @__PURE__ */ jsx(
|
|
779
862
|
ToggleGroupPrimitive.Item,
|
|
780
863
|
{
|
|
@@ -829,7 +912,7 @@ function InputOTPSlot({
|
|
|
829
912
|
className,
|
|
830
913
|
...props
|
|
831
914
|
}) {
|
|
832
|
-
const inputOTPContext =
|
|
915
|
+
const inputOTPContext = React10.useContext(OTPInputContext);
|
|
833
916
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
834
917
|
return /* @__PURE__ */ jsxs(
|
|
835
918
|
"div",
|
|
@@ -868,7 +951,7 @@ function Label2({
|
|
|
868
951
|
);
|
|
869
952
|
}
|
|
870
953
|
var Form = FormProvider;
|
|
871
|
-
var FormFieldContext =
|
|
954
|
+
var FormFieldContext = React10.createContext(
|
|
872
955
|
{}
|
|
873
956
|
);
|
|
874
957
|
var FormField = ({
|
|
@@ -877,8 +960,8 @@ var FormField = ({
|
|
|
877
960
|
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
878
961
|
};
|
|
879
962
|
var useFormField = () => {
|
|
880
|
-
const fieldContext =
|
|
881
|
-
const itemContext =
|
|
963
|
+
const fieldContext = React10.useContext(FormFieldContext);
|
|
964
|
+
const itemContext = React10.useContext(FormItemContext);
|
|
882
965
|
const { getFieldState } = useFormContext();
|
|
883
966
|
const formState = useFormState({ name: fieldContext.name });
|
|
884
967
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
@@ -895,11 +978,11 @@ var useFormField = () => {
|
|
|
895
978
|
...fieldState
|
|
896
979
|
};
|
|
897
980
|
};
|
|
898
|
-
var FormItemContext =
|
|
981
|
+
var FormItemContext = React10.createContext(
|
|
899
982
|
{}
|
|
900
983
|
);
|
|
901
984
|
function FormItem({ className, ...props }) {
|
|
902
|
-
const id =
|
|
985
|
+
const id = React10.useId();
|
|
903
986
|
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(
|
|
904
987
|
"div",
|
|
905
988
|
{
|
|
@@ -1178,85 +1261,148 @@ function FieldError({
|
|
|
1178
1261
|
}
|
|
1179
1262
|
);
|
|
1180
1263
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1264
|
+
var cardVariants = cva(
|
|
1265
|
+
// Base styles
|
|
1266
|
+
"flex flex-col rounded-[var(--j3m-radius-2xs)]",
|
|
1267
|
+
{
|
|
1268
|
+
variants: {
|
|
1269
|
+
variant: {
|
|
1270
|
+
// Default solid card
|
|
1271
|
+
default: [
|
|
1272
|
+
"bg-[var(--color-bg-surface)]",
|
|
1273
|
+
"border border-[var(--color-border-subtle)]",
|
|
1274
|
+
"text-[var(--color-text-main)]",
|
|
1275
|
+
"shadow-sm"
|
|
1276
|
+
].join(" "),
|
|
1277
|
+
// Glass Light - for light backgrounds or over images
|
|
1278
|
+
"glass-light": [
|
|
1279
|
+
"bg-[var(--j3m-glass-light)]",
|
|
1280
|
+
"backdrop-blur-[var(--j3m-blur-md)]",
|
|
1281
|
+
"border border-[var(--j3m-glass-border-light)]",
|
|
1282
|
+
"text-[var(--color-text-main)]",
|
|
1283
|
+
"shadow-[var(--j3m-glass-shadow-md)]"
|
|
1284
|
+
].join(" "),
|
|
1285
|
+
// Glass Dark - for light backgrounds, dark card
|
|
1286
|
+
"glass-dark": [
|
|
1287
|
+
"bg-[var(--j3m-glass-dark)]",
|
|
1288
|
+
"backdrop-blur-[var(--j3m-blur-md)]",
|
|
1289
|
+
"border border-[var(--j3m-glass-border-dark)]",
|
|
1290
|
+
"text-white",
|
|
1291
|
+
"shadow-[var(--j3m-glass-shadow-lg)]"
|
|
1292
|
+
].join(" "),
|
|
1293
|
+
// Glass Neutral - subtle frosted effect
|
|
1294
|
+
"glass-neutral": [
|
|
1295
|
+
"bg-[var(--j3m-glass-neutral)]",
|
|
1296
|
+
"backdrop-blur-[var(--j3m-blur-lg)]",
|
|
1297
|
+
"border border-[var(--j3m-glass-border-subtle)]",
|
|
1298
|
+
"text-[var(--color-text-main)]",
|
|
1299
|
+
"shadow-[var(--j3m-glass-shadow-sm)]"
|
|
1300
|
+
].join(" "),
|
|
1301
|
+
// Glass Primary - with orange tint
|
|
1302
|
+
"glass-primary": [
|
|
1303
|
+
"bg-[var(--j3m-glass-primary)]",
|
|
1304
|
+
"backdrop-blur-[var(--j3m-blur-lg)]",
|
|
1305
|
+
"border border-[var(--j3m-glass-border-light)]",
|
|
1306
|
+
"text-[var(--color-text-main)]",
|
|
1307
|
+
"shadow-[var(--j3m-glass-shadow-glow)]"
|
|
1308
|
+
].join(" ")
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
defaultVariants: {
|
|
1312
|
+
variant: "default"
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
);
|
|
1316
|
+
var Card = React10.forwardRef(
|
|
1317
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1183
1318
|
"div",
|
|
1184
1319
|
{
|
|
1320
|
+
ref,
|
|
1185
1321
|
"data-slot": "card",
|
|
1186
|
-
className: cn(
|
|
1187
|
-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
1188
|
-
className
|
|
1189
|
-
),
|
|
1322
|
+
className: cn(cardVariants({ variant, className })),
|
|
1190
1323
|
...props
|
|
1191
1324
|
}
|
|
1192
|
-
)
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1325
|
+
)
|
|
1326
|
+
);
|
|
1327
|
+
Card.displayName = "Card";
|
|
1328
|
+
var CardHeader = React10.forwardRef(
|
|
1329
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1196
1330
|
"div",
|
|
1197
1331
|
{
|
|
1332
|
+
ref,
|
|
1198
1333
|
"data-slot": "card-header",
|
|
1199
1334
|
className: cn(
|
|
1200
|
-
"
|
|
1335
|
+
"flex flex-col gap-[var(--j3m-spacing-2xs)]",
|
|
1336
|
+
"px-[var(--j3m-spacing-l)] py-[var(--j3m-spacing-m)]",
|
|
1201
1337
|
className
|
|
1202
1338
|
),
|
|
1203
1339
|
...props
|
|
1204
1340
|
}
|
|
1205
|
-
)
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1341
|
+
)
|
|
1342
|
+
);
|
|
1343
|
+
CardHeader.displayName = "CardHeader";
|
|
1344
|
+
var CardTitle = React10.forwardRef(
|
|
1345
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1346
|
+
"h3",
|
|
1210
1347
|
{
|
|
1348
|
+
ref,
|
|
1211
1349
|
"data-slot": "card-title",
|
|
1212
|
-
className: cn(
|
|
1350
|
+
className: cn(
|
|
1351
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
1352
|
+
className
|
|
1353
|
+
),
|
|
1213
1354
|
...props
|
|
1214
1355
|
}
|
|
1215
|
-
)
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1356
|
+
)
|
|
1357
|
+
);
|
|
1358
|
+
CardTitle.displayName = "CardTitle";
|
|
1359
|
+
var CardDescription = React10.forwardRef(
|
|
1360
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1361
|
+
"p",
|
|
1220
1362
|
{
|
|
1363
|
+
ref,
|
|
1221
1364
|
"data-slot": "card-description",
|
|
1222
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
1223
|
-
...props
|
|
1224
|
-
}
|
|
1225
|
-
);
|
|
1226
|
-
}
|
|
1227
|
-
function CardAction({ className, ...props }) {
|
|
1228
|
-
return /* @__PURE__ */ jsx(
|
|
1229
|
-
"div",
|
|
1230
|
-
{
|
|
1231
|
-
"data-slot": "card-action",
|
|
1232
1365
|
className: cn(
|
|
1233
|
-
"
|
|
1366
|
+
"text-sm opacity-80",
|
|
1234
1367
|
className
|
|
1235
1368
|
),
|
|
1236
1369
|
...props
|
|
1237
1370
|
}
|
|
1238
|
-
)
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1371
|
+
)
|
|
1372
|
+
);
|
|
1373
|
+
CardDescription.displayName = "CardDescription";
|
|
1374
|
+
var CardContent = React10.forwardRef(
|
|
1375
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1242
1376
|
"div",
|
|
1243
1377
|
{
|
|
1378
|
+
ref,
|
|
1244
1379
|
"data-slot": "card-content",
|
|
1245
|
-
className: cn(
|
|
1380
|
+
className: cn(
|
|
1381
|
+
"px-[var(--j3m-spacing-l)] pb-[var(--j3m-spacing-m)]",
|
|
1382
|
+
className
|
|
1383
|
+
),
|
|
1246
1384
|
...props
|
|
1247
1385
|
}
|
|
1248
|
-
)
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1386
|
+
)
|
|
1387
|
+
);
|
|
1388
|
+
CardContent.displayName = "CardContent";
|
|
1389
|
+
var CardFooter = React10.forwardRef(
|
|
1390
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1252
1391
|
"div",
|
|
1253
1392
|
{
|
|
1393
|
+
ref,
|
|
1254
1394
|
"data-slot": "card-footer",
|
|
1255
|
-
className: cn(
|
|
1395
|
+
className: cn(
|
|
1396
|
+
"flex items-center",
|
|
1397
|
+
"px-[var(--j3m-spacing-l)] py-[var(--j3m-spacing-m)]",
|
|
1398
|
+
"border-t border-[inherit]",
|
|
1399
|
+
className
|
|
1400
|
+
),
|
|
1256
1401
|
...props
|
|
1257
1402
|
}
|
|
1258
|
-
)
|
|
1259
|
-
|
|
1403
|
+
)
|
|
1404
|
+
);
|
|
1405
|
+
CardFooter.displayName = "CardFooter";
|
|
1260
1406
|
function Table({ className, ...props }) {
|
|
1261
1407
|
return /* @__PURE__ */ jsx(
|
|
1262
1408
|
"div",
|
|
@@ -1711,8 +1857,8 @@ function CalendarDayButton({
|
|
|
1711
1857
|
...props
|
|
1712
1858
|
}) {
|
|
1713
1859
|
const defaultClassNames = getDefaultClassNames();
|
|
1714
|
-
const ref =
|
|
1715
|
-
|
|
1860
|
+
const ref = React10.useRef(null);
|
|
1861
|
+
React10.useEffect(() => {
|
|
1716
1862
|
if (modifiers.focused) ref.current?.focus();
|
|
1717
1863
|
}, [modifiers.focused]);
|
|
1718
1864
|
return /* @__PURE__ */ jsx(
|
|
@@ -1735,9 +1881,9 @@ function CalendarDayButton({
|
|
|
1735
1881
|
}
|
|
1736
1882
|
);
|
|
1737
1883
|
}
|
|
1738
|
-
var CarouselContext =
|
|
1884
|
+
var CarouselContext = React10.createContext(null);
|
|
1739
1885
|
function useCarousel() {
|
|
1740
|
-
const context =
|
|
1886
|
+
const context = React10.useContext(CarouselContext);
|
|
1741
1887
|
if (!context) {
|
|
1742
1888
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1743
1889
|
}
|
|
@@ -1759,20 +1905,20 @@ function Carousel({
|
|
|
1759
1905
|
},
|
|
1760
1906
|
plugins
|
|
1761
1907
|
);
|
|
1762
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
1763
|
-
const [canScrollNext, setCanScrollNext] =
|
|
1764
|
-
const onSelect =
|
|
1908
|
+
const [canScrollPrev, setCanScrollPrev] = React10.useState(false);
|
|
1909
|
+
const [canScrollNext, setCanScrollNext] = React10.useState(false);
|
|
1910
|
+
const onSelect = React10.useCallback((api2) => {
|
|
1765
1911
|
if (!api2) return;
|
|
1766
1912
|
setCanScrollPrev(api2.canScrollPrev());
|
|
1767
1913
|
setCanScrollNext(api2.canScrollNext());
|
|
1768
1914
|
}, []);
|
|
1769
|
-
const scrollPrev =
|
|
1915
|
+
const scrollPrev = React10.useCallback(() => {
|
|
1770
1916
|
api?.scrollPrev();
|
|
1771
1917
|
}, [api]);
|
|
1772
|
-
const scrollNext =
|
|
1918
|
+
const scrollNext = React10.useCallback(() => {
|
|
1773
1919
|
api?.scrollNext();
|
|
1774
1920
|
}, [api]);
|
|
1775
|
-
const handleKeyDown =
|
|
1921
|
+
const handleKeyDown = React10.useCallback(
|
|
1776
1922
|
(event) => {
|
|
1777
1923
|
if (event.key === "ArrowLeft") {
|
|
1778
1924
|
event.preventDefault();
|
|
@@ -1784,11 +1930,11 @@ function Carousel({
|
|
|
1784
1930
|
},
|
|
1785
1931
|
[scrollPrev, scrollNext]
|
|
1786
1932
|
);
|
|
1787
|
-
|
|
1933
|
+
React10.useEffect(() => {
|
|
1788
1934
|
if (!api || !setApi) return;
|
|
1789
1935
|
setApi(api);
|
|
1790
1936
|
}, [api, setApi]);
|
|
1791
|
-
|
|
1937
|
+
React10.useEffect(() => {
|
|
1792
1938
|
if (!api) return;
|
|
1793
1939
|
onSelect(api);
|
|
1794
1940
|
api.on("reInit", onSelect);
|
|
@@ -1921,9 +2067,9 @@ function CarouselNext({
|
|
|
1921
2067
|
);
|
|
1922
2068
|
}
|
|
1923
2069
|
var THEMES = { light: "", dark: ".dark" };
|
|
1924
|
-
var ChartContext =
|
|
2070
|
+
var ChartContext = React10.createContext(null);
|
|
1925
2071
|
function useChart() {
|
|
1926
|
-
const context =
|
|
2072
|
+
const context = React10.useContext(ChartContext);
|
|
1927
2073
|
if (!context) {
|
|
1928
2074
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
1929
2075
|
}
|
|
@@ -1936,7 +2082,7 @@ function ChartContainer({
|
|
|
1936
2082
|
config,
|
|
1937
2083
|
...props
|
|
1938
2084
|
}) {
|
|
1939
|
-
const uniqueId =
|
|
2085
|
+
const uniqueId = React10.useId();
|
|
1940
2086
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
1941
2087
|
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
1942
2088
|
"div",
|
|
@@ -1997,7 +2143,7 @@ function ChartTooltipContent({
|
|
|
1997
2143
|
labelKey
|
|
1998
2144
|
}) {
|
|
1999
2145
|
const { config } = useChart();
|
|
2000
|
-
const tooltipLabel =
|
|
2146
|
+
const tooltipLabel = React10.useMemo(() => {
|
|
2001
2147
|
if (hideLabel || !payload?.length) {
|
|
2002
2148
|
return null;
|
|
2003
2149
|
}
|
|
@@ -2720,16 +2866,16 @@ var M = (e, i, s, u, m, a, l, h) => {
|
|
|
2720
2866
|
} catch (n) {
|
|
2721
2867
|
}
|
|
2722
2868
|
};
|
|
2723
|
-
var x =
|
|
2869
|
+
var x = React10.createContext(void 0);
|
|
2724
2870
|
var U = { setTheme: (e) => {
|
|
2725
2871
|
}, themes: [] };
|
|
2726
2872
|
var z = () => {
|
|
2727
2873
|
var e;
|
|
2728
|
-
return (e =
|
|
2874
|
+
return (e = React10.useContext(x)) != null ? e : U;
|
|
2729
2875
|
};
|
|
2730
|
-
|
|
2876
|
+
React10.memo(({ forcedTheme: e, storageKey: i, attribute: s, enableSystem: u, enableColorScheme: m, defaultTheme: a, value: l, themes: h, nonce: d, scriptProps: w }) => {
|
|
2731
2877
|
let p = JSON.stringify([s, i, a, e, h, l, u, m]).slice(1, -1);
|
|
2732
|
-
return
|
|
2878
|
+
return React10.createElement("script", { ...w, suppressHydrationWarning: true, nonce: typeof window == "undefined" ? d : "", dangerouslySetInnerHTML: { __html: `(${M.toString()})(${p})` } });
|
|
2733
2879
|
});
|
|
2734
2880
|
var Toaster = ({ ...props }) => {
|
|
2735
2881
|
const { theme = "system" } = z();
|
|
@@ -2961,126 +3107,153 @@ function PaginationEllipsis({
|
|
|
2961
3107
|
}
|
|
2962
3108
|
);
|
|
2963
3109
|
}
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
}
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
}) {
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
"data-slot": "dialog-overlay",
|
|
2992
|
-
className: cn(
|
|
2993
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
2994
|
-
className
|
|
2995
|
-
),
|
|
2996
|
-
...props
|
|
2997
|
-
}
|
|
2998
|
-
);
|
|
2999
|
-
}
|
|
3000
|
-
function DialogContent({
|
|
3001
|
-
className,
|
|
3002
|
-
children,
|
|
3003
|
-
showCloseButton = true,
|
|
3004
|
-
...props
|
|
3005
|
-
}) {
|
|
3006
|
-
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
3007
|
-
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
3008
|
-
/* @__PURE__ */ jsxs(
|
|
3009
|
-
DialogPrimitive.Content,
|
|
3010
|
-
{
|
|
3011
|
-
"data-slot": "dialog-content",
|
|
3012
|
-
className: cn(
|
|
3013
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
3014
|
-
className
|
|
3015
|
-
),
|
|
3016
|
-
...props,
|
|
3017
|
-
children: [
|
|
3018
|
-
children,
|
|
3019
|
-
showCloseButton && /* @__PURE__ */ jsxs(
|
|
3020
|
-
DialogPrimitive.Close,
|
|
3021
|
-
{
|
|
3022
|
-
"data-slot": "dialog-close",
|
|
3023
|
-
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3024
|
-
children: [
|
|
3025
|
-
/* @__PURE__ */ jsx(XIcon, {}),
|
|
3026
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
3027
|
-
]
|
|
3028
|
-
}
|
|
3029
|
-
)
|
|
3030
|
-
]
|
|
3031
|
-
}
|
|
3032
|
-
)
|
|
3033
|
-
] });
|
|
3034
|
-
}
|
|
3035
|
-
function DialogHeader({ className, ...props }) {
|
|
3036
|
-
return /* @__PURE__ */ jsx(
|
|
3037
|
-
"div",
|
|
3038
|
-
{
|
|
3039
|
-
"data-slot": "dialog-header",
|
|
3040
|
-
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
3041
|
-
...props
|
|
3042
|
-
}
|
|
3043
|
-
);
|
|
3044
|
-
}
|
|
3045
|
-
function DialogFooter({ className, ...props }) {
|
|
3046
|
-
return /* @__PURE__ */ jsx(
|
|
3047
|
-
"div",
|
|
3110
|
+
var Dialog = DialogPrimitive.Root;
|
|
3111
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
3112
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
3113
|
+
var DialogClose = DialogPrimitive.Close;
|
|
3114
|
+
var DialogOverlay = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3115
|
+
DialogPrimitive.Overlay,
|
|
3116
|
+
{
|
|
3117
|
+
ref,
|
|
3118
|
+
className: cn(
|
|
3119
|
+
"fixed inset-0 z-50",
|
|
3120
|
+
"bg-[var(--j3m-neutral-1000)]/50",
|
|
3121
|
+
"backdrop-blur-sm",
|
|
3122
|
+
// Animations
|
|
3123
|
+
"data-[state=open]:animate-in",
|
|
3124
|
+
"data-[state=closed]:animate-out",
|
|
3125
|
+
"data-[state=closed]:fade-out-0",
|
|
3126
|
+
"data-[state=open]:fade-in-0",
|
|
3127
|
+
className
|
|
3128
|
+
),
|
|
3129
|
+
...props
|
|
3130
|
+
}
|
|
3131
|
+
));
|
|
3132
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
3133
|
+
var DialogContent = React10.forwardRef(({ className, children, showCloseButton = true, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
3134
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
3135
|
+
/* @__PURE__ */ jsxs(
|
|
3136
|
+
DialogPrimitive.Content,
|
|
3048
3137
|
{
|
|
3049
|
-
|
|
3138
|
+
ref,
|
|
3050
3139
|
className: cn(
|
|
3051
|
-
|
|
3140
|
+
// Positioning
|
|
3141
|
+
"fixed left-[50%] top-[50%] z-50",
|
|
3142
|
+
"translate-x-[-50%] translate-y-[-50%]",
|
|
3143
|
+
"w-full max-w-lg",
|
|
3144
|
+
"max-h-[90vh] overflow-y-auto",
|
|
3145
|
+
// Card-like styling
|
|
3146
|
+
"rounded-[var(--j3m-radius-2xs)]",
|
|
3147
|
+
"border border-[var(--color-border-subtle)]",
|
|
3148
|
+
"bg-[var(--color-bg-surface)]",
|
|
3149
|
+
"shadow-lg",
|
|
3150
|
+
// Padding
|
|
3151
|
+
"p-[var(--j3m-spacing-l)]",
|
|
3152
|
+
// Animations
|
|
3153
|
+
"duration-200",
|
|
3154
|
+
"data-[state=open]:animate-in",
|
|
3155
|
+
"data-[state=closed]:animate-out",
|
|
3156
|
+
"data-[state=closed]:fade-out-0",
|
|
3157
|
+
"data-[state=open]:fade-in-0",
|
|
3158
|
+
"data-[state=closed]:zoom-out-95",
|
|
3159
|
+
"data-[state=open]:zoom-in-95",
|
|
3160
|
+
"data-[state=closed]:slide-out-to-left-1/2",
|
|
3161
|
+
"data-[state=closed]:slide-out-to-top-[48%]",
|
|
3162
|
+
"data-[state=open]:slide-in-from-left-1/2",
|
|
3163
|
+
"data-[state=open]:slide-in-from-top-[48%]",
|
|
3052
3164
|
className
|
|
3053
3165
|
),
|
|
3054
|
-
...props
|
|
3166
|
+
...props,
|
|
3167
|
+
children: [
|
|
3168
|
+
children,
|
|
3169
|
+
showCloseButton && /* @__PURE__ */ jsxs(
|
|
3170
|
+
DialogPrimitive.Close,
|
|
3171
|
+
{
|
|
3172
|
+
className: cn(
|
|
3173
|
+
"absolute right-[var(--j3m-spacing-m)] top-[var(--j3m-spacing-m)]",
|
|
3174
|
+
"rounded-[var(--j3m-radius-2xs)]",
|
|
3175
|
+
"p-1",
|
|
3176
|
+
"text-[var(--color-text-muted)]",
|
|
3177
|
+
"opacity-70",
|
|
3178
|
+
"ring-offset-background",
|
|
3179
|
+
"transition-opacity",
|
|
3180
|
+
"hover:opacity-100",
|
|
3181
|
+
"hover:bg-[var(--j3m-neutral-200)]",
|
|
3182
|
+
"focus:outline-none",
|
|
3183
|
+
"focus:ring-2",
|
|
3184
|
+
"focus:ring-[var(--j3m-primary-300)]",
|
|
3185
|
+
"focus:ring-offset-2",
|
|
3186
|
+
"disabled:pointer-events-none"
|
|
3187
|
+
),
|
|
3188
|
+
children: [
|
|
3189
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
3190
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
3191
|
+
]
|
|
3192
|
+
}
|
|
3193
|
+
)
|
|
3194
|
+
]
|
|
3055
3195
|
}
|
|
3056
|
-
)
|
|
3057
|
-
}
|
|
3058
|
-
|
|
3196
|
+
)
|
|
3197
|
+
] }));
|
|
3198
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
3199
|
+
var DialogHeader = ({
|
|
3059
3200
|
className,
|
|
3060
3201
|
...props
|
|
3061
|
-
})
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
"
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3202
|
+
}) => /* @__PURE__ */ jsx(
|
|
3203
|
+
"div",
|
|
3204
|
+
{
|
|
3205
|
+
className: cn(
|
|
3206
|
+
"flex flex-col gap-[var(--j3m-spacing-2xs)]",
|
|
3207
|
+
"mb-[var(--j3m-spacing-m)]",
|
|
3208
|
+
"text-center sm:text-left",
|
|
3209
|
+
className
|
|
3210
|
+
),
|
|
3211
|
+
...props
|
|
3212
|
+
}
|
|
3213
|
+
);
|
|
3214
|
+
DialogHeader.displayName = "DialogHeader";
|
|
3215
|
+
var DialogFooter = ({
|
|
3072
3216
|
className,
|
|
3073
3217
|
...props
|
|
3074
|
-
})
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
"
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3218
|
+
}) => /* @__PURE__ */ jsx(
|
|
3219
|
+
"div",
|
|
3220
|
+
{
|
|
3221
|
+
className: cn(
|
|
3222
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end",
|
|
3223
|
+
"gap-[var(--j3m-spacing-s)]",
|
|
3224
|
+
"mt-[var(--j3m-spacing-l)]",
|
|
3225
|
+
className
|
|
3226
|
+
),
|
|
3227
|
+
...props
|
|
3228
|
+
}
|
|
3229
|
+
);
|
|
3230
|
+
DialogFooter.displayName = "DialogFooter";
|
|
3231
|
+
var DialogTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3232
|
+
DialogPrimitive.Title,
|
|
3233
|
+
{
|
|
3234
|
+
ref,
|
|
3235
|
+
className: cn(
|
|
3236
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
3237
|
+
"text-[var(--color-text-main)]",
|
|
3238
|
+
className
|
|
3239
|
+
),
|
|
3240
|
+
...props
|
|
3241
|
+
}
|
|
3242
|
+
));
|
|
3243
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
3244
|
+
var DialogDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3245
|
+
DialogPrimitive.Description,
|
|
3246
|
+
{
|
|
3247
|
+
ref,
|
|
3248
|
+
className: cn(
|
|
3249
|
+
"text-sm",
|
|
3250
|
+
"text-[var(--color-text-muted)]",
|
|
3251
|
+
className
|
|
3252
|
+
),
|
|
3253
|
+
...props
|
|
3254
|
+
}
|
|
3255
|
+
));
|
|
3256
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
3084
3257
|
function Command({
|
|
3085
3258
|
className,
|
|
3086
3259
|
...props
|
|
@@ -4445,9 +4618,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
4445
4618
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
4446
4619
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
4447
4620
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
4448
|
-
var SidebarContext =
|
|
4621
|
+
var SidebarContext = React10.createContext(null);
|
|
4449
4622
|
function useSidebar() {
|
|
4450
|
-
const context =
|
|
4623
|
+
const context = React10.useContext(SidebarContext);
|
|
4451
4624
|
if (!context) {
|
|
4452
4625
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
4453
4626
|
}
|
|
@@ -4463,10 +4636,10 @@ function SidebarProvider({
|
|
|
4463
4636
|
...props
|
|
4464
4637
|
}) {
|
|
4465
4638
|
const isMobile = useIsMobile();
|
|
4466
|
-
const [openMobile, setOpenMobile] =
|
|
4467
|
-
const [_open, _setOpen] =
|
|
4639
|
+
const [openMobile, setOpenMobile] = React10.useState(false);
|
|
4640
|
+
const [_open, _setOpen] = React10.useState(defaultOpen);
|
|
4468
4641
|
const open = openProp ?? _open;
|
|
4469
|
-
const setOpen =
|
|
4642
|
+
const setOpen = React10.useCallback(
|
|
4470
4643
|
(value) => {
|
|
4471
4644
|
const openState = typeof value === "function" ? value(open) : value;
|
|
4472
4645
|
if (setOpenProp) {
|
|
@@ -4478,10 +4651,10 @@ function SidebarProvider({
|
|
|
4478
4651
|
},
|
|
4479
4652
|
[setOpenProp, open]
|
|
4480
4653
|
);
|
|
4481
|
-
const toggleSidebar =
|
|
4654
|
+
const toggleSidebar = React10.useCallback(() => {
|
|
4482
4655
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
4483
4656
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
4484
|
-
|
|
4657
|
+
React10.useEffect(() => {
|
|
4485
4658
|
const handleKeyDown = (event) => {
|
|
4486
4659
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
4487
4660
|
event.preventDefault();
|
|
@@ -4492,7 +4665,7 @@ function SidebarProvider({
|
|
|
4492
4665
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
4493
4666
|
}, [toggleSidebar]);
|
|
4494
4667
|
const state = open ? "expanded" : "collapsed";
|
|
4495
|
-
const contextValue =
|
|
4668
|
+
const contextValue = React10.useMemo(
|
|
4496
4669
|
() => ({
|
|
4497
4670
|
state,
|
|
4498
4671
|
open,
|
|
@@ -4950,7 +5123,7 @@ function SidebarMenuSkeleton({
|
|
|
4950
5123
|
showIcon = false,
|
|
4951
5124
|
...props
|
|
4952
5125
|
}) {
|
|
4953
|
-
const width =
|
|
5126
|
+
const width = React10.useMemo(() => {
|
|
4954
5127
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
4955
5128
|
}, []);
|
|
4956
5129
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5038,7 +5211,147 @@ function SidebarMenuSubButton({
|
|
|
5038
5211
|
}
|
|
5039
5212
|
);
|
|
5040
5213
|
}
|
|
5214
|
+
var sectionVariants = cva(
|
|
5215
|
+
// Base styles - larger padding than Card for section grouping
|
|
5216
|
+
"flex flex-col rounded-[var(--j3m-radius-l)]",
|
|
5217
|
+
{
|
|
5218
|
+
variants: {
|
|
5219
|
+
variant: {
|
|
5220
|
+
// Default solid section
|
|
5221
|
+
default: [
|
|
5222
|
+
"bg-[var(--color-bg-surface)]",
|
|
5223
|
+
"border border-[var(--color-border-subtle)]",
|
|
5224
|
+
"text-[var(--color-text-main)]",
|
|
5225
|
+
"shadow-sm"
|
|
5226
|
+
].join(" "),
|
|
5227
|
+
// Glass Light - for dark or image backgrounds
|
|
5228
|
+
"glass-light": [
|
|
5229
|
+
"glass-context",
|
|
5230
|
+
// Enables glass semantic token overrides
|
|
5231
|
+
"bg-[var(--j3m-glass-light-20)]",
|
|
5232
|
+
"backdrop-blur-[var(--j3m-blur-2xl)]",
|
|
5233
|
+
"border border-[var(--j3m-glass-border-light)]",
|
|
5234
|
+
"text-[var(--color-text-main)]",
|
|
5235
|
+
"shadow-[var(--j3m-glass-shadow-md)]"
|
|
5236
|
+
].join(" "),
|
|
5237
|
+
// Glass Dark - dark frosted glass
|
|
5238
|
+
"glass-dark": [
|
|
5239
|
+
"bg-[var(--j3m-glass-dark)]",
|
|
5240
|
+
"backdrop-blur-[var(--j3m-blur-md)]",
|
|
5241
|
+
"border border-[var(--j3m-glass-border-dark)]",
|
|
5242
|
+
"text-white",
|
|
5243
|
+
"shadow-[var(--j3m-glass-shadow-lg)]"
|
|
5244
|
+
].join(" "),
|
|
5245
|
+
// Glass Neutral - subtle frosted effect (most common)
|
|
5246
|
+
"glass-neutral": [
|
|
5247
|
+
"bg-[var(--j3m-glass-neutral)]",
|
|
5248
|
+
"backdrop-blur-[var(--j3m-blur-lg)]",
|
|
5249
|
+
"border border-[var(--j3m-glass-border-subtle)]",
|
|
5250
|
+
"text-[var(--color-text-main)]",
|
|
5251
|
+
"shadow-[var(--j3m-glass-shadow-sm)]"
|
|
5252
|
+
].join(" "),
|
|
5253
|
+
// Glass Primary - with orange tint
|
|
5254
|
+
"glass-primary": [
|
|
5255
|
+
"bg-[var(--j3m-glass-primary)]",
|
|
5256
|
+
"backdrop-blur-[var(--j3m-blur-lg)]",
|
|
5257
|
+
"border border-[var(--j3m-glass-border-light)]",
|
|
5258
|
+
"text-[var(--color-text-main)]",
|
|
5259
|
+
"shadow-[var(--j3m-glass-shadow-glow)]"
|
|
5260
|
+
].join(" ")
|
|
5261
|
+
}
|
|
5262
|
+
},
|
|
5263
|
+
defaultVariants: {
|
|
5264
|
+
variant: "default"
|
|
5265
|
+
}
|
|
5266
|
+
}
|
|
5267
|
+
);
|
|
5268
|
+
var isGlassVariant = (variant) => variant?.startsWith("glass-") ?? false;
|
|
5269
|
+
var Section = React10.forwardRef(
|
|
5270
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5271
|
+
"section",
|
|
5272
|
+
{
|
|
5273
|
+
ref,
|
|
5274
|
+
className: cn(sectionVariants({ variant, className })),
|
|
5275
|
+
"data-glass-context": isGlassVariant(variant) ? "true" : void 0,
|
|
5276
|
+
...props
|
|
5277
|
+
}
|
|
5278
|
+
)
|
|
5279
|
+
);
|
|
5280
|
+
Section.displayName = "Section";
|
|
5281
|
+
var SectionHeader = React10.forwardRef(
|
|
5282
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5283
|
+
"div",
|
|
5284
|
+
{
|
|
5285
|
+
ref,
|
|
5286
|
+
className: cn(
|
|
5287
|
+
"flex flex-col gap-[var(--j3m-spacing-xs)]",
|
|
5288
|
+
"px-[var(--j3m-spacing-xl)] pt-[var(--j3m-spacing-xl)] pb-[var(--j3m-spacing-m)]",
|
|
5289
|
+
className
|
|
5290
|
+
),
|
|
5291
|
+
...props
|
|
5292
|
+
}
|
|
5293
|
+
)
|
|
5294
|
+
);
|
|
5295
|
+
SectionHeader.displayName = "SectionHeader";
|
|
5296
|
+
var SectionTitle = React10.forwardRef(
|
|
5297
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5298
|
+
"h2",
|
|
5299
|
+
{
|
|
5300
|
+
ref,
|
|
5301
|
+
className: cn(
|
|
5302
|
+
"text-xl font-semibold leading-none tracking-tight",
|
|
5303
|
+
className
|
|
5304
|
+
),
|
|
5305
|
+
...props
|
|
5306
|
+
}
|
|
5307
|
+
)
|
|
5308
|
+
);
|
|
5309
|
+
SectionTitle.displayName = "SectionTitle";
|
|
5310
|
+
var SectionDescription = React10.forwardRef(
|
|
5311
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5312
|
+
"p",
|
|
5313
|
+
{
|
|
5314
|
+
ref,
|
|
5315
|
+
className: cn(
|
|
5316
|
+
"text-sm opacity-70",
|
|
5317
|
+
className
|
|
5318
|
+
),
|
|
5319
|
+
...props
|
|
5320
|
+
}
|
|
5321
|
+
)
|
|
5322
|
+
);
|
|
5323
|
+
SectionDescription.displayName = "SectionDescription";
|
|
5324
|
+
var SectionContent = React10.forwardRef(
|
|
5325
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5326
|
+
"div",
|
|
5327
|
+
{
|
|
5328
|
+
ref,
|
|
5329
|
+
className: cn(
|
|
5330
|
+
"px-[var(--j3m-spacing-xl)] py-[var(--j3m-spacing-l)]",
|
|
5331
|
+
className
|
|
5332
|
+
),
|
|
5333
|
+
...props
|
|
5334
|
+
}
|
|
5335
|
+
)
|
|
5336
|
+
);
|
|
5337
|
+
SectionContent.displayName = "SectionContent";
|
|
5338
|
+
var SectionFooter = React10.forwardRef(
|
|
5339
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5340
|
+
"div",
|
|
5341
|
+
{
|
|
5342
|
+
ref,
|
|
5343
|
+
className: cn(
|
|
5344
|
+
"flex items-center",
|
|
5345
|
+
"px-[var(--j3m-spacing-xl)] py-[var(--j3m-spacing-l)]",
|
|
5346
|
+
"border-t border-[inherit]",
|
|
5347
|
+
className
|
|
5348
|
+
),
|
|
5349
|
+
...props
|
|
5350
|
+
}
|
|
5351
|
+
)
|
|
5352
|
+
);
|
|
5353
|
+
SectionFooter.displayName = "SectionFooter";
|
|
5041
5354
|
|
|
5042
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card,
|
|
5355
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item5 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label2 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Section, SectionContent, SectionDescription, SectionFooter, SectionHeader, SectionTitle, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonGroupVariants, buttonVariants, cardVariants, navigationMenuTriggerStyle, sectionVariants, toggleVariants, useFormField, useIsMobile, useSidebar };
|
|
5043
5356
|
//# sourceMappingURL=index.js.map
|
|
5044
5357
|
//# sourceMappingURL=index.js.map
|