@baishuyun/ui-base 6.7.2 → 6.8.2
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-Dnvu_pUP.js → Amap-BNnmSPnl.js} +1 -1
- package/dist/Amap/AmapCircle/index.js +4 -3
- package/dist/Amap/{AmapCircle-Wfn43qco.js → AmapCircle-BDW6pnNR.js} +1 -1
- package/dist/Amap/AmapMarker/index.js +5 -4
- package/dist/Amap/{AmapMarker-CMlzx_nj.js → AmapMarker-CdoPWdff.js} +2 -2
- package/dist/Amap/AmapMarkerCluster/index.js +5 -4
- package/dist/Amap/{AmapMarkerCluster-MDUfcIqP.js → AmapMarkerCluster-CSIxiVC5.js} +2 -2
- package/dist/Amap/AmapProvider/index.js +5 -4
- package/dist/Amap/{AmapProvider-CGedZdvQ.js → AmapProvider-Cwi6WOe0.js} +2 -2
- package/dist/Amap/hooks/index.js +3 -2
- package/dist/Amap/{hooks-DwRvpafb.js → hooks-DAN31s_-.js} +1 -1
- package/dist/Amap/index.js +11 -10
- package/dist/Calendar/{AllDaySection-Bd5Po_DI.js → AllDaySection-a96dIzs3.js} +4 -4
- package/dist/Calendar/{Calendar-Bs4S-6rW.js → Calendar-DnQrN8KB.js} +13 -13
- package/dist/Calendar/{CurrentTimeIndicator-twXtFHIp.js → CurrentTimeIndicator-CNKsVEXH.js} +1 -1
- package/dist/Calendar/{EventCard-CvEnWcKd.js → EventCard-B1LoBxth.js} +3 -3
- package/dist/Calendar/{TimeGrid-DPtU6Qvo.js → TimeGrid-DIw8oCqY.js} +2 -2
- package/dist/Calendar/context/index.js +2 -1
- package/dist/Calendar/index.js +21 -20
- package/dist/Calendar/subcomponents/AllDaySection/index.js +8 -7
- package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +5 -4
- package/dist/Calendar/subcomponents/EventCard/index.js +6 -5
- package/dist/Calendar/subcomponents/TimeAxis/index.js +4 -3
- package/dist/Calendar/subcomponents/TimeGrid/index.js +4 -3
- package/dist/Calendar/{theme-BRVmxhqD.js → theme-xnrMsnkg.js} +2 -2
- package/dist/Calendar/utils/index.js +4 -3
- package/dist/Calendar/utils/layout/index.js +3 -2
- package/dist/Calendar/utils/theme/index.js +2 -1
- package/dist/Card/{Card-BjWdQRjq.js → Card-CtKLNh3n.js} +1 -1
- package/dist/Card/index.js +3 -2
- package/dist/CheckBox/{CheckBox-D7bCjlkU.js → CheckBox-ByWSy9Yr.js} +1 -1
- package/dist/CheckBox/{CheckBox-GtT43IQ8.js → CheckBox-nBm0u6zX.js} +1 -1
- package/dist/CheckBox/index.js +4 -3
- package/dist/ColorPicker/{ColorPicker-Hjs4Vp5a.js → ColorPicker-CL57cSDG.js} +7 -6
- package/dist/ColorPicker/index.js +8 -7
- package/dist/ConfigProvider/index.js +3 -2
- package/dist/DatePicker/{DatePicker-C_ssCNGN.js → DatePicker-C0XbZmrZ.js} +7 -7
- package/dist/DatePicker/{DatePickerPanel-DNDw-H39.js → DatePickerPanel-BEn16cat.js} +6 -5
- package/dist/DatePicker/index.js +9 -8
- package/dist/DatePicker/style/index.js +2 -1
- package/dist/DatePicker/{style-BwmM26RP.js → style-CNtPPsZp.js} +1 -1
- package/dist/DropDown/{DropDown-DYhDwsNm.js → DropDown-yDH9V_9Y.js} +8 -8
- package/dist/DropDown/index.js +12 -10
- package/dist/DropDown/style/index.js +2 -1
- package/dist/DropDown/{style-BSgosymi.js → style-Fdp-U4md.js} +1 -1
- package/dist/Editor/{Buttons-D1fP8aYo.js → Buttons-BivKInBV.js} +147 -127
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +19 -17
- package/dist/Editor/constants/index.js +1 -0
- package/dist/Editor/index.js +286 -174
- package/dist/Gantt/GanttChart/index.js +19 -17
- package/dist/Gantt/{GanttChart-VoKzDvu-.js → GanttChart-CDw1IQ4F.js} +9 -9
- package/dist/Gantt/GanttTable/index.js +12 -10
- package/dist/Gantt/{GanttTable-l-pMVjWe.js → GanttTable-xbXD_PWI.js} +5 -5
- package/dist/Gantt/GanttToolBar/index.js +15 -13
- package/dist/Gantt/{GanttToolBar-Bm_4cVHF.js → GanttToolBar-BTeTsR6Z.js} +4 -4
- package/dist/Gantt/{collapseKeys-_ShTXPKt.js → collapseKeys-B4SOVHjd.js} +2 -2
- package/dist/Gantt/index.js +27 -24
- package/dist/Gantt/{theme-CiMD9Y6i.js → theme-DLNvgM9X.js} +1 -1
- package/dist/Gantt/{timelineViewConfig-CLIpppp0.js → timelineViewConfig-9HArvbmb.js} +1 -1
- package/dist/Gantt/utils/index.js +6 -5
- package/dist/Gantt/utils/theme/index.js +2 -1
- package/dist/Icon/index.js +2 -1
- package/dist/InputTag/InputTag-hzCCJQ1z.js +144 -0
- package/dist/InputTag/index.js +7 -4
- package/dist/Loading/Loading-DiywS7ex.js +19 -0
- package/dist/Loading/index.js +4 -1
- package/dist/Modal/{Modal-GGHNlZv3.js → Modal-LiztSF7x.js} +1 -1
- package/dist/Modal/index.js +3 -2
- package/dist/NotFoundContent/index.js +2 -1
- package/dist/Radio/{Radio-CMAwZdP7.js → Radio-CX9cUqb7.js} +12 -12
- package/dist/Radio/index.js +2 -1
- package/dist/ScrollBar/{ScrollBar-CnwYQfXM.js → ScrollBar-QhXVe8zd.js} +1 -1
- package/dist/ScrollBar/index.js +3 -2
- package/dist/Segmented/{Segmented-Ck2ZmfF7.js → Segmented-BDz1hMDT.js} +1 -1
- package/dist/Segmented/index.js +2 -1
- package/dist/Select/{Select-CwABtVnS.js → Select-D6EK7whJ.js} +202 -201
- package/dist/Select/{SelectInputSearch-dfBUnTCY.js → SelectInputSearch-COUzreau.js} +2 -2
- package/dist/Select/index.js +15 -14
- package/dist/Table/{Table-ByNcMkaT.js → Table-yQXQEk6d.js} +5 -5
- package/dist/Table/hooks/index.js +2 -1
- package/dist/Table/{hooks-uCDY9dqx.js → hooks-BceUZQQm.js} +1 -1
- package/dist/Table/index.js +9 -8
- package/dist/Table/{processRowspan-nIGqGyHh.js → processRowspan-B0WELhG2.js} +1 -1
- package/dist/Table/style/index.js +2 -1
- package/dist/Table/{style-x9xfw6te.js → style-DgiPEsSp.js} +1 -1
- package/dist/Table/utils/index.js +2 -1
- package/dist/Tabs/Tabs-BiKW70CL.js +398 -0
- package/dist/Tabs/index.js +7 -4
- package/dist/Tooltip/{Tooltip-DWWWYn1a.js → Tooltip-Ch9lti_7.js} +1 -1
- package/dist/Tooltip/index.js +2 -1
- package/dist/Tree/index.js +5 -4
- package/dist/Tree/utils/index.js +1 -0
- package/dist/components/DropDown/interface.d.ts +167 -169
- package/dist/components/Editor/LengthBadge.d.ts +6 -0
- package/dist/components/Editor/ToolbarPlugin/BaseButton/BaseButton.d.ts +1 -1
- package/dist/components/Editor/ToolbarPlugin/ToolbarPlugin.d.ts +5 -1
- package/dist/components/Editor/ToolbarPlugin/context/EditorToolbarThemeContext.d.ts +6 -0
- package/dist/components/Editor/ToolbarPlugin/interface.d.ts +30 -32
- package/dist/components/Editor/index.d.ts +1 -1
- package/dist/components/Editor/interface.d.ts +118 -60
- package/dist/components/Editor/plugins/MaxLengthPlugin.d.ts +7 -0
- package/dist/components/Editor/utils/resolveEditorToolbarThemeVars.d.ts +5 -0
- package/dist/components/Editor/utils/textLength.d.ts +4 -0
- package/dist/components/InputTag/interface.d.ts +32 -32
- package/dist/components/Radio/interface.d.ts +95 -97
- package/dist/components/Tabs/TabSelect/interface.d.ts +23 -25
- package/dist/components/Tabs/interface.d.ts +58 -60
- package/dist/components/Tree/types/node.d.ts +19 -19
- package/dist/components/Tree/types/tree.d.ts +81 -83
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +54 -51
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/lang/en-US.json.d.ts +177 -166
- package/dist/locale/lang/zh-CN.json.d.ts +177 -166
- package/dist/locale/lang/zh-TW.json.d.ts +177 -166
- package/dist/style.css +1 -1
- package/dist/vendors/{ConfigProvider-AQTr7T_c.js → ConfigProvider-DxrZpdIb.js} +23 -1
- package/dist/vendors/{LocaleContext-CBcJzvUD.js → LocaleContext-Dcw6C1LX.js} +11 -0
- package/dist/vendors/{Tree-DMC_MSw1.js → Tree-DXmVRDn0.js} +10 -9
- package/dist/vendors/{useLocale-DZ8XW2VL.js → useLocale-BKZX2_zw.js} +1 -1
- package/dist/vendors/version-4HBYLKDL.js +6 -0
- package/dist/vite-env.d.ts +13 -10
- package/dist/vitest-matchers.d.ts +0 -1
- package/package.json +8 -8
- package/dist/InputTag/InputTag-25vFChWE.js +0 -143
- package/dist/Loading/Loading--cdn92gm.js +0 -15
- package/dist/Tabs/Tabs-ZRWBbBdF.js +0 -410
- package/dist/components/Amap/AmapMarker/__tests__/AmapMarker.test.d.ts +0 -1
- package/dist/components/Amap/AmapMarkerCluster/__tests__/AmapMarkerCluster.test.d.ts +0 -1
- package/dist/components/Amap/AmapProvider/__tests__/AmapProvider.test.d.ts +0 -1
- package/dist/components/Amap/__tests__/Amap.test.d.ts +0 -1
- package/dist/components/Amap/hooks/__tests__/useCurrentLocation.test.d.ts +0 -1
- package/dist/components/Calendar/__tests__/Calendar.contract.test.d.ts +0 -1
- package/dist/components/Calendar/__tests__/algorithm/monthLayoutAlgorithm.test.d.ts +0 -1
- package/dist/components/Calendar/subcomponents/DateDisplay/__tests__/DateDisplay.weekPicker.test.d.ts +0 -1
- package/dist/components/Calendar/subcomponents/DayView/__tests__/CalendarDay.dayFilter.test.d.ts +0 -1
- package/dist/components/Calendar/subcomponents/EventCard/__tests__/EventCard.tooltip.test.d.ts +0 -1
- package/dist/components/Calendar/utils/__tests__/dateUtils.test.d.ts +0 -1
- package/dist/components/Calendar/utils/__tests__/eventUtils.contract.test.d.ts +0 -1
- package/dist/components/Calendar/utils/__tests__/normalizeData.test.d.ts +0 -1
- package/dist/components/Calendar/utils/theme/__tests__/platformTheme.test.d.ts +0 -1
- package/dist/components/Calendar/utils/theme/__tests__/resolveCalendarThemeVars.test.d.ts +0 -1
- package/dist/components/Calendar/utils/theme/__tests__/resolveScheduleColorVars.test.d.ts +0 -1
- package/dist/components/Calendar/utils/theme/__tests__/resolveSubcomponentThemes.test.d.ts +0 -1
- package/dist/components/ConfigProvider/__tests__/ConfigProvider.test.d.ts +0 -1
- package/dist/components/DatePicker/__tests__/DatePicker.getPopupContainer.test.d.ts +0 -1
- package/dist/components/DatePicker/__tests__/DatePicker.triggerActiveClassName.test.d.ts +0 -1
- package/dist/components/DatePicker/__tests__/DatePickerPanel.dom.test.d.ts +0 -1
- package/dist/components/DatePicker/style/__tests__/resolveDatePickerThemeVars.test.d.ts +0 -1
- package/dist/components/DatePicker/utils/__tests__/normalizePickerValue.test.d.ts +0 -1
- package/dist/components/DropDown/__tests__/DropDown.test.d.ts +0 -1
- package/dist/components/DropDown/style/__tests__/resolveDropDownThemeVars.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/OffscreenTaskIndicators/__tests__/OffscreenTaskIndicators.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/hooks/__tests__/timelineFocus.contract.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useGanttColumnVirtual.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useGanttDrag.clippedQuarterMonth.test.d.ts +0 -0
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useOffscreenIndicators.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/hooks/__tests__/useTimelineViewportController.test.d.ts +0 -0
- package/dist/components/Gantt/GanttChart/utils/__tests__/dateRangeNormalizer.subday.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/utils/__tests__/dragEngine.quarterMonth.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/utils/__tests__/dragEngine.subday.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/utils/__tests__/headerBuilder.quarterMonth.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/utils/__tests__/headerBuilder.subday.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/utils/__tests__/quarterMonthScale.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/utils/__tests__/subdayScale.contract.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineMarkers.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineRange.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineViewConfig.test.d.ts +0 -1
- package/dist/components/Gantt/GanttChart/utils/__tests__/timelineViewportEngine.test.d.ts +0 -1
- package/dist/components/Gantt/__tests__/Gantt.contract.test.d.ts +0 -0
- package/dist/components/Gantt/__tests__/Gantt.grouped.contract.test.d.ts +0 -0
- package/dist/components/Gantt/__tests__/GanttBars.renderWindow.test.d.ts +0 -1
- package/dist/components/Gantt/__tests__/GanttChart.contract.test.d.ts +0 -0
- package/dist/components/Gantt/__tests__/GanttSummaryBar.tooltip.test.d.ts +0 -1
- package/dist/components/Gantt/__tests__/GanttToolBar.test.d.ts +0 -1
- package/dist/components/Gantt/__tests__/filterItemsByCollapse.test.d.ts +0 -1
- package/dist/components/Gantt/__tests__/interface.contract.types.test.d.ts +0 -1
- package/dist/components/Gantt/__tests__/timezoneUtils.test.d.ts +0 -1
- package/dist/components/Gantt/__tests__/useBarTooltipHover.test.d.ts +0 -1
- package/dist/components/Gantt/__tests__/useGanttHighlight.test.d.ts +0 -1
- package/dist/components/Gantt/__tests__/useTaskBarPointer.test.d.ts +0 -1
- package/dist/components/Gantt/utils/theme/__tests__/resolveGanttTheme.test.d.ts +0 -1
- package/dist/components/Gantt/utils/theme/__tests__/resolveGanttThemeVars.test.d.ts +0 -1
- package/dist/components/Gantt/utils/theme/__tests__/resolveTableThemeFromGantt.test.d.ts +0 -1
- package/dist/components/ScrollBar/__tests__/ScrollBar.test.d.ts +0 -1
- package/dist/components/Select/__tests__/Select.getPopupContainer.test.d.ts +0 -1
- package/dist/components/Select/__tests__/Select.optionDisabled.test.d.ts +0 -1
- package/dist/components/Table/__tests__/HeaderCell.test.d.ts +0 -1
- package/dist/components/Table/__tests__/TableBody.test.d.ts +0 -1
- package/dist/components/Table/__tests__/processRowspan.test.d.ts +0 -1
- package/dist/components/Table/style/__tests__/resolveTableThemeVars.test.d.ts +0 -1
- package/dist/components/Tooltip/__tests__/Tooltip.test.d.ts +0 -1
- package/dist/components/Tree/Tree.test.d.ts +0 -1
- package/dist/locale/__tests__/locale.test.d.ts +0 -1
- /package/dist/Amap/{AmapContext-CFmsMycg.js → AmapContext-D7Njjm5a.js} +0 -0
- /package/dist/Amap/{useMarkerInfoWindowController-BvP2jo7K.js → useMarkerInfoWindowController-BQmhR0N7.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/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/Icon/{Icon-SQ5tu-yG.js → Icon-BBDcb-yw.js} +0 -0
- /package/dist/NotFoundContent/{NotFoundContent-J-TEnljc.js → NotFoundContent-BLmzWNBi.js} +0 -0
- /package/dist/ScrollBar/{style-B1NkMGtS.js → style-D26azwz6.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/{color-BQYy0Wgy.js → color-D6XBXROa.js} +0 -0
- /package/dist/vendors/{cssVars-B8o94Yao.js → cssVars-BYg1matG.js} +0 -0
- /package/dist/vendors/{mergeRefs-Bai1cIzv.js → mergeRefs-Bsywq1Vo.js} +0 -0
- /package/dist/vendors/{useFloatingOverlay-WbbHmuT-.js → useFloatingOverlay-BApqkHSu.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
- /package/dist/{components/Amap/AmapCircle/__tests__/AmapCircle.test.d.ts → version.d.ts} +0 -0
|
@@ -1,170 +1,168 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
theme?: DropDownTheme;
|
|
170
|
-
}
|
|
2
|
+
/**
|
|
3
|
+
* 浮层偏移量接口
|
|
4
|
+
*/
|
|
5
|
+
export interface OffsetType {
|
|
6
|
+
/**
|
|
7
|
+
* x 轴偏移量
|
|
8
|
+
* @default 0
|
|
9
|
+
*/
|
|
10
|
+
x: number;
|
|
11
|
+
/**
|
|
12
|
+
* y 轴偏移量
|
|
13
|
+
* @default 0
|
|
14
|
+
*/
|
|
15
|
+
y: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 下拉菜单项接口
|
|
20
|
+
*/
|
|
21
|
+
export interface MenuItemType {
|
|
22
|
+
/**
|
|
23
|
+
* 菜单项的唯一标识
|
|
24
|
+
*/
|
|
25
|
+
key: string;
|
|
26
|
+
/**
|
|
27
|
+
* 菜单项的显示内容,可以是字符串或 React 节点
|
|
28
|
+
*/
|
|
29
|
+
label: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* 菜单项的图标
|
|
32
|
+
*/
|
|
33
|
+
icon?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* 是否禁用该菜单项
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 是否是系统字段
|
|
42
|
+
* @description 系统字段的颜色会比较突出,和其他字段仅文字样式的不同
|
|
43
|
+
*/
|
|
44
|
+
systemField?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 允许任意额外字段,用于自定义搜索或其他用途
|
|
47
|
+
*/
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 下拉组件级颜色 token
|
|
53
|
+
*/
|
|
54
|
+
export interface DropDownTheme {
|
|
55
|
+
/**
|
|
56
|
+
* 浮层背景色
|
|
57
|
+
* @default #fff
|
|
58
|
+
*/
|
|
59
|
+
colorBgContainer?: string;
|
|
60
|
+
/**
|
|
61
|
+
* 菜单项默认文字颜色
|
|
62
|
+
* @default #121211
|
|
63
|
+
*/
|
|
64
|
+
colorText?: string;
|
|
65
|
+
/**
|
|
66
|
+
* 菜单项图标颜色
|
|
67
|
+
* @default #6f829e
|
|
68
|
+
*/
|
|
69
|
+
colorIcon?: string;
|
|
70
|
+
/**
|
|
71
|
+
* 禁用态文字/图标颜色
|
|
72
|
+
* @default #999
|
|
73
|
+
*/
|
|
74
|
+
colorTextDisabled?: string;
|
|
75
|
+
/**
|
|
76
|
+
* 菜单项悬停背景色
|
|
77
|
+
* @default #eff0f6
|
|
78
|
+
*/
|
|
79
|
+
itemHoverBg?: string;
|
|
80
|
+
/**
|
|
81
|
+
* 高亮项背景色
|
|
82
|
+
* @default #f0f6ff
|
|
83
|
+
*/
|
|
84
|
+
itemActiveBg?: string;
|
|
85
|
+
/**
|
|
86
|
+
* 高亮项文字/图标颜色
|
|
87
|
+
* @default #0265ff
|
|
88
|
+
*/
|
|
89
|
+
itemActiveColor?: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 下拉组件的属性接口
|
|
94
|
+
*/
|
|
95
|
+
export interface DropDownProps {
|
|
96
|
+
/**
|
|
97
|
+
* 触发器子元素
|
|
98
|
+
*/
|
|
99
|
+
children: ReactNode;
|
|
100
|
+
/**
|
|
101
|
+
* 下拉菜单的菜单项列表
|
|
102
|
+
*/
|
|
103
|
+
menus: MenuItemType[];
|
|
104
|
+
/**
|
|
105
|
+
* 菜单项点击时的回调函数
|
|
106
|
+
*/
|
|
107
|
+
onClick?: (menuItem: MenuItemType) => void;
|
|
108
|
+
/**
|
|
109
|
+
* 下拉菜单打开/关闭状态变化时的回调函数
|
|
110
|
+
*/
|
|
111
|
+
onOpenChange?: (open: boolean) => void;
|
|
112
|
+
/**
|
|
113
|
+
* 控制下拉菜单的显示隐藏状态(受控模式)
|
|
114
|
+
* @description 当传入此属性时,组件将变为受控模式
|
|
115
|
+
*/
|
|
116
|
+
visible?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* 搜索框的占位符文本
|
|
119
|
+
* @default '搜索'
|
|
120
|
+
*/
|
|
121
|
+
searchPlaceholder?: string;
|
|
122
|
+
/**
|
|
123
|
+
* 搜索值变化时的回调函数
|
|
124
|
+
*/
|
|
125
|
+
onSearch?: (searchValue: string) => void;
|
|
126
|
+
/**
|
|
127
|
+
* 用于搜索的字段名
|
|
128
|
+
* @default 'label'
|
|
129
|
+
*/
|
|
130
|
+
searchKey?: string;
|
|
131
|
+
/**
|
|
132
|
+
* 是否显示搜索框
|
|
133
|
+
* @default true
|
|
134
|
+
*/
|
|
135
|
+
showSearch?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* 选择菜单项后是否关闭面板
|
|
138
|
+
* @default true
|
|
139
|
+
*/
|
|
140
|
+
closeOnSelect?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* 浮层偏移量
|
|
143
|
+
* @default { x: 0, y: 0 }
|
|
144
|
+
*/
|
|
145
|
+
offset?: OffsetType;
|
|
146
|
+
/**
|
|
147
|
+
* 自定义下拉菜单的样式
|
|
148
|
+
*/
|
|
149
|
+
style?: React.CSSProperties;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* 下拉面板浮层的 z-index
|
|
153
|
+
*/
|
|
154
|
+
zIndex?: number;
|
|
155
|
+
/**
|
|
156
|
+
* 指定下拉浮层渲染的父级 DOM 节点
|
|
157
|
+
*/
|
|
158
|
+
getPopupContainer?: () => HTMLElement;
|
|
159
|
+
/**
|
|
160
|
+
* 高亮的菜单项 key 数组
|
|
161
|
+
* @description 指定哪些菜单项应该被高亮显示
|
|
162
|
+
*/
|
|
163
|
+
activeKey?: string[];
|
|
164
|
+
/**
|
|
165
|
+
* 组件级颜色 token
|
|
166
|
+
*/
|
|
167
|
+
theme?: DropDownTheme;
|
|
168
|
+
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { EditorToolbarTheme } from '../interface';
|
|
1
2
|
import { ToolbarButtonProps } from './interface.d';
|
|
2
|
-
|
|
3
|
+
type ToolbarProps = ToolbarButtonProps & {
|
|
4
|
+
theme?: EditorToolbarTheme;
|
|
5
|
+
};
|
|
6
|
+
declare const Toolbar: React.FC<ToolbarProps>;
|
|
3
7
|
export default Toolbar;
|
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
import { ToolbarButtonName } from './Buttons';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
style?: React.CSSProperties;
|
|
33
|
-
}
|
|
2
|
+
export interface ToolbarButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* @description 根据外部配置传入你想要渲染的 toolbar 按钮
|
|
5
|
+
* @description 如果数组为空,则会渲染默认的 toolbar 按钮
|
|
6
|
+
*/
|
|
7
|
+
config?: Array<{
|
|
8
|
+
/**
|
|
9
|
+
* @description 分组的唯一标识
|
|
10
|
+
*/
|
|
11
|
+
key: string;
|
|
12
|
+
/**
|
|
13
|
+
* @description 按钮组名称
|
|
14
|
+
* @description 自定义按钮名称需要通过 registerToolbarButton 先注册
|
|
15
|
+
*/
|
|
16
|
+
buttons: Array<
|
|
17
|
+
| ToolbarButtonName
|
|
18
|
+
| {
|
|
19
|
+
name: ToolbarButtonName;
|
|
20
|
+
/**
|
|
21
|
+
* @description 各个 button 组件的 props
|
|
22
|
+
*/
|
|
23
|
+
props?: Record<string, any>;
|
|
24
|
+
}
|
|
25
|
+
>;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* @description 自定义样式
|
|
29
|
+
*/
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Editor as default } from './Editor';
|
|
2
|
-
export type { EditorProps } from './interface';
|
|
2
|
+
export type { EditorProps, EditorTheme, EditorToolbarTheme } from './interface';
|
|
3
3
|
export { registerToolbarButton, unregisterToolbarButton, listRegisteredToolbarButtons, } from './ToolbarPlugin/Buttons';
|
|
4
4
|
export type { ToolbarButtonName } from './ToolbarPlugin/Buttons';
|
|
5
5
|
export { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
@@ -1,62 +1,120 @@
|
|
|
1
1
|
import { EditorState } from 'lexical';
|
|
2
2
|
import { ToolbarButtonProps } from './ToolbarPlugin/interface.d';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
3
|
+
/** Editor 工具栏 Design Token(挂在 theme.toolbar,避免与后续 content 等命名空间冲突) */
|
|
4
|
+
export interface EditorToolbarTheme {
|
|
5
|
+
/** 工具栏背景 @default #fafafa */
|
|
6
|
+
bg?: string;
|
|
7
|
+
/** 工具栏底部分割线 @default #e0e0e0 */
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
/** 工具栏内边距 @default 5px 6px */
|
|
10
|
+
padding?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 工具栏容器 flex gap。
|
|
13
|
+
* 现状无 gap;未传时不写变量,保持与现状一致。
|
|
14
|
+
*/
|
|
15
|
+
gap?: string | number;
|
|
16
|
+
/** 组内按钮间距 @default 6px */
|
|
17
|
+
groupGap?: string | number;
|
|
18
|
+
/** 组分隔线颜色 @default #e0e0e0 */
|
|
19
|
+
dividerColor?: string;
|
|
20
|
+
/** 组分隔线高度 @default 20px */
|
|
21
|
+
dividerSize?: string | number;
|
|
22
|
+
/** 组分隔线水平外边距 @default 5px */
|
|
23
|
+
dividerMargin?: string | number;
|
|
24
|
+
/** 按钮默认图标/文字色 @default #666 */
|
|
25
|
+
colorIcon?: string;
|
|
26
|
+
/** hover 背景 @default #e0e0e0 */
|
|
27
|
+
itemHoverBg?: string;
|
|
28
|
+
/** hover 前景 @default #121211 */
|
|
29
|
+
itemHoverColor?: string;
|
|
30
|
+
/** active 背景 @default #e0e0e0 */
|
|
31
|
+
itemActiveBg?: string;
|
|
32
|
+
/** active 前景 @default #121211 */
|
|
33
|
+
itemActiveColor?: string;
|
|
34
|
+
/** 按钮内边距 @default 3px */
|
|
35
|
+
itemPadding?: string | number;
|
|
36
|
+
/** 按钮圆角 @default 2px */
|
|
37
|
+
itemBorderRadius?: string | number;
|
|
38
|
+
/** 图标尺寸 @default 14 */
|
|
39
|
+
iconSize?: string | number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface EditorTheme {
|
|
43
|
+
toolbar?: EditorToolbarTheme;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type EditorProps = {
|
|
47
|
+
/**
|
|
48
|
+
* 编辑器容器高度
|
|
49
|
+
*/
|
|
50
|
+
height?: number;
|
|
51
|
+
/**
|
|
52
|
+
* 编辑器内容变化回调
|
|
53
|
+
*/
|
|
54
|
+
onChange: (
|
|
55
|
+
{ text, html }: { text: string; html: string | null },
|
|
56
|
+
editorState: EditorState
|
|
57
|
+
) => void;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 组件主题(与 Lexical 内部 content theme 无关)
|
|
61
|
+
*/
|
|
62
|
+
theme?: EditorTheme;
|
|
63
|
+
|
|
64
|
+
toolbar?: {
|
|
65
|
+
/**
|
|
66
|
+
* toolbar 配置
|
|
67
|
+
*/
|
|
68
|
+
config?: ToolbarButtonProps['config'];
|
|
69
|
+
|
|
70
|
+
style?: React.CSSProperties;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 编辑器受控内容
|
|
75
|
+
*/
|
|
76
|
+
value?: string | null;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 最大字符数(与 onChange.text.length / getTextContent().length 一致)。
|
|
80
|
+
* 仅 `number && > 0` 时生效;未传或无效值不限制。
|
|
81
|
+
* 图片不计字数,链接只计可见文字。
|
|
82
|
+
*/
|
|
83
|
+
maxLength?: number;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 发生超限(键入拦截 / 粘贴截断 / 回填截断)时触发
|
|
87
|
+
*/
|
|
88
|
+
onMaxLengthExceed?: () => void;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @description 占位符文本
|
|
92
|
+
* @todo 待实现
|
|
93
|
+
*/
|
|
94
|
+
placeholder?: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @description 是否自动聚焦,默认为 false
|
|
98
|
+
*/
|
|
99
|
+
autoFocus?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* @description 是否禁用
|
|
102
|
+
* @todo 待实现
|
|
103
|
+
*/
|
|
104
|
+
disabled?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* @description 错误处理回调
|
|
107
|
+
* @todo 待实现
|
|
108
|
+
*/
|
|
109
|
+
onError?: (error: Error) => void;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @description 图片上传配置
|
|
113
|
+
* @todo 待实现
|
|
114
|
+
*/
|
|
115
|
+
imageUpload?: {
|
|
116
|
+
maxSize?: number; // 最大文件大小
|
|
117
|
+
accept?: string[]; // 支持的文件类型
|
|
118
|
+
customUpload?: (file: File) => Promise<string>; // 自定义上传函数
|
|
119
|
+
};
|
|
120
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type MaxLengthPluginProps = {
|
|
2
|
+
maxLength: number;
|
|
3
|
+
onMaxLengthExceed?: () => void;
|
|
4
|
+
};
|
|
5
|
+
/** Lexical Playground–style hard limit; restore when already at cap, else trim. */
|
|
6
|
+
export default function MaxLengthPlugin({ maxLength, onMaxLengthExceed, }: MaxLengthPluginProps): null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { EditorToolbarTheme } from '../interface';
|
|
2
|
+
/** 将 EditorToolbarTheme 映射为 CSS 变量(未传 token 不写入)。 */
|
|
3
|
+
export declare const resolveEditorToolbarThemeVars: (theme?: EditorToolbarTheme) => Record<string, string>;
|
|
4
|
+
/** 解析 iconSize 为数值,供 Icon size prop;默认 14(与 BaseButton 现状一致)。 */
|
|
5
|
+
export declare const resolveEditorToolbarIconSize: (iconSize?: string | number) => number;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LexicalEditor } from 'lexical';
|
|
2
|
+
export declare function isValidMaxLength(maxLength: unknown): maxLength is number;
|
|
3
|
+
/** Trim from document end to `maxLength` (metric = getTextContentSize / onChange.text). */
|
|
4
|
+
export declare function $truncateRootToMaxLength(editor: LexicalEditor, maxLength: number): boolean;
|