@eturnity/eturnity_reusable_components 8.31.6-dev-03-elisee-8.37.0 → 8.31.6-dev-03-elisee-8.37.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/dist/main.es23.js CHANGED
@@ -1,26 +1,196 @@
1
1
  import styled from "./main.es7.js";
2
+ import _sfc_main$1 from "./main.es17.js";
3
+ import theme from "./main.es8.js";
2
4
  import "./main.es3.js";
3
5
  import _export_sfc from "./main.es11.js";
4
- import { resolveComponent, openBlock, createBlock, withCtx, createTextVNode } from "./main.es6.js";
5
- const StarElement = styled.span`
6
- color: ${({
7
- theme
8
- }) => theme.colors.red};
9
- `;
6
+ import { resolveComponent, openBlock, createBlock, withCtx, renderSlot } from "./main.es6.js";
7
+ const StyledComponents = {
8
+ ProgressionStepItem: styled.div`
9
+ display: flex;
10
+ flex-direction: row;
11
+ align-items: center;
12
+ `,
13
+ BoxContainer: styled("div", {
14
+ isActive: Boolean,
15
+ isValid: Boolean,
16
+ isError: Boolean,
17
+ isWarning: Boolean,
18
+ isDirty: Boolean,
19
+ isDisabled: Boolean,
20
+ size: String,
21
+ borderRadius: String
22
+ })`
23
+ display: flex;
24
+ justify-content: center;
25
+ align-items: center;
26
+ width: ${({
27
+ size
28
+ }) => size};
29
+ height: ${({
30
+ size
31
+ }) => size};
32
+ font-size: 16px;
33
+ background-color: ${({
34
+ theme: theme2,
35
+ isValid,
36
+ isActive,
37
+ isError,
38
+ isWarning,
39
+ isDirty,
40
+ isDisabled
41
+ }) => {
42
+ if (isDisabled)
43
+ return theme2.semanticColors.grey[200];
44
+ if (isError)
45
+ return theme2.semanticColors.red[500];
46
+ if (isWarning)
47
+ return theme2.semanticColors.yellow[500];
48
+ if (isActive) {
49
+ return theme2.semanticColors.purple[500];
50
+ }
51
+ if (!isDirty)
52
+ return theme2.semanticColors.grey[50];
53
+ if (isValid)
54
+ return theme2.semanticColors.purple[50];
55
+ return theme2.semanticColors.grey[50];
56
+ }};
57
+ border: 1px solid;
58
+ border-color: ${({
59
+ theme: theme2,
60
+ isValid,
61
+ isActive,
62
+ isError,
63
+ isWarning,
64
+ isDirty,
65
+ isDisabled
66
+ }) => {
67
+ if (isDisabled)
68
+ return theme2.semanticColors.grey[500];
69
+ if (isError)
70
+ return theme2.semanticColors.red[500];
71
+ if (isWarning)
72
+ return theme2.semanticColors.yellow[600];
73
+ if (!isDirty)
74
+ return theme2.semanticColors.grey[400];
75
+ if (isActive)
76
+ return theme2.semanticColors.purple[600];
77
+ if (isValid)
78
+ return theme2.semanticColors.purple[50];
79
+ return theme2.semanticColors.grey[400];
80
+ }};
81
+ color: ${({
82
+ theme: theme2,
83
+ isValid,
84
+ isActive
85
+ }) => isActive ? theme2.colors.white : theme2.semanticColors.grey[800]};
86
+ margin: 0;
87
+ border-radius: ${({
88
+ borderRadius
89
+ }) => borderRadius};
90
+ cursor: ${({
91
+ isValid
92
+ }) => isValid ? "pointer" : "default"};
93
+ &:hover {
94
+ ${({
95
+ theme: theme2,
96
+ isValid,
97
+ isActive
98
+ }) => isValid ? "background-color:" + theme2.semanticColors.purple[100] + ";" : ""}
99
+ }
100
+ `,
101
+ NumberContainer: styled.div``
102
+ };
10
103
  const _sfc_main = {
11
- name: "IsRequiredLabelStar",
104
+ name: "StatusIndicator",
12
105
  components: {
13
- StarElement
106
+ ...StyledComponents,
107
+ RcIcon: _sfc_main$1
108
+ },
109
+ props: {
110
+ isError: {
111
+ type: Boolean,
112
+ default: false
113
+ },
114
+ isWarning: {
115
+ type: Boolean,
116
+ default: false
117
+ },
118
+ isDirty: {
119
+ type: Boolean,
120
+ default: false
121
+ },
122
+ isDisabled: {
123
+ type: Boolean,
124
+ default: false
125
+ },
126
+ isActive: {
127
+ type: Boolean,
128
+ default: false
129
+ },
130
+ size: {
131
+ type: String,
132
+ default: "20px"
133
+ },
134
+ borderRadius: {
135
+ type: String,
136
+ default: "50%"
137
+ }
138
+ },
139
+ data() {
140
+ return {
141
+ theme
142
+ };
143
+ },
144
+ computed: {
145
+ isValid() {
146
+ return this.isDirty && !this.isError && !this.isWarning;
147
+ }
14
148
  }
15
149
  };
16
150
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
17
- const _component_StarElement = resolveComponent("StarElement");
18
- return openBlock(), createBlock(_component_StarElement, null, {
19
- default: withCtx(() => [createTextVNode("*")]),
20
- _: 1
21
- });
151
+ const _component_RcIcon = resolveComponent("RcIcon");
152
+ const _component_NumberContainer = resolveComponent("NumberContainer");
153
+ const _component_BoxContainer = resolveComponent("BoxContainer");
154
+ return openBlock(), createBlock(_component_BoxContainer, {
155
+ "border-radius": $props.borderRadius,
156
+ "is-active": $props.isActive,
157
+ "is-dirty": $props.isDirty,
158
+ "is-disabled": $props.isDisabled,
159
+ "is-error": $props.isError,
160
+ "is-valid": $options.isValid,
161
+ "is-warning": $props.isWarning,
162
+ size: $props.size
163
+ }, {
164
+ default: withCtx(() => [$options.isValid ? (openBlock(), createBlock(_component_RcIcon, {
165
+ key: 0,
166
+ color: $data.theme.semanticColors.purple[500],
167
+ "hovered-color": $data.theme.semanticColors.purple[500],
168
+ name: "checkmark_thin",
169
+ size: "16px"
170
+ }, null, 8, ["color", "hovered-color"])) : $props.isError ? (openBlock(), createBlock(_component_RcIcon, {
171
+ key: 1,
172
+ color: $data.theme.colors.white,
173
+ "hovered-color": $data.theme.colors.white,
174
+ name: "cross",
175
+ size: "10x"
176
+ }, null, 8, ["color", "hovered-color"])) : $props.isWarning ? (openBlock(), createBlock(_component_RcIcon, {
177
+ key: 2,
178
+ color: $data.theme.colors.white,
179
+ "hovered-color": $data.theme.colors.white,
180
+ name: "warning_triangle",
181
+ size: "10px"
182
+ }, null, 8, ["color", "hovered-color"])) : (openBlock(), createBlock(_component_NumberContainer, {
183
+ key: 3,
184
+ "is-active": $props.isActive,
185
+ "is-valid": $options.isValid
186
+ }, {
187
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
188
+ _: 3
189
+ }, 8, ["is-active", "is-valid"]))]),
190
+ _: 3
191
+ }, 8, ["border-radius", "is-active", "is-dirty", "is-disabled", "is-error", "is-valid", "is-warning", "size"]);
22
192
  }
23
- const IsRequiredLabelStar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
193
+ const StatusIndicator = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
24
194
  export {
25
- IsRequiredLabelStar as default
195
+ StatusIndicator as default
26
196
  };
package/dist/main.es24.js CHANGED
@@ -1,201 +1,4 @@
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
- const EMPTY_OBJ = !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
10
- const EMPTY_ARR = !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
11
- const NOOP = () => {
12
- };
13
- const NO = () => false;
14
- const onRE = /^on[^a-z]/;
15
- const isOn = (key) => onRE.test(key);
16
- const isModelListener = (key) => key.startsWith("onUpdate:");
17
- const extend = Object.assign;
18
- const remove = (arr, el) => {
19
- const i = arr.indexOf(el);
20
- if (i > -1) {
21
- arr.splice(i, 1);
22
- }
23
- };
24
- const hasOwnProperty = Object.prototype.hasOwnProperty;
25
- const hasOwn = (val, key) => hasOwnProperty.call(val, key);
26
- const isArray = Array.isArray;
27
- const isMap = (val) => toTypeString(val) === "[object Map]";
28
- const isSet = (val) => toTypeString(val) === "[object Set]";
29
- const isFunction = (val) => typeof val === "function";
30
- const isString = (val) => typeof val === "string";
31
- const isObject = (val) => val !== null && typeof val === "object";
32
- const isPromise = (val) => {
33
- return isObject(val) && isFunction(val.then) && isFunction(val.catch);
34
- };
35
- const objectToString = Object.prototype.toString;
36
- const toTypeString = (value) => objectToString.call(value);
37
- const toRawType = (value) => {
38
- return toTypeString(value).slice(8, -1);
39
- };
40
- const isPlainObject = (val) => toTypeString(val) === "[object Object]";
41
- const isReservedProp = /* @__PURE__ */ makeMap(
42
- // the leading comma is intentional so empty string "" is also included
43
- ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
44
- );
45
- const isBuiltInDirective = /* @__PURE__ */ makeMap(
46
- "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
47
- );
48
- const cacheStringFunction = (fn) => {
49
- const cache = /* @__PURE__ */ Object.create(null);
50
- return (str) => {
51
- const hit = cache[str];
52
- return hit || (cache[str] = fn(str));
53
- };
54
- };
55
- const camelizeRE = /-(\w)/g;
56
- const camelize = cacheStringFunction((str) => {
57
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
58
- });
59
- const hyphenateRE = /\B([A-Z])/g;
60
- const hyphenate = cacheStringFunction(
61
- (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
62
- );
63
- const capitalize = cacheStringFunction(
64
- (str) => str.charAt(0).toUpperCase() + str.slice(1)
65
- );
66
- const toHandlerKey = cacheStringFunction(
67
- (str) => str ? `on${capitalize(str)}` : ``
68
- );
69
- const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
70
- const invokeArrayFns = (fns, arg) => {
71
- for (let i = 0; i < fns.length; i++) {
72
- fns[i](arg);
73
- }
74
- };
75
- const def = (obj, key, value) => {
76
- Object.defineProperty(obj, key, {
77
- configurable: true,
78
- enumerable: false,
79
- value
80
- });
81
- };
82
- const looseToNumber = (val) => {
83
- const n = parseFloat(val);
84
- return isNaN(n) ? val : n;
85
- };
86
- let _globalThis;
87
- const getGlobalThis = () => {
88
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
89
- };
90
- function normalizeStyle(value) {
91
- if (isArray(value)) {
92
- const res = {};
93
- for (let i = 0; i < value.length; i++) {
94
- const item = value[i];
95
- const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
96
- if (normalized) {
97
- for (const key in normalized) {
98
- res[key] = normalized[key];
99
- }
100
- }
101
- }
102
- return res;
103
- } else if (isString(value)) {
104
- return value;
105
- } else if (isObject(value)) {
106
- return value;
107
- }
108
- }
109
- const listDelimiterRE = /;(?![^(]*\))/g;
110
- const propertyDelimiterRE = /:([^]+)/;
111
- const styleCommentRE = /\/\*[^]*?\*\//g;
112
- function parseStringStyle(cssText) {
113
- const ret = {};
114
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
115
- if (item) {
116
- const tmp = item.split(propertyDelimiterRE);
117
- tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
118
- }
119
- });
120
- return ret;
121
- }
122
- function normalizeClass(value) {
123
- let res = "";
124
- if (isString(value)) {
125
- res = value;
126
- } else if (isArray(value)) {
127
- for (let i = 0; i < value.length; i++) {
128
- const normalized = normalizeClass(value[i]);
129
- if (normalized) {
130
- res += normalized + " ";
131
- }
132
- }
133
- } else if (isObject(value)) {
134
- for (const name in value) {
135
- if (value[name]) {
136
- res += name + " ";
137
- }
138
- }
139
- }
140
- return res.trim();
141
- }
142
- const toDisplayString = (val) => {
143
- return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
144
- };
145
- const replacer = (_key, val) => {
146
- if (val && val.__v_isRef) {
147
- return replacer(_key, val.value);
148
- } else if (isMap(val)) {
149
- return {
150
- [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
151
- entries[`${key} =>`] = val2;
152
- return entries;
153
- }, {})
154
- };
155
- } else if (isSet(val)) {
156
- return {
157
- [`Set(${val.size})`]: [...val.values()]
158
- };
159
- } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
160
- return String(val);
161
- }
162
- return val;
163
- };
1
+ const Test_vue_vue_type_style_index_0_lang = "";
164
2
  export {
165
- EMPTY_ARR,
166
- EMPTY_OBJ,
167
- NO,
168
- NOOP,
169
- camelize,
170
- capitalize,
171
- def,
172
- extend,
173
- getGlobalThis,
174
- hasChanged,
175
- hasOwn,
176
- hyphenate,
177
- invokeArrayFns,
178
- isArray,
179
- isBuiltInDirective,
180
- isFunction,
181
- isMap,
182
- isModelListener,
183
- isObject,
184
- isOn,
185
- isPlainObject,
186
- isPromise,
187
- isReservedProp,
188
- isSet,
189
- isString,
190
- looseToNumber,
191
- makeMap,
192
- normalizeClass,
193
- normalizeStyle,
194
- objectToString,
195
- parseStringStyle,
196
- remove,
197
- toDisplayString,
198
- toHandlerKey,
199
- toRawType,
200
- toTypeString
3
+ Test_vue_vue_type_style_index_0_lang as default
201
4
  };