@appquality/unguess-design-system 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # v2.4.1 (Fri Mar 18 2022)
2
+
3
+
4
+
5
+ ---
6
+
1
7
  # v2.4.0 (Fri Mar 18 2022)
2
8
 
3
9
  #### 🚀 Enhancement
package/build/index.js CHANGED
@@ -15,32 +15,12 @@ var reactForms = require('@zendeskgarden/react-forms');
15
15
  var reactGrid = require('@zendeskgarden/react-grid');
16
16
  var reactLoaders = require('@zendeskgarden/react-loaders');
17
17
  var formik = require('formik');
18
- var React = require('react');
19
18
  var reactTables = require('@zendeskgarden/react-tables');
20
19
  var reactTypography = require('@zendeskgarden/react-typography');
21
20
 
22
21
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
23
22
 
24
- function _interopNamespace(e) {
25
- if (e && e.__esModule) return e;
26
- var n = Object.create(null);
27
- if (e) {
28
- Object.keys(e).forEach(function (k) {
29
- if (k !== 'default') {
30
- var d = Object.getOwnPropertyDescriptor(e, k);
31
- Object.defineProperty(n, k, d.get ? d : {
32
- enumerable: true,
33
- get: function () { return e[k]; }
34
- });
35
- }
36
- });
37
- }
38
- n["default"] = e;
39
- return Object.freeze(n);
40
- }
41
-
42
23
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
43
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
44
24
 
45
25
  /*! *****************************************************************************
46
26
  Copyright (c) Microsoft Corporation.
@@ -467,135 +447,16 @@ var templateObject_1$4;
467
447
  */
468
448
  var Title = function (props) { return jsxRuntime.jsx(reactNotifications.Title, __assign({}, props)); };
469
449
 
470
- var _g;
471
-
472
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
473
-
474
- var SvgLogo = function SvgLogo(props) {
475
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
476
- xmlns: "http://www.w3.org/2000/svg",
477
- width: 189.135,
478
- height: 30.792,
479
- viewBox: "0 0 189.135 30.792"
480
- }, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
481
- id: "Group_2",
482
- "data-name": "Group 2",
483
- transform: "translate(-356.09 231.603)"
484
- }, /*#__PURE__*/React__namespace.createElement("path", {
485
- id: "Path_10",
486
- "data-name": "Path 10",
487
- d: "M531.1-170.478v-10.108c0-2.8-1.5-4.406-4.12-4.406-2.466,0-3.881,1.606-3.881,4.406v10.108h-3.525v-10.108c0-4.73,2.847-7.669,7.43-7.669,4.629,0,7.62,3.01,7.62,7.669v10.108Z",
488
- transform: "translate(-116.123 -30.79)",
489
- fill: "#003a57"
490
- }), /*#__PURE__*/React__namespace.createElement("path", {
491
- id: "Path_11",
492
- "data-name": "Path 11",
493
- d: "M617.594-170.308c-6.8,0-9.223-4.6-9.223-8.906,0-6.523,4.632-9.443,9.223-9.443a9.179,9.179,0,0,1,6.482,2.667l.141.139-2.276,2.331-.143-.136a6.385,6.385,0,0,0-4.2-1.651c-3.343,0-5.678,2.506-5.678,6.093,0,2.662,1.492,5.508,5.678,5.508a5.452,5.452,0,0,0,3.654-1.263V-177.7h-4.365v-3.277h7.928v7.212l-.261.314A8.759,8.759,0,0,1,617.594-170.308Z",
494
- transform: "translate(-179.191 -30.504)",
495
- fill: "#003a57"
496
- }), /*#__PURE__*/React__namespace.createElement("path", {
497
- id: "Path_12",
498
- "data-name": "Path 12",
499
- d: "M710.01-170.478c-4.629,0-7.621-3.01-7.621-7.669v-10.107h3.525v10.107c0,2.8,1.5,4.407,4.119,4.407,2.467,0,3.881-1.606,3.881-4.407v-10.107h3.525v10.107C717.44-173.416,714.592-170.478,710.01-170.478Z",
500
- transform: "translate(-245.97 -30.79)",
501
- fill: "#003a57"
502
- }), /*#__PURE__*/React__namespace.createElement("path", {
503
- id: "Path_13",
504
- "data-name": "Path 13",
505
- d: "M791.18-170.215v-17.669H805.1v3.453h-10.4v3.9h8.7v3.334h-8.7v3.484h10.4v3.5Z",
506
- transform: "translate(-309.038 -31.053)",
507
- fill: "#003a57"
508
- }), /*#__PURE__*/React__namespace.createElement("path", {
509
- id: "Path_14",
510
- "data-name": "Path 14",
511
- d: "M880.688-170.132c-3.866,0-6.307-1.383-7.463-4.229l-.069-.169,2.981-1.545.082.2c.636,1.58,2.324,2.524,4.516,2.524.854,0,3.642-.166,3.642-2.306,0-1.254-1.206-1.993-3.687-2.26-5.94-.706-6.741-3.054-6.741-5.258,0-3.465,3.347-5.042,6.665-5.067,3.311,0,5.642,1.186,6.743,3.429l.086.176-2.846,1.463-.1-.16a4.623,4.623,0,0,0-3.79-1.764c-2.011,0-3.26.774-3.26,2.02,0,1.228,1.417,1.648,3.546,1.9,3.587.442,6.905,1.417,6.905,5.52C887.9-171.582,884.176-170.132,880.688-170.132Z",
512
- transform: "translate(-367.264 -30.802)",
513
- fill: "#003a57"
514
- }), /*#__PURE__*/React__namespace.createElement("path", {
515
- id: "Path_15",
516
- "data-name": "Path 15",
517
- d: "M965.594-169.8c-3.862,0-6.3-1.382-7.455-4.225l-.068-.169,2.978-1.543.082.2c.636,1.579,2.322,2.521,4.511,2.521.854,0,3.639-.166,3.639-2.3,0-1.253-1.2-1.991-3.684-2.257-5.933-.705-6.733-3.051-6.733-5.252,0-3.461,3.344-5.036,6.657-5.062,3.307,0,5.636,1.184,6.736,3.425l.086.176-2.843,1.461-.1-.16a4.619,4.619,0,0,0-3.786-1.762c-2.009,0-3.257.773-3.257,2.018,0,1.227,1.416,1.647,3.543,1.9,3.583.442,6.9,1.416,6.9,5.514C972.8-171.253,969.079-169.8,965.594-169.8Z",
518
- transform: "translate(-427.577 -31.049)",
519
- fill: "#003a57"
520
- }), /*#__PURE__*/React__namespace.createElement("g", {
521
- id: "Group_1",
522
- "data-name": "Group 1",
523
- transform: "translate(356.09 -231.603)"
524
- }, /*#__PURE__*/React__namespace.createElement("path", {
525
- id: "Path_16",
526
- "data-name": "Path 16",
527
- d: "M441.7-157.552v1.74h-.013c-.149,2.52-1.542,3.954-3.874,3.954a3.812,3.812,0,0,1-4.112-3.954h-.012v-1.74h-3.525v1.74h0v.023h0c.2,4.391,3.148,7.2,7.624,7.2,4.434,0,7.245-2.745,7.434-7.2h0v-1.762Z",
528
- transform: "translate(-408.704 179.006)",
529
- fill: "#003a57"
530
- }), /*#__PURE__*/React__namespace.createElement("rect", {
531
- id: "Rectangle_55",
532
- "data-name": "Rectangle 55",
533
- width: 3.535,
534
- height: 3.535,
535
- transform: "translate(21.459 12.573)",
536
- fill: "#54c38a"
537
- }), /*#__PURE__*/React__namespace.createElement("rect", {
538
- id: "Rectangle_56",
539
- "data-name": "Rectangle 56",
540
- width: 3.585,
541
- height: 3.585,
542
- transform: "translate(32.908 12.573)",
543
- fill: "#003a57"
544
- }), /*#__PURE__*/React__namespace.createElement("rect", {
545
- id: "Rectangle_57",
546
- "data-name": "Rectangle 57",
547
- width: 3.535,
548
- height: 3.535,
549
- transform: "translate(15.427 3.989) rotate(90)",
550
- fill: "#b2c4cd"
551
- }), /*#__PURE__*/React__namespace.createElement("rect", {
552
- id: "Rectangle_58",
553
- "data-name": "Rectangle 58",
554
- width: 3.535,
555
- height: 3.535,
556
- transform: "translate(20.618 8.614) rotate(90)",
557
- fill: "#809cab"
558
- }), /*#__PURE__*/React__namespace.createElement("rect", {
559
- id: "Rectangle_59",
560
- "data-name": "Rectangle 59",
561
- width: 3.535,
562
- height: 3.535,
563
- transform: "translate(8.944 7.179) rotate(90)",
564
- fill: "#cceddc"
565
- }), /*#__PURE__*/React__namespace.createElement("rect", {
566
- id: "Rectangle_60",
567
- "data-name": "Rectangle 60",
568
- width: 3.535,
569
- height: 3.535,
570
- transform: "translate(3.535 0) rotate(90)",
571
- fill: "#ccd8dd"
572
- }), /*#__PURE__*/React__namespace.createElement("rect", {
573
- id: "Rectangle_61",
574
- "data-name": "Rectangle 61",
575
- width: 3.535,
576
- height: 3.535,
577
- transform: "translate(10.631 23.196) rotate(90)",
578
- fill: "#e5ebee"
579
- }), /*#__PURE__*/React__namespace.createElement("rect", {
580
- id: "Rectangle_62",
581
- "data-name": "Rectangle 62",
582
- width: 3.535,
583
- height: 3.535,
584
- transform: "translate(16.831 16.898) rotate(90)",
585
- fill: "#a9e1c5"
586
- })))));
587
- };
588
-
589
450
  /**
590
451
  * Login Form
591
452
  * <hr>
592
453
  * Used for this:
593
454
  - Login user to the application
594
455
  */
595
- var LoginForm = function (props) { return (jsxRuntime.jsx(Grid, { children: jsxRuntime.jsx(Row, __assign({ justifyContent: "center", alignItems: "center" }, { children: jsxRuntime.jsxs(Col, __assign({ size: 4, xs: 12, sm: 12 }, { children: [jsxRuntime.jsx(SvgLogo, { style: { marginBottom: theme.space.md } }), jsxRuntime.jsx(formik.Formik, __assign({}, props, { initialValues: props.initialValues, onSubmit: props.onSubmit, validate: props.validate }, { children: function (_a) {
596
- var values = _a.values, errors = _a.errors, touched = _a.touched, handleChange = _a.handleChange, handleSubmit = _a.handleSubmit, isSubmitting = _a.isSubmitting;
597
- return (jsxRuntime.jsx(formik.Form, __assign({ onSubmit: handleSubmit }, { children: jsxRuntime.jsxs(Card, __assign({ isFloating: true }, { children: [jsxRuntime.jsx(Title, __assign({ style: { textAlign: "center", margin: theme.space.md } }, { children: "Log In" })), jsxRuntime.jsxs(Field, { children: [jsxRuntime.jsx(Input, __assign({ type: "email", name: "email", placeholder: "Email Address", onChange: handleChange, value: values.email }, touched && values.email ? touched.email = true : touched.email = false, errors && errors.email ? { validation: "error" } : (touched.email ? { validation: "success" } : ""))), (errors.email) ? (jsxRuntime.jsx(Message, __assign({ validation: "error" }, { children: errors.email }))) : ""] }), jsxRuntime.jsxs(Field, __assign({ style: { marginTop: theme.space.md } }, { children: [jsxRuntime.jsx(Input, __assign({ type: "password", name: "password", placeholder: "Password", onChange: handleChange, value: values.password }, touched && values.password ? touched.password = true : touched.password = false, errors && errors.password ? { validation: "error" } : (touched.password ? { validation: "success" } : ""))), (errors.password) ? (jsxRuntime.jsx(Message, __assign({ validation: "error" }, { children: errors.password }))) : ""] })), jsxRuntime.jsx("br", {}), jsxRuntime.jsx(Button, __assign({ type: "submit", isStretched: true, disabled: (Object.keys(errors).length) ? true : (isSubmitting) ? true : false, isPrimary: true }, { children: "Log in" }))] })) })));
598
- } }))] })) })) })); };
456
+ var LoginForm = function (props) { return (jsxRuntime.jsx(formik.Formik, __assign({}, props, { initialValues: props.initialValues, onSubmit: props.onSubmit, validate: props.validate }, { children: function (_a) {
457
+ var values = _a.values, errors = _a.errors, touched = _a.touched, handleChange = _a.handleChange, handleSubmit = _a.handleSubmit, isSubmitting = _a.isSubmitting;
458
+ return (jsxRuntime.jsx(formik.Form, __assign({ onSubmit: handleSubmit }, { children: jsxRuntime.jsxs(Card, __assign({ isFloating: true }, { children: [jsxRuntime.jsx(Title, __assign({ style: { textAlign: "center", margin: theme.space.md } }, { children: props.title })), jsxRuntime.jsxs(Field, { children: [jsxRuntime.jsx(Input, __assign({ type: "email", name: "email", placeholder: props.placeholderEmail, onChange: handleChange, value: values.email }, touched && values.email ? touched.email = true : touched.email = false, errors && errors.email ? { validation: "error" } : (touched.email ? { validation: "success" } : ""))), (errors.email) ? (jsxRuntime.jsx(Message, __assign({ validation: "error" }, { children: errors.email }))) : ""] }), jsxRuntime.jsxs(Field, __assign({ style: { marginTop: theme.space.md } }, { children: [jsxRuntime.jsx(Input, __assign({ type: "password", name: "password", placeholder: props.placeholderPassword, onChange: handleChange, value: values.password }, touched && values.password ? touched.password = true : touched.password = false, errors && errors.password ? { validation: "error" } : (touched.password ? { validation: "success" } : ""))), (errors.password) ? (jsxRuntime.jsx(Message, __assign({ validation: "error" }, { children: errors.password }))) : ""] })), jsxRuntime.jsx("br", {}), jsxRuntime.jsx(Button, __assign({ type: "submit", isStretched: true, disabled: (Object.keys(errors).length) ? true : (isSubmitting) ? true : false, isPrimary: true }, { children: props.buttonText }))] })) })));
459
+ } }))); };
599
460
 
600
461
  /**
601
462
  * A Notification is a passive status update that keeps users informed of system progress.
@@ -12,6 +12,10 @@ export interface LoginFormArgs {
12
12
  errors: FormikErrors<any>;
13
13
  touched: FormikTouched<any>;
14
14
  initialValues: LoginFields;
15
+ title: string;
16
+ buttonText: string;
17
+ placeholderEmail: string;
18
+ placeholderPassword: string;
15
19
  }
16
20
  export interface LoginFields {
17
21
  email: string;
@@ -0,0 +1,14 @@
1
+ import { ImgHTMLAttributes } from 'react';
2
+ export interface LogoArgs extends ImgHTMLAttributes<HTMLImageElement> {
3
+ /** Specifies the kind of logo */
4
+ type: Type;
5
+ /** Specifies the css class */
6
+ className: string;
7
+ /** Sets the image dimension */
8
+ size: number;
9
+ }
10
+ export declare enum Type {
11
+ vertical = "vertical",
12
+ horizontal = "horizontal",
13
+ icon = "icon"
14
+ }
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import PropTypes from "prop-types";
3
+ import { LogoArgs, Type } from './_types';
4
+ /**
5
+ * A Logo is a visual way to represent a brand logo.
6
+ * <hr>
7
+ * Used for this:
8
+ * - To visually represent a brand or product
9
+ *
10
+ * Not for this:
11
+ * - To visually represent a common image
12
+ */
13
+ declare const Logo: {
14
+ (props: LogoArgs): JSX.Element;
15
+ propTypes: {
16
+ type: PropTypes.Requireable<string>;
17
+ className: PropTypes.Requireable<string>;
18
+ size: PropTypes.Requireable<number>;
19
+ };
20
+ defaultProps: {
21
+ type: Type;
22
+ size: number;
23
+ style: {};
24
+ className: string;
25
+ };
26
+ };
27
+ export { Logo };
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, Story } from "@storybook/react";
3
+ import { LogoArgs } from "./_types";
4
+ export declare const Default: Story<LogoArgs>;
5
+ declare const _default: ComponentMeta<{
6
+ (props: LogoArgs): JSX.Element;
7
+ propTypes: {
8
+ type: import("prop-types").Requireable<string>;
9
+ className: import("prop-types").Requireable<string>;
10
+ size: import("prop-types").Requireable<number>;
11
+ };
12
+ defaultProps: {
13
+ type: import("./_types").Type;
14
+ size: number;
15
+ style: {};
16
+ className: string;
17
+ };
18
+ }>;
19
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "dependencies": {
5
5
  "@zendeskgarden/react-accordions": "^8.49.0",
6
6
  "@zendeskgarden/react-avatars": "^8.49.0",