@beweco/aurora-ui 0.1.14 → 0.1.16
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/assets/css/styles.css +1 -1
- package/dist/index.cjs.js +509 -94
- package/dist/index.esm.js +412 -2
- package/dist/types/components/drawer-filters/DrawerFilters.d.ts +14 -0
- package/dist/types/components/drawer-filters/DrawerFilters.d.ts.map +1 -0
- package/dist/types/components/drawer-filters/DrawerFilters.types.d.ts +122 -0
- package/dist/types/components/drawer-filters/DrawerFilters.types.d.ts.map +1 -0
- package/dist/types/components/drawer-filters/_internal/DrawerFiltersFooter.d.ts +7 -0
- package/dist/types/components/drawer-filters/_internal/DrawerFiltersFooter.d.ts.map +1 -0
- package/dist/types/components/drawer-filters/_internal/DrawerFiltersHeader.d.ts +7 -0
- package/dist/types/components/drawer-filters/_internal/DrawerFiltersHeader.d.ts.map +1 -0
- package/dist/types/components/drawer-filters/_internal/FilterSection.d.ts +4 -0
- package/dist/types/components/drawer-filters/_internal/FilterSection.d.ts.map +1 -0
- package/dist/types/components/drawer-filters/index.d.ts +3 -0
- package/dist/types/components/drawer-filters/index.d.ts.map +1 -0
- package/dist/types/components/modal/_internal/ModalBody.d.ts +1 -1
- package/dist/types/components/modal/_internal/ModalBody.d.ts.map +1 -1
- package/dist/types/components/modal/_internal/ModalFooter.d.ts +1 -1
- package/dist/types/components/modal/_internal/ModalFooter.d.ts.map +1 -1
- package/dist/types/components/modal/_internal/ModalHeader.d.ts +1 -1
- package/dist/types/components/modal/_internal/ModalHeader.d.ts.map +1 -1
- package/dist/types/components/range-filter/RangeFilter.d.ts +7 -0
- package/dist/types/components/range-filter/RangeFilter.d.ts.map +1 -0
- package/dist/types/components/range-filter/RangeFilter.types.d.ts +33 -0
- package/dist/types/components/range-filter/RangeFilter.types.d.ts.map +1 -0
- package/dist/types/components/range-filter/index.d.ts +3 -0
- package/dist/types/components/range-filter/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +4 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Button as Button$1, DatePicker as DatePicker$1, DateRangePicker as DateRangePicker$1, Input as Input$1, RadioGroup, Radio, cn, Card as Card$1, Spacer, Tabs, Tab, Chip as Chip$1, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, Autocomplete, Breadcrumbs, BreadcrumbItem, DropdownSection, ListboxItem, Popover, PopoverTrigger, Tooltip as Tooltip$1, PopoverContent, Listbox, Accordion, AccordionItem, ListboxSection, Avatar, CardBody, CardFooter, Pagination as Pagination$1, Link, Switch as Switch$1, TimeInput as TimeInput$1, Select as Select$1, Table, TableHeader, TableColumn, TableBody, TableRow, TableCell, Textarea as Textarea$1, Alert, Modal as Modal$1, ModalContent as ModalContent$1, ModalHeader as ModalHeader$1, ModalBody as ModalBody$1, Slider, ModalFooter as ModalFooter$1, Spinner } from '@heroui/react';
|
|
1
|
+
import { Button as Button$1, DatePicker as DatePicker$1, DateRangePicker as DateRangePicker$1, Input as Input$1, RadioGroup, Radio, cn, Card as Card$1, Spacer, Tabs, Tab, Chip as Chip$1, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, Autocomplete, Breadcrumbs, BreadcrumbItem, DropdownSection, ListboxItem, Popover, PopoverTrigger, Tooltip as Tooltip$1, PopoverContent, Listbox, Accordion, AccordionItem, ListboxSection, Avatar, CardBody, CardFooter, Pagination as Pagination$1, Link, Switch as Switch$1, TimeInput as TimeInput$1, Select as Select$1, Table, TableHeader, TableColumn, TableBody, TableRow, TableCell, Textarea as Textarea$1, Alert, Modal as Modal$1, ModalContent as ModalContent$1, ModalHeader as ModalHeader$1, ModalBody as ModalBody$1, Slider, ModalFooter as ModalFooter$1, Spinner, SelectItem, Drawer, DrawerContent, DrawerBody } from '@heroui/react';
|
|
2
2
|
export * from '@heroui/react';
|
|
3
|
+
export { Slider } from '@heroui/react';
|
|
3
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
5
|
import React, { useId, useState, useCallback, useMemo, createContext, useContext, createElement, useRef, useEffect, useLayoutEffect } from 'react';
|
|
5
6
|
import { Icon } from '@iconify/react';
|
|
@@ -2718,6 +2719,415 @@ var NavigationLoadingOverlay = function (_a) {
|
|
|
2718
2719
|
return (jsxs("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [jsx("div", { className: "absolute inset-0 bg-black/10 backdrop-blur-sm" }), jsx("div", { className: "flex flex-col items-center gap-4", children: jsx(Spinner, { size: "lg", color: "primary", className: "drop-shadow-sm" }) })] }));
|
|
2719
2720
|
};
|
|
2720
2721
|
|
|
2722
|
+
/**
|
|
2723
|
+
* Footer of the DrawerFilters with action buttons.
|
|
2724
|
+
*/
|
|
2725
|
+
var DrawerFiltersFooter = function (_a) {
|
|
2726
|
+
var onClearFilters = _a.onClearFilters, onCancel = _a.onCancel, onApplyFilters = _a.onApplyFilters, _b = _a.translations, translations = _b === void 0 ? {} : _b;
|
|
2727
|
+
var _c = translations.clearFilters, clearFilters = _c === void 0 ? "Limpiar filtro" : _c, _d = translations.cancel, cancel = _d === void 0 ? "Cancelar" : _d, _e = translations.applyFilters, applyFilters = _e === void 0 ? "Aplicar filtro" : _e;
|
|
2728
|
+
return (jsxs("div", { className: "flex items-center justify-between px-6 py-10 bg-content1", children: [jsx(Button, { variant: "light", color: "primary", onPress: onClearFilters, className: "text-primary", children: clearFilters }), jsxs("div", { className: "flex items-center gap-3", children: [jsx(Button, { variant: "bordered", color: "primary", onPress: onCancel, children: cancel }), jsx(Button, { variant: "solid", color: "primary", onPress: onApplyFilters, children: applyFilters })] })] }));
|
|
2729
|
+
};
|
|
2730
|
+
|
|
2731
|
+
/**
|
|
2732
|
+
* Header of the DrawerFilters with title and description.
|
|
2733
|
+
*/
|
|
2734
|
+
var DrawerFiltersHeader = function (_a) {
|
|
2735
|
+
var title = _a.title, description = _a.description;
|
|
2736
|
+
return (jsxs("div", { className: "px-6 pt-10", children: [jsx(H2, { className: "text-xl font-semibold text-foreground mb-2", children: title }), jsx(P, { className: "text-default-500", children: description })] }));
|
|
2737
|
+
};
|
|
2738
|
+
|
|
2739
|
+
/**
|
|
2740
|
+
* RangeFilter component with histogram visualization for range selection.
|
|
2741
|
+
*/
|
|
2742
|
+
var RangeFilter = function (_a) {
|
|
2743
|
+
var title = _a.title, description = _a.description, value = _a.value, onChange = _a.onChange, minValue = _a.minValue, maxValue = _a.maxValue, _b = _a.step, step = _b === void 0 ? 1000 : _b, data = _a.data, _c = _a.formatValue, formatValue = _c === void 0 ? function (val) { return val.toString(); } : _c, _d = _a.bins, bins = _d === void 0 ? 20 : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e, _f = _a.sliderProps, sliderProps = _f === void 0 ? {} : _f, _g = _a.className, className = _g === void 0 ? "" : _g;
|
|
2744
|
+
// If no value is provided or is empty, use the default range
|
|
2745
|
+
var initialValue = value || [minValue, maxValue];
|
|
2746
|
+
// Internal state to handle the slider value
|
|
2747
|
+
var _h = useState(initialValue), currentValue = _h[0], setCurrentValue = _h[1];
|
|
2748
|
+
// Synchronize with the external value when it changes
|
|
2749
|
+
useEffect(function () {
|
|
2750
|
+
if (value) {
|
|
2751
|
+
setCurrentValue(value);
|
|
2752
|
+
}
|
|
2753
|
+
}, [value]);
|
|
2754
|
+
// Default translations
|
|
2755
|
+
var defaultTranslations = {
|
|
2756
|
+
title: title,
|
|
2757
|
+
description: description || "",
|
|
2758
|
+
minLabel: "Mínimo",
|
|
2759
|
+
maxLabel: "Máximo",
|
|
2760
|
+
tooltipProducts: "productos",
|
|
2761
|
+
tooltipProduct: "producto",
|
|
2762
|
+
};
|
|
2763
|
+
var t = __assign(__assign({}, defaultTranslations), translations);
|
|
2764
|
+
// Function to check if a bar is in the selected range
|
|
2765
|
+
var isBarInRange = function (barStart, barEnd) {
|
|
2766
|
+
return barStart >= currentValue[0] && barEnd <= currentValue[1];
|
|
2767
|
+
};
|
|
2768
|
+
// Generate data for the histogram
|
|
2769
|
+
var histogramData = useMemo(function () {
|
|
2770
|
+
var binWidth = (maxValue - minValue) / bins;
|
|
2771
|
+
var histogram = new Array(bins).fill(0);
|
|
2772
|
+
// Count elements in each range
|
|
2773
|
+
for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {
|
|
2774
|
+
var item = data_1[_i];
|
|
2775
|
+
var binIndex = Math.min(Math.floor((item - minValue) / binWidth), bins - 1);
|
|
2776
|
+
histogram[binIndex]++;
|
|
2777
|
+
}
|
|
2778
|
+
return histogram.map(function (count, index) {
|
|
2779
|
+
var binStart = minValue + index * binWidth;
|
|
2780
|
+
var binEnd = minValue + (index + 1) * binWidth;
|
|
2781
|
+
var binMidPoint = (binStart + binEnd) / 2;
|
|
2782
|
+
// Calculate height based on the value (the higher the value, the higher the height)
|
|
2783
|
+
// Normalize the middle value of the bin with respect to the total range
|
|
2784
|
+
var valueRatio = (binMidPoint - minValue) / (maxValue - minValue);
|
|
2785
|
+
// The height goes from 20% (minimum value) to 100% (maximum value)
|
|
2786
|
+
// All bars maintain visual height, regardless of whether they have data
|
|
2787
|
+
var heightPercentage = Math.max(20, valueRatio * 80 + 20);
|
|
2788
|
+
return {
|
|
2789
|
+
height: heightPercentage,
|
|
2790
|
+
binStart: binStart,
|
|
2791
|
+
binEnd: binEnd,
|
|
2792
|
+
count: count,
|
|
2793
|
+
priceRange: "".concat(formatValue(binStart), " - ").concat(formatValue(binEnd)),
|
|
2794
|
+
midPrice: binMidPoint,
|
|
2795
|
+
};
|
|
2796
|
+
});
|
|
2797
|
+
}, [data, minValue, maxValue, bins, formatValue]);
|
|
2798
|
+
return (jsxs("div", { className: "flex flex-col gap-4 ".concat(className), children: [jsx("div", { className: "flex flex-col gap-1", children: t.description && (jsx("p", { className: "text-xs text-default-500", children: t.description })) }), jsx("div", { className: "relative h-16 bg-default-50 rounded-lg p-2", children: jsx("div", { className: "flex items-end h-full", style: { gap: "1px" }, children: histogramData.map(function (bar, _index) {
|
|
2799
|
+
var inRange = isBarInRange(bar.binStart, bar.binEnd);
|
|
2800
|
+
return (jsx("div", { className: "flex-1 rounded-t-sm transition-all duration-200 group relative ".concat(inRange ? "bg-primary-400" : "bg-default-300"), style: {
|
|
2801
|
+
height: "".concat(bar.height, "%"),
|
|
2802
|
+
alignSelf: "flex-end",
|
|
2803
|
+
opacity: inRange ? 1 : 0.4,
|
|
2804
|
+
}, title: "".concat(bar.priceRange, ": ").concat(bar.count, " ").concat(bar.count !== 1 ? t.tooltipProducts : t.tooltipProduct), children: jsx("div", { className: "absolute bottom-full left-1/2 transform -translate-x-1/2 mb-1 px-2 py-1 bg-default-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10", children: jsxs("div", { className: "text-center", children: [jsx("div", { className: "font-medium", children: formatValue(bar.midPrice) }), jsxs("div", { className: "text-xs opacity-75", children: [bar.count, " ", bar.count !== 1 ? t.tooltipProducts : t.tooltipProduct] })] }) }) }, "".concat(bar.binStart, "-").concat(bar.binEnd)));
|
|
2805
|
+
}) }) }), jsx("div", { className: "px-2", children: jsx(Slider, __assign({ step: step, minValue: minValue, maxValue: maxValue, defaultValue: [minValue, maxValue], value: currentValue, onChange: function (newValue) {
|
|
2806
|
+
var _a = newValue, min = _a[0], max = _a[1];
|
|
2807
|
+
setCurrentValue([min, max]);
|
|
2808
|
+
onChange([min, max]);
|
|
2809
|
+
}, className: "w-full", isDisabled: false, showSteps: false, showOutline: false, showTooltip: false }, sliderProps)) }), jsxs("div", { className: "flex justify-between items-center text-sm", children: [jsxs("div", { className: "flex flex-col items-start", children: [jsx("span", { className: "text-xs text-default-500", children: t.minLabel }), jsx("span", { className: "font-medium text-default-700", children: formatValue(currentValue[0]) })] }), jsxs("div", { className: "flex flex-col items-end", children: [jsx("span", { className: "text-xs text-default-500", children: t.maxLabel }), jsx("span", { className: "font-medium text-default-700", children: formatValue(currentValue[1]) })] })] })] }));
|
|
2810
|
+
};
|
|
2811
|
+
|
|
2812
|
+
// =========================================================================
|
|
2813
|
+
// BASE FILTER SECTION COMPONENT
|
|
2814
|
+
// =========================================================================
|
|
2815
|
+
var FilterSection = function (_a) {
|
|
2816
|
+
var filter = _a.filter, value = _a.value, onChange = _a.onChange, _b = _a.isExpanded, isExpanded = _b === void 0 ? false : _b, onToggleExpanded = _a.onToggleExpanded;
|
|
2817
|
+
var _c = useState(isExpanded), internalExpanded = _c[0], setInternalExpanded = _c[1];
|
|
2818
|
+
var handleToggleExpanded = function () {
|
|
2819
|
+
var newExpanded = !internalExpanded;
|
|
2820
|
+
setInternalExpanded(newExpanded);
|
|
2821
|
+
onToggleExpanded === null || onToggleExpanded === void 0 ? void 0 : onToggleExpanded();
|
|
2822
|
+
};
|
|
2823
|
+
var hasActiveFilter = function () {
|
|
2824
|
+
if (!value) {
|
|
2825
|
+
return false;
|
|
2826
|
+
}
|
|
2827
|
+
switch (filter.type) {
|
|
2828
|
+
case "select":
|
|
2829
|
+
return value && "value" in value && value.value !== "";
|
|
2830
|
+
case "multiselect":
|
|
2831
|
+
return (value &&
|
|
2832
|
+
"values" in value &&
|
|
2833
|
+
Array.isArray(value.values) &&
|
|
2834
|
+
value.values.length > 0);
|
|
2835
|
+
case "range":
|
|
2836
|
+
return (value &&
|
|
2837
|
+
"min" in value &&
|
|
2838
|
+
"max" in value &&
|
|
2839
|
+
(value.min !== undefined || value.max !== undefined));
|
|
2840
|
+
case "date":
|
|
2841
|
+
return (value &&
|
|
2842
|
+
"type" in value &&
|
|
2843
|
+
value.type &&
|
|
2844
|
+
((value.type === "singleDay" && value.date) ||
|
|
2845
|
+
(value.type === "dateRange" &&
|
|
2846
|
+
value.dateRange &&
|
|
2847
|
+
value.dateRange.start &&
|
|
2848
|
+
value.dateRange.end)));
|
|
2849
|
+
case "text":
|
|
2850
|
+
return value && "value" in value && value.value !== "";
|
|
2851
|
+
case "number":
|
|
2852
|
+
return value && "value" in value && value.value !== null && value.value !== undefined;
|
|
2853
|
+
default:
|
|
2854
|
+
return false;
|
|
2855
|
+
}
|
|
2856
|
+
};
|
|
2857
|
+
var getActiveFilterCount = function () {
|
|
2858
|
+
if (!value) {
|
|
2859
|
+
return 0;
|
|
2860
|
+
}
|
|
2861
|
+
switch (filter.type) {
|
|
2862
|
+
case "select":
|
|
2863
|
+
return value && "value" in value && value.value !== "" ? 1 : 0;
|
|
2864
|
+
case "multiselect":
|
|
2865
|
+
return value && "values" in value && Array.isArray(value.values)
|
|
2866
|
+
? value.values.length
|
|
2867
|
+
: 0;
|
|
2868
|
+
case "range":
|
|
2869
|
+
return value &&
|
|
2870
|
+
"min" in value &&
|
|
2871
|
+
"max" in value &&
|
|
2872
|
+
(value.min !== undefined || value.max !== undefined)
|
|
2873
|
+
? 1
|
|
2874
|
+
: 0;
|
|
2875
|
+
case "date":
|
|
2876
|
+
return value &&
|
|
2877
|
+
"type" in value &&
|
|
2878
|
+
value.type &&
|
|
2879
|
+
((value.type === "singleDay" && value.date) ||
|
|
2880
|
+
(value.type === "dateRange" &&
|
|
2881
|
+
value.dateRange &&
|
|
2882
|
+
value.dateRange.start &&
|
|
2883
|
+
value.dateRange.end))
|
|
2884
|
+
? 1
|
|
2885
|
+
: 0;
|
|
2886
|
+
case "text":
|
|
2887
|
+
return value && "value" in value && value.value !== "" ? 1 : 0;
|
|
2888
|
+
case "number":
|
|
2889
|
+
return value && "value" in value && value.value !== null && value.value !== undefined ? 1 : 0;
|
|
2890
|
+
default:
|
|
2891
|
+
return 0;
|
|
2892
|
+
}
|
|
2893
|
+
};
|
|
2894
|
+
var renderFilterContent = function () {
|
|
2895
|
+
switch (filter.type) {
|
|
2896
|
+
case "select":
|
|
2897
|
+
return (jsx(SelectFilter, { filter: filter, value: value, onChange: onChange }));
|
|
2898
|
+
case "multiselect":
|
|
2899
|
+
return (jsx(MultiSelectFilter, { filter: filter, value: value, onChange: onChange }));
|
|
2900
|
+
case "range":
|
|
2901
|
+
return (jsx(RangeFilterComponent, { filter: filter, value: value, onChange: onChange }));
|
|
2902
|
+
case "date":
|
|
2903
|
+
return (jsx(DateFilter, { filter: filter, value: value, onChange: onChange }));
|
|
2904
|
+
case "text":
|
|
2905
|
+
return (jsx(TextFilter, { filter: filter, value: value, onChange: onChange }));
|
|
2906
|
+
case "number":
|
|
2907
|
+
return (jsx(NumberFilter, { filter: filter, value: value, onChange: onChange }));
|
|
2908
|
+
default:
|
|
2909
|
+
return null;
|
|
2910
|
+
}
|
|
2911
|
+
};
|
|
2912
|
+
return (jsxs("div", { className: "bg-white rounded-xl max-w-sm", style: {
|
|
2913
|
+
border: "0 solid #e5e7eb",
|
|
2914
|
+
boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",
|
|
2915
|
+
"--tw-shadow": "var(--heroui-box-shadow-medium)",
|
|
2916
|
+
"--tw-shadow-colored": "var(--heroui-box-shadow-medium)",
|
|
2917
|
+
}, children: [jsxs("button", { type: "button", className: "flex items-center justify-between w-full text-left p-4", onClick: handleToggleExpanded, children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx(H2, { className: "text-base font-normal text-foreground", children: filter.title }), hasActiveFilter() && (jsx("span", { className: "text-xs px-2 py-1 rounded-full text-black dark:text-white", style: {
|
|
2918
|
+
backgroundColor: "hsl(var(--heroui-default) / var(--heroui-default-opacity, var(--tw-bg-opacity)))",
|
|
2919
|
+
}, children: getActiveFilterCount() }))] }), jsx(IconComponent, { icon: internalExpanded
|
|
2920
|
+
? "solar:alt-arrow-down-outline"
|
|
2921
|
+
: "solar:alt-arrow-right-outline", size: "sm", className: "text-default-500" })] }), internalExpanded && (jsxs("div", { className: "px-4 pb-4", onClick: function (e) { return e.stopPropagation(); }, children: [filter.description && (jsx(P, { className: "text-default-500 mb-4", children: filter.description })), renderFilterContent()] }))] }));
|
|
2922
|
+
};
|
|
2923
|
+
// =========================================================================
|
|
2924
|
+
// SELECT FILTER
|
|
2925
|
+
// =========================================================================
|
|
2926
|
+
var SelectFilter = function (_a) {
|
|
2927
|
+
var filter = _a.filter, value = _a.value, onChange = _a.onChange;
|
|
2928
|
+
var currentValue = (value === null || value === void 0 ? void 0 : value.value) || "";
|
|
2929
|
+
return (jsx(Select, { placeholder: "Seleccionar ".concat(filter.title.toLowerCase()), selectedKeys: currentValue ? [currentValue] : [], onSelectionChange: function (keys) {
|
|
2930
|
+
var selectedKey = Array.from(keys)[0];
|
|
2931
|
+
onChange({ value: selectedKey || "" });
|
|
2932
|
+
}, className: "w-full", children: filter.data.map(function (item) { return (jsx(SelectItem, { children: item.label }, item.value)); }) }));
|
|
2933
|
+
};
|
|
2934
|
+
// =========================================================================
|
|
2935
|
+
// MULTISELECT FILTER
|
|
2936
|
+
// =========================================================================
|
|
2937
|
+
var MultiSelectFilter = function (_a) {
|
|
2938
|
+
var filter = _a.filter, value = _a.value, onChange = _a.onChange;
|
|
2939
|
+
var currentValues = (value === null || value === void 0 ? void 0 : value.values) || [];
|
|
2940
|
+
return (jsx(Select, { placeholder: "Seleccionar ".concat(filter.title.toLowerCase()), selectedKeys: currentValues, onSelectionChange: function (keys) {
|
|
2941
|
+
var selectedKeys = Array.from(keys);
|
|
2942
|
+
onChange({ values: selectedKeys });
|
|
2943
|
+
}, selectionMode: "multiple", className: "w-full", children: filter.data.map(function (item) { return (jsx(SelectItem, { children: item.label }, item.value)); }) }));
|
|
2944
|
+
};
|
|
2945
|
+
// =========================================================================
|
|
2946
|
+
// RANGE FILTER
|
|
2947
|
+
// =========================================================================
|
|
2948
|
+
var RangeFilterComponent = function (_a) {
|
|
2949
|
+
var filter = _a.filter, value = _a.value, onChange = _a.onChange;
|
|
2950
|
+
var currentValue = value || { min: filter.data.min, max: filter.data.max };
|
|
2951
|
+
var rangeValue = [currentValue.min, currentValue.max];
|
|
2952
|
+
var handleChange = function (newValue) {
|
|
2953
|
+
var min = newValue[0], max = newValue[1];
|
|
2954
|
+
onChange({ min: min, max: max });
|
|
2955
|
+
};
|
|
2956
|
+
// Generate data array for histogram (simple implementation)
|
|
2957
|
+
var data = Array.from({
|
|
2958
|
+
length: Math.ceil((filter.data.max - filter.data.min) / (filter.data.step || 1)) + 1,
|
|
2959
|
+
}, function (_, i) { return filter.data.min + i * (filter.data.step || 1); });
|
|
2960
|
+
return (jsx(RangeFilter, { title: "Rango de ".concat(filter.title.toLowerCase()), minValue: filter.data.min, maxValue: filter.data.max, step: filter.data.step || 1, data: data, value: rangeValue, onChange: handleChange, className: "w-full" }));
|
|
2961
|
+
};
|
|
2962
|
+
// =========================================================================
|
|
2963
|
+
// DATE FILTER
|
|
2964
|
+
// =========================================================================
|
|
2965
|
+
var DateFilter = function (_a) {
|
|
2966
|
+
_a.filter; var value = _a.value, onChange = _a.onChange;
|
|
2967
|
+
var handleDateSelectorChange = function (dateSelectorValue) {
|
|
2968
|
+
onChange({
|
|
2969
|
+
type: dateSelectorValue.type === HolidayType.SingleDay
|
|
2970
|
+
? "singleDay"
|
|
2971
|
+
: "dateRange",
|
|
2972
|
+
date: dateSelectorValue.date ? dateSelectorValue.date.toString() : null,
|
|
2973
|
+
dateRange: dateSelectorValue.dateRange
|
|
2974
|
+
? {
|
|
2975
|
+
start: dateSelectorValue.dateRange.start
|
|
2976
|
+
? dateSelectorValue.dateRange.start.toString()
|
|
2977
|
+
: null,
|
|
2978
|
+
end: dateSelectorValue.dateRange.end
|
|
2979
|
+
? dateSelectorValue.dateRange.end.toString()
|
|
2980
|
+
: null,
|
|
2981
|
+
}
|
|
2982
|
+
: null,
|
|
2983
|
+
});
|
|
2984
|
+
};
|
|
2985
|
+
// Convert our internal format to DateSelector format
|
|
2986
|
+
var getInitialType = function () {
|
|
2987
|
+
if ((value === null || value === void 0 ? void 0 : value.type) === "dateRange") {
|
|
2988
|
+
return HolidayType.DateRange;
|
|
2989
|
+
}
|
|
2990
|
+
return HolidayType.SingleDay;
|
|
2991
|
+
};
|
|
2992
|
+
// For now, we'll let DateSelector handle its own state
|
|
2993
|
+
// The component will reset when the filter value changes
|
|
2994
|
+
var getInitialDate = function () {
|
|
2995
|
+
return undefined;
|
|
2996
|
+
};
|
|
2997
|
+
var getInitialDateRange = function () {
|
|
2998
|
+
return undefined;
|
|
2999
|
+
};
|
|
3000
|
+
return (jsx(DateSelector, { initialType: getInitialType(), initialDate: getInitialDate(), initialDateRange: getInitialDateRange(), onChange: handleDateSelectorChange, className: "w-full" }));
|
|
3001
|
+
};
|
|
3002
|
+
// =========================================================================
|
|
3003
|
+
// TEXT FILTER
|
|
3004
|
+
// =========================================================================
|
|
3005
|
+
var TextFilter = function (_a) {
|
|
3006
|
+
var filter = _a.filter, value = _a.value, onChange = _a.onChange;
|
|
3007
|
+
var currentValue = (value === null || value === void 0 ? void 0 : value.value) || "";
|
|
3008
|
+
return (jsx(Input, { type: "text", placeholder: filter.data.placeholder || "Ingrese ".concat(filter.title.toLowerCase()), value: currentValue, onValueChange: function (newValue) {
|
|
3009
|
+
onChange({ value: newValue });
|
|
3010
|
+
}, className: "w-full" }));
|
|
3011
|
+
};
|
|
3012
|
+
// =========================================================================
|
|
3013
|
+
// NUMBER FILTER
|
|
3014
|
+
// =========================================================================
|
|
3015
|
+
var NumberFilter = function (_a) {
|
|
3016
|
+
var _b;
|
|
3017
|
+
var filter = _a.filter, value = _a.value, onChange = _a.onChange;
|
|
3018
|
+
var currentValue = ((_b = value === null || value === void 0 ? void 0 : value.value) === null || _b === void 0 ? void 0 : _b.toString()) || "";
|
|
3019
|
+
return (jsx(Input, { type: "number", placeholder: filter.data.placeholder || "Ingrese ".concat(filter.title.toLowerCase()), value: currentValue, onValueChange: function (newValue) {
|
|
3020
|
+
var numValue = newValue === "" ? null : Number(newValue);
|
|
3021
|
+
onChange({ value: numValue });
|
|
3022
|
+
}, min: filter.data.min, max: filter.data.max, step: filter.data.step, className: "w-full" }));
|
|
3023
|
+
};
|
|
3024
|
+
|
|
3025
|
+
/**
|
|
3026
|
+
* DrawerFilters - Generic component for dynamic filters in drawer.
|
|
3027
|
+
*
|
|
3028
|
+
* Características:
|
|
3029
|
+
* - Dynamic header with title and description
|
|
3030
|
+
* - Body with configurable filters (select, multiselect, range, date)
|
|
3031
|
+
* - Footer with action buttons (clear, cancel, apply)
|
|
3032
|
+
* - Internal state management of filters
|
|
3033
|
+
* - Callback for applying filters with processed values
|
|
3034
|
+
*/
|
|
3035
|
+
var DrawerFilters = function (_a) {
|
|
3036
|
+
var isOpen = _a.isOpen, onOpenChange = _a.onOpenChange, config = _a.config, onApplyFilters = _a.onApplyFilters, onClearFilters = _a.onClearFilters, onCancel = _a.onCancel, className = _a.className, translations = _a.translations;
|
|
3037
|
+
var _b = useState({}), filterValues = _b[0], setFilterValues = _b[1];
|
|
3038
|
+
// Handle changes in individual filters
|
|
3039
|
+
var handleFilterChange = useCallback(function (filterKey, value) {
|
|
3040
|
+
setFilterValues(function (prev) {
|
|
3041
|
+
var _a;
|
|
3042
|
+
return (__assign(__assign({}, prev), (_a = {}, _a[filterKey] = value, _a)));
|
|
3043
|
+
});
|
|
3044
|
+
}, []);
|
|
3045
|
+
// Clear all filters
|
|
3046
|
+
var handleClearFilters = useCallback(function () {
|
|
3047
|
+
setFilterValues({});
|
|
3048
|
+
onClearFilters === null || onClearFilters === void 0 ? void 0 : onClearFilters();
|
|
3049
|
+
}, [onClearFilters]);
|
|
3050
|
+
// Handle drawer open/close changes
|
|
3051
|
+
var handleOpenChange = useCallback(function (open) {
|
|
3052
|
+
// Only close if explicitly requested (not from internal interactions)
|
|
3053
|
+
if (!open) {
|
|
3054
|
+
onOpenChange(false);
|
|
3055
|
+
}
|
|
3056
|
+
}, [onOpenChange]);
|
|
3057
|
+
// Cancel and close drawer
|
|
3058
|
+
var handleCancel = useCallback(function () {
|
|
3059
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
3060
|
+
onOpenChange(false);
|
|
3061
|
+
}, [onCancel, onOpenChange]);
|
|
3062
|
+
// Apply filters and process values
|
|
3063
|
+
var handleApplyFilters = useCallback(function () {
|
|
3064
|
+
var processedFilters = {};
|
|
3065
|
+
var _loop_1 = function (key, value) {
|
|
3066
|
+
if (value === undefined || value === null) {
|
|
3067
|
+
return "continue";
|
|
3068
|
+
}
|
|
3069
|
+
var filterConfig = config.data.find(function (f) { return f.key === key; });
|
|
3070
|
+
if (!filterConfig) {
|
|
3071
|
+
return "continue";
|
|
3072
|
+
}
|
|
3073
|
+
switch (filterConfig.type) {
|
|
3074
|
+
case "select":
|
|
3075
|
+
processedFilters[key] = value.value;
|
|
3076
|
+
break;
|
|
3077
|
+
case "date":
|
|
3078
|
+
if (value && "type" in value) {
|
|
3079
|
+
if (value.type === "singleDay" && value.date) {
|
|
3080
|
+
processedFilters[key] = value.date;
|
|
3081
|
+
}
|
|
3082
|
+
else if (value.type === "dateRange" &&
|
|
3083
|
+
value.dateRange &&
|
|
3084
|
+
value.dateRange.start &&
|
|
3085
|
+
value.dateRange.end) {
|
|
3086
|
+
processedFilters[key] =
|
|
3087
|
+
"".concat(value.dateRange.start, "-").concat(value.dateRange.end);
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
break;
|
|
3091
|
+
case "multiselect":
|
|
3092
|
+
if ("values" in value &&
|
|
3093
|
+
Array.isArray(value.values) &&
|
|
3094
|
+
value.values.length > 0) {
|
|
3095
|
+
processedFilters[key] = value.values.join(",");
|
|
3096
|
+
}
|
|
3097
|
+
break;
|
|
3098
|
+
case "range":
|
|
3099
|
+
if ("min" in value &&
|
|
3100
|
+
"max" in value &&
|
|
3101
|
+
(value.min !== undefined || value.max !== undefined)) {
|
|
3102
|
+
processedFilters[key] = "".concat(value.min || 0, "-").concat(value.max || 0);
|
|
3103
|
+
}
|
|
3104
|
+
break;
|
|
3105
|
+
case "text":
|
|
3106
|
+
if (value && "value" in value && value.value !== "") {
|
|
3107
|
+
processedFilters[key] = value.value;
|
|
3108
|
+
}
|
|
3109
|
+
break;
|
|
3110
|
+
case "number":
|
|
3111
|
+
if (value && "value" in value && value.value !== null && value.value !== undefined) {
|
|
3112
|
+
processedFilters[key] = String(value.value);
|
|
3113
|
+
}
|
|
3114
|
+
break;
|
|
3115
|
+
}
|
|
3116
|
+
};
|
|
3117
|
+
// Procesar cada filtro según su tipo
|
|
3118
|
+
for (var _i = 0, _a = Object.entries(filterValues); _i < _a.length; _i++) {
|
|
3119
|
+
var _b = _a[_i], key = _b[0], value = _b[1];
|
|
3120
|
+
_loop_1(key, value);
|
|
3121
|
+
}
|
|
3122
|
+
onApplyFilters(processedFilters);
|
|
3123
|
+
onOpenChange(false);
|
|
3124
|
+
}, [filterValues, config.data, onApplyFilters, onOpenChange]);
|
|
3125
|
+
return (jsx(Drawer, { isOpen: isOpen, onOpenChange: handleOpenChange, placement: "right", size: "md", className: cn("drawer-filters", className), isDismissable: false, hideCloseButton: false, children: jsxs(DrawerContent, { children: [jsx(DrawerFiltersHeader, { title: config.title, description: config.description }), jsx(DrawerBody, { className: "px-6 py-10", children: jsx("div", { className: "space-y-3", children: config.data.map(function (filter) {
|
|
3126
|
+
return (jsx(FilterSection, { filter: filter, value: filterValues[filter.key], onChange: function (value) { return handleFilterChange(filter.key, value); } }, filter.key));
|
|
3127
|
+
}) }) }), jsx(DrawerFiltersFooter, { onClearFilters: handleClearFilters, onCancel: handleCancel, onApplyFilters: handleApplyFilters, translations: translations })] }) }));
|
|
3128
|
+
};
|
|
3129
|
+
DrawerFilters.displayName = "DrawerFilters";
|
|
3130
|
+
|
|
2721
3131
|
var Modal = function (props) {
|
|
2722
3132
|
return (jsx(Modal$1, __assign({ shouldBlockScroll: true, radius: "lg", className: "py-9 px-6" }, props)));
|
|
2723
3133
|
};
|
|
@@ -2889,4 +3299,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
2889
3299
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
2890
3300
|
};
|
|
2891
3301
|
|
|
2892
|
-
export { AddHolidayForm, AnalyticsCard, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorSelector, DatePicker, DateRangePicker, DateSelector, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, Input, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RowSteps, ScheduleRow, SearchInput, Select, StepIndicator, Switch as SwitchComponent, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, UploadFile, VerticalSteps, sizeMap, themeColors, useAuraToast, useNavigationLoading, useThemeContext };
|
|
3302
|
+
export { AddHolidayForm, AnalyticsCard, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorSelector, DatePicker, DateRangePicker, DateSelector, DrawerFilters, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, Input, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RangeFilter, RowSteps, ScheduleRow, SearchInput, Select, StepIndicator, Switch as SwitchComponent, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, UploadFile, VerticalSteps, sizeMap, themeColors, useAuraToast, useNavigationLoading, useThemeContext };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { DrawerFiltersProps } from "./DrawerFilters.types";
|
|
3
|
+
/**
|
|
4
|
+
* DrawerFilters - Generic component for dynamic filters in drawer.
|
|
5
|
+
*
|
|
6
|
+
* Características:
|
|
7
|
+
* - Dynamic header with title and description
|
|
8
|
+
* - Body with configurable filters (select, multiselect, range, date)
|
|
9
|
+
* - Footer with action buttons (clear, cancel, apply)
|
|
10
|
+
* - Internal state management of filters
|
|
11
|
+
* - Callback for applying filters with processed values
|
|
12
|
+
*/
|
|
13
|
+
export declare const DrawerFilters: React.FC<DrawerFiltersProps>;
|
|
14
|
+
//# sourceMappingURL=DrawerFilters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerFilters.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer-filters/DrawerFilters.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAEX,kBAAkB,EAOlB,MAAM,uBAAuB,CAAC;AAK/B;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqKtD,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
export type FilterType = "select" | "multiselect" | "range" | "date" | "text" | "number";
|
|
2
|
+
export interface BaseFilterData {
|
|
3
|
+
key: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
type: FilterType;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectFilterData extends BaseFilterData {
|
|
9
|
+
type: "select";
|
|
10
|
+
data: Array<{
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export interface MultiSelectFilterData extends BaseFilterData {
|
|
16
|
+
type: "multiselect";
|
|
17
|
+
data: Array<{
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
export interface RangeFilterData extends BaseFilterData {
|
|
23
|
+
type: "range";
|
|
24
|
+
data: {
|
|
25
|
+
min: number;
|
|
26
|
+
max: number;
|
|
27
|
+
step?: number;
|
|
28
|
+
unit?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface DateFilterData extends BaseFilterData {
|
|
32
|
+
type: "date";
|
|
33
|
+
data: {
|
|
34
|
+
min?: string;
|
|
35
|
+
max?: string;
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface TextFilterData extends BaseFilterData {
|
|
40
|
+
type: "text";
|
|
41
|
+
data: {
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface NumberFilterData extends BaseFilterData {
|
|
46
|
+
type: "number";
|
|
47
|
+
data: {
|
|
48
|
+
placeholder?: string;
|
|
49
|
+
min?: number;
|
|
50
|
+
max?: number;
|
|
51
|
+
step?: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export type FilterData = SelectFilterData | MultiSelectFilterData | RangeFilterData | DateFilterData | TextFilterData | NumberFilterData;
|
|
55
|
+
export interface DrawerFiltersConfig {
|
|
56
|
+
title: string;
|
|
57
|
+
description: string;
|
|
58
|
+
data: FilterData[];
|
|
59
|
+
}
|
|
60
|
+
export interface DrawerFiltersProps {
|
|
61
|
+
isOpen: boolean;
|
|
62
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
63
|
+
config: DrawerFiltersConfig;
|
|
64
|
+
onApplyFilters: (filters: Record<string, string>) => void;
|
|
65
|
+
onClearFilters?: () => void;
|
|
66
|
+
onCancel?: () => void;
|
|
67
|
+
className?: string;
|
|
68
|
+
translations?: {
|
|
69
|
+
clearFilters?: string;
|
|
70
|
+
cancel?: string;
|
|
71
|
+
applyFilters?: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export interface FilterSectionProps {
|
|
75
|
+
filter: FilterData;
|
|
76
|
+
value?: SelectFilterValue | MultiSelectFilterValue | RangeFilterValue | DateFilterValue | TextFilterValue | NumberFilterValue;
|
|
77
|
+
onChange: (value: SelectFilterValue | MultiSelectFilterValue | RangeFilterValue | DateFilterValue | TextFilterValue | NumberFilterValue) => void;
|
|
78
|
+
isExpanded?: boolean;
|
|
79
|
+
onToggleExpanded?: () => void;
|
|
80
|
+
}
|
|
81
|
+
export interface DrawerFiltersHeaderProps {
|
|
82
|
+
title: string;
|
|
83
|
+
description: string;
|
|
84
|
+
}
|
|
85
|
+
export interface DrawerFiltersFooterProps {
|
|
86
|
+
onClearFilters: () => void;
|
|
87
|
+
onCancel: () => void;
|
|
88
|
+
onApplyFilters: () => void;
|
|
89
|
+
translations?: {
|
|
90
|
+
clearFilters?: string;
|
|
91
|
+
cancel?: string;
|
|
92
|
+
applyFilters?: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export interface FilterValues {
|
|
96
|
+
[key: string]: SelectFilterValue | MultiSelectFilterValue | RangeFilterValue | DateFilterValue | TextFilterValue | NumberFilterValue;
|
|
97
|
+
}
|
|
98
|
+
export interface SelectFilterValue {
|
|
99
|
+
value: string;
|
|
100
|
+
}
|
|
101
|
+
export interface MultiSelectFilterValue {
|
|
102
|
+
values: string[];
|
|
103
|
+
}
|
|
104
|
+
export interface RangeFilterValue {
|
|
105
|
+
min: number;
|
|
106
|
+
max: number;
|
|
107
|
+
}
|
|
108
|
+
export interface DateFilterValue {
|
|
109
|
+
type: "singleDay" | "dateRange";
|
|
110
|
+
date: string | null;
|
|
111
|
+
dateRange: {
|
|
112
|
+
start: string | null;
|
|
113
|
+
end: string | null;
|
|
114
|
+
} | null;
|
|
115
|
+
}
|
|
116
|
+
export interface TextFilterValue {
|
|
117
|
+
value: string;
|
|
118
|
+
}
|
|
119
|
+
export interface NumberFilterValue {
|
|
120
|
+
value: number | null;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=DrawerFilters.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerFilters.types.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer-filters/DrawerFilters.types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { DrawerFiltersFooterProps } from "../DrawerFilters.types";
|
|
3
|
+
/**
|
|
4
|
+
* Footer of the DrawerFilters with action buttons.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DrawerFiltersFooter: React.FC<DrawerFiltersFooterProps>;
|
|
7
|
+
//# sourceMappingURL=DrawerFiltersFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerFiltersFooter.d.ts","sourceRoot":"","sources":["../../../../../src/components/drawer-filters/_internal/DrawerFiltersFooter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAiClE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { DrawerFiltersHeaderProps } from "../DrawerFilters.types";
|
|
3
|
+
/**
|
|
4
|
+
* Header of the DrawerFilters with title and description.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DrawerFiltersHeader: React.FC<DrawerFiltersHeaderProps>;
|
|
7
|
+
//# sourceMappingURL=DrawerFiltersHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerFiltersHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/drawer-filters/_internal/DrawerFiltersHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAUlE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/drawer-filters/_internal/FilterSection.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAGX,kBAAkB,EAWlB,MAAM,wBAAwB,CAAC;AAMhC,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8MtD,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { DrawerFilters } from "./DrawerFilters";
|
|
2
|
+
export type { DrawerFiltersProps, DrawerFiltersConfig, FilterData, FilterType, FilterValues, SelectFilterData, MultiSelectFilterData, RangeFilterData, DateFilterData, } from "./DrawerFilters.types";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer-filters/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,YAAY,EACX,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,cAAc,GACd,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const ModalBody: import("@heroui/
|
|
1
|
+
declare const ModalBody: import("@heroui/react").InternalForwardRefRenderFunction<"div", import("@heroui/react").ModalBodyProps, never>;
|
|
2
2
|
export default ModalBody;
|
|
3
3
|
//# sourceMappingURL=ModalBody.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalBody.d.ts","sourceRoot":"","sources":["../../../../../src/components/modal/_internal/ModalBody.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"ModalBody.d.ts","sourceRoot":"","sources":["../../../../../src/components/modal/_internal/ModalBody.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS,gHAAkB,CAAC;AAElC,eAAe,SAAS,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const ModalFooter: import("@heroui/
|
|
1
|
+
declare const ModalFooter: import("@heroui/react").InternalForwardRefRenderFunction<"footer", import("@heroui/react").ModalFooterProps, never>;
|
|
2
2
|
export default ModalFooter;
|
|
3
3
|
//# sourceMappingURL=ModalFooter.d.ts.map
|