@itcase/ui 1.8.101 → 1.8.102

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.
@@ -1,5 +1,53 @@
1
1
  import React from 'react';
2
- import type { ModalConfig } from './Modal.interface';
2
+ import type { ModalConfig, ModalRef } from './Modal.interface';
3
3
  declare const modalConfig: ModalConfig;
4
- declare const Modal: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
+ declare const Modal: React.ForwardRefExoticComponent<{
5
+ borderColor?: import("@itcase/types").BorderColorProps;
6
+ borderType?: import("@itcase/types").BorderTypeProps;
7
+ borderWidth?: import("@itcase/types").BorderWidthProps;
8
+ closeIconAppearance?: import("@itcase/types").CompositeAppearanceIconKeys;
9
+ closeIconAppearanceSize?: import("@itcase/types").CompositeAppearanceIconKeys;
10
+ closeIconFillSize?: import("@itcase/types").IconFillSizeProps;
11
+ closeIconImage?: string;
12
+ closeIconShape?: import("@itcase/types").ShapeProps;
13
+ closeIconSize?: import("@itcase/types").IconSizeProps;
14
+ elevation?: import("@itcase/types").ElevationProps;
15
+ fill?: import("@itcase/types").FillProps;
16
+ itemFill?: import("@itcase/types").ItemFillProps;
17
+ overlayFill?: import("../Overlay/Overlay.interface").OverlayProps["fill"];
18
+ overlayOpacity?: import("../Overlay/Overlay.interface").OverlayProps["opacity"];
19
+ shape?: import("@itcase/types").ShapeProps;
20
+ shapeStrength?: import("@itcase/types").ShapeStrengthProps;
21
+ size?: import("@itcase/types").SizeProps;
22
+ textColor?: import("@itcase/types").TextColorProps;
23
+ textSize?: import("@itcase/types").TextSizeProps;
24
+ titleTextColor?: import("@itcase/types").TextColorProps;
25
+ titleTextColorHover?: import("@itcase/types").TextColorHoverProps;
26
+ titleTextSize?: import("@itcase/types").TitleSizeProps;
27
+ titleTextTruncate?: boolean;
28
+ titleTextWeight?: import("@itcase/types").TextWeightProps;
29
+ titleTextWidth?: import("@itcase/types").TextWeightProps;
30
+ titleTextWrap?: import("@itcase/types").TextWrapProps;
31
+ } & import("../../hooks/useStyles/styleAttributes.interface").StyleAttributes & {
32
+ id?: string;
33
+ appearance?: import("@itcase/types").CompositeAppearanceKey;
34
+ children?: React.ReactNode;
35
+ className?: string;
36
+ contentClassName?: string;
37
+ dataTestId?: string;
38
+ dataTour?: string;
39
+ isCloseOnBlur?: boolean;
40
+ isOverlay?: boolean;
41
+ isScrollOnOpen?: boolean;
42
+ isSetFocusOnOpen?: boolean;
43
+ isSkeleton?: boolean;
44
+ modalQuerySelector?: string;
45
+ onClickOverlay: import("../Overlay/Overlay.interface").OverlayProps["onClick"];
46
+ onCloseModal?: () => void;
47
+ onOpenModal?: () => void;
48
+ scroll?: boolean;
49
+ stickyHeader?: boolean;
50
+ style?: React.CSSProperties;
51
+ title?: string;
52
+ } & React.RefAttributes<ModalRef>>;
5
53
  export { Modal, modalConfig };
@@ -1,51 +1,69 @@
1
- import type { FocusEvent, MouseEvent, MouseEventHandler, ReactNode } from 'react';
2
- import { AppearanceKeysDefault, BorderColorProps, ElevationProps, FillGradientProps, FillProps, ShapeProps } from '@itcase/types';
3
- import type { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
4
- export interface ModalThemeColor {
5
- [key: number | string | symbol]: any;
1
+ import { CSSProperties, MouseEventHandler, ReactNode } from 'react';
2
+ import { AppearanceKeysDefault, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, BorderColorProps, BorderTypeProps, BorderWidthProps, CompositeAppearanceIconKeys, CompositeAppearanceKey, ElevationProps, FillProps, IconFillSizeProps, IconSizeProps, ItemFillProps, ShapeProps, ShapeStrengthProps, SizeProps, TextColorHoverProps, TextColorProps, TextSizeProps, TextWeightProps, TextWrapProps, TitleSizeProps } from '@itcase/types';
3
+ import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
4
+ import { OverlayProps } from '../Overlay/Overlay.interface';
5
+ type ModalAppearanceProps = {
6
6
  borderColor?: BorderColorProps;
7
+ borderType?: BorderTypeProps;
8
+ borderWidth?: BorderWidthProps;
9
+ closeIconAppearance?: CompositeAppearanceIconKeys;
10
+ closeIconAppearanceSize?: CompositeAppearanceIconKeys;
11
+ closeIconFillSize?: IconFillSizeProps;
12
+ closeIconImage?: string;
13
+ closeIconShape?: ShapeProps;
14
+ closeIconSize?: IconSizeProps;
7
15
  elevation?: ElevationProps;
8
16
  fill?: FillProps;
9
- overlayFill?: FillProps;
10
- overlayFillGradient?: FillGradientProps;
11
- overlayOpacity?: string;
17
+ itemFill?: ItemFillProps;
18
+ overlayFill?: OverlayProps['fill'];
19
+ overlayOpacity?: OverlayProps['opacity'];
12
20
  shape?: ShapeProps;
13
- isOverlay?: boolean;
14
- }
15
- type AppearanceKeys = AppearanceKeysDefault & {};
16
- export type ModalAppearance = {
17
- [key in AppearanceKeys]?: ModalThemeColor;
21
+ shapeStrength?: ShapeStrengthProps;
22
+ size?: SizeProps;
23
+ textColor?: TextColorProps;
24
+ textSize?: TextSizeProps;
25
+ titleTextColor?: TextColorProps;
26
+ titleTextColorHover?: TextColorHoverProps;
27
+ titleTextSize?: TitleSizeProps;
28
+ titleTextTruncate?: boolean;
29
+ titleTextWeight?: TextWeightProps;
30
+ titleTextWidth?: TextWeightProps;
31
+ titleTextWrap?: TextWrapProps;
18
32
  };
19
- export interface ModalConfig {
20
- [key: number | string | symbol]: any;
21
- appearance: ModalAppearance | undefined;
22
- setAppearance: (newComponent: ModalAppearance) => void;
23
- }
24
- interface ModalLoaderProps {
25
- }
26
- interface ModalRef {
27
- closeModal: MouseEventHandler<HTMLDivElement>;
28
- modalElement: Element | HTMLDivElement | null;
29
- openModal: () => void;
30
- isOpen: boolean;
31
- }
32
- interface ModalProps extends ModalThemeColor, StyleAttributes {
33
+ type ModalProps = ModalAppearanceProps & StyleAttributes & {
33
34
  id?: string;
34
- [key: number | string | symbol]: any;
35
- appearance?: AppearanceKeys;
35
+ appearance?: CompositeAppearanceKey;
36
36
  children?: ReactNode;
37
37
  className?: string;
38
- closeButton?: ReactNode;
39
38
  contentClassName?: string;
40
- debug?: boolean;
41
- modalQuerySelector?: string;
42
- overlayClassName?: string;
39
+ dataTestId?: string;
40
+ dataTour?: string;
43
41
  isCloseOnBlur?: boolean;
44
- isOpen: boolean;
42
+ isOverlay?: boolean;
45
43
  isScrollOnOpen?: boolean;
46
44
  isSetFocusOnOpen?: boolean;
47
- onClickOverlay?: () => void;
48
- onCloseModal?: (event?: FocusEvent<HTMLDivElement> | MouseEvent<HTMLDivElement>) => void;
45
+ isSkeleton?: boolean;
46
+ modalQuerySelector?: string;
47
+ onClickOverlay: OverlayProps['onClick'];
48
+ onCloseModal?: () => void;
49
49
  onOpenModal?: () => void;
50
- }
51
- export type { ModalLoaderProps, ModalRef, ModalProps };
50
+ scroll?: boolean;
51
+ stickyHeader?: boolean;
52
+ style?: CSSProperties;
53
+ title?: string;
54
+ };
55
+ type ModalRef = {
56
+ closeModal: MouseEventHandler<HTMLDivElement>;
57
+ isOpen: boolean;
58
+ modalElement: Element | HTMLDivElement | null;
59
+ openModal: () => void;
60
+ };
61
+ type ModalAppearanceKey = AppearanceKeysDefault | AppearanceShapeKey | AppearanceSizeKey | AppearanceStyleKey;
62
+ type ModalAppearance = {
63
+ [key in ModalAppearanceKey]?: ModalAppearanceProps;
64
+ };
65
+ type ModalConfig = {
66
+ appearance: ModalAppearance;
67
+ setAppearance: (appearanceConfig: ModalAppearance) => void;
68
+ };
69
+ export type { ModalAppearance, ModalConfig, ModalProps, ModalRef };
@@ -1,25 +1,3 @@
1
- declare const modalAppearanceShape: {
2
- circular: {
3
- shape: string;
4
- };
5
- rounded: {
6
- shape: string;
7
- };
8
- roundedS: {
9
- shape: string;
10
- shapeStrength: string;
11
- };
12
- roundedM: {
13
- shape: string;
14
- shapeStrength: string;
15
- };
16
- roundedL: {
17
- shape: string;
18
- shapeStrength: string;
19
- };
20
- roundedXL: {
21
- shape: string;
22
- shapeStrength: string;
23
- };
24
- };
1
+ import { ModalAppearance } from '../Modal.interface';
2
+ declare const modalAppearanceShape: ModalAppearance;
25
3
  export { modalAppearanceShape };
@@ -1,27 +1,3 @@
1
- declare const modalAppearanceSize: {
2
- sizeXL: {
3
- size: string;
4
- titleTextSize: string;
5
- closeIconAppearanceSize: string;
6
- closeIconImage: string;
7
- };
8
- sizeL: {
9
- size: string;
10
- titleTextSize: string;
11
- closeIconAppearanceSize: string;
12
- closeIconImage: string;
13
- };
14
- sizeM: {
15
- size: string;
16
- titleTextSize: string;
17
- closeIconAppearanceSize: string;
18
- closeIconImage: string;
19
- };
20
- sizeS: {
21
- size: string;
22
- titleTextSize: string;
23
- closeIconAppearanceSize: string;
24
- closeIconImage: string;
25
- };
26
- };
1
+ import { ModalAppearance } from '../Modal.interface';
2
+ declare const modalAppearanceSize: ModalAppearance;
27
3
  export { modalAppearanceSize };
@@ -1,14 +1,3 @@
1
- declare const modalAppearanceStyle: {
2
- solid: {
3
- borderColor: string;
4
- };
5
- outlined: {
6
- fill: string;
7
- };
8
- full: {};
9
- ghost: {
10
- fill: string;
11
- borderColor: string;
12
- };
13
- };
1
+ import { ModalAppearance } from '../Modal.interface';
2
+ declare const modalAppearanceStyle: ModalAppearance;
14
3
  export { modalAppearanceStyle };
@@ -1,8 +1,3 @@
1
- declare const modalAppearanceSurface: {
2
- surfacePrimary: {
3
- fill: string;
4
- borderColor: string;
5
- closeIconAppearance: string;
6
- };
7
- };
1
+ import { ModalAppearance } from '../Modal.interface';
2
+ declare const modalAppearanceSurface: ModalAppearance;
8
3
  export { modalAppearanceSurface };
@@ -1,4 +1,5 @@
1
- import { AppearanceKeysDefault, FillGradientProps, FillProps } from '@itcase/types';
1
+ import { MouseEventHandler } from 'react';
2
+ import { AppearanceKeysDefault, OpacityProps, OverlayFillProps } from '@itcase/types';
2
3
  import type { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
3
4
  export interface OverlayThemeColor {
4
5
  }
@@ -15,11 +16,10 @@ interface OverlayProps extends OverlayThemeColor, StyleAttributes {
15
16
  [key: number | string | symbol]: any;
16
17
  appearance?: AppearanceKeys;
17
18
  className?: string;
18
- fill?: FillProps;
19
- fillGradient?: FillGradientProps;
20
- opacity?: string;
19
+ fill?: OverlayFillProps;
20
+ opacity?: OpacityProps;
21
21
  type?: string;
22
22
  isOverlay?: boolean;
23
- onClick?: () => void;
23
+ onClick?: MouseEventHandler<HTMLDivElement>;
24
24
  }
25
25
  export type { OverlayProps };
@@ -45,7 +45,7 @@ export interface TitleProps extends TitleThemeColor, StyleAttributes {
45
45
  tag?: ElementType;
46
46
  text?: string;
47
47
  textAlign?: TextAlignProps;
48
- textTruncate?: string;
48
+ textTruncate?: boolean;
49
49
  type?: string;
50
50
  onClick?: () => void;
51
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.8.101",
3
+ "version": "1.8.102",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",
@@ -141,7 +141,7 @@
141
141
  "@commitlint/config-conventional": "^19.8.1",
142
142
  "@itcase/config": "^1.0.55",
143
143
  "@itcase/lint": "^1.1.37",
144
- "@itcase/types": "^1.0.27",
144
+ "@itcase/types": "^1.0.30",
145
145
  "@rollup/plugin-alias": "^5.1.1",
146
146
  "@rollup/plugin-babel": "^6.0.4",
147
147
  "@rollup/plugin-commonjs": "^28.0.6",
@@ -171,7 +171,7 @@
171
171
  "lint-staged": "^16.1.5",
172
172
  "prettier": "^3.6.2",
173
173
  "react-docgen-typescript": "^2.4.0",
174
- "rollup": "^4.46.4",
174
+ "rollup": "^4.47.0",
175
175
  "rollup-plugin-copy": "^3.5.0",
176
176
  "rollup-plugin-dts": "^6.2.3",
177
177
  "rollup-plugin-peer-deps-external": "^2.2.4",