@ozen-ui/kit 0.79.0 → 0.80.0

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/__inner__/cjs/components/AutocompleteBase/modules/AutocompleteBaseInput/components/AutocompleteBaseRenderRight/AutocompleteBaseRenderRight.js +2 -2
  2. package/__inner__/cjs/components/AutocompleteBase/modules/AutocompleteBaseInputIcon/types.d.ts +2 -3
  3. package/__inner__/cjs/components/AutocompleteNext/components/AutocompleteRenderRight/AutocompleteRenderRight.js +2 -2
  4. package/__inner__/cjs/components/BottomSheetBase/modules/BottomSheetBaseBlock/BottomSheetBaseBlock.d.ts +2 -3
  5. package/__inner__/cjs/components/BottomSheetBase/modules/BottomSheetBaseBlock/types.d.ts +2 -2
  6. package/__inner__/cjs/components/BottomSheetBase/modules/BottomSheetBaseFooter/BottomSheetBaseFooter.d.ts +1 -3
  7. package/__inner__/cjs/components/BottomSheetBase/modules/BottomSheetBaseHeader/BottomSheetBaseHeader.d.ts +1 -3
  8. package/__inner__/cjs/components/ButtonNext/Button.css +26 -26
  9. package/__inner__/cjs/components/ChipGroup/ChipGroup.d.ts +2 -2
  10. package/__inner__/cjs/components/ChipGroup/ChipGroup.js +77 -10
  11. package/__inner__/cjs/components/ChipGroup/ChipGroupContext.d.ts +2 -1
  12. package/__inner__/cjs/components/ChipGroup/constants.d.ts +5 -3
  13. package/__inner__/cjs/components/ChipGroup/constants.js +8 -1
  14. package/__inner__/cjs/components/ChipGroup/entities/direction.d.ts +2 -0
  15. package/__inner__/cjs/components/ChipGroup/entities/direction.js +5 -0
  16. package/__inner__/cjs/components/ChipGroup/entities/index.d.ts +4 -0
  17. package/__inner__/cjs/components/ChipGroup/entities/index.js +7 -0
  18. package/__inner__/cjs/components/ChipGroup/entities/mode.d.ts +2 -0
  19. package/__inner__/cjs/components/ChipGroup/entities/mode.js +4 -0
  20. package/__inner__/cjs/components/ChipGroup/entities/onChange.d.ts +4 -0
  21. package/__inner__/cjs/components/ChipGroup/entities/onChange.js +2 -0
  22. package/__inner__/cjs/components/ChipGroup/entities/value.d.ts +3 -0
  23. package/__inner__/cjs/components/ChipGroup/entities/value.js +2 -0
  24. package/__inner__/cjs/components/ChipGroup/index.d.ts +2 -0
  25. package/__inner__/cjs/components/ChipGroup/index.js +2 -0
  26. package/__inner__/cjs/components/ChipGroup/types.d.ts +21 -12
  27. package/__inner__/cjs/components/ChipNext/Chip.css +6 -0
  28. package/__inner__/cjs/components/ChipNext/Chip.js +2 -2
  29. package/__inner__/cjs/components/ChipNext/entities/color.d.ts +2 -0
  30. package/__inner__/cjs/components/ChipNext/entities/color.js +10 -0
  31. package/__inner__/cjs/components/ChipNext/entities/events.d.ts +5 -0
  32. package/__inner__/cjs/components/ChipNext/entities/events.js +2 -0
  33. package/__inner__/cjs/components/ChipNext/entities/icon.d.ts +3 -0
  34. package/__inner__/cjs/components/ChipNext/entities/icon.js +2 -0
  35. package/__inner__/cjs/components/ChipNext/entities/index.d.ts +4 -0
  36. package/__inner__/cjs/components/ChipNext/entities/index.js +7 -0
  37. package/__inner__/cjs/components/ChipNext/entities/size.d.ts +2 -0
  38. package/__inner__/cjs/components/ChipNext/entities/size.js +4 -0
  39. package/__inner__/cjs/components/ChipNext/index.d.ts +2 -0
  40. package/__inner__/cjs/components/ChipNext/index.js +2 -0
  41. package/__inner__/cjs/components/ChipNext/types.d.ts +3 -12
  42. package/__inner__/cjs/components/ChipNext/types.js +0 -10
  43. package/__inner__/cjs/components/DatePicker/components/DatePickerRenderRight/DatePickerRenderRight.js +1 -1
  44. package/__inner__/cjs/components/DialogNext/Dialog.d.ts +1 -0
  45. package/__inner__/cjs/components/DialogNext/Dialog.js +1 -0
  46. package/__inner__/cjs/components/DialogNext/components/DialogBottomSheet/DialogBottomSheet.d.ts +2 -1
  47. package/__inner__/cjs/components/DialogNext/components/DialogBottomSheet/DialogBottomSheet.js +2 -2
  48. package/__inner__/cjs/components/DialogNext/components/DialogBottomSheet/types.d.ts +2 -1
  49. package/__inner__/cjs/components/DialogNext/modules/DialogFooter/index.d.ts +2 -1
  50. package/__inner__/cjs/components/DialogNext/modules/DialogFooter/index.js +2 -1
  51. package/__inner__/cjs/components/DialogNext/modules/DialogHeader/index.d.ts +1 -0
  52. package/__inner__/cjs/components/DialogNext/modules/DialogHeader/index.js +1 -0
  53. package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/DialogIllustration.css +5 -0
  54. package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/DialogIllustration.d.ts +3 -0
  55. package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/DialogIllustration.js +13 -0
  56. package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/constants.d.ts +1 -0
  57. package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/constants.js +4 -0
  58. package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/index.d.ts +3 -0
  59. package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/index.js +6 -0
  60. package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/types.d.ts +9 -0
  61. package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/types.js +2 -0
  62. package/__inner__/cjs/components/DialogNext/modules/DialogTitle/index.d.ts +1 -0
  63. package/__inner__/cjs/components/DialogNext/modules/DialogTitle/index.js +1 -0
  64. package/__inner__/cjs/components/DialogNext/modules/index.d.ts +1 -0
  65. package/__inner__/cjs/components/DialogNext/modules/index.js +1 -0
  66. package/__inner__/cjs/components/DialogNext/types.d.ts +1 -1
  67. package/__inner__/cjs/components/FilePicker/FilePicker.js +1 -1
  68. package/__inner__/cjs/components/IconButtonNext/IconButton.css +26 -30
  69. package/__inner__/cjs/components/OzenProvider/providers/theme/entities/defaultProps.d.ts +2 -1
  70. package/__inner__/cjs/components/Select/components/SelectInputRenderRight/SelectInputRenderRight.js +10 -2
  71. package/__inner__/cjs/components/Select/index.d.ts +1 -0
  72. package/__inner__/cjs/components/Select/index.js +1 -0
  73. package/__inner__/cjs/components/Select/modules/SelectIconButton/SelectIconButton.d.ts +3 -0
  74. package/__inner__/cjs/components/Select/modules/SelectIconButton/SelectIconButton.js +26 -0
  75. package/__inner__/cjs/components/Select/modules/SelectIconButton/constants.d.ts +3 -0
  76. package/__inner__/cjs/components/Select/modules/SelectIconButton/constants.js +7 -0
  77. package/__inner__/cjs/components/Select/modules/SelectIconButton/index.d.ts +3 -0
  78. package/__inner__/cjs/components/Select/modules/SelectIconButton/index.js +6 -0
  79. package/__inner__/cjs/components/Select/modules/SelectIconButton/types.d.ts +7 -0
  80. package/__inner__/cjs/components/Select/modules/SelectIconButton/types.js +2 -0
  81. package/__inner__/cjs/components/Select/modules/index.d.ts +1 -0
  82. package/__inner__/cjs/components/Select/modules/index.js +4 -0
  83. package/__inner__/esm/components/AutocompleteBase/modules/AutocompleteBaseInput/components/AutocompleteBaseRenderRight/AutocompleteBaseRenderRight.js +2 -2
  84. package/__inner__/esm/components/AutocompleteBase/modules/AutocompleteBaseInputIcon/types.d.ts +2 -3
  85. package/__inner__/esm/components/AutocompleteNext/components/AutocompleteRenderRight/AutocompleteRenderRight.js +2 -2
  86. package/__inner__/esm/components/BottomSheetBase/modules/BottomSheetBaseBlock/BottomSheetBaseBlock.d.ts +2 -3
  87. package/__inner__/esm/components/BottomSheetBase/modules/BottomSheetBaseBlock/types.d.ts +2 -2
  88. package/__inner__/esm/components/BottomSheetBase/modules/BottomSheetBaseFooter/BottomSheetBaseFooter.d.ts +1 -3
  89. package/__inner__/esm/components/BottomSheetBase/modules/BottomSheetBaseHeader/BottomSheetBaseHeader.d.ts +1 -3
  90. package/__inner__/esm/components/ButtonNext/Button.css +26 -26
  91. package/__inner__/esm/components/ChipGroup/ChipGroup.d.ts +2 -2
  92. package/__inner__/esm/components/ChipGroup/ChipGroup.js +78 -11
  93. package/__inner__/esm/components/ChipGroup/ChipGroupContext.d.ts +2 -1
  94. package/__inner__/esm/components/ChipGroup/constants.d.ts +5 -3
  95. package/__inner__/esm/components/ChipGroup/constants.js +7 -0
  96. package/__inner__/esm/components/ChipGroup/entities/direction.d.ts +2 -0
  97. package/__inner__/esm/components/ChipGroup/entities/direction.js +2 -0
  98. package/__inner__/esm/components/ChipGroup/entities/index.d.ts +4 -0
  99. package/__inner__/esm/components/ChipGroup/entities/index.js +4 -0
  100. package/__inner__/esm/components/ChipGroup/entities/mode.d.ts +2 -0
  101. package/__inner__/esm/components/ChipGroup/entities/mode.js +1 -0
  102. package/__inner__/esm/components/ChipGroup/entities/onChange.d.ts +4 -0
  103. package/__inner__/esm/components/ChipGroup/entities/onChange.js +1 -0
  104. package/__inner__/esm/components/ChipGroup/entities/value.d.ts +3 -0
  105. package/__inner__/esm/components/ChipGroup/entities/value.js +1 -0
  106. package/__inner__/esm/components/ChipGroup/index.d.ts +2 -0
  107. package/__inner__/esm/components/ChipGroup/index.js +2 -0
  108. package/__inner__/esm/components/ChipGroup/types.d.ts +21 -12
  109. package/__inner__/esm/components/ChipNext/Chip.css +6 -0
  110. package/__inner__/esm/components/ChipNext/Chip.js +2 -2
  111. package/__inner__/esm/components/ChipNext/entities/color.d.ts +2 -0
  112. package/__inner__/esm/components/ChipNext/entities/color.js +7 -0
  113. package/__inner__/esm/components/ChipNext/entities/events.d.ts +5 -0
  114. package/__inner__/esm/components/ChipNext/entities/events.js +1 -0
  115. package/__inner__/esm/components/ChipNext/entities/icon.d.ts +3 -0
  116. package/__inner__/esm/components/ChipNext/entities/icon.js +1 -0
  117. package/__inner__/esm/components/ChipNext/entities/index.d.ts +4 -0
  118. package/__inner__/esm/components/ChipNext/entities/index.js +4 -0
  119. package/__inner__/esm/components/ChipNext/entities/size.d.ts +2 -0
  120. package/__inner__/esm/components/ChipNext/entities/size.js +1 -0
  121. package/__inner__/esm/components/ChipNext/index.d.ts +2 -0
  122. package/__inner__/esm/components/ChipNext/index.js +2 -0
  123. package/__inner__/esm/components/ChipNext/types.d.ts +3 -12
  124. package/__inner__/esm/components/ChipNext/types.js +1 -9
  125. package/__inner__/esm/components/DatePicker/components/DatePickerRenderRight/DatePickerRenderRight.js +1 -1
  126. package/__inner__/esm/components/DialogNext/Dialog.d.ts +1 -0
  127. package/__inner__/esm/components/DialogNext/Dialog.js +1 -0
  128. package/__inner__/esm/components/DialogNext/components/DialogBottomSheet/DialogBottomSheet.d.ts +2 -1
  129. package/__inner__/esm/components/DialogNext/components/DialogBottomSheet/DialogBottomSheet.js +2 -2
  130. package/__inner__/esm/components/DialogNext/components/DialogBottomSheet/types.d.ts +2 -1
  131. package/__inner__/esm/components/DialogNext/modules/DialogFooter/index.d.ts +2 -1
  132. package/__inner__/esm/components/DialogNext/modules/DialogFooter/index.js +2 -1
  133. package/__inner__/esm/components/DialogNext/modules/DialogHeader/index.d.ts +1 -0
  134. package/__inner__/esm/components/DialogNext/modules/DialogHeader/index.js +1 -0
  135. package/__inner__/esm/components/DialogNext/modules/DialogIllustration/DialogIllustration.css +5 -0
  136. package/__inner__/esm/components/DialogNext/modules/DialogIllustration/DialogIllustration.d.ts +3 -0
  137. package/__inner__/esm/components/DialogNext/modules/DialogIllustration/DialogIllustration.js +10 -0
  138. package/__inner__/esm/components/DialogNext/modules/DialogIllustration/constants.d.ts +1 -0
  139. package/__inner__/esm/components/DialogNext/modules/DialogIllustration/constants.js +1 -0
  140. package/__inner__/esm/components/DialogNext/modules/DialogIllustration/index.d.ts +3 -0
  141. package/__inner__/esm/components/DialogNext/modules/DialogIllustration/index.js +3 -0
  142. package/__inner__/esm/components/DialogNext/modules/DialogIllustration/types.d.ts +9 -0
  143. package/__inner__/esm/components/DialogNext/modules/DialogIllustration/types.js +1 -0
  144. package/__inner__/esm/components/DialogNext/modules/DialogTitle/index.d.ts +1 -0
  145. package/__inner__/esm/components/DialogNext/modules/DialogTitle/index.js +1 -0
  146. package/__inner__/esm/components/DialogNext/modules/index.d.ts +1 -0
  147. package/__inner__/esm/components/DialogNext/modules/index.js +1 -0
  148. package/__inner__/esm/components/DialogNext/types.d.ts +1 -1
  149. package/__inner__/esm/components/FilePicker/FilePicker.js +1 -1
  150. package/__inner__/esm/components/IconButtonNext/IconButton.css +26 -30
  151. package/__inner__/esm/components/OzenProvider/providers/theme/entities/defaultProps.d.ts +2 -1
  152. package/__inner__/esm/components/Select/components/SelectInputRenderRight/SelectInputRenderRight.js +10 -2
  153. package/__inner__/esm/components/Select/index.d.ts +1 -0
  154. package/__inner__/esm/components/Select/index.js +1 -0
  155. package/__inner__/esm/components/Select/modules/SelectIconButton/SelectIconButton.d.ts +3 -0
  156. package/__inner__/esm/components/Select/modules/SelectIconButton/SelectIconButton.js +23 -0
  157. package/__inner__/esm/components/Select/modules/SelectIconButton/constants.d.ts +3 -0
  158. package/__inner__/esm/components/Select/modules/SelectIconButton/constants.js +4 -0
  159. package/__inner__/esm/components/Select/modules/SelectIconButton/index.d.ts +3 -0
  160. package/__inner__/esm/components/Select/modules/SelectIconButton/index.js +3 -0
  161. package/__inner__/esm/components/Select/modules/SelectIconButton/types.d.ts +7 -0
  162. package/__inner__/esm/components/Select/modules/SelectIconButton/types.js +1 -0
  163. package/__inner__/esm/components/Select/modules/index.d.ts +1 -0
  164. package/__inner__/esm/components/Select/modules/index.js +1 -0
  165. package/package.json +4 -4
@@ -14,7 +14,7 @@ var AutocompleteBaseRenderRight = function (_a) {
14
14
  var open = dropdownControl.isOpen;
15
15
  var _c = tslib_1.__read((0, FieldControl_1.useFieldControl)(), 1), _d = _c[0], focused = _d.focused, hovered = _d.hovered;
16
16
  var isVisibleClearButton = !!(hovered || open || focused) && valueControl.hasValue;
17
- var clearButton = (react_1.default.createElement(IconButtonNext_1.IconButton, { size: size, type: "button", tabIndex: -1, icon: icons_1.CrossIcon, variant: "function", title: clearText, "aria-label": clearText, onClick: function (event) {
17
+ var clearButton = (react_1.default.createElement(IconButtonNext_1.IconButton, { size: size, type: "button", tabIndex: -1, icon: icons_1.CrossIcon, variant: "function", color: "tertiary", title: clearText, "aria-label": clearText, onClick: function (event) {
18
18
  event.preventDefault();
19
19
  clear(event);
20
20
  }, className: (0, classNames_1.cnAutocompleteBaseInput)('ClearButton', {
@@ -25,7 +25,7 @@ var AutocompleteBaseRenderRight = function (_a) {
25
25
  suffixPosition === 'before' && suffix,
26
26
  showClearButton && isVisibleClearButton && clearButton,
27
27
  suffixPosition === 'between' && suffix,
28
- showChevron && (react_1.default.createElement(IconButtonNext_1.IconButton, { size: size, type: "button", tabIndex: -1, variant: "ghost", disabled: disabled, title: open ? closeText : openText, "aria-label": open ? closeText : openText, icon: open ? icons_1.ChevronUpIcon : icons_1.ChevronDownIcon, onClick: function (event) {
28
+ showChevron && (react_1.default.createElement(IconButtonNext_1.IconButton, { size: size, type: "button", tabIndex: -1, variant: "ghost", color: "tertiary", disabled: disabled, title: open ? closeText : openText, "aria-label": open ? closeText : openText, icon: open ? icons_1.ChevronUpIcon : icons_1.ChevronDownIcon, onClick: function (event) {
29
29
  event.preventDefault();
30
30
  dropdownControl.toggle();
31
31
  }, compressed: true })),
@@ -1,4 +1,3 @@
1
- import type { FieldIconProps } from '../../../FieldIcon';
2
- import type { TagRef } from '../../../TagNext';
1
+ import type { FieldIconProps, FieldIconRef } from '../../../FieldIcon';
3
2
  export type AutocompleteBaseInputIconProps = Omit<FieldIconProps, 'size'>;
4
- export type AutocompleteBaseInputIconRef = TagRef;
3
+ export type AutocompleteBaseInputIconRef = FieldIconRef;
@@ -13,7 +13,7 @@ var AutocompleteRenderRight = function (_a) {
13
13
  var _b = tslib_1.__read((0, FieldControl_1.useFieldControl)(), 1), _c = _b[0], focused = _c.focused, hovered = _c.hovered;
14
14
  var isVisibleClearButton = !!(hovered || open || focused) && hasValue;
15
15
  var renderedIcon = react_1.default.createElement(FieldIcon_1.FieldIcon, { icon: renderRight });
16
- var clearButton = (react_1.default.createElement(IconButtonNext_1.IconButton, { size: size, type: "button", tabIndex: -1, icon: icons_1.CrossIcon, variant: "function", title: clearText, "aria-label": clearText, onClick: function (e) {
16
+ var clearButton = (react_1.default.createElement(IconButtonNext_1.IconButton, { size: size, type: "button", tabIndex: -1, icon: icons_1.CrossIcon, variant: "function", color: "tertiary", title: clearText, "aria-label": clearText, onClick: function (e) {
17
17
  e.preventDefault();
18
18
  onClear === null || onClear === void 0 ? void 0 : onClear(e);
19
19
  }, className: (0, index_1.cnAutocomplete)('ClearButton', {
@@ -24,7 +24,7 @@ var AutocompleteRenderRight = function (_a) {
24
24
  renderRightPosition === 'before' && renderedIcon,
25
25
  !disableClearButton && isVisibleClearButton && clearButton,
26
26
  renderRightPosition === 'between' && renderedIcon,
27
- !disableShowChevron && (react_1.default.createElement(IconButtonNext_1.IconButton, { size: size, type: "button", tabIndex: -1, variant: "ghost", disabled: disabled, title: open ? closeText : openText, "aria-label": open ? closeText : openText, icon: open ? icons_1.ChevronUpIcon : icons_1.ChevronDownIcon, onClick: function (e) {
27
+ !disableShowChevron && (react_1.default.createElement(IconButtonNext_1.IconButton, { size: size, type: "button", tabIndex: -1, variant: "ghost", color: "tertiary", disabled: disabled, title: open ? closeText : openText, "aria-label": open ? closeText : openText, icon: open ? icons_1.ChevronUpIcon : icons_1.ChevronDownIcon, onClick: function (e) {
28
28
  e.preventDefault();
29
29
  onOpen();
30
30
  }, compressed: true })),
@@ -1,6 +1,5 @@
1
1
  import './BottomSheetBaseBlock.css';
2
2
  import React from 'react';
3
+ import type { BottomSheetBaseBlockProps } from './types';
3
4
  export declare const cnBottomSheetBaseBlock: import("@bem-react/classname").ClassNameFormatter;
4
- export declare const BottomSheetBaseBlock: React.ForwardRefExoticComponent<{
5
- expandOnDrag?: boolean;
6
- } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "expandOnDrag"> & React.RefAttributes<HTMLDivElement>>;
5
+ export declare const BottomSheetBaseBlock: React.ForwardRefExoticComponent<Omit<BottomSheetBaseBlockProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,5 @@
1
- import type { ComponentPropsWithoutRef } from 'react';
1
+ import type { ComponentPropsWithRef } from 'react';
2
2
  import type { ExtendableProps } from '../../../../types/ExtendableProps';
3
3
  export type BottomSheetBaseBlockProps = ExtendableProps<{
4
4
  expandOnDrag?: boolean;
5
- }, ComponentPropsWithoutRef<'div'>>;
5
+ }, ComponentPropsWithRef<'div'>>;
@@ -1,5 +1,3 @@
1
1
  import React from 'react';
2
2
  export declare const cnBottomSheetBaseFooter: import("@bem-react/classname").ClassNameFormatter;
3
- export declare const BottomSheetBaseFooter: React.ForwardRefExoticComponent<{
4
- expandOnDrag?: boolean;
5
- } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "expandOnDrag"> & React.RefAttributes<HTMLDivElement>>;
3
+ export declare const BottomSheetBaseFooter: React.ForwardRefExoticComponent<Omit<import("../BottomSheetBaseBlock").BottomSheetBaseBlockProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,3 @@
1
1
  import React from 'react';
2
2
  export declare const cnBottomSheetBaseHeader: import("@bem-react/classname").ClassNameFormatter;
3
- export declare const BottomSheetBaseHeader: React.ForwardRefExoticComponent<{
4
- expandOnDrag?: boolean;
5
- } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "expandOnDrag"> & React.RefAttributes<HTMLDivElement>>;
3
+ export declare const BottomSheetBaseHeader: React.ForwardRefExoticComponent<Omit<import("../BottomSheetBaseBlock").BottomSheetBaseBlockProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -101,10 +101,10 @@
101
101
  --button-bg-color-hover: var(--color-background-action-secondary-hover);
102
102
  --button-bg-color-active: var(--color-background-action-secondary-pressed);
103
103
  --button-bg-color-focus: var(--color-background-action-secondary-hover);
104
- --button-font-color: var(--color-content-action-on);
105
- --button-font-color-hover: var(--color-content-action-on);
106
- --button-font-color-active: var(--color-content-action-on);
107
- --button-font-color-focus: var(--color-content-action-on);
104
+ --button-font-color: var(--color-content-primary-inverse);
105
+ --button-font-color-hover: var(--color-content-primary-inverse);
106
+ --button-font-color-active: var(--color-content-primary-inverse);
107
+ --button-font-color-focus: var(--color-content-primary-inverse);
108
108
  }
109
109
  .ButtonNext_variant_contained.ButtonNext_color_tertiary {
110
110
  --button-bg-color: var(--color-background-tertiary);
@@ -132,16 +132,16 @@
132
132
  --button-bg-color-hover: var(--color-background-action-light-hover);
133
133
  --button-bg-color-active: var(--color-background-action-light-pressed);
134
134
  --button-bg-color-focus: var(--color-background-action-light-hover);
135
- --button-font-color: var(--color-content-action);
136
- --button-font-color-hover: var(--color-content-action);
137
- --button-font-color-active: var(--color-content-action);
138
- --button-font-color-focus: var(--color-content-action);
135
+ --button-font-color: var(--color-content-action-dark);
136
+ --button-font-color-hover: var(--color-content-action-dark);
137
+ --button-font-color-active: var(--color-content-action-dark);
138
+ --button-font-color-focus: var(--color-content-action-dark);
139
139
  }
140
140
  .ButtonNext_variant_contained-additional.ButtonNext_color_secondary {
141
- --button-bg-color: var(--color-background-secondary);
142
- --button-bg-color-hover: var(--color-background-secondary-hover);
143
- --button-bg-color-active: var(--color-background-secondary-pressed);
144
- --button-bg-color-focus: var(--color-background-secondary-hover);
141
+ --button-bg-color: var(--color-background-action-secondary-light);
142
+ --button-bg-color-hover: var(--color-background-action-secondary-light-hover);
143
+ --button-bg-color-active: var(--color-background-action-secondary-light-pressed);
144
+ --button-bg-color-focus: var(--color-background-action-secondary-light-hover);
145
145
  --button-font-color: var(--color-content-primary);
146
146
  --button-font-color-hover: var(--color-content-primary);
147
147
  --button-font-color-active: var(--color-content-primary);
@@ -162,10 +162,10 @@
162
162
  --button-bg-color-hover: var(--color-background-error-light-hover);
163
163
  --button-bg-color-active: var(--color-background-error-light-pressed);
164
164
  --button-bg-color-focus: var(--color-background-error-light-hover);
165
- --button-font-color: var(--color-content-error);
166
- --button-font-color-hover: var(--color-content-error);
167
- --button-font-color-active: var(--color-content-error);
168
- --button-font-color-focus: var(--color-content-error);
165
+ --button-font-color: var(--color-content-error-dark);
166
+ --button-font-color-hover: var(--color-content-error-dark);
167
+ --button-font-color-active: var(--color-content-error-dark);
168
+ --button-font-color-focus: var(--color-content-error-dark);
169
169
  }
170
170
  /** ghost */
171
171
  .ButtonNext_variant_ghost.ButtonNext_color_primary {
@@ -180,13 +180,13 @@
180
180
  }
181
181
  .ButtonNext_variant_ghost.ButtonNext_color_secondary {
182
182
  --button-bg-color: transparent;
183
- --button-bg-color-hover: var(--color-background-secondary-hover);
184
- --button-bg-color-active: var(--color-background-secondary-pressed);
185
- --button-bg-color-focus: var(--color-background-secondary-hover);
186
- --button-font-color: var(--color-content-primary);
187
- --button-font-color-hover: var(--color-content-primary);
188
- --button-font-color-active: var(--color-content-primary);
189
- --button-font-color-focus: var(--color-content-primary);
183
+ --button-bg-color-hover: var(--color-background-action-secondary-light-hover);
184
+ --button-bg-color-active: var(--color-background-action-secondary-light-pressed);
185
+ --button-bg-color-focus: var(--color-background-action-secondary-light-hover);
186
+ --button-font-color: var(--color-content-action-secondary);
187
+ --button-font-color-hover: var(--color-content-action-secondary);
188
+ --button-font-color-active: var(--color-content-action-secondary);
189
+ --button-font-color-focus: var(--color-content-action-secondary);
190
190
  }
191
191
  .ButtonNext_variant_ghost.ButtonNext_color_tertiary {
192
192
  --button-bg-color: transparent;
@@ -228,13 +228,13 @@
228
228
  --button-font-color: var(--color-content-action);
229
229
  --button-font-color-hover: var(--color-background-action-hover);
230
230
  --button-font-color-active: var(--color-background-action-pressed);
231
- --button-font-color-focus: var(--color-background-action-pressed);
231
+ --button-font-color-focus: var(--color-background-action-hover);
232
232
  }
233
233
  .ButtonNext_variant_function.ButtonNext_color_secondary {
234
234
  --button-font-color: var(--color-content-action-secondary);
235
235
  --button-font-color-hover: var(--color-content-action-secondary-hover);
236
236
  --button-font-color-active: var(--color-content-action-secondary-pressed);
237
- --button-font-color-focus: var(--color-content-action-secondary-pressed);
237
+ --button-font-color-focus: var(--color-content-action-secondary-hover);
238
238
  }
239
239
  .ButtonNext_variant_function.ButtonNext_color_tertiary {
240
240
  --button-font-color: var(--color-content-secondary);
@@ -246,7 +246,7 @@
246
246
  --button-font-color: var(--color-content-error);
247
247
  --button-font-color-hover: var(--color-content-error-hover);
248
248
  --button-font-color-active: var(--color-content-error-pressed);
249
- --button-font-color-focus: var(--color-content-error-pressed);
249
+ --button-font-color-focus: var(--color-content-error-hover);
250
250
  }
251
251
  /** disabled & loading */
252
252
  .ButtonNext_variant_contained.ButtonNext_disabled,
@@ -1,4 +1,4 @@
1
1
  import './ChipGroup.css';
2
- import type { ChipGroupBaseProps } from './types';
2
+ import type { ChipGroupComponent } from './types';
3
3
  export declare const cnChipGroup: import("@bem-react/classname").ClassNameFormatter;
4
- export declare const ChipGroup: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<ChipGroupBaseProps, "div", "as">;
4
+ export declare const ChipGroup: ChipGroupComponent;
@@ -3,50 +3,117 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChipGroup = exports.cnChipGroup = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  require("./ChipGroup.css");
6
- var react_1 = tslib_1.__importDefault(require("react"));
6
+ var react_1 = tslib_1.__importStar(require("react"));
7
7
  var useControlled_1 = require("../../hooks/useControlled");
8
8
  var useThemeProps_1 = require("../../hooks/useThemeProps");
9
+ var utils_1 = require("../../utils");
9
10
  var classname_1 = require("../../utils/classname");
10
11
  var polymorphicComponentWithRef_1 = require("../../utils/polymorphicComponentWithRef");
12
+ var FieldHint_1 = require("../FieldHint");
11
13
  var FormGroup_1 = require("../FormGroup");
12
14
  var FormTitle_1 = require("../FormTitle");
13
15
  var ChipGroupContext_1 = require("./ChipGroupContext");
14
16
  var constants_1 = require("./constants");
17
+ var entities_1 = require("./entities");
15
18
  exports.cnChipGroup = (0, classname_1.cn)('ChipGroup');
16
19
  exports.ChipGroup = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (inProps, ref) {
17
20
  var props = (0, useThemeProps_1.useThemeProps)({
18
21
  props: inProps,
19
22
  name: 'ChipGroup',
20
23
  });
21
- var _a = props.direction, direction = _a === void 0 ? constants_1.CHIP_GROUP_DEFAULT_DIRECTION : _a, _b = props.size, size = _b === void 0 ? constants_1.CHIP_GROUP_DEFAULT_SIZE : _b, _c = props.as, Tag = _c === void 0 ? constants_1.CHIP_GROUP_DEFAULT_AS : _c, color = props.color, title = props.title, className = props.className, children = props.children, valueProp = props.value, _d = props.defaultValue, defaultValue = _d === void 0 ? [] : _d, onChange = props.onChange, disabled = props.disabled, titleProps = props.titleProps, groupProps = props.groupProps, other = tslib_1.__rest(props, ["direction", "size", "as", "color", "title", "className", "children", "value", "defaultValue", "onChange", "disabled", "titleProps", "groupProps"]);
24
+ var _a = props.direction, direction = _a === void 0 ? constants_1.CHIP_GROUP_DEFAULT_DIRECTION : _a, _b = props.size, size = _b === void 0 ? constants_1.CHIP_GROUP_DEFAULT_SIZE : _b, _c = props.as, Tag = _c === void 0 ? constants_1.CHIP_GROUP_DEFAULT_AS : _c, color = props.color, title = props.title, className = props.className, children = props.children, valueProp = props.value, defaultValueProp = props.defaultValue, onChange = props.onChange, disabled = props.disabled, titleProps = props.titleProps, groupProps = props.groupProps, _d = props.mode, mode = _d === void 0 ? constants_1.CHIP_GROUP_DEFAULT_MODE : _d, hint = props.hint, other = tslib_1.__rest(props, ["direction", "size", "as", "color", "title", "className", "children", "value", "defaultValue", "onChange", "disabled", "titleProps", "groupProps", "mode", "hint"]);
25
+ var defaultValue = (0, react_1.useMemo)(function () {
26
+ if (defaultValueProp !== undefined) {
27
+ return defaultValueProp;
28
+ }
29
+ if (mode === 'checkbox') {
30
+ return [];
31
+ }
32
+ if (mode === 'radio') {
33
+ return null;
34
+ }
35
+ throw new Error("\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C mode \"".concat(mode, "\""));
36
+ }, []);
22
37
  var _e = tslib_1.__read((0, useControlled_1.useControlled)({
23
38
  value: valueProp,
24
39
  defaultValue: defaultValue,
25
40
  name: 'ChipGroup',
26
41
  state: 'value',
27
42
  }), 2), valueState = _e[0], setValueState = _e[1];
43
+ var setValue = function (value, event) {
44
+ setValueState(value);
45
+ onChange === null || onChange === void 0 ? void 0 : onChange(value, event);
46
+ };
47
+ (0, react_1.useEffect)(function () {
48
+ if (mode === 'checkbox') {
49
+ if ((0, utils_1.isString)(valueState)) {
50
+ var value = [valueState];
51
+ setValue(value, null);
52
+ return;
53
+ }
54
+ if (valueState === null) {
55
+ setValue([], null);
56
+ return;
57
+ }
58
+ return;
59
+ }
60
+ if (mode === 'radio') {
61
+ if (!(0, utils_1.isArray)(valueState)) {
62
+ return;
63
+ }
64
+ if (valueState.length > 0) {
65
+ setValue(valueState[0], null);
66
+ return;
67
+ }
68
+ setValue(null, null);
69
+ return;
70
+ }
71
+ throw new Error("\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u0440\u0435\u0436\u0438\u043C \"".concat(mode, "\"."));
72
+ }, [mode]);
73
+ var valueArray = (function () {
74
+ if (!valueState) {
75
+ return [];
76
+ }
77
+ if ((0, utils_1.isString)(valueState)) {
78
+ return [valueState];
79
+ }
80
+ return valueState;
81
+ })();
28
82
  var onClick = function (event, payload) {
29
83
  var itemValue = payload.value;
30
84
  if (itemValue === undefined) {
31
85
  return;
32
86
  }
33
- var requiredValueState = valueState !== null && valueState !== void 0 ? valueState : [];
34
- var isValueAlreadyChecked = requiredValueState.includes(itemValue);
35
- var value = isValueAlreadyChecked
36
- ? requiredValueState.filter(function (item) { return item !== itemValue; })
37
- : tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(requiredValueState), false), [itemValue], false);
38
- setValueState(value);
39
- onChange === null || onChange === void 0 ? void 0 : onChange(value, event);
87
+ var isValueAlreadyChecked = valueArray.includes(itemValue);
88
+ if (mode === 'checkbox') {
89
+ var value = isValueAlreadyChecked
90
+ ? valueArray.filter(function (item) { return item !== itemValue; })
91
+ : tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(valueArray), false), [itemValue], false);
92
+ setValueState(value);
93
+ onChange === null || onChange === void 0 ? void 0 : onChange(value, event);
94
+ return;
95
+ }
96
+ if (mode === 'radio') {
97
+ if (isValueAlreadyChecked) {
98
+ return;
99
+ }
100
+ setValueState(itemValue);
101
+ onChange === null || onChange === void 0 ? void 0 : onChange(itemValue, event);
102
+ return;
103
+ }
104
+ throw new Error("\u041D\u0435\u043E\u0436\u0438\u0434\u0430\u043D\u043D\u044B\u0439 mode \"".concat(mode, "\". \u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B: ").concat(JSON.stringify(entities_1.chipGroupModeVariant)));
40
105
  };
41
106
  return (react_1.default.createElement(Tag, tslib_1.__assign({ className: (0, exports.cnChipGroup)({ size: size }, [className]), role: "group" }, other, { ref: ref }),
42
107
  react_1.default.createElement(ChipGroupContext_1.ChipGroupContext.Provider, { value: {
43
108
  value: valueState,
109
+ valueArray: valueArray,
44
110
  onClick: onClick,
45
111
  size: size,
46
112
  disabled: disabled,
47
113
  color: color,
48
114
  } },
49
115
  title && (react_1.default.createElement(FormTitle_1.FormTitle, tslib_1.__assign({ size: size }, titleProps), title)),
50
- react_1.default.createElement(FormGroup_1.FormGroup, tslib_1.__assign({ direction: direction, size: size }, groupProps), children))));
116
+ react_1.default.createElement(FormGroup_1.FormGroup, tslib_1.__assign({ direction: direction, size: size }, groupProps), children),
117
+ react_1.default.createElement(FieldHint_1.FieldHint, { size: constants_1.CHIP_GROUP_SIZE_TO_HINT_SIZE[size], error: color === 'error', disabled: disabled }, hint))));
51
118
  });
52
119
  exports.ChipGroup.displayName = 'ChipGroup';
@@ -1,9 +1,10 @@
1
1
  import type { ChipColorVariant, ChipOnClick, ChipSizeVariant } from '../ChipNext';
2
- import type { ChipGroupValue } from './types';
2
+ import type { ChipGroupValue, ChipGroupValueArray } from './entities';
3
3
  export type ChipGroupContextValue = {
4
4
  onClick: ChipOnClick;
5
5
  disabled?: boolean;
6
6
  value?: ChipGroupValue;
7
+ valueArray?: ChipGroupValueArray;
7
8
  size?: ChipSizeVariant;
8
9
  color?: ChipColorVariant;
9
10
  };
@@ -1,5 +1,7 @@
1
+ import type { FormElementSizeVariant } from '../../types';
1
2
  import type { ChipSizeVariant } from '../ChipNext';
2
- import type { FormGroupDirectionVariant } from '../FormGroup';
3
- export declare const CHIP_GROUP_DEFAULT_DIRECTION: FormGroupDirectionVariant;
4
- export declare const CHIP_GROUP_DEFAULT_SIZE: ChipSizeVariant;
3
+ export declare const CHIP_GROUP_DEFAULT_DIRECTION = "row";
4
+ export declare const CHIP_GROUP_DEFAULT_SIZE = "m";
5
5
  export declare const CHIP_GROUP_DEFAULT_AS = "div";
6
+ export declare const CHIP_GROUP_DEFAULT_MODE = "checkbox";
7
+ export declare const CHIP_GROUP_SIZE_TO_HINT_SIZE: Readonly<Record<ChipSizeVariant, FormElementSizeVariant>>;
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHIP_GROUP_DEFAULT_AS = exports.CHIP_GROUP_DEFAULT_SIZE = exports.CHIP_GROUP_DEFAULT_DIRECTION = void 0;
3
+ exports.CHIP_GROUP_SIZE_TO_HINT_SIZE = exports.CHIP_GROUP_DEFAULT_MODE = exports.CHIP_GROUP_DEFAULT_AS = exports.CHIP_GROUP_DEFAULT_SIZE = exports.CHIP_GROUP_DEFAULT_DIRECTION = void 0;
4
4
  exports.CHIP_GROUP_DEFAULT_DIRECTION = 'row';
5
5
  exports.CHIP_GROUP_DEFAULT_SIZE = 'm';
6
6
  exports.CHIP_GROUP_DEFAULT_AS = 'div';
7
+ exports.CHIP_GROUP_DEFAULT_MODE = 'checkbox';
8
+ exports.CHIP_GROUP_SIZE_TO_HINT_SIZE = {
9
+ xs: 's',
10
+ s: 's',
11
+ m: 'l',
12
+ l: 'l',
13
+ };
@@ -0,0 +1,2 @@
1
+ export declare const chipGroupDirection: readonly ["row", "column", "rowReverse", "columnReverse"];
2
+ export type ChipGroupDirection = (typeof chipGroupDirection)[number];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chipGroupDirection = void 0;
4
+ var FormGroup_1 = require("../../FormGroup");
5
+ exports.chipGroupDirection = FormGroup_1.formGroupDirectionVariant;
@@ -0,0 +1,4 @@
1
+ export * from './direction';
2
+ export * from './mode';
3
+ export * from './onChange';
4
+ export * from './value';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./direction"), exports);
5
+ tslib_1.__exportStar(require("./mode"), exports);
6
+ tslib_1.__exportStar(require("./onChange"), exports);
7
+ tslib_1.__exportStar(require("./value"), exports);
@@ -0,0 +1,2 @@
1
+ export declare const chipGroupModeVariant: readonly ["checkbox", "radio"];
2
+ export type ChipGroupModeVariant = (typeof chipGroupModeVariant)[number];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chipGroupModeVariant = void 0;
4
+ exports.chipGroupModeVariant = ['checkbox', 'radio'];
@@ -0,0 +1,4 @@
1
+ import type { MouseEvent } from 'react';
2
+ import type { ChipGroupModeVariant } from './mode';
3
+ import type { ChipGroupValue } from './value';
4
+ export type ChipGroupOnChange<Mode extends ChipGroupModeVariant = ChipGroupModeVariant> = (value: ChipGroupValue<Mode>, event: MouseEvent<HTMLElement> | null) => void;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import type { ChipGroupModeVariant } from './mode';
2
+ export type ChipGroupValueArray = string[];
3
+ export type ChipGroupValue<Mode extends ChipGroupModeVariant = ChipGroupModeVariant> = Mode extends 'checkbox' ? ChipGroupValueArray : string | null;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,4 @@
1
+ export * from './entities';
2
+ export * from './constants';
1
3
  export * from './ChipGroup';
2
4
  export * from './types';
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./entities"), exports);
5
+ tslib_1.__exportStar(require("./constants"), exports);
4
6
  tslib_1.__exportStar(require("./ChipGroup"), exports);
5
7
  tslib_1.__exportStar(require("./types"), exports);
@@ -1,16 +1,17 @@
1
- import type { ElementType, MouseEvent, ReactNode } from 'react';
2
- import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
1
+ import type { ComponentRef, ElementType, ReactNode } from 'react';
2
+ import type { WithDisplayName } from '../../types';
3
+ import type { PolymorphicComponentPropsWithoutRef, PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
3
4
  import type { ChipColorVariant, ChipSizeVariant } from '../ChipNext';
4
- import type { FormGroupDirectionVariant, FormGroupProps } from '../FormGroup';
5
+ import type { FieldHintProps } from '../FieldHint';
6
+ import type { FormGroupProps } from '../FormGroup';
5
7
  import type { FormTitleProps } from '../FormTitle';
6
- import type { CHIP_GROUP_DEFAULT_AS } from './constants';
7
- export type ChipGroupValue = string[];
8
- export type ChipGroupOnChange = (value: ChipGroupValue, event: MouseEvent<HTMLElement>) => void;
9
- export type ChipGroupBaseProps = {
8
+ import type { CHIP_GROUP_DEFAULT_AS, CHIP_GROUP_DEFAULT_MODE } from './constants';
9
+ import type { ChipGroupValue, ChipGroupOnChange, ChipGroupModeVariant, ChipGroupDirection } from './entities';
10
+ export type ChipGroupBaseProps<Mode extends ChipGroupModeVariant = ChipGroupModeVariant> = {
10
11
  /** Значение по умолчанию (неконтролируемое состояние) */
11
- defaultValue?: ChipGroupValue;
12
+ defaultValue?: ChipGroupValue<Mode>;
12
13
  /** Текущее значение */
13
- value?: ChipGroupValue;
14
+ value?: ChipGroupValue<Mode>;
14
15
  /** Вариант представления компонента */
15
16
  color?: ChipColorVariant;
16
17
  /** Размер */
@@ -18,9 +19,9 @@ export type ChipGroupBaseProps = {
18
19
  /** Содержимое компонента */
19
20
  children?: ReactNode;
20
21
  /** Направление */
21
- direction?: FormGroupDirectionVariant;
22
+ direction?: ChipGroupDirection;
22
23
  /** Событие изменения состояния */
23
- onChange?: ChipGroupOnChange;
24
+ onChange?: ChipGroupOnChange<Mode>;
24
25
  /** Если `true` делает элементы неактивными */
25
26
  disabled?: boolean;
26
27
  /** Идентификатор компонента для тестов */
@@ -29,5 +30,13 @@ export type ChipGroupBaseProps = {
29
30
  titleProps?: FormTitleProps;
30
31
  /** Свойства FormGroup */
31
32
  groupProps?: FormGroupProps;
33
+ /** Режим работы */
34
+ mode?: Mode;
35
+ /** Дополнительное описание */
36
+ hint?: ReactNode;
37
+ /** Параметры дополнительного описания */
38
+ hintProps?: FieldHintProps;
32
39
  };
33
- export type ChipGroupProps<As extends ElementType = typeof CHIP_GROUP_DEFAULT_AS> = PolymorphicComponentPropsWithoutRef<ChipGroupBaseProps, As>;
40
+ export type ChipGroupProps<Mode extends ChipGroupModeVariant = typeof CHIP_GROUP_DEFAULT_MODE, As extends ElementType = typeof CHIP_GROUP_DEFAULT_AS> = PolymorphicComponentPropsWithoutRef<ChipGroupBaseProps<Mode>, As>;
41
+ export type ChipGroupComponent = WithDisplayName<(<Mode extends ChipGroupModeVariant = typeof CHIP_GROUP_DEFAULT_MODE, As extends ElementType = typeof CHIP_GROUP_DEFAULT_AS>(props: PolymorphicComponentPropsWithRef<ChipGroupBaseProps<Mode>, As>) => ReactNode)>;
42
+ export type ChipGroupRef<As extends ElementType = typeof CHIP_GROUP_DEFAULT_AS> = ComponentRef<As>;
@@ -96,6 +96,12 @@
96
96
  --chip-bg-color-active: var(--color-background-overlay);
97
97
  --chip-text-color: var(--color-content-action-on);
98
98
  }
99
+ .ChipNext_color_error {
100
+ --chip-bg-color: var(--color-background-error-light);
101
+ --chip-bg-color-hover: var(--color-background-error-light);
102
+ --chip-bg-color-active: var(--color-background-error-light);
103
+ --chip-text-color: var(--color-content-error);
104
+ }
99
105
  .ChipNext_color_primary.ChipNext_checked {
100
106
  --chip-bg-color: var(--color-background-action);
101
107
  --chip-bg-color-hover: var(--color-background-action);
@@ -26,8 +26,8 @@ exports.Chip = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(fu
26
26
  if (environment_1.isDev && value === undefined) {
27
27
  logger_1.logger.error('Отсутствует параметр "value" для Chip, находящегося в ChipGroup.');
28
28
  }
29
- if (checked === undefined && chipGroup.value) {
30
- checked = chipGroup === null || chipGroup === void 0 ? void 0 : chipGroup.value.includes(value);
29
+ if (checked === undefined && chipGroup.valueArray) {
30
+ checked = chipGroup.valueArray.includes(value);
31
31
  }
32
32
  if (inProps.size === undefined && chipGroup.size) {
33
33
  size = chipGroup.size;
@@ -0,0 +1,2 @@
1
+ export declare const chipColorVariant: readonly ["primary", "secondary", "main", "overlay", "error"];
2
+ export type ChipColorVariant = (typeof chipColorVariant)[number];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chipColorVariant = void 0;
4
+ exports.chipColorVariant = [
5
+ 'primary',
6
+ 'secondary',
7
+ 'main',
8
+ 'overlay',
9
+ 'error',
10
+ ];
@@ -0,0 +1,5 @@
1
+ import type { MouseEvent } from 'react';
2
+ export type ChipOnClick = (event: MouseEvent<HTMLElement>, payload: {
3
+ checked: boolean;
4
+ value: string | undefined;
5
+ }) => void;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from '@ozen-ui/icons';
2
+ import type { RenderContentType } from '../../../utils';
3
+ export type ChipIcon = RenderContentType<IconProps>['content'];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export * from './color';
2
+ export * from './events';
3
+ export * from './icon';
4
+ export * from './size';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./color"), exports);
5
+ tslib_1.__exportStar(require("./events"), exports);
6
+ tslib_1.__exportStar(require("./icon"), exports);
7
+ tslib_1.__exportStar(require("./size"), exports);
@@ -0,0 +1,2 @@
1
+ export declare const chipSizeVariant: readonly ["xs", "s", "m", "l"];
2
+ export type ChipSizeVariant = (typeof chipSizeVariant)[number];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chipSizeVariant = void 0;
4
+ exports.chipSizeVariant = ['xs', 's', 'm', 'l'];
@@ -1,2 +1,4 @@
1
+ export * from './entities';
2
+ export * from './constants';
1
3
  export * from './Chip';
2
4
  export * from './types';
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./entities"), exports);
5
+ tslib_1.__exportStar(require("./constants"), exports);
4
6
  tslib_1.__exportStar(require("./Chip"), exports);
5
7
  tslib_1.__exportStar(require("./types"), exports);