@appquality/unguess-design-system 2.12.54 → 2.12.55
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 +13 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +263 -25
- package/build/stories/lightbox/_types.d.ts +3 -0
- package/build/stories/lightbox/index.d.ts +11 -0
- package/build/stories/lightbox/index.stories.d.ts +21 -0
- package/build/stories/lightbox/parts/body.d.ts +8 -0
- package/build/stories/lightbox/parts/footer.d.ts +2 -0
- package/build/stories/modals/index.d.ts +6 -6
- package/build/stories/modals/index.stories.d.ts +1 -2
- package/build/stories/slider/_types.d.ts +9 -0
- package/build/stories/slider/index.d.ts +14 -0
- package/build/stories/slider/index.stories.d.ts +18 -0
- package/build/stories/slider/parts/buttons.d.ts +3 -0
- package/build/stories/slider/parts/container.d.ts +1 -0
- package/build/stories/slider/parts/counter.d.ts +4 -0
- package/build/stories/slider/parts/slickSlider.d.ts +3 -0
- package/build/stories/slider/parts/slide.d.ts +2 -0
- package/build/stories/slider/parts/sliderContext.d.ts +7 -0
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# v2.12.55 (Mon Jan 16 2023)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Add slider and awesome lightbox [#175](https://github.com/AppQuality/unguess-design-system/pull/175) ([@cannarocks](https://github.com/cannarocks))
|
|
6
|
+
- UN-297-lightbox [#172](https://github.com/AppQuality/unguess-design-system/pull/172) ([@cannarocks](https://github.com/cannarocks))
|
|
7
|
+
|
|
8
|
+
#### Authors: 1
|
|
9
|
+
|
|
10
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# v2.12.54 (Fri Jan 13 2023)
|
|
2
15
|
|
|
3
16
|
#### 🐛 Bug Fix
|
package/build/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export * from "./stories/grid/row";
|
|
|
48
48
|
export * from "./stories/grid/grid";
|
|
49
49
|
export * from "./stories/icons";
|
|
50
50
|
export * from "./stories/label";
|
|
51
|
+
export * from "./stories/lightbox";
|
|
51
52
|
export * from "./stories/loaders/progress";
|
|
52
53
|
export * from "./stories/loaders/skeleton";
|
|
53
54
|
export * from "./stories/loaders/spinner";
|
|
@@ -71,6 +72,7 @@ export * from "./stories/notifications";
|
|
|
71
72
|
export * from "./stories/pagination";
|
|
72
73
|
export * from "./stories/navigation/page-header";
|
|
73
74
|
export * from "./stories/profile-modal";
|
|
75
|
+
export * from "./stories/slider";
|
|
74
76
|
export * from "./stories/stepper";
|
|
75
77
|
export { Table, Head as TableHead, HeaderRow, HeaderCell, Body as TableBody, Row as TableRow, Cell as TableCell, Caption, } from "./stories/table";
|
|
76
78
|
export { GroupRow, GroupedTable } from "./stories/table/grouped";
|
package/build/index.js
CHANGED
|
@@ -35,6 +35,7 @@ var reactGrid = require('@zendeskgarden/react-grid');
|
|
|
35
35
|
var reactChrome = require('@zendeskgarden/react-chrome');
|
|
36
36
|
var formik = require('formik');
|
|
37
37
|
var reactPagination = require('@zendeskgarden/react-pagination');
|
|
38
|
+
var SlickSlider = require('react-slick');
|
|
38
39
|
var reactTables = require('@zendeskgarden/react-tables');
|
|
39
40
|
var reactSpring = require('react-spring');
|
|
40
41
|
var reactTooltips = require('@zendeskgarden/react-tooltips');
|
|
@@ -67,6 +68,7 @@ var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
|
|
|
67
68
|
var StarterKit__default = /*#__PURE__*/_interopDefaultLegacy(StarterKit);
|
|
68
69
|
var Placeholder__default = /*#__PURE__*/_interopDefaultLegacy(Placeholder);
|
|
69
70
|
var CharacterCount__default = /*#__PURE__*/_interopDefaultLegacy(CharacterCount);
|
|
71
|
+
var SlickSlider__default = /*#__PURE__*/_interopDefaultLegacy(SlickSlider);
|
|
70
72
|
|
|
71
73
|
const palette = Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.palette), { black: "#000", white: "#fff", product: {
|
|
72
74
|
support: "#00a656",
|
|
@@ -858,7 +860,7 @@ const Divider = styled__default["default"].div `
|
|
|
858
860
|
margin-bottom: ${({ theme }) => theme.space.xxs};
|
|
859
861
|
background-color: ${({ theme }) => theme.palette.grey["300"]};
|
|
860
862
|
`;
|
|
861
|
-
const Footer$
|
|
863
|
+
const Footer$3 = styled__default["default"].div `
|
|
862
864
|
display: flex;
|
|
863
865
|
flex-direction: column;
|
|
864
866
|
margin-top: auto;
|
|
@@ -875,7 +877,7 @@ const Container$1 = styled__default["default"].div `
|
|
|
875
877
|
${wrap ? "flex-wrap: wrap;" : ""}
|
|
876
878
|
`}
|
|
877
879
|
`;
|
|
878
|
-
const CardFooter = (props) => (jsxRuntime.jsxs(Footer$
|
|
880
|
+
const CardFooter = (props) => (jsxRuntime.jsxs(Footer$3, { children: [!props.noDivider && jsxRuntime.jsx(Divider, {}), jsxRuntime.jsx(Container$1, Object.assign({}, props, { children: props.children }))] }));
|
|
879
881
|
|
|
880
882
|
const UgContentCard = styled__default["default"](reactNotifications.Well) `
|
|
881
883
|
border-radius: ${({ theme }) => theme.borderRadii.lg};
|
|
@@ -942,7 +944,7 @@ const getTypeDataIcon = (type) => {
|
|
|
942
944
|
return SvgCampaignFunctional;
|
|
943
945
|
}
|
|
944
946
|
};
|
|
945
|
-
const StyledTag$
|
|
947
|
+
const StyledTag$3 = styled__default["default"](Tag) `
|
|
946
948
|
color: ${({ theme }) => theme.palette.grey["700"]};
|
|
947
949
|
cursor: pointer;
|
|
948
950
|
`;
|
|
@@ -959,7 +961,7 @@ const CampaignCard = (_a) => {
|
|
|
959
961
|
var { isNew, date, projectTitle, campaignTitle, status, type, labelNew } = _a, props = __rest(_a, ["isNew", "date", "projectTitle", "campaignTitle", "status", "type", "labelNew"]);
|
|
960
962
|
const StatusIcon = getStatusIcon(status !== null && status !== void 0 ? status : "PROGRESS");
|
|
961
963
|
const PillIcon = getTypeDataIcon(type);
|
|
962
|
-
return props.isLoading ? (jsxRuntime.jsx(CampaignCardSkeleton, {})) : (jsxRuntime.jsxs(SpecialCard, Object.assign({ title: campaignTitle }, props, { children: [jsxRuntime.jsxs(SpecialCard.Meta, { children: [jsxRuntime.jsx(StyledLabel$2, { children: date }), isNew && (jsxRuntime.jsx(StyledTagNew$1, Object.assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: projectTitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: campaignTitle })] }), jsxRuntime.jsxs(SpecialCard.Footer, { children: [props.pillText && (jsxRuntime.jsxs(StyledTag$
|
|
964
|
+
return props.isLoading ? (jsxRuntime.jsx(CampaignCardSkeleton, {})) : (jsxRuntime.jsxs(SpecialCard, Object.assign({ title: campaignTitle }, props, { children: [jsxRuntime.jsxs(SpecialCard.Meta, { children: [jsxRuntime.jsx(StyledLabel$2, { children: date }), isNew && (jsxRuntime.jsx(StyledTagNew$1, Object.assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: projectTitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: campaignTitle })] }), jsxRuntime.jsxs(SpecialCard.Footer, { children: [props.pillText && (jsxRuntime.jsxs(StyledTag$3, Object.assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(Tag.Avatar, { children: jsxRuntime.jsx(PillIcon, {}) }), jsxRuntime.jsx(Ellipsis, Object.assign({ style: { maxWidth: "180px" } }, { children: props.pillText }))] }))), jsxRuntime.jsx(StatusIcon, {})] })] })));
|
|
963
965
|
};
|
|
964
966
|
|
|
965
967
|
const StyledTagNew = styled__default["default"](Tag) `
|
|
@@ -985,7 +987,7 @@ const ServiceTitle = styled__default["default"](LG) `
|
|
|
985
987
|
margin-bottom: ${({ theme }) => theme.space.base}px;
|
|
986
988
|
font-weight: ${({ theme }) => theme.fontWeights.semibold};
|
|
987
989
|
`;
|
|
988
|
-
const StyledTag$
|
|
990
|
+
const StyledTag$2 = styled__default["default"](Tag) `
|
|
989
991
|
margin-right: ${({ theme }) => theme.space.xs};
|
|
990
992
|
margin-top: ${({ theme }) => theme.space.xs};
|
|
991
993
|
`;
|
|
@@ -1052,7 +1054,7 @@ const StyledCard$1 = styled__default["default"](SpecialCard) `
|
|
|
1052
1054
|
`;
|
|
1053
1055
|
const ServiceCard = (props) => {
|
|
1054
1056
|
const { serviceIcon, serviceTitle, serviceSubtitle } = props;
|
|
1055
|
-
return (jsxRuntime.jsxs(StyledCard$1, Object.assign({}, props, { children: [props.isHoverable && (jsxRuntime.jsxs(HoverBody, { children: [jsxRuntime.jsxs(HoverMetaContainer, { children: [props.hoverTitle && (jsxRuntime.jsx(ServiceTitle, { children: props.hoverTitle })), props.hoverSubtitle && (jsxRuntime.jsx(ServiceSubtitle, { children: props.hoverSubtitle }))] }), props.hoverButtons && (jsxRuntime.jsx(ButtonsWrap$1, { children: props.hoverButtons.map((button) => button) }))] })), jsxRuntime.jsxs(CardContent, { children: [jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [serviceIcon && jsxRuntime.jsx(SpecialCard.Thumb, { children: serviceIcon }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: serviceSubtitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: serviceTitle })] })] }), props.tags && (jsxRuntime.jsx(SpecialCard.Footer, Object.assign({ justifyContent: "start", wrap: true }, { children: props.tags.map((tag, index) => (jsxRuntime.jsxs(StyledTag$
|
|
1057
|
+
return (jsxRuntime.jsxs(StyledCard$1, Object.assign({}, props, { children: [props.isHoverable && (jsxRuntime.jsxs(HoverBody, { children: [jsxRuntime.jsxs(HoverMetaContainer, { children: [props.hoverTitle && (jsxRuntime.jsx(ServiceTitle, { children: props.hoverTitle })), props.hoverSubtitle && (jsxRuntime.jsx(ServiceSubtitle, { children: props.hoverSubtitle }))] }), props.hoverButtons && (jsxRuntime.jsx(ButtonsWrap$1, { children: props.hoverButtons.map((button) => button) }))] })), jsxRuntime.jsxs(CardContent, { children: [jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [serviceIcon && jsxRuntime.jsx(SpecialCard.Thumb, { children: serviceIcon }), jsxRuntime.jsxs(SpecialCard.Header, { children: [jsxRuntime.jsx(SpecialCard.Header.Label, { children: serviceSubtitle }), jsxRuntime.jsx(SpecialCard.Header.Title, { children: serviceTitle })] })] }), props.tags && (jsxRuntime.jsx(SpecialCard.Footer, Object.assign({ justifyContent: "start", wrap: true }, { children: props.tags.map((tag, index) => (jsxRuntime.jsxs(StyledTag$2, Object.assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(StyledTag$2.Avatar, { children: tag.icon }), tag.label] }), index))) })))] })] })));
|
|
1056
1058
|
};
|
|
1057
1059
|
|
|
1058
1060
|
const ButtonsWrap = styled__default["default"].div `
|
|
@@ -1278,7 +1280,7 @@ const LegendItemWrapper = styled__default["default"].div `
|
|
|
1278
1280
|
flex: 0 0 auto;
|
|
1279
1281
|
overflow: hidden;
|
|
1280
1282
|
`;
|
|
1281
|
-
const StyledSM = styled__default["default"](SM) `
|
|
1283
|
+
const StyledSM$1 = styled__default["default"](SM) `
|
|
1282
1284
|
max-width: calc(100% - ${({ squareSize }) => squareSize}px);
|
|
1283
1285
|
color: ${({ theme }) => theme.palette.grey[600]};
|
|
1284
1286
|
`;
|
|
@@ -1286,7 +1288,7 @@ const LegendItem = ({ color, value, }) => {
|
|
|
1286
1288
|
const theme = React.useContext(styled.ThemeContext);
|
|
1287
1289
|
const squareSide = theme.space.base * 3;
|
|
1288
1290
|
const marginRight = theme.space.base * 2;
|
|
1289
|
-
return (jsxRuntime.jsxs(LegendItemWrapper, { children: [jsxRuntime.jsx(LegendColoredSquare, { color: color, size: squareSide, marginRight: marginRight }), jsxRuntime.jsx(StyledSM, Object.assign({ isBold: true, squareSize: squareSide + marginRight }, { children: jsxRuntime.jsx(StyledEllipsis$1, { children: value }) }))] }));
|
|
1291
|
+
return (jsxRuntime.jsxs(LegendItemWrapper, { children: [jsxRuntime.jsx(LegendColoredSquare, { color: color, size: squareSide, marginRight: marginRight }), jsxRuntime.jsx(StyledSM$1, Object.assign({ isBold: true, squareSize: squareSide + marginRight }, { children: jsxRuntime.jsx(StyledEllipsis$1, { children: value }) }))] }));
|
|
1290
1292
|
};
|
|
1291
1293
|
const LegendWrapper = styled__default["default"].div `
|
|
1292
1294
|
width: ${({ width }) => width};
|
|
@@ -1666,7 +1668,7 @@ function useWindowSize() {
|
|
|
1666
1668
|
}
|
|
1667
1669
|
|
|
1668
1670
|
const StyledSpan = styled__default["default"](Span) ``;
|
|
1669
|
-
const StyledTag = styled__default["default"](Tag) `
|
|
1671
|
+
const StyledTag$1 = styled__default["default"](Tag) `
|
|
1670
1672
|
background-color: transparent;
|
|
1671
1673
|
pointer-events: none;
|
|
1672
1674
|
${({ status, theme }) => {
|
|
@@ -1697,9 +1699,9 @@ const StyledTag = styled__default["default"](Tag) `
|
|
|
1697
1699
|
const Counter = (props) => {
|
|
1698
1700
|
const { width } = useWindowSize();
|
|
1699
1701
|
const { status, counter } = props;
|
|
1700
|
-
return (jsxRuntime.jsxs(StyledTag, Object.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() })] })));
|
|
1702
|
+
return (jsxRuntime.jsxs(StyledTag$1, Object.assign({}, props, { size: props.size || "large" }, { children: [jsxRuntime.jsx(StyledTag$1.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() })] })));
|
|
1701
1703
|
};
|
|
1702
|
-
Counter.Avatar = StyledTag.Avatar;
|
|
1704
|
+
Counter.Avatar = StyledTag$1.Avatar;
|
|
1703
1705
|
|
|
1704
1706
|
const UgDrawer = styled__default["default"](reactModals.DrawerModal) `
|
|
1705
1707
|
@media (max-width: ${({ theme }) => theme.breakpoints.sm}) {
|
|
@@ -2336,7 +2338,7 @@ const EditorHeader = (props) => {
|
|
|
2336
2338
|
return (jsxRuntime.jsx(Header$1, { children: jsxRuntime.jsx(Title$1, Object.assign({ isBold: true, validation: validation }, { children: title || "Write" })) }));
|
|
2337
2339
|
};
|
|
2338
2340
|
|
|
2339
|
-
const Footer$
|
|
2341
|
+
const Footer$2 = styled__default["default"].div `
|
|
2340
2342
|
display: flex;
|
|
2341
2343
|
flex-direction: row;
|
|
2342
2344
|
padding: ${({ theme }) => theme.space.sm} 16px;
|
|
@@ -2346,7 +2348,7 @@ const Text = styled__default["default"](SM) `
|
|
|
2346
2348
|
line-height: 1.7;
|
|
2347
2349
|
`;
|
|
2348
2350
|
const EditorFooter = ({ saveText }) => {
|
|
2349
|
-
return jsxRuntime.jsxs(Footer$
|
|
2351
|
+
return jsxRuntime.jsxs(Footer$2, { children: [jsxRuntime.jsxs(Tag, { children: [isMac() ? "Cmd" : "Ctrl", "+enter"] }), "\u00A0", jsxRuntime.jsx(Text, { children: saveText || "to save" })] });
|
|
2350
2352
|
};
|
|
2351
2353
|
|
|
2352
2354
|
const EditorContainer = styled__default["default"].div `
|
|
@@ -2767,6 +2769,64 @@ const Icon = (props) => {
|
|
|
2767
2769
|
return (jsxRuntime.jsxs(StyledUgIcon$1, { children: [type === "square" && jsxRuntime.jsx(SvgUgSquare, { width: dim, height: dim }), type === "triangle" && jsxRuntime.jsx(SvgUgTriangle, { width: dim, height: dim }), type === "circle" && jsxRuntime.jsx(SvgUgCircle, { width: dim, height: dim })] }));
|
|
2768
2770
|
};
|
|
2769
2771
|
|
|
2772
|
+
const UgModalBody = styled__default["default"](reactModals.Body) `
|
|
2773
|
+
color: ${({ theme }) => theme.palette.grey["800"]};
|
|
2774
|
+
`;
|
|
2775
|
+
const UgModal = styled__default["default"](reactModals.Modal) `
|
|
2776
|
+
${({ isExtraLarge }) => isExtraLarge && "height: 90%; width: 90%;"}
|
|
2777
|
+
`;
|
|
2778
|
+
const ModalComponent = React.forwardRef((props, ref) => (jsxRuntime.jsx(UgModal, Object.assign({ ref: ref }, props))));
|
|
2779
|
+
const Modal = ModalComponent;
|
|
2780
|
+
const FooterItem = reactModals.FooterItem;
|
|
2781
|
+
Modal.Header = reactModals.Header;
|
|
2782
|
+
Modal.Body = UgModalBody;
|
|
2783
|
+
Modal.Footer = reactModals.Footer;
|
|
2784
|
+
|
|
2785
|
+
const StyledBody$5 = styled__default["default"].div `
|
|
2786
|
+
display: flex;
|
|
2787
|
+
flex-grow: 1;
|
|
2788
|
+
flex-wrap: nowrap;
|
|
2789
|
+
padding: 0;
|
|
2790
|
+
min-height: 0;
|
|
2791
|
+
`;
|
|
2792
|
+
const MainContent = styled__default["default"].div `
|
|
2793
|
+
display: flex;
|
|
2794
|
+
flex-direction: column;
|
|
2795
|
+
flex: 0 0 auto;
|
|
2796
|
+
width: 66.66666667%;
|
|
2797
|
+
padding: 0;
|
|
2798
|
+
background-color: ${({ theme }) => theme.palette.grey["700"]};
|
|
2799
|
+
`;
|
|
2800
|
+
const Details = styled__default["default"].div `
|
|
2801
|
+
display: flex;
|
|
2802
|
+
flex-direction: column;
|
|
2803
|
+
flex: 0 0 auto;
|
|
2804
|
+
width: 33.33333333%;
|
|
2805
|
+
padding: ${({ theme }) => theme.space.md};
|
|
2806
|
+
overflow: auto;
|
|
2807
|
+
`;
|
|
2808
|
+
const ModalBody = StyledBody$5;
|
|
2809
|
+
ModalBody.Main = MainContent;
|
|
2810
|
+
ModalBody.Details = Details;
|
|
2811
|
+
|
|
2812
|
+
const Footer$1 = styled__default["default"](Modal.Footer) `
|
|
2813
|
+
padding: ${({ theme }) => `${theme.space.base * 3.5}px ${theme.space.xl}`};
|
|
2814
|
+
display: flex;
|
|
2815
|
+
justify-content: space-between;
|
|
2816
|
+
`;
|
|
2817
|
+
|
|
2818
|
+
/**
|
|
2819
|
+
* Lightbox is a special modal component used to enlarge some specific content or a list of contents with a slider as main content.
|
|
2820
|
+
*/
|
|
2821
|
+
const LightboxComponent = React.forwardRef((props, ref) => {
|
|
2822
|
+
return jsxRuntime.jsx(Modal, Object.assign({ ref: ref, isExtraLarge: true }, props, { style: { overflow: "hidden" } }));
|
|
2823
|
+
});
|
|
2824
|
+
const Lightbox = LightboxComponent;
|
|
2825
|
+
Lightbox.Header = Modal.Header;
|
|
2826
|
+
Lightbox.Body = ModalBody; // Includes Main and Details
|
|
2827
|
+
Lightbox.Footer = Footer$1;
|
|
2828
|
+
Lightbox.Close = reactModals.Close;
|
|
2829
|
+
|
|
2770
2830
|
const UgProgress = styled__default["default"](reactLoaders.Progress) ``;
|
|
2771
2831
|
/**
|
|
2772
2832
|
* A Progress loader communicates progress when downloading or uploading content.
|
|
@@ -3561,18 +3621,6 @@ const MultiSelect = ({ options, selectedItems, onChange, creatable, i18n, maxIte
|
|
|
3561
3621
|
: `Want to add ${inputValue}?` })] })) : null] })] })) })));
|
|
3562
3622
|
};
|
|
3563
3623
|
|
|
3564
|
-
const UgModalBody = styled__default["default"](reactModals.Body) `
|
|
3565
|
-
color: ${({ theme }) => theme.palette.grey["800"]};
|
|
3566
|
-
`;
|
|
3567
|
-
const UgModal = styled__default["default"](reactModals.Modal) `
|
|
3568
|
-
${({ isExtraLarge }) => isExtraLarge && "height: 90%; width: 90%;"}
|
|
3569
|
-
`;
|
|
3570
|
-
const Modal = (props) => jsxRuntime.jsx(UgModal, Object.assign({}, props));
|
|
3571
|
-
const FooterItem = reactModals.FooterItem;
|
|
3572
|
-
Modal.Header = reactModals.Header;
|
|
3573
|
-
Modal.Body = UgModalBody;
|
|
3574
|
-
Modal.Footer = reactModals.Footer;
|
|
3575
|
-
|
|
3576
3624
|
const StyledModal$1 = styled__default["default"](Modal) `
|
|
3577
3625
|
width: 100%;
|
|
3578
3626
|
height: 100%;
|
|
@@ -4173,6 +4221,194 @@ const ProfileModal = (_a) => {
|
|
|
4173
4221
|
return (jsxRuntime.jsx(StyledModal, Object.assign({}, args, { style: { width: "300px" }, backdropProps: backDrop }, { children: jsxRuntime.jsx(StyledBody, { children: jsxRuntime.jsx(UserMenu, Object.assign({}, menuArgs)) }) })));
|
|
4174
4222
|
};
|
|
4175
4223
|
|
|
4224
|
+
const NavButton = styled__default["default"](IconButton) `
|
|
4225
|
+
position: absolute;
|
|
4226
|
+
top: 50%;
|
|
4227
|
+
transform: translate(0, -50%);
|
|
4228
|
+
z-index: 1;
|
|
4229
|
+
`;
|
|
4230
|
+
const PrevButton = (props) => (jsxRuntime.jsx(NavButton, Object.assign({}, props, { style: { left: theme.space.md } }, { children: jsxRuntime.jsx(SvgChevronLeftStroke, {}) })));
|
|
4231
|
+
const NextButton = (props) => (jsxRuntime.jsx(NavButton, Object.assign({}, props, { style: { right: theme.space.md } }, { children: jsxRuntime.jsx(SvgChevronRightStroke, {}) })));
|
|
4232
|
+
|
|
4233
|
+
const SliderContainer = styled__default["default"].div `
|
|
4234
|
+
position: relative;
|
|
4235
|
+
height: 100%;
|
|
4236
|
+
`;
|
|
4237
|
+
|
|
4238
|
+
const SliderContext = React.createContext(null);
|
|
4239
|
+
const SliderContextProvider = ({ children, }) => {
|
|
4240
|
+
const [sliderH, setSliderH] = React.useState();
|
|
4241
|
+
const sliderRef = React.useRef(null);
|
|
4242
|
+
const windowSize = useWindowSize();
|
|
4243
|
+
const SliderContextValue = React.useMemo(() => {
|
|
4244
|
+
return {
|
|
4245
|
+
sliderH,
|
|
4246
|
+
setSliderH,
|
|
4247
|
+
};
|
|
4248
|
+
}, [sliderH, setSliderH]);
|
|
4249
|
+
React.useEffect(() => {
|
|
4250
|
+
var _a;
|
|
4251
|
+
if ((_a = sliderRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight)
|
|
4252
|
+
setSliderH(sliderRef.current.clientHeight);
|
|
4253
|
+
}, [sliderRef, windowSize]);
|
|
4254
|
+
return (jsxRuntime.jsx(SliderContext.Provider, Object.assign({ value: SliderContextValue }, { children: jsxRuntime.jsx(SliderContainer, Object.assign({ ref: sliderRef }, { children: children })) })));
|
|
4255
|
+
};
|
|
4256
|
+
const useSliderContext = () => {
|
|
4257
|
+
const context = React.useContext(SliderContext);
|
|
4258
|
+
if (!context)
|
|
4259
|
+
throw new Error("Provider not found for SliderContextProvider");
|
|
4260
|
+
return context; // Now we can use the context in the component, SAFELY.
|
|
4261
|
+
};
|
|
4262
|
+
|
|
4263
|
+
const StyledTag = styled__default["default"](Tag) `
|
|
4264
|
+
position: absolute;
|
|
4265
|
+
top: ${({ theme }) => theme.space.sm};
|
|
4266
|
+
right: ${({ theme }) => theme.space.md};
|
|
4267
|
+
padding: ${({ theme }) => `${theme.space.xs} ${theme.space.sm}`};
|
|
4268
|
+
z-index: 1;
|
|
4269
|
+
`;
|
|
4270
|
+
const StyledSM = styled__default["default"](SM) `
|
|
4271
|
+
color: ${({ theme }) => theme.palette.grey[600]};
|
|
4272
|
+
span {
|
|
4273
|
+
color: ${({ theme }) => theme.colors.primaryHue};
|
|
4274
|
+
}
|
|
4275
|
+
`;
|
|
4276
|
+
const SliderCounter = ({ current, total, }) => {
|
|
4277
|
+
return (jsxRuntime.jsx(StyledTag, Object.assign({ isPill: true, hue: theme.palette.white }, { children: jsxRuntime.jsxs(StyledSM, { children: [jsxRuntime.jsx("span", { children: current + 1 }), "/", total] }) })));
|
|
4278
|
+
};
|
|
4279
|
+
|
|
4280
|
+
const StyledSlick = styled__default["default"](SlickSlider__default["default"]) `
|
|
4281
|
+
position: relative;
|
|
4282
|
+
display: block;
|
|
4283
|
+
box-sizing: border-box;
|
|
4284
|
+
user-select: none;
|
|
4285
|
+
-webkit-touch-callout: none;
|
|
4286
|
+
-khtml-user-select: none;
|
|
4287
|
+
-ms-touch-action: pan-y;
|
|
4288
|
+
touch-action: pan-y;
|
|
4289
|
+
-webkit-tap-highlight-color: transparent;
|
|
4290
|
+
height: 100%;
|
|
4291
|
+
|
|
4292
|
+
.slick-list,
|
|
4293
|
+
.slick-track {
|
|
4294
|
+
position: relative;
|
|
4295
|
+
display: block;
|
|
4296
|
+
transform: translate3d(0, 0, 0);
|
|
4297
|
+
}
|
|
4298
|
+
|
|
4299
|
+
.slick-list {
|
|
4300
|
+
overflow: hidden;
|
|
4301
|
+
margin: 0;
|
|
4302
|
+
padding: 0;
|
|
4303
|
+
|
|
4304
|
+
&.dragging {
|
|
4305
|
+
cursor: pointer;
|
|
4306
|
+
cursor: hand;
|
|
4307
|
+
}
|
|
4308
|
+
|
|
4309
|
+
&:focus {
|
|
4310
|
+
outline: 0;
|
|
4311
|
+
}
|
|
4312
|
+
|
|
4313
|
+
.slick-track {
|
|
4314
|
+
top: 0;
|
|
4315
|
+
left: 0;
|
|
4316
|
+
|
|
4317
|
+
&:after,
|
|
4318
|
+
&:before {
|
|
4319
|
+
display: table;
|
|
4320
|
+
content: "";
|
|
4321
|
+
}
|
|
4322
|
+
|
|
4323
|
+
&:after {
|
|
4324
|
+
clear: both;
|
|
4325
|
+
}
|
|
4326
|
+
|
|
4327
|
+
.slick-slide {
|
|
4328
|
+
float: left;
|
|
4329
|
+
min-height: 1px;
|
|
4330
|
+
|
|
4331
|
+
img, video {
|
|
4332
|
+
display: block;
|
|
4333
|
+
height: 100%;
|
|
4334
|
+
width: auto;
|
|
4335
|
+
margin: 0 auto;
|
|
4336
|
+
}
|
|
4337
|
+
|
|
4338
|
+
&.dragging img {
|
|
4339
|
+
pointer-events: none;
|
|
4340
|
+
}
|
|
4341
|
+
}
|
|
4342
|
+
}
|
|
4343
|
+
}
|
|
4344
|
+
|
|
4345
|
+
.slick-disabled {
|
|
4346
|
+
opacity: 0.5;
|
|
4347
|
+
pointer-events: none;
|
|
4348
|
+
}
|
|
4349
|
+
|
|
4350
|
+
.slick-dots {
|
|
4351
|
+
position: absolute;
|
|
4352
|
+
display: block;
|
|
4353
|
+
padding: 0;
|
|
4354
|
+
bottom: -25px;
|
|
4355
|
+
width: 100%;
|
|
4356
|
+
margin: 0;
|
|
4357
|
+
list-style: none;
|
|
4358
|
+
text-align: center;
|
|
4359
|
+
|
|
4360
|
+
& li {
|
|
4361
|
+
position: relative;
|
|
4362
|
+
display: inline-block;
|
|
4363
|
+
padding: ${({ theme }) => theme.space.xxs};
|
|
4364
|
+
cursor: pointer;
|
|
4365
|
+
}
|
|
4366
|
+
}
|
|
4367
|
+
`;
|
|
4368
|
+
|
|
4369
|
+
const StyledDiv = styled__default["default"].div `
|
|
4370
|
+
display: flex;
|
|
4371
|
+
justify-content: center;
|
|
4372
|
+
flex-direction: column;
|
|
4373
|
+
height: calc(90vh - 161px);
|
|
4374
|
+
`;
|
|
4375
|
+
const Slide = (props) => {
|
|
4376
|
+
const { sliderH } = useSliderContext();
|
|
4377
|
+
if (!sliderH)
|
|
4378
|
+
return null;
|
|
4379
|
+
return jsxRuntime.jsx(StyledDiv, Object.assign({}, props, { style: { height: `${sliderH}px` } }));
|
|
4380
|
+
};
|
|
4381
|
+
|
|
4382
|
+
const defaultSettings = {
|
|
4383
|
+
dots: false,
|
|
4384
|
+
infinite: true,
|
|
4385
|
+
adaptiveHeight: true,
|
|
4386
|
+
nextArrow: jsxRuntime.jsx(NextButton, {}),
|
|
4387
|
+
prevArrow: jsxRuntime.jsx(PrevButton, {}),
|
|
4388
|
+
customPaging: (i) => jsxRuntime.jsx(Button, Object.assign({ isBasic: true }, { children: i + 1 })),
|
|
4389
|
+
counter: true,
|
|
4390
|
+
};
|
|
4391
|
+
/**
|
|
4392
|
+
* Slider is a simple component used to show a series of generic container.
|
|
4393
|
+
* All spaces and margins are delegated to related content component.
|
|
4394
|
+
* <hr>
|
|
4395
|
+
* Used for this:
|
|
4396
|
+
- Show media content
|
|
4397
|
+
- As a slideshow component
|
|
4398
|
+
*/
|
|
4399
|
+
const Slider = (props) => {
|
|
4400
|
+
const [current, setCurrent] = React.useState(props.initialSlide || 0);
|
|
4401
|
+
const settings = Object.assign(Object.assign({}, defaultSettings), props);
|
|
4402
|
+
const slides = React.Children.toArray(settings.children).length;
|
|
4403
|
+
const updateSlide = React.useCallback((oldIndex, index) => {
|
|
4404
|
+
setCurrent(index);
|
|
4405
|
+
if (props.onSlideChange)
|
|
4406
|
+
props.onSlideChange(index);
|
|
4407
|
+
}, [current]);
|
|
4408
|
+
return (jsxRuntime.jsxs(SliderContextProvider, { children: [settings.counter && jsxRuntime.jsx(SliderCounter, { current: current, total: slides }), jsxRuntime.jsx(StyledSlick, Object.assign({}, settings, { beforeChange: updateSlide }))] }));
|
|
4409
|
+
};
|
|
4410
|
+
Slider.Slide = Slide;
|
|
4411
|
+
|
|
4176
4412
|
const UgStep = styled__default["default"](reactAccordions.Stepper.Step) `
|
|
4177
4413
|
svg {
|
|
4178
4414
|
color: ${({ theme }) => theme.palette.green[700]};
|
|
@@ -4604,6 +4840,7 @@ exports.ItemContent = ItemContent;
|
|
|
4604
4840
|
exports.ItemMeta = ItemMeta;
|
|
4605
4841
|
exports.LG = LG;
|
|
4606
4842
|
exports.Label = Label;
|
|
4843
|
+
exports.Lightbox = Lightbox;
|
|
4607
4844
|
exports.LoginForm = LoginForm;
|
|
4608
4845
|
exports.Logo = Logo;
|
|
4609
4846
|
exports.MD = MD;
|
|
@@ -4646,6 +4883,7 @@ exports.Separator = Separator;
|
|
|
4646
4883
|
exports.ServiceCard = ServiceCard;
|
|
4647
4884
|
exports.Sidebar = Sidebar;
|
|
4648
4885
|
exports.Skeleton = Skeleton;
|
|
4886
|
+
exports.Slider = Slider;
|
|
4649
4887
|
exports.Span = Span;
|
|
4650
4888
|
exports.SpecialCard = SpecialCard;
|
|
4651
4889
|
exports.Spinner = Spinner;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Modal, ModalClose } from "../modals";
|
|
3
|
+
import { ModalBody } from "./parts/body";
|
|
4
|
+
import { Footer } from "./parts/footer";
|
|
5
|
+
import { LightboxArgs } from "./_types";
|
|
6
|
+
export declare const Lightbox: import("react").ForwardRefExoticComponent<LightboxArgs & import("react").RefAttributes<HTMLDivElement>> & {
|
|
7
|
+
Header: typeof Modal.Header;
|
|
8
|
+
Body: typeof ModalBody;
|
|
9
|
+
Footer: typeof Footer;
|
|
10
|
+
Close: typeof ModalClose;
|
|
11
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="hoist-non-react-statics" />
|
|
3
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
4
|
+
import { LightboxArgs } from "./_types";
|
|
5
|
+
import { SliderStoryArg } from "../slider/index.stories";
|
|
6
|
+
interface LightboxStoryArgs extends LightboxArgs {
|
|
7
|
+
headerTitle: string;
|
|
8
|
+
headerBugId?: string;
|
|
9
|
+
slider?: SliderStoryArg;
|
|
10
|
+
}
|
|
11
|
+
export declare const Default: Story<LightboxStoryArgs>;
|
|
12
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<LightboxArgs & import("react").RefAttributes<HTMLDivElement>> & {
|
|
13
|
+
Header: import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-modals/dist/typings/types").IHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Body: string & import("styled-components").StyledComponentBase<"div", any, {}, never> & import("hoist-non-react-statics").NonReactStatics<never, {}> & {
|
|
15
|
+
Main: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
|
+
Details: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
};
|
|
18
|
+
Footer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
19
|
+
Close: import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
}>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="hoist-non-react-statics" />
|
|
2
|
+
declare const MainContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
declare const Details: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const ModalBody: string & import("styled-components").StyledComponentBase<"div", any, {}, never> & import("hoist-non-react-statics").NonReactStatics<never, {}> & {
|
|
5
|
+
Main: typeof MainContent;
|
|
6
|
+
Details: typeof Details;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Close as ModalClose } from "@zendeskgarden/react-modals";
|
|
2
|
+
import { Header as ModalHeader, Footer as ModalFooter, Close as ModalClose } from "@zendeskgarden/react-modals";
|
|
3
3
|
import { ModalArgs } from "./_types";
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
Header:
|
|
7
|
-
Body:
|
|
8
|
-
Footer:
|
|
4
|
+
declare const UgModalBody: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
5
|
+
declare const Modal: import("react").ForwardRefExoticComponent<ModalArgs & import("react").RefAttributes<HTMLDivElement>> & {
|
|
6
|
+
Header: typeof ModalHeader;
|
|
7
|
+
Body: typeof UgModalBody;
|
|
8
|
+
Footer: typeof ModalFooter;
|
|
9
9
|
};
|
|
10
10
|
declare const FooterItem: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
11
11
|
export { Modal, FooterItem, ModalClose };
|
|
@@ -10,8 +10,7 @@ export declare const Default: Story<ModalStoryArgs>;
|
|
|
10
10
|
export declare const Danger: Story<ModalStoryArgs>;
|
|
11
11
|
export declare const Large: Story<ModalStoryArgs>;
|
|
12
12
|
export declare const WithCustomContent: Story<ModalStoryArgs>;
|
|
13
|
-
declare const _default: ComponentMeta<{
|
|
14
|
-
(props: ModalArgs): JSX.Element;
|
|
13
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<ModalArgs & import("react").RefAttributes<HTMLDivElement>> & {
|
|
15
14
|
Header: import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-modals/dist/typings/types").IHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
15
|
Body: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
17
16
|
Footer: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SliderArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
* Slider is a simple component used to show a series of generic container.
|
|
5
|
+
* All spaces and margins are delegated to related content component.
|
|
6
|
+
* <hr>
|
|
7
|
+
* Used for this:
|
|
8
|
+
- Show media content
|
|
9
|
+
- As a slideshow component
|
|
10
|
+
*/
|
|
11
|
+
export declare const Slider: {
|
|
12
|
+
(props: SliderArgs): JSX.Element;
|
|
13
|
+
Slide: (props: import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element | null;
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { SliderArgs } from "./_types";
|
|
4
|
+
export interface SliderStoryArg extends SliderArgs {
|
|
5
|
+
items: Array<{
|
|
6
|
+
headerTitle?: string;
|
|
7
|
+
content?: string;
|
|
8
|
+
imageUrl?: string;
|
|
9
|
+
videoUrl?: string;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
export declare const Default: Story<SliderStoryArg>;
|
|
13
|
+
export declare const Media: Story<SliderStoryArg>;
|
|
14
|
+
declare const _default: ComponentMeta<{
|
|
15
|
+
(props: SliderArgs): JSX.Element;
|
|
16
|
+
Slide: (props: import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element | null;
|
|
17
|
+
}>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SliderContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SliderContextType } from "../_types";
|
|
3
|
+
export declare const SliderContext: import("react").Context<SliderContextType | null>;
|
|
4
|
+
export declare const SliderContextProvider: ({ children, }: {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}) => JSX.Element;
|
|
7
|
+
export declare const useSliderContext: () => SliderContextType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appquality/unguess-design-system",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.55",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@nivo/bar": "^0.80.0",
|
|
6
6
|
"@nivo/bullet": "^0.80.0",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@tiptap/extension-typography": "^2.0.0-beta.22",
|
|
18
18
|
"@tiptap/react": "^2.0.0-beta.114",
|
|
19
19
|
"@tiptap/starter-kit": "^2.0.0-beta.191",
|
|
20
|
+
"@types/react-slick": "^0.23.10",
|
|
20
21
|
"@zendeskgarden/css-bedrock": "^9.0.0",
|
|
21
22
|
"@zendeskgarden/react-accordions": "^8.49.0",
|
|
22
23
|
"@zendeskgarden/react-avatars": "^8.49.0",
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
"@zendeskgarden/react-tags": "^8.49.0",
|
|
34
35
|
"@zendeskgarden/react-tooltips": "^8.49.0",
|
|
35
36
|
"@zendeskgarden/react-typography": "^8.49.0",
|
|
37
|
+
"react-slick": "^0.29.0",
|
|
36
38
|
"react-spring": "^9.4.4",
|
|
37
39
|
"react-window": "^1.8.6",
|
|
38
40
|
"ua-parser-js": "^1.0.2"
|