haze-ui 1.30.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 +67 -1
- package/dist/components/ActivityRail/ActivityRail.js +76 -0
- package/dist/components/ActivityRail/index.js +3 -0
- package/dist/components/BottomSheet/BottomSheet.js +12 -26
- 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/ConversationList/ConversationList.js +16 -7
- 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/List/List.js +14 -10
- package/dist/components/LoadingOverlay/LoadingOverlay.js +30 -0
- package/dist/components/LoadingOverlay/index.js +3 -0
- package/dist/components/LocaleProvider/ar-sa.js +11 -0
- package/dist/components/LocaleProvider/de-de.js +11 -0
- package/dist/components/LocaleProvider/es-es.js +11 -0
- package/dist/components/LocaleProvider/fr-fr.js +11 -0
- package/dist/components/LocaleProvider/it-it.js +11 -0
- package/dist/components/LocaleProvider/ja-jp.js +11 -0
- package/dist/components/LocaleProvider/ko-kr.js +11 -0
- package/dist/components/LocaleProvider/locale.js +11 -0
- package/dist/components/LocaleProvider/pt-br.js +11 -0
- package/dist/components/LocaleProvider/ru-ru.js +11 -0
- package/dist/components/LocaleProvider/zh-cn.js +11 -0
- package/dist/components/LogViewer/LogViewer.js +45 -38
- 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 +7 -6
- package/dist/components/PasswordInput/PasswordInputCore.js +27 -26
- package/dist/components/Rating/RatingCore.js +18 -18
- package/dist/components/Resizable/Resizable.js +266 -36
- 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/Sparkline/Sparkline.js +45 -0
- package/dist/components/Sparkline/index.js +3 -0
- package/dist/components/Sparkline/sparkline-styles.js +18 -0
- package/dist/components/Spoiler/Spoiler.js +36 -0
- package/dist/components/Spoiler/index.js +3 -0
- package/dist/components/StatusBar/StatusBar.js +47 -0
- package/dist/components/StatusBar/index.js +3 -0
- package/dist/components/TabBar/TabBar.js +60 -0
- package/dist/components/TabBar/index.js +3 -0
- package/dist/components/Tabs/SortableTabList.js +116 -0
- package/dist/components/Tabs/Tab.js +83 -16
- package/dist/components/Tabs/TabList.js +94 -38
- package/dist/components/Tabs/edge-scroll.js +6 -0
- package/dist/components/Tabs/index.js +4 -3
- package/dist/components/Tabs/tab-metas.js +24 -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/SortableTagInputCore.js +11 -11
- package/dist/components/TagInput/TagInputCore.js +10 -10
- package/dist/components/TimePicker/TimePickerPanel.js +3 -3
- package/dist/components/Toast/ToastContainer.js +5 -5
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toast/{toast2.js → toast-channel.js} +1 -1
- package/dist/components/Toast/useToast.js +1 -1
- package/dist/components/Tree/SortableTree.js +39 -39
- package/dist/components/TreeSelect/TreeSelect.js +6 -6
- package/dist/components/VirtualList/VirtualList.js +133 -121
- package/dist/components/VisuallyHidden/VisuallyHidden.js +15 -0
- package/dist/components/VisuallyHidden/index.js +2 -0
- package/dist/components/Workbench/Workbench.js +144 -0
- package/dist/components/Workbench/index.js +3 -0
- package/dist/css/accordion.css +2 -0
- package/dist/css/activity-rail.css +4 -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 +3 -1
- 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 +3 -1
- 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 +3 -1
- 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 +3 -1
- package/dist/css/confirm-dialog.css +2 -0
- package/dist/css/container.css +2 -0
- package/dist/css/context-menu.css +3 -1
- 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 +3 -1
- 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 +3 -1
- package/dist/css/dropdown-menu.css +4 -2
- 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 +3 -1
- 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 +3 -1
- 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 +5 -3
- 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 +3 -1
- 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 +3 -1
- package/dist/css/rating.css +2 -0
- package/dist/css/resizable.css +3 -1
- package/dist/css/result.css +2 -0
- package/dist/css/scroll-area.css +2 -0
- package/dist/css/segmented.css +3 -1
- package/dist/css/select.css +2 -0
- package/dist/css/sidebar.css +3 -1
- package/dist/css/signature.css +2 -0
- package/dist/css/skeleton.css +2 -0
- package/dist/css/slider.css +3 -1
- package/dist/css/sources.css +2 -0
- package/dist/css/sparkline.css +4 -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 +4 -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 +3 -1
- package/dist/css/tab-bar.css +4 -0
- package/dist/css/table.css +2 -0
- package/dist/css/tabs.css +5 -2
- package/dist/css/tag-group.css +2 -0
- package/dist/css/tag-input.css +2 -0
- package/dist/css/tag.css +3 -1
- 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 +3 -1
- 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 +4 -0
- package/dist/css-manifest.json +202 -1
- package/dist/dates/adapter.js +9 -1
- package/dist/dates/buddhist.js +43 -0
- package/dist/dates/ethiopic.js +67 -0
- package/dist/dates/hebrew.js +95 -0
- package/dist/dates/japanese.js +41 -0
- package/dist/dates/persian.js +121 -0
- package/dist/dates/registry.js +14 -4
- package/dist/haze-ui.css +435 -29
- package/dist/headless/index.js +18 -17
- package/dist/hooks/useBusyPressable.js +10 -0
- package/dist/index.js +263 -241
- package/dist/mcp-docs.json +1073 -33
- package/dist/registry.json +256 -14
- package/dist/types/components/ActivityRail/ActivityRail.d.ts +30 -0
- package/dist/types/components/ActivityRail/index.d.ts +4 -0
- 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/ConversationList/ConversationList.d.ts +10 -1
- 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/List/List.d.ts +10 -1
- 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 +11 -0
- package/dist/types/components/LogViewer/LogViewer.d.ts +10 -1
- 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/Resizable/Resizable.d.ts +24 -7
- package/dist/types/components/Resizable/index.d.ts +1 -1
- 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/Sparkline/Sparkline.d.ts +31 -0
- package/dist/types/components/Sparkline/index.d.ts +3 -0
- package/dist/types/components/Sparkline/sparkline-styles.d.ts +26 -0
- package/dist/types/components/Spoiler/Spoiler.d.ts +20 -0
- package/dist/types/components/Spoiler/index.d.ts +2 -0
- package/dist/types/components/StatusBar/StatusBar.d.ts +18 -0
- package/dist/types/components/StatusBar/index.d.ts +3 -0
- package/dist/types/components/TabBar/TabBar.d.ts +23 -0
- package/dist/types/components/TabBar/index.d.ts +4 -0
- package/dist/types/components/Tabs/SortableTabList.d.ts +46 -0
- package/dist/types/components/Tabs/Tab.d.ts +54 -3
- package/dist/types/components/Tabs/TabList.d.ts +26 -2
- package/dist/types/components/Tabs/edge-scroll.d.ts +17 -0
- package/dist/types/components/Tabs/index.d.ts +3 -1
- package/dist/types/components/Tabs/tab-metas.d.ts +20 -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/Toast/index.d.ts +2 -2
- package/dist/types/components/Toast/useToast.d.ts +1 -1
- package/dist/types/components/VirtualList/VirtualList.d.ts +20 -1
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +4 -0
- package/dist/types/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/types/components/Workbench/Workbench.d.ts +50 -0
- package/dist/types/components/Workbench/index.d.ts +2 -0
- package/dist/types/dates/adapter.d.ts +33 -6
- package/dist/types/dates/buddhist.d.ts +14 -0
- package/dist/types/dates/ethiopic.d.ts +15 -0
- package/dist/types/dates/hebrew.d.ts +19 -0
- package/dist/types/dates/index.d.ts +5 -0
- package/dist/types/dates/japanese.d.ts +16 -0
- package/dist/types/dates/persian.d.ts +18 -0
- package/dist/types/dates/registry.d.ts +1 -1
- 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 +37 -9
- package/dist/types/utils/sortable.d.ts +8 -1
- package/dist/types/utils/use-end-reached.d.ts +56 -0
- package/dist/types/utils/viewport.d.ts +12 -0
- package/dist/utils/sortable-shared.js +3 -3
- package/dist/utils/sortable.js +15 -14
- package/dist/utils/use-end-reached.js +46 -0
- package/dist/utils/viewport.js +20 -0
- package/package.json +13 -5
- /package/dist/types/components/Toast/{toast.d.ts → toast-channel.d.ts} +0 -0
|
@@ -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,61 +1,291 @@
|
|
|
1
1
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { classnames as e } from "../../utils/classnames.js";
|
|
4
|
+
import { getDirection as t } from "../../utils/direction.js";
|
|
4
5
|
/* empty css */
|
|
5
|
-
import { createContext as
|
|
6
|
-
import { jsx as
|
|
6
|
+
import { createContext as n, useCallback as r, useContext as i, useEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
7
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
8
|
+
import { isControl as u, useControl as d, useThru as f, watch as p } from "react-use-control";
|
|
7
9
|
//#region src/lib/components/Resizable/Resizable.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
let e =
|
|
10
|
+
var m = n(void 0);
|
|
11
|
+
function h() {
|
|
12
|
+
let e = i(m);
|
|
11
13
|
if (!e) throw Error("Resizable sub-components must be used within <ResizableGroup>");
|
|
12
14
|
return e;
|
|
13
15
|
}
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
var g = 16, _ = 2 ** 53 - 1, v = () => void 0, y = /* @__PURE__ */ new Set();
|
|
17
|
+
function b(e, t, n) {
|
|
18
|
+
let r = Math.max(e, t);
|
|
19
|
+
return n === void 0 ? r : Math.min(r, n);
|
|
20
|
+
}
|
|
21
|
+
function x(e, t) {
|
|
22
|
+
let n = e[t];
|
|
23
|
+
for (; n !== null;) {
|
|
24
|
+
if (n instanceof HTMLElement && n.dataset.slot === "resizable-panel") return n;
|
|
25
|
+
if (n instanceof HTMLElement && n.dataset.slot === "resizable-group") return;
|
|
26
|
+
n = n[t];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function S(e) {
|
|
30
|
+
if (e?.dataset.slot !== "resizable-panel") return;
|
|
31
|
+
if (e.dataset.collapsed !== void 0) return 0;
|
|
32
|
+
if (e.style.flexGrow === "1") return;
|
|
33
|
+
let t = Number.parseFloat(e.style.flexBasis);
|
|
34
|
+
return Number.isFinite(t) ? t : void 0;
|
|
35
|
+
}
|
|
36
|
+
var C = "haze-Resizable__groupBase", w = "haze-Resizable__groupHorizontal", T = "haze-Resizable__groupVertical";
|
|
37
|
+
function E({ direction: t = "horizontal", children: n, className: i, style: a, onResizeCommit: u }) {
|
|
38
|
+
let [d, f] = c({}), p = s({}), h = s(/* @__PURE__ */ new Map()), g = s(y), [_, v] = c(0), b = r((e) => {
|
|
39
|
+
let t = p.current, n = {};
|
|
40
|
+
for (let [r, i] of Object.entries(t)) r in e || (n[r] = i);
|
|
41
|
+
let r = !1;
|
|
42
|
+
for (let [i, a] of Object.entries(e)) {
|
|
43
|
+
let e = h.current.get(i);
|
|
44
|
+
(t[i] ?? e?.defaultSize) !== a && (r = !0, a !== e?.defaultSize && (n[i] = a));
|
|
45
|
+
}
|
|
46
|
+
return r && (p.current = n, f(n)), r;
|
|
47
|
+
}, []), x = r(() => {
|
|
48
|
+
if (!u) return;
|
|
49
|
+
let e = {};
|
|
50
|
+
for (let [t, n] of h.current) n.fixed && (e[t] = n.collapsed ? 0 : p.current[t] ?? n.defaultSize);
|
|
51
|
+
u(e);
|
|
52
|
+
}, [u]), S = r((e) => {
|
|
53
|
+
if (!(e in p.current)) return;
|
|
54
|
+
let t = {};
|
|
55
|
+
for (let [n, r] of Object.entries(p.current)) n !== e && (t[n] = r);
|
|
56
|
+
p.current = t, f(t);
|
|
57
|
+
}, []), E = r((e) => {
|
|
58
|
+
g.current = new Set(e), v((e) => e + 1);
|
|
59
|
+
}, []), D = r(() => {
|
|
60
|
+
g.current = y, v((e) => e + 1);
|
|
61
|
+
}, []), O = r((e) => g.current.has(e), []), k = r((e) => e === void 0 ? void 0 : h.current.get(e), []), A = r((e, t) => (h.current.set(e, t), () => {
|
|
62
|
+
h.current.delete(e);
|
|
63
|
+
}), []), j = o(() => ({
|
|
64
|
+
direction: t,
|
|
65
|
+
sizes: d,
|
|
66
|
+
applySizes: b,
|
|
67
|
+
commitSizes: x,
|
|
68
|
+
clearOverride: S,
|
|
69
|
+
getPanelApi: k,
|
|
70
|
+
registerPanel: A,
|
|
71
|
+
markGesture: E,
|
|
72
|
+
endGesture: D,
|
|
73
|
+
isGesturePanel: O
|
|
74
|
+
}), [
|
|
75
|
+
t,
|
|
76
|
+
d,
|
|
77
|
+
b,
|
|
78
|
+
x,
|
|
79
|
+
S,
|
|
80
|
+
k,
|
|
81
|
+
A,
|
|
82
|
+
E,
|
|
83
|
+
D,
|
|
84
|
+
O,
|
|
85
|
+
_
|
|
86
|
+
]);
|
|
87
|
+
return /* @__PURE__ */ l(m.Provider, {
|
|
88
|
+
value: j,
|
|
89
|
+
children: l("div", {
|
|
26
90
|
"data-slot": "resizable-group",
|
|
91
|
+
style: a,
|
|
27
92
|
className: e([
|
|
28
|
-
|
|
29
|
-
t === "horizontal" ?
|
|
30
|
-
|
|
93
|
+
C,
|
|
94
|
+
t === "horizontal" ? w : T,
|
|
95
|
+
i
|
|
31
96
|
]),
|
|
32
97
|
children: n
|
|
33
98
|
})
|
|
34
99
|
});
|
|
35
100
|
}
|
|
36
|
-
var
|
|
37
|
-
function
|
|
38
|
-
let {
|
|
39
|
-
|
|
101
|
+
var D = "haze-Resizable__panelBase", O = "haze-Resizable__panelCollapsed";
|
|
102
|
+
function k({ id: t, defaultSize: n, minSize: r, maxSize: i, collapsible: o = !1, collapsed: c, onCollapsedChange: m, children: g, className: _, style: y, ...b }) {
|
|
103
|
+
let { sizes: x, registerPanel: S, clearOverride: C, isGesturePanel: w } = h(), T = s({
|
|
104
|
+
defaultSize: n,
|
|
105
|
+
minSize: r,
|
|
106
|
+
maxSize: i
|
|
107
|
+
});
|
|
108
|
+
a(() => {
|
|
109
|
+
let e = T.current;
|
|
110
|
+
(e.defaultSize !== n || e.minSize !== r || e.maxSize !== i) && (w(t) || (T.current = {
|
|
111
|
+
defaultSize: n,
|
|
112
|
+
minSize: r,
|
|
113
|
+
maxSize: i
|
|
114
|
+
}, C(t)));
|
|
115
|
+
});
|
|
116
|
+
let E = u(c), [k, A] = d(f(E ? c : void 0, p((e) => m?.(e))), E ? !1 : c ?? !1), j = o && k;
|
|
117
|
+
a(() => S(t, {
|
|
118
|
+
fixed: n !== void 0,
|
|
119
|
+
defaultSize: n ?? 0,
|
|
120
|
+
minSize: r ?? 0,
|
|
121
|
+
maxSize: i,
|
|
122
|
+
collapsed: j,
|
|
123
|
+
setCollapsed: o ? A : v
|
|
124
|
+
}), [
|
|
125
|
+
S,
|
|
126
|
+
t,
|
|
127
|
+
n,
|
|
128
|
+
r,
|
|
129
|
+
i,
|
|
130
|
+
j,
|
|
131
|
+
o,
|
|
132
|
+
A
|
|
133
|
+
]);
|
|
134
|
+
let M = x[t], N = j ? {
|
|
135
|
+
flexGrow: 0,
|
|
136
|
+
flexShrink: 0,
|
|
137
|
+
flexBasis: "0px"
|
|
138
|
+
} : n === void 0 ? {
|
|
139
|
+
flexGrow: 1,
|
|
140
|
+
flexShrink: 1,
|
|
141
|
+
flexBasis: "0px"
|
|
142
|
+
} : {
|
|
143
|
+
flexGrow: 0,
|
|
144
|
+
flexShrink: 0,
|
|
145
|
+
flexBasis: `${M ?? n}px`
|
|
146
|
+
};
|
|
147
|
+
return /* @__PURE__ */ l("div", {
|
|
40
148
|
"data-slot": "resizable-panel",
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
149
|
+
"data-panel-id": t,
|
|
150
|
+
"data-collapsed": j || void 0,
|
|
151
|
+
style: {
|
|
152
|
+
...y,
|
|
153
|
+
...N
|
|
154
|
+
},
|
|
155
|
+
...b,
|
|
156
|
+
className: e([
|
|
157
|
+
D,
|
|
158
|
+
j && O,
|
|
159
|
+
_
|
|
160
|
+
]),
|
|
161
|
+
children: g
|
|
44
162
|
});
|
|
45
163
|
}
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
let
|
|
49
|
-
|
|
164
|
+
var A = "haze-Resizable__handleBase", j = "haze-Resizable__handleHorizontal", M = "haze-Resizable__handleVertical";
|
|
165
|
+
function N(e, t, n, r) {
|
|
166
|
+
let i = {};
|
|
167
|
+
if (e !== null && t !== null && n !== null) {
|
|
168
|
+
let a = Math.max(e.min, n - (t.max ?? Infinity)), o = Math.min(e.max ?? Infinity, n - t.min), s = b(e.start + r, a, o);
|
|
169
|
+
return i[e.id] = s, i[t.id] = n - s, i;
|
|
170
|
+
}
|
|
171
|
+
return e === null ? (t === null || (i[t.id] = b(t.start - r, t.min, t.max)), i) : (i[e.id] = b(e.start + r, e.min, e.max), i);
|
|
172
|
+
}
|
|
173
|
+
function P({ className: n, ...r }) {
|
|
174
|
+
let { direction: i, applySizes: o, commitSizes: u, getPanelApi: d, markGesture: f, endGesture: p } = h(), m = s(null), v = s(null), y = s(!1);
|
|
175
|
+
a(() => () => {
|
|
176
|
+
v.current !== null && (v.current = null, p());
|
|
177
|
+
}, [p]);
|
|
178
|
+
let b = () => i === "horizontal" && t(m.current) === "rtl", [C, w] = c(void 0);
|
|
179
|
+
a(() => {
|
|
180
|
+
let e = m.current;
|
|
181
|
+
if (e === null) return;
|
|
182
|
+
let t = (e) => {
|
|
183
|
+
let t = S(e);
|
|
184
|
+
if (t === void 0) return;
|
|
185
|
+
let n = e?.dataset.panelId, r = n === void 0 ? void 0 : d(n);
|
|
186
|
+
return {
|
|
187
|
+
now: t,
|
|
188
|
+
min: r?.minSize,
|
|
189
|
+
max: r?.maxSize
|
|
190
|
+
};
|
|
191
|
+
}, n = t(x(e, "previousElementSibling")) ?? t(x(e, "nextElementSibling"));
|
|
192
|
+
w((e) => e?.now === n?.now && e?.min === n?.min && e?.max === n?.max ? e : n);
|
|
193
|
+
});
|
|
194
|
+
let T = (e) => i === "horizontal" ? e.clientX : e.clientY, E = (e) => {
|
|
195
|
+
let t = e?.dataset.panelId;
|
|
196
|
+
if (e === void 0 || t === void 0) return null;
|
|
197
|
+
let n = d(t);
|
|
198
|
+
if (n === void 0 || n.collapsed || !n.fixed) return null;
|
|
199
|
+
let r = S(e);
|
|
200
|
+
return r === void 0 ? null : {
|
|
201
|
+
id: t,
|
|
202
|
+
start: r,
|
|
203
|
+
min: n.minSize,
|
|
204
|
+
max: n.maxSize,
|
|
205
|
+
defaultSize: n.defaultSize
|
|
206
|
+
};
|
|
207
|
+
}, D = (e) => {
|
|
208
|
+
let t = d(e?.dataset.panelId);
|
|
209
|
+
return t?.collapsed ? t : void 0;
|
|
210
|
+
}, O = (e) => ({
|
|
211
|
+
lead: E(x(e, "previousElementSibling")),
|
|
212
|
+
trail: E(x(e, "nextElementSibling")),
|
|
213
|
+
expand: D(x(e, "previousElementSibling")) ?? D(x(e, "nextElementSibling"))
|
|
214
|
+
}), k = (e) => {
|
|
215
|
+
let { lead: t, trail: n } = O(e), r = {};
|
|
216
|
+
t !== null && (r[t.id] = t.defaultSize), n !== null && (r[n.id] = n.defaultSize), o(r) && u();
|
|
217
|
+
}, P = (e) => {
|
|
218
|
+
if (e.button !== 0) return;
|
|
219
|
+
let t = e.currentTarget, { lead: n, trail: r, expand: i } = O(t);
|
|
220
|
+
if (i !== void 0) {
|
|
221
|
+
e.preventDefault(), i.setCollapsed(!1);
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if (n === null && r === null) return;
|
|
225
|
+
e.preventDefault();
|
|
226
|
+
let a = [];
|
|
227
|
+
if (n !== null && a.push(n.id), r !== null && a.push(r.id), f(a), v.current = {
|
|
228
|
+
pointerId: e.pointerId,
|
|
229
|
+
origin: T(e),
|
|
230
|
+
lead: n,
|
|
231
|
+
trail: r,
|
|
232
|
+
pairSum: n !== null && r !== null ? n.start + r.start : null
|
|
233
|
+
}, y.current = !1, typeof t.setPointerCapture == "function") try {
|
|
234
|
+
t.setPointerCapture(e.pointerId);
|
|
235
|
+
} catch {}
|
|
236
|
+
}, F = (e) => {
|
|
237
|
+
let t = v.current;
|
|
238
|
+
if (t?.pointerId !== e.pointerId) return;
|
|
239
|
+
let n = T(e) - t.origin, r = N(t.lead, t.trail, t.pairSum, b() ? -n : n);
|
|
240
|
+
o(r) && (y.current = !0);
|
|
241
|
+
}, I = (e) => {
|
|
242
|
+
if (v.current?.pointerId !== e.pointerId) return;
|
|
243
|
+
v.current = null;
|
|
244
|
+
let t = e.currentTarget;
|
|
245
|
+
if (typeof t.releasePointerCapture == "function") try {
|
|
246
|
+
t.releasePointerCapture(e.pointerId);
|
|
247
|
+
} catch {}
|
|
248
|
+
e.type === "pointerup" && y.current && u(), y.current = !1, p();
|
|
249
|
+
}, L = (e) => {
|
|
250
|
+
let t = i === "horizontal" ? "ArrowRight" : "ArrowDown", n = i === "horizontal" ? "ArrowLeft" : "ArrowUp", { key: r } = e, a = e.currentTarget, { lead: s, trail: c, expand: l } = O(a);
|
|
251
|
+
if (l !== void 0) {
|
|
252
|
+
r === "Enter" && (e.preventDefault(), l.setCollapsed(!1));
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
if (r === "Enter") {
|
|
256
|
+
e.preventDefault(), k(a);
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
if (r !== t && r !== n && r !== "Home" && r !== "End" || s === null && c === null) return;
|
|
260
|
+
e.preventDefault();
|
|
261
|
+
let d = s !== null && c !== null ? s.start + c.start : null, f = b(), p = r === t ? f ? -16 : g : r === n ? f ? g : -16 : r === "Home" ? -_ : _;
|
|
262
|
+
o(N(s, c, d, p)) && u();
|
|
263
|
+
};
|
|
264
|
+
return /* @__PURE__ */ l("div", {
|
|
265
|
+
ref: m,
|
|
50
266
|
"data-slot": "resizable-handle",
|
|
267
|
+
...r,
|
|
51
268
|
role: "separator",
|
|
52
|
-
"aria-orientation":
|
|
269
|
+
"aria-orientation": i === "horizontal" ? "vertical" : "horizontal",
|
|
270
|
+
tabIndex: 0,
|
|
271
|
+
"aria-valuenow": C?.now,
|
|
272
|
+
"aria-valuemin": C?.min,
|
|
273
|
+
"aria-valuemax": C?.max,
|
|
274
|
+
onKeyDown: L,
|
|
275
|
+
onPointerDown: P,
|
|
276
|
+
onPointerMove: F,
|
|
277
|
+
onPointerUp: I,
|
|
278
|
+
onPointerCancel: I,
|
|
279
|
+
onDoubleClick: () => {
|
|
280
|
+
let e = m.current;
|
|
281
|
+
e !== null && k(e);
|
|
282
|
+
},
|
|
53
283
|
className: e([
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
284
|
+
A,
|
|
285
|
+
i === "horizontal" ? j : M,
|
|
286
|
+
n
|
|
57
287
|
])
|
|
58
288
|
});
|
|
59
289
|
}
|
|
60
290
|
//#endregion
|
|
61
|
-
export {
|
|
291
|
+
export { E as ResizableGroup, P as ResizableHandle, k as ResizablePanel };
|
|
@@ -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 };
|
|
@@ -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 { extractSelectEntries as r } from "./select-options.js";
|
|
7
7
|
import i from "./SelectFloating.js";
|
|
8
8
|
/* empty css */
|
|
@@ -14,13 +14,13 @@ var l = "haze-SelectCore__base", u = {
|
|
|
14
14
|
md: "haze-SelectCore__md",
|
|
15
15
|
lg: "haze-SelectCore__lg"
|
|
16
16
|
}, d = "haze-SelectCore__nativeClearWrap", f = "haze-SelectCore__nativeClear";
|
|
17
|
-
function p({ value: p, onChange: m, onNativeChange: h, multiple: g = !1, searchable: _ = !1, clearable: v = !1, loading: y = !1, onSearch: b, maxTagCount: x, size: S = "md", virtualized: C, className: w,
|
|
18
|
-
let
|
|
17
|
+
function p({ value: p, onChange: m, onNativeChange: h, multiple: g = !1, searchable: _ = !1, clearable: v = !1, loading: y = !1, onSearch: b, maxTagCount: x, size: S = "md", virtualized: C, className: w, classNames: T, placeholder: E, children: D, ref: O, ...k }) {
|
|
18
|
+
let A = t("select"), j = o(null), M = a((e) => n(j, O)(e), [j, O]);
|
|
19
19
|
if (g || _) return /* @__PURE__ */ s(i, {
|
|
20
|
-
ref:
|
|
20
|
+
ref: O,
|
|
21
21
|
value: p,
|
|
22
22
|
onChange: m,
|
|
23
|
-
entries: r(
|
|
23
|
+
entries: r(D),
|
|
24
24
|
multiple: g,
|
|
25
25
|
searchable: _,
|
|
26
26
|
clearable: v,
|
|
@@ -30,24 +30,25 @@ function p({ value: p, onChange: m, onNativeChange: h, multiple: g = !1, searcha
|
|
|
30
30
|
size: S,
|
|
31
31
|
virtualized: C,
|
|
32
32
|
className: w,
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
classNames: T,
|
|
34
|
+
placeholder: E,
|
|
35
|
+
...k
|
|
35
36
|
});
|
|
36
|
-
let
|
|
37
|
+
let N = typeof p == "string" ? p : "";
|
|
37
38
|
if (v) {
|
|
38
|
-
let { onKeyDown: t, ...n } =
|
|
39
|
+
let { onKeyDown: t, ...n } = k;
|
|
39
40
|
return /* @__PURE__ */ c("span", {
|
|
40
|
-
"data-clearable":
|
|
41
|
+
"data-clearable": N !== "" || void 0,
|
|
41
42
|
className: e(d),
|
|
42
43
|
children: [/* @__PURE__ */ s("select", {
|
|
43
|
-
ref:
|
|
44
|
+
ref: M,
|
|
44
45
|
"data-slot": "trigger",
|
|
45
46
|
value: p,
|
|
46
47
|
onChange: (e) => {
|
|
47
48
|
m(e.target.value), h?.(e);
|
|
48
49
|
},
|
|
49
50
|
onKeyDown: (e) => {
|
|
50
|
-
if (e.key === "Backspace" &&
|
|
51
|
+
if (e.key === "Backspace" && N !== "") {
|
|
51
52
|
e.preventDefault(), m("");
|
|
52
53
|
return;
|
|
53
54
|
}
|
|
@@ -57,35 +58,37 @@ function p({ value: p, onChange: m, onNativeChange: h, multiple: g = !1, searcha
|
|
|
57
58
|
className: e([
|
|
58
59
|
l,
|
|
59
60
|
u[S],
|
|
60
|
-
w
|
|
61
|
+
w,
|
|
62
|
+
T?.trigger
|
|
61
63
|
]),
|
|
62
|
-
children:
|
|
63
|
-
}),
|
|
64
|
+
children: D
|
|
65
|
+
}), N !== "" && /* @__PURE__ */ s("span", {
|
|
64
66
|
"aria-hidden": "true",
|
|
65
67
|
"data-slot": "clear-button",
|
|
66
|
-
title:
|
|
68
|
+
title: A.clear,
|
|
67
69
|
onClick: (e) => {
|
|
68
|
-
e.stopPropagation(), m(""),
|
|
70
|
+
e.stopPropagation(), m(""), j.current?.focus();
|
|
69
71
|
},
|
|
70
|
-
className: e(f),
|
|
72
|
+
className: e([f, T?.clearButton]),
|
|
71
73
|
children: "×"
|
|
72
74
|
})]
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
77
|
return /* @__PURE__ */ s("select", {
|
|
76
|
-
ref:
|
|
78
|
+
ref: O,
|
|
77
79
|
"data-slot": "trigger",
|
|
78
80
|
value: p,
|
|
79
81
|
onChange: (e) => {
|
|
80
82
|
m(e.target.value), h?.(e);
|
|
81
83
|
},
|
|
82
|
-
...
|
|
84
|
+
...k,
|
|
83
85
|
className: e([
|
|
84
86
|
l,
|
|
85
87
|
u[S],
|
|
86
|
-
w
|
|
88
|
+
w,
|
|
89
|
+
T?.trigger
|
|
87
90
|
]),
|
|
88
|
-
children:
|
|
91
|
+
children: D
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
94
|
//#endregion
|