@pareto-engineering/design-system 4.0.0-alpha.69 → 4.0.0-alpha.70

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.
Files changed (53) hide show
  1. package/.storybook/preview.js +29 -12
  2. package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +0 -1
  3. package/dist/cjs/a/AnimatedGradient/webGIRenderer.js +0 -1
  4. package/dist/cjs/a/AppContext/ContextProvider.js +2 -0
  5. package/dist/cjs/a/ProgressBar/ProgressBar.js +0 -1
  6. package/dist/cjs/a/XMLEditor/XMLEditor.js +115 -0
  7. package/dist/cjs/a/XMLEditor/common/index.js +13 -0
  8. package/dist/cjs/a/XMLEditor/common/theme.js +186 -0
  9. package/dist/cjs/a/XMLEditor/index.js +13 -0
  10. package/dist/cjs/a/XMLEditor/styles.scss +17 -0
  11. package/dist/cjs/a/index.js +8 -1
  12. package/dist/cjs/b/Logo/Logo.js +0 -1
  13. package/dist/cjs/b/Title/Title.js +0 -1
  14. package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +2 -0
  15. package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +2 -0
  16. package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +0 -2
  17. package/dist/cjs/f/FormInput/FormInput.js +2 -0
  18. package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +11 -1
  19. package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +32 -3
  20. package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +0 -1
  21. package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +0 -1
  22. package/dist/es/a/AnimatedGradient/AnimatedGradient.js +0 -1
  23. package/dist/es/a/AnimatedGradient/webGIRenderer.js +0 -1
  24. package/dist/es/a/BlurOverlay/BlurOverlay.js +0 -1
  25. package/dist/es/a/DotInfo/DotInfo.js +0 -1
  26. package/dist/es/a/ProgressBar/ProgressBar.js +0 -1
  27. package/dist/es/a/XMLEditor/XMLEditor.js +106 -0
  28. package/dist/es/a/XMLEditor/common/index.js +1 -0
  29. package/dist/es/a/XMLEditor/common/theme.js +180 -0
  30. package/dist/es/a/XMLEditor/index.js +1 -0
  31. package/dist/es/a/XMLEditor/styles.scss +17 -0
  32. package/dist/es/a/index.js +2 -1
  33. package/dist/es/b/Logo/Logo.js +0 -1
  34. package/dist/es/b/Title/Title.js +0 -1
  35. package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +0 -2
  36. package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +11 -1
  37. package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +32 -3
  38. package/dist/es/r/common/PrivateRoute/PrivateRoute.js +0 -1
  39. package/dist/es/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +0 -1
  40. package/package.json +6 -4
  41. package/src/stories/StyleGuide/ai-icons.stories.mdx +27 -0
  42. package/src/stories/StyleGuide/icons.stories.mdx +22 -22
  43. package/src/stories/a/CodeEditor.stories.jsx +21 -0
  44. package/src/stories/f/QueryCombobox.stories.jsx +22 -0
  45. package/src/ui/a/XMLEditor/XMLEditor.jsx +171 -0
  46. package/src/ui/a/XMLEditor/common/index.js +1 -0
  47. package/src/ui/a/XMLEditor/common/theme.jsx +184 -0
  48. package/src/ui/a/XMLEditor/index.js +1 -0
  49. package/src/ui/a/XMLEditor/styles.scss +17 -0
  50. package/src/ui/a/index.js +1 -0
  51. package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +12 -0
  52. package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +38 -1
  53. package/tests/__snapshots__/Storyshots.test.js.snap +166 -25
@@ -1,14 +1,37 @@
1
1
  /** @type { import('@storybook/react').Preview } */
2
- // import '../src/local.scss'
3
- // import '@pareto-engineering/styles'
4
- // Same as
5
2
  import '@pareto-engineering/styles/dist/main.css'
6
3
 
7
4
  const preview = {
8
- parameters:{
9
- backgrounds:{
10
- default:'light',
5
+ globalTypes: {
6
+ theme: {
7
+ description: 'Swap theme',
8
+ defaultValue: 'ui-light',
9
+ toolbar: {
10
+ title: 'Theme',
11
+ icon: 'circlehollow',
12
+ items: [
13
+ {
14
+ value: 'ui-light', icon: 'circlehollow', title: 'light',
15
+ },
16
+ {
17
+ value: 'ui-dark', icon: 'circle', title: 'dark',
18
+ },
19
+ ],
20
+ dynamicTitle: true,
21
+ },
22
+ },
23
+ },
24
+ decorators: [
25
+ (Story, context) => {
26
+ const theme = context.parameters.theme || context.globals.theme
27
+ return (
28
+ <div className={theme}>
29
+ <Story />
30
+ </div>
31
+ )
11
32
  },
33
+ ],
34
+ parameters:{
12
35
  actions :{ argTypesRegex: '^on[A-Z].*' },
13
36
  controls:{
14
37
  matchers:{
@@ -16,12 +39,6 @@ const preview = {
16
39
  date :/Date$/,
17
40
  },
18
41
  },
19
- themes:[
20
- {
21
- name:'Light', class:'ui-light', color:'#EFEFEF', default:true,
22
- },
23
- { name: 'Dark', class: 'ui-dark', color: '#121212' },
24
- ],
25
42
  },
26
43
  }
27
44
 
@@ -47,7 +47,6 @@ const AnimatedGradient = _ref => {
47
47
  // {...otherProps}
48
48
  });
49
49
  };
50
-
51
50
  AnimatedGradient.propTypes = {
52
51
  /**
53
52
  * The HTML class names for this element
@@ -356,7 +356,6 @@ class Gradient {
356
356
  window.addEventListener("scroll", this.handleScroll), window.addEventListener("mousedown", this.handleMouseDown), window.addEventListener("mouseup", this.handleMouseUp), window.addEventListener("keydown", this.handleKeyDown), this.isIntersecting = !0, this.addIsLoadedClass(), this.play()
357
357
  }) */);
358
358
  }
359
-
360
359
  disconnect() {
361
360
  this.scrollObserver && (window.removeEventListener('scroll', this.handleScroll), window.removeEventListener('mousedown', this.handleMouseDown), window.removeEventListener('mouseup', this.handleMouseUp), window.removeEventListener('keydown', this.handleKeyDown), this.scrollObserver.disconnect()), window.removeEventListener('resize', this.resize);
362
361
  }
@@ -17,7 +17,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
17
17
  // Package-level Imports
18
18
 
19
19
  // Component-level imports
20
+
20
21
  // Helper Definitions
22
+
21
23
  const reducer = (state, action) => {
22
24
  switch (action.type) {
23
25
  case 'UPDATE_STATE':
@@ -44,7 +44,6 @@ const ProgressBar = _ref => {
44
44
  // {...otherProps}
45
45
  });
46
46
  };
47
-
48
47
  ProgressBar.propTypes = {
49
48
  /**
50
49
  * The HTML id for this element
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var React = _react;
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _state = require("@codemirror/state");
11
+ var _view = require("@codemirror/view");
12
+ var _commands = require("@codemirror/commands");
13
+ var _language = require("@codemirror/language");
14
+ var _langXml = require("@codemirror/lang-xml");
15
+ var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
16
+ var _common = require("./common");
17
+ require("./styles.scss");
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
+ /* eslint-disable import/no-extraneous-dependencies */
22
+
23
+ const baseClassName = _exports.default.base;
24
+ const componentClassName = 'code-editor';
25
+
26
+ /**
27
+ * codemirror documentation:
28
+ * https://codemirror.net/
29
+ */
30
+
31
+ const XMLEditor = _ref => {
32
+ let {
33
+ id,
34
+ className: userClassName,
35
+ style,
36
+ readOnly,
37
+ height,
38
+ gutterWidth,
39
+ config,
40
+ onChange
41
+ } = _ref;
42
+ const editorRef = (0, _react.useRef)();
43
+ (0, _react.useEffect)(() => {
44
+ const startState = _state.EditorState.create({
45
+ doc: config,
46
+ extensions: [_view.keymap.of([_commands.defaultKeymap, _commands.indentWithTab]),
47
+ // TOFIX: Indent with tab prevents indentOnInout from working.
48
+ // indentOnInput(),
49
+ (0, _view.lineNumbers)(), (0, _language.bracketMatching)(), (0, _language.foldGutter)(), (0, _view.drawSelection)(), (0, _view.highlightActiveLine)(), (0, _view.highlightActiveLineGutter)(), (0, _view.highlightSpecialChars)(), (0, _view.dropCursor)(), (0, _view.rectangularSelection)(), (0, _view.crosshairCursor)(), (0, _langXml.xml)(), _common.theme, _state.EditorState.readOnly.of(readOnly), _view.EditorView.updateListener.of(view => {
50
+ onChange(view);
51
+ // view.state.doc.toString() to receive the current content in the editor.
52
+ })]
53
+ });
54
+ const view = new _view.EditorView({
55
+ state: startState,
56
+ parent: editorRef.current
57
+ });
58
+ return () => {
59
+ view.destroy();
60
+ };
61
+ }, [editorRef]);
62
+ return /*#__PURE__*/React.createElement("div", {
63
+ id: id,
64
+ ref: editorRef,
65
+ className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
66
+ style: {
67
+ '--height': height,
68
+ '--gutter-width': gutterWidth,
69
+ ...style
70
+ }
71
+ });
72
+ };
73
+ XMLEditor.propTypes = {
74
+ /**
75
+ * The HTML id for this element
76
+ */
77
+ id: _propTypes.default.string,
78
+ /**
79
+ * The HTML class names for this element
80
+ */
81
+ className: _propTypes.default.string,
82
+ /**
83
+ * The React-written, css properties for this element.
84
+ */
85
+ style: _propTypes.default.objectOf(_propTypes.default.string),
86
+ /**
87
+ * Whether or not the content is read only.
88
+ */
89
+ readOnly: _propTypes.default.bool,
90
+ /**
91
+ * The initial labeling configuration.
92
+ */
93
+ config: _propTypes.default.string,
94
+ /**
95
+ * The height of the editor.
96
+ */
97
+ height: _propTypes.default.string,
98
+ /**
99
+ * The callback for when the labeling configuration changes.
100
+ */
101
+ onChange: _propTypes.default.func,
102
+ /**
103
+ * The width of the gutter.
104
+ */
105
+ gutterWidth: _propTypes.default.string
106
+ };
107
+ XMLEditor.defaultProps = {
108
+ config: `<View>
109
+ <!--Edit this config to customize the labeling interface.-->
110
+ </View>
111
+ `,
112
+ height: '20em',
113
+ gutterWidth: '3em'
114
+ };
115
+ var _default = exports.default = XMLEditor;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "theme", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _theme.default;
10
+ }
11
+ });
12
+ var _theme = _interopRequireDefault(require("./theme"));
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _view = require("@codemirror/view");
8
+ var _language = require("@codemirror/language");
9
+ var _highlight = require("@lezer/highlight");
10
+ /* eslint-disable import/no-extraneous-dependencies */
11
+
12
+ // Using https://github.com/one-dark/vscode-one-dark-theme/ as reference for the colors
13
+ const chalky = '#e5c07b';
14
+ const coral = '#e06c75';
15
+ const cyan = '#56b6c2';
16
+ const invalid = '#ffffff';
17
+ const ivory = '#abb2bf';
18
+ const stone = '#7d8799'; // Brightened compared to original to increase contrast
19
+ const malibu = '#61afef';
20
+ const sage = '#98c379';
21
+ const whiskey = '#d19a66';
22
+ const violet = '#c678dd';
23
+ const darkBackground = '#21252b';
24
+ const highlightBackground = '#2c313a';
25
+ const background = '#282c34';
26
+ const tooltipBackground = '#353a42';
27
+ const selection = '#3E4451';
28
+ const cursor = '#528bff';
29
+ /**
30
+ The colors used in the theme, as CSS color strings.
31
+ */
32
+ // const color = {
33
+ // chalky,
34
+ // coral,
35
+ // cyan,
36
+ // invalid,
37
+ // ivory,
38
+ // stone,
39
+ // malibu,
40
+ // sage,
41
+ // whiskey,
42
+ // violet,
43
+ // darkBackground,
44
+ // highlightBackground,
45
+ // background,
46
+ // tooltipBackground,
47
+ // selection,
48
+ // cursor
49
+ // };
50
+ /**
51
+ The editor theme styles for One Dark.
52
+ */
53
+ const oneDarkTheme = /* @__PURE__ */_view.EditorView.theme({
54
+ '&': {
55
+ color: ivory,
56
+ backgroundColor: background
57
+ },
58
+ '.cm-content': {
59
+ caretColor: cursor
60
+ },
61
+ '.cm-cursor, .cm-dropCursor': {
62
+ borderLeftColor: cursor
63
+ },
64
+ '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
65
+ backgroundColor: selection
66
+ },
67
+ '.cm-panels': {
68
+ backgroundColor: darkBackground,
69
+ color: ivory
70
+ },
71
+ '.cm-panels.cm-panels-top': {
72
+ borderBottom: '2px solid black'
73
+ },
74
+ '.cm-panels.cm-panels-bottom': {
75
+ borderTop: '2px solid black'
76
+ },
77
+ '.cm-searchMatch': {
78
+ backgroundColor: '#72a1ff59',
79
+ outline: '1px solid #457dff'
80
+ },
81
+ '.cm-searchMatch.cm-searchMatch-selected': {
82
+ backgroundColor: '#6199ff2f'
83
+ },
84
+ '.cm-activeLine': {
85
+ backgroundColor: '#6699ff0b'
86
+ },
87
+ '.cm-selectionMatch': {
88
+ backgroundColor: '#aafe661a'
89
+ },
90
+ '&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
91
+ backgroundColor: '#bad0f847'
92
+ },
93
+ '.cm-gutters': {
94
+ backgroundColor: background,
95
+ color: stone,
96
+ border: 'none'
97
+ },
98
+ '.cm-activeLineGutter': {
99
+ backgroundColor: highlightBackground
100
+ },
101
+ '.cm-foldPlaceholder': {
102
+ backgroundColor: 'transparent',
103
+ border: 'none',
104
+ color: '#ddd'
105
+ },
106
+ '.cm-tooltip': {
107
+ border: 'none',
108
+ backgroundColor: tooltipBackground
109
+ },
110
+ '.cm-tooltip .cm-tooltip-arrow:before': {
111
+ borderTopColor: 'transparent',
112
+ borderBottomColor: 'transparent'
113
+ },
114
+ '.cm-tooltip .cm-tooltip-arrow:after': {
115
+ borderTopColor: tooltipBackground,
116
+ borderBottomColor: tooltipBackground
117
+ },
118
+ '.cm-tooltip-autocomplete': {
119
+ '& > ul > li[aria-selected]': {
120
+ backgroundColor: highlightBackground,
121
+ color: ivory
122
+ }
123
+ }
124
+ }, {
125
+ dark: true
126
+ });
127
+ /**
128
+ The highlighting style for code in the One Dark theme.
129
+ */
130
+ const oneDarkHighlightStyle = /* @__PURE__ */_language.HighlightStyle.define([{
131
+ tag: _highlight.tags.keyword,
132
+ color: violet
133
+ }, {
134
+ tag: [_highlight.tags.name, _highlight.tags.deleted, _highlight.tags.character, _highlight.tags.propertyName, _highlight.tags.macroName],
135
+ color: coral
136
+ }, {
137
+ tag: [/* @__PURE__ */_highlight.tags.function(_highlight.tags.variableName), _highlight.tags.labelName],
138
+ color: malibu
139
+ }, {
140
+ tag: [_highlight.tags.color, /* @__PURE__ */_highlight.tags.constant(_highlight.tags.name), /* @__PURE__ */_highlight.tags.standard(_highlight.tags.name)],
141
+ color: whiskey
142
+ }, {
143
+ tag: [/* @__PURE__ */_highlight.tags.definition(_highlight.tags.name), _highlight.tags.separator],
144
+ color: ivory
145
+ }, {
146
+ tag: [_highlight.tags.typeName, _highlight.tags.className, _highlight.tags.number, _highlight.tags.changed, _highlight.tags.annotation, _highlight.tags.modifier, _highlight.tags.self, _highlight.tags.namespace],
147
+ color: chalky
148
+ }, {
149
+ tag: [_highlight.tags.operator, _highlight.tags.operatorKeyword, _highlight.tags.url, _highlight.tags.escape, _highlight.tags.regexp, _highlight.tags.link, /* @__PURE__ */_highlight.tags.special(_highlight.tags.string)],
150
+ color: cyan
151
+ }, {
152
+ tag: [_highlight.tags.meta, _highlight.tags.comment],
153
+ color: stone
154
+ }, {
155
+ tag: _highlight.tags.strong,
156
+ fontWeight: 'bold'
157
+ }, {
158
+ tag: _highlight.tags.emphasis,
159
+ fontStyle: 'italic'
160
+ }, {
161
+ tag: _highlight.tags.strikethrough,
162
+ textDecoration: 'line-through'
163
+ }, {
164
+ tag: _highlight.tags.link,
165
+ color: stone,
166
+ textDecoration: 'underline'
167
+ }, {
168
+ tag: _highlight.tags.heading,
169
+ fontWeight: 'bold',
170
+ color: coral
171
+ }, {
172
+ tag: [_highlight.tags.atom, _highlight.tags.bool, /* @__PURE__ */_highlight.tags.special(_highlight.tags.variableName)],
173
+ color: whiskey
174
+ }, {
175
+ tag: [_highlight.tags.processingInstruction, _highlight.tags.string, _highlight.tags.inserted],
176
+ color: sage
177
+ }, {
178
+ tag: _highlight.tags.invalid,
179
+ color: invalid
180
+ }]);
181
+ /**
182
+ Extension to enable the One Dark theme (both the editor theme and
183
+ the highlight style).
184
+ */
185
+ const oneDark = [oneDarkTheme, /* @__PURE__ */(0, _language.syntaxHighlighting)(oneDarkHighlightStyle)];
186
+ var _default = exports.default = oneDark;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "XMLEditor", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _XMLEditor.default;
10
+ }
11
+ });
12
+ var _XMLEditor = _interopRequireDefault(require("./XMLEditor"));
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,17 @@
1
+ @use "@pareto-engineering/bem";
2
+
3
+ .#{bem.$base}.code-editor {
4
+ border-radius: 1em;
5
+ height: var(--height);
6
+ overflow: auto;
7
+
8
+ > .cm-editor {
9
+ height: 100%;
10
+
11
+ .cm-gutters {
12
+ display: flex;
13
+ justify-content: flex-end;
14
+ width: var(--gutter-width);
15
+ }
16
+ }
17
+ }
@@ -159,6 +159,12 @@ Object.defineProperty(exports, "ToggleSwitch", {
159
159
  return _ToggleSwitch.ToggleSwitch;
160
160
  }
161
161
  });
162
+ Object.defineProperty(exports, "XMLEditor", {
163
+ enumerable: true,
164
+ get: function () {
165
+ return _XMLEditor.XMLEditor;
166
+ }
167
+ });
162
168
  Object.defineProperty(exports, "useApp", {
163
169
  enumerable: true,
164
170
  get: function () {
@@ -195,4 +201,5 @@ var _Tip = require("./Tip");
195
201
  var _AnimatedGradient = require("./AnimatedGradient");
196
202
  var _TextSteps = require("./TextSteps");
197
203
  var _Removable = require("./Removable");
198
- var _ToggleSwitch = require("./ToggleSwitch");
204
+ var _ToggleSwitch = require("./ToggleSwitch");
205
+ var _XMLEditor = require("./XMLEditor");
@@ -75,7 +75,6 @@ const Logo = _ref => {
75
75
  // {...otherProps}
76
76
  });
77
77
  };
78
-
79
78
  Logo.propTypes = {
80
79
  /**
81
80
  * The HTML id for this element
@@ -103,7 +103,6 @@ Title.propTypes = {
103
103
  subtitleProps: _propTypes.default.object
104
104
  /* eslint-enable react/forbid-prop-types */
105
105
  };
106
-
107
106
  Title.defaultProps = {
108
107
  headingAs: 'h1',
109
108
  subtitleAs: 'p'
@@ -16,7 +16,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
16
16
  /* @pareto-engineering/generator-front 1.0.12 */
17
17
 
18
18
  // Local Definitions
19
+
19
20
  // const baseClassName = styleNames.base
21
+
20
22
  const componentClassName = 'horizontal-menu';
21
23
 
22
24
  /**
@@ -16,7 +16,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
16
16
  /* @pareto-engineering/generator-front 1.0.12 */
17
17
 
18
18
  // Local Definitions
19
+
19
20
  // const baseClassName = styleNames.base
21
+
20
22
  const componentClassName = 'sidebar';
21
23
 
22
24
  /**
@@ -47,14 +47,12 @@ const SocialMediaShareButton = _ref => {
47
47
  link: `https://www.facebook.com/sharer/sharer.php?u=${link}`
48
48
  // link: `https://www.facebook.com/sharer/sharer.php?u=${link}&quote=${title}`,
49
49
  },
50
-
51
50
  twitter: {
52
51
  icon: 't',
53
52
  link: `https://twitter.com/intent/tweet?url=${link}`
54
53
  // link: `https://twitter.com/intent/tweet?text=${title}&url=${link}`,
55
54
  }
56
55
  };
57
-
58
56
  return /*#__PURE__*/React.createElement("a", {
59
57
  href: defaultsMap[type].link,
60
58
  target: "_blank",
@@ -14,7 +14,9 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
14
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
15
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); } /* @pareto-engineering/generator-front 1.0.12 */
16
16
  // Local Definitions
17
+
17
18
  // const baseClassName = styleNames.base
19
+
18
20
  const componentClassName = 'form-input';
19
21
 
20
22
  /**
@@ -31,6 +31,7 @@ const QueryCombobox = _ref => {
31
31
  name,
32
32
  label,
33
33
  labelColor,
34
+ getTagColor,
34
35
  color,
35
36
  optional,
36
37
  description,
@@ -110,6 +111,7 @@ const QueryCombobox = _ref => {
110
111
  name,
111
112
  label,
112
113
  labelColor,
114
+ getTagColor,
113
115
  optional,
114
116
  description,
115
117
  setValue,
@@ -213,7 +215,15 @@ QueryCombobox.propTypes = {
213
215
  * Whether to prompt the user to create a new option if the search input
214
216
  * does not match any of the options
215
217
  */
216
- promptCreateNewOption: _propTypes.default.bool
218
+ promptCreateNewOption: _propTypes.default.bool,
219
+ /**
220
+ * The placeholder text for the input
221
+ * */
222
+ placeholder: _propTypes.default.string,
223
+ /**
224
+ * The function to get the color of the tag
225
+ * */
226
+ getTagColor: _propTypes.default.func
217
227
  };
218
228
  QueryCombobox.defaultProps = {
219
229
  optionsKeyMap: {
@@ -41,6 +41,7 @@ const MultipleCombobox = _ref => {
41
41
  labelColor,
42
42
  name,
43
43
  optional,
44
+ getTagColor,
44
45
  options: items,
45
46
  getOptions,
46
47
  setValue,
@@ -102,7 +103,6 @@ const MultipleCombobox = _ref => {
102
103
  ...changes,
103
104
  isOpen: true // keep the menu open after selection.
104
105
  };
105
-
106
106
  default:
107
107
  break;
108
108
  }
@@ -185,7 +185,7 @@ const MultipleCombobox = _ref => {
185
185
  removeSelectedItem(selectedItem);
186
186
  },
187
187
  isCompact: true,
188
- color: color
188
+ color: getTagColor ? getTagColor(selectedItem) : color
189
189
  }, /*#__PURE__*/React.createElement("span", null, selectedItem.label), /*#__PURE__*/React.createElement("span", {
190
190
  className: "icon close"
191
191
  }, "Y"))))), /*#__PURE__*/React.createElement("div", {
@@ -294,7 +294,36 @@ MultipleCombobox.propTypes = {
294
294
  /**
295
295
  * The placeholder text for the input
296
296
  */
297
- placeholder: _propTypes.default.string
297
+ placeholder: _propTypes.default.string,
298
+ /**
299
+ * The function to set the options of the custom select input
300
+ */
301
+ setOptions: _propTypes.default.func,
302
+ /**
303
+ * Whether to prompt the user to create a new option if the search input
304
+ * does not match any of the options
305
+ */
306
+ promptCreateNewOption: _propTypes.default.bool,
307
+ /**
308
+ * The function to get the color of the tag
309
+ */
310
+ getTagColor: _propTypes.default.func,
311
+ /**
312
+ * The color of the label
313
+ */
314
+ labelColor: _propTypes.default.string,
315
+ /**
316
+ * The function to validate the input
317
+ */
318
+ validate: _propTypes.default.func,
319
+ /**
320
+ * Whether to allow multiple items selection
321
+ */
322
+ multiple: _propTypes.default.bool,
323
+ /**
324
+ * The variable to be used to search the data
325
+ */
326
+ searchVariable: _propTypes.default.string
298
327
  };
299
328
  MultipleCombobox.defaultProps = {
300
329
  // someProp: false
@@ -54,7 +54,6 @@ const PrivateRoute = _ref => {
54
54
  })
55
55
  }));
56
56
  };
57
-
58
57
  PrivateRoute.propTypes = {
59
58
  /**
60
59
  * A function that takes the user and returns a boolean.
@@ -48,7 +48,6 @@ const node /*: ConcreteRequest*/ = function () {
48
48
  "name": "QueryLoaderHelloQuery",
49
49
  "selections": v0 /*: any*/
50
50
  },
51
-
52
51
  "params": {
53
52
  "cacheID": "463f9ee8a82dd6ec8dedeb28649cce74",
54
53
  "id": null,
@@ -37,7 +37,6 @@ const AnimatedGradient = ({
37
37
  // {...otherProps}
38
38
  });
39
39
  };
40
-
41
40
  AnimatedGradient.propTypes = {
42
41
  /**
43
42
  * The HTML class names for this element
@@ -319,7 +319,6 @@ class Gradient {
319
319
  window.addEventListener("scroll", this.handleScroll), window.addEventListener("mousedown", this.handleMouseDown), window.addEventListener("mouseup", this.handleMouseUp), window.addEventListener("keydown", this.handleKeyDown), this.isIntersecting = !0, this.addIsLoadedClass(), this.play()
320
320
  }) */);
321
321
  }
322
-
323
322
  disconnect() {
324
323
  this.scrollObserver && (window.removeEventListener('scroll', this.handleScroll), window.removeEventListener('mousedown', this.handleMouseDown), window.removeEventListener('mouseup', this.handleMouseUp), window.removeEventListener('keydown', this.handleKeyDown), this.scrollObserver.disconnect()), window.removeEventListener('resize', this.resize);
325
324
  }
@@ -42,5 +42,4 @@ BlurOverlay.defaultProps = {
42
42
  blur: true
43
43
  // someProp:false
44
44
  };
45
-
46
45
  export default BlurOverlay;
@@ -71,5 +71,4 @@ DotInfo.defaultProps = {
71
71
  height: '2em'
72
72
  // someProp:false
73
73
  };
74
-
75
74
  export default DotInfo;