@bigbinary/neeto-github-frontend 3.0.0 → 3.0.2

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 (54) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/app/javascript/src/translations/en.json +1 -0
  3. package/dist/.ready +1 -1
  4. package/dist/NeetoGithubNanoContainer.js +445 -21
  5. package/dist/NeetoGithubNanoContainer.js.map +1 -1
  6. package/dist/NeetoGithubNanoPane.js +3 -4
  7. package/dist/NeetoGithubNanoPane.js.map +1 -1
  8. package/dist/NeetoGithubRepositoryConnectionCard.js +3 -1
  9. package/dist/NeetoGithubRepositoryConnectionCard.js.map +1 -1
  10. package/dist/cjs/NeetoGithubNanoContainer.js +445 -25
  11. package/dist/cjs/NeetoGithubNanoContainer.js.map +1 -1
  12. package/dist/cjs/NeetoGithubNanoPane.js +4 -5
  13. package/dist/cjs/NeetoGithubNanoPane.js.map +1 -1
  14. package/dist/cjs/NeetoGithubRepositoryConnectionCard.js +3 -1
  15. package/dist/cjs/NeetoGithubRepositoryConnectionCard.js.map +1 -1
  16. package/dist/cjs/index.js +4 -2
  17. package/dist/cjs/index.js.map +1 -1
  18. package/dist/cjs/v2/NeetoGithubIntegrationsTable.js +157 -0
  19. package/dist/cjs/v2/NeetoGithubIntegrationsTable.js.map +1 -0
  20. package/dist/{index-DBol23Bj.js → cjs/v2/NeetoGithubNanoContainer.js} +231 -169
  21. package/dist/cjs/v2/NeetoGithubNanoContainer.js.map +1 -0
  22. package/dist/cjs/v2/NeetoGithubNanoPane.js +126 -0
  23. package/dist/cjs/v2/NeetoGithubNanoPane.js.map +1 -0
  24. package/dist/cjs/v2/NeetoGithubRepositoryConnectionCard.js +179 -0
  25. package/dist/cjs/v2/NeetoGithubRepositoryConnectionCard.js.map +1 -0
  26. package/dist/cjs/v2/hooks.js +18 -0
  27. package/dist/cjs/v2/hooks.js.map +1 -0
  28. package/dist/cjs/v2/index.js +53 -0
  29. package/dist/cjs/v2/index.js.map +1 -0
  30. package/dist/index.js +3 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/pane-CPRRz6tU.js +5 -0
  33. package/dist/pane-CPRRz6tU.js.map +1 -0
  34. package/dist/pane-DRsC3fwq.js +7 -0
  35. package/dist/pane-DRsC3fwq.js.map +1 -0
  36. package/dist/repository-tile-DxVqVMYY.js +7 -0
  37. package/dist/repository-tile-DxVqVMYY.js.map +1 -0
  38. package/dist/repository-tile-fB8WFACw.js +9 -0
  39. package/dist/repository-tile-fB8WFACw.js.map +1 -0
  40. package/dist/v2/NeetoGithubIntegrationsTable.js +155 -0
  41. package/dist/v2/NeetoGithubIntegrationsTable.js.map +1 -0
  42. package/dist/{index-CEPyKY_r.js → v2/NeetoGithubNanoContainer.js} +222 -159
  43. package/dist/v2/NeetoGithubNanoContainer.js.map +1 -0
  44. package/dist/v2/NeetoGithubNanoPane.js +105 -0
  45. package/dist/v2/NeetoGithubNanoPane.js.map +1 -0
  46. package/dist/v2/NeetoGithubRepositoryConnectionCard.js +177 -0
  47. package/dist/v2/NeetoGithubRepositoryConnectionCard.js.map +1 -0
  48. package/dist/v2/hooks.js +10 -0
  49. package/dist/v2/hooks.js.map +1 -0
  50. package/dist/v2/index.js +41 -0
  51. package/dist/v2/index.js.map +1 -0
  52. package/package.json +28 -16
  53. package/dist/index-CEPyKY_r.js.map +0 -1
  54. package/dist/index-DBol23Bj.js.map +0 -1
@@ -1,110 +1,109 @@
1
1
  'use strict';
2
2
 
3
+ var neetoAtoms = require('@bigbinary/neeto-atoms');
3
4
  var classnames = require('classnames');
4
- var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
5
- var Spinner = require('@bigbinary/neetoui/Spinner');
6
- var useGithubAccountsApi = require('./useGithubAccountsApi-CBlDaBkA.js');
7
- var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
8
- var Github = require('@bigbinary/neeto-icons/misc/Github');
9
- var Typography = require('@bigbinary/neetoui/Typography');
10
- var jsxRuntime = require('react/jsx-runtime');
5
+ var initializers = require('@bigbinary/neeto-commons-frontend/v2/initializers');
6
+ var useGithubAccountsApi = require('../../useGithubAccountsApi-CBlDaBkA.js');
11
7
  var Building = require('@bigbinary/neeto-icons/Building');
12
- var Avatar = require('@bigbinary/neetoui/Avatar');
13
- var Button = require('@bigbinary/neetoui/Button');
8
+ var reactUtils = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
14
9
  var Plus = require('@bigbinary/neeto-icons/Plus');
15
10
  var Settings = require('@bigbinary/neeto-icons/Settings');
11
+ var jsxRuntime = require('react/jsx-runtime');
12
+ var Github = require('@bigbinary/neeto-icons/misc/Github');
16
13
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
17
14
  var react = require('react');
18
15
  var neetoCist = require('@bigbinary/neeto-cist');
19
- var Search = require('@bigbinary/neeto-molecules/Search');
16
+ var Search = require('@bigbinary/neeto-molecules/v2/Search');
20
17
  var reactI18next = require('react-i18next');
21
18
  var Lock = require('@bigbinary/neeto-icons/Lock');
22
- var DateFormat = require('@bigbinary/neeto-molecules/DateFormat');
23
-
24
- var Header = reactUtils.withT(function (_ref) {
25
- var t = _ref.t;
26
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
27
- className: "neeto-ui-text-gray-800 mb-1 flex w-full flex-row items-center space-x-2 font-sans text-lg font-medium leading-6 antialiased",
28
- children: [/*#__PURE__*/jsxRuntime.jsx(Github, {
29
- className: "github-icon",
30
- size: 20
31
- }), /*#__PURE__*/jsxRuntime.jsx(Typography, {
32
- style: "h4",
33
- children: t("neetoGithub.github")
34
- })]
35
- });
36
- });
19
+ var DateFormat = require('@bigbinary/neeto-molecules/v2/DateFormat');
20
+ require('../../repository-tile-fB8WFACw.js');
21
+ require('@babel/runtime/helpers/toConsumableArray');
22
+ require('@babel/runtime/helpers/defineProperty');
23
+ require('@tanstack/react-query');
24
+ require('@bigbinary/neeto-commons-frontend/initializers');
25
+ require('@bigbinary/neeto-commons-frontend/react-utils');
26
+ require('ramda');
27
+ require('axios');
28
+ require('@bigbinary/neeto-commons-frontend/constants');
37
29
 
38
30
  var Configure = reactUtils.withT(function (_ref) {
39
31
  var t = _ref.t,
40
32
  isConnected = _ref.isConnected,
41
33
  installationUrl = _ref.installationUrl;
42
34
  return /*#__PURE__*/jsxRuntime.jsx("div", {
43
- className: "neeto-ui-text-gray-900 shrink-0 font-sans text-sm font-normal leading-6 antialiased",
44
- children: /*#__PURE__*/jsxRuntime.jsx(Button, {
35
+ className: "shrink-0",
36
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
45
37
  href: installationUrl,
46
38
  icon: isConnected ? Settings : Plus,
47
39
  iconPosition: "left",
48
- iconSize: 20,
49
- size: "small",
50
- style: "link",
51
- children: isConnected ? t("neetoGithub.configureAccount") : t("neetoGithub.connectAccount")
40
+ size: "sm",
41
+ variant: "link",
42
+ children: isConnected ? t("neetoGithub.configure") : t("neetoGithub.connect")
52
43
  })
53
44
  });
54
45
  });
55
46
 
47
+ var Header = reactUtils.withT(function (_ref) {
48
+ var t = _ref.t;
49
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
50
+ className: "mb-1 flex w-full flex-row items-center space-x-2",
51
+ children: [/*#__PURE__*/jsxRuntime.jsx(Github, {
52
+ size: 20
53
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
54
+ variant: "h5",
55
+ weight: "medium",
56
+ children: t("neetoGithub.github")
57
+ })]
58
+ });
59
+ });
60
+
56
61
  var List$1 = reactUtils.withT(function (_ref) {
57
62
  var t = _ref.t,
58
63
  accounts = _ref.accounts,
59
64
  isConnected = _ref.isConnected,
60
- installationUrl = _ref.installationUrl,
61
- isPane = _ref.isPane;
65
+ installationUrl = _ref.installationUrl;
62
66
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
63
- className: classnames("neeto-ui-border-gray-300 flex justify-between gap-3 border-b pb-4 pt-2", {
64
- "flex-col md:flex-row": isPane,
65
- "flex-col": !isPane
66
- }),
67
- children: [accounts.map(function (_ref2) {
68
- var id = _ref2.id,
69
- name = _ref2.name,
70
- avatarUrl = _ref2.avatarUrl,
71
- type = _ref2.type,
72
- profileUrl = _ref2.profileUrl,
73
- count = _ref2.count;
74
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
75
- className: "flex w-full items-center space-x-2",
76
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
77
- className: "flex items-center gap-1",
78
- children: [type === "Organization" ? /*#__PURE__*/jsxRuntime.jsx(Building, {
79
- className: "neeto-ui-text-gray-600",
80
- size: 24
81
- }) : /*#__PURE__*/jsxRuntime.jsx(Avatar, {
82
- size: "small",
83
- user: {
84
- imageUrl: avatarUrl
85
- }
86
- }), /*#__PURE__*/jsxRuntime.jsx(Typography, {
87
- className: "neeto-ui-text-gray-800",
88
- style: "body2",
89
- children: /*#__PURE__*/jsxRuntime.jsx(Button, {
90
- className: "neeto-ui-text-gray-800",
91
- label: "@".concat(name),
92
- style: "link",
93
- onClick: function onClick() {
94
- return window.open(profileUrl, "_blank");
67
+ className: "border-border flex flex-col justify-between gap-3 border-b pb-4 pt-2",
68
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
69
+ className: "flex flex-col gap-x-4 gap-y-2",
70
+ children: accounts.map(function (_ref2) {
71
+ var id = _ref2.id,
72
+ name = _ref2.name,
73
+ avatarUrl = _ref2.avatarUrl,
74
+ type = _ref2.type,
75
+ profileUrl = _ref2.profileUrl,
76
+ count = _ref2.count;
77
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
78
+ className: "flex items-center space-x-2",
79
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
80
+ className: "flex items-center gap-1",
81
+ children: [type === "Organization" ? /*#__PURE__*/jsxRuntime.jsx(Building, {
82
+ className: "text-muted-foreground",
83
+ size: 20
84
+ }) : /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Avatar, {
85
+ size: "sm",
86
+ user: {
87
+ imageUrl: avatarUrl
95
88
  }
89
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
90
+ href: profileUrl,
91
+ label: "@".concat(name),
92
+ rel: "noopener noreferrer",
93
+ target: "_blank",
94
+ variant: "link"
95
+ })]
96
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
97
+ className: "bg-muted-foreground h-1 w-1 rounded-full"
98
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
99
+ color: "muted",
100
+ variant: "body2",
101
+ children: t("neetoGithub.countOf.repos", {
102
+ count: count
96
103
  })
97
104
  })]
98
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
99
- className: "neeto-ui-bg-gray-800 neeto-ui-rounded-full h-1 w-1"
100
- }), /*#__PURE__*/jsxRuntime.jsx(Typography, {
101
- className: "neeto-ui-text-black",
102
- style: "body2",
103
- children: t("neetoGithub.countOf.repos", {
104
- count: count
105
- })
106
- })]
107
- }, id);
105
+ }, id);
106
+ })
108
107
  }), /*#__PURE__*/jsxRuntime.jsx(Configure, {
109
108
  installationUrl: installationUrl,
110
109
  isConnected: isConnected
@@ -112,17 +111,64 @@ var List$1 = reactUtils.withT(function (_ref) {
112
111
  });
113
112
  });
114
113
 
115
- var Accounts = function Accounts(_ref) {
116
- var isPane = _ref.isPane,
117
- accounts = _ref.accounts,
114
+ var PaneAccounts = function PaneAccounts(_ref) {
115
+ var accounts = _ref.accounts,
118
116
  isConnected = _ref.isConnected,
119
- onConnect = _ref.onConnect,
120
117
  installationUrl = _ref.installationUrl;
118
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
119
+ className: "border-border bg-muted/30 mb-3 flex items-center justify-between gap-3 rounded-md border p-3",
120
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
121
+ className: "flex flex-wrap items-center gap-x-4 gap-y-2",
122
+ children: accounts.map(function (_ref2) {
123
+ var id = _ref2.id,
124
+ name = _ref2.name,
125
+ avatarUrl = _ref2.avatarUrl,
126
+ type = _ref2.type,
127
+ profileUrl = _ref2.profileUrl;
128
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
129
+ className: "flex items-center gap-2",
130
+ children: [type === "Organization" ? /*#__PURE__*/jsxRuntime.jsx(Building, {
131
+ className: "text-muted-foreground",
132
+ size: 28
133
+ }) : /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Avatar, {
134
+ size: "md",
135
+ user: {
136
+ imageUrl: avatarUrl
137
+ }
138
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
139
+ href: profileUrl,
140
+ label: "@".concat(name),
141
+ rel: "noopener noreferrer",
142
+ target: "_blank",
143
+ variant: "link"
144
+ })]
145
+ }, id);
146
+ })
147
+ }), /*#__PURE__*/jsxRuntime.jsx(Configure, {
148
+ installationUrl: installationUrl,
149
+ isConnected: isConnected
150
+ })]
151
+ });
152
+ };
153
+ var Accounts = function Accounts(_ref3) {
154
+ var isPane = _ref3.isPane,
155
+ accounts = _ref3.accounts,
156
+ isConnected = _ref3.isConnected,
157
+ onConnect = _ref3.onConnect,
158
+ installationUrl = _ref3.installationUrl;
159
+ if (isPane) {
160
+ if (!isConnected) return null;
161
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
162
+ className: "order-1 flex w-full flex-col",
163
+ children: /*#__PURE__*/jsxRuntime.jsx(PaneAccounts, {
164
+ accounts: accounts,
165
+ installationUrl: installationUrl,
166
+ isConnected: isConnected
167
+ })
168
+ });
169
+ }
121
170
  return /*#__PURE__*/jsxRuntime.jsx("div", {
122
- className: classnames("flex w-full flex-col border border-solid border-transparent px-0 py-2", {
123
- "order-1": isPane,
124
- "md:order-2 md:max-w-72 lg:max-w-sm lg:px-6": !isPane
125
- }),
171
+ className: classnames("border-transparent flex w-full flex-col border border-solid py-2", "md:order-2 md:max-w-72 lg:max-w-sm lg:px-6"),
126
172
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
127
173
  className: "mb-2",
128
174
  children: [/*#__PURE__*/jsxRuntime.jsx(Header, {}), /*#__PURE__*/jsxRuntime.jsx(List$1, {
@@ -144,26 +190,23 @@ var NoRepositories = reactUtils.withT(function (_ref) {
144
190
  className: "flex items-center justify-center py-6",
145
191
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
146
192
  className: "mx-auto flex w-full max-w-sm flex-col items-center justify-center space-y-4 py-4 text-center",
147
- children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
148
- style: "body2",
193
+ children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
194
+ variant: "body2",
149
195
  children: t("neetoGithub.noReposDescription")
150
- }), /*#__PURE__*/jsxRuntime.jsx(Button, {
196
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
151
197
  href: installationUrl,
152
- icon: Github,
153
- iconPosition: "left",
154
198
  label: t("neetoGithub.connectRepository"),
155
- size: "medium",
156
- style: "primary"
157
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
158
- className: "text-xs",
199
+ variant: "default"
200
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
201
+ variant: "caption",
159
202
  children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
160
203
  i18nKey: t("neetoGithub.troubleshoot"),
161
204
  components: {
162
- troubleshootLink: /*#__PURE__*/jsxRuntime.jsx("a", {
163
- className: "text-indigo-600 underline",
205
+ troubleshootLink: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
164
206
  href: troubleshootUrl,
165
207
  rel: "noopener noreferrer",
166
- target: "_blank"
208
+ target: "_blank",
209
+ variant: "link"
167
210
  })
168
211
  }
169
212
  })
@@ -172,13 +215,9 @@ var NoRepositories = reactUtils.withT(function (_ref) {
172
215
  });
173
216
  });
174
217
 
175
- var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=true===r.prepend?"prepend":"append",d=true===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
176
-
177
- var css = ".connect-repo__info{width:100%}@media (min-width:768px){.connect-repo__info{width:calc(100% - 82px)}}.github-icon{flex-shrink:0}.github-icon [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvcmVwb3NpdG9yeS10aWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxvQkFDRSxVQUNGLENBRUEseUJBQ0Usb0JBQ0UsdUJBQ0YsQ0FDRixDQUVBLGFBQ0UsYUFDRixDQUVBLHlDQUNFLCtCQUNGIiwic291cmNlc0NvbnRlbnQiOlsiLmNvbm5lY3QtcmVwb19faW5mbyB7XG4gIHdpZHRoOiAxMDAlO1xufVxuXG5AbWVkaWEgKG1pbi13aWR0aDogNzY4cHgpIHtcbiAgLmNvbm5lY3QtcmVwb19faW5mbyB7XG4gICAgd2lkdGg6IGNhbGMoMTAwJSAtIDgycHgpO1xuICB9XG59XG5cbi5naXRodWItaWNvbiB7XG4gIGZsZXgtc2hyaW5rOiAwO1xufVxuXG4uZ2l0aHViLWljb24gW2RhdGEtZGFyay1tb2RlLWNvbG9yPVwidHJ1ZVwiXSB7XG4gIGZpbGw6IHJnYih2YXIoLS1uZWV0by11aS1ibGFjaykpO1xufVxuIl19 */";
178
- n(css,{});
179
-
180
218
  var RepositoryTile = function RepositoryTile(_ref) {
181
219
  var isConnecting = _ref.isConnecting,
220
+ isPane = _ref.isPane,
182
221
  onConnect = _ref.onConnect,
183
222
  repository = _ref.repository;
184
223
  var _useTranslation = reactI18next.useTranslation(),
@@ -191,33 +230,40 @@ var RepositoryTile = function RepositoryTile(_ref) {
191
230
  fullName = repository.fullName,
192
231
  isPrivate = repository.isPrivate,
193
232
  updatedAt = repository.updatedAt;
233
+ var displayName = isPane && fullName !== null && fullName !== void 0 && fullName.includes("/") ? fullName.split("/").pop() : fullName;
194
234
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
195
- className: "connect-repo__row neeto-ui-border-gray-300 flex flex-col justify-between gap-3 border-b border-solid py-3 ps-3 pe-3 last:border-b-0 md:flex-row md:items-center md:ps-5",
235
+ className: "connect-repo__row border-border flex flex-col justify-between gap-3 border-b border-solid py-3 ps-3 pe-3 last:border-b-0 md:flex-row md:items-center md:ps-5",
196
236
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
197
- className: "connect-repo__info flex items-center space-x-2",
237
+ className: "connect-repo__info flex min-w-0 items-center space-x-2",
198
238
  children: [/*#__PURE__*/jsxRuntime.jsx(Github, {
199
- className: "github-icon",
239
+ className: "shrink-0",
200
240
  size: 20
201
- }), /*#__PURE__*/jsxRuntime.jsx(Typography, {
202
- style: "body2",
203
- children: fullName
241
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
242
+ className: "truncate",
243
+ variant: "body2",
244
+ children: displayName
204
245
  }), isPrivate && /*#__PURE__*/jsxRuntime.jsx(Lock, {
205
246
  className: "shrink-0",
206
247
  size: 16
207
248
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
208
- className: "hidden lg:inline-block",
249
+ className: "hidden shrink-0 items-center gap-2 whitespace-nowrap lg:inline-flex",
209
250
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
210
- className: "neeto-ui-bg-gray-800 neeto-ui-rounded-full h-1 w-1"
211
- }), /*#__PURE__*/jsxRuntime.jsx(DateFormat.FromNow, {
212
- date: updatedAt
251
+ className: "bg-muted-foreground h-1 w-1 rounded-full"
252
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
253
+ color: "muted",
254
+ variant: "caption",
255
+ children: /*#__PURE__*/jsxRuntime.jsx(DateFormat.FromNow, {
256
+ date: updatedAt
257
+ })
213
258
  })]
214
259
  })]
215
- }), /*#__PURE__*/jsxRuntime.jsx(Button, {
260
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
216
261
  className: "w-max",
217
262
  disabled: isConnecting,
218
263
  loading: isLoading,
219
- style: "primary",
264
+ size: "sm",
220
265
  type: "button",
266
+ variant: "outline",
221
267
  onClick: function onClick() {
222
268
  return onConnect({
223
269
  repoType: "private",
@@ -237,28 +283,29 @@ var List = reactUtils.withT(function (_ref) {
237
283
  isConnecting = _ref.isConnecting,
238
284
  onConnect = _ref.onConnect,
239
285
  installationUrl = _ref.installationUrl,
240
- troubleshootUrl = _ref.troubleshootUrl;
286
+ troubleshootUrl = _ref.troubleshootUrl,
287
+ isPane = _ref.isPane;
241
288
  return /*#__PURE__*/jsxRuntime.jsx("div", {
242
- className: "h-full overflow-y-scroll px-4 pb-4 md:px-6 md:pb-6",
289
+ className: classnames({
290
+ "px-0 pb-0": isPane,
291
+ "h-full overflow-y-auto px-4 pb-4 md:px-6 md:pb-6": !isPane
292
+ }),
243
293
  children: neetoCist.isPresent(repositories) ? /*#__PURE__*/jsxRuntime.jsx("div", {
244
- className: classnames("neeto-ui-border-gray-300 neeto-ui-rounded-md flex flex-col items-center justify-center border", {
245
- "h-auto": neetoCist.isPresent(filteredRepositories),
246
- "h-full": !neetoCist.isPresent(filteredRepositories)
294
+ className: classnames("flex w-full flex-col overflow-hidden", {
295
+ "border-border rounded-md border": !isPane
247
296
  }),
248
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
249
- className: "m-0 h-full w-full p-0",
250
- children: neetoCist.isPresent(filteredRepositories) ? filteredRepositories.map(function (repository, index) {
251
- return /*#__PURE__*/react.createElement(RepositoryTile, {
252
- isConnecting: isConnecting,
253
- onConnect: onConnect,
254
- repository: repository,
255
- key: index
256
- });
257
- }) : /*#__PURE__*/jsxRuntime.jsx(Typography, {
258
- className: "flex h-full w-full items-center justify-center",
259
- style: "body2",
260
- children: t("neetoGithub.noRepos")
261
- })
297
+ children: neetoCist.isPresent(filteredRepositories) ? filteredRepositories.map(function (repository) {
298
+ return /*#__PURE__*/react.createElement(RepositoryTile, {
299
+ isConnecting: isConnecting,
300
+ isPane: isPane,
301
+ onConnect: onConnect,
302
+ repository: repository,
303
+ key: repository.id
304
+ });
305
+ }) : /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
306
+ className: "flex h-full w-full items-center justify-center py-6",
307
+ variant: "body2",
308
+ children: t("neetoGithub.noRepos")
262
309
  })
263
310
  }) : /*#__PURE__*/jsxRuntime.jsx(NoRepositories, {
264
311
  installationUrl: installationUrl,
@@ -277,18 +324,15 @@ var NotConnected = function NotConnected(_ref) {
277
324
  t = _useTranslation.t;
278
325
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
279
326
  className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center",
280
- children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
281
- style: "body2",
327
+ children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
328
+ variant: "body2",
282
329
  children: t("neetoGithub.notConnectedDescription", {
283
330
  appName: initializers.globalProps.appName
284
331
  })
285
- }), /*#__PURE__*/jsxRuntime.jsx(Button, {
286
- icon: Github,
287
- iconPosition: "left",
332
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
288
333
  label: t("neetoGithub.connectGithub"),
289
334
  loading: isLoading,
290
- size: "medium",
291
- style: "primary",
335
+ variant: "default",
292
336
  onClick: function onClick(event) {
293
337
  setIsLoading(true);
294
338
  var target = reactUtils.isMetaKeyPressed(event) ? "_blank" : "_self";
@@ -304,7 +348,8 @@ var Private = function Private(_ref) {
304
348
  repositories = _ref.repositories,
305
349
  onConnect = _ref.onConnect,
306
350
  installationUrl = _ref.installationUrl,
307
- troubleshootUrl = _ref.troubleshootUrl;
351
+ troubleshootUrl = _ref.troubleshootUrl,
352
+ isPane = _ref.isPane;
308
353
  var _useTranslation = reactI18next.useTranslation(),
309
354
  t = _useTranslation.t;
310
355
  var _useState = react.useState(repositories),
@@ -322,39 +367,56 @@ var Private = function Private(_ref) {
322
367
  });
323
368
  setFilteredRepositories(filteredRepositories);
324
369
  };
370
+ var searchRow = neetoCist.isPresent(repositories) && /*#__PURE__*/jsxRuntime.jsxs("div", {
371
+ className: classnames("flex w-full items-center gap-3", {
372
+ "border-border border-b p-3": isPane
373
+ }),
374
+ children: [/*#__PURE__*/jsxRuntime.jsx(Search, {
375
+ onSearch: onSearch,
376
+ className: "flex-1",
377
+ unlimitedChars: false
378
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
379
+ className: "whitespace-nowrap",
380
+ color: "muted",
381
+ variant: "body2",
382
+ children: t("neetoGithub.countOf.repos", {
383
+ count: filteredRepositories.length
384
+ })
385
+ })]
386
+ });
387
+ var listElement = /*#__PURE__*/jsxRuntime.jsx(List, {
388
+ filteredRepositories: filteredRepositories,
389
+ installationUrl: installationUrl,
390
+ isConnecting: isConnecting,
391
+ isPane: isPane,
392
+ onConnect: onConnect,
393
+ repositories: repositories,
394
+ troubleshootUrl: troubleshootUrl
395
+ });
325
396
  return /*#__PURE__*/jsxRuntime.jsx("div", {
326
397
  className: "connect-repo flex h-full flex-col",
327
- children: isConnected ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
398
+ children: isConnected ? isPane ? /*#__PURE__*/jsxRuntime.jsxs("div", {
399
+ className: "border-border flex max-h-[60vh] flex-col overflow-hidden rounded-md border",
400
+ children: [searchRow, /*#__PURE__*/jsxRuntime.jsx("div", {
401
+ className: "min-h-0 flex-1 overflow-y-auto",
402
+ children: listElement
403
+ })]
404
+ }) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
328
405
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
329
406
  className: "space-y-3 p-4 md:p-6",
330
- children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
331
- className: "shrink-0 text-lg font-medium",
332
- style: "h2",
407
+ children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
408
+ as: "h2",
409
+ className: "shrink-0",
410
+ variant: "h5",
411
+ weight: "medium",
333
412
  children: t("neetoGithub.connectARepo")
334
- }), neetoCist.isPresent(repositories) && /*#__PURE__*/jsxRuntime.jsx(Search, {
335
- onSearch: onSearch,
336
- className: "w-full",
337
- unlimitedChars: false,
338
- suffix: /*#__PURE__*/jsxRuntime.jsx(Typography, {
339
- style: "body2",
340
- children: t("neetoGithub.countOf.repos", {
341
- count: filteredRepositories.length
342
- })
343
- })
344
- })]
413
+ }), searchRow]
345
414
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
346
415
  className: "flex min-h-0 w-full grow flex-col space-y-6",
347
- children: /*#__PURE__*/jsxRuntime.jsx(List, {
348
- filteredRepositories: filteredRepositories,
349
- installationUrl: installationUrl,
350
- isConnecting: isConnecting,
351
- onConnect: onConnect,
352
- repositories: repositories,
353
- troubleshootUrl: troubleshootUrl
354
- })
416
+ children: listElement
355
417
  })]
356
418
  }) : /*#__PURE__*/jsxRuntime.jsx("div", {
357
- className: "neeto-ui-text-gray-900 grow font-sans text-sm font-normal leading-6 antialiased",
419
+ className: "text-foreground grow",
358
420
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
359
421
  className: "flex h-full flex-col items-center justify-center p-4",
360
422
  children: /*#__PURE__*/jsxRuntime.jsx(NotConnected, {
@@ -374,14 +436,15 @@ var Repositories = function Repositories(_ref) {
374
436
  troubleshootUrl = _ref.troubleshootUrl,
375
437
  isPane = _ref.isPane;
376
438
  return /*#__PURE__*/jsxRuntime.jsx("div", {
377
- className: classnames("neeto-ui-rounded-md neeto-ui-border-gray-300 h-full w-full space-y-6 border border-solid", {
439
+ className: classnames("flex h-full w-full flex-col space-y-6 overflow-hidden", {
378
440
  "order-2": isPane,
379
- "order-1": !isPane
441
+ "border-border order-1 rounded-md border border-solid": !isPane
380
442
  }),
381
443
  children: /*#__PURE__*/jsxRuntime.jsx(Private, {
382
444
  installationUrl: installationUrl,
383
445
  isConnected: isConnected,
384
446
  isConnecting: isConnecting,
447
+ isPane: isPane,
385
448
  onConnect: onConnect,
386
449
  repositories: repositories,
387
450
  troubleshootUrl: troubleshootUrl
@@ -422,7 +485,7 @@ var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
422
485
  if (isLoading) {
423
486
  return /*#__PURE__*/jsxRuntime.jsx("div", {
424
487
  className: "flex h-full w-full items-center justify-center",
425
- children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
488
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Spinner, {})
426
489
  });
427
490
  }
428
491
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -448,6 +511,5 @@ var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
448
511
  });
449
512
  };
450
513
 
451
- exports.NeetoGithubNanoContainer = NeetoGithubNanoContainer;
452
- exports.n = n;
453
- //# sourceMappingURL=index-DBol23Bj.js.map
514
+ module.exports = NeetoGithubNanoContainer;
515
+ //# sourceMappingURL=NeetoGithubNanoContainer.js.map