@baishuyun/ui-base 6.20.1 → 6.21.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 (57) hide show
  1. package/dist/Amap/index.js +1 -1
  2. package/dist/Calendar/{Calendar-qL5eoYtX.js → Calendar-BaIHL7cB.js} +1 -1
  3. package/dist/Calendar/index.js +3 -3
  4. package/dist/Card/index.js +1 -1
  5. package/dist/CheckBox/CheckBox-BErX3YWP.js +75 -0
  6. package/dist/CheckBox/CheckBox-Dp7hxT2F.js +37 -0
  7. package/dist/CheckBox/index.js +3 -3
  8. package/dist/ColorPicker/index.js +1 -1
  9. package/dist/ConfigProvider/index.js +1 -1
  10. package/dist/DatePicker/{DatePicker-zoV0C8jf.js → DatePicker-CbfmdBaK.js} +1 -1
  11. package/dist/DatePicker/{DatePickerPanel-BZJJDbjG.js → DatePickerPanel-BDJYZs1q.js} +1 -1
  12. package/dist/DatePicker/index.js +2 -2
  13. package/dist/DropDown/index.js +1 -1
  14. package/dist/Editor/index.js +15 -12
  15. package/dist/Gantt/index.js +1 -1
  16. package/dist/Icon/index.js +1 -1
  17. package/dist/InputTag/index.js +1 -1
  18. package/dist/Loading/index.js +1 -1
  19. package/dist/Modal/index.js +1 -1
  20. package/dist/NotFoundContent/index.js +1 -1
  21. package/dist/Overlay/index.js +1 -1
  22. package/dist/Radio/Radio-C0OAW-K-.js +96 -0
  23. package/dist/Radio/index.js +2 -2
  24. package/dist/ScrollBar/index.js +1 -1
  25. package/dist/Segmented/index.js +1 -1
  26. package/dist/Select/{Select-VIy6OKEj.js → Select-DryXF1Tp.js} +2 -2
  27. package/dist/Select/index.js +6 -6
  28. package/dist/Table/index.js +1 -1
  29. package/dist/Tabs/Tabs-Imowx4vq.js +401 -0
  30. package/dist/Tabs/index.js +2 -2
  31. package/dist/Tooltip/index.js +1 -1
  32. package/dist/Tree/index.js +4 -4
  33. package/dist/components/CheckBox/CheckBox.d.ts +2 -45
  34. package/dist/components/CheckBox/Group.d.ts +3 -33
  35. package/dist/components/CheckBox/index.d.ts +1 -1
  36. package/dist/components/CheckBox/interface.d.ts +142 -0
  37. package/dist/components/CheckBox/style/resolveCheckBoxThemeVars.d.ts +2 -0
  38. package/dist/components/Radio/index.d.ts +1 -0
  39. package/dist/components/Radio/interface.d.ts +67 -0
  40. package/dist/components/Radio/style/resolveRadioThemeVars.d.ts +2 -0
  41. package/dist/components/Tabs/Tab/Tab.d.ts +1 -2
  42. package/dist/components/Tabs/TabSelect/interface.d.ts +8 -1
  43. package/dist/components/Tabs/context/TabContext.d.ts +0 -1
  44. package/dist/components/Tabs/index.d.ts +1 -0
  45. package/dist/components/Tabs/interface.d.ts +70 -2
  46. package/dist/components/Tabs/style/index.d.ts +1 -0
  47. package/dist/components/Tabs/style/resolveTabsThemeVars.d.ts +2 -0
  48. package/dist/components/index.d.ts +3 -0
  49. package/dist/index.js +9 -9
  50. package/dist/style.css +1 -1
  51. package/dist/vendors/{Tree-D0Q1IZ2D.js → Tree-DWK-JPnJ.js} +2 -2
  52. package/dist/vendors/{version-CkTjB1Kb.js → version-CyVENVWD.js} +1 -1
  53. package/package.json +1 -1
  54. package/dist/CheckBox/CheckBox-CM24-quL.js +0 -33
  55. package/dist/CheckBox/CheckBox-CcHskTz_.js +0 -67
  56. package/dist/Radio/Radio-D9jhW7K6.js +0 -85
  57. package/dist/Tabs/Tabs-DnoZ8BO0.js +0 -413
@@ -45,6 +45,68 @@ export interface RadioProps {
45
45
  * @description radio 的值,用于 radio group
46
46
  */
47
47
  value?: string | number;
48
+
49
+ /**
50
+ * @description 组件级颜色 token
51
+ */
52
+ theme?: RadioTheme;
53
+ }
54
+
55
+ export interface RadioTheme {
56
+ /**
57
+ * @description 选中背景色
58
+ */
59
+ checkedBg?: string;
60
+
61
+ /**
62
+ * @description 选中边框色
63
+ */
64
+ checkedBorder?: string;
65
+
66
+ /**
67
+ * @description 选中圆点色
68
+ */
69
+ dotColor?: string;
70
+
71
+ /**
72
+ * @description 未选背景色
73
+ */
74
+ uncheckedBg?: string;
75
+
76
+ /**
77
+ * @description 未选边框色
78
+ */
79
+ colorBorder?: string;
80
+
81
+ /**
82
+ * @description 未选悬停边框色
83
+ */
84
+ colorBorderHover?: string;
85
+
86
+ /**
87
+ * @description 禁用未选背景色
88
+ */
89
+ colorBgDisabled?: string;
90
+
91
+ /**
92
+ * @description 禁用未选边框色
93
+ */
94
+ colorBorderDisabled?: string;
95
+
96
+ /**
97
+ * @description 禁用已选背景色
98
+ */
99
+ checkedDisabledBg?: string;
100
+
101
+ /**
102
+ * @description 禁用已选边框色
103
+ */
104
+ checkedDisabledBorder?: string;
105
+
106
+ /**
107
+ * @description 禁用已选圆点色
108
+ */
109
+ checkedDisabledDot?: string;
48
110
  }
49
111
 
50
112
  export interface RadioGroupProps {
@@ -93,4 +155,9 @@ export interface RadioGroupProps {
93
155
  * @description 自定义样式
94
156
  */
95
157
  style?: React.CSSProperties;
158
+
159
+ /**
160
+ * @description 组件级颜色 token,子项可覆盖同名变量
161
+ */
162
+ theme?: RadioTheme;
96
163
  }
@@ -0,0 +1,2 @@
1
+ import { RadioTheme } from '../interface';
2
+ export declare const resolveRadioThemeVars: (theme?: RadioTheme) => Record<string, string>;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { TabsProps } from '../interface';
3
- interface TabProps extends Pick<TabsProps, 'color' | 'type'> {
2
+ interface TabProps {
4
3
  label: React.ReactNode;
5
4
  active?: boolean;
6
5
  onClick?: (key: string) => void;
@@ -1,4 +1,5 @@
1
1
  import { TabType } from '../constants';
2
+ import { TabsTheme } from '../interface';
2
3
  type TabSelectProps = {
3
4
  /**
4
5
  * @description 下拉选中的 tab 类型
@@ -16,9 +17,15 @@ type TabSelectProps = {
16
17
  defaultValue?: TabType;
17
18
 
18
19
  /**
19
- * @description 主题色
20
+ * @deprecated 请使用 `theme.colorPrimary`
21
+ * @description 主题色,等价于 `theme.colorPrimary`
20
22
  */
21
23
  color?: string;
24
+
25
+ /**
26
+ * @description 预览页签的颜色 token
27
+ */
28
+ theme?: TabsTheme;
22
29
  };
23
30
 
24
31
  export type { TabSelectProps };
@@ -1,6 +1,5 @@
1
1
  import { TabType } from '../constants';
2
2
  declare const TabContext: import('react').Context<{
3
- color?: string;
4
3
  type?: TabType;
5
4
  disabled?: boolean;
6
5
  }>;
@@ -2,3 +2,4 @@ export { default } from './Tabs';
2
2
  export { default as TabSelect } from './TabSelect/TabSelect';
3
3
  export { default as TabPanel } from './TabPanel/TabPanel';
4
4
  export { TABS_TYPE, type TabType } from './constants';
5
+ export type { TabsProps, TabsTheme } from './interface';
@@ -1,4 +1,66 @@
1
1
  import { TabType } from './constants';
2
+ interface TabsTheme {
3
+ /**
4
+ * @description 主色。指示条、line/card 选中文字、filled/badge 选中背景与底边可回退到此值
5
+ */
6
+ colorPrimary?: string;
7
+
8
+ /**
9
+ * @description 未选中文字色
10
+ */
11
+ colorText?: string;
12
+
13
+ /**
14
+ * @description 选中文字色。不传时 line/card 跟随 colorPrimary,filled/badge 为 #fff
15
+ */
16
+ itemActiveColor?: string;
17
+
18
+ /**
19
+ * @description 未选中项背景(card / filled-card / badge-card 轨道)
20
+ */
21
+ itemBg?: string;
22
+
23
+ /**
24
+ * @description 未选中项悬停背景
25
+ */
26
+ itemHoverBg?: string;
27
+
28
+ /**
29
+ * @description 选中项背景。不传时 filled/badge 跟随 colorPrimary,card 为 #fff
30
+ */
31
+ itemActiveBg?: string;
32
+
33
+ /**
34
+ * @description card 选中渐变起始色,默认 colorPrimary 的 10% 透明
35
+ */
36
+ itemActiveGradientFrom?: string;
37
+
38
+ /**
39
+ * @description card 选中渐变结束色
40
+ */
41
+ itemActiveGradientTo?: string;
42
+
43
+ /**
44
+ * @description line 底部分割线
45
+ */
46
+ colorBorder?: string;
47
+
48
+ /**
49
+ * @description 指示条颜色,默认跟随 colorPrimary
50
+ */
51
+ inkBarColor?: string;
52
+
53
+ /**
54
+ * @description 滚动按钮图标色
55
+ */
56
+ colorIcon?: string;
57
+
58
+ /**
59
+ * @description 滚动按钮禁用色
60
+ */
61
+ colorIconDisabled?: string;
62
+ }
63
+
2
64
  interface TabsProps {
3
65
  items?: {
4
66
  /**
@@ -31,10 +93,16 @@ interface TabsProps {
31
93
  onChange?: (key: string) => void;
32
94
 
33
95
  /**
34
- * @description 主题色
96
+ * @deprecated 请使用 `theme.colorPrimary`
97
+ * @description 主题色,等价于 `theme.colorPrimary`
35
98
  */
36
99
  color?: string;
37
100
 
101
+ /**
102
+ * @description 组件级颜色 token
103
+ */
104
+ theme?: TabsTheme;
105
+
38
106
  /**
39
107
  * @description 页签的基本样式,可选 line、card 、 filled-card、 badge-card 类型
40
108
  */
@@ -56,4 +124,4 @@ interface TabsProps {
56
124
  style?: React.CSSProperties;
57
125
  }
58
126
 
59
- export type { TabsProps };
127
+ export type { TabsProps, TabsTheme };
@@ -0,0 +1 @@
1
+ export { resolveTabsThemeVars } from './resolveTabsThemeVars';
@@ -0,0 +1,2 @@
1
+ import { TabsTheme } from '../interface';
2
+ export declare const resolveTabsThemeVars: (theme?: TabsTheme, color?: string) => Record<string, string>;
@@ -17,10 +17,13 @@ export { Select } from './Select';
17
17
  export type { BaseOptionType, DefaultOptionType, FieldNames, BaseSelectProps, SelectTheme, SelectProps, SelectRef, } from './Select';
18
18
  export { Tree } from './Tree';
19
19
  export { default as Checkbox } from './CheckBox';
20
+ export type { CheckboxProps, CheckboxGroupProps, CheckBoxTheme } from './CheckBox';
20
21
  export { default as Radio } from './Radio';
22
+ export type { RadioProps, RadioGroupProps, RadioTheme } from './Radio';
21
23
  /** @deprecated 拼写错误别名,请改用 `Radio` */
22
24
  export { default as Ratio } from './Radio';
23
25
  export { default as Tabs } from './Tabs';
26
+ export type { TabsProps, TabsTheme } from './Tabs';
24
27
  export { default as DropDown } from './DropDown';
25
28
  export type { DropDownProps, DropDownTheme, MenuItemType, OffsetType } from './DropDown';
26
29
  export { default as Loading } from './Loading';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./vendors/version-CkTjB1Kb.js";
1
+ import "./vendors/version-CyVENVWD.js";
2
2
  import "./ScrollBar/style-D26azwz6.js";
3
3
  import { t as e } from "./Icon/Icon-DrdQOEJE.js";
4
4
  import "./vendors/LocaleContext-DXQoOKM2.js";
@@ -14,23 +14,23 @@ import "./vendors/useLocale-Be4e7Xfn.js";
14
14
  import "./vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
15
15
  import { t as _ } from "./Segmented/Segmented-BkTy5v9V.js";
16
16
  import { n as v, t as y } from "./Tooltip/Tooltip-DBrt3t2r.js";
17
- import { t as b } from "./Select/Select-VIy6OKEj.js";
17
+ import { t as b } from "./Select/Select-DryXF1Tp.js";
18
18
  import "./Select/SelectInputSearch-MApQHnU9.js";
19
- import { t as x } from "./vendors/Tree-D0Q1IZ2D.js";
20
- import "./CheckBox/CheckBox-CcHskTz_.js";
21
- import { t as S } from "./CheckBox/CheckBox-CM24-quL.js";
22
- import { t as C } from "./Radio/Radio-D9jhW7K6.js";
19
+ import { t as x } from "./vendors/Tree-DWK-JPnJ.js";
20
+ import "./CheckBox/CheckBox-BErX3YWP.js";
21
+ import { t as S } from "./CheckBox/CheckBox-Dp7hxT2F.js";
22
+ import { t as C } from "./Radio/Radio-C0OAW-K-.js";
23
23
  import { t as w } from "./NotFoundContent/NotFoundContent-DJUQ0_2D.js";
24
24
  import { t as T } from "./ScrollBar/ScrollBar-IMTuAOF5.js";
25
25
  import "./vendors/useFloatingPortal-DJ1iKmW-.js";
26
26
  import "./Tree/index.js";
27
- import { n as E, t as D } from "./Tabs/Tabs-DnoZ8BO0.js";
27
+ import { n as E, t as D } from "./Tabs/Tabs-Imowx4vq.js";
28
28
  import { t as O } from "./DropDown/DropDown-B_szM67V.js";
29
29
  import { t as k } from "./Loading/Loading-Cherk9Ax.js";
30
30
  import "./NotFoundContent/index.js";
31
31
  import { t as A } from "./InputTag/InputTag-C_5nm0eo.js";
32
- import { t as j } from "./Calendar/Calendar-qL5eoYtX.js";
33
- import { t as M } from "./DatePicker/DatePicker-zoV0C8jf.js";
32
+ import { t as j } from "./Calendar/Calendar-BaIHL7cB.js";
33
+ import { t as M } from "./DatePicker/DatePicker-CbfmdBaK.js";
34
34
  import "./DatePicker/pickerLocale-Brf7_Tnd.js";
35
35
  import { c as N, d as P, f as F, i as I, l as L, m as R, n as z, o as B, p as V, r as H, s as U, t as W, u as G } from "./Table/Table-8ac6xLZv.js";
36
36
  import "overlayscrollbars/overlayscrollbars.css";