@galaxy-ds/core 1.1.63 → 1.1.64

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.
package/dist/index.js CHANGED
@@ -5707,7 +5707,7 @@ var Jss =
5707
5707
  function () {
5708
5708
  function Jss(options) {
5709
5709
  this.id = instanceCounter++;
5710
- this.version = "10.8.0";
5710
+ this.version = "10.8.2";
5711
5711
  this.plugins = new PluginsRegistry();
5712
5712
  this.options = {
5713
5713
  id: {
@@ -33794,7 +33794,7 @@ var typography$1 = {
33794
33794
  h4: {
33795
33795
  fontFamily: ['Open Sans', 'Helvetica', 'Arial'].join(','),
33796
33796
  fontWeight: 500,
33797
- fontSize: '17px',
33797
+ fontSize: '16px',
33798
33798
  lineHeight: '1.5rem',
33799
33799
  letterSpacing: '0',
33800
33800
  },
@@ -34330,7 +34330,7 @@ var FormHeader = React__default["default"].forwardRef(function (props, ref) {
34330
34330
  React__default["default"].createElement("div", { className: clsx(classes.root, 'gds-header_accent') },
34331
34331
  React__default["default"].createElement(LawconnectIcon, { size: "260" })),
34332
34332
  React__default["default"].createElement(Box$2, { className: clsx(classes.root, 'gds-header_detail') },
34333
- React__default["default"].createElement(Grid$2, { item: true, xs: 5 }, props.platformWeb ? (React__default["default"].createElement(Typography, { color: "default", variant: "body2", upperCase: true }, props.title)) : (React__default["default"].createElement(Typography, { color: "primaryLight", variant: "h2", upperCase: true }, props.title))),
34333
+ React__default["default"].createElement(Grid$2, { item: true, xs: 5, className: clsx("gds-toolbar-title") }, props.platformWeb ? (React__default["default"].createElement(Typography, { color: "default", variant: "body2", upperCase: true }, props.title)) : (React__default["default"].createElement(Typography, { variant: "h4", upperCase: true }, props.title))),
34334
34334
  React__default["default"].createElement(Grid$2, { item: true, xs: 7 },
34335
34335
  React__default["default"].createElement(Grid$2, { container: true, alignItems: "center", justifyContent: "flex-end", className: clsx(classes.root, 'gds-header_info') },
34336
34336
  props.from ? (React__default["default"].createElement(Typography, { align: "right", variant: "body2" }, props.from)) : null,
@@ -35803,9 +35803,9 @@ var HeaderToolbar = function (_a) {
35803
35803
  var classes = useStyles$a({ bgColor: bgColor, bgImageURL: bgImageURL, right: right, bgPosition: bgPosition, bgSize: bgSize, titleVisibility: titleVisibility, divider: divider });
35804
35804
  return (React__default["default"].createElement(Toolbar$2, { className: clsx('gds-header-toolbar', classes.bgWrapper, (_b = {}, _b['with-title'] = titleVisibility, _b)) },
35805
35805
  React__default["default"].createElement(Box$2, { className: clsx(classes.toolbarWrap) },
35806
- React__default["default"].createElement(Box$2, { className: clsx(classes.toolbarContainer) },
35806
+ React__default["default"].createElement(Box$2, { className: clsx(classes.toolbarContainer, "gds-toolbar-title") },
35807
35807
  title && (tooltip ? (React__default["default"].createElement(Tooltip, { title: title, placement: "bottom-start" },
35808
- React__default["default"].createElement(Typography, { gutterBottom: true, variant: "h1", noWrap: true, color: "primary" }, title))) : (React__default["default"].createElement(Typography, { gutterBottom: true, variant: "h1", noWrap: true, color: "primary" }, title))),
35808
+ React__default["default"].createElement(Typography, { gutterBottom: true, variant: "h4", noWrap: true, upperCase: true }, title))) : (React__default["default"].createElement(Typography, { gutterBottom: true, variant: "h4", noWrap: true, upperCase: true }, title))),
35809
35809
  left),
35810
35810
  right && (React__default["default"].createElement(Box$2, { className: clsx("gds-buttons-w-divider", classes.containerDivider) }, right)))));
35811
35811
  };
@@ -36530,10 +36530,10 @@ var startOfDay$1 = /*#__PURE__*/Object.freeze({
36530
36530
  /**
36531
36531
  * @name isSameDay
36532
36532
  * @category Day Helpers
36533
- * @summary Are the given dates in the same day?
36533
+ * @summary Are the given dates in the same day (and year and month)?
36534
36534
  *
36535
36535
  * @description
36536
- * Are the given dates in the same day?
36536
+ * Are the given dates in the same day (and year and month)?
36537
36537
  *
36538
36538
  * ### v2.0.0 breaking changes:
36539
36539
  *
@@ -36541,13 +36541,23 @@ var startOfDay$1 = /*#__PURE__*/Object.freeze({
36541
36541
  *
36542
36542
  * @param {Date|Number} dateLeft - the first date to check
36543
36543
  * @param {Date|Number} dateRight - the second date to check
36544
- * @returns {Boolean} the dates are in the same day
36544
+ * @returns {Boolean} the dates are in the same day (and year and month)
36545
36545
  * @throws {TypeError} 2 arguments required
36546
36546
  *
36547
36547
  * @example
36548
36548
  * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?
36549
36549
  * var result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))
36550
36550
  * //=> true
36551
+ *
36552
+ * @example
36553
+ * // Are 4 September and 4 October in the same day?
36554
+ * var result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))
36555
+ * //=> false
36556
+ *
36557
+ * @example
36558
+ * // Are 4 September, 2014 and 4 September, 2015 in the same day?
36559
+ * var result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))
36560
+ * //=> false
36551
36561
  */
36552
36562
 
36553
36563
  function isSameDay(dirtyDateLeft, dirtyDateRight) {
@@ -36844,7 +36854,7 @@ function buildLocalizeFn(args) {
36844
36854
  valuesArray = args.values[_width] || args.values[_defaultWidth];
36845
36855
  }
36846
36856
 
36847
- var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challange you to try to remove it!
36857
+ var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
36848
36858
 
36849
36859
  return valuesArray[index];
36850
36860
  };
@@ -37263,101 +37273,6 @@ function subMilliseconds(dirtyDate, dirtyAmount) {
37263
37273
  return addMilliseconds(dirtyDate, -amount);
37264
37274
  }
37265
37275
 
37266
- function addLeadingZeros(number, targetLength) {
37267
- var sign = number < 0 ? '-' : '';
37268
- var output = Math.abs(number).toString();
37269
-
37270
- while (output.length < targetLength) {
37271
- output = '0' + output;
37272
- }
37273
-
37274
- return sign + output;
37275
- }
37276
-
37277
- /*
37278
- * | | Unit | | Unit |
37279
- * |-----|--------------------------------|-----|--------------------------------|
37280
- * | a | AM, PM | A* | |
37281
- * | d | Day of month | D | |
37282
- * | h | Hour [1-12] | H | Hour [0-23] |
37283
- * | m | Minute | M | Month |
37284
- * | s | Second | S | Fraction of second |
37285
- * | y | Year (abs) | Y | |
37286
- *
37287
- * Letters marked by * are not implemented but reserved by Unicode standard.
37288
- */
37289
-
37290
- var formatters$2 = {
37291
- // Year
37292
- y: function (date, token) {
37293
- // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
37294
- // | Year | y | yy | yyy | yyyy | yyyyy |
37295
- // |----------|-------|----|-------|-------|-------|
37296
- // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
37297
- // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
37298
- // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
37299
- // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
37300
- // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
37301
- var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
37302
-
37303
- var year = signedYear > 0 ? signedYear : 1 - signedYear;
37304
- return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
37305
- },
37306
- // Month
37307
- M: function (date, token) {
37308
- var month = date.getUTCMonth();
37309
- return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
37310
- },
37311
- // Day of the month
37312
- d: function (date, token) {
37313
- return addLeadingZeros(date.getUTCDate(), token.length);
37314
- },
37315
- // AM or PM
37316
- a: function (date, token) {
37317
- var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
37318
-
37319
- switch (token) {
37320
- case 'a':
37321
- case 'aa':
37322
- return dayPeriodEnumValue.toUpperCase();
37323
-
37324
- case 'aaa':
37325
- return dayPeriodEnumValue;
37326
-
37327
- case 'aaaaa':
37328
- return dayPeriodEnumValue[0];
37329
-
37330
- case 'aaaa':
37331
- default:
37332
- return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
37333
- }
37334
- },
37335
- // Hour [1-12]
37336
- h: function (date, token) {
37337
- return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
37338
- },
37339
- // Hour [0-23]
37340
- H: function (date, token) {
37341
- return addLeadingZeros(date.getUTCHours(), token.length);
37342
- },
37343
- // Minute
37344
- m: function (date, token) {
37345
- return addLeadingZeros(date.getUTCMinutes(), token.length);
37346
- },
37347
- // Second
37348
- s: function (date, token) {
37349
- return addLeadingZeros(date.getUTCSeconds(), token.length);
37350
- },
37351
- // Fraction of second
37352
- S: function (date, token) {
37353
- var numberOfDigits = token.length;
37354
- var milliseconds = date.getUTCMilliseconds();
37355
- var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
37356
- return addLeadingZeros(fractionalSeconds, token.length);
37357
- }
37358
- };
37359
- var lightFormatters = formatters$2;
37360
-
37361
37276
  var MILLISECONDS_IN_DAY$1 = 86400000; // This function will be a part of public API when UTC function will be implemented.
37362
37277
  // See issue: https://github.com/date-fns/date-fns/issues/376
37363
37278
 
@@ -37460,7 +37375,7 @@ function startOfUTCWeek(dirtyDate, dirtyOptions) {
37460
37375
 
37461
37376
  function getUTCWeekYear(dirtyDate, dirtyOptions) {
37462
37377
  requiredArgs(1, arguments);
37463
- var date = toDate(dirtyDate, dirtyOptions);
37378
+ var date = toDate(dirtyDate);
37464
37379
  var year = date.getUTCFullYear();
37465
37380
  var options = dirtyOptions || {};
37466
37381
  var locale = options.locale;
@@ -37520,6 +37435,101 @@ function getUTCWeek(dirtyDate, options) {
37520
37435
  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
37521
37436
  }
37522
37437
 
37438
+ function addLeadingZeros(number, targetLength) {
37439
+ var sign = number < 0 ? '-' : '';
37440
+ var output = Math.abs(number).toString();
37441
+
37442
+ while (output.length < targetLength) {
37443
+ output = '0' + output;
37444
+ }
37445
+
37446
+ return sign + output;
37447
+ }
37448
+
37449
+ /*
37450
+ * | | Unit | | Unit |
37451
+ * |-----|--------------------------------|-----|--------------------------------|
37452
+ * | a | AM, PM | A* | |
37453
+ * | d | Day of month | D | |
37454
+ * | h | Hour [1-12] | H | Hour [0-23] |
37455
+ * | m | Minute | M | Month |
37456
+ * | s | Second | S | Fraction of second |
37457
+ * | y | Year (abs) | Y | |
37458
+ *
37459
+ * Letters marked by * are not implemented but reserved by Unicode standard.
37460
+ */
37461
+
37462
+ var formatters$2 = {
37463
+ // Year
37464
+ y: function (date, token) {
37465
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
37466
+ // | Year | y | yy | yyy | yyyy | yyyyy |
37467
+ // |----------|-------|----|-------|-------|-------|
37468
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
37469
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
37470
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
37471
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
37472
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
37473
+ var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
37474
+
37475
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
37476
+ return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
37477
+ },
37478
+ // Month
37479
+ M: function (date, token) {
37480
+ var month = date.getUTCMonth();
37481
+ return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
37482
+ },
37483
+ // Day of the month
37484
+ d: function (date, token) {
37485
+ return addLeadingZeros(date.getUTCDate(), token.length);
37486
+ },
37487
+ // AM or PM
37488
+ a: function (date, token) {
37489
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
37490
+
37491
+ switch (token) {
37492
+ case 'a':
37493
+ case 'aa':
37494
+ return dayPeriodEnumValue.toUpperCase();
37495
+
37496
+ case 'aaa':
37497
+ return dayPeriodEnumValue;
37498
+
37499
+ case 'aaaaa':
37500
+ return dayPeriodEnumValue[0];
37501
+
37502
+ case 'aaaa':
37503
+ default:
37504
+ return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
37505
+ }
37506
+ },
37507
+ // Hour [1-12]
37508
+ h: function (date, token) {
37509
+ return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
37510
+ },
37511
+ // Hour [0-23]
37512
+ H: function (date, token) {
37513
+ return addLeadingZeros(date.getUTCHours(), token.length);
37514
+ },
37515
+ // Minute
37516
+ m: function (date, token) {
37517
+ return addLeadingZeros(date.getUTCMinutes(), token.length);
37518
+ },
37519
+ // Second
37520
+ s: function (date, token) {
37521
+ return addLeadingZeros(date.getUTCSeconds(), token.length);
37522
+ },
37523
+ // Fraction of second
37524
+ S: function (date, token) {
37525
+ var numberOfDigits = token.length;
37526
+ var milliseconds = date.getUTCMilliseconds();
37527
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
37528
+ return addLeadingZeros(fractionalSeconds, token.length);
37529
+ }
37530
+ };
37531
+ var lightFormatters = formatters$2;
37532
+
37523
37533
  var dayPeriodEnum = {
37524
37534
  am: 'am',
37525
37535
  pm: 'pm',
@@ -38431,7 +38441,7 @@ function timeLongFormatter(pattern, formatLong) {
38431
38441
  }
38432
38442
 
38433
38443
  function dateTimeLongFormatter(pattern, formatLong) {
38434
- var matchResult = pattern.match(/(P+)(p+)?/);
38444
+ var matchResult = pattern.match(/(P+)(p+)?/) || [];
38435
38445
  var datePattern = matchResult[1];
38436
38446
  var timePattern = matchResult[2];
38437
38447
 
@@ -38779,7 +38789,7 @@ var unescapedLatinCharacterRegExp$1 = /[a-zA-Z]/;
38779
38789
  * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
38780
38790
  * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr
38781
38791
  *
38782
- * 9. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.
38792
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
38783
38793
  * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr
38784
38794
  *
38785
38795
  * ### v2.0.0 breaking changes:
@@ -41416,7 +41426,7 @@ var parsers = {
41416
41426
  date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);
41417
41427
  return date;
41418
41428
  },
41419
- incompatibleTokens: ['b', 'B', 'H', 'K', 'k', 't', 'T']
41429
+ incompatibleTokens: ['b', 'B', 'H', 'k', 't', 'T']
41420
41430
  },
41421
41431
  // AM, PM, midnight
41422
41432
  b: {
@@ -41458,7 +41468,7 @@ var parsers = {
41458
41468
  date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);
41459
41469
  return date;
41460
41470
  },
41461
- incompatibleTokens: ['a', 'B', 'H', 'K', 'k', 't', 'T']
41471
+ incompatibleTokens: ['a', 'B', 'H', 'k', 't', 'T']
41462
41472
  },
41463
41473
  // in the morning, in the afternoon, in the evening, at night
41464
41474
  B: {
@@ -41594,7 +41604,7 @@ var parsers = {
41594
41604
 
41595
41605
  return date;
41596
41606
  },
41597
- incompatibleTokens: ['a', 'b', 'h', 'H', 'k', 't', 'T']
41607
+ incompatibleTokens: ['h', 'H', 'k', 't', 'T']
41598
41608
  },
41599
41609
  // Hour [1-24]
41600
41610
  k: {
@@ -41952,7 +41962,7 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
41952
41962
  * | | | tt | ... | 2 |
41953
41963
  * | Fraction of second | 30 | S | 0, 1, ..., 9 | |
41954
41964
  * | | | SS | 00, 01, ..., 99 | |
41955
- * | | | SSS | 000, 0001, ..., 999 | |
41965
+ * | | | SSS | 000, 001, ..., 999 | |
41956
41966
  * | | | SSSS | ... | 2 |
41957
41967
  * | Milliseconds timestamp | 20 | T | 512969520900 | |
41958
41968
  * | | | TT | ... | 2 |
@@ -43561,10 +43571,10 @@ var differenceInDays$1 = /*#__PURE__*/Object.freeze({
43561
43571
  /**
43562
43572
  * @name isSameMonth
43563
43573
  * @category Month Helpers
43564
- * @summary Are the given dates in the same month?
43574
+ * @summary Are the given dates in the same month (and year)?
43565
43575
  *
43566
43576
  * @description
43567
- * Are the given dates in the same month?
43577
+ * Are the given dates in the same month (and year)?
43568
43578
  *
43569
43579
  * ### v2.0.0 breaking changes:
43570
43580
  *
@@ -43572,13 +43582,18 @@ var differenceInDays$1 = /*#__PURE__*/Object.freeze({
43572
43582
  *
43573
43583
  * @param {Date|Number} dateLeft - the first date to check
43574
43584
  * @param {Date|Number} dateRight - the second date to check
43575
- * @returns {Boolean} the dates are in the same month
43585
+ * @returns {Boolean} the dates are in the same month (and year)
43576
43586
  * @throws {TypeError} 2 arguments required
43577
43587
  *
43578
43588
  * @example
43579
43589
  * // Are 2 September 2014 and 25 September 2014 in the same month?
43580
43590
  * var result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))
43581
43591
  * //=> true
43592
+ *
43593
+ * @example
43594
+ * // Are 2 September 2014 and 25 September 2015 in the same month?
43595
+ * var result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))
43596
+ * //=> false
43582
43597
  */
43583
43598
 
43584
43599
  function isSameMonth(dirtyDateLeft, dirtyDateRight) {
@@ -46919,6 +46934,20 @@ var themeWeb = createTheme({
46919
46934
  padding: 0,
46920
46935
  },
46921
46936
  },
46937
+ MuiTypography: {
46938
+ root: {
46939
+ "&.MuiTypography-h4": {
46940
+ ".gds-toolbar-title &": {
46941
+ textTransform: 'uppercase',
46942
+ color: pallettes$1.brand.primary.main + " !important",
46943
+ fontSize: typography$1.h4.fontSize,
46944
+ fontWeight: typography$1.h4.fontWeight,
46945
+ lineHeight: typography$1.h4.lineHeight,
46946
+ marginBottom: '24px',
46947
+ }
46948
+ }
46949
+ },
46950
+ },
46922
46951
  MuiAppBar: {
46923
46952
  root: {
46924
46953
  color: common.brand.neutral.white,
@@ -48045,6 +48074,9 @@ var themeWeb = createTheme({
48045
48074
  paddingRight: 16,
48046
48075
  '& .gds-buttons-w-divider': {
48047
48076
  paddingLeft: 16,
48077
+ "& button:last-child": {
48078
+ marginLeft: '16px'
48079
+ }
48048
48080
  },
48049
48081
  '& .MuiInputBase-root, & .MuiButtonBase-root': {
48050
48082
  maxHeight: 32,
@@ -49283,6 +49315,12 @@ var themeDesktop = createTheme({
49283
49315
  MuiTypography: {
49284
49316
  root: {
49285
49317
  color: pallettes.brand.text.main,
49318
+ "&.MuiTypography-h4": {
49319
+ ".gds-toolbar-title &": {
49320
+ marginBottom: '24px',
49321
+ color: pallettes.brand.primary.light + " !important",
49322
+ }
49323
+ }
49286
49324
  },
49287
49325
  },
49288
49326
  MuiTooltip: {