@itcase/ui 1.8.93 → 1.8.95

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 (165) hide show
  1. package/dist/{Avatar_cjs_Dh7c9RmS.js → Avatar_cjs_BcGACdXb.js} +1 -1
  2. package/dist/{Avatar_es_D4xUwAOB.js → Avatar_es_CRe2Om1a.js} +1 -1
  3. package/dist/{Button_cjs_CQzbBsB0.js → Button_cjs_DojNe74O.js} +2 -2
  4. package/dist/{Button_es_Bj8CZ_bh.js → Button_es_DCM3C_2S.js} +2 -2
  5. package/dist/{ChipsGroup_cjs_7mHtHzNh.js → ChipsGroup_cjs_DFdZuX6w.js} +1 -1
  6. package/dist/{ChipsGroup_es_Cz_gDYsw.js → ChipsGroup_es_Dm-iGTBi.js} +1 -1
  7. package/dist/{DatePicker_cjs_CnFVTsC1.js → DatePicker_cjs_mrV_Qly2.js} +3 -3
  8. package/dist/{DatePicker_es_DTSHtynU.js → DatePicker_es_Di_4I2Xv.js} +3 -3
  9. package/dist/{Divider_cjs_rxMMBfLC.js → Divider_cjs_DUYtmwn2.js} +3 -3
  10. package/dist/{Divider_es_CiRU0sTz.js → Divider_es_CCLBFIx6.js} +3 -3
  11. package/dist/{DropdownItem_cjs_DrMFaKh6.js → DropdownItem_cjs_DNSMwZdV.js} +2 -2
  12. package/dist/{DropdownItem_es_Dp7-DGkV.js → DropdownItem_es_DURwA4mR.js} +2 -2
  13. package/dist/{Icon_cjs_CDMtlf1A.js → Icon_cjs_B-nskaAO.js} +25 -29
  14. package/dist/{Icon_es_MOmiy9nF.js → Icon_es_CTKPPrrC.js} +25 -29
  15. package/dist/{Label_cjs_BTLhlnJW.js → Label_cjs_B1fNYJak.js} +1 -1
  16. package/dist/{Label_es_DBPp2ots.js → Label_es_d9RioNNf.js} +1 -1
  17. package/dist/{Loader_cjs_mB_UCgBG.js → Loader_cjs_CMvh28cF.js} +3 -4
  18. package/dist/{Loader_es_Dfs_VYxV.js → Loader_es_DGMpRDMk.js} +3 -4
  19. package/dist/cjs/components/Accordion.js +6 -7
  20. package/dist/cjs/components/Avatar.js +2 -2
  21. package/dist/cjs/components/AvatarStack.js +2 -2
  22. package/dist/cjs/components/Badge.js +1 -1
  23. package/dist/cjs/components/Breadcrumbs.js +1 -1
  24. package/dist/cjs/components/Button.js +3 -3
  25. package/dist/cjs/components/Cell.js +2 -2
  26. package/dist/cjs/components/Chips.js +2 -2
  27. package/dist/cjs/components/Choice.js +2 -2
  28. package/dist/cjs/components/CookiesWarning.js +3 -3
  29. package/dist/cjs/components/DatePeriod.js +6 -6
  30. package/dist/cjs/components/DatePicker.js +5 -5
  31. package/dist/cjs/components/Divider.js +1 -1
  32. package/dist/cjs/components/Drawer.js +2 -2
  33. package/dist/cjs/components/Dropdown.js +3 -3
  34. package/dist/cjs/components/HeroTitle.js +1 -1
  35. package/dist/cjs/components/Icon.js +1 -1
  36. package/dist/cjs/components/InputPassword.js +1 -1
  37. package/dist/cjs/components/Label.js +2 -2
  38. package/dist/cjs/components/Loader.js +1 -1
  39. package/dist/cjs/components/MenuItem.js +1 -1
  40. package/dist/cjs/components/Modal.js +2 -2
  41. package/dist/cjs/components/ModalSheetBottom.js +8 -7
  42. package/dist/cjs/components/Notification.js +1 -1
  43. package/dist/cjs/components/Pagination.js +3 -3
  44. package/dist/cjs/components/Response.js +3 -3
  45. package/dist/cjs/components/Search.js +1 -1
  46. package/dist/cjs/components/Segmented.js +1 -1
  47. package/dist/cjs/components/Select.js +3 -3
  48. package/dist/cjs/components/Swiper.js +1 -1
  49. package/dist/cjs/components/Tab.js +2 -2
  50. package/dist/cjs/components/Tile.js +13 -13
  51. package/dist/cjs/components/Title.js +1 -1
  52. package/dist/cjs/components/Tooltip.js +1 -1
  53. package/dist/cjs/components/Warning.js +1 -1
  54. package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +23 -18
  55. package/dist/components/Accordion.js +6 -7
  56. package/dist/components/Avatar.js +2 -2
  57. package/dist/components/AvatarStack.js +2 -2
  58. package/dist/components/Badge.js +1 -1
  59. package/dist/components/Breadcrumbs.js +1 -1
  60. package/dist/components/Button.js +3 -3
  61. package/dist/components/Cell.js +2 -2
  62. package/dist/components/Chips.js +2 -2
  63. package/dist/components/Choice.js +2 -2
  64. package/dist/components/CookiesWarning.js +3 -3
  65. package/dist/components/DatePeriod.js +6 -6
  66. package/dist/components/DatePicker.js +5 -5
  67. package/dist/components/Divider.js +1 -1
  68. package/dist/components/Drawer.js +2 -2
  69. package/dist/components/Dropdown.js +3 -3
  70. package/dist/components/HeroTitle.js +1 -1
  71. package/dist/components/Icon.js +1 -1
  72. package/dist/components/InputPassword.js +1 -1
  73. package/dist/components/Label.js +2 -2
  74. package/dist/components/Loader.js +1 -1
  75. package/dist/components/MenuItem.js +1 -1
  76. package/dist/components/Modal.js +2 -2
  77. package/dist/components/ModalSheetBottom.js +8 -7
  78. package/dist/components/Notification.js +1 -1
  79. package/dist/components/Pagination.js +3 -3
  80. package/dist/components/Response.js +3 -3
  81. package/dist/components/Search.js +1 -1
  82. package/dist/components/Segmented.js +1 -1
  83. package/dist/components/Select.js +3 -3
  84. package/dist/components/Swiper.js +1 -1
  85. package/dist/components/Tab.js +2 -2
  86. package/dist/components/Tile.js +13 -13
  87. package/dist/components/Title.js +1 -1
  88. package/dist/components/Tooltip.js +1 -1
  89. package/dist/components/Warning.js +1 -1
  90. package/dist/css/components/Accordion/Accordion.css +12 -36
  91. package/dist/css/components/Loader/Loader.css +0 -6
  92. package/dist/css/styles/align/align_horizontal.css +22 -40
  93. package/dist/css/styles/align/align_vertical.css +7 -25
  94. package/dist/css/styles/alignment/alignment.css +0 -8
  95. package/dist/css/styles/border-color/border-color.css +2 -3
  96. package/dist/css/styles/border-color/border-color_active.css +2 -3
  97. package/dist/css/styles/border-color/border-color_focus.css +2 -3
  98. package/dist/css/styles/border-color/border-color_hover.css +2 -3
  99. package/dist/css/styles/fill/fill_active.css +2 -4
  100. package/dist/css/styles/fill/fill_active_hover.css +2 -4
  101. package/dist/css/styles/fill/fill_hover.css +2 -3
  102. package/dist/css/styles/text-color/text-color_active.css +2 -4
  103. package/dist/css/styles/text-color/text-color_active_hover.css +2 -4
  104. package/dist/css/styles/text-color/text-color_hover.css +2 -4
  105. package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +23 -18
  106. package/dist/types/components/Accordion/Accordion.interface.d.ts +21 -39
  107. package/dist/types/components/Badge/Badge.appearance.d.ts +230 -2
  108. package/dist/types/components/Badge/Badge.interface.d.ts +26 -19
  109. package/dist/types/components/Badge/appearance/badgeShape.d.ts +4 -4
  110. package/dist/types/components/Divider/Divider.appearance.d.ts +814 -2
  111. package/dist/types/components/Divider/Divider.interface.d.ts +24 -36
  112. package/dist/types/components/Divider/appearance/dividerAccent.d.ts +2 -5
  113. package/dist/types/components/Divider/appearance/dividerError.d.ts +2 -5
  114. package/dist/types/components/Divider/appearance/dividerPrimary.d.ts +2 -5
  115. package/dist/types/components/Divider/appearance/dividerSecondary.d.ts +2 -5
  116. package/dist/types/components/Divider/appearance/dividerSize.d.ts +2 -11
  117. package/dist/types/components/Divider/appearance/dividerSuccess.d.ts +2 -5
  118. package/dist/types/components/Divider/appearance/dividerSurface.d.ts +2 -14
  119. package/dist/types/components/Divider/appearance/dividerWarning.d.ts +2 -5
  120. package/dist/types/components/Icon/Icon.appearance.d.ts +41 -2
  121. package/dist/types/components/Icon/Icon.d.ts +1 -0
  122. package/dist/types/components/Icon/Icon.interface.d.ts +59 -73
  123. package/dist/types/components/Icon/appearance/iconAccent.d.ts +2 -22
  124. package/dist/types/components/Icon/appearance/iconDanger.d.ts +2 -13
  125. package/dist/types/components/Icon/appearance/iconDisabled.d.ts +2 -12
  126. package/dist/types/components/Icon/appearance/iconError.d.ts +2 -15
  127. package/dist/types/components/Icon/appearance/iconInfo.d.ts +2 -18
  128. package/dist/types/components/Icon/appearance/iconPrimary.d.ts +2 -15
  129. package/dist/types/components/Icon/appearance/iconSecondary.d.ts +2 -13
  130. package/dist/types/components/Icon/appearance/iconShape.d.ts +2 -24
  131. package/dist/types/components/Icon/appearance/iconSize.d.ts +2 -142
  132. package/dist/types/components/Icon/appearance/iconStyle.d.ts +2 -13
  133. package/dist/types/components/Icon/appearance/iconSuccess.d.ts +2 -13
  134. package/dist/types/components/Icon/appearance/iconSurface.d.ts +2 -27
  135. package/dist/types/components/Icon/appearance/iconWarning.d.ts +2 -15
  136. package/dist/types/components/Image/Image.d.ts +2 -5
  137. package/dist/types/components/Loader/Loader.appearance.d.ts +466 -2
  138. package/dist/types/components/Loader/Loader.interface.d.ts +16 -16
  139. package/dist/types/components/Loader/appearance/loaderAccent.d.ts +2 -6
  140. package/dist/types/components/Loader/appearance/loaderDanger.d.ts +2 -6
  141. package/dist/types/components/Loader/appearance/loaderError.d.ts +2 -6
  142. package/dist/types/components/Loader/appearance/loaderInfo.d.ts +2 -6
  143. package/dist/types/components/Loader/appearance/loaderPrimary.d.ts +2 -6
  144. package/dist/types/components/Loader/appearance/loaderSecondary.d.ts +2 -6
  145. package/dist/types/components/Loader/appearance/loaderSize.d.ts +2 -11
  146. package/dist/types/components/Loader/appearance/loaderStyle.d.ts +2 -13
  147. package/dist/types/components/Loader/appearance/loaderSuccess.d.ts +2 -6
  148. package/dist/types/components/Loader/appearance/loaderSurface.d.ts +2 -14
  149. package/dist/types/components/Loader/appearance/loaderWarning.d.ts +2 -6
  150. package/dist/types/components/Logo/Logo.d.ts +2 -6
  151. package/dist/types/components/Response/Response.d.ts +2 -6
  152. package/dist/types/components/SVGContent/SVGContent.d.ts +2 -5
  153. package/dist/types/components/Tile/Tile.appearance.d.ts +60 -2
  154. package/dist/types/components/Tile/Tile.interface.d.ts +46 -28
  155. package/dist/types/components/Tile/appearance/tileShape.d.ts +2 -24
  156. package/dist/types/components/Tile/appearance/tileSize.d.ts +2 -50
  157. package/dist/types/components/Tile/appearance/tileStyle.d.ts +2 -13
  158. package/dist/types/components/Tile/appearance/tileSurface.d.ts +2 -38
  159. package/dist/types/hoc/urlWithAssetPrefix.d.ts +3 -2
  160. package/dist/types/hooks/useDevicePropsGenerator/useDevicePropsGenerator.d.ts +7 -2
  161. package/dist/types/hooks/useDevicePropsGenerator/useDevicePropsGenerator.interface.d.ts +1 -10
  162. package/dist/types/hooks/useStyles/styleAttributes.interface.d.ts +78 -102
  163. package/dist/types/types/index.d.ts +1 -0
  164. package/dist/types/types/utils.d.ts +9 -0
  165. package/package.json +6 -8
@@ -1,8 +1,4 @@
1
- import type { LogoConfig } from './Logo.interface';
1
+ import type { LogoConfig, LogoProps } from './Logo.interface';
2
2
  declare const logoConfig: LogoConfig;
3
- declare const Logo: import("react").ForwardRefExoticComponent<{
4
- imageSrc?: string;
5
- src?: string;
6
- svgSrc?: string;
7
- } & import("react").RefAttributes<HTMLDivElement>>;
3
+ declare const Logo: import("react").ForwardRefExoticComponent<Omit<LogoProps, "ref"> & import("react").RefAttributes<unknown>>;
8
4
  export { Logo, logoConfig };
@@ -1,8 +1,4 @@
1
- import type { ResponseConfig } from './Response.interface';
1
+ import type { ResponseConfig, ResponseProps } from './Response.interface';
2
2
  declare const responseConfig: ResponseConfig;
3
- declare const Response: import("react").ForwardRefExoticComponent<{
4
- imageSrc?: string;
5
- src?: string;
6
- svgSrc?: string;
7
- } & import("react").RefAttributes<HTMLDivElement>>;
3
+ declare const Response: import("react").ForwardRefExoticComponent<Omit<ResponseProps, "ref"> & import("react").RefAttributes<unknown>>;
8
4
  export { Response, responseConfig };
@@ -1,6 +1,3 @@
1
- declare const SVGContent: import("react").ForwardRefExoticComponent<{
2
- imageSrc?: string;
3
- src?: string;
4
- svgSrc?: string;
5
- } & import("react").RefAttributes<HTMLDivElement>>;
1
+ import type { SVGContentProps } from './SVGContent.interface';
2
+ declare const SVGContent: import("react").ForwardRefExoticComponent<Omit<SVGContentProps, "ref"> & import("react").RefAttributes<unknown>>;
6
3
  export { SVGContent };
@@ -1,2 +1,60 @@
1
- import { TileAppearanceType } from './Tile.interface';
2
- export declare const tileAppearance: TileAppearanceType;
1
+ export declare const tileAppearance: {
2
+ solid?: import("./Tile.interface").TileAppearanceProps | undefined;
3
+ outlined?: import("./Tile.interface").TileAppearanceProps | undefined;
4
+ full?: import("./Tile.interface").TileAppearanceProps | undefined;
5
+ ghost?: import("./Tile.interface").TileAppearanceProps | undefined;
6
+ accentPrimary?: import("./Tile.interface").TileAppearanceProps | undefined;
7
+ accentQuaternary?: import("./Tile.interface").TileAppearanceProps | undefined;
8
+ accentSecondary?: import("./Tile.interface").TileAppearanceProps | undefined;
9
+ accentTertiary?: import("./Tile.interface").TileAppearanceProps | undefined;
10
+ dangerPrimary?: import("./Tile.interface").TileAppearanceProps | undefined;
11
+ dangerQuaternary?: import("./Tile.interface").TileAppearanceProps | undefined;
12
+ dangerSecondary?: import("./Tile.interface").TileAppearanceProps | undefined;
13
+ dangerTertiary?: import("./Tile.interface").TileAppearanceProps | undefined;
14
+ disabledPrimary?: import("./Tile.interface").TileAppearanceProps | undefined;
15
+ disabledQuaternary?: import("./Tile.interface").TileAppearanceProps | undefined;
16
+ disabledSecondary?: import("./Tile.interface").TileAppearanceProps | undefined;
17
+ disabledTertiary?: import("./Tile.interface").TileAppearanceProps | undefined;
18
+ errorPrimary?: import("./Tile.interface").TileAppearanceProps | undefined;
19
+ errorQuaternary?: import("./Tile.interface").TileAppearanceProps | undefined;
20
+ errorSecondary?: import("./Tile.interface").TileAppearanceProps | undefined;
21
+ errorTertiary?: import("./Tile.interface").TileAppearanceProps | undefined;
22
+ extraPrimary?: import("./Tile.interface").TileAppearanceProps | undefined;
23
+ extraQuaternary?: import("./Tile.interface").TileAppearanceProps | undefined;
24
+ extraSecondary?: import("./Tile.interface").TileAppearanceProps | undefined;
25
+ extraTertiary?: import("./Tile.interface").TileAppearanceProps | undefined;
26
+ infoPrimary?: import("./Tile.interface").TileAppearanceProps | undefined;
27
+ infoQuaternary?: import("./Tile.interface").TileAppearanceProps | undefined;
28
+ infoSecondary?: import("./Tile.interface").TileAppearanceProps | undefined;
29
+ infoTertiary?: import("./Tile.interface").TileAppearanceProps | undefined;
30
+ specialPrimary?: import("./Tile.interface").TileAppearanceProps | undefined;
31
+ specialQuaternary?: import("./Tile.interface").TileAppearanceProps | undefined;
32
+ specialSecondary?: import("./Tile.interface").TileAppearanceProps | undefined;
33
+ specialTertiary?: import("./Tile.interface").TileAppearanceProps | undefined;
34
+ successPrimary?: import("./Tile.interface").TileAppearanceProps | undefined;
35
+ successQuaternary?: import("./Tile.interface").TileAppearanceProps | undefined;
36
+ successSecondary?: import("./Tile.interface").TileAppearanceProps | undefined;
37
+ successTertiary?: import("./Tile.interface").TileAppearanceProps | undefined;
38
+ surfacePrimary?: import("./Tile.interface").TileAppearanceProps | undefined;
39
+ surfaceQuaternary?: import("./Tile.interface").TileAppearanceProps | undefined;
40
+ surfaceSecondary?: import("./Tile.interface").TileAppearanceProps | undefined;
41
+ surfaceTertiary?: import("./Tile.interface").TileAppearanceProps | undefined;
42
+ warningPrimary?: import("./Tile.interface").TileAppearanceProps | undefined;
43
+ warningQuaternary?: import("./Tile.interface").TileAppearanceProps | undefined;
44
+ warningSecondary?: import("./Tile.interface").TileAppearanceProps | undefined;
45
+ warningTertiary?: import("./Tile.interface").TileAppearanceProps | undefined;
46
+ circular?: import("./Tile.interface").TileAppearanceProps | undefined;
47
+ geometric?: import("./Tile.interface").TileAppearanceProps | undefined;
48
+ rounded?: import("./Tile.interface").TileAppearanceProps | undefined;
49
+ roundedL?: import("./Tile.interface").TileAppearanceProps | undefined;
50
+ roundedM?: import("./Tile.interface").TileAppearanceProps | undefined;
51
+ roundedS?: import("./Tile.interface").TileAppearanceProps | undefined;
52
+ roundedXL?: import("./Tile.interface").TileAppearanceProps | undefined;
53
+ sizeXXS?: import("./Tile.interface").TileAppearanceProps | undefined;
54
+ sizeXS?: import("./Tile.interface").TileAppearanceProps | undefined;
55
+ sizeS?: import("./Tile.interface").TileAppearanceProps | undefined;
56
+ sizeM?: import("./Tile.interface").TileAppearanceProps | undefined;
57
+ sizeL?: import("./Tile.interface").TileAppearanceProps | undefined;
58
+ sizeXL?: import("./Tile.interface").TileAppearanceProps | undefined;
59
+ sizeXXL?: import("./Tile.interface").TileAppearanceProps | undefined;
60
+ };
@@ -1,45 +1,57 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
- import { AlignDirectionProps, AlignProps, AppearanceKeysDefault, BorderColorHoverProps, BorderColorProps, BorderTypeProps, BorderWidthProps, DirectionProps, FillProps, ShapeProps, SizeProps, TextAlignProps, TextColorProps, TextSizeProps, TextWeightProps, TextWrapProps, TitleSizeProps } from '@itcase/types';
2
+ import { AlignProps, AppearanceKeysDefault, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, BorderColorHoverProps, BorderColorProps, BorderTypeProps, BorderWidthProps, CompositeAppearanceKey, DirectionProps, FillActiveHoverProps, FillActiveProps, FillHoverProps, FillProps, FillSizeProps, IconSizeProps, ItemFillProps, ShapeProps, ShapeStrengthProps, SizeProps, TextAlignProps, TextColorProps, TextSizeProps, TextWeightProps, TextWrapProps, TitleSizeProps } from '@itcase/types';
3
3
  import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
4
- export interface TileThemeColor {
5
- [key: number | string | symbol]: any;
4
+ type TileAppearanceProps = {
5
+ badgeAppearanceSize?: AppearanceSizeKey;
6
+ badgeShape?: ShapeProps;
7
+ badgeSize?: SizeProps;
8
+ badgeTextColor?: TextColorProps;
9
+ badgeTextSize?: TextSizeProps;
6
10
  borderColor?: BorderColorProps;
11
+ borderColorHover?: BorderColorHoverProps;
12
+ borderType?: BorderTypeProps;
13
+ borderWidth?: BorderWidthProps;
14
+ descTextColor?: TextColorProps;
15
+ descTextSize?: TextSizeProps;
16
+ descTextWrap?: TextWrapProps;
17
+ direction?: DirectionProps;
7
18
  fill?: FillProps;
19
+ fillActive?: FillActiveProps;
20
+ fillActiveHover?: FillActiveHoverProps;
21
+ fillDisabled?: FillProps;
22
+ fillHover?: FillHoverProps;
23
+ iconAppearance?: CompositeAppearanceKey;
24
+ iconFill?: FillProps;
25
+ iconFillIcon?: ItemFillProps;
26
+ iconFillSize?: FillSizeProps;
27
+ iconShape?: ShapeProps;
28
+ iconSize?: IconSizeProps;
8
29
  shape?: ShapeProps;
30
+ shapeStrength?: ShapeStrengthProps;
31
+ size?: SizeProps;
9
32
  textColor?: TextColorProps;
10
33
  textSize?: TextSizeProps;
11
34
  titleTextColor?: TextColorProps;
12
35
  titleTextSize?: TitleSizeProps;
13
- }
14
- type AppearanceKeys = AppearanceKeysDefault & {};
15
- export type TileAppearanceType = {
16
- [key in AppearanceKeys]?: TileThemeColor;
17
36
  };
18
- export interface TileConfig {
19
- [key: number | string | symbol]: any;
20
- appearance: TileAppearanceType | undefined;
21
- setAppearance: (newComponent: TileAppearanceType) => void;
22
- }
23
- export interface TileProps extends TileThemeColor, StyleAttributes {
24
- [key: number | string | symbol]: any;
37
+ type TileProps = StyleAttributes & TileAppearanceProps & {
25
38
  after?: ReactNode;
26
39
  align?: AlignProps;
27
- alignDirection?: AlignDirectionProps;
28
- appearance?: AppearanceKeys;
40
+ appearance?: CompositeAppearanceKey;
29
41
  badge?: string;
30
42
  badgeAppearance?: AppearanceKeysDefault;
31
- badgeSize?: SizeProps;
32
- badgeTextColor?: TextColorProps;
33
- badgeTextSize?: TextSizeProps;
43
+ badgeValue?: string;
34
44
  before?: ReactNode;
35
- borderColorHover?: BorderColorHoverProps;
36
- borderType?: BorderTypeProps;
37
- borderWidth?: BorderWidthProps;
38
45
  children?: ReactNode;
39
46
  className?: string;
47
+ dataTestId?: string;
48
+ dataTour?: string;
49
+ desc?: string;
40
50
  direction?: DirectionProps;
41
- reverse?: boolean;
42
- size?: string;
51
+ icon?: string;
52
+ iconSrc?: string;
53
+ isSkeleton?: boolean;
54
+ onClick?: () => void;
43
55
  style?: CSSProperties;
44
56
  text?: string;
45
57
  textWrap?: TextWrapProps;
@@ -48,7 +60,13 @@ export interface TileProps extends TileThemeColor, StyleAttributes {
48
60
  titleTextWeight?: TextWeightProps;
49
61
  titleTextWrap?: TextWrapProps;
50
62
  type?: string;
51
- isSkeleton: boolean;
52
- onClick?: () => void;
53
- }
54
- export {};
63
+ };
64
+ type TileAppearanceKey = AppearanceKeysDefault | AppearanceShapeKey | AppearanceSizeKey | AppearanceStyleKey;
65
+ type TileAppearance = {
66
+ [key in TileAppearanceKey]?: TileAppearanceProps;
67
+ };
68
+ type TileConfig = {
69
+ appearance: TileAppearance;
70
+ setAppearance: (appearanceConfig: TileAppearance) => void;
71
+ };
72
+ export type { TileAppearanceProps, TileAppearance, TileConfig, TileProps };
@@ -1,25 +1,3 @@
1
- declare const tileAppearanceShape: {
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 type { TileAppearance } from '../Tile.interface';
2
+ declare const tileAppearanceShape: TileAppearance;
25
3
  export { tileAppearanceShape };
@@ -1,51 +1,3 @@
1
- declare const tileAppearanceSize: {
2
- sizeXL: {
3
- size: string;
4
- titleTextSize: string;
5
- descTextSize: string;
6
- badgeAppearanceSize: string;
7
- iconFillSize: string;
8
- iconSize: string;
9
- };
10
- sizeL: {
11
- size: string;
12
- titleTextSize: string;
13
- descTextSize: string;
14
- badgeAppearanceSize: string;
15
- iconFillSize: string;
16
- iconSize: string;
17
- };
18
- sizeM: {
19
- size: string;
20
- titleTextSize: string;
21
- descTextSize: string;
22
- badgeAppearanceSize: string;
23
- iconFillSize: string;
24
- iconSize: string;
25
- };
26
- sizeS: {
27
- size: string;
28
- titleTextSize: string;
29
- descTextSize: string;
30
- badgeAppearanceSize: string;
31
- iconFillSize: string;
32
- iconSize: string;
33
- };
34
- sizeXS: {
35
- size: string;
36
- titleTextSize: string;
37
- descTextSize: string;
38
- badgeAppearanceSize: string;
39
- iconFillSize: string;
40
- iconSize: string;
41
- };
42
- sizeXXS: {
43
- size: string;
44
- titleTextSize: string;
45
- descTextSize: string;
46
- badgeAppearanceSize: string;
47
- iconFillSize: string;
48
- iconSize: string;
49
- };
50
- };
1
+ import type { TileAppearance } from '../Tile.interface';
2
+ declare const tileAppearanceSize: TileAppearance;
51
3
  export { tileAppearanceSize };
@@ -1,14 +1,3 @@
1
- declare const tileAppearanceStyle: {
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 type { TileAppearance } from '../Tile.interface';
2
+ declare const tileAppearanceStyle: TileAppearance;
14
3
  export { tileAppearanceStyle };
@@ -1,39 +1,3 @@
1
- declare const tileAppearanceSurface: {
2
- surfacePrimary: {
3
- fill: string;
4
- fillHover: string;
5
- titleTextColor: string;
6
- descTextColor: string;
7
- borderColor: string;
8
- badgeAppearance: string;
9
- iconFillIcon: string;
10
- };
11
- surfaceSecondary: {
12
- fill: string;
13
- fillHover: string;
14
- titleTextColor: string;
15
- descTextColor: string;
16
- borderColor: string;
17
- badgeAppearance: string;
18
- iconFillIcon: string;
19
- };
20
- surfaceTertiary: {
21
- fill: string;
22
- fillHover: string;
23
- titleTextColor: string;
24
- descTextColor: string;
25
- borderColor: string;
26
- badgeAppearance: string;
27
- iconFillIcon: string;
28
- };
29
- surfaceQuaternary: {
30
- fill: string;
31
- fillHover: string;
32
- titleTextColor: string;
33
- descTextColor: string;
34
- borderColor: string;
35
- badgeAppearance: string;
36
- iconFillIcon: string;
37
- };
38
- };
1
+ import type { TileAppearance } from '../Tile.interface';
2
+ declare const tileAppearanceSurface: TileAppearance;
39
3
  export { tileAppearanceSurface };
@@ -1,8 +1,9 @@
1
- import React, { type ComponentType } from 'react';
1
+ import React, { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, type ComponentType } from 'react';
2
2
  type UrlWithAssetPrefixProps = {
3
3
  imageSrc?: string;
4
+ placeholderUrl?: string;
4
5
  src?: string;
5
6
  svgSrc?: string;
6
7
  };
7
- declare const urlWithAssetPrefix: (WrappedComponent: ComponentType<UrlWithAssetPrefixProps>) => React.ForwardRefExoticComponent<UrlWithAssetPrefixProps & React.RefAttributes<HTMLDivElement>>;
8
+ declare const urlWithAssetPrefix: <P extends UrlWithAssetPrefixProps, R = unknown>(WrappedComponent: ComponentType<P> | ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<R>>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<R>>;
8
9
  export { urlWithAssetPrefix };
@@ -1,3 +1,8 @@
1
- import type { AppearanceConfig, ComponentProps, DevicePropsGenerator } from './useDevicePropsGenerator.interface';
2
- declare function useDevicePropsGenerator(componentProps: ComponentProps, appearanceConfig?: AppearanceConfig): DevicePropsGenerator;
1
+ import { KebabCase, WithClassKeys } from 'src/types';
2
+ import type { AppearanceConfig, ComponentProps, GeneratorGetClassParams as GP } from './useDevicePropsGenerator.interface';
3
+ declare function useDevicePropsGenerator<Props extends ComponentProps>(componentProps: Props, appearanceConfig?: AppearanceConfig): Props & {
4
+ getProp(propKey: string): string;
5
+ getClassName<K extends keyof Props, P extends GP | undefined = undefined>(propKey: K, params?: P): ReturnGetClassName<Props, K, P>;
6
+ } & WithClassKeys<Props>;
7
+ type ReturnGetClassName<Props, K extends keyof Props, Params = undefined> = Params extends undefined ? NonNullable<Props[K]> extends string ? KebabCase<NonNullable<Props[K]>> : string : Props[K];
3
8
  export { useDevicePropsGenerator };
@@ -11,13 +11,4 @@ interface GeneratorGetClassParams {
11
11
  prefix?: string;
12
12
  replace?: [RegExp, string];
13
13
  }
14
- type GetClass = (propsKey: keyof ComponentProps, params?: GeneratorGetClassParams) => string;
15
- interface DevicePropsGenerator {
16
- [key: string]: string;
17
- /**
18
- * Function to create class from props or appearance config by passing key and prefix(optional)
19
- * @return string: `${prefix}${formattedPropsValue}.toLowerCase()` like "border-color_item-primary"
20
- */
21
- getClass: GetClass;
22
- }
23
- export type { ComponentProps, AppearanceConfig, GeneratorGetClassParams, DevicePropsGenerator, };
14
+ export type { ComponentProps, AppearanceConfig, GeneratorGetClassParams };
@@ -1,148 +1,124 @@
1
1
  import type * as CSS from 'csstype';
2
- import { OverflowProps, TextAlignProps } from '@itcase/types';
2
+ import { HeightProps, ResizeModeProps, WidthProps } from '@itcase/types';
3
3
  export interface StyleAttributes {
4
4
  /**
5
5
  * Layout
6
6
  */
7
- alignContent?: string;
8
- alignItems?: string;
9
- alignSelf?: string;
7
+ alignContent?: CSS.Property.AlignContent;
8
+ alignItems?: CSS.Property.AlignItems;
9
+ alignSelf?: CSS.Property.AlignSelf;
10
10
  aspectRatio?: CSS.Property.AspectRatio;
11
11
  /**
12
12
  * Filter
13
13
  */
14
- backdropFilter?: string;
14
+ backdropFilter?: CSS.Property.BackdropFilter;
15
15
  /**
16
16
  * View
17
17
  */
18
- background?: string;
19
- backgroundColor?: string;
20
- border?: string;
21
- borderBottomColor?: string;
22
- borderBottomEndRadius?: string;
23
- borderBottomLeftRadius?: string;
24
- borderBottomRightRadius?: string;
25
- borderBottomStartRadius?: string;
26
- borderBottomWidth?: string;
27
- borderCurve?: string;
28
- borderEndColor?: string;
29
- borderEndWidth?: string;
30
- borderLeftColor?: string;
31
- borderLeftWidth?: string;
32
- borderRadius?: string;
33
- borderRightColor?: string;
34
- borderRightWidth?: string;
35
- borderStartColor?: string;
36
- borderStartWidth?: string;
37
- borderStyle?: string;
38
- borderTopColor?: string;
39
- borderTopEndRadius?: string;
40
- borderTopLeftRadius?: string;
41
- borderTopRightRadius?: string;
42
- borderTopStartRadius?: string;
43
- borderTopWidth?: string;
44
- bottom?: string;
18
+ background?: CSS.Property.Background;
19
+ backgroundColor?: CSS.Property.BackgroundColor;
20
+ border?: CSS.Property.Border;
21
+ borderBottomColor?: CSS.Property.BorderColor;
22
+ borderBottomLeftRadius?: CSS.Property.BorderBottomLeftRadius;
23
+ borderBottomRightRadius?: CSS.Property.BorderBottomRightRadius;
24
+ borderBottomWidth?: CSS.Property.BorderBottomWidth;
25
+ borderLeftColor?: CSS.Property.BorderColor;
26
+ borderLeftWidth?: CSS.Property.BorderLeftWidth;
27
+ borderRadius?: CSS.Property.BorderRadius;
28
+ borderRightColor?: CSS.Property.BorderColor;
29
+ borderRightWidth?: CSS.Property.BorderRightWidth;
30
+ borderStyle?: CSS.Property.BorderStyle;
31
+ borderTopColor?: CSS.Property.BorderColor;
32
+ borderTopLeftRadius?: CSS.Property.BorderTopLeftRadius;
33
+ borderTopRightRadius?: CSS.Property.BorderTopRightRadius;
34
+ borderTopWidth?: CSS.Property.BorderTopWidth;
35
+ bottom?: CSS.Property.Bottom;
45
36
  /**
46
37
  * Text
47
38
  */
48
- color?: string;
49
- columnGap?: string;
50
- columnWidth?: string;
51
- cursor?: string;
39
+ color?: CSS.Property.Color;
40
+ columnGap?: CSS.Property.ColumnGap;
41
+ columnWidth?: CSS.Property.ColumnWidth;
42
+ cursor?: CSS.Property.Cursor;
52
43
  display?: CSS.Property.Display;
53
- end?: string;
54
44
  flex?: CSS.Property.Flex;
55
45
  flexBasis?: CSS.Property.FlexBasis;
56
46
  flexDirection?: CSS.Property.FlexDirection;
57
47
  flexShrink?: CSS.Property.FlexShrink;
58
48
  flexWrap?: CSS.Property.FlexWrap;
59
- fontFamily?: string;
60
- fontSize?: string;
49
+ fontFamily?: CSS.Property.FontFamily;
50
+ fontSize?: CSS.Property.FontSize;
61
51
  fontStyle?: CSS.Property.FontStyle;
62
- fontVariant?: string;
52
+ fontVariant?: CSS.Property.FontVariant;
63
53
  fontWeight?: CSS.Property.FontWeight;
64
- gap?: string;
54
+ gap?: CSS.Property.Gap;
65
55
  /**
66
56
  * Grid
67
57
  */
68
- gridArea?: string;
69
- gridAutoColumns?: string;
70
- gridAutoFlow?: string;
71
- gridAutoRows?: string;
72
- gridColumn?: string;
73
- gridColumnGap?: string;
74
- gridRow?: string;
75
- gridRowGap?: string;
76
- gridTemplate?: string;
77
- gridTemplateAreas?: string;
78
- gridTemplateColumns?: string;
79
- gridTemplateRows?: string;
80
- height?: string;
81
- left?: string;
82
- letterSpacing?: string;
83
- lineHeight?: string;
84
- margin?: string;
85
- marginBottom?: string;
86
- marginEnd?: string;
87
- marginHorizontal?: string;
88
- marginLeft?: string;
89
- marginRight?: string;
90
- marginStart?: string;
91
- marginTop?: string;
92
- marginVertical?: string;
93
- maxHeight?: string;
94
- maxWidth?: string;
95
- minHeight?: string;
96
- minWidth?: string;
58
+ gridArea?: CSS.Property.GridArea;
59
+ gridAutoColumns?: CSS.Property.GridAutoColumns;
60
+ gridAutoFlow?: CSS.Property.GridAutoFlow;
61
+ gridAutoRows?: CSS.Property.GridAutoRows;
62
+ gridColumn?: CSS.Property.GridColumn;
63
+ gridColumnGap?: CSS.Property.GridColumnGap;
64
+ gridRow?: CSS.Property.GridRow;
65
+ gridRowGap?: CSS.Property.GridRowGap;
66
+ gridTemplate?: CSS.Property.GridTemplate;
67
+ gridTemplateAreas?: CSS.Property.GridTemplateAreas;
68
+ gridTemplateColumns?: CSS.Property.GridTemplateColumns;
69
+ gridTemplateRows?: CSS.Property.GridTemplateRows;
70
+ height?: CSS.Property.Height | HeightProps;
71
+ left?: CSS.Property.Left;
72
+ letterSpacing?: CSS.Property.LetterSpacing;
73
+ lineHeight?: CSS.Property.LineHeight;
74
+ margin?: CSS.Property.Margin;
75
+ marginBottom?: CSS.Property.MarginBottom;
76
+ marginHorizontal?: CSS.Property.Margin;
77
+ marginLeft?: CSS.Property.MarginLeft;
78
+ marginRight?: CSS.Property.MarginRight;
79
+ marginTop?: CSS.Property.MarginTop;
80
+ marginVertical?: CSS.Property.Margin;
81
+ maxHeight?: CSS.Property.MaxHeight;
82
+ maxWidth?: CSS.Property.MaxWidth;
83
+ minHeight?: CSS.Property.MinHeight;
84
+ minWidth?: CSS.Property.MinWidth;
97
85
  /**
98
86
  * Image
99
87
  */
100
88
  objectFit?: CSS.Property.ObjectFit;
101
89
  objectPosition?: CSS.Property.ObjectPosition;
102
- opacity?: string;
90
+ opacity?: CSS.Property.Opacity;
103
91
  order?: CSS.Property.Order;
104
- overflow?: OverflowProps;
92
+ overflow?: CSS.Property.Overflow;
105
93
  overlayColor?: string;
106
- padding?: string;
107
- paddingBottom?: string;
108
- paddingEnd?: string;
109
- paddingHorizontal?: string;
110
- paddingLeft?: string;
111
- paddingRight?: string;
112
- paddingStart?: string;
113
- paddingTop?: string;
114
- paddingVertical?: string;
115
- position?: string;
116
- resizeMode?: string;
117
- right?: string;
118
- rowGap?: string;
119
- /**
120
- * Shadow
121
- */
122
- shadowColor?: string;
123
- shadowOffset?: string;
124
- shadowOpacity?: string;
125
- shadowRadius?: string;
126
- start?: string;
127
- textAlign?: TextAlignProps;
94
+ padding?: CSS.Property.Padding;
95
+ paddingBottom?: CSS.Property.PaddingBottom;
96
+ paddingEnd?: CSS.Property.Padding;
97
+ paddingHorizontal?: CSS.Property.Padding;
98
+ paddingLeft?: CSS.Property.PaddingLeft;
99
+ paddingRight?: CSS.Property.PaddingRight;
100
+ paddingStart?: CSS.Property.Padding;
101
+ paddingTop?: CSS.Property.PaddingTop;
102
+ paddingVertical?: CSS.Property.Padding;
103
+ position?: CSS.Property.Position;
104
+ resizeMode?: ResizeModeProps;
105
+ right?: CSS.Property.Right;
106
+ rowGap?: CSS.Property.RowGap;
107
+ textAlign?: CSS.Property.TextAlign;
128
108
  textDecorationColor?: string;
129
109
  textDecorationLine?: string;
130
- textDecorationStyle?: string;
131
- textShadowColor?: string;
132
- textShadowOffset?: string;
133
- textShadowRadius?: string;
110
+ textDecorationStyle?: CSS.Property.TextDecorationStyle;
134
111
  textTransform?: CSS.Property.TextTransform;
135
- tintColor?: string;
136
- top?: string;
112
+ top?: CSS.Property.Top;
137
113
  /**
138
114
  * Transform
139
115
  */
140
116
  transform?: CSS.Property.Transform;
141
117
  verticalAlign?: CSS.Property.VerticalAlign;
142
118
  whiteSpace?: CSS.Property.WhiteSpace;
143
- width?: string;
119
+ width?: CSS.Property.Width | WidthProps;
144
120
  writingMode?: CSS.Property.WritingMode;
145
- zIndex?: string;
121
+ zIndex?: CSS.Property.ZIndex;
146
122
  }
147
123
  type WrappedInterface<T> = {
148
124
  [P in keyof T as `${P & string}Wrapper`]: T[P];
@@ -0,0 +1 @@
1
+ export * from './utils';
@@ -0,0 +1,9 @@
1
+ export type ExactlyOne<K extends PropertyKey, V> = {
2
+ [P in K]: Partial<Record<Exclude<K, P>, never>> & {
3
+ [Q in P]: V;
4
+ };
5
+ }[K];
6
+ export type WithClassKeys<T> = T & {
7
+ [K in keyof T & string as `${K}Class`]: NonNullable<T[K]> extends string ? KebabCase<T[K]> | undefined : string | undefined;
8
+ };
9
+ export type KebabCase<S> = S extends string ? S extends `${infer F}${infer R}` ? R extends Uncapitalize<R> ? `${Lowercase<F>}${KebabCase<R>}` : `${Lowercase<F>}-${KebabCase<Uncapitalize<R>>}` : Lowercase<S> : never;