@learningpool/ui 1.15.5 → 1.16.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.
Files changed (84) hide show
  1. package/assets/Images.js +7 -18
  2. package/components/atoms/Autocomplete/Autocomplete.js +3 -14
  3. package/components/atoms/Button/Button.js +2 -13
  4. package/components/atoms/Checkbox/Checkbox.js +3 -26
  5. package/components/atoms/IconButton/IconButton.js +2 -13
  6. package/components/atoms/Radio/Radio.js +3 -26
  7. package/components/atoms/Select/Select.js +3 -26
  8. package/components/atoms/Slider/Slider.js +3 -26
  9. package/components/atoms/Switch/Switch.js +3 -26
  10. package/components/atoms/TextField/TextField.js +2 -13
  11. package/components/atoms/ToggleButton/ToggleButton.js +3 -26
  12. package/components/datadisplay/Avatar/Avatar.js +13 -28
  13. package/components/datadisplay/Chip/Chip.js +3 -26
  14. package/components/datadisplay/List/List.js +2 -13
  15. package/components/feedback/Alert/Alert.js +3 -26
  16. package/components/landmarks/Header/Header.js +15 -41
  17. package/components/landmarks/Header/HeaderActionButtons.d.ts +1 -2
  18. package/components/landmarks/Header/HeaderActionButtons.js +22 -33
  19. package/components/landmarks/Header/HeaderStyles.js +54 -11
  20. package/components/navigation/Drawer/Drawer.js +5 -31
  21. package/components/navigation/MobileNavigation/MobileNavigation.js +70 -82
  22. package/components/navigation/MobileNavigation/MobileNavigationAvatar.js +75 -83
  23. package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +102 -52
  24. package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +71 -13
  25. package/components/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +1 -1
  26. package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +41 -68
  27. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +34 -18
  28. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +133 -20
  29. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +22 -45
  30. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +8 -19
  31. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +151 -52
  32. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +171 -50
  33. package/components/navigation/MobileNavigation/MobileNavigationMotion.js +11 -11
  34. package/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +11 -15
  35. package/components/navigation/MobileNavigation/MobileNavigationSearch.d.ts +1 -2
  36. package/components/navigation/MobileNavigation/MobileNavigationSearch.js +25 -34
  37. package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +34 -18
  38. package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.js +47 -9
  39. package/components/navigation/MobileNavigation/MobileNavigationStyles.js +262 -66
  40. package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +21 -20
  41. package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +21 -20
  42. package/components/navigation/VerticalNavigation/VerticalNavigation.js +150 -185
  43. package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +50 -61
  44. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +102 -52
  45. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +86 -14
  46. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +27 -51
  47. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +15 -28
  48. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +135 -39
  49. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +167 -29
  50. package/components/navigation/VerticalNavigation/VerticalNavigationMotion.js +11 -11
  51. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +34 -18
  52. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +236 -42
  53. package/components/navigation/helpers.d.ts +1 -2
  54. package/components/navigation/helpers.js +28 -32
  55. package/components/pages/ErrorPage/ErrorPage.js +6 -17
  56. package/components/pages/ErrorPage/ErrorPageStyles.js +13 -18
  57. package/components/pages/SideInSide/SideInSide.js +12 -23
  58. package/components/pages/SideInSide/SideInSideStyles.js +6 -6
  59. package/components/stream/AppHub/AppHub.js +13 -42
  60. package/components/stream/AppHub/AppHubAdvertStyles.js +24 -8
  61. package/components/stream/AppHub/AppHubBannerAdvert.d.ts +1 -2
  62. package/components/stream/AppHub/AppHubBannerAdvert.js +9 -20
  63. package/components/stream/AppHub/AppHubCustom.js +8 -19
  64. package/components/stream/AppHub/AppHubCustomStyles.d.ts +1 -1
  65. package/components/stream/AppHub/AppHubCustomStyles.js +78 -18
  66. package/components/stream/AppHub/AppHubProduct.js +26 -48
  67. package/components/stream/AppHub/AppHubProductStyles.js +104 -19
  68. package/components/stream/AppHub/AppHubStyles.js +31 -11
  69. package/components/stream/AppHub/constants.d.ts +1 -2
  70. package/components/stream/AppHub/constants.js +14 -14
  71. package/components/stream/AppSwitcher/AppSwitcher.js +225 -316
  72. package/components/stream/AppSwitcher/AppSwitcherItem.js +11 -22
  73. package/components/stream/AppSwitcher/AppSwitcherStyles.js +337 -42
  74. package/components/stream/AppSwitcher/AppSwitcherStylesStandalone.js +255 -21
  75. package/components/stream/AppSwitcher/PromotionalCampaignItem.js +7 -19
  76. package/components/stream/AppSwitcher/constants.js +3 -3
  77. package/lang/en-us.js +1 -1
  78. package/package.json +7 -2
  79. package/utils/constants.d.ts +7 -0
  80. package/utils/constants.js +11 -4
  81. package/utils/dataAttributes.js +1 -1
  82. package/utils/helpers.js +33 -40
  83. package/utils/hooks.js +10 -11
  84. package/utils/theme.js +26 -19
@@ -1,26 +1,4 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
24
2
  import { defaultMessages } from '../../../lang/en-us';
25
3
  import AppHubItem from './AppHubProduct';
26
4
  import AppHubCustom from './AppHubCustom';
@@ -28,12 +6,11 @@ import { AppHubPanel, AppHubTitle, AppHubHeader, AppHubRow } from './AppHubStyle
28
6
  import Grid from '@mui/material/Unstable_Grid2';
29
7
  import { Constants } from './constants';
30
8
  import { renderBannerAdvertRow } from './AppHubBannerAdvert';
31
- var AppHub = function (props) {
32
- var isPageLayout = props.isPageLayout, localization = props.localization, customLinkBgColor = props.customLinkBgColor, data = props.data;
33
- var messages = __assign(__assign({}, defaultMessages), localization);
34
- var renderRow = function (rowData, rowIndex) {
35
- var _a, _b;
36
- var type = rowData.type, items = rowData.items, title = rowData.title, addButton = rowData.addButton;
9
+ const AppHub = (props) => {
10
+ const { isPageLayout, localization, customLinkBgColor, data } = props;
11
+ const messages = { ...defaultMessages, ...localization };
12
+ const renderRow = (rowData, rowIndex) => {
13
+ const { type, items, title, addButton } = rowData;
37
14
  switch (type) {
38
15
  case Constants.DataRowType.BannerAdvert: {
39
16
  return (renderBannerAdvertRow(rowData, rowIndex));
@@ -41,22 +18,16 @@ var AppHub = function (props) {
41
18
  case Constants.DataRowType.Product: {
42
19
  return (_jsxs(AppHubRow, { children: [title && _jsx(AppHubHeader
43
20
  // @ts-ignore
44
- , __assign({
21
+ , {
45
22
  // @ts-ignore
46
- component: isPageLayout ? 'h2' : 'div' }, { children: title })), _jsx(Grid, __assign({ container: true, spacing: { xs: 2, md: 3 }, rowSpacing: { xs: 3, md: 4 }, columns: { xs: 12 } }, { children: items.map(function (_a, index) {
47
- var subtitle = _a.subtitle, shortName = _a.shortName, internalName = _a.internalName, url = _a.url, children = _a.children, rest = __rest(_a, ["subtitle", "shortName", "internalName", "url", "children"]);
48
- return (_jsxs(Grid, __assign({ xs: 12, sm: 6, md: 4 }, { children: [url && (_jsx(AppHubItem, __assign({ internalName: internalName, shortName: shortName, subtitle: subtitle, url: url }, rest))), children && (_jsx(AppHubItem, { internalName: internalName, shortName: shortName, subtitle: subtitle, options: children }))] }), "".concat(shortName, "_").concat(rowIndex, "_").concat(index)));
49
- }) }))] }, "row_".concat(rowIndex)));
23
+ component: isPageLayout ? 'h2' : 'div', children: title }), _jsx(Grid, { container: true, spacing: { xs: 2, md: 3 }, rowSpacing: { xs: 3, md: 4 }, columns: { xs: 12 }, children: items.map(({ subtitle, shortName, internalName, url, children, ...rest }, index) => (_jsxs(Grid, { xs: 12, sm: 6, md: 4, children: [url && (_jsx(AppHubItem, { internalName: internalName, shortName: shortName, subtitle: subtitle, url: url, ...rest })), children && (_jsx(AppHubItem, { internalName: internalName, shortName: shortName, subtitle: subtitle, options: children }))] }, `${shortName}_${rowIndex}_${index}`))) })] }, `row_${rowIndex}`));
50
24
  }
51
25
  case Constants.DataRowType.CustomLink: {
52
26
  return (_jsxs(AppHubRow, { children: [title && _jsx(AppHubHeader
53
27
  // @ts-ignore
54
- , __assign({
28
+ , {
55
29
  // @ts-ignore
56
- component: isPageLayout ? 'h2' : 'div' }, { children: title })), _jsxs(Grid, __assign({ container: true, spacing: { xs: 2, md: 3 } }, { children: [addButton && addButton.order === Constants.AddButtonOrder.Start && (_jsx(Grid, __assign({ xs: 6, sm: 4, md: 2 }, { children: _jsx(AppHubCustom, { isAddButton: true, name: (_a = addButton.title) !== null && _a !== void 0 ? _a : messages['add-item'], customLinkBgColor: customLinkBgColor, url: addButton.url, icon: addButton.icon }) }))), items.map(function (_a, index) {
57
- var name = _a.name, url = _a.url, icon = _a.icon;
58
- return (_jsx(Grid, __assign({ xs: 6, sm: 4, md: 2 }, { children: url && (_jsx(AppHubCustom, { name: name, customLinkBgColor: customLinkBgColor, url: url, icon: icon })) }), "".concat(name, "_").concat(rowIndex, "_").concat(index)));
59
- }), addButton && addButton.order === Constants.AddButtonOrder.End && (_jsx(Grid, __assign({ xs: 6, sm: 4, md: 2 }, { children: _jsx(AppHubCustom, { isAddButton: true, name: (_b = addButton.title) !== null && _b !== void 0 ? _b : messages['add-item'], customLinkBgColor: customLinkBgColor, url: addButton.url, icon: addButton.icon }) })))] }))] }, "row_".concat(rowIndex)));
30
+ component: isPageLayout ? 'h2' : 'div', children: title }), _jsxs(Grid, { container: true, spacing: { xs: 2, md: 3 }, children: [addButton && addButton.order === Constants.AddButtonOrder.Start && (_jsx(Grid, { xs: 6, sm: 4, md: 2, children: _jsx(AppHubCustom, { isAddButton: true, name: addButton.title ?? messages['add-item'], customLinkBgColor: customLinkBgColor, url: addButton.url, icon: addButton.icon }) })), items.map(({ name, url, icon }, index) => (_jsx(Grid, { xs: 6, sm: 4, md: 2, children: url && (_jsx(AppHubCustom, { name: name, customLinkBgColor: customLinkBgColor, url: url, icon: icon })) }, `${name}_${rowIndex}_${index}`))), addButton && addButton.order === Constants.AddButtonOrder.End && (_jsx(Grid, { xs: 6, sm: 4, md: 2, children: _jsx(AppHubCustom, { isAddButton: true, name: addButton.title ?? messages['add-item'], customLinkBgColor: customLinkBgColor, url: addButton.url, icon: addButton.icon }) }))] })] }, `row_${rowIndex}`));
60
31
  }
61
32
  default: {
62
33
  console.log('no items');
@@ -68,10 +39,10 @@ var AppHub = function (props) {
68
39
  console.log('No data available');
69
40
  return null;
70
41
  }
71
- return (_jsxs(AppHubPanel, __assign({ role: isPageLayout ? 'main' : '' }, { children: [_jsx(AppHubTitle
42
+ return (_jsxs(AppHubPanel, { role: isPageLayout ? 'main' : '', children: [_jsx(AppHubTitle
72
43
  // @ts-ignore
73
- , __assign({
44
+ , {
74
45
  // @ts-ignore
75
- component: isPageLayout ? 'h1' : 'div' }, { children: messages['stream-hub-welcome'] })), data && data.map(function (row, rowIndex) { return renderRow(row, rowIndex); })] })));
46
+ component: isPageLayout ? 'h1' : 'div', children: messages['stream-hub-welcome'] }), data && data.map((row, rowIndex) => renderRow(row, rowIndex))] }));
76
47
  };
77
48
  export default AppHub;
@@ -1,10 +1,26 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { styled } from '@mui/material/styles';
6
2
  import { Paper } from '@mui/material';
7
- export var StyledAdvertPaper = styled(Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n height: 138px;\n overflow: hidden;\n position: relative;\n box-shadow: 0 0 0 1px #ddd;\n border-radius: 10px;\n border: #ddd;\n transition: all 180ms ease;\n"], ["\n width: 100%;\n height: 138px;\n overflow: hidden;\n position: relative;\n box-shadow: 0 0 0 1px #ddd;\n border-radius: 10px;\n border: #ddd;\n transition: all 180ms ease;\n"])));
8
- export var StyledAdvertLink = styled('a')(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: block;\n width: 100%;\n height: 100%;\n"], ["\n display: block;\n width: 100%;\n height: 100%;\n"])));
9
- export var StyledAdvertImage = styled('img')(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n object-fit: cover;\n"], ["\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n object-fit: cover;\n"])));
10
- var templateObject_1, templateObject_2, templateObject_3;
3
+ export const StyledAdvertPaper = styled(Paper) `
4
+ width: 100%;
5
+ height: 138px;
6
+ overflow: hidden;
7
+ position: relative;
8
+ box-shadow: 0 0 0 1px #ddd;
9
+ border-radius: 10px;
10
+ border: #ddd;
11
+ transition: all 180ms ease;
12
+ `;
13
+ export const StyledAdvertLink = styled('a') `
14
+ display: block;
15
+ width: 100%;
16
+ height: 100%;
17
+ `;
18
+ export const StyledAdvertImage = styled('img') `
19
+ position: absolute;
20
+ top: 50%;
21
+ left: 50%;
22
+ transform: translate(-50%, -50%);
23
+ width: 100%;
24
+ height: 100%;
25
+ object-fit: cover;
26
+ `;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { IApplicationHubRowProps } from '../../../types/components/stream/AppHub';
3
- export declare const renderBannerAdvertRow: (rowData: IApplicationHubRowProps, rowIndex: number) => JSX.Element | null;
2
+ export declare const renderBannerAdvertRow: (rowData: IApplicationHubRowProps, rowIndex: number) => import("@emotion/react/jsx-runtime").JSX.Element | null;
@@ -1,23 +1,12 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
13
2
  import { useState } from 'react';
14
3
  import { AppHubRow } from './AppHubStyles';
15
4
  import Grid from '@mui/material/Unstable_Grid2';
16
5
  import { StyledAdvertPaper, StyledAdvertLink, StyledAdvertImage } from './AppHubAdvertStyles';
17
6
  import { defaultMessages } from '../../../lang/en-us';
18
- var addUtmParams = function (baseUrl, source, medium, campaign) {
7
+ const addUtmParams = (baseUrl, source, medium, campaign) => {
19
8
  try {
20
- var url = new URL(baseUrl);
9
+ const url = new URL(baseUrl);
21
10
  url.searchParams.append('utm_source', source);
22
11
  url.searchParams.append('utm_medium', medium);
23
12
  url.searchParams.append('utm_campaign', campaign);
@@ -28,14 +17,14 @@ var addUtmParams = function (baseUrl, source, medium, campaign) {
28
17
  return baseUrl;
29
18
  }
30
19
  };
31
- export var renderBannerAdvertRow = function (rowData, rowIndex) {
32
- var items = rowData.items;
33
- var _a = useState(true), hasValidImage = _a[0], setHasValidImage = _a[1];
34
- var handleImageError = function () {
20
+ export const renderBannerAdvertRow = (rowData, rowIndex) => {
21
+ const { items } = rowData;
22
+ const [hasValidImage, setHasValidImage] = useState(true);
23
+ const handleImageError = () => {
35
24
  setHasValidImage(false);
36
25
  };
37
- var validItems = items.filter(function (item) { return item.hubImageUrl && item.basePromoUrl; });
26
+ const validItems = items.filter((item) => item.hubImageUrl && item.basePromoUrl);
38
27
  if (!hasValidImage || validItems.length === 0)
39
28
  return null;
40
- return (_jsx(AppHubRow, { children: _jsx(Grid, __assign({ container: true, spacing: 2 }, { children: validItems.map(function (item, index) { return (_jsx(Grid, __assign({ xs: 12 }, { children: _jsx(StyledAdvertPaper, __assign({ elevation: 0 }, { children: _jsx(StyledAdvertLink, __assign({ href: addUtmParams(item.basePromoUrl, 'hub', 'hub_dashboard_banner_advert', item.name), target: "_blank" }, { children: _jsx(StyledAdvertImage, { src: item.hubImageUrl, alt: item.altText || defaultMessages['banner-image-alt-text'], onError: handleImageError }) })) })) }), index)); }) })) }, "row_".concat(rowIndex)));
29
+ return (_jsx(AppHubRow, { children: _jsx(Grid, { container: true, spacing: 2, children: validItems.map((item, index) => (_jsx(Grid, { xs: 12, children: _jsx(StyledAdvertPaper, { elevation: 0, children: _jsx(StyledAdvertLink, { href: addUtmParams(item.basePromoUrl, 'hub', 'hub_dashboard_banner_advert', item.name), target: "_blank", children: _jsx(StyledAdvertImage, { src: item.hubImageUrl, alt: item.altText || defaultMessages['banner-image-alt-text'], onError: handleImageError }) }) }) }, index))) }) }, `row_${rowIndex}`));
41
30
  };
@@ -1,31 +1,20 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
13
2
  import { StyledPaper, StyledBoxWrap, StyledTypography, StyledAvatar, StyledLink, StyledAddCircleOutlineIcon } from './AppHubCustomStyles';
14
3
  import { handleAvatarInitials } from '../../../utils/helpers';
15
4
  // Bug in the naming of the icons on the CDN
16
- export var LogoVariants = {
5
+ export const LogoVariants = {
17
6
  Default: 'icon',
18
7
  Solid: 'icon-solid',
19
8
  Outlined: 'icon-outlined',
20
9
  White: 'icon-white'
21
10
  };
22
- var AppHubCustom = function (props) {
23
- var name = props.name, url = props.url, isAddButton = props.isAddButton, customLinkBgColor = props.customLinkBgColor, icon = props.icon;
24
- var addIcon = icon !== null && icon !== void 0 ? icon : _jsx(StyledAddCircleOutlineIcon, {});
25
- return (_jsx(StyledPaper, __assign({ elevation: 0 }, { children: _jsx(StyledLink, __assign({ href: url, target: !isAddButton ? '_blank' : '_self', underline: 'none' }, { children: _jsxs(StyledBoxWrap, { children: [!isAddButton && (_jsx(StyledAvatar, { children: icon !== null && icon !== void 0 ? icon : (name ? handleAvatarInitials(name) : null), customLinkBgColor: customLinkBgColor })), isAddButton && addIcon, _jsx(StyledTypography
11
+ const AppHubCustom = (props) => {
12
+ const { name, url, isAddButton, customLinkBgColor, icon } = props;
13
+ const addIcon = icon ?? _jsx(StyledAddCircleOutlineIcon, {});
14
+ return (_jsx(StyledPaper, { elevation: 0, children: _jsx(StyledLink, { href: url, target: !isAddButton ? '_blank' : '_self', underline: 'none', children: _jsxs(StyledBoxWrap, { children: [!isAddButton && (_jsx(StyledAvatar, { children: icon ?? (name ? handleAvatarInitials(name) : null), customLinkBgColor: customLinkBgColor })), isAddButton && addIcon, _jsx(StyledTypography
26
15
  // @ts-ignore
27
- , __assign({
16
+ , {
28
17
  // @ts-ignore
29
- component: 'div' }, { children: name }))] }) })) })));
18
+ component: 'div', children: name })] }) }) }));
30
19
  };
31
20
  export default AppHubCustom;
@@ -20,7 +20,7 @@ export declare const StyledBoxWrap: import("@emotion/styled").StyledComponent<im
20
20
  export declare const StyledLink: import("@emotion/styled").StyledComponent<Omit<import("@mui/material/Link").LinkBaseProps, "classes"> & {
21
21
  children?: import("react").ReactNode;
22
22
  classes?: Partial<import("@mui/material/Link").LinkClasses> | undefined;
23
- color?: import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined> | ((theme: import("@mui/material/styles").Theme) => import("@mui/system/styleFunctionSx").ResponsiveStyleValue<string[] | import("csstype").Property.Color | undefined>);
23
+ color?: import("@mui/system/styleFunctionSx").ResponsiveStyleValue<readonly string[] | import("csstype").Property.Color | undefined> | ((theme: import("@mui/material/styles").Theme) => import("@mui/system/styleFunctionSx").ResponsiveStyleValue<readonly string[] | import("csstype").Property.Color | undefined>);
24
24
  sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
25
25
  TypographyClasses?: (Partial<import("@mui/material/Typography").TypographyClasses> & Partial<import("@mui/material/styles").ClassNameMap<never>>) | undefined;
26
26
  underline?: "none" | "always" | "hover" | undefined;
@@ -1,7 +1,3 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { styled } from '@mui/material/styles';
6
2
  import Paper from '@mui/material/Paper';
7
3
  import Box from '@mui/material/Box';
@@ -9,22 +5,86 @@ import Avatar from '@mui/material/Avatar';
9
5
  import Typography from '@mui/material/Typography';
10
6
  import Link from '@mui/material/Link';
11
7
  import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline';
12
- export var StyledPaper = styled(Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: pointer;\n width: 100%;\n height: 100%;\n background: transparent;\n border-radius: 10px;\n border: none;\n transition: all 180ms ease;\n\n &:hover {\n background: ", ";\n box-shadow: 0 0 0 1px ", "\n }\n\n &:focus-within {\n background: ", ";\n box-shadow: none;\n }\n"], ["\n cursor: pointer;\n width: 100%;\n height: 100%;\n background: transparent;\n border-radius: 10px;\n border: none;\n transition: all 180ms ease;\n\n &:hover {\n background: ", ";\n box-shadow: 0 0 0 1px ", "\n }\n\n &:focus-within {\n background: ", ";\n box-shadow: none;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
8
+ export const StyledPaper = styled(Paper) `
9
+ cursor: pointer;
10
+ width: 100%;
11
+ height: 100%;
12
+ background: transparent;
13
+ border-radius: 10px;
14
+ border: none;
15
+ transition: all 180ms ease;
16
+
17
+ &:hover {
18
+ background: ${props => props.theme.palette.mode === 'dark'
13
19
  ? 'rgba(0,0,0,.3)'
14
- : '#f5f5f5'; }, function (props) { return props.theme.palette.mode === 'dark'
20
+ : '#f5f5f5'};
21
+ box-shadow: 0 0 0 1px ${props => props.theme.palette.mode === 'dark'
15
22
  ? 'rgba(255,255,255,.2)'
16
- : '#ccc'; }, function (props) { return props.theme.palette.mode === 'dark'
23
+ : '#ccc'}
24
+ }
25
+
26
+ &:focus-within {
27
+ background: ${props => props.theme.palette.mode === 'dark'
17
28
  ? 'rgba(0,0,0,.3)'
18
- : '#f5f5f5'; });
19
- export var StyledBoxWrap = styled(Box)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: .5rem;\n text-align: center;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: .5rem;\n text-align: center;\n"])));
20
- export var StyledLink = styled(Link)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 100%;\n display: block;\n border-radius: 10px;\n box-shadow: 0 0 0 0 transparent;\n transition: all 180ms ease;\n\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 4px ", ";\n }\n"], ["\n height: 100%;\n display: block;\n border-radius: 10px;\n box-shadow: 0 0 0 0 transparent;\n transition: all 180ms ease;\n\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 4px ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
29
+ : '#f5f5f5'};
30
+ box-shadow: none;
31
+ }
32
+ `;
33
+ export const StyledBoxWrap = styled(Box) `
34
+ display: flex;
35
+ flex-direction: column;
36
+ align-items: center;
37
+ justify-content: center;
38
+ padding: .5rem;
39
+ text-align: center;
40
+ `;
41
+ export const StyledLink = styled(Link) `
42
+ height: 100%;
43
+ display: block;
44
+ border-radius: 10px;
45
+ box-shadow: 0 0 0 0 transparent;
46
+ transition: all 180ms ease;
47
+
48
+ &:focus-visible {
49
+ outline: none;
50
+ box-shadow: 0 0 0 4px ${props => props.theme.palette.mode === 'dark'
21
51
  ? 'rgba(255,255,255,.5)'
22
- : props.theme.palette.primary.main; });
23
- export var StyledAvatar = styled(Avatar, {
24
- shouldForwardProp: function (prop) { return prop !== 'customLinkBgColor'; }
25
- })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 85px;\n height: 85px;\n font-size: 2rem;\n font-weight: 700;\n background: ", ";\n color: ", ";\n\n .MuiSvgIcon-root {\n height: 2.5rem;\n width: 2.5rem;\n }\n"], ["\n width: 85px;\n height: 85px;\n font-size: 2rem;\n font-weight: 700;\n background: ", ";\n color: ", ";\n\n .MuiSvgIcon-root {\n height: 2.5rem;\n width: 2.5rem;\n }\n"])), function (props) { return props.customLinkBgColor || props.theme.palette.primary.dark; }, function (props) { return props.customLinkBgColor
52
+ : props.theme.palette.primary.main};
53
+ }
54
+ `;
55
+ export const StyledAvatar = styled(Avatar, {
56
+ shouldForwardProp: (prop) => prop !== 'customLinkBgColor'
57
+ }) `
58
+ width: 85px;
59
+ height: 85px;
60
+ font-size: 2rem;
61
+ font-weight: 700;
62
+ background: ${props => props.customLinkBgColor || props.theme.palette.primary.dark};
63
+ color: ${props => props.customLinkBgColor
26
64
  ? props.theme.palette.getContrastText(props.customLinkBgColor)
27
- : props.theme.palette.getContrastText(props.theme.palette.primary.dark); });
28
- export var StyledAddCircleOutlineIcon = styled(AddCircleOutlineIcon)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 85px;\n height: auto;\n color: #aaa;\n"], ["\n width: 85px;\n height: auto;\n color: #aaa;\n"])));
29
- export var StyledTypography = styled(Typography)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n font-size: 1rem;\n font-weight: 500;\n line-height: 1.3;\n margin-top: .5rem;\n\n /* Truncate text to 2 lines */\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n"], ["\n color: ", ";\n font-size: 1rem;\n font-weight: 500;\n line-height: 1.3;\n margin-top: .5rem;\n\n /* Truncate text to 2 lines */\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n"])), function (props) { return props.theme.palette.text.primary; });
30
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
65
+ : props.theme.palette.getContrastText(props.theme.palette.primary.dark)};
66
+
67
+ .MuiSvgIcon-root {
68
+ height: 2.5rem;
69
+ width: 2.5rem;
70
+ }
71
+ `;
72
+ export const StyledAddCircleOutlineIcon = styled(AddCircleOutlineIcon) `
73
+ width: 85px;
74
+ height: auto;
75
+ color: #aaa;
76
+ `;
77
+ export const StyledTypography = styled(Typography) `
78
+ color: ${props => props.theme.palette.text.primary};
79
+ font-size: 1rem;
80
+ font-weight: 500;
81
+ line-height: 1.3;
82
+ margin-top: .5rem;
83
+
84
+ /* Truncate text to 2 lines */
85
+ overflow: hidden;
86
+ text-overflow: ellipsis;
87
+ display: -webkit-box;
88
+ -webkit-line-clamp: 2;
89
+ -webkit-box-orient: vertical;
90
+ `;
@@ -1,26 +1,4 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
24
2
  import { ListItemButton, Link, TextField, Tooltip } from '../../../index';
25
3
  import LaunchIcon from '@mui/icons-material/Launch';
26
4
  import { visuallyHidden } from '@mui/utils';
@@ -29,7 +7,7 @@ import { defaultMessages } from '../../../lang/en-us';
29
7
  import { StyledPaper, StyledBoxWrap, StyledBoxText, StyledAutocomplete, StyledTypography, StyledTypographySubtitle, StyledButton } from './AppHubProductStyles';
30
8
  import { useTheme } from '@mui/material';
31
9
  // Bug in the naming of the icons on the CDN
32
- export var LogoVariants = {
10
+ export const LogoVariants = {
33
11
  Default: 'icon',
34
12
  Solid: 'icon-solid',
35
13
  Outlined: 'icon-outlined',
@@ -40,42 +18,42 @@ export var LogoVariants = {
40
18
  * @param internalName {string | null | undefined } - Internal name of the application.
41
19
  * @returns {ReactElement | null } SVG containing the application logo retrieved from the CDN.
42
20
  */
43
- var renderApplicationLogo = function (internalName, logoVariant) {
21
+ const renderApplicationLogo = (internalName, logoVariant) => {
44
22
  if (!internalName) {
45
23
  return _jsx(_Fragment, {});
46
24
  }
47
- var urlToIcon = "".concat(Constants.AssetsUrl).concat(internalName, "/logo/latest/").concat(logoVariant !== null && logoVariant !== void 0 ? logoVariant : LogoVariants.Default, ".svg");
48
- return (_jsx("img", { src: urlToIcon, width: "90", height: "90", alt: internalName !== null && internalName !== void 0 ? internalName : '' }));
25
+ const urlToIcon = `${Constants.AssetsUrl}${internalName}/logo/latest/${logoVariant ?? LogoVariants.Default}.svg`;
26
+ return (_jsx("img", { src: urlToIcon, width: "90", height: "90", alt: internalName ?? '' }));
49
27
  };
50
- var AppHubItem = function (props) {
51
- var internalName = props.internalName, shortName = props.shortName, customName = props.customName, url = props.url, subtitle = props.subtitle, localization = props.localization, options = props.options, rest = __rest(props, ["internalName", "shortName", "customName", "url", "subtitle", "localization", "options"]);
52
- var initialOptions = __assign({}, options);
53
- var solidLogo = renderApplicationLogo(internalName, LogoVariants.Solid);
54
- var messages = __assign(__assign({}, defaultMessages), localization);
55
- return (_jsx(StyledPaper, __assign({ elevation: 0 }, { children: _jsxs(StyledBoxWrap, { children: [solidLogo, _jsxs(StyledBoxText, { children: [subtitle && (_jsx(StyledTypographySubtitle
28
+ const AppHubItem = (props) => {
29
+ const { internalName, shortName, customName, url, subtitle, localization, options, ...rest } = props;
30
+ const initialOptions = { ...options };
31
+ const solidLogo = renderApplicationLogo(internalName, LogoVariants.Solid);
32
+ const messages = { ...defaultMessages, ...localization };
33
+ return (_jsx(StyledPaper, { elevation: 0, children: _jsxs(StyledBoxWrap, { children: [solidLogo, _jsxs(StyledBoxText, { children: [subtitle && (_jsx(StyledTypographySubtitle
56
34
  // @ts-ignore
57
- , __assign({
35
+ , {
58
36
  // @ts-ignore
59
- component: 'div' }, { children: subtitle }))), _jsx(Tooltip, __assign({ placement: 'top', title: customName !== null && customName !== void 0 ? customName : shortName }, { children: _jsx(StyledTypography
37
+ component: 'div', children: subtitle })), _jsx(Tooltip, { placement: 'top', title: customName ?? shortName, children: _jsx(StyledTypography
60
38
  // @ts-ignore
61
- , __assign({
39
+ , {
62
40
  // @ts-ignore
63
- component: 'div', className: 'appHubCardTitle' }, { children: customName !== null && customName !== void 0 ? customName : shortName })) })), url && (_jsxs(StyledButton, __assign({ href: url,
64
- // @ts-expect-error
65
- component: Link, target: '_blank', variant: 'outlined' }, rest, { children: [messages.open, _jsxs("span", __assign({ style: visuallyHidden }, { children: [", ", messages['open-in-new-window']] }))] }))), options && options.length > 0 && (_jsx(StyledAutocomplete, { disablePortal: true, size: 'small', options: options.map(function (option) { return option.applicationName; }),
41
+ component: 'div', className: 'appHubCardTitle', children: customName ?? shortName }) }), url && (_jsxs(StyledButton, { href: url,
42
+ // @ts-ignore
43
+ component: Link,
44
+ // @ts-ignore
45
+ target: '_blank', variant: 'outlined', ...rest, children: [messages.open, _jsxs("span", { style: visuallyHidden, children: [", ", messages['open-in-new-window']] })] })), options && options.length > 0 && (_jsx(StyledAutocomplete, { disablePortal: true, size: 'small', options: options.map((option) => option.applicationName),
66
46
  // TODO: Add link, icon and screen reader text here:
67
- renderOption: function (option) {
47
+ renderOption: (option) => {
68
48
  // Autocomplete only uses applicationName and we need more properties
69
49
  // Careful of this if we do any sorting or grouping in future
70
- // @ts-expect-error
71
- var index = option['data-option-index'];
72
- var optionItem = initialOptions[index];
73
- var handleClick = function (event) {
50
+ // @ts-ignore
51
+ const index = option['data-option-index'];
52
+ const optionItem = initialOptions[index];
53
+ const handleClick = (event) => {
74
54
  optionItem.onClick && optionItem.onClick(event);
75
55
  };
76
- return (_jsxs(ListItemButton, __assign({ onClick: function (event) { return handleClick(event); } }, { children: [option.key, _jsx(LaunchIcon, { sx: { marginInlineStart: '1rem', transform: useTheme().direction === 'rtl' ? 'scaleX(-1)' : 'none' } }), _jsxs("span", __assign({ style: visuallyHidden }, { children: [", ", messages['open-in-new-window']] }))] }), "".concat(option.key, "_").concat(option.id)));
77
- }, renderInput: function (params) {
78
- return _jsx(TextField, __assign({}, params, { placeholder: messages['select-org'] }));
79
- } }))] })] }) })));
56
+ return (_jsxs(ListItemButton, { onClick: event => handleClick(event), children: [option.key, _jsx(LaunchIcon, { sx: { marginInlineStart: '1rem', transform: useTheme().direction === 'rtl' ? 'scaleX(-1)' : 'none' } }), _jsxs("span", { style: visuallyHidden, children: [", ", messages['open-in-new-window']] })] }, `${option.key}_${option.id}`));
57
+ }, renderInput: (params) => _jsx(TextField, { ...params, placeholder: messages['select-org'] }) }))] })] }) }));
80
58
  };
81
59
  export default AppHubItem;
@@ -1,28 +1,113 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
1
  import { styled } from '@mui/material/styles';
6
2
  import { Paper, Box, Typography, Autocomplete, Button } from '../../../index';
7
- export var StyledPaper = styled(Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n background: transparent;\n box-shadow: 0 0 0 1px ", ";\n border-radius: 10px;\n border: none;\n transition: all 180ms ease;\n\n &:hover,\n &:focus-within {\n background: ", ";\n box-shadow: 0 0 0 1px ", "\n }\n"], ["\n width: 100%;\n height: 100%;\n background: transparent;\n box-shadow: 0 0 0 1px ", ";\n border-radius: 10px;\n border: none;\n transition: all 180ms ease;\n\n &:hover,\n &:focus-within {\n background: ", ";\n box-shadow: 0 0 0 1px ", "\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
3
+ export const StyledPaper = styled(Paper) `
4
+ width: 100%;
5
+ height: 100%;
6
+ background: transparent;
7
+ box-shadow: 0 0 0 1px ${props => props.theme.palette.mode === 'dark'
8
8
  ? 'rgba(255,255,255,.1)'
9
- : '#ddd'; }, function (props) { return props.theme.palette.mode === 'dark'
9
+ : '#ddd'};
10
+ border-radius: 10px;
11
+ border: none;
12
+ transition: all 180ms ease;
13
+
14
+ &:hover,
15
+ &:focus-within {
16
+ background: ${props => props.theme.palette.mode === 'dark'
10
17
  ? 'rgba(0,0,0,.3)'
11
- : '#f5f5f5'; }, function (props) { return props.theme.palette.mode === 'dark'
18
+ : '#f5f5f5'};
19
+ box-shadow: 0 0 0 1px ${props => props.theme.palette.mode === 'dark'
12
20
  ? 'rgba(255,255,255,.2)'
13
- : '#ccc'; });
14
- export var StyledBoxWrap = styled(Box)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n padding: .5rem;\n"], ["\n display: flex;\n flex-direction: row;\n padding: .5rem;\n"])));
15
- export var StyledBoxText = styled(Box)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: space-between;\n margin-inline-start: 1rem;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: space-between;\n margin-inline-start: 1rem;\n width: 100%;\n"])));
16
- export var StyledTypography = styled(Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n font-size: 1rem;\n font-weight: 500;\n line-height: 1.3;\n\n /* Truncate text to 2 lines */\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n"], ["\n color: ", ";\n font-size: 1rem;\n font-weight: 500;\n line-height: 1.3;\n\n /* Truncate text to 2 lines */\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n"])), function (props) { return props.theme.palette.text.primary; });
17
- export var StyledTypographySubtitle = styled(Typography)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n font-size: .85rem;\n font-weight: 400;\n line-height: 1.3;\n"], ["\n color: ", ";\n font-size: .85rem;\n font-weight: 400;\n line-height: 1.3;\n"])), function (props) { return props.theme.palette.text.secondary; });
18
- export var StyledButton = styled(Button)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", ";\n box-shadow: 0 0 0 0 transparent;\n transition: all 180ms ease;\n\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 4px ", ";\n\n & .MuiTouchRipple-root {\n display: none;\n }\n }\n"], ["\n background: ", ";\n box-shadow: 0 0 0 0 transparent;\n transition: all 180ms ease;\n\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 4px ", ";\n\n & .MuiTouchRipple-root {\n display: none;\n }\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
21
+ : '#ccc'}
22
+ }
23
+ `;
24
+ export const StyledBoxWrap = styled(Box) `
25
+ display: flex;
26
+ flex-direction: row;
27
+ padding: .5rem;
28
+ `;
29
+ export const StyledBoxText = styled(Box) `
30
+ display: flex;
31
+ flex-direction: column;
32
+ align-items: flex-start;
33
+ justify-content: space-between;
34
+ margin-inline-start: 1rem;
35
+ width: 100%;
36
+ `;
37
+ export const StyledTypography = styled(Typography) `
38
+ color: ${props => props.theme.palette.text.primary};
39
+ font-size: 1rem;
40
+ font-weight: 500;
41
+ line-height: 1.3;
42
+
43
+ /* Truncate text to 2 lines */
44
+ overflow: hidden;
45
+ text-overflow: ellipsis;
46
+ display: -webkit-box;
47
+ -webkit-line-clamp: 2;
48
+ -webkit-box-orient: vertical;
49
+ `;
50
+ export const StyledTypographySubtitle = styled(Typography) `
51
+ color: ${props => props.theme.palette.text.secondary};
52
+ font-size: .85rem;
53
+ font-weight: 400;
54
+ line-height: 1.3;
55
+ `;
56
+ export const StyledButton = styled(Button) `
57
+ background: ${props => props.theme.palette.mode === 'dark'
19
58
  ? 'rgba(0,0,0,.2)'
20
- : '#fff'; }, function (props) { return props.theme.palette.mode === 'dark'
59
+ : '#fff'};
60
+ box-shadow: 0 0 0 0 transparent;
61
+ transition: all 180ms ease;
62
+
63
+ &:focus-visible {
64
+ outline: none;
65
+ box-shadow: 0 0 0 4px ${props => props.theme.palette.mode === 'dark'
21
66
  ? 'rgba(255,255,255,.5)'
22
- : props.theme.palette.primary.main; });
23
- export var StyledAutocomplete = styled(Autocomplete)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: 100%;\n\n .MuiInputBase-root {\n background: ", ";\n }\n\n & input {\n width: 100%;\n }\n\n & input::placeholder {\n color: ", ";\n opacity: 1;\n }\n\n .MuiOutlinedInput-root .MuiAutocomplete-endAdornment {\n left: ", ";\n right: ", ";\n }\n\n /* Handle custom focus state */\n & .MuiInputBase-root {\n box-shadow: 0 0 0 0 transparent;\n transition: all 180ms ease;\n }\n & .MuiInputBase-root.Mui-focused fieldset {\n box-shadow: none !important;\n border: none !important;\n outline: none !important;\n }\n & .MuiInputBase-root.Mui-focused {\n outline: none;\n box-shadow: 0 0 0 4px ", ";\n }\n"], ["\n width: 100%;\n\n .MuiInputBase-root {\n background: ", ";\n }\n\n & input {\n width: 100%;\n }\n\n & input::placeholder {\n color: ", ";\n opacity: 1;\n }\n\n .MuiOutlinedInput-root .MuiAutocomplete-endAdornment {\n left: ", ";\n right: ", ";\n }\n\n /* Handle custom focus state */\n & .MuiInputBase-root {\n box-shadow: 0 0 0 0 transparent;\n transition: all 180ms ease;\n }\n & .MuiInputBase-root.Mui-focused fieldset {\n box-shadow: none !important;\n border: none !important;\n outline: none !important;\n }\n & .MuiInputBase-root.Mui-focused {\n outline: none;\n box-shadow: 0 0 0 4px ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
67
+ : props.theme.palette.primary.main};
68
+
69
+ & .MuiTouchRipple-root {
70
+ display: none;
71
+ }
72
+ }
73
+ `;
74
+ export const StyledAutocomplete = styled(Autocomplete) `
75
+ width: 100%;
76
+
77
+ .MuiInputBase-root {
78
+ background: ${props => props.theme.palette.mode === 'dark'
24
79
  ? 'rgba(0,0,0,.2)'
25
- : '#fff'; }, function (props) { return props.theme.palette.text.secondary; }, function (props) { return props.theme.direction === 'rtl' ? '9px' : 'auto'; }, function (props) { return props.theme.direction === 'ltr' ? '9px' : 'auto'; }, function (props) { return props.theme.palette.mode === 'dark'
80
+ : '#fff'};
81
+ }
82
+
83
+ & input {
84
+ width: 100%;
85
+ }
86
+
87
+ & input::placeholder {
88
+ color: ${props => props.theme.palette.text.secondary};
89
+ opacity: 1;
90
+ }
91
+
92
+ .MuiOutlinedInput-root .MuiAutocomplete-endAdornment {
93
+ left: ${props => props.theme.direction === 'rtl' ? '9px' : 'auto'};
94
+ right: ${props => props.theme.direction === 'ltr' ? '9px' : 'auto'};
95
+ }
96
+
97
+ /* Handle custom focus state */
98
+ & .MuiInputBase-root {
99
+ box-shadow: 0 0 0 0 transparent;
100
+ transition: all 180ms ease;
101
+ }
102
+ & .MuiInputBase-root.Mui-focused fieldset {
103
+ box-shadow: none !important;
104
+ border: none !important;
105
+ outline: none !important;
106
+ }
107
+ & .MuiInputBase-root.Mui-focused {
108
+ outline: none;
109
+ box-shadow: 0 0 0 4px ${props => props.theme.palette.mode === 'dark'
26
110
  ? 'rgba(255,255,255,.5)'
27
- : props.theme.palette.primary.main; });
28
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
111
+ : props.theme.palette.primary.main};
112
+ }
113
+ `;