@vygruppen/spor-react 12.8.3 → 12.8.5
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/.turbo/turbo-build.log +12 -12
- package/.turbo/turbo-postinstall.log +1 -1
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +38 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +38 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/input/Combobox.tsx +42 -8
package/dist/index.d.cts
CHANGED
@@ -1186,7 +1186,6 @@ type ComboboxProps<T> = Exclude<InputProps, "variant" | "colorPalette" | "size">
|
|
1186
1186
|
leftIcon?: ReactNode;
|
1187
1187
|
rightIcon?: ReactNode;
|
1188
1188
|
variant?: "core" | "floating";
|
1189
|
-
children?: React__default.ReactNode;
|
1190
1189
|
};
|
1191
1190
|
/**
|
1192
1191
|
* A combobox is a combination of an input and a list of suggestions.
|
package/dist/index.d.ts
CHANGED
@@ -1186,7 +1186,6 @@ type ComboboxProps<T> = Exclude<InputProps, "variant" | "colorPalette" | "size">
|
|
1186
1186
|
leftIcon?: ReactNode;
|
1187
1187
|
rightIcon?: ReactNode;
|
1188
1188
|
variant?: "core" | "floating";
|
1189
|
-
children?: React__default.ReactNode;
|
1190
1189
|
};
|
1191
1190
|
/**
|
1192
1191
|
* A combobox is a combination of an input and a list of suggestions.
|
package/dist/index.mjs
CHANGED
@@ -2596,6 +2596,17 @@ var Combobox = (props) => {
|
|
2596
2596
|
inputRef: externalInputRef,
|
2597
2597
|
children,
|
2598
2598
|
variant,
|
2599
|
+
allowsEmptyCollection,
|
2600
|
+
onSelectionChange,
|
2601
|
+
inputValue,
|
2602
|
+
onInputChange,
|
2603
|
+
menuTrigger,
|
2604
|
+
allowsCustomValue,
|
2605
|
+
onFocusChange,
|
2606
|
+
defaultInputValue,
|
2607
|
+
defaultItems,
|
2608
|
+
defaultSelectedKey,
|
2609
|
+
onOpenChange,
|
2599
2610
|
...restProps
|
2600
2611
|
} = props;
|
2601
2612
|
const { contains } = useFilter({ sensitivity: "base" });
|
@@ -2603,11 +2614,22 @@ var Combobox = (props) => {
|
|
2603
2614
|
const inputRef = externalInputRef ?? fallbackInputRef;
|
2604
2615
|
const listBoxRef = useRef(null);
|
2605
2616
|
const popoverRef = useRef(null);
|
2606
|
-
const listboxId =
|
2617
|
+
const listboxId = useId();
|
2607
2618
|
const inputWidth = useInputWidth(inputRef);
|
2608
2619
|
const state = useComboBoxState({
|
2609
2620
|
defaultFilter: contains,
|
2610
2621
|
shouldCloseOnBlur: true,
|
2622
|
+
allowsEmptyCollection,
|
2623
|
+
onSelectionChange,
|
2624
|
+
inputValue,
|
2625
|
+
onInputChange,
|
2626
|
+
menuTrigger,
|
2627
|
+
allowsCustomValue,
|
2628
|
+
onFocusChange,
|
2629
|
+
defaultInputValue,
|
2630
|
+
defaultItems,
|
2631
|
+
defaultSelectedKey,
|
2632
|
+
onOpenChange,
|
2611
2633
|
...props
|
2612
2634
|
});
|
2613
2635
|
const comboBoxProps = {
|
@@ -2624,22 +2646,29 @@ var Combobox = (props) => {
|
|
2624
2646
|
paddingTop,
|
2625
2647
|
paddingLeft,
|
2626
2648
|
paddingX,
|
2627
|
-
paddingY
|
2628
|
-
leftIcon
|
2649
|
+
paddingY
|
2629
2650
|
};
|
2630
|
-
const {
|
2631
|
-
inputProps: { ...inputProps },
|
2632
|
-
listBoxProps
|
2633
|
-
} = useComboBox(
|
2651
|
+
const { inputProps, listBoxProps } = useComboBox(
|
2634
2652
|
{
|
2635
2653
|
...props,
|
2636
2654
|
inputRef,
|
2637
2655
|
listBoxRef,
|
2638
2656
|
popoverRef,
|
2639
|
-
label
|
2657
|
+
label,
|
2658
|
+
onSelectionChange,
|
2659
|
+
inputValue,
|
2660
|
+
onInputChange,
|
2661
|
+
menuTrigger,
|
2662
|
+
allowsCustomValue,
|
2663
|
+
onFocusChange,
|
2664
|
+
defaultInputValue,
|
2665
|
+
defaultItems,
|
2666
|
+
defaultSelectedKey,
|
2667
|
+
onOpenChange
|
2640
2668
|
},
|
2641
2669
|
state
|
2642
2670
|
);
|
2671
|
+
const { "aria-labelledby": _, id: __, ...filteredInputProps } = inputProps;
|
2643
2672
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
2644
2673
|
/* @__PURE__ */ jsx(
|
2645
2674
|
Input,
|
@@ -2662,7 +2691,7 @@ var Combobox = (props) => {
|
|
2662
2691
|
borderBottomLeftRadius: state.isOpen && !loading ? 0 : borderBottomLeftRadius,
|
2663
2692
|
borderBottomRightRadius: state.isOpen && !loading ? 0 : borderBottomRightRadius,
|
2664
2693
|
_active: { backgroundColor: "core.surface.active" },
|
2665
|
-
...
|
2694
|
+
...filteredInputProps,
|
2666
2695
|
startElement: leftIcon,
|
2667
2696
|
endElement: loading ? /* @__PURE__ */ jsx(
|
2668
2697
|
ColorSpinner,
|