@mesob/ui 0.3.2 → 0.3.3
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/components.d.ts +5 -1
- package/dist/components.js +146 -124
- package/dist/components.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/style-lyra.css +2 -2
- package/src/styles/style-maia.css +2 -2
- package/src/styles/style-mira.css +2 -2
- package/src/styles/style-nova.css +2 -2
- package/src/styles/style-vega.css +2 -2
package/dist/components.d.ts
CHANGED
|
@@ -1143,7 +1143,10 @@ declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>
|
|
|
1143
1143
|
declare const fieldVariants: (props?: ({
|
|
1144
1144
|
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
1145
1145
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1146
|
-
|
|
1146
|
+
type FieldProps = React.ComponentProps<'div'> & VariantProps<typeof fieldVariants> & {
|
|
1147
|
+
'data-invalid'?: boolean;
|
|
1148
|
+
};
|
|
1149
|
+
declare function Field({ className, orientation, ...props }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
1147
1150
|
declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
1148
1151
|
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): react_jsx_runtime.JSX.Element;
|
|
1149
1152
|
declare function FieldTitle({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
@@ -1152,6 +1155,7 @@ declare function FieldSeparator({ children, className, ...props }: React.Compone
|
|
|
1152
1155
|
children?: React.ReactNode;
|
|
1153
1156
|
}): react_jsx_runtime.JSX.Element;
|
|
1154
1157
|
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<'div'> & {
|
|
1158
|
+
/** From react-hook-form etc. Renders list when multiple. */
|
|
1155
1159
|
errors?: Array<{
|
|
1156
1160
|
message?: string;
|
|
1157
1161
|
} | undefined>;
|
package/dist/components.js
CHANGED
|
@@ -610,14 +610,14 @@ var fieldVariants = cva2(
|
|
|
610
610
|
{
|
|
611
611
|
variants: {
|
|
612
612
|
orientation: {
|
|
613
|
-
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
613
|
+
vertical: ["flex-col gap-2 [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
614
614
|
horizontal: [
|
|
615
|
-
"flex-row items-center",
|
|
615
|
+
"flex-row items-center gap-2",
|
|
616
616
|
"[&>[data-slot=field-label]]:flex-auto",
|
|
617
617
|
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
618
618
|
],
|
|
619
619
|
responsive: [
|
|
620
|
-
"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
|
|
620
|
+
"flex-col gap-2 [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:gap-2 @md/field-group:[&>*]:w-auto",
|
|
621
621
|
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
622
622
|
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
623
623
|
]
|
|
@@ -628,23 +628,19 @@ var fieldVariants = cva2(
|
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
);
|
|
631
|
-
function Field({
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
className
|
|
645
|
-
),
|
|
646
|
-
...props
|
|
647
|
-
}
|
|
631
|
+
function Field({ className, orientation = "vertical", ...props }) {
|
|
632
|
+
return (
|
|
633
|
+
// biome-ignore lint/a11y/useSemanticElements: div avoids nested fieldsets when Field is inside FieldSet
|
|
634
|
+
/* @__PURE__ */ jsx9(
|
|
635
|
+
"div",
|
|
636
|
+
{
|
|
637
|
+
role: "group",
|
|
638
|
+
"data-slot": "field",
|
|
639
|
+
"data-orientation": orientation,
|
|
640
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
641
|
+
...props
|
|
642
|
+
}
|
|
643
|
+
)
|
|
648
644
|
);
|
|
649
645
|
}
|
|
650
646
|
function FieldContent({ className, ...props }) {
|
|
@@ -742,11 +738,11 @@ function FieldError({
|
|
|
742
738
|
if (!content && errors?.length) {
|
|
743
739
|
const uniqueErrors = [
|
|
744
740
|
...new Map(errors.map((error) => [error?.message, error])).values()
|
|
745
|
-
];
|
|
741
|
+
].filter(Boolean);
|
|
746
742
|
if (uniqueErrors.length === 1) {
|
|
747
743
|
content = uniqueErrors[0]?.message;
|
|
748
|
-
} else {
|
|
749
|
-
content = /* @__PURE__ */ jsx9("ul", { className: "ml-4
|
|
744
|
+
} else if (uniqueErrors.length > 1) {
|
|
745
|
+
content = /* @__PURE__ */ jsx9("ul", { className: "ml-4 list-disc flex flex-col gap-1", children: uniqueErrors.map(
|
|
750
746
|
(error) => error?.message && /* @__PURE__ */ jsx9("li", { children: error.message }, error.message)
|
|
751
747
|
) });
|
|
752
748
|
}
|
|
@@ -759,7 +755,7 @@ function FieldError({
|
|
|
759
755
|
{
|
|
760
756
|
role: "alert",
|
|
761
757
|
"data-slot": "field-error",
|
|
762
|
-
className: cn("cn-field-error", className),
|
|
758
|
+
className: cn("cn-field-error text-destructive text-sm", className),
|
|
763
759
|
...props,
|
|
764
760
|
children: content
|
|
765
761
|
}
|
|
@@ -6909,6 +6905,7 @@ import Underline from "@tiptap/extension-underline";
|
|
|
6909
6905
|
import Youtube from "@tiptap/extension-youtube";
|
|
6910
6906
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
6911
6907
|
import StarterKit from "@tiptap/starter-kit";
|
|
6908
|
+
import { useMemo as useMemo8, useRef as useRef6 } from "react";
|
|
6912
6909
|
|
|
6913
6910
|
// src/components/rich-text/controls/hardbreak-control.tsx
|
|
6914
6911
|
import { IconPageBreak } from "@tabler/icons-react";
|
|
@@ -7447,73 +7444,97 @@ function RichTextInput({
|
|
|
7447
7444
|
placeholder = "Start typing..."
|
|
7448
7445
|
}) {
|
|
7449
7446
|
const { value, onChange } = field;
|
|
7450
|
-
const
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
class: "
|
|
7488
|
-
}
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7447
|
+
const onChangeRef = useRef6(onChange);
|
|
7448
|
+
onChangeRef.current = onChange;
|
|
7449
|
+
const debounceRef = useRef6(null);
|
|
7450
|
+
const pendingHtmlRef = useRef6(value ?? "");
|
|
7451
|
+
const editorOptions = useMemo8(() => {
|
|
7452
|
+
const syncHtml = (html) => onChangeRef.current?.(html ?? "<p></p>");
|
|
7453
|
+
return {
|
|
7454
|
+
immediatelyRender: false,
|
|
7455
|
+
extensions: [
|
|
7456
|
+
StarterKit.configure({
|
|
7457
|
+
// biome-ignore lint/style/useNamingConvention: tiptap API
|
|
7458
|
+
bulletList: { HTMLAttributes: { class: "list-disc pl-4" } },
|
|
7459
|
+
// biome-ignore lint/style/useNamingConvention: tiptap API
|
|
7460
|
+
orderedList: { HTMLAttributes: { class: "list-decimal pl-4" } }
|
|
7461
|
+
}),
|
|
7462
|
+
HardBreak.configure({ keepMarks: false }),
|
|
7463
|
+
Underline,
|
|
7464
|
+
Link.configure({
|
|
7465
|
+
// biome-ignore lint/style/useNamingConvention: tiptap API
|
|
7466
|
+
HTMLAttributes: { class: "text-primary underline" },
|
|
7467
|
+
openOnClick: false
|
|
7468
|
+
}),
|
|
7469
|
+
Superscript,
|
|
7470
|
+
SubScript,
|
|
7471
|
+
Highlight,
|
|
7472
|
+
TextAlign.configure({ types: ["heading", "paragraph"] }),
|
|
7473
|
+
Placeholder.configure({ placeholder }),
|
|
7474
|
+
Image.configure({
|
|
7475
|
+
inline: true,
|
|
7476
|
+
allowBase64: true,
|
|
7477
|
+
// biome-ignore lint/style/useNamingConvention: tiptap API
|
|
7478
|
+
HTMLAttributes: {
|
|
7479
|
+
class: "w-full h-auto my-3 rounded-[var(--radius-md)]"
|
|
7480
|
+
}
|
|
7481
|
+
}),
|
|
7482
|
+
Youtube.configure({
|
|
7483
|
+
// biome-ignore lint/style/useNamingConvention: tiptap API
|
|
7484
|
+
HTMLAttributes: { class: "w-full aspect-video my-4" }
|
|
7485
|
+
}),
|
|
7486
|
+
Table2.configure({
|
|
7487
|
+
resizable: true,
|
|
7488
|
+
// biome-ignore lint/style/useNamingConvention: tiptap API
|
|
7489
|
+
HTMLAttributes: {
|
|
7490
|
+
class: "border-collapse table-auto w-full my-4"
|
|
7491
|
+
}
|
|
7492
|
+
}),
|
|
7493
|
+
TableRow2.configure({
|
|
7494
|
+
// biome-ignore lint/style/useNamingConvention: tiptap API
|
|
7495
|
+
HTMLAttributes: { class: "border border-border" }
|
|
7496
|
+
}),
|
|
7497
|
+
TableCell2.configure({
|
|
7498
|
+
// biome-ignore lint/style/useNamingConvention: tiptap API
|
|
7499
|
+
HTMLAttributes: {
|
|
7500
|
+
class: "border border-border p-2 min-w-[100px] min-h-[40px]"
|
|
7501
|
+
}
|
|
7502
|
+
}),
|
|
7503
|
+
TableHeader2.configure({
|
|
7504
|
+
// biome-ignore lint/style/useNamingConvention: tiptap API
|
|
7505
|
+
HTMLAttributes: {
|
|
7506
|
+
class: "border border-border p-2 bg-muted font-semibold"
|
|
7507
|
+
}
|
|
7508
|
+
}),
|
|
7509
|
+
CustomHeading,
|
|
7510
|
+
Iframe
|
|
7511
|
+
],
|
|
7512
|
+
content: value || "",
|
|
7513
|
+
...withOnUpdate ? {
|
|
7514
|
+
onUpdate: (props) => {
|
|
7515
|
+
const html = props?.editor?.getHTML() ?? "<p></p>";
|
|
7516
|
+
pendingHtmlRef.current = html;
|
|
7517
|
+
if (debounceRef.current) {
|
|
7518
|
+
clearTimeout(debounceRef.current);
|
|
7519
|
+
}
|
|
7520
|
+
debounceRef.current = setTimeout(() => {
|
|
7521
|
+
debounceRef.current = null;
|
|
7522
|
+
syncHtml(pendingHtmlRef.current ?? "<p></p>");
|
|
7523
|
+
}, 300);
|
|
7524
|
+
},
|
|
7525
|
+
onBlur: (props) => {
|
|
7526
|
+
if (debounceRef.current) {
|
|
7527
|
+
clearTimeout(debounceRef.current);
|
|
7528
|
+
debounceRef.current = null;
|
|
7529
|
+
}
|
|
7530
|
+
syncHtml(props?.editor?.getHTML() ?? "<p></p>");
|
|
7504
7531
|
}
|
|
7505
|
-
}
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
onUpdate: (props) => onChange?.(props?.editor?.getHTML() ?? "<p></p>")
|
|
7512
|
-
},
|
|
7513
|
-
...!withOnUpdate && {
|
|
7514
|
-
onBlur: (props) => onChange(props?.editor?.getHTML() ?? "<p></p>")
|
|
7515
|
-
}
|
|
7516
|
-
});
|
|
7532
|
+
} : {
|
|
7533
|
+
onBlur: (props) => syncHtml(props?.editor?.getHTML() ?? "<p></p>")
|
|
7534
|
+
}
|
|
7535
|
+
};
|
|
7536
|
+
}, [value, withOnUpdate, placeholder]);
|
|
7537
|
+
const editor = useEditor(editorOptions);
|
|
7517
7538
|
const enabledControllersLength = enabledControllers.length;
|
|
7518
7539
|
const isControllerEnabled = (controller) => enabledControllersLength === 0 || enabledControllers.includes(controller);
|
|
7519
7540
|
return /* @__PURE__ */ jsxs51("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
@@ -8650,7 +8671,7 @@ function Anchor({
|
|
|
8650
8671
|
}
|
|
8651
8672
|
|
|
8652
8673
|
// src/components/ui/angle-slider.tsx
|
|
8653
|
-
import { useCallback as useCallback6, useRef as
|
|
8674
|
+
import { useCallback as useCallback6, useRef as useRef7, useState as useState20 } from "react";
|
|
8654
8675
|
import { jsx as jsx94, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
8655
8676
|
var TAU = 2 * Math.PI;
|
|
8656
8677
|
function AngleSlider({
|
|
@@ -8679,8 +8700,8 @@ function AngleSlider({
|
|
|
8679
8700
|
},
|
|
8680
8701
|
[isControlled, onChange]
|
|
8681
8702
|
);
|
|
8682
|
-
const ref =
|
|
8683
|
-
const angleRef =
|
|
8703
|
+
const ref = useRef7(null);
|
|
8704
|
+
const angleRef = useRef7(value);
|
|
8684
8705
|
const getAngle = useCallback6(
|
|
8685
8706
|
(clientX, clientY) => {
|
|
8686
8707
|
const el = ref.current;
|
|
@@ -8821,7 +8842,7 @@ function AngleSlider({
|
|
|
8821
8842
|
import { useMesob as useMesob8 } from "@mesob/ui/providers";
|
|
8822
8843
|
import { IconChevronDown as IconChevronDown7 } from "@tabler/icons-react";
|
|
8823
8844
|
import { motion } from "motion/react";
|
|
8824
|
-
import { useLayoutEffect as useLayoutEffect2, useMemo as
|
|
8845
|
+
import { useLayoutEffect as useLayoutEffect2, useMemo as useMemo9, useRef as useRef8, useState as useState21 } from "react";
|
|
8825
8846
|
import { jsx as jsx95, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
8826
8847
|
function AnimatedTabs({
|
|
8827
8848
|
tabs,
|
|
@@ -8840,10 +8861,10 @@ function AnimatedTabs({
|
|
|
8840
8861
|
const activeTab = controlledActiveTab ?? internalActiveTab;
|
|
8841
8862
|
const [visibleTabs, setVisibleTabs] = useState21(tabs);
|
|
8842
8863
|
const [overflowTabs, setOverflowTabs] = useState21([]);
|
|
8843
|
-
const containerRef =
|
|
8844
|
-
const tabsListRef =
|
|
8845
|
-
const dropdownTriggerRef =
|
|
8846
|
-
const tabRefs =
|
|
8864
|
+
const containerRef = useRef8(null);
|
|
8865
|
+
const tabsListRef = useRef8(null);
|
|
8866
|
+
const dropdownTriggerRef = useRef8(null);
|
|
8867
|
+
const tabRefs = useRef8([]);
|
|
8847
8868
|
const [underlineStyle, setUnderlineStyle] = useState21({ left: 0, width: 0 });
|
|
8848
8869
|
const handleTabChange = (newValue) => {
|
|
8849
8870
|
if (!controlledActiveTab) {
|
|
@@ -8935,7 +8956,7 @@ function AnimatedTabs({
|
|
|
8935
8956
|
};
|
|
8936
8957
|
updateUnderline();
|
|
8937
8958
|
}, [activeTab, visibleTabs, overflowTabs, tabs]);
|
|
8938
|
-
const activeTabData =
|
|
8959
|
+
const activeTabData = useMemo9(
|
|
8939
8960
|
() => tabs.find((tab) => tab.value === activeTab),
|
|
8940
8961
|
[tabs, activeTab]
|
|
8941
8962
|
);
|
|
@@ -10088,7 +10109,7 @@ function Code({
|
|
|
10088
10109
|
// src/components/ui/color-input.tsx
|
|
10089
10110
|
import { IconColorPicker } from "@tabler/icons-react";
|
|
10090
10111
|
import * as React11 from "react";
|
|
10091
|
-
import { useCallback as useCallback8, useEffect as useEffect10, useRef as
|
|
10112
|
+
import { useCallback as useCallback8, useEffect as useEffect10, useRef as useRef11, useState as useState24 } from "react";
|
|
10092
10113
|
|
|
10093
10114
|
// src/lib/color-utils.ts
|
|
10094
10115
|
function hex2rgb(hex) {
|
|
@@ -10290,7 +10311,7 @@ function hasAlpha(format) {
|
|
|
10290
10311
|
}
|
|
10291
10312
|
|
|
10292
10313
|
// src/components/ui/color-picker.tsx
|
|
10293
|
-
import { useCallback as useCallback7, useEffect as useEffect9, useRef as
|
|
10314
|
+
import { useCallback as useCallback7, useEffect as useEffect9, useRef as useRef10, useState as useState23 } from "react";
|
|
10294
10315
|
|
|
10295
10316
|
// src/components/ui/color-swatch.tsx
|
|
10296
10317
|
import { jsx as jsx108, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
@@ -10381,8 +10402,8 @@ function HueAlphaSlider({
|
|
|
10381
10402
|
ariaLabel,
|
|
10382
10403
|
className
|
|
10383
10404
|
}) {
|
|
10384
|
-
const ref =
|
|
10385
|
-
const lastRef =
|
|
10405
|
+
const ref = useRef10(null);
|
|
10406
|
+
const lastRef = useRef10(value);
|
|
10386
10407
|
const handleMove = useCallback7(
|
|
10387
10408
|
(clientX) => {
|
|
10388
10409
|
const el = ref.current;
|
|
@@ -10481,9 +10502,9 @@ function ColorPicker({
|
|
|
10481
10502
|
() => parseColor(String(value ?? inputProps.defaultValue ?? "#000000"))
|
|
10482
10503
|
);
|
|
10483
10504
|
const isControlled = value !== void 0;
|
|
10484
|
-
const valueRef =
|
|
10485
|
-
const saturationRef =
|
|
10486
|
-
const lastHsvaRef =
|
|
10505
|
+
const valueRef = useRef10(value);
|
|
10506
|
+
const saturationRef = useRef10(null);
|
|
10507
|
+
const lastHsvaRef = useRef10(hsva);
|
|
10487
10508
|
lastHsvaRef.current = hsva;
|
|
10488
10509
|
useEffect9(() => {
|
|
10489
10510
|
if (value === valueRef.current) {
|
|
@@ -10929,17 +10950,17 @@ var ColorInput = React11.forwardRef(
|
|
|
10929
10950
|
);
|
|
10930
10951
|
const { supported: eyeDropperSupported, open: openEyeDropper } = useEyeDropper();
|
|
10931
10952
|
const _withEyeDropper = withEyeDropperProp && eyeDropperSupported;
|
|
10932
|
-
const inputRef =
|
|
10933
|
-
const anchorRef =
|
|
10934
|
-
const popoverContentRef =
|
|
10935
|
-
const openTimestampRef =
|
|
10936
|
-
const pointerDownInPopoverRef =
|
|
10953
|
+
const inputRef = useRef11(null);
|
|
10954
|
+
const anchorRef = useRef11(null);
|
|
10955
|
+
const popoverContentRef = useRef11(null);
|
|
10956
|
+
const openTimestampRef = useRef11(0);
|
|
10957
|
+
const pointerDownInPopoverRef = useRef11(false);
|
|
10937
10958
|
useEffect10(() => {
|
|
10938
10959
|
if (isColorValid(value) || value.trim() === "") {
|
|
10939
10960
|
setLastValidValue(value);
|
|
10940
10961
|
}
|
|
10941
10962
|
}, [value]);
|
|
10942
|
-
const prevFormatRef =
|
|
10963
|
+
const prevFormatRef = useRef11(format);
|
|
10943
10964
|
useEffect10(() => {
|
|
10944
10965
|
if (prevFormatRef.current !== format && isColorValid(value)) {
|
|
10945
10966
|
setValue(formatColor(parseColor(value), format));
|
|
@@ -11173,7 +11194,7 @@ ColorInput.displayName = "ColorInput";
|
|
|
11173
11194
|
// src/components/ui/combobox.tsx
|
|
11174
11195
|
import { Combobox as ComboboxPrimitive } from "@base-ui/react/combobox";
|
|
11175
11196
|
import { IconCheck as IconCheck4, IconChevronDown as IconChevronDown9 } from "@tabler/icons-react";
|
|
11176
|
-
import { useMemo as
|
|
11197
|
+
import { useMemo as useMemo10, useState as useState25 } from "react";
|
|
11177
11198
|
import { jsx as jsx112, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
11178
11199
|
var COMBOBOX_CONTENT_BASE_CN = "cn-menu-target group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)";
|
|
11179
11200
|
var COMBOBOX_ITEM_BASE_CN = "relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
@@ -11189,11 +11210,11 @@ function Combobox({
|
|
|
11189
11210
|
...props
|
|
11190
11211
|
}) {
|
|
11191
11212
|
const [inputValue, setInputValue] = useState25("");
|
|
11192
|
-
const selectedOption =
|
|
11213
|
+
const selectedOption = useMemo10(
|
|
11193
11214
|
() => options.find((opt) => opt.value === value) ?? null,
|
|
11194
11215
|
[options, value]
|
|
11195
11216
|
);
|
|
11196
|
-
const filteredOptions =
|
|
11217
|
+
const filteredOptions = useMemo10(() => {
|
|
11197
11218
|
if (!inputValue) {
|
|
11198
11219
|
return options;
|
|
11199
11220
|
}
|
|
@@ -12037,7 +12058,7 @@ function DrawerDescription({
|
|
|
12037
12058
|
}
|
|
12038
12059
|
|
|
12039
12060
|
// src/components/ui/file-button.tsx
|
|
12040
|
-
import { useRef as
|
|
12061
|
+
import { useRef as useRef12 } from "react";
|
|
12041
12062
|
import { Fragment as Fragment21, jsx as jsx121, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
12042
12063
|
function FileButton({
|
|
12043
12064
|
onChange,
|
|
@@ -12049,7 +12070,7 @@ function FileButton({
|
|
|
12049
12070
|
className,
|
|
12050
12071
|
...props
|
|
12051
12072
|
}) {
|
|
12052
|
-
const inputRef =
|
|
12073
|
+
const inputRef = useRef12(null);
|
|
12053
12074
|
const handleClick = () => {
|
|
12054
12075
|
inputRef.current?.click();
|
|
12055
12076
|
};
|
|
@@ -12086,7 +12107,7 @@ function FileButton({
|
|
|
12086
12107
|
|
|
12087
12108
|
// src/components/ui/file-input.tsx
|
|
12088
12109
|
import { IconFile, IconUpload, IconX as IconX10 } from "@tabler/icons-react";
|
|
12089
|
-
import { useId as useId2, useRef as
|
|
12110
|
+
import { useId as useId2, useRef as useRef13, useState as useState28 } from "react";
|
|
12090
12111
|
import { jsx as jsx122, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
12091
12112
|
function FileInput({
|
|
12092
12113
|
className,
|
|
@@ -12097,7 +12118,7 @@ function FileInput({
|
|
|
12097
12118
|
}) {
|
|
12098
12119
|
const [files, setFiles] = useState28([]);
|
|
12099
12120
|
const [isDragging, setIsDragging] = useState28(false);
|
|
12100
|
-
const inputRef =
|
|
12121
|
+
const inputRef = useRef13(null);
|
|
12101
12122
|
const handleChange = (e) => {
|
|
12102
12123
|
const selectedFiles = Array.from(e.target.files || []);
|
|
12103
12124
|
setFiles(selectedFiles);
|
|
@@ -12388,7 +12409,7 @@ function FloatingIndicator({
|
|
|
12388
12409
|
}
|
|
12389
12410
|
|
|
12390
12411
|
// src/components/ui/focus-trap.tsx
|
|
12391
|
-
import { cloneElement as cloneElement2, useEffect as useEffect12, useRef as
|
|
12412
|
+
import { cloneElement as cloneElement2, useEffect as useEffect12, useRef as useRef14 } from "react";
|
|
12392
12413
|
import { jsx as jsx125 } from "react/jsx-runtime";
|
|
12393
12414
|
var FOCUSABLE = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
12394
12415
|
function getFocusableElements(container) {
|
|
@@ -12397,7 +12418,7 @@ function getFocusableElements(container) {
|
|
|
12397
12418
|
);
|
|
12398
12419
|
}
|
|
12399
12420
|
function useFocusTrap(active) {
|
|
12400
|
-
const ref =
|
|
12421
|
+
const ref = useRef14(null);
|
|
12401
12422
|
useEffect12(() => {
|
|
12402
12423
|
if (!active) {
|
|
12403
12424
|
return;
|
|
@@ -13730,11 +13751,12 @@ var MoneyInput = forwardRef5(
|
|
|
13730
13751
|
currencies = defaultCurrencies,
|
|
13731
13752
|
fractionDigits = 2,
|
|
13732
13753
|
disabled = false,
|
|
13733
|
-
placeholder
|
|
13754
|
+
placeholder: placeholderProp,
|
|
13734
13755
|
className = "",
|
|
13735
13756
|
size = "md",
|
|
13736
13757
|
id
|
|
13737
13758
|
}, ref) => {
|
|
13759
|
+
const placeholder = placeholderProp ?? (fractionDigits > 0 ? `0.${"0".repeat(fractionDigits)}` : "0");
|
|
13738
13760
|
const [internalValue, setInternalValue] = useState32(value);
|
|
13739
13761
|
const [internalCurrency, setInternalCurrency] = useState32(currency);
|
|
13740
13762
|
const [displayValue, setDisplayValue] = useState32(
|
|
@@ -15425,7 +15447,7 @@ function Space({ className, h, w, style, ...props }) {
|
|
|
15425
15447
|
|
|
15426
15448
|
// src/components/ui/spoiler.tsx
|
|
15427
15449
|
import { IconChevronDown as IconChevronDown14 } from "@tabler/icons-react";
|
|
15428
|
-
import { useEffect as useEffect13, useRef as
|
|
15450
|
+
import { useEffect as useEffect13, useRef as useRef15, useState as useState36 } from "react";
|
|
15429
15451
|
import { jsx as jsx160, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
15430
15452
|
function Spoiler({
|
|
15431
15453
|
maxHeight = 100,
|
|
@@ -15438,7 +15460,7 @@ function Spoiler({
|
|
|
15438
15460
|
}) {
|
|
15439
15461
|
const [isExpanded, setIsExpanded] = useState36(initialState);
|
|
15440
15462
|
const [shouldShowButton, setShouldShowButton] = useState36(false);
|
|
15441
|
-
const contentRef =
|
|
15463
|
+
const contentRef = useRef15(null);
|
|
15442
15464
|
useEffect13(() => {
|
|
15443
15465
|
const el = contentRef.current;
|
|
15444
15466
|
if (!el) {
|