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