@vesture/react 0.2.1 → 0.2.2

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.js CHANGED
@@ -2620,6 +2620,584 @@ function DateRangePicker({
2620
2620
  );
2621
2621
  }
2622
2622
 
2623
+ // src/components/NumberInput/NumberInput.tsx
2624
+ import { forwardRef as forwardRef14, useEffect as useEffect5, useRef as useRef6, useState as useState12 } from "react";
2625
+ import { useMergeRefs as useMergeRefs5 } from "@floating-ui/react";
2626
+
2627
+ // src/components/NumberInput/NumberInput.css.ts
2628
+ var input2 = "NumberInput_input__1vx30yr1";
2629
+ var stepButton = "NumberInput_stepButton__1vx30yr3";
2630
+ var stepperGroup = "NumberInput_stepperGroup__1vx30yr2";
2631
+ var wrapper8 = "NumberInput_wrapper__1vx30yr0";
2632
+
2633
+ // src/components/NumberInput/NumberInput.tsx
2634
+ import { jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
2635
+ function clamp(value, min, max) {
2636
+ let result = value;
2637
+ if (min !== void 0) result = Math.max(min, result);
2638
+ if (max !== void 0) result = Math.min(max, result);
2639
+ return result;
2640
+ }
2641
+ function formatValue(value) {
2642
+ return value === null ? "" : String(value);
2643
+ }
2644
+ var NumberInput = forwardRef14(function NumberInput2({
2645
+ value: controlledValue,
2646
+ defaultValue = null,
2647
+ onChange,
2648
+ min,
2649
+ max,
2650
+ step = 1,
2651
+ disabled = false,
2652
+ invalid,
2653
+ placeholder,
2654
+ id,
2655
+ name,
2656
+ className,
2657
+ ...rest
2658
+ }, ref) {
2659
+ const [uncontrolledValue, setUncontrolledValue] = useState12(defaultValue);
2660
+ const value = controlledValue !== void 0 ? controlledValue : uncontrolledValue;
2661
+ const setValue = (next) => {
2662
+ if (controlledValue === void 0) {
2663
+ setUncontrolledValue(next);
2664
+ }
2665
+ onChange?.(next);
2666
+ };
2667
+ const [inputText, setInputText] = useState12(() => formatValue(value));
2668
+ useEffect5(() => {
2669
+ setInputText(formatValue(value));
2670
+ }, [value]);
2671
+ const inputRef = useRef6(null);
2672
+ const mergedRef = useMergeRefs5([inputRef, ref]);
2673
+ const commitTypedValue = () => {
2674
+ const trimmed = inputText.trim();
2675
+ if (!trimmed) {
2676
+ if (value !== null) setValue(null);
2677
+ return;
2678
+ }
2679
+ const parsed = Number(trimmed);
2680
+ if (Number.isNaN(parsed)) {
2681
+ setInputText(formatValue(value));
2682
+ return;
2683
+ }
2684
+ const clamped = clamp(parsed, min, max);
2685
+ setValue(clamped);
2686
+ setInputText(formatValue(clamped));
2687
+ };
2688
+ const step2 = (direction2) => {
2689
+ if (disabled) return;
2690
+ const base2 = value ?? min ?? 0;
2691
+ const next = clamp(base2 + direction2 * step, min, max);
2692
+ setValue(next);
2693
+ setInputText(formatValue(next));
2694
+ inputRef.current?.focus();
2695
+ };
2696
+ const handleKeyDown = (event) => {
2697
+ if (event.key === "Enter") {
2698
+ event.preventDefault();
2699
+ commitTypedValue();
2700
+ return;
2701
+ }
2702
+ if (event.key === "ArrowUp") {
2703
+ event.preventDefault();
2704
+ step2(1);
2705
+ return;
2706
+ }
2707
+ if (event.key === "ArrowDown") {
2708
+ event.preventDefault();
2709
+ step2(-1);
2710
+ return;
2711
+ }
2712
+ if (event.key === "Home" && min !== void 0) {
2713
+ event.preventDefault();
2714
+ setValue(min);
2715
+ setInputText(formatValue(min));
2716
+ return;
2717
+ }
2718
+ if (event.key === "End" && max !== void 0) {
2719
+ event.preventDefault();
2720
+ setValue(max);
2721
+ setInputText(formatValue(max));
2722
+ }
2723
+ };
2724
+ const handleBlur = (_event) => {
2725
+ commitTypedValue();
2726
+ };
2727
+ const classes = [wrapper8, className].filter(Boolean).join(" ");
2728
+ return /* @__PURE__ */ jsxs21("span", { className: classes, "data-disabled": disabled || void 0, children: [
2729
+ /* @__PURE__ */ jsx38(
2730
+ "input",
2731
+ {
2732
+ ref: mergedRef,
2733
+ id,
2734
+ name,
2735
+ type: "text",
2736
+ inputMode: "decimal",
2737
+ className: input2,
2738
+ value: inputText,
2739
+ placeholder,
2740
+ disabled,
2741
+ role: "spinbutton",
2742
+ "aria-valuenow": value ?? void 0,
2743
+ "aria-valuemin": min,
2744
+ "aria-valuemax": max,
2745
+ "aria-invalid": invalid || void 0,
2746
+ onChange: (e) => setInputText(e.target.value),
2747
+ onBlur: handleBlur,
2748
+ onKeyDown: handleKeyDown,
2749
+ ...rest
2750
+ }
2751
+ ),
2752
+ /* @__PURE__ */ jsxs21("span", { className: stepperGroup, children: [
2753
+ /* @__PURE__ */ jsx38(
2754
+ "button",
2755
+ {
2756
+ type: "button",
2757
+ tabIndex: -1,
2758
+ className: stepButton,
2759
+ disabled: disabled || max !== void 0 && value !== null && value >= max,
2760
+ "aria-label": "Increment",
2761
+ onClick: () => step2(1),
2762
+ children: /* @__PURE__ */ jsx38("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx38("path", { d: "M1 5l3-3 3 3", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) })
2763
+ }
2764
+ ),
2765
+ /* @__PURE__ */ jsx38(
2766
+ "button",
2767
+ {
2768
+ type: "button",
2769
+ tabIndex: -1,
2770
+ className: stepButton,
2771
+ disabled: disabled || min !== void 0 && value !== null && value <= min,
2772
+ "aria-label": "Decrement",
2773
+ onClick: () => step2(-1),
2774
+ children: /* @__PURE__ */ jsx38("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx38("path", { d: "M1 3l3 3 3-3", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) })
2775
+ }
2776
+ )
2777
+ ] })
2778
+ ] });
2779
+ });
2780
+
2781
+ // src/components/Slider/Slider.tsx
2782
+ import { useRef as useRef7, useState as useState13 } from "react";
2783
+
2784
+ // src/components/Slider/Slider.css.ts
2785
+ var range2 = "Slider_range__2gl56i2";
2786
+ var root3 = "Slider_root__2gl56i0";
2787
+ var thumb = "Slider_thumb__2gl56i3";
2788
+ var track3 = "Slider_track__2gl56i1";
2789
+
2790
+ // src/components/Slider/Slider.tsx
2791
+ import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
2792
+ function isRange(value) {
2793
+ return Array.isArray(value);
2794
+ }
2795
+ function clampToStep(raw, min, max, step) {
2796
+ const stepped = Math.round((raw - min) / step) * step + min;
2797
+ return Math.min(max, Math.max(min, Math.round(stepped * 1e6) / 1e6));
2798
+ }
2799
+ function percentOf(value, min, max) {
2800
+ if (max === min) return 0;
2801
+ return (value - min) / (max - min) * 100;
2802
+ }
2803
+ function Slider({
2804
+ value: controlledValue,
2805
+ defaultValue = 0,
2806
+ onChange,
2807
+ min = 0,
2808
+ max = 100,
2809
+ step = 1,
2810
+ disabled = false,
2811
+ className,
2812
+ formatValue: formatValue2 = (v) => String(v),
2813
+ ...rest
2814
+ }) {
2815
+ const ariaLabel = rest["aria-label"];
2816
+ const [uncontrolledValue, setUncontrolledValue] = useState13(defaultValue);
2817
+ const value = controlledValue !== void 0 ? controlledValue : uncontrolledValue;
2818
+ const setValue = (next) => {
2819
+ if (controlledValue === void 0) {
2820
+ setUncontrolledValue(next);
2821
+ }
2822
+ onChange?.(next);
2823
+ };
2824
+ const trackRef = useRef7(null);
2825
+ const dragThumbIndex = useRef7(null);
2826
+ const isDragging = useRef7(false);
2827
+ const valueFromClientX = (clientX) => {
2828
+ const trackEl = trackRef.current;
2829
+ if (!trackEl) return min;
2830
+ const rect = trackEl.getBoundingClientRect();
2831
+ const ratio = rect.width === 0 ? 0 : (clientX - rect.left) / rect.width;
2832
+ return clampToStep(min + ratio * (max - min), min, max, step);
2833
+ };
2834
+ const setThumbValue = (index, raw) => {
2835
+ if (index === null) {
2836
+ setValue(clampToStep(raw, min, max, step));
2837
+ return;
2838
+ }
2839
+ if (!isRange(value)) return;
2840
+ const [start, end] = value;
2841
+ if (index === 0) {
2842
+ setValue([Math.min(raw, end), end]);
2843
+ } else {
2844
+ setValue([start, Math.max(raw, start)]);
2845
+ }
2846
+ };
2847
+ const handlePointerMove = (event) => {
2848
+ if (!isDragging.current) return;
2849
+ setThumbValue(dragThumbIndex.current, valueFromClientX(event.clientX));
2850
+ };
2851
+ const handlePointerUp = () => {
2852
+ isDragging.current = false;
2853
+ dragThumbIndex.current = null;
2854
+ window.removeEventListener("pointermove", handlePointerMove);
2855
+ window.removeEventListener("pointerup", handlePointerUp);
2856
+ };
2857
+ const startDrag = (index) => (event) => {
2858
+ if (disabled) return;
2859
+ event.preventDefault();
2860
+ isDragging.current = true;
2861
+ dragThumbIndex.current = index;
2862
+ setThumbValue(index, valueFromClientX(event.clientX));
2863
+ window.addEventListener("pointermove", handlePointerMove);
2864
+ window.addEventListener("pointerup", handlePointerUp);
2865
+ };
2866
+ const handleTrackPointerDown = (event) => {
2867
+ if (disabled) return;
2868
+ if (!isRange(value)) {
2869
+ startDrag(null)(event);
2870
+ return;
2871
+ }
2872
+ const target = valueFromClientX(event.clientX);
2873
+ const [start, end] = value;
2874
+ const nearestIndex = Math.abs(target - start) <= Math.abs(target - end) ? 0 : 1;
2875
+ startDrag(nearestIndex)(event);
2876
+ };
2877
+ const handleThumbKeyDown = (index) => (event) => {
2878
+ if (disabled) return;
2879
+ const current2 = index === null ? value : value[index];
2880
+ let next = null;
2881
+ switch (event.key) {
2882
+ case "ArrowRight":
2883
+ case "ArrowUp":
2884
+ next = clampToStep(current2 + step, min, max, step);
2885
+ break;
2886
+ case "ArrowLeft":
2887
+ case "ArrowDown":
2888
+ next = clampToStep(current2 - step, min, max, step);
2889
+ break;
2890
+ case "Home":
2891
+ next = min;
2892
+ break;
2893
+ case "End":
2894
+ next = max;
2895
+ break;
2896
+ case "PageUp":
2897
+ next = clampToStep(current2 + step * 10, min, max, step);
2898
+ break;
2899
+ case "PageDown":
2900
+ next = clampToStep(current2 - step * 10, min, max, step);
2901
+ break;
2902
+ default:
2903
+ return;
2904
+ }
2905
+ event.preventDefault();
2906
+ setThumbValue(index, next);
2907
+ };
2908
+ const renderThumb = (index, current2, label3) => /* @__PURE__ */ jsx39(
2909
+ "span",
2910
+ {
2911
+ role: "slider",
2912
+ tabIndex: disabled ? -1 : 0,
2913
+ "aria-label": label3,
2914
+ "aria-valuemin": min,
2915
+ "aria-valuemax": max,
2916
+ "aria-valuenow": current2,
2917
+ "aria-valuetext": formatValue2(current2),
2918
+ "aria-disabled": disabled || void 0,
2919
+ className: thumb,
2920
+ style: { left: `${percentOf(current2, min, max)}%` },
2921
+ onPointerDown: (event) => {
2922
+ event.stopPropagation();
2923
+ startDrag(index)(event);
2924
+ },
2925
+ onKeyDown: handleThumbKeyDown(index)
2926
+ },
2927
+ index ?? "single"
2928
+ );
2929
+ const classes = [root3, className].filter(Boolean).join(" ");
2930
+ return /* @__PURE__ */ jsx39("span", { className: classes, "data-disabled": disabled || void 0, children: /* @__PURE__ */ jsxs22("span", { ref: trackRef, className: track3, onPointerDown: handleTrackPointerDown, children: [
2931
+ isRange(value) ? /* @__PURE__ */ jsx39(
2932
+ "span",
2933
+ {
2934
+ className: range2,
2935
+ style: {
2936
+ left: `${percentOf(value[0], min, max)}%`,
2937
+ right: `${100 - percentOf(value[1], min, max)}%`
2938
+ }
2939
+ }
2940
+ ) : /* @__PURE__ */ jsx39("span", { className: range2, style: { left: 0, right: `${100 - percentOf(value, min, max)}%` } }),
2941
+ isRange(value) ? [
2942
+ renderThumb(0, value[0], Array.isArray(ariaLabel) ? ariaLabel[0] : ariaLabel),
2943
+ renderThumb(1, value[1], Array.isArray(ariaLabel) ? ariaLabel[1] : ariaLabel)
2944
+ ] : renderThumb(null, value, typeof ariaLabel === "string" ? ariaLabel : void 0)
2945
+ ] }) });
2946
+ }
2947
+
2948
+ // src/components/Combobox/Combobox.tsx
2949
+ import { useEffect as useEffect6, useId as useId2, useRef as useRef8, useState as useState14 } from "react";
2950
+ import {
2951
+ FloatingPortal as FloatingPortal7,
2952
+ autoUpdate as autoUpdate6,
2953
+ flip as flip6,
2954
+ offset as offset6,
2955
+ shift as shift6,
2956
+ useDismiss as useDismiss7,
2957
+ useFloating as useFloating7,
2958
+ useInteractions as useInteractions7,
2959
+ useRole as useRole7
2960
+ } from "@floating-ui/react";
2961
+
2962
+ // src/components/Combobox/Combobox.css.ts
2963
+ var chip = "Combobox_chip__26nhic2";
2964
+ var chipRemove = "Combobox_chipRemove__26nhic3";
2965
+ var chipsWrapper = "Combobox_chipsWrapper__26nhic1";
2966
+ var emptyState2 = "Combobox_emptyState__26nhic7";
2967
+ var inputEl = "Combobox_inputEl__26nhic4";
2968
+ var listbox = "Combobox_listbox__26nhic5";
2969
+ var option = "Combobox_option__26nhic6";
2970
+ var wrapper9 = "Combobox_wrapper__26nhic0";
2971
+
2972
+ // src/components/Combobox/Combobox.tsx
2973
+ import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
2974
+ function defaultFilter(options, inputText) {
2975
+ const query = inputText.trim().toLowerCase();
2976
+ if (!query) return options;
2977
+ return options.filter((opt) => opt.label.toLowerCase().includes(query));
2978
+ }
2979
+ function labelFor(options, value) {
2980
+ if (!value) return "";
2981
+ return options.find((opt) => opt.value === value)?.label ?? "";
2982
+ }
2983
+ function Combobox({
2984
+ options,
2985
+ multiple = false,
2986
+ value: controlledValue,
2987
+ defaultValue,
2988
+ onChange,
2989
+ onInputChange,
2990
+ filterOptions = defaultFilter,
2991
+ placeholder,
2992
+ noOptionsMessage = "No options",
2993
+ disabled = false,
2994
+ invalid,
2995
+ loading = false,
2996
+ id,
2997
+ className,
2998
+ ...rest
2999
+ }) {
3000
+ const fallbackDefault = multiple ? [] : null;
3001
+ const [uncontrolledValue, setUncontrolledValue] = useState14(
3002
+ defaultValue !== void 0 ? defaultValue : fallbackDefault
3003
+ );
3004
+ const value = controlledValue !== void 0 ? controlledValue : uncontrolledValue;
3005
+ const setValue = (next) => {
3006
+ if (controlledValue === void 0) {
3007
+ setUncontrolledValue(next);
3008
+ }
3009
+ onChange?.(next);
3010
+ };
3011
+ const selectedValues = multiple ? value ?? [] : [];
3012
+ const singleValue = multiple ? null : value;
3013
+ const [open, setOpen] = useState14(false);
3014
+ const [inputText, setInputText] = useState14(() => multiple ? "" : labelFor(options, singleValue));
3015
+ const [activeIndex, setActiveIndex] = useState14(null);
3016
+ useEffect6(() => {
3017
+ if (!multiple) {
3018
+ setInputText(labelFor(options, singleValue));
3019
+ }
3020
+ }, [singleValue, multiple]);
3021
+ const inputRef = useRef8(null);
3022
+ const listboxId = useId2();
3023
+ const filteredOptions = filterOptions(options, multiple ? inputText : open ? inputText : "");
3024
+ const { refs, floatingStyles, context } = useFloating7({
3025
+ open,
3026
+ onOpenChange: setOpen,
3027
+ placement: "bottom-start",
3028
+ whileElementsMounted: autoUpdate6,
3029
+ middleware: [offset6(4), flip6(), shift6({ padding: 8 })]
3030
+ });
3031
+ const { getReferenceProps, getFloatingProps } = useInteractions7([
3032
+ useDismiss7(context),
3033
+ useRole7(context, { role: "listbox" })
3034
+ ]);
3035
+ const openList = () => {
3036
+ if (disabled) return;
3037
+ setOpen(true);
3038
+ setActiveIndex(null);
3039
+ };
3040
+ const closeList = () => {
3041
+ setOpen(false);
3042
+ setActiveIndex(null);
3043
+ };
3044
+ const selectOption = (opt) => {
3045
+ if (opt.disabled) return;
3046
+ if (multiple) {
3047
+ const next = selectedValues.includes(opt.value) ? selectedValues.filter((v) => v !== opt.value) : [...selectedValues, opt.value];
3048
+ setValue(next);
3049
+ setInputText("");
3050
+ onInputChange?.("");
3051
+ inputRef.current?.focus();
3052
+ return;
3053
+ }
3054
+ setValue(opt.value);
3055
+ setInputText(opt.label);
3056
+ closeList();
3057
+ };
3058
+ const removeChip = (optionValue) => {
3059
+ setValue(selectedValues.filter((v) => v !== optionValue));
3060
+ inputRef.current?.focus();
3061
+ };
3062
+ const handleInputChange = (text) => {
3063
+ setInputText(text);
3064
+ onInputChange?.(text);
3065
+ setOpen(true);
3066
+ setActiveIndex(null);
3067
+ };
3068
+ const moveActiveIndex = (direction2) => {
3069
+ if (filteredOptions.length === 0) return;
3070
+ let next = activeIndex ?? (direction2 === 1 ? -1 : filteredOptions.length);
3071
+ for (let step = 0; step < filteredOptions.length; step++) {
3072
+ next = (next + direction2 + filteredOptions.length) % filteredOptions.length;
3073
+ if (!filteredOptions[next]?.disabled) {
3074
+ setActiveIndex(next);
3075
+ return;
3076
+ }
3077
+ }
3078
+ };
3079
+ const handleKeyDown = (event) => {
3080
+ if (disabled) return;
3081
+ switch (event.key) {
3082
+ case "ArrowDown":
3083
+ event.preventDefault();
3084
+ if (!open) {
3085
+ openList();
3086
+ } else {
3087
+ moveActiveIndex(1);
3088
+ }
3089
+ return;
3090
+ case "ArrowUp":
3091
+ event.preventDefault();
3092
+ if (open) moveActiveIndex(-1);
3093
+ return;
3094
+ case "Enter": {
3095
+ if (!open) return;
3096
+ event.preventDefault();
3097
+ const active = activeIndex !== null ? filteredOptions[activeIndex] : void 0;
3098
+ if (active) selectOption(active);
3099
+ return;
3100
+ }
3101
+ case "Escape":
3102
+ if (open) {
3103
+ event.preventDefault();
3104
+ closeList();
3105
+ if (!multiple) setInputText(labelFor(options, singleValue));
3106
+ }
3107
+ return;
3108
+ case "Backspace":
3109
+ if (multiple && inputText === "" && selectedValues.length > 0) {
3110
+ removeChip(selectedValues[selectedValues.length - 1]);
3111
+ }
3112
+ return;
3113
+ default:
3114
+ }
3115
+ };
3116
+ const handleBlur = () => {
3117
+ if (!multiple) {
3118
+ setInputText(labelFor(options, singleValue));
3119
+ }
3120
+ closeList();
3121
+ };
3122
+ const classes = [wrapper9, className].filter(Boolean).join(" ");
3123
+ const activeOptionId = activeIndex !== null ? `${listboxId}-option-${activeIndex}` : void 0;
3124
+ return /* @__PURE__ */ jsxs23("span", { className: classes, ref: refs.setReference, "data-disabled": disabled || void 0, children: [
3125
+ multiple && selectedValues.length > 0 ? /* @__PURE__ */ jsx40("span", { className: chipsWrapper, children: selectedValues.map((val) => /* @__PURE__ */ jsxs23("span", { className: chip, children: [
3126
+ labelFor(options, val),
3127
+ /* @__PURE__ */ jsx40(
3128
+ "button",
3129
+ {
3130
+ type: "button",
3131
+ className: chipRemove,
3132
+ "aria-label": `Remove ${labelFor(options, val)}`,
3133
+ disabled,
3134
+ onClick: () => removeChip(val),
3135
+ children: "\xD7"
3136
+ }
3137
+ )
3138
+ ] }, val)) }) : null,
3139
+ /* @__PURE__ */ jsx40(
3140
+ "input",
3141
+ {
3142
+ ref: inputRef,
3143
+ id,
3144
+ type: "text",
3145
+ role: "combobox",
3146
+ className: inputEl,
3147
+ value: inputText,
3148
+ placeholder,
3149
+ disabled,
3150
+ autoComplete: "off",
3151
+ "aria-autocomplete": "list",
3152
+ "aria-expanded": open,
3153
+ "aria-controls": listboxId,
3154
+ "aria-invalid": invalid || void 0,
3155
+ "aria-activedescendant": activeOptionId,
3156
+ ...getReferenceProps({
3157
+ ...rest,
3158
+ onFocus: openList,
3159
+ onBlur: handleBlur,
3160
+ onChange: (e) => handleInputChange(e.target.value),
3161
+ onKeyDown: handleKeyDown
3162
+ })
3163
+ }
3164
+ ),
3165
+ open ? /* @__PURE__ */ jsx40(FloatingPortal7, { children: /* @__PURE__ */ jsx40(
3166
+ "div",
3167
+ {
3168
+ ref: refs.setFloating,
3169
+ id: listboxId,
3170
+ role: "listbox",
3171
+ "aria-multiselectable": multiple || void 0,
3172
+ className: listbox,
3173
+ style: floatingStyles,
3174
+ ...getFloatingProps(),
3175
+ children: loading ? /* @__PURE__ */ jsx40("div", { className: emptyState2, children: "Loading\u2026" }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx40("div", { className: emptyState2, children: noOptionsMessage }) : filteredOptions.map((opt, index) => {
3176
+ const isSelected = multiple ? selectedValues.includes(opt.value) : opt.value === singleValue;
3177
+ return /* @__PURE__ */ jsx40(
3178
+ "div",
3179
+ {
3180
+ id: `${listboxId}-option-${index}`,
3181
+ role: "option",
3182
+ "aria-selected": isSelected,
3183
+ "aria-disabled": opt.disabled || void 0,
3184
+ "data-active": activeIndex === index || void 0,
3185
+ className: option,
3186
+ onMouseDown: (event) => {
3187
+ event.preventDefault();
3188
+ selectOption(opt);
3189
+ },
3190
+ onMouseEnter: () => setActiveIndex(index),
3191
+ children: opt.label
3192
+ },
3193
+ opt.value
3194
+ );
3195
+ })
3196
+ }
3197
+ ) }) : null
3198
+ ] });
3199
+ }
3200
+
2623
3201
  // src/index.ts
2624
3202
  import { vars as vars2, defaultThemeClass, defaultThemeVars } from "@vesture/tokens";
2625
3203
  export {
@@ -2636,6 +3214,7 @@ export {
2636
3214
  Calendar,
2637
3215
  Card,
2638
3216
  Checkbox,
3217
+ Combobox,
2639
3218
  DataGrid,
2640
3219
  DatePicker,
2641
3220
  DateRangePicker,
@@ -2645,11 +3224,13 @@ export {
2645
3224
  Input,
2646
3225
  Label,
2647
3226
  Modal,
3227
+ NumberInput,
2648
3228
  Pagination,
2649
3229
  Popover,
2650
3230
  Progress,
2651
3231
  Radio,
2652
3232
  Select,
3233
+ Slider,
2653
3234
  Spinner,
2654
3235
  Stack,
2655
3236
  Switch,