@agilekit/ui 0.1.0-alpha.2 → 0.1.0-alpha.21

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.
Files changed (39) hide show
  1. package/lib/index.css +204 -0
  2. package/lib/index.js +1 -1
  3. package/lib/src/components/Button/Button.d.ts +1 -0
  4. package/lib/src/components/IconButton/IconButton.d.ts +11 -0
  5. package/lib/src/components/IconButton/index.d.ts +2 -0
  6. package/lib/src/components/IconButton/tests/IconButton.test.d.ts +1 -0
  7. package/lib/src/components/InputDuration/InputDuration.d.ts +5 -0
  8. package/lib/src/components/InputDuration/InputDuration.styles.d.ts +1 -0
  9. package/lib/src/components/InputDuration/InputDuration.types.d.ts +14 -0
  10. package/lib/src/components/InputDuration/index.d.ts +2 -0
  11. package/lib/src/components/InputDuration/tests/InputDuration.test.d.ts +1 -0
  12. package/lib/src/components/MultiTextField/MultiTextField.d.ts +1 -1
  13. package/lib/src/components/MultiselectGroup/MultiselectGroup.d.ts +13 -0
  14. package/lib/src/components/MultiselectGroup/MultiselectGroup.test.d.ts +1 -0
  15. package/lib/src/components/MultiselectGroup/index.d.ts +2 -0
  16. package/lib/src/components/NumberStepper/NumberStepper.d.ts +5 -0
  17. package/lib/src/components/NumberStepper/NumberStepper.styles.d.ts +1 -0
  18. package/lib/src/components/NumberStepper/NumberStepper.types.d.ts +18 -0
  19. package/lib/src/components/NumberStepper/index.d.ts +2 -0
  20. package/lib/src/components/NumberStepper/tests/NumberStepper.test.d.ts +1 -0
  21. package/lib/src/components/SectionMessage/SectionMessage.d.ts +1 -1
  22. package/lib/src/components/TextField/TextField.d.ts +2 -54
  23. package/lib/src/components/TextField/TextField.helpers.d.ts +3 -0
  24. package/lib/src/components/TextField/TextField.renderers.d.ts +52 -0
  25. package/lib/src/components/TextField/TextField.styles.d.ts +1 -1
  26. package/lib/src/components/TextField/TextField.types.d.ts +57 -0
  27. package/lib/src/components/TextField/index.d.ts +2 -0
  28. package/lib/src/components/TextField/tests/TextField.test.d.ts +1 -0
  29. package/lib/src/components/TooltipBox/TooltipBox.d.ts +21 -0
  30. package/lib/src/components/TooltipBox/index.d.ts +1 -0
  31. package/lib/src/index.d.ts +7 -1
  32. package/package.json +8 -3
  33. package/src/components/utils/breakpoints.ts +4 -0
  34. package/src/components/utils/browser.ts +4 -0
  35. package/src/components/utils/findParentBySelector.ts +4 -0
  36. package/src/components/utils/idGenerator.ts +4 -0
  37. package/src/components/utils/index.ts +4 -0
  38. package/src/components/utils/setNativeValue.ts +4 -0
  39. package/lib/src/components/FileUpload/FileUpload.stories.d.ts +0 -14
@@ -16,6 +16,7 @@ export interface IButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
16
16
  type?: 'button' | 'submit' | 'reset';
17
17
  ariaLabel?: string;
18
18
  startIcon?: React.ReactNode;
19
+ endIcon?: React.ReactNode;
19
20
  onClick?(event: React.MouseEvent<HTMLButtonElement>): void;
20
21
  }
21
22
  declare const Button: React.FC<IButtonProps>;
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ export type IconButtonVariant = 'basic' | 'primary' | 'success' | 'danger' | 'subtle';
3
+ export type IconButtonSize = 'small' | 'medium' | 'large' | 'xlarge';
4
+ export interface IIconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label' | 'children'> {
5
+ ariaLabel: string;
6
+ icon: React.ReactNode;
7
+ variant?: IconButtonVariant;
8
+ size?: IconButtonSize;
9
+ }
10
+ declare const IconButton: React.FC<IIconButtonProps>;
11
+ export default IconButton;
@@ -0,0 +1,2 @@
1
+ export { default as IconButton } from './IconButton';
2
+ export type { IIconButtonProps, IconButtonSize, IconButtonVariant } from './IconButton';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { IInputDurationProps } from './InputDuration.types';
3
+ export type { DurationValue, IInputDurationProps } from './InputDuration.types';
4
+ declare const InputDuration: React.FC<IInputDurationProps>;
5
+ export default InputDuration;
@@ -0,0 +1 @@
1
+ export declare const useInputDurationStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"divider" | "root" | "helperText" | "secondaryLabel" | "inputLabel" | "inputLabelFocused" | "asteriskRequired" | "inputContainer" | "inputContainerFocus" | "inputContainerDisabled" | "inputContainerError" | "sizeMd" | "sizeSm" | "segmentContainer" | "iconWrapper" | "iconMd" | "iconSm" | "numberContainer" | "numberInput" | "numberInputDisabled" | "unitLabel">;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { BasicTextFieldProps } from '../TextField';
3
+ export interface DurationValue {
4
+ hours: number | '';
5
+ minutes: number | '';
6
+ }
7
+ export interface IInputDurationProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'onBlur' | 'onFocus'>, BasicTextFieldProps {
8
+ value?: DurationValue;
9
+ onChange?(value: DurationValue): void;
10
+ size?: 'md' | 'sm';
11
+ name?: string;
12
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
13
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
14
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './InputDuration';
2
+ export type { DurationValue, IInputDurationProps } from './InputDuration.types';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { BasicTextFieldProps } from '../TextField/TextField';
2
+ import { BasicTextFieldProps } from '../TextField';
3
3
  interface Option {
4
4
  readonly label: string;
5
5
  readonly value: string;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ export interface MultiselectGroupProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ items: string[];
4
+ selectedItems?: string[];
5
+ consolidated?: boolean;
6
+ collapsed?: boolean;
7
+ onSelectionChange?: (newSelected: string[]) => void;
8
+ isRange?: boolean;
9
+ disabled?: boolean;
10
+ 'data-testid'?: string;
11
+ }
12
+ declare const MultiselectGroup: React.FC<MultiselectGroupProps>;
13
+ export default MultiselectGroup;
@@ -0,0 +1,2 @@
1
+ export { default } from './MultiselectGroup';
2
+ export type { MultiselectGroupProps } from './MultiselectGroup';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { NumberStepperProps } from './NumberStepper.types';
3
+ export type { NumberStepperProps, NumberStepperValue } from './NumberStepper.types';
4
+ declare const NumberStepper: React.FC<NumberStepperProps>;
5
+ export default NumberStepper;
@@ -0,0 +1 @@
1
+ export declare const useNumberStepperStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"input" | "root" | "helperText" | "secondaryLabel" | "inputLabel" | "inputLabelFocused" | "asteriskRequired" | "inputContainer" | "inputContainerFocus" | "inputContainerDisabled" | "inputContainerError" | "inputDisabled" | "sizeMd" | "sizeSm" | "actionButton" | "actionButtonLeft" | "actionButtonRight" | "actionButtonLeftMd" | "actionButtonRightMd" | "actionButtonSm" | "actionButtonDisabled" | "actionIconMd" | "actionIconSm" | "valueSegment" | "valueSegmentMd" | "valueSegmentSm" | "valueSegmentFocus" | "valueSegmentDisabled">;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { BasicTextFieldProps } from '../TextField';
3
+ export type NumberStepperValue = number | '';
4
+ export interface NumberStepperProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'onBlur' | 'onFocus'>, BasicTextFieldProps {
5
+ value?: NumberStepperValue;
6
+ defaultValue?: NumberStepperValue;
7
+ onValueChange?(nextValue: NumberStepperValue): void;
8
+ onChange?(event: React.ChangeEvent<HTMLInputElement>): void;
9
+ min?: number;
10
+ max?: number;
11
+ step?: number;
12
+ size?: 'md' | 'sm';
13
+ decrementDisabled?: boolean;
14
+ incrementDisabled?: boolean;
15
+ name?: string;
16
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
17
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
18
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './NumberStepper';
2
+ export type { NumberStepperProps, NumberStepperValue } from './NumberStepper.types';
@@ -8,7 +8,7 @@ export interface SectionMessageAction {
8
8
  rel?: string;
9
9
  }
10
10
  export interface SectionMessageProps {
11
- title: string;
11
+ title?: string;
12
12
  appearance?: 'information' | 'success' | 'warning' | 'error' | 'discovery';
13
13
  size?: 'small' | 'medium';
14
14
  children?: React.ReactNode;
@@ -1,58 +1,6 @@
1
1
  import React from 'react';
2
- import { NumberFormatValues } from 'react-number-format';
3
2
  import 'react-calendar/dist/Calendar.css';
4
- export interface BasicTextFieldProps {
5
- disabled?: boolean;
6
- label?: string;
7
- labelHidden?: boolean;
8
- secondaryLabel?: React.ReactNode;
9
- error?: Error | boolean | string;
10
- helperText?: React.ReactNode;
11
- placeholder?: string;
12
- id?: string;
13
- displayRequired?: boolean;
14
- }
15
- export interface ITextFieldProps extends React.HTMLAttributes<HTMLInputElement>, BasicTextFieldProps {
16
- inputRef?: any;
17
- prepend?: React.ReactNode;
18
- append?: React.ReactNode;
19
- startAdornment?: React.ReactNode;
20
- endAdornment?: React.ReactNode;
21
- value?: string | number | undefined;
22
- readOnly?: boolean;
23
- autoFocus?: boolean;
24
- autoComplete?: string;
25
- focused?: boolean;
26
- multiline?: boolean;
27
- datePicker?: boolean;
28
- dateRange?: boolean;
29
- colorPicker?: boolean | number;
30
- type?: string;
31
- mask?: string;
32
- name?: string;
33
- iconLeft?: React.ReactNode;
34
- iconRight?: React.ReactNode;
35
- inputProps?: Record<string, any>;
36
- inputSize?: 'medium' | 'large';
37
- onFocus?: any;
38
- onBlur?: any;
39
- color?: 'primary' | 'secondary' | undefined;
40
- rows?: string | number;
41
- rowsMax?: string | number;
42
- rowsMin?: string | number;
43
- onChange?(e: React.ChangeEvent<any> | string, id?: string): void;
44
- mode?: string;
45
- decimalScale?: number;
46
- fixedDecimalScale?: boolean;
47
- allowNegative?: boolean;
48
- prefix?: string;
49
- suffix?: string;
50
- defaultValue?: string | number;
51
- isNumericString?: boolean;
52
- format?: string;
53
- allowEmptyFormatting?: boolean;
54
- isAllowed?: (values: NumberFormatValues) => boolean;
55
- locale?: string;
56
- }
3
+ import type { ITextFieldProps } from './TextField.types';
4
+ export type { BasicTextFieldProps, ITextFieldProps } from './TextField.types';
57
5
  declare const TextField: React.FC<ITextFieldProps>;
58
6
  export default TextField;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const createInputChangeEvent: (value: string | number, name?: string) => React.ChangeEvent<HTMLInputElement>;
3
+ export declare const formatDatePickerValue: (value: any, dateRange: boolean, locale: string) => string;
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import { ColorResult } from 'react-color';
3
+ interface AdornmentParams {
4
+ startAdornment?: React.ReactNode;
5
+ endAdornment?: React.ReactNode;
6
+ iconLeft?: React.ReactNode;
7
+ iconRight?: React.ReactNode;
8
+ datePicker?: boolean;
9
+ dateRange?: boolean;
10
+ classes: any;
11
+ handlePopoverClick: (event: React.MouseEvent<any>) => void;
12
+ }
13
+ interface DatePickerPopoverParams {
14
+ open: boolean;
15
+ anchorEl: HTMLElement | null;
16
+ datePicker?: boolean;
17
+ dateRange?: boolean;
18
+ locale: string;
19
+ handlePopoverClose: () => void;
20
+ handleDatePicker: (value: any) => void;
21
+ }
22
+ interface ColorPickerButtonParams {
23
+ classes: any;
24
+ value?: string | number;
25
+ handlePopoverClick: (event: React.MouseEvent<any>) => void;
26
+ }
27
+ interface ColorPickerPopoverParams {
28
+ name?: string;
29
+ open: boolean;
30
+ anchorEl: HTMLElement | null;
31
+ classes: any;
32
+ value?: string | number;
33
+ colorPickerMode: 'free' | 'predefined';
34
+ predefinedColors?: string[];
35
+ handlePopoverClose: () => void;
36
+ handleColorPicker: (color: ColorResult) => void;
37
+ handlePredefinedColorPicker: (color: ColorResult) => void;
38
+ }
39
+ interface HelperTextParams {
40
+ error?: Error | boolean | string;
41
+ helperText?: React.ReactNode;
42
+ classes: any;
43
+ }
44
+ export declare const getTextFieldAdornments: ({ startAdornment, endAdornment, iconLeft, iconRight, datePicker, dateRange, classes, handlePopoverClick, }: AdornmentParams) => {
45
+ finalStartAdornment: React.ReactNode;
46
+ finalEndAdornment: React.ReactNode;
47
+ };
48
+ export declare const renderDatePickerPopover: ({ open, anchorEl, datePicker, dateRange, locale, handlePopoverClose, handleDatePicker, }: DatePickerPopoverParams) => React.ReactNode;
49
+ export declare const renderColorPickerButton: ({ classes, value, handlePopoverClick, }: ColorPickerButtonParams) => React.ReactNode;
50
+ export declare const renderColorPickerPopover: ({ name, open, anchorEl, classes, value, colorPickerMode, predefinedColors, handlePopoverClose, handleColorPicker, handlePredefinedColorPicker, }: ColorPickerPopoverParams) => React.ReactNode;
51
+ export declare const renderHelperText: ({ error, helperText, classes }: HelperTextParams) => React.ReactNode;
52
+ export {};
@@ -12,5 +12,5 @@ interface HelperTextStyles {
12
12
  }
13
13
  export declare const inputLabelStyles: (theme: ThemeAgile) => InputLabelStyles;
14
14
  export declare const helperTextStyles: (theme: ThemeAgile) => HelperTextStyles;
15
- export declare const useTextFieldStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"helperText" | "secondaryLabel" | "inputBase" | "inputLabel" | "inputLabelFocused" | "asteriskRequired" | "inputContainer" | "inputContainerFocus" | "inputContainerDisabled" | "inputContainerError" | "multilineContainer" | "inputDisabled" | "inputAction" | "inputGroupAppend" | "inputBtn" | "withAppend" | "withIconLeft" | "sideIcon" | "colorPickerButton" | "colorPopover" | "withMask" | "append" | "edgeEnd">;
15
+ export declare const useTextFieldStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"helperText" | "secondaryLabel" | "inputBase" | "inputLabel" | "inputLabelFocused" | "asteriskRequired" | "inputContainer" | "inputContainerFocus" | "inputContainerDisabled" | "inputContainerError" | "multilineContainer" | "inputDisabled" | "inputAction" | "inputGroupAppend" | "inputBtn" | "withAppend" | "withIconLeft" | "sideIcon" | "colorPickerButton" | "colorPopover" | "predefinedColorInput" | "withMask" | "append" | "edgeEnd">;
16
16
  export {};
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import { NumberFormatValues } from 'react-number-format';
3
+ export interface BasicTextFieldProps {
4
+ disabled?: boolean;
5
+ label?: string;
6
+ labelHidden?: boolean;
7
+ secondaryLabel?: React.ReactNode;
8
+ error?: Error | boolean | string;
9
+ helperText?: React.ReactNode;
10
+ placeholder?: string;
11
+ id?: string;
12
+ displayRequired?: boolean;
13
+ }
14
+ export interface ITextFieldProps extends React.HTMLAttributes<HTMLInputElement>, BasicTextFieldProps {
15
+ inputRef?: any;
16
+ prepend?: React.ReactNode;
17
+ append?: React.ReactNode;
18
+ startAdornment?: React.ReactNode;
19
+ endAdornment?: React.ReactNode;
20
+ value?: string | number | undefined;
21
+ readOnly?: boolean;
22
+ autoFocus?: boolean;
23
+ autoComplete?: string;
24
+ focused?: boolean;
25
+ multiline?: boolean;
26
+ datePicker?: boolean;
27
+ dateRange?: boolean;
28
+ colorPicker?: boolean | number;
29
+ colorPickerMode?: 'free' | 'predefined';
30
+ predefinedColors?: string[];
31
+ type?: string;
32
+ mask?: string;
33
+ name?: string;
34
+ iconLeft?: React.ReactNode;
35
+ iconRight?: React.ReactNode;
36
+ inputProps?: Record<string, any>;
37
+ inputSize?: 'medium' | 'large';
38
+ onFocus?: any;
39
+ onBlur?: any;
40
+ color?: 'primary' | 'secondary' | undefined;
41
+ rows?: string | number;
42
+ rowsMax?: string | number;
43
+ rowsMin?: string | number;
44
+ onChange?(e: React.ChangeEvent<any> | string, id?: string): void;
45
+ mode?: string;
46
+ decimalScale?: number;
47
+ fixedDecimalScale?: boolean;
48
+ allowNegative?: boolean;
49
+ prefix?: string;
50
+ suffix?: string;
51
+ defaultValue?: string | number;
52
+ isNumericString?: boolean;
53
+ format?: string;
54
+ allowEmptyFormatting?: boolean;
55
+ isAllowed?: (values: NumberFormatValues) => boolean;
56
+ locale?: string;
57
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './TextField';
2
+ export type { BasicTextFieldProps, ITextFieldProps } from './TextField.types';
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { Placement } from 'popper.js';
3
+ type TooltipBoxTrigger = 'click' | 'hover' | 'focus';
4
+ type TooltipBoxTriggerValue = TooltipBoxTrigger | TooltipBoxTrigger[] | `${TooltipBoxTrigger} ${TooltipBoxTrigger}` | `${TooltipBoxTrigger} ${TooltipBoxTrigger} ${TooltipBoxTrigger}`;
5
+ export type TooltipBoxTipPosition = 'none' | 'top-left' | 'top-center' | 'top-right' | 'left' | 'right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
6
+ export interface TooltipBoxProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ className?: string;
8
+ copy?: React.ReactNode;
9
+ tip?: TooltipBoxTipPosition;
10
+ type?: 'dark' | 'light';
11
+ offset?: number | string;
12
+ children: React.ReactElement;
13
+ placement?: Placement;
14
+ isOpen?: boolean;
15
+ fullWidth?: boolean;
16
+ maxWidth?: number;
17
+ zIndex?: number;
18
+ trigger?: TooltipBoxTriggerValue;
19
+ }
20
+ declare const TooltipBox: React.FC<TooltipBoxProps>;
21
+ export default TooltipBox;
@@ -0,0 +1 @@
1
+ export { default as TooltipBox } from './TooltipBox';
@@ -27,7 +27,10 @@ export { default as FileUpload, type FileUploadItemProps } from './components/Fi
27
27
  export { Gallery } from './components/Gallery/Gallery';
28
28
  export { default as Heading } from './components/Heading/Heading';
29
29
  export { default as Icon } from './components/Icon/Icon';
30
+ export { default as IconButton } from './components/IconButton/IconButton';
30
31
  export { default as InputFile } from './components/InputFile/InputFile';
32
+ export { default as InputDuration } from './components/InputDuration';
33
+ export { default as NumberStepper } from './components/NumberStepper';
31
34
  export { default as Label } from './components/Label/Label';
32
35
  export { default as Labelled } from './components/Labelled/Labelled';
33
36
  export { default as Link } from './components/Link/Link';
@@ -35,6 +38,7 @@ export { default as Loader } from './components/Loader/Loader';
35
38
  export { default as Modal } from './components/Modal/Modal';
36
39
  export { default as MultiTextField } from './components/MultiTextField/MultiTextField';
37
40
  export { default as MultiSelect } from './components/MultiSelect/MultiSelect';
41
+ export { default as MultiselectGroup } from './components/MultiselectGroup/MultiselectGroup';
38
42
  export { default as Navigation } from './components/Navigation/Navigation';
39
43
  export { default as Image } from './components/Image/Image';
40
44
  export { default as OutsideClickDetector } from './components/OutsideClickDetector/OutsideClickDetector';
@@ -49,6 +53,7 @@ export { default as Select } from './components/Select/Select';
49
53
  export { default as Skeleton } from './components/Skeleton/Skeleton';
50
54
  export { default as Slider } from './components/Slider/Slider';
51
55
  export { default as Switch } from './components/Switch/Switch';
56
+ export { default as TooltipBox } from './components/TooltipBox/TooltipBox';
52
57
  export { default as Text } from './components/Text/Text';
53
58
  export { default as TableList } from './components/TableList/TableList';
54
59
  export { default as TableListCell } from './components/TableList/components/Cell/Cell';
@@ -59,10 +64,11 @@ export { default as TableListRow } from './components/TableList/components/Table
59
64
  export { default as TopBar } from './components/TopBar/TopBar';
60
65
  export { default as Tabs } from './components/Tabs/Tabs';
61
66
  export { default as Tag } from './components/Tag/Tag';
62
- export { default as TextField } from './components/TextField/TextField';
67
+ export { default as TextField } from './components/TextField';
63
68
  export { default as UnstyledLink } from './components/UnstyledLink/UnstyledLink';
64
69
  export { default as SpinnerCube } from './components/SpinnerCube/SpinnerCube';
65
70
  export { default as StatusInline } from './components/StatusInline/StatusInline';
71
+ export type { IIconButtonProps, IconButtonSize, IconButtonVariant } from './components/IconButton/IconButton';
66
72
  export type { IStepType } from './components/ProgressIndicator/ProgressIndicator';
67
73
  export type { ThemeAgile } from './Theme';
68
74
  export { default as defaultTheme, themeObject } from './Theme';
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@agilekit/ui",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.21",
4
4
  "description": "Agile's product component library",
5
5
  "author": "Michael de Lima Alves <michaelalves@outlook.com>",
6
6
  "license": "MIT",
7
7
  "main": "lib/index",
8
+ "style": "lib/index.css",
8
9
  "types": "lib/src/index.d.ts",
9
- "source": "src/index.ts",
10
+ "sideEffects": [
11
+ "*.css",
12
+ "*.scss"
13
+ ],
10
14
  "files": [
11
15
  "/lib",
12
16
  "/src/assets",
@@ -62,7 +66,6 @@
62
66
  "react-color": "^2.19.3",
63
67
  "react-dom": "18.2.0",
64
68
  "react-multi-select-component": "^4.2.3",
65
- "react-router-dom": "^5.1.2",
66
69
  "react-scripts": "^3.4.3",
67
70
  "react-select": "^5.4.0"
68
71
  },
@@ -115,10 +118,12 @@
115
118
  "jest": "^29.5.0",
116
119
  "jest-axe": "^7.0.1",
117
120
  "jest-environment-jsdom": "^29.5.0",
121
+ "mini-css-extract-plugin": "^2.10.0",
118
122
  "postcss-loader": "^7.1.0",
119
123
  "prettier": "^2.8.4",
120
124
  "react-docgen-typescript-loader": "^3.7.2",
121
125
  "react-hook-form": "^7.57.0",
126
+ "react-router-dom": "^5.1.2",
122
127
  "react-input-mask": "^2.0.4",
123
128
  "react-number-format": "^4.9.1",
124
129
  "sass-loader": "^13.2.0",
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @file utils/breakpoints.ts
3
+ * @description Source module for `utils/breakpoints`.
4
+ */
1
5
  export const Breakpoints = {
2
6
  mobileXS: 374,
3
7
  // tslint:disable-next-line:object-literal-sort-keys
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @file utils/browser.ts
3
+ * @description Source module for `utils/browser`.
4
+ */
1
5
  const isIE = (): boolean => {
2
6
  const ua = window.navigator.userAgent;
3
7
 
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @file utils/findParentBySelector.ts
3
+ * @description Source module for `utils/findParentBySelector`.
4
+ */
1
5
  function collectionHas(a, b) {
2
6
  for (let i = 0, len = a.length; i < len; i++) {
3
7
  if (a[i] === b) {
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @file utils/idGenerator.ts
3
+ * @description Source module for `utils/idGenerator`.
4
+ */
1
5
  export const idGenerator = (prefix: string | number): (() => string) => {
2
6
  let index = 1;
3
7
  return () => '' + prefix + index++;
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @file utils/index.ts
3
+ * @description Public exports for the `utils` component module.
4
+ */
1
5
  export { Breakpoints } from './breakpoints';
2
6
  export { idGenerator } from './idGenerator';
3
7
  export { setNativeValue } from './setNativeValue';
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @file utils/setNativeValue.ts
3
+ * @description Source module for `utils/setNativeValue`.
4
+ */
1
5
  export function setNativeValue(element: any, value: any): void {
2
6
  const { set: valueSetter } = Object.getOwnPropertyDescriptor(element, 'value') || { set: undefined };
3
7
  const prototype = Object.getPrototypeOf(element);
@@ -1,14 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import FileUploadItem, { FileUploadItemProps } from './FileUpload';
3
- declare const meta: Meta<typeof FileUploadItem>;
4
- export default meta;
5
- type Story = StoryObj<FileUploadItemProps>;
6
- export declare const InProgress: Story;
7
- export declare const Completed: Story;
8
- export declare const Error: Story;
9
- export declare const ClickToView: Story;
10
- export declare const ImageInProgress: Story;
11
- export declare const ImageCompleted: Story;
12
- export declare const ImageWithoutProgress: Story;
13
- export declare const DraggableImage: Story;
14
- export declare const AllStatesDemo: Story;