@xwiki/cristal-dsvuetify 1.1.0 → 1.2.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.
Files changed (36) hide show
  1. package/dist/{index-5yb_QWW0.js → index-BzcWoPad.js} +10235 -9749
  2. package/dist/index-BzcWoPad.js.map +1 -0
  3. package/dist/index.es.js +5 -4
  4. package/dist/index.umd.js +11 -10
  5. package/dist/index.umd.js.map +1 -1
  6. package/dist/vue/x-dropdown.vue.d.ts +19 -0
  7. package/dist/vue/x-menu.vue.d.ts +0 -1
  8. package/dist/x-btn-B7EtO8yc.js +5 -0
  9. package/dist/x-btn-B7EtO8yc.js.map +1 -0
  10. package/dist/{x-btn-BsiSIiiO.js → x-btn.vue_vue_type_script_setup_true_lang-WWoyaSKz.js} +15 -13
  11. package/dist/x-btn.vue_vue_type_script_setup_true_lang-WWoyaSKz.js.map +1 -0
  12. package/dist/{x-checkbox-vREi3-wS.js → x-checkbox-Bg43UZ5N.js} +2 -2
  13. package/dist/{x-checkbox-vREi3-wS.js.map → x-checkbox-Bg43UZ5N.js.map} +1 -1
  14. package/dist/x-dropdown-BL_Wqa5N.js +40 -0
  15. package/dist/x-dropdown-BL_Wqa5N.js.map +1 -0
  16. package/dist/{x-file-input-f35OKy3m.js → x-file-input-Dt2B3iG0.js} +2 -2
  17. package/dist/{x-file-input-f35OKy3m.js.map → x-file-input-Dt2B3iG0.js.map} +1 -1
  18. package/dist/{x-form-ClKnXXd0.js → x-form-DA_DOJ2L.js} +2 -2
  19. package/dist/{x-form-ClKnXXd0.js.map → x-form-DA_DOJ2L.js.map} +1 -1
  20. package/dist/x-menu--XKGcL5D.js +17 -0
  21. package/dist/x-menu--XKGcL5D.js.map +1 -0
  22. package/dist/{x-select-B-9ebdG3.js → x-select-EUko1Rag.js} +2 -2
  23. package/dist/{x-select-B-9ebdG3.js.map → x-select-EUko1Rag.js.map} +1 -1
  24. package/dist/{x-text-field-BoIZJ_CH.js → x-text-field-CZcbvoFI.js} +2 -2
  25. package/dist/{x-text-field-BoIZJ_CH.js.map → x-text-field-CZcbvoFI.js.map} +1 -1
  26. package/dist/{x-tree-CrHakAmV.js → x-tree-SDsF-YBu.js} +2 -2
  27. package/dist/{x-tree-CrHakAmV.js.map → x-tree-SDsF-YBu.js.map} +1 -1
  28. package/package.json +13 -13
  29. package/src/components/vuetifyDesignSystemLoader.ts +5 -0
  30. package/src/vue/x-btn.vue +1 -1
  31. package/src/vue/x-dropdown.vue +49 -0
  32. package/src/vue/x-menu.vue +3 -16
  33. package/dist/index-5yb_QWW0.js.map +0 -1
  34. package/dist/x-btn-BsiSIiiO.js.map +0 -1
  35. package/dist/x-menu-Dvd5JVz3.js +0 -31
  36. package/dist/x-menu-Dvd5JVz3.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ import { DropdownProps } from '@xwiki/platform-dsapi';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ activator?(_: {}): any;
6
+ default?(_: {}): any;
7
+ };
8
+ refs: {};
9
+ rootEl: any;
10
+ };
11
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
+ declare const __VLS_component: import('vue').DefineComponent<DropdownProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DropdownProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
14
+ export default _default;
15
+ type __VLS_WithTemplateSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -1,7 +1,6 @@
1
1
  declare function __VLS_template(): {
2
2
  attrs: Partial<{}>;
3
3
  slots: {
4
- activator?(_: {}): any;
5
4
  default?(_: {}): any;
6
5
  };
7
6
  refs: {};
@@ -0,0 +1,5 @@
1
+ import { _ as f } from "./x-btn.vue_vue_type_script_setup_true_lang-WWoyaSKz.js";
2
+ export {
3
+ f as default
4
+ };
5
+ //# sourceMappingURL=x-btn-B7EtO8yc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-btn-B7EtO8yc.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,13 +1,14 @@
1
- import { defineComponent as c, computed as r, resolveComponent as s, openBlock as l, createBlock as i, withCtx as u, renderSlot as p } from "vue";
2
- const m = /* @__PURE__ */ c({
1
+ import { defineComponent as c, computed as t, resolveComponent as s, openBlock as l, createBlock as i, withCtx as d, renderSlot as b } from "vue";
2
+ const p = /* @__PURE__ */ c({
3
3
  __name: "x-btn",
4
4
  props: {
5
5
  variant: {},
6
6
  size: {},
7
- pill: { type: Boolean }
7
+ pill: { type: Boolean },
8
+ disabled: { type: Boolean }
8
9
  },
9
10
  setup(a) {
10
- const t = r(() => {
11
+ const r = t(() => {
11
12
  let e;
12
13
  switch (a.variant) {
13
14
  case "default":
@@ -29,22 +30,23 @@ const m = /* @__PURE__ */ c({
29
30
  break;
30
31
  }
31
32
  return e;
32
- }), n = r(() => a.variant == "text" ? "text" : "tonal");
33
- return (e, v) => {
33
+ }), n = t(() => a.variant == "text" ? "text" : "tonal");
34
+ return (e, u) => {
34
35
  const o = s("v-btn");
35
36
  return l(), i(o, {
36
- color: t.value,
37
- variant: n.value
37
+ color: r.value,
38
+ variant: n.value,
39
+ disabled: a.disabled
38
40
  }, {
39
- default: u(() => [
40
- p(e.$slots, "default")
41
+ default: d(() => [
42
+ b(e.$slots, "default")
41
43
  ]),
42
44
  _: 3
43
- }, 8, ["color", "variant"]);
45
+ }, 8, ["color", "variant", "disabled"]);
44
46
  };
45
47
  }
46
48
  });
47
49
  export {
48
- m as default
50
+ p as _
49
51
  };
50
- //# sourceMappingURL=x-btn-BsiSIiiO.js.map
52
+ //# sourceMappingURL=x-btn.vue_vue_type_script_setup_true_lang-WWoyaSKz.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-btn.vue_vue_type_script_setup_true_lang-WWoyaSKz.js","sources":["../src/vue/x-btn.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\nimport { computed } from \"vue\";\nimport type { BtnProps } from \"@xwiki/platform-dsapi\";\n\nconst { variant } = defineProps<BtnProps>();\n\n// Map the variants to corresponding vuetify colors.\nconst color = computed(() => {\n let color = undefined;\n switch (variant) {\n case \"default\":\n break;\n case \"primary\":\n color = \"primary\";\n break;\n case \"success\":\n color = \"success\";\n break;\n case \"neutral\":\n color = \"secondary\";\n break;\n case \"warning\":\n color = \"warning\";\n break;\n case \"danger\":\n color = \"error\";\n break;\n }\n return color;\n});\n\nconst vVariant = computed(() => (variant == \"text\" ? \"text\" : \"tonal\"));\n</script>\n<template>\n <v-btn :color=\"color\" :variant=\"vVariant\" :disabled>\n <slot />\n </v-btn>\n</template>\n"],"names":["color","computed","__props","vVariant","_createBlock","_component_v_btn","_renderSlot","_ctx"],"mappings":";;;;;;;;;;AA0BA,UAAMA,IAAQC,EAAS,MAAM;AAC3B,UAAID;AACJ,cAAQE,EAAA,SAAA;AAAA,QACN,KAAK;AACH;AAAA,QACF,KAAK;AACHF,UAAAA,IAAQ;AACR;AAAA,QACF,KAAK;AACHA,UAAAA,IAAQ;AACR;AAAA,QACF,KAAK;AACHA,UAAAA,IAAQ;AACR;AAAA,QACF,KAAK;AACHA,UAAAA,IAAQ;AACR;AAAA,QACF,KAAK;AACHA,UAAAA,IAAQ;AACR;AAAA,MAAA;AAEJ,aAAOA;AAAAA,IACT,CAAC,GAEKG,IAAWF,EAAS,MAAOC,EAAA,WAAW,SAAS,SAAS,OAAQ;;;kBAGpEE,EAEQC,GAAA;AAAA,QAFA,OAAOL,EAAA;AAAA,QAAQ,SAASG,EAAA;AAAA,QAAW,UAAAD,EAAA;AAAA,MAAA;mBACzC,MAAQ;AAAA,UAARI,EAAQC,EAAA,QAAA,SAAA;AAAA,QAAA;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, useModel as t, openBlock as u, createBlock as d, unref as n, mergeModels as s } from "vue";
2
- import { c } from "./index-5yb_QWW0.js";
2
+ import { c } from "./index-BzcWoPad.js";
3
3
  const V = /* @__PURE__ */ m({
4
4
  __name: "x-checkbox",
5
5
  props: /* @__PURE__ */ s({
@@ -25,4 +25,4 @@ const V = /* @__PURE__ */ m({
25
25
  export {
26
26
  V as default
27
27
  };
28
- //# sourceMappingURL=x-checkbox-vREi3-wS.js.map
28
+ //# sourceMappingURL=x-checkbox-Bg43UZ5N.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-checkbox-vREi3-wS.js","sources":["../src/vue/form/x-checkbox.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\nimport { VCheckbox } from \"vuetify/components/VCheckbox\";\nimport type { CheckboxProps } from \"@xwiki/platform-dsapi\";\n\ndefineProps<CheckboxProps>();\n\nconst checked = defineModel<boolean | null>();\n</script>\n<template>\n <v-checkbox\n v-model=\"checked\"\n :label=\"label\"\n :messages=\"help\"\n density=\"compact\"\n ></v-checkbox>\n</template>\n"],"names":["checked","_useModel","_createBlock","_unref","VCheckbox","$event","__props"],"mappings":";;;;;;;;;;;;;;AAyBA,UAAMA,IAAUC,iBAA4B;2BAG1CC,EAKcC,EAAAC,CAAA,GAAA;AAAA,kBAJHJ,EAAA;AAAA,oDAAAA,EAAO,QAAAK;AAAA,MACf,OAAOC,EAAA;AAAA,MACP,UAAUA,EAAA;AAAA,MACX,SAAQ;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"x-checkbox-Bg43UZ5N.js","sources":["../src/vue/form/x-checkbox.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\nimport { VCheckbox } from \"vuetify/components/VCheckbox\";\nimport type { CheckboxProps } from \"@xwiki/platform-dsapi\";\n\ndefineProps<CheckboxProps>();\n\nconst checked = defineModel<boolean | null>();\n</script>\n<template>\n <v-checkbox\n v-model=\"checked\"\n :label=\"label\"\n :messages=\"help\"\n density=\"compact\"\n ></v-checkbox>\n</template>\n"],"names":["checked","_useModel","_createBlock","_unref","VCheckbox","$event","__props"],"mappings":";;;;;;;;;;;;;;AAyBA,UAAMA,IAAUC,iBAA4B;2BAG1CC,EAKcC,EAAAC,CAAA,GAAA;AAAA,kBAJHJ,EAAA;AAAA,oDAAAA,EAAO,QAAAK;AAAA,MACf,OAAOC,EAAA;AAAA,MACP,UAAUA,EAAA;AAAA,MACX,SAAQ;AAAA,IAAA;;;"}
@@ -0,0 +1,40 @@
1
+ import { defineComponent as s, resolveComponent as c, openBlock as d, createBlock as i, withCtx as o, renderSlot as n, createVNode as l, mergeProps as p } from "vue";
2
+ import { _ as m } from "./x-btn.vue_vue_type_script_setup_true_lang-WWoyaSKz.js";
3
+ import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const f = /* @__PURE__ */ s({
5
+ __name: "x-dropdown",
6
+ props: {
7
+ disabled: { type: Boolean },
8
+ btnProps: {}
9
+ },
10
+ setup(e) {
11
+ return (t, u) => {
12
+ const a = c("v-menu");
13
+ return d(), i(a, {
14
+ "close-on-content-click": !1,
15
+ attach: "#xwCristalApp",
16
+ "z-index": "initial"
17
+ }, {
18
+ activator: o(({ props: r }) => [
19
+ l(m, p(e.btnProps, {
20
+ disabled: e.disabled,
21
+ onClick: r.onClick
22
+ }), {
23
+ default: o(() => [
24
+ n(t.$slots, "activator", {}, void 0, !0)
25
+ ]),
26
+ _: 3
27
+ }, 16, ["disabled", "onClick"])
28
+ ]),
29
+ default: o(() => [
30
+ n(t.$slots, "default", {}, void 0, !0)
31
+ ]),
32
+ _: 3
33
+ });
34
+ };
35
+ }
36
+ }), k = /* @__PURE__ */ _(f, [["__scopeId", "data-v-ce7d95bb"]]);
37
+ export {
38
+ k as default
39
+ };
40
+ //# sourceMappingURL=x-dropdown-BL_Wqa5N.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-dropdown-BL_Wqa5N.js","sources":["../src/vue/x-dropdown.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\nimport XBtn from \"./x-btn.vue\";\nimport type { DropdownProps } from \"@xwiki/platform-dsapi\";\n\ndefineProps<DropdownProps>();\n</script>\n<template>\n <!-- v-menu needs to be attached inside Cristal DOM to fix its z-index.\n We also reset the default z-index to set it in the style section. -->\n <v-menu\n :close-on-content-click=\"false\"\n attach=\"#xwCristalApp\"\n z-index=\"initial\"\n >\n <template #activator=\"{ props }\">\n <!-- @vue-expect-error click is not part of the API. We need to improve\n Abstract Components type declaration to support generic html elements\n properties. -->\n <x-btn v-bind=\"btnProps\" :disabled=\"disabled\" @click=\"props.onClick\">\n <slot name=\"activator\"></slot>\n </x-btn>\n </template>\n <slot></slot>\n </v-menu>\n</template>\n<style scoped>\n.v-overlay {\n z-index: var(--cr-z-index-dropdown);\n}\n</style>\n"],"names":["_createBlock","_component_v_menu","_withCtx","props","_createVNode","XBtn","_mergeProps","__props","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;kBA4BEA,EAcSC,GAAA;AAAA,QAbN,0BAAwB;AAAA,QACzB,QAAO;AAAA,QACP,WAAQ;AAAA,MAAA;QAEG,WAASC,EAIlB,CAEQ,EANc,OAAAC,QAAK;AAAA,UAI3BC,EAEQC,GAFRC,EAEQC,EAAA,UAFe;AAAA,YAAG,UAAUA,EAAA;AAAA,YAAW,SAAOJ,EAAM;AAAA,UAAA;uBAC1D,MAA8B;AAAA,cAA9BK,EAA8BC,EAAA,QAAA,aAAA,CAAA,GAAA,QAAA,EAAA;AAAA,YAAA;;;;mBAGlC,MAAa;AAAA,UAAbD,EAAaC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as m, useModel as s, computed as d, openBlock as i, createBlock as p, unref as f, mergeModels as c } from "vue";
2
2
  import { t as V } from "./translations-CXVK8zyA.js";
3
3
  import { useI18n as y } from "vue-i18n";
4
- import { b } from "./index-5yb_QWW0.js";
4
+ import { b } from "./index-BzcWoPad.js";
5
5
  const g = /* @__PURE__ */ m({
6
6
  __name: "x-file-input",
7
7
  props: /* @__PURE__ */ c({
@@ -37,4 +37,4 @@ const g = /* @__PURE__ */ m({
37
37
  export {
38
38
  g as default
39
39
  };
40
- //# sourceMappingURL=x-file-input-f35OKy3m.js.map
40
+ //# sourceMappingURL=x-file-input-Dt2B3iG0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-file-input-f35OKy3m.js","sources":["../src/vue/form/x-file-input.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport messages from \"../../translations\";\nimport { computed } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VFileInput } from \"vuetify/components/VFileInput\";\nimport type { FileInputModel, TextFieldProps } from \"@xwiki/platform-dsapi\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst model = defineModel<FileInputModel>();\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.file.input.mandatory\");\n }\n });\n }\n return rulesList;\n});\n</script>\n\n<template>\n <v-file-input\n v-model=\"model\"\n :label=\"label\"\n :name=\"name\"\n :rules=\"rules\"\n ></v-file-input>\n</template>\n\n<style scoped></style>\n"],"names":["t","useI18n","messages","model","_useModel","props","__props","rules","computed","rulesList","value","_createBlock","_unref","VFileInput","$event"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,UAAM,EAAE,GAAAA,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GAEKC,IAAQC,iBAA4B,GACpCC,IAAQC,GAERC,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIJ,EAAM,YACRI,EAAU,KAAK,CAACC,MACVA,IACK,KAEAV,EAAE,8BAA8B,CAE1C,GAEIS;AAAA,IACT,CAAC;2BAICE,EAKgBC,EAAAC,CAAA,GAAA;AAAA,kBAJLV,EAAA;AAAA,oDAAAA,EAAK,QAAAW;AAAA,MACb,OAAOR,EAAA;AAAA,MACP,MAAMA,EAAA;AAAA,MACN,OAAOC,EAAA;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"x-file-input-Dt2B3iG0.js","sources":["../src/vue/form/x-file-input.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport messages from \"../../translations\";\nimport { computed } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VFileInput } from \"vuetify/components/VFileInput\";\nimport type { FileInputModel, TextFieldProps } from \"@xwiki/platform-dsapi\";\n\nconst { t } = useI18n({\n messages,\n});\n\nconst model = defineModel<FileInputModel>();\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.file.input.mandatory\");\n }\n });\n }\n return rulesList;\n});\n</script>\n\n<template>\n <v-file-input\n v-model=\"model\"\n :label=\"label\"\n :name=\"name\"\n :rules=\"rules\"\n ></v-file-input>\n</template>\n\n<style scoped></style>\n"],"names":["t","useI18n","messages","model","_useModel","props","__props","rules","computed","rulesList","value","_createBlock","_unref","VFileInput","$event"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,UAAM,EAAE,GAAAA,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GAEKC,IAAQC,iBAA4B,GACpCC,IAAQC,GAERC,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIJ,EAAM,YACRI,EAAU,KAAK,CAACC,MACVA,IACK,KAEAV,EAAE,8BAA8B,CAE1C,GAEIS;AAAA,IACT,CAAC;2BAICE,EAKgBC,EAAAC,CAAA,GAAA;AAAA,kBAJLV,EAAA;AAAA,oDAAAA,EAAK,QAAAW;AAAA,MACb,OAAOR,EAAA;AAAA,MACP,MAAMA,EAAA;AAAA,MACN,OAAOC,EAAA;AAAA,IAAA;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as s, ref as m, openBlock as f, createBlock as c, unref as u, withModifiers as d, withCtx as _, renderSlot as l } from "vue";
2
- import { V as p } from "./index-5yb_QWW0.js";
2
+ import { V as p } from "./index-BzcWoPad.js";
3
3
  import { _ as v } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const x = /* @__PURE__ */ s({
5
5
  __name: "x-form",
@@ -30,4 +30,4 @@ const x = /* @__PURE__ */ s({
30
30
  export {
31
31
  y as default
32
32
  };
33
- //# sourceMappingURL=x-form-ClKnXXd0.js.map
33
+ //# sourceMappingURL=x-form-DA_DOJ2L.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-form-ClKnXXd0.js","sources":["../src/vue/form/x-form.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { VForm } from \"vuetify/components/VForm\";\nimport type { Ref } from \"vue\";\n\nconst form: Ref<VForm | undefined> = ref(undefined);\nconst emits = defineEmits([\"formSubmit\"]);\n\ndefineExpose({\n reset,\n});\n\nasync function reset() {\n form.value?.reset();\n}\n\nasync function submit() {\n const validation = await form.value?.validate();\n if (validation?.valid) {\n emits(\"formSubmit\");\n }\n}\n</script>\n\n<template>\n <v-form ref=\"form\" @submit.prevent=\"submit\">\n <slot></slot>\n </v-form>\n</template>\n\n<style scoped>\n.v-form {\n display: flex;\n flex-direction: column;\n gap: var(--cr-spacing-x-small);\n}\n</style>\n"],"names":["form","ref","emits","__emit","__expose","reset","submit","_createBlock","_unref","VForm","_renderSlot","_ctx"],"mappings":";;;;;;;AAwBA,UAAMA,IAA+BC,EAAI,MAAS,GAC5CC,IAAQC;AAEd,IAAAC,EAAa;AAAA,MACX,OAAAC;AAAA,IAAA,CACD;AAED,mBAAeA,IAAQ;AACrB,MAAAL,EAAK,OAAO,MAAA;AAAA,IACd;AAEA,mBAAeM,IAAS;AAEtB,OADmB,MAAMN,EAAK,OAAO,SAAA,IACrB,SACdE,EAAM,YAAY;AAAA,IAEtB;2BAIEK,EAESC,EAAAC,CAAA,GAAA;AAAA,eAFG;AAAA,MAAJ,KAAIT;AAAA,MAAQ,YAAgBM,GAAM,CAAA,SAAA,CAAA;AAAA,IAAA;iBACxC,MAAa;AAAA,QAAbI,EAAaC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAA;;;;;"}
1
+ {"version":3,"file":"x-form-DA_DOJ2L.js","sources":["../src/vue/form/x-form.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { VForm } from \"vuetify/components/VForm\";\nimport type { Ref } from \"vue\";\n\nconst form: Ref<VForm | undefined> = ref(undefined);\nconst emits = defineEmits([\"formSubmit\"]);\n\ndefineExpose({\n reset,\n});\n\nasync function reset() {\n form.value?.reset();\n}\n\nasync function submit() {\n const validation = await form.value?.validate();\n if (validation?.valid) {\n emits(\"formSubmit\");\n }\n}\n</script>\n\n<template>\n <v-form ref=\"form\" @submit.prevent=\"submit\">\n <slot></slot>\n </v-form>\n</template>\n\n<style scoped>\n.v-form {\n display: flex;\n flex-direction: column;\n gap: var(--cr-spacing-x-small);\n}\n</style>\n"],"names":["form","ref","emits","__emit","__expose","reset","submit","_createBlock","_unref","VForm","_renderSlot","_ctx"],"mappings":";;;;;;;AAwBA,UAAMA,IAA+BC,EAAI,MAAS,GAC5CC,IAAQC;AAEd,IAAAC,EAAa;AAAA,MACX,OAAAC;AAAA,IAAA,CACD;AAED,mBAAeA,IAAQ;AACrB,MAAAL,EAAK,OAAO,MAAA;AAAA,IACd;AAEA,mBAAeM,IAAS;AAEtB,OADmB,MAAMN,EAAK,OAAO,SAAA,IACrB,SACdE,EAAM,YAAY;AAAA,IAEtB;2BAIEK,EAESC,EAAAC,CAAA,GAAA;AAAA,eAFG;AAAA,MAAJ,KAAIT;AAAA,MAAQ,YAAgBM,GAAM,CAAA,SAAA,CAAA;AAAA,IAAA;iBACxC,MAAa;AAAA,QAAbI,EAAaC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAA;;;;;"}
@@ -0,0 +1,17 @@
1
+ import { resolveComponent as o, openBlock as n, createBlock as r, withCtx as c, renderSlot as s } from "vue";
2
+ import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const a = {};
4
+ function d(e, f) {
5
+ const t = o("v-list");
6
+ return n(), r(t, { density: "compact" }, {
7
+ default: c(() => [
8
+ s(e.$slots, "default", {}, void 0, !0)
9
+ ]),
10
+ _: 3
11
+ });
12
+ }
13
+ const p = /* @__PURE__ */ _(a, [["render", d], ["__scopeId", "data-v-34407184"]]);
14
+ export {
15
+ p as default
16
+ };
17
+ //# sourceMappingURL=x-menu--XKGcL5D.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-menu--XKGcL5D.js","sources":["../src/vue/x-menu.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup></script>\n<template>\n <v-list density=\"compact\">\n <slot name=\"default\" />\n </v-list>\n</template>\n<style scoped>\n.v-overlay {\n z-index: var(--cr-z-index-dropdown);\n}\n</style>\n"],"names":["_createBlock","_component_v_list","_renderSlot","_ctx"],"mappings":";;;;;cAqBEA,EAESC,GAAA,EAFD,SAAQ,aAAS;AAAA,eACvB,MAAuB;AAAA,MAAvBC,EAAuBC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as m, useModel as n, computed as d, openBlock as i, createBlock as c, unref as f, mergeModels as p } from "vue";
2
2
  import { t as V } from "./translations-CXVK8zyA.js";
3
3
  import { useI18n as b } from "vue-i18n";
4
- import { d as g } from "./index-5yb_QWW0.js";
4
+ import { d as g } from "./index-BzcWoPad.js";
5
5
  const B = /* @__PURE__ */ m({
6
6
  __name: "x-select",
7
7
  props: /* @__PURE__ */ p({
@@ -36,4 +36,4 @@ const B = /* @__PURE__ */ m({
36
36
  export {
37
37
  B as default
38
38
  };
39
- //# sourceMappingURL=x-select-B-9ebdG3.js.map
39
+ //# sourceMappingURL=x-select-EUko1Rag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-select-B-9ebdG3.js","sources":["../src/vue/form/x-select.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\nimport messages from \"../../translations\";\nimport { computed } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VSelect } from \"vuetify/components/VSelect\";\nimport type { SelectProps } from \"@xwiki/platform-dsapi\";\n\nconst props = defineProps<SelectProps>();\nconst selected = defineModel<string>();\n\nconst { t } = useI18n({\n messages,\n});\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.select.input.mandatory\");\n }\n });\n }\n return rulesList;\n});\n</script>\n<template>\n <v-select\n v-model=\"selected\"\n :label=\"label\"\n :messages=\"help\"\n :items=\"items\"\n :rules=\"rules\"\n :clearable=\"!required\"\n ></v-select>\n</template>\n"],"names":["props","__props","selected","_useModel","t","useI18n","messages","rules","computed","rulesList","value","_createBlock","_unref","VSelect","$event"],"mappings":";;;;;;;;;;;;;;;;;;AA0BA,UAAMA,IAAQC,GACRC,IAAWC,EAAmBF,GAAA,YAAC,GAE/B,EAAE,GAAAG,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GAEKC,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIT,EAAM,YACRS,EAAU,KAAK,CAACC,MACVA,IACK,KAEAN,EAAE,gCAAgC,CAE5C,GAEIK;AAAA,IACT,CAAC;2BAGCE,EAOYC,EAAAC,CAAA,GAAA;AAAA,kBANDX,EAAA;AAAA,oDAAAA,EAAQ,QAAAY;AAAA,MAChB,OAAOb,EAAA;AAAA,MACP,UAAUA,EAAA;AAAA,MACV,OAAOA,EAAA;AAAA,MACP,OAAOM,EAAA;AAAA,MACP,YAAYN,EAAA;AAAA,IAAA;;;"}
1
+ {"version":3,"file":"x-select-EUko1Rag.js","sources":["../src/vue/form/x-select.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script lang=\"ts\" setup>\nimport messages from \"../../translations\";\nimport { computed } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VSelect } from \"vuetify/components/VSelect\";\nimport type { SelectProps } from \"@xwiki/platform-dsapi\";\n\nconst props = defineProps<SelectProps>();\nconst selected = defineModel<string>();\n\nconst { t } = useI18n({\n messages,\n});\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.select.input.mandatory\");\n }\n });\n }\n return rulesList;\n});\n</script>\n<template>\n <v-select\n v-model=\"selected\"\n :label=\"label\"\n :messages=\"help\"\n :items=\"items\"\n :rules=\"rules\"\n :clearable=\"!required\"\n ></v-select>\n</template>\n"],"names":["props","__props","selected","_useModel","t","useI18n","messages","rules","computed","rulesList","value","_createBlock","_unref","VSelect","$event"],"mappings":";;;;;;;;;;;;;;;;;;AA0BA,UAAMA,IAAQC,GACRC,IAAWC,EAAmBF,GAAA,YAAC,GAE/B,EAAE,GAAAG,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GAEKC,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIT,EAAM,YACRS,EAAU,KAAK,CAACC,MACVA,IACK,KAEAN,EAAE,gCAAgC,CAE5C,GAEIK;AAAA,IACT,CAAC;2BAGCE,EAOYC,EAAAC,CAAA,GAAA;AAAA,kBANDX,EAAA;AAAA,oDAAAA,EAAQ,QAAAY;AAAA,MAChB,OAAOb,EAAA;AAAA,MACP,UAAUA,EAAA;AAAA,MACV,OAAOA,EAAA;AAAA,MACP,OAAOM,EAAA;AAAA,MACP,YAAYN,EAAA;AAAA,IAAA;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as s, useModel as d, computed as i, openBlock as m, createBlock as f, unref as p, withCtx as c, renderSlot as y, mergeModels as h } from "vue";
2
2
  import { t as V } from "./translations-CXVK8zyA.js";
3
3
  import { useI18n as x } from "vue-i18n";
4
- import { a as v } from "./index-5yb_QWW0.js";
4
+ import { a as v } from "./index-BzcWoPad.js";
5
5
  const k = /* @__PURE__ */ s({
6
6
  __name: "x-text-field",
7
7
  props: /* @__PURE__ */ h({
@@ -47,4 +47,4 @@ const k = /* @__PURE__ */ s({
47
47
  export {
48
48
  k as default
49
49
  };
50
- //# sourceMappingURL=x-text-field-BoIZJ_CH.js.map
50
+ //# sourceMappingURL=x-text-field-CZcbvoFI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-text-field-BoIZJ_CH.js","sources":["../src/vue/form/x-text-field.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport messages from \"../../translations\";\nimport { computed } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VTextField } from \"vuetify/components/VTextField\";\nimport type { TextFieldProps } from \"@xwiki/platform-dsapi\";\n\nconst { t } = useI18n({\n messages,\n});\nconst props = defineProps<TextFieldProps>();\nconst input = defineModel<string>();\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\n v-model=\"input\"\n :label=\"label\"\n :name=\"name\"\n :autofocus=\"autofocus\"\n :hint=\"help\"\n :persistent-hint=\"help !== undefined\"\n :rules=\"rules\"\n :readonly=\"readonly\"\n :type=\"type ?? 'text'\"\n >\n <template #default>\n <slot name=\"default\" />\n </template>\n </v-text-field>\n</template>\n\n<style scoped></style>\n"],"names":["t","useI18n","messages","props","__props","input","_useModel","rules","computed","rulesList","value","_createBlock","_unref","VTextField","$event","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,UAAM,EAAE,GAAAA,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GACKC,IAAQC,GACRC,IAAQC,EAAmBF,GAAA,YAAC,GAE5BG,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIN,EAAM,YACRM,EAAU,KAAK,CAACC,MACVA,IACK,KAEAV,EAAE,8BAA8B,CAE1C,GAEIS;AAAA,IACT,CAAC;2BAICE,EAceC,EAAAC,CAAA,GAAA;AAAA,kBAbJR,EAAA;AAAA,oDAAAA,EAAK,QAAAS;AAAA,MACb,OAAOV,EAAA;AAAA,MACP,MAAMA,EAAA;AAAA,MACN,WAAWA,EAAA;AAAA,MACX,MAAMA,EAAA;AAAA,MACN,mBAAiBA,EAAA,SAAS;AAAA,MAC1B,OAAOG,EAAA;AAAA,MACP,UAAUH,EAAA;AAAA,MACV,MAAMA,EAAA,QAAI;AAAA,IAAA;MAEA,WACT,MAAuB;AAAA,QAAvBW,EAAuBC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;;"}
1
+ {"version":3,"file":"x-text-field-CZcbvoFI.js","sources":["../src/vue/form/x-text-field.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\">\nimport messages from \"../../translations\";\nimport { computed } from \"vue\";\nimport { useI18n } from \"vue-i18n\";\nimport { VTextField } from \"vuetify/components/VTextField\";\nimport type { TextFieldProps } from \"@xwiki/platform-dsapi\";\n\nconst { t } = useI18n({\n messages,\n});\nconst props = defineProps<TextFieldProps>();\nconst input = defineModel<string>();\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\n v-model=\"input\"\n :label=\"label\"\n :name=\"name\"\n :autofocus=\"autofocus\"\n :hint=\"help\"\n :persistent-hint=\"help !== undefined\"\n :rules=\"rules\"\n :readonly=\"readonly\"\n :type=\"type ?? 'text'\"\n >\n <template #default>\n <slot name=\"default\" />\n </template>\n </v-text-field>\n</template>\n\n<style scoped></style>\n"],"names":["t","useI18n","messages","props","__props","input","_useModel","rules","computed","rulesList","value","_createBlock","_unref","VTextField","$event","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0BA,UAAM,EAAE,GAAAA,EAAA,IAAMC,EAAQ;AAAA,MAAA,UACpBC;AAAAA,IAAA,CACD,GACKC,IAAQC,GACRC,IAAQC,EAAmBF,GAAA,YAAC,GAE5BG,IAAQC,EAAS,MAAM;AAC3B,YAAMC,IAAY,CAAA;AAClB,aAAIN,EAAM,YACRM,EAAU,KAAK,CAACC,MACVA,IACK,KAEAV,EAAE,8BAA8B,CAE1C,GAEIS;AAAA,IACT,CAAC;2BAICE,EAceC,EAAAC,CAAA,GAAA;AAAA,kBAbJR,EAAA;AAAA,oDAAAA,EAAK,QAAAS;AAAA,MACb,OAAOV,EAAA;AAAA,MACP,MAAMA,EAAA;AAAA,MACN,WAAWA,EAAA;AAAA,MACX,MAAMA,EAAA;AAAA,MACN,mBAAiBA,EAAA,SAAS;AAAA,MAC1B,OAAOG,EAAA;AAAA,MACP,UAAUH,EAAA;AAAA,MACV,MAAMA,EAAA,QAAI;AAAA,IAAA;MAEA,WACT,MAAuB;AAAA,QAAvBW,EAAuBC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as y, useModel as s, ref as h, watch as C, openBlock as i, createBlock as k, unref as m, withCtx as b, createElementBlock as v, withModifiers as w, toDisplayString as u, mergeModels as x } from "vue";
2
- import { e as A } from "./index-5yb_QWW0.js";
2
+ import { e as A } from "./index-BzcWoPad.js";
3
3
  import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
5
5
  __name: "x-tree",
@@ -67,4 +67,4 @@ const N = ["href", "onClick"], z = ["href", "onClick"], B = /* @__PURE__ */ y({
67
67
  export {
68
68
  T as default
69
69
  };
70
- //# sourceMappingURL=x-tree-CrHakAmV.js.map
70
+ //# sourceMappingURL=x-tree-SDsF-YBu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"x-tree-CrHakAmV.js","sources":["../src/vue/x-tree.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\" generic=\"T extends DisplayableTreeNode\">\nimport { ref, watch } from \"vue\";\nimport { VTreeview } from \"vuetify/components/VTreeview\";\nimport type { DisplayableTreeNode, TreeProps } from \"@xwiki/platform-dsapi\";\nimport type { Ref } from \"vue\";\n\nconst props = defineProps<TreeProps<T>>();\nconst opened = defineModel(\"opened\", { default: [], type: Array<string> });\nconst activated = defineModel<string | undefined>(\"activated\");\n\nconst activatedNodes: Ref<Array<string>> = ref([]);\n\nwatch(activated, resetActivated, { immediate: true });\n\nfunction resetActivated() {\n // Clicking on a node would activate it and this can't be disabled easily.\n // With this listener, we ensure that only the node we want stays active.\n activatedNodes.value = activated.value ? [activated.value] : [];\n}\n\nfunction updateActivated(newActivatedNode: DisplayableTreeNode) {\n if (newActivatedNode.activatable) {\n activated.value = newActivatedNode.id;\n }\n}\n\nasync function lazyLoadChildrenWrapper(node: unknown) {\n // We need this wrapper because our props are more specific than Vuetify's.\n await props.lazyLoadChildren!(node as T);\n}\n</script>\n\n<template>\n <v-treeview\n density=\"compact\"\n :activated=\"activatedNodes\"\n :items=\"showRootNode ? [rootNode] : rootNode.children\"\n :load-children=\"lazyLoadChildren ? lazyLoadChildrenWrapper : undefined\"\n activatable\n active-strategy=\"independent\"\n item-value=\"id\"\n v-model:opened=\"opened as string[]\"\n @update:opened=\"($event: string[]) => (opened = $event)\"\n @update:activated=\"resetActivated\"\n >\n <template #title=\"{ item }\">\n <a\n v-if=\"nodeClickAction\"\n :href=\"item.url\"\n @click.prevent=\"\n async () => {\n updateActivated(item);\n await nodeClickAction!(item as T);\n }\n \"\n >{{ item.label }}</a\n >\n <a v-else :href=\"item.url\" @click=\"updateActivated(item)\">{{\n item.label\n }}</a>\n </template>\n </v-treeview>\n</template>\n\n<style scoped>\n/* Remove the background color from the root div element. */\n.v-list {\n background: none;\n}\n:deep(a) {\n text-decoration: none;\n color: var(--cr-base-text-color);\n}\n/* Disable hover on items. */\n:deep(.v-list-item__overlay) {\n --v-hover-opacity: 0;\n}\n/* Disable hand cursor on items, since we disable the default click action. */\n:deep(.v-list-item--link) {\n cursor: default;\n}\n</style>\n"],"names":["props","__props","opened","_useModel","activated","activatedNodes","ref","watch","resetActivated","updateActivated","newActivatedNode","lazyLoadChildrenWrapper","node","_createBlock","_unref","VTreeview","$event","_withCtx","item","_createElementBlock","_withModifiers","_toDisplayString","_hoisted_1","_hoisted_2"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,UAAMA,IAAQC,GACRC,IAASC,EAAWF,GAAC,QAA8C,GACnEG,IAAYD,KAAgC,WAAW,GAEvDE,IAAqCC,EAAI,EAAE;AAEjD,IAAAC,EAAMH,GAAWI,GAAgB,EAAE,WAAW,IAAM;AAEpD,aAASA,IAAiB;AAGxB,MAAAH,EAAe,QAAQD,EAAU,QAAQ,CAACA,EAAU,KAAK,IAAI,CAAA;AAAA,IAC/D;AAEA,aAASK,EAAgBC,GAAuC;AAC9D,MAAIA,EAAiB,gBACnBN,EAAU,QAAQM,EAAiB;AAAA,IAEvC;AAEA,mBAAeC,EAAwBC,GAAe;AAEpD,YAAMZ,EAAM,iBAAkBY,CAAS;AAAA,IACzC;2BAIEC,EA4BaC,EAAAC,CAAA,GAAA;AAAA,MA3BX,SAAQ;AAAA,MACP,WAAWV,EAAA;AAAA,MACX,OAAOJ,EAAA,eAAY,CAAIA,UAAQ,IAAIA,EAAA,SAAS;AAAA,MAC5C,iBAAeA,EAAA,mBAAmBU,IAA0B;AAAA,MAC7D,aAAA;AAAA,MACA,mBAAgB;AAAA,MAChB,cAAW;AAAA,MACH,QAAQT,EAAA;AAAA;+BAAAA,EAAA,QAAMc;AAAA,yBACLA,MAAsBd,EAAA,QAASc;AAAA,MAAA;AAAA,MAC/C,sBAAkBR;AAAA,IAAA;MAER,OAAKS,EACd,CAUC,EAXiB,MAAAC,QAAI;AAAA,QAEdjB,EAAA,wBADRkB,EAUC,KAAA;AAAA;UARE,MAAMD,EAAK;AAAA,UACX,SAAKE;AAAAA;AAA+C,cAAAX,EAAgBS,CAAI,GAAqB,MAAAjB,EAAA,gBAAiBiB,CAAI;AAAA;;;WAM/GG,EAAAH,EAAK,KAAK,GAAA,GAAAI,CAAA,WAEhBH,EAEM,KAAA;AAAA;UAFK,MAAMD,EAAK;AAAA,UAAM,SAAK,CAAAF,MAAEP,EAAgBS,CAAI;AAAA,QAAA,GACrDG,EAAAH,EAAK,KAAK,GAAA,GAAAK,CAAA;AAAA,MAAA;;;;;"}
1
+ {"version":3,"file":"x-tree-SDsF-YBu.js","sources":["../src/vue/x-tree.vue"],"sourcesContent":["<!--\n See the LICENSE file distributed with this work for additional\n information regarding copyright ownership.\n\n This is free software; you can redistribute it and/or modify it\n under the terms of the GNU Lesser General Public License as\n published by the Free Software Foundation; either version 2.1 of\n the License, or (at your option) any later version.\n\n This software is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this software; if not, write to the Free\n Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n-->\n<script setup lang=\"ts\" generic=\"T extends DisplayableTreeNode\">\nimport { ref, watch } from \"vue\";\nimport { VTreeview } from \"vuetify/components/VTreeview\";\nimport type { DisplayableTreeNode, TreeProps } from \"@xwiki/platform-dsapi\";\nimport type { Ref } from \"vue\";\n\nconst props = defineProps<TreeProps<T>>();\nconst opened = defineModel(\"opened\", { default: [], type: Array<string> });\nconst activated = defineModel<string | undefined>(\"activated\");\n\nconst activatedNodes: Ref<Array<string>> = ref([]);\n\nwatch(activated, resetActivated, { immediate: true });\n\nfunction resetActivated() {\n // Clicking on a node would activate it and this can't be disabled easily.\n // With this listener, we ensure that only the node we want stays active.\n activatedNodes.value = activated.value ? [activated.value] : [];\n}\n\nfunction updateActivated(newActivatedNode: DisplayableTreeNode) {\n if (newActivatedNode.activatable) {\n activated.value = newActivatedNode.id;\n }\n}\n\nasync function lazyLoadChildrenWrapper(node: unknown) {\n // We need this wrapper because our props are more specific than Vuetify's.\n await props.lazyLoadChildren!(node as T);\n}\n</script>\n\n<template>\n <v-treeview\n density=\"compact\"\n :activated=\"activatedNodes\"\n :items=\"showRootNode ? [rootNode] : rootNode.children\"\n :load-children=\"lazyLoadChildren ? lazyLoadChildrenWrapper : undefined\"\n activatable\n active-strategy=\"independent\"\n item-value=\"id\"\n v-model:opened=\"opened as string[]\"\n @update:opened=\"($event: string[]) => (opened = $event)\"\n @update:activated=\"resetActivated\"\n >\n <template #title=\"{ item }\">\n <a\n v-if=\"nodeClickAction\"\n :href=\"item.url\"\n @click.prevent=\"\n async () => {\n updateActivated(item);\n await nodeClickAction!(item as T);\n }\n \"\n >{{ item.label }}</a\n >\n <a v-else :href=\"item.url\" @click=\"updateActivated(item)\">{{\n item.label\n }}</a>\n </template>\n </v-treeview>\n</template>\n\n<style scoped>\n/* Remove the background color from the root div element. */\n.v-list {\n background: none;\n}\n:deep(a) {\n text-decoration: none;\n color: var(--cr-base-text-color);\n}\n/* Disable hover on items. */\n:deep(.v-list-item__overlay) {\n --v-hover-opacity: 0;\n}\n/* Disable hand cursor on items, since we disable the default click action. */\n:deep(.v-list-item--link) {\n cursor: default;\n}\n</style>\n"],"names":["props","__props","opened","_useModel","activated","activatedNodes","ref","watch","resetActivated","updateActivated","newActivatedNode","lazyLoadChildrenWrapper","node","_createBlock","_unref","VTreeview","$event","_withCtx","item","_createElementBlock","_withModifiers","_toDisplayString","_hoisted_1","_hoisted_2"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,UAAMA,IAAQC,GACRC,IAASC,EAAWF,GAAC,QAA8C,GACnEG,IAAYD,KAAgC,WAAW,GAEvDE,IAAqCC,EAAI,EAAE;AAEjD,IAAAC,EAAMH,GAAWI,GAAgB,EAAE,WAAW,IAAM;AAEpD,aAASA,IAAiB;AAGxB,MAAAH,EAAe,QAAQD,EAAU,QAAQ,CAACA,EAAU,KAAK,IAAI,CAAA;AAAA,IAC/D;AAEA,aAASK,EAAgBC,GAAuC;AAC9D,MAAIA,EAAiB,gBACnBN,EAAU,QAAQM,EAAiB;AAAA,IAEvC;AAEA,mBAAeC,EAAwBC,GAAe;AAEpD,YAAMZ,EAAM,iBAAkBY,CAAS;AAAA,IACzC;2BAIEC,EA4BaC,EAAAC,CAAA,GAAA;AAAA,MA3BX,SAAQ;AAAA,MACP,WAAWV,EAAA;AAAA,MACX,OAAOJ,EAAA,eAAY,CAAIA,UAAQ,IAAIA,EAAA,SAAS;AAAA,MAC5C,iBAAeA,EAAA,mBAAmBU,IAA0B;AAAA,MAC7D,aAAA;AAAA,MACA,mBAAgB;AAAA,MAChB,cAAW;AAAA,MACH,QAAQT,EAAA;AAAA;+BAAAA,EAAA,QAAMc;AAAA,yBACLA,MAAsBd,EAAA,QAASc;AAAA,MAAA;AAAA,MAC/C,sBAAkBR;AAAA,IAAA;MAER,OAAKS,EACd,CAUC,EAXiB,MAAAC,QAAI;AAAA,QAEdjB,EAAA,wBADRkB,EAUC,KAAA;AAAA;UARE,MAAMD,EAAK;AAAA,UACX,SAAKE;AAAAA;AAA+C,cAAAX,EAAgBS,CAAI,GAAqB,MAAAjB,EAAA,gBAAiBiB,CAAI;AAAA;;;WAM/GG,EAAAH,EAAK,KAAK,GAAA,GAAAI,CAAA,WAEhBH,EAEM,KAAA;AAAA;UAFK,MAAMD,EAAK;AAAA,UAAM,SAAK,CAAAF,MAAEP,EAAgBS,CAAI;AAAA,QAAA,GACrDG,EAAAH,EAAK,KAAK,GAAA,GAAAK,CAAA;AAAA,MAAA;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-dsvuetify",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -28,15 +28,15 @@
28
28
  "main": "./dist/index.es.js",
29
29
  "types": "./dist/index.d.ts",
30
30
  "dependencies": {
31
- "@xwiki/platform-api": "18.1.0",
32
- "@xwiki/platform-document-api": "18.1.0",
33
- "@xwiki/platform-fn-utils": "18.1.0",
34
- "@xwiki/platform-model-api": "18.1.0",
35
- "@xwiki/platform-model-reference-api": "18.1.0",
36
- "@xwiki/platform-navigation-tree-api": "18.1.0",
31
+ "@xwiki/platform-api": "18.2.0",
32
+ "@xwiki/platform-document-api": "18.2.0",
33
+ "@xwiki/platform-fn-utils": "18.2.0",
34
+ "@xwiki/platform-model-api": "18.2.0",
35
+ "@xwiki/platform-model-reference-api": "18.2.0",
36
+ "@xwiki/platform-navigation-tree-api": "18.2.0",
37
37
  "vue-i18n": "11.2.8",
38
- "vuetify": "3.11.8",
39
- "@xwiki/cristal-hierarchy-api": "1.1.0"
38
+ "vuetify": "3.12.0",
39
+ "@xwiki/cristal-hierarchy-api": "1.2.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "inversify": "7.x",
@@ -45,14 +45,14 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@vue/test-utils": "2.4.6",
48
- "@xwiki/platform-dsapi": "18.1.0",
48
+ "@xwiki/platform-dsapi": "18.2.0",
49
49
  "inversify": "7.11.0",
50
50
  "reflect-metadata": "0.2.2",
51
51
  "typescript": "5.9.3",
52
52
  "vite": "7.3.1",
53
- "vue": "3.5.28",
54
- "vue-tsc": "3.2.4",
55
- "@xwiki/cristal-dev-config": "1.1.0"
53
+ "vue": "3.5.30",
54
+ "vue-tsc": "3.2.6",
55
+ "@xwiki/cristal-dev-config": "1.2.0"
56
56
  },
57
57
  "scripts": {
58
58
  "api-extractor:local": "api-extractor run --local",
@@ -92,6 +92,11 @@ export class VuetifyDesignSystemLoader implements DesignSystemLoader {
92
92
  registerAsyncComponent(app, "XCard", () => import("../vue/x-card.vue"));
93
93
  registerAsyncComponent(app, "XAlert", () => import("../vue/x-alert.vue"));
94
94
  registerAsyncComponent(app, "XDialog", () => import("../vue/x-dialog.vue"));
95
+ registerAsyncComponent(
96
+ app,
97
+ "XDropdown",
98
+ () => import("../vue/x-dropdown.vue"),
99
+ );
95
100
  registerAsyncComponent(app, "XMenu", () => import("../vue/x-menu.vue"));
96
101
  registerAsyncComponent(
97
102
  app,
package/src/vue/x-btn.vue CHANGED
@@ -51,7 +51,7 @@ const color = computed(() => {
51
51
  const vVariant = computed(() => (variant == "text" ? "text" : "tonal"));
52
52
  </script>
53
53
  <template>
54
- <v-btn :color="color" :variant="vVariant">
54
+ <v-btn :color="color" :variant="vVariant" :disabled>
55
55
  <slot />
56
56
  </v-btn>
57
57
  </template>
@@ -0,0 +1,49 @@
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
+ <script lang="ts" setup>
21
+ import XBtn from "./x-btn.vue";
22
+ import type { DropdownProps } from "@xwiki/platform-dsapi";
23
+
24
+ defineProps<DropdownProps>();
25
+ </script>
26
+ <template>
27
+ <!-- v-menu needs to be attached inside Cristal DOM to fix its z-index.
28
+ We also reset the default z-index to set it in the style section. -->
29
+ <v-menu
30
+ :close-on-content-click="false"
31
+ attach="#xwCristalApp"
32
+ z-index="initial"
33
+ >
34
+ <template #activator="{ props }">
35
+ <!-- @vue-expect-error click is not part of the API. We need to improve
36
+ Abstract Components type declaration to support generic html elements
37
+ properties. -->
38
+ <x-btn v-bind="btnProps" :disabled="disabled" @click="props.onClick">
39
+ <slot name="activator"></slot>
40
+ </x-btn>
41
+ </template>
42
+ <slot></slot>
43
+ </v-menu>
44
+ </template>
45
+ <style scoped>
46
+ .v-overlay {
47
+ z-index: var(--cr-z-index-dropdown);
48
+ }
49
+ </style>
@@ -19,22 +19,9 @@
19
19
  -->
20
20
  <script lang="ts" setup></script>
21
21
  <template>
22
- <!-- v-menu needs to be attached inside Cristal DOM to fix its z-index.
23
- We also reset the default z-index to set it in the style section. -->
24
- <v-menu
25
- :close-on-content-click="false"
26
- attach="#xwCristalApp"
27
- z-index="initial"
28
- >
29
- <template #activator="{ props }">
30
- <span v-bind="props">
31
- <slot name="activator" />
32
- </span>
33
- </template>
34
- <v-list density="compact">
35
- <slot name="default" />
36
- </v-list>
37
- </v-menu>
22
+ <v-list density="compact">
23
+ <slot name="default" />
24
+ </v-list>
38
25
  </template>
39
26
  <style scoped>
40
27
  .v-overlay {