@bubo-squared/ui-framework 0.2.20 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +115 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +119 -50
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -329,7 +329,7 @@ interface CheckboxProps extends React$1.ComponentPropsWithoutRef<typeof Checkbox
|
|
|
329
329
|
name?: string;
|
|
330
330
|
label?: string;
|
|
331
331
|
}
|
|
332
|
-
declare
|
|
332
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
333
333
|
|
|
334
334
|
type TextInputSize = "sm" | "md" | "lg" | "xl";
|
|
335
335
|
type TextInputStatus = "default" | "success" | "error";
|
|
@@ -352,7 +352,7 @@ interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
|
|
|
352
352
|
leadingIcon?: React$1.ReactNode | null;
|
|
353
353
|
trailingIcon?: React$1.ReactNode | null;
|
|
354
354
|
}
|
|
355
|
-
declare const TextInput: React$1.
|
|
355
|
+
declare const TextInput: React$1.ForwardRefExoticComponent<TextInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
356
356
|
|
|
357
357
|
interface AutocompleteProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled" | "value" | "defaultValue" | "onChange"> {
|
|
358
358
|
label?: string;
|
|
@@ -382,7 +382,7 @@ interface AutocompleteProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEl
|
|
|
382
382
|
/** Optional className for the listbox (<ul>). */
|
|
383
383
|
listboxClassName?: string;
|
|
384
384
|
}
|
|
385
|
-
declare const Autocomplete: React$1.
|
|
385
|
+
declare const Autocomplete: React$1.ForwardRefExoticComponent<AutocompleteProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
386
386
|
|
|
387
387
|
type SelectStatus = "default" | "success" | "error";
|
|
388
388
|
interface SelectOption {
|
|
@@ -415,7 +415,7 @@ interface SelectProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
415
415
|
/** Force the menu open (used mainly for docs/Storybook states). */
|
|
416
416
|
showMenu?: boolean;
|
|
417
417
|
}
|
|
418
|
-
declare const Select: React$1.
|
|
418
|
+
declare const Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
419
419
|
|
|
420
420
|
type FieldStatus = "default" | "success" | "error";
|
|
421
421
|
interface FieldProps {
|
|
@@ -455,7 +455,7 @@ interface PasswordInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputE
|
|
|
455
455
|
leadingIcon?: React$1.ReactNode;
|
|
456
456
|
disabled?: boolean;
|
|
457
457
|
}
|
|
458
|
-
declare const PasswordInput: React$1.
|
|
458
|
+
declare const PasswordInput: React$1.ForwardRefExoticComponent<PasswordInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
459
459
|
|
|
460
460
|
type PhoneInputProps = Omit<React$1.ComponentProps<"input">, "onChange" | "value" | "ref" | "size"> & Omit<RPNInput.Props<typeof RPNInput.default>, "onChange"> & {
|
|
461
461
|
onChange?: (value: RPNInput.Value) => void;
|
|
@@ -501,7 +501,7 @@ interface RadioGroupProps extends Omit<RadioGroupPrimitive.RadioGroupProps, "chi
|
|
|
501
501
|
disabled?: boolean;
|
|
502
502
|
onValueChange?: (value: string) => void;
|
|
503
503
|
}
|
|
504
|
-
declare const RadioGroup: React$1.
|
|
504
|
+
declare const RadioGroup: React$1.ForwardRefExoticComponent<RadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
505
505
|
|
|
506
506
|
type SearchInputSize = "sm" | "md" | "lg" | "xl";
|
|
507
507
|
interface SearchInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled"> {
|
|
@@ -517,7 +517,7 @@ interface SearchInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEle
|
|
|
517
517
|
size?: SearchInputSize;
|
|
518
518
|
disabled?: boolean;
|
|
519
519
|
}
|
|
520
|
-
declare const SearchInput: React$1.
|
|
520
|
+
declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
521
521
|
|
|
522
522
|
type SliderDisplay = "flat" | "numeric" | "tooltip";
|
|
523
523
|
type SliderTooltipPlacement = "top" | "bottom";
|
|
@@ -560,7 +560,7 @@ type SliderRangeProps = SliderBaseProps & {
|
|
|
560
560
|
onValueChange?: (value: [number, number]) => void;
|
|
561
561
|
};
|
|
562
562
|
type SliderProps = SliderSingleProps | SliderRangeProps;
|
|
563
|
-
declare const Slider: React$1.
|
|
563
|
+
declare const Slider: React$1.ForwardRefExoticComponent<SliderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
564
564
|
|
|
565
565
|
type TextAreaType = "responsive" | "character-limit" | "plain";
|
|
566
566
|
interface TextAreaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "disabled"> {
|
|
@@ -593,7 +593,7 @@ interface TextAreaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextArea
|
|
|
593
593
|
*/
|
|
594
594
|
disabled?: boolean;
|
|
595
595
|
}
|
|
596
|
-
declare const TextArea: React$1.
|
|
596
|
+
declare const TextArea: React$1.ForwardRefExoticComponent<TextAreaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
597
597
|
|
|
598
598
|
interface ToggleProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
599
599
|
/**
|
|
@@ -603,7 +603,7 @@ interface ToggleProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>
|
|
|
603
603
|
name?: string;
|
|
604
604
|
label?: string;
|
|
605
605
|
}
|
|
606
|
-
declare const Toggle: React$1.
|
|
606
|
+
declare const Toggle: React$1.ForwardRefExoticComponent<ToggleProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
607
607
|
|
|
608
608
|
type WebsiteInputHierarchy = "leading" | "trailing";
|
|
609
609
|
interface WebsiteInputProps extends Omit<TextInputProps, "leadingIcon" | "trailingIcon"> {
|
|
@@ -622,7 +622,7 @@ interface WebsiteInputProps extends Omit<TextInputProps, "leadingIcon" | "traili
|
|
|
622
622
|
*/
|
|
623
623
|
icon?: React$1.ReactNode | null;
|
|
624
624
|
}
|
|
625
|
-
declare const WebsiteInput: React$1.
|
|
625
|
+
declare const WebsiteInput: React$1.ForwardRefExoticComponent<WebsiteInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
626
626
|
|
|
627
627
|
type PopoverPlacement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom";
|
|
628
628
|
interface PopoverProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -329,7 +329,7 @@ interface CheckboxProps extends React$1.ComponentPropsWithoutRef<typeof Checkbox
|
|
|
329
329
|
name?: string;
|
|
330
330
|
label?: string;
|
|
331
331
|
}
|
|
332
|
-
declare
|
|
332
|
+
declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
333
333
|
|
|
334
334
|
type TextInputSize = "sm" | "md" | "lg" | "xl";
|
|
335
335
|
type TextInputStatus = "default" | "success" | "error";
|
|
@@ -352,7 +352,7 @@ interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
|
|
|
352
352
|
leadingIcon?: React$1.ReactNode | null;
|
|
353
353
|
trailingIcon?: React$1.ReactNode | null;
|
|
354
354
|
}
|
|
355
|
-
declare const TextInput: React$1.
|
|
355
|
+
declare const TextInput: React$1.ForwardRefExoticComponent<TextInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
356
356
|
|
|
357
357
|
interface AutocompleteProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled" | "value" | "defaultValue" | "onChange"> {
|
|
358
358
|
label?: string;
|
|
@@ -382,7 +382,7 @@ interface AutocompleteProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEl
|
|
|
382
382
|
/** Optional className for the listbox (<ul>). */
|
|
383
383
|
listboxClassName?: string;
|
|
384
384
|
}
|
|
385
|
-
declare const Autocomplete: React$1.
|
|
385
|
+
declare const Autocomplete: React$1.ForwardRefExoticComponent<AutocompleteProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
386
386
|
|
|
387
387
|
type SelectStatus = "default" | "success" | "error";
|
|
388
388
|
interface SelectOption {
|
|
@@ -415,7 +415,7 @@ interface SelectProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
415
415
|
/** Force the menu open (used mainly for docs/Storybook states). */
|
|
416
416
|
showMenu?: boolean;
|
|
417
417
|
}
|
|
418
|
-
declare const Select: React$1.
|
|
418
|
+
declare const Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
419
419
|
|
|
420
420
|
type FieldStatus = "default" | "success" | "error";
|
|
421
421
|
interface FieldProps {
|
|
@@ -455,7 +455,7 @@ interface PasswordInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputE
|
|
|
455
455
|
leadingIcon?: React$1.ReactNode;
|
|
456
456
|
disabled?: boolean;
|
|
457
457
|
}
|
|
458
|
-
declare const PasswordInput: React$1.
|
|
458
|
+
declare const PasswordInput: React$1.ForwardRefExoticComponent<PasswordInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
459
459
|
|
|
460
460
|
type PhoneInputProps = Omit<React$1.ComponentProps<"input">, "onChange" | "value" | "ref" | "size"> & Omit<RPNInput.Props<typeof RPNInput.default>, "onChange"> & {
|
|
461
461
|
onChange?: (value: RPNInput.Value) => void;
|
|
@@ -501,7 +501,7 @@ interface RadioGroupProps extends Omit<RadioGroupPrimitive.RadioGroupProps, "chi
|
|
|
501
501
|
disabled?: boolean;
|
|
502
502
|
onValueChange?: (value: string) => void;
|
|
503
503
|
}
|
|
504
|
-
declare const RadioGroup: React$1.
|
|
504
|
+
declare const RadioGroup: React$1.ForwardRefExoticComponent<RadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
505
505
|
|
|
506
506
|
type SearchInputSize = "sm" | "md" | "lg" | "xl";
|
|
507
507
|
interface SearchInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled"> {
|
|
@@ -517,7 +517,7 @@ interface SearchInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEle
|
|
|
517
517
|
size?: SearchInputSize;
|
|
518
518
|
disabled?: boolean;
|
|
519
519
|
}
|
|
520
|
-
declare const SearchInput: React$1.
|
|
520
|
+
declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
521
521
|
|
|
522
522
|
type SliderDisplay = "flat" | "numeric" | "tooltip";
|
|
523
523
|
type SliderTooltipPlacement = "top" | "bottom";
|
|
@@ -560,7 +560,7 @@ type SliderRangeProps = SliderBaseProps & {
|
|
|
560
560
|
onValueChange?: (value: [number, number]) => void;
|
|
561
561
|
};
|
|
562
562
|
type SliderProps = SliderSingleProps | SliderRangeProps;
|
|
563
|
-
declare const Slider: React$1.
|
|
563
|
+
declare const Slider: React$1.ForwardRefExoticComponent<SliderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
564
564
|
|
|
565
565
|
type TextAreaType = "responsive" | "character-limit" | "plain";
|
|
566
566
|
interface TextAreaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "disabled"> {
|
|
@@ -593,7 +593,7 @@ interface TextAreaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextArea
|
|
|
593
593
|
*/
|
|
594
594
|
disabled?: boolean;
|
|
595
595
|
}
|
|
596
|
-
declare const TextArea: React$1.
|
|
596
|
+
declare const TextArea: React$1.ForwardRefExoticComponent<TextAreaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
597
597
|
|
|
598
598
|
interface ToggleProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
599
599
|
/**
|
|
@@ -603,7 +603,7 @@ interface ToggleProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>
|
|
|
603
603
|
name?: string;
|
|
604
604
|
label?: string;
|
|
605
605
|
}
|
|
606
|
-
declare const Toggle: React$1.
|
|
606
|
+
declare const Toggle: React$1.ForwardRefExoticComponent<ToggleProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
607
607
|
|
|
608
608
|
type WebsiteInputHierarchy = "leading" | "trailing";
|
|
609
609
|
interface WebsiteInputProps extends Omit<TextInputProps, "leadingIcon" | "trailingIcon"> {
|
|
@@ -622,7 +622,7 @@ interface WebsiteInputProps extends Omit<TextInputProps, "leadingIcon" | "traili
|
|
|
622
622
|
*/
|
|
623
623
|
icon?: React$1.ReactNode | null;
|
|
624
624
|
}
|
|
625
|
-
declare const WebsiteInput: React$1.
|
|
625
|
+
declare const WebsiteInput: React$1.ForwardRefExoticComponent<WebsiteInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
626
626
|
|
|
627
627
|
type PopoverPlacement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom";
|
|
628
628
|
interface PopoverProps {
|
package/dist/index.js
CHANGED
|
@@ -69,10 +69,10 @@ var buttonVariants = cva(
|
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
size: {
|
|
72
|
-
sm: ["px-
|
|
73
|
-
md: ["px-
|
|
74
|
-
lg: ["px-
|
|
75
|
-
xl: ["px-
|
|
72
|
+
sm: ["px-3", "py-1", "gap-2", "h-9"],
|
|
73
|
+
md: ["px-4", "py-2", "gap-2", "h-10"],
|
|
74
|
+
lg: ["px-4", "py-2", "gap-2.5", "h-11"],
|
|
75
|
+
xl: ["px-4", "py-2", "gap-3", "h-12"]
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
defaultVariants: {
|
|
@@ -1507,16 +1507,17 @@ var MenuSubContent = DropdownMenuSubContent;
|
|
|
1507
1507
|
var MenuSubTrigger = DropdownMenuSubTrigger;
|
|
1508
1508
|
|
|
1509
1509
|
// src/components/Inputs/Checkbox.tsx
|
|
1510
|
-
import "react";
|
|
1510
|
+
import * as React20 from "react";
|
|
1511
1511
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
1512
1512
|
import { CheckIcon as CheckIcon2 } from "@bubo-squared/icons";
|
|
1513
1513
|
import { MinusIcon } from "@bubo-squared/icons";
|
|
1514
1514
|
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1515
|
-
|
|
1515
|
+
var Checkbox = React20.forwardRef(({ label, className, ...props }, forwardedRef) => {
|
|
1516
1516
|
return /* @__PURE__ */ jsxs14("label", { className: "inline-flex items-center gap-(--space-12) cursor-pointer select-none", children: [
|
|
1517
1517
|
/* @__PURE__ */ jsx22(
|
|
1518
1518
|
CheckboxPrimitive.Root,
|
|
1519
1519
|
{
|
|
1520
|
+
ref: forwardedRef,
|
|
1520
1521
|
className: cn(
|
|
1521
1522
|
"group flex h-5 w-5 items-center justify-center rounded-2 border border-(--border-secondary) bg-(--background-neutral) text-primary-inverse",
|
|
1522
1523
|
"data-[state=checked]:bg-(--background-brand) data-[state=checked]:text-button-white data-[state=checked]:border-none",
|
|
@@ -1538,7 +1539,8 @@ function Checkbox({ label, className, ...props }) {
|
|
|
1538
1539
|
),
|
|
1539
1540
|
label && /* @__PURE__ */ jsx22("span", { className: "paragraph-md-medium text-primary", children: label })
|
|
1540
1541
|
] });
|
|
1541
|
-
}
|
|
1542
|
+
});
|
|
1543
|
+
Checkbox.displayName = "Checkbox";
|
|
1542
1544
|
|
|
1543
1545
|
// src/components/Inputs/Autocomplete.tsx
|
|
1544
1546
|
import * as React23 from "react";
|
|
@@ -1671,7 +1673,7 @@ var iconWrapperVariants = cva14(
|
|
|
1671
1673
|
}
|
|
1672
1674
|
}
|
|
1673
1675
|
);
|
|
1674
|
-
var Autocomplete = (props) => {
|
|
1676
|
+
var Autocomplete = React23.forwardRef((props, forwardedRef) => {
|
|
1675
1677
|
const {
|
|
1676
1678
|
label,
|
|
1677
1679
|
hint,
|
|
@@ -1712,6 +1714,18 @@ var Autocomplete = (props) => {
|
|
|
1712
1714
|
const [isFocused, setIsFocused] = React23.useState(false);
|
|
1713
1715
|
const [activeIndex, setActiveIndex] = React23.useState(-1);
|
|
1714
1716
|
const inputRef = React23.useRef(null);
|
|
1717
|
+
const setInputRef = React23.useCallback(
|
|
1718
|
+
(node) => {
|
|
1719
|
+
inputRef.current = node;
|
|
1720
|
+
if (!forwardedRef) return;
|
|
1721
|
+
if (typeof forwardedRef === "function") {
|
|
1722
|
+
forwardedRef(node);
|
|
1723
|
+
} else {
|
|
1724
|
+
forwardedRef.current = node;
|
|
1725
|
+
}
|
|
1726
|
+
},
|
|
1727
|
+
[forwardedRef]
|
|
1728
|
+
);
|
|
1715
1729
|
const baseId = React23.useId();
|
|
1716
1730
|
const inputId = id ?? baseId;
|
|
1717
1731
|
const listboxId = `${inputId}-listbox`;
|
|
@@ -1824,7 +1838,7 @@ var Autocomplete = (props) => {
|
|
|
1824
1838
|
/* @__PURE__ */ jsx25(
|
|
1825
1839
|
Input,
|
|
1826
1840
|
{
|
|
1827
|
-
ref:
|
|
1841
|
+
ref: setInputRef,
|
|
1828
1842
|
id: inputId,
|
|
1829
1843
|
type: "text",
|
|
1830
1844
|
disabled: disabled ?? void 0,
|
|
@@ -1899,7 +1913,7 @@ var Autocomplete = (props) => {
|
|
|
1899
1913
|
}
|
|
1900
1914
|
)
|
|
1901
1915
|
] }) });
|
|
1902
|
-
};
|
|
1916
|
+
});
|
|
1903
1917
|
Autocomplete.displayName = "Autocomplete";
|
|
1904
1918
|
|
|
1905
1919
|
// src/components/Inputs/Select.tsx
|
|
@@ -1982,7 +1996,7 @@ var selectButtonVariants = cva15(
|
|
|
1982
1996
|
}
|
|
1983
1997
|
}
|
|
1984
1998
|
);
|
|
1985
|
-
var Select = (props) => {
|
|
1999
|
+
var Select = React24.forwardRef((props, forwardedRef) => {
|
|
1986
2000
|
const {
|
|
1987
2001
|
label = "Field Label",
|
|
1988
2002
|
hint = "This is a hint text to help user.",
|
|
@@ -2057,6 +2071,7 @@ var Select = (props) => {
|
|
|
2057
2071
|
/* @__PURE__ */ jsx26(SelectPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs16(
|
|
2058
2072
|
"button",
|
|
2059
2073
|
{
|
|
2074
|
+
ref: forwardedRef,
|
|
2060
2075
|
type: "button",
|
|
2061
2076
|
"aria-haspopup": "listbox",
|
|
2062
2077
|
"aria-expanded": isOpen,
|
|
@@ -2131,7 +2146,7 @@ var Select = (props) => {
|
|
|
2131
2146
|
)
|
|
2132
2147
|
}
|
|
2133
2148
|
);
|
|
2134
|
-
};
|
|
2149
|
+
});
|
|
2135
2150
|
Select.displayName = "Select";
|
|
2136
2151
|
|
|
2137
2152
|
// src/components/Inputs/PasswordInput.tsx
|
|
@@ -2195,7 +2210,7 @@ var actionButtonVariants = cva16(
|
|
|
2195
2210
|
}
|
|
2196
2211
|
}
|
|
2197
2212
|
);
|
|
2198
|
-
var PasswordInput = (props) => {
|
|
2213
|
+
var PasswordInput = React25.forwardRef((props, forwardedRef) => {
|
|
2199
2214
|
const {
|
|
2200
2215
|
label,
|
|
2201
2216
|
hint,
|
|
@@ -2219,6 +2234,18 @@ var PasswordInput = (props) => {
|
|
|
2219
2234
|
const [isRevealed, setIsRevealed] = React25.useState(false);
|
|
2220
2235
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
2221
2236
|
const inputRef = React25.useRef(null);
|
|
2237
|
+
const setInputRef = React25.useCallback(
|
|
2238
|
+
(node) => {
|
|
2239
|
+
inputRef.current = node;
|
|
2240
|
+
if (!forwardedRef) return;
|
|
2241
|
+
if (typeof forwardedRef === "function") {
|
|
2242
|
+
forwardedRef(node);
|
|
2243
|
+
} else {
|
|
2244
|
+
forwardedRef.current = node;
|
|
2245
|
+
}
|
|
2246
|
+
},
|
|
2247
|
+
[forwardedRef]
|
|
2248
|
+
);
|
|
2222
2249
|
const showLeadingIcon = !!leadingIcon;
|
|
2223
2250
|
const handleContainerClick = () => {
|
|
2224
2251
|
if (disabled) return;
|
|
@@ -2259,7 +2286,7 @@ var PasswordInput = (props) => {
|
|
|
2259
2286
|
/* @__PURE__ */ jsx27(
|
|
2260
2287
|
Input,
|
|
2261
2288
|
{
|
|
2262
|
-
ref:
|
|
2289
|
+
ref: setInputRef,
|
|
2263
2290
|
type: isRevealed ? "text" : "password",
|
|
2264
2291
|
disabled: disabled ?? void 0,
|
|
2265
2292
|
placeholder,
|
|
@@ -2294,7 +2321,7 @@ var PasswordInput = (props) => {
|
|
|
2294
2321
|
)
|
|
2295
2322
|
}
|
|
2296
2323
|
);
|
|
2297
|
-
};
|
|
2324
|
+
});
|
|
2298
2325
|
PasswordInput.displayName = "PasswordInput";
|
|
2299
2326
|
|
|
2300
2327
|
// src/components/Inputs/PhoneInput.tsx
|
|
@@ -2365,7 +2392,7 @@ import "react";
|
|
|
2365
2392
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2366
2393
|
|
|
2367
2394
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
2368
|
-
import { forwardRef as
|
|
2395
|
+
import { forwardRef as forwardRef19, createElement as createElement2 } from "react";
|
|
2369
2396
|
|
|
2370
2397
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
2371
2398
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -2389,7 +2416,7 @@ var hasA11yProp = (props) => {
|
|
|
2389
2416
|
};
|
|
2390
2417
|
|
|
2391
2418
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
|
|
2392
|
-
import { forwardRef as
|
|
2419
|
+
import { forwardRef as forwardRef18, createElement } from "react";
|
|
2393
2420
|
|
|
2394
2421
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
2395
2422
|
var defaultAttributes = {
|
|
@@ -2405,7 +2432,7 @@ var defaultAttributes = {
|
|
|
2405
2432
|
};
|
|
2406
2433
|
|
|
2407
2434
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
|
|
2408
|
-
var Icon2 =
|
|
2435
|
+
var Icon2 = forwardRef18(
|
|
2409
2436
|
({
|
|
2410
2437
|
color = "currentColor",
|
|
2411
2438
|
size = 24,
|
|
@@ -2437,7 +2464,7 @@ var Icon2 = forwardRef14(
|
|
|
2437
2464
|
|
|
2438
2465
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
2439
2466
|
var createLucideIcon = (iconName, iconNode) => {
|
|
2440
|
-
const Component =
|
|
2467
|
+
const Component = forwardRef19(
|
|
2441
2468
|
({ className, ...props }, ref) => createElement2(Icon2, {
|
|
2442
2469
|
ref,
|
|
2443
2470
|
iconNode,
|
|
@@ -2941,19 +2968,20 @@ var FlagComponent = ({ country, countryName }) => {
|
|
|
2941
2968
|
import * as React32 from "react";
|
|
2942
2969
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2943
2970
|
import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2944
|
-
var RadioGroup = ({
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2971
|
+
var RadioGroup = React32.forwardRef((props, forwardedRef) => {
|
|
2972
|
+
const {
|
|
2973
|
+
label,
|
|
2974
|
+
hint,
|
|
2975
|
+
hideHint,
|
|
2976
|
+
options,
|
|
2977
|
+
orientation = "vertical",
|
|
2978
|
+
disabled = false,
|
|
2979
|
+
value,
|
|
2980
|
+
defaultValue,
|
|
2981
|
+
onValueChange,
|
|
2982
|
+
className,
|
|
2983
|
+
...rootProps
|
|
2984
|
+
} = props;
|
|
2957
2985
|
const groupId = React32.useId();
|
|
2958
2986
|
const hintId = hint ? `${groupId}-hint` : void 0;
|
|
2959
2987
|
const handleValueChange = (next) => {
|
|
@@ -2970,6 +2998,7 @@ var RadioGroup = ({
|
|
|
2970
2998
|
children: /* @__PURE__ */ jsx34(
|
|
2971
2999
|
RadioGroupPrimitive.Root,
|
|
2972
3000
|
{
|
|
3001
|
+
ref: forwardedRef,
|
|
2973
3002
|
...rootProps,
|
|
2974
3003
|
value,
|
|
2975
3004
|
defaultValue,
|
|
@@ -3050,7 +3079,8 @@ var RadioGroup = ({
|
|
|
3050
3079
|
)
|
|
3051
3080
|
}
|
|
3052
3081
|
);
|
|
3053
|
-
};
|
|
3082
|
+
});
|
|
3083
|
+
RadioGroup.displayName = "RadioGroup";
|
|
3054
3084
|
|
|
3055
3085
|
// src/components/Inputs/SearchInput.tsx
|
|
3056
3086
|
import * as React33 from "react";
|
|
@@ -3086,7 +3116,7 @@ var iconWrapperVariants3 = cva19("flex items-center justify-center shrink-0 text
|
|
|
3086
3116
|
size: "lg"
|
|
3087
3117
|
}
|
|
3088
3118
|
});
|
|
3089
|
-
var SearchInput = (props) => {
|
|
3119
|
+
var SearchInput = React33.forwardRef((props, forwardedRef) => {
|
|
3090
3120
|
const {
|
|
3091
3121
|
placeholder = "Search...",
|
|
3092
3122
|
size = "lg",
|
|
@@ -3098,6 +3128,18 @@ var SearchInput = (props) => {
|
|
|
3098
3128
|
...inputProps
|
|
3099
3129
|
} = props;
|
|
3100
3130
|
const inputRef = React33.useRef(null);
|
|
3131
|
+
const setInputRef = React33.useCallback(
|
|
3132
|
+
(node) => {
|
|
3133
|
+
inputRef.current = node;
|
|
3134
|
+
if (!forwardedRef) return;
|
|
3135
|
+
if (typeof forwardedRef === "function") {
|
|
3136
|
+
forwardedRef(node);
|
|
3137
|
+
} else {
|
|
3138
|
+
forwardedRef.current = node;
|
|
3139
|
+
}
|
|
3140
|
+
},
|
|
3141
|
+
[forwardedRef]
|
|
3142
|
+
);
|
|
3101
3143
|
const handleContainerClick = () => {
|
|
3102
3144
|
if (disabled) return;
|
|
3103
3145
|
inputRef.current?.focus();
|
|
@@ -3116,7 +3158,7 @@ var SearchInput = (props) => {
|
|
|
3116
3158
|
/* @__PURE__ */ jsx35(
|
|
3117
3159
|
Input,
|
|
3118
3160
|
{
|
|
3119
|
-
ref:
|
|
3161
|
+
ref: setInputRef,
|
|
3120
3162
|
type: "search",
|
|
3121
3163
|
placeholder,
|
|
3122
3164
|
disabled: disabled ?? void 0,
|
|
@@ -3131,7 +3173,7 @@ var SearchInput = (props) => {
|
|
|
3131
3173
|
]
|
|
3132
3174
|
}
|
|
3133
3175
|
) }) });
|
|
3134
|
-
};
|
|
3176
|
+
});
|
|
3135
3177
|
SearchInput.displayName = "SearchInput";
|
|
3136
3178
|
|
|
3137
3179
|
// src/components/Inputs/Slider.tsx
|
|
@@ -3234,7 +3276,7 @@ var toArray = (value) => {
|
|
|
3234
3276
|
if (value === void 0) return void 0;
|
|
3235
3277
|
return Array.isArray(value) ? value : [value];
|
|
3236
3278
|
};
|
|
3237
|
-
var Slider = (props) => {
|
|
3279
|
+
var Slider = React35.forwardRef((props, forwardedRef) => {
|
|
3238
3280
|
const {
|
|
3239
3281
|
name,
|
|
3240
3282
|
display = "flat",
|
|
@@ -3550,6 +3592,7 @@ var Slider = (props) => {
|
|
|
3550
3592
|
{
|
|
3551
3593
|
className: wrapperBase,
|
|
3552
3594
|
style: { marginInline: `${thumbRadius}px` },
|
|
3595
|
+
ref: forwardedRef,
|
|
3553
3596
|
children: [
|
|
3554
3597
|
name && /* @__PURE__ */ jsxs25(Fragment2, { children: [
|
|
3555
3598
|
/* @__PURE__ */ jsx37(
|
|
@@ -3615,14 +3658,14 @@ var Slider = (props) => {
|
|
|
3615
3658
|
]
|
|
3616
3659
|
}
|
|
3617
3660
|
);
|
|
3618
|
-
};
|
|
3661
|
+
});
|
|
3619
3662
|
Slider.displayName = "Slider";
|
|
3620
3663
|
|
|
3621
3664
|
// src/components/Inputs/TextArea.tsx
|
|
3622
3665
|
import * as React36 from "react";
|
|
3623
3666
|
import { MaximizeIcon } from "@bubo-squared/icons";
|
|
3624
3667
|
import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3625
|
-
var TextArea = (props) => {
|
|
3668
|
+
var TextArea = React36.forwardRef((props, forwardedRef) => {
|
|
3626
3669
|
const {
|
|
3627
3670
|
label,
|
|
3628
3671
|
hint,
|
|
@@ -3651,6 +3694,18 @@ var TextArea = (props) => {
|
|
|
3651
3694
|
const showCharacterLimit = type === "character-limit" && typeof effectiveMaxLength === "number";
|
|
3652
3695
|
const textareaRef = React36.useRef(null);
|
|
3653
3696
|
const containerRef = React36.useRef(null);
|
|
3697
|
+
const setTextareaRef = React36.useCallback(
|
|
3698
|
+
(node) => {
|
|
3699
|
+
textareaRef.current = node;
|
|
3700
|
+
if (!forwardedRef) return;
|
|
3701
|
+
if (typeof forwardedRef === "function") {
|
|
3702
|
+
forwardedRef(node);
|
|
3703
|
+
} else {
|
|
3704
|
+
forwardedRef.current = node;
|
|
3705
|
+
}
|
|
3706
|
+
},
|
|
3707
|
+
[forwardedRef]
|
|
3708
|
+
);
|
|
3654
3709
|
const [height, setHeight] = React36.useState(void 0);
|
|
3655
3710
|
const [width, setWidth] = React36.useState(void 0);
|
|
3656
3711
|
const minHeight = 80;
|
|
@@ -3735,7 +3790,7 @@ var TextArea = (props) => {
|
|
|
3735
3790
|
{
|
|
3736
3791
|
id: textareaId,
|
|
3737
3792
|
name,
|
|
3738
|
-
ref:
|
|
3793
|
+
ref: setTextareaRef,
|
|
3739
3794
|
disabled: disabled ?? void 0,
|
|
3740
3795
|
value: isControlled ? value : currentValue,
|
|
3741
3796
|
defaultValue: isControlled ? void 0 : defaultValue,
|
|
@@ -3786,7 +3841,7 @@ var TextArea = (props) => {
|
|
|
3786
3841
|
)
|
|
3787
3842
|
}
|
|
3788
3843
|
);
|
|
3789
|
-
};
|
|
3844
|
+
});
|
|
3790
3845
|
TextArea.displayName = "TextArea";
|
|
3791
3846
|
|
|
3792
3847
|
// src/components/Inputs/TextInput.tsx
|
|
@@ -3825,7 +3880,7 @@ var iconWrapperVariants4 = cva20(
|
|
|
3825
3880
|
}
|
|
3826
3881
|
}
|
|
3827
3882
|
);
|
|
3828
|
-
var TextInput = (props) => {
|
|
3883
|
+
var TextInput = React37.forwardRef((props, forwardedRef) => {
|
|
3829
3884
|
const {
|
|
3830
3885
|
label,
|
|
3831
3886
|
hint,
|
|
@@ -3848,6 +3903,18 @@ var TextInput = (props) => {
|
|
|
3848
3903
|
);
|
|
3849
3904
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
3850
3905
|
const inputRef = React37.useRef(null);
|
|
3906
|
+
const setInputRef = React37.useCallback(
|
|
3907
|
+
(node) => {
|
|
3908
|
+
inputRef.current = node;
|
|
3909
|
+
if (!forwardedRef) return;
|
|
3910
|
+
if (typeof forwardedRef === "function") {
|
|
3911
|
+
forwardedRef(node);
|
|
3912
|
+
} else {
|
|
3913
|
+
forwardedRef.current = node;
|
|
3914
|
+
}
|
|
3915
|
+
},
|
|
3916
|
+
[forwardedRef]
|
|
3917
|
+
);
|
|
3851
3918
|
const handleContainerClick = () => {
|
|
3852
3919
|
if (disabled) return;
|
|
3853
3920
|
inputRef.current?.focus();
|
|
@@ -3889,7 +3956,7 @@ var TextInput = (props) => {
|
|
|
3889
3956
|
/* @__PURE__ */ jsx39(
|
|
3890
3957
|
Input,
|
|
3891
3958
|
{
|
|
3892
|
-
ref:
|
|
3959
|
+
ref: setInputRef,
|
|
3893
3960
|
type: "text",
|
|
3894
3961
|
disabled: disabled ?? void 0,
|
|
3895
3962
|
placeholder,
|
|
@@ -3918,13 +3985,13 @@ var TextInput = (props) => {
|
|
|
3918
3985
|
)
|
|
3919
3986
|
}
|
|
3920
3987
|
);
|
|
3921
|
-
};
|
|
3988
|
+
});
|
|
3922
3989
|
TextInput.displayName = "TextInput";
|
|
3923
3990
|
|
|
3924
3991
|
// src/components/Inputs/Toggle.tsx
|
|
3925
|
-
import "react";
|
|
3992
|
+
import * as React38 from "react";
|
|
3926
3993
|
import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3927
|
-
var Toggle = (props) => {
|
|
3994
|
+
var Toggle = React38.forwardRef((props, forwardedRef) => {
|
|
3928
3995
|
const { label, className, disabled, ...inputProps } = props;
|
|
3929
3996
|
return /* @__PURE__ */ jsxs28(
|
|
3930
3997
|
"label",
|
|
@@ -3938,6 +4005,7 @@ var Toggle = (props) => {
|
|
|
3938
4005
|
/* @__PURE__ */ jsx40(
|
|
3939
4006
|
"input",
|
|
3940
4007
|
{
|
|
4008
|
+
ref: forwardedRef,
|
|
3941
4009
|
type: "checkbox",
|
|
3942
4010
|
disabled,
|
|
3943
4011
|
className: "peer sr-only",
|
|
@@ -4009,13 +4077,13 @@ var Toggle = (props) => {
|
|
|
4009
4077
|
]
|
|
4010
4078
|
}
|
|
4011
4079
|
);
|
|
4012
|
-
};
|
|
4080
|
+
});
|
|
4013
4081
|
Toggle.displayName = "Toggle";
|
|
4014
4082
|
|
|
4015
4083
|
// src/components/Inputs/WebsiteInput.tsx
|
|
4016
|
-
import "react";
|
|
4084
|
+
import * as React39 from "react";
|
|
4017
4085
|
import { jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4018
|
-
var WebsiteInput = (props) => {
|
|
4086
|
+
var WebsiteInput = React39.forwardRef((props, forwardedRef) => {
|
|
4019
4087
|
const {
|
|
4020
4088
|
hierarchy = "leading",
|
|
4021
4089
|
protocolLabel = "http://",
|
|
@@ -4062,6 +4130,7 @@ var WebsiteInput = (props) => {
|
|
|
4062
4130
|
return /* @__PURE__ */ jsx41(
|
|
4063
4131
|
TextInput,
|
|
4064
4132
|
{
|
|
4133
|
+
ref: forwardedRef,
|
|
4065
4134
|
...rest,
|
|
4066
4135
|
size,
|
|
4067
4136
|
disabled,
|
|
@@ -4070,7 +4139,7 @@ var WebsiteInput = (props) => {
|
|
|
4070
4139
|
trailingIcon: !isLeading ? trailingAddon : void 0
|
|
4071
4140
|
}
|
|
4072
4141
|
);
|
|
4073
|
-
};
|
|
4142
|
+
});
|
|
4074
4143
|
WebsiteInput.displayName = "WebsiteInput";
|
|
4075
4144
|
|
|
4076
4145
|
// src/components/Feedback/Popover.tsx
|