@elice/material-runbox 1.260825.0-runboxusability.1 → 1.260825.0-runboxusability.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 (39) hide show
  1. package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +7 -2
  2. package/cjs/components/material-runbox/hooks/index.d.ts +1 -1
  3. package/cjs/components/material-runbox/hooks/index.js +6 -2
  4. package/cjs/components/material-runbox/hooks/useRunboxNetworkStatus.d.ts +14 -0
  5. package/cjs/components/material-runbox/hooks/useRunboxNetworkStatus.js +65 -0
  6. package/cjs/components/material-runbox/locales/en.json.js +1 -1
  7. package/cjs/components/material-runbox/locales/ja.json.js +1 -1
  8. package/cjs/components/material-runbox/locales/ko.json.js +1 -1
  9. package/cjs/components/material-runbox/locales/th.json.js +1 -1
  10. package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.js +1 -0
  11. package/cjs/components/material-runbox/status/MaterialRunboxStatusConnectionItem.d.ts +4 -3
  12. package/cjs/components/material-runbox/status/MaterialRunboxStatusConnectionItem.js +6 -3
  13. package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.js +35 -26
  14. package/cjs/components/material-runbox/status/MaterialRunboxStatusResourceItem.js +4 -5
  15. package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.js +1 -0
  16. package/cjs/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.js +1 -0
  17. package/cjs/components/material-runbox/timer/MaterialRunboxTimerDetailPopover.js +2 -0
  18. package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +8 -3
  19. package/es/components/material-runbox/hooks/index.d.ts +1 -1
  20. package/es/components/material-runbox/hooks/index.js +1 -1
  21. package/es/components/material-runbox/hooks/useRunboxNetworkStatus.d.ts +14 -0
  22. package/es/components/material-runbox/hooks/useRunboxNetworkStatus.js +59 -0
  23. package/es/components/material-runbox/locales/en.json.js +1 -1
  24. package/es/components/material-runbox/locales/ja.json.js +1 -1
  25. package/es/components/material-runbox/locales/ko.json.js +1 -1
  26. package/es/components/material-runbox/locales/th.json.js +1 -1
  27. package/es/components/material-runbox/status/MaterialRunboxStatusButton.js +1 -0
  28. package/es/components/material-runbox/status/MaterialRunboxStatusConnectionItem.d.ts +4 -3
  29. package/es/components/material-runbox/status/MaterialRunboxStatusConnectionItem.js +6 -3
  30. package/es/components/material-runbox/status/MaterialRunboxStatusPopover.js +37 -28
  31. package/es/components/material-runbox/status/MaterialRunboxStatusResourceItem.js +4 -5
  32. package/es/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.js +1 -0
  33. package/es/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.js +1 -0
  34. package/es/components/material-runbox/timer/MaterialRunboxTimerDetailPopover.js +3 -1
  35. package/package.json +5 -5
  36. package/cjs/components/material-runbox/hooks/useOnlineState.d.ts +0 -12
  37. package/cjs/components/material-runbox/hooks/useOnlineState.js +0 -50
  38. package/es/components/material-runbox/hooks/useOnlineState.d.ts +0 -12
  39. package/es/components/material-runbox/hooks/useOnlineState.js +0 -44
@@ -10,24 +10,23 @@ var MaterialRunboxStatusResourceItem = function MaterialRunboxStatusResourceItem
10
10
  value = _ref.value;
11
11
  return jsxs(Stack, {
12
12
  direction: "row",
13
- alignItems: "flex-start",
13
+ alignItems: "center",
14
14
  gap: "0.75rem",
15
15
  padding: "0.375rem 0.75rem",
16
16
  children: [jsx(Typography, {
17
17
  component: "span",
18
18
  display: "inline-flex",
19
- color: "text.secondary",
20
- paddingTop: "0.5rem",
19
+ color: "text.tertiary",
21
20
  children: icon
22
21
  }), jsxs(Stack, {
23
22
  direction: "column",
24
23
  children: [jsx(Typography, {
25
24
  variant: "body2",
26
- fontWeight: "bold",
25
+ color: "text.tertiary",
27
26
  children: label
28
27
  }), jsx(Typography, {
29
28
  variant: "caption",
30
- color: "text.secondary",
29
+ color: "text.tertiary",
31
30
  fontFamily: "'JetBrains Mono', monospace",
32
31
  children: value
33
32
  })]
@@ -45,6 +45,7 @@ var MaterialRunboxQuotaAlmostEndDialog = function MaterialRunboxQuotaAlmostEndDi
45
45
  direction: "column",
46
46
  gap: "1.5rem",
47
47
  children: [jsxs(Card, {
48
+ elevation: 0,
48
49
  sx: {
49
50
  bgcolor: 'background.neutral'
50
51
  },
@@ -46,6 +46,7 @@ var MaterialRunboxQuotaPerSessionAlmostEndDialog = function MaterialRunboxQuotaP
46
46
  direction: "column",
47
47
  gap: "1.5rem",
48
48
  children: [jsxs(Card, {
49
+ elevation: 0,
49
50
  sx: {
50
51
  bgcolor: 'background.neutral'
51
52
  },
@@ -7,7 +7,7 @@ import { useRawEliceIntl } from '@elice/intl';
7
7
  import { EliceIcon } from '@elice/mui-elements';
8
8
  import { useEliceRunboxQuota } from '@elice/runbox-client';
9
9
  import { faXmarkLarge } from '@fortawesome/pro-regular-svg-icons';
10
- import { Popover, Stack, Card, Divider, Button, FormControlLabel, Typography, Checkbox, IconButton } from '@mui/material';
10
+ import { Popover, Fade, Stack, Card, Divider, Button, FormControlLabel, Typography, Checkbox, IconButton } from '@mui/material';
11
11
  import { useQuery } from '@tanstack/react-query';
12
12
  import { QUOTA_ALMOST_END_MINUTES, QUOTA_PER_SESSION_ALMOST_END_MINUTES } from '../hooks/useRunboxSessionEndWarning.js';
13
13
  import MaterialRunboxQuotaAmount from './MaterialRunboxQuotaAmount.js';
@@ -207,6 +207,7 @@ var MaterialRunboxTimerDetailPopover = function MaterialRunboxTimerDetailPopover
207
207
  };
208
208
  return jsx(Popover, Object.assign({
209
209
  open: open,
210
+ TransitionComponent: Fade,
210
211
  onClose: onClose
211
212
  }, props, {
212
213
  children: jsxs(Stack, {
@@ -217,6 +218,7 @@ var MaterialRunboxTimerDetailPopover = function MaterialRunboxTimerDetailPopover
217
218
  width: "22rem",
218
219
  bgcolor: "background.paper",
219
220
  children: [renderHeader(), renderCloseButton(), jsxs(Card, {
221
+ elevation: 0,
220
222
  sx: {
221
223
  bgcolor: 'background.neutral'
222
224
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-runbox",
3
- "version": "1.260825.0-runboxusability.1",
3
+ "version": "1.260825.0-runboxusability.2",
4
4
  "description": "User view and editing components of Elice material runbox",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,8 +20,8 @@
20
20
  "peerDependencies": {
21
21
  "@elice/api-client": "^1",
22
22
  "@elice/intl": "^0",
23
- "@elice/material-shared-types": "1.260825.0-runboxusability.1",
24
- "@elice/material-shared-utils": "1.260825.0-runboxusability.1",
23
+ "@elice/material-shared-types": "1.260825.0-runboxusability.2",
24
+ "@elice/material-shared-utils": "1.260825.0-runboxusability.2",
25
25
  "@elice/mui-elements": "^5",
26
26
  "@elice/mui-system": "^5",
27
27
  "@elice/mui-x-snackbar": "^5",
@@ -51,8 +51,8 @@
51
51
  "devDependencies": {
52
52
  "@elice/api-client": "1.260529.0",
53
53
  "@elice/intl": "0.260526.0",
54
- "@elice/material-shared-types": "1.260825.0-runboxusability.1",
55
- "@elice/material-shared-utils": "1.260825.0-runboxusability.1",
54
+ "@elice/material-shared-types": "1.260825.0-runboxusability.2",
55
+ "@elice/material-shared-utils": "1.260825.0-runboxusability.2",
56
56
  "@elice/mui-elements": "5.251204.0",
57
57
  "@elice/mui-system": "5.251204.0",
58
58
  "@elice/mui-x-snackbar": "^5.250108.0-controllabel.0",
@@ -1,12 +0,0 @@
1
- /**
2
- * Whether the browser currently has a network connection.
3
- *
4
- * NOTICE: this deliberately does not use `react-use`'s `useNetworkState`.
5
- * That hook only exists in react-use v17, and consumers of this package do not
6
- * agree on the major — elice-web still resolves v13, which breaks the build at
7
- * link time. Reading `navigator.onLine` keeps this working on both.
8
- *
9
- * `undefined` means "not known yet" (server render, or no `navigator`), which
10
- * callers should treat as online rather than as offline.
11
- */
12
- export declare const useOnlineState: () => boolean | undefined;
@@ -1,50 +0,0 @@
1
- 'use strict';
2
-
3
- var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
4
- var React = require('react');
5
-
6
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
-
8
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
9
-
10
- //
11
- //
12
- //
13
- /**
14
- * Whether the browser currently has a network connection.
15
- *
16
- * NOTICE: this deliberately does not use `react-use`'s `useNetworkState`.
17
- * That hook only exists in react-use v17, and consumers of this package do not
18
- * agree on the major — elice-web still resolves v13, which breaks the build at
19
- * link time. Reading `navigator.onLine` keeps this working on both.
20
- *
21
- * `undefined` means "not known yet" (server render, or no `navigator`), which
22
- * callers should treat as online rather than as offline.
23
- */
24
- var useOnlineState = function useOnlineState() {
25
- var _React$useState = React__default.default.useState(function () {
26
- return typeof navigator === 'undefined' ? undefined : navigator.onLine;
27
- }),
28
- _React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
29
- online = _React$useState2[0],
30
- setOnline = _React$useState2[1];
31
- React__default.default.useEffect(function () {
32
- var handleOnline = function handleOnline() {
33
- return setOnline(true);
34
- };
35
- var handleOffline = function handleOffline() {
36
- return setOnline(false);
37
- };
38
- window.addEventListener('online', handleOnline);
39
- window.addEventListener('offline', handleOffline);
40
- // Catch a change that happened between the initial state and this effect.
41
- setOnline(navigator.onLine);
42
- return function () {
43
- window.removeEventListener('online', handleOnline);
44
- window.removeEventListener('offline', handleOffline);
45
- };
46
- }, []);
47
- return online;
48
- };
49
-
50
- exports.useOnlineState = useOnlineState;
@@ -1,12 +0,0 @@
1
- /**
2
- * Whether the browser currently has a network connection.
3
- *
4
- * NOTICE: this deliberately does not use `react-use`'s `useNetworkState`.
5
- * That hook only exists in react-use v17, and consumers of this package do not
6
- * agree on the major — elice-web still resolves v13, which breaks the build at
7
- * link time. Reading `navigator.onLine` keeps this working on both.
8
- *
9
- * `undefined` means "not known yet" (server render, or no `navigator`), which
10
- * callers should treat as online rather than as offline.
11
- */
12
- export declare const useOnlineState: () => boolean | undefined;
@@ -1,44 +0,0 @@
1
- import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import React from 'react';
3
-
4
- //
5
- //
6
- //
7
- /**
8
- * Whether the browser currently has a network connection.
9
- *
10
- * NOTICE: this deliberately does not use `react-use`'s `useNetworkState`.
11
- * That hook only exists in react-use v17, and consumers of this package do not
12
- * agree on the major — elice-web still resolves v13, which breaks the build at
13
- * link time. Reading `navigator.onLine` keeps this working on both.
14
- *
15
- * `undefined` means "not known yet" (server render, or no `navigator`), which
16
- * callers should treat as online rather than as offline.
17
- */
18
- var useOnlineState = function useOnlineState() {
19
- var _React$useState = React.useState(function () {
20
- return typeof navigator === 'undefined' ? undefined : navigator.onLine;
21
- }),
22
- _React$useState2 = _slicedToArray(_React$useState, 2),
23
- online = _React$useState2[0],
24
- setOnline = _React$useState2[1];
25
- React.useEffect(function () {
26
- var handleOnline = function handleOnline() {
27
- return setOnline(true);
28
- };
29
- var handleOffline = function handleOffline() {
30
- return setOnline(false);
31
- };
32
- window.addEventListener('online', handleOnline);
33
- window.addEventListener('offline', handleOffline);
34
- // Catch a change that happened between the initial state and this effect.
35
- setOnline(navigator.onLine);
36
- return function () {
37
- window.removeEventListener('online', handleOnline);
38
- window.removeEventListener('offline', handleOffline);
39
- };
40
- }, []);
41
- return online;
42
- };
43
-
44
- export { useOnlineState };