react-asc 25.0.4 → 25.0.5

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.
@@ -4,7 +4,7 @@ export interface IAutoCompleteProps {
4
4
  id?: string;
5
5
  name?: string;
6
6
  className?: string;
7
- options?: Array<ISelectOption>;
7
+ options?: ISelectOption[];
8
8
  value?: string;
9
9
  openOnFocus?: boolean;
10
10
  disabled?: boolean;
@@ -4,5 +4,5 @@ interface IConditionalWrapperProps {
4
4
  wrapper: (children: React.ReactNode) => JSX.Element;
5
5
  children: any;
6
6
  }
7
- export declare const ConditionalWrapper: ({ condition, wrapper, children }: IConditionalWrapperProps) => any;
7
+ export declare const ConditionalWrapper: ({ condition, wrapper, children }: IConditionalWrapperProps) => JSX.Element;
8
8
  export {};
@@ -2,7 +2,7 @@
2
2
  import { IFormInputError } from './form.interfaces';
3
3
  interface IFormErrorProps {
4
4
  className?: string;
5
- errors?: Array<IFormInputError>;
5
+ errors?: IFormInputError[];
6
6
  }
7
7
  export declare const FormError: (props: IFormErrorProps) => JSX.Element;
8
8
  export {};
@@ -16,7 +16,7 @@ export interface IFormInputProps {
16
16
  readonly?: boolean;
17
17
  isValid?: boolean;
18
18
  autoFocus?: boolean;
19
- options?: Array<IFormInputOptions>;
19
+ options?: IFormInputOptions[];
20
20
  textareaOptions?: IFormTextAreaOptions;
21
21
  selectOptions?: IFormSelectOptions;
22
22
  autoCompleteOptions?: IFormAutoCompleteOptions;
@@ -35,7 +35,7 @@ export interface IFormControlConfig {
35
35
  hint?: string;
36
36
  disabled?: boolean;
37
37
  readonly?: boolean;
38
- options?: Array<IFormInputOptions>;
38
+ options?: IFormInputOptions[];
39
39
  textareaOptions?: IFormTextAreaOptions;
40
40
  selectOptions?: IFormSelectOptions;
41
41
  autoCompleteOptions?: IFormAutoCompleteOptions;
@@ -2,11 +2,11 @@ import { IFormControlConfig, IFormInputError } from './form.interfaces';
2
2
  import { IFormControlType } from './form.types';
3
3
  export declare class FormControl {
4
4
  value: any;
5
- validators: Array<string>;
5
+ validators: string[];
6
6
  type: IFormControlType;
7
7
  config: IFormControlConfig;
8
- constructor(value: any, validators: Array<string>, type: IFormControlType, config: IFormControlConfig);
9
- errors: Array<IFormInputError>;
8
+ constructor(value: any, validators: string[], type: IFormControlType, config: IFormControlConfig);
9
+ errors: IFormInputError[];
10
10
  isValid: boolean;
11
11
  isDirty: boolean;
12
12
  }
@@ -4,7 +4,7 @@ import { IListItemProps } from '../List';
4
4
  export interface IMenuProps extends React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLDivElement>, HTMLDivElement> {
5
5
  toggle?: ReactElement;
6
6
  open?: boolean;
7
- children?: ReactElement<IListItemProps> | Array<ReactElement<IListItemProps>>;
7
+ children?: ReactElement<IListItemProps> | ReactElement<IListItemProps>[];
8
8
  menuPosition?: MenuPosition;
9
9
  onClickBackdrop?: () => void;
10
10
  }
@@ -2,7 +2,7 @@ import React, { ReactElement } from 'react';
2
2
  import { MenuPosition } from './menu.types';
3
3
  import { IListItemProps } from '../List';
4
4
  export interface IMenuBodyProps {
5
- children?: ReactElement<IListItemProps> | Array<ReactElement<IListItemProps>>;
5
+ children?: ReactElement<IListItemProps> | ReactElement<IListItemProps>[];
6
6
  className?: string;
7
7
  menuPosition?: MenuPosition;
8
8
  parentRef: React.RefObject<HTMLDivElement>;
@@ -13,7 +13,7 @@ interface IModalProps {
13
13
  onCancel?: () => void;
14
14
  onBackdropClick?: () => void;
15
15
  isDismissable?: boolean;
16
- buttons?: Array<IModalButton>;
16
+ buttons?: IModalButton[];
17
17
  fullScreen?: boolean;
18
18
  size?: SIZE;
19
19
  }
@@ -7,7 +7,7 @@ export interface IModalService {
7
7
  }
8
8
  export interface IModalOptions {
9
9
  isDismissable?: boolean;
10
- buttons?: Array<IModalButton>;
10
+ buttons?: IModalButton[];
11
11
  fullScreen?: boolean;
12
12
  size?: SIZE;
13
13
  }
@@ -4,4 +4,4 @@ export interface IPortalProps {
4
4
  target?: HTMLElement;
5
5
  className?: string;
6
6
  }
7
- export declare const Portal: ({ children, target, className }: IPortalProps) => import("react").ReactPortal;
7
+ export declare const Portal: ({ children, target, className }: IPortalProps) => JSX.Element;
@@ -4,13 +4,13 @@ export interface ISelectProps {
4
4
  id?: string;
5
5
  name?: string;
6
6
  className?: string;
7
- options?: Array<ISelectOption>;
8
- value?: string | Array<string>;
7
+ options?: ISelectOption[];
8
+ value?: string | string[];
9
9
  multiple?: boolean;
10
10
  multipleMaxCountItems?: number;
11
11
  disabled?: boolean;
12
12
  readOnly?: boolean;
13
- onChange?: (val: string | Array<string>) => void;
13
+ onChange?: (val: string | string[]) => void;
14
14
  onKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
15
15
  }
16
16
  export declare const Select: (props: ISelectProps) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ISidebarItem } from './sidebar.interfaces';
3
3
  interface ISidebarProps extends React.ComponentProps<'nav'> {
4
- items: Array<ISidebarItem>;
4
+ items: ISidebarItem[];
5
5
  currentUrl: string;
6
6
  onItemClicked: (path: string) => void;
7
7
  }
@@ -3,7 +3,7 @@ export interface ISidebarItem {
3
3
  path: string;
4
4
  label: string;
5
5
  icon?: string;
6
- items?: Array<ISidebarItem>;
6
+ items?: ISidebarItem[];
7
7
  isCollapsible?: boolean;
8
8
  isCollapsed?: boolean;
9
9
  }
@@ -1,7 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { IStepProps } from './Step';
3
3
  export interface IStepperProps {
4
- children?: ReactElement<IStepProps> | Array<ReactElement<IStepProps>>;
4
+ children?: ReactElement<IStepProps> | ReactElement<IStepProps>[];
5
5
  isLinear?: boolean;
6
6
  isDisabled?: boolean;
7
7
  showLabel?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  export interface ITableProps {
3
- children?: ReactElement | Array<ReactElement>;
3
+ children?: ReactElement | ReactElement[];
4
4
  className?: string;
5
5
  striped?: boolean;
6
6
  bordered?: boolean;
@@ -4,7 +4,7 @@ import { ITabProps } from './Tab';
4
4
  export interface ITabsProps {
5
5
  color?: COLOR;
6
6
  indicatorColor?: COLOR;
7
- children?: ReactElement<ITabProps> | Array<ReactElement<ITabProps>>;
7
+ children?: ReactElement<ITabProps> | ReactElement<ITabProps>[];
8
8
  className?: string;
9
9
  fixed?: boolean;
10
10
  onChange?: (value: string) => void;
@@ -1 +1 @@
1
- export declare function useCssClasses(cssClasses: Array<string>): string[];
1
+ export declare function useCssClasses(cssClasses: string[]): string[];
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export declare function useHover(): (boolean | import("react").MutableRefObject<null>)[];
2
+ export declare function useHover(): (boolean | React.MutableRefObject<null>)[];
package/index.es.js CHANGED
@@ -406,7 +406,7 @@ styleInject(css_248z$V);
406
406
 
407
407
  const ListItemAction = (_a) => {
408
408
  var { children, onClick } = _a, rest = __rest(_a, ["children", "onClick"]);
409
- return (React.createElement("div", Object.assign({ className: styles$V.listItemAction, onClick: e => onClick && onClick(e) }, rest), children));
409
+ return (React.createElement("div", Object.assign({ className: styles$V.listItemAction, onClick: (e) => onClick && onClick(e) }, rest), children));
410
410
  };
411
411
 
412
412
  var css_248z$U = ".ListItemTextIcon-module_listItemText__xCBLW {\n flex: 1;\n}";
@@ -638,7 +638,7 @@ const BreadcrumbItem = (props) => {
638
638
  onClick && onClick(event);
639
639
  };
640
640
  return (React.createElement("li", { className: getCssClasses(), onClick: handleClick },
641
- React.createElement(ConditionalWrapper, { condition: !isActive, wrapper: label => React.createElement("a", null, label) }, children)));
641
+ React.createElement(ConditionalWrapper, { condition: !isActive, wrapper: (label) => React.createElement("a", null, label) }, children)));
642
642
  };
643
643
 
644
644
  var css_248z$N = ".Card-module_card__TQdQq {\n background: var(--white);\n border-radius: var(--borderRadius);\n}\n.Card-module_card__TQdQq.Card-module_shadow__NxDVz {\n box-shadow: var(--shadow);\n}";
@@ -819,7 +819,7 @@ const Chip = (props) => {
819
819
  };
820
820
  return (React.createElement("div", Object.assign({ className: getCssClass() }, rest, { style: style }),
821
821
  React.createElement("span", null, children),
822
- isDeletable && (React.createElement("div", { className: styles$F.deleteIcon, onClick: e => handleClickOnDelete(e) }, deleteIcon))));
822
+ isDeletable && (React.createElement("div", { className: styles$F.deleteIcon, onClick: (e) => handleClickOnDelete(e) }, deleteIcon))));
823
823
  };
824
824
 
825
825
  const CssTransition = (props) => {
@@ -902,21 +902,9 @@ var styles$E = {"column":"Column-module_column__fcTgl"};
902
902
  styleInject(css_248z$E);
903
903
 
904
904
  const Column = (props) => {
905
- const { children, className } = props,
906
- // xs,
907
- // sm,
908
- // md,
909
- // lg,
910
- // xl,
911
- rest = __rest(props, ["children", "className"]);
912
- const getCssClasses = () => {
913
- const cssClasses = [];
914
- // !xs && !sm && !md && !lg && !xl && cssClasses.push('col');
915
- // if (xs) cssClasses.push(`col-${xs.toString()}`);
916
- // if (sm) cssClasses.push(`col-sm-${sm.toString()}`);
917
- // if (md) cssClasses.push(`col-md-${md.toString()}`);
918
- // if (lg) cssClasses.push(`col-lg-${lg.toString()}`);
919
- // if (xl) cssClasses.push(`col-xl-${xl.toString()}`);
905
+ const { children, className } = props, rest = __rest(props, ["children", "className"]);
906
+ const getCssClasses = () => {
907
+ const cssClasses = [];
920
908
  cssClasses.push(styles$E.column);
921
909
  className && cssClasses.push(className);
922
910
  return cssClasses.filter(css => css).join(' ');
@@ -1126,7 +1114,7 @@ const Select = (props) => {
1126
1114
  }
1127
1115
  };
1128
1116
  return (React.createElement("div", { ref: selectConainter, className: styles$B.selectContainer },
1129
- React.createElement("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: e => handleOnKeyDown(e) },
1117
+ React.createElement("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: (e) => handleOnKeyDown(e) },
1130
1118
  React.createElement(React.Fragment, null,
1131
1119
  !multiple && renderSingleViewModel(),
1132
1120
  multiple &&
@@ -1190,20 +1178,20 @@ const FormInput = (props) => {
1190
1178
  type === 'color' ||
1191
1179
  type === 'time')
1192
1180
  &&
1193
- React.createElement("input", { id: name, name: name, type: type, className: getCssClasses(), value: value, autoFocus: autoFocus, onInput: e => handleOnInput(e.target.value, type, name), onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), onBlur: onBlur, placeholder: placeholder, readOnly: readonly, disabled: disabled, onKeyDown: onKeyDown }),
1181
+ React.createElement("input", { id: name, name: name, type: type, className: getCssClasses(), value: value, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), onBlur: onBlur, placeholder: placeholder, readOnly: readonly, disabled: disabled, onKeyDown: onKeyDown }),
1194
1182
  type === 'file' &&
1195
- React.createElement(FileInput, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, autoFocus: autoFocus, readOnly: readonly, disabled: disabled, onChange: e => handleOnChange(e.target.value, type, name) }, "choose a file"),
1183
+ React.createElement(FileInput, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, autoFocus: autoFocus, readOnly: readonly, disabled: disabled, onChange: (e) => handleOnChange(e.target.value, type, name) }, "choose a file"),
1196
1184
  type === 'textarea' &&
1197
- React.createElement(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, autoFocus: autoFocus, onInput: e => handleOnInput(e.target.value, type, name), onChange: e => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.rows, style: (textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.resize) !== false ? undefined : { resize: 'none' } }),
1185
+ React.createElement(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.rows, style: (textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.resize) !== false ? undefined : { resize: 'none' } }),
1198
1186
  type === 'select' &&
1199
- React.createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: e => handleOnChange(e, type, name), options: options }),
1187
+ React.createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: (e) => handleOnChange(e, type, name), options: options }),
1200
1188
  type === 'autocomplete' &&
1201
- React.createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: e => handleOnChange(e, type, name), onSelect: e => handleOnChange(e.value, type, name), options: options }),
1189
+ React.createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: (e) => handleOnChange(e, type, name), onSelect: (e) => handleOnChange(e.value, type, name), options: options }),
1202
1190
  type === 'checkbox' &&
1203
- React.createElement(Checkbox, { id: name, name: name, label: label, className: (!isValid ? ' is-invalid' : ''), onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).checked, type, name), checked: value }),
1191
+ React.createElement(Checkbox, { id: name, name: name, label: label, className: (!isValid ? ' is-invalid' : ''), onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).checked, type, name), checked: value }),
1204
1192
  type === 'radio' &&
1205
1193
  React.createElement(React.Fragment, null, options.map((option) => React.createElement("div", { className: "form-check", key: option.id },
1206
- React.createElement("input", { id: option.id ? option.id : option.value, name: name, type: "radio", className: "form-check-input", onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), value: option.value, checked: value === option.value, onKeyDown: onKeyDown }),
1194
+ React.createElement("input", { id: option.id ? option.id : option.value, name: name, type: "radio", className: "form-check-input", onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), value: option.value, checked: value === option.value, onKeyDown: onKeyDown }),
1207
1195
  React.createElement("label", { className: "form-check-label", htmlFor: option.id }, option.label))))));
1208
1196
  };
1209
1197
 
@@ -1363,7 +1351,6 @@ class Form extends Component {
1363
1351
  const cssClasses = [labelClassName, this.isRequired(fieldKey) ? 'required' : undefined];
1364
1352
  return React.createElement(FormLabel, { htmlFor: fieldKey, className: cssClasses.join(' ') }, label);
1365
1353
  }
1366
- // trigger via ref
1367
1354
  handleFormSubmit() {
1368
1355
  for (const fieldKey of Object.keys(this.state.controls)) {
1369
1356
  const field = this.getControl(fieldKey);
@@ -1535,13 +1522,13 @@ const DateSelect = (props) => {
1535
1522
  return (React.createElement(Row, { className: getCssClasses() },
1536
1523
  React.createElement(Column, null,
1537
1524
  React.createElement(FormLabel, null, "Year"),
1538
- React.createElement(YearSelect, { value: currDate.getFullYear(), disabled: disabled, from: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.from, to: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.to, onChange: e => handleOnChange(e, DATEMODE.YEAR) })),
1525
+ React.createElement(YearSelect, { value: currDate.getFullYear(), disabled: disabled, from: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.from, to: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.to, onChange: (e) => handleOnChange(e, DATEMODE.YEAR) })),
1539
1526
  React.createElement(Column, null,
1540
1527
  React.createElement(FormLabel, null, "Month"),
1541
- React.createElement(MonthSelect, { value: currDate.getMonth(), disabled: disabled, onChange: e => handleOnChange(e, DATEMODE.MONTH) })),
1528
+ React.createElement(MonthSelect, { value: currDate.getMonth(), disabled: disabled, onChange: (e) => handleOnChange(e, DATEMODE.MONTH) })),
1542
1529
  React.createElement(Column, null,
1543
1530
  React.createElement(FormLabel, null, "Day"),
1544
- React.createElement(DaySelect, { day: currDate.getDate(), month: currDate.getMonth(), year: currDate.getFullYear(), disabled: disabled, onChange: e => handleOnChange(e, DATEMODE.DAY) }))));
1531
+ React.createElement(DaySelect, { day: currDate.getDate(), month: currDate.getMonth(), year: currDate.getFullYear(), disabled: disabled, onChange: (e) => handleOnChange(e, DATEMODE.DAY) }))));
1545
1532
  };
1546
1533
  /*
1547
1534
  * result = { year, month, day, dayOfWeek, weekNumber }
@@ -2199,11 +2186,11 @@ const Sidebar = (props) => {
2199
2186
  setMenuItems(newMenuItems);
2200
2187
  }
2201
2188
  else {
2202
- navigate(e, `/${item.path}`);
2189
+ navigate(e, `${item.path}`);
2203
2190
  }
2204
2191
  };
2205
2192
  const handleClickSubItem = (itemPath, subItemPath, e) => {
2206
- navigate(e, `/${itemPath}/${subItemPath}`);
2193
+ navigate(e, `${itemPath}/${subItemPath}`);
2207
2194
  };
2208
2195
  return (React.createElement("nav", Object.assign({ className: getCssClasses() }, rest),
2209
2196
  React.createElement(List, null, menuItems.map(item => (React.createElement(React.Fragment, { key: item.id },
@@ -2419,7 +2406,7 @@ const Stepper = (props) => {
2419
2406
  });
2420
2407
  };
2421
2408
  const renderSteps = (child, index) => {
2422
- return React.isValidElement(child) &&
2409
+ return (React.createElement(React.Fragment, null, React.isValidElement(child) &&
2423
2410
  cloneElement(child, {
2424
2411
  index: index,
2425
2412
  isActive: activeIndex >= index,
@@ -2428,7 +2415,7 @@ const Stepper = (props) => {
2428
2415
  showLabel: showLabel,
2429
2416
  showProgressCheckIcon: showProgressCheckIcon,
2430
2417
  onClick: (e) => handleClickStep(e.event, e.value, index)
2431
- });
2418
+ })));
2432
2419
  };
2433
2420
  const isStepOptional = (index) => {
2434
2421
  return steps && steps[index].props.isOptional;
@@ -2638,7 +2625,7 @@ const Table = (props) => {
2638
2625
  className && cssClasses.push(className);
2639
2626
  return cssClasses.filter(css => css).join(' ');
2640
2627
  };
2641
- return (React.createElement(ConditionalWrapper, { condition: responsive, wrapper: children => React.createElement("div", { className: styles$5.tableResponsive }, children) },
2628
+ return (React.createElement(ConditionalWrapper, { condition: responsive, wrapper: (children) => React.createElement("div", { className: styles$5.tableResponsive }, children) },
2642
2629
  React.createElement("table", { className: getCssClasses() }, children)));
2643
2630
  };
2644
2631
 
@@ -2667,7 +2654,7 @@ const TableBody = (props) => {
2667
2654
  const TableCell = (props) => {
2668
2655
  const { variant } = useTableContext();
2669
2656
  const { children, component } = props, rest = __rest(props, ["children", "component"]);
2670
- return (React.createElement(ConditionalWrapper, { condition: true, wrapper: children => ((variant === 'head' || component === 'th') ? (React.createElement("th", Object.assign({}, rest), children)) :
2657
+ return (React.createElement(ConditionalWrapper, { condition: true, wrapper: (children) => ((variant === 'head' || component === 'th') ? (React.createElement("th", Object.assign({}, rest), children)) :
2671
2658
  React.createElement("td", Object.assign({}, rest), children)) }, children));
2672
2659
  };
2673
2660
 
@@ -2885,19 +2872,19 @@ const TimeSelect = (props) => {
2885
2872
  showHours &&
2886
2873
  React.createElement(Column, null,
2887
2874
  React.createElement(FormLabel, null, "Hours"),
2888
- React.createElement(HourSelect, { value: currDate.getHours(), disabled: disabled, onChange: e => handleOnChange(e, TIMEMODE.HOUR) })),
2875
+ React.createElement(HourSelect, { value: currDate.getHours(), disabled: disabled, onChange: (e) => handleOnChange(e, TIMEMODE.HOUR) })),
2889
2876
  showMinutes &&
2890
2877
  React.createElement(Column, null,
2891
2878
  React.createElement(FormLabel, null, "Minutes"),
2892
- React.createElement(MinuteSelect, { value: currDate.getMinutes(), disabled: disabled, onChange: e => handleOnChange(e, TIMEMODE.MINUTE) })),
2879
+ React.createElement(MinuteSelect, { value: currDate.getMinutes(), disabled: disabled, onChange: (e) => handleOnChange(e, TIMEMODE.MINUTE) })),
2893
2880
  showSeconds &&
2894
2881
  React.createElement(Column, null,
2895
2882
  React.createElement(FormLabel, null, "Seconds"),
2896
- React.createElement(SecondSelect, { value: currDate.getSeconds(), disabled: disabled, onChange: e => handleOnChange(e, TIMEMODE.SECONDS) })),
2883
+ React.createElement(SecondSelect, { value: currDate.getSeconds(), disabled: disabled, onChange: (e) => handleOnChange(e, TIMEMODE.SECONDS) })),
2897
2884
  showMilliSeconds &&
2898
2885
  React.createElement(Column, null,
2899
2886
  React.createElement(FormLabel, null, "Milliseconds"),
2900
- React.createElement(MilliSecondSelect, { value: currDate.getMilliseconds(), disabled: disabled, onChange: e => handleOnChange(e, TIMEMODE.MILLISECONDS) }))));
2887
+ React.createElement(MilliSecondSelect, { value: currDate.getMilliseconds(), disabled: disabled, onChange: (e) => handleOnChange(e, TIMEMODE.MILLISECONDS) }))));
2901
2888
  };
2902
2889
 
2903
2890
  var css_248z$1 = ".TreeView-module_treeView__VVj-4 {\n list-style-type: none;\n margin-bottom: 0;\n padding-left: 0px !important;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 0px;\n}\n.TreeView-module_treeView__VVj-4 ul {\n padding-left: 48px !important;\n}";
package/index.js CHANGED
@@ -415,7 +415,7 @@ styleInject(css_248z$V);
415
415
 
416
416
  const ListItemAction = (_a) => {
417
417
  var { children, onClick } = _a, rest = __rest(_a, ["children", "onClick"]);
418
- return (React__default["default"].createElement("div", Object.assign({ className: styles$V.listItemAction, onClick: e => onClick && onClick(e) }, rest), children));
418
+ return (React__default["default"].createElement("div", Object.assign({ className: styles$V.listItemAction, onClick: (e) => onClick && onClick(e) }, rest), children));
419
419
  };
420
420
 
421
421
  var css_248z$U = ".ListItemTextIcon-module_listItemText__xCBLW {\n flex: 1;\n}";
@@ -647,7 +647,7 @@ const BreadcrumbItem = (props) => {
647
647
  onClick && onClick(event);
648
648
  };
649
649
  return (React__default["default"].createElement("li", { className: getCssClasses(), onClick: handleClick },
650
- React__default["default"].createElement(ConditionalWrapper, { condition: !isActive, wrapper: label => React__default["default"].createElement("a", null, label) }, children)));
650
+ React__default["default"].createElement(ConditionalWrapper, { condition: !isActive, wrapper: (label) => React__default["default"].createElement("a", null, label) }, children)));
651
651
  };
652
652
 
653
653
  var css_248z$N = ".Card-module_card__TQdQq {\n background: var(--white);\n border-radius: var(--borderRadius);\n}\n.Card-module_card__TQdQq.Card-module_shadow__NxDVz {\n box-shadow: var(--shadow);\n}";
@@ -828,7 +828,7 @@ const Chip = (props) => {
828
828
  };
829
829
  return (React__default["default"].createElement("div", Object.assign({ className: getCssClass() }, rest, { style: style }),
830
830
  React__default["default"].createElement("span", null, children),
831
- isDeletable && (React__default["default"].createElement("div", { className: styles$F.deleteIcon, onClick: e => handleClickOnDelete(e) }, deleteIcon))));
831
+ isDeletable && (React__default["default"].createElement("div", { className: styles$F.deleteIcon, onClick: (e) => handleClickOnDelete(e) }, deleteIcon))));
832
832
  };
833
833
 
834
834
  const CssTransition = (props) => {
@@ -911,21 +911,9 @@ var styles$E = {"column":"Column-module_column__fcTgl"};
911
911
  styleInject(css_248z$E);
912
912
 
913
913
  const Column = (props) => {
914
- const { children, className } = props,
915
- // xs,
916
- // sm,
917
- // md,
918
- // lg,
919
- // xl,
920
- rest = __rest(props, ["children", "className"]);
921
- const getCssClasses = () => {
922
- const cssClasses = [];
923
- // !xs && !sm && !md && !lg && !xl && cssClasses.push('col');
924
- // if (xs) cssClasses.push(`col-${xs.toString()}`);
925
- // if (sm) cssClasses.push(`col-sm-${sm.toString()}`);
926
- // if (md) cssClasses.push(`col-md-${md.toString()}`);
927
- // if (lg) cssClasses.push(`col-lg-${lg.toString()}`);
928
- // if (xl) cssClasses.push(`col-xl-${xl.toString()}`);
914
+ const { children, className } = props, rest = __rest(props, ["children", "className"]);
915
+ const getCssClasses = () => {
916
+ const cssClasses = [];
929
917
  cssClasses.push(styles$E.column);
930
918
  className && cssClasses.push(className);
931
919
  return cssClasses.filter(css => css).join(' ');
@@ -1135,7 +1123,7 @@ const Select = (props) => {
1135
1123
  }
1136
1124
  };
1137
1125
  return (React__default["default"].createElement("div", { ref: selectConainter, className: styles$B.selectContainer },
1138
- React__default["default"].createElement("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: e => handleOnKeyDown(e) },
1126
+ React__default["default"].createElement("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: (e) => handleOnKeyDown(e) },
1139
1127
  React__default["default"].createElement(React__default["default"].Fragment, null,
1140
1128
  !multiple && renderSingleViewModel(),
1141
1129
  multiple &&
@@ -1199,20 +1187,20 @@ const FormInput = (props) => {
1199
1187
  type === 'color' ||
1200
1188
  type === 'time')
1201
1189
  &&
1202
- React__default["default"].createElement("input", { id: name, name: name, type: type, className: getCssClasses(), value: value, autoFocus: autoFocus, onInput: e => handleOnInput(e.target.value, type, name), onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), onBlur: onBlur, placeholder: placeholder, readOnly: readonly, disabled: disabled, onKeyDown: onKeyDown }),
1190
+ React__default["default"].createElement("input", { id: name, name: name, type: type, className: getCssClasses(), value: value, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), onBlur: onBlur, placeholder: placeholder, readOnly: readonly, disabled: disabled, onKeyDown: onKeyDown }),
1203
1191
  type === 'file' &&
1204
- React__default["default"].createElement(FileInput, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, autoFocus: autoFocus, readOnly: readonly, disabled: disabled, onChange: e => handleOnChange(e.target.value, type, name) }, "choose a file"),
1192
+ React__default["default"].createElement(FileInput, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, autoFocus: autoFocus, readOnly: readonly, disabled: disabled, onChange: (e) => handleOnChange(e.target.value, type, name) }, "choose a file"),
1205
1193
  type === 'textarea' &&
1206
- React__default["default"].createElement(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, autoFocus: autoFocus, onInput: e => handleOnInput(e.target.value, type, name), onChange: e => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.rows, style: (textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.resize) !== false ? undefined : { resize: 'none' } }),
1194
+ React__default["default"].createElement(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.rows, style: (textareaOptions === null || textareaOptions === void 0 ? void 0 : textareaOptions.resize) !== false ? undefined : { resize: 'none' } }),
1207
1195
  type === 'select' &&
1208
- React__default["default"].createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: e => handleOnChange(e, type, name), options: options }),
1196
+ React__default["default"].createElement(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, multiple: selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.multiple, onChange: (e) => handleOnChange(e, type, name), options: options }),
1209
1197
  type === 'autocomplete' &&
1210
- React__default["default"].createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: e => handleOnChange(e, type, name), onSelect: e => handleOnChange(e.value, type, name), options: options }),
1198
+ React__default["default"].createElement(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, openOnFocus: autoCompleteOptions === null || autoCompleteOptions === void 0 ? void 0 : autoCompleteOptions.openOnFocus, onChange: (e) => handleOnChange(e, type, name), onSelect: (e) => handleOnChange(e.value, type, name), options: options }),
1211
1199
  type === 'checkbox' &&
1212
- React__default["default"].createElement(Checkbox, { id: name, name: name, label: label, className: (!isValid ? ' is-invalid' : ''), onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).checked, type, name), checked: value }),
1200
+ React__default["default"].createElement(Checkbox, { id: name, name: name, label: label, className: (!isValid ? ' is-invalid' : ''), onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).checked, type, name), checked: value }),
1213
1201
  type === 'radio' &&
1214
1202
  React__default["default"].createElement(React__default["default"].Fragment, null, options.map((option) => React__default["default"].createElement("div", { className: "form-check", key: option.id },
1215
- React__default["default"].createElement("input", { id: option.id ? option.id : option.value, name: name, type: "radio", className: "form-check-input", onChange: e => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), value: option.value, checked: value === option.value, onKeyDown: onKeyDown }),
1203
+ React__default["default"].createElement("input", { id: option.id ? option.id : option.value, name: name, type: "radio", className: "form-check-input", onChange: (e) => handleOnChange((e === null || e === void 0 ? void 0 : e.target).value, type, name), value: option.value, checked: value === option.value, onKeyDown: onKeyDown }),
1216
1204
  React__default["default"].createElement("label", { className: "form-check-label", htmlFor: option.id }, option.label))))));
1217
1205
  };
1218
1206
 
@@ -1372,7 +1360,6 @@ class Form extends React.Component {
1372
1360
  const cssClasses = [labelClassName, this.isRequired(fieldKey) ? 'required' : undefined];
1373
1361
  return React__default["default"].createElement(FormLabel, { htmlFor: fieldKey, className: cssClasses.join(' ') }, label);
1374
1362
  }
1375
- // trigger via ref
1376
1363
  handleFormSubmit() {
1377
1364
  for (const fieldKey of Object.keys(this.state.controls)) {
1378
1365
  const field = this.getControl(fieldKey);
@@ -1544,13 +1531,13 @@ const DateSelect = (props) => {
1544
1531
  return (React__default["default"].createElement(Row, { className: getCssClasses() },
1545
1532
  React__default["default"].createElement(Column, null,
1546
1533
  React__default["default"].createElement(FormLabel, null, "Year"),
1547
- React__default["default"].createElement(YearSelect, { value: currDate.getFullYear(), disabled: disabled, from: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.from, to: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.to, onChange: e => handleOnChange(e, exports.DATEMODE.YEAR) })),
1534
+ React__default["default"].createElement(YearSelect, { value: currDate.getFullYear(), disabled: disabled, from: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.from, to: yearConfig === null || yearConfig === void 0 ? void 0 : yearConfig.to, onChange: (e) => handleOnChange(e, exports.DATEMODE.YEAR) })),
1548
1535
  React__default["default"].createElement(Column, null,
1549
1536
  React__default["default"].createElement(FormLabel, null, "Month"),
1550
- React__default["default"].createElement(MonthSelect, { value: currDate.getMonth(), disabled: disabled, onChange: e => handleOnChange(e, exports.DATEMODE.MONTH) })),
1537
+ React__default["default"].createElement(MonthSelect, { value: currDate.getMonth(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.DATEMODE.MONTH) })),
1551
1538
  React__default["default"].createElement(Column, null,
1552
1539
  React__default["default"].createElement(FormLabel, null, "Day"),
1553
- React__default["default"].createElement(DaySelect, { day: currDate.getDate(), month: currDate.getMonth(), year: currDate.getFullYear(), disabled: disabled, onChange: e => handleOnChange(e, exports.DATEMODE.DAY) }))));
1540
+ React__default["default"].createElement(DaySelect, { day: currDate.getDate(), month: currDate.getMonth(), year: currDate.getFullYear(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.DATEMODE.DAY) }))));
1554
1541
  };
1555
1542
  /*
1556
1543
  * result = { year, month, day, dayOfWeek, weekNumber }
@@ -2208,11 +2195,11 @@ const Sidebar = (props) => {
2208
2195
  setMenuItems(newMenuItems);
2209
2196
  }
2210
2197
  else {
2211
- navigate(e, `/${item.path}`);
2198
+ navigate(e, `${item.path}`);
2212
2199
  }
2213
2200
  };
2214
2201
  const handleClickSubItem = (itemPath, subItemPath, e) => {
2215
- navigate(e, `/${itemPath}/${subItemPath}`);
2202
+ navigate(e, `${itemPath}/${subItemPath}`);
2216
2203
  };
2217
2204
  return (React__default["default"].createElement("nav", Object.assign({ className: getCssClasses() }, rest),
2218
2205
  React__default["default"].createElement(List, null, menuItems.map(item => (React__default["default"].createElement(React__default["default"].Fragment, { key: item.id },
@@ -2428,7 +2415,7 @@ const Stepper = (props) => {
2428
2415
  });
2429
2416
  };
2430
2417
  const renderSteps = (child, index) => {
2431
- return React__default["default"].isValidElement(child) &&
2418
+ return (React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].isValidElement(child) &&
2432
2419
  React.cloneElement(child, {
2433
2420
  index: index,
2434
2421
  isActive: activeIndex >= index,
@@ -2437,7 +2424,7 @@ const Stepper = (props) => {
2437
2424
  showLabel: showLabel,
2438
2425
  showProgressCheckIcon: showProgressCheckIcon,
2439
2426
  onClick: (e) => handleClickStep(e.event, e.value, index)
2440
- });
2427
+ })));
2441
2428
  };
2442
2429
  const isStepOptional = (index) => {
2443
2430
  return steps && steps[index].props.isOptional;
@@ -2647,7 +2634,7 @@ const Table = (props) => {
2647
2634
  className && cssClasses.push(className);
2648
2635
  return cssClasses.filter(css => css).join(' ');
2649
2636
  };
2650
- return (React__default["default"].createElement(ConditionalWrapper, { condition: responsive, wrapper: children => React__default["default"].createElement("div", { className: styles$5.tableResponsive }, children) },
2637
+ return (React__default["default"].createElement(ConditionalWrapper, { condition: responsive, wrapper: (children) => React__default["default"].createElement("div", { className: styles$5.tableResponsive }, children) },
2651
2638
  React__default["default"].createElement("table", { className: getCssClasses() }, children)));
2652
2639
  };
2653
2640
 
@@ -2676,7 +2663,7 @@ const TableBody = (props) => {
2676
2663
  const TableCell = (props) => {
2677
2664
  const { variant } = useTableContext();
2678
2665
  const { children, component } = props, rest = __rest(props, ["children", "component"]);
2679
- return (React__default["default"].createElement(ConditionalWrapper, { condition: true, wrapper: children => ((variant === 'head' || component === 'th') ? (React__default["default"].createElement("th", Object.assign({}, rest), children)) :
2666
+ return (React__default["default"].createElement(ConditionalWrapper, { condition: true, wrapper: (children) => ((variant === 'head' || component === 'th') ? (React__default["default"].createElement("th", Object.assign({}, rest), children)) :
2680
2667
  React__default["default"].createElement("td", Object.assign({}, rest), children)) }, children));
2681
2668
  };
2682
2669
 
@@ -2894,19 +2881,19 @@ const TimeSelect = (props) => {
2894
2881
  showHours &&
2895
2882
  React__default["default"].createElement(Column, null,
2896
2883
  React__default["default"].createElement(FormLabel, null, "Hours"),
2897
- React__default["default"].createElement(HourSelect, { value: currDate.getHours(), disabled: disabled, onChange: e => handleOnChange(e, exports.TIMEMODE.HOUR) })),
2884
+ React__default["default"].createElement(HourSelect, { value: currDate.getHours(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.TIMEMODE.HOUR) })),
2898
2885
  showMinutes &&
2899
2886
  React__default["default"].createElement(Column, null,
2900
2887
  React__default["default"].createElement(FormLabel, null, "Minutes"),
2901
- React__default["default"].createElement(MinuteSelect, { value: currDate.getMinutes(), disabled: disabled, onChange: e => handleOnChange(e, exports.TIMEMODE.MINUTE) })),
2888
+ React__default["default"].createElement(MinuteSelect, { value: currDate.getMinutes(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.TIMEMODE.MINUTE) })),
2902
2889
  showSeconds &&
2903
2890
  React__default["default"].createElement(Column, null,
2904
2891
  React__default["default"].createElement(FormLabel, null, "Seconds"),
2905
- React__default["default"].createElement(SecondSelect, { value: currDate.getSeconds(), disabled: disabled, onChange: e => handleOnChange(e, exports.TIMEMODE.SECONDS) })),
2892
+ React__default["default"].createElement(SecondSelect, { value: currDate.getSeconds(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.TIMEMODE.SECONDS) })),
2906
2893
  showMilliSeconds &&
2907
2894
  React__default["default"].createElement(Column, null,
2908
2895
  React__default["default"].createElement(FormLabel, null, "Milliseconds"),
2909
- React__default["default"].createElement(MilliSecondSelect, { value: currDate.getMilliseconds(), disabled: disabled, onChange: e => handleOnChange(e, exports.TIMEMODE.MILLISECONDS) }))));
2896
+ React__default["default"].createElement(MilliSecondSelect, { value: currDate.getMilliseconds(), disabled: disabled, onChange: (e) => handleOnChange(e, exports.TIMEMODE.MILLISECONDS) }))));
2910
2897
  };
2911
2898
 
2912
2899
  var css_248z$1 = ".TreeView-module_treeView__VVj-4 {\n list-style-type: none;\n margin-bottom: 0;\n padding-left: 0px !important;\n margin-block-start: 0;\n margin-block-end: 0;\n margin-inline-start: 0px;\n margin-inline-end: 0px;\n padding-inline-start: 0px;\n}\n.TreeView-module_treeView__VVj-4 ul {\n padding-left: 48px !important;\n}";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-asc",
3
- "version": "25.0.4",
3
+ "version": "25.0.5",
4
4
  "description": "handcrafted react components",
5
5
  "main": "index.js",
6
6
  "module": "index.es.js",