@oceanbase/design 0.4.16 → 1.0.0-alpha.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 (46) hide show
  1. package/dist/design.min.js +1 -1
  2. package/es/_util/genStyle.d.ts +0 -2
  3. package/es/_util/genStyle.js +0 -77
  4. package/es/badge/style/index.js +0 -1
  5. package/es/button/style/index.js +1 -30
  6. package/es/card/style/index.js +4 -2
  7. package/es/config-provider/index.js +1 -5
  8. package/es/empty/style/index.js +2 -7
  9. package/es/form/FormItem.d.ts +1 -0
  10. package/es/form/FormItem.js +1 -0
  11. package/es/index.d.ts +0 -1
  12. package/es/index.js +1 -2
  13. package/es/result/style/index.js +2 -5
  14. package/es/table/style/index.js +8 -31
  15. package/es/tabs/index.d.ts +8 -6
  16. package/es/tabs/index.js +10 -7
  17. package/es/tabs/style/index.js +2 -3
  18. package/es/theme/default.js +88 -72
  19. package/es/theme/style/aliyun.less +210 -210
  20. package/es/theme/style/compact.less +231 -231
  21. package/es/theme/style/dark.less +234 -234
  22. package/es/theme/style/default.less +231 -231
  23. package/es/typography/style/index.js +2 -6
  24. package/lib/_util/genStyle.d.ts +0 -2
  25. package/lib/_util/genStyle.js +2 -118
  26. package/lib/badge/style/index.js +0 -1
  27. package/lib/button/style/index.js +1 -37
  28. package/lib/card/style/index.js +9 -1
  29. package/lib/config-provider/index.js +1 -8
  30. package/lib/empty/style/index.js +0 -5
  31. package/lib/form/FormItem.d.ts +1 -0
  32. package/lib/form/FormItem.js +6 -0
  33. package/lib/index.d.ts +0 -1
  34. package/lib/index.js +0 -3
  35. package/lib/result/style/index.js +0 -4
  36. package/lib/table/style/index.js +1 -58
  37. package/lib/tabs/index.d.ts +8 -6
  38. package/lib/tabs/index.js +68 -62
  39. package/lib/tabs/style/index.js +6 -4
  40. package/lib/theme/default.js +86 -71
  41. package/lib/theme/style/aliyun.less +210 -210
  42. package/lib/theme/style/compact.less +231 -231
  43. package/lib/theme/style/dark.less +234 -234
  44. package/lib/theme/style/default.less +231 -231
  45. package/lib/typography/style/index.js +2 -9
  46. package/package.json +6 -6
@@ -6,7 +6,19 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
6
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
8
  import { formatTheme } from "./util/format";
9
-
9
+ var colorPrimary = '#0D6CF2';
10
+ var colorPrimarySecondary = '#598CF3';
11
+ var colorText = '#132039';
12
+ var colorTextSecondary = '#5C6B8A';
13
+ var colorTextTertiary = '#8592AD';
14
+ var colorTextQuaternary = '#C1CBE0';
15
+ var colorFill = '#CDD5E4';
16
+ var colorFillSecondary = '#E2E8F3';
17
+ var colorFillTertiary = '#F3F6FC';
18
+ var colorFillQuaternary = '#F8FAFE';
19
+ var colorFillHover = '#EFF3FA';
20
+ var colorFillSelected = '#E2E8F3';
21
+ var colorBorderSecondary = colorFillSecondary;
10
22
  // Calculated by colorBorder and getWeakenBorderColor()
11
23
  var tagColorBorder = '#cdd5e466';
12
24
  export var fontFamilyEn = "Inter, 'Noto sans', sans-serif, Roboto, 'Open Sans', 'Segoe UI', 'Helvetica Neue', 'Helvetica, Arial', 'Apple Color Emoji'";
@@ -14,128 +26,132 @@ var defaultTheme = {
14
26
  token: {
15
27
  fontFamily: "-apple-system, 'Noto Sans', BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",
16
28
  fontFamilyCode: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
17
- colorPrimaryBg: '#EAF1FF',
18
- colorPrimary: '#006AFF',
19
- colorPrimaryBgHover: '#EAF1FF',
20
- colorPrimaryBorder: '#b3ccff',
21
- colorPrimaryBorderHover: '#5189FB',
22
- colorPrimaryHover: '#5189fb',
23
- colorPrimaryActive: '#004CE6',
24
- colorPrimaryTextHover: '#5189FB',
25
- colorPrimaryText: '#006AFF',
26
- colorPrimaryTextActive: '#004CE6',
27
- colorSuccess: '#0ac185',
28
- colorSuccessBg: '#EEF8F5',
29
- colorSuccessBgHover: '#dbf0e9',
30
- colorSuccessBorder: '#B3E6D5',
31
- colorSuccessBorderHover: '#4DCCA2',
32
- colorSuccessHover: '#4DCCA2',
33
- colorSuccessActive: '#00B378',
34
- colorSuccessTextHover: '#4DCCA2',
35
- colorSuccessText: '#0AC185',
36
- colorSuccessTextActive: '#00B378',
37
- colorWarning: '#FFA21A',
38
- colorWarningBg: '#FFF5E5',
39
- colorWarningBgHover: '#ffe7c2',
40
- colorWarningBorder: '#FFD699',
41
- colorWarningBorderHover: '#FFC166',
42
- colorWarningHover: '#FFC166',
43
- colorWarningActive: '#FF9700',
44
- colorWarningTextHover: '#FFC166',
45
- colorWarningText: '#FFA21A',
46
- colorWarningTextActive: '#FF9700',
47
- colorErrorBg: '#ffebeb',
48
- colorErrorBgHover: '#ffd6d6',
49
- colorErrorBorder: '#FFB3B3',
50
- colorErrorBorderHover: '#ff7575',
51
- colorErrorHover: '#ff7575',
52
- colorErrorActive: '#CC0000',
53
- colorErrorTextHover: '#ff7575',
54
- colorErrorText: '#ff1a1a',
55
- colorErrorTextActive: '#CC0000',
56
- colorError: '#F93939',
57
- colorInfo: '#006AFF',
29
+ borderRadius: 4,
30
+ borderRadiusLG: 6,
31
+ borderRadiusSM: 2,
32
+ fontSize: 13,
33
+ fontSizeSM: 12,
34
+ colorPrimary: colorPrimary,
35
+ colorInfo: colorPrimary,
36
+ colorInfoBorder: '#598CF3',
58
37
  colorInfoBg: '#EAF1FF',
59
- colorInfoBgHover: '#EAF1FF',
60
- colorInfoBorder: '#B3CCFF',
61
- colorInfoBorderHover: '#5189FB',
62
- colorInfoHover: '#5189FB',
63
- colorInfoActive: '#004CE6',
64
- colorInfoTextHover: '#5189FB',
65
- colorInfoText: '#006AFF',
66
- colorInfoTextActive: '#004CE6',
38
+ colorInfoText: '#083E8B',
39
+ colorSuccess: '#14B781',
40
+ colorSuccessBorder: '#7ED7BA',
41
+ colorSuccessBg: '#E8F8F3',
42
+ colorSuccessText: '#096547',
43
+ colorWarning: '#F49F25',
44
+ colorWarningBorder: '#F9CB87',
45
+ colorWarningBg: '#FEF6E9',
46
+ colorWarningText: '#5B3600',
47
+ colorError: '#EF4343',
48
+ colorErrorBorder: '#F69898',
49
+ colorErrorBg: '#FDECEC',
50
+ colorErrorText: '#8A1B1B',
67
51
  colorTextBase: '#000000',
68
- colorText: '#132039',
69
- colorTextSecondary: '#5c6b8a',
70
- colorTextQuaternary: '#c1cbe0',
71
- colorTextTertiary: '#8592AD',
52
+ colorText: colorText,
53
+ colorTextSecondary: colorTextSecondary,
54
+ colorTextTertiary: colorTextTertiary,
55
+ colorTextQuaternary: colorTextQuaternary,
56
+ colorIcon: colorTextSecondary,
72
57
  colorBgBase: '#ffffff',
73
58
  colorBgContainer: '#ffffff',
74
- colorBgLayout: '#f3f6fc',
75
- colorBorder: '#CDD5E4',
76
- colorBorderSecondary: '#E2E8F3',
77
- colorFillQuaternary: '#F8FAFE',
78
- colorFillTertiary: '#f3f6fc',
79
- colorFillSecondary: '#e2e8f3',
80
- colorFill: '#cdd5e4',
59
+ colorBgLayout: colorFillQuaternary,
60
+ colorBorder: colorFill,
61
+ colorBorderSecondary: colorBorderSecondary,
62
+ colorFill: colorFill,
63
+ colorFillSecondary: colorFillSecondary,
64
+ colorFillTertiary: colorFillTertiary,
65
+ colorFillQuaternary: colorFillQuaternary,
81
66
  colorBgMask: 'rgba(19, 32, 57, 0.45)',
82
67
  colorBgElevated: '#ffffff',
83
68
  colorBgSpotlight: '#ffffff',
84
69
  boxShadow: '0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05)',
85
70
  boxShadowSecondary: '0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05)',
86
71
  boxShadowTertiary: '0 1px 2px 0 rgba(54, 69, 99, 0.03), 0 1px 6px -1px rgba(54, 69, 99, 0.02), 0 2px 4px 0 rgba(54, 69, 99, 0.02)',
87
- borderRadius: 6,
88
72
  wireframe: false,
89
73
  // Remove focus outline
90
74
  lineWidthFocus: 0
91
75
  },
92
76
  components: {
77
+ Badge: {
78
+ colorInfo: colorPrimarySecondary
79
+ },
93
80
  Breadcrumb: {
94
81
  fontSize: 12,
95
82
  // @ts-ignore
96
83
  // fontHeight is internal token
97
84
  fontHeight: 20,
98
- lastItemColor: '#5c6b8a'
85
+ lastItemColor: colorTextSecondary
86
+ },
87
+ Card: {
88
+ headerFontSize: 16,
89
+ borderRadiusLG: 8
99
90
  },
100
91
  Collapse: {
101
- colorBorder: '#E2E8F3'
92
+ colorBorder: colorBorderSecondary
102
93
  },
103
94
  InputNumber: {
104
95
  handleVisible: true
105
96
  },
97
+ Progress: {
98
+ defaultColor: colorPrimarySecondary
99
+ },
106
100
  Radio: {
107
101
  // temporarily fix style for checked disabled Radio.Button
108
- controlItemBgActiveDisabled: '#e2e8f3'
102
+ controlItemBgActiveDisabled: colorFillSecondary
109
103
  },
110
104
  Select: {
111
105
  // work for all multiple select component, including Select, TreeSelect and Cascader and so on
112
- multipleItemBg: '#F8FAFE',
106
+ multipleItemBg: colorFillQuaternary,
113
107
  multipleItemBorderColor: tagColorBorder,
114
108
  multipleItemBorderColorDisabled: tagColorBorder
115
109
  },
116
110
  Slider: {
117
- trackBg: '#006AFF',
111
+ trackBg: colorPrimary,
118
112
  trackHoverBg: '#5189fb',
119
113
  trackBgDisabled: '#b3ccff',
120
- handleColor: '#006AFF',
114
+ handleColor: colorPrimary,
121
115
  handleActiveColor: '#5189fb',
122
116
  handleColorDisabled: '#b3ccff'
123
117
  },
124
118
  Tabs: {
125
- horizontalItemGutter: 24
119
+ horizontalItemGutter: 24,
120
+ itemActiveColor: colorText,
121
+ itemSelectedColor: colorText,
122
+ itemHoverColor: colorText
126
123
  },
127
124
  Tag: {
128
- defaultColor: '#5c6b8a',
125
+ defaultColor: colorTextSecondary,
129
126
  colorBorder: tagColorBorder
130
127
  },
131
128
  Table: {
129
+ cellFontSize: 12,
130
+ headerSplitColor: 'transparent',
132
131
  cellPaddingBlock: 12,
132
+ cellPaddingInline: 16,
133
133
  cellPaddingBlockMD: 8,
134
- cellPaddingBlockSM: 4
134
+ cellPaddingBlockSM: 4,
135
+ rowHoverBg: colorFillQuaternary,
136
+ rowSelectedBg: colorFillQuaternary,
137
+ rowSelectedHoverBg: colorFillTertiary
135
138
  },
136
139
  Tooltip: {
137
140
  colorBgSpotlight: '#ffffff',
138
- colorTextLightSolid: '#132039'
141
+ colorTextLightSolid: colorText
142
+ },
143
+ Menu: {
144
+ paddingContentVertical: 0,
145
+ itemHeight: 30,
146
+ itemBorderRadius: 4,
147
+ // 80 means 50% opacity
148
+ itemHoverBg: colorFillSecondary + '80',
149
+ itemActiveBg: colorFillSecondary + '80',
150
+ itemSelectedBg: colorFillSecondary + '80',
151
+ itemColor: '#36496F',
152
+ itemSelectedColor: colorText,
153
+ itemMarginBlock: 6,
154
+ groupTitleFontSize: 11
139
155
  }
140
156
  }
141
157
  };