baseui 10.7.2 → 10.9.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 (174) hide show
  1. package/a11y/a11y.js +2 -2
  2. package/a11y/a11y.js.flow +3 -3
  3. package/button/styled-components.js +47 -18
  4. package/button/styled-components.js.flow +25 -5
  5. package/combobox/combobox.js +6 -3
  6. package/combobox/combobox.js.flow +4 -2
  7. package/combobox/types.js.flow +2 -0
  8. package/data-table/column-categorical.js +1 -1
  9. package/data-table/column-categorical.js.flow +2 -2
  10. package/data-table/column-numerical.js +307 -355
  11. package/data-table/column-numerical.js.flow +273 -287
  12. package/data-table/constants.js +17 -11
  13. package/data-table/constants.js.flow +11 -8
  14. package/data-table/data-table.js +53 -50
  15. package/data-table/data-table.js.flow +18 -13
  16. package/data-table/filter-shell.js +27 -4
  17. package/data-table/filter-shell.js.flow +33 -9
  18. package/data-table/locale.js +4 -2
  19. package/data-table/locale.js.flow +6 -2
  20. package/data-table/measure-column-widths.js +83 -121
  21. package/data-table/measure-column-widths.js.flow +87 -109
  22. package/datepicker/styled-components.js +1 -1
  23. package/datepicker/styled-components.js.flow +4 -1
  24. package/drawer/drawer.js +3 -1
  25. package/drawer/drawer.js.flow +7 -1
  26. package/es/a11y/a11y.js +2 -2
  27. package/es/button/styled-components.js +32 -2
  28. package/es/combobox/combobox.js +6 -3
  29. package/es/data-table/column-categorical.js +2 -2
  30. package/es/data-table/column-numerical.js +245 -317
  31. package/es/data-table/constants.js +12 -8
  32. package/es/data-table/data-table.js +18 -16
  33. package/es/data-table/filter-shell.js +26 -4
  34. package/es/data-table/locale.js +4 -2
  35. package/es/data-table/measure-column-widths.js +75 -86
  36. package/es/datepicker/styled-components.js +1 -1
  37. package/es/drawer/drawer.js +3 -1
  38. package/es/index.js +1 -1
  39. package/es/map-marker/badge-enhancer.js +61 -0
  40. package/es/map-marker/constants.js +146 -2
  41. package/es/map-marker/drag-shadow.js +32 -0
  42. package/es/map-marker/fixed-marker.js +54 -48
  43. package/es/map-marker/floating-marker.js +21 -12
  44. package/es/map-marker/index.js +1 -1
  45. package/es/map-marker/label-enhancer.js +39 -0
  46. package/es/map-marker/needle.js +26 -0
  47. package/es/map-marker/pin-head.js +42 -40
  48. package/es/map-marker/styled-components.js +177 -32
  49. package/es/map-marker/types.js +1 -1
  50. package/es/menu/maybe-child-menu.js +0 -2
  51. package/es/menu/nested-menus.js +49 -3
  52. package/es/menu/stateful-container.js +13 -12
  53. package/es/modal/modal.js +3 -1
  54. package/es/popover/popover.js +7 -3
  55. package/es/progress-bar/index.js +1 -1
  56. package/es/progress-bar/progressbar.js +25 -10
  57. package/es/progress-bar/styled-components.js +9 -5
  58. package/es/select/select-component.js +2 -10
  59. package/es/spinner/styled-components.js +34 -16
  60. package/es/table/filter.js +3 -1
  61. package/es/themes/dark-theme/color-component-tokens.js +19 -10
  62. package/es/themes/light-theme/color-component-tokens.js +19 -10
  63. package/es/timezonepicker/timezone-picker.js +53 -36
  64. package/es/timezonepicker/tzdata.js +2 -0
  65. package/es/timezonepicker/update-tzdata.js +69 -0
  66. package/es/toast/styled-components.js +18 -7
  67. package/esm/a11y/a11y.js +3 -3
  68. package/esm/button/styled-components.js +47 -18
  69. package/esm/combobox/combobox.js +6 -3
  70. package/esm/data-table/column-categorical.js +2 -2
  71. package/esm/data-table/column-numerical.js +304 -353
  72. package/esm/data-table/constants.js +12 -8
  73. package/esm/data-table/data-table.js +53 -50
  74. package/esm/data-table/filter-shell.js +26 -4
  75. package/esm/data-table/locale.js +4 -2
  76. package/esm/data-table/measure-column-widths.js +83 -121
  77. package/esm/datepicker/styled-components.js +1 -1
  78. package/esm/drawer/drawer.js +3 -1
  79. package/esm/index.js +1 -1
  80. package/esm/map-marker/badge-enhancer.js +79 -0
  81. package/esm/map-marker/constants.js +94 -4
  82. package/esm/map-marker/drag-shadow.js +53 -0
  83. package/esm/map-marker/fixed-marker.js +84 -80
  84. package/esm/map-marker/floating-marker.js +22 -13
  85. package/esm/map-marker/index.js +1 -1
  86. package/esm/map-marker/label-enhancer.js +60 -0
  87. package/esm/map-marker/needle.js +43 -0
  88. package/esm/map-marker/pin-head.js +77 -66
  89. package/esm/map-marker/styled-components.js +182 -51
  90. package/esm/map-marker/types.js +1 -1
  91. package/esm/menu/maybe-child-menu.js +0 -2
  92. package/esm/menu/nested-menus.js +66 -5
  93. package/esm/menu/stateful-container.js +15 -13
  94. package/esm/modal/modal.js +3 -1
  95. package/esm/popover/popover.js +7 -3
  96. package/esm/progress-bar/index.js +1 -1
  97. package/esm/progress-bar/progressbar.js +32 -10
  98. package/esm/progress-bar/styled-components.js +9 -4
  99. package/esm/select/select-component.js +2 -11
  100. package/esm/spinner/styled-components.js +35 -16
  101. package/esm/table/filter.js +3 -1
  102. package/esm/themes/dark-theme/color-component-tokens.js +19 -10
  103. package/esm/themes/light-theme/color-component-tokens.js +19 -10
  104. package/esm/timezonepicker/timezone-picker.js +64 -36
  105. package/esm/timezonepicker/tzdata.js +2 -0
  106. package/esm/timezonepicker/update-tzdata.js +160 -0
  107. package/esm/toast/styled-components.js +13 -5
  108. package/index.js +6 -0
  109. package/index.js.flow +1 -1
  110. package/map-marker/badge-enhancer.js +90 -0
  111. package/map-marker/badge-enhancer.js.flow +86 -0
  112. package/map-marker/constants.js +103 -5
  113. package/map-marker/constants.js.flow +152 -0
  114. package/map-marker/drag-shadow.js +64 -0
  115. package/map-marker/drag-shadow.js.flow +52 -0
  116. package/map-marker/fixed-marker.js +84 -78
  117. package/map-marker/fixed-marker.js.flow +78 -66
  118. package/map-marker/floating-marker.js +22 -13
  119. package/map-marker/floating-marker.js.flow +30 -17
  120. package/map-marker/index.d.ts +125 -24
  121. package/map-marker/index.js +18 -0
  122. package/map-marker/index.js.flow +3 -0
  123. package/map-marker/label-enhancer.js +71 -0
  124. package/map-marker/label-enhancer.js.flow +63 -0
  125. package/map-marker/needle.js +54 -0
  126. package/map-marker/needle.js.flow +29 -0
  127. package/map-marker/pin-head.js +80 -69
  128. package/map-marker/pin-head.js.flow +122 -84
  129. package/map-marker/styled-components.js +200 -62
  130. package/map-marker/styled-components.js.flow +172 -22
  131. package/map-marker/types.js.flow +69 -20
  132. package/menu/index.d.ts +9 -4
  133. package/menu/maybe-child-menu.js +0 -2
  134. package/menu/maybe-child-menu.js.flow +0 -2
  135. package/menu/nested-menus.js +66 -5
  136. package/menu/nested-menus.js.flow +50 -5
  137. package/menu/stateful-container.js +15 -13
  138. package/menu/stateful-container.js.flow +19 -13
  139. package/menu/types.js.flow +7 -1
  140. package/modal/modal.js +3 -1
  141. package/modal/modal.js.flow +2 -0
  142. package/package.json +5 -4
  143. package/popover/popover.js +7 -3
  144. package/popover/popover.js.flow +23 -17
  145. package/progress-bar/index.d.ts +2 -0
  146. package/progress-bar/index.js +6 -0
  147. package/progress-bar/index.js.flow +1 -0
  148. package/progress-bar/progressbar.js +32 -10
  149. package/progress-bar/progressbar.js.flow +35 -9
  150. package/progress-bar/styled-components.js +9 -4
  151. package/progress-bar/styled-components.js.flow +15 -4
  152. package/progress-bar/types.js.flow +12 -2
  153. package/select/select-component.js +2 -11
  154. package/select/select-component.js.flow +5 -7
  155. package/spinner/styled-components.js +35 -16
  156. package/spinner/styled-components.js.flow +37 -19
  157. package/spinner/types.js.flow +10 -0
  158. package/styles/index.js.flow +1 -1
  159. package/table/filter.js +3 -1
  160. package/table/filter.js.flow +5 -1
  161. package/themes/dark-theme/color-component-tokens.js +19 -10
  162. package/themes/dark-theme/color-component-tokens.js.flow +19 -10
  163. package/themes/light-theme/color-component-tokens.js +19 -10
  164. package/themes/light-theme/color-component-tokens.js.flow +19 -10
  165. package/themes/types.js.flow +9 -0
  166. package/timezonepicker/timezone-picker.js +69 -41
  167. package/timezonepicker/timezone-picker.js.flow +52 -46
  168. package/timezonepicker/types.js.flow +1 -1
  169. package/timezonepicker/tzdata.js +10 -0
  170. package/timezonepicker/tzdata.js.flow +347 -0
  171. package/timezonepicker/update-tzdata.js +164 -0
  172. package/timezonepicker/update-tzdata.js.flow +70 -0
  173. package/toast/styled-components.js +13 -5
  174. package/toast/styled-components.js.flow +17 -7
@@ -0,0 +1,347 @@
1
+ /* eslint-disable header/header */
2
+ // @flow
3
+
4
+ export const zones = [
5
+ 'Europe/Andorra',
6
+ 'Asia/Dubai',
7
+ 'Asia/Kabul',
8
+ 'Europe/Tirane',
9
+ 'Asia/Yerevan',
10
+ 'Antarctica/Casey',
11
+ 'Antarctica/Davis',
12
+ 'Antarctica/Mawson',
13
+ 'Antarctica/Palmer',
14
+ 'Antarctica/Rothera',
15
+ 'Antarctica/Troll',
16
+ 'Antarctica/Vostok',
17
+ 'America/Argentina/Buenos_Aires',
18
+ 'America/Argentina/Cordoba',
19
+ 'America/Argentina/Salta',
20
+ 'America/Argentina/Jujuy',
21
+ 'America/Argentina/Tucuman',
22
+ 'America/Argentina/Catamarca',
23
+ 'America/Argentina/La_Rioja',
24
+ 'America/Argentina/San_Juan',
25
+ 'America/Argentina/Mendoza',
26
+ 'America/Argentina/San_Luis',
27
+ 'America/Argentina/Rio_Gallegos',
28
+ 'America/Argentina/Ushuaia',
29
+ 'Pacific/Pago_Pago',
30
+ 'Europe/Vienna',
31
+ 'Australia/Lord_Howe',
32
+ 'Antarctica/Macquarie',
33
+ 'Australia/Hobart',
34
+ 'Australia/Melbourne',
35
+ 'Australia/Sydney',
36
+ 'Australia/Broken_Hill',
37
+ 'Australia/Brisbane',
38
+ 'Australia/Lindeman',
39
+ 'Australia/Adelaide',
40
+ 'Australia/Darwin',
41
+ 'Australia/Perth',
42
+ 'Australia/Eucla',
43
+ 'Asia/Baku',
44
+ 'America/Barbados',
45
+ 'Asia/Dhaka',
46
+ 'Europe/Brussels',
47
+ 'Europe/Sofia',
48
+ 'Atlantic/Bermuda',
49
+ 'Asia/Brunei',
50
+ 'America/La_Paz',
51
+ 'America/Noronha',
52
+ 'America/Belem',
53
+ 'America/Fortaleza',
54
+ 'America/Recife',
55
+ 'America/Araguaina',
56
+ 'America/Maceio',
57
+ 'America/Bahia',
58
+ 'America/Sao_Paulo',
59
+ 'America/Campo_Grande',
60
+ 'America/Cuiaba',
61
+ 'America/Santarem',
62
+ 'America/Porto_Velho',
63
+ 'America/Boa_Vista',
64
+ 'America/Manaus',
65
+ 'America/Eirunepe',
66
+ 'America/Rio_Branco',
67
+ 'Asia/Thimphu',
68
+ 'Europe/Minsk',
69
+ 'America/Belize',
70
+ 'America/St_Johns',
71
+ 'America/Halifax',
72
+ 'America/Glace_Bay',
73
+ 'America/Moncton',
74
+ 'America/Goose_Bay',
75
+ 'America/Toronto',
76
+ 'America/Nipigon',
77
+ 'America/Thunder_Bay',
78
+ 'America/Iqaluit',
79
+ 'America/Pangnirtung',
80
+ 'America/Winnipeg',
81
+ 'America/Rainy_River',
82
+ 'America/Resolute',
83
+ 'America/Rankin_Inlet',
84
+ 'America/Regina',
85
+ 'America/Swift_Current',
86
+ 'America/Edmonton',
87
+ 'America/Cambridge_Bay',
88
+ 'America/Yellowknife',
89
+ 'America/Inuvik',
90
+ 'America/Dawson_Creek',
91
+ 'America/Fort_Nelson',
92
+ 'America/Whitehorse',
93
+ 'America/Dawson',
94
+ 'America/Vancouver',
95
+ 'Indian/Cocos',
96
+ 'Europe/Zurich',
97
+ 'Africa/Abidjan',
98
+ 'Pacific/Rarotonga',
99
+ 'America/Santiago',
100
+ 'America/Punta_Arenas',
101
+ 'Pacific/Easter',
102
+ 'Asia/Shanghai',
103
+ 'Asia/Urumqi',
104
+ 'America/Bogota',
105
+ 'America/Costa_Rica',
106
+ 'America/Havana',
107
+ 'Atlantic/Cape_Verde',
108
+ 'Indian/Christmas',
109
+ 'Asia/Nicosia',
110
+ 'Asia/Famagusta',
111
+ 'Europe/Prague',
112
+ 'Europe/Berlin',
113
+ 'Europe/Copenhagen',
114
+ 'America/Santo_Domingo',
115
+ 'Africa/Algiers',
116
+ 'America/Guayaquil',
117
+ 'Pacific/Galapagos',
118
+ 'Europe/Tallinn',
119
+ 'Africa/Cairo',
120
+ 'Africa/El_Aaiun',
121
+ 'Europe/Madrid',
122
+ 'Africa/Ceuta',
123
+ 'Atlantic/Canary',
124
+ 'Europe/Helsinki',
125
+ 'Pacific/Fiji',
126
+ 'Atlantic/Stanley',
127
+ 'Pacific/Chuuk',
128
+ 'Pacific/Pohnpei',
129
+ 'Pacific/Kosrae',
130
+ 'Atlantic/Faroe',
131
+ 'Europe/Paris',
132
+ 'Europe/London',
133
+ 'Asia/Tbilisi',
134
+ 'America/Cayenne',
135
+ 'Europe/Gibraltar',
136
+ 'America/Nuuk',
137
+ 'America/Danmarkshavn',
138
+ 'America/Scoresbysund',
139
+ 'America/Thule',
140
+ 'Europe/Athens',
141
+ 'Atlantic/South_Georgia',
142
+ 'America/Guatemala',
143
+ 'Pacific/Guam',
144
+ 'Africa/Bissau',
145
+ 'America/Guyana',
146
+ 'Asia/Hong_Kong',
147
+ 'America/Tegucigalpa',
148
+ 'America/Port-au-Prince',
149
+ 'Europe/Budapest',
150
+ 'Asia/Jakarta',
151
+ 'Asia/Pontianak',
152
+ 'Asia/Makassar',
153
+ 'Asia/Jayapura',
154
+ 'Europe/Dublin',
155
+ 'Asia/Jerusalem',
156
+ 'Asia/Kolkata',
157
+ 'Indian/Chagos',
158
+ 'Asia/Baghdad',
159
+ 'Asia/Tehran',
160
+ 'Atlantic/Reykjavik',
161
+ 'Europe/Rome',
162
+ 'America/Jamaica',
163
+ 'Asia/Amman',
164
+ 'Asia/Tokyo',
165
+ 'Africa/Nairobi',
166
+ 'Asia/Bishkek',
167
+ 'Pacific/Tarawa',
168
+ 'Pacific/Kanton',
169
+ 'Pacific/Kiritimati',
170
+ 'Asia/Pyongyang',
171
+ 'Asia/Seoul',
172
+ 'Asia/Almaty',
173
+ 'Asia/Qyzylorda',
174
+ 'Asia/Qostanay',
175
+ 'Asia/Aqtobe',
176
+ 'Asia/Aqtau',
177
+ 'Asia/Atyrau',
178
+ 'Asia/Oral',
179
+ 'Asia/Beirut',
180
+ 'Asia/Colombo',
181
+ 'Africa/Monrovia',
182
+ 'Europe/Vilnius',
183
+ 'Europe/Luxembourg',
184
+ 'Europe/Riga',
185
+ 'Africa/Tripoli',
186
+ 'Africa/Casablanca',
187
+ 'Europe/Monaco',
188
+ 'Europe/Chisinau',
189
+ 'Pacific/Majuro',
190
+ 'Pacific/Kwajalein',
191
+ 'Asia/Yangon',
192
+ 'Asia/Ulaanbaatar',
193
+ 'Asia/Hovd',
194
+ 'Asia/Choibalsan',
195
+ 'Asia/Macau',
196
+ 'America/Martinique',
197
+ 'Europe/Malta',
198
+ 'Indian/Mauritius',
199
+ 'Indian/Maldives',
200
+ 'America/Mexico_City',
201
+ 'America/Cancun',
202
+ 'America/Merida',
203
+ 'America/Monterrey',
204
+ 'America/Matamoros',
205
+ 'America/Mazatlan',
206
+ 'America/Chihuahua',
207
+ 'America/Ojinaga',
208
+ 'America/Hermosillo',
209
+ 'America/Tijuana',
210
+ 'America/Bahia_Banderas',
211
+ 'Asia/Kuala_Lumpur',
212
+ 'Asia/Kuching',
213
+ 'Africa/Maputo',
214
+ 'Africa/Windhoek',
215
+ 'Pacific/Noumea',
216
+ 'Pacific/Norfolk',
217
+ 'Africa/Lagos',
218
+ 'America/Managua',
219
+ 'Europe/Amsterdam',
220
+ 'Europe/Oslo',
221
+ 'Asia/Kathmandu',
222
+ 'Pacific/Nauru',
223
+ 'Pacific/Niue',
224
+ 'Pacific/Auckland',
225
+ 'Pacific/Chatham',
226
+ 'America/Panama',
227
+ 'America/Lima',
228
+ 'Pacific/Tahiti',
229
+ 'Pacific/Marquesas',
230
+ 'Pacific/Gambier',
231
+ 'Pacific/Port_Moresby',
232
+ 'Pacific/Bougainville',
233
+ 'Asia/Manila',
234
+ 'Asia/Karachi',
235
+ 'Europe/Warsaw',
236
+ 'America/Miquelon',
237
+ 'Pacific/Pitcairn',
238
+ 'America/Puerto_Rico',
239
+ 'Asia/Gaza',
240
+ 'Asia/Hebron',
241
+ 'Europe/Lisbon',
242
+ 'Atlantic/Madeira',
243
+ 'Atlantic/Azores',
244
+ 'Pacific/Palau',
245
+ 'America/Asuncion',
246
+ 'Asia/Qatar',
247
+ 'Indian/Reunion',
248
+ 'Europe/Bucharest',
249
+ 'Europe/Belgrade',
250
+ 'Europe/Kaliningrad',
251
+ 'Europe/Moscow',
252
+ 'Europe/Simferopol',
253
+ 'Europe/Kirov',
254
+ 'Europe/Volgograd',
255
+ 'Europe/Astrakhan',
256
+ 'Europe/Saratov',
257
+ 'Europe/Ulyanovsk',
258
+ 'Europe/Samara',
259
+ 'Asia/Yekaterinburg',
260
+ 'Asia/Omsk',
261
+ 'Asia/Novosibirsk',
262
+ 'Asia/Barnaul',
263
+ 'Asia/Tomsk',
264
+ 'Asia/Novokuznetsk',
265
+ 'Asia/Krasnoyarsk',
266
+ 'Asia/Irkutsk',
267
+ 'Asia/Chita',
268
+ 'Asia/Yakutsk',
269
+ 'Asia/Khandyga',
270
+ 'Asia/Vladivostok',
271
+ 'Asia/Ust-Nera',
272
+ 'Asia/Magadan',
273
+ 'Asia/Sakhalin',
274
+ 'Asia/Srednekolymsk',
275
+ 'Asia/Kamchatka',
276
+ 'Asia/Anadyr',
277
+ 'Asia/Riyadh',
278
+ 'Pacific/Guadalcanal',
279
+ 'Indian/Mahe',
280
+ 'Africa/Khartoum',
281
+ 'Europe/Stockholm',
282
+ 'Asia/Singapore',
283
+ 'America/Paramaribo',
284
+ 'Africa/Juba',
285
+ 'Africa/Sao_Tome',
286
+ 'America/El_Salvador',
287
+ 'Asia/Damascus',
288
+ 'America/Grand_Turk',
289
+ 'Africa/Ndjamena',
290
+ 'Indian/Kerguelen',
291
+ 'Asia/Bangkok',
292
+ 'Asia/Dushanbe',
293
+ 'Pacific/Fakaofo',
294
+ 'Asia/Dili',
295
+ 'Asia/Ashgabat',
296
+ 'Africa/Tunis',
297
+ 'Pacific/Tongatapu',
298
+ 'Europe/Istanbul',
299
+ 'Pacific/Funafuti',
300
+ 'Asia/Taipei',
301
+ 'Europe/Kiev',
302
+ 'Europe/Uzhgorod',
303
+ 'Europe/Zaporozhye',
304
+ 'Pacific/Wake',
305
+ 'America/New_York',
306
+ 'America/Detroit',
307
+ 'America/Kentucky/Louisville',
308
+ 'America/Kentucky/Monticello',
309
+ 'America/Indiana/Indianapolis',
310
+ 'America/Indiana/Vincennes',
311
+ 'America/Indiana/Winamac',
312
+ 'America/Indiana/Marengo',
313
+ 'America/Indiana/Petersburg',
314
+ 'America/Indiana/Vevay',
315
+ 'America/Chicago',
316
+ 'America/Indiana/Tell_City',
317
+ 'America/Indiana/Knox',
318
+ 'America/Menominee',
319
+ 'America/North_Dakota/Center',
320
+ 'America/North_Dakota/New_Salem',
321
+ 'America/North_Dakota/Beulah',
322
+ 'America/Denver',
323
+ 'America/Boise',
324
+ 'America/Phoenix',
325
+ 'America/Los_Angeles',
326
+ 'America/Anchorage',
327
+ 'America/Juneau',
328
+ 'America/Sitka',
329
+ 'America/Metlakatla',
330
+ 'America/Yakutat',
331
+ 'America/Nome',
332
+ 'America/Adak',
333
+ 'Pacific/Honolulu',
334
+ 'America/Montevideo',
335
+ 'Asia/Samarkand',
336
+ 'Asia/Tashkent',
337
+ 'America/Caracas',
338
+ 'Asia/Ho_Chi_Minh',
339
+ 'Pacific/Efate',
340
+ 'Pacific/Wallis',
341
+ 'Pacific/Apia',
342
+ 'Africa/Johannesburg',
343
+ ];
344
+
345
+ declare var __DEV__: boolean;
346
+ declare var __NODE__: boolean;
347
+ declare var __BROWSER__: boolean;
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+
3
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
4
+
5
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
+
7
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
8
+
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
+
13
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
14
+
15
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
16
+
17
+ /*
18
+ Copyright (c) Uber Technologies, Inc.
19
+
20
+ This source code is licensed under the MIT license found in the
21
+ LICENSE file in the root directory of this source tree.
22
+ */
23
+
24
+ /* eslint-env node */
25
+ var fs = require('fs');
26
+
27
+ var path = require('path');
28
+
29
+ var util = require('util');
30
+
31
+ var exec = util.promisify(require('child_process').exec); // Download tzdata and collect a list of timezones. Baseui previously used a library
32
+ // to do this, but it grew stale and unmaintained. This approach is straightforward
33
+ // enough to update whenever necessary, but future improvements could include building
34
+ // this data set before baseui is published so that the data is always fresh.
35
+
36
+ function main() {
37
+ return _main.apply(this, arguments);
38
+ }
39
+
40
+ function _main() {
41
+ _main = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {
42
+ var tmpDir, src, zoneTabPath, content, lines, zones, _iterator, _step, line, parts, file, _i, _zones, zone, tzdataPath;
43
+
44
+ return _regenerator.default.wrap(function _callee$(_context) {
45
+ while (1) {
46
+ switch (_context.prev = _context.next) {
47
+ case 0:
48
+ _context.prev = 0;
49
+ tmpDir = path.join(__dirname, 'tmp'); // $FlowFixMe - flow is not aware of recursive option
50
+
51
+ _context.next = 4;
52
+ return fs.promises.rmdir(tmpDir, {
53
+ recursive: true
54
+ });
55
+
56
+ case 4:
57
+ _context.next = 6;
58
+ return fs.promises.mkdir(tmpDir);
59
+
60
+ case 6:
61
+ src = "https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz";
62
+ _context.next = 9;
63
+ return exec("curl -L ".concat(src, " | gzip -dc | tar -xf - --directory ").concat(tmpDir));
64
+
65
+ case 9:
66
+ zoneTabPath = path.join(tmpDir, 'zone1970.tab');
67
+ _context.next = 12;
68
+ return fs.promises.readFile(zoneTabPath, 'utf-8');
69
+
70
+ case 12:
71
+ content = _context.sent;
72
+ lines = content.split('\n');
73
+ zones = [];
74
+ _iterator = _createForOfIteratorHelper(lines);
75
+ _context.prev = 16;
76
+
77
+ _iterator.s();
78
+
79
+ case 18:
80
+ if ((_step = _iterator.n()).done) {
81
+ _context.next = 26;
82
+ break;
83
+ }
84
+
85
+ line = _step.value;
86
+
87
+ if (!(line[0] === '#')) {
88
+ _context.next = 22;
89
+ break;
90
+ }
91
+
92
+ return _context.abrupt("continue", 24);
93
+
94
+ case 22:
95
+ parts = line.split(/\s+/);
96
+
97
+ if (parts.length >= 3) {
98
+ zones.push(parts[2]);
99
+ }
100
+
101
+ case 24:
102
+ _context.next = 18;
103
+ break;
104
+
105
+ case 26:
106
+ _context.next = 31;
107
+ break;
108
+
109
+ case 28:
110
+ _context.prev = 28;
111
+ _context.t0 = _context["catch"](16);
112
+
113
+ _iterator.e(_context.t0);
114
+
115
+ case 31:
116
+ _context.prev = 31;
117
+
118
+ _iterator.f();
119
+
120
+ return _context.finish(31);
121
+
122
+ case 34:
123
+ file = [];
124
+ file.push('/* eslint-disable header/header */');
125
+ file.push('// @flow');
126
+ file.push('');
127
+ file.push('export const zones = [');
128
+
129
+ for (_i = 0, _zones = zones; _i < _zones.length; _i++) {
130
+ zone = _zones[_i];
131
+ file.push(" '".concat(zone, "',"));
132
+ }
133
+
134
+ file.push('];');
135
+ tzdataPath = path.join(__dirname, 'tzdata.js');
136
+ _context.next = 44;
137
+ return fs.promises.writeFile(tzdataPath, file.join('\n'));
138
+
139
+ case 44:
140
+ _context.next = 46;
141
+ return fs.promises.rmdir(tmpDir, {
142
+ recursive: true
143
+ });
144
+
145
+ case 46:
146
+ _context.next = 51;
147
+ break;
148
+
149
+ case 48:
150
+ _context.prev = 48;
151
+ _context.t1 = _context["catch"](0);
152
+ console.error(_context.t1);
153
+
154
+ case 51:
155
+ case "end":
156
+ return _context.stop();
157
+ }
158
+ }
159
+ }, _callee, null, [[0, 48], [16, 28, 31, 34]]);
160
+ }));
161
+ return _main.apply(this, arguments);
162
+ }
163
+
164
+ main();
@@ -0,0 +1,70 @@
1
+ /*
2
+ Copyright (c) Uber Technologies, Inc.
3
+
4
+ This source code is licensed under the MIT license found in the
5
+ LICENSE file in the root directory of this source tree.
6
+ */
7
+ /* eslint-env node */
8
+ // @flow
9
+
10
+ const fs = require('fs');
11
+ const path = require('path');
12
+ const util = require('util');
13
+
14
+ const exec = util.promisify(require('child_process').exec);
15
+
16
+ // Download tzdata and collect a list of timezones. Baseui previously used a library
17
+ // to do this, but it grew stale and unmaintained. This approach is straightforward
18
+ // enough to update whenever necessary, but future improvements could include building
19
+ // this data set before baseui is published so that the data is always fresh.
20
+ async function main() {
21
+ try {
22
+ const tmpDir = path.join(__dirname, 'tmp');
23
+ // $FlowFixMe - flow is not aware of recursive option
24
+ await fs.promises.rmdir(tmpDir, {recursive: true});
25
+ await fs.promises.mkdir(tmpDir);
26
+
27
+ const src = `https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz`;
28
+ await exec(`curl -L ${src} | gzip -dc | tar -xf - --directory ${tmpDir}`);
29
+
30
+ const zoneTabPath = path.join(tmpDir, 'zone1970.tab');
31
+ const content = await fs.promises.readFile(zoneTabPath, 'utf-8');
32
+ const lines = content.split('\n');
33
+
34
+ const zones = [];
35
+ for (const line of lines) {
36
+ if (line[0] === '#') {
37
+ continue;
38
+ }
39
+
40
+ const parts = line.split(/\s+/);
41
+ if (parts.length >= 3) {
42
+ zones.push(parts[2]);
43
+ }
44
+ }
45
+
46
+ const file = [];
47
+ file.push('/* eslint-disable header/header */');
48
+ file.push('// @flow');
49
+ file.push('');
50
+ file.push('export const zones = [');
51
+ for (const zone of zones) {
52
+ file.push(` '${zone}',`);
53
+ }
54
+ file.push('];');
55
+
56
+ const tzdataPath = path.join(__dirname, 'tzdata.js');
57
+ await fs.promises.writeFile(tzdataPath, file.join('\n'));
58
+
59
+ // $FlowFixMe - flow is not aware of recursive option
60
+ await fs.promises.rmdir(tmpDir, {recursive: true});
61
+ } catch (error) {
62
+ console.error(error);
63
+ }
64
+ }
65
+
66
+ main();
67
+
68
+ declare var __DEV__: boolean;
69
+ declare var __NODE__: boolean;
70
+ declare var __BROWSER__: boolean;
@@ -25,10 +25,18 @@ function getBackgroundColor(kind, type, theme) {
25
25
  return (_KIND$info$KIND$posit = {}, _defineProperty(_KIND$info$KIND$posit, _constants.KIND.info, isInline ? theme.colors.notificationInfoBackground : theme.colors.toastInfoBackground), _defineProperty(_KIND$info$KIND$posit, _constants.KIND.positive, isInline ? theme.colors.notificationPositiveBackground : theme.colors.toastPositiveBackground), _defineProperty(_KIND$info$KIND$posit, _constants.KIND.warning, isInline ? theme.colors.notificationWarningBackground : theme.colors.toastWarningBackground), _defineProperty(_KIND$info$KIND$posit, _constants.KIND.negative, isInline ? theme.colors.notificationNegativeBackground : theme.colors.toastNegativeBackground), _KIND$info$KIND$posit)[kind];
26
26
  }
27
27
 
28
- function getFontColor(kind, theme) {
29
- var _KIND$info$KIND$posit2;
28
+ function getFontColor(kind, type, theme) {
29
+ var _KIND$info$KIND$posit3;
30
30
 
31
- return (_KIND$info$KIND$posit2 = {}, _defineProperty(_KIND$info$KIND$posit2, _constants.KIND.info, theme.colors.notificationInfoText), _defineProperty(_KIND$info$KIND$posit2, _constants.KIND.positive, theme.colors.notificationPositiveText), _defineProperty(_KIND$info$KIND$posit2, _constants.KIND.warning, theme.colors.notificationWarningText), _defineProperty(_KIND$info$KIND$posit2, _constants.KIND.negative, theme.colors.notificationNegativeText), _KIND$info$KIND$posit2)[kind];
31
+ var isInline = type === _constants.TYPE.inline;
32
+
33
+ if (isInline) {
34
+ var _KIND$info$KIND$posit2;
35
+
36
+ return (_KIND$info$KIND$posit2 = {}, _defineProperty(_KIND$info$KIND$posit2, _constants.KIND.info, theme.colors.notificationInfoText), _defineProperty(_KIND$info$KIND$posit2, _constants.KIND.positive, theme.colors.notificationPositiveText), _defineProperty(_KIND$info$KIND$posit2, _constants.KIND.warning, theme.colors.notificationWarningText), _defineProperty(_KIND$info$KIND$posit2, _constants.KIND.negative, theme.colors.notificationNegativeText), _KIND$info$KIND$posit2)[kind];
37
+ }
38
+
39
+ return (_KIND$info$KIND$posit3 = {}, _defineProperty(_KIND$info$KIND$posit3, _constants.KIND.info, theme.colors.toastInfoText), _defineProperty(_KIND$info$KIND$posit3, _constants.KIND.positive, theme.colors.toastPositiveText), _defineProperty(_KIND$info$KIND$posit3, _constants.KIND.warning, theme.colors.toastWarningText), _defineProperty(_KIND$info$KIND$posit3, _constants.KIND.negative, theme.colors.toastNegativeText), _KIND$info$KIND$posit3)[kind];
32
40
  }
33
41
 
34
42
  function getPlacement(placement) {
@@ -96,9 +104,9 @@ var Body = (0, _index.styled)('div', function (props) {
96
104
  $type = props.$type,
97
105
  $theme = props.$theme;
98
106
  var isInline = $type === _constants.TYPE.inline;
99
- return _objectSpread(_objectSpread({}, $theme.typography.font250), {}, {
107
+ return _objectSpread(_objectSpread({}, $theme.typography.font300), {}, {
100
108
  pointerEvents: 'auto',
101
- color: isInline ? getFontColor($kind, $theme) : $theme.colors.toastText,
109
+ color: getFontColor($kind, $type, $theme),
102
110
  height: 'auto',
103
111
  width: '288px',
104
112
  paddingTop: $theme.sizing.scale600,
@@ -40,12 +40,22 @@ function getBackgroundColor(
40
40
  }[kind];
41
41
  }
42
42
 
43
- function getFontColor(kind: KindTypeT, theme: ThemeT) {
43
+ function getFontColor(kind: KindTypeT, type: NotificationTypeT, theme: ThemeT) {
44
+ const isInline = type === TYPE.inline;
45
+ if (isInline) {
46
+ return {
47
+ [KIND.info]: theme.colors.notificationInfoText,
48
+ [KIND.positive]: theme.colors.notificationPositiveText,
49
+ [KIND.warning]: theme.colors.notificationWarningText,
50
+ [KIND.negative]: theme.colors.notificationNegativeText,
51
+ }[kind];
52
+ }
53
+
44
54
  return {
45
- [KIND.info]: theme.colors.notificationInfoText,
46
- [KIND.positive]: theme.colors.notificationPositiveText,
47
- [KIND.warning]: theme.colors.notificationWarningText,
48
- [KIND.negative]: theme.colors.notificationNegativeText,
55
+ [KIND.info]: theme.colors.toastInfoText,
56
+ [KIND.positive]: theme.colors.toastPositiveText,
57
+ [KIND.warning]: theme.colors.toastWarningText,
58
+ [KIND.negative]: theme.colors.toastNegativeText,
49
59
  }[kind];
50
60
  }
51
61
 
@@ -115,9 +125,9 @@ export const Body = styled<SharedStylePropsArgT>('div', props => {
115
125
  const {$isVisible, $kind, $type, $theme} = props;
116
126
  const isInline = $type === TYPE.inline;
117
127
  return {
118
- ...$theme.typography.font250,
128
+ ...$theme.typography.font300,
119
129
  pointerEvents: 'auto',
120
- color: isInline ? getFontColor($kind, $theme) : $theme.colors.toastText,
130
+ color: getFontColor($kind, $type, $theme),
121
131
  height: 'auto',
122
132
  width: '288px',
123
133
  paddingTop: $theme.sizing.scale600,