@appquality/unguess-design-system 2.10.6 → 2.10.9

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 CHANGED
@@ -1,3 +1,39 @@
1
+ # v2.10.9 (Thu May 05 2022)
2
+
3
+ #### ⚠️ Pushed to `master`
4
+
5
+ - test(checkbox): test onChange callback ([@cannarocks](https://github.com/cannarocks))
6
+
7
+ #### Authors: 1
8
+
9
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
10
+
11
+ ---
12
+
13
+ # v2.10.8 (Thu May 05 2022)
14
+
15
+ #### ⚠️ Pushed to `master`
16
+
17
+ - feat(contentcard): update content card padding ([@cannarocks](https://github.com/cannarocks))
18
+
19
+ #### Authors: 1
20
+
21
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
22
+
23
+ ---
24
+
25
+ # v2.10.7 (Wed May 04 2022)
26
+
27
+ #### 🐛 Bug Fix
28
+
29
+ - feat(card): add Container variant with different border-radius [#49](https://github.com/AppQuality/unguess-design-system/pull/49) ([@cannarocks](https://github.com/cannarocks))
30
+
31
+ #### Authors: 1
32
+
33
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
34
+
35
+ ---
36
+
1
37
  # v2.10.6 (Wed May 04 2022)
2
38
 
3
39
  #### ⚠️ Pushed to `master`
package/build/index.js CHANGED
@@ -243,8 +243,8 @@ var components = __assign(__assign({}, reactTheming.DEFAULT_THEME.components), {
243
243
 
244
244
  var theme = __assign(__assign({}, reactTheming.DEFAULT_THEME), { colors: __assign(__assign({}, reactTheming.DEFAULT_THEME.colors), { primaryHue: palette.blue[600] }), 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$T || (templateObject_1$T = __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$T;
246
+ var GlobalStyle = styled.createGlobalStyle(templateObject_1$U || (templateObject_1$U = __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$U;
248
248
 
249
249
  /**
250
250
  * Accordions are headers that can be expanded to reveal content or collapsed to hide it.
@@ -260,7 +260,7 @@ Accordion.Label = reactAccordions.Accordion.Label;
260
260
  Accordion.Panel = reactAccordions.Accordion.Panel;
261
261
 
262
262
  // import useWindowSize from "../../hooks/useWindowSize";
263
- var UgAvatar = styled__default["default"](reactAvatars.Avatar)(templateObject_1$S || (templateObject_1$S = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
263
+ var UgAvatar = styled__default["default"](reactAvatars.Avatar)(templateObject_1$T || (templateObject_1$T = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
264
264
  return props.avatarType &&
265
265
  props.avatarType !== "image" &&
266
266
  "background: ".concat(props.backgroundColor || theme.gradients.dark, ";");
@@ -285,7 +285,7 @@ var Avatar = function (props) {
285
285
  return (jsxRuntime.jsx(UgAvatar, __assign({}, props, { badge: fixedBadge, children: wrapChildren(props.avatarType || "text"), size: props.size || "small" })));
286
286
  };
287
287
  Avatar.Text = UgAvatar.Text;
288
- var templateObject_1$S;
288
+ var templateObject_1$T;
289
289
 
290
290
  /**
291
291
  * Breadcrumbs mark and communicate a user’s location in the product.
@@ -306,7 +306,7 @@ var Breadcrumb = function (props) { return jsxRuntime.jsx(reactBreadcrumbs.Bread
306
306
  */
307
307
  var Anchor = function (props) { return jsxRuntime.jsx(reactButtons.Anchor, __assign({}, props)); };
308
308
 
309
- var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$R || (templateObject_1$R = __makeTemplateObject([""], [""])));
309
+ var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$S || (templateObject_1$S = __makeTemplateObject([""], [""])));
310
310
  /**
311
311
  * Buttons let users take action quickly.
312
312
  * Use a Button to enable actions or decisions that are important to a user’s workflow.
@@ -318,7 +318,7 @@ var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$
318
318
  var Button = function (props) { return jsxRuntime.jsx(UgButton, __assign({}, props)); };
319
319
  Button.StartIcon = UgButton.StartIcon;
320
320
  Button.EndIcon = UgButton.EndIcon;
321
- var templateObject_1$R;
321
+ var templateObject_1$S;
322
322
 
323
323
  /**
324
324
  A Button group lets users make a selection from a set of options.
@@ -348,13 +348,32 @@ Used for this:
348
348
  **/
349
349
  var SplitButton = function (props) { return (jsxRuntime.jsx(reactButtons.SplitButton, __assign({}, props))); };
350
350
 
351
+ var ContentCard = styled__default["default"](reactNotifications.Well)(templateObject_1$R || (templateObject_1$R = __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) {
352
+ var theme = _a.theme;
353
+ return theme.borderRadii.lg;
354
+ }, function (_a) {
355
+ var theme = _a.theme;
356
+ return theme.space.xxl;
357
+ }, function (_a) {
358
+ var theme = _a.theme;
359
+ return theme.palette.grey["200"];
360
+ }, function (_a) {
361
+ var isFloating = _a.isFloating, theme = _a.theme;
362
+ return !isFloating &&
363
+ "\n &:hover {\n box-shadow: ".concat(theme.shadows.boxShadow(theme), ";\n }");
364
+ });
351
365
  /**
352
366
  * A Card is a container that groups related content.
353
367
  * <hr>
354
368
  * Used for this:
355
369
  - To group related content
356
370
  */
357
- var Card = function (props) { return jsxRuntime.jsx(reactNotifications.Well, __assign({}, props)); };
371
+ var Card = function (props) { return jsxRuntime.jsx(ContentCard, __assign({}, props)); };
372
+ var ContainerCard = styled__default["default"](Card)(templateObject_2$i || (templateObject_2$i = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), function (_a) {
373
+ var theme = _a.theme;
374
+ return theme.borderRadii.xl;
375
+ });
376
+ var templateObject_1$R, templateObject_2$i;
358
377
 
359
378
  /**
360
379
  * Tags let users categorize content using a keyword.
@@ -1136,7 +1155,7 @@ var CheckboxCard = function (props) {
1136
1155
  var handleToggle = function () {
1137
1156
  setChecked(!checked);
1138
1157
  };
1139
- 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, onClick: function (e) { return e.stopPropagation(); } }, { children: jsxRuntime.jsx(StyledLabel, __assign({ hidden: true }, { children: props.label })) }))] })));
1158
+ 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: props.value, onChange: props.onChange, onClick: function (e) { return e.stopPropagation(); } }, { children: jsxRuntime.jsx(StyledLabel, __assign({ hidden: true }, { children: props.label })) }))] })));
1140
1159
  };
1141
1160
  var templateObject_1$G, templateObject_2$e, templateObject_3$9, templateObject_4$5;
1142
1161
 
@@ -2392,6 +2411,7 @@ exports.Chrome = Chrome;
2392
2411
  exports.Close = Close;
2393
2412
  exports.Code = Code;
2394
2413
  exports.Col = Col;
2414
+ exports.ContainerCard = ContainerCard;
2395
2415
  exports.Content = Content;
2396
2416
  exports.Counter = Counter;
2397
2417
  exports.CursorPagination = CursorPagination;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { CardProps } from "./_types";
4
+ interface CardStoryProps extends CardProps {
5
+ title: string;
6
+ content: string;
7
+ }
8
+ export declare const Default: Story<CardStoryProps>;
9
+ export declare const Floating: Story<CardStoryProps>;
10
+ declare const _default: ComponentMeta<import("styled-components").StyledComponent<(props: CardProps) => JSX.Element, any, {}, never>>;
11
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CardProps } from './_types';
2
+ import { CardProps } from "./_types";
3
3
  /**
4
4
  * A Card is a container that groups related content.
5
5
  * <hr>
@@ -7,4 +7,5 @@ import { CardProps } from './_types';
7
7
  - To group related content
8
8
  */
9
9
  declare const Card: (props: CardProps) => JSX.Element;
10
- export { Card };
10
+ declare const ContainerCard: import("styled-components").StyledComponent<(props: CardProps) => JSX.Element, any, {}, never>;
11
+ export { Card, ContainerCard };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.10.6",
3
+ "version": "2.10.9",
4
4
  "dependencies": {
5
5
  "@zendeskgarden/css-bedrock": "^9.0.0",
6
6
  "@zendeskgarden/react-accordions": "^8.49.0",