react-asc 25.16.0 → 25.17.1

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/index.d.ts CHANGED
@@ -1015,9 +1015,15 @@ declare const useOnDestroy: (callBack: () => void) => void;
1015
1015
 
1016
1016
  declare function usePrevious<T>(value: T): T | undefined;
1017
1017
 
1018
- declare function useScreenSizeDetect(): {
1018
+ interface IUseScreenSizeDetect {
1019
1019
  screenSize: ScreenSize;
1020
- };
1020
+ isMobile?: boolean;
1021
+ isTablet?: boolean;
1022
+ isSmallScreen?: boolean;
1023
+ isDesktop?: boolean;
1024
+ isExtraLargeScreen?: boolean;
1025
+ }
1026
+ declare function useScreenSizeDetect(): IUseScreenSizeDetect;
1021
1027
 
1022
1028
  interface IUseWindowSize {
1023
1029
  width: number;
@@ -1140,4 +1146,4 @@ declare global {
1140
1146
  }
1141
1147
  }
1142
1148
 
1143
- export { Alert, AppBar, AppBarTitle, AutoComplete, Backdrop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonContext, ButtonGroup, Card, CardBody, CardFooter, CardImage, CardSubtitle, CardText, CardTitle, CaretDownSolidIcon, CheckSolidIcon, CheckSquareRegularIcon, Checkbox, ChevronDownSolidIcon, ChevronLeftSolidIcon, ChevronRightSolidIcon, ChevronUpSolidIcon, Chip, CircleSolidIcon, Color, Column, type ColumnSize, ConditionalWrapper, CssTransition, DATEMODE, DatePicker, DateSelect, DaySelect, Dot, Drawer, EmailValidator, ExpansionPanel, ExpansionPanelContent, ExpansionPanelHeader, FileInput, FileService, FloatingActionButton, Form, FormControl, FormError, FormGroup, FormHint, FormInput, FormLabel, GlobalModal, HomeSolidIcon, HourSelect, type HtmlBaseProps, type HtmlInputProps, type IAlertProps, type IAppBarProps, type IAppBarTitleProps, type IAutoCompleteProps, type IBackdropProps, type IBadgeProps, type IBreadcrumbItemProps, type IBreadcrumbProps, type IButtonContext, type IButtonGroupProps, type IButtonProps, type ICheckboxProps, type IChipProps, type IContainerProps, type IControls, type IDatePickerProps, type IDateSelectProps, type IDaySelectProps, type IDictionary, type IDot, type IDrawerProps, type IExpansionPanelContentProps, type IExpansionPanelHeaderProps, type IExpansionPanelProps, type IFileInputProps, type IFileUnparseConfig, type IFloatingActionButtonProps, type IFormAutoCompleteOptions, type IFormControlConfig, type IFormControlType, type IFormInputError, type IFormInputEvent, type IFormInputOptions, type IFormInputProps, type IFormProps, type IFormSelectOptions, type IFormState, type IFormTextAreaOptions, type IFormValidatorType, type IHourProps, type IIconButtonProps, type IIconProps, type IListItemProps, type IListProps, type ILoadingIndicatorContainerProps, type ILoadingIndicatorService, type ILoggerService, type IMenuBodyProps, type IMenuProps, type IMilliSecondProps, type IMinuteProps, type IModalButton, type IModalOptions, type IModalProps$1 as IModalProps, type IModalService, type IMonthProps, type INumberSelectProps, type IPortalProps, type IProgressBarProps, type ISecondProps, type ISelectOption, type ISelectProps, type ISidebarItem, type ISkeletonAvatarProps, type ISkeletonFooterProps, type ISkeletonImageProps, type ISkeletonTextProps, type ISnackbarOptions, type ISnackbarProps, type ISnackbarService, type ISpeedDialActionProps, type ISpeedDialIconProps, type ISpeedDialProps, type IStepProps, type IStepperActionsProps, type IStepperProps, type ITabPanelProps, type ITabProps, type ITableCellProps, type ITableProps, type ITabsProps, type ITextareaProps, type ITimeSelectProps, type ITooltipProps, type ITreeItemProps, type ITypographyProps, type IUseWindowSize, type IWrapperProps, type IYearProps, Icon, IconButton, IsEmptyValidator, IsEqualValidator, Link, List, ListItem, ListItemAction, ListItemAvatar, ListItemAvatarSize, ListItemIcon, ListItemText, LoadingIndicator, LoadingIndicatorContainer, LogType, MODALBUTTONTYPE, MODALTYPE, MaxValidator, Menu, MenuBody, MenuDivider, MenuItem, type MenuPosition, MenuToggle, MilliSecondSelect, MinValidator, MinuteSelect, Modal, ModalBody, ModalFooter, ModalHeader, MonthSelect, type Nullable, NumberSelect, POSITION, PlusSolidIcon, Portal, ProgressBar, Row, SIZE, STATUS, ScreenSize, SecondSelect, Select, Sidebar, SkeletonAvatar, SkeletonFooter, SkeletonImage, SkeletonText, Snackbar, SpeedDial, SpeedDialAction, SpeedDialIcon, SpinnerSolidIcon, SquareRegularIcon, Step, Stepper, StepperActions, TIMEMODE, type TRowDirection, Tab, TabPanel, Table, TableBody, TableCell, TableHead, TableRow, Tabs, Textarea, TimeSelect, TimesCircleSolidIcon, TimesSolidIcon, Tooltip, TooltipPlacement, TreeItem, TreeView, Typography, VARIANT, YearSelect, clipboardService, fileService, loadingIndicatorService, localService, loggerService, modalService, snackbarService, useButtonContext, useConstructor, useCssClasses, useDebounce, useHover, useMobileDetect, useOnDestroy, usePrevious, useScreenSizeDetect, useWindowSize };
1149
+ export { Alert, AppBar, AppBarTitle, AutoComplete, Backdrop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonContext, ButtonGroup, Card, CardBody, CardFooter, CardImage, CardSubtitle, CardText, CardTitle, CaretDownSolidIcon, CheckSolidIcon, CheckSquareRegularIcon, Checkbox, ChevronDownSolidIcon, ChevronLeftSolidIcon, ChevronRightSolidIcon, ChevronUpSolidIcon, Chip, CircleSolidIcon, Color, Column, type ColumnSize, ConditionalWrapper, CssTransition, DATEMODE, DatePicker, DateSelect, DaySelect, Dot, Drawer, EmailValidator, ExpansionPanel, ExpansionPanelContent, ExpansionPanelHeader, FileInput, FileService, FloatingActionButton, Form, FormControl, FormError, FormGroup, FormHint, FormInput, FormLabel, GlobalModal, HomeSolidIcon, HourSelect, type HtmlBaseProps, type HtmlInputProps, type IAlertProps, type IAppBarProps, type IAppBarTitleProps, type IAutoCompleteProps, type IBackdropProps, type IBadgeProps, type IBreadcrumbItemProps, type IBreadcrumbProps, type IButtonContext, type IButtonGroupProps, type IButtonProps, type ICheckboxProps, type IChipProps, type IContainerProps, type IControls, type IDatePickerProps, type IDateSelectProps, type IDaySelectProps, type IDictionary, type IDot, type IDrawerProps, type IExpansionPanelContentProps, type IExpansionPanelHeaderProps, type IExpansionPanelProps, type IFileInputProps, type IFileUnparseConfig, type IFloatingActionButtonProps, type IFormAutoCompleteOptions, type IFormControlConfig, type IFormControlType, type IFormInputError, type IFormInputEvent, type IFormInputOptions, type IFormInputProps, type IFormProps, type IFormSelectOptions, type IFormState, type IFormTextAreaOptions, type IFormValidatorType, type IHourProps, type IIconButtonProps, type IIconProps, type IListItemProps, type IListProps, type ILoadingIndicatorContainerProps, type ILoadingIndicatorService, type ILoggerService, type IMenuBodyProps, type IMenuProps, type IMilliSecondProps, type IMinuteProps, type IModalButton, type IModalOptions, type IModalProps$1 as IModalProps, type IModalService, type IMonthProps, type INumberSelectProps, type IPortalProps, type IProgressBarProps, type ISecondProps, type ISelectOption, type ISelectProps, type ISidebarItem, type ISkeletonAvatarProps, type ISkeletonFooterProps, type ISkeletonImageProps, type ISkeletonTextProps, type ISnackbarOptions, type ISnackbarProps, type ISnackbarService, type ISpeedDialActionProps, type ISpeedDialIconProps, type ISpeedDialProps, type IStepProps, type IStepperActionsProps, type IStepperProps, type ITabPanelProps, type ITabProps, type ITableCellProps, type ITableProps, type ITabsProps, type ITextareaProps, type ITimeSelectProps, type ITooltipProps, type ITreeItemProps, type ITypographyProps, type IUseScreenSizeDetect, type IUseWindowSize, type IWrapperProps, type IYearProps, Icon, IconButton, IsEmptyValidator, IsEqualValidator, Link, List, ListItem, ListItemAction, ListItemAvatar, ListItemAvatarSize, ListItemIcon, ListItemText, LoadingIndicator, LoadingIndicatorContainer, LogType, MODALBUTTONTYPE, MODALTYPE, MaxValidator, Menu, MenuBody, MenuDivider, MenuItem, type MenuPosition, MenuToggle, MilliSecondSelect, MinValidator, MinuteSelect, Modal, ModalBody, ModalFooter, ModalHeader, MonthSelect, type Nullable, NumberSelect, POSITION, PlusSolidIcon, Portal, ProgressBar, Row, SIZE, STATUS, ScreenSize, SecondSelect, Select, Sidebar, SkeletonAvatar, SkeletonFooter, SkeletonImage, SkeletonText, Snackbar, SpeedDial, SpeedDialAction, SpeedDialIcon, SpinnerSolidIcon, SquareRegularIcon, Step, Stepper, StepperActions, TIMEMODE, type TRowDirection, Tab, TabPanel, Table, TableBody, TableCell, TableHead, TableRow, Tabs, Textarea, TimeSelect, TimesCircleSolidIcon, TimesSolidIcon, Tooltip, TooltipPlacement, TreeItem, TreeView, Typography, VARIANT, YearSelect, clipboardService, fileService, loadingIndicatorService, localService, loggerService, modalService, snackbarService, useButtonContext, useConstructor, useCssClasses, useDebounce, useHover, useMobileDetect, useOnDestroy, usePrevious, useScreenSizeDetect, useWindowSize };
package/index.es.js CHANGED
@@ -225,8 +225,8 @@ function usePrevious(value) {
225
225
  }
226
226
 
227
227
  function useScreenSizeDetect() {
228
- const [screenSize, setScreenSize] = useState(ScreenSize.md);
229
228
  const windowSize = useWindowSize();
229
+ const [screenSize, setScreenSize] = useState(ScreenSize.md);
230
230
  const checkScreenSize = (height, width) => {
231
231
  if (height > 0 && width > 0) {
232
232
  if (width <= 480) {
@@ -249,7 +249,14 @@ function useScreenSizeDetect() {
249
249
  useEffect(() => {
250
250
  windowSize && checkScreenSize(windowSize.height, windowSize.width);
251
251
  }, [windowSize]);
252
- return { screenSize: screenSize };
252
+ return {
253
+ screenSize: screenSize,
254
+ isMobile: screenSize === ScreenSize.xs,
255
+ isTablet: screenSize === ScreenSize.sm,
256
+ isSmallScreen: screenSize === ScreenSize.md,
257
+ isDesktop: screenSize === ScreenSize.lg,
258
+ isExtraLargeScreen: screenSize === ScreenSize.xxl,
259
+ };
253
260
  }
254
261
 
255
262
  const CaretDownSolidIcon = () => (jsx("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "fas", "data-icon": "caret-down", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", children: jsx("path", { fill: "currentColor", d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" }) }));
@@ -5652,17 +5659,25 @@ var css_248z$y = ".Row-module_row__bTIWp {\n display: flex;\n gap: 15px;\n fl
5652
5659
  var styles$y = {"row":"Row-module_row__bTIWp"};
5653
5660
  styleInject(css_248z$y);
5654
5661
 
5655
- const Row = ({ children, direction = 'row', className, ...rest }) => {
5662
+ const Row = ({ children, direction, className, ...rest }) => {
5656
5663
  const [_direction, setDirection] = useState(direction);
5657
5664
  const { screenSize } = useScreenSizeDetect();
5658
5665
  useEffect(() => {
5659
- setDirection(screenSize === ScreenSize.xs ? 'column' : 'row');
5660
- }, [screenSize]);
5666
+ setDirection(direction);
5667
+ }, [direction]);
5661
5668
  const getCssClasses = () => {
5662
5669
  const cssClasses = [];
5663
5670
  cssClasses.push(styles$y.row);
5664
5671
  className && cssClasses.push(className);
5665
- direction && cssClasses.push(`flex-${_direction}`);
5672
+ if (_direction) {
5673
+ cssClasses.push(`flex-${_direction}`);
5674
+ }
5675
+ else if (screenSize === ScreenSize.xs || screenSize === ScreenSize.sm) {
5676
+ cssClasses.push(`flex-column`);
5677
+ }
5678
+ else {
5679
+ cssClasses.push(`flex-row`);
5680
+ }
5666
5681
  return cssClasses.filter(css => css).join(' ');
5667
5682
  };
5668
5683
  return (jsx("div", { className: getCssClasses(), ...rest, children: children }));
package/index.js CHANGED
@@ -227,8 +227,8 @@ function usePrevious(value) {
227
227
  }
228
228
 
229
229
  function useScreenSizeDetect() {
230
- const [screenSize, setScreenSize] = React.useState(exports.ScreenSize.md);
231
230
  const windowSize = useWindowSize();
231
+ const [screenSize, setScreenSize] = React.useState(exports.ScreenSize.md);
232
232
  const checkScreenSize = (height, width) => {
233
233
  if (height > 0 && width > 0) {
234
234
  if (width <= 480) {
@@ -251,7 +251,14 @@ function useScreenSizeDetect() {
251
251
  React.useEffect(() => {
252
252
  windowSize && checkScreenSize(windowSize.height, windowSize.width);
253
253
  }, [windowSize]);
254
- return { screenSize: screenSize };
254
+ return {
255
+ screenSize: screenSize,
256
+ isMobile: screenSize === exports.ScreenSize.xs,
257
+ isTablet: screenSize === exports.ScreenSize.sm,
258
+ isSmallScreen: screenSize === exports.ScreenSize.md,
259
+ isDesktop: screenSize === exports.ScreenSize.lg,
260
+ isExtraLargeScreen: screenSize === exports.ScreenSize.xxl,
261
+ };
255
262
  }
256
263
 
257
264
  const CaretDownSolidIcon = () => (jsxRuntime.jsx("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "fas", "data-icon": "caret-down", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", children: jsxRuntime.jsx("path", { fill: "currentColor", d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" }) }));
@@ -5654,17 +5661,25 @@ var css_248z$y = ".Row-module_row__bTIWp {\n display: flex;\n gap: 15px;\n fl
5654
5661
  var styles$y = {"row":"Row-module_row__bTIWp"};
5655
5662
  styleInject(css_248z$y);
5656
5663
 
5657
- const Row = ({ children, direction = 'row', className, ...rest }) => {
5664
+ const Row = ({ children, direction, className, ...rest }) => {
5658
5665
  const [_direction, setDirection] = React.useState(direction);
5659
5666
  const { screenSize } = useScreenSizeDetect();
5660
5667
  React.useEffect(() => {
5661
- setDirection(screenSize === exports.ScreenSize.xs ? 'column' : 'row');
5662
- }, [screenSize]);
5668
+ setDirection(direction);
5669
+ }, [direction]);
5663
5670
  const getCssClasses = () => {
5664
5671
  const cssClasses = [];
5665
5672
  cssClasses.push(styles$y.row);
5666
5673
  className && cssClasses.push(className);
5667
- direction && cssClasses.push(`flex-${_direction}`);
5674
+ if (_direction) {
5675
+ cssClasses.push(`flex-${_direction}`);
5676
+ }
5677
+ else if (screenSize === exports.ScreenSize.xs || screenSize === exports.ScreenSize.sm) {
5678
+ cssClasses.push(`flex-column`);
5679
+ }
5680
+ else {
5681
+ cssClasses.push(`flex-row`);
5682
+ }
5668
5683
  return cssClasses.filter(css => css).join(' ');
5669
5684
  };
5670
5685
  return (jsxRuntime.jsx("div", { className: getCssClasses(), ...rest, children: children }));
@@ -1,4 +1,10 @@
1
1
  import { ScreenSize } from '../enums';
2
- export declare function useScreenSizeDetect(): {
2
+ export interface IUseScreenSizeDetect {
3
3
  screenSize: ScreenSize;
4
- };
4
+ isMobile?: boolean;
5
+ isTablet?: boolean;
6
+ isSmallScreen?: boolean;
7
+ isDesktop?: boolean;
8
+ isExtraLargeScreen?: boolean;
9
+ }
10
+ export declare function useScreenSizeDetect(): IUseScreenSizeDetect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-asc",
3
- "version": "25.16.0",
3
+ "version": "25.17.1",
4
4
  "description": "handcrafted react components",
5
5
  "main": "index.js",
6
6
  "module": "index.es.js",