@optigrit/optigrit-ui 0.0.15 → 0.0.17

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.
@@ -233,6 +233,7 @@ var Input = forwardRef((props, ref) => {
233
233
  "--border-color-hover": colorMix(primaryColor, 40),
234
234
  "--light-primary-color": colorMix(primaryColor, 50),
235
235
  "--primary-color": colorMix(primaryColor, 100),
236
+ "--autofill-bg-color": colorMix(primaryColor, 10, bgColor),
236
237
  width: fullWidth === void 0 || fullWidth ? "100%" : "auto",
237
238
  ...inputContainerProps?.style
238
239
  },
@@ -263,7 +264,7 @@ var Input = forwardRef((props, ref) => {
263
264
  ref,
264
265
  required: required === void 0 || required,
265
266
  className: cn(
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)]",
267
+ "text-sm w-full h-full border-none outline-none rounded-lg transition-all duration-200 placeholder-[var(--placeholder-color)] text-[var(--text-color)] [&:-webkit-autofill]:[-webkit-text-fill-color:var(--text-color)] [&:-webkit-autofill]:[-webkit-box-shadow:_0_0_1000px_inset_var(--autofill-bg-color)] bg-[var(--bg-color)]",
267
268
  isFocus || !label || labelShrink === void 0 || labelShrink ? "" : "placeholder:opacity-0",
268
269
  inputProps.className
269
270
  ),
@@ -259,6 +259,8 @@ type AlertOptions = {
259
259
 
260
260
  declare const handleAlert: (title: React__default.ReactNode, type?: AlertType, options?: AlertOptions) => void;
261
261
 
262
+ declare const handleError: () => void;
263
+
262
264
  interface CardProps extends React__default.HTMLAttributes<HTMLDivElement> {
263
265
  }
264
266
  declare const Card: React__default.ForwardRefExoticComponent<CardProps & React__default.RefAttributes<HTMLDivElement>>;
@@ -281,4 +283,4 @@ interface CardFooterProps extends React__default.HTMLAttributes<HTMLDivElement>
281
283
  }
282
284
  declare const CardFooter: React__default.ForwardRefExoticComponent<CardFooterProps & React__default.RefAttributes<HTMLDivElement>>;
283
285
 
284
- 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, type Column, DataTable, type DataTableProps, 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 TablePaginationConfig, type TableProps, TableRow, type TableRowProps, Tooltip, type TooltipProps, handleAlert };
286
+ 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, type Column, DataTable, type DataTableProps, 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 TablePaginationConfig, type TableProps, TableRow, type TableRowProps, Tooltip, type TooltipProps, handleAlert, handleError };
@@ -6,7 +6,7 @@ import {
6
6
  ShowWithAnimation,
7
7
  Spinner,
8
8
  cn
9
- } from "../chunk-OPUJUU32.js";
9
+ } from "../chunk-ISRYL4WZ.js";
10
10
  import "../chunk-MCQS3QNN.js";
11
11
  import {
12
12
  useKeyboardShortcuts
@@ -305,7 +305,7 @@ function InputField(props) {
305
305
  } = props;
306
306
  const initRef = useRef4({ isUserTyped: false });
307
307
  const [error, setError] = useState2("");
308
- function handleError(value) {
308
+ function handleError2(value) {
309
309
  if (!initRef.current.isUserTyped) return;
310
310
  setError(() => {
311
311
  const error2 = validateValue?.(value);
@@ -317,12 +317,12 @@ function InputField(props) {
317
317
  }
318
318
  function handleOnChange(event) {
319
319
  onChangeValue?.(event.target.value);
320
- handleError(event.target.value);
320
+ handleError2(event.target.value);
321
321
  props.onChange?.(event);
322
322
  }
323
323
  function handleOnBlur(event) {
324
324
  initRef.current.isUserTyped = true;
325
- handleError(event.target.value);
325
+ handleError2(event.target.value);
326
326
  props.onBlur?.(event);
327
327
  }
328
328
  function handleOnFocus(event) {
@@ -331,7 +331,7 @@ function InputField(props) {
331
331
  useLayoutEffect(() => {
332
332
  if (props.value) {
333
333
  initRef.current.isUserTyped = true;
334
- handleError(props.value);
334
+ handleError2(props.value);
335
335
  }
336
336
  }, [props.value]);
337
337
  return /* @__PURE__ */ jsxs4("div", { ...containerProps, children: [
@@ -984,7 +984,7 @@ var TableContainer = forwardRef4(
984
984
  "div",
985
985
  {
986
986
  ref,
987
- className: `w-full overflow-auto rounded-lg border bg-white shadow-sm ${className}`,
987
+ className: `w-full overflow-auto rounded-lg border bg-bg-secondary shadow-sm ${className}`,
988
988
  ...props,
989
989
  children
990
990
  }
@@ -1566,7 +1566,7 @@ function DrawerHeader({ children, className, style }) {
1566
1566
  return /* @__PURE__ */ jsx35(
1567
1567
  "div",
1568
1568
  {
1569
- className: cn("sticky top-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-b border-border", className),
1569
+ className: cn("sticky top-0 z-20 backdrop-blur-sm bg-bg-secondary/60 px-4 py-3 border-b border-border", className),
1570
1570
  style,
1571
1571
  children
1572
1572
  }
@@ -1579,7 +1579,7 @@ function DrawerFooter({ children, className, style }) {
1579
1579
  return /* @__PURE__ */ jsx36(
1580
1580
  "div",
1581
1581
  {
1582
- className: cn("sticky bottom-0 z-20 backdrop-blur-sm bg-white/60 px-4 py-3 border-t border-border", className),
1582
+ className: cn("sticky bottom-0 z-20 backdrop-blur-sm bg-bg-secondary/60 px-4 py-3 border-t border-border", className),
1583
1583
  style,
1584
1584
  children
1585
1585
  }
@@ -1847,6 +1847,16 @@ var handleAlert = (title, type = "info", options) => {
1847
1847
  });
1848
1848
  };
1849
1849
 
1850
+ // src/components/Overlay/Alert/handleError.tsx
1851
+ var handleError = () => {
1852
+ renderAlert({
1853
+ open: true,
1854
+ title: "Something went wrong!",
1855
+ type: "error",
1856
+ options: { duration: 5e3 }
1857
+ });
1858
+ };
1859
+
1850
1860
  // src/components/Surfaces/Card/Card.tsx
1851
1861
  import React5 from "react";
1852
1862
  import { jsx as jsx39 } from "react/jsx-runtime";
@@ -1964,5 +1974,6 @@ export {
1964
1974
  TableHead_default as TableHead,
1965
1975
  TableRow_default as TableRow,
1966
1976
  Tooltip,
1967
- handleAlert
1977
+ handleAlert,
1978
+ handleError
1968
1979
  };
@@ -5,7 +5,7 @@ import {
5
5
  Show,
6
6
  ShowWithAnimation,
7
7
  Spinner
8
- } from "../chunk-OPUJUU32.js";
8
+ } from "../chunk-ISRYL4WZ.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.15",
3
+ "version": "0.0.17",
4
4
  "description": "UI components library for optigrit apps",
5
5
  "license": "ISC",
6
6
  "author": "",