@elliemae/ds-ribbon 2.0.0-alpha.1 → 2.0.0-alpha.13

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/cjs/DSRibbon.js CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('core-js/modules/esnext.async-iterator.filter.js');
6
+ require('core-js/modules/esnext.iterator.constructor.js');
7
+ require('core-js/modules/esnext.iterator.filter.js');
8
+ require('core-js/modules/esnext.async-iterator.for-each.js');
9
+ require('core-js/modules/esnext.iterator.for-each.js');
5
10
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
11
  var _jsx = require('@babel/runtime/helpers/jsx');
7
12
  require('react');
@@ -17,50 +22,31 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
17
22
 
18
23
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
19
24
 
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default['default'](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
21
- const RibbonRow = /*#__PURE__*/styled__default['default'].div.withConfig({
25
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
26
+ const RibbonRow = /*#__PURE__*/styled__default["default"].div.withConfig({
22
27
  componentId: "sc-9boes5-0"
23
28
  })(["width:100%;display:flex;flex-direction:row;align-items:center;min-height:4rem;@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){height:5rem;overflow-y:hidden;}flex-wrap:nowrap;overflow-x:auto;", ";", ";"], props => {
24
29
  if (props.alignLeft) {
25
- return `
26
- align-items: stretch;
27
- & > ${RibbonCol} {
28
- align-items: flex-start;
29
- align-self: stretch;
30
- flex: 0;
31
- @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
32
- flex: 1;
33
- }
34
- `;
30
+ return "\n align-items: stretch;\n & > ".concat(RibbonCol, " {\n align-items: flex-start;\n align-self: stretch; \n flex: 0;\n @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n flex: 1;\n }\n ");
35
31
  }
36
32
 
37
- return `
38
- // flex:1;
39
- align-items: center;
40
- `;
33
+ return "\n // flex:1;\n align-items: center;\n ";
41
34
  }, props => {
42
35
  if (props.solid) {
43
- return `
44
- & > ${RibbonCol} {
45
- &:after{
46
- top: 0%;
47
- height: 100%;
48
- border-right: solid 1px #CBCFD7;
49
- }
50
- `;
36
+ return "\n & > ".concat(RibbonCol, " {\n &:after{\n top: 0%;\n height: 100%;\n border-right: solid 1px #CBCFD7;\n }\n ");
51
37
  }
52
38
 
53
39
  return '';
54
40
  });
55
- const RibbonCol = /*#__PURE__*/styled__default['default'].div.withConfig({
41
+ const RibbonCol = /*#__PURE__*/styled__default["default"].div.withConfig({
56
42
  componentId: "sc-9boes5-1"
57
43
  })(["display:flex;flex-direction:column;padding:0.25rem 0.5rem;height:100%;justify-content:center;flex:1;position:relative;&:after{position:absolute;top:10%;right:0;height:80%;content:'';border-right:dashed 1px #ebedf0;}& > ", "{align-items:flex-start;}"], RibbonRow);
58
- const RibbonWrapper = /*#__PURE__*/styled__default['default'].div.withConfig({
44
+ const RibbonWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
59
45
  componentId: "sc-9boes5-2"
60
46
  })(["width:100%;display:flex;flex-direction:column;padding:0.62rem 1.22rem;border-bottom:solid 1px #cfcfd7;background:#fff;& > ", "{border-bottom:solid 1px #ebedf0;width:auto;&:last-child{border:none;}& > ", "{&:last-child{&:after{display:none;}}}}"], RibbonRow, RibbonCol);
61
47
  /* eslint-disable indent */
62
48
 
63
- const RibbonBlockIcon = /*#__PURE__*/styled__default['default'].div.withConfig({
49
+ const RibbonBlockIcon = /*#__PURE__*/styled__default["default"].div.withConfig({
64
50
  componentId: "sc-9boes5-3"
65
51
  })(["padding-right:0.5rem;padding-top:0.1rem;svg,svg:not([fill]){fill:", ";}"], props => {
66
52
  if (props.info) return '#1e79c2';
@@ -71,82 +57,83 @@ const RibbonBlockIcon = /*#__PURE__*/styled__default['default'].div.withConfig({
71
57
  });
72
58
  /* eslint-enable indent */
73
59
 
74
- const RibbonBlockLabel = /*#__PURE__*/styled__default['default'].div.withConfig({
60
+ const RibbonBlockLabel = /*#__PURE__*/styled__default["default"].div.withConfig({
75
61
  componentId: "sc-9boes5-4"
76
62
  })(["padding:0.25rem 0.5rem;color:#697489;font-size:0.9rem;line-height:1.2rem;"]);
77
- const RibbonBlockValue = /*#__PURE__*/styled__default['default'].div.withConfig({
63
+ const RibbonBlockValue = /*#__PURE__*/styled__default["default"].div.withConfig({
78
64
  componentId: "sc-9boes5-5"
79
65
  })(["flex:2;font-weight:bold;padding:0.25rem 0.5rem 0.25rem 0rem;font-size:1.1rem;color:#333333;flex-wrap:nowrap;white-space:nowrap;"]);
80
- const RibbonBlockValueLabel = /*#__PURE__*/styled__default['default'].div.withConfig({
66
+ const RibbonBlockValueLabel = /*#__PURE__*/styled__default["default"].div.withConfig({
81
67
  componentId: "sc-9boes5-6"
82
68
  })(["flex:2;padding:0.25rem 0.5rem 0.25rem 0rem;font-size:0.9rem;color:#697489;flex-wrap:nowrap;white-space:nowrap;"]);
83
- const RibbonBlockCol = /*#__PURE__*/styled__default['default'].div.withConfig({
69
+ const RibbonBlockCol = /*#__PURE__*/styled__default["default"].div.withConfig({
84
70
  componentId: "sc-9boes5-7"
85
71
  })(["display:flex;flex-direction:column;flex:2;flex-wrap:nowrap;align-items:", ";height:100%;"], props => {
86
72
  if (props.center) return 'center';
87
73
  return '';
88
74
  });
89
- const RibbonBlockRow = /*#__PURE__*/styled__default['default'].div.withConfig({
75
+ const RibbonBlockRow = /*#__PURE__*/styled__default["default"].div.withConfig({
90
76
  componentId: "sc-9boes5-8"
91
77
  })(["display:flex;flex-direction:row;flex-wrap:nowrap;flex:1;height:100%;align-items:", ";"], props => {
92
78
  if (props.center) return 'center';
93
79
  return '';
94
80
  });
95
- const RibbonBlock = /*#__PURE__*/styled__default['default'].div.withConfig({
81
+ const RibbonBlock = /*#__PURE__*/styled__default["default"].div.withConfig({
96
82
  componentId: "sc-9boes5-9"
97
83
  })(["flex:1;height:100%;"]);
98
84
 
99
- function RibbonCard({
100
- containerProps = {},
101
- icon = null,
102
- label = '',
103
- value = '',
104
- additionalValue = '',
105
- additionalLabel = '',
106
- info = false,
107
- error = false,
108
- warning = false,
109
- success = false,
110
- center = false,
111
- solid = false
112
- }) {
85
+ function RibbonCard(_ref) {
113
86
  var _RibbonBlockValue;
114
87
 
115
- const labelPlace = icon ? /*#__PURE__*/_jsx__default['default'](RibbonBlockIcon, {
88
+ let {
89
+ containerProps = {},
90
+ icon = null,
91
+ label = '',
92
+ value = '',
93
+ additionalValue = '',
94
+ additionalLabel = '',
95
+ info = false,
96
+ error = false,
97
+ warning = false,
98
+ success = false,
99
+ center = false,
100
+ solid = false
101
+ } = _ref;
102
+ const labelPlace = icon ? /*#__PURE__*/_jsx__default["default"](RibbonBlockIcon, {
116
103
  error: error,
117
104
  info: info,
118
105
  success: success,
119
106
  warning: warning
120
- }, void 0, icon) : /*#__PURE__*/_jsx__default['default'](RibbonBlockLabel, {}, void 0, label);
107
+ }, void 0, icon) : /*#__PURE__*/_jsx__default["default"](RibbonBlockLabel, {}, void 0, label);
121
108
 
122
109
  if (additionalValue || additionalLabel) {
123
110
  let additionalInformation;
124
111
 
125
112
  if (additionalValue) {
126
- additionalInformation = additionalValue && /*#__PURE__*/_jsx__default['default'](RibbonBlockValue, {}, void 0, additionalValue);
113
+ additionalInformation = additionalValue && /*#__PURE__*/_jsx__default["default"](RibbonBlockValue, {}, void 0, additionalValue);
127
114
  } else if (additionalLabel) {
128
- additionalInformation = additionalLabel && /*#__PURE__*/_jsx__default['default'](RibbonBlockValueLabel, {}, void 0, additionalLabel);
115
+ additionalInformation = additionalLabel && /*#__PURE__*/_jsx__default["default"](RibbonBlockValueLabel, {}, void 0, additionalLabel);
129
116
  }
130
117
 
131
118
  return /*#__PURE__*/jsxRuntime.jsx(RibbonBlock, _objectSpread(_objectSpread({}, containerProps), {}, {
132
- children: /*#__PURE__*/_jsx__default['default'](RibbonBlockRow, {
119
+ children: /*#__PURE__*/_jsx__default["default"](RibbonBlockRow, {
133
120
  className: "ribbon-block-row",
134
121
  solid: solid,
135
122
  style: {
136
123
  alignItems: 'flex-start'
137
124
  }
138
- }, void 0, labelPlace, /*#__PURE__*/_jsx__default['default'](RibbonBlockCol, {
125
+ }, void 0, labelPlace, /*#__PURE__*/_jsx__default["default"](RibbonBlockCol, {
139
126
  center: center,
140
127
  className: "ribbon-block-col"
141
- }, void 0, _RibbonBlockValue || (_RibbonBlockValue = /*#__PURE__*/_jsx__default['default'](RibbonBlockValue, {}, void 0, value)), additionalInformation))
128
+ }, void 0, _RibbonBlockValue || (_RibbonBlockValue = /*#__PURE__*/_jsx__default["default"](RibbonBlockValue, {}, void 0, value)), additionalInformation))
142
129
  }));
143
130
  }
144
131
 
145
132
  return /*#__PURE__*/jsxRuntime.jsx(RibbonBlock, _objectSpread(_objectSpread({}, containerProps), {}, {
146
- children: /*#__PURE__*/_jsx__default['default'](RibbonBlockRow, {
133
+ children: /*#__PURE__*/_jsx__default["default"](RibbonBlockRow, {
147
134
  center: center,
148
135
  solid: solid
149
- }, void 0, labelPlace, /*#__PURE__*/_jsx__default['default'](RibbonBlockValue, {}, void 0, value))
136
+ }, void 0, labelPlace, /*#__PURE__*/_jsx__default["default"](RibbonBlockValue, {}, void 0, value))
150
137
  }));
151
138
  }
152
139
 
@@ -203,4 +190,4 @@ const DSRibbonCardWithSchema = reactDesc.describe(RibbonCard);
203
190
  DSRibbonCardWithSchema.propTypes = cardprops;
204
191
 
205
192
  exports.DSRibbonCardWithSchema = DSRibbonCardWithSchema;
206
- exports['default'] = DSRibbon;
193
+ exports["default"] = DSRibbon;
package/cjs/index.js CHANGED
@@ -7,4 +7,4 @@ var DSRibbon = require('./DSRibbon.js');
7
7
 
8
8
 
9
9
  exports.DSRibbonCardWithSchema = DSRibbon.DSRibbonCardWithSchema;
10
- exports.default = DSRibbon['default'];
10
+ exports["default"] = DSRibbon["default"];
package/esm/DSRibbon.js CHANGED
@@ -1,3 +1,8 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
7
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
8
  import 'react';
@@ -12,32 +17,13 @@ const RibbonRow = /*#__PURE__*/styled.div.withConfig({
12
17
  componentId: "sc-9boes5-0"
13
18
  })(["width:100%;display:flex;flex-direction:row;align-items:center;min-height:4rem;@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){height:5rem;overflow-y:hidden;}flex-wrap:nowrap;overflow-x:auto;", ";", ";"], props => {
14
19
  if (props.alignLeft) {
15
- return `
16
- align-items: stretch;
17
- & > ${RibbonCol} {
18
- align-items: flex-start;
19
- align-self: stretch;
20
- flex: 0;
21
- @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
22
- flex: 1;
23
- }
24
- `;
20
+ return "\n align-items: stretch;\n & > ".concat(RibbonCol, " {\n align-items: flex-start;\n align-self: stretch; \n flex: 0;\n @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n flex: 1;\n }\n ");
25
21
  }
26
22
 
27
- return `
28
- // flex:1;
29
- align-items: center;
30
- `;
23
+ return "\n // flex:1;\n align-items: center;\n ";
31
24
  }, props => {
32
25
  if (props.solid) {
33
- return `
34
- & > ${RibbonCol} {
35
- &:after{
36
- top: 0%;
37
- height: 100%;
38
- border-right: solid 1px #CBCFD7;
39
- }
40
- `;
26
+ return "\n & > ".concat(RibbonCol, " {\n &:after{\n top: 0%;\n height: 100%;\n border-right: solid 1px #CBCFD7;\n }\n ");
41
27
  }
42
28
 
43
29
  return '';
@@ -86,22 +72,23 @@ const RibbonBlock = /*#__PURE__*/styled.div.withConfig({
86
72
  componentId: "sc-9boes5-9"
87
73
  })(["flex:1;height:100%;"]);
88
74
 
89
- function RibbonCard({
90
- containerProps = {},
91
- icon = null,
92
- label = '',
93
- value = '',
94
- additionalValue = '',
95
- additionalLabel = '',
96
- info = false,
97
- error = false,
98
- warning = false,
99
- success = false,
100
- center = false,
101
- solid = false
102
- }) {
75
+ function RibbonCard(_ref) {
103
76
  var _RibbonBlockValue;
104
77
 
78
+ let {
79
+ containerProps = {},
80
+ icon = null,
81
+ label = '',
82
+ value = '',
83
+ additionalValue = '',
84
+ additionalLabel = '',
85
+ info = false,
86
+ error = false,
87
+ warning = false,
88
+ success = false,
89
+ center = false,
90
+ solid = false
91
+ } = _ref;
105
92
  const labelPlace = icon ? /*#__PURE__*/_jsx(RibbonBlockIcon, {
106
93
  error: error,
107
94
  info: info,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-ribbon",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0-alpha.13",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Ribbon",
6
6
  "module": "./esm/index.js",
@@ -36,17 +36,16 @@
36
36
  "build": "node ../../scripts/build/build.js"
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-basic": "2.0.0-alpha.1",
40
- "@elliemae/ds-classnames": "2.0.0-alpha.1"
39
+ "react-desc": "~4.1.3"
41
40
  },
42
41
  "devDependencies": {
43
- "styled-components": "~5.3.1"
42
+ "styled-components": "~5.3.3"
44
43
  },
45
44
  "peerDependencies": {
46
45
  "lodash": "^4.17.21",
47
46
  "react": "~17.0.2",
48
47
  "react-dom": "^17.0.2",
49
- "styled-components": "^5.3.1"
48
+ "styled-components": "^5.3.3"
50
49
  },
51
50
  "publishConfig": {
52
51
  "access": "public",
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
1
2
  /// <reference types="react" />
2
3
  declare function RibbonCard({ containerProps, icon, label, value, additionalValue, additionalLabel, info, error, warning, success, center, solid, }: {
3
4
  containerProps?: {} | undefined;
@@ -16,37 +17,114 @@ declare function RibbonCard({ containerProps, icon, label, value, additionalValu
16
17
  declare namespace RibbonCard {
17
18
  var propTypes: {
18
19
  /** props to inject to wrapper */
19
- containerProps: any;
20
+ containerProps: {
21
+ defaultValue<T = unknown>(arg: T): {
22
+ deprecated: import("react-desc").PropTypesDescValidator;
23
+ };
24
+ isRequired: import("react-desc").PropTypesDescValidator;
25
+ };
20
26
  /** icon for ribbon card */
21
- icon: any;
27
+ icon: {
28
+ defaultValue<T = unknown>(arg: T): {
29
+ deprecated: import("react-desc").PropTypesDescValidator;
30
+ };
31
+ isRequired: import("react-desc").PropTypesDescValidator;
32
+ };
22
33
  /** label for ribbon card */
23
- label: any;
34
+ label: {
35
+ defaultValue<T = unknown>(arg: T): {
36
+ deprecated: import("react-desc").PropTypesDescValidator;
37
+ };
38
+ isRequired: import("react-desc").PropTypesDescValidator;
39
+ };
24
40
  /** value for ribbon */
25
- value: any;
41
+ value: {
42
+ defaultValue<T = unknown>(arg: T): {
43
+ deprecated: import("react-desc").PropTypesDescValidator;
44
+ };
45
+ isRequired: import("react-desc").PropTypesDescValidator;
46
+ };
26
47
  /** additional value */
27
- additionalValue: any;
48
+ additionalValue: {
49
+ defaultValue<T = unknown>(arg: T): {
50
+ deprecated: import("react-desc").PropTypesDescValidator;
51
+ };
52
+ isRequired: import("react-desc").PropTypesDescValidator;
53
+ };
28
54
  /** additional label */
29
- additionalLabel: any;
55
+ additionalLabel: {
56
+ defaultValue<T = unknown>(arg: T): {
57
+ deprecated: import("react-desc").PropTypesDescValidator;
58
+ };
59
+ isRequired: import("react-desc").PropTypesDescValidator;
60
+ };
30
61
  /** for main label */
31
- info: any;
62
+ info: {
63
+ defaultValue<T = unknown>(arg: T): {
64
+ deprecated: import("react-desc").PropTypesDescValidator;
65
+ };
66
+ isRequired: import("react-desc").PropTypesDescValidator;
67
+ };
32
68
  /** error state toggle */
33
- error: any;
69
+ error: {
70
+ defaultValue<T = unknown>(arg: T): {
71
+ deprecated: import("react-desc").PropTypesDescValidator;
72
+ };
73
+ isRequired: import("react-desc").PropTypesDescValidator;
74
+ };
34
75
  /** warning state toggle */
35
- warning: any;
76
+ warning: {
77
+ defaultValue<T = unknown>(arg: T): {
78
+ deprecated: import("react-desc").PropTypesDescValidator;
79
+ };
80
+ isRequired: import("react-desc").PropTypesDescValidator;
81
+ };
36
82
  /** success state toggle */
37
- success: any;
83
+ success: {
84
+ defaultValue<T = unknown>(arg: T): {
85
+ deprecated: import("react-desc").PropTypesDescValidator;
86
+ };
87
+ isRequired: import("react-desc").PropTypesDescValidator;
88
+ };
38
89
  /** align center */
39
- center: any;
90
+ center: {
91
+ defaultValue<T = unknown>(arg: T): {
92
+ deprecated: import("react-desc").PropTypesDescValidator;
93
+ };
94
+ isRequired: import("react-desc").PropTypesDescValidator;
95
+ };
40
96
  /** solid style */
41
- solid: any;
97
+ solid: {
98
+ defaultValue<T = unknown>(arg: T): {
99
+ deprecated: import("react-desc").PropTypesDescValidator;
100
+ };
101
+ isRequired: import("react-desc").PropTypesDescValidator;
102
+ };
42
103
  };
43
104
  }
44
105
  declare const DSRibbon: {
45
- RibbonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
106
+ RibbonWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
46
107
  RibbonRow: any;
47
108
  RibbonCol: any;
48
109
  RibbonCard: typeof RibbonCard;
49
110
  };
50
- declare const DSRibbonCardWithSchema: any;
111
+ declare const DSRibbonCardWithSchema: {
112
+ (props?: {
113
+ containerProps?: {} | undefined;
114
+ icon?: null | undefined;
115
+ label?: string | undefined;
116
+ value?: string | undefined;
117
+ additionalValue?: string | undefined;
118
+ additionalLabel?: string | undefined;
119
+ info?: boolean | undefined;
120
+ error?: boolean | undefined;
121
+ warning?: boolean | undefined;
122
+ success?: boolean | undefined;
123
+ center?: boolean | undefined;
124
+ solid?: boolean | undefined;
125
+ } | undefined): JSX.Element;
126
+ propTypes: unknown;
127
+ toTypescript: () => import("react-desc").TypescriptSchema;
128
+ };
51
129
  export default DSRibbon;
52
130
  export { DSRibbonCardWithSchema };
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }