@itcase/ui 1.8.94 → 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 (153) 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_DuAAQvct.js → Button_cjs_DojNe74O.js} +2 -2
  4. package/dist/{Button_es_DgLivwXd.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_Ca9M-Ks1.js → DatePicker_cjs_mrV_Qly2.js} +3 -3
  8. package/dist/{DatePicker_es_DU2ZE7vb.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_jCYE0aEd.js → Loader_cjs_CMvh28cF.js} +1 -3
  18. package/dist/{Loader_es_tNV0bjm_.js → Loader_es_DGMpRDMk.js} +1 -3
  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 +12 -14
  139. package/dist/types/components/Logo/Logo.d.ts +2 -6
  140. package/dist/types/components/Response/Response.d.ts +2 -6
  141. package/dist/types/components/SVGContent/SVGContent.d.ts +2 -5
  142. package/dist/types/components/Tile/Tile.appearance.d.ts +60 -2
  143. package/dist/types/components/Tile/Tile.interface.d.ts +46 -28
  144. package/dist/types/components/Tile/appearance/tileShape.d.ts +2 -24
  145. package/dist/types/components/Tile/appearance/tileSize.d.ts +2 -50
  146. package/dist/types/components/Tile/appearance/tileStyle.d.ts +2 -13
  147. package/dist/types/components/Tile/appearance/tileSurface.d.ts +2 -38
  148. package/dist/types/hoc/urlWithAssetPrefix.d.ts +3 -2
  149. package/dist/types/hooks/useDevicePropsGenerator/useDevicePropsGenerator.d.ts +7 -2
  150. package/dist/types/hooks/useDevicePropsGenerator/useDevicePropsGenerator.interface.d.ts +1 -10
  151. package/dist/types/hooks/useStyles/styleAttributes.interface.d.ts +78 -102
  152. package/dist/types/types/utils.d.ts +4 -0
  153. package/package.json +6 -8
@@ -2,10 +2,8 @@
2
2
  &&-color {
3
3
  &_hover {
4
4
  @each $type in accent, primary, secondary, tertiary, quaternary, surface,
5
- error, success, warning, info, danger, gradient, disabled, hover,
6
- inverse {
7
- @each $color in primary, secondary, tertiary, quaternary, accent,
8
- disabled, hover, inverse {
5
+ error, success, warning, info, danger {
6
+ @each $color in primary, secondary, tertiary, quaternary {
9
7
  &_$(type) {
10
8
  &-text {
11
9
  &-$(color) {
@@ -37,7 +37,8 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
37
37
  * "fillClass" - is "surface-secondary"
38
38
  *
39
39
  * Usage for props value for device:
40
- * const { titleTextSize } = propsGenerator / const titleTextSize = propsGenerator.titleTextSize *
40
+ * const { titleTextSize } = propsGenerator / const titleTextSize = propsGenerator.titleTextSize
41
+ *
41
42
  * "titleTextSize" - contain some value from props:
42
43
  * - titleTextSize
43
44
  * - titleTextSizeMobile
@@ -48,12 +49,12 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
48
49
  var deviceCurrentMainType = useUserDeviceContext().deviceCurrentMainType;
49
50
  var devicePropsGenerator = useMemo(function () {
50
51
  var propsGenerator = {
51
- getProp: function (propsKey) {
52
- var propsForDeviceKey = "".concat(propsKey).concat(upperFirst(deviceCurrentMainType));
52
+ getProp: function (propKey) {
53
+ var propsForDeviceKey = "".concat(propKey).concat(upperFirst(deviceCurrentMainType));
53
54
  var valueForDevice = componentProps[propsForDeviceKey];
54
- var valueDefault = componentProps[propsKey];
55
+ var valueDefault = componentProps[propKey];
55
56
  var appearanceForDevice = appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig[propsForDeviceKey];
56
- var appearanceDefault = appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig[propsKey];
57
+ var appearanceDefault = appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig[propKey];
57
58
  // prettier-ignore
58
59
  var targetPropsValue = (
59
60
  // Value for device from props is first priority
@@ -67,11 +68,10 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
67
68
  return targetPropsValue;
68
69
  },
69
70
  // eslint-disable-next-line perfectionist/sort-objects
70
- getClassName: function (propsKey, params) {
71
- if (params === void 0) { params = {}; }
72
- var _a = params.prefix, prefix = _a === void 0 ? '' : _a, _b = params.replace, replace = _b === void 0 ? [/([A-Z])/g, '-$1'] : _b;
71
+ getClassName: function (propKey, params) {
72
+ var _a = params || {}, _b = _a.prefix, prefix = _b === void 0 ? '' : _b, _c = _a.replace, replace = _c === void 0 ? [/([A-Z])/g, '-$1'] : _c;
73
73
  // prettier-ignore
74
- var targetClassValue = this.getProp(propsKey);
74
+ var targetClassValue = this.getProp(String(propKey));
75
75
  if (targetClassValue) {
76
76
  var cleanClassValue = String(targetClassValue);
77
77
  if (!cleanClassValue.includes('.')) {
@@ -79,8 +79,11 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
79
79
  }
80
80
  if (replace) {
81
81
  var replaceList = castArray(replace);
82
- cleanClassValue = cleanClassValue.replace(replaceList[0], replaceList[1] || '');
82
+ cleanClassValue = cleanClassValue.replace(replaceList[0],
83
+ // @ts-expect-error
84
+ replaceList[1] || '');
83
85
  }
86
+ // prettier-ignore
84
87
  return "".concat(prefix).concat(cleanClassValue).toLowerCase();
85
88
  }
86
89
  // If target key not exists in props and appearance config - return empty class
@@ -88,29 +91,31 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
88
91
  },
89
92
  };
90
93
  var generatorProxyHandler = {
91
- get: function (target, prop, receiver) {
94
+ get: function (target, propKey, receiver) {
92
95
  var args = [];
93
96
  for (var _i = 3; _i < arguments.length; _i++) {
94
97
  args[_i - 3] = arguments[_i];
95
98
  }
96
- if (typeof prop === 'string') {
99
+ if (typeof propKey === 'string') {
97
100
  // If object does not have the property being retrieved
98
- if (!Reflect.has(target, prop)) {
101
+ if (!Reflect.has(target, propKey)) {
99
102
  // And property ended on "Class" keyword
100
- if (prop.endsWith('Class')) {
101
- var shortProp = prop.substring(0, prop.lastIndexOf('Class'));
103
+ if (propKey.endsWith('Class')) {
104
+ // prettier-ignore
105
+ var shortProp = propKey.substring(0, propKey.lastIndexOf('Class'));
102
106
  // Return prop from props for device as formatted class name
103
107
  return target.getClassName(shortProp);
104
108
  }
105
109
  // Return prop from props for device
106
- return target.getProp(prop);
110
+ return target.getProp(propKey);
107
111
  }
108
112
  // Return object property. Original "get".
109
- return Reflect.get.apply(Reflect, __spreadArray([target, prop, receiver], args, false));
113
+ // @ts-expect-error
114
+ return Reflect.get.apply(Reflect, __spreadArray([target, propKey, receiver], args, false));
110
115
  }
111
116
  // In some cases, like in Chrome browser, sometime "prop" is not string.
112
117
  // We return this object as is.
113
- return prop;
118
+ return propKey;
114
119
  },
115
120
  };
116
121
  return new Proxy(propsGenerator, generatorProxyHandler);
@@ -1,32 +1,14 @@
1
1
  import type { CSSProperties, ReactNode } from 'react';
2
- import { AppearanceKeysDefault, BorderColorProps, DirectionProps, FillHoverProps, FillProps, HeightProps, ItemColorProps, ShapeProps, SizeProps, TextColorProps, TextWeightProps, WidthProps } from '@itcase/types';
2
+ import { AppearanceKeysDefault, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, BorderColorProps, CompositeAppearanceKey, FillProps, ShapeProps, SizeProps, TextColorProps, TextSizeProps, DirectionProps, FillHoverProps, HeightProps, ItemColorProps, TextWeightProps, WidthProps } from '@itcase/types';
3
3
  import type { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
4
- export interface AccordionThemeColor {
5
- }
6
- export interface AccordionItemThemeColor {
7
- }
8
- type AppearanceKeys = AppearanceKeysDefault & {};
9
- export type AccordionAppearanceType = {
10
- [key in AppearanceKeys]?: AccordionThemeColor;
11
- };
12
- export type AccordionItemAppearanceType = {
13
- [key in AppearanceKeys]?: AccordionItemThemeColor;
14
- };
15
- export interface AccordionConfig {
16
- appearance: AccordionAppearanceType | undefined;
17
- setAppearance: (newComponent: AccordionAppearanceType) => void;
18
- }
19
- export interface AccordionItemConfig {
20
- appearance: AccordionItemAppearanceType | undefined;
21
- setAppearance: (newComponent: AccordionItemAppearanceType) => void;
22
- }
23
- interface AccordionItemEventData {
4
+ type AccordionProps = {};
5
+ type AccordionItemEventData = {
24
6
  id: number | string;
25
7
  content?: ReactNode;
26
8
  title: string;
27
9
  isExpanded: boolean;
28
- }
29
- interface AccordionProps extends AccordionThemeColor, StyleAttributes {
10
+ };
11
+ type AccordionItemAppearanceProps = {
30
12
  [key: number | string | symbol]: any;
31
13
  appearance?: AppearanceKeys;
32
14
  borderColor?: BorderColorProps;
@@ -46,12 +28,11 @@ interface AccordionProps extends AccordionThemeColor, StyleAttributes {
46
28
  width?: WidthProps;
47
29
  isMultiple?: boolean;
48
30
  onClickItem?: (T: AccordionItemEventData) => void;
49
- }
50
- interface AccordionItemProps extends AccordionItemThemeColor, StyleAttributes {
31
+ };
32
+ type AccordionItemProps = AccordionItemAppearanceProps & StyleAttributes & {
51
33
  id: number | string;
52
- [key: number | string | symbol]: any;
53
34
  afterContent?: ReactNode;
54
- appearance?: AppearanceKeys;
35
+ appearance?: CompositeAppearanceKey;
55
36
  beforeContent?: ReactNode;
56
37
  borderColor?: BorderColorProps;
57
38
  children?: ReactNode;
@@ -66,16 +47,11 @@ interface AccordionItemProps extends AccordionItemThemeColor, StyleAttributes {
66
47
  dividerFill?: FillProps;
67
48
  dividerSize?: SizeProps;
68
49
  fill?: FillProps;
69
- fillDesktop?: FillProps;
70
- fillHover?: FillHoverProps;
71
- fillMobile?: FillProps;
72
- fillTablet?: FillProps;
73
50
  height?: HeightProps;
74
51
  icon?: ReactNode;
75
52
  iconFill?: ItemColorProps;
76
- iconFillDesktop?: ItemColorProps;
77
- iconFillMobile?: ItemColorProps;
78
- iconFillTablet?: ItemColorProps;
53
+ isExpanded?: boolean;
54
+ onClick?: (T: AccordionItemEventData) => void;
79
55
  shape?: ShapeProps;
80
56
  shapeDesktop?: ShapeProps;
81
57
  shapeMobile?: ShapeProps;
@@ -88,10 +64,16 @@ interface AccordionItemProps extends AccordionItemThemeColor, StyleAttributes {
88
64
  titleFill?: FillProps;
89
65
  titleFillHover?: FillHoverProps;
90
66
  titleTextColor?: TextColorProps;
91
- titleTextSize?: SizeProps;
67
+ titleTextSize?: TextSizeProps;
92
68
  titleTextWeight?: TextWeightProps;
93
69
  width?: WidthProps;
94
- isExpanded?: boolean;
95
- onClick?: (T: AccordionItemEventData) => void;
96
- }
97
- export type { AccordionItemEventData, AccordionProps, AccordionItemProps };
70
+ };
71
+ type AccordionItemAppearanceKey = AppearanceKeysDefault | AppearanceShapeKey | AppearanceSizeKey | AppearanceStyleKey;
72
+ type AccordionItemAppearance = {
73
+ [key in AccordionItemAppearanceKey]?: AccordionItemAppearanceProps;
74
+ };
75
+ type AccordionItemConfig = {
76
+ appearance: AccordionItemConfig | undefined;
77
+ setAppearance: (appearanceConfig: AccordionItemConfig) => void;
78
+ };
79
+ export type { AccordionItemAppearance, AccordionItemConfig, AccordionItemEventData, AccordionItemProps, AccordionProps, };
@@ -1,2 +1,230 @@
1
- import { BadgeAppearanceType } from './Badge.interface';
2
- export declare const badgeAppearance: BadgeAppearanceType;
1
+ export declare const badgeAppearance: {
2
+ warning: {
3
+ fill: string;
4
+ borderColor: string;
5
+ textColor: string;
6
+ dotFill: string;
7
+ iconFill: string;
8
+ };
9
+ warningPrimary: {
10
+ fill: string;
11
+ borderColor: string;
12
+ textColor: string;
13
+ dotFill: string;
14
+ iconFill: string;
15
+ };
16
+ surfacePrimary: {
17
+ fill: string;
18
+ borderColor: string;
19
+ textColor: string;
20
+ dotFill: string;
21
+ iconFill: string;
22
+ };
23
+ surfaceQuaternary: {
24
+ fill: string;
25
+ borderColor: string;
26
+ textColor: string;
27
+ };
28
+ surfaceSecondary: {
29
+ fill: string;
30
+ borderColor: string;
31
+ textColor: string;
32
+ };
33
+ surfaceTertiary: {
34
+ fill: string;
35
+ borderColor: string;
36
+ textColor: string;
37
+ };
38
+ disabled: {
39
+ fill: string;
40
+ borderColor: string;
41
+ textColor: string;
42
+ iconFill: string;
43
+ };
44
+ disabledPrimary: {
45
+ fill: string;
46
+ borderColor: string;
47
+ textColor: string;
48
+ iconFill: string;
49
+ };
50
+ success: {
51
+ fill: string;
52
+ borderColor: string;
53
+ textColor: string;
54
+ dotFill: string;
55
+ iconFill: string;
56
+ };
57
+ successPrimary: {
58
+ fill: string;
59
+ borderColor: string;
60
+ textColor: string;
61
+ dotFill: string;
62
+ iconFill: string;
63
+ };
64
+ secondary: {
65
+ fill: string;
66
+ borderColor: string;
67
+ textColor: string;
68
+ dotFill: string;
69
+ iconFill: string;
70
+ };
71
+ secondaryPrimary: {
72
+ fill: string;
73
+ borderColor: string;
74
+ textColor: string;
75
+ dotFill: string;
76
+ iconFill: string;
77
+ };
78
+ primary: {
79
+ fill: string;
80
+ borderColor: string;
81
+ textColor: string;
82
+ dotFill: string;
83
+ iconFill: string;
84
+ };
85
+ primaryPrimary: {
86
+ fill: string;
87
+ borderColor: string;
88
+ textColor: string;
89
+ dotFill: string;
90
+ iconFill: string;
91
+ };
92
+ infoPrimary: {
93
+ fill: string;
94
+ borderColor: string;
95
+ textColor: string;
96
+ dotFill: string;
97
+ iconFill: string;
98
+ };
99
+ infoSecondary: {
100
+ fill: string;
101
+ borderColor: string;
102
+ textColor: string;
103
+ dotFill: string;
104
+ };
105
+ error: {
106
+ fill: string;
107
+ fillHover: string;
108
+ labelTextColor: string;
109
+ labelTextColorHover: string;
110
+ iconFill: string;
111
+ };
112
+ errorPrimary: {
113
+ fill: string;
114
+ fillHover: string;
115
+ labelTextColor: string;
116
+ labelTextColorHover: string;
117
+ iconFill: string;
118
+ };
119
+ danger: {
120
+ fill: string;
121
+ borderColor: string;
122
+ textColor: string;
123
+ dotFill: string;
124
+ iconFill: string;
125
+ };
126
+ dangerPrimary: {
127
+ fill: string;
128
+ borderColor: string;
129
+ textColor: string;
130
+ dotFill: string;
131
+ iconFill: string;
132
+ };
133
+ accent: {
134
+ fill: string;
135
+ borderColor: string;
136
+ textColor: string;
137
+ dotFill: string;
138
+ iconFill: string;
139
+ };
140
+ accentPrimary: {
141
+ fill: string;
142
+ borderColor: string;
143
+ textColor: string;
144
+ dotFill: string;
145
+ iconFill: string;
146
+ };
147
+ accentQuaternary: {
148
+ fill: string;
149
+ borderColor: string;
150
+ textColor: string;
151
+ dotFill: string;
152
+ iconFill: string;
153
+ };
154
+ accentSecondary: {
155
+ fill: string;
156
+ borderColor: string;
157
+ textColor: string;
158
+ dotFill: string;
159
+ iconFill: string;
160
+ };
161
+ accentTertiary: {
162
+ fill: string;
163
+ borderColor: string;
164
+ textColor: string;
165
+ dotFill: string;
166
+ iconFill: string;
167
+ };
168
+ solid: {
169
+ borderColor: string;
170
+ };
171
+ outlined: {
172
+ fill: string;
173
+ };
174
+ full: {};
175
+ ghost: {
176
+ fill: string;
177
+ borderColor: string;
178
+ };
179
+ circular: {
180
+ shape: string;
181
+ };
182
+ rounded: {
183
+ shape: string;
184
+ };
185
+ roundedXL: {
186
+ shape: string;
187
+ shapeStrength: string;
188
+ };
189
+ roundedL: {
190
+ shape: string;
191
+ shapeStrength: string;
192
+ };
193
+ roundedM: {
194
+ shape: string;
195
+ shapeStrength: string;
196
+ };
197
+ roundedS: {
198
+ shape: string;
199
+ shapeStrength: string;
200
+ };
201
+ sizeXXL: {
202
+ size: string;
203
+ textSize: string;
204
+ iconSize: number;
205
+ };
206
+ sizeXL: {
207
+ size: string;
208
+ textSize: string;
209
+ };
210
+ sizeL: {
211
+ size: string;
212
+ textSize: string;
213
+ };
214
+ sizeM: {
215
+ size: string;
216
+ textSize: string;
217
+ };
218
+ sizeS: {
219
+ size: string;
220
+ textSize: string;
221
+ };
222
+ sizeXS: {
223
+ size: string;
224
+ textSize: string;
225
+ };
226
+ sizeXXS: {
227
+ size: string;
228
+ textSize: string;
229
+ };
230
+ };
@@ -1,35 +1,42 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
- import { AppearanceKeysDefault, BorderColorHoverProps, BorderColorProps, BorderTypeProps, BorderWidthProps, FillHoverProps, FillProps, ShapeProps, SizeProps, TextColorProps, TextSizeProps } from '@itcase/types';
2
+ import { AppearanceKeysDefault, AppearanceShapeKey, AppearanceSizeKey, AppearanceStyleKey, BorderColorHoverProps, BorderColorProps, BorderTypeProps, BorderWidthProps, CompositeAppearanceKey, FillHoverProps, FillProps, IconSizeProps, ShapeProps, ShapeStrengthProps, SizeProps, TextColorProps, TextSizeProps } from '@itcase/types';
3
3
  import { StyleAttributes } from 'src/hooks/useStyles/styleAttributes.interface';
4
- export interface BadgeThemeColor {
5
- [key: number | string | symbol]: any;
4
+ type BadgeAppearanceProps = {
6
5
  borderColor?: BorderColorProps;
7
6
  borderColorHover?: BorderColorHoverProps;
8
7
  borderType?: BorderTypeProps;
9
8
  borderWidth?: BorderWidthProps;
9
+ dotFill?: FillProps;
10
10
  fill?: FillProps;
11
11
  fillHover?: FillHoverProps;
12
- shape?: ShapeProps;
12
+ iconFill?: FillProps;
13
+ iconShape?: ShapeProps;
14
+ iconSize?: IconSizeProps;
13
15
  size?: SizeProps;
14
16
  textColor?: TextColorProps;
15
17
  textSize?: TextSizeProps;
16
- }
17
- type AppearanceKeys = AppearanceKeysDefault & {};
18
- export type BadgeAppearanceType = {
19
- [key in AppearanceKeys]?: BadgeThemeColor;
20
18
  };
21
- export interface BadgeConfig {
22
- [key: number | string | symbol]: any;
23
- appearance: BadgeAppearanceType | undefined;
24
- setAppearance: (newComponent: BadgeAppearanceType) => void;
25
- }
26
- export interface BadgeProps extends BadgeThemeColor, StyleAttributes {
27
- [key: number | string | symbol]: any;
28
- appearance?: AppearanceKeys;
19
+ type BadgeProps = BadgeAppearanceProps & StyleAttributes & {
20
+ appearance?: CompositeAppearanceKey;
29
21
  children?: ReactNode;
30
22
  className?: string;
31
- mode?: string;
23
+ dot?: boolean;
24
+ icon?: string;
25
+ iconSrc?: string;
26
+ isSkeleton?: boolean;
27
+ shape?: ShapeProps;
28
+ shapeStrength?: ShapeStrengthProps;
32
29
  style?: CSSProperties;
30
+ text?: string;
31
+ type?: 'circular' | 'dot' | 'simple';
33
32
  value?: string;
34
- }
35
- export {};
33
+ };
34
+ type BadgeAppearanceKey = AppearanceKeysDefault | AppearanceShapeKey | AppearanceSizeKey | AppearanceStyleKey;
35
+ type BadgeAppearance = {
36
+ [key in BadgeAppearanceKey]?: BadgeAppearanceProps;
37
+ };
38
+ type BadgeConfig = {
39
+ appearance: BadgeAppearance;
40
+ setAppearance: (appearanceConfig: BadgeAppearance) => void;
41
+ };
42
+ export type { BadgeAppearance, BadgeConfig, BadgeProps };
@@ -5,19 +5,19 @@ declare const badgeAppearanceShape: {
5
5
  rounded: {
6
6
  shape: string;
7
7
  };
8
- roundedS: {
8
+ roundedXL: {
9
9
  shape: string;
10
10
  shapeStrength: string;
11
11
  };
12
- roundedM: {
12
+ roundedL: {
13
13
  shape: string;
14
14
  shapeStrength: string;
15
15
  };
16
- roundedL: {
16
+ roundedM: {
17
17
  shape: string;
18
18
  shapeStrength: string;
19
19
  };
20
- roundedXL: {
20
+ roundedS: {
21
21
  shape: string;
22
22
  shapeStrength: string;
23
23
  };