carbon-react 103.0.0 → 104.1.0

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 (70) hide show
  1. package/lib/components/badge/badge.style.d.ts +1 -1
  2. package/lib/components/badge/badge.style.js +3 -9
  3. package/lib/components/date/__internal__/date-formats/index.d.ts +8 -0
  4. package/lib/components/date/__internal__/date-formats/index.js +47 -0
  5. package/lib/components/date/__internal__/date-picker/date-picker.component.d.ts +3 -0
  6. package/lib/components/date/__internal__/date-picker/date-picker.component.js +154 -0
  7. package/lib/components/date/__internal__/date-picker/date-picker.d.ts +25 -0
  8. package/lib/components/date/{day-picker.style.d.ts → __internal__/date-picker/day-picker.style.d.ts} +0 -0
  9. package/lib/components/date/{day-picker.style.js → __internal__/date-picker/day-picker.style.js} +5 -1
  10. package/lib/components/date/__internal__/date-picker/index.d.ts +1 -0
  11. package/lib/{__internal__/date → components/date/__internal__/date-picker}/index.js +2 -2
  12. package/lib/components/date/{navbar → __internal__/navbar}/button.style.d.ts +0 -0
  13. package/lib/components/date/{navbar → __internal__/navbar}/button.style.js +1 -1
  14. package/lib/components/date/{navbar → __internal__/navbar}/index.d.ts +0 -0
  15. package/lib/components/date/{navbar → __internal__/navbar}/index.js +0 -0
  16. package/lib/components/date/{navbar → __internal__/navbar}/navbar.component.d.ts +0 -0
  17. package/lib/components/date/{navbar → __internal__/navbar}/navbar.component.js +10 -12
  18. package/lib/components/date/__internal__/navbar/navbar.d.ts +8 -0
  19. package/lib/components/date/{navbar → __internal__/navbar}/navbar.style.d.ts +0 -0
  20. package/lib/components/date/{navbar → __internal__/navbar}/navbar.style.js +1 -1
  21. package/lib/components/date/__internal__/utils.d.ts +19 -0
  22. package/lib/components/date/__internal__/utils.js +182 -0
  23. package/lib/components/date/{weekday → __internal__/weekday}/abbr.style.d.ts +0 -0
  24. package/lib/components/date/{weekday → __internal__/weekday}/abbr.style.js +0 -0
  25. package/lib/components/date/{weekday → __internal__/weekday}/index.d.ts +0 -0
  26. package/lib/components/date/{weekday → __internal__/weekday}/index.js +0 -0
  27. package/lib/components/date/{weekday → __internal__/weekday}/weekday.component.d.ts +0 -0
  28. package/lib/components/date/{weekday → __internal__/weekday}/weekday.component.js +0 -0
  29. package/lib/components/date/__internal__/weekday/weekday.d.ts +13 -0
  30. package/lib/components/date/{weekday → __internal__/weekday}/weekday.style.d.ts +0 -0
  31. package/lib/components/date/{weekday → __internal__/weekday}/weekday.style.js +1 -1
  32. package/lib/components/date/date.component.d.ts +27 -55
  33. package/lib/components/date/date.component.js +291 -661
  34. package/lib/components/date/date.d.ts +28 -20
  35. package/lib/components/date/date.style.js +3 -2
  36. package/lib/components/date/index.js +2 -10
  37. package/lib/components/date-range/date-range-context.d.ts +17 -0
  38. package/lib/components/date-range/date-range.component.d.ts +3 -5
  39. package/lib/components/date-range/date-range.component.js +123 -119
  40. package/lib/components/date-range/date-range.context.d.ts +3 -0
  41. package/lib/components/date-range/date-range.context.js +14 -0
  42. package/lib/components/date-range/date-range.d.ts +5 -7
  43. package/lib/components/date-range/date-range.style.js +1 -0
  44. package/lib/components/date-range/index.d.ts +1 -0
  45. package/lib/components/i18n-provider/i18n-provider.component.d.ts +1 -4
  46. package/lib/components/i18n-provider/i18n-provider.component.js +1 -4
  47. package/lib/components/progress-tracker/progress-tracker.component.d.ts +42 -11
  48. package/lib/components/progress-tracker/progress-tracker.component.js +35 -1
  49. package/lib/components/progress-tracker/progress-tracker.d.ts +13 -0
  50. package/lib/components/step-sequence/step-sequence-item/step-sequence-item.style.js +13 -23
  51. package/lib/locales/date-fns-locales/index.d.ts +1 -0
  52. package/lib/locales/date-fns-locales/index.js +18 -0
  53. package/lib/locales/en-gb.js +3 -4
  54. package/lib/locales/locale.d.ts +3 -4
  55. package/lib/locales/pl-pl.d.ts +1 -1
  56. package/lib/locales/pl-pl.js +5 -0
  57. package/lib/style/themes/aegean/aegean-theme.config.d.ts +1 -0
  58. package/lib/style/themes/aegean/aegean-theme.config.js +2 -1
  59. package/lib/style/themes/base/base-theme.config.d.ts +162 -93
  60. package/lib/style/themes/mint/mint-theme.config.d.ts +1 -0
  61. package/lib/style/themes/mint/mint-theme.config.js +2 -1
  62. package/lib/style/themes/sage/index.d.ts +162 -93
  63. package/package.json +7 -7
  64. package/lib/__internal__/date/date.d.ts +0 -34
  65. package/lib/__internal__/date/date.js +0 -216
  66. package/lib/__internal__/date/index.d.ts +0 -1
  67. package/lib/__spec_helper__/mock-date-helper.d.ts +0 -1
  68. package/lib/__spec_helper__/mock-date-helper.js +0 -37
  69. package/lib/components/date/date-picker.component.d.ts +0 -22
  70. package/lib/components/date/date-picker.component.js +0 -218
@@ -17,6 +17,7 @@ declare function _default(palette: any): {
17
17
  colorsActionMajor500: any;
18
18
  colorsActionMajor600: any;
19
19
  colorsActionMajor150: any;
20
+ colorsBaseTheme: any;
20
21
  };
21
22
  };
22
23
  export default _default;
@@ -26,7 +26,8 @@ var _default = palette => {
26
26
  return {
27
27
  colorsActionMajor500: this.colors.primary,
28
28
  colorsActionMajor600: this.colors.secondary,
29
- colorsActionMajor150: this.colors.loadingBarBackground
29
+ colorsActionMajor150: this.colors.loadingBarBackground,
30
+ colorsBaseTheme: this.colors.primary
30
31
  };
31
32
  }
32
33
 
@@ -7,14 +7,69 @@ declare var _default: {
7
7
  colorsYin030: string;
8
8
  colorsYin055: string;
9
9
  colorsYin065: string;
10
+ colorsYin075: string;
10
11
  colorsYin090: string;
11
12
  colorsYang100: string;
13
+ colorsYang080: string;
14
+ colorsGray850: string;
15
+ colorsGray900: string;
16
+ colorsGray1000: string;
17
+ colorsGray000: string;
12
18
  colorsDisabled400: string;
13
19
  colorsDisabled500: string;
14
20
  colorsDisabled600: string;
15
21
  colorsReadOnly400: string;
16
22
  colorsReadOnly500: string;
17
23
  colorsReadOnly600: string;
24
+ colorsComponentsMenuSpringStandard500: string;
25
+ colorsComponentsMenuSpringStandard600: string;
26
+ colorsComponentsMenuSpringStandard700: string;
27
+ colorsComponentsMenuSpringParent500: string;
28
+ colorsComponentsMenuSpringParent600: string;
29
+ colorsComponentsMenuSpringParent700: string;
30
+ colorsComponentsMenuSpringChild400: string;
31
+ colorsComponentsMenuSpringChild500: string;
32
+ colorsComponentsMenuSpringChild600: string;
33
+ colorsComponentsMenuSpringChildAlt500: string;
34
+ colorsComponentsMenuSpringChildAlt600: string;
35
+ colorsComponentsMenuSummerStandard500: string;
36
+ colorsComponentsMenuSummerStandard600: string;
37
+ colorsComponentsMenuSummerStandard700: string;
38
+ colorsComponentsMenuSummerParent500: string;
39
+ colorsComponentsMenuSummerParent600: string;
40
+ colorsComponentsMenuSummerParent700: string;
41
+ colorsComponentsMenuSummerChild400: string;
42
+ colorsComponentsMenuSummerChild500: string;
43
+ colorsComponentsMenuSummerChild600: string;
44
+ colorsComponentsMenuSummerChildAlt500: string;
45
+ colorsComponentsMenuSummerChildAlt600: string;
46
+ colorsComponentsMenuAutumnStandard500: string;
47
+ colorsComponentsMenuAutumnStandard600: string;
48
+ colorsComponentsMenuAutumnStandard700: string;
49
+ colorsComponentsMenuAutumnParent500: string;
50
+ colorsComponentsMenuAutumnParent600: string;
51
+ colorsComponentsMenuAutumnParent700: string;
52
+ colorsComponentsMenuAutumnChild400: string;
53
+ colorsComponentsMenuAutumnChild500: string;
54
+ colorsComponentsMenuAutumnChild600: string;
55
+ colorsComponentsMenuAutumnChildAlt500: string;
56
+ colorsComponentsMenuAutumnChildAlt600: string;
57
+ colorsComponentsMenuWinterStandard500: string;
58
+ colorsComponentsMenuWinterStandard600: string;
59
+ colorsComponentsMenuWinterStandard700: string;
60
+ colorsComponentsMenuWinterParent500: string;
61
+ colorsComponentsMenuWinterParent600: string;
62
+ colorsComponentsMenuWinterParent700: string;
63
+ colorsComponentsMenuWinterChild400: string;
64
+ colorsComponentsMenuWinterChild500: string;
65
+ colorsComponentsMenuWinterChild600: string;
66
+ colorsComponentsMenuWinterChildAlt500: string;
67
+ colorsComponentsMenuWinterChildAlt600: string;
68
+ colorsComponentsMenuYin100: string;
69
+ colorsComponentsMenuYin065: string;
70
+ colorsComponentsMenuYin090: string;
71
+ colorsComponentsMenuYang100: string;
72
+ colorsComponentsMenuYang080: string;
18
73
  colorsComponentsNavigation500: string;
19
74
  colorsComponentsNavigation600: string;
20
75
  colorsComponentsNavigation700: string;
@@ -33,6 +88,7 @@ declare var _default: {
33
88
  colorsUtilityMajor500: string;
34
89
  colorsUtilityMajor800: string;
35
90
  colorsUtilityMajor025: string;
91
+ colorsUtilityMajor040: string;
36
92
  colorsUtilityMajor050: string;
37
93
  colorsUtilityMajor075: string;
38
94
  colorsUtilityMajorTransparent: string;
@@ -65,7 +121,9 @@ declare var _default: {
65
121
  colorsActionMinor300: string;
66
122
  colorsActionMinor400: string;
67
123
  colorsActionMinor500: string;
124
+ colorsActionMinor550: string;
68
125
  colorsActionMinor600: string;
126
+ colorsActionMinor850: string;
69
127
  colorsActionMinor900: string;
70
128
  colorsActionMinor025: string;
71
129
  colorsActionMinor050: string;
@@ -186,6 +244,7 @@ declare var _default: {
186
244
  fontSizes025: string;
187
245
  fontSizes050: string;
188
246
  boxShadow100: string;
247
+ boxShadow150: string;
189
248
  boxShadow200: string;
190
249
  boxShadow300: string;
191
250
  boxShadow400: string;
@@ -201,100 +260,111 @@ declare var _default: {
201
260
  fontFamiliesAndroid: string;
202
261
  fontFamiliesOther: string;
203
262
  borderRadiusCircle: string;
204
- typographyAccordionTitleM: typeof tokens.typographyAccordionTitleM;
205
- typographyAccordionSubtitleM: typeof tokens.typographyAccordionSubtitleM;
206
- typographyAccordionParagraphM: typeof tokens.typographyAccordionParagraphM;
207
- typographyActionPopoverMenuItemM: typeof tokens.typographyActionPopoverMenuItemM;
208
- typographyAnchorNavLabelM: typeof tokens.typographyAnchorNavLabelM;
209
- typographyBadgeLabelM: typeof tokens.typographyBadgeLabelM;
210
- typographyButtonLabelS: typeof tokens.typographyButtonLabelS;
211
- typographyButtonLabelM: typeof tokens.typographyButtonLabelM;
212
- typographyButtonLabelL: typeof tokens.typographyButtonLabelL;
213
- typographyDialogTitleXs: typeof tokens.typographyDialogTitleXs;
214
- typographyDialogTitleS: typeof tokens.typographyDialogTitleS;
215
- typographyDialogTitleMs: typeof tokens.typographyDialogTitleMs;
216
- typographyDialogTitleM: typeof tokens.typographyDialogTitleM;
217
- typographyDialogTitleMl: typeof tokens.typographyDialogTitleMl;
218
- typographyDialogTitleL: typeof tokens.typographyDialogTitleL;
219
- typographyDialogTitleXl: typeof tokens.typographyDialogTitleXl;
220
- typographyDialogParagraphXs: typeof tokens.typographyDialogParagraphXs;
221
- typographyDialogParagraphS: typeof tokens.typographyDialogParagraphS;
222
- typographyFlashTextM: typeof tokens.typographyFlashTextM;
223
- typographyFlashTextL: typeof tokens.typographyFlashTextL;
224
- typographyFormFieldLabelXs: typeof tokens.typographyFormFieldLabelXs;
225
- typographyFormFieldLabelS: typeof tokens.typographyFormFieldLabelS;
226
- typographyFormFieldLabelM: typeof tokens.typographyFormFieldLabelM;
227
- typographyFormFieldLabelL: typeof tokens.typographyFormFieldLabelL;
228
- typographyFormFieldHintTextXs: typeof tokens.typographyFormFieldHintTextXs;
229
- typographyFormFieldHintTextS: typeof tokens.typographyFormFieldHintTextS;
230
- typographyFormFieldHintTextM: typeof tokens.typographyFormFieldHintTextM;
231
- typographyFormFieldHintTextL: typeof tokens.typographyFormFieldHintTextL;
232
- typographyFormFieldErrorMessageXs: typeof tokens.typographyFormFieldErrorMessageXs;
233
- typographyFormFieldErrorMessageS: typeof tokens.typographyFormFieldErrorMessageS;
234
- typographyFormFieldErrorMessageM: typeof tokens.typographyFormFieldErrorMessageM;
235
- typographyFormFieldErrorMessageL: typeof tokens.typographyFormFieldErrorMessageL;
236
- typographyFormFieldCautionMessageXs: typeof tokens.typographyFormFieldCautionMessageXs;
237
- typographyFormFieldCautionMessageS: typeof tokens.typographyFormFieldCautionMessageS;
238
- typographyFormFieldCautionMessageM: typeof tokens.typographyFormFieldCautionMessageM;
239
- typographyFormFieldCautionMessageL: typeof tokens.typographyFormFieldCautionMessageL;
240
- typographyFormFieldInputTextXs: typeof tokens.typographyFormFieldInputTextXs;
241
- typographyFormFieldInputTextS: typeof tokens.typographyFormFieldInputTextS;
242
- typographyFormFieldInputTextM: typeof tokens.typographyFormFieldInputTextM;
243
- typographyFormFieldInputTextL: typeof tokens.typographyFormFieldInputTextL;
244
- typographyFormFieldDropdownOptionsXs: typeof tokens.typographyFormFieldDropdownOptionsXs;
245
- typographyFormFieldDropdownOptionsS: typeof tokens.typographyFormFieldDropdownOptionsS;
246
- typographyFormFieldDropdownOptionsM: typeof tokens.typographyFormFieldDropdownOptionsM;
247
- typographyFormFieldDropdownOptionsL: typeof tokens.typographyFormFieldDropdownOptionsL;
248
- typographyFormFieldSecondLabelXs: typeof tokens.typographyFormFieldSecondLabelXs;
249
- typographyFormFieldSecondLabelS: typeof tokens.typographyFormFieldSecondLabelS;
250
- typographyFormFieldSecondLabelM: typeof tokens.typographyFormFieldSecondLabelM;
251
- typographyFormFieldSecondLabelL: typeof tokens.typographyFormFieldSecondLabelL;
252
- typographyFormFieldCharacterCountXs: typeof tokens.typographyFormFieldCharacterCountXs;
253
- typographyFormFieldCharacterCountS: typeof tokens.typographyFormFieldCharacterCountS;
254
- typographyFormFieldCharacterCountM: typeof tokens.typographyFormFieldCharacterCountM;
255
- typographyFormFieldCharacterCountL: typeof tokens.typographyFormFieldCharacterCountL;
256
- typographyLinkTextM: typeof tokens.typographyLinkTextM;
257
- typographyLinkTextL: typeof tokens.typographyLinkTextL;
258
- typographyMessageHeadingM: typeof tokens.typographyMessageHeadingM;
259
- typographyMessageHeadingL: typeof tokens.typographyMessageHeadingL;
260
- typographyMessageTextM: typeof tokens.typographyMessageTextM;
261
- typographyMessageTextL: typeof tokens.typographyMessageTextL;
262
- typographyPillLabelS: typeof tokens.typographyPillLabelS;
263
- typographyPillLabelM: typeof tokens.typographyPillLabelM;
264
- typographyPillLabelL: typeof tokens.typographyPillLabelL;
265
- typographyPillLabelXl: typeof tokens.typographyPillLabelXl;
266
- typographyProfileEmailXs: typeof tokens.typographyProfileEmailXs;
267
- typographyProfileEmailS: typeof tokens.typographyProfileEmailS;
268
- typographyProfileEmailM: typeof tokens.typographyProfileEmailM;
269
- typographyProfileEmailMl: typeof tokens.typographyProfileEmailMl;
270
- typographyProfileEmailL: typeof tokens.typographyProfileEmailL;
271
- typographyProfileEmailXl: typeof tokens.typographyProfileEmailXl;
272
- typographyProfileEmailXxl: typeof tokens.typographyProfileEmailXxl;
273
- typographyProfileInitialsXs: typeof tokens.typographyProfileInitialsXs;
274
- typographyProfileInitialsS: typeof tokens.typographyProfileInitialsS;
275
- typographyProfileInitialsM: typeof tokens.typographyProfileInitialsM;
276
- typographyProfileInitialsMl: typeof tokens.typographyProfileInitialsMl;
277
- typographyProfileInitialsL: typeof tokens.typographyProfileInitialsL;
278
- typographyProfileInitialsXl: typeof tokens.typographyProfileInitialsXl;
279
- typographyProfileInitialsXxl: typeof tokens.typographyProfileInitialsXxl;
280
- typographyProfileNameXs: typeof tokens.typographyProfileNameXs;
281
- typographyProfileNameS: typeof tokens.typographyProfileNameS;
282
- typographyProfileNameM: typeof tokens.typographyProfileNameM;
283
- typographyProfileNameMl: typeof tokens.typographyProfileNameMl;
284
- typographyProfileNameL: typeof tokens.typographyProfileNameL;
285
- typographyProfileNameXl: typeof tokens.typographyProfileNameXl;
286
- typographyProfileNameXxl: typeof tokens.typographyProfileNameXxl;
287
- typographyProgressTrackerValueLabelS: typeof tokens.typographyProgressTrackerValueLabelS;
288
- typographyProgressTrackerValueLabelM: typeof tokens.typographyProgressTrackerValueLabelM;
289
- typographyProgressTrackerValueLabelL: typeof tokens.typographyProgressTrackerValueLabelL;
290
- typographySwitchOptionLabelM: typeof tokens.typographySwitchOptionLabelM;
291
- typographySwitchOptionLabelL: typeof tokens.typographySwitchOptionLabelL;
292
- typographyTableHeaderTextM: typeof tokens.typographyTableHeaderTextM;
293
- typographyTableCellTextM: typeof tokens.typographyTableCellTextM;
294
- typographyTooltipTextM: typeof tokens.typographyTooltipTextM;
295
- typographyTooltipTextL: typeof tokens.typographyTooltipTextL;
263
+ typographyAccordionTitleM: string;
264
+ typographyAccordionSubtitleM: string;
265
+ typographyAccordionParagraphM: string;
266
+ typographyActionPopoverMenuItemM: string;
267
+ typographyAnchorNavLabelM: string;
268
+ typographyBadgeLabelM: string;
269
+ typographyButtonLabelS: string;
270
+ typographyButtonLabelM: string;
271
+ typographyButtonLabelL: string;
272
+ typographyDialogTitleXs: string;
273
+ typographyDialogTitleS: string;
274
+ typographyDialogTitleMs: string;
275
+ typographyDialogTitleM: string;
276
+ typographyDialogTitleMl: string;
277
+ typographyDialogTitleL: string;
278
+ typographyDialogTitleXl: string;
279
+ typographyDialogParagraphXs: string;
280
+ typographyDialogParagraphS: string;
281
+ typographyDrawerTitleM: string;
282
+ typographyFlashTextM: string;
283
+ typographyFlashTextL: string;
284
+ typographyFormFieldLabelXs: string;
285
+ typographyFormFieldLabelS: string;
286
+ typographyFormFieldLabelM: string;
287
+ typographyFormFieldLabelL: string;
288
+ typographyFormFieldHintTextXs: string;
289
+ typographyFormFieldHintTextS: string;
290
+ typographyFormFieldHintTextM: string;
291
+ typographyFormFieldHintTextL: string;
292
+ typographyFormFieldErrorMessageXs: string;
293
+ typographyFormFieldErrorMessageS: string;
294
+ typographyFormFieldErrorMessageM: string;
295
+ typographyFormFieldErrorMessageL: string;
296
+ typographyFormFieldCautionMessageXs: string;
297
+ typographyFormFieldCautionMessageS: string;
298
+ typographyFormFieldCautionMessageM: string;
299
+ typographyFormFieldCautionMessageL: string;
300
+ typographyFormFieldInputTextXs: string;
301
+ typographyFormFieldInputTextS: string;
302
+ typographyFormFieldInputTextM: string;
303
+ typographyFormFieldInputTextL: string;
304
+ typographyFormFieldDropdownOptionsXs: string;
305
+ typographyFormFieldDropdownOptionsS: string;
306
+ typographyFormFieldDropdownOptionsM: string;
307
+ typographyFormFieldDropdownOptionsL: string;
308
+ typographyFormFieldSecondLabelXs: string;
309
+ typographyFormFieldSecondLabelS: string;
310
+ typographyFormFieldSecondLabelM: string;
311
+ typographyFormFieldSecondLabelL: string;
312
+ typographyFormFieldCharacterCountXs: string;
313
+ typographyFormFieldCharacterCountS: string;
314
+ typographyFormFieldCharacterCountM: string;
315
+ typographyFormFieldCharacterCountL: string;
316
+ typographyLinkTextM: string;
317
+ typographyLinkTextL: string;
318
+ typographyMenuLabelM: string;
319
+ typographyMenuSegmentTitleM: string;
320
+ typographyMessageHeadingM: string;
321
+ typographyMessageHeadingL: string;
322
+ typographyMessageTextM: string;
323
+ typographyMessageTextL: string;
324
+ typographyPillLabelS: string;
325
+ typographyPillLabelM: string;
326
+ typographyPillLabelL: string;
327
+ typographyPillLabelXl: string;
328
+ typographyProfileEmailXs: string;
329
+ typographyProfileEmailS: string;
330
+ typographyProfileEmailM: string;
331
+ typographyProfileEmailMl: string;
332
+ typographyProfileEmailL: string;
333
+ typographyProfileEmailXl: string;
334
+ typographyProfileEmailXxl: string;
335
+ typographyProfileInitialsXs: string;
336
+ typographyProfileInitialsS: string;
337
+ typographyProfileInitialsM: string;
338
+ typographyProfileInitialsMl: string;
339
+ typographyProfileInitialsL: string;
340
+ typographyProfileInitialsXl: string;
341
+ typographyProfileInitialsXxl: string;
342
+ typographyProfileNameXs: string;
343
+ typographyProfileNameS: string;
344
+ typographyProfileNameM: string;
345
+ typographyProfileNameMl: string;
346
+ typographyProfileNameL: string;
347
+ typographyProfileNameXl: string;
348
+ typographyProfileNameXxl: string;
349
+ typographyProgressTrackerValueLabelS: string;
350
+ typographyProgressTrackerValueLabelM: string;
351
+ typographyProgressTrackerValueLabelL: string;
352
+ typographySearchLabelM: string;
353
+ typographySidebarTitleS: string;
354
+ typographySidebarTitleM: string;
355
+ typographySidebarTitleL: string;
356
+ typographyStepFlowCompleteLabelM: string;
357
+ typographyStepFlowCurrentLabelM: string;
358
+ typographyStepFlowIncompleteLabelM: string;
359
+ typographySwitchOptionLabelM: string;
360
+ typographySwitchOptionLabelL: string;
361
+ typographyTableHeaderTextM: string;
362
+ typographyTableCellTextM: string;
363
+ typographyTooltipTextM: string;
364
+ typographyTooltipTextL: string;
296
365
  opacity300: string;
297
366
  opacity600: string;
367
+ opacity800: string;
298
368
  };
299
369
  name: string;
300
370
  palette: import("../../palette").Palette & import("../base").ColorsWithHex & {
@@ -575,4 +645,3 @@ declare var _default: {
575
645
  };
576
646
  };
577
647
  export default _default;
578
- import tokens from "@sage/design-tokens/js/base/common";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "103.0.0",
3
+ "version": "104.1.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {
@@ -15,8 +15,8 @@
15
15
  "scripts": {
16
16
  "start": "node ./scripts/check_node_version.js && start-storybook -p 9001 -s .assets -c .storybook",
17
17
  "start:debug-theme": "cross-env STORYBOOK_DEBUG_THEME=true npm run start",
18
- "test": "jest --config=./jest.conf.json",
19
- "test-update": "jest --config=./jest.conf.json --updateSnapshot",
18
+ "test": "TZ=UTC jest --config=./jest.conf.json",
19
+ "test-update": "TZ=UTC jest --config=./jest.conf.json --updateSnapshot",
20
20
  "test:cypress": "cypress open",
21
21
  "cypress:react": "npx cypress open-ct",
22
22
  "debug": "node --inspect ./node_modules/jest-cli/bin/jest --watch --config=./jest.conf.json",
@@ -101,7 +101,7 @@
101
101
  "chromatic": "^6.0.5",
102
102
  "commitizen": "^4.2.4",
103
103
  "conventional-changelog-conventionalcommits": "^4.5.0",
104
- "core-js": "^3.1.4",
104
+ "core-js": "^3.20.3",
105
105
  "cpy-cli": "^3.1.1",
106
106
  "cross-env": "^5.2.0",
107
107
  "cypress": "^9.2.0",
@@ -155,21 +155,21 @@
155
155
  "dependencies": {
156
156
  "@octokit/rest": "^18.12.0",
157
157
  "@popperjs/core": "^2.9.0",
158
- "@sage/design-tokens": "^1.87.1",
158
+ "@sage/design-tokens": "^1.89.0",
159
159
  "@styled-system/prop-types": "^5.1.5",
160
160
  "@tippyjs/react": "^4.2.5",
161
161
  "@types/styled-system": "^5.1.11",
162
162
  "classnames": "~2.2.6",
163
163
  "crypto-js": "~3.3.0",
164
+ "date-fns": "^2.26.0",
164
165
  "dotenv": "^10.0.0",
165
166
  "immutable": "~3.8.2",
166
167
  "invariant": "^2.2.4",
167
168
  "lodash": "^4.17.20",
168
- "moment": "~2.20.1",
169
169
  "node-fetch": "^2.6.1",
170
170
  "polished": "^4.0.5",
171
171
  "prop-types": "^15.7.2",
172
- "react-day-picker": "~6.1.1",
172
+ "react-day-picker": "~7.4.10",
173
173
  "react-dnd": "^10.0.2",
174
174
  "react-dnd-html5-backend": "^10.0.2",
175
175
  "react-is": "^17.0.2",
@@ -1,34 +0,0 @@
1
- interface Locale {
2
- locale: string;
3
- formats: string[];
4
- format: string;
5
- }
6
-
7
- interface FormatDateToCurrentLocaleArgs extends Locale {
8
- value: string;
9
- }
10
-
11
- interface IsValidDateArgs extends FormatDateToCurrentLocaleArgs {
12
- options?: Record<string, unknown>;
13
- }
14
-
15
- interface FormatValueArgs extends IsValidDateArgs {
16
- formatTo?: string;
17
- }
18
-
19
- interface WithinRangeArgs extends FormatDateToCurrentLocaleArgs {
20
- limit: number;
21
- units: string;
22
- }
23
-
24
- export interface DateHelper {
25
- sanitizeDateInput: (value: string) => string;
26
- isValidDate: (params: IsValidDateArgs) => boolean;
27
- formatValue: (params: FormatValueArgs) => string;
28
- stringToDate: (value: string) => Date;
29
- formatDateString: (value: string, formatTo?: string) => string;
30
- todayFormatted: (format?: string) => string;
31
- weekdaysMinified: (locale: string) => string[];
32
- withinRange: (params: WithinRangeArgs) => boolean;
33
- formatDateToCurrentLocale: (params: FormatDateToCurrentLocaleArgs) => string;
34
- }
@@ -1,216 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _moment = _interopRequireDefault(require("moment"));
9
-
10
- require("moment/min/locales");
11
-
12
- var _lodash = require("lodash");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- const isoDateFormat = "YYYY-MM-DD";
17
- /**
18
- * DateHelper used to encapsulate the date parsing library into a single helper
19
- */
20
-
21
- const DateHelper = {
22
- /**
23
- * Sanitizes all valid date separators ( . - 'whitespace' ) replacing them
24
- * with a slash
25
- *
26
- * This allows us to compare against one separator in the i18n string. DD/MM/YYYY
27
- *
28
- * @method sanitizeDateInput
29
- * @return {String} sanitized input
30
- */
31
- sanitizeDateInput: value => {
32
- if (!value) {
33
- return "";
34
- }
35
-
36
- return value.replace(/[-.\s]/g, "/").toLowerCase();
37
- },
38
-
39
- /**
40
- * Determines if date is valid
41
- *
42
- * @param {String} value - value to validate
43
- * @param {Object} options Override Moment JS options
44
- * @return {Boolean}
45
- */
46
- isValidDate: ({
47
- value,
48
- options = {},
49
- locale,
50
- formats,
51
- format
52
- }) => {
53
- return DateHelper._parseDate({
54
- value,
55
- options,
56
- locale,
57
- formats,
58
- format
59
- }).isValid();
60
- },
61
-
62
- /**
63
- * Formats the given value to a specified format
64
- *
65
- * @method formatValue
66
- * @param {String} val current value
67
- * @param {String} formatTo Desired format
68
- * @param {Object} options Override Moment JS options
69
- * @return {String} formatted date
70
- */
71
- formatValue: ({
72
- value,
73
- formatTo = isoDateFormat,
74
- options = {},
75
- locale,
76
- formats,
77
- format
78
- }) => {
79
- const date = DateHelper._parseDate({
80
- value,
81
- options,
82
- locale,
83
- formats,
84
- format
85
- });
86
-
87
- return date.isValid() ? date.format(formatTo) : value;
88
- },
89
-
90
- /**
91
- * Convert a value such as '2017-08-23' into a Javascript Date object
92
- *
93
- * @method stringToDate
94
- * @param {String} value current value e.g. 2017-08-23
95
- * @return {Object} The Date object
96
- */
97
- stringToDate: value => (0, _moment.default)(value).toDate(),
98
-
99
- /**
100
- * Formats the given date string to the specified format
101
- * Moment will not format the standard Javascript Date string format
102
- *
103
- * @method formatDateString
104
- * @param {String} value current value e.g. Wed Aug 23 2017 12:00:00 GMT+0100 (BST)
105
- * @param {String} formatTo Desired format e.g. YYYY-MM-DD
106
- * @return {String} formatted date
107
- */
108
- formatDateString: (value, formatTo = isoDateFormat) => {
109
- return (0, _moment.default)(new Date(value).getTime()).format(formatTo);
110
- },
111
-
112
- /**
113
- * Returns todays date formatted
114
- *
115
- * @param {String} format - format of date
116
- * @return {Moment}
117
- */
118
- todayFormatted: (format = isoDateFormat) => {
119
- return (0, _moment.default)().format(format);
120
- },
121
-
122
- /**
123
- * Returns an array of days of the week by locale minified
124
- * Mo, Tu, We, Th, Fr, Sa, Su
125
- *
126
- * @param {String} locale - defaulted to I18n.locale
127
- * @return {Array}
128
- */
129
- weekdaysMinified: locale => {
130
- return _moment.default.localeData(locale)._weekdaysMin;
131
- },
132
-
133
- /**
134
- * @param {String} value - the date to test
135
- * @param {Number} limit - the upper and lower bounds
136
- * @param {String} units - defaulted to days
137
- * @return {Boolean}
138
- */
139
- withinRange: ({
140
- value,
141
- limit,
142
- units,
143
- locale,
144
- formats,
145
- format
146
- }) => {
147
- const momentValue = DateHelper._parseDate({
148
- value,
149
- locale,
150
- formats,
151
- format
152
- }),
153
- today = (0, _moment.default)();
154
-
155
- const difference = Math.abs(today.diff(momentValue, units));
156
- return difference < limit;
157
- },
158
-
159
- /**
160
- * Default options to pass to moment js
161
- *
162
- * @private
163
- * formats - given accepted formats
164
- * locale - current locale
165
- * strict - moment js strict mode
166
- */
167
- _defaultMomentOptions: (locale, formats) => {
168
- return {
169
- locale,
170
- formats,
171
- strict: true
172
- };
173
- },
174
-
175
- /**
176
- * Parses date into moment
177
- * Note when sanitizing dates formats must contain '/' for separators
178
- *
179
- * @private
180
- * @param {String} value - value to parse
181
- * @param {Object} options Override Moment JS options
182
- * @return {Moment}
183
- */
184
- _parseDate({
185
- value,
186
- options,
187
- locale,
188
- formats = [],
189
- format
190
- }) {
191
- const opts = (0, _lodash.merge)(DateHelper._defaultMomentOptions(locale, formats), options, {
192
- locale,
193
- formats,
194
- format
195
- });
196
- return (0, _moment.default)(value, [format, isoDateFormat, ...opts.formats], opts.locale, opts.strict);
197
- },
198
-
199
- formatDateToCurrentLocale({
200
- value,
201
- locale,
202
- formats,
203
- format
204
- }) {
205
- return DateHelper.formatValue({
206
- value,
207
- formatTo: format,
208
- locale,
209
- formats,
210
- format
211
- });
212
- }
213
-
214
- };
215
- var _default = DateHelper;
216
- exports.default = _default;
@@ -1 +0,0 @@
1
- export { "/home/runner/work/carbon/carbon/src/__internal__/date/date" as default } from "./date";
@@ -1 +0,0 @@
1
- export {};
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- var _moment = _interopRequireDefault(require("moment"));
4
-
5
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
-
7
- /**
8
- * Replaces today date with specified in the argument of the "set" method.
9
- * Ensures that the UTC time is returned regardless of the local time.
10
- */
11
- jest.mock("../__internal__/date", () => {
12
- const _DateHelper = jest.requireActual("../__internal__/date");
13
-
14
- return {
15
- __esModule: true,
16
- default: (() => {
17
- const mockTodayDate = "1-1-2019";
18
- const isoDateFormat = "YYYY-MM-DD";
19
- const MockedDateHelper = { ..._DateHelper.default
20
- };
21
-
22
- MockedDateHelper._parseDate = (value, options) => _DateHelper.default._parseDate(value, options).utc();
23
-
24
- MockedDateHelper.stringToDate = value => (0, _moment.default)(value).utc().toDate();
25
-
26
- MockedDateHelper.todayFormatted = (format = isoDateFormat) => {
27
- return (0, _moment.default)(mockTodayDate).utc().format(format);
28
- };
29
-
30
- MockedDateHelper.formatDateString = (value, formatTo = isoDateFormat) => {
31
- return (0, _moment.default)(new Date(value).getTime()).utc().format(formatTo);
32
- };
33
-
34
- return MockedDateHelper;
35
- })()
36
- };
37
- });