@eturnity/eturnity_reusable_components 8.26.11-EPDM-11600.15 → 8.26.11-qa-07.0

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/dist/main.es23.js CHANGED
@@ -1,66 +1,232 @@
1
- function makeMap(str, expectsLowerCase) {
2
- const map = /* @__PURE__ */ Object.create(null);
3
- const list = str.split(",");
4
- for (let i = 0; i < list.length; i++) {
5
- map[list[i]] = true;
6
- }
7
- return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
8
- }
9
- !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
10
- !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
11
- const onRE = /^on[^a-z]/;
12
- const isOn = (key) => onRE.test(key);
13
- const isModelListener = (key) => key.startsWith("onUpdate:");
14
- const extend = Object.assign;
15
- const isArray = Array.isArray;
16
- const isFunction = (val) => typeof val === "function";
17
- const isString = (val) => typeof val === "string";
18
- const cacheStringFunction = (fn) => {
19
- const cache = /* @__PURE__ */ Object.create(null);
20
- return (str) => {
21
- const hit = cache[str];
22
- return hit || (cache[str] = fn(str));
23
- };
1
+ import styled from "./main.es7.js";
2
+ import _sfc_main$1 from "./main.es24.js";
3
+ import theme from "./main.es8.js";
4
+ import "./main.es3.js";
5
+ import _export_sfc from "./main.es11.js";
6
+ import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createCommentVNode, createTextVNode } from "./main.es6.js";
7
+ import { toDisplayString } from "./main.es16.js";
8
+ const PageContainer = styled.div``;
9
+ const ButtonAttrs = {
10
+ type: String,
11
+ isDisabled: Boolean,
12
+ minWidth: String,
13
+ width: String,
14
+ noWrap: Boolean,
15
+ height: String,
16
+ variant: String,
17
+ buttonSize: String,
18
+ appTheme: String,
19
+ isActive: Boolean
24
20
  };
25
- const hyphenateRE = /\B([A-Z])/g;
26
- const hyphenate = cacheStringFunction(
27
- (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
28
- );
29
- const capitalize = cacheStringFunction(
30
- (str) => str.charAt(0).toUpperCase() + str.slice(1)
31
- );
32
- const invokeArrayFns = (fns, arg) => {
33
- for (let i = 0; i < fns.length; i++) {
34
- fns[i](arg);
35
- }
21
+ const ButtonContainer = styled("div", ButtonAttrs)`
22
+ display: flex;
23
+ justify-content: center;
24
+ padding: ${(props) => {
25
+ var _a, _b, _c, _d;
26
+ return (_d = (_c = (_b = (_a = props.theme) == null ? void 0 : _a.mainButton) == null ? void 0 : _b.size) == null ? void 0 : _c[props.buttonSize]) == null ? void 0 : _d.padding;
27
+ }};
28
+ font-size: ${(props) => {
29
+ var _a, _b, _c, _d;
30
+ return (_d = (_c = (_b = (_a = props.theme) == null ? void 0 : _a.mainButton) == null ? void 0 : _b.size) == null ? void 0 : _c[props.buttonSize]) == null ? void 0 : _d.fontSize;
31
+ }};
32
+ color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.textColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.textColor};
33
+ background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.isActive ? props.theme.mainButton[props.appTheme][props.type][props.variant].active.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.backgroundColor};
34
+ border: ${(props) => {
35
+ const borderValue = props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.borderColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.borderColor;
36
+ return borderValue ? "1px solid " + borderValue : "none";
37
+ }};
38
+ border-radius: 4px;
39
+ text-align: center;
40
+ cursor: ${(props) => props.isDisabled ? "not-allowed" : "pointer"};
41
+ user-select: none;
42
+ ${(props) => props.minWidth ? `min-width: ${props.minWidth};` : ""};
43
+ ${(props) => props.noWrap ? `white-space: nowrap;` : ""};
44
+ height: ${(props) => props.height};
45
+ line-height: 1;
46
+ width: ${(props) => props.width};
47
+ &:hover {
48
+ background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].hover.backgroundColor};
49
+ }
50
+
51
+ &:active {
52
+ background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].active.backgroundColor};
53
+ }
54
+ `;
55
+ const AltAttrs = {
56
+ altStyle: Boolean,
57
+ color: String
36
58
  };
37
- const looseToNumber = (val) => {
38
- const n = parseFloat(val);
39
- return isNaN(n) ? val : n;
59
+ styled("div", AltAttrs)`
60
+ background-color: ${(props) => props.color ? props.color : props.theme.colors.transparentWhite1};
61
+ padding: 7px;
62
+ height: 100%;
63
+ width: 30%;
64
+ justify-content: center;
65
+ display: flex;
66
+ align-items: center;
67
+ border-radius: 4px 0 0 4px;
68
+ color: ${(props) => props.theme.colors.white};
69
+ all: ${(props) => props.altStyle ? "" : "unset"};
70
+ `;
71
+ styled("span", AltAttrs)`
72
+ padding: ${(props) => props.altStyle ? "7px" : "0"};
73
+ all: ${(props) => props.altStyle ? "" : "unset"};
74
+ `;
75
+ const LabelAttrs = {
76
+ hasIcon: Boolean
77
+ };
78
+ const LabelComponent = styled("span", LabelAttrs)`
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ gap: ${(props) => props.hasIcon ? "5px" : "0"};
83
+ `;
84
+ const _sfc_main = {
85
+ name: "MainButton",
86
+ components: {
87
+ Icon: _sfc_main$1,
88
+ LabelComponent,
89
+ PageContainer,
90
+ ButtonContainer
91
+ },
92
+ props: {
93
+ type: {
94
+ required: false,
95
+ default: "primary",
96
+ // primary, secondary, tertiary, ghost
97
+ type: String
98
+ },
99
+ variant: {
100
+ required: false,
101
+ default: "main",
102
+ // main, cancel
103
+ type: String
104
+ },
105
+ isDisabled: {
106
+ required: false,
107
+ default: false,
108
+ type: Boolean
109
+ },
110
+ isActive: {
111
+ required: false,
112
+ default: false,
113
+ type: Boolean
114
+ },
115
+ icon: {
116
+ required: false,
117
+ default: null,
118
+ type: String
119
+ },
120
+ iconColor: {
121
+ required: false,
122
+ default: "",
123
+ type: String
124
+ },
125
+ iconAltStyle: {
126
+ required: false,
127
+ default: false,
128
+ type: Boolean
129
+ },
130
+ iconAltStyleColor: {
131
+ required: false,
132
+ default: null,
133
+ type: String
134
+ },
135
+ text: {
136
+ required: true,
137
+ type: String
138
+ },
139
+ noWrap: {
140
+ required: false,
141
+ default: false,
142
+ type: Boolean
143
+ },
144
+ minWidth: {
145
+ required: false,
146
+ default: null,
147
+ type: String
148
+ },
149
+ width: {
150
+ required: false,
151
+ default: "auto",
152
+ type: String
153
+ },
154
+ height: {
155
+ required: false,
156
+ default: "auto",
157
+ type: String
158
+ },
159
+ id: {
160
+ required: false,
161
+ default: null,
162
+ type: String
163
+ },
164
+ dataId: {
165
+ type: String,
166
+ default: ""
167
+ },
168
+ dataQaId: {
169
+ type: String,
170
+ default: ""
171
+ },
172
+ appTheme: {
173
+ type: String,
174
+ default: "light"
175
+ },
176
+ buttonSize: {
177
+ type: String,
178
+ default: "medium",
179
+ required: false
180
+ }
181
+ },
182
+ computed: {
183
+ theme() {
184
+ return theme;
185
+ },
186
+ getIconColor() {
187
+ return this.isDisabled ? this.theme.mainButton[this.appTheme][this.type][this.variant].disabled.textColor : this.iconColor ? this.iconColor : this.theme.mainButton[this.appTheme][this.type][this.variant].default.textColor;
188
+ }
189
+ }
40
190
  };
41
- const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
42
- const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
43
- const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
44
- const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
45
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
46
- const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
47
- function includeBooleanAttr(value) {
48
- return !!value || value === "";
191
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
192
+ const _component_Icon = resolveComponent("Icon");
193
+ const _component_LabelComponent = resolveComponent("LabelComponent");
194
+ const _component_ButtonContainer = resolveComponent("ButtonContainer");
195
+ const _component_PageContainer = resolveComponent("PageContainer");
196
+ return openBlock(), createBlock(_component_PageContainer, null, {
197
+ default: withCtx(() => [createVNode(_component_ButtonContainer, {
198
+ id: $props.id,
199
+ "app-theme": $props.appTheme,
200
+ "button-size": $props.buttonSize,
201
+ "data-id": $props.dataId,
202
+ "data-qa-id": $props.dataQaId,
203
+ height: $props.height,
204
+ "is-active": $props.isActive,
205
+ "is-disabled": $props.isDisabled,
206
+ "min-width": $props.minWidth,
207
+ "no-wrap": $props.noWrap,
208
+ type: $props.type,
209
+ variant: $props.variant,
210
+ width: $props.width
211
+ }, {
212
+ default: withCtx(() => [createVNode(_component_LabelComponent, {
213
+ "has-icon": Boolean($props.icon)
214
+ }, {
215
+ default: withCtx(() => [$props.icon ? (openBlock(), createBlock(_component_Icon, {
216
+ key: 0,
217
+ color: $options.getIconColor,
218
+ "hovered-color": $options.getIconColor,
219
+ name: $props.icon,
220
+ size: "14px"
221
+ }, null, 8, ["color", "hovered-color", "name"])) : createCommentVNode("", true), createTextVNode(" " + toDisplayString($props.text), 1)]),
222
+ _: 1
223
+ }, 8, ["has-icon"])]),
224
+ _: 1
225
+ }, 8, ["id", "app-theme", "button-size", "data-id", "data-qa-id", "height", "is-active", "is-disabled", "min-width", "no-wrap", "type", "variant", "width"])]),
226
+ _: 1
227
+ });
49
228
  }
229
+ const RCButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
50
230
  export {
51
- capitalize,
52
- extend,
53
- hyphenate,
54
- includeBooleanAttr,
55
- invokeArrayFns,
56
- isArray,
57
- isFunction,
58
- isHTMLTag,
59
- isModelListener,
60
- isOn,
61
- isSVGTag,
62
- isSpecialBooleanAttr,
63
- isString,
64
- looseToNumber,
65
- makeMap
231
+ RCButton as default
66
232
  };
package/dist/main.es24.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./main.es3.js";
2
2
  import styled from "./main.es7.js";
3
3
  import { fetchIcon } from "./main.es378.js";
4
- import { reactive } from "./main.es17.js";
4
+ import { reactive } from "./main.es18.js";
5
5
  import { computed, onMounted, watch, openBlock, createBlock, withCtx, createVNode, createElementVNode as createBaseVNode, createTextVNode, createCommentVNode } from "./main.es6.js";
6
- import { toDisplayString } from "./main.es22.js";
6
+ import { toDisplayString } from "./main.es16.js";
7
7
  const _hoisted_1 = ["innerHTML"];
8
8
  const _sfc_main = {
9
9
  __name: "index",
package/dist/main.es5.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { isRuntimeOnly, warn, createRenderer, callWithAsyncErrorHandling } from "./main.es6.js";
2
2
  import { Comment, Fragment, Static, Teleport, Text, callWithErrorHandling, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, devtools, getCurrentInstance, guardReactiveProps, h, handleError, initCustomFormatter, inject, isVNode, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, provide, queuePostFlushCb, renderList, renderSlot, resolveComponent, resolveDynamicComponent, setBlockTracking, setDevtoolsHook, ssrContextKey, useSSRContext, version, watch, watchEffect, withCtx, withDirectives } from "./main.es6.js";
3
- import { isFunction, isHTMLTag, isSVGTag, isString, looseToNumber, isArray, invokeArrayFns, hyphenate, extend, isOn, isModelListener, capitalize, isSpecialBooleanAttr, includeBooleanAttr } from "./main.es23.js";
4
- import { camelize } from "./main.es22.js";
5
- import { capitalize as capitalize2, normalizeClass, normalizeStyle, toDisplayString, toHandlerKey } from "./main.es22.js";
3
+ import { isFunction, isHTMLTag, isSVGTag, isString, looseToNumber, isArray, invokeArrayFns, hyphenate, extend, isOn, isModelListener, capitalize, isSpecialBooleanAttr, includeBooleanAttr } from "./main.es15.js";
4
+ import { camelize } from "./main.es16.js";
5
+ import { capitalize as capitalize2, normalizeClass, normalizeStyle, toDisplayString, toHandlerKey } from "./main.es16.js";
6
6
  const svgNS = "http://www.w3.org/2000/svg";
7
7
  const doc = typeof document !== "undefined" ? document : null;
8
8
  const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
@@ -1,4 +1,4 @@
1
- const __vite_glob_0_174 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMiAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xOC40Mzg5IDMuMDYxMTNDMTQuMzU3NCAtMS4wMjAzOCA3LjY0MjYzIC0xLjAyMDM4IDMuNTYxMTMgMy4wNjExM0MtMC41MjAzNzYgNy4xNDI2MyAtMC41MjAzNzYgMTMuODU3NCAzLjU2MTEzIDE3LjkzODlDNy42NDI2MyAyMi4wMjA0IDE0LjM1NzQgMjIuMDIwNCAxOC40Mzg5IDE3LjkzODlDMjIuNTIwNCAxMy44NTc0IDIyLjUyMDQgNy4yNzQzIDE4LjQzODkgMy4wNjExM1pNMTYuNDY0IDE0LjI1MjRMMTQuNjIwNyAxNi4wOTU2TDEwLjkzNDIgMTIuNDA5MUw3LjI0NzY1IDE2LjA5NTZMNS40MDQzOSAxNC4yNTI0TDkuMDkwOTEgMTAuNTY1OEw1LjQwNDM5IDYuODc5MzFMNy4yNDc2NSA1LjAzNjA1TDEwLjkzNDIgOC43MjI1N0wxNC42MjA3IDUuMDM2MDVMMTYuNDY0IDYuODc5MzFMMTIuNzc3NCAxMC41NjU4TDE2LjQ2NCAxNC4yNTI0WiIgZmlsbD0iI0ZGNTY1NiIvPgo8L3N2Zz4K";
1
+ const __vite_glob_0_174 = "data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjE2IiB2aWV3Ym94PSIxMiAxMiAxNiAxNiIgd2lkdGg9IjE2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSI3Ij48L2NpcmNsZT4KPHBhdGggZD0iTTI0Ljk1OTIgMTUuMDQwOEMyMi4yMzgyIDEyLjMxOTcgMTcuNzYxOCAxMi4zMTk3IDE1LjA0MDggMTUuMDQwOEMxMi4zMTk3IDE3Ljc2MTggMTIuMzE5NyAyMi4yMzgyIDE1LjA0MDggMjQuOTU5MkMxNy43NjE4IDI3LjY4MDMgMjIuMjM4MiAyNy42ODAzIDI0Ljk1OTIgMjQuOTU5MkMyNy42ODAzIDIyLjIzODIgMjcuNjgwMyAxNy44NDk1IDI0Ljk1OTIgMTUuMDQwOFpNMjMuNjQyNiAyMi41MDE2TDIyLjQxMzggMjMuNzMwNEwxOS45NTYxIDIxLjI3MjdMMTcuNDk4NCAyMy43MzA0TDE2LjI2OTYgMjIuNTAxNkwxOC43MjczIDIwLjA0MzlMMTYuMjY5NiAxNy41ODYyTDE3LjQ5ODQgMTYuMzU3NEwxOS45NTYxIDE4LjgxNUwyMi40MTM4IDE2LjM1NzRMMjMuNjQyNiAxNy41ODYyTDIxLjE4NSAyMC4wNDM5TDIzLjY0MjYgMjIuNTAxNloiIGZpbGw9IiNGRjU2NTYiPjwvcGF0aD4KPC9zdmc+Cg==";
2
2
  export {
3
3
  __vite_glob_0_174 as default
4
4
  };
package/dist/main.es6.js CHANGED
@@ -1,7 +1,7 @@
1
- import { isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, isProxy, computed as computed$1, pauseTracking, resetTracking, isReadonly, track, proxyRefs, markRaw, shallowReadonly, EffectScope, reactive, shallowReactive, trigger } from "./main.es17.js";
2
- import { readonly, ref, shallowRef, unref } from "./main.es17.js";
3
- import { isString, isFunction, getGlobalThis, isArray, NOOP, EMPTY_OBJ, normalizeClass, isObject, extend, normalizeStyle, isOn, isPromise, hasChanged, remove, isSet, isMap, isPlainObject, camelize, capitalize, toHandlerKey, hasOwn, EMPTY_ARR, NO, isBuiltInDirective, isReservedProp, invokeArrayFns, makeMap, looseToNumber, hyphenate, def, toRawType, isModelListener } from "./main.es22.js";
4
- import { toDisplayString } from "./main.es22.js";
1
+ import { isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, isProxy, computed as computed$1, pauseTracking, resetTracking, isReadonly, track, proxyRefs, markRaw, shallowReadonly, EffectScope, reactive, shallowReactive, trigger } from "./main.es18.js";
2
+ import { readonly, ref, shallowRef, unref } from "./main.es18.js";
3
+ import { isString, isFunction, getGlobalThis, isArray, NOOP, EMPTY_OBJ, normalizeClass, isObject, extend, normalizeStyle, isOn, isPromise, hasChanged, remove, isSet, isMap, isPlainObject, camelize, capitalize, toHandlerKey, hasOwn, EMPTY_ARR, NO, isBuiltInDirective, isReservedProp, invokeArrayFns, makeMap, looseToNumber, hyphenate, def, toRawType, isModelListener } from "./main.es16.js";
4
+ import { toDisplayString } from "./main.es16.js";
5
5
  const stack = [];
6
6
  function pushWarningContext(vnode) {
7
7
  stack.push(vnode);
package/dist/main.es8.js CHANGED
@@ -342,7 +342,7 @@ const theme = (() => {
342
342
  borderColor: semanticColors.grey[300]
343
343
  },
344
344
  active: {
345
- backgroundColor: semanticColors.purple[50],
345
+ backgroundColor: semanticColors.purple[100],
346
346
  textColor: semanticColors.purple[600],
347
347
  borderColor: semanticColors.grey[600]
348
348
  },
package/dist/main.es9.js CHANGED
@@ -1,4 +1,4 @@
1
- import RCButton from "./main.es15.js";
1
+ import RCButton from "./main.es23.js";
2
2
  import "./main.es3.js";
3
3
  import _export_sfc from "./main.es11.js";
4
4
  import { resolveComponent, openBlock, createBlock } from "./main.es6.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "8.26.11-EPDM-11600.15",
3
+ "version": "8.26.11-qa-07.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -1,3 +1,4 @@
1
- <svg width="22" height="21" viewBox="0 0 22 21" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M18.4389 3.06113C14.3574 -1.02038 7.64263 -1.02038 3.56113 3.06113C-0.520376 7.14263 -0.520376 13.8574 3.56113 17.9389C7.64263 22.0204 14.3574 22.0204 18.4389 17.9389C22.5204 13.8574 22.5204 7.2743 18.4389 3.06113ZM16.464 14.2524L14.6207 16.0956L10.9342 12.4091L7.24765 16.0956L5.40439 14.2524L9.09091 10.5658L5.40439 6.87931L7.24765 5.03605L10.9342 8.72257L14.6207 5.03605L16.464 6.87931L12.7774 10.5658L16.464 14.2524Z" fill="#FF5656"/>
1
+ <svg fill="none" height="16" viewbox="12 12 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="20" cy="20" r="7"></circle>
3
+ <path d="M24.9592 15.0408C22.2382 12.3197 17.7618 12.3197 15.0408 15.0408C12.3197 17.7618 12.3197 22.2382 15.0408 24.9592C17.7618 27.6803 22.2382 27.6803 24.9592 24.9592C27.6803 22.2382 27.6803 17.8495 24.9592 15.0408ZM23.6426 22.5016L22.4138 23.7304L19.9561 21.2727L17.4984 23.7304L16.2696 22.5016L18.7273 20.0439L16.2696 17.5862L17.4984 16.3574L19.9561 18.815L22.4138 16.3574L23.6426 17.5862L21.185 20.0439L23.6426 22.5016Z" fill="#FF5656"></path>
3
4
  </svg>
@@ -333,7 +333,7 @@ const theme = (() => {
333
333
  borderColor: semanticColors.grey[300],
334
334
  },
335
335
  active: {
336
- backgroundColor: semanticColors.purple[50],
336
+ backgroundColor: semanticColors.purple[100],
337
337
  textColor: semanticColors.purple[600],
338
338
  borderColor: semanticColors.grey[600],
339
339
  },
@@ -22,7 +22,7 @@
22
22
  <!-- For stacked bar chart -->
23
23
  <template v-if="seriesData.length">
24
24
  <InputRow
25
- v-for="series in seriesData"
25
+ v-for="(series, seriesIndex) in seriesData"
26
26
  :key="series.name"
27
27
  :data-series-name="series.name"
28
28
  >
@@ -36,8 +36,10 @@
36
36
  :allow-negative="false"
37
37
  :default-number="0"
38
38
  :disabled="isInputsDisabled"
39
+ :error-message="getInputErrorMessage(series.data, item.label)"
39
40
  input-height="36px"
40
41
  :is-disabled-styled-only="true"
42
+ :is-error="getIsError(series.data, item.label)"
41
43
  :is-info-border="
42
44
  fieldMode === 'percentage'
43
45
  ? calculatePercentageTotal(item.label) !== 100
@@ -117,8 +119,10 @@
117
119
  <InputNumber
118
120
  :allow-negative="false"
119
121
  :disabled="isInputsDisabled"
122
+ :error-message="item.errorMessage"
120
123
  input-height="36px"
121
124
  :is-disabled-styled-only="true"
125
+ :is-error="item.isError"
122
126
  :min-decimals="0"
123
127
  :number-precision="0"
124
128
  text-align="center"
@@ -142,6 +146,11 @@
142
146
  </InfoCardBody>
143
147
  </InfoCard>
144
148
  </InfoCardContainer>
149
+ <InfoCardContainer v-if="hasInputErrors" :y-axis-width="yAxisWidth">
150
+ <InfoCard align-items="center" type="error_minor">
151
+ <InfoCardBody> {{ inputErrorMessage }} </InfoCardBody>
152
+ </InfoCard>
153
+ </InfoCardContainer>
145
154
  </template>
146
155
 
147
156
  <script setup>
@@ -204,6 +213,10 @@
204
213
  type: String,
205
214
  default: '',
206
215
  },
216
+ inputErrorMessage: {
217
+ type: String,
218
+ default: '',
219
+ },
207
220
  })
208
221
 
209
222
  const seriesData = ref([])
@@ -229,6 +242,8 @@
229
242
  label: d.label,
230
243
  value: d.value,
231
244
  percentage: d.percentage,
245
+ isError: d.isError,
246
+ errorMessage: d.errorMessage,
232
247
  originalValue: currentSeriesData.length
233
248
  ? currentSeriesData[itemIndex].data[dIndex].originalValue
234
249
  : d.value,
@@ -275,7 +290,7 @@
275
290
  }
276
291
  }
277
292
 
278
- const getDisplayValue = (data, label, shouldRound = true) => {
293
+ const getDisplayValue = (data, label) => {
279
294
  if (props.fieldMode === 'absolute') {
280
295
  return data.find((d) => d.label === label)?.value
281
296
  }
@@ -283,6 +298,13 @@
283
298
  return data.find((d) => d.label === label)?.percentage
284
299
  }
285
300
 
301
+ const getIsError = (data, label) => {
302
+ return data.find((d) => d.label === label)?.isError
303
+ }
304
+ const getInputErrorMessage = (data, label) => {
305
+ return data.find((d) => d.label === label)?.errorMessage
306
+ }
307
+
286
308
  const calculatePercentageTotal = (label) => {
287
309
  const percentageTotal = seriesData.value.reduce((sum, series) => {
288
310
  const percentage =
@@ -336,6 +358,14 @@
336
358
  return calculatePercentageTotal(d.label) !== 100
337
359
  })
338
360
  })
361
+ const hasInputErrors = computed(() => {
362
+ if (seriesData.value.length) {
363
+ return seriesData.value.some((serie) =>
364
+ serie.data.some((item) => item.isError)
365
+ )
366
+ }
367
+ return props.data.some((item) => item.isError)
368
+ })
339
369
 
340
370
  const handleFieldsScroll = (event) => {
341
371
  emit('sync-scroll', event.target.scrollLeft)
@@ -68,10 +68,7 @@ export function useAxisCalculations(props, maxValue) {
68
68
  // Generate labels including 0 up to numSteps
69
69
  const numSteps = Math.floor(max / stepSize)
70
70
  for (let i = 0; i <= numSteps; i++) {
71
- const stepValue = i * stepSize
72
- const roundedStepValueString = stepValue.toFixed(2)
73
- const roundedStepValueNumber = parseFloat(roundedStepValueString)
74
- labels.push(roundedStepValueNumber)
71
+ labels.push(i * stepSize)
75
72
  }
76
73
 
77
74
  // Ensure we always have at least 2 labels (0 and max)
@@ -17,8 +17,8 @@
17
17
  />
18
18
  </ChartControlsWrapper>
19
19
  <GraphSection :height="height" :width="width">
20
- <YAxis :width="yAxisWidth">
21
- <YAxisTitleWrapper v-if="yAxisTitle">
20
+ <YAxis :height="height" :width="yAxisWidth">
21
+ <YAxisTitleWrapper v-if="yAxisTitle" :height="yAxisHeight">
22
22
  {{ yAxisTitle }}
23
23
  </YAxisTitleWrapper>
24
24
  <YAxisRow
@@ -51,11 +51,6 @@
51
51
  <LoadingOverlay v-if="isLoading">
52
52
  <Spinner size="medium" />
53
53
  </LoadingOverlay>
54
- <InfoCardContainer v-else-if="isDataIssueMessageDisplayed">
55
- <RCInfoCard align-items="center">
56
- {{ dataIssueMessage }}
57
- </RCInfoCard>
58
- </InfoCardContainer>
59
54
  <SelectionBox
60
55
  v-if="selectionSize && isSelectionEnabled"
61
56
  :bar-width="barWidth"
@@ -171,6 +166,7 @@
171
166
  :is-inputs-disabled="isLoading"
172
167
  :is-scrollable="isScrollable"
173
168
  :percentage-error-message="percentageErrorMessage"
169
+ :input-error-message="inputErrorMessage"
174
170
  :series="series"
175
171
  :y-axis-width="yAxisWidth"
176
172
  @input-blur="handleInputBlur"
@@ -187,7 +183,6 @@
187
183
  import ChartControls from './ChartControls'
188
184
  import BottomFields from './BottomFields'
189
185
  import SelectionBox from './SelectionBox'
190
- import RCInfoCard from '../infoCard'
191
186
  import Spinner from '../spinner'
192
187
  import { numberToString } from '../../helpers/numberConverter'
193
188
 
@@ -223,7 +218,6 @@
223
218
  TooltipGradientBox,
224
219
  ChartControlsWrapper,
225
220
  LoadingOverlay,
226
- InfoCardContainer,
227
221
  } from './styles/chart'
228
222
 
229
223
  const props = defineProps({
@@ -306,14 +300,6 @@
306
300
  type: Boolean,
307
301
  default: false,
308
302
  },
309
- dataIssueMessage: {
310
- type: String,
311
- default: '',
312
- },
313
- isDataIssueMessageDisplayed: {
314
- type: Boolean,
315
- default: false,
316
- },
317
303
  showPercentageOnTooltip: {
318
304
  type: Boolean,
319
305
  default: false,
@@ -322,6 +308,10 @@
322
308
  type: String,
323
309
  default: '',
324
310
  },
311
+ inputErrorMessage: {
312
+ type: String,
313
+ default: '',
314
+ },
325
315
  })
326
316
 
327
317
  const generateChartId = () =>