@balena/ui-shared-components 12.4.1-build-remove-unused-icon-abf38bf8f1d9d6827561fcd27fe2fe90534402d9-1 → 12.4.1-build-upgrade-storybook-9-e3144c3663dd553c1ab03e825591993c6ffb3a41-1

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.
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Avatar, Box, Button, Collapse, Typography } from '@mui/material';
3
3
  import { useMemo, useState } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faCaretDown } from '@fortawesome/free-solid-svg-icons/faCaretDown';
6
- import { faCaretUp } from '@fortawesome/free-solid-svg-icons/faCaretUp';
4
+ import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
5
+ import ArrowDropUpIcon from '@mui/icons-material/ArrowDropUp';
7
6
  /**
8
7
  * This will collapse a long list and allow to expand it by clicking the "expand" button.
9
8
  */
@@ -22,5 +21,5 @@ export const CollapsedList = ({ list, collapseItems = 3, }) => {
22
21
  }
23
22
  return (_jsxs(Box, { display: "flex", flexDirection: "column", justifyContent: "center", children: [_jsx(Collapse, { in: showMore, collapsedSize: collapseItems * 33, children: listItems }), list.length > collapseItems && (_jsxs(Button, { onClick: () => {
24
23
  setShowMore(!showMore);
25
- }, children: [showMore ? 'Less' : 'More', showMore ? (_jsx(FontAwesomeIcon, { icon: faCaretUp })) : (_jsx(FontAwesomeIcon, { icon: faCaretDown }))] }))] }));
24
+ }, children: [showMore ? 'Less' : 'More', showMore ? _jsx(ArrowDropUpIcon, {}) : _jsx(ArrowDropDownIcon, {})] }))] }));
26
25
  };
@@ -1,15 +1,17 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { Avatar, Box, Checkbox, Chip, Divider, FormControl, FormControlLabel, FormLabel, InputAdornment, Radio, RadioGroup, TextField, Tooltip, Typography, IconButton, Autocomplete, Stack, Accordion, AccordionSummary, AccordionDetails, accordionSummaryClasses, } from '@mui/material';
4
+ import HelpIcon from '@mui/icons-material/Help';
4
5
  import { memo, useCallback, useEffect, useMemo, useState } from 'react';
5
6
  import { getPreferredVersionOpts, transformVersions } from './version';
6
7
  import { OsTypeSelector } from './OsTypeSelector';
7
8
  import { VariantSelector } from './VariantSelector';
8
- import { faFileLines } from '@fortawesome/free-solid-svg-icons/faFileLines';
9
+ import ArticleIcon from '@mui/icons-material/Article';
9
10
  import { MUILinkWithTracking } from '../MUILinkWithTracking';
11
+ import { Visibility, VisibilityOff } from '@mui/icons-material';
10
12
  import { FALLBACK_LOGO_UNKNOWN_DEVICE } from './utils';
11
13
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
12
- import { faChevronRight, faEye, faEyeSlash, faQuestionCircle, faTriangleExclamation, } from '@fortawesome/free-solid-svg-icons';
14
+ import { faChevronRight, faTriangleExclamation, } from '@fortawesome/free-solid-svg-icons';
13
15
  import { Callout } from '../Callout';
14
16
  import { token } from '../../utils/token';
15
17
  const POLL_INTERVAL_DOCS = 'https://www.balena.io/docs/reference/supervisor/bandwidth-reduction/#side-effects--warnings';
@@ -118,7 +120,7 @@ export const ImageForm = memo(function ImageForm({ compatibleDeviceTypes, osVers
118
120
  }, renderInput: (_a) => {
119
121
  var _b;
120
122
  var { InputProps } = _a, params = __rest(_a, ["InputProps"]);
121
- return (_jsx(TextField, Object.assign({}, params, { label: _jsxs(Stack, { direction: "row", alignItems: "center", gap: 1, children: ["Device type", _jsx(Tooltip, { title: "Applications can support any devices that share the same architecture as their default device type.", children: _jsx(FontAwesomeIcon, { icon: faQuestionCircle, color: "info", fontSize: "1rem" }) })] }), slotProps: {
123
+ return (_jsx(TextField, Object.assign({}, params, { label: _jsxs(Stack, { direction: "row", alignItems: "center", gap: 1, children: ["Device type", _jsx(Tooltip, { title: "Applications can support any devices that share the same architecture as their default device type.", children: _jsx(HelpIcon, { color: "info", sx: { fontSize: '1rem' } }) })] }), slotProps: {
122
124
  input: Object.assign(Object.assign({}, InputProps), { startAdornment: (_jsx(Avatar, { variant: "square", src: (_b = model.deviceType.logo) !== null && _b !== void 0 ? _b : FALLBACK_LOGO_UNKNOWN_DEVICE, sx: { mr: 3, width: '20px', height: '20px' } })) }),
123
125
  } })));
124
126
  }, onChange: (_event, value) => {
@@ -165,7 +167,7 @@ export const ImageForm = memo(function ImageForm({ compatibleDeviceTypes, osVers
165
167
  setShowPassword((show) => !show);
166
168
  }, onMouseDown: (event) => {
167
169
  event.preventDefault();
168
- }, edge: "end", children: showPassword ? (_jsx(FontAwesomeIcon, { icon: faEyeSlash })) : (_jsx(FontAwesomeIcon, { icon: faEye })) }) })),
170
+ }, edge: "end", children: showPassword ? _jsx(VisibilityOff, {}) : _jsx(Visibility, {}) }) })),
169
171
  },
170
172
  }, onChange: (event) => {
171
173
  onChange({ wifiKey: event.target.value });
@@ -192,8 +194,7 @@ export const ImageForm = memo(function ImageForm({ compatibleDeviceTypes, osVers
192
194
  display: 'flex',
193
195
  alignItems: 'center',
194
196
  height: '1.5rem',
195
- gap: 1,
196
- }, children: _jsx(FontAwesomeIcon, { icon: faFileLines, fontSize: "1.15rem" }) })] }) }), _jsx(TextField, { name: "provisioningKeyName", value: (_a = model.provisioningKeyName) !== null && _a !== void 0 ? _a : '', slotProps: {
197
+ }, children: _jsx(ArticleIcon, { sx: { ml: 1, fontSize: '1.15rem' } }) })] }) }), _jsx(TextField, { name: "provisioningKeyName", value: (_a = model.provisioningKeyName) !== null && _a !== void 0 ? _a : '', slotProps: {
197
198
  htmlInput: {
198
199
  name: 'provisioningKeyName',
199
200
  autoComplete: 'provisioningKeyName-auto-complete',
@@ -1,11 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, InputLabel, MenuItem, Select, Tooltip, Typography, Stack, } from '@mui/material';
3
3
  import { getOsTypeName } from './utils';
4
+ import ArticleIcon from '@mui/icons-material/Article';
4
5
  import { MUILinkWithTracking } from '../MUILinkWithTracking';
5
6
  import { OsTypesEnum } from './models';
6
7
  import { Chip } from '../Chip';
7
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
8
- import { faFileLines } from '@fortawesome/free-solid-svg-icons';
9
8
  const OsTypeOption = ({ osType }) => {
10
9
  if (!osType) {
11
10
  return _jsx(Typography, { variant: "body1", children: "Select OS type..." });
@@ -31,7 +30,7 @@ export const OsTypeSelector = ({ supportedOsTypes, hasEsrVersions, selectedOsTyp
31
30
  };
32
31
  });
33
32
  const selectedOsType = selectOsTypes.find((osType) => osType.slug === selectedOsTypeSlug && osType.supportedForDeviceType);
34
- return (_jsxs(Stack, { flex: 1, children: [_jsx(Stack, { direction: "row", alignItems: "center", gap: 1, children: _jsxs(InputLabel, { id: "newAppApplicationType-label", sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: ["OS type", _jsx(MUILinkWithTracking, { sx: { height: 12 }, href: "https://www.balena.io/docs/reference/OS/extended-support-release", children: _jsx(FontAwesomeIcon, { icon: faFileLines, fontSize: "1rem" }) })] }) }), _jsx(Select, { id: "newAppApplicationType", fullWidth: true, disabled: supportedOsTypes.length === 0, value: (_a = selectedOsType === null || selectedOsType === void 0 ? void 0 : selectedOsType.slug) !== null && _a !== void 0 ? _a : OsTypesEnum.DEFAULT, renderValue: (selected) => (_jsx(Box, { display: "flex", width: "100%", children: _jsx(OsTypeOption, { osType: selectOsTypes.find((osType) => selected === osType.slug) }) })), onChange: (event) => {
33
+ return (_jsxs(Stack, { flex: 1, children: [_jsx(Stack, { direction: "row", alignItems: "center", gap: 1, children: _jsxs(InputLabel, { id: "newAppApplicationType-label", sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: ["OS type", _jsx(MUILinkWithTracking, { sx: { height: 12 }, href: "https://www.balena.io/docs/reference/OS/extended-support-release", children: _jsx(ArticleIcon, { sx: { fontSize: '1rem' } }) })] }) }), _jsx(Select, { id: "newAppApplicationType", fullWidth: true, disabled: supportedOsTypes.length === 0, value: (_a = selectedOsType === null || selectedOsType === void 0 ? void 0 : selectedOsType.slug) !== null && _a !== void 0 ? _a : OsTypesEnum.DEFAULT, renderValue: (selected) => (_jsx(Box, { display: "flex", width: "100%", children: _jsx(OsTypeOption, { osType: selectOsTypes.find((osType) => selected === osType.slug) }) })), onChange: (event) => {
35
34
  const osType = selectOsTypes.find((os) => os.slug === event.target.value);
36
35
  if (!osType.disabled) {
37
36
  onSelectedOsTypeChange(osType.slug);
@@ -2,13 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { FormControl, FormControlLabel, FormLabel, Radio, RadioGroup, Stack, Tooltip, Typography, } from '@mui/material';
3
3
  import { MUILinkWithTracking } from '../MUILinkWithTracking';
4
4
  import { getOsVariantDisplayText } from './utils';
5
+ import { Lightbulb } from '@mui/icons-material';
5
6
  import { token } from '../../utils/token';
6
7
  import { Callout } from '../Callout';
7
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
8
- import { faLightbulb } from '@fortawesome/free-solid-svg-icons';
9
8
  const variantInfo = (selected) => ({
10
9
  dev: {
11
- title: (_jsxs(Stack, { gap: 1, direction: "row", alignItems: "center", children: [_jsx(Typography, { children: getOsVariantDisplayText('dev') }), _jsxs(Typography, { variant: "bodySm", color: token('color.text.accent'), alignItems: "center", display: "flex", children: [_jsx(FontAwesomeIcon, { icon: faLightbulb, width: 14, height: 14 }), "Recommended for first time users"] })] })),
10
+ title: (_jsxs(Stack, { gap: 1, direction: "row", alignItems: "center", children: [_jsx(Typography, { children: getOsVariantDisplayText('dev') }), _jsxs(Typography, { variant: "bodySm", color: token('color.text.accent'), alignItems: "center", display: "flex", children: [_jsx(Lightbulb, { sx: { width: 14, height: 14 } }), "Recommended for first time users"] })] })),
12
11
  description: (_jsxs(Stack, { gap: 1, children: [_jsxs(Typography, { children: ["Development images should be used when you are developing an application and want to use the fast", ' ', _jsx(MUILinkWithTracking, { href: "https://balena.io/docs/development/local-mode/", children: "local mode" }), ' ', "workflow."] }), selected === 'dev' && (_jsxs(Callout, { severity: "warning", size: "sm", children: ["This variant should never be used in production for security reasons.", ' ', _jsx(MUILinkWithTracking, { href: "https://docs.balena.io/reference/OS/overview/#development-vs-production-mode", children: "Learn more" }), "."] }))] })),
13
12
  },
14
13
  prod: {
@@ -5,6 +5,7 @@ import { FALLBACK_LOGO_UNKNOWN_DEVICE, isUrlAccessible, stripVersionBuild, } fro
5
5
  import { ImageForm } from './ImageForm';
6
6
  import { ApplicationInstructions } from './ApplicationInstructions';
7
7
  import { DropDownButton } from '../DropDownButton';
8
+ import DownloadIcon from '@mui/icons-material/Download';
8
9
  import pickBy from 'lodash/pickBy';
9
10
  import debounce from 'lodash/debounce';
10
11
  import isEmpty from 'lodash/isEmpty';
@@ -14,8 +15,6 @@ import { enqueueSnackbar } from 'notistack';
14
15
  import { DialogWithCloseButton } from '../DialogWithCloseButton';
15
16
  import { Callout } from '../Callout';
16
17
  import { Spinner } from '../Spinner';
17
- import { faDownload } from '@fortawesome/free-solid-svg-icons';
18
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
19
18
  const etcherLogoBase64 = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjYwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIDxnPgogIDx0aXRsZT5FdGNoZXI8L3RpdGxlPgogIDxnIGlkPSJzdmdfMSIgc3Ryb2tlPSJudWxsIj4KICAgPHBhdGggaWQ9InN2Z18yIiBjbGFzcz0ic3QxIiBkPSJtNDEyLjkwMzgzLDM1OC4wNjcxM2wwLDE3MS40OTU4M2M3LjQ5MjU0LC0xLjY2NTAxIDE0LjE1MjU3LC0zLjMzMDAyIDIwLjgxMjYsLTcuNDkyNTRsMTQyLjM1ODE5LC04MS41ODUzOWMyMC44MTI2LC0xMS42NTUwNi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yLjQ4NzU2LDQ2LjYyMDIyIDMzLjMwMDE2LDU4LjI3NTI4bDE0MS41MjU2OCw4MS41ODUzOWM2LjY2MDAzLDMuMzMwMDIgMTMuMzIwMDYsNS44Mjc1MyAyMC44MTI2LDcuNDkyNTRsMCwtMTcxLjQ5NTgzYy0wLjgzMjUsLTI0Ljk3NTEyIC03LjQ5MjU0LC00NS43ODc3MiAtMzkuOTYwMTksLTY5LjA5NzgzbDAsLTAuMDAwMDF6IiBmaWxsPSIjQTVERTM3IiBzdHJva2U9Im51bGwiLz4KICA8L2c+CiA8L2c+Cgo8L3N2Zz4=';
20
19
  const ETCHER_OPEN_IMAGE_URL = 'https://www.balena.io/etcher/open-image-url';
21
20
  export var ActionType;
@@ -151,7 +150,7 @@ export const DownloadImageDialog = ({ open, applicationId, releaseId, compatible
151
150
  onDownloadStart === null || onDownloadStart === void 0 ? void 0 : onDownloadStart(formModel, ActionType.downloadOs);
152
151
  formElement.current.submit();
153
152
  }),
154
- children: (_jsxs(_Fragment, { children: [_jsx(FontAwesomeIcon, { icon: faDownload }), " Download balenaOS", ' ', formModel.version && downloadSize ? ` (~${downloadSize})` : ''] })),
153
+ children: (_jsxs(_Fragment, { children: [_jsx(DownloadIcon, {}), " Download balenaOS", ' ', formModel.version && downloadSize ? ` (~${downloadSize})` : ''] })),
155
154
  },
156
155
  ];
157
156
  if (downloadConfig) {
@@ -165,7 +164,7 @@ export const DownloadImageDialog = ({ open, applicationId, releaseId, compatible
165
164
  onDownloadStart === null || onDownloadStart === void 0 ? void 0 : onDownloadStart(formModel, ActionType.downloadConfigFile);
166
165
  await downloadConfig(formModel);
167
166
  },
168
- children: (_jsxs(_Fragment, { children: [_jsx(FontAwesomeIcon, { icon: faDownload }), " Download configuration file only"] })),
167
+ children: (_jsxs(_Fragment, { children: [_jsx(DownloadIcon, {}), " Download configuration file only"] })),
169
168
  });
170
169
  }
171
170
  return dropDownButtonActions;
@@ -6,9 +6,8 @@ import { ButtonWithTracking } from '../ButtonWithTracking';
6
6
  import { useAnalyticsContext } from '../../contexts/AnalyticsContext';
7
7
  import groupBy from 'lodash/groupBy';
8
8
  import flatMap from 'lodash/flatMap';
9
+ import { KeyboardArrowDown, KeyboardArrowUp, ArrowDropDown, ArrowDropUp, } from '@mui/icons-material';
9
10
  import { Tooltip } from '../Tooltip';
10
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
11
- import { faCaretDown, faCaretUp, faChevronDown, faChevronUp, } from '@fortawesome/free-solid-svg-icons';
12
11
  /**
13
12
  * This component implements a Dropdown button using MUI (This can be removed as soon as MUI implements it. Check
14
13
  * progress: https://mui.com/material-ui/discover-more/roadmap/#new-components)
@@ -50,9 +49,9 @@ export const DropDownButton = (_a) => {
50
49
  };
51
50
  return (_jsxs(_Fragment, { children: [children ? (_jsx(Button, Object.assign({ "aria-controls": anchorEl ? 'dropdown' : undefined, "aria-expanded": anchorEl ? 'true' : undefined, onClick: (event) => {
52
51
  setAnchorEl(event.currentTarget);
53
- }, endIcon: anchorEl ? (_jsx(FontAwesomeIcon, { icon: faChevronUp })) : (_jsx(FontAwesomeIcon, { icon: faChevronDown })) }, buttonProps, { children: children }))) : (_jsxs(ButtonGroup, Object.assign({ variant: "contained", disableElevation: true }, buttonProps, { children: [_jsx(ButtonWithTracking, { onClick: handleClick, eventName: memoizedItems[selectedIndex].eventName, eventProperties: memoizedItems[selectedIndex].eventProperties, tooltip: memoizedItems[selectedIndex].tooltip, children: memoizedItems[selectedIndex].children }), _jsx(Button, { onClick: handleToggle,
52
+ }, endIcon: anchorEl ? _jsx(KeyboardArrowUp, {}) : _jsx(KeyboardArrowDown, {}) }, buttonProps, { children: children }))) : (_jsxs(ButtonGroup, Object.assign({ variant: "contained", disableElevation: true }, buttonProps, { children: [_jsx(ButtonWithTracking, { onClick: handleClick, eventName: memoizedItems[selectedIndex].eventName, eventProperties: memoizedItems[selectedIndex].eventProperties, tooltip: memoizedItems[selectedIndex].tooltip, children: memoizedItems[selectedIndex].children }), _jsx(Button, { onClick: handleToggle,
54
53
  // It doesn't look good without it, hence the addition.
55
- sx: (theme) => ({ pl: 2, pr: `calc(${theme.spacing(2)} + 2px)` }), children: anchorEl ? (_jsx(FontAwesomeIcon, { icon: faCaretUp })) : (_jsx(FontAwesomeIcon, { icon: faCaretDown })) })] }))), _jsx(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClose: () => {
54
+ sx: (theme) => ({ pl: 2, pr: `calc(${theme.spacing(2)} + 2px)` }), children: anchorEl ? _jsx(ArrowDropUp, {}) : _jsx(ArrowDropDown, {}) })] }))), _jsx(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClose: () => {
56
55
  setAnchorEl(null);
57
56
  }, children: memoizedItems.map((item, index) => (_jsx(MenuItemWithTracking, Object.assign({}, item, { onClick: (event) => {
58
57
  handleMenuItemClick(event, index);
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { FormControl, IconButton, InputAdornment, TextField, } from '@mui/material';
3
3
  import { Suspense, lazy, useState } from 'react';
4
- import { faEye, faEyeSlash } from '@fortawesome/free-solid-svg-icons';
5
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
+ import { Visibility, VisibilityOff } from '@mui/icons-material';
6
5
  const PasswordStrength = lazy(async () => {
7
6
  const importedModule = await import('../PasswordStrength');
8
7
  return {
@@ -28,6 +27,6 @@ export const PasswordWidget = ({ id, label, value, disabled, name, placeholder,
28
27
  setShowPassword((show) => !show);
29
28
  }, onMouseDown: (event) => {
30
29
  event.preventDefault();
31
- }, edge: "end", children: showPassword ? (_jsx(FontAwesomeIcon, { icon: faEyeSlash })) : (_jsx(FontAwesomeIcon, { icon: faEye })) }) })),
30
+ }, edge: "end", children: showPassword ? _jsx(VisibilityOff, {}) : _jsx(Visibility, {}) }) })),
32
31
  } }), options.showPasswordStrengthMeter && (_jsx(Suspense, { fallback: null, children: _jsx(PasswordStrength, { password: value }) }))] }));
33
32
  };
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Code } from '@mui/icons-material';
2
3
  import { Copy } from '../../../../Copy';
3
4
  import { JsonTypes, truncateHash, widgetFactory } from '../utils';
4
5
  export const HashWidget = widgetFactory('Hash', {}, [JsonTypes.string])(({ value, }) => {
5
- return _jsx(Copy, { copy: value, children: truncateHash(value) });
6
+ return (_jsx(Copy, { copy: value, children: _jsx(Code, { children: truncateHash(value) }) }));
6
7
  });
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import * as uuid from 'uuid';
4
3
  import find from 'lodash/find';
5
4
  import startsWith from 'lodash/startsWith';
6
5
  import isEmpty from 'lodash/isEmpty';
@@ -9,6 +8,7 @@ import { Callout } from '../Callout';
9
8
  import { useTranslation } from '../../hooks/useTranslations';
10
9
  import { stopKeyDownEvent, withPreventDefault, } from '../../utils/eventHandling';
11
10
  import { SimpleConfirmationDialog, } from '../SimpleConfirmationDialog';
11
+ import { useRandomUUID } from '../../hooks/useRandomUUID';
12
12
  const RESERVED_NAMESPACES = ['io.resin.', 'io.balena.'];
13
13
  const newTagValidationRules = (t, key, existingTags) => {
14
14
  return [
@@ -42,7 +42,8 @@ export const AddTagForm = ({ itemType, existingTags, overridableTags = [], addTa
42
42
  const [confirmationDialogOptions, setConfirmationDialogOptions] = React.useState();
43
43
  const tagKeyInput = React.useRef(null);
44
44
  const valueInput = React.useRef(null);
45
- const formUuid = `add-tag-form-${uuid.v1()}`;
45
+ const formId = useRandomUUID();
46
+ const formUuid = `add-tag-form-${formId}`;
46
47
  const checkNewTagValidity = (key) => {
47
48
  const failedRule = newTagValidationRules(t, key, existingTags).find((rule) => rule.test());
48
49
  const hasErrors = !!failedRule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/ui-shared-components",
3
- "version": "12.4.1-build-remove-unused-icon-abf38bf8f1d9d6827561fcd27fe2fe90534402d9-1",
3
+ "version": "12.4.1-build-upgrade-storybook-9-e3144c3663dd553c1ab03e825591993c6ffb3a41-1",
4
4
  "main": "./dist/index.js",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -17,6 +17,7 @@
17
17
  "@emotion/styled": "^11.10.6",
18
18
  "@fortawesome/free-solid-svg-icons": "^6.5.1",
19
19
  "@fortawesome/react-fontawesome": "^0.2.0",
20
+ "@mui/icons-material": "^6.3.1",
20
21
  "@mui/lab": "6.0.0-beta.24",
21
22
  "@mui/material": "^6.3.1",
22
23
  "@mui/styled-engine-sc": "^6.3.1",
@@ -38,6 +39,7 @@
38
39
  "jest": "^29.7.0",
39
40
  "lodash": "^4.17.21",
40
41
  "notistack": "^3.0.1",
42
+ "qs": "^6.14.0",
41
43
  "react": "^18.2.0",
42
44
  "react-dom": "^18.2.0",
43
45
  "react-dropzone": "^14.2.3",
@@ -54,17 +56,11 @@
54
56
  },
55
57
  "devDependencies": {
56
58
  "@balena/lint": "^9.3.0",
57
- "@storybook/addon-essentials": "^8.6.12",
58
- "@storybook/addon-interactions": "^8.6.12",
59
- "@storybook/addon-links": "^8.6.12",
60
- "@storybook/addon-onboarding": "^8.6.12",
59
+ "@storybook/addon-docs": "^9.0.0",
60
+ "@storybook/addon-links": "^9.0.0",
61
+ "@storybook/addon-onboarding": "^9.0.0",
61
62
  "@storybook/addon-webpack5-compiler-swc": "^3.0.0",
62
- "@storybook/blocks": "^8.6.12",
63
- "@storybook/manager-api": "^8.6.12",
64
- "@storybook/react": "^8.6.12",
65
- "@storybook/react-webpack5": "^8.6.12",
66
- "@storybook/test": "^8.6.12",
67
- "@storybook/theming": "^8.6.12",
63
+ "@storybook/react-webpack5": "^9.0.0",
68
64
  "@types/color": "^4.2.0",
69
65
  "@types/color-hash": "^2.0.0",
70
66
  "@types/lodash": "^4.17.14",
@@ -74,11 +70,11 @@
74
70
  "@types/react-dom": "^18.0.11",
75
71
  "@types/react-helmet": "^6.1.6",
76
72
  "@types/zxcvbn": "^4.4.4",
77
- "eslint-plugin-storybook": "^0.12.0",
73
+ "eslint-plugin-storybook": "^9.0.0",
78
74
  "husky": "^9.0.0",
79
75
  "lint-staged": "^15.0.0",
80
76
  "prop-types": "^15.8.1",
81
- "storybook": "^8.6.12",
77
+ "storybook": "^9.0.0",
82
78
  "ts-loader": "^9.5.1",
83
79
  "webpack": "^5.88.2"
84
80
  },
@@ -137,6 +133,9 @@
137
133
  },
138
134
  "homepage": "https://github.com/balena-io/ui-shared-components#readme",
139
135
  "versionist": {
140
- "publishedAt": "2025-05-29T14:45:04.810Z"
136
+ "publishedAt": "2025-05-29T14:49:18.486Z"
137
+ },
138
+ "overrides": {
139
+ "storybook": "$storybook"
141
140
  }
142
141
  }