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