@appscode/design-system 2.2.27 → 2.2.29
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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
options: Array<{
|
|
4
|
+
value: unknown;
|
|
5
|
+
label: string;
|
|
6
|
+
}>;
|
|
7
|
+
name?: string;
|
|
8
|
+
modifierClasses?: string;
|
|
9
|
+
errorMsg?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
withDefaults(defineProps<Props>(), {
|
|
13
|
+
modifierClasses: "",
|
|
14
|
+
name: "checkbox",
|
|
15
|
+
errorMsg: "",
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const model = defineModel({ type: Array });
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div v-for="option in options" :key="name + option.label" class="field">
|
|
23
|
+
<input
|
|
24
|
+
class="is-checkradio has-background-color"
|
|
25
|
+
:class="modifierClasses"
|
|
26
|
+
:id="name + option.label"
|
|
27
|
+
:value="option.value"
|
|
28
|
+
type="checkbox"
|
|
29
|
+
v-model="model"
|
|
30
|
+
/>
|
|
31
|
+
<label :for="name + option.label">{{ option.label }}</label>
|
|
32
|
+
</div>
|
|
33
|
+
<p v-show="errorMsg" class="is-danger">
|
|
34
|
+
{{ errorMsg }}
|
|
35
|
+
</p>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<style lang="scss">
|
|
39
|
+
@import "../../../vue-components/styles/components/form-fields/_check-radio-switch.scss";
|
|
40
|
+
</style>
|
|
@@ -1,33 +1,42 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
interface Props {
|
|
3
|
-
|
|
3
|
+
options: Array<{
|
|
4
|
+
value: unknown;
|
|
5
|
+
label: string;
|
|
6
|
+
}>;
|
|
4
7
|
name: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
check?: boolean;
|
|
8
|
+
modifierClasses?: string;
|
|
9
|
+
errorMsg?: string;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
withDefaults(defineProps<Props>(), {
|
|
11
13
|
modifierClasses: "",
|
|
12
|
-
name: "
|
|
13
|
-
|
|
14
|
-
type: "checkbox",
|
|
15
|
-
check: false,
|
|
14
|
+
name: "radio",
|
|
15
|
+
errorMsg: "",
|
|
16
16
|
});
|
|
17
|
+
const model = defineModel();
|
|
17
18
|
</script>
|
|
18
19
|
|
|
19
20
|
<template>
|
|
20
|
-
<div class="field">
|
|
21
|
+
<div v-for="option in options" :key="name + option.label" class="field">
|
|
21
22
|
<input
|
|
23
|
+
v-model="model"
|
|
22
24
|
class="is-checkradio"
|
|
23
|
-
:class="
|
|
24
|
-
:id="name"
|
|
25
|
-
|
|
25
|
+
:class="modifierClasses"
|
|
26
|
+
:id="name + option.label"
|
|
27
|
+
type="radio"
|
|
26
28
|
:name="name"
|
|
27
|
-
|
|
29
|
+
l
|
|
30
|
+
:value="option.value"
|
|
28
31
|
/>
|
|
29
|
-
<label :for="name">{{ label }}</label>
|
|
32
|
+
<label :for="name + option.label">{{ option.label }}</label>
|
|
33
|
+
<p v-show="errorMsg" class="is-danger">
|
|
34
|
+
<slot name="message" />
|
|
35
|
+
</p>
|
|
30
36
|
</div>
|
|
37
|
+
<p v-show="errorMsg" class="is-danger">
|
|
38
|
+
{{ errorMsg }}
|
|
39
|
+
</p>
|
|
31
40
|
</template>
|
|
32
41
|
|
|
33
42
|
<style lang="scss">
|
|
@@ -1,33 +1,26 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
interface Props {
|
|
3
3
|
modifierClasses?: string;
|
|
4
|
-
name
|
|
4
|
+
name: string;
|
|
5
5
|
label?: string;
|
|
6
|
-
|
|
7
|
-
check?: boolean;
|
|
6
|
+
errorMsg?: string;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
withDefaults(defineProps<Props>(), {
|
|
11
10
|
modifierClasses: "",
|
|
12
|
-
name: "switch",
|
|
13
11
|
label: "Switch Label",
|
|
14
|
-
|
|
15
|
-
check: false,
|
|
12
|
+
errorMsg: "",
|
|
16
13
|
});
|
|
17
|
-
|
|
14
|
+
|
|
15
|
+
const model = defineModel({ type: Boolean });
|
|
18
16
|
</script>
|
|
19
17
|
|
|
20
18
|
<template>
|
|
21
19
|
<div class="field">
|
|
22
|
-
<input
|
|
23
|
-
:id="name"
|
|
24
|
-
type="checkbox"
|
|
25
|
-
:name="name"
|
|
26
|
-
class="switch is-rounded"
|
|
27
|
-
:class="modifierClasses"
|
|
28
|
-
:checked="check"
|
|
29
|
-
@change="$emit('change')"
|
|
30
|
-
/>
|
|
20
|
+
<input v-model="model" :id="name" type="checkbox" :name="name" class="switch is-rounded" :class="modifierClasses" />
|
|
31
21
|
<label :for="name">{{ label }}</label>
|
|
22
|
+
<p v-show="errorMsg" class="is-danger">
|
|
23
|
+
{{ errorMsg }}
|
|
24
|
+
</p>
|
|
32
25
|
</div>
|
|
33
26
|
</template>
|
|
@@ -71,7 +71,6 @@ const onOrganizationClick = (orgName: string) => {
|
|
|
71
71
|
handleIsActiveChange("");
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
const locationOrigin = window.location.origin;
|
|
75
74
|
const isDocsUi = window.location.pathname.startsWith("/docs/");
|
|
76
75
|
|
|
77
76
|
watch(dropDownStatus, (n) => {
|
|
@@ -136,7 +135,7 @@ function handleIsActiveChange(isActive: string) {
|
|
|
136
135
|
</div>
|
|
137
136
|
</a>
|
|
138
137
|
<transition-group name="list" tag="ul" class="list-items ac-scrollbar py-2">
|
|
139
|
-
<li key="settings" v-if="
|
|
138
|
+
<li key="settings" v-if="!isPlatformDomain || isDocsUi">
|
|
140
139
|
<a
|
|
141
140
|
v-if="user.isPersonalAccount"
|
|
142
141
|
data-testid="user-settings-link"
|
|
@@ -166,6 +165,7 @@ function handleIsActiveChange(isActive: string) {
|
|
|
166
165
|
<li v-if="showAccountSwitcher" :class="`is-${dropDownStatus}`" key="switcher">
|
|
167
166
|
<a
|
|
168
167
|
class="ac-dropdown-button is-fullwidth is-flex is-justify-content-space-between is-align-items-center"
|
|
168
|
+
data-testid="switch-account-button"
|
|
169
169
|
@click="toggleList()"
|
|
170
170
|
>
|
|
171
171
|
<div class="is-flex gap-8">
|