@optigrit/optigrit-ui 0.0.9 → 0.0.11

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.
@@ -229,15 +229,15 @@ var Input = forwardRef((props, ref) => {
229
229
  "--bg-color": bgColor,
230
230
  "--text-color": textColor,
231
231
  "--placeholder-color": colorMix(textColor, 80),
232
- "--border-color": colorMix(borderColor, 50),
233
- "--border-color-hover": colorMix(borderColor, 100),
232
+ "--border-color": colorMix(borderColor, 10),
233
+ "--border-color-hover": colorMix(primaryColor, 40),
234
234
  "--light-primary-color": colorMix(primaryColor, 50),
235
235
  "--primary-color": colorMix(primaryColor, 100),
236
236
  width: fullWidth === void 0 || fullWidth ? "100%" : "auto",
237
237
  ...inputContainerProps?.style
238
238
  },
239
239
  className: cn(
240
- "flex items-center gap-1 border rounded-md h-[44px] p-1 transition-all duration-200 relative bg-[var(--bg-color)]",
240
+ "flex items-center gap-1 border rounded-xl h-[44px] p-1 transition-all duration-200 relative bg-[var(--bg-color)]",
241
241
  isFocus ? "ring-2 ring-[var(--light-primary-color)] border-[var(--primary-color)]" : "border-[var(--border-color)] hover:border-[var(--border-color-hover)]",
242
242
  inputContainerProps?.className
243
243
  ),
@@ -246,8 +246,11 @@ var Input = forwardRef((props, ref) => {
246
246
  "div",
247
247
  {
248
248
  id: "label",
249
- className: "absolute bg-[var(--bg-color)] text-[var(--text-color)] px-1 rounded-sm transition-all duration-200 select-none cursor-text",
250
249
  onClick: () => container.current?.querySelector("input")?.focus(),
250
+ className: cn(
251
+ "absolute bg-[var(--bg-color)] px-1 rounded-sm transition-all duration-200 select-none cursor-text",
252
+ isFocus || !label || labelShrink === void 0 || labelShrink ? "text-[var(--text-color)]" : "text-[var(--placeholder-color)]"
253
+ ),
251
254
  children: label
252
255
  }
253
256
  ),
@@ -260,7 +263,7 @@ var Input = forwardRef((props, ref) => {
260
263
  ref,
261
264
  required: required === void 0 || required,
262
265
  className: cn(
263
- "w-full h-full border-none outline-none rounded-sm transition-all duration-200 placeholder-[var(--placeholder-color)] text-[var(--text-color)] [&:-webkit-autofill]:[-webkit-text-fill-color:var(--text-color)] bg-[var(--bg-color)]",
266
+ "text-sm w-full h-full border-none outline-none rounded-sm transition-all duration-200 placeholder-[var(--placeholder-color)] text-[var(--text-color)] [&:-webkit-autofill]:[-webkit-text-fill-color:var(--text-color)] bg-[var(--bg-color)]",
264
267
  isFocus || !label || labelShrink === void 0 || labelShrink ? "" : "placeholder:opacity-0",
265
268
  inputProps.className
266
269
  ),
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { ButtonHTMLAttributes, ReactNode, HTMLAttributes, RefObject, TableHTMLAttributes } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { P as PopoverProps, a as InputProps } from '../Input-CBAdjRy6.js';
4
+ import { P as PopoverProps, a as InputProps, S as ShowWithAnimationProps } from '../types-BSufqQYT.js';
5
5
 
6
6
  type ButtonVariant = "contained" | "outlined" | "soft" | "text";
7
7
  type ButtonColor = "primary" | "secondary" | "error" | "success" | "warning" | "info";
@@ -44,11 +44,12 @@ declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
44
44
 
45
45
  type InputFieldProps = {
46
46
  value?: string;
47
+ labelBehavior?: 'fixed' | 'float';
47
48
  errorColor?: string;
48
49
  validateValue?: (value: string) => string | null;
49
50
  onChangeValue?: (value: string) => void;
50
51
  containerProps?: HTMLAttributes<HTMLDivElement> & {
51
- ref: RefObject<HTMLDivElement | null>;
52
+ ref?: RefObject<HTMLDivElement | null>;
52
53
  };
53
54
  } & Omit<InputProps, 'value'>;
54
55
  declare function InputField(props: InputFieldProps): react_jsx_runtime.JSX.Element;
@@ -86,6 +87,29 @@ interface SearchBarProps extends Omit<InputProps, 'value' | 'defaultValue'> {
86
87
  }
87
88
  declare const SearchBar: React__default.ForwardRefExoticComponent<SearchBarProps & React__default.RefAttributes<HTMLInputElement>>;
88
89
 
90
+ type TabListProps = {
91
+ activeTabValue: string;
92
+ onChangeActiveTabValue: (value: string) => void;
93
+ tabs: Array<{
94
+ value: string;
95
+ label: string;
96
+ }>;
97
+ } & Omit<HTMLAttributes<HTMLDivElement>, "children">;
98
+ declare function TabList(props: TabListProps): react_jsx_runtime.JSX.Element;
99
+
100
+ type RenderPanelProps = {
101
+ activePanelValue: string;
102
+ panels: Array<{
103
+ value: string;
104
+ content: ReactNode;
105
+ }>;
106
+ animationStyle?: ShowWithAnimationProps['animationStyle'];
107
+ panelRemoveOnHide?: boolean;
108
+ };
109
+
110
+ type TabPanelProps = RenderPanelProps & Omit<HTMLAttributes<HTMLDivElement>, "children">;
111
+ declare function TabPanel(props: TabPanelProps): react_jsx_runtime.JSX.Element;
112
+
89
113
  interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
90
114
  stickyHeader?: boolean;
91
115
  size?: "small" | "medium";
@@ -230,4 +254,4 @@ interface CardFooterProps extends React__default.HTMLAttributes<HTMLDivElement>
230
254
  }
231
255
  declare const CardFooter: React__default.ForwardRefExoticComponent<CardFooterProps & React__default.RefAttributes<HTMLDivElement>>;
232
256
 
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 };
257
+ 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, TabList, type TabListProps, TabPanel, type TabPanelProps, 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-62RFRYVU.js";
9
+ } from "../chunk-CGY2R33R.js";
10
10
  import "../chunk-MCQS3QNN.js";
11
11
  import {
12
12
  useKeyboardShortcuts
@@ -300,6 +300,7 @@ function InputField(props) {
300
300
  onChangeValue,
301
301
  containerProps = {},
302
302
  errorColor = "rgb(240, 70, 70)",
303
+ labelBehavior = "fixed",
303
304
  ...inputProps
304
305
  } = props;
305
306
  const initRef = useRef4({ isUserTyped: false });
@@ -334,18 +335,22 @@ function InputField(props) {
334
335
  }
335
336
  }, [props.value]);
336
337
  return /* @__PURE__ */ jsxs4("div", { ...containerProps, children: [
337
- /* @__PURE__ */ jsx4(
338
- Input,
339
- {
340
- ...inputProps,
341
- textColor: error ? errorColor : inputProps.textColor,
342
- borderColor: error ? errorColor : inputProps.borderColor,
343
- primaryColor: error ? errorColor : inputProps.primaryColor,
344
- onChange: handleOnChange,
345
- onFocus: handleOnFocus,
346
- onBlur: handleOnBlur
347
- }
348
- ),
338
+ /* @__PURE__ */ jsxs4("label", { children: [
339
+ /* @__PURE__ */ jsx4(Show, { when: labelBehavior === "fixed", children: /* @__PURE__ */ jsx4("span", { className: "text-[10px] text-text-secondary/60 uppercase font-medium", children: props.label }) }),
340
+ /* @__PURE__ */ jsx4(
341
+ Input,
342
+ {
343
+ ...inputProps,
344
+ label: labelBehavior === "float" ? inputProps.label : void 0,
345
+ textColor: error ? errorColor : inputProps.textColor,
346
+ borderColor: error ? errorColor : inputProps.borderColor,
347
+ primaryColor: error ? errorColor : inputProps.primaryColor,
348
+ onChange: handleOnChange,
349
+ onFocus: handleOnFocus,
350
+ onBlur: handleOnBlur
351
+ }
352
+ )
353
+ ] }),
349
354
  /* @__PURE__ */ jsx4("p", { className: "pl-1 text-xs", style: { color: errorColor, display: error ? "block" : "none" }, children: error })
350
355
  ] });
351
356
  }
@@ -777,6 +782,114 @@ var SearchBar = React.forwardRef(
777
782
  );
778
783
  SearchBar.displayName = "SearchBar";
779
784
 
785
+ // src/components/Navigation/Tab/TabList/index.tsx
786
+ import { useEffect as useEffect2, useRef as useRef8 } from "react";
787
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
788
+ function TabList(props) {
789
+ const {
790
+ tabs,
791
+ activeTabValue,
792
+ onChangeActiveTabValue,
793
+ ...rest
794
+ } = props;
795
+ const tabsContainer = useRef8(null);
796
+ const activeIndicator = useRef8(null);
797
+ function handleValueChange() {
798
+ if (!tabsContainer.current || !activeIndicator.current) return;
799
+ const tab = tabsContainer.current.querySelector(`#${activeTabValue}`);
800
+ const tabLayoutInfo = tab?.getBoundingClientRect();
801
+ const containerLayoutInfo = tabsContainer.current.getBoundingClientRect();
802
+ if (!tabLayoutInfo) return;
803
+ activeIndicator.current.style.width = `${tabLayoutInfo.width}px`;
804
+ activeIndicator.current.style.height = `${tabLayoutInfo.height}px`;
805
+ activeIndicator.current.style.transform = `translateX(${tabLayoutInfo.left - containerLayoutInfo.left}px)`;
806
+ }
807
+ useEffect2(() => {
808
+ handleValueChange();
809
+ window.addEventListener("resize", handleValueChange);
810
+ tabsContainer.current?.addEventListener("scroll", handleValueChange);
811
+ return () => {
812
+ window.removeEventListener("resize", handleValueChange);
813
+ tabsContainer.current?.removeEventListener("scroll", handleValueChange);
814
+ };
815
+ }, [activeTabValue]);
816
+ return /* @__PURE__ */ jsxs9(
817
+ "div",
818
+ {
819
+ ...rest,
820
+ className: cn("bg-bg-secondary w-full p-1 rounded-xl relative", rest.className),
821
+ children: [
822
+ /* @__PURE__ */ jsx10("div", { ref: activeIndicator, className: "absolute rounded-lg bg-primary transition-all duration-200" }),
823
+ /* @__PURE__ */ jsx10("div", { ref: tabsContainer, className: "flex items-center gap-1 w-full overflow-x-auto", children: tabs.map((tab) => /* @__PURE__ */ jsx10(
824
+ "div",
825
+ {
826
+ id: tab.value,
827
+ onClick: () => onChangeActiveTabValue(tab.value),
828
+ className: cn(
829
+ `px-3 py-1 rounded-lg cursor-pointer z-10 transition-all duration-200 whitespace-nowrap hover:bg-primary/20`,
830
+ activeTabValue === tab.value ? "text-white" : "text-text-secondary"
831
+ ),
832
+ children: tab.label
833
+ },
834
+ tab.value
835
+ )) })
836
+ ]
837
+ }
838
+ );
839
+ }
840
+
841
+ // src/components/Navigation/Tab/TabPanel/RenderPanel.tsx
842
+ import { memo } from "react";
843
+ import { jsx as jsx11 } from "react/jsx-runtime";
844
+ var RenderPanel = memo((props) => {
845
+ const {
846
+ activePanelValue,
847
+ panels,
848
+ animationStyle,
849
+ panelRemoveOnHide
850
+ } = props;
851
+ if (panels.length === 0) return null;
852
+ return /* @__PURE__ */ jsx11(
853
+ ShowWithAnimation,
854
+ {
855
+ when: panels[0].value === activePanelValue,
856
+ containerProps: { className: "w-full h-full" },
857
+ className: "w-full h-full",
858
+ removeOnHide: panelRemoveOnHide,
859
+ otherwise: /* @__PURE__ */ jsx11(RenderPanel, { ...props, panels: panels.slice(1) }),
860
+ animationStyle: animationStyle ?? {
861
+ children: {
862
+ from: { scale: 0.9, opacity: 0 },
863
+ active: { scale: 1, opacity: 1 },
864
+ to: { scale: 1.1, opacity: 0 }
865
+ }
866
+ },
867
+ children: panels[0].content
868
+ }
869
+ );
870
+ });
871
+
872
+ // src/components/Navigation/Tab/TabPanel/index.tsx
873
+ import { jsx as jsx12 } from "react/jsx-runtime";
874
+ function TabPanel(props) {
875
+ const {
876
+ activePanelValue,
877
+ panels,
878
+ animationStyle,
879
+ panelRemoveOnHide,
880
+ ...rest
881
+ } = props;
882
+ return /* @__PURE__ */ jsx12("div", { ...rest, children: /* @__PURE__ */ jsx12(
883
+ RenderPanel,
884
+ {
885
+ activePanelValue,
886
+ panels,
887
+ animationStyle,
888
+ panelRemoveOnHide
889
+ }
890
+ ) });
891
+ }
892
+
780
893
  // src/components/DataDisplay/Table/Table.tsx
781
894
  import { forwardRef as forwardRef3, useMemo } from "react";
782
895
 
@@ -789,11 +902,11 @@ var TableContext = createContext({
789
902
  var useTableContext = () => useContext(TableContext);
790
903
 
791
904
  // src/components/DataDisplay/Table/Table.tsx
792
- import { jsx as jsx10 } from "react/jsx-runtime";
905
+ import { jsx as jsx13 } from "react/jsx-runtime";
793
906
  var Table = forwardRef3(
794
907
  ({ className = "", children, stickyHeader = false, size = "medium", ...props }, ref) => {
795
908
  const value = useMemo(() => ({ size, stickyHeader }), [size, stickyHeader]);
796
- return /* @__PURE__ */ jsx10(TableContext.Provider, { value, children: /* @__PURE__ */ jsx10(
909
+ return /* @__PURE__ */ jsx13(TableContext.Provider, { value, children: /* @__PURE__ */ jsx13(
797
910
  "table",
798
911
  {
799
912
  ref,
@@ -809,10 +922,10 @@ var Table_default = Table;
809
922
 
810
923
  // src/components/DataDisplay/Table/TableBody.tsx
811
924
  import { forwardRef as forwardRef4 } from "react";
812
- import { jsx as jsx11 } from "react/jsx-runtime";
925
+ import { jsx as jsx14 } from "react/jsx-runtime";
813
926
  var TableBody = forwardRef4(
814
927
  ({ className = "", children, ...props }, ref) => {
815
- return /* @__PURE__ */ jsx11(
928
+ return /* @__PURE__ */ jsx14(
816
929
  "tbody",
817
930
  {
818
931
  ref,
@@ -828,7 +941,7 @@ var TableBody_default = TableBody;
828
941
 
829
942
  // src/components/DataDisplay/Table/TableCell.tsx
830
943
  import { forwardRef as forwardRef5 } from "react";
831
- import { jsx as jsx12 } from "react/jsx-runtime";
944
+ import { jsx as jsx15 } from "react/jsx-runtime";
832
945
  var TableCell = forwardRef5(
833
946
  ({ className = "", align = "left", padding, variant, component, children, ...props }, ref) => {
834
947
  const { size, stickyHeader } = useTableContext();
@@ -847,7 +960,7 @@ var TableCell = forwardRef5(
847
960
  checkbox: "p-0 w-[48px] text-center"
848
961
  };
849
962
  const effectivePadding = padding || "normal";
850
- return /* @__PURE__ */ jsx12(
963
+ return /* @__PURE__ */ jsx15(
851
964
  Component,
852
965
  {
853
966
  ref,
@@ -863,10 +976,10 @@ var TableCell_default = TableCell;
863
976
 
864
977
  // src/components/DataDisplay/Table/TableContainer.tsx
865
978
  import { forwardRef as forwardRef6 } from "react";
866
- import { jsx as jsx13 } from "react/jsx-runtime";
979
+ import { jsx as jsx16 } from "react/jsx-runtime";
867
980
  var TableContainer = forwardRef6(
868
981
  ({ className = "", children, ...props }, ref) => {
869
- return /* @__PURE__ */ jsx13(
982
+ return /* @__PURE__ */ jsx16(
870
983
  "div",
871
984
  {
872
985
  ref,
@@ -882,10 +995,10 @@ var TableContainer_default = TableContainer;
882
995
 
883
996
  // src/components/DataDisplay/Table/TableFooter.tsx
884
997
  import { forwardRef as forwardRef7 } from "react";
885
- import { jsx as jsx14 } from "react/jsx-runtime";
998
+ import { jsx as jsx17 } from "react/jsx-runtime";
886
999
  var TableFooter = forwardRef7(
887
1000
  ({ className = "", children, ...props }, ref) => {
888
- return /* @__PURE__ */ jsx14(
1001
+ return /* @__PURE__ */ jsx17(
889
1002
  "tfoot",
890
1003
  {
891
1004
  ref,
@@ -901,10 +1014,10 @@ var TableFooter_default = TableFooter;
901
1014
 
902
1015
  // src/components/DataDisplay/Table/TableHead.tsx
903
1016
  import { forwardRef as forwardRef8 } from "react";
904
- import { jsx as jsx15 } from "react/jsx-runtime";
1017
+ import { jsx as jsx18 } from "react/jsx-runtime";
905
1018
  var TableHead = forwardRef8(
906
1019
  ({ className = "", children, ...props }, ref) => {
907
- return /* @__PURE__ */ jsx15(
1020
+ return /* @__PURE__ */ jsx18(
908
1021
  "thead",
909
1022
  {
910
1023
  ref,
@@ -920,10 +1033,10 @@ var TableHead_default = TableHead;
920
1033
 
921
1034
  // src/components/DataDisplay/Table/TableRow.tsx
922
1035
  import { forwardRef as forwardRef9 } from "react";
923
- import { jsx as jsx16 } from "react/jsx-runtime";
1036
+ import { jsx as jsx19 } from "react/jsx-runtime";
924
1037
  var TableRow = forwardRef9(
925
1038
  ({ className = "", children, hover = false, selected = false, ...props }, ref) => {
926
- return /* @__PURE__ */ jsx16(
1039
+ return /* @__PURE__ */ jsx19(
927
1040
  "tr",
928
1041
  {
929
1042
  ref,
@@ -938,8 +1051,8 @@ TableRow.displayName = "TableRow";
938
1051
  var TableRow_default = TableRow;
939
1052
 
940
1053
  // src/components/DataDisplay/Carousel/Carousel.tsx
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";
1054
+ import { useState as useState6, useEffect as useEffect3, useCallback as useCallback3, forwardRef as forwardRef10 } from "react";
1055
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
943
1056
  var Carousel = forwardRef10(
944
1057
  ({
945
1058
  items,
@@ -962,7 +1075,7 @@ var Carousel = forwardRef10(
962
1075
  const goToIndex = (index) => {
963
1076
  setCurrentIndex(index);
964
1077
  };
965
- useEffect2(() => {
1078
+ useEffect3(() => {
966
1079
  if (!autoPlay || isHovered) return;
967
1080
  const timer = setInterval(goToNext, interval);
968
1081
  return () => clearInterval(timer);
@@ -970,7 +1083,7 @@ var Carousel = forwardRef10(
970
1083
  if (!items || items.length === 0) {
971
1084
  return null;
972
1085
  }
973
- return /* @__PURE__ */ jsxs9(
1086
+ return /* @__PURE__ */ jsxs10(
974
1087
  "div",
975
1088
  {
976
1089
  ref,
@@ -980,13 +1093,13 @@ var Carousel = forwardRef10(
980
1093
  onMouseLeave: () => setIsHovered(false),
981
1094
  ...props,
982
1095
  children: [
983
- /* @__PURE__ */ jsx17(
1096
+ /* @__PURE__ */ jsx20(
984
1097
  "div",
985
1098
  {
986
1099
  className: "flex transition-transform duration-500 ease-in-out h-full w-full flex-1",
987
1100
  style: { transform: `translateX(-${currentIndex * 100}%)` },
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(
1101
+ children: items.map((item) => /* @__PURE__ */ jsxs10("div", { className: "w-full h-full relative shrink-0", style: { flex: "0 0 100%" }, children: [
1102
+ /* @__PURE__ */ jsx20(
990
1103
  "img",
991
1104
  {
992
1105
  src: item.imageUrl,
@@ -994,15 +1107,15 @@ var Carousel = forwardRef10(
994
1107
  className: "w-full h-full object-cover"
995
1108
  }
996
1109
  ),
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 })
1110
+ (item.title || item.description) && /* @__PURE__ */ jsxs10("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: [
1111
+ item.title && /* @__PURE__ */ jsx20("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 }),
1112
+ item.description && /* @__PURE__ */ jsx20("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 })
1000
1113
  ] })
1001
1114
  ] }, item.id))
1002
1115
  }
1003
1116
  ),
1004
- showArrows && items.length > 1 && /* @__PURE__ */ jsxs9(Fragment4, { children: [
1005
- /* @__PURE__ */ jsx17(
1117
+ showArrows && items.length > 1 && /* @__PURE__ */ jsxs10(Fragment4, { children: [
1118
+ /* @__PURE__ */ jsx20(
1006
1119
  IconButton_default,
1007
1120
  {
1008
1121
  onClick: goToPrevious,
@@ -1010,7 +1123,7 @@ var Carousel = forwardRef10(
1010
1123
  color: "secondary",
1011
1124
  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",
1012
1125
  "aria-label": "Previous slide",
1013
- children: /* @__PURE__ */ jsx17(
1126
+ children: /* @__PURE__ */ jsx20(
1014
1127
  "svg",
1015
1128
  {
1016
1129
  xmlns: "http://www.w3.org/2000/svg",
@@ -1019,12 +1132,12 @@ var Carousel = forwardRef10(
1019
1132
  strokeWidth: 2,
1020
1133
  stroke: "currentColor",
1021
1134
  className: "w-5 h-5",
1022
- children: /* @__PURE__ */ jsx17("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5L8.25 12l7.5-7.5" })
1135
+ children: /* @__PURE__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5L8.25 12l7.5-7.5" })
1023
1136
  }
1024
1137
  )
1025
1138
  }
1026
1139
  ),
1027
- /* @__PURE__ */ jsx17(
1140
+ /* @__PURE__ */ jsx20(
1028
1141
  IconButton_default,
1029
1142
  {
1030
1143
  onClick: goToNext,
@@ -1032,7 +1145,7 @@ var Carousel = forwardRef10(
1032
1145
  color: "secondary",
1033
1146
  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",
1034
1147
  "aria-label": "Next slide",
1035
- children: /* @__PURE__ */ jsx17(
1148
+ children: /* @__PURE__ */ jsx20(
1036
1149
  "svg",
1037
1150
  {
1038
1151
  xmlns: "http://www.w3.org/2000/svg",
@@ -1041,13 +1154,13 @@ var Carousel = forwardRef10(
1041
1154
  strokeWidth: 2,
1042
1155
  stroke: "currentColor",
1043
1156
  className: "w-5 h-5",
1044
- children: /* @__PURE__ */ jsx17("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" })
1157
+ children: /* @__PURE__ */ jsx20("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" })
1045
1158
  }
1046
1159
  )
1047
1160
  }
1048
1161
  )
1049
1162
  ] }),
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(
1163
+ showIndicators && items.length > 1 && /* @__PURE__ */ jsx20("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2 z-20", children: items.map((_, index) => /* @__PURE__ */ jsx20(
1051
1164
  "button",
1052
1165
  {
1053
1166
  onClick: () => goToIndex(index),
@@ -1068,10 +1181,10 @@ Carousel.displayName = "Carousel";
1068
1181
 
1069
1182
  // src/components/DataDisplay/Separator/Separator.tsx
1070
1183
  import React3 from "react";
1071
- import { jsx as jsx18 } from "react/jsx-runtime";
1184
+ import { jsx as jsx21 } from "react/jsx-runtime";
1072
1185
  var Separator = React3.forwardRef(
1073
1186
  ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => {
1074
- return /* @__PURE__ */ jsx18(
1187
+ return /* @__PURE__ */ jsx21(
1075
1188
  "div",
1076
1189
  {
1077
1190
  ref,
@@ -1091,7 +1204,7 @@ Separator.displayName = "Separator";
1091
1204
 
1092
1205
  // src/components/Overlay/Dialog/Dialog.tsx
1093
1206
  import { createPortal } from "react-dom";
1094
- import { jsx as jsx19 } from "react/jsx-runtime";
1207
+ import { jsx as jsx22 } from "react/jsx-runtime";
1095
1208
  function Dialog(props) {
1096
1209
  const {
1097
1210
  open,
@@ -1123,7 +1236,7 @@ function Dialog(props) {
1123
1236
  ]);
1124
1237
  if (typeof window === "undefined") return null;
1125
1238
  return createPortal(
1126
- /* @__PURE__ */ jsx19(
1239
+ /* @__PURE__ */ jsx22(
1127
1240
  ShowWithAnimation,
1128
1241
  {
1129
1242
  when: open,
@@ -1151,7 +1264,7 @@ function Dialog(props) {
1151
1264
  onClose?.();
1152
1265
  }
1153
1266
  },
1154
- children: /* @__PURE__ */ jsx19(
1267
+ children: /* @__PURE__ */ jsx22(
1155
1268
  ShowWithAnimation,
1156
1269
  {
1157
1270
  when: open,
@@ -1159,7 +1272,7 @@ function Dialog(props) {
1159
1272
  role: "dialog",
1160
1273
  "aria-modal": "true",
1161
1274
  className: cn(
1162
- "relative z-10 w-full mx-4 bg-bg rounded-lg shadow-lg overflow-hidden",
1275
+ "relative z-10 w-full mx-4 bg-bg-secondary rounded-2xl shadow-lg overflow-hidden max-h-[100vh] overflow-y-auto",
1163
1276
  sizeClasses2[size],
1164
1277
  className
1165
1278
  ),
@@ -1176,42 +1289,42 @@ function Dialog(props) {
1176
1289
  }
1177
1290
 
1178
1291
  // src/components/Overlay/Dialog/DialogHeader.tsx
1179
- import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
1292
+ import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
1180
1293
  function DialogHeader(props) {
1181
1294
  const { title, children, ...rest } = props;
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 }) }),
1295
+ return /* @__PURE__ */ jsxs11("div", { ...rest, className: cn("p-4 sticky top-0 z-[20] backdrop-blur-sm", props.className), children: [
1296
+ /* @__PURE__ */ jsx23(Show, { when: !!title, children: /* @__PURE__ */ jsx23("h1", { className: "text-lg font-bold", children: title }) }),
1184
1297
  children
1185
1298
  ] });
1186
1299
  }
1187
1300
 
1188
1301
  // src/components/Overlay/Dialog/DialogFooter.tsx
1189
- import { jsx as jsx21 } from "react/jsx-runtime";
1302
+ import { jsx as jsx24 } from "react/jsx-runtime";
1190
1303
  function DialogFooter(props) {
1191
- return /* @__PURE__ */ jsx21(
1304
+ return /* @__PURE__ */ jsx24(
1192
1305
  "div",
1193
1306
  {
1194
1307
  ...props,
1195
- className: cn("px-6 py-4 border-t flex items-center justify-end border-border", props.className)
1308
+ className: cn("p-4 flex items-center justify-end sticky bottom-0 z-[20] backdrop-blur-sm", props.className)
1196
1309
  }
1197
1310
  );
1198
1311
  }
1199
1312
 
1200
1313
  // src/components/Overlay/Dialog/DialogContent.tsx
1201
- import { jsx as jsx22 } from "react/jsx-runtime";
1314
+ import { jsx as jsx25 } from "react/jsx-runtime";
1202
1315
  function DialogContent(props) {
1203
- return /* @__PURE__ */ jsx22(
1316
+ return /* @__PURE__ */ jsx25(
1204
1317
  "div",
1205
1318
  {
1206
1319
  ...props,
1207
- className: cn("p-6", props.className)
1320
+ className: cn("px-4 z-[10]", props.className)
1208
1321
  }
1209
1322
  );
1210
1323
  }
1211
1324
 
1212
1325
  // src/components/Overlay/Drawer/Drawer.tsx
1213
1326
  import { createPortal as createPortal2 } from "react-dom";
1214
- import { jsx as jsx23 } from "react/jsx-runtime";
1327
+ import { jsx as jsx26 } from "react/jsx-runtime";
1215
1328
  function Drawer(props) {
1216
1329
  const {
1217
1330
  open,
@@ -1246,7 +1359,7 @@ function Drawer(props) {
1246
1359
  }[_size] + (isHorizontal ? "vw" : "vh");
1247
1360
  })();
1248
1361
  return createPortal2(
1249
- /* @__PURE__ */ jsx23(
1362
+ /* @__PURE__ */ jsx26(
1250
1363
  ShowWithAnimation,
1251
1364
  {
1252
1365
  when: open,
@@ -1276,7 +1389,7 @@ function Drawer(props) {
1276
1389
  onClose?.();
1277
1390
  }
1278
1391
  },
1279
- children: /* @__PURE__ */ jsx23(
1392
+ children: /* @__PURE__ */ jsx26(
1280
1393
  ShowWithAnimation,
1281
1394
  {
1282
1395
  when: open,
@@ -1323,9 +1436,9 @@ function Drawer(props) {
1323
1436
  }
1324
1437
 
1325
1438
  // src/components/Overlay/Drawer/DrawerContent.tsx
1326
- import { jsx as jsx24 } from "react/jsx-runtime";
1439
+ import { jsx as jsx27 } from "react/jsx-runtime";
1327
1440
  function DrawerContent({ children, className, style }) {
1328
- return /* @__PURE__ */ jsx24(
1441
+ return /* @__PURE__ */ jsx27(
1329
1442
  "div",
1330
1443
  {
1331
1444
  className: cn("overflow-auto flex-1 p-4 relative hide-scrollbar", className),
@@ -1336,9 +1449,9 @@ function DrawerContent({ children, className, style }) {
1336
1449
  }
1337
1450
 
1338
1451
  // src/components/Overlay/Drawer/DrawerHeader.tsx
1339
- import { jsx as jsx25 } from "react/jsx-runtime";
1452
+ import { jsx as jsx28 } from "react/jsx-runtime";
1340
1453
  function DrawerHeader({ children, className, style }) {
1341
- return /* @__PURE__ */ jsx25(
1454
+ return /* @__PURE__ */ jsx28(
1342
1455
  "div",
1343
1456
  {
1344
1457
  className: cn("sticky top-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-b border-border", className),
@@ -1349,9 +1462,9 @@ function DrawerHeader({ children, className, style }) {
1349
1462
  }
1350
1463
 
1351
1464
  // src/components/Overlay/Drawer/DrawerFooter.tsx
1352
- import { jsx as jsx26 } from "react/jsx-runtime";
1465
+ import { jsx as jsx29 } from "react/jsx-runtime";
1353
1466
  function DrawerFooter({ children, className, style }) {
1354
- return /* @__PURE__ */ jsx26(
1467
+ return /* @__PURE__ */ jsx29(
1355
1468
  "div",
1356
1469
  {
1357
1470
  className: cn("sticky bottom-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-t border-border", className),
@@ -1363,10 +1476,10 @@ function DrawerFooter({ children, className, style }) {
1363
1476
 
1364
1477
  // src/components/Surfaces/Card/Card.tsx
1365
1478
  import React4 from "react";
1366
- import { jsx as jsx27 } from "react/jsx-runtime";
1479
+ import { jsx as jsx30 } from "react/jsx-runtime";
1367
1480
  var Card = React4.forwardRef(
1368
1481
  ({ className, children, ...props }, ref) => {
1369
- return /* @__PURE__ */ jsx27(
1482
+ return /* @__PURE__ */ jsx30(
1370
1483
  "div",
1371
1484
  {
1372
1485
  ref,
@@ -1384,22 +1497,22 @@ Card.displayName = "Card";
1384
1497
 
1385
1498
  // src/components/Surfaces/Card/CardHeader.tsx
1386
1499
  import React5 from "react";
1387
- import { jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
1500
+ import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
1388
1501
  var CardHeader = React5.forwardRef(
1389
1502
  ({ className, avatar, action, title, subheader, ...props }, ref) => {
1390
- return /* @__PURE__ */ jsxs11(
1503
+ return /* @__PURE__ */ jsxs12(
1391
1504
  "div",
1392
1505
  {
1393
1506
  ref,
1394
1507
  className: cn("flex items-center p-6", className),
1395
1508
  ...props,
1396
1509
  children: [
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 })
1510
+ avatar && /* @__PURE__ */ jsx31("div", { className: "mr-4 flex-shrink-0", children: avatar }),
1511
+ /* @__PURE__ */ jsxs12("div", { className: "flex-1 flex flex-col gap-1", children: [
1512
+ title && /* @__PURE__ */ jsx31("div", { className: "font-semibold leading-none tracking-tight", children: title }),
1513
+ subheader && /* @__PURE__ */ jsx31("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: subheader })
1401
1514
  ] }),
1402
- action && /* @__PURE__ */ jsx28("div", { className: "ml-4 flex-shrink-0 self-start", children: action })
1515
+ action && /* @__PURE__ */ jsx31("div", { className: "ml-4 flex-shrink-0 self-start", children: action })
1403
1516
  ]
1404
1517
  }
1405
1518
  );
@@ -1409,10 +1522,10 @@ CardHeader.displayName = "CardHeader";
1409
1522
 
1410
1523
  // src/components/Surfaces/Card/CardContent.tsx
1411
1524
  import React6 from "react";
1412
- import { jsx as jsx29 } from "react/jsx-runtime";
1525
+ import { jsx as jsx32 } from "react/jsx-runtime";
1413
1526
  var CardContent = React6.forwardRef(
1414
1527
  ({ className, ...props }, ref) => {
1415
- return /* @__PURE__ */ jsx29(
1528
+ return /* @__PURE__ */ jsx32(
1416
1529
  "div",
1417
1530
  {
1418
1531
  ref,
@@ -1426,10 +1539,10 @@ CardContent.displayName = "CardContent";
1426
1539
 
1427
1540
  // src/components/Surfaces/Card/CardFooter.tsx
1428
1541
  import React7 from "react";
1429
- import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
1542
+ import { Fragment as Fragment5, jsx as jsx33, jsxs as jsxs13 } from "react/jsx-runtime";
1430
1543
  var CardFooter = React7.forwardRef(
1431
1544
  ({ className, text, action, children }, ref) => {
1432
- return /* @__PURE__ */ jsx30(
1545
+ return /* @__PURE__ */ jsx33(
1433
1546
  "div",
1434
1547
  {
1435
1548
  ref,
@@ -1437,9 +1550,9 @@ var CardFooter = React7.forwardRef(
1437
1550
  "flex items-center justify-between p-6 bg-white dark:bg-gray-900 rounded-b-xl",
1438
1551
  className
1439
1552
  ),
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 })
1553
+ children: children || /* @__PURE__ */ jsxs13(Fragment5, { children: [
1554
+ text && /* @__PURE__ */ jsx33("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: text }),
1555
+ action && /* @__PURE__ */ jsx33("div", { className: "ml-auto flex items-center gap-2", children: action })
1443
1556
  ] })
1444
1557
  }
1445
1558
  );
@@ -1467,6 +1580,8 @@ export {
1467
1580
  SearchBar,
1468
1581
  Select,
1469
1582
  Separator,
1583
+ TabList,
1584
+ TabPanel,
1470
1585
  Table_default as Table,
1471
1586
  TableBody_default as TableBody,
1472
1587
  TableCell_default as TableCell,
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
- import { ReactNode, CSSProperties, HTMLAttributes } from 'react';
3
- import { P as PopoverProps } from '../Input-CBAdjRy6.js';
4
- export { I as Input, a as InputProps } from '../Input-CBAdjRy6.js';
2
+ import { ReactNode } from 'react';
3
+ import { P as PopoverProps, S as ShowWithAnimationProps } from '../types-BSufqQYT.js';
4
+ export { I as Input, a as InputProps } from '../types-BSufqQYT.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
 
7
7
  declare function Popover(props: PopoverProps): React$1.ReactPortal | null;
@@ -59,31 +59,7 @@ interface SpinnerProps {
59
59
  */
60
60
  declare function Spinner({ size, thickness, color, className, }: SpinnerProps): react_jsx_runtime.JSX.Element;
61
61
 
62
- type AnimationStyles = {
63
- children: {
64
- from: CSSProperties;
65
- active: CSSProperties;
66
- to?: CSSProperties;
67
- };
68
- otherwise?: {
69
- from: CSSProperties;
70
- active: CSSProperties;
71
- to?: CSSProperties;
72
- };
73
- };
74
- type AnimationsType = 'fade' | 'slide';
75
- type ShowWhenProps = {
76
- when: boolean;
77
- children: ReactNode;
78
- otherwise?: ReactNode;
79
- removeOnHide?: boolean;
80
- animationDuration?: number;
81
- animationType?: AnimationsType;
82
- animationStyle?: AnimationStyles;
83
- containerProps?: HTMLAttributes<HTMLDivElement>;
84
- } & HTMLAttributes<HTMLDivElement>;
85
-
86
- declare function ShowWithAnimation(props: ShowWhenProps): react_jsx_runtime.JSX.Element | null;
62
+ declare function ShowWithAnimation(props: ShowWithAnimationProps): react_jsx_runtime.JSX.Element | null;
87
63
 
88
64
  type ShowProps = {
89
65
  when: boolean;
@@ -92,4 +68,4 @@ type ShowProps = {
92
68
  };
93
69
  declare function Show({ when, children, otherwise }: ShowProps): ReactNode;
94
70
 
95
- export { Popover, PopoverProps, Ripple, type RippleProps, type RippleRef, Show, type ShowProps, type ShowWhenProps, ShowWithAnimation, Spinner, type SpinnerColor, type SpinnerProps };
71
+ export { Popover, PopoverProps, Ripple, type RippleProps, type RippleRef, Show, type ShowProps, ShowWithAnimation, ShowWithAnimationProps, Spinner, type SpinnerColor, type SpinnerProps };
@@ -5,7 +5,7 @@ import {
5
5
  Show,
6
6
  ShowWithAnimation,
7
7
  Spinner
8
- } from "../chunk-62RFRYVU.js";
8
+ } from "../chunk-CGY2R33R.js";
9
9
  import "../chunk-MCQS3QNN.js";
10
10
  import "../chunk-U65NGM6F.js";
11
11
  export {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { HTMLAttributes, RefObject, ReactNode, InputHTMLAttributes } from 'react';
2
+ import { HTMLAttributes, RefObject, ReactNode, InputHTMLAttributes, CSSProperties } from 'react';
3
3
 
4
4
  type PopoverPosition = `${'top' | 'bottom' | 'left' | 'right'}-${'start' | 'center' | 'end'}`;
5
5
  type PopoverProps = HTMLAttributes<HTMLDivElement> & {
@@ -38,4 +38,28 @@ declare const Input: React.ForwardRefExoticComponent<{
38
38
  inputContainerProps?: HTMLAttributes<HTMLDivElement>;
39
39
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "required"> & React.RefAttributes<HTMLInputElement>>;
40
40
 
41
- export { Input as I, type PopoverProps as P, type InputProps as a };
41
+ type AnimationStyles = {
42
+ children: {
43
+ from: CSSProperties;
44
+ active: CSSProperties;
45
+ to?: CSSProperties;
46
+ };
47
+ otherwise?: {
48
+ from: CSSProperties;
49
+ active: CSSProperties;
50
+ to?: CSSProperties;
51
+ };
52
+ };
53
+ type AnimationsType = 'fade' | 'slide';
54
+ type ShowWithAnimationProps = {
55
+ when: boolean;
56
+ children: ReactNode;
57
+ otherwise?: ReactNode;
58
+ removeOnHide?: boolean;
59
+ animationDuration?: number;
60
+ animationType?: AnimationsType;
61
+ animationStyle?: AnimationStyles;
62
+ containerProps?: HTMLAttributes<HTMLDivElement>;
63
+ } & HTMLAttributes<HTMLDivElement>;
64
+
65
+ export { Input as I, type PopoverProps as P, type ShowWithAnimationProps as S, type InputProps as a };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optigrit/optigrit-ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "UI components library for optigrit apps",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -54,7 +54,7 @@
54
54
  "lint": "tsc",
55
55
  "storybook": "storybook dev -p 6006",
56
56
  "build-storybook": "storybook build",
57
- "dev:yalc": "chokidar \"src/**/*\" -c \"npm run build && yalc push\" --polling"
57
+ "dev:yalc": "chokidar \"src/**/*\" --debounce 2000 -c \"npm run build && yalc push\" --polling"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@chromatic-com/storybook": "^5.1.2",