@zohodesk/components 1.0.0-temp-160 → 1.0.0-temp-162

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 (74) hide show
  1. package/README.md +4 -0
  2. package/es/Avatar/Avatar.js +7 -3
  3. package/es/DateTime/CalendarView.js +4 -1
  4. package/es/DateTime/DateTime.js +4 -8
  5. package/es/DateTime/DateTime.module.css +4 -4
  6. package/es/DateTime/DateTimePopupHeader.js +4 -7
  7. package/es/DateTime/DaysRow.js +5 -2
  8. package/es/DateTime/Time.js +5 -2
  9. package/es/DateTime/YearView.js +9 -9
  10. package/es/DateTime/YearView.module.css +1 -4
  11. package/es/DateTime/props/defaultProps.js +1 -2
  12. package/es/Heading/Heading.js +7 -7
  13. package/es/Heading/Heading.module.css +68 -1
  14. package/es/Heading/props/defaultProps.js +3 -1
  15. package/es/Heading/props/propTypes.js +4 -3
  16. package/es/Label/Label.js +6 -3
  17. package/es/ListItem/ListItem.js +7 -3
  18. package/es/ListItem/ListItem.module.css +0 -1
  19. package/es/ListItem/ListItemWithAvatar.js +7 -3
  20. package/es/ListItem/ListItemWithCheckBox.js +7 -3
  21. package/es/ListItem/ListItemWithIcon.js +6 -2
  22. package/es/ListItem/ListItemWithRadio.js +7 -3
  23. package/es/Tab/Tab.js +4 -2
  24. package/es/Tab/Tabs.module.css +11 -0
  25. package/es/Tag/Tag.js +8 -3
  26. package/es/Text/Text.js +27 -0
  27. package/es/Text/Text.module.css +72 -0
  28. package/es/Text/props/defaultProps.js +7 -0
  29. package/es/Text/props/propTypes.js +12 -0
  30. package/es/Typography/Typography.js +28 -0
  31. package/es/Typography/Typography.module.css +72 -0
  32. package/es/Typography/props/defaultProps.js +8 -0
  33. package/es/Typography/props/propTypes.js +12 -0
  34. package/es/index.js +3 -1
  35. package/es/utils/css/mergeStyle.js +1 -1
  36. package/es/utils/datetime/common.js +2 -15
  37. package/lib/Avatar/Avatar.js +7 -3
  38. package/lib/DateTime/CalendarView.js +4 -1
  39. package/lib/DateTime/DateTime.js +4 -8
  40. package/lib/DateTime/DateTime.module.css +4 -4
  41. package/lib/DateTime/DateTimePopupHeader.js +4 -7
  42. package/lib/DateTime/DaysRow.js +5 -2
  43. package/lib/DateTime/Time.js +5 -2
  44. package/lib/DateTime/YearView.js +9 -9
  45. package/lib/DateTime/YearView.module.css +1 -4
  46. package/lib/DateTime/props/defaultProps.js +1 -2
  47. package/lib/Heading/Heading.js +7 -8
  48. package/lib/Heading/Heading.module.css +68 -1
  49. package/lib/Heading/props/defaultProps.js +3 -1
  50. package/lib/Heading/props/propTypes.js +4 -3
  51. package/lib/Label/Label.js +5 -2
  52. package/lib/ListItem/ListItem.js +7 -3
  53. package/lib/ListItem/ListItem.module.css +0 -1
  54. package/lib/ListItem/ListItemWithAvatar.js +7 -3
  55. package/lib/ListItem/ListItemWithCheckBox.js +7 -3
  56. package/lib/ListItem/ListItemWithIcon.js +6 -2
  57. package/lib/ListItem/ListItemWithRadio.js +7 -3
  58. package/lib/Tab/Tab.js +4 -2
  59. package/lib/Tab/Tabs.module.css +11 -0
  60. package/lib/Tag/Tag.js +8 -3
  61. package/lib/Text/Text.js +58 -0
  62. package/lib/Text/Text.module.css +72 -0
  63. package/lib/Text/props/defaultProps.js +14 -0
  64. package/lib/Text/props/propTypes.js +20 -0
  65. package/lib/Typography/Typography.js +59 -0
  66. package/lib/Typography/Typography.module.css +72 -0
  67. package/lib/Typography/props/defaultProps.js +15 -0
  68. package/lib/Typography/props/propTypes.js +20 -0
  69. package/lib/index.js +17 -1
  70. package/lib/utils/css/mergeStyle.js +1 -1
  71. package/lib/utils/datetime/common.js +2 -18
  72. package/package.json +1 -1
  73. package/es/utils/datetime/GMTZones.js +0 -48
  74. package/lib/utils/datetime/GMTZones.js +0 -55
@@ -59,7 +59,7 @@ function mergeStyle(defaultStyle) {
59
59
  res[next] = customStyle[next];
60
60
  } else if (!defaultStyle[next] && !additionalStyle.includes(next)) {
61
61
  // res[next] = customStyle[next];
62
- "UNKNOWN CLASSNAME DETECTED - Given customStyle's key \"".concat(next, "\" is not available in that component style");
62
+ throw new Error("UNKNOWN CLASSNAME DETECTED - Given customStyle's key \"".concat(next, "\" is not available in that component style"));
63
63
  }
64
64
  return res;
65
65
  }, _objectSpread({}, defaultStyle));
@@ -8,7 +8,6 @@ exports.getDiffObj = getDiffObj;
8
8
  exports.getI18NInfo = getI18NInfo;
9
9
  exports.getI18NValue = getI18NValue;
10
10
  exports.getMonthEnd = getMonthEnd;
11
- exports.getTimeOffset = getTimeOffset;
12
11
  exports.getValues = getValues;
13
12
  exports.isToday = isToday;
14
13
  exports.isTomorrow = isTomorrow;
@@ -18,7 +17,6 @@ exports.isYesterday = isYesterday;
18
17
  exports.pad = pad;
19
18
  exports.replaceI18NValuesWithRegex = replaceI18NValuesWithRegex;
20
19
  exports.unescapeUnicode = unescapeUnicode;
21
- var _GMTZones = require("./GMTZones.js");
22
20
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
23
21
  var dateFormat = {
24
22
  dayNames: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
@@ -32,17 +30,8 @@ function pad(n) {
32
30
  n = "".concat(n);
33
31
  return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
34
32
  }
35
- function getTimeOffset() {
36
- var GMT = new Date();
37
- var matchingOffset = Object.keys(_GMTZones.offsetMap).find(function (offset) {
38
- return GMT.getTimezoneOffset() === Number(offset);
39
- });
40
- return matchingOffset ? _GMTZones.offsetMap[matchingOffset].toString().split(' ') : ['', ''];
41
- }
42
33
  function formatDate(dateMill, mask) {
43
34
  var date = new Date(dateMill);
44
- var O = getTimeOffset()[0];
45
- var Z = getTimeOffset()[1];
46
35
  var d = date.getDate();
47
36
  var D = date.getDay();
48
37
  var m = date.getMonth();
@@ -53,7 +42,6 @@ function formatDate(dateMill, mask) {
53
42
  var L = date.getMilliseconds();
54
43
  var flags = {
55
44
  d: d,
56
- O: O,
57
45
  dd: pad(d, 2),
58
46
  ddd: dateFormat.dayNames[D],
59
47
  dddd: dateFormat.dayNames[D + 7],
@@ -81,13 +69,9 @@ function formatDate(dateMill, mask) {
81
69
  L: pad(Math.round(L / 10)),
82
70
  t: H < 12 ? dateFormat.timeNames[0] : dateFormat.timeNames[1],
83
71
  A: H < 12 ? dateFormat.timeNames[6] : dateFormat.timeNames[7],
84
- a: H < 12 ? dateFormat.timeNames[6] : dateFormat.timeNames[7],
85
- T: H < 12 ? dateFormat.timeNames[4] : dateFormat.timeNames[5],
86
- Z: Z,
87
- VV: Z,
88
- SSS: pad(L, 3)
72
+ T: H < 12 ? dateFormat.timeNames[4] : dateFormat.timeNames[5]
89
73
  };
90
- var token = /D{1,4}|d{1,4}|M{1,4}|YYYY|yyyy|YY|O|Z|VV|SSS|yy?|([HhmsAa])\1?|[LloSZWN]|\[[^\]]*\]|'[^']*'/g;
74
+ var token = /D{1,4}|d{1,4}|M{1,4}|YYYY|yyyy|YY|yy?|([HhmsA])\1?|[LloSZWN]|\[[^\]]*\]|'[^']*'/g;
91
75
  var dat = mask.replace(token, function (match) {
92
76
  if (match in flags) {
93
77
  return flags[match];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.0.0-temp-160",
3
+ "version": "1.0.0-temp-162",
4
4
  "main": "es/index.js",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -1,48 +0,0 @@
1
- export const offsetMap = {
2
- 0: 'GMT+00:00 Africa/Abidjan',
3
- 44: 'GMT+00:00 Africa/Monrovia',
4
- 60: 'GMT+01:00 Africa/Bangui',
5
- 120: 'GMT+02:00 Africa/Blantyre',
6
- 180: 'GMT+03:00 Africa/Addis_Ababa',
7
- 210: 'GMT+04:30 Asia/Tehran',
8
- 240: 'GMT+03:00 Asia/Bahrain',
9
- 270: 'GMT+04:30 Asia/Kabul',
10
- 300: 'GMT+05:00 Asia/Aqtau',
11
- '-330': 'GMT+05:30 Asia/Kolkata',
12
- 360: 'GMT+06:00 Asia/Dacca',
13
- 390: 'GMT+06:30 Indian/Cocos',
14
- 420: 'GMT+07:00 Asia/Bangkok',
15
- 450: 'GMT+08:00 Asia/Singapore',
16
- 480: 'GMT+08:00 Asia/Hong_Kong',
17
- 510: 'GMT+08:00 Asia/Harbin',
18
- 525: 'GMT+08:45 Australia/Eucla',
19
- 540: 'GMT+09:00 Asia/Chita',
20
- 570: 'GMT+09:30 Australia/Adelaide',
21
- 600: 'GMT+10:00 Antarctica/DumontDUrville',
22
- 660: 'GMT+11:00 Asia/Magadan',
23
- 690: 'GMT+11:00 Pacific/Norfolk',
24
- 720: 'GMT+12:00 Asia/Kamchatka',
25
- 765: 'GMT+12:45 Pacific/Chatham',
26
- 780: 'GMT+12:00 Asia/Anadyr',
27
- 840: 'GMT+14:00 Etc/GMT-14',
28
- '-60': 'GMT-01:00 Etc/GMT+1',
29
- '-660': 'GMT-11:00 US/Samoa',
30
- '-600': 'GMT-04:00 America/Anguilla',
31
- '-240': 'GMT-04:00 America/Antigua',
32
- '-180': 'GMT-03:00 America/Araguaina',
33
- '-300': 'GMT-05:00 America/Atikokan',
34
- '-480': 'GMT-05:00 America/Bahia_Banderas',
35
- '-360': 'GMT-06:00 America/Belize',
36
- '-420': 'GMT-06:00 America/Boise',
37
- '-540': 'GMT-07:00 America/Dawson',
38
- '-135': 'GMT-04:00 America/Guyana',
39
- '-120': 'GMT-02:00 Etc/GMT+2',
40
- '-150': 'GMT-03:00 America/Paramaribo',
41
- '-210': 'GMT-04:00 America/Santo_Domingo',
42
- '-720': 'GMT+12:00 Pacific/Kwajalein',
43
- '-560': 'GMT+14:00 Pacific/Kiritimati',
44
- '-510': 'GMT-09:30 Pacific/Marquesas',
45
- '-630': 'GMT-11:00 Pacific/Niue',
46
- '-450': 'GMT-08:00 Pacific/Pitcairn',
47
- '-570': 'GMT-10:00 Pacific/Rarotonga'
48
- };
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.offsetMap = void 0;
7
- var offsetMap = {
8
- 0: 'GMT+00:00 Africa/Abidjan',
9
- 44: 'GMT+00:00 Africa/Monrovia',
10
- 60: 'GMT+01:00 Africa/Bangui',
11
- 120: 'GMT+02:00 Africa/Blantyre',
12
- 180: 'GMT+03:00 Africa/Addis_Ababa',
13
- 210: 'GMT+04:30 Asia/Tehran',
14
- 240: 'GMT+03:00 Asia/Bahrain',
15
- 270: 'GMT+04:30 Asia/Kabul',
16
- 300: 'GMT+05:00 Asia/Aqtau',
17
- '-330': 'GMT+05:30 Asia/Kolkata',
18
- 360: 'GMT+06:00 Asia/Dacca',
19
- 390: 'GMT+06:30 Indian/Cocos',
20
- 420: 'GMT+07:00 Asia/Bangkok',
21
- 450: 'GMT+08:00 Asia/Singapore',
22
- 480: 'GMT+08:00 Asia/Hong_Kong',
23
- 510: 'GMT+08:00 Asia/Harbin',
24
- 525: 'GMT+08:45 Australia/Eucla',
25
- 540: 'GMT+09:00 Asia/Chita',
26
- 570: 'GMT+09:30 Australia/Adelaide',
27
- 600: 'GMT+10:00 Antarctica/DumontDUrville',
28
- 660: 'GMT+11:00 Asia/Magadan',
29
- 690: 'GMT+11:00 Pacific/Norfolk',
30
- 720: 'GMT+12:00 Asia/Kamchatka',
31
- 765: 'GMT+12:45 Pacific/Chatham',
32
- 780: 'GMT+12:00 Asia/Anadyr',
33
- 840: 'GMT+14:00 Etc/GMT-14',
34
- '-60': 'GMT-01:00 Etc/GMT+1',
35
- '-660': 'GMT-11:00 US/Samoa',
36
- '-600': 'GMT-04:00 America/Anguilla',
37
- '-240': 'GMT-04:00 America/Antigua',
38
- '-180': 'GMT-03:00 America/Araguaina',
39
- '-300': 'GMT-05:00 America/Atikokan',
40
- '-480': 'GMT-05:00 America/Bahia_Banderas',
41
- '-360': 'GMT-06:00 America/Belize',
42
- '-420': 'GMT-06:00 America/Boise',
43
- '-540': 'GMT-07:00 America/Dawson',
44
- '-135': 'GMT-04:00 America/Guyana',
45
- '-120': 'GMT-02:00 Etc/GMT+2',
46
- '-150': 'GMT-03:00 America/Paramaribo',
47
- '-210': 'GMT-04:00 America/Santo_Domingo',
48
- '-720': 'GMT+12:00 Pacific/Kwajalein',
49
- '-560': 'GMT+14:00 Pacific/Kiritimati',
50
- '-510': 'GMT-09:30 Pacific/Marquesas',
51
- '-630': 'GMT-11:00 Pacific/Niue',
52
- '-450': 'GMT-08:00 Pacific/Pitcairn',
53
- '-570': 'GMT-10:00 Pacific/Rarotonga'
54
- };
55
- exports.offsetMap = offsetMap;