@baishuyun/ui-base 6.6.0 → 6.7.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.
Files changed (97) hide show
  1. package/dist/Calendar/{AllDaySection-M-b9tRHh.js → AllDaySection-DOMayJvh.js} +3 -3
  2. package/dist/Calendar/{Calendar-C9PhASp0.js → Calendar-DSqL58yh.js} +11 -11
  3. package/dist/Calendar/{CurrentTimeIndicator-Dpi36eVJ.js → CurrentTimeIndicator-CgDrVXin.js} +1 -1
  4. package/dist/Calendar/{EventCard-BIfRqCk5.js → EventCard-BGDwQ-c7.js} +3 -3
  5. package/dist/Calendar/{TimeGrid-Dk3soSo4.js → TimeGrid-KeZ4RsDq.js} +1 -1
  6. package/dist/Calendar/context/index.js +1 -1
  7. package/dist/Calendar/index.js +16 -15
  8. package/dist/Calendar/subcomponents/AllDaySection/index.js +6 -6
  9. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +4 -4
  10. package/dist/Calendar/subcomponents/EventCard/index.js +5 -5
  11. package/dist/Calendar/subcomponents/TimeAxis/index.js +3 -3
  12. package/dist/Calendar/subcomponents/TimeGrid/index.js +2 -2
  13. package/dist/Calendar/{theme-Cgn0zQoC.js → theme-qcYESlpU.js} +2 -2
  14. package/dist/Calendar/utils/index.js +3 -3
  15. package/dist/Calendar/utils/layout/index.js +2 -2
  16. package/dist/Calendar/utils/theme/index.js +1 -1
  17. package/dist/CheckBox/{CheckBox-81R8QKHb.js → CheckBox-GtT43IQ8.js} +1 -1
  18. package/dist/CheckBox/index.js +2 -2
  19. package/dist/ColorPicker/{ColorPicker-aj57lMA5.js → ColorPicker-Hjs4Vp5a.js} +37 -35
  20. package/dist/ColorPicker/index.js +2 -1
  21. package/dist/DatePicker/DatePicker-DnH3zblC.js +96 -0
  22. package/dist/DatePicker/{DatePickerPanel-BjnLfncu.js → DatePickerPanel-CQGrY4wT.js} +2 -2
  23. package/dist/DatePicker/index.js +5 -4
  24. package/dist/DatePicker/style/index.js +1 -1
  25. package/dist/DatePicker/{style-BxWyBhZ3.js → style-BlAisgTN.js} +1 -1
  26. package/dist/DropDown/DropDown-D_Zh6fGX.js +171 -0
  27. package/dist/DropDown/index.js +6 -5
  28. package/dist/DropDown/style/index.js +1 -1
  29. package/dist/DropDown/{style-4LK6rNHe.js → style-WiojFVQn.js} +1 -1
  30. package/dist/Editor/{Buttons-Ds6bLmnl.js → Buttons-De6NyZQs.js} +3 -3
  31. package/dist/Editor/ToolbarPlugin/Buttons/index.js +10 -9
  32. package/dist/Editor/index.js +10 -9
  33. package/dist/Gantt/GanttChart/index.js +13 -12
  34. package/dist/Gantt/{GanttChart-DbI1fvxe.js → GanttChart-MwVs4NFd.js} +7 -7
  35. package/dist/Gantt/GanttTable/index.js +7 -7
  36. package/dist/Gantt/{GanttTable-C3PLGmKr.js → GanttTable-DoDMELyN.js} +5 -5
  37. package/dist/Gantt/GanttToolBar/index.js +9 -8
  38. package/dist/Gantt/{GanttToolBar-8jPQ9BAG.js → GanttToolBar-BAAQMT0x.js} +2 -2
  39. package/dist/Gantt/{collapseKeys-1N9ci2oJ.js → collapseKeys-VeqoqKwC.js} +2 -2
  40. package/dist/Gantt/index.js +20 -19
  41. package/dist/Gantt/{theme-C197Dtjy.js → theme-DLS8mdri.js} +1 -1
  42. package/dist/Gantt/{timelineViewConfig-Dl3AXO45.js → timelineViewConfig-C1T1exJd.js} +1 -1
  43. package/dist/Gantt/utils/index.js +5 -5
  44. package/dist/Gantt/utils/theme/index.js +1 -1
  45. package/dist/InputTag/{InputTag-CGQ5dXyf.js → InputTag-C4iRY5Mw.js} +1 -1
  46. package/dist/InputTag/index.js +2 -2
  47. package/dist/Loading/index.js +1 -1
  48. package/dist/NotFoundContent/index.js +1 -1
  49. package/dist/Radio/index.js +1 -1
  50. package/dist/ScrollBar/{ScrollBar-CSGBOE3e.js → ScrollBar-C4-PtPBc.js} +1 -1
  51. package/dist/ScrollBar/index.js +1 -1
  52. package/dist/Segmented/{Segmented-CzVKrL6o.js → Segmented-Ck2ZmfF7.js} +13 -12
  53. package/dist/Segmented/index.js +1 -1
  54. package/dist/Select/Select-CAoozrW7.js +743 -0
  55. package/dist/Select/index.js +10 -9
  56. package/dist/Table/{Table-BtH9Oa14.js → Table-BZspRsYV.js} +4 -4
  57. package/dist/Table/hooks/index.js +1 -1
  58. package/dist/Table/{hooks-DK8Pf7iH.js → hooks-5ETrGbzY.js} +1 -1
  59. package/dist/Table/index.js +5 -5
  60. package/dist/Table/{processRowspan-D4uv6zLk.js → processRowspan-CSW5J9Rs.js} +1 -1
  61. package/dist/Table/style/index.js +1 -1
  62. package/dist/Table/{style-BwcnT2ee.js → style-qi0sTT0x.js} +1 -1
  63. package/dist/Table/utils/index.js +1 -1
  64. package/dist/Tabs/{Tabs-7wEcxUv6.js → Tabs-sag2ofoG.js} +1 -1
  65. package/dist/Tabs/index.js +2 -2
  66. package/dist/Tooltip/{Tooltip-B_SZOy6k.js → Tooltip-DWWWYn1a.js} +1 -1
  67. package/dist/Tooltip/index.js +1 -1
  68. package/dist/Tree/index.js +3 -3
  69. package/dist/components/Select/__tests__/Select.optionDisabled.test.d.ts +1 -0
  70. package/dist/components/Select/interface.d.ts +0 -1
  71. package/dist/index.js +33 -32
  72. package/dist/style.css +1 -1
  73. package/dist/vendors/{Tree-DqnOGJtB.js → Tree-DMC_MSw1.js} +2 -2
  74. package/dist/vendors/{useFloatingPortal-B2SDNV5C.js → useFloatingPortal-CsNiNirJ.js} +1 -0
  75. package/dist/vendors/useLatchedPopupPortalRoot-hwf14FJ5.js +24 -0
  76. package/package.json +1 -1
  77. package/dist/DatePicker/DatePicker-EIFyC9zF.js +0 -115
  78. package/dist/DropDown/DropDown-B34vfoOs.js +0 -172
  79. package/dist/Select/Select-DTximYG6.js +0 -734
  80. /package/dist/Calendar/{TimeAxis-Chwxo6Yj.js → TimeAxis-f40447Et.js} +0 -0
  81. /package/dist/Calendar/{colorUtils-FNbm3zBQ.js → colorUtils-Be9RqvDV.js} +0 -0
  82. /package/dist/Calendar/{context-CzS6P3nk.js → context-BrzVkPeC.js} +0 -0
  83. /package/dist/Calendar/{layout-Cb39seCc.js → layout-rnPhDP7c.js} +0 -0
  84. /package/dist/CheckBox/{CheckBox-ejvbDr-a.js → CheckBox-D7bCjlkU.js} +0 -0
  85. /package/dist/DatePicker/{ensureDayjsPlugins-DxqbKqon.js → ensureDayjsPlugins-Bz70Nzmi.js} +0 -0
  86. /package/dist/DatePicker/{pickerLocale-CtDOOxxD.js → pickerLocale-g90uglxB.js} +0 -0
  87. /package/dist/Gantt/{GanttHighlightContext-CtT98ZnK.js → GanttHighlightContext-CMXYFPyz.js} +0 -0
  88. /package/dist/Gantt/{columnResize-DFe7F98O.js → columnResize-1nSds2g5.js} +0 -0
  89. /package/dist/Gantt/{constants-CrBb5i5p.js → constants-BSCH_s3S.js} +0 -0
  90. /package/dist/Gantt/{highlightTarget-DtCe7zto.js → highlightTarget-EEsL61Qd.js} +0 -0
  91. /package/dist/Loading/{Loading-ho-6d72M.js → Loading-CV5GuhWQ.js} +0 -0
  92. /package/dist/NotFoundContent/{NotFoundContent-CV9fTylQ.js → NotFoundContent-J-TEnljc.js} +0 -0
  93. /package/dist/Radio/{Radio-C2zJzZc3.js → Radio-CMAwZdP7.js} +0 -0
  94. /package/dist/Select/{SelectInputSearch-BDwg-Noi.js → SelectInputSearch-dfBUnTCY.js} +0 -0
  95. /package/dist/Table/{constants-CuBlYZLO.js → constants-BZfNf-UU.js} +0 -0
  96. /package/dist/vendors/{cssVars-DoQgQ2CM.js → cssVars-B8o94Yao.js} +0 -0
  97. /package/dist/vendors/{mergeRefs-TiJ0xjUN.js → mergeRefs-Bai1cIzv.js} +0 -0
@@ -1,172 +0,0 @@
1
- import { t as e } from "../ScrollBar/ScrollBar-CSGBOE3e.js";
2
- import { t } from "../vendors/useLocale-DZ8XW2VL.js";
3
- import { n } from "../vendors/animations-Mlw78WYo.js";
4
- import { t as r } from "../Select/SelectInputSearch-BDwg-Noi.js";
5
- import { t as i } from "../NotFoundContent/NotFoundContent-CV9fTylQ.js";
6
- import { t as a } from "../vendors/useFloatingPortal-B2SDNV5C.js";
7
- import { t as o } from "./style-4LK6rNHe.js";
8
- import { isEmpty as s, isNumber as c } from "lodash-es";
9
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
10
- import { cloneElement as f, isValidElement as p, memo as m, useMemo as h, useState as g } from "react";
11
- import { clsx as _ } from "clsx";
12
- import { useControllableValue 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 "fuse.js";
16
- //#region src/hooks/useDropdownSearch.ts
17
- var C = ({ menus: e, searchValue: t, enableInternalFilter: n, searchKey: r }) => {
18
- let i = h(() => new S(e, {
19
- keys: [r],
20
- ignoreLocation: !0,
21
- threshold: .3,
22
- getFn: (e, t) => {
23
- let n = e[t];
24
- return t === "label" && typeof n != "string" ? "" : String(n || "");
25
- }
26
- }), [e, r]), a = h(() => !n || s(t) ? e : i.search(t).map((e) => e.item), [
27
- e,
28
- t,
29
- n,
30
- i
31
- ]);
32
- return {
33
- filteredMenus: a,
34
- hasNoResults: h(() => n && !s(t) && a.length === 0, [
35
- n,
36
- t,
37
- a.length
38
- ])
39
- };
40
- }, w = "_dropdown__trigger_1fafn_1", T = "_dropdown__panel_1fafn_7", E = "_dropdown__search_1fafn_15", D = "_dropdown__menu_1fafn_19", O = {
41
- dropdown__trigger: w,
42
- "dropdown__trigger--disabled": "_dropdown__trigger--disabled_1fafn_4",
43
- dropdown__panel: T,
44
- dropdown__search: E,
45
- dropdown__menu: D,
46
- "dropdown__menu-item": "_dropdown__menu-item_1fafn_22",
47
- "dropdown__menu-item--disabled": "_dropdown__menu-item--disabled_1fafn_34",
48
- "dropdown__menu-item--active": "_dropdown__menu-item--active_1fafn_34",
49
- "dropdown__menu-item-icon": "_dropdown__menu-item-icon_1fafn_41",
50
- "system-field": "_system-field_1fafn_52",
51
- "dropdown__menu-item-label": "_dropdown__menu-item-label_1fafn_63"
52
- }, k = m(({ item: e, onClick: t, isActive: n = !1 }) => {
53
- let r = () => {
54
- e.disabled || t(e);
55
- }, i = e.systemField || !1;
56
- return /* @__PURE__ */ d("div", {
57
- className: _(O["dropdown__menu-item"], {
58
- [O["dropdown__menu-item--disabled"]]: e.disabled,
59
- [O["dropdown__menu-item--active"]]: n && !e.disabled,
60
- "text-[#4d609f]": i && !e.disabled && !n
61
- }),
62
- onClick: r,
63
- children: [e.icon && /* @__PURE__ */ u("div", {
64
- className: _(O["dropdown__menu-item-icon"], { [O["system-field"]]: i && !e.disabled && !n }),
65
- children: e.icon
66
- }), /* @__PURE__ */ u("div", {
67
- className: _(O["dropdown__menu-item-label"], "truncate"),
68
- children: e.label
69
- })]
70
- });
71
- });
72
- k.displayName = "BsyDropDownMenuItem";
73
- //#endregion
74
- //#region src/components/DropDown/MenuList/MenuList.tsx
75
- var A = ({ menus: e, onClick: n, hasNoResults: r, activeKey: a = [] }) => {
76
- let { t: o } = t();
77
- return e.length === 0 ? /* @__PURE__ */ u(i, {
78
- text: o("noData"),
79
- className: "px-3 py-6"
80
- }) : r ? /* @__PURE__ */ u(i, {
81
- text: o("noDataFound"),
82
- className: "px-3 py-6"
83
- }) : /* @__PURE__ */ u("div", {
84
- className: O.dropdown__menu,
85
- children: e.map((e) => /* @__PURE__ */ u(k, {
86
- item: e,
87
- onClick: n,
88
- isActive: a.includes(e.key)
89
- }, e.key))
90
- });
91
- };
92
- A.displayName = "BsyDropDownMenuList";
93
- //#endregion
94
- //#region src/components/DropDown/DropDown.tsx
95
- var j = (i) => {
96
- let { t: s } = t(), { children: m, menus: _, onClick: S, onSearch: w, searchKey: T = "label", showSearch: E = !0, closeOnSelect: D = !0, searchPlaceholder: k = s("search"), offset: j = {
97
- x: 0,
98
- y: 0
99
- }, zIndex: M = 1101, style: N, activeKey: P = [], getPopupContainer: F, theme: I } = i, [L, R] = v(i, {
100
- valuePropName: "visible",
101
- defaultValue: !1,
102
- trigger: "onOpenChange"
103
- }), [z, B] = g(""), V = () => {
104
- R(!L);
105
- }, H = () => {
106
- R(!1);
107
- }, U = (e) => {
108
- e.disabled || (S?.(e), D && H());
109
- }, W = (e) => {
110
- B(e), w?.(e);
111
- }, { filteredMenus: G, hasNoResults: K } = C({
112
- menus: _,
113
- searchValue: z,
114
- enableInternalFilter: !w,
115
- searchKey: T
116
- }), { refs: q, floatingStyles: J, getReferenceProps: Y, getFloatingProps: X } = a({
117
- isOpen: L,
118
- close: H,
119
- showMask: !1,
120
- zIndex: M,
121
- offset: {
122
- x: c(j.x) ? j.x : 0,
123
- y: c(j.y) ? j.y : 0
124
- }
125
- }), Z = p(m) ? f(m, {
126
- ...Y(),
127
- ref: q.setReference,
128
- onClick: (e) => {
129
- V(), m.props.onClick?.(e);
130
- }
131
- }) : m, Q = h(() => {
132
- let e = L ? F?.() : void 0;
133
- return e?.nodeType === 1 ? e : void 0;
134
- }, [L, F]), $ = h(() => o(I), [I]);
135
- return /* @__PURE__ */ d(l, { children: [Z, /* @__PURE__ */ u(x, {
136
- root: Q,
137
- children: /* @__PURE__ */ u(y, { children: L && /* @__PURE__ */ u("div", {
138
- ref: q.setFloating,
139
- ...X(),
140
- style: J,
141
- children: /* @__PURE__ */ u(b.div, {
142
- ...n,
143
- children: /* @__PURE__ */ d("div", {
144
- className: O.dropdown__panel,
145
- style: {
146
- ...$,
147
- ...N
148
- },
149
- children: [E && /* @__PURE__ */ u("div", {
150
- className: O.dropdown__search,
151
- children: /* @__PURE__ */ u(r, {
152
- value: z,
153
- onChange: W,
154
- searchPlaceholder: k
155
- })
156
- }), /* @__PURE__ */ u(e, {
157
- style: { maxHeight: 300 },
158
- children: /* @__PURE__ */ u(A, {
159
- menus: G,
160
- onClick: U,
161
- hasNoResults: K,
162
- activeKey: P
163
- })
164
- })]
165
- })
166
- })
167
- }) })
168
- })] });
169
- };
170
- j.displayName = "BsyDropDown";
171
- //#endregion
172
- export { j as t };