@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.
- package/__inner__/cjs/components/AutocompleteBase/modules/AutocompleteBaseInput/components/AutocompleteBaseRenderRight/AutocompleteBaseRenderRight.js +2 -2
- package/__inner__/cjs/components/AutocompleteBase/modules/AutocompleteBaseInputIcon/types.d.ts +2 -3
- package/__inner__/cjs/components/AutocompleteNext/components/AutocompleteRenderRight/AutocompleteRenderRight.js +2 -2
- package/__inner__/cjs/components/BottomSheetBase/modules/BottomSheetBaseBlock/BottomSheetBaseBlock.d.ts +2 -3
- package/__inner__/cjs/components/BottomSheetBase/modules/BottomSheetBaseBlock/types.d.ts +2 -2
- package/__inner__/cjs/components/BottomSheetBase/modules/BottomSheetBaseFooter/BottomSheetBaseFooter.d.ts +1 -3
- package/__inner__/cjs/components/BottomSheetBase/modules/BottomSheetBaseHeader/BottomSheetBaseHeader.d.ts +1 -3
- package/__inner__/cjs/components/ButtonNext/Button.css +26 -26
- package/__inner__/cjs/components/ChipGroup/ChipGroup.d.ts +2 -2
- package/__inner__/cjs/components/ChipGroup/ChipGroup.js +77 -10
- package/__inner__/cjs/components/ChipGroup/ChipGroupContext.d.ts +2 -1
- package/__inner__/cjs/components/ChipGroup/constants.d.ts +5 -3
- package/__inner__/cjs/components/ChipGroup/constants.js +8 -1
- package/__inner__/cjs/components/ChipGroup/entities/direction.d.ts +2 -0
- package/__inner__/cjs/components/ChipGroup/entities/direction.js +5 -0
- package/__inner__/cjs/components/ChipGroup/entities/index.d.ts +4 -0
- package/__inner__/cjs/components/ChipGroup/entities/index.js +7 -0
- package/__inner__/cjs/components/ChipGroup/entities/mode.d.ts +2 -0
- package/__inner__/cjs/components/ChipGroup/entities/mode.js +4 -0
- package/__inner__/cjs/components/ChipGroup/entities/onChange.d.ts +4 -0
- package/__inner__/cjs/components/ChipGroup/entities/onChange.js +2 -0
- package/__inner__/cjs/components/ChipGroup/entities/value.d.ts +3 -0
- package/__inner__/cjs/components/ChipGroup/entities/value.js +2 -0
- package/__inner__/cjs/components/ChipGroup/index.d.ts +2 -0
- package/__inner__/cjs/components/ChipGroup/index.js +2 -0
- package/__inner__/cjs/components/ChipGroup/types.d.ts +21 -12
- package/__inner__/cjs/components/ChipNext/Chip.css +6 -0
- package/__inner__/cjs/components/ChipNext/Chip.js +2 -2
- package/__inner__/cjs/components/ChipNext/entities/color.d.ts +2 -0
- package/__inner__/cjs/components/ChipNext/entities/color.js +10 -0
- package/__inner__/cjs/components/ChipNext/entities/events.d.ts +5 -0
- package/__inner__/cjs/components/ChipNext/entities/events.js +2 -0
- package/__inner__/cjs/components/ChipNext/entities/icon.d.ts +3 -0
- package/__inner__/cjs/components/ChipNext/entities/icon.js +2 -0
- package/__inner__/cjs/components/ChipNext/entities/index.d.ts +4 -0
- package/__inner__/cjs/components/ChipNext/entities/index.js +7 -0
- package/__inner__/cjs/components/ChipNext/entities/size.d.ts +2 -0
- package/__inner__/cjs/components/ChipNext/entities/size.js +4 -0
- package/__inner__/cjs/components/ChipNext/index.d.ts +2 -0
- package/__inner__/cjs/components/ChipNext/index.js +2 -0
- package/__inner__/cjs/components/ChipNext/types.d.ts +3 -12
- package/__inner__/cjs/components/ChipNext/types.js +0 -10
- package/__inner__/cjs/components/DatePicker/components/DatePickerRenderRight/DatePickerRenderRight.js +1 -1
- package/__inner__/cjs/components/DialogNext/Dialog.d.ts +1 -0
- package/__inner__/cjs/components/DialogNext/Dialog.js +1 -0
- package/__inner__/cjs/components/DialogNext/components/DialogBottomSheet/DialogBottomSheet.d.ts +2 -1
- package/__inner__/cjs/components/DialogNext/components/DialogBottomSheet/DialogBottomSheet.js +2 -2
- package/__inner__/cjs/components/DialogNext/components/DialogBottomSheet/types.d.ts +2 -1
- package/__inner__/cjs/components/DialogNext/modules/DialogFooter/index.d.ts +2 -1
- package/__inner__/cjs/components/DialogNext/modules/DialogFooter/index.js +2 -1
- package/__inner__/cjs/components/DialogNext/modules/DialogHeader/index.d.ts +1 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogHeader/index.js +1 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/DialogIllustration.css +5 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/DialogIllustration.d.ts +3 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/DialogIllustration.js +13 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/constants.d.ts +1 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/constants.js +4 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/index.d.ts +3 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/index.js +6 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/types.d.ts +9 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogIllustration/types.js +2 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogTitle/index.d.ts +1 -0
- package/__inner__/cjs/components/DialogNext/modules/DialogTitle/index.js +1 -0
- package/__inner__/cjs/components/DialogNext/modules/index.d.ts +1 -0
- package/__inner__/cjs/components/DialogNext/modules/index.js +1 -0
- package/__inner__/cjs/components/DialogNext/types.d.ts +1 -1
- package/__inner__/cjs/components/FilePicker/FilePicker.js +1 -1
- package/__inner__/cjs/components/IconButtonNext/IconButton.css +26 -30
- package/__inner__/cjs/components/OzenProvider/providers/theme/entities/defaultProps.d.ts +2 -1
- package/__inner__/cjs/components/Select/components/SelectInputRenderRight/SelectInputRenderRight.js +10 -2
- package/__inner__/cjs/components/Select/index.d.ts +1 -0
- package/__inner__/cjs/components/Select/index.js +1 -0
- package/__inner__/cjs/components/Select/modules/SelectIconButton/SelectIconButton.d.ts +3 -0
- package/__inner__/cjs/components/Select/modules/SelectIconButton/SelectIconButton.js +26 -0
- package/__inner__/cjs/components/Select/modules/SelectIconButton/constants.d.ts +3 -0
- package/__inner__/cjs/components/Select/modules/SelectIconButton/constants.js +7 -0
- package/__inner__/cjs/components/Select/modules/SelectIconButton/index.d.ts +3 -0
- package/__inner__/cjs/components/Select/modules/SelectIconButton/index.js +6 -0
- package/__inner__/cjs/components/Select/modules/SelectIconButton/types.d.ts +7 -0
- package/__inner__/cjs/components/Select/modules/SelectIconButton/types.js +2 -0
- package/__inner__/cjs/components/Select/modules/index.d.ts +1 -0
- package/__inner__/cjs/components/Select/modules/index.js +4 -0
- package/__inner__/esm/components/AutocompleteBase/modules/AutocompleteBaseInput/components/AutocompleteBaseRenderRight/AutocompleteBaseRenderRight.js +2 -2
- package/__inner__/esm/components/AutocompleteBase/modules/AutocompleteBaseInputIcon/types.d.ts +2 -3
- package/__inner__/esm/components/AutocompleteNext/components/AutocompleteRenderRight/AutocompleteRenderRight.js +2 -2
- package/__inner__/esm/components/BottomSheetBase/modules/BottomSheetBaseBlock/BottomSheetBaseBlock.d.ts +2 -3
- package/__inner__/esm/components/BottomSheetBase/modules/BottomSheetBaseBlock/types.d.ts +2 -2
- package/__inner__/esm/components/BottomSheetBase/modules/BottomSheetBaseFooter/BottomSheetBaseFooter.d.ts +1 -3
- package/__inner__/esm/components/BottomSheetBase/modules/BottomSheetBaseHeader/BottomSheetBaseHeader.d.ts +1 -3
- package/__inner__/esm/components/ButtonNext/Button.css +26 -26
- package/__inner__/esm/components/ChipGroup/ChipGroup.d.ts +2 -2
- package/__inner__/esm/components/ChipGroup/ChipGroup.js +78 -11
- package/__inner__/esm/components/ChipGroup/ChipGroupContext.d.ts +2 -1
- package/__inner__/esm/components/ChipGroup/constants.d.ts +5 -3
- package/__inner__/esm/components/ChipGroup/constants.js +7 -0
- package/__inner__/esm/components/ChipGroup/entities/direction.d.ts +2 -0
- package/__inner__/esm/components/ChipGroup/entities/direction.js +2 -0
- package/__inner__/esm/components/ChipGroup/entities/index.d.ts +4 -0
- package/__inner__/esm/components/ChipGroup/entities/index.js +4 -0
- package/__inner__/esm/components/ChipGroup/entities/mode.d.ts +2 -0
- package/__inner__/esm/components/ChipGroup/entities/mode.js +1 -0
- package/__inner__/esm/components/ChipGroup/entities/onChange.d.ts +4 -0
- package/__inner__/esm/components/ChipGroup/entities/onChange.js +1 -0
- package/__inner__/esm/components/ChipGroup/entities/value.d.ts +3 -0
- package/__inner__/esm/components/ChipGroup/entities/value.js +1 -0
- package/__inner__/esm/components/ChipGroup/index.d.ts +2 -0
- package/__inner__/esm/components/ChipGroup/index.js +2 -0
- package/__inner__/esm/components/ChipGroup/types.d.ts +21 -12
- package/__inner__/esm/components/ChipNext/Chip.css +6 -0
- package/__inner__/esm/components/ChipNext/Chip.js +2 -2
- package/__inner__/esm/components/ChipNext/entities/color.d.ts +2 -0
- package/__inner__/esm/components/ChipNext/entities/color.js +7 -0
- package/__inner__/esm/components/ChipNext/entities/events.d.ts +5 -0
- package/__inner__/esm/components/ChipNext/entities/events.js +1 -0
- package/__inner__/esm/components/ChipNext/entities/icon.d.ts +3 -0
- package/__inner__/esm/components/ChipNext/entities/icon.js +1 -0
- package/__inner__/esm/components/ChipNext/entities/index.d.ts +4 -0
- package/__inner__/esm/components/ChipNext/entities/index.js +4 -0
- package/__inner__/esm/components/ChipNext/entities/size.d.ts +2 -0
- package/__inner__/esm/components/ChipNext/entities/size.js +1 -0
- package/__inner__/esm/components/ChipNext/index.d.ts +2 -0
- package/__inner__/esm/components/ChipNext/index.js +2 -0
- package/__inner__/esm/components/ChipNext/types.d.ts +3 -12
- package/__inner__/esm/components/ChipNext/types.js +1 -9
- package/__inner__/esm/components/DatePicker/components/DatePickerRenderRight/DatePickerRenderRight.js +1 -1
- package/__inner__/esm/components/DialogNext/Dialog.d.ts +1 -0
- package/__inner__/esm/components/DialogNext/Dialog.js +1 -0
- package/__inner__/esm/components/DialogNext/components/DialogBottomSheet/DialogBottomSheet.d.ts +2 -1
- package/__inner__/esm/components/DialogNext/components/DialogBottomSheet/DialogBottomSheet.js +2 -2
- package/__inner__/esm/components/DialogNext/components/DialogBottomSheet/types.d.ts +2 -1
- package/__inner__/esm/components/DialogNext/modules/DialogFooter/index.d.ts +2 -1
- package/__inner__/esm/components/DialogNext/modules/DialogFooter/index.js +2 -1
- package/__inner__/esm/components/DialogNext/modules/DialogHeader/index.d.ts +1 -0
- package/__inner__/esm/components/DialogNext/modules/DialogHeader/index.js +1 -0
- package/__inner__/esm/components/DialogNext/modules/DialogIllustration/DialogIllustration.css +5 -0
- package/__inner__/esm/components/DialogNext/modules/DialogIllustration/DialogIllustration.d.ts +3 -0
- package/__inner__/esm/components/DialogNext/modules/DialogIllustration/DialogIllustration.js +10 -0
- package/__inner__/esm/components/DialogNext/modules/DialogIllustration/constants.d.ts +1 -0
- package/__inner__/esm/components/DialogNext/modules/DialogIllustration/constants.js +1 -0
- package/__inner__/esm/components/DialogNext/modules/DialogIllustration/index.d.ts +3 -0
- package/__inner__/esm/components/DialogNext/modules/DialogIllustration/index.js +3 -0
- package/__inner__/esm/components/DialogNext/modules/DialogIllustration/types.d.ts +9 -0
- package/__inner__/esm/components/DialogNext/modules/DialogIllustration/types.js +1 -0
- package/__inner__/esm/components/DialogNext/modules/DialogTitle/index.d.ts +1 -0
- package/__inner__/esm/components/DialogNext/modules/DialogTitle/index.js +1 -0
- package/__inner__/esm/components/DialogNext/modules/index.d.ts +1 -0
- package/__inner__/esm/components/DialogNext/modules/index.js +1 -0
- package/__inner__/esm/components/DialogNext/types.d.ts +1 -1
- package/__inner__/esm/components/FilePicker/FilePicker.js +1 -1
- package/__inner__/esm/components/IconButtonNext/IconButton.css +26 -30
- package/__inner__/esm/components/OzenProvider/providers/theme/entities/defaultProps.d.ts +2 -1
- package/__inner__/esm/components/Select/components/SelectInputRenderRight/SelectInputRenderRight.js +10 -2
- package/__inner__/esm/components/Select/index.d.ts +1 -0
- package/__inner__/esm/components/Select/index.js +1 -0
- package/__inner__/esm/components/Select/modules/SelectIconButton/SelectIconButton.d.ts +3 -0
- package/__inner__/esm/components/Select/modules/SelectIconButton/SelectIconButton.js +23 -0
- package/__inner__/esm/components/Select/modules/SelectIconButton/constants.d.ts +3 -0
- package/__inner__/esm/components/Select/modules/SelectIconButton/constants.js +4 -0
- package/__inner__/esm/components/Select/modules/SelectIconButton/index.d.ts +3 -0
- package/__inner__/esm/components/Select/modules/SelectIconButton/index.js +3 -0
- package/__inner__/esm/components/Select/modules/SelectIconButton/types.d.ts +7 -0
- package/__inner__/esm/components/Select/modules/SelectIconButton/types.js +1 -0
- package/__inner__/esm/components/Select/modules/index.d.ts +1 -0
- package/__inner__/esm/components/Select/modules/index.js +1 -0
- package/package.json +4 -4
package/__inner__/esm/components/DialogNext/modules/DialogIllustration/DialogIllustration.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DialogIllustrationBaseProps } from './types';
|
|
2
|
+
export declare const cnDialogIllustration: import("@bem-react/classname").ClassNameFormatter;
|
|
3
|
+
export declare const DialogIllustration: import("../../../../utils").PolymorphicComponentWithRef<DialogIllustrationBaseProps, "div", "as">;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { polymorphicComponentWithRef, cn } from '../../../../utils';
|
|
4
|
+
import { DIALOG_ILLUSTRATION_DEFAULT_TAG } from './constants';
|
|
5
|
+
export var cnDialogIllustration = cn('DialogNextIllustration');
|
|
6
|
+
export var DialogIllustration = polymorphicComponentWithRef(function (_a, ref) {
|
|
7
|
+
var children = _a.children, className = _a.className, _b = _a.as, Tag = _b === void 0 ? DIALOG_ILLUSTRATION_DEFAULT_TAG : _b, other = __rest(_a, ["children", "className", "as"]);
|
|
8
|
+
return (React.createElement(Tag, __assign({}, other, { ref: ref, className: cnDialogIllustration('', [className]) }), children));
|
|
9
|
+
});
|
|
10
|
+
DialogIllustration.displayName = 'DialogIllustration';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DIALOG_ILLUSTRATION_DEFAULT_TAG = "div";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var DIALOG_ILLUSTRATION_DEFAULT_TAG = 'div';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentRef, ElementType } from 'react';
|
|
2
|
+
import type { PolymorphicComponentPropsWithoutRef } from '../../../../utils';
|
|
3
|
+
import type { DIALOG_ILLUSTRATION_DEFAULT_TAG } from './constants';
|
|
4
|
+
export type DialogIllustrationRef<As extends ElementType = typeof DIALOG_ILLUSTRATION_DEFAULT_TAG> = ComponentRef<As>;
|
|
5
|
+
export type DialogIllustrationBaseProps = {
|
|
6
|
+
/** Идентификатор компонента для тестов */
|
|
7
|
+
'data-testid'?: string;
|
|
8
|
+
};
|
|
9
|
+
export type DialogIllustrationProps<As extends ElementType = typeof DIALOG_ILLUSTRATION_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<DialogIllustrationBaseProps, As>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import type { DialogDeviceType, DialogSizeVariantByDeviceType, DialogVariant } f
|
|
|
7
7
|
export type DialogRef = HTMLDivElement;
|
|
8
8
|
export type DialogRenderCloseButton = RenderContentTypeEmptyProps['content'];
|
|
9
9
|
export type DialogContentBottomSheetProps = Omit<DialogBottomSheetProps, 'hideCloseButton' | 'backdrop' | 'open' | 'size' | 'variant' | 'closeButton' | 'onClose' | 'className'>;
|
|
10
|
-
export type DialogContentModalProps = Omit<DialogModalProps, 'open' | 'onClose' | 'hideCloseButton' | 'className' | 'closeButton' | 'size' | 'variant'>;
|
|
10
|
+
export type DialogContentModalProps = Omit<DialogModalProps, 'open' | 'onClose' | 'hideCloseButton' | 'className' | 'closeButton' | 'size' | 'variant' | 'children'>;
|
|
11
11
|
export type DialogBaseProps = {
|
|
12
12
|
/** Если `true`, будет отображаться окно диалога */
|
|
13
13
|
open: boolean;
|
|
@@ -63,7 +63,7 @@ export var FilePicker = forwardRef(function (inProps, ref) {
|
|
|
63
63
|
React.createElement("input", __assign({ id: id, name: name, accept: accept, multiple: multiple, onBlur: handleBlur, required: required, disabled: disabled, autoFocus: autoFocus, onFocus: handleFocus, className: cnFilePicker('Input') }, inputProps, { type: "file", onChange: onChange, onKeyDown: onKeyDown, ref: useMultiRef([inputRef || (inputProps === null || inputProps === void 0 ? void 0 : inputProps.ref), inputInnerRef]) })),
|
|
64
64
|
hasFiles ? (React.createElement("span", { className: cnFilePicker('FileName') }, renderValue(fileList, disableTruncate))) : (React.createElement("span", { "aria-placeholder": placeholder, className: cnFilePicker('Placeholder') }, placeholder))),
|
|
65
65
|
React.createElement("div", { className: cnFilePicker('RenderRight') },
|
|
66
|
-
onClearProp && (React.createElement(IconButton, { size: size, tabIndex: -1, icon: CrossIcon, onClick: onClear, variant: "function", "aria-label": clearText, className: cnFilePicker('ClearButton', {
|
|
66
|
+
onClearProp && (React.createElement(IconButton, { size: size, tabIndex: -1, icon: CrossIcon, color: "tertiary", onClick: onClear, variant: "function", "aria-label": clearText, className: cnFilePicker('ClearButton', {
|
|
67
67
|
visibility: hasFiles,
|
|
68
68
|
}) })),
|
|
69
69
|
React.createElement(FieldIcon, { icon: renderRight })),
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
--color-content-action-secondary-pressed
|
|
91
91
|
);
|
|
92
92
|
--icon-button-bg-color-focus: var(--color-content-action-secondary-hover);
|
|
93
|
-
--icon-button-font-color: var(--color-content-
|
|
94
|
-
--icon-button-font-color-hover: var(--color-content-
|
|
95
|
-
--icon-button-font-color-active: var(--color-content-
|
|
96
|
-
--icon-button-font-color-focus: var(--color-content-
|
|
93
|
+
--icon-button-font-color: var(--color-content-primary-inverse);
|
|
94
|
+
--icon-button-font-color-hover: var(--color-content-primary-inverse);
|
|
95
|
+
--icon-button-font-color-active: var(--color-content-primary-inverse);
|
|
96
|
+
--icon-button-font-color-focus: var(--color-content-primary-inverse);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.IconButtonNext_variant_contained.IconButtonNext_color_tertiary {
|
|
@@ -125,17 +125,17 @@
|
|
|
125
125
|
--icon-button-bg-color-hover: var(--color-background-action-light-hover);
|
|
126
126
|
--icon-button-bg-color-active: var(--color-background-action-light-pressed);
|
|
127
127
|
--icon-button-bg-color-focus: var(--color-background-action-light-hover);
|
|
128
|
-
--icon-button-font-color: var(--color-content-action);
|
|
129
|
-
--icon-button-font-color-hover: var(--color-content-action);
|
|
130
|
-
--icon-button-font-color-active: var(--color-content-action);
|
|
131
|
-
--icon-button-font-color-focus: var(--color-content-action);
|
|
128
|
+
--icon-button-font-color: var(--color-content-action-dark);
|
|
129
|
+
--icon-button-font-color-hover: var(--color-content-action-dark);
|
|
130
|
+
--icon-button-font-color-active: var(--color-content-action-dark);
|
|
131
|
+
--icon-button-font-color-focus: var(--color-content-action-dark);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
.IconButtonNext_variant_contained-additional.IconButtonNext_color_secondary {
|
|
135
|
-
--icon-button-bg-color: var(--color-background-secondary);
|
|
136
|
-
--icon-button-bg-color-hover: var(--color-background-secondary-hover);
|
|
137
|
-
--icon-button-bg-color-active: var(--color-background-secondary-pressed);
|
|
138
|
-
--icon-button-bg-color-focus: var(--color-background-secondary-hover);
|
|
135
|
+
--icon-button-bg-color: var(--color-background-action-secondary-light);
|
|
136
|
+
--icon-button-bg-color-hover: var(--color-background-action-secondary-light-hover);
|
|
137
|
+
--icon-button-bg-color-active: var(--color-background-action-secondary-light-pressed);
|
|
138
|
+
--icon-button-bg-color-focus: var(--color-background-action-secondary-light-hover);
|
|
139
139
|
--icon-button-font-color: var(--color-content-primary);
|
|
140
140
|
--icon-button-font-color-hover: var(--color-content-primary);
|
|
141
141
|
--icon-button-font-color-active: var(--color-content-primary);
|
|
@@ -158,10 +158,10 @@
|
|
|
158
158
|
--icon-button-bg-color-hover: var(--color-background-error-light-hover);
|
|
159
159
|
--icon-button-bg-color-active: var(--color-background-error-light-pressed);
|
|
160
160
|
--icon-button-bg-color-focus: var(--color-background-error-light-hover);
|
|
161
|
-
--icon-button-font-color: var(--color-content-error);
|
|
162
|
-
--icon-button-font-color-hover: var(--color-content-error);
|
|
163
|
-
--icon-button-font-color-active: var(--color-content-error);
|
|
164
|
-
--icon-button-font-color-focus: var(--color-content-error);
|
|
161
|
+
--icon-button-font-color: var(--color-content-error-dark);
|
|
162
|
+
--icon-button-font-color-hover: var(--color-content-error-dark);
|
|
163
|
+
--icon-button-font-color-active: var(--color-content-error-dark);
|
|
164
|
+
--icon-button-font-color-focus: var(--color-content-error-dark);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
/** ghost */
|
|
@@ -179,9 +179,9 @@
|
|
|
179
179
|
|
|
180
180
|
.IconButtonNext_variant_ghost.IconButtonNext_color_secondary {
|
|
181
181
|
--icon-button-bg-color: transparent;
|
|
182
|
-
--icon-button-bg-color-hover: var(--color-background-secondary-
|
|
183
|
-
--icon-button-bg-color-active: var(--color-background-secondary-pressed);
|
|
184
|
-
--icon-button-bg-color-focus: var(--color-background-secondary-hover);
|
|
182
|
+
--icon-button-bg-color-hover: var(--color-background-action-secondary-light);
|
|
183
|
+
--icon-button-bg-color-active: var(--color-background-action-secondary-light-pressed);
|
|
184
|
+
--icon-button-bg-color-focus: var(--color-background-action-secondary-light-hover);
|
|
185
185
|
--icon-button-font-color: var(--color-content-primary);
|
|
186
186
|
--icon-button-font-color-hover: var(--color-content-primary);
|
|
187
187
|
--icon-button-font-color-active: var(--color-content-primary);
|
|
@@ -230,32 +230,28 @@
|
|
|
230
230
|
--icon-button-font-color: var(--color-content-action);
|
|
231
231
|
--icon-button-font-color-hover: var(--color-background-action-hover);
|
|
232
232
|
--icon-button-font-color-active: var(--color-background-action-pressed);
|
|
233
|
-
--icon-button-font-color-focus: var(--color-background-action-
|
|
233
|
+
--icon-button-font-color-focus: var(--color-background-action-hover);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
.IconButtonNext_variant_function.IconButtonNext_color_secondary {
|
|
237
237
|
--icon-button-font-color: var(--color-content-action-secondary);
|
|
238
238
|
--icon-button-font-color-hover: var(--color-content-action-secondary-hover);
|
|
239
|
-
--icon-button-font-color-active: var(
|
|
240
|
-
|
|
241
|
-
);
|
|
242
|
-
--icon-button-font-color-focus: var(
|
|
243
|
-
--color-content-action-secondary-pressed
|
|
244
|
-
);
|
|
239
|
+
--icon-button-font-color-active: var(--color-content-action-secondary-pressed);
|
|
240
|
+
--icon-button-font-color-focus: var(--color-content-action-secondary-hover);
|
|
245
241
|
}
|
|
246
242
|
|
|
247
243
|
.IconButtonNext_variant_function.IconButtonNext_color_tertiary {
|
|
248
244
|
--icon-button-font-color: var(--color-content-secondary);
|
|
249
|
-
--icon-button-font-color-hover: var(--color-content-
|
|
250
|
-
--icon-button-font-color-active: var(--color-content-
|
|
251
|
-
--icon-button-font-color-focus: var(--color-content-
|
|
245
|
+
--icon-button-font-color-hover: var(--color-content-primary);
|
|
246
|
+
--icon-button-font-color-active: var(--color-content-primary);
|
|
247
|
+
--icon-button-font-color-focus: var(--color-content-primary);
|
|
252
248
|
}
|
|
253
249
|
|
|
254
250
|
.IconButtonNext_variant_function.IconButtonNext_color_error {
|
|
255
251
|
--icon-button-font-color: var(--color-content-error);
|
|
256
252
|
--icon-button-font-color-hover: var(--color-content-error-hover);
|
|
257
253
|
--icon-button-font-color-active: var(--color-content-error-pressed);
|
|
258
|
-
--icon-button-font-color-focus: var(--color-content-error-
|
|
254
|
+
--icon-button-font-color-focus: var(--color-content-error-hover);
|
|
259
255
|
}
|
|
260
256
|
|
|
261
257
|
/** floating */
|
|
@@ -62,7 +62,7 @@ import type { RadioGroupProps as RadioGroupNextProps } from '../../../../RadioGr
|
|
|
62
62
|
import type { RadioProps as RadioNextProps } from '../../../../RadioNext';
|
|
63
63
|
import type { SectionMessageProps } from '../../../../SectionMessage';
|
|
64
64
|
import type { SegmentProps } from '../../../../Segment';
|
|
65
|
-
import type { SelectProps } from '../../../../Select';
|
|
65
|
+
import type { SelectIconButtonProps, SelectProps } from '../../../../Select';
|
|
66
66
|
import type { SliderProps } from '../../../../Slider';
|
|
67
67
|
import type { SnackbarProviderProps } from '../../../../Snackbar';
|
|
68
68
|
import type { StackProps } from '../../../../Stack';
|
|
@@ -186,6 +186,7 @@ export type ThemeDefaultProps = {
|
|
|
186
186
|
SectionMessage?: Partial<SectionMessageProps>;
|
|
187
187
|
Segment?: Partial<SegmentProps>;
|
|
188
188
|
Select?: Partial<SelectProps>;
|
|
189
|
+
SelectIconButton?: Partial<SelectIconButtonProps>;
|
|
189
190
|
Slider?: Partial<SliderProps>;
|
|
190
191
|
SnackbarProvider?: Partial<SnackbarProviderProps>;
|
|
191
192
|
Stack?: Partial<StackProps>;
|
package/__inner__/esm/components/Select/components/SelectInputRenderRight/SelectInputRenderRight.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { __read } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { Fragment } from 'react';
|
|
3
3
|
import { classnames } from '@bem-react/classnames';
|
|
4
4
|
import { ChevronDownIcon, CrossIcon } from '@ozen-ui/icons';
|
|
5
|
+
import { isElement } from 'react-is';
|
|
6
|
+
import { isNodeWithDisplayName } from '../../../../utils';
|
|
5
7
|
import { useFieldControl } from '../../../FieldControl';
|
|
6
8
|
import { FieldIcon } from '../../../FieldIcon';
|
|
7
9
|
import { IconButton } from '../../../IconButtonNext';
|
|
8
10
|
import { cnSelect } from '../../classNames';
|
|
11
|
+
import { SELECT_ICON_BUTTON_DISPLAY_NAME } from '../../modules';
|
|
9
12
|
import { useSelectContext } from '../../SelectContext';
|
|
10
13
|
export var SelectInputRenderRight = function () {
|
|
11
14
|
var _a = __read(useFieldControl(), 1), _b = _a[0], focused = _b.focused, hovered = _b.hovered;
|
|
12
15
|
var _c = useSelectContext(), hasValue = _c.hasValue, open = _c.open, onClear = _c.onClear, renderRight = _c.renderRight, clearText = _c.clearText, renderRightLayout = _c.renderRightLayout, showClearButton = _c.showClearButton, size = _c.size;
|
|
13
16
|
var isVisibleClearButton = !!(hovered || open || focused) && hasValue;
|
|
14
|
-
var clearButton = (React.createElement(IconButton, { key: "clear", tabIndex: -1, size: size, variant: "function", icon: CrossIcon, title: clearText, "aria-label": clearText, onClick: function (event) {
|
|
17
|
+
var clearButton = (React.createElement(IconButton, { key: "clear", tabIndex: -1, size: size, variant: "function", icon: CrossIcon, color: "tertiary", title: clearText, "aria-label": clearText, onClick: function (event) {
|
|
15
18
|
event.preventDefault();
|
|
16
19
|
event.stopPropagation();
|
|
17
20
|
onClear === null || onClear === void 0 ? void 0 : onClear(event);
|
|
@@ -22,6 +25,11 @@ export var SelectInputRenderRight = function () {
|
|
|
22
25
|
showClearButton && !isVisibleClearButton && clearButton,
|
|
23
26
|
renderRightLayout.map(function (element) {
|
|
24
27
|
if (element === 'suffix') {
|
|
28
|
+
var isSelectIconButton = isElement(renderRight) &&
|
|
29
|
+
isNodeWithDisplayName(renderRight, SELECT_ICON_BUTTON_DISPLAY_NAME);
|
|
30
|
+
if (isSelectIconButton) {
|
|
31
|
+
return React.createElement(Fragment, { key: element }, renderRight);
|
|
32
|
+
}
|
|
25
33
|
return (React.createElement(FieldIcon, { key: element, icon: renderRight, className: classnames(cnSelect('RenderRight', { nonInteractive: true }), cnSelect('Suffix')) }));
|
|
26
34
|
}
|
|
27
35
|
if (element === 'clear') {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { DataListOption as Option } from '../DataList';
|
|
2
2
|
export { ListItemText as OptionItemText, ListItemIcon as OptionItemIcon, } from '../List';
|
|
3
3
|
export * from './entities';
|
|
4
|
+
export * from './modules';
|
|
4
5
|
export * from './constants';
|
|
5
6
|
export * from './classNames';
|
|
6
7
|
export * from './Select';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { DataListOption as Option } from '../DataList';
|
|
2
2
|
export { ListItemText as OptionItemText, ListItemIcon as OptionItemIcon, } from '../List';
|
|
3
3
|
export * from './entities';
|
|
4
|
+
export * from './modules';
|
|
4
5
|
export * from './constants';
|
|
5
6
|
export * from './classNames';
|
|
6
7
|
export * from './Select';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SelectIconButtonBaseProps } from './types';
|
|
2
|
+
export declare const cnSelectIconButton: import("@bem-react/classname").ClassNameFormatter;
|
|
3
|
+
export declare const SelectIconButton: import("../../../../utils").PolymorphicComponentWithRef<SelectIconButtonBaseProps, "button", "as">;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useThemeProps } from '../../../../hooks/useThemeProps';
|
|
4
|
+
import { cn, polymorphicComponentWithRef } from '../../../../utils';
|
|
5
|
+
import { IconButton } from '../../../IconButtonNext';
|
|
6
|
+
import { cnSelect } from '../../classNames';
|
|
7
|
+
import { useSelectContext } from '../../SelectContext';
|
|
8
|
+
import { SELECT_ICON_BUTTON_DEFAULT_TAG, SELECT_ICON_BUTTON_DEFAULT_TAB_INDEX, SELECT_ICON_BUTTON_DISPLAY_NAME, } from './constants';
|
|
9
|
+
export var cnSelectIconButton = cn('SelectIconButton');
|
|
10
|
+
export var SelectIconButton = polymorphicComponentWithRef(function (inProps, ref) {
|
|
11
|
+
var props = useThemeProps({
|
|
12
|
+
props: inProps,
|
|
13
|
+
name: 'SelectIconButton',
|
|
14
|
+
});
|
|
15
|
+
var icon = props.icon, onClick = props.onClick, className = props.className, _a = props.as, as = _a === void 0 ? SELECT_ICON_BUTTON_DEFAULT_TAG : _a, _b = props.tabIndex, tabIndex = _b === void 0 ? SELECT_ICON_BUTTON_DEFAULT_TAB_INDEX : _b, other = __rest(props, ["icon", "onClick", "className", "as", "tabIndex"]);
|
|
16
|
+
var size = useSelectContext().size;
|
|
17
|
+
return (React.createElement(IconButton, __assign({}, other, { ref: ref, as: as, tabIndex: tabIndex, size: size, variant: "function", icon: icon, color: "tertiary", onClick: function (event) {
|
|
18
|
+
event.preventDefault();
|
|
19
|
+
event.stopPropagation();
|
|
20
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
21
|
+
}, compressed: true, className: cnSelectIconButton('', [cnSelect('Suffix'), className]) })));
|
|
22
|
+
});
|
|
23
|
+
SelectIconButton.displayName = SELECT_ICON_BUTTON_DISPLAY_NAME;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentRef, ElementType } from 'react';
|
|
2
|
+
import type { PolymorphicComponentPropsWithoutRef } from '../../../../utils';
|
|
3
|
+
import type { IconButtonBaseProps } from '../../../IconButtonNext';
|
|
4
|
+
import type { SELECT_ICON_BUTTON_DEFAULT_TAG } from './constants';
|
|
5
|
+
export type SelectIconButtonBaseProps = Omit<IconButtonBaseProps, 'size' | 'color' | 'variant' | 'compressed'>;
|
|
6
|
+
export type SelectIconButtonProps<As extends ElementType = typeof SELECT_ICON_BUTTON_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<SelectIconButtonBaseProps, As>;
|
|
7
|
+
export type SelectIconButtonRef<As extends ElementType = typeof SELECT_ICON_BUTTON_DEFAULT_TAG> = ComponentRef<As>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SelectIconButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SelectIconButton';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ozen-ui/kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.0",
|
|
4
4
|
"description": "React component library",
|
|
5
5
|
"files": [
|
|
6
6
|
"*"
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"react-transition-group": "^4.4.5",
|
|
31
31
|
"tslib": "^2.6.3",
|
|
32
32
|
"framer-motion": "^12.23.12",
|
|
33
|
-
"@ozen-ui/fonts": "0.
|
|
34
|
-
"@ozen-ui/icons": "0.
|
|
35
|
-
"@ozen-ui/logger": "0.
|
|
33
|
+
"@ozen-ui/fonts": "0.80.0",
|
|
34
|
+
"@ozen-ui/icons": "0.80.0",
|
|
35
|
+
"@ozen-ui/logger": "0.80.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/lodash.isequal": "^4.5.0"
|