@ironsource/shared-ui 1.4.2-rc.4 → 1.4.2-rc.5
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/Chip.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Dropdown.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Input.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/components/chip/Chip.vue.js +2 -2
- package/components/dropdown/Dropdown.vue.js +2 -2
- package/components/input/Input.vue.d.ts +5 -0
- package/components/input/Input.vue.js +19 -6
- package/components/input/index.d.ts +17 -0
- package/consts/regex.d.ts +1 -0
- package/consts/regex.vue.js +3 -0
- package/index.vue.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.label[data-v-
|
|
1
|
+
.label[data-v-287fd6d1]{color:#41454d}.chip-container[data-v-287fd6d1]{max-width:100%;display:flex;align-items:center;justify-content:center;font-family:HelveticaNeue,sans-serif;font-weight:500;font-size:.8125rem;padding:.5rem 1rem;border-radius:1.5rem;background:none;cursor:pointer;border:1px solid #DDDFE1}.chip-container[data-v-287fd6d1]:hover{border-color:#53575b;color:#53575b}.chip-container.disabled[data-v-287fd6d1]{color:#696a6b;pointer-events:none}.chip-container.selected[data-v-287fd6d1]{border-color:#e2eeff;background-color:#e2eeff;color:#3083ff}.chip-container.selected[data-v-287fd6d1]:hover{background-color:#c9dfff;border-color:#c9dfff}.chip-container.selected.disabled[data-v-287fd6d1]{color:#96c0ff}.chip-container.selected .clear-icon[data-v-287fd6d1]{margin-left:8px;margin-right:-8px;color:#96c0ff;display:inline-block}.chip-container.selected .clear-icon[data-v-287fd6d1]:hover{color:#3083ff}.chip-container span.prefix[data-v-287fd6d1]{font-weight:400}.chip-container .clear-icon[data-v-287fd6d1]{display:none;min-width:auto;border:none;background:none;padding:0}.icon[data-v-287fd6d1]{display:flex}.icon--start[data-v-287fd6d1]{margin-right:6px}.icon--end[data-v-287fd6d1]{margin-left:6px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.label[data-v-
|
|
1
|
+
.label[data-v-4888d2df]{color:#41454d}.v-enter-active[data-v-4888d2df],.v-leave-active[data-v-4888d2df]{transition:opacity .25s ease}ol[data-v-4888d2df],ul[data-v-4888d2df],menu[data-v-4888d2df]{list-style:none;margin:0;padding:0}.dropdown[data-v-4888d2df]{display:flex;flex-direction:column}.dropdown--disabled[data-v-4888d2df]{opacity:.7}.list-container[data-v-4888d2df]{padding:.5rem;max-height:13.8rem}.list-container--multi[data-v-4888d2df]{margin-bottom:0}.v-popper__arrow-container[data-v-4888d2df]{display:none}.helper-text[data-v-4888d2df]{padding-top:.25rem;color:#696a6b}.helper-text--error[data-v-4888d2df]{color:#da564f}.no-result-container[data-v-4888d2df]{height:100%;display:flex;align-items:center}.no-result[data-v-4888d2df]{color:#8e959d;padding-left:.5rem}.list[data-v-4888d2df]{outline:none;display:flex;flex-direction:column;width:100%;min-height:2rem;border-radius:.5rem}.list--multi[data-v-4888d2df]{margin-bottom:.5rem;border-bottom-left-radius:0;border-bottom-right-radius:0}.button__container[data-v-4888d2df]{display:flex;justify-content:center;flex-direction:column;position:relative}.button__container[data-v-4888d2df]:not(.button__container--disabled){cursor:pointer}.loader[data-v-4888d2df]{color:#8e959d;display:flex;height:100%;margin-left:.375rem;justify-self:center;align-items:center}.loader-icon[data-v-4888d2df]{margin-right:.25rem;display:flex}.button[data-v-4888d2df]{font-size:.875rem;line-height:1.25rem;min-width:15rem;color:#53575b;height:2rem;text-align:start;padding:.25rem .75rem;background:#F1F3F4;border-radius:.5rem;display:flex;border:none;align-items:center}.button--lg[data-v-4888d2df]{height:2.5rem}.button[data-v-4888d2df]:hover:not(.button--open):not(.button--disabled){color:#53575b;background:#EDEFF0}.button--open[data-v-4888d2df],.button[data-v-4888d2df]:focus-visible{background:linear-gradient(0deg,#3083FF 0,#3083FF 2px,#F1F3F4 0)}.image-slot[data-v-4888d2df]{margin-right:.5rem}.angle-down[data-v-4888d2df]{margin-left:auto;display:flex;color:#7b838c}.actions[data-v-4888d2df]{display:flex;width:100%;margin-left:auto;padding:.75rem 1rem;border-top:1px solid #DDDFE1;justify-content:flex-end}.actions[data-v-4888d2df]:first-child{padding-right:.25rem}.apply-button[data-v-4888d2df]{margin-left:.25rem}.dropdown-title__text[data-v-4888d2df]{color:#41454d;border-bottom:1px solid #DDDFE1;padding:1rem}.dropdown-title__search[data-v-4888d2df]{padding:3px 0;width:100%;border-bottom:1px solid #DDDFE1}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.label[data-v-
|
|
1
|
+
.label[data-v-487006af]{color:#41454d}.disabled[data-v-487006af]{opacity:70%}.mandatory[data-v-487006af]{margin-left:2px}.info-icon-wrapper[data-v-487006af]{display:flex}.info-icon[data-v-487006af]{margin-left:2px;color:#d2d5d8}.info-icon[data-v-487006af]:hover{color:#626970}.input-size-sm[data-v-487006af]{height:32px}.input-size-lg[data-v-487006af]{height:40px}input[type=password][data-v-487006af]{letter-spacing:6px}.extra-text-container[data-v-487006af]{line-height:16px;margin:4px 0 4px 4px}.extra-text-container .error[data-v-487006af]{color:#da564f}.extra-text-container .help[data-v-487006af]{color:#696a6b}.input-with-label-container[data-v-487006af]{display:flex;flex-direction:column}.label-container[data-v-487006af]{flex-grow:1;white-space:nowrap;display:flex;align-items:center;height:24px}.label-container.direction-top[data-v-487006af]{padding-bottom:.5rem}.input-container[data-v-487006af]{flex-grow:2;display:flex;flex-direction:row;align-items:center;border-radius:.5rem;background:#F1F3F4;padding:0 .75rem}.input-container .input[data-v-487006af]{padding:0;width:100%;border:none;border-radius:0;background:#F1F3F4;color:#53575b;font-family:HelveticaNeue,sans-serif;font-size:.8125rem;line-height:normal}.input-container .input[data-v-487006af]:focus{outline:none}.input-container .input[data-v-487006af]:disabled{color:#8e959d}.input-container .input.view-only[data-v-487006af]{color:#53575b}.input-container .hide-arrows.input[type=number][data-v-487006af]::-webkit-inner-spin-button,.input-container .hide-arrows.input[type=number][data-v-487006af]::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;appearance:none}.input-container[data-v-487006af] ::placeholder{color:#8e959d}.input-container .label-inside[data-v-487006af]::placeholder{color:#41454d}.input-container .icon-container[data-v-487006af]{display:flex;align-items:center}.input-container .icon-before[data-v-487006af]{padding-right:.5rem}.input-container .icon-after[data-v-487006af]{padding-left:.5rem}.focused[data-v-487006af]{outline:none;background:linear-gradient(0deg,#3083FF 0,#3083FF 2px,#F1F3F4 0)}.focused .input[data-v-487006af]{background:linear-gradient(0deg,#3083FF 0,#3083FF 2px,#F1F3F4 0)}.input-container.error[data-v-487006af]{margin-top:0}.error-icon.error-icon[data-v-487006af],.error-icon.error-icon[data-v-487006af]:hover{color:#ff6a63}.confirm-icon.confirm-icon[data-v-487006af]{padding-left:.25rem}.confirm-icon.confirm-icon[data-v-487006af]:hover{color:#3083ff}.label-direction-left[data-v-487006af]{flex-direction:row;align-items:center;justify-content:space-between}
|
|
@@ -51,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
51
|
onClick: cleared
|
|
52
52
|
}, [
|
|
53
53
|
createVNode(unref(Icon), {
|
|
54
|
-
name: "close",
|
|
54
|
+
name: "close-bold",
|
|
55
55
|
"font-size": "sm"
|
|
56
56
|
})
|
|
57
57
|
])) : createCommentVNode("", true)
|
|
@@ -59,6 +59,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
|
-
var Chip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
62
|
+
var Chip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-287fd6d1"]]);
|
|
63
63
|
|
|
64
64
|
export { Chip as default };
|
|
@@ -13,7 +13,7 @@ import { useClamp, useVirtualList, onClickOutside } from '@vueuse/core';
|
|
|
13
13
|
import { Mode, Type, DropdownContext } from './DropdownContext.vue.js';
|
|
14
14
|
/* empty css *//* empty css */
|
|
15
15
|
import "../../Dropdown.vue_vue_type_style_index_0_scoped_true_lang.css";import "../../Dropdown.vue_vue_type_style_index_1_lang.css";
|
|
16
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
16
|
+
const _withScopeId = (n) => (pushScopeId("data-v-4888d2df"), n = n(), popScopeId(), n);
|
|
17
17
|
const _hoisted_1 = ["tabindex"];
|
|
18
18
|
const _hoisted_2 = ["disabled", "aria-expanded", "aria-labelledby", "aria-disabled"];
|
|
19
19
|
const _hoisted_3 = {
|
|
@@ -753,6 +753,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
753
753
|
};
|
|
754
754
|
}
|
|
755
755
|
});
|
|
756
|
-
var Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
756
|
+
var Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4888d2df"]]);
|
|
757
757
|
|
|
758
758
|
export { Dropdown as default };
|
|
@@ -15,6 +15,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
15
15
|
step?: number;
|
|
16
16
|
hoverHelpText?: string;
|
|
17
17
|
hoverHelpTextPlacement?: 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
18
|
+
onlyDigits?: boolean;
|
|
18
19
|
}>, {
|
|
19
20
|
modelValue: string;
|
|
20
21
|
placeholder: string;
|
|
@@ -32,6 +33,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
32
33
|
step: number;
|
|
33
34
|
hoverHelpText: string;
|
|
34
35
|
hoverHelpTextPlacement: string;
|
|
36
|
+
onlyDigits: boolean;
|
|
35
37
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
38
|
"update:modelValue": (value: string | number) => void;
|
|
37
39
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
@@ -51,6 +53,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
51
53
|
step?: number;
|
|
52
54
|
hoverHelpText?: string;
|
|
53
55
|
hoverHelpTextPlacement?: 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
56
|
+
onlyDigits?: boolean;
|
|
54
57
|
}>, {
|
|
55
58
|
modelValue: string;
|
|
56
59
|
placeholder: string;
|
|
@@ -68,6 +71,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
68
71
|
step: number;
|
|
69
72
|
hoverHelpText: string;
|
|
70
73
|
hoverHelpTextPlacement: string;
|
|
74
|
+
onlyDigits: boolean;
|
|
71
75
|
}>>> & {
|
|
72
76
|
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
73
77
|
}, {
|
|
@@ -87,6 +91,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
87
91
|
step: number;
|
|
88
92
|
hoverHelpText: string;
|
|
89
93
|
hoverHelpTextPlacement: 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
94
|
+
onlyDigits: boolean;
|
|
90
95
|
}>;
|
|
91
96
|
export default _default;
|
|
92
97
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, onMounted, nextTick, openBlock, createElementBlock, normalizeClass, createVNode, unref, withCtx, createTextVNode, toDisplayString, createBlock, createCommentVNode, createElementVNode, renderSlot, mergeProps, withKeys, withModifiers } from 'vue';
|
|
2
|
+
import Icon from '../icon/Icon.vue.js';
|
|
2
3
|
/* empty css */import _export_sfc from '../../_virtual/plugin-vue_export-helper.vue.js';
|
|
3
4
|
import Text from '../typography/Text.vue.js';
|
|
4
|
-
import Icon from '../icon/Icon.vue.js';
|
|
5
|
-
import _sfc_main$1 from '../tooltip/Tooltip.vue.js';
|
|
6
5
|
/* empty css *//* empty css */import IconButton from '../button/IconButton.vue.js';
|
|
6
|
+
import _sfc_main$1 from '../tooltip/Tooltip.vue.js';
|
|
7
7
|
/* empty css */import { useEditableContext } from '../table-cells/EditableContext.vue.js';
|
|
8
8
|
import '@vueuse/core';
|
|
9
|
-
/* empty css
|
|
9
|
+
/* empty css */import { REGEX_NUMBER_INPUT } from '../../consts/regex.vue.js';
|
|
10
|
+
/* empty css */
|
|
10
11
|
import "../../Input.vue_vue_type_style_index_0_scoped_true_lang.css";
|
|
11
12
|
const _hoisted_1 = { class: "info-icon-wrapper" };
|
|
12
13
|
const _hoisted_2 = {
|
|
@@ -46,7 +47,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
47
|
hideNumberArrows: { type: Boolean, default: false },
|
|
47
48
|
step: { default: 1 },
|
|
48
49
|
hoverHelpText: { default: "" },
|
|
49
|
-
hoverHelpTextPlacement: { default: "top" }
|
|
50
|
+
hoverHelpTextPlacement: { default: "top" },
|
|
51
|
+
onlyDigits: { type: Boolean, default: false }
|
|
50
52
|
},
|
|
51
53
|
emits: ["update:modelValue"],
|
|
52
54
|
setup(__props, { emit }) {
|
|
@@ -92,6 +94,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
92
94
|
api.onChange?.(event.target.value);
|
|
93
95
|
emit("update:modelValue", event.target.value);
|
|
94
96
|
};
|
|
97
|
+
const DECIMAL_POINT = ".";
|
|
98
|
+
const handleKeypress = (event) => {
|
|
99
|
+
if (props.onlyDigits) {
|
|
100
|
+
if (!event.key.match(REGEX_NUMBER_INPUT)) {
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
} else if (event.key === DECIMAL_POINT && props.modelValue.toString().includes(DECIMAL_POINT)) {
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
95
107
|
return (_ctx, _cache) => {
|
|
96
108
|
return openBlock(), createElementBlock("div", {
|
|
97
109
|
class: normalizeClass({
|
|
@@ -169,7 +181,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
169
181
|
onInput: handleInput,
|
|
170
182
|
onFocus: _cache[0] || (_cache[0] = ($event) => isFocused.value = true),
|
|
171
183
|
onBlur: _cache[1] || (_cache[1] = ($event) => isFocused.value = false),
|
|
172
|
-
onKeyup: withKeys(withModifiers(onEnter, ["prevent"]), ["enter"])
|
|
184
|
+
onKeyup: withKeys(withModifiers(onEnter, ["prevent"]), ["enter"]),
|
|
185
|
+
onKeypress: handleKeypress
|
|
173
186
|
}), null, 16, _hoisted_3),
|
|
174
187
|
_ctx.$slots["iconAfter"] ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
175
188
|
renderSlot(_ctx.$slots, "iconAfter", {}, void 0, true)
|
|
@@ -228,6 +241,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
228
241
|
};
|
|
229
242
|
}
|
|
230
243
|
});
|
|
231
|
-
var Input = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
244
|
+
var Input = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-487006af"]]);
|
|
232
245
|
|
|
233
246
|
export { Input as default };
|
|
@@ -83,6 +83,11 @@ declare const InputTypes: () => (import("vue").DefineComponent<{
|
|
|
83
83
|
} & {
|
|
84
84
|
default: string;
|
|
85
85
|
};
|
|
86
|
+
onlyDigits: {
|
|
87
|
+
type: import("vue").PropType<boolean>;
|
|
88
|
+
} & {
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
86
91
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
87
92
|
"update:modelValue": (value: string | number) => void;
|
|
88
93
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -166,6 +171,11 @@ declare const InputTypes: () => (import("vue").DefineComponent<{
|
|
|
166
171
|
} & {
|
|
167
172
|
default: string;
|
|
168
173
|
};
|
|
174
|
+
onlyDigits: {
|
|
175
|
+
type: import("vue").PropType<boolean>;
|
|
176
|
+
} & {
|
|
177
|
+
default: boolean;
|
|
178
|
+
};
|
|
169
179
|
}>> & {
|
|
170
180
|
"onUpdate:modelValue"?: (value: string | number) => any;
|
|
171
181
|
}, {
|
|
@@ -185,6 +195,7 @@ declare const InputTypes: () => (import("vue").DefineComponent<{
|
|
|
185
195
|
step: number;
|
|
186
196
|
hoverHelpText: string;
|
|
187
197
|
hoverHelpTextPlacement: "top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
|
|
198
|
+
onlyDigits: boolean;
|
|
188
199
|
}> | import("vue").DefineComponent<{
|
|
189
200
|
ref: {
|
|
190
201
|
type: import("vue").PropType<import("vue").VNodeRef>;
|
|
@@ -296,6 +307,9 @@ declare const InputTypes: () => (import("vue").DefineComponent<{
|
|
|
296
307
|
hoverHelpTextPlacement: {
|
|
297
308
|
type: import("vue").PropType<"top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end">;
|
|
298
309
|
};
|
|
310
|
+
onlyDigits: {
|
|
311
|
+
type: import("vue").PropType<boolean>;
|
|
312
|
+
};
|
|
299
313
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
300
314
|
"update:modelValue": (value: number) => void;
|
|
301
315
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -409,6 +423,9 @@ declare const InputTypes: () => (import("vue").DefineComponent<{
|
|
|
409
423
|
hoverHelpTextPlacement: {
|
|
410
424
|
type: import("vue").PropType<"top" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end">;
|
|
411
425
|
};
|
|
426
|
+
onlyDigits: {
|
|
427
|
+
type: import("vue").PropType<boolean>;
|
|
428
|
+
};
|
|
412
429
|
}>> & {
|
|
413
430
|
"onUpdate:modelValue"?: (value: number) => any;
|
|
414
431
|
}, {}>)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const REGEX_NUMBER_INPUT: RegExp;
|
package/index.vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './IncludeExcludeOption.vue_vue_type_style_index_0_scoped_true_lang.css';
|
|
2
2
|
export { AppTriggerTypes } from './components/appTrigger/index.vue.js';
|
|
3
3
|
export { AutocompleteDropdownTypes } from './components/autocompleteDropdown/index.vue.js';
|
|
4
4
|
export { MenuItemTypes } from './components/menuItem/index.vue.js';
|