@codapet/design-system 0.6.4 → 0.6.6
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.mts +52 -1
- package/dist/index.mjs +555 -282
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +54 -34
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -149,9 +149,9 @@ var alertBannerVariants = cva2(
|
|
|
149
149
|
{
|
|
150
150
|
variants: {
|
|
151
151
|
type: {
|
|
152
|
-
informative: "bg-alert-bg-informative border-gray-stroke-light",
|
|
153
|
-
error: "bg-alert-bg-error border-error-stroke-light",
|
|
154
|
-
success: "bg-success-surface-subtle border-success-stroke-light"
|
|
152
|
+
informative: "bg-alert-bg-informative border-gray-stroke-light [&_svg]:text-[#52525c] dark:[&_svg]:text-[#a1a1aa]",
|
|
153
|
+
error: "bg-alert-bg-error border-error-stroke-light [&_svg]:text-[#ff6467] dark:[&_svg]:text-[#ff8486]",
|
|
154
|
+
success: "bg-success-surface-subtle border-success-stroke-light [&_svg]:text-[#00a63e] dark:[&_svg]:text-[#34d399]"
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
157
|
defaultVariants: {
|
|
@@ -212,14 +212,14 @@ var buttonVariants = cva3(
|
|
|
212
212
|
variants: {
|
|
213
213
|
variant: {
|
|
214
214
|
primary: "bg-primary text-primary-foreground hover:bg-brand-dark active:bg-active-primary",
|
|
215
|
-
secondary: "bg-brand-subtle text-
|
|
216
|
-
tertiary: "bg-gray-surface-light text-foreground-secondary hover:bg-gray-surface-default border border-gray-stroke-light active:bg-
|
|
215
|
+
secondary: "bg-brand-subtle text-primary-stroke-default hover:bg-primary-surface-light border border-brand-light active:bg-icon-disabled",
|
|
216
|
+
tertiary: "bg-gray-surface-light text-foreground-secondary hover:bg-gray-surface-default border border-gray-stroke-light hover:border-transparent active:border-transparent active:bg-[#9f9fa9] dark:active:bg-[#71717a]",
|
|
217
217
|
outline: "text-foreground-secondary border border-gray-surface-default bg-background hover:bg-gray-surface-light hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 active:bg-gray-surface-default",
|
|
218
|
-
ghost: "text-
|
|
218
|
+
ghost: "text-primary-stroke-default hover:bg-primary-surface-subtle dark:hover:bg-accent/50 active:bg-primary-surface-light",
|
|
219
219
|
"ghost-secondary": "text-foreground-secondary hover:bg-gray-surface-light hover:text-accent-foreground dark:hover:bg-accent/50 active:bg-gray-surface-default",
|
|
220
220
|
"ghost-destructive": "bg-transparent text-destructive-text hover:bg-destructive-hover focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-destructive-active",
|
|
221
221
|
link: "text-foreground-secondary underline-offset-4 underline hover:bg-none active:bg-none hover:text-brand-vibrant",
|
|
222
|
-
destructive: "bg-error-surface-default text-primary-foreground hover:bg-
|
|
222
|
+
destructive: "bg-error-surface-default text-primary-foreground hover:bg-red-800 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-error-surface-dark",
|
|
223
223
|
"destructive-secondary": "bg-error-surface-light border border-error-stroke-light text-destructive-text hover:border-error-surface-default focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-destructive-active",
|
|
224
224
|
"destructive-tertiary": "bg-transparent border border-error-stroke-light text-destructive-text hover:bg-destructive-hover focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 active:bg-destructive-active"
|
|
225
225
|
},
|
|
@@ -4030,7 +4030,7 @@ function Tag({ label, onRemove }) {
|
|
|
4030
4030
|
},
|
|
4031
4031
|
className: "flex items-center justify-center size-[20px] text-primary-stroke-default hover:text-primary-surface-default transition-colors cursor-pointer",
|
|
4032
4032
|
"aria-label": `Remove ${label}`,
|
|
4033
|
-
children: /* @__PURE__ */ jsx36(X2, { className: "size-[
|
|
4033
|
+
children: /* @__PURE__ */ jsx36(X2, { className: "size-[16px]" })
|
|
4034
4034
|
}
|
|
4035
4035
|
)
|
|
4036
4036
|
]
|
|
@@ -4562,16 +4562,65 @@ function Progress({
|
|
|
4562
4562
|
);
|
|
4563
4563
|
}
|
|
4564
4564
|
|
|
4565
|
+
// src/components/ui/progress-bar.tsx
|
|
4566
|
+
import { cva as cva11 } from "class-variance-authority";
|
|
4567
|
+
import "react";
|
|
4568
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4569
|
+
var progressBarVariants = cva11("relative overflow-hidden rounded-[8px]", {
|
|
4570
|
+
variants: {
|
|
4571
|
+
device: {
|
|
4572
|
+
desktop: "w-[360px] h-[4px]",
|
|
4573
|
+
mobile: "w-[342px] h-[4px]"
|
|
4574
|
+
}
|
|
4575
|
+
},
|
|
4576
|
+
defaultVariants: {
|
|
4577
|
+
device: "desktop"
|
|
4578
|
+
}
|
|
4579
|
+
});
|
|
4580
|
+
function ProgressBar({
|
|
4581
|
+
className,
|
|
4582
|
+
device,
|
|
4583
|
+
currentStep = 1,
|
|
4584
|
+
totalSteps = 7,
|
|
4585
|
+
value,
|
|
4586
|
+
...props
|
|
4587
|
+
}) {
|
|
4588
|
+
const percentage = value !== void 0 ? Math.min(100, Math.max(0, value)) : Math.min(100, Math.max(0, currentStep / totalSteps * 100));
|
|
4589
|
+
return /* @__PURE__ */ jsxs23(
|
|
4590
|
+
"div",
|
|
4591
|
+
{
|
|
4592
|
+
"data-slot": "progress-bar",
|
|
4593
|
+
className: cn(progressBarVariants({ device }), className),
|
|
4594
|
+
role: "progressbar",
|
|
4595
|
+
"aria-valuenow": Math.round(percentage),
|
|
4596
|
+
"aria-valuemin": 0,
|
|
4597
|
+
"aria-valuemax": 100,
|
|
4598
|
+
...props,
|
|
4599
|
+
children: [
|
|
4600
|
+
/* @__PURE__ */ jsx40("div", { className: "absolute inset-0 rounded-[8px] bg-primary-surface-light" }),
|
|
4601
|
+
/* @__PURE__ */ jsx40(
|
|
4602
|
+
"div",
|
|
4603
|
+
{
|
|
4604
|
+
"data-slot": "progress-bar-fill",
|
|
4605
|
+
className: "absolute inset-y-0 left-0 rounded-[8px] bg-primary-surface-default transition-[width] duration-300 ease-in-out",
|
|
4606
|
+
style: { width: `${percentage}%` }
|
|
4607
|
+
}
|
|
4608
|
+
)
|
|
4609
|
+
]
|
|
4610
|
+
}
|
|
4611
|
+
);
|
|
4612
|
+
}
|
|
4613
|
+
|
|
4565
4614
|
// src/components/ui/radio-group.tsx
|
|
4566
4615
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4567
4616
|
import { CircleIcon as CircleIcon4 } from "lucide-react";
|
|
4568
4617
|
import "react";
|
|
4569
|
-
import { jsx as
|
|
4618
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
4570
4619
|
function RadioGroup4({
|
|
4571
4620
|
className,
|
|
4572
4621
|
...props
|
|
4573
4622
|
}) {
|
|
4574
|
-
return /* @__PURE__ */
|
|
4623
|
+
return /* @__PURE__ */ jsx41(
|
|
4575
4624
|
RadioGroupPrimitive.Root,
|
|
4576
4625
|
{
|
|
4577
4626
|
"data-slot": "radio-group",
|
|
@@ -4584,7 +4633,7 @@ function RadioGroupItem({
|
|
|
4584
4633
|
className,
|
|
4585
4634
|
...props
|
|
4586
4635
|
}) {
|
|
4587
|
-
return /* @__PURE__ */
|
|
4636
|
+
return /* @__PURE__ */ jsx41(
|
|
4588
4637
|
RadioGroupPrimitive.Item,
|
|
4589
4638
|
{
|
|
4590
4639
|
"data-slot": "radio-group-item",
|
|
@@ -4593,12 +4642,12 @@ function RadioGroupItem({
|
|
|
4593
4642
|
className
|
|
4594
4643
|
),
|
|
4595
4644
|
...props,
|
|
4596
|
-
children: /* @__PURE__ */
|
|
4645
|
+
children: /* @__PURE__ */ jsx41(
|
|
4597
4646
|
RadioGroupPrimitive.Indicator,
|
|
4598
4647
|
{
|
|
4599
4648
|
"data-slot": "radio-group-indicator",
|
|
4600
4649
|
className: "relative flex items-center justify-center",
|
|
4601
|
-
children: /* @__PURE__ */
|
|
4650
|
+
children: /* @__PURE__ */ jsx41(CircleIcon4, { className: "fill-white absolute top-1/2 left-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2" })
|
|
4602
4651
|
}
|
|
4603
4652
|
)
|
|
4604
4653
|
}
|
|
@@ -4609,12 +4658,12 @@ function RadioGroupItem({
|
|
|
4609
4658
|
import "react";
|
|
4610
4659
|
import { GripVerticalIcon } from "lucide-react";
|
|
4611
4660
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
4612
|
-
import { jsx as
|
|
4661
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
4613
4662
|
function ResizablePanelGroup({
|
|
4614
4663
|
className,
|
|
4615
4664
|
...props
|
|
4616
4665
|
}) {
|
|
4617
|
-
return /* @__PURE__ */
|
|
4666
|
+
return /* @__PURE__ */ jsx42(
|
|
4618
4667
|
ResizablePrimitive.PanelGroup,
|
|
4619
4668
|
{
|
|
4620
4669
|
"data-slot": "resizable-panel-group",
|
|
@@ -4629,14 +4678,14 @@ function ResizablePanelGroup({
|
|
|
4629
4678
|
function ResizablePanel({
|
|
4630
4679
|
...props
|
|
4631
4680
|
}) {
|
|
4632
|
-
return /* @__PURE__ */
|
|
4681
|
+
return /* @__PURE__ */ jsx42(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
4633
4682
|
}
|
|
4634
4683
|
function ResizableHandle({
|
|
4635
4684
|
withHandle,
|
|
4636
4685
|
className,
|
|
4637
4686
|
...props
|
|
4638
4687
|
}) {
|
|
4639
|
-
return /* @__PURE__ */
|
|
4688
|
+
return /* @__PURE__ */ jsx42(
|
|
4640
4689
|
ResizablePrimitive.PanelResizeHandle,
|
|
4641
4690
|
{
|
|
4642
4691
|
"data-slot": "resizable-handle",
|
|
@@ -4645,7 +4694,7 @@ function ResizableHandle({
|
|
|
4645
4694
|
className
|
|
4646
4695
|
),
|
|
4647
4696
|
...props,
|
|
4648
|
-
children: withHandle && /* @__PURE__ */
|
|
4697
|
+
children: withHandle && /* @__PURE__ */ jsx42("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx42(GripVerticalIcon, { className: "size-2.5" }) })
|
|
4649
4698
|
}
|
|
4650
4699
|
);
|
|
4651
4700
|
}
|
|
@@ -4653,20 +4702,20 @@ function ResizableHandle({
|
|
|
4653
4702
|
// src/components/ui/scroll-area.tsx
|
|
4654
4703
|
import "react";
|
|
4655
4704
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
4656
|
-
import { jsx as
|
|
4705
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4657
4706
|
function ScrollArea({
|
|
4658
4707
|
className,
|
|
4659
4708
|
children,
|
|
4660
4709
|
...props
|
|
4661
4710
|
}) {
|
|
4662
|
-
return /* @__PURE__ */
|
|
4711
|
+
return /* @__PURE__ */ jsxs24(
|
|
4663
4712
|
ScrollAreaPrimitive.Root,
|
|
4664
4713
|
{
|
|
4665
4714
|
"data-slot": "scroll-area",
|
|
4666
4715
|
className: cn("relative", className),
|
|
4667
4716
|
...props,
|
|
4668
4717
|
children: [
|
|
4669
|
-
/* @__PURE__ */
|
|
4718
|
+
/* @__PURE__ */ jsx43(
|
|
4670
4719
|
ScrollAreaPrimitive.Viewport,
|
|
4671
4720
|
{
|
|
4672
4721
|
"data-slot": "scroll-area-viewport",
|
|
@@ -4674,8 +4723,8 @@ function ScrollArea({
|
|
|
4674
4723
|
children
|
|
4675
4724
|
}
|
|
4676
4725
|
),
|
|
4677
|
-
/* @__PURE__ */
|
|
4678
|
-
/* @__PURE__ */
|
|
4726
|
+
/* @__PURE__ */ jsx43(ScrollBar, {}),
|
|
4727
|
+
/* @__PURE__ */ jsx43(ScrollAreaPrimitive.Corner, {})
|
|
4679
4728
|
]
|
|
4680
4729
|
}
|
|
4681
4730
|
);
|
|
@@ -4685,7 +4734,7 @@ function ScrollBar({
|
|
|
4685
4734
|
orientation = "vertical",
|
|
4686
4735
|
...props
|
|
4687
4736
|
}) {
|
|
4688
|
-
return /* @__PURE__ */
|
|
4737
|
+
return /* @__PURE__ */ jsx43(
|
|
4689
4738
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
4690
4739
|
{
|
|
4691
4740
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -4697,7 +4746,7 @@ function ScrollBar({
|
|
|
4697
4746
|
className
|
|
4698
4747
|
),
|
|
4699
4748
|
...props,
|
|
4700
|
-
children: /* @__PURE__ */
|
|
4749
|
+
children: /* @__PURE__ */ jsx43(
|
|
4701
4750
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
4702
4751
|
{
|
|
4703
4752
|
"data-slot": "scroll-area-thumb",
|
|
@@ -4708,13 +4757,234 @@ function ScrollBar({
|
|
|
4708
4757
|
);
|
|
4709
4758
|
}
|
|
4710
4759
|
|
|
4760
|
+
// src/components/ui/search-input.tsx
|
|
4761
|
+
import * as React42 from "react";
|
|
4762
|
+
import { Search, X as X3 } from "lucide-react";
|
|
4763
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4764
|
+
function SearchInput({
|
|
4765
|
+
variant = "icon",
|
|
4766
|
+
value: valueProp,
|
|
4767
|
+
defaultValue = "",
|
|
4768
|
+
onValueChange,
|
|
4769
|
+
onSearch,
|
|
4770
|
+
onClear,
|
|
4771
|
+
placeholder = "Placeholder",
|
|
4772
|
+
label,
|
|
4773
|
+
helperText,
|
|
4774
|
+
icon,
|
|
4775
|
+
error = false,
|
|
4776
|
+
errorMessage,
|
|
4777
|
+
disabled = false,
|
|
4778
|
+
suggestions = [],
|
|
4779
|
+
onSuggestionClick,
|
|
4780
|
+
className
|
|
4781
|
+
}) {
|
|
4782
|
+
const [internalValue, setInternalValue] = React42.useState(defaultValue);
|
|
4783
|
+
const [isFocused, setIsFocused] = React42.useState(false);
|
|
4784
|
+
const [showSuggestions, setShowSuggestions] = React42.useState(false);
|
|
4785
|
+
const inputRef = React42.useRef(null);
|
|
4786
|
+
const containerRef = React42.useRef(null);
|
|
4787
|
+
const isControlled = valueProp !== void 0;
|
|
4788
|
+
const currentValue = isControlled ? valueProp : internalValue;
|
|
4789
|
+
const hasValue = currentValue.trim().length > 0;
|
|
4790
|
+
const isFilledEdit = hasValue && !isFocused && !error;
|
|
4791
|
+
const updateValue = React42.useCallback(
|
|
4792
|
+
(next) => {
|
|
4793
|
+
if (!isControlled) setInternalValue(next);
|
|
4794
|
+
onValueChange?.(next);
|
|
4795
|
+
},
|
|
4796
|
+
[isControlled, onValueChange]
|
|
4797
|
+
);
|
|
4798
|
+
const handleInputChange = React42.useCallback(
|
|
4799
|
+
(e) => {
|
|
4800
|
+
updateValue(e.target.value);
|
|
4801
|
+
if (e.target.value.trim().length > 0 && suggestions.length > 0) {
|
|
4802
|
+
setShowSuggestions(true);
|
|
4803
|
+
} else {
|
|
4804
|
+
setShowSuggestions(false);
|
|
4805
|
+
}
|
|
4806
|
+
},
|
|
4807
|
+
[updateValue, suggestions.length]
|
|
4808
|
+
);
|
|
4809
|
+
const handleKeyDown = React42.useCallback(
|
|
4810
|
+
(e) => {
|
|
4811
|
+
if (e.key === "Enter") {
|
|
4812
|
+
e.preventDefault();
|
|
4813
|
+
onSearch?.(currentValue);
|
|
4814
|
+
setShowSuggestions(false);
|
|
4815
|
+
} else if (e.key === "Escape") {
|
|
4816
|
+
setShowSuggestions(false);
|
|
4817
|
+
inputRef.current?.blur();
|
|
4818
|
+
}
|
|
4819
|
+
},
|
|
4820
|
+
[currentValue, onSearch]
|
|
4821
|
+
);
|
|
4822
|
+
const handleClear = React42.useCallback(() => {
|
|
4823
|
+
updateValue("");
|
|
4824
|
+
onClear?.();
|
|
4825
|
+
inputRef.current?.focus();
|
|
4826
|
+
}, [updateValue, onClear]);
|
|
4827
|
+
const handleSearchClick = React42.useCallback(() => {
|
|
4828
|
+
onSearch?.(currentValue);
|
|
4829
|
+
setShowSuggestions(false);
|
|
4830
|
+
}, [currentValue, onSearch]);
|
|
4831
|
+
const handleSuggestionClick = React42.useCallback(
|
|
4832
|
+
(label2) => {
|
|
4833
|
+
updateValue(label2);
|
|
4834
|
+
onSuggestionClick?.(label2);
|
|
4835
|
+
setShowSuggestions(false);
|
|
4836
|
+
inputRef.current?.focus();
|
|
4837
|
+
},
|
|
4838
|
+
[updateValue, onSuggestionClick]
|
|
4839
|
+
);
|
|
4840
|
+
const handleFocus = React42.useCallback(() => {
|
|
4841
|
+
if (disabled) return;
|
|
4842
|
+
setIsFocused(true);
|
|
4843
|
+
if (currentValue.trim().length > 0 && suggestions.length > 0) {
|
|
4844
|
+
setShowSuggestions(true);
|
|
4845
|
+
}
|
|
4846
|
+
}, [disabled, currentValue, suggestions.length]);
|
|
4847
|
+
const handleBlur = React42.useCallback(
|
|
4848
|
+
(e) => {
|
|
4849
|
+
if (containerRef.current?.contains(e.relatedTarget)) return;
|
|
4850
|
+
setIsFocused(false);
|
|
4851
|
+
setShowSuggestions(false);
|
|
4852
|
+
},
|
|
4853
|
+
[]
|
|
4854
|
+
);
|
|
4855
|
+
const displayHelperText = error && errorMessage ? errorMessage : helperText;
|
|
4856
|
+
const showClearButton = (isFilledEdit || error) && hasValue;
|
|
4857
|
+
return /* @__PURE__ */ jsxs25(
|
|
4858
|
+
"div",
|
|
4859
|
+
{
|
|
4860
|
+
ref: containerRef,
|
|
4861
|
+
"data-slot": "search-input",
|
|
4862
|
+
className: cn("flex flex-col gap-[8px] items-start w-full", className),
|
|
4863
|
+
onBlur: handleBlur,
|
|
4864
|
+
children: [
|
|
4865
|
+
label && /* @__PURE__ */ jsx44("div", { className: "flex items-center font-sans font-medium text-[14px] leading-[20px] text-vibrant-text-details", children: label }),
|
|
4866
|
+
/* @__PURE__ */ jsxs25(
|
|
4867
|
+
"div",
|
|
4868
|
+
{
|
|
4869
|
+
className: cn(
|
|
4870
|
+
"flex items-center w-full h-[48px] rounded-[8px] overflow-hidden transition-colors",
|
|
4871
|
+
// Border + background
|
|
4872
|
+
error ? "border border-error-stroke-light bg-error-surface-light" : isFocused ? "border-2 border-focus-ring bg-white dark:bg-background" : "border border-gray-stroke-default bg-white dark:bg-background",
|
|
4873
|
+
// Hover (only when not focused, not error, not disabled)
|
|
4874
|
+
!isFocused && !error && !disabled && "hover:border-focus-ring",
|
|
4875
|
+
// Padding - adjust for 2px border on focus to prevent layout shift
|
|
4876
|
+
error ? "pl-[12px] pr-[12px] py-[8px]" : isFocused ? "pl-[11px] pr-[7px] py-[7px]" : "pl-[12px] pr-[8px] py-[8px]",
|
|
4877
|
+
// Gap
|
|
4878
|
+
"gap-[8px]",
|
|
4879
|
+
// Disabled
|
|
4880
|
+
disabled && "opacity-60 cursor-not-allowed"
|
|
4881
|
+
),
|
|
4882
|
+
children: [
|
|
4883
|
+
icon && /* @__PURE__ */ jsx44(
|
|
4884
|
+
"span",
|
|
4885
|
+
{
|
|
4886
|
+
className: cn(
|
|
4887
|
+
"flex items-center justify-center shrink-0 size-[20px] [&_svg]:size-[20px]",
|
|
4888
|
+
error ? "text-error-surface-default" : isFocused ? "text-focus-ring" : "text-muted-foreground"
|
|
4889
|
+
),
|
|
4890
|
+
children: icon
|
|
4891
|
+
}
|
|
4892
|
+
),
|
|
4893
|
+
/* @__PURE__ */ jsx44(
|
|
4894
|
+
"input",
|
|
4895
|
+
{
|
|
4896
|
+
ref: inputRef,
|
|
4897
|
+
type: "text",
|
|
4898
|
+
value: currentValue,
|
|
4899
|
+
onChange: handleInputChange,
|
|
4900
|
+
onKeyDown: handleKeyDown,
|
|
4901
|
+
onFocus: handleFocus,
|
|
4902
|
+
disabled,
|
|
4903
|
+
placeholder,
|
|
4904
|
+
className: cn(
|
|
4905
|
+
"flex-1 min-w-0 bg-transparent outline-none font-sans font-medium text-[16px] leading-[24px] text-vibrant-text-heading placeholder:text-muted-foreground",
|
|
4906
|
+
disabled && "cursor-not-allowed"
|
|
4907
|
+
)
|
|
4908
|
+
}
|
|
4909
|
+
),
|
|
4910
|
+
showClearButton ? /* @__PURE__ */ jsx44(
|
|
4911
|
+
"button",
|
|
4912
|
+
{
|
|
4913
|
+
type: "button",
|
|
4914
|
+
onClick: handleClear,
|
|
4915
|
+
className: "flex items-center justify-center shrink-0 size-[20px] text-muted-foreground hover:text-vibrant-text-heading transition-colors cursor-pointer",
|
|
4916
|
+
"aria-label": "Clear search",
|
|
4917
|
+
tabIndex: -1,
|
|
4918
|
+
children: /* @__PURE__ */ jsx44(X3, { className: "size-[16px]" })
|
|
4919
|
+
}
|
|
4920
|
+
) : variant === "button" ? /* @__PURE__ */ jsx44(
|
|
4921
|
+
"button",
|
|
4922
|
+
{
|
|
4923
|
+
type: "button",
|
|
4924
|
+
onClick: handleSearchClick,
|
|
4925
|
+
disabled,
|
|
4926
|
+
className: "flex items-center justify-center shrink-0 h-[36px] min-w-[100px] px-[16px] py-[8px] rounded-[6px] bg-primary-surface-default font-sans font-semibold text-[16px] leading-[24px] text-white cursor-pointer disabled:cursor-not-allowed transition-colors",
|
|
4927
|
+
tabIndex: -1,
|
|
4928
|
+
children: "Search"
|
|
4929
|
+
}
|
|
4930
|
+
) : /* @__PURE__ */ jsx44(
|
|
4931
|
+
"button",
|
|
4932
|
+
{
|
|
4933
|
+
type: "button",
|
|
4934
|
+
onClick: handleSearchClick,
|
|
4935
|
+
disabled,
|
|
4936
|
+
className: "flex items-center justify-center shrink-0 size-[36px] rounded-[6px] bg-primary-surface-default cursor-pointer disabled:cursor-not-allowed transition-colors",
|
|
4937
|
+
"aria-label": "Search",
|
|
4938
|
+
tabIndex: -1,
|
|
4939
|
+
children: /* @__PURE__ */ jsx44(Search, { className: "size-[20px] text-white" })
|
|
4940
|
+
}
|
|
4941
|
+
)
|
|
4942
|
+
]
|
|
4943
|
+
}
|
|
4944
|
+
),
|
|
4945
|
+
displayHelperText && /* @__PURE__ */ jsx44(
|
|
4946
|
+
"p",
|
|
4947
|
+
{
|
|
4948
|
+
className: cn(
|
|
4949
|
+
"font-sans font-normal text-[12px] leading-[16px] w-full",
|
|
4950
|
+
error ? "text-error-surface-default" : "text-vibrant-text-details"
|
|
4951
|
+
),
|
|
4952
|
+
children: displayHelperText
|
|
4953
|
+
}
|
|
4954
|
+
),
|
|
4955
|
+
showSuggestions && suggestions.length > 0 && /* @__PURE__ */ jsx44(
|
|
4956
|
+
"div",
|
|
4957
|
+
{
|
|
4958
|
+
"data-slot": "search-input-suggestions",
|
|
4959
|
+
className: "w-full rounded-[8px] border border-gray-stroke-light bg-white dark:bg-card p-[12px] shadow-[0px_4px_24px_0px_rgba(0,0,0,0.05)] flex flex-col gap-[16px]",
|
|
4960
|
+
children: suggestions.map((suggestion, idx) => /* @__PURE__ */ jsxs25(
|
|
4961
|
+
"button",
|
|
4962
|
+
{
|
|
4963
|
+
type: "button",
|
|
4964
|
+
onClick: () => handleSuggestionClick(suggestion.label),
|
|
4965
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
4966
|
+
className: "flex items-center gap-[13px] h-[40px] pr-[12px] rounded-[8px] w-full text-left hover:bg-gray-surface-light transition-colors cursor-pointer",
|
|
4967
|
+
children: [
|
|
4968
|
+
suggestion.icon && /* @__PURE__ */ jsx44("span", { className: "flex items-center justify-center shrink-0 size-[40px] rounded-[8px] bg-gray-surface-light [&_svg]:size-[20px] text-muted-foreground", children: suggestion.icon }),
|
|
4969
|
+
/* @__PURE__ */ jsx44("span", { className: "flex-1 min-w-0 font-sans font-medium text-[16px] leading-[24px] text-vibrant-text-heading truncate", children: suggestion.label })
|
|
4970
|
+
]
|
|
4971
|
+
},
|
|
4972
|
+
`${suggestion.label}-${idx}`
|
|
4973
|
+
))
|
|
4974
|
+
}
|
|
4975
|
+
)
|
|
4976
|
+
]
|
|
4977
|
+
}
|
|
4978
|
+
);
|
|
4979
|
+
}
|
|
4980
|
+
|
|
4711
4981
|
// src/components/ui/searchable-select.tsx
|
|
4712
|
-
import * as
|
|
4982
|
+
import * as React43 from "react";
|
|
4713
4983
|
import { CheckIcon as CheckIcon4, ChevronsUpDown, XIcon as XIcon2 } from "lucide-react";
|
|
4714
|
-
import { jsx as
|
|
4715
|
-
var SearchableSelectContext =
|
|
4984
|
+
import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4985
|
+
var SearchableSelectContext = React43.createContext(null);
|
|
4716
4986
|
function useSearchableSelect() {
|
|
4717
|
-
const ctx =
|
|
4987
|
+
const ctx = React43.useContext(SearchableSelectContext);
|
|
4718
4988
|
if (!ctx) {
|
|
4719
4989
|
throw new Error(
|
|
4720
4990
|
"SearchableSelect compound components must be used within <SearchableSelect>"
|
|
@@ -4740,11 +5010,11 @@ function SearchableSelect({
|
|
|
4740
5010
|
onOpenChange,
|
|
4741
5011
|
children
|
|
4742
5012
|
}) {
|
|
4743
|
-
const [internalOpen, setInternalOpen] =
|
|
4744
|
-
const [internalValue, setInternalValue] =
|
|
4745
|
-
const [internalValues, setInternalValues] =
|
|
5013
|
+
const [internalOpen, setInternalOpen] = React43.useState(false);
|
|
5014
|
+
const [internalValue, setInternalValue] = React43.useState(defaultValue);
|
|
5015
|
+
const [internalValues, setInternalValues] = React43.useState(defaultValues);
|
|
4746
5016
|
const open = controlledOpen ?? internalOpen;
|
|
4747
|
-
const setOpen =
|
|
5017
|
+
const setOpen = React43.useCallback(
|
|
4748
5018
|
(next) => {
|
|
4749
5019
|
if (controlledOpen !== void 0) {
|
|
4750
5020
|
onOpenChange?.(next);
|
|
@@ -4756,7 +5026,7 @@ function SearchableSelect({
|
|
|
4756
5026
|
[controlledOpen, onOpenChange]
|
|
4757
5027
|
);
|
|
4758
5028
|
const value = controlledValue ?? internalValue;
|
|
4759
|
-
const setValue =
|
|
5029
|
+
const setValue = React43.useCallback(
|
|
4760
5030
|
(next) => {
|
|
4761
5031
|
if (controlledValue === void 0) {
|
|
4762
5032
|
setInternalValue(next);
|
|
@@ -4766,7 +5036,7 @@ function SearchableSelect({
|
|
|
4766
5036
|
[controlledValue, onValueChange]
|
|
4767
5037
|
);
|
|
4768
5038
|
const values = controlledValues ?? internalValues;
|
|
4769
|
-
const setValues =
|
|
5039
|
+
const setValues = React43.useCallback(
|
|
4770
5040
|
(next) => {
|
|
4771
5041
|
if (controlledValues === void 0) {
|
|
4772
5042
|
setInternalValues(next);
|
|
@@ -4775,14 +5045,14 @@ function SearchableSelect({
|
|
|
4775
5045
|
},
|
|
4776
5046
|
[controlledValues, onValuesChange]
|
|
4777
5047
|
);
|
|
4778
|
-
const optionMap =
|
|
5048
|
+
const optionMap = React43.useMemo(() => {
|
|
4779
5049
|
const map = /* @__PURE__ */ new Map();
|
|
4780
5050
|
for (const opt of options) {
|
|
4781
5051
|
map.set(opt.value, opt.label);
|
|
4782
5052
|
}
|
|
4783
5053
|
return map;
|
|
4784
5054
|
}, [options]);
|
|
4785
|
-
const ctx =
|
|
5055
|
+
const ctx = React43.useMemo(
|
|
4786
5056
|
() => ({
|
|
4787
5057
|
open,
|
|
4788
5058
|
setOpen,
|
|
@@ -4816,7 +5086,7 @@ function SearchableSelect({
|
|
|
4816
5086
|
optionMap
|
|
4817
5087
|
]
|
|
4818
5088
|
);
|
|
4819
|
-
return /* @__PURE__ */
|
|
5089
|
+
return /* @__PURE__ */ jsx45(SearchableSelectContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx45(Popover, { open, onOpenChange: setOpen, children }) });
|
|
4820
5090
|
}
|
|
4821
5091
|
function SearchableSelectTrigger({
|
|
4822
5092
|
className,
|
|
@@ -4829,7 +5099,7 @@ function SearchableSelectTrigger({
|
|
|
4829
5099
|
if (children) return children;
|
|
4830
5100
|
if (ctx.mode === "single") {
|
|
4831
5101
|
const label = ctx.optionMap.get(ctx.value);
|
|
4832
|
-
return /* @__PURE__ */
|
|
5102
|
+
return /* @__PURE__ */ jsx45(
|
|
4833
5103
|
"span",
|
|
4834
5104
|
{
|
|
4835
5105
|
"data-slot": "searchable-select-value",
|
|
@@ -4842,7 +5112,7 @@ function SearchableSelectTrigger({
|
|
|
4842
5112
|
);
|
|
4843
5113
|
}
|
|
4844
5114
|
if (ctx.values.length === 0) {
|
|
4845
|
-
return /* @__PURE__ */
|
|
5115
|
+
return /* @__PURE__ */ jsx45(
|
|
4846
5116
|
"span",
|
|
4847
5117
|
{
|
|
4848
5118
|
"data-slot": "searchable-select-value",
|
|
@@ -4853,20 +5123,20 @@ function SearchableSelectTrigger({
|
|
|
4853
5123
|
}
|
|
4854
5124
|
const visible = ctx.values.slice(0, ctx.maxCount);
|
|
4855
5125
|
const remaining = ctx.values.length - visible.length;
|
|
4856
|
-
return /* @__PURE__ */
|
|
5126
|
+
return /* @__PURE__ */ jsxs26(
|
|
4857
5127
|
"span",
|
|
4858
5128
|
{
|
|
4859
5129
|
"data-slot": "searchable-select-value",
|
|
4860
5130
|
className: "flex flex-wrap items-center gap-1",
|
|
4861
5131
|
children: [
|
|
4862
|
-
visible.map((v) => /* @__PURE__ */
|
|
5132
|
+
visible.map((v) => /* @__PURE__ */ jsxs26(
|
|
4863
5133
|
Badge,
|
|
4864
5134
|
{
|
|
4865
5135
|
variant: "secondary",
|
|
4866
5136
|
className: "gap-1 pr-1",
|
|
4867
5137
|
children: [
|
|
4868
|
-
/* @__PURE__ */
|
|
4869
|
-
/* @__PURE__ */
|
|
5138
|
+
/* @__PURE__ */ jsx45("span", { className: "truncate max-w-[120px]", children: ctx.optionMap.get(v) || v }),
|
|
5139
|
+
/* @__PURE__ */ jsx45(
|
|
4870
5140
|
"span",
|
|
4871
5141
|
{
|
|
4872
5142
|
role: "button",
|
|
@@ -4878,14 +5148,14 @@ function SearchableSelectTrigger({
|
|
|
4878
5148
|
e.stopPropagation();
|
|
4879
5149
|
ctx.setValues(ctx.values.filter((val) => val !== v));
|
|
4880
5150
|
},
|
|
4881
|
-
children: /* @__PURE__ */
|
|
5151
|
+
children: /* @__PURE__ */ jsx45(XIcon2, { className: "size-3" })
|
|
4882
5152
|
}
|
|
4883
5153
|
)
|
|
4884
5154
|
]
|
|
4885
5155
|
},
|
|
4886
5156
|
v
|
|
4887
5157
|
)),
|
|
4888
|
-
remaining > 0 && /* @__PURE__ */
|
|
5158
|
+
remaining > 0 && /* @__PURE__ */ jsxs26(Badge, { variant: "outline", className: "text-muted-foreground", children: [
|
|
4889
5159
|
"+",
|
|
4890
5160
|
remaining,
|
|
4891
5161
|
" more"
|
|
@@ -4894,7 +5164,7 @@ function SearchableSelectTrigger({
|
|
|
4894
5164
|
}
|
|
4895
5165
|
);
|
|
4896
5166
|
};
|
|
4897
|
-
return /* @__PURE__ */
|
|
5167
|
+
return /* @__PURE__ */ jsxs26(
|
|
4898
5168
|
PopoverTrigger,
|
|
4899
5169
|
{
|
|
4900
5170
|
"data-slot": "searchable-select-trigger",
|
|
@@ -4908,7 +5178,7 @@ function SearchableSelectTrigger({
|
|
|
4908
5178
|
...props,
|
|
4909
5179
|
children: [
|
|
4910
5180
|
renderContent(),
|
|
4911
|
-
/* @__PURE__ */
|
|
5181
|
+
/* @__PURE__ */ jsx45(ChevronsUpDown, { className: "size-4 shrink-0 opacity-50" })
|
|
4912
5182
|
]
|
|
4913
5183
|
}
|
|
4914
5184
|
);
|
|
@@ -4920,7 +5190,7 @@ function SearchableSelectContent({
|
|
|
4920
5190
|
...props
|
|
4921
5191
|
}) {
|
|
4922
5192
|
const ctx = useSearchableSelect();
|
|
4923
|
-
const groupedOptions =
|
|
5193
|
+
const groupedOptions = React43.useMemo(() => {
|
|
4924
5194
|
if (ctx.options.length === 0) return null;
|
|
4925
5195
|
const groups = /* @__PURE__ */ new Map();
|
|
4926
5196
|
for (const opt of ctx.options) {
|
|
@@ -4934,7 +5204,7 @@ function SearchableSelectContent({
|
|
|
4934
5204
|
if (!groupedOptions) return null;
|
|
4935
5205
|
const entries = Array.from(groupedOptions.entries());
|
|
4936
5206
|
if (entries.length === 1 && entries[0][0] === "") {
|
|
4937
|
-
return entries[0][1].map((opt) => /* @__PURE__ */
|
|
5207
|
+
return entries[0][1].map((opt) => /* @__PURE__ */ jsx45(
|
|
4938
5208
|
SearchableSelectItem,
|
|
4939
5209
|
{
|
|
4940
5210
|
value: opt.value,
|
|
@@ -4944,7 +5214,7 @@ function SearchableSelectContent({
|
|
|
4944
5214
|
opt.value
|
|
4945
5215
|
));
|
|
4946
5216
|
}
|
|
4947
|
-
return entries.map(([group, opts]) => /* @__PURE__ */
|
|
5217
|
+
return entries.map(([group, opts]) => /* @__PURE__ */ jsx45(SearchableSelectGroup, { heading: group || void 0, children: opts.map((opt) => /* @__PURE__ */ jsx45(
|
|
4948
5218
|
SearchableSelectItem,
|
|
4949
5219
|
{
|
|
4950
5220
|
value: opt.value,
|
|
@@ -4954,17 +5224,17 @@ function SearchableSelectContent({
|
|
|
4954
5224
|
opt.value
|
|
4955
5225
|
)) }, group));
|
|
4956
5226
|
};
|
|
4957
|
-
return /* @__PURE__ */
|
|
5227
|
+
return /* @__PURE__ */ jsx45(
|
|
4958
5228
|
PopoverContent,
|
|
4959
5229
|
{
|
|
4960
5230
|
"data-slot": "searchable-select-content",
|
|
4961
5231
|
className: cn("w-[var(--radix-popover-trigger-width)] p-0", className),
|
|
4962
5232
|
align: "start",
|
|
4963
5233
|
...props,
|
|
4964
|
-
children: /* @__PURE__ */
|
|
4965
|
-
ctx.searchable && /* @__PURE__ */
|
|
4966
|
-
/* @__PURE__ */
|
|
4967
|
-
/* @__PURE__ */
|
|
5234
|
+
children: /* @__PURE__ */ jsxs26(Command, { children: [
|
|
5235
|
+
ctx.searchable && /* @__PURE__ */ jsx45(CommandInput, { placeholder: ctx.searchPlaceholder }),
|
|
5236
|
+
/* @__PURE__ */ jsxs26(CommandList, { children: [
|
|
5237
|
+
/* @__PURE__ */ jsx45(CommandEmpty, { children: emptyText }),
|
|
4968
5238
|
children || renderAutoItems()
|
|
4969
5239
|
] })
|
|
4970
5240
|
] })
|
|
@@ -4991,7 +5261,7 @@ function SearchableSelectItem({
|
|
|
4991
5261
|
);
|
|
4992
5262
|
}
|
|
4993
5263
|
};
|
|
4994
|
-
return /* @__PURE__ */
|
|
5264
|
+
return /* @__PURE__ */ jsxs26(
|
|
4995
5265
|
CommandItem,
|
|
4996
5266
|
{
|
|
4997
5267
|
"data-slot": "searchable-select-item",
|
|
@@ -5004,18 +5274,18 @@ function SearchableSelectItem({
|
|
|
5004
5274
|
"data-disabled": disabled || void 0,
|
|
5005
5275
|
...props,
|
|
5006
5276
|
children: [
|
|
5007
|
-
ctx.mode === "multiple" && /* @__PURE__ */
|
|
5277
|
+
ctx.mode === "multiple" && /* @__PURE__ */ jsx45("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx45(
|
|
5008
5278
|
"span",
|
|
5009
5279
|
{
|
|
5010
5280
|
className: cn(
|
|
5011
5281
|
"size-4 rounded-sm border border-primary transition-colors",
|
|
5012
5282
|
isSelected ? "bg-primary text-primary-foreground" : "bg-transparent"
|
|
5013
5283
|
),
|
|
5014
|
-
children: isSelected && /* @__PURE__ */
|
|
5284
|
+
children: isSelected && /* @__PURE__ */ jsx45(CheckIcon4, { className: "size-4 p-0.5" })
|
|
5015
5285
|
}
|
|
5016
5286
|
) }),
|
|
5017
|
-
/* @__PURE__ */
|
|
5018
|
-
ctx.mode === "single" && isSelected && /* @__PURE__ */
|
|
5287
|
+
/* @__PURE__ */ jsx45("span", { className: "flex-1 truncate", children }),
|
|
5288
|
+
ctx.mode === "single" && isSelected && /* @__PURE__ */ jsx45("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx45(CheckIcon4, { className: "size-4" }) })
|
|
5019
5289
|
]
|
|
5020
5290
|
}
|
|
5021
5291
|
);
|
|
@@ -5024,7 +5294,7 @@ function SearchableSelectGroup({
|
|
|
5024
5294
|
className,
|
|
5025
5295
|
...props
|
|
5026
5296
|
}) {
|
|
5027
|
-
return /* @__PURE__ */
|
|
5297
|
+
return /* @__PURE__ */ jsx45(
|
|
5028
5298
|
CommandGroup,
|
|
5029
5299
|
{
|
|
5030
5300
|
"data-slot": "searchable-select-group",
|
|
@@ -5038,7 +5308,7 @@ function SearchableSelectEmpty({
|
|
|
5038
5308
|
children = "No results found.",
|
|
5039
5309
|
...props
|
|
5040
5310
|
}) {
|
|
5041
|
-
return /* @__PURE__ */
|
|
5311
|
+
return /* @__PURE__ */ jsx45(
|
|
5042
5312
|
CommandEmpty,
|
|
5043
5313
|
{
|
|
5044
5314
|
"data-slot": "searchable-select-empty",
|
|
@@ -5053,21 +5323,21 @@ function SearchableSelectEmpty({
|
|
|
5053
5323
|
import "react";
|
|
5054
5324
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5055
5325
|
import { CheckIcon as CheckIcon5, ChevronDownIcon as ChevronDownIcon4, ChevronUpIcon } from "lucide-react";
|
|
5056
|
-
import { jsx as
|
|
5326
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5057
5327
|
function Select({
|
|
5058
5328
|
...props
|
|
5059
5329
|
}) {
|
|
5060
|
-
return /* @__PURE__ */
|
|
5330
|
+
return /* @__PURE__ */ jsx46(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
5061
5331
|
}
|
|
5062
5332
|
function SelectGroup({
|
|
5063
5333
|
...props
|
|
5064
5334
|
}) {
|
|
5065
|
-
return /* @__PURE__ */
|
|
5335
|
+
return /* @__PURE__ */ jsx46(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
5066
5336
|
}
|
|
5067
5337
|
function SelectValue({
|
|
5068
5338
|
...props
|
|
5069
5339
|
}) {
|
|
5070
|
-
return /* @__PURE__ */
|
|
5340
|
+
return /* @__PURE__ */ jsx46(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
5071
5341
|
}
|
|
5072
5342
|
function SelectTrigger({
|
|
5073
5343
|
className,
|
|
@@ -5075,7 +5345,7 @@ function SelectTrigger({
|
|
|
5075
5345
|
children,
|
|
5076
5346
|
...props
|
|
5077
5347
|
}) {
|
|
5078
|
-
return /* @__PURE__ */
|
|
5348
|
+
return /* @__PURE__ */ jsxs27(
|
|
5079
5349
|
SelectPrimitive.Trigger,
|
|
5080
5350
|
{
|
|
5081
5351
|
"data-slot": "select-trigger",
|
|
@@ -5087,7 +5357,7 @@ function SelectTrigger({
|
|
|
5087
5357
|
...props,
|
|
5088
5358
|
children: [
|
|
5089
5359
|
children,
|
|
5090
|
-
/* @__PURE__ */
|
|
5360
|
+
/* @__PURE__ */ jsx46(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx46(ChevronDownIcon4, { className: "size-4 opacity-50" }) })
|
|
5091
5361
|
]
|
|
5092
5362
|
}
|
|
5093
5363
|
);
|
|
@@ -5098,7 +5368,7 @@ function SelectContent({
|
|
|
5098
5368
|
position = "popper",
|
|
5099
5369
|
...props
|
|
5100
5370
|
}) {
|
|
5101
|
-
return /* @__PURE__ */
|
|
5371
|
+
return /* @__PURE__ */ jsx46(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs27(
|
|
5102
5372
|
SelectPrimitive.Content,
|
|
5103
5373
|
{
|
|
5104
5374
|
"data-slot": "select-content",
|
|
@@ -5110,8 +5380,8 @@ function SelectContent({
|
|
|
5110
5380
|
position,
|
|
5111
5381
|
...props,
|
|
5112
5382
|
children: [
|
|
5113
|
-
/* @__PURE__ */
|
|
5114
|
-
/* @__PURE__ */
|
|
5383
|
+
/* @__PURE__ */ jsx46(SelectScrollUpButton, {}),
|
|
5384
|
+
/* @__PURE__ */ jsx46(
|
|
5115
5385
|
SelectPrimitive.Viewport,
|
|
5116
5386
|
{
|
|
5117
5387
|
className: cn(
|
|
@@ -5121,7 +5391,7 @@ function SelectContent({
|
|
|
5121
5391
|
children
|
|
5122
5392
|
}
|
|
5123
5393
|
),
|
|
5124
|
-
/* @__PURE__ */
|
|
5394
|
+
/* @__PURE__ */ jsx46(SelectScrollDownButton, {})
|
|
5125
5395
|
]
|
|
5126
5396
|
}
|
|
5127
5397
|
) });
|
|
@@ -5130,7 +5400,7 @@ function SelectLabel({
|
|
|
5130
5400
|
className,
|
|
5131
5401
|
...props
|
|
5132
5402
|
}) {
|
|
5133
|
-
return /* @__PURE__ */
|
|
5403
|
+
return /* @__PURE__ */ jsx46(
|
|
5134
5404
|
SelectPrimitive.Label,
|
|
5135
5405
|
{
|
|
5136
5406
|
"data-slot": "select-label",
|
|
@@ -5144,7 +5414,7 @@ function SelectItem({
|
|
|
5144
5414
|
children,
|
|
5145
5415
|
...props
|
|
5146
5416
|
}) {
|
|
5147
|
-
return /* @__PURE__ */
|
|
5417
|
+
return /* @__PURE__ */ jsxs27(
|
|
5148
5418
|
SelectPrimitive.Item,
|
|
5149
5419
|
{
|
|
5150
5420
|
"data-slot": "select-item",
|
|
@@ -5154,8 +5424,8 @@ function SelectItem({
|
|
|
5154
5424
|
),
|
|
5155
5425
|
...props,
|
|
5156
5426
|
children: [
|
|
5157
|
-
/* @__PURE__ */
|
|
5158
|
-
/* @__PURE__ */
|
|
5427
|
+
/* @__PURE__ */ jsx46("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx46(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx46(CheckIcon5, { className: "size-4" }) }) }),
|
|
5428
|
+
/* @__PURE__ */ jsx46(SelectPrimitive.ItemText, { children })
|
|
5159
5429
|
]
|
|
5160
5430
|
}
|
|
5161
5431
|
);
|
|
@@ -5164,7 +5434,7 @@ function SelectSeparator({
|
|
|
5164
5434
|
className,
|
|
5165
5435
|
...props
|
|
5166
5436
|
}) {
|
|
5167
|
-
return /* @__PURE__ */
|
|
5437
|
+
return /* @__PURE__ */ jsx46(
|
|
5168
5438
|
SelectPrimitive.Separator,
|
|
5169
5439
|
{
|
|
5170
5440
|
"data-slot": "select-separator",
|
|
@@ -5177,7 +5447,7 @@ function SelectScrollUpButton({
|
|
|
5177
5447
|
className,
|
|
5178
5448
|
...props
|
|
5179
5449
|
}) {
|
|
5180
|
-
return /* @__PURE__ */
|
|
5450
|
+
return /* @__PURE__ */ jsx46(
|
|
5181
5451
|
SelectPrimitive.ScrollUpButton,
|
|
5182
5452
|
{
|
|
5183
5453
|
"data-slot": "select-scroll-up-button",
|
|
@@ -5186,7 +5456,7 @@ function SelectScrollUpButton({
|
|
|
5186
5456
|
className
|
|
5187
5457
|
),
|
|
5188
5458
|
...props,
|
|
5189
|
-
children: /* @__PURE__ */
|
|
5459
|
+
children: /* @__PURE__ */ jsx46(ChevronUpIcon, { className: "size-4" })
|
|
5190
5460
|
}
|
|
5191
5461
|
);
|
|
5192
5462
|
}
|
|
@@ -5194,7 +5464,7 @@ function SelectScrollDownButton({
|
|
|
5194
5464
|
className,
|
|
5195
5465
|
...props
|
|
5196
5466
|
}) {
|
|
5197
|
-
return /* @__PURE__ */
|
|
5467
|
+
return /* @__PURE__ */ jsx46(
|
|
5198
5468
|
SelectPrimitive.ScrollDownButton,
|
|
5199
5469
|
{
|
|
5200
5470
|
"data-slot": "select-scroll-down-button",
|
|
@@ -5203,7 +5473,7 @@ function SelectScrollDownButton({
|
|
|
5203
5473
|
className
|
|
5204
5474
|
),
|
|
5205
5475
|
...props,
|
|
5206
|
-
children: /* @__PURE__ */
|
|
5476
|
+
children: /* @__PURE__ */ jsx46(ChevronDownIcon4, { className: "size-4" })
|
|
5207
5477
|
}
|
|
5208
5478
|
);
|
|
5209
5479
|
}
|
|
@@ -5211,14 +5481,14 @@ function SelectScrollDownButton({
|
|
|
5211
5481
|
// src/components/ui/separator.tsx
|
|
5212
5482
|
import "react";
|
|
5213
5483
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5214
|
-
import { jsx as
|
|
5484
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
5215
5485
|
function Separator5({
|
|
5216
5486
|
className,
|
|
5217
5487
|
orientation = "horizontal",
|
|
5218
5488
|
decorative = true,
|
|
5219
5489
|
...props
|
|
5220
5490
|
}) {
|
|
5221
|
-
return /* @__PURE__ */
|
|
5491
|
+
return /* @__PURE__ */ jsx47(
|
|
5222
5492
|
SeparatorPrimitive.Root,
|
|
5223
5493
|
{
|
|
5224
5494
|
"data-slot": "separator",
|
|
@@ -5237,30 +5507,30 @@ function Separator5({
|
|
|
5237
5507
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
5238
5508
|
import { XIcon as XIcon3 } from "lucide-react";
|
|
5239
5509
|
import "react";
|
|
5240
|
-
import { jsx as
|
|
5510
|
+
import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5241
5511
|
function Sheet({ ...props }) {
|
|
5242
|
-
return /* @__PURE__ */
|
|
5512
|
+
return /* @__PURE__ */ jsx48(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
5243
5513
|
}
|
|
5244
5514
|
function SheetTrigger({
|
|
5245
5515
|
...props
|
|
5246
5516
|
}) {
|
|
5247
|
-
return /* @__PURE__ */
|
|
5517
|
+
return /* @__PURE__ */ jsx48(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
5248
5518
|
}
|
|
5249
5519
|
function SheetClose({
|
|
5250
5520
|
...props
|
|
5251
5521
|
}) {
|
|
5252
|
-
return /* @__PURE__ */
|
|
5522
|
+
return /* @__PURE__ */ jsx48(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
5253
5523
|
}
|
|
5254
5524
|
function SheetPortal({
|
|
5255
5525
|
...props
|
|
5256
5526
|
}) {
|
|
5257
|
-
return /* @__PURE__ */
|
|
5527
|
+
return /* @__PURE__ */ jsx48(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
5258
5528
|
}
|
|
5259
5529
|
function SheetOverlay({
|
|
5260
5530
|
className,
|
|
5261
5531
|
...props
|
|
5262
5532
|
}) {
|
|
5263
|
-
return /* @__PURE__ */
|
|
5533
|
+
return /* @__PURE__ */ jsx48(
|
|
5264
5534
|
SheetPrimitive.Overlay,
|
|
5265
5535
|
{
|
|
5266
5536
|
"data-slot": "sheet-overlay",
|
|
@@ -5279,9 +5549,9 @@ function SheetContent({
|
|
|
5279
5549
|
showCloseButton = true,
|
|
5280
5550
|
...props
|
|
5281
5551
|
}) {
|
|
5282
|
-
return /* @__PURE__ */
|
|
5283
|
-
/* @__PURE__ */
|
|
5284
|
-
/* @__PURE__ */
|
|
5552
|
+
return /* @__PURE__ */ jsxs28(SheetPortal, { children: [
|
|
5553
|
+
/* @__PURE__ */ jsx48(SheetOverlay, {}),
|
|
5554
|
+
/* @__PURE__ */ jsxs28(
|
|
5285
5555
|
SheetPrimitive.Content,
|
|
5286
5556
|
{
|
|
5287
5557
|
"data-slot": "sheet-content",
|
|
@@ -5296,9 +5566,9 @@ function SheetContent({
|
|
|
5296
5566
|
...props,
|
|
5297
5567
|
children: [
|
|
5298
5568
|
children,
|
|
5299
|
-
showCloseButton && /* @__PURE__ */
|
|
5300
|
-
/* @__PURE__ */
|
|
5301
|
-
/* @__PURE__ */
|
|
5569
|
+
showCloseButton && /* @__PURE__ */ jsxs28(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
5570
|
+
/* @__PURE__ */ jsx48(XIcon3, { className: "size-4" }),
|
|
5571
|
+
/* @__PURE__ */ jsx48("span", { className: "sr-only", children: "Close" })
|
|
5302
5572
|
] })
|
|
5303
5573
|
]
|
|
5304
5574
|
}
|
|
@@ -5306,7 +5576,7 @@ function SheetContent({
|
|
|
5306
5576
|
] });
|
|
5307
5577
|
}
|
|
5308
5578
|
function SheetHeader({ className, ...props }) {
|
|
5309
|
-
return /* @__PURE__ */
|
|
5579
|
+
return /* @__PURE__ */ jsx48(
|
|
5310
5580
|
"div",
|
|
5311
5581
|
{
|
|
5312
5582
|
"data-slot": "sheet-header",
|
|
@@ -5316,7 +5586,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
5316
5586
|
);
|
|
5317
5587
|
}
|
|
5318
5588
|
function SheetFooter({ className, ...props }) {
|
|
5319
|
-
return /* @__PURE__ */
|
|
5589
|
+
return /* @__PURE__ */ jsx48(
|
|
5320
5590
|
"div",
|
|
5321
5591
|
{
|
|
5322
5592
|
"data-slot": "sheet-footer",
|
|
@@ -5329,7 +5599,7 @@ function SheetTitle({
|
|
|
5329
5599
|
className,
|
|
5330
5600
|
...props
|
|
5331
5601
|
}) {
|
|
5332
|
-
return /* @__PURE__ */
|
|
5602
|
+
return /* @__PURE__ */ jsx48(
|
|
5333
5603
|
SheetPrimitive.Title,
|
|
5334
5604
|
{
|
|
5335
5605
|
"data-slot": "sheet-title",
|
|
@@ -5342,7 +5612,7 @@ function SheetDescription({
|
|
|
5342
5612
|
className,
|
|
5343
5613
|
...props
|
|
5344
5614
|
}) {
|
|
5345
|
-
return /* @__PURE__ */
|
|
5615
|
+
return /* @__PURE__ */ jsx48(
|
|
5346
5616
|
SheetPrimitive.Description,
|
|
5347
5617
|
{
|
|
5348
5618
|
"data-slot": "sheet-description",
|
|
@@ -5354,14 +5624,14 @@ function SheetDescription({
|
|
|
5354
5624
|
|
|
5355
5625
|
// src/components/ui/sidebar.tsx
|
|
5356
5626
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
5357
|
-
import { cva as
|
|
5627
|
+
import { cva as cva12 } from "class-variance-authority";
|
|
5358
5628
|
import { PanelLeftIcon } from "lucide-react";
|
|
5359
|
-
import * as
|
|
5629
|
+
import * as React49 from "react";
|
|
5360
5630
|
|
|
5361
5631
|
// src/components/ui/skeleton.tsx
|
|
5362
|
-
import { jsx as
|
|
5632
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
5363
5633
|
function Skeleton({ className, ...props }) {
|
|
5364
|
-
return /* @__PURE__ */
|
|
5634
|
+
return /* @__PURE__ */ jsx49(
|
|
5365
5635
|
"div",
|
|
5366
5636
|
{
|
|
5367
5637
|
"data-slot": "skeleton",
|
|
@@ -5374,13 +5644,13 @@ function Skeleton({ className, ...props }) {
|
|
|
5374
5644
|
// src/components/ui/tooltip.tsx
|
|
5375
5645
|
import "react";
|
|
5376
5646
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
5377
|
-
import { X as
|
|
5378
|
-
import { jsx as
|
|
5647
|
+
import { X as X4 } from "lucide-react";
|
|
5648
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5379
5649
|
function TooltipProvider({
|
|
5380
5650
|
delayDuration = 0,
|
|
5381
5651
|
...props
|
|
5382
5652
|
}) {
|
|
5383
|
-
return /* @__PURE__ */
|
|
5653
|
+
return /* @__PURE__ */ jsx50(
|
|
5384
5654
|
TooltipPrimitive.Provider,
|
|
5385
5655
|
{
|
|
5386
5656
|
"data-slot": "tooltip-provider",
|
|
@@ -5392,12 +5662,12 @@ function TooltipProvider({
|
|
|
5392
5662
|
function Tooltip2({
|
|
5393
5663
|
...props
|
|
5394
5664
|
}) {
|
|
5395
|
-
return /* @__PURE__ */
|
|
5665
|
+
return /* @__PURE__ */ jsx50(TooltipProvider, { children: /* @__PURE__ */ jsx50(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
5396
5666
|
}
|
|
5397
5667
|
function TooltipTrigger({
|
|
5398
5668
|
...props
|
|
5399
5669
|
}) {
|
|
5400
|
-
return /* @__PURE__ */
|
|
5670
|
+
return /* @__PURE__ */ jsx50(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
5401
5671
|
}
|
|
5402
5672
|
function TooltipContent({
|
|
5403
5673
|
className,
|
|
@@ -5405,7 +5675,7 @@ function TooltipContent({
|
|
|
5405
5675
|
children,
|
|
5406
5676
|
...props
|
|
5407
5677
|
}) {
|
|
5408
|
-
return /* @__PURE__ */
|
|
5678
|
+
return /* @__PURE__ */ jsx50(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs29(
|
|
5409
5679
|
TooltipPrimitive.Content,
|
|
5410
5680
|
{
|
|
5411
5681
|
"data-slot": "tooltip-content",
|
|
@@ -5417,7 +5687,7 @@ function TooltipContent({
|
|
|
5417
5687
|
...props,
|
|
5418
5688
|
children: [
|
|
5419
5689
|
children,
|
|
5420
|
-
/* @__PURE__ */
|
|
5690
|
+
/* @__PURE__ */ jsx50(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
5421
5691
|
]
|
|
5422
5692
|
}
|
|
5423
5693
|
) });
|
|
@@ -5432,7 +5702,7 @@ function RichTooltipContent({
|
|
|
5432
5702
|
children,
|
|
5433
5703
|
...props
|
|
5434
5704
|
}) {
|
|
5435
|
-
return /* @__PURE__ */
|
|
5705
|
+
return /* @__PURE__ */ jsx50(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs29(
|
|
5436
5706
|
TooltipPrimitive.Content,
|
|
5437
5707
|
{
|
|
5438
5708
|
"data-slot": "rich-tooltip-content",
|
|
@@ -5443,24 +5713,24 @@ function RichTooltipContent({
|
|
|
5443
5713
|
),
|
|
5444
5714
|
...props,
|
|
5445
5715
|
children: [
|
|
5446
|
-
/* @__PURE__ */
|
|
5447
|
-
icon && /* @__PURE__ */
|
|
5448
|
-
/* @__PURE__ */
|
|
5449
|
-
heading && /* @__PURE__ */
|
|
5450
|
-
/* @__PURE__ */
|
|
5716
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-start gap-3 bg-gray-surface-dark rounded-[12px] px-3 py-4 text-sm leading-5 max-w-sm", children: [
|
|
5717
|
+
icon && /* @__PURE__ */ jsx50("span", { className: "flex items-center justify-center shrink-0 size-5 text-white [&_svg]:size-5", children: icon }),
|
|
5718
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex flex-1 flex-col gap-2 min-w-0", children: [
|
|
5719
|
+
heading && /* @__PURE__ */ jsx50("p", { className: "font-semibold text-sm leading-5 text-white", children: heading }),
|
|
5720
|
+
/* @__PURE__ */ jsx50("div", { className: "font-normal text-sm leading-5 text-white", children })
|
|
5451
5721
|
] }),
|
|
5452
|
-
dismissible && /* @__PURE__ */
|
|
5722
|
+
dismissible && /* @__PURE__ */ jsx50(
|
|
5453
5723
|
"button",
|
|
5454
5724
|
{
|
|
5455
5725
|
type: "button",
|
|
5456
5726
|
onClick: onDismiss,
|
|
5457
5727
|
className: "flex items-center justify-center shrink-0 size-5 text-white/70 hover:text-white transition-colors cursor-pointer",
|
|
5458
5728
|
"aria-label": "Dismiss",
|
|
5459
|
-
children: /* @__PURE__ */
|
|
5729
|
+
children: /* @__PURE__ */ jsx50(X4, { className: "size-2.5" })
|
|
5460
5730
|
}
|
|
5461
5731
|
)
|
|
5462
5732
|
] }),
|
|
5463
|
-
/* @__PURE__ */
|
|
5733
|
+
/* @__PURE__ */ jsx50(
|
|
5464
5734
|
TooltipPrimitive.Arrow,
|
|
5465
5735
|
{
|
|
5466
5736
|
width: 16,
|
|
@@ -5474,11 +5744,11 @@ function RichTooltipContent({
|
|
|
5474
5744
|
}
|
|
5475
5745
|
|
|
5476
5746
|
// src/hooks/use-mobile.ts
|
|
5477
|
-
import * as
|
|
5747
|
+
import * as React48 from "react";
|
|
5478
5748
|
var MOBILE_BREAKPOINT = 768;
|
|
5479
5749
|
function useIsMobile() {
|
|
5480
|
-
const [isMobile, setIsMobile] =
|
|
5481
|
-
|
|
5750
|
+
const [isMobile, setIsMobile] = React48.useState(void 0);
|
|
5751
|
+
React48.useEffect(() => {
|
|
5482
5752
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
5483
5753
|
const onChange = () => {
|
|
5484
5754
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -5491,16 +5761,16 @@ function useIsMobile() {
|
|
|
5491
5761
|
}
|
|
5492
5762
|
|
|
5493
5763
|
// src/components/ui/sidebar.tsx
|
|
5494
|
-
import { jsx as
|
|
5764
|
+
import { jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5495
5765
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
5496
5766
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
5497
5767
|
var SIDEBAR_WIDTH = "18rem";
|
|
5498
5768
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
5499
5769
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
5500
5770
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
5501
|
-
var SidebarContext =
|
|
5771
|
+
var SidebarContext = React49.createContext(null);
|
|
5502
5772
|
function useSidebar() {
|
|
5503
|
-
const context =
|
|
5773
|
+
const context = React49.useContext(SidebarContext);
|
|
5504
5774
|
if (!context) {
|
|
5505
5775
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
5506
5776
|
}
|
|
@@ -5516,10 +5786,10 @@ function SidebarProvider({
|
|
|
5516
5786
|
...props
|
|
5517
5787
|
}) {
|
|
5518
5788
|
const isMobile = useIsMobile();
|
|
5519
|
-
const [openMobile, setOpenMobile] =
|
|
5520
|
-
const [_open, _setOpen] =
|
|
5789
|
+
const [openMobile, setOpenMobile] = React49.useState(false);
|
|
5790
|
+
const [_open, _setOpen] = React49.useState(defaultOpen);
|
|
5521
5791
|
const open = openProp ?? _open;
|
|
5522
|
-
const setOpen =
|
|
5792
|
+
const setOpen = React49.useCallback(
|
|
5523
5793
|
(value) => {
|
|
5524
5794
|
const openState = typeof value === "function" ? value(open) : value;
|
|
5525
5795
|
if (setOpenProp) {
|
|
@@ -5531,10 +5801,10 @@ function SidebarProvider({
|
|
|
5531
5801
|
},
|
|
5532
5802
|
[setOpenProp, open]
|
|
5533
5803
|
);
|
|
5534
|
-
const toggleSidebar =
|
|
5804
|
+
const toggleSidebar = React49.useCallback(() => {
|
|
5535
5805
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
5536
5806
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
5537
|
-
|
|
5807
|
+
React49.useEffect(() => {
|
|
5538
5808
|
const handleKeyDown = (event) => {
|
|
5539
5809
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
5540
5810
|
event.preventDefault();
|
|
@@ -5545,7 +5815,7 @@ function SidebarProvider({
|
|
|
5545
5815
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
5546
5816
|
}, [toggleSidebar]);
|
|
5547
5817
|
const state = open ? "expanded" : "collapsed";
|
|
5548
|
-
const contextValue =
|
|
5818
|
+
const contextValue = React49.useMemo(
|
|
5549
5819
|
() => ({
|
|
5550
5820
|
state,
|
|
5551
5821
|
open,
|
|
@@ -5557,7 +5827,7 @@ function SidebarProvider({
|
|
|
5557
5827
|
}),
|
|
5558
5828
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
5559
5829
|
);
|
|
5560
|
-
return /* @__PURE__ */
|
|
5830
|
+
return /* @__PURE__ */ jsx51(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx51(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx51(
|
|
5561
5831
|
"div",
|
|
5562
5832
|
{
|
|
5563
5833
|
"data-slot": "sidebar-wrapper",
|
|
@@ -5585,7 +5855,7 @@ function Sidebar({
|
|
|
5585
5855
|
}) {
|
|
5586
5856
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
5587
5857
|
if (collapsible === "none") {
|
|
5588
|
-
return /* @__PURE__ */
|
|
5858
|
+
return /* @__PURE__ */ jsx51(
|
|
5589
5859
|
"div",
|
|
5590
5860
|
{
|
|
5591
5861
|
"data-slot": "sidebar",
|
|
@@ -5599,7 +5869,7 @@ function Sidebar({
|
|
|
5599
5869
|
);
|
|
5600
5870
|
}
|
|
5601
5871
|
if (isMobile) {
|
|
5602
|
-
return /* @__PURE__ */
|
|
5872
|
+
return /* @__PURE__ */ jsx51(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs30(
|
|
5603
5873
|
SheetContent,
|
|
5604
5874
|
{
|
|
5605
5875
|
"data-sidebar": "sidebar",
|
|
@@ -5611,16 +5881,16 @@ function Sidebar({
|
|
|
5611
5881
|
},
|
|
5612
5882
|
side,
|
|
5613
5883
|
children: [
|
|
5614
|
-
/* @__PURE__ */
|
|
5615
|
-
/* @__PURE__ */
|
|
5616
|
-
/* @__PURE__ */
|
|
5884
|
+
/* @__PURE__ */ jsxs30(SheetHeader, { className: "sr-only", children: [
|
|
5885
|
+
/* @__PURE__ */ jsx51(SheetTitle, { children: "Sidebar" }),
|
|
5886
|
+
/* @__PURE__ */ jsx51(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
5617
5887
|
] }),
|
|
5618
|
-
/* @__PURE__ */
|
|
5888
|
+
/* @__PURE__ */ jsx51("div", { className: "flex h-full w-full flex-col", children })
|
|
5619
5889
|
]
|
|
5620
5890
|
}
|
|
5621
5891
|
) });
|
|
5622
5892
|
}
|
|
5623
|
-
return /* @__PURE__ */
|
|
5893
|
+
return /* @__PURE__ */ jsxs30(
|
|
5624
5894
|
"div",
|
|
5625
5895
|
{
|
|
5626
5896
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -5630,7 +5900,7 @@ function Sidebar({
|
|
|
5630
5900
|
"data-side": side,
|
|
5631
5901
|
"data-slot": "sidebar",
|
|
5632
5902
|
children: [
|
|
5633
|
-
/* @__PURE__ */
|
|
5903
|
+
/* @__PURE__ */ jsx51(
|
|
5634
5904
|
"div",
|
|
5635
5905
|
{
|
|
5636
5906
|
"data-slot": "sidebar-gap",
|
|
@@ -5642,7 +5912,7 @@ function Sidebar({
|
|
|
5642
5912
|
)
|
|
5643
5913
|
}
|
|
5644
5914
|
),
|
|
5645
|
-
/* @__PURE__ */
|
|
5915
|
+
/* @__PURE__ */ jsx51(
|
|
5646
5916
|
"div",
|
|
5647
5917
|
{
|
|
5648
5918
|
"data-slot": "sidebar-container",
|
|
@@ -5654,7 +5924,7 @@ function Sidebar({
|
|
|
5654
5924
|
className
|
|
5655
5925
|
),
|
|
5656
5926
|
...props,
|
|
5657
|
-
children: /* @__PURE__ */
|
|
5927
|
+
children: /* @__PURE__ */ jsx51(
|
|
5658
5928
|
"div",
|
|
5659
5929
|
{
|
|
5660
5930
|
"data-sidebar": "sidebar",
|
|
@@ -5675,7 +5945,7 @@ function SidebarTrigger({
|
|
|
5675
5945
|
...props
|
|
5676
5946
|
}) {
|
|
5677
5947
|
const { toggleSidebar } = useSidebar();
|
|
5678
|
-
return /* @__PURE__ */
|
|
5948
|
+
return /* @__PURE__ */ jsxs30(
|
|
5679
5949
|
Button,
|
|
5680
5950
|
{
|
|
5681
5951
|
"data-sidebar": "trigger",
|
|
@@ -5689,15 +5959,15 @@ function SidebarTrigger({
|
|
|
5689
5959
|
},
|
|
5690
5960
|
...props,
|
|
5691
5961
|
children: [
|
|
5692
|
-
/* @__PURE__ */
|
|
5693
|
-
/* @__PURE__ */
|
|
5962
|
+
/* @__PURE__ */ jsx51(PanelLeftIcon, {}),
|
|
5963
|
+
/* @__PURE__ */ jsx51("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
5694
5964
|
]
|
|
5695
5965
|
}
|
|
5696
5966
|
);
|
|
5697
5967
|
}
|
|
5698
5968
|
function SidebarRail({ className, ...props }) {
|
|
5699
5969
|
const { toggleSidebar } = useSidebar();
|
|
5700
|
-
return /* @__PURE__ */
|
|
5970
|
+
return /* @__PURE__ */ jsx51(
|
|
5701
5971
|
"button",
|
|
5702
5972
|
{
|
|
5703
5973
|
"data-sidebar": "rail",
|
|
@@ -5720,7 +5990,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
5720
5990
|
);
|
|
5721
5991
|
}
|
|
5722
5992
|
function SidebarInset({ className, ...props }) {
|
|
5723
|
-
return /* @__PURE__ */
|
|
5993
|
+
return /* @__PURE__ */ jsx51(
|
|
5724
5994
|
"main",
|
|
5725
5995
|
{
|
|
5726
5996
|
"data-slot": "sidebar-inset",
|
|
@@ -5737,7 +6007,7 @@ function SidebarInput({
|
|
|
5737
6007
|
className,
|
|
5738
6008
|
...props
|
|
5739
6009
|
}) {
|
|
5740
|
-
return /* @__PURE__ */
|
|
6010
|
+
return /* @__PURE__ */ jsx51(
|
|
5741
6011
|
Input,
|
|
5742
6012
|
{
|
|
5743
6013
|
"data-slot": "sidebar-input",
|
|
@@ -5748,7 +6018,7 @@ function SidebarInput({
|
|
|
5748
6018
|
);
|
|
5749
6019
|
}
|
|
5750
6020
|
function SidebarHeader({ className, ...props }) {
|
|
5751
|
-
return /* @__PURE__ */
|
|
6021
|
+
return /* @__PURE__ */ jsx51(
|
|
5752
6022
|
"div",
|
|
5753
6023
|
{
|
|
5754
6024
|
"data-slot": "sidebar-header",
|
|
@@ -5759,7 +6029,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
5759
6029
|
);
|
|
5760
6030
|
}
|
|
5761
6031
|
function SidebarFooter({ className, ...props }) {
|
|
5762
|
-
return /* @__PURE__ */
|
|
6032
|
+
return /* @__PURE__ */ jsx51(
|
|
5763
6033
|
"div",
|
|
5764
6034
|
{
|
|
5765
6035
|
"data-slot": "sidebar-footer",
|
|
@@ -5773,7 +6043,7 @@ function SidebarSeparator({
|
|
|
5773
6043
|
className,
|
|
5774
6044
|
...props
|
|
5775
6045
|
}) {
|
|
5776
|
-
return /* @__PURE__ */
|
|
6046
|
+
return /* @__PURE__ */ jsx51(
|
|
5777
6047
|
Separator5,
|
|
5778
6048
|
{
|
|
5779
6049
|
"data-slot": "sidebar-separator",
|
|
@@ -5784,7 +6054,7 @@ function SidebarSeparator({
|
|
|
5784
6054
|
);
|
|
5785
6055
|
}
|
|
5786
6056
|
function SidebarContent({ className, ...props }) {
|
|
5787
|
-
return /* @__PURE__ */
|
|
6057
|
+
return /* @__PURE__ */ jsx51(
|
|
5788
6058
|
"div",
|
|
5789
6059
|
{
|
|
5790
6060
|
"data-slot": "sidebar-content",
|
|
@@ -5798,7 +6068,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
5798
6068
|
);
|
|
5799
6069
|
}
|
|
5800
6070
|
function SidebarGroup({ className, ...props }) {
|
|
5801
|
-
return /* @__PURE__ */
|
|
6071
|
+
return /* @__PURE__ */ jsx51(
|
|
5802
6072
|
"div",
|
|
5803
6073
|
{
|
|
5804
6074
|
"data-slot": "sidebar-group",
|
|
@@ -5814,7 +6084,7 @@ function SidebarGroupLabel({
|
|
|
5814
6084
|
...props
|
|
5815
6085
|
}) {
|
|
5816
6086
|
const Comp = asChild ? Slot6 : "div";
|
|
5817
|
-
return /* @__PURE__ */
|
|
6087
|
+
return /* @__PURE__ */ jsx51(
|
|
5818
6088
|
Comp,
|
|
5819
6089
|
{
|
|
5820
6090
|
"data-slot": "sidebar-group-label",
|
|
@@ -5834,7 +6104,7 @@ function SidebarGroupAction({
|
|
|
5834
6104
|
...props
|
|
5835
6105
|
}) {
|
|
5836
6106
|
const Comp = asChild ? Slot6 : "button";
|
|
5837
|
-
return /* @__PURE__ */
|
|
6107
|
+
return /* @__PURE__ */ jsx51(
|
|
5838
6108
|
Comp,
|
|
5839
6109
|
{
|
|
5840
6110
|
"data-slot": "sidebar-group-action",
|
|
@@ -5854,7 +6124,7 @@ function SidebarGroupContent({
|
|
|
5854
6124
|
className,
|
|
5855
6125
|
...props
|
|
5856
6126
|
}) {
|
|
5857
|
-
return /* @__PURE__ */
|
|
6127
|
+
return /* @__PURE__ */ jsx51(
|
|
5858
6128
|
"div",
|
|
5859
6129
|
{
|
|
5860
6130
|
"data-slot": "sidebar-group-content",
|
|
@@ -5865,7 +6135,7 @@ function SidebarGroupContent({
|
|
|
5865
6135
|
);
|
|
5866
6136
|
}
|
|
5867
6137
|
function SidebarMenu({ className, ...props }) {
|
|
5868
|
-
return /* @__PURE__ */
|
|
6138
|
+
return /* @__PURE__ */ jsx51(
|
|
5869
6139
|
"ul",
|
|
5870
6140
|
{
|
|
5871
6141
|
"data-slot": "sidebar-menu",
|
|
@@ -5876,7 +6146,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
5876
6146
|
);
|
|
5877
6147
|
}
|
|
5878
6148
|
function SidebarMenuItem({ className, ...props }) {
|
|
5879
|
-
return /* @__PURE__ */
|
|
6149
|
+
return /* @__PURE__ */ jsx51(
|
|
5880
6150
|
"li",
|
|
5881
6151
|
{
|
|
5882
6152
|
"data-slot": "sidebar-menu-item",
|
|
@@ -5886,7 +6156,7 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
5886
6156
|
}
|
|
5887
6157
|
);
|
|
5888
6158
|
}
|
|
5889
|
-
var sidebarMenuButtonVariants =
|
|
6159
|
+
var sidebarMenuButtonVariants = cva12(
|
|
5890
6160
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
5891
6161
|
{
|
|
5892
6162
|
variants: {
|
|
@@ -5917,7 +6187,7 @@ function SidebarMenuButton({
|
|
|
5917
6187
|
}) {
|
|
5918
6188
|
const Comp = asChild ? Slot6 : "button";
|
|
5919
6189
|
const { isMobile, state } = useSidebar();
|
|
5920
|
-
const button = /* @__PURE__ */
|
|
6190
|
+
const button = /* @__PURE__ */ jsx51(
|
|
5921
6191
|
Comp,
|
|
5922
6192
|
{
|
|
5923
6193
|
"data-slot": "sidebar-menu-button",
|
|
@@ -5936,9 +6206,9 @@ function SidebarMenuButton({
|
|
|
5936
6206
|
children: tooltip
|
|
5937
6207
|
};
|
|
5938
6208
|
}
|
|
5939
|
-
return /* @__PURE__ */
|
|
5940
|
-
/* @__PURE__ */
|
|
5941
|
-
/* @__PURE__ */
|
|
6209
|
+
return /* @__PURE__ */ jsxs30(Tooltip2, { children: [
|
|
6210
|
+
/* @__PURE__ */ jsx51(TooltipTrigger, { asChild: true, children: button }),
|
|
6211
|
+
/* @__PURE__ */ jsx51(
|
|
5942
6212
|
TooltipContent,
|
|
5943
6213
|
{
|
|
5944
6214
|
side: "right",
|
|
@@ -5956,7 +6226,7 @@ function SidebarMenuAction({
|
|
|
5956
6226
|
...props
|
|
5957
6227
|
}) {
|
|
5958
6228
|
const Comp = asChild ? Slot6 : "button";
|
|
5959
|
-
return /* @__PURE__ */
|
|
6229
|
+
return /* @__PURE__ */ jsx51(
|
|
5960
6230
|
Comp,
|
|
5961
6231
|
{
|
|
5962
6232
|
"data-slot": "sidebar-menu-action",
|
|
@@ -5980,7 +6250,7 @@ function SidebarMenuBadge({
|
|
|
5980
6250
|
className,
|
|
5981
6251
|
...props
|
|
5982
6252
|
}) {
|
|
5983
|
-
return /* @__PURE__ */
|
|
6253
|
+
return /* @__PURE__ */ jsx51(
|
|
5984
6254
|
"div",
|
|
5985
6255
|
{
|
|
5986
6256
|
"data-slot": "sidebar-menu-badge",
|
|
@@ -6003,10 +6273,10 @@ function SidebarMenuSkeleton({
|
|
|
6003
6273
|
showIcon = false,
|
|
6004
6274
|
...props
|
|
6005
6275
|
}) {
|
|
6006
|
-
const width =
|
|
6276
|
+
const width = React49.useMemo(() => {
|
|
6007
6277
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
6008
6278
|
}, []);
|
|
6009
|
-
return /* @__PURE__ */
|
|
6279
|
+
return /* @__PURE__ */ jsxs30(
|
|
6010
6280
|
"div",
|
|
6011
6281
|
{
|
|
6012
6282
|
"data-slot": "sidebar-menu-skeleton",
|
|
@@ -6014,14 +6284,14 @@ function SidebarMenuSkeleton({
|
|
|
6014
6284
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
6015
6285
|
...props,
|
|
6016
6286
|
children: [
|
|
6017
|
-
showIcon && /* @__PURE__ */
|
|
6287
|
+
showIcon && /* @__PURE__ */ jsx51(
|
|
6018
6288
|
Skeleton,
|
|
6019
6289
|
{
|
|
6020
6290
|
className: "size-4 rounded-md",
|
|
6021
6291
|
"data-sidebar": "menu-skeleton-icon"
|
|
6022
6292
|
}
|
|
6023
6293
|
),
|
|
6024
|
-
/* @__PURE__ */
|
|
6294
|
+
/* @__PURE__ */ jsx51(
|
|
6025
6295
|
Skeleton,
|
|
6026
6296
|
{
|
|
6027
6297
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
@@ -6036,7 +6306,7 @@ function SidebarMenuSkeleton({
|
|
|
6036
6306
|
);
|
|
6037
6307
|
}
|
|
6038
6308
|
function SidebarMenuSub({ className, ...props }) {
|
|
6039
|
-
return /* @__PURE__ */
|
|
6309
|
+
return /* @__PURE__ */ jsx51(
|
|
6040
6310
|
"ul",
|
|
6041
6311
|
{
|
|
6042
6312
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -6054,7 +6324,7 @@ function SidebarMenuSubItem({
|
|
|
6054
6324
|
className,
|
|
6055
6325
|
...props
|
|
6056
6326
|
}) {
|
|
6057
|
-
return /* @__PURE__ */
|
|
6327
|
+
return /* @__PURE__ */ jsx51(
|
|
6058
6328
|
"li",
|
|
6059
6329
|
{
|
|
6060
6330
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -6072,7 +6342,7 @@ function SidebarMenuSubButton({
|
|
|
6072
6342
|
...props
|
|
6073
6343
|
}) {
|
|
6074
6344
|
const Comp = asChild ? Slot6 : "a";
|
|
6075
|
-
return /* @__PURE__ */
|
|
6345
|
+
return /* @__PURE__ */ jsx51(
|
|
6076
6346
|
Comp,
|
|
6077
6347
|
{
|
|
6078
6348
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -6093,9 +6363,9 @@ function SidebarMenuSubButton({
|
|
|
6093
6363
|
}
|
|
6094
6364
|
|
|
6095
6365
|
// src/components/ui/slider.tsx
|
|
6096
|
-
import * as
|
|
6366
|
+
import * as React50 from "react";
|
|
6097
6367
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
6098
|
-
import { jsx as
|
|
6368
|
+
import { jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6099
6369
|
function Slider({
|
|
6100
6370
|
className,
|
|
6101
6371
|
defaultValue,
|
|
@@ -6104,11 +6374,11 @@ function Slider({
|
|
|
6104
6374
|
max = 100,
|
|
6105
6375
|
...props
|
|
6106
6376
|
}) {
|
|
6107
|
-
const _values =
|
|
6377
|
+
const _values = React50.useMemo(
|
|
6108
6378
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
6109
6379
|
[value, defaultValue, min, max]
|
|
6110
6380
|
);
|
|
6111
|
-
return /* @__PURE__ */
|
|
6381
|
+
return /* @__PURE__ */ jsxs31(
|
|
6112
6382
|
SliderPrimitive.Root,
|
|
6113
6383
|
{
|
|
6114
6384
|
"data-slot": "slider",
|
|
@@ -6122,14 +6392,14 @@ function Slider({
|
|
|
6122
6392
|
),
|
|
6123
6393
|
...props,
|
|
6124
6394
|
children: [
|
|
6125
|
-
/* @__PURE__ */
|
|
6395
|
+
/* @__PURE__ */ jsx52(
|
|
6126
6396
|
SliderPrimitive.Track,
|
|
6127
6397
|
{
|
|
6128
6398
|
"data-slot": "slider-track",
|
|
6129
6399
|
className: cn(
|
|
6130
6400
|
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
6131
6401
|
),
|
|
6132
|
-
children: /* @__PURE__ */
|
|
6402
|
+
children: /* @__PURE__ */ jsx52(
|
|
6133
6403
|
SliderPrimitive.Range,
|
|
6134
6404
|
{
|
|
6135
6405
|
"data-slot": "slider-range",
|
|
@@ -6140,7 +6410,7 @@ function Slider({
|
|
|
6140
6410
|
)
|
|
6141
6411
|
}
|
|
6142
6412
|
),
|
|
6143
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */
|
|
6413
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx52(
|
|
6144
6414
|
SliderPrimitive.Thumb,
|
|
6145
6415
|
{
|
|
6146
6416
|
"data-slot": "slider-thumb",
|
|
@@ -6157,7 +6427,7 @@ function Slider({
|
|
|
6157
6427
|
import "react";
|
|
6158
6428
|
|
|
6159
6429
|
// src/components/ui/useMediaQuery.ts
|
|
6160
|
-
import { useEffect as useEffect8, useState as
|
|
6430
|
+
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
6161
6431
|
function useMediaQuery(query) {
|
|
6162
6432
|
const getMatches = (query2) => {
|
|
6163
6433
|
if (typeof window !== "undefined") {
|
|
@@ -6165,7 +6435,7 @@ function useMediaQuery(query) {
|
|
|
6165
6435
|
}
|
|
6166
6436
|
return false;
|
|
6167
6437
|
};
|
|
6168
|
-
const [matches, setMatches] =
|
|
6438
|
+
const [matches, setMatches] = useState10(getMatches(query));
|
|
6169
6439
|
function handleChange() {
|
|
6170
6440
|
setMatches(getMatches(query));
|
|
6171
6441
|
}
|
|
@@ -6189,10 +6459,10 @@ function useMediaQuery(query) {
|
|
|
6189
6459
|
}
|
|
6190
6460
|
|
|
6191
6461
|
// src/components/ui/smart-dialog-drawer.tsx
|
|
6192
|
-
import { Fragment as Fragment3, jsx as
|
|
6462
|
+
import { Fragment as Fragment3, jsx as jsx53 } from "react/jsx-runtime";
|
|
6193
6463
|
var SmartDialog = ({ children, ...props }) => {
|
|
6194
6464
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
6195
|
-
return isMobile ? /* @__PURE__ */
|
|
6465
|
+
return isMobile ? /* @__PURE__ */ jsx53(Drawer, { ...props, children }) : /* @__PURE__ */ jsx53(Dialog, { ...props, children });
|
|
6196
6466
|
};
|
|
6197
6467
|
var SmartDialogContent = ({
|
|
6198
6468
|
children,
|
|
@@ -6202,14 +6472,14 @@ var SmartDialogContent = ({
|
|
|
6202
6472
|
...props
|
|
6203
6473
|
}) => {
|
|
6204
6474
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
6205
|
-
return isMobile ? /* @__PURE__ */
|
|
6475
|
+
return isMobile ? /* @__PURE__ */ jsx53(
|
|
6206
6476
|
DrawerContent,
|
|
6207
6477
|
{
|
|
6208
6478
|
...props,
|
|
6209
6479
|
withCloseButton: withCloseButton ?? showCloseButton ?? true,
|
|
6210
6480
|
children
|
|
6211
6481
|
}
|
|
6212
|
-
) : /* @__PURE__ */
|
|
6482
|
+
) : /* @__PURE__ */ jsx53(
|
|
6213
6483
|
DialogContent,
|
|
6214
6484
|
{
|
|
6215
6485
|
...props,
|
|
@@ -6224,39 +6494,39 @@ var SmartDialogDescription = ({
|
|
|
6224
6494
|
...props
|
|
6225
6495
|
}) => {
|
|
6226
6496
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
6227
|
-
return isMobile ? /* @__PURE__ */
|
|
6497
|
+
return isMobile ? /* @__PURE__ */ jsx53(DrawerDescription, { ...props, children }) : /* @__PURE__ */ jsx53(DialogDescription, { ...props, children });
|
|
6228
6498
|
};
|
|
6229
6499
|
var SmartDialogHeader = ({ children, ...props }) => {
|
|
6230
6500
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
6231
|
-
return isMobile ? /* @__PURE__ */
|
|
6501
|
+
return isMobile ? /* @__PURE__ */ jsx53(DrawerHeader, { ...props, children }) : /* @__PURE__ */ jsx53(DialogHeader, { ...props, children });
|
|
6232
6502
|
};
|
|
6233
6503
|
var SmartDialogTitle = ({ children, ...props }) => {
|
|
6234
6504
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
6235
|
-
return isMobile ? /* @__PURE__ */
|
|
6505
|
+
return isMobile ? /* @__PURE__ */ jsx53(DrawerTitle, { ...props, children }) : /* @__PURE__ */ jsx53(DialogTitle, { ...props, children });
|
|
6236
6506
|
};
|
|
6237
6507
|
var SmartDialogTrigger = ({
|
|
6238
6508
|
children,
|
|
6239
6509
|
...props
|
|
6240
6510
|
}) => {
|
|
6241
6511
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
6242
|
-
return isMobile ? /* @__PURE__ */
|
|
6512
|
+
return isMobile ? /* @__PURE__ */ jsx53(DrawerTrigger, { ...props, children }) : /* @__PURE__ */ jsx53(DialogTrigger, { ...props, children });
|
|
6243
6513
|
};
|
|
6244
6514
|
var SmartDialogFooter = ({ children, ...props }) => {
|
|
6245
6515
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
6246
|
-
return isMobile ? /* @__PURE__ */
|
|
6516
|
+
return isMobile ? /* @__PURE__ */ jsx53(DrawerFooter, { ...props, children }) : /* @__PURE__ */ jsx53(DialogFooter, { ...props, children });
|
|
6247
6517
|
};
|
|
6248
6518
|
var SmartDialogClose = ({ children, ...props }) => {
|
|
6249
6519
|
const isMobile = useMediaQuery("(max-width: 600px)");
|
|
6250
|
-
return isMobile ? /* @__PURE__ */
|
|
6520
|
+
return isMobile ? /* @__PURE__ */ jsx53(Fragment3, { children: /* @__PURE__ */ jsx53(DrawerClose, { ...props, children }) }) : /* @__PURE__ */ jsx53(DialogClose, { ...props, children });
|
|
6251
6521
|
};
|
|
6252
6522
|
|
|
6253
6523
|
// src/components/ui/sonner.tsx
|
|
6254
6524
|
import { useTheme } from "next-themes";
|
|
6255
6525
|
import { Toaster as Sonner } from "sonner";
|
|
6256
|
-
import { jsx as
|
|
6526
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
6257
6527
|
var Toaster = ({ ...props }) => {
|
|
6258
6528
|
const { theme = "system" } = useTheme();
|
|
6259
|
-
return /* @__PURE__ */
|
|
6529
|
+
return /* @__PURE__ */ jsx54(
|
|
6260
6530
|
Sonner,
|
|
6261
6531
|
{
|
|
6262
6532
|
theme,
|
|
@@ -6274,12 +6544,12 @@ var Toaster = ({ ...props }) => {
|
|
|
6274
6544
|
// src/components/ui/switch.tsx
|
|
6275
6545
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
6276
6546
|
import "react";
|
|
6277
|
-
import { jsx as
|
|
6547
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
6278
6548
|
function Switch({
|
|
6279
6549
|
className,
|
|
6280
6550
|
...props
|
|
6281
6551
|
}) {
|
|
6282
|
-
return /* @__PURE__ */
|
|
6552
|
+
return /* @__PURE__ */ jsx55(
|
|
6283
6553
|
SwitchPrimitive.Root,
|
|
6284
6554
|
{
|
|
6285
6555
|
"data-slot": "switch",
|
|
@@ -6288,7 +6558,7 @@ function Switch({
|
|
|
6288
6558
|
className
|
|
6289
6559
|
),
|
|
6290
6560
|
...props,
|
|
6291
|
-
children: /* @__PURE__ */
|
|
6561
|
+
children: /* @__PURE__ */ jsx55(
|
|
6292
6562
|
SwitchPrimitive.Thumb,
|
|
6293
6563
|
{
|
|
6294
6564
|
"data-slot": "switch-thumb",
|
|
@@ -6303,14 +6573,14 @@ function Switch({
|
|
|
6303
6573
|
|
|
6304
6574
|
// src/components/ui/table.tsx
|
|
6305
6575
|
import "react";
|
|
6306
|
-
import { jsx as
|
|
6576
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
6307
6577
|
function Table({ className, ...props }) {
|
|
6308
|
-
return /* @__PURE__ */
|
|
6578
|
+
return /* @__PURE__ */ jsx56(
|
|
6309
6579
|
"div",
|
|
6310
6580
|
{
|
|
6311
6581
|
"data-slot": "table-container",
|
|
6312
6582
|
className: "relative w-full overflow-x-auto",
|
|
6313
|
-
children: /* @__PURE__ */
|
|
6583
|
+
children: /* @__PURE__ */ jsx56(
|
|
6314
6584
|
"table",
|
|
6315
6585
|
{
|
|
6316
6586
|
"data-slot": "table",
|
|
@@ -6322,7 +6592,7 @@ function Table({ className, ...props }) {
|
|
|
6322
6592
|
);
|
|
6323
6593
|
}
|
|
6324
6594
|
function TableHeader({ className, ...props }) {
|
|
6325
|
-
return /* @__PURE__ */
|
|
6595
|
+
return /* @__PURE__ */ jsx56(
|
|
6326
6596
|
"thead",
|
|
6327
6597
|
{
|
|
6328
6598
|
"data-slot": "table-header",
|
|
@@ -6332,7 +6602,7 @@ function TableHeader({ className, ...props }) {
|
|
|
6332
6602
|
);
|
|
6333
6603
|
}
|
|
6334
6604
|
function TableBody({ className, ...props }) {
|
|
6335
|
-
return /* @__PURE__ */
|
|
6605
|
+
return /* @__PURE__ */ jsx56(
|
|
6336
6606
|
"tbody",
|
|
6337
6607
|
{
|
|
6338
6608
|
"data-slot": "table-body",
|
|
@@ -6342,7 +6612,7 @@ function TableBody({ className, ...props }) {
|
|
|
6342
6612
|
);
|
|
6343
6613
|
}
|
|
6344
6614
|
function TableFooter({ className, ...props }) {
|
|
6345
|
-
return /* @__PURE__ */
|
|
6615
|
+
return /* @__PURE__ */ jsx56(
|
|
6346
6616
|
"tfoot",
|
|
6347
6617
|
{
|
|
6348
6618
|
"data-slot": "table-footer",
|
|
@@ -6355,7 +6625,7 @@ function TableFooter({ className, ...props }) {
|
|
|
6355
6625
|
);
|
|
6356
6626
|
}
|
|
6357
6627
|
function TableRow({ className, ...props }) {
|
|
6358
|
-
return /* @__PURE__ */
|
|
6628
|
+
return /* @__PURE__ */ jsx56(
|
|
6359
6629
|
"tr",
|
|
6360
6630
|
{
|
|
6361
6631
|
"data-slot": "table-row",
|
|
@@ -6368,7 +6638,7 @@ function TableRow({ className, ...props }) {
|
|
|
6368
6638
|
);
|
|
6369
6639
|
}
|
|
6370
6640
|
function TableHead({ className, ...props }) {
|
|
6371
|
-
return /* @__PURE__ */
|
|
6641
|
+
return /* @__PURE__ */ jsx56(
|
|
6372
6642
|
"th",
|
|
6373
6643
|
{
|
|
6374
6644
|
"data-slot": "table-head",
|
|
@@ -6381,7 +6651,7 @@ function TableHead({ className, ...props }) {
|
|
|
6381
6651
|
);
|
|
6382
6652
|
}
|
|
6383
6653
|
function TableCell({ className, ...props }) {
|
|
6384
|
-
return /* @__PURE__ */
|
|
6654
|
+
return /* @__PURE__ */ jsx56(
|
|
6385
6655
|
"td",
|
|
6386
6656
|
{
|
|
6387
6657
|
"data-slot": "table-cell",
|
|
@@ -6397,7 +6667,7 @@ function TableCaption({
|
|
|
6397
6667
|
className,
|
|
6398
6668
|
...props
|
|
6399
6669
|
}) {
|
|
6400
|
-
return /* @__PURE__ */
|
|
6670
|
+
return /* @__PURE__ */ jsx56(
|
|
6401
6671
|
"caption",
|
|
6402
6672
|
{
|
|
6403
6673
|
"data-slot": "table-caption",
|
|
@@ -6409,19 +6679,19 @@ function TableCaption({
|
|
|
6409
6679
|
|
|
6410
6680
|
// src/components/ui/tabs.tsx
|
|
6411
6681
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
6412
|
-
import { cva as
|
|
6413
|
-
import * as
|
|
6414
|
-
import { jsx as
|
|
6415
|
-
var TabsContext =
|
|
6682
|
+
import { cva as cva13 } from "class-variance-authority";
|
|
6683
|
+
import * as React54 from "react";
|
|
6684
|
+
import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6685
|
+
var TabsContext = React54.createContext({
|
|
6416
6686
|
orientation: "horizontal"
|
|
6417
6687
|
});
|
|
6418
6688
|
function useTabIndicator(listRef, orientation) {
|
|
6419
|
-
const [style, setStyle] =
|
|
6689
|
+
const [style, setStyle] = React54.useState({
|
|
6420
6690
|
position: "absolute",
|
|
6421
6691
|
opacity: 0
|
|
6422
6692
|
});
|
|
6423
|
-
const isFirstMeasurement =
|
|
6424
|
-
const measure =
|
|
6693
|
+
const isFirstMeasurement = React54.useRef(true);
|
|
6694
|
+
const measure = React54.useCallback(() => {
|
|
6425
6695
|
const list = listRef.current;
|
|
6426
6696
|
if (!list) return;
|
|
6427
6697
|
requestAnimationFrame(() => {
|
|
@@ -6460,7 +6730,7 @@ function useTabIndicator(listRef, orientation) {
|
|
|
6460
6730
|
}
|
|
6461
6731
|
});
|
|
6462
6732
|
}, [listRef, orientation]);
|
|
6463
|
-
|
|
6733
|
+
React54.useEffect(() => {
|
|
6464
6734
|
const list = listRef.current;
|
|
6465
6735
|
if (!list) return;
|
|
6466
6736
|
measure();
|
|
@@ -6489,11 +6759,11 @@ function Tabs({
|
|
|
6489
6759
|
orientation = "horizontal",
|
|
6490
6760
|
...props
|
|
6491
6761
|
}) {
|
|
6492
|
-
const ctx =
|
|
6762
|
+
const ctx = React54.useMemo(
|
|
6493
6763
|
() => ({ orientation: orientation ?? "horizontal" }),
|
|
6494
6764
|
[orientation]
|
|
6495
6765
|
);
|
|
6496
|
-
return /* @__PURE__ */
|
|
6766
|
+
return /* @__PURE__ */ jsx57(TabsContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx57(
|
|
6497
6767
|
TabsPrimitive.Root,
|
|
6498
6768
|
{
|
|
6499
6769
|
"data-slot": "tabs",
|
|
@@ -6510,10 +6780,10 @@ function TabsList({
|
|
|
6510
6780
|
className,
|
|
6511
6781
|
...props
|
|
6512
6782
|
}) {
|
|
6513
|
-
const listRef =
|
|
6514
|
-
const { orientation } =
|
|
6783
|
+
const listRef = React54.useRef(null);
|
|
6784
|
+
const { orientation } = React54.useContext(TabsContext);
|
|
6515
6785
|
const { style: indicatorStyle } = useTabIndicator(listRef, orientation);
|
|
6516
|
-
return /* @__PURE__ */
|
|
6786
|
+
return /* @__PURE__ */ jsxs32(
|
|
6517
6787
|
TabsPrimitive.List,
|
|
6518
6788
|
{
|
|
6519
6789
|
ref: listRef,
|
|
@@ -6526,12 +6796,12 @@ function TabsList({
|
|
|
6526
6796
|
...props,
|
|
6527
6797
|
children: [
|
|
6528
6798
|
props.children,
|
|
6529
|
-
/* @__PURE__ */
|
|
6799
|
+
/* @__PURE__ */ jsx57("span", { "data-slot": "tabs-indicator", style: indicatorStyle })
|
|
6530
6800
|
]
|
|
6531
6801
|
}
|
|
6532
6802
|
);
|
|
6533
6803
|
}
|
|
6534
|
-
var tabsTriggerVariants =
|
|
6804
|
+
var tabsTriggerVariants = cva13(
|
|
6535
6805
|
"cursor-pointer inline-flex shrink-0 items-center justify-center font-sans font-medium whitespace-nowrap transition-[color,box-shadow] text-vibrant-text-details data-[state=active]:font-semibold data-[state=active]:text-vibrant-text-heading disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4",
|
|
6536
6806
|
{
|
|
6537
6807
|
variants: {
|
|
@@ -6560,14 +6830,14 @@ function TabsTrigger({
|
|
|
6560
6830
|
children,
|
|
6561
6831
|
...props
|
|
6562
6832
|
}) {
|
|
6563
|
-
const { orientation } =
|
|
6564
|
-
return /* @__PURE__ */
|
|
6833
|
+
const { orientation } = React54.useContext(TabsContext);
|
|
6834
|
+
return /* @__PURE__ */ jsx57(
|
|
6565
6835
|
TabsPrimitive.Trigger,
|
|
6566
6836
|
{
|
|
6567
6837
|
"data-slot": "tabs-trigger",
|
|
6568
6838
|
className: cn(tabsTriggerVariants({ size, orientation }), className),
|
|
6569
6839
|
...props,
|
|
6570
|
-
children: /* @__PURE__ */
|
|
6840
|
+
children: /* @__PURE__ */ jsx57(
|
|
6571
6841
|
"span",
|
|
6572
6842
|
{
|
|
6573
6843
|
className: cn(
|
|
@@ -6584,7 +6854,7 @@ function TabsContent({
|
|
|
6584
6854
|
className,
|
|
6585
6855
|
...props
|
|
6586
6856
|
}) {
|
|
6587
|
-
return /* @__PURE__ */
|
|
6857
|
+
return /* @__PURE__ */ jsx57(
|
|
6588
6858
|
TabsPrimitive.Content,
|
|
6589
6859
|
{
|
|
6590
6860
|
"data-slot": "tabs-content",
|
|
@@ -6598,9 +6868,9 @@ function TabsContent({
|
|
|
6598
6868
|
import {
|
|
6599
6869
|
ThemeProvider as NextThemesProvider
|
|
6600
6870
|
} from "next-themes";
|
|
6601
|
-
import { jsx as
|
|
6871
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
6602
6872
|
function ThemeProvider({ children, ...props }) {
|
|
6603
|
-
return /* @__PURE__ */
|
|
6873
|
+
return /* @__PURE__ */ jsx58(
|
|
6604
6874
|
NextThemesProvider,
|
|
6605
6875
|
{
|
|
6606
6876
|
attribute: "class",
|
|
@@ -6617,29 +6887,29 @@ function ThemeProvider({ children, ...props }) {
|
|
|
6617
6887
|
import { Monitor, Moon, Sun } from "lucide-react";
|
|
6618
6888
|
import { useTheme as useTheme2 } from "next-themes";
|
|
6619
6889
|
import "react";
|
|
6620
|
-
import { jsx as
|
|
6890
|
+
import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6621
6891
|
function ThemeToggle({
|
|
6622
6892
|
className,
|
|
6623
6893
|
...props
|
|
6624
6894
|
}) {
|
|
6625
6895
|
const { setTheme } = useTheme2();
|
|
6626
|
-
return /* @__PURE__ */
|
|
6627
|
-
/* @__PURE__ */
|
|
6628
|
-
/* @__PURE__ */
|
|
6629
|
-
/* @__PURE__ */
|
|
6630
|
-
/* @__PURE__ */
|
|
6896
|
+
return /* @__PURE__ */ jsxs33(DropdownMenu, { children: [
|
|
6897
|
+
/* @__PURE__ */ jsx59(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs33(Button, { variant: "outline", size: "icon", className, ...props, children: [
|
|
6898
|
+
/* @__PURE__ */ jsx59(Sun, { className: "size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
|
|
6899
|
+
/* @__PURE__ */ jsx59(Moon, { className: "absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
|
|
6900
|
+
/* @__PURE__ */ jsx59("span", { className: "sr-only", children: "Toggle theme" })
|
|
6631
6901
|
] }) }),
|
|
6632
|
-
/* @__PURE__ */
|
|
6633
|
-
/* @__PURE__ */
|
|
6634
|
-
/* @__PURE__ */
|
|
6902
|
+
/* @__PURE__ */ jsxs33(DropdownMenuContent, { align: "end", children: [
|
|
6903
|
+
/* @__PURE__ */ jsxs33(DropdownMenuItem, { onClick: () => setTheme("light"), children: [
|
|
6904
|
+
/* @__PURE__ */ jsx59(Sun, { className: "size-4" }),
|
|
6635
6905
|
"Light"
|
|
6636
6906
|
] }),
|
|
6637
|
-
/* @__PURE__ */
|
|
6638
|
-
/* @__PURE__ */
|
|
6907
|
+
/* @__PURE__ */ jsxs33(DropdownMenuItem, { onClick: () => setTheme("dark"), children: [
|
|
6908
|
+
/* @__PURE__ */ jsx59(Moon, { className: "size-4" }),
|
|
6639
6909
|
"Dark"
|
|
6640
6910
|
] }),
|
|
6641
|
-
/* @__PURE__ */
|
|
6642
|
-
/* @__PURE__ */
|
|
6911
|
+
/* @__PURE__ */ jsxs33(DropdownMenuItem, { onClick: () => setTheme("system"), children: [
|
|
6912
|
+
/* @__PURE__ */ jsx59(Monitor, { className: "size-4" }),
|
|
6643
6913
|
"System"
|
|
6644
6914
|
] })
|
|
6645
6915
|
] })
|
|
@@ -6649,8 +6919,8 @@ function ThemeToggle({
|
|
|
6649
6919
|
// src/components/ui/time-input.tsx
|
|
6650
6920
|
import "class-variance-authority";
|
|
6651
6921
|
import { Clock } from "lucide-react";
|
|
6652
|
-
import * as
|
|
6653
|
-
import { jsx as
|
|
6922
|
+
import * as React56 from "react";
|
|
6923
|
+
import { jsx as jsx60, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6654
6924
|
var TIME_FORMAT_PLACEHOLDER = {
|
|
6655
6925
|
"12h": "hh:mm AM/PM",
|
|
6656
6926
|
"24h": "HH:mm",
|
|
@@ -6703,16 +6973,16 @@ function TimeInput({
|
|
|
6703
6973
|
formatDisplay
|
|
6704
6974
|
}) {
|
|
6705
6975
|
const resolvedPlaceholder = placeholder ?? TIME_FORMAT_PLACEHOLDER[timeFormat];
|
|
6706
|
-
const displayValue =
|
|
6976
|
+
const displayValue = React56.useMemo(() => {
|
|
6707
6977
|
if (!time) return "";
|
|
6708
6978
|
if (formatDisplay) return formatDisplay(time);
|
|
6709
6979
|
return formatTime(time, timeFormat);
|
|
6710
6980
|
}, [time, formatDisplay, timeFormat]);
|
|
6711
|
-
const [open, setOpen] =
|
|
6712
|
-
const hoursRef =
|
|
6713
|
-
const minutesRef =
|
|
6714
|
-
const periodRef =
|
|
6715
|
-
const scrollToSelected =
|
|
6981
|
+
const [open, setOpen] = React56.useState(false);
|
|
6982
|
+
const hoursRef = React56.useRef(null);
|
|
6983
|
+
const minutesRef = React56.useRef(null);
|
|
6984
|
+
const periodRef = React56.useRef(null);
|
|
6985
|
+
const scrollToSelected = React56.useCallback(() => {
|
|
6716
6986
|
requestAnimationFrame(() => {
|
|
6717
6987
|
for (const ref of [hoursRef, minutesRef, periodRef]) {
|
|
6718
6988
|
const container = ref.current;
|
|
@@ -6724,7 +6994,7 @@ function TimeInput({
|
|
|
6724
6994
|
}
|
|
6725
6995
|
});
|
|
6726
6996
|
}, []);
|
|
6727
|
-
|
|
6997
|
+
React56.useEffect(() => {
|
|
6728
6998
|
if (open) {
|
|
6729
6999
|
scrollToSelected();
|
|
6730
7000
|
}
|
|
@@ -6760,8 +7030,8 @@ function TimeInput({
|
|
|
6760
7030
|
const selectedH12 = time ? getDisplayHour(time.hours, timeFormat) : null;
|
|
6761
7031
|
const selectedMinute = time?.minutes ?? null;
|
|
6762
7032
|
const selectedPeriod = time ? getPeriod(time.hours) : null;
|
|
6763
|
-
return /* @__PURE__ */
|
|
6764
|
-
/* @__PURE__ */
|
|
7033
|
+
return /* @__PURE__ */ jsx60("div", { className: cn("relative flex gap-2", className), children: /* @__PURE__ */ jsxs34(Popover, { open, onOpenChange: setOpen, children: [
|
|
7034
|
+
/* @__PURE__ */ jsx60(PopoverTrigger, { asChild: true, disabled: inputDisabled, children: /* @__PURE__ */ jsxs34(
|
|
6765
7035
|
Button,
|
|
6766
7036
|
{
|
|
6767
7037
|
type: "button",
|
|
@@ -6776,18 +7046,18 @@ function TimeInput({
|
|
|
6776
7046
|
disabled: inputDisabled,
|
|
6777
7047
|
children: [
|
|
6778
7048
|
displayValue || resolvedPlaceholder,
|
|
6779
|
-
icon !== void 0 ? icon : /* @__PURE__ */
|
|
7049
|
+
icon !== void 0 ? icon : /* @__PURE__ */ jsx60(Clock, { className: "h-4 w-4 text-muted-foreground shrink-0" })
|
|
6780
7050
|
]
|
|
6781
7051
|
}
|
|
6782
7052
|
) }),
|
|
6783
|
-
/* @__PURE__ */
|
|
7053
|
+
/* @__PURE__ */ jsx60(
|
|
6784
7054
|
PopoverContent,
|
|
6785
7055
|
{
|
|
6786
7056
|
className: cn("w-auto p-0", popoverContentClassName),
|
|
6787
7057
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
6788
7058
|
...popoverContentProps,
|
|
6789
|
-
children: /* @__PURE__ */
|
|
6790
|
-
/* @__PURE__ */
|
|
7059
|
+
children: /* @__PURE__ */ jsxs34("div", { className: "flex divide-x border border-focus-ring rounded-md", children: [
|
|
7060
|
+
/* @__PURE__ */ jsx60("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx60("div", { ref: hoursRef, className: "flex flex-col p-1 ", children: hoursList.map((h) => /* @__PURE__ */ jsx60(
|
|
6791
7061
|
Button,
|
|
6792
7062
|
{
|
|
6793
7063
|
variant: "ghost",
|
|
@@ -6802,7 +7072,7 @@ function TimeInput({
|
|
|
6802
7072
|
},
|
|
6803
7073
|
h
|
|
6804
7074
|
)) }) }),
|
|
6805
|
-
/* @__PURE__ */
|
|
7075
|
+
/* @__PURE__ */ jsx60("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx60(
|
|
6806
7076
|
"div",
|
|
6807
7077
|
{
|
|
6808
7078
|
ref: minutesRef,
|
|
@@ -6810,7 +7080,7 @@ function TimeInput({
|
|
|
6810
7080
|
"flex flex-col p-1",
|
|
6811
7081
|
minutesList.length <= 12 && "h-full justify-center"
|
|
6812
7082
|
),
|
|
6813
|
-
children: minutesList.map((m) => /* @__PURE__ */
|
|
7083
|
+
children: minutesList.map((m) => /* @__PURE__ */ jsx60(
|
|
6814
7084
|
Button,
|
|
6815
7085
|
{
|
|
6816
7086
|
variant: "ghost",
|
|
@@ -6827,7 +7097,7 @@ function TimeInput({
|
|
|
6827
7097
|
))
|
|
6828
7098
|
}
|
|
6829
7099
|
) }),
|
|
6830
|
-
!is24HourFormat(timeFormat) && /* @__PURE__ */
|
|
7100
|
+
!is24HourFormat(timeFormat) && /* @__PURE__ */ jsx60("div", { className: "flex flex-col p-1 justify-center gap-1", children: ["AM", "PM"].map((p) => /* @__PURE__ */ jsx60(
|
|
6831
7101
|
Button,
|
|
6832
7102
|
{
|
|
6833
7103
|
variant: "ghost",
|
|
@@ -6851,9 +7121,9 @@ function TimeInput({
|
|
|
6851
7121
|
// src/components/ui/toggle.tsx
|
|
6852
7122
|
import "react";
|
|
6853
7123
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
6854
|
-
import { cva as
|
|
6855
|
-
import { jsx as
|
|
6856
|
-
var toggleVariants =
|
|
7124
|
+
import { cva as cva14 } from "class-variance-authority";
|
|
7125
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
7126
|
+
var toggleVariants = cva14(
|
|
6857
7127
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
6858
7128
|
{
|
|
6859
7129
|
variants: {
|
|
@@ -6879,7 +7149,7 @@ function Toggle({
|
|
|
6879
7149
|
size,
|
|
6880
7150
|
...props
|
|
6881
7151
|
}) {
|
|
6882
|
-
return /* @__PURE__ */
|
|
7152
|
+
return /* @__PURE__ */ jsx61(
|
|
6883
7153
|
TogglePrimitive.Root,
|
|
6884
7154
|
{
|
|
6885
7155
|
"data-slot": "toggle",
|
|
@@ -6890,11 +7160,11 @@ function Toggle({
|
|
|
6890
7160
|
}
|
|
6891
7161
|
|
|
6892
7162
|
// src/components/ui/toggle-group.tsx
|
|
6893
|
-
import * as
|
|
7163
|
+
import * as React58 from "react";
|
|
6894
7164
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
6895
7165
|
import "class-variance-authority";
|
|
6896
|
-
import { jsx as
|
|
6897
|
-
var ToggleGroupContext =
|
|
7166
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
7167
|
+
var ToggleGroupContext = React58.createContext({
|
|
6898
7168
|
size: "default",
|
|
6899
7169
|
variant: "default"
|
|
6900
7170
|
});
|
|
@@ -6905,7 +7175,7 @@ function ToggleGroup({
|
|
|
6905
7175
|
children,
|
|
6906
7176
|
...props
|
|
6907
7177
|
}) {
|
|
6908
|
-
return /* @__PURE__ */
|
|
7178
|
+
return /* @__PURE__ */ jsx62(
|
|
6909
7179
|
ToggleGroupPrimitive.Root,
|
|
6910
7180
|
{
|
|
6911
7181
|
"data-slot": "toggle-group",
|
|
@@ -6916,7 +7186,7 @@ function ToggleGroup({
|
|
|
6916
7186
|
className
|
|
6917
7187
|
),
|
|
6918
7188
|
...props,
|
|
6919
|
-
children: /* @__PURE__ */
|
|
7189
|
+
children: /* @__PURE__ */ jsx62(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
6920
7190
|
}
|
|
6921
7191
|
);
|
|
6922
7192
|
}
|
|
@@ -6927,8 +7197,8 @@ function ToggleGroupItem({
|
|
|
6927
7197
|
size,
|
|
6928
7198
|
...props
|
|
6929
7199
|
}) {
|
|
6930
|
-
const context =
|
|
6931
|
-
return /* @__PURE__ */
|
|
7200
|
+
const context = React58.useContext(ToggleGroupContext);
|
|
7201
|
+
return /* @__PURE__ */ jsx62(
|
|
6932
7202
|
ToggleGroupPrimitive.Item,
|
|
6933
7203
|
{
|
|
6934
7204
|
"data-slot": "toggle-group-item",
|
|
@@ -6950,10 +7220,10 @@ function ToggleGroupItem({
|
|
|
6950
7220
|
|
|
6951
7221
|
// src/components/ui/typography.tsx
|
|
6952
7222
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
6953
|
-
import { cva as
|
|
7223
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
6954
7224
|
import "react";
|
|
6955
|
-
import { jsx as
|
|
6956
|
-
var displayTextVariants =
|
|
7225
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
7226
|
+
var displayTextVariants = cva15(
|
|
6957
7227
|
"tracking-normal font-normal leading-none text-brand-dark font-serif italic",
|
|
6958
7228
|
{
|
|
6959
7229
|
variants: {
|
|
@@ -6975,7 +7245,7 @@ function DisplayHeading({
|
|
|
6975
7245
|
...props
|
|
6976
7246
|
}) {
|
|
6977
7247
|
const Comp = asChild ? Slot7 : "h1";
|
|
6978
|
-
return /* @__PURE__ */
|
|
7248
|
+
return /* @__PURE__ */ jsx63(
|
|
6979
7249
|
Comp,
|
|
6980
7250
|
{
|
|
6981
7251
|
"data-slot": "h1",
|
|
@@ -6984,7 +7254,7 @@ function DisplayHeading({
|
|
|
6984
7254
|
}
|
|
6985
7255
|
);
|
|
6986
7256
|
}
|
|
6987
|
-
var bodyTextVariants =
|
|
7257
|
+
var bodyTextVariants = cva15("font-sans ", {
|
|
6988
7258
|
variants: {
|
|
6989
7259
|
size: {
|
|
6990
7260
|
lg: "text-lg md:text-xl leading-[1.625rem] md:leading-[1.75rem]",
|
|
@@ -7004,7 +7274,7 @@ function Body({
|
|
|
7004
7274
|
...props
|
|
7005
7275
|
}) {
|
|
7006
7276
|
const Comp = asChild ? Slot7 : "p";
|
|
7007
|
-
return /* @__PURE__ */
|
|
7277
|
+
return /* @__PURE__ */ jsx63(
|
|
7008
7278
|
Comp,
|
|
7009
7279
|
{
|
|
7010
7280
|
"data-slot": "h1",
|
|
@@ -7019,7 +7289,7 @@ function HeadingXL({
|
|
|
7019
7289
|
...props
|
|
7020
7290
|
}) {
|
|
7021
7291
|
const Comp = asChild ? Slot7 : "h1";
|
|
7022
|
-
return /* @__PURE__ */
|
|
7292
|
+
return /* @__PURE__ */ jsx63(
|
|
7023
7293
|
Comp,
|
|
7024
7294
|
{
|
|
7025
7295
|
"data-slot": "h1",
|
|
@@ -7037,7 +7307,7 @@ function HeadingL({
|
|
|
7037
7307
|
...props
|
|
7038
7308
|
}) {
|
|
7039
7309
|
const Comp = asChild ? Slot7 : "h2";
|
|
7040
|
-
return /* @__PURE__ */
|
|
7310
|
+
return /* @__PURE__ */ jsx63(
|
|
7041
7311
|
Comp,
|
|
7042
7312
|
{
|
|
7043
7313
|
"data-slot": "h2",
|
|
@@ -7055,7 +7325,7 @@ function HeadingM({
|
|
|
7055
7325
|
...props
|
|
7056
7326
|
}) {
|
|
7057
7327
|
const Comp = asChild ? Slot7 : "h3";
|
|
7058
|
-
return /* @__PURE__ */
|
|
7328
|
+
return /* @__PURE__ */ jsx63(
|
|
7059
7329
|
Comp,
|
|
7060
7330
|
{
|
|
7061
7331
|
"data-slot": "h3",
|
|
@@ -7073,7 +7343,7 @@ function HeadingS({
|
|
|
7073
7343
|
...props
|
|
7074
7344
|
}) {
|
|
7075
7345
|
const Comp = asChild ? Slot7 : "h4";
|
|
7076
|
-
return /* @__PURE__ */
|
|
7346
|
+
return /* @__PURE__ */ jsx63(
|
|
7077
7347
|
Comp,
|
|
7078
7348
|
{
|
|
7079
7349
|
"data-slot": "h4",
|
|
@@ -7091,7 +7361,7 @@ function HeadingXS({
|
|
|
7091
7361
|
...props
|
|
7092
7362
|
}) {
|
|
7093
7363
|
const Comp = asChild ? Slot7 : "h5";
|
|
7094
|
-
return /* @__PURE__ */
|
|
7364
|
+
return /* @__PURE__ */ jsx63(
|
|
7095
7365
|
Comp,
|
|
7096
7366
|
{
|
|
7097
7367
|
"data-slot": "h5",
|
|
@@ -7109,7 +7379,7 @@ function HeadingXXS({
|
|
|
7109
7379
|
...props
|
|
7110
7380
|
}) {
|
|
7111
7381
|
const Comp = asChild ? Slot7 : "h6";
|
|
7112
|
-
return /* @__PURE__ */
|
|
7382
|
+
return /* @__PURE__ */ jsx63(
|
|
7113
7383
|
Comp,
|
|
7114
7384
|
{
|
|
7115
7385
|
"data-slot": "h5",
|
|
@@ -7314,6 +7584,7 @@ export {
|
|
|
7314
7584
|
PopoverContent,
|
|
7315
7585
|
PopoverTrigger,
|
|
7316
7586
|
Progress,
|
|
7587
|
+
ProgressBar,
|
|
7317
7588
|
RadioGroup4 as RadioGroup,
|
|
7318
7589
|
RadioGroupItem,
|
|
7319
7590
|
ResizableHandle,
|
|
@@ -7322,6 +7593,7 @@ export {
|
|
|
7322
7593
|
RichTooltipContent,
|
|
7323
7594
|
ScrollArea,
|
|
7324
7595
|
ScrollBar,
|
|
7596
|
+
SearchInput,
|
|
7325
7597
|
SearchableSelect,
|
|
7326
7598
|
SearchableSelectContent,
|
|
7327
7599
|
SearchableSelectEmpty,
|
|
@@ -7417,6 +7689,7 @@ export {
|
|
|
7417
7689
|
inputVariants,
|
|
7418
7690
|
labelTextVariants,
|
|
7419
7691
|
navigationMenuTriggerStyle,
|
|
7692
|
+
progressBarVariants,
|
|
7420
7693
|
tabsTriggerVariants,
|
|
7421
7694
|
toggleVariants,
|
|
7422
7695
|
useFormField,
|