@baishuyun/ui-base 6.33.0 → 6.33.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.
Files changed (38) hide show
  1. package/dist/AiRuntimeContainer/index.js +1 -1
  2. package/dist/Amap/index.js +1 -1
  3. package/dist/Calendar/{Calendar-BNC0RpwL.js → Calendar-sHaTag1q.js} +1 -1
  4. package/dist/Calendar/index.js +3 -3
  5. package/dist/Card/index.js +1 -1
  6. package/dist/CheckBox/index.js +1 -1
  7. package/dist/ColorPicker/index.js +1 -1
  8. package/dist/ConfigProvider/index.js +1 -1
  9. package/dist/DatePicker/{DatePicker-DbcRkKy7.js → DatePicker-C0Nmq8I2.js} +1 -1
  10. package/dist/DatePicker/{DatePickerPanel-DJdjyTxg.js → DatePickerPanel-DfcL9HJ5.js} +1 -1
  11. package/dist/DatePicker/index.js +2 -2
  12. package/dist/DropDown/index.js +1 -1
  13. package/dist/Editor/index.js +1 -1
  14. package/dist/FieldCard/FieldCard-DNwwutu3.js +286 -0
  15. package/dist/FieldCard/index.js +2 -2
  16. package/dist/Gantt/index.js +2 -2
  17. package/dist/Icon/index.js +1 -1
  18. package/dist/InputTag/index.js +1 -1
  19. package/dist/Kanban/index.js +2 -2
  20. package/dist/Loading/index.js +1 -1
  21. package/dist/Modal/index.js +1 -1
  22. package/dist/NotFoundContent/index.js +1 -1
  23. package/dist/Overlay/index.js +1 -1
  24. package/dist/Radio/index.js +1 -1
  25. package/dist/ScrollBar/index.js +1 -1
  26. package/dist/Segmented/index.js +1 -1
  27. package/dist/Select/index.js +1 -1
  28. package/dist/Table/{Table-8JyKy6tq.js → Table-CCyC7VdA.js} +347 -344
  29. package/dist/Table/index.js +2 -2
  30. package/dist/Tabs/index.js +1 -1
  31. package/dist/Tooltip/index.js +1 -1
  32. package/dist/Tree/index.js +1 -1
  33. package/dist/index.js +5 -5
  34. package/dist/utils/hasTextSelection.d.ts +3 -0
  35. package/dist/vendors/hasTextSelection-7Q4xY0kK.js +7 -0
  36. package/dist/vendors/{version-DJ_rbXnB.js → version-PykRMMOY.js} +1 -1
  37. package/package.json +1 -1
  38. package/dist/FieldCard/FieldCard-BW1JOjtx.js +0 -282
@@ -1,7 +1,7 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-PykRMMOY.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
5
5
  import "../vendors/useLocale-DvhRopWF.js";
6
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _, y as v } from "./Table-8JyKy6tq.js";
6
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _, y as v } from "./Table-CCyC7VdA.js";
7
7
  export { e as COLUMN_DEFAULTS, _ as DEFAULT_CONFIG, h as HierarchyCell, v as TABLE_DOM, p as Table, p as default, m as TableBody, u as buildHierarchyTreeMeta, r as calculateFixedOffset, i as expandLeafColumns, n as getCellRowspan, f as getColumnsWidth, l as getRowKey, c as processRowspan, s as resolveTableThemeVars, g as shouldRenderCell, o as sortData, a as splitFixedColumns, t as useColumnResize, d as useTableVirtual };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-PykRMMOY.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import "../vendors/LocaleContext-CsTLO_Y2.js";
4
4
  import "../Overlay/OverlayContext-CVSFoyqN.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-PykRMMOY.js";
2
2
  import "../Overlay/OverlayContext-CVSFoyqN.js";
3
3
  import "../vendors/useLatchedPopupPortalRoot-Cu3oUL9h.js";
4
4
  import { n as e, t } from "./Tooltip-N-w19uRu.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-DJ_rbXnB.js";
1
+ import "../vendors/version-PykRMMOY.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import { t as e } from "../vendors/Tree-C8l3t4L6.js";
4
4
  import "../CheckBox/CheckBox-BXKoPSBh.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./vendors/version-DJ_rbXnB.js";
1
+ import "./vendors/version-PykRMMOY.js";
2
2
  import "./ScrollBar/style-D26azwz6.js";
3
3
  import { t as e } from "./Icon/Icon-CcKDWNGy.js";
4
4
  import "./vendors/LocaleContext-CsTLO_Y2.js";
@@ -29,10 +29,10 @@ import { t as O } from "./DropDown/DropDown-Bb4dkd_c.js";
29
29
  import { t as k } from "./Loading/Loading-CLUJfdln.js";
30
30
  import "./NotFoundContent/index.js";
31
31
  import { t as A } from "./InputTag/InputTag-3sZTy2HT.js";
32
- import { t as j } from "./Calendar/Calendar-BNC0RpwL.js";
33
- import { t as M } from "./DatePicker/DatePicker-DbcRkKy7.js";
32
+ import { t as j } from "./Calendar/Calendar-sHaTag1q.js";
33
+ import { t as M } from "./DatePicker/DatePicker-C0Nmq8I2.js";
34
34
  import "./DatePicker/pickerLocale-Brf7_Tnd.js";
35
- import { a as N, c as P, d as F, f as I, g as L, h as R, i as z, l as B, m as V, n as H, o as U, p as W, r as G, t as K, u as q } from "./Table/Table-8JyKy6tq.js";
36
- import { t as J } from "./FieldCard/FieldCard-BW1JOjtx.js";
35
+ import { a as N, c as P, d as F, f as I, g as L, h as R, i as z, l as B, m as V, n as H, o as U, p as W, r as G, t as K, u as q } from "./Table/Table-CCyC7VdA.js";
36
+ import { t as J } from "./FieldCard/FieldCard-DNwwutu3.js";
37
37
  import "overlayscrollbars/overlayscrollbars.css";
38
38
  export { u as Amap, d as AmapCircle, l as AmapMarker, p as AmapMarkerCluster, f as AmapProvider, j as Calendar, m as Card, S as Checkbox, g as ColorPicker, n as ConfigProvider, M as DatePicker, O as DropDown, J as FieldCard, K as HierarchyCell, e as Icon, A as InputTag, k as Loading, t as LocalTheme, h as Modal, w as NotFoundContent, o as OVERLAY_Z_BASE, a as OVERLAY_Z_STEP, i as OverlayProvider, C as Radio, C as Ratio, T as ScrollBar, _ as Segmented, b as Select, D as TabSelect, G as Table, E as Tabs, y as Tooltip, v as TooltipFloatingContext, x as Tree, H as buildHierarchyTreeMeta, F as calculateFixedOffset, I as expandLeafColumns, P as getCellRowspan, W as getColumnsWidth, V as getRowKey, B as processRowspan, z as resolveTableThemeVars, q as shouldRenderCell, R as sortData, L as splitFixedColumns, s as useAmap, N as useColumnResize, c as useCurrentLocation, r as useOverlayZIndex, U as useTableVirtual };
@@ -0,0 +1,3 @@
1
+ /** 拖选松手后 click 才派发,选区已经在容器里。只认容器内的选区。 */
2
+ declare const hasTextSelection: (root: EventTarget | null) => boolean;
3
+ export default hasTextSelection;
@@ -0,0 +1,7 @@
1
+ //#region src/utils/hasTextSelection.ts
2
+ var e = (e) => {
3
+ let t = window.getSelection();
4
+ return e instanceof Element && !!t && !t.isCollapsed && e.contains(t.anchorNode);
5
+ };
6
+ //#endregion
7
+ export { e as t };
@@ -1,6 +1,6 @@
1
1
  //#region src/version.ts
2
2
  if (typeof window < "u") {
3
3
  let e = window.__BSY_UI__ ??= {};
4
- e["@baishuyun/ui-base"] = "6.33.0";
4
+ e["@baishuyun/ui-base"] = "6.33.1";
5
5
  }
6
6
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ui-base",
3
- "version": "6.33.0",
3
+ "version": "6.33.1",
4
4
  "type": "module",
5
5
  "description": "百数云低代码平台通用组件库",
6
6
  "author": "bsy-fe team",
@@ -1,282 +0,0 @@
1
- import { t as e } from "../Icon/Icon-CcKDWNGy.js";
2
- import { t } from "../vendors/cssVars-BbL_cmFM.js";
3
- import { t as n } from "../DropDown/DropDown-Bb4dkd_c.js";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { Children as a, isValidElement as o, useMemo as s, useState as c } from "react";
6
- import l from "clsx";
7
- //#region src/components/FieldCard/style/resolveFieldCardThemeVars.ts
8
- var u = (e) => {
9
- if (!(e == null || e === "")) return typeof e == "number" ? `${e}px` : String(e);
10
- }, d = (e) => {
11
- if (!e) return {};
12
- let n = {}, r = e.colorPrimary;
13
- return t(n, "--bsy-field-card-color-primary", r), t(n, "--bsy-field-card-bg", e.bg), t(n, "--bsy-field-card-title-color", e.titleColor), t(n, "--bsy-field-card-label-color", e.labelColor), t(n, "--bsy-field-card-value-color", e.valueColor), t(n, "--bsy-field-card-hover-border", e.hoverBorderColor ?? r), t(n, "--bsy-field-card-selected-border", e.selectedBorderColor ?? r), t(n, "--bsy-field-card-border-radius", u(e.borderRadius)), t(n, "--bsy-field-card-extra-color", e.extraColor), t(n, "--bsy-field-card-extra-hover-bg", e.extraHoverBg), t(n, "--bsy-field-card-extra-hover-border", e.extraHoverBorderColor), t(n, "--bsy-field-card-extra-hover-color", e.extraHoverColor), n;
14
- }, f = "_root_1a4uh_1", p = "_sizeSmall_1a4uh_17", m = "_main_1a4uh_17", h = "_fields_1a4uh_20", g = "_sizeMiddle_1a4uh_24", _ = "_sizeLarge_1a4uh_31", v = "_positionup_1a4uh_38", y = "_positionleft_1a4uh_43", b = "_positionright_1a4uh_44", x = "_shapeCover_1a4uh_56", S = "_cover_1a4uh_77", C = "_coverShaperect_1a4uh_94", w = "_coverShapecircle_1a4uh_98", T = "_coverShapecover_1a4uh_102", E = "_coverPositionleft_1a4uh_105", D = "_coverPositionright_1a4uh_105", O = "_coverPositionup_1a4uh_111", k = "_coverFitComplete_1a4uh_116", A = "_coverPlaceholder_1a4uh_120", ee = "_selected_1a4uh_129", te = "_titleRow_1a4uh_136", ne = "_extraWrapper_1a4uh_143", re = "_extra_1a4uh_143", ie = "_extraOpen_1a4uh_188", ae = "_extraWrapperOpen_1a4uh_195", oe = "_check_1a4uh_206", se = "_titleYields_1a4uh_223", j = "_hasCheck_1a4uh_227", M = "_title_1a4uh_136", N = "_hasExtra_1a4uh_250", P = "_meta_1a4uh_264", F = "_fieldsvertical_1a4uh_271", I = "_fieldshorizontal_1a4uh_275", L = "_label_1a4uh_281", R = "_icon_1a4uh_301", z = "_labelText_1a4uh_307", B = "_value_1a4uh_315", V = "_footer_1a4uh_324", H = "_skeleton_1a4uh_328", U = "_skeletonBody_1a4uh_349", W = "_skeletonTitle_1a4uh_355", G = "_skeletonFields_1a4uh_362", ce = "_skeletonField_1a4uh_362", le = "_skeletonLabel_1a4uh_374", ue = "_skeletonValue_1a4uh_381", de = "_skeletonWithCover_1a4uh_388", fe = "_skeletonCover_1a4uh_392", K = {
15
- root: f,
16
- sizeSmall: p,
17
- main: m,
18
- fields: h,
19
- sizeMiddle: g,
20
- sizeLarge: _,
21
- positionup: v,
22
- positionleft: y,
23
- positionright: b,
24
- shapeCover: x,
25
- cover: S,
26
- coverShaperect: C,
27
- coverShapecircle: w,
28
- coverShapecover: T,
29
- coverPositionleft: E,
30
- coverPositionright: D,
31
- coverPositionup: O,
32
- coverFitComplete: k,
33
- coverPlaceholder: A,
34
- selected: ee,
35
- titleRow: te,
36
- extraWrapper: ne,
37
- extra: re,
38
- extraOpen: ie,
39
- extraWrapperOpen: ae,
40
- check: oe,
41
- titleYields: se,
42
- hasCheck: j,
43
- title: M,
44
- hasExtra: N,
45
- meta: P,
46
- fieldsvertical: F,
47
- fieldshorizontal: I,
48
- label: L,
49
- icon: R,
50
- labelText: z,
51
- value: B,
52
- footer: V,
53
- skeleton: H,
54
- "field-card-skeleton": "_field-card-skeleton_1a4uh_1",
55
- skeletonBody: U,
56
- skeletonTitle: W,
57
- skeletonFields: G,
58
- skeletonField: ce,
59
- skeletonLabel: le,
60
- skeletonValue: ue,
61
- skeletonWithCover: de,
62
- skeletonCover: fe
63
- }, pe = ({ withCover: e, className: t, style: n }) => /* @__PURE__ */ i("div", {
64
- className: l(K.root, K.skeleton, K.sizeMiddle, e && K.skeletonWithCover, t),
65
- style: n,
66
- "data-loading": "true",
67
- "data-skeleton": "true",
68
- children: [e ? /* @__PURE__ */ r("div", {
69
- className: K.skeletonCover,
70
- "data-skeleton-cover": ""
71
- }) : null, /* @__PURE__ */ i("div", {
72
- className: K.skeletonBody,
73
- children: [/* @__PURE__ */ r("div", { className: K.skeletonTitle }), /* @__PURE__ */ i("div", {
74
- className: K.skeletonFields,
75
- children: [/* @__PURE__ */ i("div", {
76
- className: K.skeletonField,
77
- "data-skeleton-field": "",
78
- children: [/* @__PURE__ */ r("div", { className: K.skeletonLabel }), /* @__PURE__ */ r("div", { className: K.skeletonValue })]
79
- }), /* @__PURE__ */ i("div", {
80
- className: K.skeletonField,
81
- "data-skeleton-field": "",
82
- children: [/* @__PURE__ */ r("div", { className: K.skeletonLabel }), /* @__PURE__ */ r("div", { className: K.skeletonValue })]
83
- })]
84
- })]
85
- })]
86
- }), q = Symbol("FieldCard.slot"), J = (e, t) => (e[q] = t, e), me = (e) => {
87
- if (typeof e == "function" && q in e) return e[q];
88
- }, Y = {
89
- small: K.sizeSmall,
90
- middle: K.sizeMiddle,
91
- large: K.sizeLarge
92
- }, he = {
93
- vertical: K.fieldsvertical,
94
- horizontal: K.fieldshorizontal
95
- }, ge = () => /* @__PURE__ */ i("svg", {
96
- viewBox: "0 0 34 34",
97
- "aria-hidden": "true",
98
- children: [
99
- /* @__PURE__ */ r("rect", {
100
- x: "4",
101
- y: "6",
102
- width: "26",
103
- height: "22",
104
- rx: "3",
105
- fill: "none",
106
- stroke: "#c5c8d4",
107
- strokeWidth: "2"
108
- }),
109
- /* @__PURE__ */ r("circle", {
110
- cx: "12",
111
- cy: "14",
112
- r: "2.2",
113
- fill: "#c5c8d4"
114
- }),
115
- /* @__PURE__ */ r("path", {
116
- d: "M7 24.5 13.2 18l4.2 4.2 2.6-2.4L27 24.5v1.2H7z",
117
- fill: "#c5c8d4"
118
- })
119
- ]
120
- }), X = ({ label: e, value: t, icon: n }) => {
121
- let a = e != null || n != null;
122
- return /* @__PURE__ */ i("div", {
123
- className: K.meta,
124
- children: [a ? /* @__PURE__ */ i("div", {
125
- className: K.label,
126
- children: [n == null ? null : /* @__PURE__ */ r("span", {
127
- className: K.icon,
128
- children: n
129
- }), e == null ? null : /* @__PURE__ */ r("span", {
130
- className: K.labelText,
131
- children: e
132
- })]
133
- }) : null, /* @__PURE__ */ r("div", {
134
- className: K.value,
135
- children: t
136
- })]
137
- });
138
- }, Z = ({ className: e, children: t, ...n }) => /* @__PURE__ */ r("div", {
139
- className: l(K.check, e),
140
- ...n,
141
- children: t
142
- }), Q = ({ className: e, children: t, onClick: n, onPointerDown: i, ...a }) => /* @__PURE__ */ r("div", {
143
- className: l(K.footer, e),
144
- ...a,
145
- onClick: (e) => {
146
- n?.(e), e.stopPropagation();
147
- },
148
- onPointerDown: (e) => {
149
- i?.(e), e.stopPropagation();
150
- },
151
- children: t
152
- });
153
- J(X, "meta"), J(Z, "check"), J(Q, "footer");
154
- var $ = ({ menus: t, onMenuClick: i, dropDownProps: a, className: o, children: s, onClick: u, onPointerDown: d, onMouseDown: f, ...p }) => {
155
- let [m, h] = c(!1);
156
- if (!t || t.length === 0) return null;
157
- let g = a?.visible !== void 0, _ = g ? !!a.visible : m, v = (e) => {
158
- g || h(e), a?.onOpenChange?.(e);
159
- }, y = (e) => {
160
- i?.(e);
161
- };
162
- return /* @__PURE__ */ r("div", {
163
- className: l(K.extraWrapper, _ && K.extraWrapperOpen),
164
- "data-kanban-no-drag": "",
165
- onClick: (e) => {
166
- e.stopPropagation();
167
- },
168
- onPointerDown: (e) => {
169
- e.stopPropagation();
170
- },
171
- onMouseDown: (e) => {
172
- e.stopPropagation();
173
- },
174
- children: /* @__PURE__ */ r(n, {
175
- showSearch: !1,
176
- offset: {
177
- x: 0,
178
- y: 4
179
- },
180
- style: {
181
- width: 80,
182
- minWidth: 80
183
- },
184
- ...a,
185
- menus: t,
186
- onClick: y,
187
- visible: _,
188
- onOpenChange: v,
189
- children: /* @__PURE__ */ r("button", {
190
- type: "button",
191
- "aria-label": "更多操作",
192
- "data-kanban-no-drag": "",
193
- "data-testid": "field-card-extra",
194
- className: l(K.extra, _ && K.extraOpen, o),
195
- onClick: (e) => {
196
- e.stopPropagation(), u?.(e);
197
- },
198
- onPointerDown: (e) => {
199
- e.stopPropagation(), d?.(e);
200
- },
201
- onMouseDown: (e) => {
202
- e.stopPropagation(), f?.(e);
203
- },
204
- ...p,
205
- children: s ?? /* @__PURE__ */ r(e, {
206
- name: "more",
207
- size: 16
208
- })
209
- })
210
- })
211
- });
212
- };
213
- J($, "extra");
214
- var _e = Object.assign(({ title: e, selected: t = !1, cover: n, coverPlaceholder: c = !1, coverLayout: u, size: f = "middle", loading: p = !1, layout: m = "vertical", children: h, className: g, style: _, theme: v }) => {
215
- let y = s(() => d(v), [v]);
216
- if (p) return /* @__PURE__ */ r(pe, {
217
- withCover: !!n,
218
- className: g,
219
- style: {
220
- ...y,
221
- ..._
222
- }
223
- });
224
- let b = !!n || c, x = b ? u?.position ?? "up" : void 0, S = b ? u?.shape ?? "cover" : void 0, C = n ? u?.fit ?? "full" : void 0, w = [], T = [], E = [], D = [];
225
- a.forEach(h, (e) => {
226
- if (!o(e)) return;
227
- let t = me(e.type);
228
- t === "check" ? w.push(e) : t === "meta" ? T.push(e) : t === "footer" ? E.push(e) : t === "extra" && D.push(e);
229
- });
230
- let O = w.length > 0 && (!b || x === "right"), k = D.length > 0;
231
- return /* @__PURE__ */ i("div", {
232
- className: l(K.root, Y[f], x && K[`position${x}`], S === "cover" && K.shapeCover, t && K.selected, w.length > 0 && K.hasCheck, k && K.hasExtra, O && K.titleYields, g),
233
- style: {
234
- ...y,
235
- ..._
236
- },
237
- "data-selected": t ? "true" : "false",
238
- "data-loading": "false",
239
- "data-size": f,
240
- "data-layout": m,
241
- "data-title-yields": O ? "true" : "false",
242
- children: [
243
- w,
244
- D,
245
- b && x && S ? /* @__PURE__ */ r("div", {
246
- className: l(K.cover, K[`coverPosition${x}`], K[`coverShape${S}`], n && C === "complete" && K.coverFitComplete, !n && K.coverPlaceholder),
247
- "data-cover-position": x,
248
- "data-cover-shape": S,
249
- "data-cover-fit": n ? C : void 0,
250
- "data-cover-placeholder": n ? void 0 : "true",
251
- children: n ? /* @__PURE__ */ r("img", {
252
- src: n,
253
- alt: ""
254
- }) : /* @__PURE__ */ r(ge, {})
255
- }) : null,
256
- /* @__PURE__ */ i("div", {
257
- className: K.main,
258
- children: [
259
- /* @__PURE__ */ r("div", {
260
- className: K.titleRow,
261
- children: /* @__PURE__ */ r("div", {
262
- className: K.title,
263
- children: e
264
- })
265
- }),
266
- T.length > 0 ? /* @__PURE__ */ r("div", {
267
- className: l(K.fields, he[m]),
268
- children: T
269
- }) : null,
270
- E
271
- ]
272
- })
273
- ]
274
- });
275
- }, {
276
- Meta: X,
277
- Check: Z,
278
- Footer: Q,
279
- Extra: $
280
- });
281
- //#endregion
282
- export { _e as t };