@baishuyun/ui-base 6.9.1 → 6.10.1
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-DqFp3DZ5.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-a96dIzs3.js → AllDaySection-BqbcPQls.js} +1 -1
- package/dist/Calendar/{Calendar-Bcs9mxET.js → Calendar-gEtuBW7Y.js} +9 -10
- package/dist/Calendar/{CurrentTimeIndicator-CNKsVEXH.js → CurrentTimeIndicator-dRYot1Rk.js} +24 -18
- package/dist/Calendar/{EventCard-B1LoBxth.js → EventCard-Di5UX4pB.js} +1 -2
- package/dist/Calendar/{TimeGrid-DIw8oCqY.js → TimeGrid-CBpDFAM4.js} +1 -1
- package/dist/Calendar/context/index.js +1 -1
- package/dist/Calendar/index.js +15 -14
- package/dist/Calendar/subcomponents/AllDaySection/index.js +5 -4
- package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +4 -3
- package/dist/Calendar/subcomponents/EventCard/index.js +4 -3
- package/dist/Calendar/subcomponents/TimeAxis/index.js +1 -1
- package/dist/Calendar/subcomponents/TimeGrid/index.js +4 -3
- package/dist/Calendar/{theme-xnrMsnkg.js → theme-i60ueO92.js} +1 -1
- package/dist/Calendar/utils/index.js +1 -1
- package/dist/Calendar/utils/layout/index.js +1 -1
- package/dist/Calendar/utils/theme/index.js +2 -2
- package/dist/Card/index.js +2 -2
- package/dist/CheckBox/index.js +1 -1
- package/dist/ColorPicker/ColorPicker-CYlrnMwM.js +174 -0
- package/dist/ColorPicker/index.js +6 -6
- package/dist/ConfigProvider/index.js +4 -3
- package/dist/DatePicker/DatePicker-CagGt_f0.js +101 -0
- package/dist/DatePicker/{DatePickerPanel-C_TDG3HH.js → DatePickerPanel-CaDZzxMD.js} +3 -3
- package/dist/DatePicker/index.js +7 -6
- package/dist/DatePicker/style/index.js +2 -2
- package/dist/DatePicker/{style-CNtPPsZp.js → style-UKXn1N_p.js} +1 -1
- package/dist/DropDown/DropDown-CLuQf970.js +178 -0
- package/dist/DropDown/index.js +8 -7
- package/dist/DropDown/style/index.js +2 -2
- package/dist/DropDown/{style-Fdp-U4md.js → style-LLDVPpPa.js} +1 -1
- package/dist/Editor/Buttons-ByO5rS19.js +937 -0
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +12 -12
- package/dist/Editor/constants/index.js +3 -3
- package/dist/Editor/index.js +667 -298
- package/dist/Gantt/GanttChart/index.js +11 -10
- package/dist/Gantt/{GanttChart-DjwZsxEj.js → GanttChart-DvCAp8Dk.js} +3 -5
- package/dist/Gantt/GanttTable/index.js +6 -6
- package/dist/Gantt/{GanttTable-xbXD_PWI.js → GanttTable-DyVJOVo3.js} +1 -1
- package/dist/Gantt/GanttToolBar/index.js +9 -8
- package/dist/Gantt/{GanttToolBar-BTeTsR6Z.js → GanttToolBar-CxT68kmT.js} +2 -3
- package/dist/Gantt/index.js +15 -14
- package/dist/Gantt/{theme-DLNvgM9X.js → theme-2LyXJRDe.js} +1 -1
- package/dist/Gantt/utils/index.js +1 -1
- package/dist/Gantt/utils/theme/index.js +2 -2
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/{InputTag-hzCCJQ1z.js → InputTag-yRPO90Ku.js} +2 -2
- package/dist/InputTag/index.js +5 -5
- package/dist/Loading/{Loading-DiywS7ex.js → Loading-BF_dtuLc.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 +1 -1
- package/dist/Overlay/OverlayContext-CVSFoyqN.js +23 -0
- package/dist/Overlay/index.js +3 -0
- package/dist/Radio/index.js +1 -1
- package/dist/ScrollBar/{ScrollBar-QhXVe8zd.js → ScrollBar-N2pOLv-8.js} +1 -1
- package/dist/ScrollBar/index.js +2 -2
- package/dist/Segmented/{Segmented-BDz1hMDT.js → Segmented-BCQRrc65.js} +1 -1
- package/dist/Segmented/index.js +2 -2
- package/dist/Select/Select-iwzfNy9d.js +753 -0
- package/dist/Select/{SelectInputSearch-COUzreau.js → SelectInputSearch-Bc_aPNbG.js} +1 -1
- package/dist/Select/index.js +8 -7
- package/dist/Table/{Table-yQXQEk6d.js → Table-Cm8zFl2G.js} +2 -2
- package/dist/Table/hooks/index.js +1 -1
- package/dist/Table/index.js +5 -5
- package/dist/Table/style/index.js +2 -2
- package/dist/Table/{style-DgiPEsSp.js → style-C4wp0IOM.js} +1 -1
- package/dist/Table/utils/index.js +1 -1
- package/dist/Tabs/{Tabs-BiKW70CL.js → Tabs-BPWRIwtD.js} +118 -103
- package/dist/Tabs/index.js +5 -5
- package/dist/Tooltip/Tooltip-Bb3Jx-If.js +172 -0
- package/dist/Tooltip/index.js +3 -2
- package/dist/Tree/index.js +2 -2
- package/dist/Tree/utils/index.js +1 -1
- package/dist/components/ColorPicker/ColorPalettes.d.ts +3 -8
- package/dist/components/ColorPicker/ColorPicker.type.d.ts +6 -9
- package/dist/components/ColorPicker/constants.d.ts +3 -1
- package/dist/components/ColorPicker/index.d.ts +1 -1
- 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/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/PictureButton/UploadImage.d.ts +5 -4
- package/dist/components/Editor/ToolbarPlugin/Buttons/RedoButton.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/UndoButton.d.ts +2 -0
- package/dist/components/Editor/ToolbarPlugin/Buttons/index.d.ts +10 -0
- package/dist/components/Editor/ToolbarPlugin/context/HistoryStateProvider.d.ts +8 -0
- package/dist/components/Editor/ToolbarPlugin/context/TextFormatsContext.d.ts +8 -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 +2 -0
- package/dist/components/Editor/plugins/CodeHighlightPlugin.d.ts +1 -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/utils/codeHighlighter.d.ts +12 -0
- package/dist/components/Editor/utils/formatTruncatedFilename.d.ts +4 -0
- package/dist/components/Editor/utils/stripImagesFromHtml.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 +45 -44
- package/dist/locale/lang/en-US.json.d.ts +14 -2
- package/dist/locale/lang/zh-CN.json.d.ts +14 -2
- package/dist/locale/lang/zh-TW.json.d.ts +14 -2
- package/dist/style.css +1 -1
- package/dist/vendors/{ConfigProvider-DxrZpdIb.js → ConfigProvider-vPuwReNX.js} +70 -36
- package/dist/vendors/{LocaleContext-Dcw6C1LX.js → LocaleContext-CN9doEXT.js} +14 -2
- package/dist/vendors/{Tree-DXmVRDn0.js → Tree-B09frqQX.js} +1 -0
- package/dist/vendors/{useLocale-BKZX2_zw.js → useLocale-sawv8CEL.js} +1 -1
- package/dist/vendors/{version-DiV_Cnd8.js → version-DdQLttdL.js} +1 -1
- package/package.json +7 -1
- package/dist/ColorPicker/ColorPicker-t1uBeATW.js +0 -155
- package/dist/DatePicker/DatePicker--kMNwM9Q.js +0 -96
- package/dist/DropDown/DropDown-yDH9V_9Y.js +0 -171
- package/dist/Editor/Buttons-BhStZyIa.js +0 -620
- package/dist/Modal/Modal-LiztSF7x.js +0 -92
- package/dist/Select/Select-D6EK7whJ.js +0 -744
- package/dist/Tooltip/Tooltip-Ch9lti_7.js +0 -168
- package/dist/vendors/color-D6XBXROa.js +0 -12
- /package/dist/Amap/{AmapContext-D7Njjm5a.js → AmapContext-CJBe6lld.js} +0 -0
- /package/dist/Amap/{useMarkerInfoWindowController-BQmhR0N7.js → useMarkerInfoWindowController-Cjx0xQXw.js} +0 -0
- /package/dist/Card/{Card-CtKLNh3n.js → Card-Ds5Rpq--.js} +0 -0
- /package/dist/vendors/{cssVars-BYg1matG.js → cssVars-l4-kP_14.js} +0 -0
- /package/dist/vendors/{mergeRefs-Bsywq1Vo.js → mergeRefs-TiJ0xjUN.js} +0 -0
- /package/dist/vendors/{useFloatingOverlay-BApqkHSu.js → useFloatingOverlay-B3M9k8nj.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baishuyun/ui-base",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "百数云低代码平台通用组件库",
|
|
6
6
|
"author": "bsy-fe team",
|
|
@@ -46,12 +46,18 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
48
48
|
"@amap/amap-jsapi-types": "^0.0.15",
|
|
49
|
+
"@lexical/code-core": "0.45.0",
|
|
49
50
|
"@lexical/html": "0.45.0",
|
|
50
51
|
"@lexical/link": "0.45.0",
|
|
52
|
+
"@lexical/list": "0.45.0",
|
|
51
53
|
"@lexical/react": "0.45.0",
|
|
52
54
|
"@lexical/rich-text": "0.45.0",
|
|
53
55
|
"@lexical/selection": "0.45.0",
|
|
54
56
|
"@lexical/utils": "0.45.0",
|
|
57
|
+
"@shikijs/core": "^4.0.2",
|
|
58
|
+
"@shikijs/engine-javascript": "^4.0.2",
|
|
59
|
+
"@shikijs/langs": "^4.0.2",
|
|
60
|
+
"@shikijs/themes": "^4.0.2",
|
|
55
61
|
"@tanstack/react-table": "^8.21.3",
|
|
56
62
|
"@tanstack/react-virtual": "^3.14.3",
|
|
57
63
|
"ahooks": "^3.8.5",
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-BBDcb-yw.js";
|
|
2
|
-
import { t } from "../vendors/useFloatingOverlay-BApqkHSu.js";
|
|
3
|
-
import { t as n } from "../vendors/useLocale-BKZX2_zw.js";
|
|
4
|
-
import { t as r } from "../vendors/color-D6XBXROa.js";
|
|
5
|
-
import { n as i } from "../vendors/animations-rwUbyoT0.js";
|
|
6
|
-
import { t as a } from "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
|
|
7
|
-
import { isArray as o } from "lodash-es";
|
|
8
|
-
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
-
import { cloneElement as u, isValidElement as d, useRef as f, useState as p } from "react";
|
|
10
|
-
import { ColorPicker as m } from "antd";
|
|
11
|
-
import h from "clsx";
|
|
12
|
-
import { useControllableValue as g } from "ahooks";
|
|
13
|
-
import { AnimatePresence as _, motion as v } from "motion/react";
|
|
14
|
-
import { FloatingPortal as y } from "@floating-ui/react";
|
|
15
|
-
import b from "tinycolor2";
|
|
16
|
-
//#region src/components/ColorPicker/constants.ts
|
|
17
|
-
var x = [
|
|
18
|
-
"rgba(240, 102, 72, 1)",
|
|
19
|
-
"rgba(255, 197, 2, 1)",
|
|
20
|
-
"rgba(74, 204, 140, 1)",
|
|
21
|
-
"rgba(74, 192, 236, 1)",
|
|
22
|
-
"rgba(255, 153, 33, 1)",
|
|
23
|
-
"rgba(101, 101, 101, 1)",
|
|
24
|
-
"rgba(255, 156, 136, 1)",
|
|
25
|
-
"rgba(98, 98, 206, 1)",
|
|
26
|
-
"rgba(241, 104, 182, 1)",
|
|
27
|
-
"rgba(55, 103, 241, 1)",
|
|
28
|
-
"rgba(162, 206, 30, 1)",
|
|
29
|
-
"rgba(179, 179, 179, 1)",
|
|
30
|
-
"rgba(0, 0, 0, 1)",
|
|
31
|
-
"rgba(102, 102, 102, 1)",
|
|
32
|
-
"rgba(153, 153, 153, 1)",
|
|
33
|
-
"rgba(194, 194, 194, 1)",
|
|
34
|
-
"rgba(224, 224, 224, 1)",
|
|
35
|
-
"rgba(77, 96, 159, 1)"
|
|
36
|
-
], S = (e = "bottom-start") => t({ placement: e }), C = "_preview_11t7y_62", w = {
|
|
37
|
-
"bsy-color-picker__floating": "_bsy-color-picker__floating_11t7y_1",
|
|
38
|
-
"bsy-color-picker__content": "_bsy-color-picker__content_11t7y_4",
|
|
39
|
-
"bsy-color-picker__grid": "_bsy-color-picker__grid_11t7y_11",
|
|
40
|
-
"bsy-color-picker__preset-colors-title": "_bsy-color-picker__preset-colors-title_11t7y_15",
|
|
41
|
-
"bsy-color-picker__preset-colors-grid": "_bsy-color-picker__preset-colors-grid_11t7y_19",
|
|
42
|
-
"bsy-color-picker__preset-colors-item": "_bsy-color-picker__preset-colors-item_11t7y_24",
|
|
43
|
-
"bsy-color-picker__custom-color-title": "_bsy-color-picker__custom-color-title_11t7y_48",
|
|
44
|
-
"bsy-color-picker__custom-color-btn": "_bsy-color-picker__custom-color-btn_11t7y_52",
|
|
45
|
-
preview: C,
|
|
46
|
-
"bsy-color-picker__custom-color-btn--active": "_bsy-color-picker__custom-color-btn--active_11t7y_62",
|
|
47
|
-
"bsy-color-picker__custom-color-btn--preview": "_bsy-color-picker__custom-color-btn--preview_11t7y_66",
|
|
48
|
-
"bsy-color-picker__custom-color-content": "_bsy-color-picker__custom-color-content_11t7y_69",
|
|
49
|
-
"bsy-color-picker__check-icon": "_bsy-color-picker__check-icon_11t7y_73"
|
|
50
|
-
}, T = ({ currentColor: t, onColorSelect: n, options: i, style: a }) => /* @__PURE__ */ c("div", {
|
|
51
|
-
className: w["bsy-color-picker__preset-colors-grid"],
|
|
52
|
-
style: a,
|
|
53
|
-
children: i.map((i) => /* @__PURE__ */ c("div", {
|
|
54
|
-
className: w["bsy-color-picker__preset-colors-item"],
|
|
55
|
-
style: {
|
|
56
|
-
backgroundColor: i,
|
|
57
|
-
"--hover-color": b(i).setAlpha(.5).toRgbString()
|
|
58
|
-
},
|
|
59
|
-
onClick: () => n(i),
|
|
60
|
-
children: r(t, i) && /* @__PURE__ */ c(e, {
|
|
61
|
-
name: "checkthebox",
|
|
62
|
-
className: w["bsy-color-picker__check-icon"]
|
|
63
|
-
})
|
|
64
|
-
}, i))
|
|
65
|
-
}), E = (e) => {
|
|
66
|
-
let { children: t, placement: p = "bottom-start", disabled: m = !1, presetColors: h, getPopupContainer: b } = e, { t: C } = n(), [E, O] = g(e, { defaultValue: e.value }), { isOpen: k, refs: A, floatingStyles: j, getReferenceProps: M, getFloatingProps: N } = S(p), P = d(t) ? u(t, {
|
|
67
|
-
...M(),
|
|
68
|
-
ref: A.setReference,
|
|
69
|
-
disabled: m
|
|
70
|
-
}) : t, F = o(h) && h.length ? h : x, I = f(F.some((e) => r(e, E)) ? [] : [E]), { portalRoot: L, portalMountKey: R, handleExitComplete: z } = a(k, b);
|
|
71
|
-
return /* @__PURE__ */ l(s, { children: [P, /* @__PURE__ */ c(y, {
|
|
72
|
-
root: L,
|
|
73
|
-
children: /* @__PURE__ */ c(_, {
|
|
74
|
-
onExitComplete: z,
|
|
75
|
-
children: k ? /* @__PURE__ */ c(v.div, {
|
|
76
|
-
ref: A.setFloating,
|
|
77
|
-
style: j,
|
|
78
|
-
...N(),
|
|
79
|
-
className: w["bsy-color-picker__floating"],
|
|
80
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
81
|
-
...i,
|
|
82
|
-
children: /* @__PURE__ */ c("div", {
|
|
83
|
-
className: w["bsy-color-picker__content"],
|
|
84
|
-
children: /* @__PURE__ */ l("div", {
|
|
85
|
-
className: w["bsy-color-picker__grid"],
|
|
86
|
-
children: [/* @__PURE__ */ l("div", {
|
|
87
|
-
className: w["bsy-color-picker__preset-colors"],
|
|
88
|
-
children: [/* @__PURE__ */ c("div", {
|
|
89
|
-
className: w["bsy-color-picker__preset-colors-title"],
|
|
90
|
-
children: C("presetColors")
|
|
91
|
-
}), /* @__PURE__ */ c(T, {
|
|
92
|
-
currentColor: E,
|
|
93
|
-
onColorSelect: O,
|
|
94
|
-
options: F
|
|
95
|
-
})]
|
|
96
|
-
}), /* @__PURE__ */ c(D, {
|
|
97
|
-
value: E,
|
|
98
|
-
onChange: O,
|
|
99
|
-
onColorInput: e.onColorInput,
|
|
100
|
-
options: F,
|
|
101
|
-
list: I.current,
|
|
102
|
-
getPopupContainer: b
|
|
103
|
-
})]
|
|
104
|
-
})
|
|
105
|
-
})
|
|
106
|
-
}, "bsy-color-picker-panel") : null
|
|
107
|
-
})
|
|
108
|
-
}, R)] });
|
|
109
|
-
}, D = (t) => {
|
|
110
|
-
let { list: r, getPopupContainer: i } = t, [a, o] = p(), [s, u] = p(!1), { t: d } = n();
|
|
111
|
-
return /* @__PURE__ */ l("div", {
|
|
112
|
-
className: w["bsy-color-picker__custom-color"],
|
|
113
|
-
children: [/* @__PURE__ */ c("div", {
|
|
114
|
-
className: w["bsy-color-picker__custom-color-title"],
|
|
115
|
-
children: d("customColor")
|
|
116
|
-
}), /* @__PURE__ */ l("div", {
|
|
117
|
-
className: w["bsy-color-picker__custom-color-content"],
|
|
118
|
-
children: [/* @__PURE__ */ c(m, {
|
|
119
|
-
getPopupContainer: i,
|
|
120
|
-
value: a,
|
|
121
|
-
onChange: (e) => {
|
|
122
|
-
let n = e.toRgbString();
|
|
123
|
-
o(n), t.onColorInput?.(n);
|
|
124
|
-
},
|
|
125
|
-
open: s,
|
|
126
|
-
onOpenChange: (e) => {
|
|
127
|
-
u(e), !e && a && (r.includes(a) || r.unshift(a), t.onChange(a), o(void 0));
|
|
128
|
-
},
|
|
129
|
-
children: /* @__PURE__ */ c("div", {
|
|
130
|
-
className: h(w["bsy-color-picker__custom-color-btn"], {
|
|
131
|
-
[w["bsy-color-picker__custom-color-btn--active"]]: s && !a,
|
|
132
|
-
[w["bsy-color-picker__custom-color-btn--preview"]]: !!a
|
|
133
|
-
}),
|
|
134
|
-
role: "button",
|
|
135
|
-
style: { backgroundColor: a || void 0 },
|
|
136
|
-
onClick: () => {
|
|
137
|
-
u(!0);
|
|
138
|
-
},
|
|
139
|
-
children: /* @__PURE__ */ c(e, {
|
|
140
|
-
name: "add",
|
|
141
|
-
style: { visibility: a ? "hidden" : "visible" }
|
|
142
|
-
})
|
|
143
|
-
})
|
|
144
|
-
}), /* @__PURE__ */ c(T, {
|
|
145
|
-
currentColor: t.value,
|
|
146
|
-
onColorSelect: t.onChange,
|
|
147
|
-
options: r.slice(0, 5),
|
|
148
|
-
style: { gridTemplateColumns: "repeat(5, 1fr)" }
|
|
149
|
-
})]
|
|
150
|
-
})]
|
|
151
|
-
});
|
|
152
|
-
};
|
|
153
|
-
E.displayName = "BsyColorPicker";
|
|
154
|
-
//#endregion
|
|
155
|
-
export { x as n, E as t };
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { t as e } from "../vendors/useFloatingOverlay-BApqkHSu.js";
|
|
2
|
-
import { t } from "../vendors/useLocale-BKZX2_zw.js";
|
|
3
|
-
import { n } from "../vendors/animations-rwUbyoT0.js";
|
|
4
|
-
import { t as r } from "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
|
|
5
|
-
import { n as i } from "./pickerLocale-BRnNjLcv.js";
|
|
6
|
-
import { t as a } from "./style-CNtPPsZp.js";
|
|
7
|
-
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
import { Suspense as l, cloneElement as u, isValidElement as d, lazy as f, useCallback as p, useMemo as m } from "react";
|
|
9
|
-
import h from "clsx";
|
|
10
|
-
import { useControllableValue as g } from "ahooks";
|
|
11
|
-
import { AnimatePresence as _, motion as v } from "motion/react";
|
|
12
|
-
import { FloatingPortal as y } from "@floating-ui/react";
|
|
13
|
-
import b from "dayjs";
|
|
14
|
-
var x = {
|
|
15
|
-
footer: "_footer_h6lng_1",
|
|
16
|
-
today: "_today_h6lng_11"
|
|
17
|
-
}, S = ({ onClick: e }) => {
|
|
18
|
-
let { t: n } = t();
|
|
19
|
-
return /* @__PURE__ */ s("div", {
|
|
20
|
-
className: x.footer,
|
|
21
|
-
children: /* @__PURE__ */ s("button", {
|
|
22
|
-
type: "button",
|
|
23
|
-
className: x.today,
|
|
24
|
-
onClick: e,
|
|
25
|
-
children: n("datePicker.today")
|
|
26
|
-
})
|
|
27
|
-
});
|
|
28
|
-
}, C = (e, t) => {
|
|
29
|
-
switch (t) {
|
|
30
|
-
case "week": return e.startOf("isoWeek");
|
|
31
|
-
case "month": return e.startOf("month");
|
|
32
|
-
case "year": return e.startOf("year");
|
|
33
|
-
default: return e.startOf("day");
|
|
34
|
-
}
|
|
35
|
-
}, w = {
|
|
36
|
-
"bsy-date-picker": "_bsy-date-picker_legiv_1",
|
|
37
|
-
"bsy-date-picker__content": "_bsy-date-picker__content_legiv_33",
|
|
38
|
-
"bsy-date-picker__divider": "_bsy-date-picker__divider_legiv_43",
|
|
39
|
-
"bsy-date-picker__panel-loading": "_bsy-date-picker__panel-loading_legiv_49"
|
|
40
|
-
}, T = f(() => import("./DatePickerPanel-C_TDG3HH.js")), E = (f) => {
|
|
41
|
-
let { children: x, picker: E = "date", theme: D, getPopupContainer: O, triggerActiveClassName: k } = f, { locale: A } = t(), [j, M] = g(f, {
|
|
42
|
-
defaultValuePropName: "defaultValue",
|
|
43
|
-
valuePropName: "value",
|
|
44
|
-
trigger: "onChange",
|
|
45
|
-
defaultValue: b().locale(i(A)).startOf("day")
|
|
46
|
-
}), { isOpen: N, setIsOpen: P, refs: F, floatingStyles: I, getReferenceProps: L, getFloatingProps: R } = e(), z = p((e) => {
|
|
47
|
-
e && (M(C(e, E)), P(!1));
|
|
48
|
-
}, [
|
|
49
|
-
E,
|
|
50
|
-
M,
|
|
51
|
-
P
|
|
52
|
-
]), B = p(() => {
|
|
53
|
-
z(b().locale(i(A)));
|
|
54
|
-
}, [z, A]), V = m(() => a(D), [D]), { portalRoot: H, portalMountKey: U, handleExitComplete: W } = r(N, O);
|
|
55
|
-
return d(x), /* @__PURE__ */ c(o, { children: [d(x) ? u(x, {
|
|
56
|
-
...L({ className: h(x.props.className, N && k) }),
|
|
57
|
-
ref: F.setReference
|
|
58
|
-
}) : x, /* @__PURE__ */ s(y, {
|
|
59
|
-
root: H,
|
|
60
|
-
children: /* @__PURE__ */ s(_, {
|
|
61
|
-
onExitComplete: W,
|
|
62
|
-
children: N ? /* @__PURE__ */ s(v.div, {
|
|
63
|
-
ref: F.setFloating,
|
|
64
|
-
style: {
|
|
65
|
-
...I,
|
|
66
|
-
...V
|
|
67
|
-
},
|
|
68
|
-
...R(),
|
|
69
|
-
"data-bsy-date-picker": !0,
|
|
70
|
-
className: w["bsy-date-picker"],
|
|
71
|
-
...n,
|
|
72
|
-
children: /* @__PURE__ */ c("div", {
|
|
73
|
-
className: w["bsy-date-picker__content"],
|
|
74
|
-
children: [
|
|
75
|
-
/* @__PURE__ */ s(l, {
|
|
76
|
-
fallback: /* @__PURE__ */ s("div", {
|
|
77
|
-
className: w["bsy-date-picker__panel-loading"],
|
|
78
|
-
"aria-hidden": !0
|
|
79
|
-
}),
|
|
80
|
-
children: /* @__PURE__ */ s(T, {
|
|
81
|
-
picker: E,
|
|
82
|
-
value: j,
|
|
83
|
-
onChange: z
|
|
84
|
-
})
|
|
85
|
-
}),
|
|
86
|
-
/* @__PURE__ */ s("div", { className: w["bsy-date-picker__divider"] }),
|
|
87
|
-
/* @__PURE__ */ s(S, { onClick: B })
|
|
88
|
-
]
|
|
89
|
-
})
|
|
90
|
-
}, "bsy-date-picker-panel") : null
|
|
91
|
-
})
|
|
92
|
-
}, U)] });
|
|
93
|
-
};
|
|
94
|
-
E.displayName = "BsyDatePicker";
|
|
95
|
-
//#endregion
|
|
96
|
-
export { E as t };
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { t as e } from "../vendors/useLocale-BKZX2_zw.js";
|
|
2
|
-
import { n as t } from "../vendors/animations-rwUbyoT0.js";
|
|
3
|
-
import { t as n } from "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
|
|
4
|
-
import { t as r } from "../Select/SelectInputSearch-COUzreau.js";
|
|
5
|
-
import { t as i } from "../NotFoundContent/NotFoundContent-BLmzWNBi.js";
|
|
6
|
-
import { t as a } from "../ScrollBar/ScrollBar-QhXVe8zd.js";
|
|
7
|
-
import { t as o } from "../vendors/useFloatingPortal-CmVJbuRm.js";
|
|
8
|
-
import { t as s } from "./style-Fdp-U4md.js";
|
|
9
|
-
import { isEmpty as c, isNumber as l } from "lodash-es";
|
|
10
|
-
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
-
import { cloneElement as p, isValidElement as m, memo as h, useMemo as g, useState as _ } from "react";
|
|
12
|
-
import { clsx as v } from "clsx";
|
|
13
|
-
import { useControllableValue as y } from "ahooks";
|
|
14
|
-
import { AnimatePresence as b, motion as x } from "motion/react";
|
|
15
|
-
import { FloatingPortal as S } from "@floating-ui/react";
|
|
16
|
-
import C from "fuse.js";
|
|
17
|
-
//#region src/hooks/useDropdownSearch.ts
|
|
18
|
-
var w = ({ menus: e, searchValue: t, enableInternalFilter: n, searchKey: r }) => {
|
|
19
|
-
let i = g(() => new C(e, {
|
|
20
|
-
keys: [r],
|
|
21
|
-
ignoreLocation: !0,
|
|
22
|
-
threshold: .3,
|
|
23
|
-
getFn: (e, t) => {
|
|
24
|
-
let n = e[t];
|
|
25
|
-
return t === "label" && typeof n != "string" ? "" : String(n || "");
|
|
26
|
-
}
|
|
27
|
-
}), [e, r]), a = g(() => !n || c(t) ? e : i.search(t).map((e) => e.item), [
|
|
28
|
-
e,
|
|
29
|
-
t,
|
|
30
|
-
n,
|
|
31
|
-
i
|
|
32
|
-
]);
|
|
33
|
-
return {
|
|
34
|
-
filteredMenus: a,
|
|
35
|
-
hasNoResults: g(() => n && !c(t) && a.length === 0, [
|
|
36
|
-
n,
|
|
37
|
-
t,
|
|
38
|
-
a.length
|
|
39
|
-
])
|
|
40
|
-
};
|
|
41
|
-
}, T = "_dropdown__trigger_1fafn_1", E = "_dropdown__panel_1fafn_7", D = "_dropdown__search_1fafn_15", O = "_dropdown__menu_1fafn_19", k = {
|
|
42
|
-
dropdown__trigger: T,
|
|
43
|
-
"dropdown__trigger--disabled": "_dropdown__trigger--disabled_1fafn_4",
|
|
44
|
-
dropdown__panel: E,
|
|
45
|
-
dropdown__search: D,
|
|
46
|
-
dropdown__menu: O,
|
|
47
|
-
"dropdown__menu-item": "_dropdown__menu-item_1fafn_22",
|
|
48
|
-
"dropdown__menu-item--disabled": "_dropdown__menu-item--disabled_1fafn_34",
|
|
49
|
-
"dropdown__menu-item--active": "_dropdown__menu-item--active_1fafn_34",
|
|
50
|
-
"dropdown__menu-item-icon": "_dropdown__menu-item-icon_1fafn_41",
|
|
51
|
-
"system-field": "_system-field_1fafn_52",
|
|
52
|
-
"dropdown__menu-item-label": "_dropdown__menu-item-label_1fafn_63"
|
|
53
|
-
}, A = h(({ item: e, onClick: t, isActive: n = !1 }) => {
|
|
54
|
-
let r = () => {
|
|
55
|
-
e.disabled || t(e);
|
|
56
|
-
}, i = e.systemField || !1;
|
|
57
|
-
return /* @__PURE__ */ f("div", {
|
|
58
|
-
className: v(k["dropdown__menu-item"], {
|
|
59
|
-
[k["dropdown__menu-item--disabled"]]: e.disabled,
|
|
60
|
-
[k["dropdown__menu-item--active"]]: n && !e.disabled,
|
|
61
|
-
"text-[#4d609f]": i && !e.disabled && !n
|
|
62
|
-
}),
|
|
63
|
-
onClick: r,
|
|
64
|
-
children: [e.icon && /* @__PURE__ */ d("div", {
|
|
65
|
-
className: v(k["dropdown__menu-item-icon"], { [k["system-field"]]: i && !e.disabled && !n }),
|
|
66
|
-
children: e.icon
|
|
67
|
-
}), /* @__PURE__ */ d("div", {
|
|
68
|
-
className: v(k["dropdown__menu-item-label"], "truncate"),
|
|
69
|
-
children: e.label
|
|
70
|
-
})]
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
A.displayName = "BsyDropDownMenuItem";
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/components/DropDown/MenuList/MenuList.tsx
|
|
76
|
-
var j = ({ menus: t, onClick: n, hasNoResults: r, activeKey: a = [] }) => {
|
|
77
|
-
let { t: o } = e();
|
|
78
|
-
return t.length === 0 ? /* @__PURE__ */ d(i, {
|
|
79
|
-
text: o("noData"),
|
|
80
|
-
className: "px-3 py-6"
|
|
81
|
-
}) : r ? /* @__PURE__ */ d(i, {
|
|
82
|
-
text: o("noDataFound"),
|
|
83
|
-
className: "px-3 py-6"
|
|
84
|
-
}) : /* @__PURE__ */ d("div", {
|
|
85
|
-
className: k.dropdown__menu,
|
|
86
|
-
children: t.map((e) => /* @__PURE__ */ d(A, {
|
|
87
|
-
item: e,
|
|
88
|
-
onClick: n,
|
|
89
|
-
isActive: a.includes(e.key)
|
|
90
|
-
}, e.key))
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
j.displayName = "BsyDropDownMenuList";
|
|
94
|
-
//#endregion
|
|
95
|
-
//#region src/components/DropDown/DropDown.tsx
|
|
96
|
-
var M = (i) => {
|
|
97
|
-
let { t: c } = e(), { children: h, menus: v, onClick: C, onSearch: T, searchKey: E = "label", showSearch: D = !0, closeOnSelect: O = !0, searchPlaceholder: A = c("search"), offset: M = {
|
|
98
|
-
x: 0,
|
|
99
|
-
y: 0
|
|
100
|
-
}, zIndex: N = 1101, style: P, activeKey: F = [], getPopupContainer: I, theme: L } = i, [R, z] = y(i, {
|
|
101
|
-
valuePropName: "visible",
|
|
102
|
-
defaultValue: !1,
|
|
103
|
-
trigger: "onOpenChange"
|
|
104
|
-
}), [B, V] = _(""), H = () => {
|
|
105
|
-
z(!R);
|
|
106
|
-
}, U = () => {
|
|
107
|
-
z(!1);
|
|
108
|
-
}, W = (e) => {
|
|
109
|
-
e.disabled || (C?.(e), O && U());
|
|
110
|
-
}, G = (e) => {
|
|
111
|
-
V(e), T?.(e);
|
|
112
|
-
}, { filteredMenus: K, hasNoResults: q } = w({
|
|
113
|
-
menus: v,
|
|
114
|
-
searchValue: B,
|
|
115
|
-
enableInternalFilter: !T,
|
|
116
|
-
searchKey: E
|
|
117
|
-
}), { refs: J, floatingStyles: Y, getReferenceProps: X, getFloatingProps: Z } = o({
|
|
118
|
-
isOpen: R,
|
|
119
|
-
close: U,
|
|
120
|
-
showMask: !1,
|
|
121
|
-
zIndex: N,
|
|
122
|
-
offset: {
|
|
123
|
-
x: l(M.x) ? M.x : 0,
|
|
124
|
-
y: l(M.y) ? M.y : 0
|
|
125
|
-
}
|
|
126
|
-
}), Q = m(h) ? p(h, {
|
|
127
|
-
...X(),
|
|
128
|
-
ref: J.setReference,
|
|
129
|
-
onClick: (e) => {
|
|
130
|
-
H(), h.props.onClick?.(e);
|
|
131
|
-
}
|
|
132
|
-
}) : h, { portalRoot: $, portalMountKey: ee, handleExitComplete: te } = n(R, I), ne = g(() => s(L), [L]);
|
|
133
|
-
return /* @__PURE__ */ f(u, { children: [Q, /* @__PURE__ */ d(S, {
|
|
134
|
-
root: $,
|
|
135
|
-
children: /* @__PURE__ */ d(b, {
|
|
136
|
-
onExitComplete: te,
|
|
137
|
-
children: R ? /* @__PURE__ */ d(x.div, {
|
|
138
|
-
ref: J.setFloating,
|
|
139
|
-
...Z(),
|
|
140
|
-
style: Y,
|
|
141
|
-
...t,
|
|
142
|
-
children: /* @__PURE__ */ f("div", {
|
|
143
|
-
className: k.dropdown__panel,
|
|
144
|
-
style: {
|
|
145
|
-
...ne,
|
|
146
|
-
...P
|
|
147
|
-
},
|
|
148
|
-
children: [D && /* @__PURE__ */ d("div", {
|
|
149
|
-
className: k.dropdown__search,
|
|
150
|
-
children: /* @__PURE__ */ d(r, {
|
|
151
|
-
value: B,
|
|
152
|
-
onChange: G,
|
|
153
|
-
searchPlaceholder: A
|
|
154
|
-
})
|
|
155
|
-
}), /* @__PURE__ */ d(a, {
|
|
156
|
-
style: { maxHeight: 300 },
|
|
157
|
-
children: /* @__PURE__ */ d(j, {
|
|
158
|
-
menus: K,
|
|
159
|
-
onClick: W,
|
|
160
|
-
hasNoResults: q,
|
|
161
|
-
activeKey: F
|
|
162
|
-
})
|
|
163
|
-
})]
|
|
164
|
-
})
|
|
165
|
-
}, "bsy-dropdown-panel") : null
|
|
166
|
-
})
|
|
167
|
-
}, ee)] });
|
|
168
|
-
};
|
|
169
|
-
M.displayName = "BsyDropDown";
|
|
170
|
-
//#endregion
|
|
171
|
-
export { M as t };
|