@vc-shell/framework 1.0.289 → 1.0.291
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/CHANGELOG.md +18 -0
- package/core/composables/index.ts +1 -0
- package/core/composables/useTheme/index.ts +60 -0
- package/core/directives/loading/styles.css +6 -1
- package/dist/core/composables/index.d.ts +1 -0
- package/dist/core/composables/index.d.ts.map +1 -1
- package/dist/core/composables/useTheme/index.d.ts +11 -0
- package/dist/core/composables/useTheme/index.d.ts.map +1 -0
- package/dist/framework.js +27889 -27362
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/locales/en.json +6 -0
- package/dist/shared/components/app-bar-button/app-bar-button.vue.d.ts +56 -0
- package/dist/shared/components/app-bar-button/app-bar-button.vue.d.ts.map +1 -0
- package/dist/shared/components/app-bar-button/index.d.ts +2 -0
- package/dist/shared/components/app-bar-button/index.d.ts.map +1 -0
- package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/index.d.ts +3 -0
- package/dist/shared/components/index.d.ts.map +1 -1
- package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -1
- package/dist/shared/components/notification-dropdown/notification-dropdown.vue.d.ts.map +1 -1
- package/dist/shared/components/notification-template/notification-template.vue.d.ts.map +1 -1
- package/dist/shared/components/sidebar/index.d.ts +2 -0
- package/dist/shared/components/sidebar/index.d.ts.map +1 -0
- package/dist/shared/components/sidebar/sidebar.vue.d.ts +49 -0
- package/dist/shared/components/sidebar/sidebar.vue.d.ts.map +1 -0
- package/dist/shared/components/theme-selector/index.d.ts +2 -0
- package/dist/shared/components/theme-selector/index.d.ts.map +1 -0
- package/dist/shared/components/theme-selector/theme-selector.vue.d.ts +3 -0
- package/dist/shared/components/theme-selector/theme-selector.vue.d.ts.map +1 -0
- package/dist/shared/components/user-dropdown-button/index.d.ts +6 -0
- package/dist/shared/components/user-dropdown-button/index.d.ts.map +1 -1
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts +1 -0
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +3 -0
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts +16 -3
- package/dist/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts.map +1 -1
- package/dist/shared/pages/ChangePasswordPage/components/change-password/index.d.ts +7 -7
- package/dist/shared/pages/ChangePasswordPage/components/change-password/index.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +24 -3
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shared/pages/InvitePage/components/invite/index.d.ts +24 -1
- package/dist/shared/pages/InvitePage/components/invite/index.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +24 -3
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts +24 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts.map +1 -1
- package/dist/tailwind.config.d.ts +42 -15
- package/dist/tailwind.config.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts +26 -0
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +26 -0
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-add-new/vc-table-add-new.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts +15 -0
- package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +3 -0
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/components/app-bar-button/app-bar-button.vue +169 -0
- package/shared/components/app-bar-button/index.ts +1 -0
- package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +138 -38
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +10 -1
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +55 -30
- package/shared/components/change-password/change-password.vue +7 -1
- package/shared/components/common/popup/vc-popup-error.vue +1 -1
- package/shared/components/common/popup/vc-popup-warning.vue +1 -1
- package/shared/components/index.ts +3 -0
- package/shared/components/language-selector/language-selector.vue +55 -39
- package/shared/components/notification-dropdown/_internal/notification/notification.vue +7 -1
- package/shared/components/notification-dropdown/notification-dropdown.vue +96 -83
- package/shared/components/notification-template/notification-template.vue +66 -22
- package/shared/components/notifications/styles/index.scss +1 -0
- package/shared/components/sidebar/index.ts +1 -0
- package/shared/components/sidebar/sidebar.vue +96 -0
- package/shared/components/theme-selector/index.ts +1 -0
- package/shared/components/theme-selector/theme-selector.vue +95 -0
- package/shared/components/user-dropdown-button/user-dropdown-button.vue +155 -86
- package/shared/modules/assets/components/assets-details/assets-details.vue +9 -2
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +16 -6
- package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +1 -1
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +1 -1
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +6 -2
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +16 -2
- package/shared/modules/dynamic/types/index.ts +3 -0
- package/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue +14 -9
- package/shared/pages/InvitePage/components/invite/Invite.vue +59 -15
- package/shared/pages/LoginPage/components/login/Login.vue +78 -22
- package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +67 -15
- package/tailwind.config.ts +281 -15
- package/ui/components/atoms/vc-badge/vc-badge.vue +38 -23
- package/ui/components/atoms/vc-button/vc-button.vue +37 -34
- package/ui/components/atoms/vc-card/vc-card.vue +17 -11
- package/ui/components/atoms/vc-col/vc-col.vue +4 -6
- package/ui/components/atoms/vc-container/vc-container.vue +26 -8
- package/ui/components/atoms/vc-hint/vc-hint.vue +8 -2
- package/ui/components/atoms/vc-icon/vc-icon.vue +3 -3
- package/ui/components/atoms/vc-image/vc-image.vue +33 -9
- package/ui/components/atoms/vc-label/vc-label.vue +38 -9
- package/ui/components/atoms/vc-link/vc-link.vue +15 -8
- package/ui/components/atoms/vc-loading/vc-loading.vue +37 -8
- package/ui/components/atoms/vc-progress/vc-progress.vue +29 -21
- package/ui/components/atoms/vc-row/vc-row.vue +4 -2
- package/ui/components/atoms/vc-status/vc-status.vue +29 -20
- package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +20 -3
- package/ui/components/atoms/vc-switch/vc-switch.vue +41 -17
- package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +35 -9
- package/ui/components/atoms/vc-video/vc-video.vue +28 -6
- package/ui/components/atoms/vc-widget/vc-widget.vue +59 -28
- package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +29 -27
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +34 -11
- package/ui/components/molecules/vc-checkbox/vc-checkbox.vue +43 -21
- package/ui/components/molecules/vc-editor/vc-editor.vue +70 -32
- package/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue +32 -16
- package/ui/components/molecules/vc-field/vc-field.vue +36 -13
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +75 -25
- package/ui/components/molecules/vc-input/vc-input.vue +279 -218
- package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +24 -2
- package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +102 -64
- package/ui/components/molecules/vc-notification/vc-notification.vue +40 -15
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +19 -15
- package/ui/components/molecules/vc-radio-button/vc-radio-button.vue +18 -23
- package/ui/components/molecules/vc-rating/vc-rating.vue +9 -5
- package/ui/components/molecules/vc-select/vc-select.vue +211 -65
- package/ui/components/molecules/vc-slider/vc-slider.vue +32 -13
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +17 -12
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +68 -14
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +112 -122
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +213 -96
- package/ui/components/organisms/vc-app/vc-app.vue +41 -15
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +78 -30
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +81 -59
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +27 -13
- package/ui/components/organisms/vc-blade/vc-blade.vue +177 -46
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +40 -11
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +52 -18
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +38 -6
- package/ui/components/organisms/vc-login-form/vc-login-form.vue +40 -14
- package/ui/components/organisms/vc-popup/vc-popup.vue +186 -44
- package/ui/components/organisms/vc-table/_internal/vc-table-add-new/vc-table-add-new.vue +25 -6
- package/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue +48 -12
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +130 -60
- package/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue +55 -7
- package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +17 -5
- package/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue +38 -6
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +111 -62
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +139 -46
- package/ui/components/organisms/vc-table/vc-table.vue +370 -128
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="vc-
|
|
2
|
+
<div class="vc-reset-password-page">
|
|
3
3
|
<VcLoading
|
|
4
4
|
v-if="loading"
|
|
5
5
|
active
|
|
6
6
|
></VcLoading>
|
|
7
7
|
|
|
8
8
|
<VcLoginForm
|
|
9
|
-
logo="
|
|
10
|
-
background="
|
|
9
|
+
:logo="customization.logo"
|
|
10
|
+
:background="background"
|
|
11
11
|
:title="t('PASSWORDRESET.TITLE')"
|
|
12
|
+
class="vc-reset-password-page__login-form"
|
|
12
13
|
>
|
|
13
14
|
<VcForm>
|
|
14
15
|
<Field
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
v-bind="field"
|
|
23
24
|
ref="passwordField"
|
|
24
25
|
v-model="form.password"
|
|
25
|
-
class="
|
|
26
|
+
class="vc-reset-password-page__input"
|
|
26
27
|
:label="t('PASSWORDRESET.FIELDS.PASSWORD.LABEL')"
|
|
27
28
|
:placeholder="t('PASSWORDRESET.FIELDS.PASSWORD.PLACEHOLDER')"
|
|
28
29
|
type="password"
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
v-bind="field"
|
|
50
51
|
ref="confirmPasswordField"
|
|
51
52
|
v-model="form.confirmPassword"
|
|
52
|
-
class="
|
|
53
|
+
class="vc-reset-password-page__input-small"
|
|
53
54
|
:label="t('PASSWORDRESET.FIELDS.CONFIRM_PASSWORD.LABEL')"
|
|
54
55
|
:placeholder="t('PASSWORDRESET.FIELDS.CONFIRM_PASSWORD.PLACEHOLDER')"
|
|
55
56
|
:disabled="!form.tokenIsValid"
|
|
@@ -67,13 +68,14 @@
|
|
|
67
68
|
>
|
|
68
69
|
</VcInput>
|
|
69
70
|
</Field>
|
|
70
|
-
<div class="
|
|
71
|
+
<div class="vc-reset-password-page__button-container">
|
|
71
72
|
<span
|
|
72
73
|
v-if="$isDesktop.value"
|
|
73
|
-
class="
|
|
74
|
+
class="vc-reset-password-page__spacer"
|
|
74
75
|
></span>
|
|
75
76
|
<vc-button
|
|
76
77
|
:disabled="disableButton"
|
|
78
|
+
class="vc-reset-password-page__submit-button"
|
|
77
79
|
@click="resetPassword"
|
|
78
80
|
>
|
|
79
81
|
{{ t("PASSWORDRESET.SAVE_PASSWORD") }}
|
|
@@ -83,10 +85,11 @@
|
|
|
83
85
|
<VcHint
|
|
84
86
|
v-for="error in form.errors"
|
|
85
87
|
:key="error"
|
|
86
|
-
class="
|
|
88
|
+
class="vc-reset-password-page__error-hint"
|
|
89
|
+
style="color: #f14e4e"
|
|
87
90
|
>
|
|
88
91
|
<!-- TODO: stylizing-->
|
|
89
|
-
{{ t(`PASSWORDRESET.ERRORS.${
|
|
92
|
+
{{ t(`PASSWORDRESET.ERRORS.${error}`) }}
|
|
90
93
|
</VcHint>
|
|
91
94
|
</VcForm>
|
|
92
95
|
</VcLoginForm>
|
|
@@ -97,19 +100,28 @@
|
|
|
97
100
|
import { reactive, onMounted, computed } from "vue";
|
|
98
101
|
import { useRouter } from "vue-router";
|
|
99
102
|
import { Field, useForm } from "vee-validate";
|
|
100
|
-
import { useUser } from "./../../../../../core/composables";
|
|
103
|
+
import { useUser, useSettings } from "./../../../../../core/composables";
|
|
101
104
|
import { useI18n } from "vue-i18n";
|
|
102
105
|
|
|
103
|
-
const props =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
const props = withDefaults(
|
|
107
|
+
defineProps<{
|
|
108
|
+
userId: string;
|
|
109
|
+
userName: string;
|
|
110
|
+
token: string;
|
|
111
|
+
logo: string;
|
|
112
|
+
background: string;
|
|
113
|
+
}>(),
|
|
114
|
+
{
|
|
115
|
+
background: "/assets/background.jpg",
|
|
116
|
+
logo: "/assets/logo-white.svg",
|
|
117
|
+
},
|
|
118
|
+
);
|
|
108
119
|
|
|
109
120
|
const { validateToken, validatePassword, resetPasswordByToken, signIn, loading } = useUser();
|
|
110
121
|
const router = useRouter();
|
|
111
122
|
const { t } = useI18n({ useScope: "global" });
|
|
112
123
|
const { validate: veeValidate } = useForm({ validateOnMount: false });
|
|
124
|
+
const { uiSettings, loading: customizationLoading } = useSettings();
|
|
113
125
|
|
|
114
126
|
const form = reactive<{
|
|
115
127
|
isValid: boolean;
|
|
@@ -163,4 +175,44 @@ const resetPassword = async () => {
|
|
|
163
175
|
}
|
|
164
176
|
}
|
|
165
177
|
};
|
|
178
|
+
|
|
179
|
+
const customization = computed(() => {
|
|
180
|
+
return {
|
|
181
|
+
logo: !customizationLoading.value ? uiSettings.value?.logo || props.logo : "",
|
|
182
|
+
};
|
|
183
|
+
});
|
|
166
184
|
</script>
|
|
185
|
+
|
|
186
|
+
<style lang="scss">
|
|
187
|
+
:root {
|
|
188
|
+
--reset-password-error-color: var(--base-error-color, var(--danger-500));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.vc-reset-password-page {
|
|
192
|
+
@apply tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-m-0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.vc-reset-password-page__input {
|
|
196
|
+
@apply tw-mb-4 tw-mt-1;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.vc-reset-password-page__input-small {
|
|
200
|
+
@apply tw-mb-4;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.vc-reset-password-page__button-container {
|
|
204
|
+
@apply tw-flex tw-justify-center tw-items-center tw-pt-2;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.vc-reset-password-page__spacer {
|
|
208
|
+
@apply tw-grow tw-basis-0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.vc-reset-password-page__submit-button {
|
|
212
|
+
@apply tw-w-28;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.vc-reset-password-page__error-hint {
|
|
216
|
+
@apply tw-mt-3 tw-text-[color:var(--reset-password-error-color)] #{!important};
|
|
217
|
+
}
|
|
218
|
+
</style>
|
package/tailwind.config.ts
CHANGED
|
@@ -1,26 +1,292 @@
|
|
|
1
1
|
/** @type { import('tailwindcss').Config } */
|
|
2
|
+
|
|
3
|
+
const primaryColors = {
|
|
4
|
+
DEFAULT: "rgb(from var(--primary-500) r g b / <alpha-value>)",
|
|
5
|
+
50: "rgb(from var(--primary-50) r g b / <alpha-value>)",
|
|
6
|
+
100: "rgb(from var(--primary-100) r g b / <alpha-value>)",
|
|
7
|
+
200: "rgb(from var(--primary-200) r g b / <alpha-value>)",
|
|
8
|
+
300: "rgb(from var(--primary-300) r g b / <alpha-value>)",
|
|
9
|
+
400: "rgb(from var(--primary-400) r g b / <alpha-value>)",
|
|
10
|
+
500: "rgb(from var(--primary-500) r g b / <alpha-value>)",
|
|
11
|
+
600: "rgb(from var(--primary-600) r g b / <alpha-value>)",
|
|
12
|
+
700: "rgb(from var(--primary-700) r g b / <alpha-value>)",
|
|
13
|
+
800: "rgb(from var(--primary-800) r g b / <alpha-value>)",
|
|
14
|
+
900: "rgb(from var(--primary-900) r g b / <alpha-value>)",
|
|
15
|
+
950: "rgb(from var(--primary-950) r g b / <alpha-value>)",
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const secondaryColors = {
|
|
19
|
+
DEFAULT: "rgb(from var(--secondary-500) r g b / <alpha-value>)",
|
|
20
|
+
50: "rgb(from var(--secondary-50) r g b / <alpha-value>)",
|
|
21
|
+
100: "rgb(from var(--secondary-100) r g b / <alpha-value>)",
|
|
22
|
+
200: "rgb(from var(--secondary-200) r g b / <alpha-value>)",
|
|
23
|
+
300: "rgb(from var(--secondary-300) r g b / <alpha-value>)",
|
|
24
|
+
400: "rgb(from var(--secondary-400) r g b / <alpha-value>)",
|
|
25
|
+
500: "rgb(from var(--secondary-500) r g b / <alpha-value>)",
|
|
26
|
+
600: "rgb(from var(--secondary-600) r g b / <alpha-value>)",
|
|
27
|
+
700: "rgb(from var(--secondary-700) r g b / <alpha-value>)",
|
|
28
|
+
800: "rgb(from var(--secondary-800) r g b / <alpha-value>)",
|
|
29
|
+
900: "rgb(from var(--secondary-900) r g b / <alpha-value>)",
|
|
30
|
+
950: "rgb(from var(--secondary-950) r g b / <alpha-value>)",
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const infoColors = {
|
|
34
|
+
DEFAULT: "rgb(from var(--info-500) r g b / <alpha-value>)",
|
|
35
|
+
50: "rgb(from var(--info-50) r g b / <alpha-value>)",
|
|
36
|
+
100: "rgb(from var(--info-100) r g b / <alpha-value>)",
|
|
37
|
+
200: "rgb(from var(--info-200) r g b / <alpha-value>)",
|
|
38
|
+
300: "rgb(from var(--info-300) r g b / <alpha-value>)",
|
|
39
|
+
400: "rgb(from var(--info-400) r g b / <alpha-value>)",
|
|
40
|
+
500: "rgb(from var(--info-500) r g b / <alpha-value>)",
|
|
41
|
+
600: "rgb(from var(--info-600) r g b / <alpha-value>)",
|
|
42
|
+
700: "rgb(from var(--info-700) r g b / <alpha-value>)",
|
|
43
|
+
800: "rgb(from var(--info-800) r g b / <alpha-value>)",
|
|
44
|
+
900: "rgb(from var(--info-900) r g b / <alpha-value>)",
|
|
45
|
+
950: "rgb(from var(--info-950) r g b / <alpha-value>)",
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const successColors = {
|
|
49
|
+
DEFAULT: "rgb(from var(--success-500) r g b / <alpha-value>)",
|
|
50
|
+
50: "rgb(from var(--success-50) r g b / <alpha-value>)",
|
|
51
|
+
100: "rgb(from var(--success-100) r g b / <alpha-value>)",
|
|
52
|
+
200: "rgb(from var(--success-200) r g b / <alpha-value>)",
|
|
53
|
+
300: "rgb(from var(--success-300) r g b / <alpha-value>)",
|
|
54
|
+
400: "rgb(from var(--success-400) r g b / <alpha-value>)",
|
|
55
|
+
500: "rgb(from var(--success-500) r g b / <alpha-value>)",
|
|
56
|
+
600: "rgb(from var(--success-600) r g b / <alpha-value>)",
|
|
57
|
+
700: "rgb(from var(--success-700) r g b / <alpha-value>)",
|
|
58
|
+
800: "rgb(from var(--success-800) r g b / <alpha-value>)",
|
|
59
|
+
900: "rgb(from var(--success-900) r g b / <alpha-value>)",
|
|
60
|
+
950: "rgb(from var(--success-950) r g b / <alpha-value>)",
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const warningColors = {
|
|
64
|
+
DEFAULT: "rgb(from var(--warning-500) r g b / <alpha-value>)",
|
|
65
|
+
50: "rgb(from var(--warning-50) r g b / <alpha-value>)",
|
|
66
|
+
100: "rgb(from var(--warning-100) r g b / <alpha-value>)",
|
|
67
|
+
200: "rgb(from var(--warning-200) r g b / <alpha-value>)",
|
|
68
|
+
300: "rgb(from var(--warning-300) r g b / <alpha-value>)",
|
|
69
|
+
400: "rgb(from var(--warning-400) r g b / <alpha-value>)",
|
|
70
|
+
500: "rgb(from var(--warning-500) r g b / <alpha-value>)",
|
|
71
|
+
600: "rgb(from var(--warning-600) r g b / <alpha-value>)",
|
|
72
|
+
700: "rgb(from var(--warning-700) r g b / <alpha-value>)",
|
|
73
|
+
800: "rgb(from var(--warning-800) r g b / <alpha-value>)",
|
|
74
|
+
900: "rgb(from var(--warning-900) r g b / <alpha-value>)",
|
|
75
|
+
950: "rgb(from var(--warning-950) r g b / <alpha-value>)",
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const dangerColors = {
|
|
79
|
+
DEFAULT: "rgb(from var(--danger-500) r g b / <alpha-value>)",
|
|
80
|
+
50: "rgb(from var(--danger-50) r g b / <alpha-value>)",
|
|
81
|
+
100: "rgb(from var(--danger-100) r g b / <alpha-value>)",
|
|
82
|
+
200: "rgb(from var(--danger-200) r g b / <alpha-value>)",
|
|
83
|
+
300: "rgb(from var(--danger-300) r g b / <alpha-value>)",
|
|
84
|
+
400: "rgb(from var(--danger-400) r g b / <alpha-value>)",
|
|
85
|
+
500: "rgb(from var(--danger-500) r g b / <alpha-value>)",
|
|
86
|
+
600: "rgb(from var(--danger-600) r g b / <alpha-value>)",
|
|
87
|
+
700: "rgb(from var(--danger-700) r g b / <alpha-value>)",
|
|
88
|
+
800: "rgb(from var(--danger-800) r g b / <alpha-value>)",
|
|
89
|
+
900: "rgb(from var(--danger-900) r g b / <alpha-value>)",
|
|
90
|
+
950: "rgb(from var(--danger-950) r g b / <alpha-value>)",
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const neutralColors = {
|
|
94
|
+
DEFAULT: "rgb(from var(--neutral-500) r g b / <alpha-value>)",
|
|
95
|
+
50: "rgb(from var(--neutral-50) r g b / <alpha-value>)",
|
|
96
|
+
100: "rgb(from var(--neutral-100) r g b / <alpha-value>)",
|
|
97
|
+
200: "rgb(from var(--neutral-200) r g b / <alpha-value>)",
|
|
98
|
+
300: "rgb(from var(--neutral-300) r g b / <alpha-value>)",
|
|
99
|
+
400: "rgb(from var(--neutral-400) r g b / <alpha-value>)",
|
|
100
|
+
500: "rgb(from var(--neutral-500) r g b / <alpha-value>)",
|
|
101
|
+
600: "rgb(from var(--neutral-600) r g b / <alpha-value>)",
|
|
102
|
+
700: "rgb(from var(--neutral-700) r g b / <alpha-value>)",
|
|
103
|
+
800: "rgb(from var(--neutral-800) r g b / <alpha-value>)",
|
|
104
|
+
900: "rgb(from var(--neutral-900) r g b / <alpha-value>)",
|
|
105
|
+
950: "rgb(from var(--neutral-950) r g b / <alpha-value>)",
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const accentColors = {
|
|
109
|
+
DEFAULT: "rgb(from var(--accent-500) r g b / <alpha-value>)",
|
|
110
|
+
50: "rgb(from var(--accent-50) r g b / <alpha-value>)",
|
|
111
|
+
100: "rgb(from var(--accent-100) r g b / <alpha-value>)",
|
|
112
|
+
200: "rgb(from var(--accent-200) r g b / <alpha-value>)",
|
|
113
|
+
300: "rgb(from var(--accent-300) r g b / <alpha-value>)",
|
|
114
|
+
400: "rgb(from var(--accent-400) r g b / <alpha-value>)",
|
|
115
|
+
500: "rgb(from var(--accent-500) r g b / <alpha-value>)",
|
|
116
|
+
600: "rgb(from var(--accent-600) r g b / <alpha-value>)",
|
|
117
|
+
700: "rgb(from var(--accent-700) r g b / <alpha-value>)",
|
|
118
|
+
800: "rgb(from var(--accent-800) r g b / <alpha-value>)",
|
|
119
|
+
900: "rgb(from var(--accent-900) r g b / <alpha-value>)",
|
|
120
|
+
950: "rgb(from var(--accent-950) r g b / <alpha-value>)",
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const additionalColors = {
|
|
124
|
+
50: "rgb(from var(--additional-50) r g b / <alpha-value>)",
|
|
125
|
+
950: "rgb(from var(--additional-950) r g b / <alpha-value>)",
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const colors = {
|
|
129
|
+
transparent: "transparent",
|
|
130
|
+
current: "currentColor",
|
|
131
|
+
inherit: "inherit",
|
|
132
|
+
|
|
133
|
+
primary: primaryColors,
|
|
134
|
+
secondary: secondaryColors,
|
|
135
|
+
info: infoColors,
|
|
136
|
+
success: successColors,
|
|
137
|
+
warning: warningColors,
|
|
138
|
+
danger: dangerColors,
|
|
139
|
+
neutral: neutralColors,
|
|
140
|
+
accent: accentColors,
|
|
141
|
+
additional: additionalColors,
|
|
142
|
+
};
|
|
143
|
+
|
|
2
144
|
export default {
|
|
3
145
|
prefix: "tw-",
|
|
4
146
|
theme: {
|
|
5
147
|
fontFamily: {
|
|
6
148
|
roboto: ["Roboto", "sans-serif"],
|
|
7
149
|
},
|
|
150
|
+
// fontSize: {
|
|
151
|
+
// xs: ["11px", "14px"],
|
|
152
|
+
// sm: ["12px", "16px"],
|
|
153
|
+
// base: ["13px", "18px"],
|
|
154
|
+
// lg: ["14px", "19px"],
|
|
155
|
+
// xl: ["16px", "22px"],
|
|
156
|
+
// "2xl": ["23px", "28px"],
|
|
157
|
+
// },
|
|
158
|
+
// lineHeight: {
|
|
159
|
+
// xs: "14px",
|
|
160
|
+
// sm: "16px",
|
|
161
|
+
// base: "18px",
|
|
162
|
+
// lg: "19px",
|
|
163
|
+
// xl: "22px",
|
|
164
|
+
// "2xl": "28px",
|
|
165
|
+
// header: "28px",
|
|
166
|
+
// },
|
|
167
|
+
// colors,
|
|
168
|
+
|
|
169
|
+
// backgroundColor: {
|
|
170
|
+
// ...colors,
|
|
171
|
+
// },
|
|
172
|
+
|
|
173
|
+
// textColor: {
|
|
174
|
+
// ...colors,
|
|
175
|
+
// },
|
|
176
|
+
|
|
177
|
+
// textDecorationColor: {
|
|
178
|
+
// ...colors,
|
|
179
|
+
// },
|
|
180
|
+
|
|
181
|
+
// borderColor: {
|
|
182
|
+
// ...colors,
|
|
183
|
+
// DEFAULT: neutralColors[200],
|
|
184
|
+
// },
|
|
185
|
+
|
|
186
|
+
// divideColor: {
|
|
187
|
+
// ...colors,
|
|
188
|
+
// DEFAULT: neutralColors[200],
|
|
189
|
+
// },
|
|
190
|
+
|
|
191
|
+
// outlineColor: {
|
|
192
|
+
// ...colors,
|
|
193
|
+
// DEFAULT: primaryColors[100],
|
|
194
|
+
// },
|
|
195
|
+
|
|
196
|
+
// ringColor: {
|
|
197
|
+
// ...colors,
|
|
198
|
+
// DEFAULT: primaryColors[100],
|
|
199
|
+
// },
|
|
200
|
+
|
|
201
|
+
// boxShadowColor: {
|
|
202
|
+
// ...colors,
|
|
203
|
+
// },
|
|
204
|
+
|
|
8
205
|
fontSize: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
206
|
+
xxs: [
|
|
207
|
+
"0.625rem", //10px
|
|
208
|
+
{
|
|
209
|
+
lineHeight: "0.75rem", //12px
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
xs: [
|
|
213
|
+
"0.75rem", //12px
|
|
214
|
+
{
|
|
215
|
+
lineHeight: "0.875rem", //14px
|
|
216
|
+
},
|
|
217
|
+
],
|
|
218
|
+
sm: [
|
|
219
|
+
"0.875rem", //14px
|
|
220
|
+
{
|
|
221
|
+
lineHeight: "1rem", //18px
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
s: [
|
|
225
|
+
"0.875rem", //14px
|
|
226
|
+
{
|
|
227
|
+
lineHeight: "1rem", //18px
|
|
228
|
+
},
|
|
229
|
+
],
|
|
230
|
+
base: [
|
|
231
|
+
"1rem", //16px
|
|
232
|
+
{
|
|
233
|
+
lineHeight: "1.25rem", //20px
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
lg: [
|
|
237
|
+
"1.125rem", //18px
|
|
238
|
+
{
|
|
239
|
+
lineHeight: "1.375rem", //22px
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
xl: [
|
|
243
|
+
"1.25rem", //20px
|
|
244
|
+
{
|
|
245
|
+
lineHeight: "1.75rem", //28px
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
"2xl": [
|
|
249
|
+
"1.5rem", //24px
|
|
250
|
+
{
|
|
251
|
+
lineHeight: "2rem", //32px
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
"3xl": [
|
|
255
|
+
"1.875rem", //30px
|
|
256
|
+
{
|
|
257
|
+
lineHeight: "2.25rem", //36px
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
"4xl": [
|
|
261
|
+
"2.25rem", //36px
|
|
262
|
+
{
|
|
263
|
+
lineHeight: "2.5rem", //40px
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
"5xl": [
|
|
267
|
+
"3rem", //48px
|
|
268
|
+
{
|
|
269
|
+
lineHeight: "3rem", //48px
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
"6xl": [
|
|
273
|
+
"3.75rem", //60px
|
|
274
|
+
{
|
|
275
|
+
lineHeight: "3.75rem", //60px
|
|
276
|
+
},
|
|
277
|
+
],
|
|
278
|
+
"7xl": [
|
|
279
|
+
"4.5rem", //72px
|
|
280
|
+
{
|
|
281
|
+
lineHeight: "4.5rem", //72px
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
"8xl": [
|
|
285
|
+
"6rem", //96px
|
|
286
|
+
{
|
|
287
|
+
lineHeight: "6rem", //96px
|
|
288
|
+
},
|
|
289
|
+
],
|
|
24
290
|
},
|
|
25
291
|
extend: {
|
|
26
292
|
keyframes: {
|
|
@@ -7,19 +7,16 @@
|
|
|
7
7
|
'vc-badge--medium': size === 'm',
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
|
-
<div class="
|
|
10
|
+
<div class="vc-badge__content">
|
|
11
11
|
<slot name="default"></slot>
|
|
12
12
|
<div
|
|
13
13
|
v-if="typeof content !== 'undefined'"
|
|
14
14
|
ref="badge"
|
|
15
|
-
class="vc-badge__badge
|
|
15
|
+
class="vc-badge__badge"
|
|
16
16
|
:class="{
|
|
17
|
-
'
|
|
18
|
-
|
|
19
|
-
'
|
|
20
|
-
clickable,
|
|
21
|
-
'cursor-not-allowed tw-bg-[color:var(--badge-background-color-disabled)] tw-text-[color:var(--badge-text-color-disabled)] tw-border-[color:var(--badge-border-color-disabled)] hover:tw-bg-[color:var(--badge-background-color-disabled)] hover:tw-text-[color:var(--badge-text-color-disabled)] hover:tw-border-[color:var(--badge-border-color-disabled)]':
|
|
22
|
-
disabled,
|
|
17
|
+
'vc-badge__badge--active': active,
|
|
18
|
+
'vc-badge__badge--clickable': clickable,
|
|
19
|
+
'vc-badge__badge--disabled': disabled,
|
|
23
20
|
}"
|
|
24
21
|
@click="onClick"
|
|
25
22
|
>
|
|
@@ -64,25 +61,24 @@ function onClick(): void {
|
|
|
64
61
|
|
|
65
62
|
<style lang="scss">
|
|
66
63
|
:root {
|
|
67
|
-
--badge-background-color:
|
|
68
|
-
--badge-background-color-hover:
|
|
69
|
-
--badge-background-color-active:
|
|
70
|
-
--badge-background-color-disabled:
|
|
64
|
+
--badge-background-color: var(--additional-50);
|
|
65
|
+
--badge-background-color-hover: var(--neutrals-200);
|
|
66
|
+
--badge-background-color-active: var(--neutrals-200);
|
|
67
|
+
--badge-background-color-disabled: var(--neutrals-300);
|
|
71
68
|
|
|
72
|
-
--badge-text-color:
|
|
73
|
-
--badge-text-color-hover:
|
|
74
|
-
--badge-text-color-active:
|
|
75
|
-
--badge-text-color-disabled:
|
|
69
|
+
--badge-text-color: var(--neutrals-700);
|
|
70
|
+
--badge-text-color-hover: var(--neutrals-800);
|
|
71
|
+
--badge-text-color-active: var(--neutrals-800);
|
|
72
|
+
--badge-text-color-disabled: var(--neutrals-500);
|
|
76
73
|
|
|
77
74
|
--badge-border-radius: 9999px;
|
|
78
75
|
|
|
79
|
-
--badge-border-color:
|
|
80
|
-
--badge-border-color-hover:
|
|
81
|
-
--badge-border-color-active:
|
|
82
|
-
--badge-border-color-disabled:
|
|
76
|
+
--badge-border-color: var(--primary-400);
|
|
77
|
+
--badge-border-color-hover: var(--primary-300);
|
|
78
|
+
--badge-border-color-active: var(--primary-300);
|
|
79
|
+
--badge-border-color-disabled: var(--primary-200);
|
|
83
80
|
|
|
84
81
|
--badge-width-small: 18px;
|
|
85
|
-
|
|
86
82
|
--badge-width-medium: 18px;
|
|
87
83
|
|
|
88
84
|
--badge-padding-small: 0px 4px;
|
|
@@ -105,10 +101,29 @@ $sizes: small, medium;
|
|
|
105
101
|
padding: var(--badge-padding-#{$size});
|
|
106
102
|
top: var(--badge-distance-top-#{$size});
|
|
107
103
|
right: var(--badge-distance-right-#{$size});
|
|
108
|
-
|
|
109
|
-
line-height: 1.35;
|
|
104
|
+
@apply tw-text-xs tw-leading-snug;
|
|
110
105
|
}
|
|
111
106
|
}
|
|
112
107
|
}
|
|
113
108
|
}
|
|
109
|
+
|
|
110
|
+
.vc-badge__content {
|
|
111
|
+
@apply tw-flex tw-relative;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.vc-badge__badge {
|
|
115
|
+
@apply tw-absolute tw-inline-flex tw-justify-center tw-items-center tw-text-center tw-indent-0 tw-rounded-full tw-font-normal tw-bg-[color:var(--badge-background-color)] tw-text-[color:var(--badge-text-color)] tw-border tw-border-solid tw-border-[color:var(--badge-border-color)] tw-transition tw-duration-200;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.vc-badge__badge--active {
|
|
119
|
+
@apply tw-bg-[color:var(--badge-background-color-active)] tw-text-[color:var(--badge-text-color-active)] tw-border-[color:var(--badge-border-color-active)];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.vc-badge__badge--clickable {
|
|
123
|
+
@apply tw-cursor-pointer hover:tw-bg-[color:var(--badge-background-color-hover)] hover:tw-text-[color:var(--badge-text-color-hover)] hover:tw-border-[color:var(--badge-border-color-hover)];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.vc-badge__badge--disabled {
|
|
127
|
+
@apply tw-cursor-not-allowed tw-bg-[color:var(--badge-background-color-disabled)] tw-text-[color:var(--badge-text-color-disabled)] tw-border-[color:var(--badge-border-color-disabled)] hover:tw-bg-[color:var(--badge-background-color-disabled)] hover:tw-text-[color:var(--badge-text-color-disabled)] hover:tw-border-[color:var(--badge-border-color-disabled)];
|
|
128
|
+
}
|
|
114
129
|
</style>
|