@baishuyun/ui-base 6.10.0 → 6.11.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/Amap/{Amap-BNnmSPnl.js → Amap-BLSziesG.js} +1 -1
- package/dist/Amap/AmapCircle/index.js +4 -4
- package/dist/Amap/{AmapCircle-BDW6pnNR.js → AmapCircle-2qupysHe.js} +1 -1
- package/dist/Amap/AmapMarker/index.js +5 -5
- package/dist/Amap/{AmapMarker-CdoPWdff.js → AmapMarker-xEqoVnFR.js} +2 -2
- package/dist/Amap/AmapMarkerCluster/index.js +5 -5
- package/dist/Amap/{AmapMarkerCluster-CSIxiVC5.js → AmapMarkerCluster-CvEQa3o9.js} +2 -2
- package/dist/Amap/AmapProvider/index.js +6 -5
- package/dist/Amap/{AmapProvider-Cwi6WOe0.js → AmapProvider-CvRHhN42.js} +2 -2
- package/dist/Amap/hooks/index.js +3 -3
- package/dist/Amap/{hooks-DAN31s_-.js → hooks-BTcFpdd0.js} +1 -1
- package/dist/Amap/index.js +12 -11
- package/dist/Calendar/{AllDaySection-DNsVyixx.js → AllDaySection-BqbcPQls.js} +3 -3
- package/dist/Calendar/{Calendar-DL2X3z_z.js → Calendar-BS0nzK4h.js} +12 -13
- package/dist/Calendar/{CurrentTimeIndicator-twXtFHIp.js → CurrentTimeIndicator-dRYot1Rk.js} +24 -18
- package/dist/Calendar/{EventCard-CvEnWcKd.js → EventCard-Di5UX4pB.js} +3 -4
- package/dist/Calendar/{TimeGrid-D62R57Bo.js → TimeGrid-CBpDFAM4.js} +1 -1
- package/dist/Calendar/context/index.js +2 -2
- package/dist/Calendar/index.js +21 -20
- package/dist/Calendar/subcomponents/AllDaySection/index.js +8 -7
- package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +6 -5
- package/dist/Calendar/subcomponents/EventCard/index.js +7 -6
- package/dist/Calendar/subcomponents/TimeAxis/index.js +4 -4
- package/dist/Calendar/subcomponents/TimeGrid/index.js +4 -3
- package/dist/Calendar/{theme-BRVmxhqD.js → theme-i60ueO92.js} +2 -2
- package/dist/Calendar/utils/index.js +4 -4
- package/dist/Calendar/utils/layout/index.js +3 -3
- package/dist/Calendar/utils/theme/index.js +2 -2
- package/dist/Card/index.js +2 -2
- package/dist/CheckBox/{CheckBox-CcM19LnP.js → CheckBox-nBm0u6zX.js} +1 -1
- package/dist/CheckBox/index.js +3 -3
- package/dist/ColorPicker/ColorPicker-DVwg07Gs.js +174 -0
- package/dist/ColorPicker/index.js +7 -6
- package/dist/ConfigProvider/index.js +4 -3
- package/dist/DatePicker/DatePicker-DNPnHLT2.js +101 -0
- package/dist/DatePicker/{DatePickerPanel-Bz3uvbYF.js → DatePickerPanel-TS6AxAH-.js} +5 -5
- package/dist/DatePicker/index.js +10 -9
- package/dist/DatePicker/style/index.js +2 -2
- package/dist/DatePicker/{style-BwmM26RP.js → style-UKXn1N_p.js} +1 -1
- package/dist/DropDown/DropDown-DWf5yf4l.js +178 -0
- package/dist/DropDown/index.js +11 -10
- package/dist/DropDown/style/index.js +2 -2
- package/dist/DropDown/{style-BSgosymi.js → style-LLDVPpPa.js} +1 -1
- package/dist/Editor/Buttons-BBioCubp.js +1148 -0
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +17 -16
- package/dist/Editor/constants/index.js +3 -3
- package/dist/Editor/index.js +1015 -257
- package/dist/Gantt/GanttChart/index.js +18 -17
- package/dist/Gantt/{GanttChart-6gpw5vi6.js → GanttChart-BaEW7EDO.js} +8 -10
- package/dist/Gantt/GanttTable/index.js +11 -11
- package/dist/Gantt/{GanttTable-lVu-YUtt.js → GanttTable-CdXhMHF6.js} +5 -5
- package/dist/Gantt/GanttToolBar/index.js +14 -13
- package/dist/Gantt/{GanttToolBar-CarBWZg-.js → GanttToolBar-COwsYlMG.js} +3 -4
- package/dist/Gantt/{collapseKeys-_ShTXPKt.js → collapseKeys-B4SOVHjd.js} +2 -2
- package/dist/Gantt/index.js +26 -25
- package/dist/Gantt/{theme-CiMD9Y6i.js → theme-2LyXJRDe.js} +1 -1
- package/dist/Gantt/{timelineViewConfig-CLIpppp0.js → timelineViewConfig-9HArvbmb.js} +1 -1
- package/dist/Gantt/utils/index.js +6 -6
- package/dist/Gantt/utils/theme/index.js +2 -2
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/{InputTag-DxPO0DwD.js → InputTag-Jpm8H32L.js} +2 -2
- package/dist/InputTag/index.js +5 -5
- package/dist/Loading/{Loading-CVyzO5-s.js → Loading-CiRe7i2R.js} +1 -1
- package/dist/Loading/index.js +4 -4
- package/dist/Modal/Modal-Cb7Msq26.js +96 -0
- package/dist/Modal/index.js +3 -2
- package/dist/NotFoundContent/index.js +2 -2
- package/dist/Overlay/OverlayContext-CVSFoyqN.js +23 -0
- package/dist/Overlay/index.js +3 -0
- package/dist/Radio/index.js +2 -2
- package/dist/ScrollBar/{ScrollBar-CnwYQfXM.js → ScrollBar-N2pOLv-8.js} +1 -1
- package/dist/ScrollBar/index.js +2 -2
- package/dist/Segmented/{Segmented-Ck2ZmfF7.js → Segmented-BCQRrc65.js} +1 -1
- package/dist/Segmented/index.js +2 -2
- package/dist/Select/Select-BY5Rpo3f.js +753 -0
- package/dist/Select/{SelectInputSearch-CrGW_eVo.js → SelectInputSearch-i3egm8Wy.js} +1 -1
- package/dist/Select/index.js +14 -13
- package/dist/Table/{Table-CL-KfNY3.js → Table-CSPdFGYn.js} +5 -5
- package/dist/Table/hooks/index.js +2 -2
- package/dist/Table/{hooks-uCDY9dqx.js → hooks-BceUZQQm.js} +1 -1
- package/dist/Table/index.js +8 -8
- package/dist/Table/{processRowspan-nIGqGyHh.js → processRowspan-B0WELhG2.js} +1 -1
- package/dist/Table/style/index.js +2 -2
- package/dist/Table/{style-x9xfw6te.js → style-C4wp0IOM.js} +1 -1
- package/dist/Table/utils/index.js +2 -2
- package/dist/Tabs/Tabs-C0m3mt-j.js +413 -0
- package/dist/Tabs/index.js +6 -5
- package/dist/Tooltip/Tooltip-Bb3Jx-If.js +172 -0
- package/dist/Tooltip/index.js +3 -2
- package/dist/Tree/index.js +4 -4
- package/dist/Tree/utils/index.js +1 -1
- package/dist/components/ColorPicker/ColorPalettes.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.type.d.ts +1 -7
- package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +2 -0
- package/dist/components/DatePicker/interface.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/BulletListButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/CodeButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/CodeLanguageButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/HeadingButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/IndentButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/NumberListButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/OutdentButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/RedoButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/SourceButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/StrikeThroughButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/SubscriptButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/SuperscriptButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/TableButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/UndoButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/index.d.ts +13 -0
- package/dist/components/Editor/ToolbarPlugin/context/HistoryStateProvider.d.ts +8 -0
- package/dist/components/Editor/ToolbarPlugin/context/TextFormatsContext.d.ts +10 -1
- package/dist/components/Editor/ToolbarPlugin/icons/ToolbarIcon.d.ts +13 -0
- package/dist/components/Editor/constants/codeLanguages.d.ts +69 -0
- package/dist/components/Editor/constants/index.d.ts +3 -0
- package/dist/components/Editor/context/EditorContainerContext.d.ts +0 -1
- package/dist/components/Editor/context/SourceModeContext.d.ts +9 -0
- package/dist/components/Editor/htmlConfig.d.ts +2 -0
- package/dist/components/Editor/interface.d.ts +1 -1
- package/dist/components/Editor/plugins/CodeHighlightPlugin.d.ts +1 -0
- package/dist/components/Editor/plugins/HeadingPlugin.d.ts +3 -0
- package/dist/components/Editor/plugins/LinkColorPlugin.d.ts +2 -0
- package/dist/components/Editor/plugins/PasteStripImagePlugin.d.ts +1 -0
- package/dist/components/Editor/plugins/SourceModePlugin.d.ts +7 -0
- package/dist/components/Editor/plugins/TabIndentPlugin.d.ts +1 -0
- package/dist/components/Editor/plugins/TablePlugin.d.ts +1 -0
- package/dist/components/Editor/utils/codeHighlighter.d.ts +12 -0
- package/dist/components/Editor/utils/fillRootFromHtml.d.ts +2 -0
- package/dist/components/Editor/utils/formatEditorHtml.d.ts +1 -0
- package/dist/components/Editor/utils/formatTruncatedFilename.d.ts +4 -0
- package/dist/components/Editor/utils/isEmptyEditorHtml.d.ts +1 -0
- package/dist/components/Editor/utils/sanitizeEditorHtml.d.ts +1 -0
- package/dist/components/Editor/utils/stripImagesFromHtml.d.ts +1 -0
- package/dist/components/Editor/utils/stripInlineStyleProperty.d.ts +2 -0
- package/dist/components/Editor/utils/writeHtmlSource.d.ts +1 -0
- package/dist/components/Overlay/OverlayContext.d.ts +16 -0
- package/dist/components/Overlay/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.type.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +53 -51
- package/dist/locale/lang/en-US.json.d.ts +21 -2
- package/dist/locale/lang/zh-CN.json.d.ts +21 -2
- package/dist/locale/lang/zh-TW.json.d.ts +21 -2
- package/dist/style.css +1 -1
- package/dist/vendors/{ConfigProvider-DxrZpdIb.js → ConfigProvider-4xHyyeop.js} +84 -36
- package/dist/vendors/{LocaleContext-Dcw6C1LX.js → LocaleContext-I4PW9j4M.js} +21 -2
- package/dist/vendors/{Tree-D1s-eADo.js → Tree-B09frqQX.js} +3 -2
- package/dist/vendors/{useLocale-BKZX2_zw.js → useLocale-FGYsRWSe.js} +1 -1
- package/dist/vendors/{version-L-kG2La0.js → version-BxI5QM5W.js} +1 -1
- package/package.json +10 -1
- package/dist/ColorPicker/ColorPicker-D3JuQ7a7.js +0 -153
- package/dist/DatePicker/DatePicker-Dah_CjYG.js +0 -96
- package/dist/DropDown/DropDown-Daxr9BYf.js +0 -171
- package/dist/Editor/Buttons-DG_-Sg_C.js +0 -600
- package/dist/Modal/Modal-LiztSF7x.js +0 -92
- package/dist/Select/Select-CBI5PgeQ.js +0 -746
- package/dist/Tabs/Tabs-B1RsYb2W.js +0 -409
- package/dist/Tooltip/Tooltip-DWWWYn1a.js +0 -168
- /package/dist/Amap/{AmapContext-D7Njjm5a.js → AmapContext-CJBe6lld.js} +0 -0
- /package/dist/Amap/{useMarkerInfoWindowController-BQmhR0N7.js → useMarkerInfoWindowController-Cjx0xQXw.js} +0 -0
- /package/dist/Calendar/{TimeAxis-D7bgZDKs.js → TimeAxis-C9e2BdYs.js} +0 -0
- /package/dist/Calendar/{colorUtils-lXNjGoCk.js → colorUtils-CBLTsDX0.js} +0 -0
- /package/dist/Calendar/{context-CBJnz0IH.js → context-4tCN5X33.js} +0 -0
- /package/dist/Calendar/{layout-BglMom3m.js → layout-Dz-grtu9.js} +0 -0
- /package/dist/Card/{Card-CtKLNh3n.js → Card-Ds5Rpq--.js} +0 -0
- /package/dist/CheckBox/{CheckBox-Bb0UuX1Y.js → CheckBox-ByWSy9Yr.js} +0 -0
- /package/dist/DatePicker/{ensureDayjsPlugins-CVL-fnAl.js → ensureDayjsPlugins-Cn9Bkjkj.js} +0 -0
- /package/dist/DatePicker/{pickerLocale-BeMlfhKu.js → pickerLocale-BRnNjLcv.js} +0 -0
- /package/dist/Gantt/{GanttHighlightContext-grda5bhd.js → GanttHighlightContext-ChThr8ia.js} +0 -0
- /package/dist/Gantt/{columnResize-DV1tSBx_.js → columnResize-jG0Wy2PC.js} +0 -0
- /package/dist/Gantt/{constants-BObDP0h6.js → constants-LIz5jwed.js} +0 -0
- /package/dist/Gantt/{highlightTarget-DrP0_NrM.js → highlightTarget-BpkYTonb.js} +0 -0
- /package/dist/NotFoundContent/{NotFoundContent-J-TEnljc.js → NotFoundContent-BLmzWNBi.js} +0 -0
- /package/dist/Radio/{Radio-CBUZ7DB5.js → Radio-CX9cUqb7.js} +0 -0
- /package/dist/Table/{constants-CcwjDbe7.js → constants-kRpjsoet.js} +0 -0
- /package/dist/vendors/{animations-Mlw78WYo.js → animations-rwUbyoT0.js} +0 -0
- /package/dist/vendors/{cssVars-B8o94Yao.js → cssVars-l4-kP_14.js} +0 -0
- /package/dist/vendors/{mergeRefs-Bai1cIzv.js → mergeRefs-TiJ0xjUN.js} +0 -0
- /package/dist/vendors/{useFloatingOverlay-BApqkHSu.js → useFloatingOverlay-B3M9k8nj.js} +0 -0
- /package/dist/vendors/{useFloatingPortal-C8V67X0v.js → useFloatingPortal-CmVJbuRm.js} +0 -0
- /package/dist/vendors/{useLatchedPopupPortalRoot-hwf14FJ5.js → useLatchedPopupPortalRoot-4fVhqVT4.js} +0 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { t as e } from "../Icon/Icon-BBDcb-yw.js";
|
|
2
|
+
import { a as t, i as n } from "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
3
|
+
import { t as r } from "../vendors/useFloatingOverlay-B3M9k8nj.js";
|
|
4
|
+
import { t as i } from "../vendors/useLocale-FGYsRWSe.js";
|
|
5
|
+
import { n as a } from "../vendors/animations-rwUbyoT0.js";
|
|
6
|
+
import { t as o } from "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
|
|
7
|
+
import { n as s } from "../vendors/mergeRefs-TiJ0xjUN.js";
|
|
8
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
+
import { cloneElement as d, isValidElement as f, useRef as p, useState as m } from "react";
|
|
10
|
+
import { ColorPicker as h } from "antd";
|
|
11
|
+
import g from "clsx";
|
|
12
|
+
import { useControllableValue as _, useSize as v } from "ahooks";
|
|
13
|
+
import { AnimatePresence as y, motion as b } from "motion/react";
|
|
14
|
+
import { FloatingPortal as x } from "@floating-ui/react";
|
|
15
|
+
import S from "tinycolor2";
|
|
16
|
+
//#region src/components/ColorPicker/constants.ts
|
|
17
|
+
var C = {
|
|
18
|
+
vivid: /* @__PURE__ */ "#fee4de.#ffecd7.#ffe8e3.#fff1c0.#efffc0.#d7ffeb.#d8f4ff.#dfe7ff.#ebdefa.#ffdef1.#e8eaef.#ffbaaa.#fbcf9c.#ffd2c9.#ffe692.#d9f38c.#a6f6cf.#9adbf3.#aec3fe.#c9b0e6.#ffb4df.#d8dbe3.#f06648.#ff9921.#ff9c88.#ffc502.#a2ce1e.#4acc8c.#4ac0ec.#3767f1.#9362ce.#f168b6.#6b6e76.#cd3514.#c4771b.#db674f.#c79f1c.#7b9728.#21a664.#00a3e0.#003ce8.#6f25ca.#df2a91.#2d3447".split("."),
|
|
19
|
+
basic: /* @__PURE__ */ "#005eef.#3642e9.#7f43c8.#114bb8.#1379d9.#10a9c4.#119d85.#ffc502.#ff9921.#f06648.#f168b6.#d9e8ff.#dee0ff.#efe2ff.#d5e4ff.#daedff.#ddfaff.#d7fff8.#fff4d0.#ffecd7.#ffe3dd.#ffdef1.#262626.#3c3c3d.#454545.#515152.#5d5c5e.#6c6c6e.#878789.#b0afb1.#d0d0d1.#e6e6e7.#f5f5f6".split(".")
|
|
20
|
+
}, w = [
|
|
21
|
+
"rgba(240, 102, 72, 1)",
|
|
22
|
+
"rgba(255, 197, 2, 1)",
|
|
23
|
+
"rgba(74, 204, 140, 1)",
|
|
24
|
+
"rgba(74, 192, 236, 1)",
|
|
25
|
+
"rgba(255, 153, 33, 1)",
|
|
26
|
+
"rgba(101, 101, 101, 1)",
|
|
27
|
+
"rgba(255, 156, 136, 1)",
|
|
28
|
+
"rgba(98, 98, 206, 1)",
|
|
29
|
+
"rgba(241, 104, 182, 1)",
|
|
30
|
+
"rgba(55, 103, 241, 1)",
|
|
31
|
+
"rgba(162, 206, 30, 1)",
|
|
32
|
+
"rgba(179, 179, 179, 1)",
|
|
33
|
+
"rgba(0, 0, 0, 1)",
|
|
34
|
+
"rgba(102, 102, 102, 1)",
|
|
35
|
+
"rgba(153, 153, 153, 1)",
|
|
36
|
+
"rgba(194, 194, 194, 1)",
|
|
37
|
+
"rgba(224, 224, 224, 1)",
|
|
38
|
+
"rgba(77, 96, 159, 1)"
|
|
39
|
+
], T = (e) => Array.isArray(e) ? e.length > 0 ? e : C.vivid : C[e ?? "vivid"], E = (e = "bottom-start") => r({ placement: e }), D = {
|
|
40
|
+
"bsy-color-picker__floating": "_bsy-color-picker__floating_1fqmv_1",
|
|
41
|
+
"bsy-color-picker__content": "_bsy-color-picker__content_1fqmv_4",
|
|
42
|
+
"bsy-color-picker__grid": "_bsy-color-picker__grid_1fqmv_15",
|
|
43
|
+
"bsy-color-picker__preset-colors-title": "_bsy-color-picker__preset-colors-title_1fqmv_19",
|
|
44
|
+
"bsy-color-picker__custom-color-title": "_bsy-color-picker__custom-color-title_1fqmv_19",
|
|
45
|
+
"bsy-color-picker__preset-colors-grid": "_bsy-color-picker__preset-colors-grid_1fqmv_24",
|
|
46
|
+
"bsy-color-picker__preset-colors-grid--inline": "_bsy-color-picker__preset-colors-grid--inline_1fqmv_29",
|
|
47
|
+
"bsy-color-picker__preset-colors-item": "_bsy-color-picker__preset-colors-item_1fqmv_35",
|
|
48
|
+
"bsy-color-picker__preset-colors-item--selected": "_bsy-color-picker__preset-colors-item--selected_1fqmv_59",
|
|
49
|
+
"bsy-color-picker__preset-colors-swatch": "_bsy-color-picker__preset-colors-swatch_1fqmv_62",
|
|
50
|
+
"bsy-color-picker__custom-color-btn": "_bsy-color-picker__custom-color-btn_1fqmv_68",
|
|
51
|
+
"bsy-color-picker__custom-color-btn--active": "_bsy-color-picker__custom-color-btn--active_1fqmv_84",
|
|
52
|
+
"bsy-color-picker__custom-color-btn--preview": "_bsy-color-picker__custom-color-btn--preview_1fqmv_89",
|
|
53
|
+
"bsy-color-picker__custom-color-content": "_bsy-color-picker__custom-color-content_1fqmv_94",
|
|
54
|
+
"bsy-color-picker__custom-color-swatches": "_bsy-color-picker__custom-color-swatches_1fqmv_101"
|
|
55
|
+
}, O = 11, k = (e, t, n) => {
|
|
56
|
+
if (!n) return e[t];
|
|
57
|
+
let r = t % O;
|
|
58
|
+
return n === "vivid" ? e[O * 2 + r] ?? e[t] : Math.floor(t / O) === 2 ? e[O * 2] ?? e[t] : e[r] ?? e[t];
|
|
59
|
+
}, A = ({ currentColor: e, onColorSelect: t, options: n, className: r, palette: i }) => {
|
|
60
|
+
let a = e ? S(e).toRgbString() : "";
|
|
61
|
+
return /* @__PURE__ */ l("div", {
|
|
62
|
+
className: g(D["bsy-color-picker__preset-colors-grid"], r),
|
|
63
|
+
style: { "--preset-cols": Math.min(n.length, 11) },
|
|
64
|
+
children: n.map((e, r) => /* @__PURE__ */ l("div", {
|
|
65
|
+
className: g(D["bsy-color-picker__preset-colors-item"], { [D["bsy-color-picker__preset-colors-item--selected"]]: !!a && S(e).toRgbString() === a }),
|
|
66
|
+
style: {
|
|
67
|
+
"--swatch-color": e,
|
|
68
|
+
"--swatch-ring": k(n, r, i)
|
|
69
|
+
},
|
|
70
|
+
onClick: () => t(e),
|
|
71
|
+
children: /* @__PURE__ */ l("span", { className: D["bsy-color-picker__preset-colors-swatch"] })
|
|
72
|
+
}, e))
|
|
73
|
+
});
|
|
74
|
+
}, j = 26, M = 4, N = (e) => {
|
|
75
|
+
let { children: r, placement: m = "bottom-start", disabled: h = !1, presetColors: g, getPopupContainer: v } = e, { t: S } = i(), C = t(), w = p(null), [O, k] = _(e, { defaultValue: e.value }), { isOpen: j, refs: M, floatingStyles: N, getReferenceProps: F, getFloatingProps: I } = E(m), L = f(r) ? d(r, {
|
|
76
|
+
...F(),
|
|
77
|
+
ref: M.setReference,
|
|
78
|
+
disabled: h
|
|
79
|
+
}) : r, R = T(g), z = p([]), { portalRoot: B, portalMountKey: V, handleExitComplete: H } = o(j, v);
|
|
80
|
+
return /* @__PURE__ */ u(c, { children: [L, /* @__PURE__ */ l(x, {
|
|
81
|
+
root: B,
|
|
82
|
+
children: /* @__PURE__ */ l(y, {
|
|
83
|
+
onExitComplete: H,
|
|
84
|
+
children: j ? /* @__PURE__ */ l(n, {
|
|
85
|
+
zIndex: C,
|
|
86
|
+
children: /* @__PURE__ */ l(b.div, {
|
|
87
|
+
ref: s(M.setFloating, w),
|
|
88
|
+
style: {
|
|
89
|
+
...N,
|
|
90
|
+
"--bsy-color-picker-z-index": C
|
|
91
|
+
},
|
|
92
|
+
...I(),
|
|
93
|
+
className: D["bsy-color-picker__floating"],
|
|
94
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
95
|
+
...a,
|
|
96
|
+
children: /* @__PURE__ */ l("div", {
|
|
97
|
+
className: D["bsy-color-picker__content"],
|
|
98
|
+
children: /* @__PURE__ */ u("div", {
|
|
99
|
+
className: D["bsy-color-picker__grid"],
|
|
100
|
+
children: [/* @__PURE__ */ u("div", {
|
|
101
|
+
className: D["bsy-color-picker__preset-colors"],
|
|
102
|
+
children: [/* @__PURE__ */ l("div", {
|
|
103
|
+
className: D["bsy-color-picker__preset-colors-title"],
|
|
104
|
+
children: S("presetColors")
|
|
105
|
+
}), /* @__PURE__ */ l(A, {
|
|
106
|
+
currentColor: O,
|
|
107
|
+
onColorSelect: k,
|
|
108
|
+
options: R,
|
|
109
|
+
palette: Array.isArray(g) ? void 0 : g ?? "vivid"
|
|
110
|
+
})]
|
|
111
|
+
}), /* @__PURE__ */ l(P, {
|
|
112
|
+
value: O,
|
|
113
|
+
onChange: k,
|
|
114
|
+
onColorInput: e.onColorInput,
|
|
115
|
+
list: z.current,
|
|
116
|
+
getPopupContainer: () => w.current
|
|
117
|
+
})]
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
}, "bsy-color-picker-panel")
|
|
121
|
+
}) : null
|
|
122
|
+
})
|
|
123
|
+
}, V)] });
|
|
124
|
+
}, P = (t) => {
|
|
125
|
+
let { list: n, getPopupContainer: r } = t, [a, o] = m(), [s, c] = m(!1), d = p(null), f = v(d), _ = f?.width ? Math.max(0, Math.floor((f.width + M) / (j + M))) : 5, { t: y } = i();
|
|
126
|
+
return /* @__PURE__ */ u("div", {
|
|
127
|
+
className: D["bsy-color-picker__custom-color"],
|
|
128
|
+
children: [/* @__PURE__ */ l("div", {
|
|
129
|
+
className: D["bsy-color-picker__custom-color-title"],
|
|
130
|
+
children: y("customColor")
|
|
131
|
+
}), /* @__PURE__ */ u("div", {
|
|
132
|
+
className: D["bsy-color-picker__custom-color-content"],
|
|
133
|
+
children: [/* @__PURE__ */ l(h, {
|
|
134
|
+
getPopupContainer: r,
|
|
135
|
+
value: a ?? t.value,
|
|
136
|
+
onChange: (e) => {
|
|
137
|
+
let n = e.toRgbString();
|
|
138
|
+
o(n), t.onColorInput?.(n);
|
|
139
|
+
},
|
|
140
|
+
open: s,
|
|
141
|
+
onOpenChange: (e) => {
|
|
142
|
+
c(e), !e && a && (n.includes(a) || n.unshift(a), t.onChange(a), o(void 0));
|
|
143
|
+
},
|
|
144
|
+
children: /* @__PURE__ */ l("div", {
|
|
145
|
+
className: g(D["bsy-color-picker__custom-color-btn"], {
|
|
146
|
+
[D["bsy-color-picker__custom-color-btn--active"]]: s && !a,
|
|
147
|
+
[D["bsy-color-picker__custom-color-btn--preview"]]: !!a
|
|
148
|
+
}),
|
|
149
|
+
role: "button",
|
|
150
|
+
style: { backgroundColor: a || void 0 },
|
|
151
|
+
onClick: () => {
|
|
152
|
+
c(!0);
|
|
153
|
+
},
|
|
154
|
+
children: /* @__PURE__ */ l(e, {
|
|
155
|
+
name: "add",
|
|
156
|
+
style: { visibility: a ? "hidden" : "visible" }
|
|
157
|
+
})
|
|
158
|
+
})
|
|
159
|
+
}), /* @__PURE__ */ l("div", {
|
|
160
|
+
ref: d,
|
|
161
|
+
className: D["bsy-color-picker__custom-color-swatches"],
|
|
162
|
+
children: /* @__PURE__ */ l(A, {
|
|
163
|
+
currentColor: t.value,
|
|
164
|
+
onColorSelect: t.onChange,
|
|
165
|
+
options: n.slice(0, _),
|
|
166
|
+
className: D["bsy-color-picker__preset-colors-grid--inline"]
|
|
167
|
+
})
|
|
168
|
+
})]
|
|
169
|
+
})]
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
N.displayName = "BsyColorPicker";
|
|
173
|
+
//#endregion
|
|
174
|
+
export { w as n, N as t };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-BxI5QM5W.js";
|
|
2
2
|
import "../Icon/Icon-BBDcb-yw.js";
|
|
3
|
-
import "../vendors/LocaleContext-
|
|
4
|
-
import
|
|
5
|
-
import "
|
|
6
|
-
import "../vendors/
|
|
7
|
-
import "../vendors/
|
|
3
|
+
import "../vendors/LocaleContext-I4PW9j4M.js";
|
|
4
|
+
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
5
|
+
import { n as e, t } from "./ColorPicker-DVwg07Gs.js";
|
|
6
|
+
import "../vendors/useFloatingOverlay-B3M9k8nj.js";
|
|
7
|
+
import "../vendors/useLocale-FGYsRWSe.js";
|
|
8
|
+
import "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
|
|
8
9
|
export { e as COLOR_OPTIONS_RGBA, t as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
2
|
-
import "../vendors/LocaleContext-
|
|
3
|
-
import { n as e, t } from "../vendors/ConfigProvider-
|
|
1
|
+
import "../vendors/version-BxI5QM5W.js";
|
|
2
|
+
import "../vendors/LocaleContext-I4PW9j4M.js";
|
|
3
|
+
import { n as e, t } from "../vendors/ConfigProvider-4xHyyeop.js";
|
|
4
|
+
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
4
5
|
export { t as ConfigProvider, t as default, e as useConfig };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { a as e, i as t } from "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
2
|
+
import { t as n } from "../vendors/useFloatingOverlay-B3M9k8nj.js";
|
|
3
|
+
import { t as r } from "../vendors/useLocale-FGYsRWSe.js";
|
|
4
|
+
import { n as i } from "../vendors/animations-rwUbyoT0.js";
|
|
5
|
+
import { t as a } from "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
|
|
6
|
+
import { n as o } from "./pickerLocale-BRnNjLcv.js";
|
|
7
|
+
import { t as s } from "./style-UKXn1N_p.js";
|
|
8
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
+
import { Suspense as d, cloneElement as f, isValidElement as p, lazy as m, useCallback as h, useMemo as g } from "react";
|
|
10
|
+
import _ from "clsx";
|
|
11
|
+
import { useControllableValue as v } from "ahooks";
|
|
12
|
+
import { AnimatePresence as y, motion as b } from "motion/react";
|
|
13
|
+
import { FloatingPortal as x } from "@floating-ui/react";
|
|
14
|
+
import S from "dayjs";
|
|
15
|
+
var C = {
|
|
16
|
+
footer: "_footer_h6lng_1",
|
|
17
|
+
today: "_today_h6lng_11"
|
|
18
|
+
}, w = ({ onClick: e }) => {
|
|
19
|
+
let { t } = r();
|
|
20
|
+
return /* @__PURE__ */ l("div", {
|
|
21
|
+
className: C.footer,
|
|
22
|
+
children: /* @__PURE__ */ l("button", {
|
|
23
|
+
type: "button",
|
|
24
|
+
className: C.today,
|
|
25
|
+
onClick: e,
|
|
26
|
+
children: t("datePicker.today")
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}, T = (e, t) => {
|
|
30
|
+
switch (t) {
|
|
31
|
+
case "week": return e.startOf("isoWeek");
|
|
32
|
+
case "month": return e.startOf("month");
|
|
33
|
+
case "year": return e.startOf("year");
|
|
34
|
+
default: return e.startOf("day");
|
|
35
|
+
}
|
|
36
|
+
}, E = {
|
|
37
|
+
"bsy-date-picker": "_bsy-date-picker_1i2le_1",
|
|
38
|
+
"bsy-date-picker__content": "_bsy-date-picker__content_1i2le_33",
|
|
39
|
+
"bsy-date-picker__divider": "_bsy-date-picker__divider_1i2le_43",
|
|
40
|
+
"bsy-date-picker__panel-loading": "_bsy-date-picker__panel-loading_1i2le_49"
|
|
41
|
+
}, D = m(() => import("./DatePickerPanel-TS6AxAH-.js")), O = (m) => {
|
|
42
|
+
let { children: C, picker: O = "date", theme: k, getPopupContainer: A, triggerActiveClassName: j, zIndex: M } = m, { locale: N } = r(), P = e(M), [F, I] = v(m, {
|
|
43
|
+
defaultValuePropName: "defaultValue",
|
|
44
|
+
valuePropName: "value",
|
|
45
|
+
trigger: "onChange",
|
|
46
|
+
defaultValue: S().locale(o(N)).startOf("day")
|
|
47
|
+
}), { isOpen: L, setIsOpen: R, refs: z, floatingStyles: B, getReferenceProps: V, getFloatingProps: H } = n(), U = h((e) => {
|
|
48
|
+
e && (I(T(e, O)), R(!1));
|
|
49
|
+
}, [
|
|
50
|
+
O,
|
|
51
|
+
I,
|
|
52
|
+
R
|
|
53
|
+
]), W = h(() => {
|
|
54
|
+
U(S().locale(o(N)));
|
|
55
|
+
}, [U, N]), G = g(() => s(k), [k]), { portalRoot: K, portalMountKey: q, handleExitComplete: J } = a(L, A);
|
|
56
|
+
return p(C), /* @__PURE__ */ u(c, { children: [p(C) ? f(C, {
|
|
57
|
+
...V({ className: _(C.props.className, L && j) }),
|
|
58
|
+
ref: z.setReference
|
|
59
|
+
}) : C, /* @__PURE__ */ l(x, {
|
|
60
|
+
root: K,
|
|
61
|
+
children: /* @__PURE__ */ l(y, {
|
|
62
|
+
onExitComplete: J,
|
|
63
|
+
children: L ? /* @__PURE__ */ l(t, {
|
|
64
|
+
zIndex: P,
|
|
65
|
+
children: /* @__PURE__ */ l(b.div, {
|
|
66
|
+
ref: z.setFloating,
|
|
67
|
+
style: {
|
|
68
|
+
...B,
|
|
69
|
+
...G,
|
|
70
|
+
"--bsy-date-picker-z-index": P
|
|
71
|
+
},
|
|
72
|
+
...H(),
|
|
73
|
+
"data-bsy-date-picker": !0,
|
|
74
|
+
className: E["bsy-date-picker"],
|
|
75
|
+
...i,
|
|
76
|
+
children: /* @__PURE__ */ u("div", {
|
|
77
|
+
className: E["bsy-date-picker__content"],
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ l(d, {
|
|
80
|
+
fallback: /* @__PURE__ */ l("div", {
|
|
81
|
+
className: E["bsy-date-picker__panel-loading"],
|
|
82
|
+
"aria-hidden": !0
|
|
83
|
+
}),
|
|
84
|
+
children: /* @__PURE__ */ l(D, {
|
|
85
|
+
picker: O,
|
|
86
|
+
value: F,
|
|
87
|
+
onChange: U
|
|
88
|
+
})
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ l("div", { className: E["bsy-date-picker__divider"] }),
|
|
91
|
+
/* @__PURE__ */ l(w, { onClick: W })
|
|
92
|
+
]
|
|
93
|
+
})
|
|
94
|
+
}, "bsy-date-picker-panel")
|
|
95
|
+
}) : null
|
|
96
|
+
})
|
|
97
|
+
}, q)] });
|
|
98
|
+
};
|
|
99
|
+
O.displayName = "BsyDatePicker";
|
|
100
|
+
//#endregion
|
|
101
|
+
export { O as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-BxI5QM5W.js";
|
|
2
2
|
import { t as e } from "../Icon/Icon-BBDcb-yw.js";
|
|
3
|
-
import "../vendors/LocaleContext-
|
|
4
|
-
import { t } from "../vendors/useLocale-
|
|
5
|
-
import "./ensureDayjsPlugins-
|
|
6
|
-
import { t as n } from "./pickerLocale-
|
|
3
|
+
import "../vendors/LocaleContext-I4PW9j4M.js";
|
|
4
|
+
import { t } from "../vendors/useLocale-FGYsRWSe.js";
|
|
5
|
+
import "./ensureDayjsPlugins-Cn9Bkjkj.js";
|
|
6
|
+
import { t as n } from "./pickerLocale-BRnNjLcv.js";
|
|
7
7
|
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
8
8
|
import { useCallback as o, useEffect as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
9
9
|
import { clsx as f } from "clsx";
|
package/dist/DatePicker/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
2
|
-
import "../vendors/LocaleContext-
|
|
3
|
-
import "../
|
|
4
|
-
import "../vendors/
|
|
5
|
-
import "../vendors/
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
1
|
+
import "../vendors/version-BxI5QM5W.js";
|
|
2
|
+
import "../vendors/LocaleContext-I4PW9j4M.js";
|
|
3
|
+
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
4
|
+
import "../vendors/useFloatingOverlay-B3M9k8nj.js";
|
|
5
|
+
import "../vendors/useLocale-FGYsRWSe.js";
|
|
6
|
+
import "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
|
|
7
|
+
import { t as e } from "./DatePicker-DNPnHLT2.js";
|
|
8
|
+
import "./ensureDayjsPlugins-Cn9Bkjkj.js";
|
|
9
|
+
import "./pickerLocale-BRnNjLcv.js";
|
|
10
|
+
import "./style-UKXn1N_p.js";
|
|
10
11
|
export { e as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../../vendors/version-
|
|
2
|
-
import { t as e } from "../style-
|
|
1
|
+
import "../../vendors/version-BxI5QM5W.js";
|
|
2
|
+
import { t as e } from "../style-UKXn1N_p.js";
|
|
3
3
|
export { e as resolveDatePickerThemeVars };
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { a as e, i as t } from "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
2
|
+
import { t as n } from "../vendors/useLocale-FGYsRWSe.js";
|
|
3
|
+
import { n as r } from "../vendors/animations-rwUbyoT0.js";
|
|
4
|
+
import { t as i } from "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
|
|
5
|
+
import { t as a } from "../Select/SelectInputSearch-i3egm8Wy.js";
|
|
6
|
+
import { t as o } from "../NotFoundContent/NotFoundContent-BLmzWNBi.js";
|
|
7
|
+
import { t as s } from "../ScrollBar/ScrollBar-N2pOLv-8.js";
|
|
8
|
+
import { t as c } from "../vendors/useFloatingPortal-CmVJbuRm.js";
|
|
9
|
+
import { t as l } from "./style-LLDVPpPa.js";
|
|
10
|
+
import { isEmpty as u, isNumber as d } from "lodash-es";
|
|
11
|
+
import { Fragment as ee, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
|
+
import { cloneElement as m, isValidElement as h, memo as g, useMemo as _, useState as v } from "react";
|
|
13
|
+
import { clsx as y } from "clsx";
|
|
14
|
+
import { useControllableValue as b } from "ahooks";
|
|
15
|
+
import { AnimatePresence as x, motion as S } from "motion/react";
|
|
16
|
+
import { FloatingPortal as C } from "@floating-ui/react";
|
|
17
|
+
import w from "fuse.js";
|
|
18
|
+
//#region src/hooks/useDropdownSearch.ts
|
|
19
|
+
var T = ({ menus: e, searchValue: t, enableInternalFilter: n, searchKey: r }) => {
|
|
20
|
+
let i = _(() => new w(e, {
|
|
21
|
+
keys: [r],
|
|
22
|
+
ignoreLocation: !0,
|
|
23
|
+
threshold: .3,
|
|
24
|
+
getFn: (e, t) => {
|
|
25
|
+
let n = e[t];
|
|
26
|
+
return t === "label" && typeof n != "string" ? "" : String(n || "");
|
|
27
|
+
}
|
|
28
|
+
}), [e, r]), a = _(() => !n || u(t) ? e : i.search(t).map((e) => e.item), [
|
|
29
|
+
e,
|
|
30
|
+
t,
|
|
31
|
+
n,
|
|
32
|
+
i
|
|
33
|
+
]);
|
|
34
|
+
return {
|
|
35
|
+
filteredMenus: a,
|
|
36
|
+
hasNoResults: _(() => n && !u(t) && a.length === 0, [
|
|
37
|
+
n,
|
|
38
|
+
t,
|
|
39
|
+
a.length
|
|
40
|
+
])
|
|
41
|
+
};
|
|
42
|
+
}, E = "_dropdown__trigger_1fafn_1", D = "_dropdown__panel_1fafn_7", O = "_dropdown__search_1fafn_15", k = "_dropdown__menu_1fafn_19", A = {
|
|
43
|
+
dropdown__trigger: E,
|
|
44
|
+
"dropdown__trigger--disabled": "_dropdown__trigger--disabled_1fafn_4",
|
|
45
|
+
dropdown__panel: D,
|
|
46
|
+
dropdown__search: O,
|
|
47
|
+
dropdown__menu: k,
|
|
48
|
+
"dropdown__menu-item": "_dropdown__menu-item_1fafn_22",
|
|
49
|
+
"dropdown__menu-item--disabled": "_dropdown__menu-item--disabled_1fafn_34",
|
|
50
|
+
"dropdown__menu-item--active": "_dropdown__menu-item--active_1fafn_34",
|
|
51
|
+
"dropdown__menu-item-icon": "_dropdown__menu-item-icon_1fafn_41",
|
|
52
|
+
"system-field": "_system-field_1fafn_52",
|
|
53
|
+
"dropdown__menu-item-label": "_dropdown__menu-item-label_1fafn_63"
|
|
54
|
+
}, j = g(({ item: e, onClick: t, isActive: n = !1 }) => {
|
|
55
|
+
let r = () => {
|
|
56
|
+
e.disabled || t(e);
|
|
57
|
+
}, i = e.systemField || !1;
|
|
58
|
+
return /* @__PURE__ */ p("div", {
|
|
59
|
+
className: y(A["dropdown__menu-item"], {
|
|
60
|
+
[A["dropdown__menu-item--disabled"]]: e.disabled,
|
|
61
|
+
[A["dropdown__menu-item--active"]]: n && !e.disabled,
|
|
62
|
+
"text-[#4d609f]": i && !e.disabled && !n
|
|
63
|
+
}),
|
|
64
|
+
onClick: r,
|
|
65
|
+
children: [e.icon && /* @__PURE__ */ f("div", {
|
|
66
|
+
className: y(A["dropdown__menu-item-icon"], { [A["system-field"]]: i && !e.disabled && !n }),
|
|
67
|
+
children: e.icon
|
|
68
|
+
}), /* @__PURE__ */ f("div", {
|
|
69
|
+
className: y(A["dropdown__menu-item-label"], "truncate"),
|
|
70
|
+
children: e.label
|
|
71
|
+
})]
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
j.displayName = "BsyDropDownMenuItem";
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/DropDown/MenuList/MenuList.tsx
|
|
77
|
+
var M = ({ menus: e, onClick: t, hasNoResults: r, activeKey: i = [] }) => {
|
|
78
|
+
let { t: a } = n();
|
|
79
|
+
return e.length === 0 ? /* @__PURE__ */ f(o, {
|
|
80
|
+
text: a("noData"),
|
|
81
|
+
className: "px-3 py-6"
|
|
82
|
+
}) : r ? /* @__PURE__ */ f(o, {
|
|
83
|
+
text: a("noDataFound"),
|
|
84
|
+
className: "px-3 py-6"
|
|
85
|
+
}) : /* @__PURE__ */ f("div", {
|
|
86
|
+
className: A.dropdown__menu,
|
|
87
|
+
children: e.map((e) => /* @__PURE__ */ f(j, {
|
|
88
|
+
item: e,
|
|
89
|
+
onClick: t,
|
|
90
|
+
isActive: i.includes(e.key)
|
|
91
|
+
}, e.key))
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
M.displayName = "BsyDropDownMenuList";
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/components/DropDown/DropDown.tsx
|
|
97
|
+
var N = (o) => {
|
|
98
|
+
let { t: u } = n(), { children: g, menus: y, onClick: w, onSearch: E, searchKey: D = "label", showSearch: O = !0, closeOnSelect: k = !0, searchPlaceholder: j = u("search"), offset: N = {
|
|
99
|
+
x: 0,
|
|
100
|
+
y: 0
|
|
101
|
+
}, zIndex: P, style: F, activeKey: I = [], getPopupContainer: L, theme: R } = o, z = e(P), [B, V] = b(o, {
|
|
102
|
+
valuePropName: "visible",
|
|
103
|
+
defaultValue: !1,
|
|
104
|
+
trigger: "onOpenChange"
|
|
105
|
+
}), [H, U] = v(""), W = () => {
|
|
106
|
+
V(!B);
|
|
107
|
+
}, G = () => {
|
|
108
|
+
V(!1);
|
|
109
|
+
}, K = (e) => {
|
|
110
|
+
e.disabled || (w?.(e), k && G());
|
|
111
|
+
}, q = (e) => {
|
|
112
|
+
U(e), E?.(e);
|
|
113
|
+
}, { filteredMenus: J, hasNoResults: Y } = T({
|
|
114
|
+
menus: y,
|
|
115
|
+
searchValue: H,
|
|
116
|
+
enableInternalFilter: !E,
|
|
117
|
+
searchKey: D
|
|
118
|
+
}), { refs: X, floatingStyles: Z, getReferenceProps: Q, getFloatingProps: te } = c({
|
|
119
|
+
isOpen: B,
|
|
120
|
+
close: G,
|
|
121
|
+
showMask: !1,
|
|
122
|
+
zIndex: z,
|
|
123
|
+
offset: {
|
|
124
|
+
x: d(N.x) ? N.x : 0,
|
|
125
|
+
y: d(N.y) ? N.y : 0
|
|
126
|
+
}
|
|
127
|
+
}), $ = h(g) ? m(g, {
|
|
128
|
+
...Q(),
|
|
129
|
+
ref: X.setReference,
|
|
130
|
+
onClick: (e) => {
|
|
131
|
+
W(), g.props.onClick?.(e);
|
|
132
|
+
}
|
|
133
|
+
}) : g, { portalRoot: ne, portalMountKey: re, handleExitComplete: ie } = i(B, L), ae = _(() => l(R), [R]);
|
|
134
|
+
return /* @__PURE__ */ p(ee, { children: [$, /* @__PURE__ */ f(C, {
|
|
135
|
+
root: ne,
|
|
136
|
+
children: /* @__PURE__ */ f(x, {
|
|
137
|
+
onExitComplete: ie,
|
|
138
|
+
children: B ? /* @__PURE__ */ f(t, {
|
|
139
|
+
zIndex: z,
|
|
140
|
+
children: /* @__PURE__ */ f(S.div, {
|
|
141
|
+
ref: X.setFloating,
|
|
142
|
+
...te(),
|
|
143
|
+
style: {
|
|
144
|
+
...Z,
|
|
145
|
+
zIndex: z
|
|
146
|
+
},
|
|
147
|
+
...r,
|
|
148
|
+
children: /* @__PURE__ */ p("div", {
|
|
149
|
+
className: A.dropdown__panel,
|
|
150
|
+
style: {
|
|
151
|
+
...ae,
|
|
152
|
+
...F
|
|
153
|
+
},
|
|
154
|
+
children: [O && /* @__PURE__ */ f("div", {
|
|
155
|
+
className: A.dropdown__search,
|
|
156
|
+
children: /* @__PURE__ */ f(a, {
|
|
157
|
+
value: H,
|
|
158
|
+
onChange: q,
|
|
159
|
+
searchPlaceholder: j
|
|
160
|
+
})
|
|
161
|
+
}), /* @__PURE__ */ f(s, {
|
|
162
|
+
style: { maxHeight: 300 },
|
|
163
|
+
children: /* @__PURE__ */ f(M, {
|
|
164
|
+
menus: J,
|
|
165
|
+
onClick: K,
|
|
166
|
+
hasNoResults: Y,
|
|
167
|
+
activeKey: I
|
|
168
|
+
})
|
|
169
|
+
})]
|
|
170
|
+
})
|
|
171
|
+
}, "bsy-dropdown-panel")
|
|
172
|
+
}) : null
|
|
173
|
+
})
|
|
174
|
+
}, re)] });
|
|
175
|
+
};
|
|
176
|
+
N.displayName = "BsyDropDown";
|
|
177
|
+
//#endregion
|
|
178
|
+
export { N as t };
|
package/dist/DropDown/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-BxI5QM5W.js";
|
|
2
2
|
import "../ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import "../Icon/Icon-BBDcb-yw.js";
|
|
4
|
-
import "../vendors/LocaleContext-
|
|
5
|
-
import "../
|
|
6
|
-
import "../vendors/
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import
|
|
12
|
-
import "./
|
|
4
|
+
import "../vendors/LocaleContext-I4PW9j4M.js";
|
|
5
|
+
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
6
|
+
import "../vendors/useLocale-FGYsRWSe.js";
|
|
7
|
+
import "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
|
|
8
|
+
import "../Select/SelectInputSearch-i3egm8Wy.js";
|
|
9
|
+
import "../NotFoundContent/NotFoundContent-BLmzWNBi.js";
|
|
10
|
+
import "../ScrollBar/ScrollBar-N2pOLv-8.js";
|
|
11
|
+
import "../vendors/useFloatingPortal-CmVJbuRm.js";
|
|
12
|
+
import { t as e } from "./DropDown-DWf5yf4l.js";
|
|
13
|
+
import "./style-LLDVPpPa.js";
|
|
13
14
|
export { e as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../../vendors/version-
|
|
2
|
-
import { t as e } from "../style-
|
|
1
|
+
import "../../vendors/version-BxI5QM5W.js";
|
|
2
|
+
import { t as e } from "../style-LLDVPpPa.js";
|
|
3
3
|
export { e as resolveDropDownThemeVars };
|