haze-ui 1.31.0 → 1.32.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/README.md +32 -0
- package/dist/components/Button/Button.js +33 -15
- package/dist/components/Button/ButtonLink.js +12 -21
- package/dist/components/Button/styles.js +2 -2
- package/dist/components/Cascader/Cascader.js +11 -11
- package/dist/components/ColorPicker/ColorPicker.js +4 -4
- package/dist/components/Combobox/Combobox.js +128 -119
- package/dist/components/Command/Command.js +9 -9
- package/dist/components/ConfigProvider/ConfigContext.js +16 -0
- package/dist/components/ConfirmDialog/confirm.js +41 -0
- package/dist/components/ConfirmDialog/index.js +2 -1
- package/dist/components/DataTable/DataTable.js +24 -24
- package/dist/components/DateTimePicker/DateTimePicker.js +25 -0
- package/dist/components/DateTimePicker/index.js +3 -0
- package/dist/components/Datepicker/Datepicker.js +8 -7
- package/dist/components/Datepicker/DatepickerCore.js +60 -59
- package/dist/components/Drawer/Drawer.js +45 -40
- package/dist/components/Fieldset/Fieldset.js +25 -0
- package/dist/components/Fieldset/index.js +2 -0
- package/dist/components/Highlight/Highlight.js +19 -0
- package/dist/components/Highlight/index.js +2 -0
- package/dist/components/Indicator/Indicator.js +37 -0
- package/dist/components/Indicator/index.js +2 -0
- package/dist/components/InlineCompletion/InlineCompletion.js +4 -4
- package/dist/components/Input/Input.js +9 -7
- package/dist/components/Input/InputCore.js +32 -13
- package/dist/components/LoadingOverlay/LoadingOverlay.js +30 -0
- package/dist/components/LoadingOverlay/index.js +3 -0
- package/dist/components/LocaleProvider/ar-sa.js +4 -0
- package/dist/components/LocaleProvider/de-de.js +4 -0
- package/dist/components/LocaleProvider/es-es.js +4 -0
- package/dist/components/LocaleProvider/fr-fr.js +4 -0
- package/dist/components/LocaleProvider/it-it.js +4 -0
- package/dist/components/LocaleProvider/ja-jp.js +4 -0
- package/dist/components/LocaleProvider/ko-kr.js +4 -0
- package/dist/components/LocaleProvider/locale.js +4 -0
- package/dist/components/LocaleProvider/pt-br.js +4 -0
- package/dist/components/LocaleProvider/ru-ru.js +4 -0
- package/dist/components/LocaleProvider/zh-cn.js +4 -0
- package/dist/components/Mark/Mark.js +20 -0
- package/dist/components/Mark/index.js +2 -0
- package/dist/components/Mentions/MentionsCore.js +3 -3
- package/dist/components/Menu/MenuItem.js +6 -4
- package/dist/components/NumberFormatter/NumberFormatter.js +16 -0
- package/dist/components/NumberFormatter/index.js +2 -0
- package/dist/components/OTPInput/OTPInputCore.js +6 -6
- package/dist/components/PasswordInput/PasswordInputCore.js +27 -26
- package/dist/components/Rating/RatingCore.js +18 -18
- package/dist/components/Select/Select.js +28 -23
- package/dist/components/Select/SelectCore.js +26 -23
- package/dist/components/Select/SelectFloating.js +157 -153
- package/dist/components/Spoiler/Spoiler.js +36 -0
- package/dist/components/Spoiler/index.js +3 -0
- package/dist/components/TagGroup/SortableTagGroup.js +32 -20
- package/dist/components/TagGroup/TagGroup.js +23 -9
- package/dist/components/TagGroup/TagGroupItem.js +21 -15
- package/dist/components/TagInput/TagInputCore.js +10 -10
- package/dist/components/TimePicker/TimePickerPanel.js +3 -3
- package/dist/components/Toast/ToastContainer.js +4 -4
- package/dist/components/TreeSelect/TreeSelect.js +6 -6
- package/dist/components/VisuallyHidden/VisuallyHidden.js +15 -0
- package/dist/components/VisuallyHidden/index.js +2 -0
- package/dist/css/accordion.css +2 -0
- package/dist/css/activity-rail.css +2 -0
- package/dist/css/affix.css +2 -0
- package/dist/css/alert.css +2 -0
- package/dist/css/anchor.css +2 -0
- package/dist/css/app-shell.css +2 -0
- package/dist/css/approval-card.css +2 -0
- package/dist/css/aspect-ratio.css +2 -0
- package/dist/css/async-section.css +2 -0
- package/dist/css/avatar-group.css +2 -0
- package/dist/css/avatar.css +2 -0
- package/dist/css/back-to-top.css +2 -0
- package/dist/css/badge.css +2 -0
- package/dist/css/banner.css +2 -0
- package/dist/css/bottom-sheet.css +2 -0
- package/dist/css/breadcrumb.css +2 -0
- package/dist/css/button.css +3 -2
- package/dist/css/calendar.css +2 -0
- package/dist/css/card.css +2 -0
- package/dist/css/carousel.css +2 -0
- package/dist/css/cascader.css +2 -0
- package/dist/css/chart.css +2 -0
- package/dist/css/chat-container.css +2 -0
- package/dist/css/chat-input.css +2 -0
- package/dist/css/chat-message.css +2 -0
- package/dist/css/checkbox.css +2 -0
- package/dist/css/chip.css +2 -0
- package/dist/css/code-block.css +2 -0
- package/dist/css/collapsible.css +2 -0
- package/dist/css/color-picker.css +2 -0
- package/dist/css/combobox.css +2 -0
- package/dist/css/command.css +2 -0
- package/dist/css/confirm-dialog.css +2 -0
- package/dist/css/container.css +2 -0
- package/dist/css/context-menu.css +2 -0
- package/dist/css/conversation-list.css +2 -0
- package/dist/css/count-up.css +2 -0
- package/dist/css/data-table.css +2 -0
- package/dist/css/date-range-picker.css +2 -0
- package/dist/css/datepicker.css +2 -0
- package/dist/css/descriptions.css +2 -0
- package/dist/css/dialog.css +2 -0
- package/dist/css/diff-viewer.css +2 -0
- package/dist/css/disclosure.css +2 -0
- package/dist/css/divider.css +2 -0
- package/dist/css/drawer.css +2 -0
- package/dist/css/dropdown-menu.css +2 -0
- package/dist/css/ellipsis.css +2 -0
- package/dist/css/empty.css +2 -0
- package/dist/css/fieldset.css +4 -0
- package/dist/css/file-input.css +2 -0
- package/dist/css/file-preview.css +2 -0
- package/dist/css/flex.css +2 -0
- package/dist/css/float-button.css +2 -0
- package/dist/css/form.css +2 -0
- package/dist/css/grid.css +2 -0
- package/dist/css/hover-card.css +2 -0
- package/dist/css/icon.css +2 -0
- package/dist/css/image.css +2 -0
- package/dist/css/indicator.css +4 -0
- package/dist/css/inline-completion.css +2 -0
- package/dist/css/inline-edit.css +2 -0
- package/dist/css/input.css +3 -1
- package/dist/css/json-view.css +2 -0
- package/dist/css/kbd.css +2 -0
- package/dist/css/list.css +2 -0
- package/dist/css/loading-overlay.css +4 -0
- package/dist/css/log-viewer.css +2 -0
- package/dist/css/mark.css +4 -0
- package/dist/css/markdown-renderer.css +2 -0
- package/dist/css/masonry.css +2 -0
- package/dist/css/mentions.css +2 -0
- package/dist/css/menu.css +3 -1
- package/dist/css/model-picker.css +2 -0
- package/dist/css/navigation-bar.css +2 -0
- package/dist/css/number-input.css +2 -0
- package/dist/css/otp-input.css +2 -0
- package/dist/css/pagination.css +2 -0
- package/dist/css/password-input.css +3 -1
- package/dist/css/popover.css +2 -0
- package/dist/css/progress.css +2 -0
- package/dist/css/prompt-input.css +2 -0
- package/dist/css/qr-code.css +2 -0
- package/dist/css/radio.css +2 -0
- package/dist/css/rating.css +2 -0
- package/dist/css/resizable.css +2 -0
- package/dist/css/result.css +2 -0
- package/dist/css/scroll-area.css +2 -0
- package/dist/css/segmented.css +2 -0
- package/dist/css/select.css +2 -0
- package/dist/css/sidebar.css +2 -0
- package/dist/css/signature.css +2 -0
- package/dist/css/skeleton.css +2 -0
- package/dist/css/slider.css +2 -0
- package/dist/css/sources.css +2 -0
- package/dist/css/sparkline.css +2 -0
- package/dist/css/spinner.css +2 -0
- package/dist/css/spoiler.css +4 -0
- package/dist/css/stat.css +2 -0
- package/dist/css/status-bar.css +2 -0
- package/dist/css/step-timeline.css +2 -0
- package/dist/css/stepper.css +2 -0
- package/dist/css/streaming-text.css +2 -0
- package/dist/css/swipe-action.css +2 -0
- package/dist/css/switch.css +2 -0
- package/dist/css/tab-bar.css +2 -0
- package/dist/css/table.css +2 -0
- package/dist/css/tabs.css +2 -0
- package/dist/css/tag-group.css +2 -0
- package/dist/css/tag-input.css +2 -0
- package/dist/css/tag.css +2 -0
- package/dist/css/textarea.css +2 -0
- package/dist/css/thinking-indicator.css +2 -0
- package/dist/css/time-picker.css +2 -0
- package/dist/css/timeline.css +2 -0
- package/dist/css/toast.css +2 -0
- package/dist/css/toggle.css +2 -0
- package/dist/css/token-counter.css +2 -0
- package/dist/css/tokens.css +2 -0
- package/dist/css/tool-call-card.css +2 -0
- package/dist/css/toolbar.css +2 -0
- package/dist/css/tooltip.css +2 -0
- package/dist/css/tour.css +2 -0
- package/dist/css/transfer.css +2 -0
- package/dist/css/tree-select.css +2 -0
- package/dist/css/tree.css +2 -0
- package/dist/css/typography.css +2 -0
- package/dist/css/upload.css +2 -0
- package/dist/css/virtual-list.css +2 -0
- package/dist/css/visually-hidden.css +4 -0
- package/dist/css/watermark.css +2 -0
- package/dist/css/workbench.css +2 -0
- package/dist/css-manifest.json +186 -1
- package/dist/haze-ui.css +405 -5
- package/dist/headless/index.js +18 -17
- package/dist/hooks/useBusyPressable.js +10 -0
- package/dist/index.js +112 -102
- package/dist/mcp-docs.json +498 -3
- package/dist/registry.json +142 -10
- package/dist/types/components/Button/Button.d.ts +50 -5
- package/dist/types/components/Button/ButtonLink.d.ts +27 -15
- package/dist/types/components/Button/styles.d.ts +34 -0
- package/dist/types/components/Combobox/Combobox.d.ts +20 -2
- package/dist/types/components/Combobox/index.d.ts +1 -1
- package/dist/types/components/ConfigProvider/ConfigContext.d.ts +20 -0
- package/dist/types/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/dist/types/components/ConfirmDialog/confirm.d.ts +33 -0
- package/dist/types/components/ConfirmDialog/index.d.ts +2 -0
- package/dist/types/components/DateTimePicker/DateTimePicker.d.ts +36 -0
- package/dist/types/components/DateTimePicker/index.d.ts +2 -0
- package/dist/types/components/Datepicker/Datepicker.d.ts +3 -3
- package/dist/types/components/Datepicker/DatepickerCore.d.ts +3 -3
- package/dist/types/components/Drawer/Drawer.d.ts +15 -2
- package/dist/types/components/Drawer/index.d.ts +1 -1
- package/dist/types/components/Fieldset/Fieldset.d.ts +16 -0
- package/dist/types/components/Fieldset/index.d.ts +2 -0
- package/dist/types/components/Highlight/Highlight.d.ts +27 -0
- package/dist/types/components/Highlight/index.d.ts +2 -0
- package/dist/types/components/Indicator/Indicator.d.ts +24 -0
- package/dist/types/components/Indicator/index.d.ts +2 -0
- package/dist/types/components/Input/Input.d.ts +8 -2
- package/dist/types/components/Input/InputCore.d.ts +11 -2
- package/dist/types/components/LoadingOverlay/LoadingOverlay.d.ts +25 -0
- package/dist/types/components/LoadingOverlay/index.d.ts +2 -0
- package/dist/types/components/LocaleProvider/locale.d.ts +4 -0
- package/dist/types/components/Mark/Mark.d.ts +12 -0
- package/dist/types/components/Mark/index.d.ts +2 -0
- package/dist/types/components/Menu/MenuItem.d.ts +15 -4
- package/dist/types/components/NumberFormatter/NumberFormatter.d.ts +23 -0
- package/dist/types/components/NumberFormatter/index.d.ts +2 -0
- package/dist/types/components/Select/Select.d.ts +23 -2
- package/dist/types/components/Select/SelectCore.d.ts +4 -1
- package/dist/types/components/Select/SelectFloating.d.ts +6 -1
- package/dist/types/components/Select/index.d.ts +1 -1
- package/dist/types/components/Spoiler/Spoiler.d.ts +20 -0
- package/dist/types/components/Spoiler/index.d.ts +2 -0
- package/dist/types/components/TagGroup/SortableTagGroup.d.ts +5 -1
- package/dist/types/components/TagGroup/TagGroup.d.ts +24 -2
- package/dist/types/components/TagGroup/index.d.ts +1 -1
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +4 -0
- package/dist/types/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/types/headless/index.d.ts +9 -0
- package/dist/types/hooks/index.d.ts +13 -0
- package/dist/types/hooks/useBusyPressable.d.ts +33 -0
- package/dist/types/hooks/useElementSize.d.ts +38 -0
- package/dist/types/hooks/useIdle.d.ts +45 -0
- package/dist/types/hooks/useMutationObserver.d.ts +35 -0
- package/dist/types/hooks/useNetwork.d.ts +31 -0
- package/dist/types/hooks/useOrientation.d.ts +23 -0
- package/dist/types/hooks/useResizeObserver.d.ts +48 -0
- package/dist/types/index.d.ts +24 -6
- package/package.json +5 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { classnames as e } from "../../utils/classnames.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useStrings as t } from "../LocaleProvider/useStrings.js";
|
|
5
|
+
import { mergeRefs as n } from "../../utils/refs.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { useEffect as r, useId as i, useRef as a, useState as o } from "react";
|
|
8
8
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
@@ -10,12 +10,12 @@ import { useControl as l } from "react-use-control";
|
|
|
10
10
|
//#region src/lib/components/InlineCompletion/InlineCompletion.tsx
|
|
11
11
|
var u = "haze-InlineCompletion__wrapper", d = "haze-InlineCompletion__host", f = "haze-InlineCompletion__ghost", p = "haze-InlineCompletion__ghostMultiline", m = "haze-InlineCompletion__ghostTyped", h = "haze-InlineCompletion__srOnly";
|
|
12
12
|
function g({ suggestion: g, value: _, onAccept: v, onDismiss: y, multiline: b = !1, placeholder: x, disabled: S, hint: C, rows: w, className: T, ref: E, onChange: D, onFocus: O, onBlur: k, onKeyDown: A, "aria-describedby": j, ...M }) {
|
|
13
|
-
let N =
|
|
13
|
+
let N = t("inlineCompletion"), P = C ?? N.hint, [F, I] = l(_, ""), [L, R] = o(!1), [z, B] = o(!1), V = a(null), H = a(null), U = i(), W = a(g);
|
|
14
14
|
r(() => {
|
|
15
15
|
W.current !== g && (W.current = g, B(!1));
|
|
16
16
|
}, [g]);
|
|
17
17
|
let G = g !== void 0 && g !== "" && !z && L, K = G ? [j, U].filter(Boolean).join(" ") : j, q = {
|
|
18
|
-
ref:
|
|
18
|
+
ref: n(H, E),
|
|
19
19
|
value: F,
|
|
20
20
|
onChange: (e) => {
|
|
21
21
|
I(e.target.value), D?.(e);
|
|
@@ -3,16 +3,18 @@ import e from "./InputCore.js";
|
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
import { useControl as n } from "react-use-control";
|
|
5
5
|
//#region src/lib/components/Input/Input.tsx
|
|
6
|
-
function r({ value: r, size: i, className: a,
|
|
7
|
-
let [
|
|
6
|
+
function r({ value: r, size: i, className: a, leftSection: o, rightSection: s, onChange: c, ref: l, ...u }) {
|
|
7
|
+
let [d, f] = n(r, "");
|
|
8
8
|
return /* @__PURE__ */ t(e, {
|
|
9
|
-
ref:
|
|
10
|
-
value:
|
|
11
|
-
onChange:
|
|
12
|
-
onNativeChange:
|
|
9
|
+
ref: l,
|
|
10
|
+
value: d,
|
|
11
|
+
onChange: f,
|
|
12
|
+
onNativeChange: c,
|
|
13
13
|
size: i,
|
|
14
14
|
className: a,
|
|
15
|
-
|
|
15
|
+
leftSection: o,
|
|
16
|
+
rightSection: s,
|
|
17
|
+
...u
|
|
16
18
|
});
|
|
17
19
|
}
|
|
18
20
|
//#endregion
|
|
@@ -2,28 +2,47 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { classnames as e } from "../../utils/classnames.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
6
6
|
//#region src/lib/components/Input/InputCore.tsx
|
|
7
|
-
var
|
|
7
|
+
var r = "haze-InputCore__base", i = {
|
|
8
8
|
sm: "haze-InputCore__sm",
|
|
9
9
|
md: "haze-InputCore__md",
|
|
10
10
|
lg: "haze-InputCore__lg"
|
|
11
|
-
};
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
ref:
|
|
11
|
+
}, a = "haze-InputCore__wrapper", o = "haze-InputCore__section", s = "haze-InputCore__sectionStart", c = "haze-InputCore__sectionEnd", l = "haze-InputCore__padStart", u = "haze-InputCore__padEnd";
|
|
12
|
+
function d({ value: d, onChange: f, onNativeChange: p, size: m = "md", className: h, leftSection: g, rightSection: _, ref: v, ...y }) {
|
|
13
|
+
let b = /* @__PURE__ */ t("input", {
|
|
14
|
+
ref: v,
|
|
15
15
|
"data-slot": "input",
|
|
16
|
-
value:
|
|
16
|
+
value: d,
|
|
17
17
|
onChange: (e) => {
|
|
18
|
-
|
|
18
|
+
f(e.target.value), p?.(e);
|
|
19
19
|
},
|
|
20
|
-
...
|
|
20
|
+
...y,
|
|
21
21
|
className: e([
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
r,
|
|
23
|
+
i[m],
|
|
24
|
+
g !== void 0 && l,
|
|
25
|
+
_ !== void 0 && u,
|
|
26
|
+
h
|
|
25
27
|
])
|
|
26
28
|
});
|
|
29
|
+
return g === void 0 && _ === void 0 ? b : /* @__PURE__ */ n("span", {
|
|
30
|
+
"data-slot": "field",
|
|
31
|
+
className: e([a]),
|
|
32
|
+
children: [
|
|
33
|
+
g !== void 0 && /* @__PURE__ */ t("span", {
|
|
34
|
+
"data-slot": "left-section",
|
|
35
|
+
className: e([o, s]),
|
|
36
|
+
children: g
|
|
37
|
+
}),
|
|
38
|
+
b,
|
|
39
|
+
_ !== void 0 && /* @__PURE__ */ t("span", {
|
|
40
|
+
"data-slot": "right-section",
|
|
41
|
+
className: e([o, c]),
|
|
42
|
+
children: _
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
27
46
|
}
|
|
28
47
|
//#endregion
|
|
29
|
-
export {
|
|
48
|
+
export { d as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
4
|
+
import t from "../Spinner/Spinner.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
7
|
+
//#region src/lib/components/LoadingOverlay/LoadingOverlay.tsx
|
|
8
|
+
var i = "haze-LoadingOverlay__wrapper", a = "haze-LoadingOverlay__veil", o = "haze-LoadingOverlay__veilLabel", s = "haze-LoadingOverlay__dimmed";
|
|
9
|
+
function c({ visible: c = !1, label: l, loader: u, spinnerSize: d = "md", className: f, children: p, ...m }) {
|
|
10
|
+
return /* @__PURE__ */ r("div", {
|
|
11
|
+
"data-slot": "loading-overlay",
|
|
12
|
+
"aria-busy": c || void 0,
|
|
13
|
+
...m,
|
|
14
|
+
className: e([i, f]),
|
|
15
|
+
children: [/* @__PURE__ */ n("div", {
|
|
16
|
+
"data-slot": "content",
|
|
17
|
+
className: e([c && s]),
|
|
18
|
+
children: p
|
|
19
|
+
}), c && /* @__PURE__ */ r("div", {
|
|
20
|
+
"data-slot": "veil",
|
|
21
|
+
className: e([a]),
|
|
22
|
+
children: [u ?? /* @__PURE__ */ n(t, { size: d }), l != null && /* @__PURE__ */ n("span", {
|
|
23
|
+
className: e([o]),
|
|
24
|
+
children: l
|
|
25
|
+
})]
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { c as default };
|
|
@@ -31,6 +31,10 @@ var e = {
|
|
|
31
31
|
create: "„{query}“ erstellen",
|
|
32
32
|
noResults: "Keine Ergebnisse"
|
|
33
33
|
},
|
|
34
|
+
spoiler: {
|
|
35
|
+
showMore: "Mehr anzeigen",
|
|
36
|
+
showLess: "Weniger anzeigen"
|
|
37
|
+
},
|
|
34
38
|
command: { noResults: "Keine Ergebnisse" },
|
|
35
39
|
sidebar: {
|
|
36
40
|
toggle: "Seitenleiste ein-/ausblenden",
|
|
@@ -31,6 +31,10 @@ var e = {
|
|
|
31
31
|
create: "Crear «{query}»",
|
|
32
32
|
noResults: "Sin resultados"
|
|
33
33
|
},
|
|
34
|
+
spoiler: {
|
|
35
|
+
showMore: "Mostrar más",
|
|
36
|
+
showLess: "Mostrar menos"
|
|
37
|
+
},
|
|
34
38
|
command: { noResults: "Sin resultados" },
|
|
35
39
|
sidebar: {
|
|
36
40
|
toggle: "Mostrar u ocultar la barra lateral",
|
|
@@ -31,6 +31,10 @@ var e = {
|
|
|
31
31
|
create: "Créer « {query} »",
|
|
32
32
|
noResults: "Aucun résultat"
|
|
33
33
|
},
|
|
34
|
+
spoiler: {
|
|
35
|
+
showMore: "Afficher plus",
|
|
36
|
+
showLess: "Afficher moins"
|
|
37
|
+
},
|
|
34
38
|
command: { noResults: "Aucun résultat" },
|
|
35
39
|
sidebar: {
|
|
36
40
|
toggle: "Afficher/masquer la barre latérale",
|
|
@@ -31,6 +31,10 @@ var e = {
|
|
|
31
31
|
create: "Crea \"{query}\"",
|
|
32
32
|
noResults: "Nessun risultato"
|
|
33
33
|
},
|
|
34
|
+
spoiler: {
|
|
35
|
+
showMore: "Mostra di più",
|
|
36
|
+
showLess: "Mostra meno"
|
|
37
|
+
},
|
|
34
38
|
command: { noResults: "Nessun risultato" },
|
|
35
39
|
sidebar: {
|
|
36
40
|
toggle: "Mostra/nascondi barra laterale",
|
|
@@ -31,6 +31,10 @@ var e = {
|
|
|
31
31
|
create: "Criar \"{query}\"",
|
|
32
32
|
noResults: "Nenhum resultado"
|
|
33
33
|
},
|
|
34
|
+
spoiler: {
|
|
35
|
+
showMore: "Mostrar mais",
|
|
36
|
+
showLess: "Mostrar menos"
|
|
37
|
+
},
|
|
34
38
|
command: { noResults: "Nenhum resultado" },
|
|
35
39
|
sidebar: {
|
|
36
40
|
toggle: "Mostrar/ocultar barra lateral",
|
|
@@ -31,6 +31,10 @@ var e = {
|
|
|
31
31
|
create: "Создать «{query}»",
|
|
32
32
|
noResults: "Ничего не найдено"
|
|
33
33
|
},
|
|
34
|
+
spoiler: {
|
|
35
|
+
showMore: "Показать ещё",
|
|
36
|
+
showLess: "Скрыть"
|
|
37
|
+
},
|
|
34
38
|
command: { noResults: "Ничего не найдено" },
|
|
35
39
|
sidebar: {
|
|
36
40
|
toggle: "Показать или скрыть боковую панель",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/components/Mark/Mark.tsx
|
|
6
|
+
var n = {
|
|
7
|
+
warning: "haze-Mark__base",
|
|
8
|
+
primary: "haze-Mark__primary",
|
|
9
|
+
success: "haze-Mark__success",
|
|
10
|
+
danger: "haze-Mark__danger"
|
|
11
|
+
};
|
|
12
|
+
function r({ color: r = "warning", className: i, ...a }) {
|
|
13
|
+
return /* @__PURE__ */ t("mark", {
|
|
14
|
+
"data-slot": "mark",
|
|
15
|
+
...a,
|
|
16
|
+
className: e([n[r], i])
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { r as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { classnames as e } from "../../utils/classnames.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useStrings as t } from "../LocaleProvider/useStrings.js";
|
|
5
|
+
import { mergeRefs as n } from "../../utils/refs.js";
|
|
6
6
|
import { FloatingPanel as r, useFloating as i } from "../../utils/floating.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { useCallback as a, useEffect as o, useId as s, useRef as c, useState as l } from "react";
|
|
@@ -24,7 +24,7 @@ function v(e, t, n) {
|
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
26
|
function y({ value: y, onChange: b, options: x, trigger: S = "@", placeholder: C, className: w, "aria-label": T, ref: E, ...D }) {
|
|
27
|
-
let O =
|
|
27
|
+
let O = t("mentions"), [k, A] = l(!1), [j, M] = l(null), [N, P] = l(-1), F = s(), I = c(null), L = a((e) => n(I, E)(e), [I, E]), R = c(null), z = i({
|
|
28
28
|
open: k,
|
|
29
29
|
setOpen: A,
|
|
30
30
|
triggerRef: I,
|
|
@@ -6,14 +6,16 @@ import "./menu-item-styles.js";
|
|
|
6
6
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
7
7
|
//#region src/lib/components/Menu/MenuItem.tsx
|
|
8
8
|
var r = "haze-MenuItem__item";
|
|
9
|
-
function i({ onSelect: i, disabled: a = !1, danger: o = !1, icon: s, kbdLabel: c, className: l, children: u }) {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
function i({ onSelect: i, disabled: a = !1, danger: o = !1, icon: s, kbdLabel: c, className: l, children: u, as: d, ...f }) {
|
|
10
|
+
let p = d ?? "button", m = d === void 0 || d === "button";
|
|
11
|
+
return /* @__PURE__ */ n(p, {
|
|
12
|
+
...m ? { type: "button" } : {},
|
|
12
13
|
role: "menuitem",
|
|
13
14
|
"data-slot": "menu-item",
|
|
14
15
|
tabIndex: -1,
|
|
15
|
-
disabled: a,
|
|
16
|
+
...m ? { disabled: a } : { "aria-disabled": a || void 0 },
|
|
16
17
|
onClick: i,
|
|
18
|
+
...f,
|
|
17
19
|
className: e([
|
|
18
20
|
r,
|
|
19
21
|
o && "haze-menu-item-styles__menuItemDanger",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
//#region src/lib/components/NumberFormatter/NumberFormatter.tsx
|
|
3
|
+
function t({ value: t, formatOptions: n, locale: r, prefix: i, suffix: a, ...o }) {
|
|
4
|
+
let s = new Intl.NumberFormat(r, n).format(t);
|
|
5
|
+
return /* @__PURE__ */ e("span", {
|
|
6
|
+
"data-slot": "number-formatter",
|
|
7
|
+
...o,
|
|
8
|
+
children: [
|
|
9
|
+
i,
|
|
10
|
+
s,
|
|
11
|
+
a
|
|
12
|
+
]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t as default };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { classnames as e } from "../../utils/classnames.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { formatString as t } from "../LocaleProvider/locale.js";
|
|
5
|
+
import { useStrings as n } from "../LocaleProvider/useStrings.js";
|
|
6
|
+
import { mergeRefs as r } from "../../utils/refs.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { useCallback as i, useRef as a } from "react";
|
|
9
9
|
import { jsx as o } from "react/jsx-runtime";
|
|
10
10
|
//#region src/lib/components/OTPInput/OTPInputCore.tsx
|
|
11
11
|
var s = "haze-OTPInputCore__container", c = "haze-OTPInputCore__cell";
|
|
12
12
|
function l({ length: l = 6, value: u, onChange: d, className: f, ref: p }) {
|
|
13
|
-
let m = a([]), h =
|
|
13
|
+
let m = a([]), h = n("otpInput"), g = i((e) => r(p)(e), [p]), _ = i((e, t) => {
|
|
14
14
|
let n = u.split("");
|
|
15
15
|
n[e] = t.slice(-1), d(n.join("").slice(0, l)), t && e < l - 1 && m.current[e + 1]?.focus();
|
|
16
16
|
}, [
|
|
@@ -29,7 +29,7 @@ function l({ length: l = 6, value: u, onChange: d, className: f, ref: p }) {
|
|
|
29
29
|
return /* @__PURE__ */ o("div", {
|
|
30
30
|
"data-slot": "otp-input",
|
|
31
31
|
className: e([s, f]),
|
|
32
|
-
children: Array.from({ length: l }, (
|
|
32
|
+
children: Array.from({ length: l }, (n, r) => /* @__PURE__ */ o("input", {
|
|
33
33
|
"data-slot": "segment",
|
|
34
34
|
ref: (e) => {
|
|
35
35
|
m.current[r] = e, r === 0 && g(e);
|
|
@@ -38,7 +38,7 @@ function l({ length: l = 6, value: u, onChange: d, className: f, ref: p }) {
|
|
|
38
38
|
inputMode: "numeric",
|
|
39
39
|
autoComplete: "one-time-code",
|
|
40
40
|
maxLength: 1,
|
|
41
|
-
"aria-label":
|
|
41
|
+
"aria-label": t(h.digitLabel, {
|
|
42
42
|
index: r + 1,
|
|
43
43
|
total: l
|
|
44
44
|
}),
|
|
@@ -2,36 +2,37 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { classnames as e } from "../../utils/classnames.js";
|
|
4
4
|
import { useStrings as t } from "../LocaleProvider/useStrings.js";
|
|
5
|
+
import n from "../Input/InputCore.js";
|
|
5
6
|
/* empty css */
|
|
6
|
-
import { useState as
|
|
7
|
-
import { jsx as
|
|
7
|
+
import { useState as r } from "react";
|
|
8
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
8
9
|
//#region src/lib/components/PasswordInput/PasswordInputCore.tsx
|
|
9
|
-
var a = "haze-PasswordInputCore__wrapper", o = "haze-
|
|
10
|
-
function
|
|
11
|
-
let [
|
|
10
|
+
var a = "haze-PasswordInputCore__wrapper", o = "haze-PasswordInputCore__toggle";
|
|
11
|
+
function s({ value: s, onChange: c, placeholder: l, disabled: u, className: d, ref: f }) {
|
|
12
|
+
let [p, m] = r(!1), h = t("passwordInput");
|
|
12
13
|
return /* @__PURE__ */ i("div", {
|
|
13
14
|
"data-slot": "password-input",
|
|
14
|
-
className: e([a,
|
|
15
|
-
children:
|
|
16
|
-
ref:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
15
|
+
className: e([a, d]),
|
|
16
|
+
children: i(n, {
|
|
17
|
+
ref: f,
|
|
18
|
+
value: s,
|
|
19
|
+
onChange: c,
|
|
20
|
+
type: p ? "text" : "password",
|
|
21
|
+
"aria-label": h.label,
|
|
22
|
+
placeholder: l,
|
|
23
|
+
disabled: u,
|
|
24
|
+
rightSection: /* @__PURE__ */ i("button", {
|
|
25
|
+
"data-slot": "toggle-visibility",
|
|
26
|
+
"data-section-pointer": "auto",
|
|
27
|
+
type: "button",
|
|
28
|
+
onClick: () => m(!p),
|
|
29
|
+
tabIndex: -1,
|
|
30
|
+
"aria-label": p ? h.hide : h.show,
|
|
31
|
+
className: e([o]),
|
|
32
|
+
children: p ? "🙈" : "👁"
|
|
33
|
+
})
|
|
34
|
+
})
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
37
|
//#endregion
|
|
37
|
-
export {
|
|
38
|
+
export { s as default };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { classnames as e } from "../../utils/classnames.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { getDirection as t } from "../../utils/direction.js";
|
|
5
|
+
import { formatString as n } from "../LocaleProvider/locale.js";
|
|
6
|
+
import { useStrings as r } from "../LocaleProvider/useStrings.js";
|
|
7
|
+
import { mergeRefs as i } from "../../utils/refs.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { useCallback as a, useRef as o, useState as s } from "react";
|
|
10
10
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
11
11
|
//#region src/lib/components/Rating/RatingCore.tsx
|
|
12
12
|
var u = "haze-RatingCore__container", d = "haze-RatingCore__star", f = "haze-RatingCore__starActive";
|
|
13
13
|
function p({ value: p, onChange: m, count: h = 5, allowHalf: g = !1, className: _, ref: v }) {
|
|
14
|
-
let [y, b] = s(null), x = o(null), S =
|
|
14
|
+
let [y, b] = s(null), x = o(null), S = r("rating"), C = a((e) => i(v)(e), [v]), w = (e) => {
|
|
15
15
|
m(e + 1);
|
|
16
16
|
}, T = y ?? p;
|
|
17
17
|
return /* @__PURE__ */ c("div", {
|
|
@@ -19,15 +19,15 @@ function p({ value: p, onChange: m, count: h = 5, allowHalf: g = !1, className:
|
|
|
19
19
|
"data-slot": "rating",
|
|
20
20
|
role: "radiogroup",
|
|
21
21
|
onKeyDown: (e) => {
|
|
22
|
-
let
|
|
22
|
+
let n = g ? .5 : 1, r = Array.from(x.current?.querySelectorAll("[role=\"radio\"]") ?? []);
|
|
23
23
|
if (r.length === 0) return;
|
|
24
24
|
let i = (t, n) => {
|
|
25
25
|
e.preventDefault(), m(t), r[n]?.focus();
|
|
26
|
-
}, a =
|
|
27
|
-
[a]:
|
|
28
|
-
[o]: -
|
|
29
|
-
ArrowUp:
|
|
30
|
-
ArrowDown: -
|
|
26
|
+
}, a = t(x.current) === "rtl" ? "ArrowLeft" : "ArrowRight", o = a === "ArrowLeft" ? "ArrowRight" : "ArrowLeft", s = {
|
|
27
|
+
[a]: n,
|
|
28
|
+
[o]: -n,
|
|
29
|
+
ArrowUp: n,
|
|
30
|
+
ArrowDown: -n
|
|
31
31
|
};
|
|
32
32
|
if (e.key in s) {
|
|
33
33
|
let t = Math.min(Math.max(p + s[e.key], 0), h);
|
|
@@ -48,17 +48,17 @@ function p({ value: p, onChange: m, count: h = 5, allowHalf: g = !1, className:
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
className: e([u, _]),
|
|
51
|
-
children: Array.from({ length: h }, (t,
|
|
52
|
-
let i = T >=
|
|
51
|
+
children: Array.from({ length: h }, (t, r) => {
|
|
52
|
+
let i = T >= r + 1, a = g && T >= r + .5 && T < r + 1, o = p > 0 ? Math.ceil(p) - 1 === r : r === 0;
|
|
53
53
|
return /* @__PURE__ */ c("span", {
|
|
54
54
|
ref: o ? C : void 0,
|
|
55
55
|
"data-slot": "item",
|
|
56
56
|
role: "radio",
|
|
57
|
-
"aria-checked": p >=
|
|
58
|
-
"aria-label": r
|
|
57
|
+
"aria-checked": p >= r + 1 ? "true" : "false",
|
|
58
|
+
"aria-label": n(r > 0 ? S.stars : S.star, { count: r + 1 }),
|
|
59
59
|
tabIndex: o ? 0 : -1,
|
|
60
|
-
onClick: () => w(
|
|
61
|
-
onMouseEnter: () => b(
|
|
60
|
+
onClick: () => w(r),
|
|
61
|
+
onMouseEnter: () => b(r + 1),
|
|
62
62
|
onMouseLeave: () => b(null),
|
|
63
63
|
className: e([d, (i || a) && f]),
|
|
64
64
|
children: /* @__PURE__ */ l("svg", {
|
|
@@ -80,7 +80,7 @@ function p({ value: p, onChange: m, count: h = 5, allowHalf: g = !1, className:
|
|
|
80
80
|
})]
|
|
81
81
|
}) }), /* @__PURE__ */ c("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })]
|
|
82
82
|
})
|
|
83
|
-
},
|
|
83
|
+
}, r);
|
|
84
84
|
})
|
|
85
85
|
});
|
|
86
86
|
}
|
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import e from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
2
|
+
import { useConfigDefaults as e } from "../ConfigProvider/useConfigDefaults.js";
|
|
3
|
+
import t from "./SelectCore.js";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { useControl as r } from "react-use-control";
|
|
5
6
|
//#region src/lib/components/Select/Select.tsx
|
|
6
|
-
function
|
|
7
|
-
let [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
function i({ value: i, multiple: a = !1, searchable: o = !1, clearable: s = !1, loading: c = !1, onSearch: l, maxTagCount: u, virtualized: d, size: f, className: p, classNames: m, children: h, onChange: g, onValuesChange: _, placeholder: v, ref: y, ...b }) {
|
|
8
|
+
let [x, S] = r(i, a ? [] : ""), C = e("Select"), w = C.classNames ? {
|
|
9
|
+
...C.classNames,
|
|
10
|
+
...m
|
|
11
|
+
} : m;
|
|
12
|
+
return /* @__PURE__ */ n(t, {
|
|
13
|
+
ref: y,
|
|
14
|
+
value: x,
|
|
11
15
|
onChange: (e) => {
|
|
12
|
-
|
|
16
|
+
S(e), _?.(e);
|
|
13
17
|
},
|
|
14
|
-
onNativeChange:
|
|
15
|
-
multiple:
|
|
16
|
-
searchable:
|
|
17
|
-
clearable:
|
|
18
|
-
loading:
|
|
19
|
-
onSearch:
|
|
20
|
-
maxTagCount:
|
|
21
|
-
virtualized:
|
|
22
|
-
size:
|
|
23
|
-
className:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
onNativeChange: a || o ? void 0 : g,
|
|
19
|
+
multiple: a,
|
|
20
|
+
searchable: o,
|
|
21
|
+
clearable: s,
|
|
22
|
+
loading: c,
|
|
23
|
+
onSearch: l,
|
|
24
|
+
maxTagCount: u,
|
|
25
|
+
virtualized: d,
|
|
26
|
+
size: f,
|
|
27
|
+
className: p,
|
|
28
|
+
classNames: w,
|
|
29
|
+
placeholder: v,
|
|
30
|
+
...b,
|
|
31
|
+
children: h
|
|
27
32
|
});
|
|
28
33
|
}
|
|
29
34
|
//#endregion
|
|
30
|
-
export {
|
|
35
|
+
export { i as default };
|