@appscode/design-system 2.4.9 → 2.4.11
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/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { computed } from "vue";
|
|
3
3
|
import { useClipboard } from "@vueuse/core";
|
|
4
4
|
import AcButton from "../button/Button.vue";
|
|
5
5
|
|
|
@@ -17,15 +17,14 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
17
17
|
copyBtn: true,
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
const source =
|
|
20
|
+
const source = computed(() => props.code);
|
|
21
21
|
|
|
22
22
|
const { copy, copied } = useClipboard({ source, legacy: true });
|
|
23
23
|
</script>
|
|
24
|
+
|
|
24
25
|
<template>
|
|
25
26
|
<div class="code-container p-0">
|
|
26
|
-
<pre class="ac-hscrollbar" :class="spacing">
|
|
27
|
-
{{ code }}
|
|
28
|
-
</pre>
|
|
27
|
+
<pre class="ac-hscrollbar" :class="spacing">{{ source }}</pre>
|
|
29
28
|
<div class="buttons">
|
|
30
29
|
<ac-button v-if="downloadBtn" modifier-classes="is-primary small-button" icon-class="download" />
|
|
31
30
|
<ac-button
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { computed } from "vue";
|
|
3
3
|
import { useClipboard } from "@vueuse/core";
|
|
4
4
|
import AcButton from "../button/Button.vue";
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
14
14
|
copyBtn: true,
|
|
15
15
|
code: "",
|
|
16
16
|
});
|
|
17
|
-
const source =
|
|
17
|
+
const source = computed(() => props.code);
|
|
18
18
|
const { copy, copied } = useClipboard({ source, legacy: true });
|
|
19
19
|
</script>
|
|
20
20
|
<template>
|
|
@@ -31,7 +31,7 @@ const { copy, copied } = useClipboard({ source, legacy: true });
|
|
|
31
31
|
/>
|
|
32
32
|
</div>
|
|
33
33
|
<pre class="ac-hscrollbar is-border-none">
|
|
34
|
-
{{
|
|
34
|
+
{{ source }}
|
|
35
35
|
</pre>
|
|
36
36
|
</div>
|
|
37
37
|
</template>
|
|
@@ -8,6 +8,7 @@ interface Props {
|
|
|
8
8
|
placeholderText?: string;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
label?: string;
|
|
11
|
+
taggable?: boolean;
|
|
11
12
|
allowEmpty?: boolean;
|
|
12
13
|
options?: unknown[];
|
|
13
14
|
trackBy?: string;
|
|
@@ -17,12 +18,14 @@ interface Props {
|
|
|
17
18
|
isLoaderActive?: boolean;
|
|
18
19
|
noResultText?: string;
|
|
19
20
|
showStar?: boolean;
|
|
21
|
+
tagPlaceholder?: string;
|
|
20
22
|
wrapperDivCustomClass?: string;
|
|
21
23
|
multiselectCustomClass?: string;
|
|
22
24
|
openDirection?: "top" | "bottom";
|
|
23
25
|
groupLabel?: string;
|
|
24
26
|
groupValues?: string;
|
|
25
27
|
groupSelect?: boolean;
|
|
28
|
+
onTagAdd?: Function;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -45,6 +48,9 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
45
48
|
groupLabel: "",
|
|
46
49
|
groupValues: "",
|
|
47
50
|
groupSelect: false,
|
|
51
|
+
taggable: false,
|
|
52
|
+
tagPlaceholder: "",
|
|
53
|
+
onTagAdd: () => "",
|
|
48
54
|
});
|
|
49
55
|
|
|
50
56
|
const emit = defineEmits(["select", "remove", "refresh-btn-click"]);
|
|
@@ -141,16 +147,19 @@ const onSelect = (selectedOption: unknown, id: string) => emit("select", selecte
|
|
|
141
147
|
:disabled="disabled || isLoaderActive"
|
|
142
148
|
:allow-empty="false"
|
|
143
149
|
:show-labels="false"
|
|
150
|
+
:taggable="taggable"
|
|
144
151
|
:close-on-select="true"
|
|
145
152
|
:open-direction="openDirection"
|
|
146
153
|
:group-values="groupValues"
|
|
147
154
|
:group-label="groupLabel"
|
|
148
155
|
:group-select="groupSelect"
|
|
156
|
+
:tag-placeholder="tagPlaceholder"
|
|
149
157
|
data-testid="simple-select-box"
|
|
150
158
|
@open="openDropDown"
|
|
151
159
|
@close="closeDropDown"
|
|
152
160
|
@select="onSelect"
|
|
153
161
|
@remove="onRemove"
|
|
162
|
+
@tag="onTagAdd"
|
|
154
163
|
>
|
|
155
164
|
<template #noResult>
|
|
156
165
|
<span> {{ noResultText }} </span>
|