@mrktg-common/internal-ui 1.9.0 → 1.10.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/dist/Combobox.d.ts +35 -0
- package/dist/Combobox.js +148 -0
- package/dist/Field.d.ts +6 -3
- package/dist/Field.js +7 -7
- package/dist/components.css +10 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/tokens/tokens.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type TControlSize } from './Field.tsx';
|
|
3
|
+
export type TComboboxOption = {
|
|
4
|
+
value: string;
|
|
5
|
+
/** Серым справа: язык, количество. */
|
|
6
|
+
trailing?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export interface IComboboxProps {
|
|
9
|
+
id?: string;
|
|
10
|
+
value: string;
|
|
11
|
+
/** Любой набранный текст: список подсказывает, а не ограничивает. */
|
|
12
|
+
onChange: (text: string) => void;
|
|
13
|
+
options: TComboboxOption[];
|
|
14
|
+
/** Список ещё грузится: вместо строк — спиннер, набирать можно. */
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
/** Список не загрузился: поле работает как обычное, кнопки списка нет. */
|
|
17
|
+
failed?: boolean;
|
|
18
|
+
size?: TControlSize;
|
|
19
|
+
mono?: boolean;
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Что сказать, когда ничего не подошло. */
|
|
24
|
+
emptyText?: (query: string) => ReactNode;
|
|
25
|
+
/** Значение окончательное: уход из поля, Enter или выбор строки. Здесь его проверяют, а не на каждый символ. */
|
|
26
|
+
onCommit?: (value: string) => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
'aria-label'?: string;
|
|
29
|
+
'aria-describedby'?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Поле с подсказками из списка; набранное значение сохраняется, даже если его в списке нет.
|
|
33
|
+
* Для закрытого списка — SelectMenu. Список в портале, position fixed над модалками.
|
|
34
|
+
*/
|
|
35
|
+
export declare function Combobox({ id, value, onChange, options, loading, failed, size, mono, invalid, placeholder, disabled, emptyText, onCommit, className, ...aria }: IComboboxProps): import("react").JSX.Element;
|
package/dist/Combobox.js
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useLayoutEffect, useRef, useState } from 'react';
|
|
4
|
+
import { Check, ChevronDown } from 'lucide-react';
|
|
5
|
+
import { controlClass } from './Field.js';
|
|
6
|
+
import { FixedPortal } from './portal.js';
|
|
7
|
+
import { Spinner } from './Spinner.js';
|
|
8
|
+
import { cx } from './cx.js';
|
|
9
|
+
const GAP = 4;
|
|
10
|
+
const EDGE = 12;
|
|
11
|
+
const defaultEmptyText = (query) => `No options match “${query}”`;
|
|
12
|
+
/**
|
|
13
|
+
* Поле с подсказками из списка; набранное значение сохраняется, даже если его в списке нет.
|
|
14
|
+
* Для закрытого списка — SelectMenu. Список в портале, position fixed над модалками.
|
|
15
|
+
*/
|
|
16
|
+
export function Combobox({ id, value, onChange, options, loading = false, failed = false, size = 'md', mono, invalid, placeholder, disabled, emptyText = defaultEmptyText, onCommit, className, ...aria }) {
|
|
17
|
+
const [open, setOpen] = useState(false);
|
|
18
|
+
// Кнопка открывает весь список, ввод — отфильтрованный
|
|
19
|
+
const [filtering, setFiltering] = useState(false);
|
|
20
|
+
const [active, setActive] = useState(0);
|
|
21
|
+
const [listStyle, setListStyle] = useState({ visibility: 'hidden' });
|
|
22
|
+
const rootRef = useRef(null);
|
|
23
|
+
const inputRef = useRef(null);
|
|
24
|
+
const listRef = useRef(null);
|
|
25
|
+
// Выбор строки и следующий за ним blur не должны проверять одно значение дважды
|
|
26
|
+
const committed = useRef(null);
|
|
27
|
+
const listId = useId();
|
|
28
|
+
const query = value.trim();
|
|
29
|
+
const normalized = query.toLowerCase();
|
|
30
|
+
const shown = filtering && normalized !== '' ? options.filter((option) => option.value.toLowerCase().includes(normalized)) : options;
|
|
31
|
+
const visible = open && !failed;
|
|
32
|
+
const optionId = (index) => `${listId}-${index}`;
|
|
33
|
+
useLayoutEffect(() => {
|
|
34
|
+
if (!visible)
|
|
35
|
+
return;
|
|
36
|
+
const place = () => {
|
|
37
|
+
const field = rootRef.current?.getBoundingClientRect();
|
|
38
|
+
const list = listRef.current?.getBoundingClientRect();
|
|
39
|
+
if (field === undefined || list === undefined)
|
|
40
|
+
return;
|
|
41
|
+
const below = field.bottom + GAP;
|
|
42
|
+
const fitsBelow = below + list.height <= window.innerHeight - EDGE;
|
|
43
|
+
setListStyle({
|
|
44
|
+
position: 'fixed',
|
|
45
|
+
zIndex: 'calc(var(--z-modal) + 1)',
|
|
46
|
+
top: fitsBelow ? below : Math.max(EDGE, field.top - GAP - list.height),
|
|
47
|
+
left: field.left,
|
|
48
|
+
width: field.width,
|
|
49
|
+
minWidth: 0,
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
place();
|
|
53
|
+
window.addEventListener('resize', place);
|
|
54
|
+
window.addEventListener('scroll', place, true);
|
|
55
|
+
return () => {
|
|
56
|
+
window.removeEventListener('resize', place);
|
|
57
|
+
window.removeEventListener('scroll', place, true);
|
|
58
|
+
};
|
|
59
|
+
}, [visible, shown.length, loading]);
|
|
60
|
+
useLayoutEffect(() => {
|
|
61
|
+
if (!visible)
|
|
62
|
+
return;
|
|
63
|
+
// В jsdom прокрутки нет: тесты потребителей не должны падать на ней
|
|
64
|
+
document.getElementById(optionId(active))?.scrollIntoView?.({ block: 'nearest' });
|
|
65
|
+
});
|
|
66
|
+
const show = ({ filter }) => {
|
|
67
|
+
if (failed)
|
|
68
|
+
return;
|
|
69
|
+
if (!open)
|
|
70
|
+
setListStyle({ visibility: 'hidden' });
|
|
71
|
+
setFiltering(filter);
|
|
72
|
+
const current = options.findIndex((option) => option.value === value);
|
|
73
|
+
setActive(filter ? 0 : Math.max(0, current));
|
|
74
|
+
setOpen(true);
|
|
75
|
+
};
|
|
76
|
+
const commit = (next) => {
|
|
77
|
+
if (committed.current === next)
|
|
78
|
+
return;
|
|
79
|
+
committed.current = next;
|
|
80
|
+
onCommit?.(next);
|
|
81
|
+
};
|
|
82
|
+
const pick = (option) => {
|
|
83
|
+
onChange(option.value);
|
|
84
|
+
setOpen(false);
|
|
85
|
+
commit(option.value);
|
|
86
|
+
};
|
|
87
|
+
const handleKeyDown = (event) => {
|
|
88
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
89
|
+
event.preventDefault();
|
|
90
|
+
if (!visible) {
|
|
91
|
+
show({ filter: false });
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (shown.length === 0)
|
|
95
|
+
return;
|
|
96
|
+
const step = event.key === 'ArrowDown' ? 1 : -1;
|
|
97
|
+
setActive((current) => (current + step + shown.length) % shown.length);
|
|
98
|
+
}
|
|
99
|
+
else if (event.key === 'Enter') {
|
|
100
|
+
const option = visible && !loading ? shown[active] : undefined;
|
|
101
|
+
if (visible)
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
if (option === undefined) {
|
|
104
|
+
setOpen(false);
|
|
105
|
+
commit(value);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
pick(option);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
else if (event.key === 'Escape' && visible) {
|
|
112
|
+
// Иначе Esc закроет и модалку, в которой стоит поле
|
|
113
|
+
event.stopPropagation();
|
|
114
|
+
setOpen(false);
|
|
115
|
+
}
|
|
116
|
+
else if (event.key === 'Tab') {
|
|
117
|
+
setOpen(false);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const activeOption = visible && !loading && shown[active] !== undefined ? optionId(active) : undefined;
|
|
121
|
+
return (_jsxs("div", { className: cx('combo', className), ref: rootRef, children: [_jsx("input", { ref: inputRef, id: id, type: "text", className: controlClass({ size, invalid, mono }), role: "combobox", "aria-autocomplete": "list", "aria-expanded": visible, "aria-controls": visible ? listId : undefined, "aria-activedescendant": activeOption, "aria-invalid": invalid || undefined, autoComplete: "off", value: value, placeholder: placeholder, disabled: disabled, onChange: (event) => {
|
|
122
|
+
committed.current = null;
|
|
123
|
+
onChange(event.target.value);
|
|
124
|
+
show({ filter: true });
|
|
125
|
+
}, onKeyDown: handleKeyDown, onBlur: () => {
|
|
126
|
+
setOpen(false);
|
|
127
|
+
commit(value);
|
|
128
|
+
}, ...aria }), !failed && (_jsx("button", { type: "button", className: "btn btn-ghost btn-sm btn-icon combo-btn", tabIndex: -1, "aria-label": "Show suggestions", disabled: disabled,
|
|
129
|
+
// Фокус остаётся в поле: иначе blur проверил бы значение раньше выбора
|
|
130
|
+
onMouseDown: (event) => event.preventDefault(), onClick: () => {
|
|
131
|
+
inputRef.current?.focus();
|
|
132
|
+
if (visible)
|
|
133
|
+
setOpen(false);
|
|
134
|
+
else
|
|
135
|
+
show({ filter: false });
|
|
136
|
+
}, children: _jsx(ChevronDown, { className: "ic", "aria-hidden": true }) })), visible && (_jsx(FixedPortal, { children: _jsx("div", { ref: listRef, className: "pop pop-scroll", style: listStyle, role: "listbox", id: listId, "aria-labelledby": id, children: loading ? (_jsx("div", { className: "menu-empty", role: "status", children: _jsxs("span", { className: "row", style: { justifyContent: 'center' }, children: [_jsx(Spinner, { size: "sm" }), "Loading\u2026"] }) })) : shown.length === 0 ? (_jsxs("div", { className: "menu-empty", children: [_jsx("span", { className: "strong", children: emptyText(query) }), _jsx("span", { className: "hint", children: "You can keep it as typed." })] })) : (shown.map((option, index) => {
|
|
137
|
+
const isCurrent = option.value === value;
|
|
138
|
+
return (_jsxs("div", { id: optionId(index), role: "option", "aria-selected": isCurrent, className: cx('menu-item', index === active && 'is-hover'), onMouseDown: (event) => event.preventDefault(), onMouseEnter: () => setActive(index), onClick: () => pick(option), children: [_jsx("span", { className: "trunc", children: filtering ? _jsx(Highlight, { text: option.value, query: query }) : option.value }), option.trailing !== undefined && _jsx("span", { className: "trail", children: option.trailing }), isCurrent && _jsx(Check, { className: "ic check", "aria-hidden": true })] }, option.value));
|
|
139
|
+
})) }) }))] }));
|
|
140
|
+
}
|
|
141
|
+
/** Набранная часть строки — жирным. */
|
|
142
|
+
function Highlight({ text, query }) {
|
|
143
|
+
const start = query === '' ? -1 : text.toLowerCase().indexOf(query.toLowerCase());
|
|
144
|
+
if (start === -1)
|
|
145
|
+
return text;
|
|
146
|
+
const end = start + query.length;
|
|
147
|
+
return (_jsxs(_Fragment, { children: [text.slice(0, start), _jsx("mark", { children: text.slice(start, end) }), text.slice(end)] }));
|
|
148
|
+
}
|
package/dist/Field.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export interface IFieldProps {
|
|
|
14
14
|
hint?: ReactNode;
|
|
15
15
|
/** Ошибка под полем с circle-x; заменяет подсказку. */
|
|
16
16
|
error?: ReactNode;
|
|
17
|
+
/** Значение допустимо, но, скорее всего, неверно: строка с triangle-alert, поле не помечается ошибкой. */
|
|
18
|
+
warning?: ReactNode;
|
|
17
19
|
/** Проверка пройдена: нейтральная строка с галочкой. */
|
|
18
20
|
ok?: ReactNode;
|
|
19
21
|
required?: boolean;
|
|
@@ -26,8 +28,8 @@ export interface IFieldProps {
|
|
|
26
28
|
describedBy: string | undefined;
|
|
27
29
|
}) => ReactNode);
|
|
28
30
|
}
|
|
29
|
-
/** Подпись, контрол и одна строка под ним:
|
|
30
|
-
export declare function Field({ label, htmlFor, hint, error, ok, required, optional, aside, className, children }: IFieldProps): import("react").JSX.Element;
|
|
31
|
+
/** Подпись, контрол и одна строка под ним: ошибка, предупреждение, пройденная проверка или подсказка — в этом порядке. */
|
|
32
|
+
export declare function Field({ label, htmlFor, hint, error, warning, ok, required, optional, aside, className, children }: IFieldProps): import("react").JSX.Element;
|
|
31
33
|
export type TInputProps = Omit<ComponentProps<'input'>, 'size'> & IControlStyle;
|
|
32
34
|
export declare function Input({ size, invalid, mono, className, type, ...rest }: TInputProps): import("react").JSX.Element;
|
|
33
35
|
export type TTextareaProps = ComponentProps<'textarea'> & IControlStyle;
|
|
@@ -37,13 +39,14 @@ export interface ITextFieldProps extends Omit<TInputProps, 'id'> {
|
|
|
37
39
|
id?: string;
|
|
38
40
|
hint?: ReactNode;
|
|
39
41
|
error?: ReactNode;
|
|
42
|
+
warning?: ReactNode;
|
|
40
43
|
ok?: ReactNode;
|
|
41
44
|
optional?: boolean;
|
|
42
45
|
aside?: ReactNode;
|
|
43
46
|
fieldClassName?: string;
|
|
44
47
|
}
|
|
45
48
|
/** Поле целиком: подпись, input и строка под ним, связанные id и aria-describedby. */
|
|
46
|
-
export declare function TextField({ label, id, hint, error, ok, optional, aside, required, fieldClassName, ...input }: ITextFieldProps): import("react").JSX.Element;
|
|
49
|
+
export declare function TextField({ label, id, hint, error, warning, ok, optional, aside, required, fieldClassName, ...input }: ITextFieldProps): import("react").JSX.Element;
|
|
47
50
|
export interface ICheckboxProps extends Omit<ComponentProps<'input'>, 'type'> {
|
|
48
51
|
label?: ReactNode;
|
|
49
52
|
hint?: ReactNode;
|
package/dist/Field.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useId } from 'react';
|
|
4
|
-
import { CircleCheck, CircleX } from 'lucide-react';
|
|
4
|
+
import { CircleCheck, CircleX, TriangleAlert } from 'lucide-react';
|
|
5
5
|
import { cx } from './cx.js';
|
|
6
6
|
/** Классы поля ввода для своих контролов продукта. */
|
|
7
7
|
export function controlClass({ size = 'md', invalid, mono } = {}, className) {
|
|
8
8
|
return cx('control', size === 'sm' && 'control-sm', mono && 'mono', invalid && 'invalid', className);
|
|
9
9
|
}
|
|
10
|
-
/** Подпись, контрол и одна строка под ним:
|
|
11
|
-
export function Field({ label, htmlFor, hint, error, ok, required, optional, aside, className, children }) {
|
|
10
|
+
/** Подпись, контрол и одна строка под ним: ошибка, предупреждение, пройденная проверка или подсказка — в этом порядке. */
|
|
11
|
+
export function Field({ label, htmlFor, hint, error, warning, ok, required, optional, aside, className, children }) {
|
|
12
12
|
const autoId = useId();
|
|
13
13
|
const id = htmlFor ?? autoId;
|
|
14
14
|
const noteId = `${id}-note`;
|
|
15
|
-
const hasNote = Boolean(error
|
|
15
|
+
const hasNote = Boolean(error || warning || ok || hint);
|
|
16
16
|
const describedBy = hasNote ? noteId : undefined;
|
|
17
17
|
const labelNode = label !== undefined && (_jsxs("label", { className: "label", htmlFor: id, children: [label, required && _jsx("span", { className: "required", "aria-hidden": true, children: "*" }), optional && _jsx("span", { className: "opt", children: " optional" })] }));
|
|
18
|
-
return (_jsxs("div", { className: cx('field', className), children: [aside === undefined ? labelNode : (_jsxs("div", { className: "label-row", children: [labelNode, aside] })), typeof children === 'function' ? children({ id, describedBy }) : children, error ? (_jsxs("span", { className: "err", id: noteId, children: [_jsx(CircleX, { className: "ic ic-sm", "aria-hidden": true }), error] })) : ok ? (_jsxs("span", { className: "ok", id: noteId, children: [_jsx(CircleCheck, { className: "ic ic-sm", "aria-hidden": true }), ok] })) : hint ? (_jsx("span", { className: "hint", id: noteId, children: hint })) : null] }));
|
|
18
|
+
return (_jsxs("div", { className: cx('field', className), children: [aside === undefined ? labelNode : (_jsxs("div", { className: "label-row", children: [labelNode, aside] })), typeof children === 'function' ? children({ id, describedBy }) : children, error ? (_jsxs("span", { className: "err", id: noteId, children: [_jsx(CircleX, { className: "ic ic-sm", "aria-hidden": true }), error] })) : warning ? (_jsxs("span", { className: "warn", id: noteId, children: [_jsx(TriangleAlert, { className: "ic ic-sm", "aria-hidden": true }), warning] })) : ok ? (_jsxs("span", { className: "ok", id: noteId, children: [_jsx(CircleCheck, { className: "ic ic-sm", "aria-hidden": true }), ok] })) : hint ? (_jsx("span", { className: "hint", id: noteId, children: hint })) : null] }));
|
|
19
19
|
}
|
|
20
20
|
export function Input({ size, invalid, mono, className, type = 'text', ...rest }) {
|
|
21
21
|
return _jsx("input", { type: type, className: controlClass({ size, invalid, mono }, className), "aria-invalid": invalid || undefined, ...rest });
|
|
@@ -24,8 +24,8 @@ export function Textarea({ size, invalid, mono, className, ...rest }) {
|
|
|
24
24
|
return _jsx("textarea", { className: controlClass({ size, invalid, mono }, cx('textarea', className)), "aria-invalid": invalid || undefined, ...rest });
|
|
25
25
|
}
|
|
26
26
|
/** Поле целиком: подпись, input и строка под ним, связанные id и aria-describedby. */
|
|
27
|
-
export function TextField({ label, id, hint, error, ok, optional, aside, required, fieldClassName, ...input }) {
|
|
28
|
-
return (_jsx(Field, { label: label, htmlFor: id, hint: hint, error: error, ok: ok, required: required, optional: optional, aside: aside, className: fieldClassName, children: ({ id: controlId, describedBy }) => (_jsx(Input, { id: controlId, required: required, invalid: Boolean(error) || input.invalid, "aria-describedby": describedBy, ...input })) }));
|
|
27
|
+
export function TextField({ label, id, hint, error, warning, ok, optional, aside, required, fieldClassName, ...input }) {
|
|
28
|
+
return (_jsx(Field, { label: label, htmlFor: id, hint: hint, error: error, warning: warning, ok: ok, required: required, optional: optional, aside: aside, className: fieldClassName, children: ({ id: controlId, describedBy }) => (_jsx(Input, { id: controlId, required: required, invalid: Boolean(error) || input.invalid, "aria-describedby": describedBy, ...input })) }));
|
|
29
29
|
}
|
|
30
30
|
/** Галочка, применяемая вместе с формой; вся строка — область нажатия. Для мгновенной настройки — Switch. */
|
|
31
31
|
export function Checkbox({ label, hint, className, onChange, onClick, ...rest }) {
|
package/dist/components.css
CHANGED
|
@@ -154,7 +154,9 @@
|
|
|
154
154
|
.required { color: var(--danger-text); margin-left: 2px; }
|
|
155
155
|
.hint { font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--text-muted); }
|
|
156
156
|
.err { display: flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); color: var(--danger-text); }
|
|
157
|
-
.err > .ic, .ok > .ic { align-self: flex-start; margin-top: 2px; }
|
|
157
|
+
.err > .ic, .ok > .ic, .warn > .ic { align-self: flex-start; margin-top: 2px; }
|
|
158
|
+
/* Warning under a field: the value is allowed but probably wrong. The control keeps its border; only invalid blocks. */
|
|
159
|
+
.warn { display: flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); color: var(--warning-text); }
|
|
158
160
|
/* Positive check under a field: neutral, green is kept for Live. */
|
|
159
161
|
.ok { display: flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); color: var(--text-muted); }
|
|
160
162
|
.control { width: 100%; min-height: var(--control-height-md); padding: 0 var(--space-3); border: 1px solid var(--border-strong);
|
|
@@ -236,6 +238,13 @@
|
|
|
236
238
|
.menu-hint { padding: 0 var(--space-2) var(--space-2) calc(var(--space-2) + 16px + var(--space-2)); margin-top: -4px; font-size: var(--text-sm); color: var(--text-muted); }
|
|
237
239
|
.menu-search { padding: 4px 4px 6px; }
|
|
238
240
|
.menu-empty { display: flex; flex-direction: column; gap: 4px; padding: var(--space-3) var(--space-2); text-align: center; }
|
|
241
|
+
/* Combobox: a text field with suggestions; any typed value is kept. */
|
|
242
|
+
.combo { position: relative; display: block; min-width: 0; }
|
|
243
|
+
.combo > .control { padding-right: calc(var(--control-height-sm) + var(--space-1)); }
|
|
244
|
+
.combo > .combo-btn { position: absolute; top: 50%; right: 3px; transform: translateY(-50%); color: var(--text-muted); }
|
|
245
|
+
.combo > .control-sm + .combo-btn { right: 1px; width: 24px; height: 24px; }
|
|
246
|
+
.combo > .pop { left: 0; right: 0; min-width: 0; }
|
|
247
|
+
.menu-item mark { background: none; color: inherit; font-weight: 600; }
|
|
239
248
|
.menu-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-1) var(--space-1); border-top: 1px solid var(--border); margin-top: var(--space-1); }
|
|
240
249
|
|
|
241
250
|
/* ---------- Badge ---------- */
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export { Menu, MenuItem, MenuSeparator, MenuLabel, moveMenuFocus } from './Menu.
|
|
|
27
27
|
export type { IMenuProps, IMenuItemProps } from './Menu.tsx';
|
|
28
28
|
export { SelectMenu } from './SelectMenu.tsx';
|
|
29
29
|
export type { ISelectMenuProps, TSelectMenuItem, TSelectMenuGroup } from './SelectMenu.tsx';
|
|
30
|
+
export { Combobox } from './Combobox.tsx';
|
|
31
|
+
export type { IComboboxProps, TComboboxOption } from './Combobox.tsx';
|
|
30
32
|
export { MultiSelectMenu } from './MultiSelectMenu.tsx';
|
|
31
33
|
export type { IMultiSelectMenuProps, TMultiSelectOption, TMultiSelectGroup } from './MultiSelectMenu.tsx';
|
|
32
34
|
export { Badge, StatusBadge } from './Badge.tsx';
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ export { Segmented } from './Segmented.js';
|
|
|
15
15
|
export { Popover, MENU_ITEMS } from './Popover.js';
|
|
16
16
|
export { Menu, MenuItem, MenuSeparator, MenuLabel, moveMenuFocus } from './Menu.js';
|
|
17
17
|
export { SelectMenu } from './SelectMenu.js';
|
|
18
|
+
export { Combobox } from './Combobox.js';
|
|
18
19
|
export { MultiSelectMenu } from './MultiSelectMenu.js';
|
|
19
20
|
export { Badge, StatusBadge } from './Badge.js';
|
|
20
21
|
export { EnvPill, EnvChip } from './EnvTag.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrktg-common/internal-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Общий интерфейс внутренних инструментов маркетинга (Landings Admin, LP Constructor): токены, классы компонентов и тонкие React-обёртки над ними.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|