@ironsource/shared-ui 1.4.3-rc.4 → 1.4.3
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/AddFilterButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/AppTrigger.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/AutocompleteInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Banner.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Button.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/ButtonBase.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/CalendarMonth.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Chip.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/DateRange.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Dialog.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/Dropdown.vue_vue_type_style_index_1_lang.css +1 -1
- package/Editable.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/EmptyState.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/FilterSearchInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/FloatingToolbar.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/IconButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/IncludeExclude.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/IncludeExcludeAppTrigger.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/IncludeExcludeChipFilter.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
- package/IncludeExcludeOptionDraggable.vue_vue_type_style_index_0_scoped_true_lang.css +1 -0
- package/Input.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Menu.vue_vue_type_style_index_1_lang.css +1 -1
- package/MenuItem.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Popover.vue_vue_type_style_index_0_lang.css +1 -1
- package/README.md +36 -21
- package/ScrollButton.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Search.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/SearchInput.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Snackbar.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Switch.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Table.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Table.vue_vue_type_style_index_1_lang.css +1 -1
- package/Tabs.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/TextArea.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/Toggle.vue_vue_type_style_index_0_scoped_true_lang.css +1 -1
- package/components/appTrigger/AppTrigger.vue.js +3 -3
- package/components/autocompleteDropdown/AutocompleteDropdown.vue.js +1 -2
- package/components/button/{common/ButtonSuper.vue.js → Button.vue.js} +7 -7
- package/components/button/{common/ButtonBase.vue.d.ts → ButtonBase.vue.d.ts} +9 -9
- package/components/button/{common/ButtonBase.vue.js → ButtonBase.vue.js} +8 -8
- package/components/button/{v3/IconButton.vue.js → IconButton.vue.js} +7 -7
- package/components/button/{v3/ScrollButton.vue.js → ScrollButton.vue.js} +6 -6
- package/components/button/index.d.ts +126 -0
- package/components/checkbox/Checkbox.vue.d.ts +1 -1
- package/components/checkbox/index.d.ts +9 -9
- package/components/chip/{v3/Chip.vue.js → Chip.vue.js} +5 -5
- package/components/dateRange/CalendarMonth.vue.js +3 -3
- package/components/dateRange/DateRange.vue.js +4 -4
- package/components/dateRange/consts.d.ts +5 -0
- package/components/dateRange/consts.vue.js +8 -0
- package/components/dateRange/index.d.ts +3 -3
- package/components/dialog/Dialog.vue.d.ts +1 -1
- package/components/dialog/Dialog.vue.js +6 -7
- package/components/dialog/index.d.ts +11 -11
- package/components/dropdown/Dropdown.vue.d.ts +2 -2
- package/components/dropdown/Dropdown.vue.js +5 -5
- package/components/dropdown/SearchInput.vue.js +5 -6
- package/components/dropdown/index.d.ts +16 -16
- package/components/emptyState/EmptyState.vue.d.ts +1 -1
- package/components/emptyState/EmptyState.vue.js +4 -4
- package/components/emptyState/index.d.ts +14 -14
- package/components/filterDropdown/AddFilterButton.vue.js +2 -2
- package/components/filterDropdown/FilterDropdown.vue.js +1 -2
- package/components/filtersPanel/FilterSearchInput.vue.js +2 -2
- package/components/floatingToolbar/FloatingToolbar.vue.js +5 -6
- package/components/icon/Icon.vue.js +2 -0
- package/components/icon/icons/Hammer.vue.d.ts +2 -0
- package/components/icon/icons/Hammer.vue.js +26 -0
- package/components/icon/icons/TableEdit.vue.d.ts +2 -0
- package/components/icon/icons/TableEdit.vue.js +24 -0
- package/components/icon/icons/index.d.ts +6 -0
- package/components/icon/icons/index.vue.js +6 -0
- package/components/icon/index.d.ts +6 -0
- package/components/includeExclude/IncludeExclude.vue.js +5 -5
- package/components/includeExclude/IncludeExcludeAppHeader.vue.js +7 -4
- package/components/includeExclude/IncludeExcludeAppTrigger.vue.js +3 -3
- package/components/includeExclude/IncludeExcludeChipFilter.vue.js +8 -6
- package/components/includeExclude/IncludeExcludeDragDrop.vue.d.ts +125 -0
- package/components/includeExclude/IncludeExcludeDragDrop.vue.js +610 -0
- package/components/{chip/v4/ChipV4.vue.d.ts → includeExclude/IncludeExcludeOptionDraggable.vue.d.ts} +18 -23
- package/components/includeExclude/IncludeExcludeOptionDraggable.vue.js +126 -0
- package/components/includeExclude/includeExcludeMocks.d.ts +12 -0
- package/components/includeExclude/index.d.ts +228 -7
- package/components/includeExclude/index.vue.js +6 -0
- package/components/input/Input.vue.d.ts +2 -2
- package/components/input/Input.vue.js +3 -3
- package/components/input/index.d.ts +16 -16
- package/components/menu/Menu.vue.d.ts +1 -1
- package/components/menu/index.d.ts +5 -5
- package/components/snackbar/Snackbar.vue.d.ts +1 -1
- package/components/snackbar/Snackbar.vue.js +5 -6
- package/components/switch/{v3/Switch.vue.js → Switch.vue.js} +5 -5
- package/components/table/Table.types.d.ts +1 -0
- package/components/table/Table.vue.d.ts +13 -0
- package/components/table/Table.vue.js +34 -12
- package/components/table/index.d.ts +25 -0
- package/components/table-cells/Editable.vue.js +1 -1
- package/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/components/tooltip/index.d.ts +5 -5
- package/components/typography/index.d.ts +9 -9
- package/index.d.ts +3 -429
- package/index.vue.js +11 -18
- package/package.json +13 -21
- package/styleguide.scss +78 -77
- package/ButtonBase.vue_vue_type_style_index_1_scoped_true_lang.css +0 -1
- package/ButtonSuper.vue_vue_type_style_index_0_scoped_true_lang.css +0 -1
- package/ButtonV4.vue_vue_type_style_index_0_scoped_true_lang.css +0 -1
- package/ChipV4.vue_vue_type_style_index_0_scoped_true_lang.css +0 -1
- package/SwitchV4.vue_vue_type_style_index_0_scoped_true_lang.css +0 -1
- package/components/ThemeWrapper/ThemeStrore.d.ts +0 -4
- package/components/ThemeWrapper/ThemeWrapper.vue.d.ts +0 -15
- package/components/button/common/ButtonSuper.vue.d.ts +0 -42
- package/components/button/v3/Button.vue.js +0 -40
- package/components/button/v3/index.d.ts +0 -126
- package/components/button/v4/ButtonV4.vue.d.ts +0 -52
- package/components/button/v4/ButtonV4.vue.js +0 -44
- package/components/button/v4/index.d.ts +0 -72
- package/components/button/v4/index.vue.js +0 -6
- package/components/chip/v4/ChipV4.vue.js +0 -76
- package/components/chip/v4/index.d.ts +0 -63
- package/components/chip/v4/index.vue.js +0 -6
- package/components/switch/v4/SwitchV4.vue.d.ts +0 -37
- package/components/switch/v4/SwitchV4.vue.js +0 -87
- package/components/switch/v4/index.d.ts +0 -46
- package/components/switch/v4/index.vue.js +0 -6
- /package/components/button/{v3/Button.vue.d.ts → Button.vue.d.ts} +0 -0
- /package/components/button/{v3/IconButton.vue.d.ts → IconButton.vue.d.ts} +0 -0
- /package/components/button/{v3/ScrollButton.vue.d.ts → ScrollButton.vue.d.ts} +0 -0
- /package/components/button/{v3/index.vue.js → index.vue.js} +0 -0
- /package/components/chip/{v3/Chip.vue.d.ts → Chip.vue.d.ts} +0 -0
- /package/components/chip/{v3/index.d.ts → index.d.ts} +0 -0
- /package/components/chip/{v3/index.vue.js → index.vue.js} +0 -0
- /package/components/switch/{v3/Switch.vue.d.ts → Switch.vue.d.ts} +0 -0
- /package/components/switch/{v3/index.d.ts → index.d.ts} +0 -0
- /package/components/switch/{v3/index.vue.js → index.vue.js} +0 -0
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, onMounted, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, Fragment, renderList, renderSlot, createVNode, withCtx, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
-
import { useVModel } from '@vueuse/core';
|
|
3
|
-
import Text from '../../typography/Text.vue.js';
|
|
4
|
-
import { SwitchTestIdModifiers } from '../../../testids/index.vue.js';
|
|
5
|
-
/* empty css */import _export_sfc from '../../../_virtual/plugin-vue_export-helper.vue.js';
|
|
6
|
-
|
|
7
|
-
import "../../../SwitchV4.vue_vue_type_style_index_0_scoped_true_lang.css";
|
|
8
|
-
const _hoisted_1 = ["data-testid"];
|
|
9
|
-
const _hoisted_2 = ["aria-label", "data-testid", "onClick"];
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
-
__name: "SwitchV4",
|
|
12
|
-
props: {
|
|
13
|
-
options: null,
|
|
14
|
-
modelValue: null,
|
|
15
|
-
size: { default: "lg" },
|
|
16
|
-
testId: { default: "" }
|
|
17
|
-
},
|
|
18
|
-
emits: ["update:modelValue"],
|
|
19
|
-
setup(__props, { emit }) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const box = ref(null);
|
|
22
|
-
const data = useVModel(props, "modelValue", emit);
|
|
23
|
-
const optionsRefs = ref([]);
|
|
24
|
-
const skipUnwrap = { optionsRefs };
|
|
25
|
-
const selected = ref();
|
|
26
|
-
const selectedPosition = computed(() => {
|
|
27
|
-
return {
|
|
28
|
-
left: optionsRefs.value[selected.value]?.offsetLeft,
|
|
29
|
-
width: optionsRefs.value[selected.value]?.offsetWidth
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
onMounted(() => {
|
|
33
|
-
selected.value = props.options.findIndex(
|
|
34
|
-
(option) => option === props.modelValue
|
|
35
|
-
);
|
|
36
|
-
});
|
|
37
|
-
const onClick = (option, index) => {
|
|
38
|
-
selected.value = index;
|
|
39
|
-
data.value = option;
|
|
40
|
-
};
|
|
41
|
-
return (_ctx, _cache) => {
|
|
42
|
-
return openBlock(), createElementBlock("div", {
|
|
43
|
-
class: normalizeClass(["switch", { "switch--lg": __props.size === "lg", "switch--sm": __props.size === "sm" }]),
|
|
44
|
-
"data-testid": `${__props.testId}-${unref(SwitchTestIdModifiers).WRAPPER}`
|
|
45
|
-
}, [
|
|
46
|
-
createElementVNode("span", {
|
|
47
|
-
ref_key: "box",
|
|
48
|
-
ref: box,
|
|
49
|
-
class: normalizeClass(["box", { "box--lg": __props.size === "lg", "box--sm": __props.size === "sm" }]),
|
|
50
|
-
style: normalizeStyle({
|
|
51
|
-
transform: `translateX(${unref(selectedPosition)?.left}px)`,
|
|
52
|
-
width: unref(selectedPosition)?.width + "px"
|
|
53
|
-
})
|
|
54
|
-
}, null, 6),
|
|
55
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option, index) => {
|
|
56
|
-
return openBlock(), createElementBlock("button", {
|
|
57
|
-
ref_for: true,
|
|
58
|
-
ref: skipUnwrap.optionsRefs,
|
|
59
|
-
key: index,
|
|
60
|
-
"aria-label": option,
|
|
61
|
-
class: normalizeClass([{ "option--selected": selected.value === index }, "option"]),
|
|
62
|
-
"data-testid": `${__props.testId}-${unref(SwitchTestIdModifiers).BUTTON}`,
|
|
63
|
-
onClick: ($event) => onClick(option, index)
|
|
64
|
-
}, [
|
|
65
|
-
renderSlot(_ctx.$slots, "default", {
|
|
66
|
-
option,
|
|
67
|
-
selected: selected.value === index
|
|
68
|
-
}, () => [
|
|
69
|
-
createVNode(Text, {
|
|
70
|
-
size: "caption",
|
|
71
|
-
"data-testid": `${__props.testId}-${unref(SwitchTestIdModifiers).TEXT}`
|
|
72
|
-
}, {
|
|
73
|
-
default: withCtx(() => [
|
|
74
|
-
createTextVNode(toDisplayString(option), 1)
|
|
75
|
-
]),
|
|
76
|
-
_: 2
|
|
77
|
-
}, 1032, ["data-testid"])
|
|
78
|
-
], true)
|
|
79
|
-
], 10, _hoisted_2);
|
|
80
|
-
}), 128))
|
|
81
|
-
], 10, _hoisted_1);
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
var Switch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0bfee819"]]);
|
|
86
|
-
|
|
87
|
-
export { Switch as default };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
declare const SwitchTypes: () => import("vue").DefineComponent<{
|
|
2
|
-
size: {
|
|
3
|
-
type: import("vue").PropType<"sm" | "lg">;
|
|
4
|
-
} & {
|
|
5
|
-
default: string;
|
|
6
|
-
};
|
|
7
|
-
testId: {
|
|
8
|
-
type: import("vue").PropType<string>;
|
|
9
|
-
} & {
|
|
10
|
-
default: string;
|
|
11
|
-
};
|
|
12
|
-
options: {
|
|
13
|
-
type: import("vue").PropType<string[]>;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
modelValue: {
|
|
17
|
-
type: import("vue").PropType<string>;
|
|
18
|
-
required: true;
|
|
19
|
-
};
|
|
20
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
-
size: {
|
|
22
|
-
type: import("vue").PropType<"sm" | "lg">;
|
|
23
|
-
} & {
|
|
24
|
-
default: string;
|
|
25
|
-
};
|
|
26
|
-
testId: {
|
|
27
|
-
type: import("vue").PropType<string>;
|
|
28
|
-
} & {
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
options: {
|
|
32
|
-
type: import("vue").PropType<string[]>;
|
|
33
|
-
required: true;
|
|
34
|
-
};
|
|
35
|
-
modelValue: {
|
|
36
|
-
type: import("vue").PropType<string>;
|
|
37
|
-
required: true;
|
|
38
|
-
};
|
|
39
|
-
}>> & {
|
|
40
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
41
|
-
}, {
|
|
42
|
-
size: "sm" | "lg";
|
|
43
|
-
testId: string;
|
|
44
|
-
}>[];
|
|
45
|
-
export { default as Switch } from './SwitchV4.vue';
|
|
46
|
-
export { SwitchTypes };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|