carbon-react 104.53.0 → 104.53.3

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 (27) hide show
  1. package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +1 -1
  2. package/esm/components/select/multi-select/multi-select.component.js +5 -6
  3. package/esm/components/select/simple-select/simple-select-test.stories.js +127 -117
  4. package/esm/components/tooltip/tooltip.component.js +4 -0
  5. package/esm/style/themes/aegean/aegean-theme.config.d.ts +0 -8
  6. package/esm/style/themes/aegean/aegean-theme.config.js +0 -10
  7. package/esm/style/themes/base/base-theme.config.d.ts +1 -296
  8. package/esm/style/themes/base/base-theme.config.js +2 -303
  9. package/esm/style/themes/base/index.d.ts +1 -303
  10. package/esm/style/themes/mint/mint-theme.config.d.ts +0 -7
  11. package/esm/style/themes/mint/mint-theme.config.js +0 -7
  12. package/esm/style/themes/sage/index.d.ts +0 -241
  13. package/esm/style/themes/sage/index.js +1 -1
  14. package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +1 -1
  15. package/lib/components/select/multi-select/multi-select.component.js +5 -6
  16. package/lib/components/select/simple-select/simple-select-test.stories.js +126 -115
  17. package/lib/components/tooltip/tooltip.component.js +5 -0
  18. package/lib/style/themes/aegean/aegean-theme.config.d.ts +0 -8
  19. package/lib/style/themes/aegean/aegean-theme.config.js +0 -13
  20. package/lib/style/themes/base/base-theme.config.d.ts +1 -296
  21. package/lib/style/themes/base/base-theme.config.js +2 -304
  22. package/lib/style/themes/base/index.d.ts +1 -303
  23. package/lib/style/themes/mint/mint-theme.config.d.ts +0 -7
  24. package/lib/style/themes/mint/mint-theme.config.js +0 -7
  25. package/lib/style/themes/sage/index.d.ts +0 -241
  26. package/lib/style/themes/sage/index.js +1 -1
  27. package/package.json +1 -1
@@ -1,8 +1,6 @@
1
1
  import tokens from "@sage/design-tokens/js/base/common";
2
- import atOpacity from "../../utils/at-opacity";
3
2
  export const space = ["var(--spacing000)", "var(--spacing100)", "var(--spacing200)", "var(--spacing300)", "var(--spacing400)", "var(--spacing500)", "var(--spacing600)", "var(--spacing700)", "var(--spacing800)", "var(--spacing900)", "var(--spacing1000)"];
4
3
  export default (palette => {
5
- const baseWithOpacity = atOpacity(palette.productGreen);
6
4
  return {
7
5
  name: "base",
8
6
  palette,
@@ -10,321 +8,23 @@ export default (palette => {
10
8
  space,
11
9
  colors: {
12
10
  // main
13
- base: palette.productGreen,
14
11
  primary: palette.genericGreenShade(15),
15
12
  secondary: palette.genericGreenShade(35),
16
13
  tertiary: palette.genericGreenShade(55),
17
- brand: palette.brilliantGreen,
18
- disabled: palette.genericGreenTint(40),
19
- whiteMix: palette.genericGreenTint(90),
20
- withOpacity: baseWithOpacity(0.55),
21
14
  loadingBarBackground: palette.genericGreenTint(70),
22
15
  // generic
23
- black: "#000000",
24
- slate: "#003349",
25
16
  white: "#FFFFFF",
26
- // element
27
- border: palette.slateTint(40),
28
- dashedBorder: "#99ADB6",
29
- dashedButtonText: "rgba(0, 0, 0, 0.9)",
30
- dashedHoverBackground: "#CCD6DB",
31
- focusedIcon: palette.slateTint(20),
32
- focusedLinkBackground: palette.goldTint(50),
33
- previewBackground: palette.slateTint(75),
34
- hoveredTabKeyline: palette.genericGreenTint(30),
35
17
  // status
36
18
  error: palette.errorRed,
37
19
  focus: palette.gold,
38
20
  info: palette.productBlueShade(3),
39
- success: palette.brilliantGreenShade(20),
40
21
  warning: palette.carrotOrange,
41
22
  destructive: {
42
23
  hover: palette.errorRedShade(20)
43
- },
44
- asterisk: palette.errorRed
45
- },
46
- progressTracker: {
47
- background: palette.slateTint(90),
48
- innerBackground: palette.slateTint(40),
49
- trafficNeutral: palette.productBlueShade(3)
50
- },
51
- anchorNavigation: {
52
- divider: palette.slateTint(80),
53
- navItemHoverBackground: palette.slateTint(90)
54
- },
55
- accordion: {
56
- border: palette.slateTint(80),
57
- background: palette.slateTint(90)
58
- },
59
- tileSelect: {
60
- border: palette.slateTint(75),
61
- disabledBackground: palette.slateTint(90),
62
- hoverBackground: palette.slateTint(95),
63
- descriptionColor: palette.blackOpacity(0.55),
64
- disabledText: palette.blackOpacity(0.3)
65
- },
66
- batchSelection: {
67
- lightTheme: palette.slateTint(70)
68
- },
69
- hr: {
70
- background: palette.slateTint(80)
71
- },
72
- editor: {
73
- border: palette.slateTint(40),
74
- counter: "rgba(0,0,0,0.55)",
75
- placeholder: "rgba(0,0,0,0.30)",
76
- button: {
77
- hover: palette.slateTint(80)
78
- },
79
- toolbar: {
80
- background: palette.slateTint(95)
81
- }
82
- },
83
- menu: {
84
- focus: palette.slateTint(95),
85
- divider: palette.slateTint(90),
86
- itemColor: palette.blackOpacity(0.9),
87
- itemColorDisabled: palette.blackOpacity(0.3),
88
- light: {
89
- text: "#000000",
90
- background: palette.slateTint(90),
91
- selected: palette.slateTint(85),
92
- divider: palette.slateTint(80),
93
- alternate: palette.slateTint(90),
94
- title: palette.slateTint(25),
95
- submenuBackground: "#FFFFFF",
96
- searchIcon: palette.slateTint(55),
97
- searchIconHover: palette.slateTint(75)
98
- },
99
- dark: {
100
- text: "#FFFFFF",
101
- background: palette.slate,
102
- divider: palette.slateTint(10),
103
- submenuBackground: palette.slateShade(50),
104
- selected: palette.slateTint(10),
105
- alternate: palette.slate,
106
- title: palette.slateTint(60),
107
- searchIcon: palette.slateTint(55),
108
- searchIconHover: palette.slateTint(75)
109
- },
110
- black: {
111
- text: "#FFFFFF",
112
- background: palette.black,
113
- submenuBackground: palette.black,
114
- selected: palette.blackTint(15),
115
- divider: palette.blackTint(15),
116
- alternate: palette.blackTint(10),
117
- title: palette.slateTint(60),
118
- searchIcon: palette.slateTint(55),
119
- searchIconHover: palette.slateTint(75)
120
- },
121
- white: {
122
- text: "#000000",
123
- background: "#FFFFFF",
124
- selected: palette.slateTint(95),
125
- divider: palette.slateTint(70),
126
- alternate: palette.slateTint(80),
127
- submenuBackground: palette.slateTint(90),
128
- title: palette.slateTint(25),
129
- searchIcon: palette.slateTint(55),
130
- searchIconHover: palette.slateTint(75)
131
24
  }
132
25
  },
133
- card: {
134
- footerBackground: palette.slateTint(95),
135
- footerBorder: palette.slateTint(80)
136
- },
137
- carousel: {
138
- activeSelectorBackground: palette.slateTint(40),
139
- inactiveSelectorBackground: palette.slateTint(80)
140
- },
141
- flatTable: {
142
- light: {
143
- headerBackground: palette.slateTint(80),
144
- border: palette.slateTint(70)
145
- },
146
- dark: {
147
- headerBackground: palette.slateTint(20),
148
- border: palette.slateTint(40)
149
- },
150
- subRow: {
151
- background: palette.slateTint(98),
152
- shadow: "rgba(0, 20, 29, 0.1)"
153
- },
154
- transparentWhite: {
155
- headerBackground: "#fff",
156
- border: "#fff"
157
- },
158
- transparentBase: {
159
- headerBackground: palette.slateTint(95),
160
- border: palette.slateTint(95)
161
- },
162
- drawerSidebar: {
163
- headerBackground: palette.slateTint(93),
164
- hover: palette.slateTint(85),
165
- highlighted: palette.slateTint(80),
166
- selected: palette.slateTint(70)
167
- },
168
- hover: palette.slateTint(95),
169
- headerIconColor: palette.slateTint(60),
170
- headerAlternativeBackground: palette.slateTint(10),
171
- selected: palette.slateTint(85),
172
- highlighted: palette.slateTint(90)
173
- },
174
- help: {
175
- color: palette.blackOpacity(0.65),
176
- hover: palette.blackOpacity(0.9)
177
- },
178
- text: {
179
- color: palette.blackOpacity(0.9),
180
- placeholder: palette.blackOpacity(0.55),
181
- size: "14px"
182
- },
183
- readOnly: {
184
- textboxBackground: palette.slateTint(98),
185
- textboxBorder: palette.slateTint(80),
186
- textboxText: palette.blackOpacity(0.74)
187
- },
188
- content: {
189
- secondaryColor: palette.slateTint(40)
190
- },
191
26
  disabled: {
192
- border: palette.slateTint(80),
193
- button: palette.slateTint(90),
194
- disabled: palette.blackOpacity(0.55),
195
- input: palette.slateTint(95),
196
- text: palette.blackOpacity(0.3),
197
- buttonText: "rgba(0,0,0,.2)",
198
- background: palette.slateTint(90),
199
- switch: palette.slateTint(89.5)
200
- },
201
- draggableItem: {
202
- border: palette.slateTint(90)
203
- },
204
- checkable: {
205
- checked: "rgba(0,0,0,0.90)"
206
- },
207
- table: {
208
- primary: palette.slateTint(95),
209
- secondary: palette.slateTint(80),
210
- tertiary: palette.slateTint(10),
211
- header: palette.slateTint(20),
212
- hover: palette.slateTint(90),
213
- selected: palette.slateTint(85),
214
- zebra: palette.slateTint(98),
215
- dragging: palette.slateTint(90)
216
- },
217
- drawer: {
218
- background: palette.slateTint(93),
219
- divider: palette.slateTint(85)
220
- },
221
- pager: {
222
- active: "rgba(0,0,0,0.90)",
223
- disabled: "rgba(0,0,0,0.3)",
224
- alternate: palette.slateTint(93)
225
- },
226
- icon: {
227
- default: "rgba(0,0,0,0.65)",
228
- defaultHover: "rgba(0,0,0,0.90)",
229
- onLightBackground: palette.slateTint(40),
230
- onLightBackgroundHover: palette.slateTint(20),
231
- disabled: "rgba(0,0,0,0.30)"
232
- },
233
- popoverContainer: {
234
- iconColor: "rgba(0,0,0,0.90)"
235
- },
236
- navigationBar: {
237
- light: {
238
- background: palette.slateTint(90),
239
- borderBottom: palette.slateTint(85)
240
- },
241
- dark: {
242
- background: "#003349",
243
- borderBottom: "#003349"
244
- },
245
- black: {
246
- background: palette.blackOpacity(1)
247
- },
248
- white: {
249
- borderBottom: palette.slateTint(85)
250
- }
251
- },
252
- numeralDate: {
253
- passive: "#668592",
254
- error: "#C7384F"
255
- },
256
- portrait: {
257
- border: palette.slateTint(50),
258
- background: palette.slateTint(95),
259
- initials: "rgba(0,0,0,0.65)"
260
- },
261
- picklist: {
262
- locked: palette.slateTint(95),
263
- lockedContent: palette.slateTint(45),
264
- lockedText: palette.blackOpacity(0.6)
265
- },
266
- pill: {
267
- neutral: palette.slateTint(30),
268
- warning: palette.carrotOrangeTint(20),
269
- neutralBackgroundFocus: palette.slateTint(10),
270
- warningButtonFocus: palette.carrotOrange,
271
- errorButtonFocus: palette.errorRedShade(20)
272
- },
273
- search: {
274
- active: palette.gold,
275
- button: "#255BC7",
276
- passive: palette.slateTint(45),
277
- icon: palette.slateTint(55),
278
- iconHover: palette.slateTint(20),
279
- searchActive: "#668592",
280
- darkVariantPlaceholder: palette.slateTint(55),
281
- darkVariantBorder: palette.slateTint(55),
282
- darkVariantText: "#FFFFFF",
283
- iconDarkVariant: palette.slateTint(55),
284
- iconDarkVariantHover: palette.slateTint(75)
285
- },
286
- select: {
287
- border: "#bfccd2",
288
- selected: palette.slateTint(95),
289
- optionHeader: palette.blackOpacity(0.55),
290
- tableHeaderBorder: palette.slateTint(80)
291
- },
292
- shadows: {
293
- depth1: "0 5px 5px 0 rgba(0,20,29,0.2), 0 10px 10px 0 rgba(0,20,29,0.1)",
294
- depth2: "0 10px 20px 0 rgba(0,20,29,0.2), 0 20px 40px 0 rgba(0,20,29,0.1)",
295
- depth3: "0 10px 30px 0 rgba(0,20,29,0.1), 0 30px 60px 0 rgba(0,20,29,0.1)",
296
- depth4: "0 10px 40px 0 rgba(0,20,29,0.04), 0 50px 80px 0 rgba(0,20,29,0.1)",
297
-
298
- /* no space after comma as it is stripped from the variable when used in the spec */
299
- cards: "0 3px 3px 0 rgba(0,20,29,0.2),0 2px 4px 0 rgba(0,20,29,0.15)",
300
- cardsIE: "0 3px 3px 0 rgba(0,20,29,0.2),0 2px 4px 0 rgba(0,20,29,0.15), 0 0 1px 0 rgba(0,20,29,0.15)"
301
- },
302
- stepSequence: {
303
- completedText: palette.genericGreenShade(15)
304
- },
305
- switch: {
306
- off: palette.slateTint(80),
307
- offDisabled: palette.slateTint(90),
308
- offHover: palette.slateTint(60),
309
- on: palette.slateTint(20),
310
- onDisabled: palette.slateTint(60),
311
- onHover: palette.slateTint(0),
312
- disabledFontColor: "rgba(0,0,0,0.30)"
313
- },
314
- tile: {
315
- border: palette.slateTint(80),
316
- footerBackground: palette.slateTint(95),
317
- separator: palette.slateTint(90)
318
- },
319
- tab: {
320
- background: palette.slateTint(80),
321
- altHover: palette.slateTint(85)
322
- },
323
- editorLinkPreview: {
324
- background: palette.slateTint(95),
325
- hoverBackground: palette.slateTint(80),
326
- border: palette.slateTint(90),
327
- url: palette.slateTint(10)
27
+ background: palette.slateTint(90)
328
28
  },
329
29
  zIndex: {
330
30
  smallOverlay: 10,
@@ -348,8 +48,7 @@ export default (palette => {
348
48
  colorsSemanticNegative500: this.colors.error,
349
49
  colorsSemanticNegative600: this.colors.destructive.hover,
350
50
  colorsSemanticCaution500: this.colors.warning,
351
- colorsSemanticInfo500: this.colors.info,
352
- fontSizes100: this.text.size
51
+ colorsSemanticInfo500: this.colors.info
353
52
  };
354
53
  }
355
54
 
@@ -11,40 +11,22 @@ type BasePalette = Palette &
11
11
  };
12
12
 
13
13
  export interface Colors {
14
- base: string;
15
14
  primary: string;
16
15
  secondary: string;
17
16
  tertiary: string;
18
- brand: string;
19
- disabled: string;
20
- whiteMix: string;
21
- withOpacity: string;
17
+ loadingBarBackground: string;
22
18
 
23
19
  // generic
24
- black: "#000000";
25
- slate: "#003349";
26
20
  white: "#FFFFFF";
27
21
 
28
- // element
29
- border: string;
30
- dashedBorder: string;
31
- dashedButtonText: string;
32
- dashedHoverBackground: string;
33
- focusedIcon: string;
34
- focusedLinkBackground: string;
35
- previewBackground: string;
36
- hoveredTabKeyline: string;
37
-
38
22
  // status
39
23
  error: string;
40
24
  focus: string;
41
25
  info: string;
42
- success: string;
43
26
  warning: string;
44
27
  destructive: {
45
28
  hover: string;
46
29
  };
47
- asterisk: string;
48
30
  }
49
31
 
50
32
  export interface ThemeObject {
@@ -55,292 +37,8 @@ export interface ThemeObject {
55
37
 
56
38
  colors: Colors;
57
39
 
58
- anchorNavigation: {
59
- divider: string;
60
- navItemHoverBackground: string;
61
- };
62
-
63
- accordion: {
64
- border: string;
65
- background: string;
66
- };
67
-
68
- tileSelect: {
69
- border: string;
70
- disabledBackground: string;
71
- hoverBackground: string;
72
- descriptionColor: string;
73
- disabledText: string;
74
- };
75
-
76
- batchSelection: {
77
- lightTheme: string;
78
- };
79
-
80
- hr: {
81
- background: string;
82
- };
83
-
84
- editor: {
85
- border: string;
86
- counter: string;
87
- placeholder: string;
88
- button: {
89
- hover: string;
90
- };
91
- toolbar: {
92
- background: string;
93
- };
94
- };
95
-
96
- menu: {
97
- focus: string;
98
- divider: string;
99
- itemColor: string;
100
- itemColorDisabled: string;
101
-
102
- light: {
103
- background: string;
104
- selected: string;
105
- divider: string;
106
- title: string;
107
- };
108
-
109
- dark: {
110
- divider: string;
111
- submenuBackground: string;
112
- selected: string;
113
- title: string;
114
- searchIcon: string;
115
- searchIconHover: string;
116
- };
117
- };
118
-
119
- form: {
120
- invalid: string;
121
- };
122
-
123
- card: {
124
- footerBackground: string;
125
- footerBorder: string;
126
- };
127
-
128
- carousel: {
129
- activeSelectorBackground: string;
130
- inactiveSelectorBackground: string;
131
- };
132
-
133
- flatTable: {
134
- light: {
135
- headerBackground: string;
136
- border: string;
137
- };
138
-
139
- dark: {
140
- headerBackground: string;
141
- border: string;
142
- };
143
-
144
- subRow: {
145
- background: string;
146
- shadow: string;
147
- };
148
-
149
- transparentWhite: {
150
- headerBackground: string;
151
- border: string;
152
- };
153
-
154
- transparentBase: {
155
- headerBackground: string;
156
- border: string;
157
- };
158
-
159
- drawerSidebar: {
160
- headerBackground: string;
161
- hover: string;
162
- highlighted: string;
163
- selected: string;
164
- };
165
-
166
- hover: string;
167
- headerIconColor: string;
168
- selected: string;
169
- highlighted: string;
170
- };
171
-
172
- help: {
173
- color: string;
174
- hover: string;
175
- };
176
-
177
- pod: {
178
- border: string;
179
- secondaryBackground: string;
180
- tertiaryBackground: string;
181
- tileBackground: string;
182
- footerBackground: string;
183
- hoverBackground: string;
184
- };
185
-
186
- text: {
187
- color: string;
188
- placeholder: string;
189
- size: string;
190
- };
191
-
192
- readOnly: {
193
- textboxBackground: string;
194
- textboxBorder: string;
195
- textboxText: string;
196
- };
197
-
198
- content: {
199
- secondaryColor: string;
200
- };
201
-
202
40
  disabled: {
203
- border: string;
204
- button: string;
205
- disabled: string;
206
- input: string;
207
- text: string;
208
- buttonText: string;
209
- background: string;
210
- switch: string;
211
- };
212
-
213
- draggableItem: {
214
- border: string;
215
- };
216
-
217
- checkable: {
218
- checked: string;
219
- };
220
-
221
- table: {
222
- primary: string;
223
- secondary: string;
224
- tertiary: string;
225
- header: string;
226
- hover: string;
227
- selected: string;
228
- zebra: string;
229
- dragging: string;
230
- };
231
-
232
- drawer: {
233
41
  background: string;
234
- divider: string;
235
- };
236
-
237
- pager: {
238
- active: string;
239
- disabled: string;
240
- alternate: string;
241
- };
242
-
243
- icon: {
244
- default: string;
245
- defaultHover: string;
246
- onLightBackground: string;
247
- onLightBackgroundHover: string;
248
- disabled: string;
249
- };
250
-
251
- popoverContainer: {
252
- iconColor: string;
253
- };
254
-
255
- navigationBar: {
256
- light: {
257
- background: string;
258
- borderBottom: string;
259
- };
260
- dark: {
261
- background: string;
262
- borderBottom: string;
263
- };
264
- black: {
265
- background: string;
266
- };
267
- white: {
268
- borderBottom: string;
269
- };
270
- };
271
-
272
- numeralDate: {
273
- passive: string;
274
- error: string;
275
- };
276
-
277
- portrait: {
278
- border: string;
279
- background: string;
280
- initials: string;
281
- };
282
-
283
- picklist: {
284
- locked: string;
285
- lockedContent: string;
286
- lockedText: string;
287
- };
288
-
289
- pill: {
290
- neutral: string;
291
- warning: string;
292
- neutralBackgroundFocus: string;
293
- warningButtonFocus: string;
294
- errorButtonFocus: string;
295
- };
296
-
297
- search: {
298
- active: string;
299
- button: string;
300
- passive: string;
301
- icon: string;
302
- iconHover: string;
303
- searchActive: string;
304
- darkVariantPlaceholder: string;
305
- darkVariantBorder: string;
306
- darkVariantText: string;
307
- iconDarkVariant: string;
308
- iconDarkVariantHover: string;
309
- };
310
-
311
- select: {
312
- border: string;
313
- selected: string;
314
- optionHeader: string;
315
- tableHeaderBorder: string;
316
- };
317
-
318
- shadows: {
319
- depth1: string;
320
- depth2: string;
321
- depth3: string;
322
- depth4: string;
323
- cards: string;
324
- cardsIE: string;
325
- };
326
-
327
- switch: {
328
- off: string;
329
- };
330
-
331
- tile: {
332
- border: string;
333
- footerBackground: string;
334
- separator: string;
335
- };
336
-
337
- tab: {
338
- background: string;
339
- altHover: string;
340
- };
341
-
342
- note: {
343
- timeStamp: string;
344
42
  };
345
43
 
346
44
  zIndex: {
@@ -1,18 +1,11 @@
1
1
  declare function _default(palette: any): {
2
2
  name: string;
3
3
  colors: {
4
- base: any;
5
4
  primary: any;
6
5
  secondary: any;
7
6
  tertiary: any;
8
- whiteMix: any;
9
- hoveredTabKeyline: any;
10
- disabled: any;
11
7
  loadingBarBackground: any;
12
8
  };
13
- stepSequence: {
14
- completedText: any;
15
- };
16
9
  readonly compatibility: {
17
10
  colorsActionMajor500: any;
18
11
  colorsActionMajor600: any;
@@ -2,18 +2,11 @@ export default (palette => {
2
2
  return {
3
3
  name: "mint",
4
4
  colors: {
5
- base: palette.productGreen,
6
5
  primary: palette.productGreenShade(23.5),
7
6
  secondary: palette.productGreenShade(41),
8
7
  tertiary: palette.productGreenShade(61),
9
- whiteMix: palette.productGreenTint(90),
10
- hoveredTabKeyline: palette.productGreenTint(30),
11
- disabled: palette.productGreenTint(40),
12
8
  loadingBarBackground: palette.productGreenTint(70)
13
9
  },
14
- stepSequence: {
15
- completedText: palette.productGreenShade(23)
16
- },
17
10
 
18
11
  get compatibility() {
19
12
  return {