@xwiki/cristal-dsvuetify 0.8.0 → 0.10.0
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 +25 -0
- package/dist/index-BjjXwAdJ.js +20870 -0
- package/dist/index-BjjXwAdJ.js.map +1 -0
- package/dist/index.es.js +9 -20955
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +14 -25
- package/dist/index.umd.js.map +1 -1
- package/dist/translations-CFfpgNrx.js +10 -0
- package/dist/translations-CFfpgNrx.js.map +1 -0
- package/dist/translations.d.ts +2 -0
- package/dist/vue/form/x-file-input.vue.d.ts +32 -0
- package/dist/vue/form/x-form.vue.d.ts +15 -0
- package/dist/vue/form/x-text-field.vue.d.ts +13 -0
- package/dist/vue/x-alert.vue.d.ts +3 -2
- package/dist/vue/x-btn.vue.d.ts +4 -2
- package/dist/vue/x-dialog.vue.d.ts +7 -5
- package/dist/vue/x-menu-item.vue.d.ts +6 -4
- package/dist/vue/x-menu.vue.d.ts +7 -5
- package/dist/vue/x-navigation-tree.vue.d.ts +23 -0
- package/dist/vue/x-tab-group.vue.d.ts +16 -0
- package/dist/vue/x-tab-panel.vue.d.ts +22 -0
- package/dist/vue/x-tab.vue.d.ts +22 -0
- package/dist/x-alert-Cm6mzRpR.js.map +1 -1
- package/dist/x-avatar-But_Z7ic.js.map +1 -1
- package/dist/x-breadcrumb-DBZVExfF.js +21 -0
- package/dist/x-breadcrumb-DBZVExfF.js.map +1 -0
- package/dist/x-btn-DsACLwMY.js.map +1 -1
- package/dist/x-card-CRM9KUby.js.map +1 -1
- package/dist/x-divider-7cmRuxTV.js.map +1 -1
- package/dist/x-file-input-B6XyfogW.js +35 -0
- package/dist/x-file-input-B6XyfogW.js.map +1 -0
- package/dist/x-form-leyAZnAr.js +32 -0
- package/dist/x-form-leyAZnAr.js.map +1 -0
- package/dist/x-img-BYgs_O1F.js.map +1 -1
- package/dist/{x-load-CDyapJH_.js → x-load-DipiCmNY.js} +1 -1
- package/dist/x-load-DipiCmNY.js.map +1 -0
- package/dist/x-navigation-tree-B8JZ_wJm.js +470 -0
- package/dist/x-navigation-tree-B8JZ_wJm.js.map +1 -0
- package/dist/x-search-C4yZLrSp.js.map +1 -1
- package/dist/x-tab-OWsxC4de.js +22 -0
- package/dist/x-tab-OWsxC4de.js.map +1 -0
- package/dist/x-tab-group-ngNByee3.js +49 -0
- package/dist/x-tab-group-ngNByee3.js.map +1 -0
- package/dist/x-tab-panel-YsSPuuLL.js +22 -0
- package/dist/x-tab-panel-YsSPuuLL.js.map +1 -0
- package/dist/x-text-field-B88odaud.js +29 -0
- package/dist/x-text-field-B88odaud.js.map +1 -0
- package/langs/translation-en.json +4 -0
- package/langs/translation-fr.json +1 -0
- package/package.json +9 -10
- package/src/components/componentsInit.ts +4 -9
- package/src/components/vuetifyDesignSystemLoader.ts +35 -9
- package/src/index.ts +4 -9
- package/src/translations.ts +26 -0
- package/src/vue/css/style.css +31 -13
- package/src/vue/form/x-file-input.vue +40 -0
- package/src/vue/form/x-form.vue +17 -0
- package/src/vue/form/x-text-field.vue +32 -0
- package/src/vue/x-alert.vue +17 -23
- package/src/vue/x-avatar.vue +17 -23
- package/src/vue/x-breadcrumb.vue +28 -24
- package/src/vue/x-btn.vue +17 -23
- package/src/vue/x-card.vue +17 -23
- package/src/vue/x-dialog.vue +17 -23
- package/src/vue/x-divider.vue +17 -23
- package/src/vue/x-img.vue +17 -23
- package/src/vue/x-load.vue +17 -23
- package/src/vue/x-menu-item.vue +17 -23
- package/src/vue/x-menu.vue +17 -23
- package/src/vue/x-navigation-tree.vue +165 -0
- package/src/vue/x-search.vue +17 -23
- package/src/vue/x-tab-group.vue +46 -0
- package/src/vue/x-tab-panel.vue +30 -0
- package/src/vue/x-tab.vue +30 -0
- package/src/vue.d.ts +4 -9
- package/tsconfig.json +1 -0
- package/vite.config.ts +4 -9
- package/dist/style.css +0 -5
- package/dist/x-breadcrumb-DKUFjeVQ.js +0 -17
- package/dist/x-breadcrumb-DKUFjeVQ.js.map +0 -1
- package/dist/x-load-CDyapJH_.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x-tab-panel-YsSPuuLL.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as a, computed as l, openBlock as u, createBlock as m, unref as p } from "vue";
|
|
2
|
+
import { m as i } from "./translations-CFfpgNrx.js";
|
|
3
|
+
import { useI18n as f } from "vue-i18n";
|
|
4
|
+
import { a as c } from "./index-BjjXwAdJ.js";
|
|
5
|
+
const y = /* @__PURE__ */ a({
|
|
6
|
+
__name: "x-text-field",
|
|
7
|
+
props: {
|
|
8
|
+
name: {},
|
|
9
|
+
label: {},
|
|
10
|
+
required: { type: Boolean }
|
|
11
|
+
},
|
|
12
|
+
setup(t) {
|
|
13
|
+
const { t: n } = f({
|
|
14
|
+
messages: i
|
|
15
|
+
}), o = t, s = l(() => {
|
|
16
|
+
const e = [];
|
|
17
|
+
return o.required && e.push((r) => r ? !0 : n("vuetify.text.input.mandatory")), e;
|
|
18
|
+
});
|
|
19
|
+
return (e, r) => (u(), m(p(c), {
|
|
20
|
+
label: e.label,
|
|
21
|
+
name: e.name,
|
|
22
|
+
rules: s.value
|
|
23
|
+
}, null, 8, ["label", "name", "rules"]));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
y as default
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=x-text-field-B88odaud.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x-text-field-B88odaud.js","sources":["../src/vue/form/x-text-field.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { type TextFieldProps } from \"@xwiki/cristal-dsapi\";\nimport { computed } from \"vue\";\nimport { VTextField } from \"vuetify/components/VTextField\";\nimport messages from \"../../translations\";\nimport { useI18n } from \"vue-i18n\";\n\nconst { t } = useI18n({\n messages,\n});\nconst props = defineProps<TextFieldProps>();\n\nconst rules = computed(() => {\n const rulesList = [];\n if (props.required) {\n rulesList.push((value: unknown) => {\n if (value) {\n return true;\n } else {\n return t(\"vuetify.text.input.mandatory\");\n }\n });\n }\n return rulesList;\n});\n</script>\n\n<template>\n <v-text-field :label=\"label\" :name=\"name\" :rules=\"rules\"></v-text-field>\n</template>\n\n<style scoped></style>\n"],"names":["t","useI18n","messages","props","__props","rules","computed","rulesList","value"],"mappings":";;;;;;;;;;;;AAOM,UAAA,EAAE,GAAAA,EAAE,IAAIC,EAAQ;AAAA,MACpB,UAAAC;AAAA,IAAA,CACD,GACKC,IAAQC,GAERC,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIJ,EAAM,YACEI,EAAA,KAAK,CAACC,MACVA,IACK,KAEAR,EAAE,8BAA8B,CAE1C,GAEIO;AAAA,IAAA,CACR;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwiki/cristal-dsvuetify",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"license": "
|
|
3
|
+
"version": "0.10.0",
|
|
4
|
+
"license": "LGPL 2.1",
|
|
5
5
|
"author": "XWiki Org Community <contact@xwiki.org>",
|
|
6
6
|
"homepage": "https://cristal.xwiki.org/",
|
|
7
7
|
"repository": {
|
|
@@ -23,21 +23,20 @@
|
|
|
23
23
|
"main": "./dist/index.es.js",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"inversify": "6.0.2",
|
|
26
|
-
"vue": "3.4.
|
|
26
|
+
"vue": "3.4.31",
|
|
27
27
|
"vue-i18n": "9.13.1",
|
|
28
|
-
"vuetify": "3.6.
|
|
29
|
-
"@xwiki/cristal-api": "0.
|
|
30
|
-
"@xwiki/cristal-dsapi": "0.
|
|
28
|
+
"vuetify": "3.6.15",
|
|
29
|
+
"@xwiki/cristal-api": "0.10.0",
|
|
30
|
+
"@xwiki/cristal-dsapi": "0.10.0",
|
|
31
|
+
"@xwiki/cristal-navigation-tree-api": "0.10.0"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
|
-
"
|
|
34
|
-
"vite": "5.2.11",
|
|
35
|
-
"vue-tsc": "2.0.19"
|
|
34
|
+
"vue-tsc": "2.0.22"
|
|
36
35
|
},
|
|
37
36
|
"scripts": {
|
|
38
37
|
"build": "pnpm compile",
|
|
39
38
|
"clean": "rimraf dist",
|
|
40
|
-
"compile": "vue-tsc --project tsconfig.json
|
|
39
|
+
"compile": "vue-tsc --project tsconfig.json && vite build",
|
|
41
40
|
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
|
|
42
41
|
"test": "echo 'no test'"
|
|
43
42
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
2
|
* See the LICENSE file distributed with this work for additional
|
|
3
3
|
* information regarding copyright ownership.
|
|
4
4
|
*
|
|
5
5
|
* This is free software; you can redistribute it and/or modify it
|
|
6
|
-
* under the terms of the GNU
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
7
|
* published by the Free Software Foundation; either version 2.1 of
|
|
8
8
|
* the License, or (at your option) any later version.
|
|
9
9
|
*
|
|
@@ -12,16 +12,11 @@
|
|
|
12
12
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
13
|
* Lesser General Public License for more details.
|
|
14
14
|
*
|
|
15
|
-
* You should have received a copy of the GNU
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
16
|
* License along with this software; if not, write to the Free
|
|
17
17
|
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
18
|
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
-
|
|
20
|
-
* This file is part of the Cristal Wiki software prototype
|
|
21
|
-
* @copyright Copyright (c) 2023 XWiki SAS
|
|
22
|
-
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
23
|
-
*
|
|
24
|
-
**/
|
|
19
|
+
*/
|
|
25
20
|
|
|
26
21
|
import type { DesignSystemLoader } from "@xwiki/cristal-api";
|
|
27
22
|
import type { Container } from "inversify";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
2
|
* See the LICENSE file distributed with this work for additional
|
|
3
3
|
* information regarding copyright ownership.
|
|
4
4
|
*
|
|
5
5
|
* This is free software; you can redistribute it and/or modify it
|
|
6
|
-
* under the terms of the GNU
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
7
|
* published by the Free Software Foundation; either version 2.1 of
|
|
8
8
|
* the License, or (at your option) any later version.
|
|
9
9
|
*
|
|
@@ -12,16 +12,11 @@
|
|
|
12
12
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
13
|
* Lesser General Public License for more details.
|
|
14
14
|
*
|
|
15
|
-
* You should have received a copy of the GNU
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
16
|
* License along with this software; if not, write to the Free
|
|
17
17
|
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
18
|
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
-
|
|
20
|
-
* This file is part of the Cristal Wiki software prototype
|
|
21
|
-
* @copyright Copyright (c) 2023 XWiki SAS
|
|
22
|
-
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
23
|
-
*
|
|
24
|
-
**/
|
|
19
|
+
*/
|
|
25
20
|
|
|
26
21
|
import type { App } from "vue";
|
|
27
22
|
import * as components from "vuetify/components";
|
|
@@ -94,5 +89,36 @@ export class VuetifyDesignSystemLoader implements DesignSystemLoader {
|
|
|
94
89
|
() => import("../vue/x-breadcrumb.vue"),
|
|
95
90
|
);
|
|
96
91
|
registerAsyncComponent(app, "XSearch", () => import("../vue/x-search.vue"));
|
|
92
|
+
registerAsyncComponent(app, "XTab", () => import("../vue/x-tab.vue"));
|
|
93
|
+
registerAsyncComponent(
|
|
94
|
+
app,
|
|
95
|
+
"XTabGroup",
|
|
96
|
+
() => import("../vue/x-tab-group.vue"),
|
|
97
|
+
);
|
|
98
|
+
registerAsyncComponent(
|
|
99
|
+
app,
|
|
100
|
+
"XTabPanel",
|
|
101
|
+
() => import("../vue/x-tab-panel.vue"),
|
|
102
|
+
);
|
|
103
|
+
registerAsyncComponent(
|
|
104
|
+
app,
|
|
105
|
+
"XForm",
|
|
106
|
+
() => import("../vue/form/x-form.vue"),
|
|
107
|
+
);
|
|
108
|
+
registerAsyncComponent(
|
|
109
|
+
app,
|
|
110
|
+
"XTextField",
|
|
111
|
+
() => import("../vue/form/x-text-field.vue"),
|
|
112
|
+
);
|
|
113
|
+
registerAsyncComponent(
|
|
114
|
+
app,
|
|
115
|
+
"XFileInput",
|
|
116
|
+
() => import("../vue/form/x-file-input.vue"),
|
|
117
|
+
);
|
|
118
|
+
registerAsyncComponent(
|
|
119
|
+
app,
|
|
120
|
+
"XNavigationTree",
|
|
121
|
+
() => import("../vue/x-navigation-tree.vue"),
|
|
122
|
+
);
|
|
97
123
|
}
|
|
98
124
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
2
|
* See the LICENSE file distributed with this work for additional
|
|
3
3
|
* information regarding copyright ownership.
|
|
4
4
|
*
|
|
5
5
|
* This is free software; you can redistribute it and/or modify it
|
|
6
|
-
* under the terms of the GNU
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
7
|
* published by the Free Software Foundation; either version 2.1 of
|
|
8
8
|
* the License, or (at your option) any later version.
|
|
9
9
|
*
|
|
@@ -12,16 +12,11 @@
|
|
|
12
12
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
13
|
* Lesser General Public License for more details.
|
|
14
14
|
*
|
|
15
|
-
* You should have received a copy of the GNU
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
16
|
* License along with this software; if not, write to the Free
|
|
17
17
|
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
18
|
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
-
|
|
20
|
-
* This file is part of the Cristal Wiki software prototype
|
|
21
|
-
* @copyright Copyright (c) 2023 XWiki SAS
|
|
22
|
-
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
23
|
-
*
|
|
24
|
-
**/
|
|
19
|
+
*/
|
|
25
20
|
|
|
26
21
|
import ComponentInit from "./components/componentsInit.js";
|
|
27
22
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* See the LICENSE file distributed with this work for additional
|
|
3
|
+
* information regarding copyright ownership.
|
|
4
|
+
*
|
|
5
|
+
* This is free software; you can redistribute it and/or modify it
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
* the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This software is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
* License along with this software; if not, write to the Free
|
|
17
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import en from "../langs/translation-en.json";
|
|
22
|
+
|
|
23
|
+
const translations: Record<string, Record<string, string>> = {
|
|
24
|
+
en,
|
|
25
|
+
};
|
|
26
|
+
export default translations;
|
package/src/vue/css/style.css
CHANGED
|
@@ -1,17 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* See the LICENSE file distributed with this work for additional
|
|
3
|
+
* information regarding copyright ownership.
|
|
4
|
+
*
|
|
5
|
+
* This is free software; you can redistribute it and/or modify it
|
|
6
|
+
* under the terms of the GNU Lesser General Public License as
|
|
7
|
+
* published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
* the License, or (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This software is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
* Lesser General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
* License along with this software; if not, write to the Free
|
|
17
|
+
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
|
+
*/
|
|
1
20
|
.load-spinner {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
21
|
+
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle fill="%23B9B9B9" stroke="%23B9B9B9" stroke-width="6" r="15" cx="40" cy="100"><animate attributeName="opacity" calcMode="spline" dur="2" values="1;0;1;" keySplines=".5 0 .5 1;.5 0 .5 1" repeatCount="indefinite" begin="-.4"></animate></circle><circle fill="%23B9B9B9" stroke="%23B9B9B9" stroke-width="6" r="15" cx="100" cy="100"><animate attributeName="opacity" calcMode="spline" dur="2" values="1;0;1;" keySplines=".5 0 .5 1;.5 0 .5 1" repeatCount="indefinite" begin="-.2"></animate></circle><circle fill="%23B9B9B9" stroke="%23B9B9B9" stroke-width="6" r="15" cx="160" cy="100"><animate attributeName="opacity" calcMode="spline" dur="2" values="1;0;1;" keySplines=".5 0 .5 1;.5 0 .5 1" repeatCount="indefinite" begin="0"></animate></circle></svg>');
|
|
22
|
+
background-size: cover;
|
|
23
|
+
width: 64px;
|
|
24
|
+
height: 64px;
|
|
25
|
+
}
|
|
7
26
|
|
|
8
27
|
:root {
|
|
9
28
|
--cr-sizes-max-page-width: 960px; /*This value controls the width of the main content. It should be 100% for spanning text along the whole width or an arbitraty value*/
|
|
10
|
-
--cr-sizes-
|
|
11
|
-
--cr-sizes-
|
|
12
|
-
--cr-sizes-collapsed-sidebar-width: 32px; /*The width of the bar that gets shown containing the menu button to reopen the standard
|
|
29
|
+
--cr-sizes-main-sidebar-width: 15%; /*The default width of the main sidebar*/
|
|
30
|
+
--cr-sizes-main-sidebar-min-width: 250px; /*The minimum width of the main sidebar*/
|
|
31
|
+
--cr-sizes-collapsed-main-sidebar-width: 32px; /*The width of the bar that gets shown containing the menu button to reopen the standard main main sidebar*/
|
|
13
32
|
--cr-base-font-size: 16px;
|
|
14
|
-
|
|
15
33
|
|
|
16
34
|
|
|
17
35
|
/*
|
|
@@ -21,7 +39,7 @@
|
|
|
21
39
|
/* Fonts */
|
|
22
40
|
--cr-font-mono: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
|
|
23
41
|
--cr-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
|
|
24
|
-
|
|
42
|
+
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
25
43
|
--cr-font-serif: Georgia, 'Times New Roman', serif;
|
|
26
44
|
|
|
27
45
|
/* Font sizes */
|
|
@@ -62,9 +80,9 @@
|
|
|
62
80
|
--cr-focus-ring: var(--cr-focus-ring-style) var(--cr-focus-ring-width) var(--cr-focus-ring-color);
|
|
63
81
|
--cr-focus-ring-offset: 1px;
|
|
64
82
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
83
|
+
/*
|
|
84
|
+
* Color Primitives
|
|
85
|
+
*/
|
|
68
86
|
|
|
69
87
|
/* Gray */
|
|
70
88
|
--cr-color-gray-50: hsl(0 0% 97.5%);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TextFieldModel, TextFieldProps } from "@xwiki/cristal-dsapi";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { VFileInput } from "vuetify/components/VFileInput";
|
|
5
|
+
import messages from "../../translations";
|
|
6
|
+
import { useI18n } from "vue-i18n";
|
|
7
|
+
import { defineModel } from "vue";
|
|
8
|
+
|
|
9
|
+
const { t } = useI18n({
|
|
10
|
+
messages,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const model = defineModel<TextFieldModel>();
|
|
14
|
+
const props = defineProps<TextFieldProps>();
|
|
15
|
+
|
|
16
|
+
const rules = computed(() => {
|
|
17
|
+
const rulesList = [];
|
|
18
|
+
if (props.required) {
|
|
19
|
+
rulesList.push((value: unknown) => {
|
|
20
|
+
if (value) {
|
|
21
|
+
return true;
|
|
22
|
+
} else {
|
|
23
|
+
return t("vuetify.file.input.mandatory");
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return rulesList;
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<v-file-input
|
|
33
|
+
v-model="model"
|
|
34
|
+
:label="label"
|
|
35
|
+
:name="name"
|
|
36
|
+
:rules="rules"
|
|
37
|
+
></v-file-input>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<style scoped></style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { VForm } from "vuetify/components/VForm";
|
|
3
|
+
const emits = defineEmits(["formSubmit"]);
|
|
4
|
+
function submit() {
|
|
5
|
+
emits("formSubmit");
|
|
6
|
+
}
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<v-form @submit.prevent="submit">
|
|
11
|
+
<v-container>
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</v-container>
|
|
14
|
+
</v-form>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<style scoped></style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type TextFieldProps } from "@xwiki/cristal-dsapi";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { VTextField } from "vuetify/components/VTextField";
|
|
5
|
+
import messages from "../../translations";
|
|
6
|
+
import { useI18n } from "vue-i18n";
|
|
7
|
+
|
|
8
|
+
const { t } = useI18n({
|
|
9
|
+
messages,
|
|
10
|
+
});
|
|
11
|
+
const props = defineProps<TextFieldProps>();
|
|
12
|
+
|
|
13
|
+
const rules = computed(() => {
|
|
14
|
+
const rulesList = [];
|
|
15
|
+
if (props.required) {
|
|
16
|
+
rulesList.push((value: unknown) => {
|
|
17
|
+
if (value) {
|
|
18
|
+
return true;
|
|
19
|
+
} else {
|
|
20
|
+
return t("vuetify.text.input.mandatory");
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return rulesList;
|
|
25
|
+
});
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<v-text-field :label="label" :name="name" :rules="rules"></v-text-field>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<style scoped></style>
|
package/src/vue/x-alert.vue
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
* This file is part of the Cristal Wiki software prototype
|
|
21
|
-
* @copyright Copyright (c) 2023 XWiki SAS
|
|
22
|
-
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
23
|
-
*
|
|
24
|
-
**/
|
|
2
|
+
See the LICENSE file distributed with this work for additional
|
|
3
|
+
information regarding copyright ownership.
|
|
4
|
+
|
|
5
|
+
This is free software; you can redistribute it and/or modify it
|
|
6
|
+
under the terms of the GNU Lesser General Public License as
|
|
7
|
+
published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
the License, or (at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This software is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
Lesser General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
License along with this software; if not, write to the Free
|
|
17
|
+
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
25
19
|
-->
|
|
26
20
|
<template>
|
|
27
21
|
<v-alert :title="title" :type="type">
|
package/src/vue/x-avatar.vue
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
* This file is part of the Cristal Wiki software prototype
|
|
21
|
-
* @copyright Copyright (c) 2023 XWiki SAS
|
|
22
|
-
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
23
|
-
*
|
|
24
|
-
**/
|
|
2
|
+
See the LICENSE file distributed with this work for additional
|
|
3
|
+
information regarding copyright ownership.
|
|
4
|
+
|
|
5
|
+
This is free software; you can redistribute it and/or modify it
|
|
6
|
+
under the terms of the GNU Lesser General Public License as
|
|
7
|
+
published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
the License, or (at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This software is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
Lesser General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
License along with this software; if not, write to the Free
|
|
17
|
+
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
25
19
|
-->
|
|
26
20
|
<template>
|
|
27
21
|
<v-avatar :image="image" :size="size"></v-avatar>
|
package/src/vue/x-breadcrumb.vue
CHANGED
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
* This file is part of the Cristal Wiki software prototype
|
|
21
|
-
* @copyright Copyright (c) 2023 XWiki SAS
|
|
22
|
-
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
23
|
-
*
|
|
24
|
-
**/
|
|
2
|
+
See the LICENSE file distributed with this work for additional
|
|
3
|
+
information regarding copyright ownership.
|
|
4
|
+
|
|
5
|
+
This is free software; you can redistribute it and/or modify it
|
|
6
|
+
under the terms of the GNU Lesser General Public License as
|
|
7
|
+
published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
the License, or (at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This software is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
Lesser General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
License along with this software; if not, write to the Free
|
|
17
|
+
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
25
19
|
-->
|
|
26
20
|
<script setup lang="ts">
|
|
27
21
|
import { BreadcrumbProps } from "@xwiki/cristal-dsapi";
|
|
22
|
+
import { computed } from "vue";
|
|
28
23
|
|
|
29
|
-
defineProps<BreadcrumbProps>();
|
|
24
|
+
const props = defineProps<BreadcrumbProps>();
|
|
25
|
+
// Converts props items to the format expected by v-breadcrumbs
|
|
26
|
+
const items = computed(() => {
|
|
27
|
+
return props.items.map(({ label, url }) => {
|
|
28
|
+
return {
|
|
29
|
+
title: label,
|
|
30
|
+
href: url,
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
});
|
|
30
34
|
</script>
|
|
31
35
|
|
|
32
36
|
<template>
|
package/src/vue/x-btn.vue
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
* This file is part of the Cristal Wiki software prototype
|
|
21
|
-
* @copyright Copyright (c) 2023 XWiki SAS
|
|
22
|
-
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
23
|
-
*
|
|
24
|
-
**/
|
|
2
|
+
See the LICENSE file distributed with this work for additional
|
|
3
|
+
information regarding copyright ownership.
|
|
4
|
+
|
|
5
|
+
This is free software; you can redistribute it and/or modify it
|
|
6
|
+
under the terms of the GNU Lesser General Public License as
|
|
7
|
+
published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
the License, or (at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This software is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
Lesser General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
License along with this software; if not, write to the Free
|
|
17
|
+
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
25
19
|
-->
|
|
26
20
|
<template>
|
|
27
21
|
<v-btn>
|
package/src/vue/x-card.vue
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
* This file is part of the Cristal Wiki software prototype
|
|
21
|
-
* @copyright Copyright (c) 2023 XWiki SAS
|
|
22
|
-
* @license http://opensource.org/licenses/AGPL-3.0 AGPL-3.0
|
|
23
|
-
*
|
|
24
|
-
**/
|
|
2
|
+
See the LICENSE file distributed with this work for additional
|
|
3
|
+
information regarding copyright ownership.
|
|
4
|
+
|
|
5
|
+
This is free software; you can redistribute it and/or modify it
|
|
6
|
+
under the terms of the GNU Lesser General Public License as
|
|
7
|
+
published by the Free Software Foundation; either version 2.1 of
|
|
8
|
+
the License, or (at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This software is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13
|
+
Lesser General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Lesser General Public
|
|
16
|
+
License along with this software; if not, write to the Free
|
|
17
|
+
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
18
|
+
02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
25
19
|
-->
|
|
26
20
|
<template>
|
|
27
21
|
<v-card :title="title" variant="outlined">
|