@undefine-ui/design-system 2.12.0 → 2.14.0
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/README.md +118 -1
- package/dist/index.cjs +275 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -4
- package/dist/index.d.ts +76 -4
- package/dist/index.js +294 -95
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { SetStateAction, ElementType } from 'react';
|
|
2
|
+
import { SetStateAction, ElementType, CSSProperties, ReactNode, SyntheticEvent } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { Breakpoint, Shadows, Components, Theme, SxProps as SxProps$1 } from '@mui/material/styles';
|
|
4
|
+
import { Breakpoint, Shadows, Components, Theme, CssVarsTheme, SxProps as SxProps$1 } from '@mui/material/styles';
|
|
5
5
|
import * as _mui_material from '@mui/material';
|
|
6
6
|
import { SxProps, Theme as Theme$1 } from '@mui/material';
|
|
7
7
|
import { BoxProps } from '@mui/material/Box';
|
|
@@ -1285,11 +1285,13 @@ declare module '@mui/material/styles' {
|
|
|
1285
1285
|
customShadows: CustomShadowOptions;
|
|
1286
1286
|
radius: RadiusOptions;
|
|
1287
1287
|
customSpacing: CustomSpacingOptions;
|
|
1288
|
+
vars: NonNullable<CssVarsTheme['vars']>;
|
|
1288
1289
|
}
|
|
1289
1290
|
interface ThemeOptions {
|
|
1290
1291
|
customShadows?: CustomShadowOptions;
|
|
1291
1292
|
radius?: RadiusOptions;
|
|
1292
1293
|
customSpacing?: CustomSpacingOptions;
|
|
1294
|
+
vars?: CssVarsTheme['vars'];
|
|
1293
1295
|
}
|
|
1294
1296
|
interface TypographyVariants {
|
|
1295
1297
|
fontSecondaryFamily: React.CSSProperties['fontFamily'];
|
|
@@ -1637,7 +1639,6 @@ declare const schemeConfig: {
|
|
|
1637
1639
|
modeStorageKey: string;
|
|
1638
1640
|
defaultMode: "light" | "dark";
|
|
1639
1641
|
};
|
|
1640
|
-
declare const getInitColorSchemeScript: react_jsx_runtime.JSX.Element;
|
|
1641
1642
|
|
|
1642
1643
|
/**
|
|
1643
1644
|
* [1] settings @primaryColor
|
|
@@ -1757,6 +1758,77 @@ interface LogoProps extends BoxProps {
|
|
|
1757
1758
|
declare const Logo: ({ sx, isFull, isWhite, isBlack, disableLink, LinkComponent, href, src, alt, ...rest }: LogoProps) => react_jsx_runtime.JSX.Element;
|
|
1758
1759
|
declare const AnimatedLogo: () => react_jsx_runtime.JSX.Element;
|
|
1759
1760
|
|
|
1761
|
+
type ImageStatus = 'idle' | 'loading' | 'loaded' | 'error';
|
|
1762
|
+
interface ImageProps extends Omit<BoxProps, 'component' | 'children' | 'position'> {
|
|
1763
|
+
src: string;
|
|
1764
|
+
alt: string;
|
|
1765
|
+
/**
|
|
1766
|
+
* Load the image only when it enters the viewport.
|
|
1767
|
+
* Defaults to true.
|
|
1768
|
+
*/
|
|
1769
|
+
lazy?: boolean;
|
|
1770
|
+
/**
|
|
1771
|
+
* Fallback URL used when the main source fails to load.
|
|
1772
|
+
*/
|
|
1773
|
+
fallbackSrc?: string;
|
|
1774
|
+
/**
|
|
1775
|
+
* Responsive image sources for different screen sizes/resolutions.
|
|
1776
|
+
* Example: "image-320w.jpg 320w, image-640w.jpg 640w, image-1280w.jpg 1280w"
|
|
1777
|
+
*/
|
|
1778
|
+
srcSet?: string;
|
|
1779
|
+
/**
|
|
1780
|
+
* Sizes attribute for responsive images. Defines which image size to use at different viewport widths.
|
|
1781
|
+
* Example: "(max-width: 600px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
|
1782
|
+
*/
|
|
1783
|
+
sizes?: string;
|
|
1784
|
+
/**
|
|
1785
|
+
* Aspect ratio (e.g. "16 / 9" or 1.5) applied to the wrapper to avoid layout shift.
|
|
1786
|
+
*/
|
|
1787
|
+
aspectRatio?: number | string;
|
|
1788
|
+
/**
|
|
1789
|
+
* Controls object-fit of the underlying image. Defaults to "cover".
|
|
1790
|
+
*/
|
|
1791
|
+
fit?: CSSProperties['objectFit'];
|
|
1792
|
+
/**
|
|
1793
|
+
* Controls object-position of the underlying image. Defaults to "center".
|
|
1794
|
+
*/
|
|
1795
|
+
position?: CSSProperties['objectPosition'];
|
|
1796
|
+
/**
|
|
1797
|
+
* Optional overlay content rendered above the image.
|
|
1798
|
+
*/
|
|
1799
|
+
overlay?: ReactNode;
|
|
1800
|
+
/**
|
|
1801
|
+
* Enables overlay even when overlay content is not provided.
|
|
1802
|
+
*/
|
|
1803
|
+
withOverlay?: boolean;
|
|
1804
|
+
/**
|
|
1805
|
+
* Custom loading indicator shown before the image is loaded.
|
|
1806
|
+
*/
|
|
1807
|
+
loadingIndicator?: ReactNode;
|
|
1808
|
+
/**
|
|
1809
|
+
* Custom error fallback content when both src and fallbackSrc fail.
|
|
1810
|
+
*/
|
|
1811
|
+
renderError?: ReactNode;
|
|
1812
|
+
/**
|
|
1813
|
+
* Additional styles for the underlying image element.
|
|
1814
|
+
*/
|
|
1815
|
+
imgSx?: BoxProps['sx'];
|
|
1816
|
+
/**
|
|
1817
|
+
* Additional props for the underlying image element.
|
|
1818
|
+
*/
|
|
1819
|
+
imgProps?: Omit<BoxProps<'img'>, 'component' | 'sx' | 'ref' | 'src' | 'alt' | 'children'>;
|
|
1820
|
+
/**
|
|
1821
|
+
* Root margin passed to the IntersectionObserver. Defaults to "200px".
|
|
1822
|
+
*/
|
|
1823
|
+
observerMargin?: string;
|
|
1824
|
+
/**
|
|
1825
|
+
* Callback fired when the image fails to load.
|
|
1826
|
+
*/
|
|
1827
|
+
onError?: (event: SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
declare const Image: react.ForwardRefExoticComponent<Omit<ImageProps, "ref"> & react.RefAttributes<HTMLImageElement>>;
|
|
1831
|
+
|
|
1760
1832
|
interface UploadProps extends DropzoneOptions {
|
|
1761
1833
|
error?: boolean;
|
|
1762
1834
|
sx?: SxProps$1<Theme>;
|
|
@@ -1926,4 +1998,4 @@ interface LoadingScreenProps extends BoxProps {
|
|
|
1926
1998
|
declare const LoadingScreen: ({ portal, sx, ...rest }: LoadingScreenProps) => react_jsx_runtime.JSX.Element;
|
|
1927
1999
|
declare const SplashScreen: ({ portal, sx, ...rest }: LoadingScreenProps) => react_jsx_runtime.JSX.Element;
|
|
1928
2000
|
|
|
1929
|
-
export { AnimatedLogo, BellNotification, CheckboxDefault, CheckboxIndeterminate, CheckboxSelect, ClipboardCheck, CloudUpload, type ColorSchema, Copy, CopyButton, type CustomShadowOptions, type CustomSpacingOptions, Eye, EyeClosed, Field, Form, Icon, type IconProps, type IconType, InfoCircleFill, InfoCircleOutline, KeyCommand, Loader, LoadingScreen, LocalStorageAvailable, LocalStorageGetItem, Logo, LongArrowUpLeftSolid, NavArrowDown, NavArrowLeft, NavArrowRight, OTPInput, type OTPInputProps, RHFAutocomplete, type RHFAutocompleteProps, RHFCheckbox, type RHFCheckboxProps, RHFMultiCheckbox, type RHFMultiCheckboxOption, type RHFMultiCheckboxProps, RHFMultiSwitch, RHFOTPInput, type RHFOTPInputProps, RHFRadioGroup, type RHFRadioGroupProps, RHFSwitch, RHFTextField, RHFUpload, type RHFUploadProps, RadioDefault, RadioSelect, type RadiusOptions, STORAGE_KEY, Search, Settings, SettingsConsumer, SettingsContext, type SettingsContextProps, SettingsProvider, type SettingsValueProps, SplashScreen, Table, type TableNoRowsProps, TablePagination, ThemeProvider, Trash, Upload, type UploadProps, type UseBooleanReturnType, type UseSetStateReturnType, UserFill, UserOutline, XMark, XMarkSolid, action, background, baseAction, basePalette, bgBlur, bgGradient, border, borderGradient, breakpoints, colorSchemes, common, components, createPaletteChannel, createShadowColor, createTheme, customShadows, customSpacing, darkPalette, defaultSettings, error, fCurrency, fData, fNumber, fPercent, fShortenNumber, formatFullname, getCurrencySymbol,
|
|
2001
|
+
export { AnimatedLogo, BellNotification, CheckboxDefault, CheckboxIndeterminate, CheckboxSelect, ClipboardCheck, CloudUpload, type ColorSchema, Copy, CopyButton, type CustomShadowOptions, type CustomSpacingOptions, Eye, EyeClosed, Field, Form, Icon, type IconProps, type IconType, Image, type ImageProps, type ImageStatus, InfoCircleFill, InfoCircleOutline, KeyCommand, Loader, LoadingScreen, LocalStorageAvailable, LocalStorageGetItem, Logo, LongArrowUpLeftSolid, NavArrowDown, NavArrowLeft, NavArrowRight, OTPInput, type OTPInputProps, RHFAutocomplete, type RHFAutocompleteProps, RHFCheckbox, type RHFCheckboxProps, RHFMultiCheckbox, type RHFMultiCheckboxOption, type RHFMultiCheckboxProps, RHFMultiSwitch, RHFOTPInput, type RHFOTPInputProps, RHFRadioGroup, type RHFRadioGroupProps, RHFSwitch, RHFTextField, RHFUpload, type RHFUploadProps, RadioDefault, RadioSelect, type RadiusOptions, STORAGE_KEY, Search, Settings, SettingsConsumer, SettingsContext, type SettingsContextProps, SettingsProvider, type SettingsValueProps, SplashScreen, Table, type TableNoRowsProps, TablePagination, ThemeProvider, Trash, Upload, type UploadProps, type UseBooleanReturnType, type UseSetStateReturnType, UserFill, UserOutline, XMark, XMarkSolid, action, background, baseAction, basePalette, bgBlur, bgGradient, border, borderGradient, breakpoints, colorSchemes, common, components, createPaletteChannel, createShadowColor, createTheme, customShadows, customSpacing, darkPalette, defaultSettings, error, fCurrency, fData, fNumber, fPercent, fShortenNumber, formatFullname, getCurrencySymbol, getInitials, getStorage, grey, hexToRgbChannel, hideScrollX, hideScrollY, icon, iconClasses, info, isEqual, lightPalette, maxLine, mediaQueries, menuItem, neutral, orderBy, paper, paramCase, primary, primaryFont, pxToRem, radius, remToPx, removeStorage, responsiveFontSizes, schemeConfig, secondary, secondaryFont, sentenceCase, setFont, setStorage, shadows, snakeCase, splitFullname, stylesMode, success, surface, tertiaryFont, text, textGradient, typography, updateComponentsWithSettings, updateCoreWithSettings, useBoolean, useCopyToClipboard, useCountdownDate, useCountdownSeconds, useEventListener, useLocalStorage, usePopover, useResponsive, useScrollOffSetTop, useSetState, useSettings, useWidth, varAlpha, warning };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { SetStateAction, ElementType } from 'react';
|
|
2
|
+
import { SetStateAction, ElementType, CSSProperties, ReactNode, SyntheticEvent } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { Breakpoint, Shadows, Components, Theme, SxProps as SxProps$1 } from '@mui/material/styles';
|
|
4
|
+
import { Breakpoint, Shadows, Components, Theme, CssVarsTheme, SxProps as SxProps$1 } from '@mui/material/styles';
|
|
5
5
|
import * as _mui_material from '@mui/material';
|
|
6
6
|
import { SxProps, Theme as Theme$1 } from '@mui/material';
|
|
7
7
|
import { BoxProps } from '@mui/material/Box';
|
|
@@ -1285,11 +1285,13 @@ declare module '@mui/material/styles' {
|
|
|
1285
1285
|
customShadows: CustomShadowOptions;
|
|
1286
1286
|
radius: RadiusOptions;
|
|
1287
1287
|
customSpacing: CustomSpacingOptions;
|
|
1288
|
+
vars: NonNullable<CssVarsTheme['vars']>;
|
|
1288
1289
|
}
|
|
1289
1290
|
interface ThemeOptions {
|
|
1290
1291
|
customShadows?: CustomShadowOptions;
|
|
1291
1292
|
radius?: RadiusOptions;
|
|
1292
1293
|
customSpacing?: CustomSpacingOptions;
|
|
1294
|
+
vars?: CssVarsTheme['vars'];
|
|
1293
1295
|
}
|
|
1294
1296
|
interface TypographyVariants {
|
|
1295
1297
|
fontSecondaryFamily: React.CSSProperties['fontFamily'];
|
|
@@ -1637,7 +1639,6 @@ declare const schemeConfig: {
|
|
|
1637
1639
|
modeStorageKey: string;
|
|
1638
1640
|
defaultMode: "light" | "dark";
|
|
1639
1641
|
};
|
|
1640
|
-
declare const getInitColorSchemeScript: react_jsx_runtime.JSX.Element;
|
|
1641
1642
|
|
|
1642
1643
|
/**
|
|
1643
1644
|
* [1] settings @primaryColor
|
|
@@ -1757,6 +1758,77 @@ interface LogoProps extends BoxProps {
|
|
|
1757
1758
|
declare const Logo: ({ sx, isFull, isWhite, isBlack, disableLink, LinkComponent, href, src, alt, ...rest }: LogoProps) => react_jsx_runtime.JSX.Element;
|
|
1758
1759
|
declare const AnimatedLogo: () => react_jsx_runtime.JSX.Element;
|
|
1759
1760
|
|
|
1761
|
+
type ImageStatus = 'idle' | 'loading' | 'loaded' | 'error';
|
|
1762
|
+
interface ImageProps extends Omit<BoxProps, 'component' | 'children' | 'position'> {
|
|
1763
|
+
src: string;
|
|
1764
|
+
alt: string;
|
|
1765
|
+
/**
|
|
1766
|
+
* Load the image only when it enters the viewport.
|
|
1767
|
+
* Defaults to true.
|
|
1768
|
+
*/
|
|
1769
|
+
lazy?: boolean;
|
|
1770
|
+
/**
|
|
1771
|
+
* Fallback URL used when the main source fails to load.
|
|
1772
|
+
*/
|
|
1773
|
+
fallbackSrc?: string;
|
|
1774
|
+
/**
|
|
1775
|
+
* Responsive image sources for different screen sizes/resolutions.
|
|
1776
|
+
* Example: "image-320w.jpg 320w, image-640w.jpg 640w, image-1280w.jpg 1280w"
|
|
1777
|
+
*/
|
|
1778
|
+
srcSet?: string;
|
|
1779
|
+
/**
|
|
1780
|
+
* Sizes attribute for responsive images. Defines which image size to use at different viewport widths.
|
|
1781
|
+
* Example: "(max-width: 600px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
|
1782
|
+
*/
|
|
1783
|
+
sizes?: string;
|
|
1784
|
+
/**
|
|
1785
|
+
* Aspect ratio (e.g. "16 / 9" or 1.5) applied to the wrapper to avoid layout shift.
|
|
1786
|
+
*/
|
|
1787
|
+
aspectRatio?: number | string;
|
|
1788
|
+
/**
|
|
1789
|
+
* Controls object-fit of the underlying image. Defaults to "cover".
|
|
1790
|
+
*/
|
|
1791
|
+
fit?: CSSProperties['objectFit'];
|
|
1792
|
+
/**
|
|
1793
|
+
* Controls object-position of the underlying image. Defaults to "center".
|
|
1794
|
+
*/
|
|
1795
|
+
position?: CSSProperties['objectPosition'];
|
|
1796
|
+
/**
|
|
1797
|
+
* Optional overlay content rendered above the image.
|
|
1798
|
+
*/
|
|
1799
|
+
overlay?: ReactNode;
|
|
1800
|
+
/**
|
|
1801
|
+
* Enables overlay even when overlay content is not provided.
|
|
1802
|
+
*/
|
|
1803
|
+
withOverlay?: boolean;
|
|
1804
|
+
/**
|
|
1805
|
+
* Custom loading indicator shown before the image is loaded.
|
|
1806
|
+
*/
|
|
1807
|
+
loadingIndicator?: ReactNode;
|
|
1808
|
+
/**
|
|
1809
|
+
* Custom error fallback content when both src and fallbackSrc fail.
|
|
1810
|
+
*/
|
|
1811
|
+
renderError?: ReactNode;
|
|
1812
|
+
/**
|
|
1813
|
+
* Additional styles for the underlying image element.
|
|
1814
|
+
*/
|
|
1815
|
+
imgSx?: BoxProps['sx'];
|
|
1816
|
+
/**
|
|
1817
|
+
* Additional props for the underlying image element.
|
|
1818
|
+
*/
|
|
1819
|
+
imgProps?: Omit<BoxProps<'img'>, 'component' | 'sx' | 'ref' | 'src' | 'alt' | 'children'>;
|
|
1820
|
+
/**
|
|
1821
|
+
* Root margin passed to the IntersectionObserver. Defaults to "200px".
|
|
1822
|
+
*/
|
|
1823
|
+
observerMargin?: string;
|
|
1824
|
+
/**
|
|
1825
|
+
* Callback fired when the image fails to load.
|
|
1826
|
+
*/
|
|
1827
|
+
onError?: (event: SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
declare const Image: react.ForwardRefExoticComponent<Omit<ImageProps, "ref"> & react.RefAttributes<HTMLImageElement>>;
|
|
1831
|
+
|
|
1760
1832
|
interface UploadProps extends DropzoneOptions {
|
|
1761
1833
|
error?: boolean;
|
|
1762
1834
|
sx?: SxProps$1<Theme>;
|
|
@@ -1926,4 +1998,4 @@ interface LoadingScreenProps extends BoxProps {
|
|
|
1926
1998
|
declare const LoadingScreen: ({ portal, sx, ...rest }: LoadingScreenProps) => react_jsx_runtime.JSX.Element;
|
|
1927
1999
|
declare const SplashScreen: ({ portal, sx, ...rest }: LoadingScreenProps) => react_jsx_runtime.JSX.Element;
|
|
1928
2000
|
|
|
1929
|
-
export { AnimatedLogo, BellNotification, CheckboxDefault, CheckboxIndeterminate, CheckboxSelect, ClipboardCheck, CloudUpload, type ColorSchema, Copy, CopyButton, type CustomShadowOptions, type CustomSpacingOptions, Eye, EyeClosed, Field, Form, Icon, type IconProps, type IconType, InfoCircleFill, InfoCircleOutline, KeyCommand, Loader, LoadingScreen, LocalStorageAvailable, LocalStorageGetItem, Logo, LongArrowUpLeftSolid, NavArrowDown, NavArrowLeft, NavArrowRight, OTPInput, type OTPInputProps, RHFAutocomplete, type RHFAutocompleteProps, RHFCheckbox, type RHFCheckboxProps, RHFMultiCheckbox, type RHFMultiCheckboxOption, type RHFMultiCheckboxProps, RHFMultiSwitch, RHFOTPInput, type RHFOTPInputProps, RHFRadioGroup, type RHFRadioGroupProps, RHFSwitch, RHFTextField, RHFUpload, type RHFUploadProps, RadioDefault, RadioSelect, type RadiusOptions, STORAGE_KEY, Search, Settings, SettingsConsumer, SettingsContext, type SettingsContextProps, SettingsProvider, type SettingsValueProps, SplashScreen, Table, type TableNoRowsProps, TablePagination, ThemeProvider, Trash, Upload, type UploadProps, type UseBooleanReturnType, type UseSetStateReturnType, UserFill, UserOutline, XMark, XMarkSolid, action, background, baseAction, basePalette, bgBlur, bgGradient, border, borderGradient, breakpoints, colorSchemes, common, components, createPaletteChannel, createShadowColor, createTheme, customShadows, customSpacing, darkPalette, defaultSettings, error, fCurrency, fData, fNumber, fPercent, fShortenNumber, formatFullname, getCurrencySymbol,
|
|
2001
|
+
export { AnimatedLogo, BellNotification, CheckboxDefault, CheckboxIndeterminate, CheckboxSelect, ClipboardCheck, CloudUpload, type ColorSchema, Copy, CopyButton, type CustomShadowOptions, type CustomSpacingOptions, Eye, EyeClosed, Field, Form, Icon, type IconProps, type IconType, Image, type ImageProps, type ImageStatus, InfoCircleFill, InfoCircleOutline, KeyCommand, Loader, LoadingScreen, LocalStorageAvailable, LocalStorageGetItem, Logo, LongArrowUpLeftSolid, NavArrowDown, NavArrowLeft, NavArrowRight, OTPInput, type OTPInputProps, RHFAutocomplete, type RHFAutocompleteProps, RHFCheckbox, type RHFCheckboxProps, RHFMultiCheckbox, type RHFMultiCheckboxOption, type RHFMultiCheckboxProps, RHFMultiSwitch, RHFOTPInput, type RHFOTPInputProps, RHFRadioGroup, type RHFRadioGroupProps, RHFSwitch, RHFTextField, RHFUpload, type RHFUploadProps, RadioDefault, RadioSelect, type RadiusOptions, STORAGE_KEY, Search, Settings, SettingsConsumer, SettingsContext, type SettingsContextProps, SettingsProvider, type SettingsValueProps, SplashScreen, Table, type TableNoRowsProps, TablePagination, ThemeProvider, Trash, Upload, type UploadProps, type UseBooleanReturnType, type UseSetStateReturnType, UserFill, UserOutline, XMark, XMarkSolid, action, background, baseAction, basePalette, bgBlur, bgGradient, border, borderGradient, breakpoints, colorSchemes, common, components, createPaletteChannel, createShadowColor, createTheme, customShadows, customSpacing, darkPalette, defaultSettings, error, fCurrency, fData, fNumber, fPercent, fShortenNumber, formatFullname, getCurrencySymbol, getInitials, getStorage, grey, hexToRgbChannel, hideScrollX, hideScrollY, icon, iconClasses, info, isEqual, lightPalette, maxLine, mediaQueries, menuItem, neutral, orderBy, paper, paramCase, primary, primaryFont, pxToRem, radius, remToPx, removeStorage, responsiveFontSizes, schemeConfig, secondary, secondaryFont, sentenceCase, setFont, setStorage, shadows, snakeCase, splitFullname, stylesMode, success, surface, tertiaryFont, text, textGradient, typography, updateComponentsWithSettings, updateCoreWithSettings, useBoolean, useCopyToClipboard, useCountdownDate, useCountdownSeconds, useEventListener, useLocalStorage, usePopover, useResponsive, useScrollOffSetTop, useSetState, useSettings, useWidth, varAlpha, warning };
|