@optigrit/optigrit-ui 0.0.8 → 0.0.9

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.
@@ -207,7 +207,7 @@ var Input = forwardRef((props, ref) => {
207
207
  transform: "translateY(0) scale(1)"
208
208
  });
209
209
  Object.assign(input.style, {
210
- paddingLeft: startIcon ? `${startIconWidth + 8}px` : "8px",
210
+ paddingLeft: startIcon ? `${startIconWidth}px` : "8px",
211
211
  paddingRight: endIcon ? `${endIconWidth + 8}px` : "8px"
212
212
  });
213
213
  }
@@ -77,6 +77,15 @@ type MultiSelectProps = {
77
77
  } & Omit<InputFieldProps, 'readOnly' | 'value' | 'onChange' | 'onChangeValue'>;
78
78
  declare function MultiSelect(props: MultiSelectProps): react_jsx_runtime.JSX.Element;
79
79
 
80
+ interface SearchBarProps extends Omit<InputProps, 'value' | 'defaultValue'> {
81
+ value?: string;
82
+ defaultValue?: string;
83
+ onSearch: (value: string) => void;
84
+ delay?: number;
85
+ loading?: boolean;
86
+ }
87
+ declare const SearchBar: React__default.ForwardRefExoticComponent<SearchBarProps & React__default.RefAttributes<HTMLInputElement>>;
88
+
80
89
  interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
81
90
  stickyHeader?: boolean;
82
91
  size?: "small" | "medium";
@@ -129,6 +138,20 @@ interface CarouselProps extends React__default.HTMLAttributes<HTMLDivElement> {
129
138
  }
130
139
  declare const Carousel: React__default.ForwardRefExoticComponent<CarouselProps & React__default.RefAttributes<HTMLDivElement>>;
131
140
 
141
+ interface SeparatorProps extends React__default.HTMLAttributes<HTMLDivElement> {
142
+ /**
143
+ * The orientation of the separator.
144
+ * @default 'horizontal'
145
+ */
146
+ orientation?: 'horizontal' | 'vertical';
147
+ /**
148
+ * Whether the element is purely decorative or semantic.
149
+ * @default true
150
+ */
151
+ decorative?: boolean;
152
+ }
153
+ declare const Separator: React__default.ForwardRefExoticComponent<SeparatorProps & React__default.RefAttributes<HTMLDivElement>>;
154
+
132
155
  type DialogProps = {
133
156
  open: boolean;
134
157
  onClose?: () => void;
@@ -201,4 +224,10 @@ interface CardContentProps extends React__default.HTMLAttributes<HTMLDivElement>
201
224
  }
202
225
  declare const CardContent: React__default.ForwardRefExoticComponent<CardContentProps & React__default.RefAttributes<HTMLDivElement>>;
203
226
 
204
- export { Button, type ButtonColor, type ButtonProps, type ButtonRoundness, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, type CardProps, Carousel, type CarouselItem, type CarouselProps, Dialog, DialogContent, DialogFooter, DialogHeader, type DialogProps, Drawer, DrawerContent, DrawerFooter, DrawerHeader, type DrawerProps, IconButton, type IconButtonProps, InputField, type InputFieldProps, MultiSelect, type MultiSelectProps, Select, type SelectProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tooltip, type TooltipProps };
227
+ interface CardFooterProps extends React__default.HTMLAttributes<HTMLDivElement> {
228
+ text?: React__default.ReactNode;
229
+ action?: React__default.ReactNode;
230
+ }
231
+ declare const CardFooter: React__default.ForwardRefExoticComponent<CardFooterProps & React__default.RefAttributes<HTMLDivElement>>;
232
+
233
+ export { Button, type ButtonColor, type ButtonProps, type ButtonRoundness, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Carousel, type CarouselItem, type CarouselProps, Dialog, DialogContent, DialogFooter, DialogHeader, type DialogProps, Drawer, DrawerContent, DrawerFooter, DrawerHeader, type DrawerProps, IconButton, type IconButtonProps, InputField, type InputFieldProps, MultiSelect, type MultiSelectProps, SearchBar, type SearchBarProps, Select, type SelectProps, Separator, type SeparatorProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tooltip, type TooltipProps };
@@ -6,7 +6,7 @@ import {
6
6
  ShowWithAnimation,
7
7
  Spinner,
8
8
  cn
9
- } from "../chunk-CRWBYFRD.js";
9
+ } from "../chunk-62RFRYVU.js";
10
10
  import "../chunk-MCQS3QNN.js";
11
11
  import {
12
12
  useKeyboardShortcuts
@@ -96,8 +96,7 @@ var Button = forwardRef(
96
96
  className,
97
97
  children,
98
98
  type = "button",
99
- onClick,
100
- ...rest
99
+ onClick
101
100
  }, ref) => {
102
101
  const rippleRef = useRef(null);
103
102
  const isDisabled = disabled || loading;
@@ -134,7 +133,6 @@ var Button = forwardRef(
134
133
  fullWidth && "w-full",
135
134
  className
136
135
  ),
137
- ...rest,
138
136
  children: [
139
137
  /* @__PURE__ */ jsx(Ripple, { ref: rippleRef, color: getRippleColor(variant, color) }),
140
138
  loading && /* @__PURE__ */ jsx(Spinner, { size: spinnerSize[size], color: "inherit" }),
@@ -624,6 +622,161 @@ function MultiSelect(props) {
624
622
  ] });
625
623
  }
626
624
 
625
+ // src/components/Forms/SearchBar/SearchBar.tsx
626
+ import React, { useState as useState5, useEffect, useRef as useRef7 } from "react";
627
+
628
+ // src/shared/Icons/SearchIcon.tsx
629
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
630
+ var SearchIcon = (props) => /* @__PURE__ */ jsxs7(
631
+ "svg",
632
+ {
633
+ xmlns: "http://www.w3.org/2000/svg",
634
+ width: "18",
635
+ height: "18",
636
+ viewBox: "0 0 24 24",
637
+ fill: "none",
638
+ stroke: "currentColor",
639
+ strokeWidth: "2",
640
+ strokeLinecap: "round",
641
+ strokeLinejoin: "round",
642
+ ...props,
643
+ children: [
644
+ /* @__PURE__ */ jsx7("circle", { cx: "11", cy: "11", r: "8" }),
645
+ /* @__PURE__ */ jsx7("path", { d: "m21 21-4.3-4.3" })
646
+ ]
647
+ }
648
+ );
649
+
650
+ // src/shared/Icons/CrossIcon.tsx
651
+ import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
652
+ var CrossIcon = (props) => /* @__PURE__ */ jsxs8(
653
+ "svg",
654
+ {
655
+ xmlns: "http://www.w3.org/2000/svg",
656
+ width: "14",
657
+ height: "14",
658
+ viewBox: "0 0 24 24",
659
+ fill: "none",
660
+ stroke: "currentColor",
661
+ strokeWidth: "2.5",
662
+ strokeLinecap: "round",
663
+ strokeLinejoin: "round",
664
+ ...props,
665
+ children: [
666
+ /* @__PURE__ */ jsx8("path", { d: "M18 6 6 18" }),
667
+ /* @__PURE__ */ jsx8("path", { d: "m6 6 12 12" })
668
+ ]
669
+ }
670
+ );
671
+
672
+ // src/components/Forms/SearchBar/SearchBar.tsx
673
+ import { jsx as jsx9 } from "react/jsx-runtime";
674
+ var SearchBar = React.forwardRef(
675
+ ({
676
+ value,
677
+ defaultValue,
678
+ onSearch,
679
+ delay = 300,
680
+ loading = false,
681
+ startIcon,
682
+ endIcon,
683
+ placeholder = "Search..."
684
+ }, ref) => {
685
+ const isControlled = value !== void 0;
686
+ const [internalValue, setInternalValue] = useState5(defaultValue || "");
687
+ const currentValue = isControlled ? value : internalValue;
688
+ const isFirstMount = useRef7(true);
689
+ const debounceTimer = useRef7(null);
690
+ useEffect(() => {
691
+ if (value !== void 0) {
692
+ setInternalValue(value);
693
+ }
694
+ }, [value]);
695
+ const triggerSearch = (val) => {
696
+ if (debounceTimer.current) {
697
+ clearTimeout(debounceTimer.current);
698
+ }
699
+ onSearch?.(val);
700
+ };
701
+ useEffect(() => {
702
+ if (isFirstMount.current) {
703
+ isFirstMount.current = false;
704
+ if (!currentValue) return;
705
+ }
706
+ if (delay === 0) {
707
+ onSearch?.(currentValue);
708
+ return;
709
+ }
710
+ if (debounceTimer.current) {
711
+ clearTimeout(debounceTimer.current);
712
+ }
713
+ debounceTimer.current = setTimeout(() => {
714
+ onSearch?.(currentValue);
715
+ }, delay);
716
+ return () => {
717
+ if (debounceTimer.current) {
718
+ clearTimeout(debounceTimer.current);
719
+ }
720
+ };
721
+ }, [currentValue, delay]);
722
+ const handleOnChange = (e) => {
723
+ const newVal = e.target.value;
724
+ if (!isControlled) {
725
+ setInternalValue(newVal);
726
+ }
727
+ };
728
+ const handleClear = () => {
729
+ if (!isControlled) {
730
+ setInternalValue("");
731
+ }
732
+ triggerSearch("");
733
+ const syntheticEvent = {
734
+ target: { value: "" },
735
+ currentTarget: { value: "" }
736
+ };
737
+ };
738
+ const handleKeyDown = (e) => {
739
+ if (e.key === "Enter") {
740
+ triggerSearch(currentValue);
741
+ } else if (e.key === "Escape") {
742
+ handleClear();
743
+ }
744
+ };
745
+ const defaultSearchIcon = /* @__PURE__ */ jsx9(SearchIcon, { className: "text-gray-400 ml-2" });
746
+ const renderEndIcon = () => {
747
+ if (loading) {
748
+ return /* @__PURE__ */ jsx9("div", { className: "flex items-center justify-center pr-3", children: /* @__PURE__ */ jsx9(Spinner, { size: 16, color: "primary" }) });
749
+ }
750
+ if (currentValue) {
751
+ return /* @__PURE__ */ jsx9(
752
+ "button",
753
+ {
754
+ type: "button",
755
+ onClick: handleClear,
756
+ className: "flex items-center justify-center p-1 mr-2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer focus:outline-none focus:ring-1 focus:ring-gray-300",
757
+ "aria-label": "Clear search",
758
+ children: /* @__PURE__ */ jsx9(CrossIcon, {})
759
+ }
760
+ );
761
+ }
762
+ return endIcon;
763
+ };
764
+ return /* @__PURE__ */ jsx9(
765
+ Input,
766
+ {
767
+ ref,
768
+ placeholder,
769
+ value: currentValue,
770
+ onChange: handleOnChange,
771
+ onKeyDown: handleKeyDown,
772
+ startIcon: startIcon || defaultSearchIcon,
773
+ endIcon: renderEndIcon()
774
+ }
775
+ );
776
+ }
777
+ );
778
+ SearchBar.displayName = "SearchBar";
779
+
627
780
  // src/components/DataDisplay/Table/Table.tsx
628
781
  import { forwardRef as forwardRef3, useMemo } from "react";
629
782
 
@@ -636,11 +789,11 @@ var TableContext = createContext({
636
789
  var useTableContext = () => useContext(TableContext);
637
790
 
638
791
  // src/components/DataDisplay/Table/Table.tsx
639
- import { jsx as jsx7 } from "react/jsx-runtime";
792
+ import { jsx as jsx10 } from "react/jsx-runtime";
640
793
  var Table = forwardRef3(
641
794
  ({ className = "", children, stickyHeader = false, size = "medium", ...props }, ref) => {
642
795
  const value = useMemo(() => ({ size, stickyHeader }), [size, stickyHeader]);
643
- return /* @__PURE__ */ jsx7(TableContext.Provider, { value, children: /* @__PURE__ */ jsx7(
796
+ return /* @__PURE__ */ jsx10(TableContext.Provider, { value, children: /* @__PURE__ */ jsx10(
644
797
  "table",
645
798
  {
646
799
  ref,
@@ -656,10 +809,10 @@ var Table_default = Table;
656
809
 
657
810
  // src/components/DataDisplay/Table/TableBody.tsx
658
811
  import { forwardRef as forwardRef4 } from "react";
659
- import { jsx as jsx8 } from "react/jsx-runtime";
812
+ import { jsx as jsx11 } from "react/jsx-runtime";
660
813
  var TableBody = forwardRef4(
661
814
  ({ className = "", children, ...props }, ref) => {
662
- return /* @__PURE__ */ jsx8(
815
+ return /* @__PURE__ */ jsx11(
663
816
  "tbody",
664
817
  {
665
818
  ref,
@@ -675,7 +828,7 @@ var TableBody_default = TableBody;
675
828
 
676
829
  // src/components/DataDisplay/Table/TableCell.tsx
677
830
  import { forwardRef as forwardRef5 } from "react";
678
- import { jsx as jsx9 } from "react/jsx-runtime";
831
+ import { jsx as jsx12 } from "react/jsx-runtime";
679
832
  var TableCell = forwardRef5(
680
833
  ({ className = "", align = "left", padding, variant, component, children, ...props }, ref) => {
681
834
  const { size, stickyHeader } = useTableContext();
@@ -694,7 +847,7 @@ var TableCell = forwardRef5(
694
847
  checkbox: "p-0 w-[48px] text-center"
695
848
  };
696
849
  const effectivePadding = padding || "normal";
697
- return /* @__PURE__ */ jsx9(
850
+ return /* @__PURE__ */ jsx12(
698
851
  Component,
699
852
  {
700
853
  ref,
@@ -710,10 +863,10 @@ var TableCell_default = TableCell;
710
863
 
711
864
  // src/components/DataDisplay/Table/TableContainer.tsx
712
865
  import { forwardRef as forwardRef6 } from "react";
713
- import { jsx as jsx10 } from "react/jsx-runtime";
866
+ import { jsx as jsx13 } from "react/jsx-runtime";
714
867
  var TableContainer = forwardRef6(
715
868
  ({ className = "", children, ...props }, ref) => {
716
- return /* @__PURE__ */ jsx10(
869
+ return /* @__PURE__ */ jsx13(
717
870
  "div",
718
871
  {
719
872
  ref,
@@ -729,10 +882,10 @@ var TableContainer_default = TableContainer;
729
882
 
730
883
  // src/components/DataDisplay/Table/TableFooter.tsx
731
884
  import { forwardRef as forwardRef7 } from "react";
732
- import { jsx as jsx11 } from "react/jsx-runtime";
885
+ import { jsx as jsx14 } from "react/jsx-runtime";
733
886
  var TableFooter = forwardRef7(
734
887
  ({ className = "", children, ...props }, ref) => {
735
- return /* @__PURE__ */ jsx11(
888
+ return /* @__PURE__ */ jsx14(
736
889
  "tfoot",
737
890
  {
738
891
  ref,
@@ -748,10 +901,10 @@ var TableFooter_default = TableFooter;
748
901
 
749
902
  // src/components/DataDisplay/Table/TableHead.tsx
750
903
  import { forwardRef as forwardRef8 } from "react";
751
- import { jsx as jsx12 } from "react/jsx-runtime";
904
+ import { jsx as jsx15 } from "react/jsx-runtime";
752
905
  var TableHead = forwardRef8(
753
906
  ({ className = "", children, ...props }, ref) => {
754
- return /* @__PURE__ */ jsx12(
907
+ return /* @__PURE__ */ jsx15(
755
908
  "thead",
756
909
  {
757
910
  ref,
@@ -767,10 +920,10 @@ var TableHead_default = TableHead;
767
920
 
768
921
  // src/components/DataDisplay/Table/TableRow.tsx
769
922
  import { forwardRef as forwardRef9 } from "react";
770
- import { jsx as jsx13 } from "react/jsx-runtime";
923
+ import { jsx as jsx16 } from "react/jsx-runtime";
771
924
  var TableRow = forwardRef9(
772
925
  ({ className = "", children, hover = false, selected = false, ...props }, ref) => {
773
- return /* @__PURE__ */ jsx13(
926
+ return /* @__PURE__ */ jsx16(
774
927
  "tr",
775
928
  {
776
929
  ref,
@@ -785,8 +938,8 @@ TableRow.displayName = "TableRow";
785
938
  var TableRow_default = TableRow;
786
939
 
787
940
  // src/components/DataDisplay/Carousel/Carousel.tsx
788
- import { useState as useState5, useEffect, useCallback as useCallback3, forwardRef as forwardRef10 } from "react";
789
- import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
941
+ import { useState as useState6, useEffect as useEffect2, useCallback as useCallback3, forwardRef as forwardRef10 } from "react";
942
+ import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
790
943
  var Carousel = forwardRef10(
791
944
  ({
792
945
  items,
@@ -798,8 +951,8 @@ var Carousel = forwardRef10(
798
951
  style,
799
952
  ...props
800
953
  }, ref) => {
801
- const [currentIndex, setCurrentIndex] = useState5(0);
802
- const [isHovered, setIsHovered] = useState5(false);
954
+ const [currentIndex, setCurrentIndex] = useState6(0);
955
+ const [isHovered, setIsHovered] = useState6(false);
803
956
  const goToNext = useCallback3(() => {
804
957
  setCurrentIndex((prevIndex) => prevIndex === items.length - 1 ? 0 : prevIndex + 1);
805
958
  }, [items.length]);
@@ -809,7 +962,7 @@ var Carousel = forwardRef10(
809
962
  const goToIndex = (index) => {
810
963
  setCurrentIndex(index);
811
964
  };
812
- useEffect(() => {
965
+ useEffect2(() => {
813
966
  if (!autoPlay || isHovered) return;
814
967
  const timer = setInterval(goToNext, interval);
815
968
  return () => clearInterval(timer);
@@ -817,7 +970,7 @@ var Carousel = forwardRef10(
817
970
  if (!items || items.length === 0) {
818
971
  return null;
819
972
  }
820
- return /* @__PURE__ */ jsxs7(
973
+ return /* @__PURE__ */ jsxs9(
821
974
  "div",
822
975
  {
823
976
  ref,
@@ -827,13 +980,13 @@ var Carousel = forwardRef10(
827
980
  onMouseLeave: () => setIsHovered(false),
828
981
  ...props,
829
982
  children: [
830
- /* @__PURE__ */ jsx14(
983
+ /* @__PURE__ */ jsx17(
831
984
  "div",
832
985
  {
833
986
  className: "flex transition-transform duration-500 ease-in-out h-full w-full flex-1",
834
987
  style: { transform: `translateX(-${currentIndex * 100}%)` },
835
- children: items.map((item) => /* @__PURE__ */ jsxs7("div", { className: "w-full h-full relative shrink-0", style: { flex: "0 0 100%" }, children: [
836
- /* @__PURE__ */ jsx14(
988
+ children: items.map((item) => /* @__PURE__ */ jsxs9("div", { className: "w-full h-full relative shrink-0", style: { flex: "0 0 100%" }, children: [
989
+ /* @__PURE__ */ jsx17(
837
990
  "img",
838
991
  {
839
992
  src: item.imageUrl,
@@ -841,15 +994,15 @@ var Carousel = forwardRef10(
841
994
  className: "w-full h-full object-cover"
842
995
  }
843
996
  ),
844
- (item.title || item.description) && /* @__PURE__ */ jsxs7("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent flex flex-col justify-end p-6 md:p-8", children: [
845
- item.title && /* @__PURE__ */ jsx14("h3", { className: "text-white text-xl md:text-3xl font-semibold mb-2 transform transition-all duration-500 translate-y-0 opacity-100", children: item.title }),
846
- item.description && /* @__PURE__ */ jsx14("p", { className: "text-white/80 text-sm md:text-base max-w-2xl transform transition-all duration-500 delay-100 translate-y-0 opacity-100", children: item.description })
997
+ (item.title || item.description) && /* @__PURE__ */ jsxs9("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent flex flex-col justify-end p-6 md:p-8", children: [
998
+ item.title && /* @__PURE__ */ jsx17("h3", { className: "text-white text-xl md:text-3xl font-semibold mb-2 transform transition-all duration-500 translate-y-0 opacity-100", children: item.title }),
999
+ item.description && /* @__PURE__ */ jsx17("p", { className: "text-white/80 text-sm md:text-base max-w-2xl transform transition-all duration-500 delay-100 translate-y-0 opacity-100", children: item.description })
847
1000
  ] })
848
1001
  ] }, item.id))
849
1002
  }
850
1003
  ),
851
- showArrows && items.length > 1 && /* @__PURE__ */ jsxs7(Fragment4, { children: [
852
- /* @__PURE__ */ jsx14(
1004
+ showArrows && items.length > 1 && /* @__PURE__ */ jsxs9(Fragment4, { children: [
1005
+ /* @__PURE__ */ jsx17(
853
1006
  IconButton_default,
854
1007
  {
855
1008
  onClick: goToPrevious,
@@ -857,7 +1010,7 @@ var Carousel = forwardRef10(
857
1010
  color: "secondary",
858
1011
  className: "absolute left-4 top-1/2 -translate-y-1/2 !bg-black/30 hover:!bg-black/50 text-white backdrop-blur-sm transition-all opacity-0 group-hover:opacity-100 disabled:opacity-0 z-10",
859
1012
  "aria-label": "Previous slide",
860
- children: /* @__PURE__ */ jsx14(
1013
+ children: /* @__PURE__ */ jsx17(
861
1014
  "svg",
862
1015
  {
863
1016
  xmlns: "http://www.w3.org/2000/svg",
@@ -866,12 +1019,12 @@ var Carousel = forwardRef10(
866
1019
  strokeWidth: 2,
867
1020
  stroke: "currentColor",
868
1021
  className: "w-5 h-5",
869
- children: /* @__PURE__ */ jsx14("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5L8.25 12l7.5-7.5" })
1022
+ children: /* @__PURE__ */ jsx17("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5L8.25 12l7.5-7.5" })
870
1023
  }
871
1024
  )
872
1025
  }
873
1026
  ),
874
- /* @__PURE__ */ jsx14(
1027
+ /* @__PURE__ */ jsx17(
875
1028
  IconButton_default,
876
1029
  {
877
1030
  onClick: goToNext,
@@ -879,7 +1032,7 @@ var Carousel = forwardRef10(
879
1032
  color: "secondary",
880
1033
  className: "absolute right-4 top-1/2 -translate-y-1/2 !bg-black/30 hover:!bg-black/50 text-white backdrop-blur-sm transition-all opacity-0 group-hover:opacity-100 disabled:opacity-0 z-10",
881
1034
  "aria-label": "Next slide",
882
- children: /* @__PURE__ */ jsx14(
1035
+ children: /* @__PURE__ */ jsx17(
883
1036
  "svg",
884
1037
  {
885
1038
  xmlns: "http://www.w3.org/2000/svg",
@@ -888,13 +1041,13 @@ var Carousel = forwardRef10(
888
1041
  strokeWidth: 2,
889
1042
  stroke: "currentColor",
890
1043
  className: "w-5 h-5",
891
- children: /* @__PURE__ */ jsx14("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" })
1044
+ children: /* @__PURE__ */ jsx17("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" })
892
1045
  }
893
1046
  )
894
1047
  }
895
1048
  )
896
1049
  ] }),
897
- showIndicators && items.length > 1 && /* @__PURE__ */ jsx14("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2 z-20", children: items.map((_, index) => /* @__PURE__ */ jsx14(
1050
+ showIndicators && items.length > 1 && /* @__PURE__ */ jsx17("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2 z-20", children: items.map((_, index) => /* @__PURE__ */ jsx17(
898
1051
  "button",
899
1052
  {
900
1053
  onClick: () => goToIndex(index),
@@ -913,9 +1066,32 @@ var Carousel = forwardRef10(
913
1066
  );
914
1067
  Carousel.displayName = "Carousel";
915
1068
 
1069
+ // src/components/DataDisplay/Separator/Separator.tsx
1070
+ import React3 from "react";
1071
+ import { jsx as jsx18 } from "react/jsx-runtime";
1072
+ var Separator = React3.forwardRef(
1073
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => {
1074
+ return /* @__PURE__ */ jsx18(
1075
+ "div",
1076
+ {
1077
+ ref,
1078
+ role: decorative ? "none" : "separator",
1079
+ "aria-orientation": decorative ? void 0 : orientation,
1080
+ className: cn(
1081
+ "shrink-0 bg-gray-200 dark:bg-gray-800",
1082
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
1083
+ className
1084
+ ),
1085
+ ...props
1086
+ }
1087
+ );
1088
+ }
1089
+ );
1090
+ Separator.displayName = "Separator";
1091
+
916
1092
  // src/components/Overlay/Dialog/Dialog.tsx
917
1093
  import { createPortal } from "react-dom";
918
- import { jsx as jsx15 } from "react/jsx-runtime";
1094
+ import { jsx as jsx19 } from "react/jsx-runtime";
919
1095
  function Dialog(props) {
920
1096
  const {
921
1097
  open,
@@ -947,7 +1123,7 @@ function Dialog(props) {
947
1123
  ]);
948
1124
  if (typeof window === "undefined") return null;
949
1125
  return createPortal(
950
- /* @__PURE__ */ jsx15(
1126
+ /* @__PURE__ */ jsx19(
951
1127
  ShowWithAnimation,
952
1128
  {
953
1129
  when: open,
@@ -975,7 +1151,7 @@ function Dialog(props) {
975
1151
  onClose?.();
976
1152
  }
977
1153
  },
978
- children: /* @__PURE__ */ jsx15(
1154
+ children: /* @__PURE__ */ jsx19(
979
1155
  ShowWithAnimation,
980
1156
  {
981
1157
  when: open,
@@ -1000,19 +1176,19 @@ function Dialog(props) {
1000
1176
  }
1001
1177
 
1002
1178
  // src/components/Overlay/Dialog/DialogHeader.tsx
1003
- import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
1179
+ import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
1004
1180
  function DialogHeader(props) {
1005
1181
  const { title, children, ...rest } = props;
1006
- return /* @__PURE__ */ jsxs8("div", { ...rest, className: "px-6 py-4 border-b border-border", children: [
1007
- /* @__PURE__ */ jsx16(Show, { when: !!title, children: /* @__PURE__ */ jsx16("h1", { className: "text-lg font-medium", children: title }) }),
1182
+ return /* @__PURE__ */ jsxs10("div", { ...rest, className: "px-6 py-4 border-b border-border", children: [
1183
+ /* @__PURE__ */ jsx20(Show, { when: !!title, children: /* @__PURE__ */ jsx20("h1", { className: "text-lg font-medium", children: title }) }),
1008
1184
  children
1009
1185
  ] });
1010
1186
  }
1011
1187
 
1012
1188
  // src/components/Overlay/Dialog/DialogFooter.tsx
1013
- import { jsx as jsx17 } from "react/jsx-runtime";
1189
+ import { jsx as jsx21 } from "react/jsx-runtime";
1014
1190
  function DialogFooter(props) {
1015
- return /* @__PURE__ */ jsx17(
1191
+ return /* @__PURE__ */ jsx21(
1016
1192
  "div",
1017
1193
  {
1018
1194
  ...props,
@@ -1022,9 +1198,9 @@ function DialogFooter(props) {
1022
1198
  }
1023
1199
 
1024
1200
  // src/components/Overlay/Dialog/DialogContent.tsx
1025
- import { jsx as jsx18 } from "react/jsx-runtime";
1201
+ import { jsx as jsx22 } from "react/jsx-runtime";
1026
1202
  function DialogContent(props) {
1027
- return /* @__PURE__ */ jsx18(
1203
+ return /* @__PURE__ */ jsx22(
1028
1204
  "div",
1029
1205
  {
1030
1206
  ...props,
@@ -1035,7 +1211,7 @@ function DialogContent(props) {
1035
1211
 
1036
1212
  // src/components/Overlay/Drawer/Drawer.tsx
1037
1213
  import { createPortal as createPortal2 } from "react-dom";
1038
- import { jsx as jsx19 } from "react/jsx-runtime";
1214
+ import { jsx as jsx23 } from "react/jsx-runtime";
1039
1215
  function Drawer(props) {
1040
1216
  const {
1041
1217
  open,
@@ -1070,7 +1246,7 @@ function Drawer(props) {
1070
1246
  }[_size] + (isHorizontal ? "vw" : "vh");
1071
1247
  })();
1072
1248
  return createPortal2(
1073
- /* @__PURE__ */ jsx19(
1249
+ /* @__PURE__ */ jsx23(
1074
1250
  ShowWithAnimation,
1075
1251
  {
1076
1252
  when: open,
@@ -1100,7 +1276,7 @@ function Drawer(props) {
1100
1276
  onClose?.();
1101
1277
  }
1102
1278
  },
1103
- children: /* @__PURE__ */ jsx19(
1279
+ children: /* @__PURE__ */ jsx23(
1104
1280
  ShowWithAnimation,
1105
1281
  {
1106
1282
  when: open,
@@ -1147,9 +1323,9 @@ function Drawer(props) {
1147
1323
  }
1148
1324
 
1149
1325
  // src/components/Overlay/Drawer/DrawerContent.tsx
1150
- import { jsx as jsx20 } from "react/jsx-runtime";
1326
+ import { jsx as jsx24 } from "react/jsx-runtime";
1151
1327
  function DrawerContent({ children, className, style }) {
1152
- return /* @__PURE__ */ jsx20(
1328
+ return /* @__PURE__ */ jsx24(
1153
1329
  "div",
1154
1330
  {
1155
1331
  className: cn("overflow-auto flex-1 p-4 relative hide-scrollbar", className),
@@ -1160,9 +1336,9 @@ function DrawerContent({ children, className, style }) {
1160
1336
  }
1161
1337
 
1162
1338
  // src/components/Overlay/Drawer/DrawerHeader.tsx
1163
- import { jsx as jsx21 } from "react/jsx-runtime";
1339
+ import { jsx as jsx25 } from "react/jsx-runtime";
1164
1340
  function DrawerHeader({ children, className, style }) {
1165
- return /* @__PURE__ */ jsx21(
1341
+ return /* @__PURE__ */ jsx25(
1166
1342
  "div",
1167
1343
  {
1168
1344
  className: cn("sticky top-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-b border-border", className),
@@ -1173,9 +1349,9 @@ function DrawerHeader({ children, className, style }) {
1173
1349
  }
1174
1350
 
1175
1351
  // src/components/Overlay/Drawer/DrawerFooter.tsx
1176
- import { jsx as jsx22 } from "react/jsx-runtime";
1352
+ import { jsx as jsx26 } from "react/jsx-runtime";
1177
1353
  function DrawerFooter({ children, className, style }) {
1178
- return /* @__PURE__ */ jsx22(
1354
+ return /* @__PURE__ */ jsx26(
1179
1355
  "div",
1180
1356
  {
1181
1357
  className: cn("sticky bottom-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-t border-border", className),
@@ -1186,11 +1362,11 @@ function DrawerFooter({ children, className, style }) {
1186
1362
  }
1187
1363
 
1188
1364
  // src/components/Surfaces/Card/Card.tsx
1189
- import React2 from "react";
1190
- import { jsx as jsx23 } from "react/jsx-runtime";
1191
- var Card = React2.forwardRef(
1192
- ({ className, ...props }, ref) => {
1193
- return /* @__PURE__ */ jsx23(
1365
+ import React4 from "react";
1366
+ import { jsx as jsx27 } from "react/jsx-runtime";
1367
+ var Card = React4.forwardRef(
1368
+ ({ className, children, ...props }, ref) => {
1369
+ return /* @__PURE__ */ jsx27(
1194
1370
  "div",
1195
1371
  {
1196
1372
  ref,
@@ -1198,7 +1374,8 @@ var Card = React2.forwardRef(
1198
1374
  "w-full rounded-xl border border-gray-200 bg-white text-gray-950 shadow-sm dark:border-gray-800 dark:bg-gray-900 dark:text-gray-50",
1199
1375
  className
1200
1376
  ),
1201
- ...props
1377
+ ...props,
1378
+ children
1202
1379
  }
1203
1380
  );
1204
1381
  }
@@ -1206,23 +1383,23 @@ var Card = React2.forwardRef(
1206
1383
  Card.displayName = "Card";
1207
1384
 
1208
1385
  // src/components/Surfaces/Card/CardHeader.tsx
1209
- import React3 from "react";
1210
- import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
1211
- var CardHeader = React3.forwardRef(
1386
+ import React5 from "react";
1387
+ import { jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
1388
+ var CardHeader = React5.forwardRef(
1212
1389
  ({ className, avatar, action, title, subheader, ...props }, ref) => {
1213
- return /* @__PURE__ */ jsxs9(
1390
+ return /* @__PURE__ */ jsxs11(
1214
1391
  "div",
1215
1392
  {
1216
1393
  ref,
1217
1394
  className: cn("flex items-center p-6", className),
1218
1395
  ...props,
1219
1396
  children: [
1220
- avatar && /* @__PURE__ */ jsx24("div", { className: "mr-4 flex-shrink-0", children: avatar }),
1221
- /* @__PURE__ */ jsxs9("div", { className: "flex-1 flex flex-col gap-1", children: [
1222
- title && /* @__PURE__ */ jsx24("div", { className: "font-semibold leading-none tracking-tight", children: title }),
1223
- subheader && /* @__PURE__ */ jsx24("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: subheader })
1397
+ avatar && /* @__PURE__ */ jsx28("div", { className: "mr-4 flex-shrink-0", children: avatar }),
1398
+ /* @__PURE__ */ jsxs11("div", { className: "flex-1 flex flex-col gap-1", children: [
1399
+ title && /* @__PURE__ */ jsx28("div", { className: "font-semibold leading-none tracking-tight", children: title }),
1400
+ subheader && /* @__PURE__ */ jsx28("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: subheader })
1224
1401
  ] }),
1225
- action && /* @__PURE__ */ jsx24("div", { className: "ml-4 flex-shrink-0 self-start", children: action })
1402
+ action && /* @__PURE__ */ jsx28("div", { className: "ml-4 flex-shrink-0 self-start", children: action })
1226
1403
  ]
1227
1404
  }
1228
1405
  );
@@ -1231,11 +1408,11 @@ var CardHeader = React3.forwardRef(
1231
1408
  CardHeader.displayName = "CardHeader";
1232
1409
 
1233
1410
  // src/components/Surfaces/Card/CardContent.tsx
1234
- import React4 from "react";
1235
- import { jsx as jsx25 } from "react/jsx-runtime";
1236
- var CardContent = React4.forwardRef(
1411
+ import React6 from "react";
1412
+ import { jsx as jsx29 } from "react/jsx-runtime";
1413
+ var CardContent = React6.forwardRef(
1237
1414
  ({ className, ...props }, ref) => {
1238
- return /* @__PURE__ */ jsx25(
1415
+ return /* @__PURE__ */ jsx29(
1239
1416
  "div",
1240
1417
  {
1241
1418
  ref,
@@ -1246,10 +1423,34 @@ var CardContent = React4.forwardRef(
1246
1423
  }
1247
1424
  );
1248
1425
  CardContent.displayName = "CardContent";
1426
+
1427
+ // src/components/Surfaces/Card/CardFooter.tsx
1428
+ import React7 from "react";
1429
+ import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
1430
+ var CardFooter = React7.forwardRef(
1431
+ ({ className, text, action, children }, ref) => {
1432
+ return /* @__PURE__ */ jsx30(
1433
+ "div",
1434
+ {
1435
+ ref,
1436
+ className: cn(
1437
+ "flex items-center justify-between p-6 bg-white dark:bg-gray-900 rounded-b-xl",
1438
+ className
1439
+ ),
1440
+ children: children || /* @__PURE__ */ jsxs12(Fragment5, { children: [
1441
+ text && /* @__PURE__ */ jsx30("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: text }),
1442
+ action && /* @__PURE__ */ jsx30("div", { className: "ml-auto flex items-center gap-2", children: action })
1443
+ ] })
1444
+ }
1445
+ );
1446
+ }
1447
+ );
1448
+ CardFooter.displayName = "CardFooter";
1249
1449
  export {
1250
1450
  Button_default as Button,
1251
1451
  Card,
1252
1452
  CardContent,
1453
+ CardFooter,
1253
1454
  CardHeader,
1254
1455
  Carousel,
1255
1456
  Dialog,
@@ -1263,7 +1464,9 @@ export {
1263
1464
  IconButton_default as IconButton,
1264
1465
  InputField,
1265
1466
  MultiSelect,
1467
+ SearchBar,
1266
1468
  Select,
1469
+ Separator,
1267
1470
  Table_default as Table,
1268
1471
  TableBody_default as TableBody,
1269
1472
  TableCell_default as TableCell,
@@ -5,7 +5,7 @@ import {
5
5
  Show,
6
6
  ShowWithAnimation,
7
7
  Spinner
8
- } from "../chunk-CRWBYFRD.js";
8
+ } from "../chunk-62RFRYVU.js";
9
9
  import "../chunk-MCQS3QNN.js";
10
10
  import "../chunk-U65NGM6F.js";
11
11
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optigrit/optigrit-ui",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "UI components library for optigrit apps",
5
5
  "license": "ISC",
6
6
  "author": "",