@appquality/unguess-design-system 2.10.24 → 2.10.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/build/index.js +133 -108
- package/build/stories/navigation/header/header-item/_types.d.ts +8 -5
- package/build/stories/navigation/header/header-item/workspacesDropdown.d.ts +3 -0
- package/build/stories/navigation/sidebar/_types.d.ts +2 -1
- package/build/stories/navigation/sidebar/index.stories.d.ts +2 -0
- package/build/stories/navigation/sidebar/skeleton.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
# v2.10.27 (Fri May 13 2022)
|
|
2
|
+
|
|
3
|
+
#### ⚠️ Pushed to `master`
|
|
4
|
+
|
|
5
|
+
- fix(sidebar): show dropdown only on small viewport ([@cannarocks](https://github.com/cannarocks))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v2.10.26 (Fri May 13 2022)
|
|
14
|
+
|
|
15
|
+
#### ⚠️ Pushed to `master`
|
|
16
|
+
|
|
17
|
+
- Merge branch 'master' of github.com:AppQuality/unguess-design-system ([@cannarocks](https://github.com/cannarocks))
|
|
18
|
+
- fix(sidebar): remove padding only with tokens ([@cannarocks](https://github.com/cannarocks))
|
|
19
|
+
|
|
20
|
+
#### Authors: 1
|
|
21
|
+
|
|
22
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# v2.10.25 (Fri May 13 2022)
|
|
27
|
+
|
|
28
|
+
#### 🐛 Bug Fix
|
|
29
|
+
|
|
30
|
+
- refactor(workspace-dropdown): refactor component in order to use it o… [#54](https://github.com/AppQuality/unguess-design-system/pull/54) ([@cannarocks](https://github.com/cannarocks))
|
|
31
|
+
|
|
32
|
+
#### ⚠️ Pushed to `master`
|
|
33
|
+
|
|
34
|
+
- fix(page-loader): refactor types and fix build errors ([@cannarocks](https://github.com/cannarocks))
|
|
35
|
+
- fix(token-card): uI improvements on token card ([@cannarocks](https://github.com/cannarocks))
|
|
36
|
+
|
|
37
|
+
#### Authors: 1
|
|
38
|
+
|
|
39
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
1
43
|
# v2.10.24 (Thu May 12 2022)
|
|
2
44
|
|
|
3
45
|
#### ⚠️ Pushed to `master`
|
package/build/index.js
CHANGED
|
@@ -238,13 +238,13 @@ var gradients = {
|
|
|
238
238
|
dark: "linear-gradient(90.81deg, ".concat(hex2rgba(palette.blue[800]), " 0%, ").concat(hex2rgba(palette.blue[600]), " 100%);"),
|
|
239
239
|
};
|
|
240
240
|
|
|
241
|
-
var _a, _b, _c, _d, _e, _f;
|
|
242
|
-
var components = __assign(__assign({}, reactTheming.DEFAULT_THEME.components), { chrome: __assign(__assign({}, (_a = reactTheming.DEFAULT_THEME.components) === null || _a === void 0 ? void 0 : _a.chrome), { header: __assign(__assign({}, (_c = (_b = reactTheming.DEFAULT_THEME.components) === null || _b === void 0 ? void 0 : _b.chrome) === null || _c === void 0 ? void 0 : _c.header), { height: "64px" }) }), notification: __assign(__assign({}, (
|
|
241
|
+
var _a, _b, _c, _d, _e, _f, _g$5, _h;
|
|
242
|
+
var components = __assign(__assign({}, reactTheming.DEFAULT_THEME.components), { chrome: __assign(__assign({}, (_a = reactTheming.DEFAULT_THEME.components) === null || _a === void 0 ? void 0 : _a.chrome), { header: __assign(__assign({}, (_c = (_b = reactTheming.DEFAULT_THEME.components) === null || _b === void 0 ? void 0 : _b.chrome) === null || _c === void 0 ? void 0 : _c.header), { height: "64px" }), nav: __assign(__assign({}, (_e = (_d = reactTheming.DEFAULT_THEME.components) === null || _d === void 0 ? void 0 : _d.chrome) === null || _e === void 0 ? void 0 : _e.nav), { openWidth: 240, closedWidth: 36, workspaceDropdownWidth: 192 }) }), notification: __assign(__assign({}, (_f = reactTheming.DEFAULT_THEME.components) === null || _f === void 0 ? void 0 : _f.notification), { card: __assign(__assign({}, (_h = (_g$5 = reactTheming.DEFAULT_THEME.components) === null || _g$5 === void 0 ? void 0 : _g$5.notification) === null || _h === void 0 ? void 0 : _h.well), { padding: "16px" }) }) });
|
|
243
243
|
|
|
244
244
|
var theme = __assign(__assign({}, reactTheming.DEFAULT_THEME), { colors: __assign(__assign({}, reactTheming.DEFAULT_THEME.colors), { primaryHue: palette.blue[600], warningHue: palette.yellow[600], successHue: palette.teal["M600"], dangerHue: palette.red[400] }), palette: palette, fonts: __assign(__assign({}, reactTheming.DEFAULT_THEME.fonts), { system: '"Poppins",sans-serif,Helvetica,Arial,sans-serif' }), fontWeights: __assign(__assign({}, reactTheming.DEFAULT_THEME.fontWeights), { semibold: 500 }), gradients: gradients, borderRadii: __assign(__assign({}, reactTheming.DEFAULT_THEME.borderRadii), { lg: "8px", xl: "16px", xxl: "32px" }), components: components, shadows: __assign(__assign({}, reactTheming.DEFAULT_THEME.shadows), { boxShadow: boxShadow }) });
|
|
245
245
|
|
|
246
|
-
var GlobalStyle = styled.createGlobalStyle(templateObject_1$
|
|
247
|
-
var templateObject_1$
|
|
246
|
+
var GlobalStyle = styled.createGlobalStyle(templateObject_1$X || (templateObject_1$X = __makeTemplateObject(["\n ::-webkit-scrollbar-track:hover {\n border-left: solid 1px ", ";\n border-right: solid 1px ", ";\n }\n\n ::-webkit-scrollbar {\n width: 10px;\n }\n\n ::-webkit-scrollbar-track {\n border: solid 2px transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 10px 10px ", ";\n border: solid 2px transparent;\n border-radius: 25px;\n }\n\n /* This stuff is for Firefox */\n * {\n scrollbar-color: ", " #FFFFFF;\n scrollbar-width: thin;\n }\n \n body {\n font-family: ", ";\n margin: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n svg {\n max-height: 100%;\n }\n\n"], ["\n ::-webkit-scrollbar-track:hover {\n border-left: solid 1px ", ";\n border-right: solid 1px ", ";\n }\n\n ::-webkit-scrollbar {\n width: 10px;\n }\n\n ::-webkit-scrollbar-track {\n border: solid 2px transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n box-shadow: inset 0 0 10px 10px ", ";\n border: solid 2px transparent;\n border-radius: 25px;\n }\n\n /* This stuff is for Firefox */\n * {\n scrollbar-color: ", " #FFFFFF;\n scrollbar-width: thin;\n }\n \n body {\n font-family: ", ";\n margin: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n svg {\n max-height: 100%;\n }\n\n"])), theme.palette.grey["200"], theme.palette.grey["200"], theme.palette.blue["200"], theme.palette.blue["200"], theme.fonts.system);
|
|
247
|
+
var templateObject_1$X;
|
|
248
248
|
|
|
249
249
|
/**
|
|
250
250
|
* Accordions are headers that can be expanded to reveal content or collapsed to hide it.
|
|
@@ -259,7 +259,7 @@ Accordion.Header = reactAccordions.Accordion.Header;
|
|
|
259
259
|
Accordion.Label = reactAccordions.Accordion.Label;
|
|
260
260
|
Accordion.Panel = reactAccordions.Accordion.Panel;
|
|
261
261
|
|
|
262
|
-
var UgAlert = styled__default["default"](reactNotifications.Alert)(templateObject_1$
|
|
262
|
+
var UgAlert = styled__default["default"](reactNotifications.Alert)(templateObject_1$W || (templateObject_1$W = __makeTemplateObject(["\n background-color: white;\n color: ", ";\n border-width: 2px;\n"], ["\n background-color: white;\n color: ", ";\n border-width: 2px;\n"])), function (_a) {
|
|
263
263
|
var theme = _a.theme;
|
|
264
264
|
return theme.palette.grey[700];
|
|
265
265
|
});
|
|
@@ -273,10 +273,10 @@ var UgAlert = styled__default["default"](reactNotifications.Alert)(templateObjec
|
|
|
273
273
|
var Alert = function (props) { return jsxRuntime.jsx(UgAlert, __assign({}, props)); };
|
|
274
274
|
Alert.Title = reactNotifications.Title;
|
|
275
275
|
Alert.Close = reactNotifications.Close;
|
|
276
|
-
var templateObject_1$
|
|
276
|
+
var templateObject_1$W;
|
|
277
277
|
|
|
278
278
|
// import useWindowSize from "../../hooks/useWindowSize";
|
|
279
|
-
var UgAvatar = styled__default["default"](reactAvatars.Avatar)(templateObject_1$
|
|
279
|
+
var UgAvatar = styled__default["default"](reactAvatars.Avatar)(templateObject_1$V || (templateObject_1$V = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
280
280
|
return props.avatarType &&
|
|
281
281
|
props.avatarType !== "image" &&
|
|
282
282
|
"background: ".concat(props.backgroundColor || theme.gradients.dark, ";");
|
|
@@ -301,7 +301,7 @@ var Avatar = function (props) {
|
|
|
301
301
|
return (jsxRuntime.jsx(UgAvatar, __assign({}, props, { badge: fixedBadge, children: wrapChildren(props.avatarType || "text"), size: props.size || "small" })));
|
|
302
302
|
};
|
|
303
303
|
Avatar.Text = UgAvatar.Text;
|
|
304
|
-
var templateObject_1$
|
|
304
|
+
var templateObject_1$V;
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
307
|
* Breadcrumbs mark and communicate a user’s location in the product.
|
|
@@ -322,7 +322,7 @@ var Breadcrumb = function (props) { return jsxRuntime.jsx(reactBreadcrumbs.Bread
|
|
|
322
322
|
*/
|
|
323
323
|
var Anchor = function (props) { return jsxRuntime.jsx(reactButtons.Anchor, __assign({}, props)); };
|
|
324
324
|
|
|
325
|
-
var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$
|
|
325
|
+
var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$U || (templateObject_1$U = __makeTemplateObject([""], [""])));
|
|
326
326
|
/**
|
|
327
327
|
* Buttons let users take action quickly.
|
|
328
328
|
* Use a Button to enable actions or decisions that are important to a user’s workflow.
|
|
@@ -334,7 +334,7 @@ var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$
|
|
|
334
334
|
var Button = function (props) { return jsxRuntime.jsx(UgButton, __assign({}, props)); };
|
|
335
335
|
Button.StartIcon = UgButton.StartIcon;
|
|
336
336
|
Button.EndIcon = UgButton.EndIcon;
|
|
337
|
-
var templateObject_1$
|
|
337
|
+
var templateObject_1$U;
|
|
338
338
|
|
|
339
339
|
/**
|
|
340
340
|
A Button group lets users make a selection from a set of options.
|
|
@@ -364,7 +364,7 @@ Used for this:
|
|
|
364
364
|
**/
|
|
365
365
|
var SplitButton = function (props) { return (jsxRuntime.jsx(reactButtons.SplitButton, __assign({}, props))); };
|
|
366
366
|
|
|
367
|
-
var ContentCard = styled__default["default"](reactNotifications.Well)(templateObject_1$
|
|
367
|
+
var ContentCard = styled__default["default"](reactNotifications.Well)(templateObject_1$T || (templateObject_1$T = __makeTemplateObject(["\n border-radius: ", ";\n padding: ", ";\n border: 1px solid ", ";\n ", "\n"], ["\n border-radius: ", ";\n padding: ", ";\n border: 1px solid ", ";\n ", "\n"])), function (_a) {
|
|
368
368
|
var theme = _a.theme;
|
|
369
369
|
return theme.borderRadii.lg;
|
|
370
370
|
}, function (_a) {
|
|
@@ -389,7 +389,7 @@ var ContainerCard = styled__default["default"](Card)(templateObject_2$m || (temp
|
|
|
389
389
|
var theme = _a.theme;
|
|
390
390
|
return theme.borderRadii.xl;
|
|
391
391
|
});
|
|
392
|
-
var templateObject_1$
|
|
392
|
+
var templateObject_1$T, templateObject_2$m;
|
|
393
393
|
|
|
394
394
|
/**
|
|
395
395
|
* Tags let users categorize content using a keyword.
|
|
@@ -406,13 +406,13 @@ var Tag = function (props) { return jsxRuntime.jsx(reactTags.Tag, __assign({}, p
|
|
|
406
406
|
Tag.Avatar = reactTags.Tag.Avatar;
|
|
407
407
|
Tag.Close = reactTags.Tag.Close;
|
|
408
408
|
|
|
409
|
-
var UgLabel$1 = styled__default["default"](reactForms.Label)(templateObject_1$
|
|
409
|
+
var UgLabel$1 = styled__default["default"](reactForms.Label)(templateObject_1$S || (templateObject_1$S = __makeTemplateObject([""], [""])));
|
|
410
410
|
/**
|
|
411
411
|
* A Label is used to specify a title for an input.
|
|
412
412
|
* <hr>
|
|
413
413
|
**/
|
|
414
414
|
var Label = function (props) { return jsxRuntime.jsx(UgLabel$1, __assign({}, props)); };
|
|
415
|
-
var templateObject_1$
|
|
415
|
+
var templateObject_1$S;
|
|
416
416
|
|
|
417
417
|
var _g$4, _path$p, _path2$7, _path3$6, _path4$4, _path5$3, _path6$3, _path7$3, _path8$3, _path9$3, _path10$3, _path11$2;
|
|
418
418
|
|
|
@@ -619,7 +619,7 @@ var SvgArrivalStatusRoundIcon = function SvgArrivalStatusRoundIcon(props) {
|
|
|
619
619
|
})));
|
|
620
620
|
};
|
|
621
621
|
|
|
622
|
-
var UgSkeleton = styled__default["default"](reactLoaders.Skeleton)(templateObject_1$
|
|
622
|
+
var UgSkeleton = styled__default["default"](reactLoaders.Skeleton)(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n background-color: ", ";\n border-radius: ", ";\n"], ["\n background-color: ", ";\n border-radius: ", ";\n"])), function (props) { return props.theme.palette.grey[500]; }, function (props) { return props.theme.borderRadii.xxl; });
|
|
623
623
|
/**
|
|
624
624
|
* A Skeleton loader shows users a blank version of a page or section of a page into which content is gradually loaded. It provides a visual estimate of the space needed.
|
|
625
625
|
* <hr>
|
|
@@ -634,15 +634,15 @@ var UgSkeleton = styled__default["default"](reactLoaders.Skeleton)(templateObjec
|
|
|
634
634
|
- To communicate a typing status, use Inline instead
|
|
635
635
|
*/
|
|
636
636
|
var Skeleton = function (props) { return jsxRuntime.jsx(UgSkeleton, __assign({}, props)); };
|
|
637
|
-
var templateObject_1$
|
|
637
|
+
var templateObject_1$R;
|
|
638
638
|
|
|
639
639
|
var CampaignCardSkeleton = function () {
|
|
640
640
|
return (jsxRuntime.jsxs(Wrapper$1, { children: [jsxRuntime.jsx(CardHeader, { children: jsxRuntime.jsx(Skeleton, { width: "30%" }) }), jsxRuntime.jsxs(CardBody$1, { children: [jsxRuntime.jsx(Skeleton, { height: "18px", width: "50%" }), jsxRuntime.jsx("br", {}), jsxRuntime.jsx(Skeleton, { height: "26px", style: { backgroundColor: theme.palette.blue[400] } })] }), jsxRuntime.jsx(Divider$1, {}), jsxRuntime.jsxs(CardFooter$1, { children: [jsxRuntime.jsx(Skeleton, { height: "18px", width: "45%" }), " ", jsxRuntime.jsx(Skeleton, { width: "26px", height: "26px", style: { borderRadius: "100%" } })] })] }));
|
|
641
641
|
};
|
|
642
642
|
|
|
643
|
-
var flexCenter = styled.css(templateObject_1$
|
|
643
|
+
var flexCenter = styled.css(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
644
644
|
var flexColumnCenter = styled.css(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n ", ";\n flex-direction: column;\n"], ["\n ", ";\n flex-direction: column;\n"])), flexCenter);
|
|
645
|
-
var flexStart = styled.css(templateObject_3$
|
|
645
|
+
var flexStart = styled.css(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: ", ";\n"], ["\n display: flex;\n flex-direction: column;\n align-items: ", ";\n"])), function (_a) {
|
|
646
646
|
var theme = _a.theme;
|
|
647
647
|
return (theme.rtl ? "flex-end" : "flex-start");
|
|
648
648
|
});
|
|
@@ -659,7 +659,7 @@ var cardStyle = styled.css(templateObject_4$b || (templateObject_4$b = __makeTem
|
|
|
659
659
|
var theme = _a.theme;
|
|
660
660
|
return theme.shadows.boxShadow(theme);
|
|
661
661
|
});
|
|
662
|
-
var templateObject_1$
|
|
662
|
+
var templateObject_1$Q, templateObject_2$l, templateObject_3$e, templateObject_4$b;
|
|
663
663
|
|
|
664
664
|
var getStatusIcon = function (status) {
|
|
665
665
|
switch (status) {
|
|
@@ -683,12 +683,12 @@ var getTypeDataIcon = function (type) {
|
|
|
683
683
|
return SvgFunctionalTestRoundIcon;
|
|
684
684
|
}
|
|
685
685
|
};
|
|
686
|
-
var Wrapper$1 = styled__default["default"](Card)(templateObject_1$
|
|
686
|
+
var Wrapper$1 = styled__default["default"](Card)(templateObject_1$P || (templateObject_1$P = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), cardStyle);
|
|
687
687
|
var StyledTag$1 = styled__default["default"](Tag)(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n color: ", ";\n max-width: 75%;\n cursor: pointer;\n"], ["\n color: ", ";\n max-width: 75%;\n cursor: pointer;\n"])), function (_a) {
|
|
688
688
|
var theme = _a.theme;
|
|
689
689
|
return theme.palette.grey["700"];
|
|
690
690
|
});
|
|
691
|
-
var StyledTagNew$1 = styled__default["default"](Tag)(templateObject_3$
|
|
691
|
+
var StyledTagNew$1 = styled__default["default"](Tag)(templateObject_3$d || (templateObject_3$d = __makeTemplateObject(["\n height: ", "px;\n padding: ", "px\n ", "px;\n color: ", ";\n"], ["\n height: ", "px;\n padding: ", "px\n ", "px;\n color: ", ";\n"])), function (_a) {
|
|
692
692
|
var theme = _a.theme;
|
|
693
693
|
return theme.space.base * 6;
|
|
694
694
|
}, function (_a) {
|
|
@@ -745,9 +745,9 @@ var CampaignCard = function (props) {
|
|
|
745
745
|
}
|
|
746
746
|
return props.isLoading ? (jsxRuntime.jsx(CampaignCardSkeleton, {})) : (jsxRuntime.jsxs(Wrapper$1, __assign({}, props, { children: [jsxRuntime.jsxs(CardHeader, { children: [jsxRuntime.jsx(StyledLabel$2, __assign({ isRegular: true }, { children: date })), isNew && (jsxRuntime.jsx(StyledTagNew$1, __assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(CardBody$1, { children: [jsxRuntime.jsx(StyledLabel$2, __assign({ isRegular: true }, { children: projectTitleCut })), jsxRuntime.jsx(StyledTitleLabel$1, __assign({ isRegular: true }, { children: campaignTitleCut }))] }), jsxRuntime.jsx(Divider$1, {}), jsxRuntime.jsxs(CardFooter$1, { children: [props.pillText && (jsxRuntime.jsxs(StyledTag$1, __assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(Tag.Avatar, { children: jsxRuntime.jsx(PillIcon, {}) }), props.pillText] }))), jsxRuntime.jsx(StatusIcon, {})] })] })));
|
|
747
747
|
};
|
|
748
|
-
var templateObject_1$
|
|
748
|
+
var templateObject_1$P, templateObject_2$k, templateObject_3$d, templateObject_4$a, templateObject_5$5, templateObject_6$2, templateObject_7$1, templateObject_8$1, templateObject_9;
|
|
749
749
|
|
|
750
|
-
var Wrapper = styled__default["default"](Card)(templateObject_1$
|
|
750
|
+
var Wrapper = styled__default["default"](Card)(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n border-radius: ", ";\n padding: ", ";\n border: 1px solid ", ";\n display: flex;\n flex-direction: column;\n\n &:hover {\n box-shadow: ", ";\n }\n"], ["\n border-radius: ", ";\n padding: ", ";\n border: 1px solid ", ";\n display: flex;\n flex-direction: column;\n\n &:hover {\n box-shadow: ", ";\n }\n"])), function (_a) {
|
|
751
751
|
var theme = _a.theme;
|
|
752
752
|
return theme.borderRadii.lg;
|
|
753
753
|
}, function (_a) {
|
|
@@ -773,7 +773,7 @@ var StyledTagNew = styled__default["default"](Tag)(templateObject_2$j || (templa
|
|
|
773
773
|
var theme = _a.theme;
|
|
774
774
|
return theme.palette.white;
|
|
775
775
|
});
|
|
776
|
-
var StyledLabel$1 = styled__default["default"](Label)(templateObject_3$
|
|
776
|
+
var StyledLabel$1 = styled__default["default"](Label)(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n font-size: ", ";\n color: ", ";\n cursor: pointer;\n"], ["\n font-size: ", ";\n color: ", ";\n cursor: pointer;\n"])), function (_a) {
|
|
777
777
|
var theme = _a.theme;
|
|
778
778
|
return theme.fontSizes.sm;
|
|
779
779
|
}, function (_a) {
|
|
@@ -808,7 +808,7 @@ var ProductCard = function (props) {
|
|
|
808
808
|
}
|
|
809
809
|
return props.isLoading ? (jsxRuntime.jsx(CampaignCardSkeleton, {})) : (jsxRuntime.jsxs(Wrapper, __assign({}, props, { children: [jsxRuntime.jsxs(CardBody, __assign({ onClick: props.onCtaClick }, { children: [isNew && (jsxRuntime.jsx(StyledTagNew, __assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" }))), props.icon && jsxRuntime.jsx(IconContainer$1, { children: props.icon }), props.preTitle && (jsxRuntime.jsx(StyledLabel$1, __assign({ isRegular: true }, { children: props.preTitle }))), jsxRuntime.jsx(StyledTitleLabel, __assign({ isRegular: true }, { children: productTitleCut }))] })), jsxRuntime.jsx(Divider, {}), jsxRuntime.jsx(CardFooter, { children: jsxRuntime.jsx(Button, __assign({ isPill: true, isPrimary: true, onClick: props.onCtaClick }, { children: props.ctaLabel })) })] })));
|
|
810
810
|
};
|
|
811
|
-
var templateObject_1$
|
|
811
|
+
var templateObject_1$O, templateObject_2$j, templateObject_3$c, templateObject_4$9, templateObject_5$4, templateObject_6$1, templateObject_7, templateObject_8;
|
|
812
812
|
|
|
813
813
|
/**
|
|
814
814
|
* Title is a basic component used to display a title. Often used in card headers.
|
|
@@ -1052,7 +1052,7 @@ function useWindowSize() {
|
|
|
1052
1052
|
return size;
|
|
1053
1053
|
}
|
|
1054
1054
|
|
|
1055
|
-
var StyledSpan = styled__default["default"](Span)(templateObject_1$
|
|
1055
|
+
var StyledSpan = styled__default["default"](Span)(templateObject_1$N || (templateObject_1$N = __makeTemplateObject([""], [""])));
|
|
1056
1056
|
var StyledTag = styled__default["default"](Tag)(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\n background-color: transparent;\n pointer-events: none;\n font-weight: ", ";\n ", "\n svg {\n margin-right: ", " !important;\n }\n\n ", " {\n font-weight: ", ";\n margin-left: ", ";\n color: ", ";\n }\n"], ["\n background-color: transparent;\n pointer-events: none;\n font-weight: ", ";\n ", "\n svg {\n margin-right: ", " !important;\n }\n\n ", " {\n font-weight: ", ";\n margin-left: ", ";\n color: ", ";\n }\n"])), function (_a) {
|
|
1057
1057
|
var theme = _a.theme;
|
|
1058
1058
|
return theme.fontWeights.regular;
|
|
@@ -1090,7 +1090,7 @@ var Counter = function (props) {
|
|
|
1090
1090
|
return (jsxRuntime.jsxs(StyledTag, __assign({}, props, { size: props.size || "large" }, { children: [jsxRuntime.jsx(StyledTag.Avatar, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [status === "completed" && jsxRuntime.jsx(SvgCampaignCompleted, {}), status === "progress" && jsxRuntime.jsx(SvgCampaignProgress, {}), status === "incoming" && jsxRuntime.jsx(SvgCampaignIncoming, {}), status === "functional" && jsxRuntime.jsx(SvgCampaignFunctional, {}), status === "experiential" && jsxRuntime.jsx(SvgCampaignExperiential, {})] }) }), width > parseInt(theme.breakpoints.sm) && props.children, counter !== undefined && jsxRuntime.jsx(StyledSpan, { children: counter.toString() })] })));
|
|
1091
1091
|
};
|
|
1092
1092
|
Counter.Avatar = StyledTag.Avatar;
|
|
1093
|
-
var templateObject_1$
|
|
1093
|
+
var templateObject_1$N, templateObject_2$i;
|
|
1094
1094
|
|
|
1095
1095
|
/**
|
|
1096
1096
|
* A Drawer is a container for supplementary content that is anchored to the edge of a page.
|
|
@@ -1106,20 +1106,20 @@ Drawer.Footer = reactModals.DrawerModal.Footer;
|
|
|
1106
1106
|
Drawer.FooterItem = reactModals.DrawerModal.FooterItem;
|
|
1107
1107
|
Drawer.Close = reactModals.DrawerModal.Close;
|
|
1108
1108
|
|
|
1109
|
-
var Field$1 = styled__default["default"](reactDropdowns.Field)(templateObject_1$
|
|
1110
|
-
var templateObject_1$
|
|
1109
|
+
var Field$1 = styled__default["default"](reactDropdowns.Field)(templateObject_1$M || (templateObject_1$M = __makeTemplateObject([""], [""])));
|
|
1110
|
+
var templateObject_1$M;
|
|
1111
1111
|
|
|
1112
1112
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
1113
1113
|
__proto__: null,
|
|
1114
1114
|
Field: Field$1
|
|
1115
1115
|
});
|
|
1116
1116
|
|
|
1117
|
-
var UgItem = styled__default["default"](reactDropdowns.Item)(templateObject_1$
|
|
1117
|
+
var UgItem = styled__default["default"](reactDropdowns.Item)(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n &[disabled] svg {\n opacity: 0.5;\n }\n &:hover {\n background-color: ", ";\n }\n"], ["\n &[disabled] svg {\n opacity: 0.5;\n }\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
1118
1118
|
var theme = _a.theme;
|
|
1119
1119
|
return theme.palette.blue[100];
|
|
1120
1120
|
});
|
|
1121
1121
|
var Item = function (props) { return jsxRuntime.jsx(UgItem, __assign({}, props)); };
|
|
1122
|
-
var templateObject_1$
|
|
1122
|
+
var templateObject_1$L;
|
|
1123
1123
|
|
|
1124
1124
|
/**
|
|
1125
1125
|
* A Menu is a wrapper for items elements
|
|
@@ -1143,7 +1143,7 @@ var MediaItem = function (props) { return jsxRuntime.jsx(reactDropdowns.MediaIte
|
|
|
1143
1143
|
*/
|
|
1144
1144
|
var Multiselect = function (props) { return (jsxRuntime.jsx(reactDropdowns.Multiselect, __assign({}, props))); };
|
|
1145
1145
|
|
|
1146
|
-
var UgSelect = styled__default["default"](reactDropdowns.Select)(templateObject_1$
|
|
1146
|
+
var UgSelect = styled__default["default"](reactDropdowns.Select)(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
1147
1147
|
return props.isPrimary &&
|
|
1148
1148
|
"\n background-color: ".concat(props.theme.palette.blue[600], ";\n color: white;\n & svg[data-garden-id=\"forms.media_figure\"] {\n color: white;\n }\n ");
|
|
1149
1149
|
});
|
|
@@ -1160,7 +1160,7 @@ var UgSelect = styled__default["default"](reactDropdowns.Select)(templateObject_
|
|
|
1160
1160
|
var Select = function (props) { return jsxRuntime.jsx(UgSelect, __assign({}, props)); };
|
|
1161
1161
|
var Dropdown = function (props) { return (jsxRuntime.jsx(reactDropdowns.Dropdown, __assign({}, props))); };
|
|
1162
1162
|
var Message = function (props) { return jsxRuntime.jsx(reactDropdowns.Message, __assign({}, props)); };
|
|
1163
|
-
var templateObject_1$
|
|
1163
|
+
var templateObject_1$K;
|
|
1164
1164
|
|
|
1165
1165
|
/**
|
|
1166
1166
|
* Autocomplete is an input field that filters results as users type. This helps users find something quickly in a large list of options.
|
|
@@ -1175,7 +1175,7 @@ var Autocomplete = function (props) { return jsxRuntime.jsx(reactDropdowns.Autoc
|
|
|
1175
1175
|
|
|
1176
1176
|
var MenuHeaderItem = function (props) { return (jsxRuntime.jsx(reactDropdowns.HeaderItem, __assign({}, props))); };
|
|
1177
1177
|
|
|
1178
|
-
var UgCheckbox = styled__default["default"](reactForms.Checkbox)(templateObject_1$
|
|
1178
|
+
var UgCheckbox = styled__default["default"](reactForms.Checkbox)(templateObject_1$J || (templateObject_1$J = __makeTemplateObject([""], [""])));
|
|
1179
1179
|
/**
|
|
1180
1180
|
* A Checkbox lets users select and unselect options from a list.
|
|
1181
1181
|
* <hr>
|
|
@@ -1187,9 +1187,9 @@ var UgCheckbox = styled__default["default"](reactForms.Checkbox)(templateObject_
|
|
|
1187
1187
|
* - To let users activate an option that takes effect immediately, use a Toggle instead
|
|
1188
1188
|
**/
|
|
1189
1189
|
var Checkbox = function (props) { return jsxRuntime.jsx(UgCheckbox, __assign({}, props)); };
|
|
1190
|
-
var templateObject_1$
|
|
1190
|
+
var templateObject_1$J;
|
|
1191
1191
|
|
|
1192
|
-
var StyledCard$1 = styled__default["default"](Card)(templateObject_1$
|
|
1192
|
+
var StyledCard$1 = styled__default["default"](Card)(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n ", "\n text-align: center;\n justify-content: center;\n align-items: center;\n\n &.card-active {\n border-color: ", ";\n }\n"], ["\n ", "\n text-align: center;\n justify-content: center;\n align-items: center;\n\n &.card-active {\n border-color: ", ";\n }\n"])), cardStyle, function (_a) {
|
|
1193
1193
|
var theme = _a.theme;
|
|
1194
1194
|
return theme.palette.blue[300];
|
|
1195
1195
|
});
|
|
@@ -1197,7 +1197,7 @@ var IconWrapper$1 = styled__default["default"].div(templateObject_2$h || (templa
|
|
|
1197
1197
|
var theme = _a.theme;
|
|
1198
1198
|
return theme.space.base;
|
|
1199
1199
|
});
|
|
1200
|
-
var LabelWrapper = styled__default["default"](Label)(templateObject_3$
|
|
1200
|
+
var LabelWrapper = styled__default["default"](Label)(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n margin: ", "px auto;\n color: ", ";\n user-select: none;\n\n &:focus {\n outline: 0;\n }\n"], ["\n margin: ", "px auto;\n color: ", ";\n user-select: none;\n\n &:focus {\n outline: 0;\n }\n"])), function (_a) {
|
|
1201
1201
|
var theme = _a.theme;
|
|
1202
1202
|
return theme.space.base;
|
|
1203
1203
|
}, function (_a) {
|
|
@@ -1216,14 +1216,14 @@ var CheckboxCard = function (props) {
|
|
|
1216
1216
|
};
|
|
1217
1217
|
return (jsxRuntime.jsxs(StyledCard$1, __assign({}, props.card, props, props && !props.disabled && { onClick: handleToggle }, { className: checked ? "card-active" : "" }, { children: [jsxRuntime.jsx(IconWrapper$1, { children: (props.iconActive && checked) ? props.iconActive : props.icon }), jsxRuntime.jsx(LabelWrapper, { children: props.label }), jsxRuntime.jsx(Checkbox, __assign({}, props, { checked: checked, value: checked ? 1 : 0, onClick: function (e) { return e.stopPropagation(); } }, { children: jsxRuntime.jsx(StyledLabel, __assign({ hidden: true }, { children: props.label })) }))] })));
|
|
1218
1218
|
};
|
|
1219
|
-
var templateObject_1$
|
|
1219
|
+
var templateObject_1$I, templateObject_2$h, templateObject_3$b, templateObject_4$8;
|
|
1220
1220
|
|
|
1221
|
-
var UgField = styled__default["default"](reactForms.Field)(templateObject_1$
|
|
1221
|
+
var UgField = styled__default["default"](reactForms.Field)(templateObject_1$H || (templateObject_1$H = __makeTemplateObject([""], [""])));
|
|
1222
1222
|
/**
|
|
1223
1223
|
* A Field is a wrapper for input elements
|
|
1224
1224
|
**/
|
|
1225
1225
|
var Field = function (props) { return jsxRuntime.jsx(UgField, __assign({}, props)); };
|
|
1226
|
-
var templateObject_1$
|
|
1226
|
+
var templateObject_1$H;
|
|
1227
1227
|
|
|
1228
1228
|
var index = /*#__PURE__*/Object.freeze({
|
|
1229
1229
|
__proto__: null,
|
|
@@ -1231,7 +1231,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
1231
1231
|
Hint: reactForms.Hint
|
|
1232
1232
|
});
|
|
1233
1233
|
|
|
1234
|
-
var UgInput = styled__default["default"](reactForms.Input)(templateObject_1$
|
|
1234
|
+
var UgInput = styled__default["default"](reactForms.Input)(templateObject_1$G || (templateObject_1$G = __makeTemplateObject([""], [""])));
|
|
1235
1235
|
var Hint = styled__default["default"](reactForms.Hint)(templateObject_2$g || (templateObject_2$g = __makeTemplateObject([""], [""])));
|
|
1236
1236
|
/**
|
|
1237
1237
|
* An Input lets users enter text into a field.
|
|
@@ -1241,9 +1241,9 @@ var Hint = styled__default["default"](reactForms.Hint)(templateObject_2$g || (te
|
|
|
1241
1241
|
* - To enter multiline text, use a Textarea
|
|
1242
1242
|
**/
|
|
1243
1243
|
var Input = function (props) { return jsxRuntime.jsx(UgInput, __assign({}, props)); };
|
|
1244
|
-
var templateObject_1$
|
|
1244
|
+
var templateObject_1$G, templateObject_2$g;
|
|
1245
1245
|
|
|
1246
|
-
var UgMediaInput = styled__default["default"](reactForms.MediaInput)(templateObject_1$
|
|
1246
|
+
var UgMediaInput = styled__default["default"](reactForms.MediaInput)(templateObject_1$F || (templateObject_1$F = __makeTemplateObject([""], [""])));
|
|
1247
1247
|
/**
|
|
1248
1248
|
* Media elements add even more context to an input.
|
|
1249
1249
|
* <hr>
|
|
@@ -1252,9 +1252,9 @@ var UgMediaInput = styled__default["default"](reactForms.MediaInput)(templateObj
|
|
|
1252
1252
|
* - To enter multiline text, use a Textarea
|
|
1253
1253
|
**/
|
|
1254
1254
|
var MediaInput = function (props) { return jsxRuntime.jsx(UgMediaInput, __assign({}, props)); };
|
|
1255
|
-
var templateObject_1$
|
|
1255
|
+
var templateObject_1$F;
|
|
1256
1256
|
|
|
1257
|
-
var UgRadio = styled__default["default"](reactForms.Radio)(templateObject_1$
|
|
1257
|
+
var UgRadio = styled__default["default"](reactForms.Radio)(templateObject_1$E || (templateObject_1$E = __makeTemplateObject([""], [""])));
|
|
1258
1258
|
/**
|
|
1259
1259
|
* Radio buttons let users choose a single option among two or more mutually exclusive options.
|
|
1260
1260
|
* <hr>
|
|
@@ -1266,7 +1266,7 @@ var UgRadio = styled__default["default"](reactForms.Radio)(templateObject_1$C ||
|
|
|
1266
1266
|
* - To select from a long list of options, use Select instead
|
|
1267
1267
|
**/
|
|
1268
1268
|
var Radio = function (props) { return jsxRuntime.jsx(UgRadio, __assign({}, props)); };
|
|
1269
|
-
var templateObject_1$
|
|
1269
|
+
var templateObject_1$E;
|
|
1270
1270
|
|
|
1271
1271
|
var _path$f;
|
|
1272
1272
|
|
|
@@ -1286,7 +1286,7 @@ var SvgCheckLg = function SvgCheckLg(props) {
|
|
|
1286
1286
|
})));
|
|
1287
1287
|
};
|
|
1288
1288
|
|
|
1289
|
-
var StyledCard = styled__default["default"](Card)(templateObject_1$
|
|
1289
|
+
var StyledCard = styled__default["default"](Card)(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n ", "\n text-align: center;\n justify-content: center;\n align-items: center;\n\n &.card-active {\n border-color: ", ";\n }\n"], ["\n ", "\n text-align: center;\n justify-content: center;\n align-items: center;\n\n &.card-active {\n border-color: ", ";\n }\n"])), cardStyle, function (_a) {
|
|
1290
1290
|
var theme = _a.theme;
|
|
1291
1291
|
return theme.palette.blue[300];
|
|
1292
1292
|
});
|
|
@@ -1294,7 +1294,7 @@ var IconWrapper = styled__default["default"].div(templateObject_2$f || (template
|
|
|
1294
1294
|
var theme = _a.theme;
|
|
1295
1295
|
return theme.space.base;
|
|
1296
1296
|
});
|
|
1297
|
-
var StyledText = styled__default["default"](reactTypography.LG)(templateObject_3$
|
|
1297
|
+
var StyledText = styled__default["default"](reactTypography.LG)(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n margin: ", "px auto;\n color: ", ";\n font-weight: ", ";\n color: ", ";\n user-select: none;\n\n &:focus {\n outline: 0;\n }\n"], ["\n margin: ", "px auto;\n color: ", ";\n font-weight: ", ";\n color: ", ";\n user-select: none;\n\n &:focus {\n outline: 0;\n }\n"])), function (_a) {
|
|
1298
1298
|
var theme = _a.theme;
|
|
1299
1299
|
return theme.space.base;
|
|
1300
1300
|
}, function (_a) {
|
|
@@ -1335,9 +1335,9 @@ var RadioCard = function (_a) {
|
|
|
1335
1335
|
var card = _a.card, icon = _a.icon, iconActive = _a.iconActive, props = __rest(_a, ["card", "icon", "iconActive"]);
|
|
1336
1336
|
return (jsxRuntime.jsxs(StyledCard, __assign({}, card, props, { className: props.checked ? "card-active" : "", onClick: function () { props.onChecked && props.onChecked(props.value); } }, { children: [jsxRuntime.jsx(Circle, __assign({ checked: (_b = props.checked) !== null && _b !== void 0 ? _b : false }, { children: jsxRuntime.jsx(SvgCheckLg, { fill: "white" }) })), jsxRuntime.jsx(IconWrapper, { children: (iconActive && props.checked) ? iconActive : icon }), jsxRuntime.jsx("input", { hidden: true, type: "radio", value: props.value, name: props.name, checked: props.checked }), jsxRuntime.jsx(StyledDivider, {}), jsxRuntime.jsx(StyledText, { children: props.label })] })));
|
|
1337
1337
|
};
|
|
1338
|
-
var templateObject_1$
|
|
1338
|
+
var templateObject_1$D, templateObject_2$f, templateObject_3$a, templateObject_4$7, templateObject_5$3;
|
|
1339
1339
|
|
|
1340
|
-
var UgTextarea = styled__default["default"](reactForms.Textarea)(templateObject_1$
|
|
1340
|
+
var UgTextarea = styled__default["default"](reactForms.Textarea)(templateObject_1$C || (templateObject_1$C = __makeTemplateObject([""], [""])));
|
|
1341
1341
|
/**
|
|
1342
1342
|
* A Textarea is a form control for multi-line text.
|
|
1343
1343
|
* <hr>
|
|
@@ -1345,9 +1345,9 @@ var UgTextarea = styled__default["default"](reactForms.Textarea)(templateObject_
|
|
|
1345
1345
|
* - To enter multi-line text
|
|
1346
1346
|
**/
|
|
1347
1347
|
var Textarea = function (props) { return jsxRuntime.jsx(UgTextarea, __assign({}, props)); };
|
|
1348
|
-
var templateObject_1$
|
|
1348
|
+
var templateObject_1$C;
|
|
1349
1349
|
|
|
1350
|
-
var UgToggle = styled__default["default"](reactForms.Toggle)(templateObject_1$
|
|
1350
|
+
var UgToggle = styled__default["default"](reactForms.Toggle)(templateObject_1$B || (templateObject_1$B = __makeTemplateObject([""], [""])));
|
|
1351
1351
|
/**
|
|
1352
1352
|
* A Toggle lets users turn something on and off like a light switch. Unlike a Checkbox, which is used for selection, a Toggle is used for activation.
|
|
1353
1353
|
* <hr>
|
|
@@ -1358,7 +1358,7 @@ var UgToggle = styled__default["default"](reactForms.Toggle)(templateObject_1$z
|
|
|
1358
1358
|
* - To let users select from a list of settings, use Checkboxes instead
|
|
1359
1359
|
**/
|
|
1360
1360
|
var Toggle = function (props) { return jsxRuntime.jsx(UgToggle, __assign({}, props)); };
|
|
1361
|
-
var templateObject_1$
|
|
1361
|
+
var templateObject_1$B;
|
|
1362
1362
|
|
|
1363
1363
|
var Col = function (props) { return jsxRuntime.jsx(reactGrid.Col, __assign({}, props)); };
|
|
1364
1364
|
|
|
@@ -1423,7 +1423,7 @@ var SvgUgTriangle = function SvgUgTriangle(props) {
|
|
|
1423
1423
|
})));
|
|
1424
1424
|
};
|
|
1425
1425
|
|
|
1426
|
-
var StyledUgIcon$1 = styled__default["default"].span(templateObject_1$
|
|
1426
|
+
var StyledUgIcon$1 = styled__default["default"].span(templateObject_1$A || (templateObject_1$A = __makeTemplateObject([""], [""])));
|
|
1427
1427
|
var Icon = function (props) {
|
|
1428
1428
|
var children = function (type, size) {
|
|
1429
1429
|
if (size === void 0) { size = 24; }
|
|
@@ -1436,9 +1436,9 @@ var Icon = function (props) {
|
|
|
1436
1436
|
};
|
|
1437
1437
|
return (jsxRuntime.jsx(StyledUgIcon$1, { children: children(props.type, props.size) }));
|
|
1438
1438
|
};
|
|
1439
|
-
var templateObject_1$
|
|
1439
|
+
var templateObject_1$A;
|
|
1440
1440
|
|
|
1441
|
-
var UgProgress = styled__default["default"](reactLoaders.Progress)(templateObject_1$
|
|
1441
|
+
var UgProgress = styled__default["default"](reactLoaders.Progress)(templateObject_1$z || (templateObject_1$z = __makeTemplateObject([""], [""])));
|
|
1442
1442
|
/**
|
|
1443
1443
|
* A Progress loader communicates progress when downloading or uploading content.
|
|
1444
1444
|
* <hr>
|
|
@@ -1450,9 +1450,9 @@ var UgProgress = styled__default["default"](reactLoaders.Progress)(templateObjec
|
|
|
1450
1450
|
- When loading page content, use a Skeleton loader instead
|
|
1451
1451
|
*/
|
|
1452
1452
|
var Progress = function (props) { return jsxRuntime.jsx(UgProgress, __assign({}, props)); };
|
|
1453
|
-
var templateObject_1$
|
|
1453
|
+
var templateObject_1$z;
|
|
1454
1454
|
|
|
1455
|
-
var UgSpinner = styled__default["default"](reactLoaders.Spinner)(templateObject_1$
|
|
1455
|
+
var UgSpinner = styled__default["default"](reactLoaders.Spinner)(templateObject_1$y || (templateObject_1$y = __makeTemplateObject([""], [""])));
|
|
1456
1456
|
/**
|
|
1457
1457
|
* Breadcrumbs mark and communicate a user’s location in the product.
|
|
1458
1458
|
* <hr>
|
|
@@ -1461,9 +1461,9 @@ var UgSpinner = styled__default["default"](reactLoaders.Spinner)(templateObject_
|
|
|
1461
1461
|
- To provide a quick way to navigate to ancestor pages
|
|
1462
1462
|
*/
|
|
1463
1463
|
var Spinner = function (props) { return jsxRuntime.jsx(UgSpinner, __assign({}, props)); };
|
|
1464
|
-
var templateObject_1$
|
|
1464
|
+
var templateObject_1$y;
|
|
1465
1465
|
|
|
1466
|
-
var UgBody = styled__default["default"](reactChrome.Body)(templateObject_1$
|
|
1466
|
+
var UgBody = styled__default["default"](reactChrome.Body)(templateObject_1$x || (templateObject_1$x = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
|
|
1467
1467
|
var theme = _a.theme;
|
|
1468
1468
|
return theme.palette.white;
|
|
1469
1469
|
});
|
|
@@ -1471,7 +1471,7 @@ var UgBody = styled__default["default"](reactChrome.Body)(templateObject_1$v ||
|
|
|
1471
1471
|
* A Body defines the main content of an HTML document which displays on the browser
|
|
1472
1472
|
*/
|
|
1473
1473
|
var Body$1 = function (props) { return jsxRuntime.jsx(UgBody, __assign({}, props)); };
|
|
1474
|
-
var templateObject_1$
|
|
1474
|
+
var templateObject_1$x;
|
|
1475
1475
|
|
|
1476
1476
|
/**
|
|
1477
1477
|
* A Content defines the main content of an HTML document which displays on the browser
|
|
@@ -1495,7 +1495,7 @@ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
|
1495
1495
|
})));
|
|
1496
1496
|
};
|
|
1497
1497
|
|
|
1498
|
-
var UgHeaderItem = styled__default["default"](reactChrome.HeaderItem)(templateObject_1$
|
|
1498
|
+
var UgHeaderItem = styled__default["default"](reactChrome.HeaderItem)(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n ", ";\n font-family: ", ";\n"], ["\n ", ";\n font-family: ", ";\n"])), function (props) { return props.hasLogo && "border-right: none"; }, function (_a) {
|
|
1499
1499
|
var theme = _a.theme;
|
|
1500
1500
|
return theme.fonts.system;
|
|
1501
1501
|
});
|
|
@@ -1504,14 +1504,14 @@ styled__default["default"](reactChrome.HeaderItemWrapper)(templateObject_2$e ||
|
|
|
1504
1504
|
return theme.fonts.system;
|
|
1505
1505
|
});
|
|
1506
1506
|
var HeaderItem = function (props) { return jsxRuntime.jsx(UgHeaderItem, __assign({}, props)); };
|
|
1507
|
-
var templateObject_1$
|
|
1507
|
+
var templateObject_1$w, templateObject_2$e;
|
|
1508
1508
|
|
|
1509
|
-
var UgHeaderItemText = styled__default["default"](reactChrome.HeaderItemText)(templateObject_1$
|
|
1509
|
+
var UgHeaderItemText = styled__default["default"](reactChrome.HeaderItemText)(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n font-family: ", ";\n"], ["\n font-family: ", ";\n"])), function (_a) {
|
|
1510
1510
|
var theme = _a.theme;
|
|
1511
1511
|
return theme.fonts.system;
|
|
1512
1512
|
});
|
|
1513
1513
|
var HeaderItemText = function (props) { return jsxRuntime.jsx(UgHeaderItemText, __assign({}, props)); };
|
|
1514
|
-
var templateObject_1$
|
|
1514
|
+
var templateObject_1$v;
|
|
1515
1515
|
|
|
1516
1516
|
var HeaderItemIcon = function (props) { return (jsxRuntime.jsx(reactChrome.HeaderItemIcon, __assign({}, props))); };
|
|
1517
1517
|
|
|
@@ -1570,7 +1570,30 @@ var XL = function (props) { return jsxRuntime.jsx(reactTypography.XL, __assign({
|
|
|
1570
1570
|
var XXL = function (props) { return jsxRuntime.jsx(reactTypography.XXL, __assign({}, props)); };
|
|
1571
1571
|
var XXXL = function (props) { return jsxRuntime.jsx(reactTypography.XXXL, __assign({}, props)); };
|
|
1572
1572
|
|
|
1573
|
-
|
|
1573
|
+
/**
|
|
1574
|
+
* Use Ellipsis to automatically provide text content with a native title attribute and text-overflow styling.
|
|
1575
|
+
*/
|
|
1576
|
+
var Ellipsis = function (props) { return jsxRuntime.jsx(reactTypography.Ellipsis, __assign({}, props)); };
|
|
1577
|
+
|
|
1578
|
+
var StyledEllipsis = styled__default["default"](Ellipsis)(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
1579
|
+
var theme = _a.theme, isCompact = _a.isCompact;
|
|
1580
|
+
return isCompact &&
|
|
1581
|
+
"\n width: ".concat(theme.components.chrome.nav.workspaceDropdownWidth, "px; \n ");
|
|
1582
|
+
});
|
|
1583
|
+
var WorkspacesDropdown = function (props) {
|
|
1584
|
+
var _a = React.useState(props.activeWorkspace), selectedWorkspace = _a[0], setSelectedWorkspace = _a[1];
|
|
1585
|
+
return (jsxRuntime.jsxs(Dropdown, __assign({ selectedItem: selectedWorkspace, onSelect: function (workspace) {
|
|
1586
|
+
setSelectedWorkspace(workspace);
|
|
1587
|
+
props.onWorkspaceChange && props.onWorkspaceChange(workspace);
|
|
1588
|
+
}, downshiftProps: {
|
|
1589
|
+
itemToString: function (item) { return item && item.company; },
|
|
1590
|
+
} }, { children: [jsxRuntime.jsx(reactDropdowns.Field, { children: jsxRuntime.jsx(Select, __assign({ style: { color: theme.colors.primaryHue } }, { children: jsxRuntime.jsx(StyledEllipsis, __assign({ isCompact: props.isCompact }, { children: selectedWorkspace
|
|
1591
|
+
? selectedWorkspace.company + "'s workspace"
|
|
1592
|
+
: "Select workspace" })) })) }), jsxRuntime.jsxs(Menu, { children: [jsxRuntime.jsx(MenuHeaderItem, { children: jsxRuntime.jsx(MD, __assign({ isBold: true, style: { color: theme.palette.grey[800] } }, { children: props.workspacesLabel || "Workspaces" })) }), jsxRuntime.jsx(Separator, {}), props.workspaces && props.workspaces.map(function (item) { return (jsxRuntime.jsx(Item, __assign({ value: item }, { children: item.company }))); })] })] })));
|
|
1593
|
+
};
|
|
1594
|
+
var templateObject_1$u;
|
|
1595
|
+
|
|
1596
|
+
var LogoIconContainer = styled__default["default"](reactChrome.HeaderItem)(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n margin-right: 2px;\n border-right: none;\n @media (max-width: ", ") {\n right: 0;\n left: 0;\n margin-right: auto;\n margin-left: auto;\n position: absolute;\n }\n"], ["\n margin-right: 2px;\n border-right: none;\n @media (max-width: ", ") {\n right: 0;\n left: 0;\n margin-right: auto;\n margin-left: auto;\n position: absolute;\n }\n"])), function (_a) {
|
|
1574
1597
|
var theme = _a.theme;
|
|
1575
1598
|
return theme.breakpoints.sm;
|
|
1576
1599
|
});
|
|
@@ -1584,7 +1607,7 @@ var BrandName = styled__default["default"](reactChrome.HeaderItem)(templateObjec
|
|
|
1584
1607
|
var theme = _a.theme;
|
|
1585
1608
|
return theme.breakpoints.sm;
|
|
1586
1609
|
});
|
|
1587
|
-
var DropdownItem = styled__default["default"](reactChrome.HeaderItem)(templateObject_3$
|
|
1610
|
+
var DropdownItem = styled__default["default"](reactChrome.HeaderItem)(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject(["\n margin-right: auto;\n margin-left: -8px;\n color: ", ";\n font-family: ", ";\n z-index: 2;\n @media (max-width: ", ") {\n display: none;\n }\n"], ["\n margin-right: auto;\n margin-left: -8px;\n color: ", ";\n font-family: ", ";\n z-index: 2;\n @media (max-width: ", ") {\n display: none;\n }\n"])), function (_a) {
|
|
1588
1611
|
var theme = _a.theme;
|
|
1589
1612
|
return theme.palette.blue["600"];
|
|
1590
1613
|
}, function (_a) {
|
|
@@ -1602,19 +1625,11 @@ var MenuItem$1 = styled__default["default"](reactChrome.HeaderItem)(templateObje
|
|
|
1602
1625
|
return theme.breakpoints.sm;
|
|
1603
1626
|
});
|
|
1604
1627
|
var BrandItem = function (props) {
|
|
1605
|
-
|
|
1606
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(MenuItem$1, __assign({}, props, { onClick: props.toggleMenu }, { children: [jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(SvgMenuStroke, {}) }), props.menuLabel && jsxRuntime.jsx(HeaderItemText, { children: props.menuLabel })] })), jsxRuntime.jsx(LogoIconContainer, __assign({}, props, { hasLogo: true }, { children: jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(Logo, { type: "icon", size: 150 }) }) })), props.workspaces && props.workspaces.length > 1 ? (jsxRuntime.jsx(DropdownItem, { children: jsxRuntime.jsxs(Dropdown, __assign({ selectedItem: selectedWorkspace, onSelect: function (workspace) {
|
|
1607
|
-
setSelectedWorkspace(workspace);
|
|
1608
|
-
props.onWorkspaceChange && props.onWorkspaceChange(workspace);
|
|
1609
|
-
}, downshiftProps: {
|
|
1610
|
-
itemToString: function (item) { return item && item.company; },
|
|
1611
|
-
} }, { children: [jsxRuntime.jsx(reactDropdowns.Field, { children: jsxRuntime.jsx(Select, __assign({ style: { color: theme.colors.primaryHue } }, { children: selectedWorkspace
|
|
1612
|
-
? selectedWorkspace.company + "'s workspace"
|
|
1613
|
-
: "Select workspace" })) }), jsxRuntime.jsxs(Menu, { children: [jsxRuntime.jsx(MenuHeaderItem, { children: jsxRuntime.jsx(MD, __assign({ isBold: true, style: { color: theme.palette.grey[800] } }, { children: props.workspacesLabel || "Workspaces" })) }), jsxRuntime.jsx(Separator, {}), props.workspaces.map(function (item) { return (jsxRuntime.jsx(Item, __assign({ value: item }, { children: item.company }))); })] })] })) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.brandName && (jsxRuntime.jsx(BrandName, __assign({}, props, { children: jsxRuntime.jsx(HeaderItemText, { children: props.brandName }) }))) }))] }));
|
|
1628
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(MenuItem$1, __assign({}, props, { onClick: props.toggleMenu }, { children: [jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(SvgMenuStroke, {}) }), props.menuLabel && jsxRuntime.jsx(HeaderItemText, { children: props.menuLabel })] })), jsxRuntime.jsx(LogoIconContainer, __assign({}, props, { hasLogo: true }, { children: jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(Logo, { type: "icon", size: 150 }) }) })), props.workspaces && props.workspaces.length > 1 ? (jsxRuntime.jsx(DropdownItem, { children: jsxRuntime.jsx(WorkspacesDropdown, { workspaces: props.workspaces, workspacesLabel: props.workspacesLabel, activeWorkspace: props.activeWorkspace, onWorkspaceChange: props.onWorkspaceChange }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.brandName && (jsxRuntime.jsx(BrandName, __assign({}, props, { children: jsxRuntime.jsx(HeaderItemText, { children: props.brandName }) }))) }))] }));
|
|
1614
1629
|
};
|
|
1615
|
-
var templateObject_1$
|
|
1630
|
+
var templateObject_1$t, templateObject_2$d, templateObject_3$9, templateObject_4$6;
|
|
1616
1631
|
|
|
1617
|
-
var UgHeader = styled__default["default"](reactChrome.Header)(templateObject_1$
|
|
1632
|
+
var UgHeader = styled__default["default"](reactChrome.Header)(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n height: ", ";\n"], ["\n height: ", ";\n"])), theme.components.chrome.header.height);
|
|
1618
1633
|
/**
|
|
1619
1634
|
* An Header is a visual way to display general information.
|
|
1620
1635
|
* This can include navList Items, modal, profile settings.
|
|
@@ -1623,13 +1638,13 @@ var Header = function (props) { return jsxRuntime.jsx(UgHeader, __assign({}, pro
|
|
|
1623
1638
|
Header.HeaderItem = HeaderItem;
|
|
1624
1639
|
Header.HeaderItemText = HeaderItemText;
|
|
1625
1640
|
Header.HeaderItemIcon = HeaderItemIcon;
|
|
1626
|
-
var templateObject_1$
|
|
1641
|
+
var templateObject_1$s;
|
|
1627
1642
|
|
|
1628
1643
|
var HeaderSkeleton = function () {
|
|
1629
|
-
return (jsxRuntime.jsxs(Header, __assign({ isStandalone: true }, { children: [jsxRuntime.jsx(LogoIconContainer, __assign({ hasLogo: true }, { children: jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(Logo, { type: "icon", size: 150 }) }) })), jsxRuntime.jsx(HeaderItem, __assign({ style: { marginRight: "auto", marginLeft: "-4px" } }, { children: jsxRuntime.jsx(Skeleton, { width: "200px", height: theme.space.sm }) })), jsxRuntime.jsx(HeaderItem, __assign({ isRound: true }, { children: jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(Skeleton, { width: "32px", height: "32px", style: { borderRadius: "100%" } }) }) }) }))] })));
|
|
1644
|
+
return (jsxRuntime.jsxs(Header, __assign({ isStandalone: true }, { children: [jsxRuntime.jsx(LogoIconContainer, __assign({ hasLogo: true }, { children: jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(Logo, { type: "icon", size: 150 }) }) })), jsxRuntime.jsx(HeaderItem, __assign({ style: { marginRight: "auto", marginLeft: "-4px" } }, { children: window.matchMedia("only screen and (min-width: 576px)").matches ? (jsxRuntime.jsx(Skeleton, { width: "200px", height: theme.space.sm })) : (jsxRuntime.jsx(Skeleton, { width: "80px", height: theme.space.sm, style: { marginLeft: theme.space.sm } })) })), jsxRuntime.jsx(HeaderItem, __assign({ isRound: true }, { children: jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(Skeleton, { width: "32px", height: "32px", style: { borderRadius: "100%" } }) }) }) }))] })));
|
|
1630
1645
|
};
|
|
1631
1646
|
|
|
1632
|
-
var ChevronButton = styled__default["default"](IconButton)(templateObject_1$
|
|
1647
|
+
var ChevronButton = styled__default["default"](IconButton)(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n @media (max-width: ", ") {\n display: none;\n }\n"], ["\n @media (max-width: ", ") {\n display: none;\n }\n"])), function (_a) {
|
|
1633
1648
|
var theme = _a.theme;
|
|
1634
1649
|
return theme.breakpoints.sm;
|
|
1635
1650
|
});
|
|
@@ -1641,9 +1656,9 @@ var AppHeader = function (_a) {
|
|
|
1641
1656
|
var brand = _a.brand, avatar = _a.avatar, isLoading = _a.isLoading, args = __rest(_a, ["brand", "avatar", "isLoading"]);
|
|
1642
1657
|
return isLoading ? jsxRuntime.jsx(HeaderSkeleton, {}) : (jsxRuntime.jsxs(Header, __assign({}, args, { children: [jsxRuntime.jsx(BrandItem, __assign({}, brand, { toggleMenu: args.onSidebarMenuToggle })), args.hasChangelog && args.changelogItem && (jsxRuntime.jsx(HeaderItem, __assign({ style: { marginRight: "-" + theme.space.xs } }, { children: jsxRuntime.jsx(HeaderItemIcon, { children: args.changelogItem }) }))), jsxRuntime.jsx(HeaderItem, __assign({ isRound: true, onClick: args.onProfileModalToggle }, { children: jsxRuntime.jsx(HeaderItemIcon, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Avatar, __assign({}, avatar)), jsxRuntime.jsx(ChevronButton, __assign({ size: "small", isRotated: args.isProfileModalOpen }, { children: jsxRuntime.jsx(SvgChevronDownStroke, {}) }))] }) }) }))] })));
|
|
1643
1658
|
};
|
|
1644
|
-
var templateObject_1$
|
|
1659
|
+
var templateObject_1$r;
|
|
1645
1660
|
|
|
1646
|
-
var UgNav = styled__default["default"](reactChrome.Nav)(templateObject_1$
|
|
1661
|
+
var UgNav = styled__default["default"](reactChrome.Nav)(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n border-right: ", ";\n border-color: ", ";\n ", "\n transition: width 0.25s ease-in-out;\n padding-top: ", ";\n @media (min-width: ", ") {\n padding-left: ", ";\n }\n"], ["\n border-right: ", ";\n border-color: ", ";\n ", "\n transition: width 0.25s ease-in-out;\n padding-top: ", ";\n @media (min-width: ", ") {\n padding-left: ", ";\n }\n"])), function (_a) {
|
|
1647
1662
|
var theme = _a.theme;
|
|
1648
1663
|
return theme.borders.sm;
|
|
1649
1664
|
}, function (_a) {
|
|
@@ -1651,8 +1666,8 @@ var UgNav = styled__default["default"](reactChrome.Nav)(templateObject_1$p || (t
|
|
|
1651
1666
|
return reactTheming.getColor(theme.colors.neutralHue, 300);
|
|
1652
1667
|
}, function (props) {
|
|
1653
1668
|
return "\n width: ".concat(props.isExpanded
|
|
1654
|
-
? props.theme.
|
|
1655
|
-
: props.theme.
|
|
1669
|
+
? props.theme.components.chrome.nav.openWidth
|
|
1670
|
+
: props.theme.components.chrome.nav.closedWidth, "px;\n @media (max-width: ").concat(props.theme.breakpoints.sm, ") {\n width: ").concat(props.isExpanded ? "100%" : "0", ";\n border-right: none;\n }\n ");
|
|
1656
1671
|
}, function (_a) {
|
|
1657
1672
|
var theme = _a.theme;
|
|
1658
1673
|
return theme.space.sm;
|
|
@@ -1670,9 +1685,9 @@ var UgNav = styled__default["default"](reactChrome.Nav)(templateObject_1$p || (t
|
|
|
1670
1685
|
- To give a consistent dashboard and navigation experience
|
|
1671
1686
|
*/
|
|
1672
1687
|
var Nav = function (props) { return jsxRuntime.jsx(UgNav, __assign({}, props)); };
|
|
1673
|
-
var templateObject_1$
|
|
1688
|
+
var templateObject_1$q;
|
|
1674
1689
|
|
|
1675
|
-
var SelectedItemStyle = styled.css(templateObject_1$
|
|
1690
|
+
var SelectedItemStyle = styled.css(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (props) { return props.theme.palette.kale["100"]; });
|
|
1676
1691
|
var UgNavItem$2 = styled__default["default"](reactChrome.NavItem)(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n font-family: ", ";\n ", "\n ", "\n &:hover, &:focus {\n ", "\n }\n opacity: 1;\n color: ", ";\n font-weight: ", ";\n ", "\n"], ["\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n font-family: ", ";\n ", "\n ", "\n &:hover, &:focus {\n ", "\n }\n opacity: 1;\n color: ", ";\n font-weight: ", ";\n ", "\n"])), function (props) { return props.theme.space.base * 6; }, function (props) { return props.theme.space.base * 6; }, function (_a) {
|
|
1677
1692
|
var theme = _a.theme;
|
|
1678
1693
|
return theme.fonts.system;
|
|
@@ -1684,16 +1699,11 @@ var NavItem = function (props) {
|
|
|
1684
1699
|
// const { isExpanded } = props;
|
|
1685
1700
|
return jsxRuntime.jsx(UgNavItem$2, __assign({}, props));
|
|
1686
1701
|
};
|
|
1687
|
-
var templateObject_1$
|
|
1702
|
+
var templateObject_1$p, templateObject_2$c;
|
|
1688
1703
|
|
|
1689
|
-
var UgNavIcon = styled__default["default"](reactChrome.NavItemIcon)(templateObject_1$
|
|
1704
|
+
var UgNavIcon = styled__default["default"](reactChrome.NavItemIcon)(templateObject_1$o || (templateObject_1$o = __makeTemplateObject([""], [""])));
|
|
1690
1705
|
var NavItemIcon = function (props) { return jsxRuntime.jsx(UgNavIcon, __assign({}, props)); };
|
|
1691
|
-
var templateObject_1$
|
|
1692
|
-
|
|
1693
|
-
/**
|
|
1694
|
-
* Use Ellipsis to automatically provide text content with a native title attribute and text-overflow styling.
|
|
1695
|
-
*/
|
|
1696
|
-
var Ellipsis = function (props) { return jsxRuntime.jsx(reactTypography.Ellipsis, __assign({}, props)); };
|
|
1706
|
+
var templateObject_1$o;
|
|
1697
1707
|
|
|
1698
1708
|
var NavItemText = function (props) { return (jsxRuntime.jsx(reactChrome.NavItemText, __assign({}, props, { children: jsxRuntime.jsx(Ellipsis, __assign({ style: { width: "200px" } }, { children: props.children })) }))); };
|
|
1699
1709
|
|
|
@@ -1731,7 +1741,7 @@ var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
|
|
|
1731
1741
|
})));
|
|
1732
1742
|
};
|
|
1733
1743
|
|
|
1734
|
-
var StyledToggle = styled__default["default"](IconButton)(templateObject_1$
|
|
1744
|
+
var StyledToggle = styled__default["default"](IconButton)(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n width: ", "px;\n height: ", "px;\n min-width: ", ";\n position: absolute;\n top: ", "px;\n right: -", "px;\n background: ", "};\n z-index: 1;\n @media (max-width: ", ") {\n display: none;\n }\n"], ["\n width: ", "px;\n height: ", "px;\n min-width: ", ";\n position: absolute;\n top: ", "px;\n right: -", "px;\n background: ", "};\n z-index: 1;\n @media (max-width: ", ") {\n display: none;\n }\n"])), function (_a) {
|
|
1735
1745
|
var theme = _a.theme;
|
|
1736
1746
|
return theme.space.base * 6;
|
|
1737
1747
|
}, function (_a) {
|
|
@@ -1756,18 +1766,18 @@ var StyledToggle = styled__default["default"](IconButton)(templateObject_1$m ||
|
|
|
1756
1766
|
var NavToggle = function (props) {
|
|
1757
1767
|
return (jsxRuntime.jsx(StyledToggle, __assign({}, props, { isPrimary: true, size: "small" }, { children: props.isExpanded ? (jsxRuntime.jsx(SvgChevronLeftStroke, { style: { width: "100%" } })) : (jsxRuntime.jsx(SvgChevronRightStroke, { style: { width: "100%" } })) })));
|
|
1758
1768
|
};
|
|
1759
|
-
var templateObject_1$
|
|
1769
|
+
var templateObject_1$n;
|
|
1760
1770
|
|
|
1761
|
-
var UgNavItem$1 = styled__default["default"](reactChrome.NavItem)(templateObject_1$
|
|
1771
|
+
var UgNavItem$1 = styled__default["default"](reactChrome.NavItem)(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n width: 100%;\n min-height: ", ";\n opacity: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n padding-right: ", ";\n pointer-events: none;\n\n &:after {\n background: ", ";\n height: 1px;\n flex: 1;\n content: \"\";\n }\n\n span {\n background: #fff;\n margin: 0;\n margin-right: ", ";\n color: ", ";\n font-size: ", ";\n }\n ", "\n"], ["\n width: 100%;\n min-height: ", ";\n opacity: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n padding-right: ", ";\n pointer-events: none;\n\n &:after {\n background: ", ";\n height: 1px;\n flex: 1;\n content: \"\";\n }\n\n span {\n background: #fff;\n margin: 0;\n margin-right: ", ";\n color: ", ";\n font-size: ", ";\n }\n ", "\n"])), function (props) { return props.theme.space.lg; }, function (props) { return props.theme.space.sm; }, function (props) { return props.theme.palette.grey["200"]; }, function (props) { return props.theme.space.sm; }, function (props) { return props.theme.palette.grey["500"]; }, function (props) { return props.theme.fontSizes.sm; }, function (props) { return !props.isExpanded && "display: none;"; });
|
|
1762
1772
|
var NavDivider = function (props) { return (jsxRuntime.jsx(UgNavItem$1, __assign({}, props, { children: jsxRuntime.jsx("span", { children: props.children }) }))); };
|
|
1763
|
-
var templateObject_1$
|
|
1773
|
+
var templateObject_1$m;
|
|
1764
1774
|
|
|
1765
|
-
var UgProjectSubtitle = styled__default["default"](NavItemText)(templateObject_1$
|
|
1775
|
+
var UgProjectSubtitle = styled__default["default"](NavItemText)(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n"], ["\n color: ", ";\n font-size: ", ";\n"])), function (props) { return props.theme.palette.grey["500"]; }, function (props) { return props.theme.fontSizes.sm; });
|
|
1766
1776
|
var UgNavItem = styled__default["default"](NavItem)(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n flex-flow: column;\n align-items: flex-start;\n"], ["\n flex-flow: column;\n align-items: flex-start;\n"])));
|
|
1767
1777
|
var NavItemProject = function (props) { return jsxRuntime.jsx(UgNavItem, __assign({}, props)); };
|
|
1768
1778
|
NavItemProject.Title = NavItemText;
|
|
1769
1779
|
NavItemProject.SubTitle = UgProjectSubtitle;
|
|
1770
|
-
var templateObject_1$
|
|
1780
|
+
var templateObject_1$l, templateObject_2$b;
|
|
1771
1781
|
|
|
1772
1782
|
var _path$7;
|
|
1773
1783
|
|
|
@@ -1854,13 +1864,23 @@ var SvgToken = function SvgToken(props) {
|
|
|
1854
1864
|
})))));
|
|
1855
1865
|
};
|
|
1856
1866
|
|
|
1857
|
-
var
|
|
1858
|
-
var isExpanded =
|
|
1859
|
-
return
|
|
1860
|
-
};
|
|
1867
|
+
var StyledNav = styled__default["default"](Nav)(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n ", ";\n"], ["\n ", ";\n"])), function (_a) {
|
|
1868
|
+
var isExpanded = _a.isExpanded, theme = _a.theme;
|
|
1869
|
+
return isExpanded && "width: ".concat(theme.components.chrome.nav.openWidth);
|
|
1870
|
+
});
|
|
1871
|
+
var LoadingSidebar = function (props) {
|
|
1872
|
+
var isExpanded = props.isExpanded;
|
|
1873
|
+
return (jsxRuntime.jsxs(StyledNav, __assign({}, props, { isExpanded: isExpanded }, { children: [jsxRuntime.jsx(NavToggle, { isExpanded: isExpanded }), jsxRuntime.jsxs(NavItem, __assign({ isExpanded: isExpanded, isCurrent: true }, { children: [jsxRuntime.jsx(NavItemIcon, __assign({ isStyled: true }, { children: jsxRuntime.jsx(Skeleton, { width: "32px", height: "32px", style: { borderRadius: "100%" } }) })), jsxRuntime.jsx(Skeleton, { height: "12px", width: "60%" }), jsxRuntime.jsx(NavItemText, {})] })), jsxRuntime.jsx(NavDivider, { isExpanded: isExpanded }), jsxRuntime.jsxs(NavItemProject, __assign({ isExpanded: isExpanded, isCurrent: false }, { children: [jsxRuntime.jsx(Skeleton, { width: "60%", style: { marginBottom: "6px" } }), jsxRuntime.jsx(Skeleton, { height: "12px", width: "80%" })] }), 1), jsxRuntime.jsxs(NavItemProject, __assign({ isExpanded: isExpanded, isCurrent: false }, { children: [jsxRuntime.jsx(Skeleton, { width: "60%", style: { marginBottom: "6px" } }), jsxRuntime.jsx(Skeleton, { height: "12px", width: "80%" })] }), 2), jsxRuntime.jsxs(NavItemProject, __assign({ isExpanded: isExpanded, isCurrent: false }, { children: [jsxRuntime.jsx(Skeleton, { width: "60%", style: { marginBottom: "6px" } }), jsxRuntime.jsx(Skeleton, { height: "12px", width: "80%" })] }), 3), jsxRuntime.jsxs(NavItemProject, __assign({ isExpanded: isExpanded, isCurrent: false }, { children: [jsxRuntime.jsx(Skeleton, { width: "60%", style: { marginBottom: "6px" } }), jsxRuntime.jsx(Skeleton, { height: "12px", width: "80%" })] }), 3), jsxRuntime.jsxs(NavItem, __assign({ isExpanded: isExpanded, hasBrandmark: true, title: "Be smart from the start", style: { pointerEvents: "none" } }, { children: [jsxRuntime.jsx(NavItemIcon, { children: jsxRuntime.jsx(Skeleton, { width: "32px", height: "32px", style: { borderRadius: "100%" } }) }), jsxRuntime.jsx(NavItemText, { children: "UNGUESS" })] }))] })));
|
|
1874
|
+
};
|
|
1875
|
+
var templateObject_1$k;
|
|
1861
1876
|
|
|
1862
1877
|
var TokenContainer = styled__default["default"].div(templateObject_1$j || (templateObject_1$j = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
1863
1878
|
var ScrollingContainer = styled__default["default"].div(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n order: 1;\n overflow-y: auto;\n height: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n order: 1;\n overflow-y: auto;\n height: 100%;\n"])));
|
|
1879
|
+
var StyledNavItem = styled__default["default"](NavItem)(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject(["\n ", ";\n\n &:hover,\n &:focus {\n background-color: white;\n }\n"], ["\n ", ";\n\n &:hover,\n &:focus {\n background-color: white;\n }\n"])), function (_a) {
|
|
1880
|
+
var isExpanded = _a.isExpanded;
|
|
1881
|
+
return isExpanded &&
|
|
1882
|
+
"\n display: block;\n padding-right: ".concat(theme.space.md, ";\n ");
|
|
1883
|
+
});
|
|
1864
1884
|
/**
|
|
1865
1885
|
* The UNGUESS Sidebar component provides a high-level layout structure and sets a framework for navigating around projects.
|
|
1866
1886
|
* <br>
|
|
@@ -1869,6 +1889,7 @@ var ScrollingContainer = styled__default["default"].div(templateObject_2$a || (t
|
|
|
1869
1889
|
*/
|
|
1870
1890
|
var Sidebar = function (props) {
|
|
1871
1891
|
var _a = React.useState(props.currentRoute || "home"), nav = _a[0], setNav = _a[1];
|
|
1892
|
+
var showWorkspacesDropdown = window.matchMedia("only screen and (min-width: ".concat(theme.breakpoints.sm, ")")).matches;
|
|
1872
1893
|
var toggleNav = function () {
|
|
1873
1894
|
props.onToggleMenu && props.onToggleMenu();
|
|
1874
1895
|
};
|
|
@@ -1876,10 +1897,13 @@ var Sidebar = function (props) {
|
|
|
1876
1897
|
props.onNavToggle && props.onNavToggle(route);
|
|
1877
1898
|
setNav(route);
|
|
1878
1899
|
};
|
|
1879
|
-
|
|
1900
|
+
var padding = props.tokens ? {
|
|
1901
|
+
paddingBottom: 0
|
|
1902
|
+
} : {};
|
|
1903
|
+
return props.isLoading ? (jsxRuntime.jsx(LoadingSidebar, __assign({}, props))) : (jsxRuntime.jsxs(Nav, __assign({}, props, { children: [jsxRuntime.jsx(NavToggle, { onClick: toggleNav, isExpanded: props.isExpanded }), showWorkspacesDropdown && props.workspaces && props.workspaces.length > 1 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(StyledNavItem, __assign({ hasLogo: true, isExpanded: props.isExpanded, style: padding }, { children: jsxRuntime.jsx(WorkspacesDropdown, { workspaces: props.workspaces, workspacesLabel: props.workspacesLabel, activeWorkspace: props.activeWorkspace, onWorkspaceChange: props.onWorkspaceChange }) })), props.tokens && (jsxRuntime.jsx(NavDivider, { isExpanded: props.isExpanded, style: { order: 0 } }))] })), props.tokens && (jsxRuntime.jsx(StyledNavItem, __assign({ hasLogo: true, isExpanded: props.isExpanded, style: { pointerEvents: "none", paddingTop: 0 } }, { children: jsxRuntime.jsx(Card, __assign({ style: { padding: theme.space.sm } }, { children: jsxRuntime.jsxs(TokenContainer, { children: [jsxRuntime.jsx(SvgToken, { width: 32 }), jsxRuntime.jsx(Span, __assign({ isBold: true, style: { marginLeft: theme.space.xs, color: theme.palette.grey[800] } }, { children: props.tokens + " " + (props.tokensLabel || "tokens") }))] }) })) }))), jsxRuntime.jsxs(NavItem, __assign({ isExpanded: props.isExpanded, isCurrent: nav === "home", onClick: function () { return navigate("home"); } }, { children: [jsxRuntime.jsx(NavItemIcon, __assign({ isStyled: true }, { children: nav === "home" ? jsxRuntime.jsx(SvgHomeFillStyled, {}) : jsxRuntime.jsx(SvgHomeFill, {}) })), jsxRuntime.jsx(NavItemText, { children: props.homeItemLabel || "My Campaigns" })] })), jsxRuntime.jsx(NavDivider, __assign({ isExpanded: props.isExpanded }, { children: props.dividerLabel || "" })), jsxRuntime.jsx(ScrollingContainer, { children: props.projects &&
|
|
1880
1904
|
props.projects.map(function (project) { return (jsxRuntime.jsxs(NavItemProject, __assign({ isExpanded: props.isExpanded, isCurrent: nav === project.id, onClick: function () { return navigate(project.id); } }, { children: [jsxRuntime.jsx(NavItemProject.Title, { title: project.title, children: project.title }), jsxRuntime.jsx(NavItemProject.SubTitle, { children: project.campaigns })] }), project.id)); }) }), jsxRuntime.jsxs(NavItem, __assign({ isExpanded: props.isExpanded, hasBrandmark: true, title: "Be smart from the start", style: { pointerEvents: "none", paddingBottom: theme.space.md } }, { children: [jsxRuntime.jsx(NavItemIcon, { children: jsxRuntime.jsx(Logo, { type: "icon", size: 150 }) }), jsxRuntime.jsx(NavItemText, { children: "UNGUESS" })] }))] })));
|
|
1881
1905
|
};
|
|
1882
|
-
var templateObject_1$j, templateObject_2$a;
|
|
1906
|
+
var templateObject_1$j, templateObject_2$a, templateObject_3$8;
|
|
1883
1907
|
|
|
1884
1908
|
var UgMain = styled__default["default"](reactChrome.Main)(templateObject_1$i || (templateObject_1$i = __makeTemplateObject(["\n @media (min-width: ", ") {\n margin: ", "\n }\n \n /* hide scrollbar for IE, Edge and Firefox */\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n ::-webkit-scrollbar {\n display: none;\n }\n \n"], ["\n @media (min-width: ", ") {\n margin: ", "\n }\n \n /* hide scrollbar for IE, Edge and Firefox */\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n ::-webkit-scrollbar {\n display: none;\n }\n \n"])), function (_a) {
|
|
1885
1909
|
var theme = _a.theme;
|
|
@@ -1896,7 +1920,8 @@ var templateObject_1$i;
|
|
|
1896
1920
|
|
|
1897
1921
|
var StyledHr = styled__default["default"].hr(templateObject_1$h || (templateObject_1$h = __makeTemplateObject(["\n margin: ", "px 0 ", "px 0;\n border: none;\n border-top: 1px solid ", ";\n"], ["\n margin: ", "px 0 ", "px 0;\n border: none;\n border-top: 1px solid ", ";\n"])), theme.space.base * 6, theme.space.base * 8, theme.palette.grey[300]);
|
|
1898
1922
|
var PageLoader = function () {
|
|
1899
|
-
|
|
1923
|
+
var isSidebarOpen = window.matchMedia("only screen and (min-width: 576px)").matches;
|
|
1924
|
+
return (jsxRuntime.jsx(reactChrome.Chrome, __assign({ isFluid: true, hue: theme.palette.white }, { children: jsxRuntime.jsxs(Body$1, { children: [jsxRuntime.jsx(AppHeader, { isLoading: true }), jsxRuntime.jsxs(Content, { children: [jsxRuntime.jsx(Sidebar, { isExpanded: isSidebarOpen, isLoading: true }), jsxRuntime.jsxs(Main, { children: [jsxRuntime.jsx(Skeleton, { width: "30%", height: "32px", style: { marginTop: theme.space.sm, marginLeft: theme.space.sm } }), jsxRuntime.jsx(StyledHr, { style: { margin: "24px 0" } }), jsxRuntime.jsxs(Row$1, { children: [jsxRuntime.jsx(Col, __assign({ xs: 12, md: 6, lg: 3 }, { children: jsxRuntime.jsx(CampaignCard, { isLoading: true, projectTitle: "", campaignTitle: "", date: "" }) })), jsxRuntime.jsx(Col, __assign({ xs: 12, md: 6, lg: 3 }, { children: jsxRuntime.jsx(CampaignCard, { isLoading: true, projectTitle: "", campaignTitle: "", date: "" }) })), jsxRuntime.jsx(Col, __assign({ xs: 12, md: 6, lg: 3 }, { children: jsxRuntime.jsx(CampaignCard, { isLoading: true, projectTitle: "", campaignTitle: "", date: "" }) })), jsxRuntime.jsx(Col, __assign({ xs: 12, md: 6, lg: 3 }, { children: jsxRuntime.jsx(CampaignCard, { isLoading: true, projectTitle: "", campaignTitle: "", date: "" }) }))] })] })] })] }) })));
|
|
1900
1925
|
};
|
|
1901
1926
|
var templateObject_1$h;
|
|
1902
1927
|
|
|
@@ -24,7 +24,14 @@ export interface HeaderItemArgs extends IHeaderItemProps {
|
|
|
24
24
|
/** Applies header logo styles to the item */
|
|
25
25
|
hasLogo?: boolean;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface WorkspaceDropdownArgs {
|
|
28
|
+
workspaces?: Workspace[];
|
|
29
|
+
activeWorkspace?: Workspace;
|
|
30
|
+
workspacesLabel?: string;
|
|
31
|
+
onWorkspaceChange?: (workspace: Workspace) => void;
|
|
32
|
+
isCompact?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface BrandItemArgs extends ButtonHTMLAttributes<HTMLButtonElement>, WorkspaceDropdownArgs {
|
|
28
35
|
/** Maximizes the width of a flex item in the header */
|
|
29
36
|
maxX?: boolean;
|
|
30
37
|
/** Maximizes the height of the item (i.e. contains a search input) */
|
|
@@ -35,10 +42,6 @@ export interface BrandItemArgs extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
35
42
|
brandName?: string;
|
|
36
43
|
/** Add a descriptive text to the menu item icon*/
|
|
37
44
|
menuLabel?: string;
|
|
38
|
-
workspacesLabel?: string;
|
|
39
|
-
activeWorkspace?: Workspace;
|
|
40
|
-
workspaces?: Workspace[];
|
|
41
|
-
onWorkspaceChange?: (workspace: Workspace) => void;
|
|
42
45
|
/** Triggered when the menu item is clicked */
|
|
43
46
|
toggleMenu?: () => void;
|
|
44
47
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { WorkspaceDropdownArgs } from "../header/header-item/_types";
|
|
1
2
|
import { NavArgs } from "../nav/_types";
|
|
2
|
-
export interface SidebarArgs extends NavArgs {
|
|
3
|
+
export interface SidebarArgs extends NavArgs, WorkspaceDropdownArgs {
|
|
3
4
|
projects?: Array<ProjectItem>;
|
|
4
5
|
currentRoute?: string;
|
|
5
6
|
homeItemLabel?: string;
|
|
@@ -4,6 +4,8 @@ import { SidebarArgs } from "./_types";
|
|
|
4
4
|
interface SidebarStoryArgs extends SidebarArgs {
|
|
5
5
|
}
|
|
6
6
|
export declare const Default: Story<SidebarStoryArgs>;
|
|
7
|
+
export declare const MultipleWorkspaces: Story<SidebarStoryArgs>;
|
|
7
8
|
export declare const WithTokens: Story<SidebarStoryArgs>;
|
|
9
|
+
export declare const WithAll: Story<SidebarStoryArgs>;
|
|
8
10
|
declare const _default: ComponentMeta<(props: SidebarArgs) => JSX.Element>;
|
|
9
11
|
export default _default;
|