@bigbinary/neeto-github-frontend 1.0.25 → 1.0.26

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
@@ -13,7 +13,6 @@ import { Button, Typography, Pane } from '@bigbinary/neetoui';
13
13
  import { Github } from '@bigbinary/neeto-icons/misc';
14
14
  import { isPresent, findBy, noop } from '@bigbinary/neeto-cist';
15
15
  import Search from '@bigbinary/neeto-molecules/Search';
16
- import Scrollable from '@bigbinary/neeto-molecules/Scrollable';
17
16
  import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
18
17
  import require$$0 from 'util';
19
18
 
@@ -257,7 +256,9 @@ var NoRepositories = withT(function (_ref) {
257
256
  installationUrl = _ref.installationUrl,
258
257
  troubleshootUrl = _ref.troubleshootUrl;
259
258
  return /*#__PURE__*/React.createElement("div", {
260
- className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
259
+ className: "flex items-center justify-center py-6"
260
+ }, /*#__PURE__*/React.createElement("div", {
261
+ className: "mx-auto flex w-full max-w-sm flex-col items-center justify-center space-y-4 py-4 text-center"
261
262
  }, /*#__PURE__*/React.createElement(Typography, {
262
263
  style: "body2"
263
264
  }, t("neetoGithub.noReposDescription")), /*#__PURE__*/React.createElement(Button, {
@@ -270,7 +271,7 @@ var NoRepositories = withT(function (_ref) {
270
271
  }), /*#__PURE__*/React.createElement("div", {
271
272
  className: "text-xs"
272
273
  }, /*#__PURE__*/React.createElement(Trans, {
273
- i18nKey: "troubleshoot",
274
+ i18nKey: t("neetoGithub.troubleshoot"),
274
275
  components: {
275
276
  troubleshootLink: /*#__PURE__*/React.createElement("a", {
276
277
  className: "text-indigo-600 underline",
@@ -279,7 +280,7 @@ var NoRepositories = withT(function (_ref) {
279
280
  target: "_blank"
280
281
  })
281
282
  }
282
- })));
283
+ }))));
283
284
  });
284
285
 
285
286
  var RepositoryTile = function RepositoryTile(_ref) {
@@ -297,7 +298,7 @@ var RepositoryTile = function RepositoryTile(_ref) {
297
298
  isPrivate = repository.isPrivate,
298
299
  updatedAt = repository.updatedAt;
299
300
  return /*#__PURE__*/React.createElement("div", {
300
- className: "neeto-ui-border-gray-300 flex items-center justify-between border-b border-l-0 border-r-0 border-t-0 border-solid py-3 pl-5 pr-3",
301
+ className: "neeto-ui-border-gray-300 flex items-center justify-between border-b border-solid py-3 pl-5 pr-3 last:border-b-0",
301
302
  key: id
302
303
  }, /*#__PURE__*/React.createElement("div", {
303
304
  className: "width-calc flex items-center space-x-2"
@@ -310,7 +311,7 @@ var RepositoryTile = function RepositoryTile(_ref) {
310
311
  }), /*#__PURE__*/React.createElement("div", {
311
312
  className: "hidden md:inline-block"
312
313
  }, /*#__PURE__*/React.createElement(Typography, {
313
- className: "neeto-ui-text-gray-900 mx-2 text-lg",
314
+ className: "neeto-ui-text-gray-900 mr-2 text-lg",
314
315
  component: "span",
315
316
  style: "h2"
316
317
  }, "\u2022"), /*#__PURE__*/React.createElement(DateFormat.FromNow, {
@@ -339,9 +340,14 @@ var List = withT(function (_ref) {
339
340
  installationUrl = _ref.installationUrl,
340
341
  troubleshootUrl = _ref.troubleshootUrl;
341
342
  return /*#__PURE__*/React.createElement("div", {
342
- className: "neeto-ui-border-gray-300 neeto-ui-rounded-md m-0 flex flex-col items-center justify-center border border-solid p-0"
343
- }, isPresent(repositories) ? /*#__PURE__*/React.createElement(Scrollable, {
344
- className: "m-0 h-full w-full overflow-y-scroll p-0 shadow-inner"
343
+ className: "h-full overflow-y-scroll px-6 pb-6"
344
+ }, isPresent(repositories) ? /*#__PURE__*/React.createElement("div", {
345
+ className: classNames("neeto-ui-border-gray-300 neeto-ui-rounded-md flex flex-col items-center justify-center border", {
346
+ "h-auto": isPresent(filteredRepositories),
347
+ "h-full": !isPresent(filteredRepositories)
348
+ })
349
+ }, /*#__PURE__*/React.createElement("div", {
350
+ className: "m-0 h-full w-full p-0"
345
351
  }, isPresent(filteredRepositories) ? filteredRepositories.map(function (repository, index) {
346
352
  return /*#__PURE__*/React.createElement(RepositoryTile, {
347
353
  isConnecting: isConnecting,
@@ -352,7 +358,7 @@ var List = withT(function (_ref) {
352
358
  }) : /*#__PURE__*/React.createElement(Typography, {
353
359
  className: "flex h-full w-full items-center justify-center",
354
360
  style: "body2"
355
- }, t("neetoGithub.noRepos"))) : /*#__PURE__*/React.createElement(NoRepositories, {
361
+ }, t("neetoGithub.noRepos")))) : /*#__PURE__*/React.createElement(NoRepositories, {
356
362
  installationUrl: installationUrl,
357
363
  troubleshootUrl: troubleshootUrl
358
364
  }));
@@ -402,13 +408,13 @@ var Private = function Private(_ref) {
402
408
  setFilteredRepositories(filteredRepositories);
403
409
  };
404
410
  return /*#__PURE__*/React.createElement("div", {
405
- className: "connect-repo"
406
- }, isConnected && /*#__PURE__*/React.createElement(Typography, {
407
- className: "mb-2 pb-5 text-lg font-medium",
411
+ className: "connect-repo flex h-full flex-col"
412
+ }, isConnected ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
413
+ className: "space-y-3 p-6"
414
+ }, /*#__PURE__*/React.createElement(Typography, {
415
+ className: "flex-shrink-0 text-lg font-medium",
408
416
  style: "h2"
409
- }, t("neetoGithub.connectARepo")), isConnected ? /*#__PURE__*/React.createElement("div", {
410
- className: "flex w-full flex-col space-y-6"
411
- }, /*#__PURE__*/React.createElement(Search, {
417
+ }, t("neetoGithub.connectARepo")), isPresent(repositories) && /*#__PURE__*/React.createElement(Search, {
412
418
  onSearch: onSearch,
413
419
  className: "w-full",
414
420
  unlimitedChars: false,
@@ -417,17 +423,19 @@ var Private = function Private(_ref) {
417
423
  }, t("neetoGithub.countOf.repos", {
418
424
  count: filteredRepositories.length
419
425
  }))
420
- }), /*#__PURE__*/React.createElement(List, {
426
+ })), /*#__PURE__*/React.createElement("div", {
427
+ className: "flex min-h-0 w-full flex-grow flex-col space-y-6"
428
+ }, /*#__PURE__*/React.createElement(List, {
421
429
  filteredRepositories: filteredRepositories,
422
430
  installationUrl: installationUrl,
423
431
  isConnecting: isConnecting,
424
432
  onConnect: onConnect,
425
433
  repositories: repositories,
426
434
  troubleshootUrl: troubleshootUrl
427
- })) : /*#__PURE__*/React.createElement("div", {
428
- className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
435
+ }))) : /*#__PURE__*/React.createElement("div", {
436
+ className: "neeto-ui-text-gray-900 flex-grow font-sans text-sm font-normal leading-6 antialiased"
429
437
  }, /*#__PURE__*/React.createElement("div", {
430
- className: "neeto-ui-rounded-md neeto-ui-border-gray-300 m-0 flex h-[366px] flex-col items-center justify-center border border-solid p-4 shadow-inner"
438
+ className: "flex h-full flex-col items-center justify-center p-4"
431
439
  }, /*#__PURE__*/React.createElement(NotConnected, {
432
440
  installationUrl: installationUrl
433
441
  }))));
@@ -441,7 +449,7 @@ var Repositories = function Repositories(_ref) {
441
449
  installationUrl = _ref.installationUrl,
442
450
  troubleshootUrl = _ref.troubleshootUrl;
443
451
  return /*#__PURE__*/React.createElement("div", {
444
- className: "neeto-ui-rounded-md neeto-ui-border-gray-300 h-full w-full space-y-6 overflow-y-auto border border-solid px-8 py-7"
452
+ className: "neeto-ui-rounded-md neeto-ui-border-gray-300 h-full w-full space-y-6 border border-solid"
445
453
  }, /*#__PURE__*/React.createElement(Private, {
446
454
  installationUrl: installationUrl,
447
455
  isConnected: isConnected,