@pequity/squirrel 10.0.3 → 10.1.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/README.md +20 -1
- package/dist/cjs/chunks/p-action-bar.js +17 -14
- package/dist/cjs/chunks/p-date-picker.js +3 -1
- package/dist/cjs/chunks/p-dropdown-select.js +27 -26
- package/dist/cjs/chunks/p-inline-date-picker.js +3 -1
- package/dist/cjs/chunks/p-pagination-info.js +2 -2
- package/dist/cjs/chunks/p-pagination.js +13 -11
- package/dist/cjs/chunks/p-tabs-pills.js +8 -8
- package/dist/cjs/index.js +101 -48
- package/dist/cjs/p-drawer.js +4 -4
- package/dist/cjs/p-input-search.js +5 -4
- package/dist/cjs/p-modal.js +3 -3
- package/dist/es/chunks/p-action-bar.js +18 -15
- package/dist/es/chunks/p-date-picker.js +3 -1
- package/dist/es/chunks/p-dropdown-select.js +27 -26
- package/dist/es/chunks/p-inline-date-picker.js +3 -1
- package/dist/es/chunks/p-pagination-info.js +2 -2
- package/dist/es/chunks/p-pagination.js +13 -11
- package/dist/es/chunks/p-tabs-pills.js +8 -8
- package/dist/es/index.js +102 -49
- package/dist/es/p-drawer.js +4 -4
- package/dist/es/p-input-search.js +5 -4
- package/dist/es/p-modal.js +3 -3
- package/dist/squirrel/index.d.ts +1 -0
- package/dist/squirrel/plugin/index.d.ts +11 -0
- package/dist/squirrel.css +40 -40
- package/package.json +28 -25
- package/squirrel/components/p-action-bar/p-action-bar.vue +4 -1
- package/squirrel/components/p-btn/p-btn.spec.js +0 -1
- package/squirrel/components/p-checkbox/p-checkbox.stories.js +2 -2
- package/squirrel/components/p-date-picker/p-date-picker.vue +3 -2
- package/squirrel/components/p-drawer/p-drawer.spec.js +364 -0
- package/squirrel/components/p-drawer/p-drawer.vue +8 -2
- package/squirrel/components/p-dropdown/p-dropdown.spec.js +252 -55
- package/squirrel/components/p-dropdown-select/p-dropdown-select.vue +16 -12
- package/squirrel/components/p-file-upload/p-file-upload.spec.js +0 -1
- package/squirrel/components/p-file-upload/p-file-upload.vue +26 -9
- package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +3 -1
- package/squirrel/components/p-input-search/p-input-search.vue +2 -2
- package/squirrel/components/p-modal/p-modal.vue +1 -1
- package/squirrel/components/p-pagination/p-pagination.vue +3 -3
- package/squirrel/components/p-pagination-info/p-pagination-info.vue +2 -2
- package/squirrel/components/p-progress-bar/{p-progess-bar.spec.js → p-progress-bar.spec.js} +7 -5
- package/squirrel/components/p-select-btn/p-select-btn.spec.js +104 -0
- package/squirrel/components/p-select-list/p-select-list.vue +7 -5
- package/squirrel/components/p-select-pill/p-select-pill.spec.js +114 -0
- package/squirrel/components/p-table/usePTableColResize.spec.js +123 -11
- package/squirrel/components/p-table/usePTableHeaderWrap.spec.js +1 -1
- package/squirrel/components/p-table/usePTableRowVirtualizer.spec.js +207 -0
- package/squirrel/components/p-table-header-cell/p-table-header-cell.stories.js +3 -0
- package/squirrel/components/p-table-sort/p-table-sort.vue +4 -4
- package/squirrel/components/p-tabs-pills/p-tabs-pills.vue +1 -1
- package/squirrel/index.spec.js +5 -0
- package/squirrel/index.ts +1 -0
- package/squirrel/locales/en-US.json +47 -0
- package/squirrel/locales/fr-CA.json +47 -0
- package/squirrel/plugin/index.spec.ts +140 -0
- package/squirrel/plugin/index.ts +54 -0
- package/squirrel/utils/listKeyboardNavigation.spec.js +58 -0
package/dist/cjs/index.js
CHANGED
|
@@ -17,6 +17,7 @@ const pFileUpload = require("./p-file-upload.js");
|
|
|
17
17
|
const pIcon_vue_vue_type_script_setup_true_lang = require("./chunks/p-icon.js");
|
|
18
18
|
const useInputClasses = require("./useInputClasses.js");
|
|
19
19
|
const lodashEs = require("lodash-es");
|
|
20
|
+
const vueI18n = require("vue-i18n");
|
|
20
21
|
const vueToastification = require("vue-toastification");
|
|
21
22
|
const pIcon = require("./p-icon.js");
|
|
22
23
|
const pInfoIcon_vue_vue_type_script_setup_true_lang = require("./chunks/p-info-icon.js");
|
|
@@ -67,26 +68,27 @@ const pagination = require("./pagination.js");
|
|
|
67
68
|
const sanitization = require("./sanitization.js");
|
|
68
69
|
const index = require("./chunks/index.js");
|
|
69
70
|
const _hoisted_1$3 = ["data-has-error"];
|
|
70
|
-
const _hoisted_2$3 =
|
|
71
|
+
const _hoisted_2$3 = ["aria-label"];
|
|
72
|
+
const _hoisted_3$3 = {
|
|
71
73
|
key: 0,
|
|
72
74
|
class: "flex h-28 flex-col items-center justify-center"
|
|
73
75
|
};
|
|
74
|
-
const
|
|
76
|
+
const _hoisted_4$3 = {
|
|
75
77
|
key: 0,
|
|
76
78
|
class: "flex flex-col items-center"
|
|
77
79
|
};
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
80
|
+
const _hoisted_5$3 = { class: "mt-2 text-p-gray-50" };
|
|
81
|
+
const _hoisted_6$3 = { class: "text-p-blue-60" };
|
|
82
|
+
const _hoisted_7$2 = {
|
|
81
83
|
key: 1,
|
|
82
84
|
class: "flex flex-col items-center"
|
|
83
85
|
};
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
const
|
|
86
|
+
const _hoisted_8 = { class: "mt-2 text-p-purple-60" };
|
|
87
|
+
const _hoisted_9 = ["accept", "multiple", "disabled"];
|
|
88
|
+
const _hoisted_10 = { class: "max-h-48 overflow-y-auto overflow-x-hidden" };
|
|
89
|
+
const _hoisted_11 = ["title"];
|
|
90
|
+
const _hoisted_12 = ["onClick"];
|
|
91
|
+
const _hoisted_13 = { class: "mt-1 text-xs text-p-gray-40" };
|
|
90
92
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
91
93
|
...{
|
|
92
94
|
name: "PFileUpload"
|
|
@@ -174,8 +176,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
174
176
|
const fileInputRef = vue.shallowRef();
|
|
175
177
|
const isDraggingOver = vue.ref(false);
|
|
176
178
|
const toast = vueToastification.useToast();
|
|
179
|
+
const { t } = vueI18n.useI18n({ useScope: "global" });
|
|
177
180
|
const { labelClasses, errorMsgClasses } = useInputClasses.useInputClasses(props);
|
|
178
|
-
const fileWord = vue.computed(() => props.multiple ?
|
|
181
|
+
const fileWord = vue.computed(() => t("squirrel.file_upload_files", props.multiple ? 2 : 1));
|
|
179
182
|
const files = vue.computed({
|
|
180
183
|
get() {
|
|
181
184
|
return Array.isArray(props.modelValue) ? props.modelValue : [props.modelValue];
|
|
@@ -201,7 +204,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
201
204
|
const fileName = file.name || file.url;
|
|
202
205
|
if (res.length + files.value.length >= props.maxNumberOfFiles) {
|
|
203
206
|
if (!(props.multiple && props.maxNumberOfFiles === 1)) {
|
|
204
|
-
toast.error(
|
|
207
|
+
toast.error(
|
|
208
|
+
t("squirrel.file_upload_max_files_exceeded", { count: props.maxNumberOfFiles, fileWord: fileWord.value })
|
|
209
|
+
);
|
|
205
210
|
}
|
|
206
211
|
break;
|
|
207
212
|
}
|
|
@@ -217,12 +222,14 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
217
222
|
const extension = pFileUpload.getFileExtension(fileName) ? `.${pFileUpload.getFileExtension(fileName)}` : "";
|
|
218
223
|
const isValidExtension = extension ? props.fileTypes.includes(extension) : false;
|
|
219
224
|
if (!isValidExtension) {
|
|
220
|
-
toast.error(
|
|
225
|
+
toast.error(t("squirrel.file_upload_files_not_allowed", { extension }));
|
|
221
226
|
continue;
|
|
222
227
|
}
|
|
223
228
|
}
|
|
224
229
|
if ((file.size || 0) > props.maxSizeInBytes) {
|
|
225
|
-
toast.error(
|
|
230
|
+
toast.error(
|
|
231
|
+
t("squirrel.file_upload_file_size_exceeded", { fileName, maxSize: pFileUpload.formatBytes(props.maxSizeInBytes) })
|
|
232
|
+
);
|
|
226
233
|
continue;
|
|
227
234
|
}
|
|
228
235
|
res.push(file);
|
|
@@ -266,6 +273,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
266
273
|
}
|
|
267
274
|
});
|
|
268
275
|
return (_ctx, _cache) => {
|
|
276
|
+
const _component_I18nT = vue.resolveComponent("I18nT");
|
|
269
277
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
270
278
|
class: vue.normalizeClass([{ hidden: _ctx.$attrs.hidden }]),
|
|
271
279
|
"data-has-error": !!__props.errorMsg
|
|
@@ -282,30 +290,37 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
282
290
|
__props.errorMsg ? "border-on-error" : "border-p-gray-40 hover:border-primary",
|
|
283
291
|
{ "pointer-events-none opacity-50": __props.disabled }
|
|
284
292
|
]]),
|
|
285
|
-
"aria-label": "
|
|
293
|
+
"aria-label": _ctx.$t("squirrel.file_upload_dropzone"),
|
|
286
294
|
onDragover: _cache[1] || (_cache[1] = vue.withModifiers(($event) => isDraggingOver.value = true, ["prevent", "stop"])),
|
|
287
295
|
onDragleave: _cache[2] || (_cache[2] = vue.withModifiers(($event) => isDraggingOver.value = false, ["prevent", "stop"])),
|
|
288
296
|
onDrop: vue.withModifiers(onDrop, ["prevent", "stop"]),
|
|
289
297
|
onClick: openFileDialog
|
|
290
298
|
}, [
|
|
291
|
-
!maxFilesReached.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
292
|
-
!isDraggingOver.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
299
|
+
!maxFilesReached.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [
|
|
300
|
+
!isDraggingOver.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [
|
|
293
301
|
vue.createVNode(pIcon_vue_vue_type_script_setup_true_lang._sfc_main, {
|
|
294
302
|
icon: "upload",
|
|
295
303
|
width: "32",
|
|
296
304
|
class: "text-p-gray-50"
|
|
297
305
|
}),
|
|
298
|
-
vue.createElementVNode("div",
|
|
299
|
-
|
|
300
|
-
|
|
306
|
+
vue.createElementVNode("div", _hoisted_5$3, [
|
|
307
|
+
vue.createVNode(_component_I18nT, {
|
|
308
|
+
keypath: "squirrel.file_upload_drag_or_select",
|
|
309
|
+
scope: "global"
|
|
310
|
+
}, {
|
|
311
|
+
select: vue.withCtx(() => [
|
|
312
|
+
vue.createElementVNode("span", _hoisted_6$3, vue.toDisplayString(_ctx.$t("squirrel.file_upload_select", { fileWord: fileWord.value })), 1)
|
|
313
|
+
]),
|
|
314
|
+
_: 1
|
|
315
|
+
})
|
|
301
316
|
])
|
|
302
|
-
])) : (vue.openBlock(), vue.createElementBlock("div",
|
|
317
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$2, [
|
|
303
318
|
vue.createVNode(pIcon_vue_vue_type_script_setup_true_lang._sfc_main, {
|
|
304
319
|
icon: "tdesign:drag-drop",
|
|
305
320
|
width: "32",
|
|
306
321
|
class: "text-primary"
|
|
307
322
|
}),
|
|
308
|
-
vue.createElementVNode("div",
|
|
323
|
+
vue.createElementVNode("div", _hoisted_8, vue.toDisplayString(_ctx.$t("squirrel.file_upload_drop", { fileWord: fileWord.value })), 1)
|
|
309
324
|
])),
|
|
310
325
|
vue.createElementVNode("input", {
|
|
311
326
|
ref_key: "fileInputRef",
|
|
@@ -318,9 +333,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
318
333
|
disabled: __props.disabled,
|
|
319
334
|
"aria-hidden": "true",
|
|
320
335
|
onChange: changeFieldValue
|
|
321
|
-
}, null, 40,
|
|
336
|
+
}, null, 40, _hoisted_9)
|
|
322
337
|
])) : vue.createCommentVNode("", true),
|
|
323
|
-
vue.createElementVNode("div",
|
|
338
|
+
vue.createElementVNode("div", _hoisted_10, [
|
|
324
339
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(files.value, (file, index2) => {
|
|
325
340
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
326
341
|
key: index2,
|
|
@@ -335,7 +350,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
335
350
|
vue.createElementVNode("div", {
|
|
336
351
|
class: "truncate",
|
|
337
352
|
title: file.name
|
|
338
|
-
}, vue.toDisplayString(file.name), 9,
|
|
353
|
+
}, vue.toDisplayString(file.name), 9, _hoisted_11),
|
|
339
354
|
vue.createElementVNode("button", {
|
|
340
355
|
class: "h-5 shrink-0 cursor-pointer overflow-hidden",
|
|
341
356
|
onClick: vue.withModifiers(($event) => removeFile(index2), ["stop"])
|
|
@@ -345,17 +360,20 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
345
360
|
width: "20",
|
|
346
361
|
class: "text-p-gray-60 hover:text-on-error"
|
|
347
362
|
})
|
|
348
|
-
], 8,
|
|
363
|
+
], 8, _hoisted_12)
|
|
349
364
|
], 2);
|
|
350
365
|
}), 128))
|
|
351
366
|
])
|
|
352
|
-
],
|
|
367
|
+
], 42, _hoisted_2$3),
|
|
353
368
|
vue.withDirectives(vue.createElementVNode("div", {
|
|
354
369
|
class: vue.normalizeClass(vue.unref(errorMsgClasses))
|
|
355
370
|
}, vue.toDisplayString(__props.errorMsg), 3), [
|
|
356
371
|
[vue.vShow, __props.errorMsg]
|
|
357
372
|
]),
|
|
358
|
-
vue.createElementVNode("div",
|
|
373
|
+
vue.createElementVNode("div", _hoisted_13, vue.toDisplayString(__props.multiple ? _ctx.$t("squirrel.file_upload_max", __props.maxNumberOfFiles) : _ctx.$t("squirrel.file_upload_one")) + " " + vue.toDisplayString(acceptFileTypes.value) + " " + vue.toDisplayString(_ctx.$t("squirrel.file_upload_files", __props.multiple ? 2 : 1)) + " " + vue.toDisplayString(_ctx.$t("squirrel.file_upload_with_size_less_than", {
|
|
374
|
+
count: __props.multiple ? 2 : 1,
|
|
375
|
+
maxSize: vue.unref(pFileUpload.formatBytes)(__props.maxSizeInBytes)
|
|
376
|
+
})), 1)
|
|
359
377
|
], 10, _hoisted_1$3);
|
|
360
378
|
};
|
|
361
379
|
}
|
|
@@ -370,7 +388,7 @@ const _hoisted_6$2 = {
|
|
|
370
388
|
class: "ml-auto fill-p-purple-60 pl-2",
|
|
371
389
|
src: pDropdownSelect_vue_vue_type_script_setup_true_lang._imports_0
|
|
372
390
|
};
|
|
373
|
-
const _hoisted_7 = {
|
|
391
|
+
const _hoisted_7$1 = {
|
|
374
392
|
key: 1,
|
|
375
393
|
class: "ml-auto h-4 w-[26px] pl-2"
|
|
376
394
|
};
|
|
@@ -581,7 +599,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
581
599
|
ref: actionsContainer,
|
|
582
600
|
class: "flex flex-row justify-between text-xs font-semibold text-primary"
|
|
583
601
|
}, [
|
|
584
|
-
vue.createElementVNode("p", _hoisted_2$2, vue.toDisplayString(vue.unref(computedItems).length)
|
|
602
|
+
vue.createElementVNode("p", _hoisted_2$2, vue.toDisplayString(_ctx.$t("squirrel.select_list_items", vue.unref(computedItems).length)), 1),
|
|
585
603
|
vue.createElementVNode("div", _hoisted_3$2, [
|
|
586
604
|
vue.unref(computedItems).length === vue.unref(internalItems).length ? (vue.openBlock(), vue.createElementBlock("a", {
|
|
587
605
|
key: 0,
|
|
@@ -590,18 +608,18 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
590
608
|
]),
|
|
591
609
|
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
592
610
|
(...args) => vue.unref(selectAll) && vue.unref(selectAll)(...args))
|
|
593
|
-
}, "
|
|
611
|
+
}, vue.toDisplayString(_ctx.$t("squirrel.select_list_select_all")), 3)) : (vue.openBlock(), vue.createElementBlock("a", {
|
|
594
612
|
key: 1,
|
|
595
613
|
class: vue.normalizeClass([vue.unref(computedInsideSelected) ? "pointer-events-none opacity-50" : "cursor-pointer"]),
|
|
596
614
|
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
597
615
|
(...args) => vue.unref(selectAll) && vue.unref(selectAll)(...args))
|
|
598
|
-
}, "
|
|
616
|
+
}, vue.toDisplayString(_ctx.$t("squirrel.select_list_select_all_filtered")), 3)),
|
|
599
617
|
_cache[6] || (_cache[6] = vue.createElementVNode("span", { class: "px-1 leading-none" }, ".", -1)),
|
|
600
618
|
vue.createElementVNode("a", {
|
|
601
619
|
class: vue.normalizeClass([vue.unref(selectedItems).length ? "cursor-pointer" : "pointer-events-none opacity-50"]),
|
|
602
620
|
onClick: _cache[2] || (_cache[2] = //@ts-ignore
|
|
603
621
|
(...args) => vue.unref(clearAll) && vue.unref(clearAll)(...args))
|
|
604
|
-
}, "
|
|
622
|
+
}, vue.toDisplayString(_ctx.$t("squirrel.select_list_clear_all")), 3)
|
|
605
623
|
])
|
|
606
624
|
], 512)) : vue.createCommentVNode("", true),
|
|
607
625
|
__props.searchable ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -674,7 +692,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
674
692
|
}), 128))
|
|
675
693
|
], 8, _hoisted_5$2)
|
|
676
694
|
]),
|
|
677
|
-
vue.unref(isSelected)(vue.unref(getValue)(row.index)) ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_6$2)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7))
|
|
695
|
+
vue.unref(isSelected)(vue.unref(getValue)(row.index)) ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_6$2)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$1))
|
|
678
696
|
], 2)
|
|
679
697
|
], 14, _hoisted_4$2)), [
|
|
680
698
|
[_directive_close_popper, __props.closePopperOnSelect && !__props.multiple]
|
|
@@ -685,7 +703,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
685
703
|
!vue.unref(computedItems).length ? vue.renderSlot(_ctx.$slots, "no-items", { key: 0 }, () => [
|
|
686
704
|
vue.createElementVNode("div", {
|
|
687
705
|
class: vue.normalizeClass(["flex items-center justify-center", vue.unref(pSelectList.SIZES)[__props.size]])
|
|
688
|
-
}, "
|
|
706
|
+
}, vue.toDisplayString(_ctx.$t("squirrel.select_list_no_items_found")), 3)
|
|
689
707
|
]) : vue.createCommentVNode("", true)
|
|
690
708
|
], 6)
|
|
691
709
|
], 2),
|
|
@@ -958,20 +976,21 @@ const _imports_1 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewB
|
|
|
958
976
|
const _imports_2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_75842)'%3e%3cpath%20d='M11.8%2011.8933C11.75%2011.7716%2011.665%2011.6674%2011.5559%2011.5938C11.4467%2011.5203%2011.3183%2011.4807%2011.1866%2011.48H9.18664C9.16473%2011.4828%209.14248%2011.4812%209.12119%2011.4753C9.0999%2011.4694%209.07999%2011.4594%209.06262%2011.4457C9.04525%2011.4321%209.03077%2011.4151%209.02001%2011.3958C9.00926%2011.3765%209.00245%2011.3553%208.99997%2011.3333V1C8.99997%200.734784%208.89462%200.48043%208.70708%200.292893C8.51954%200.105357%208.26519%200%207.99997%200C7.73476%200%207.4804%200.105357%207.29287%200.292893C7.10533%200.48043%206.99997%200.734784%206.99997%201V11.3333C6.99997%2011.3775%206.98241%2011.4199%206.95116%2011.4512C6.9199%2011.4824%206.87751%2011.5%206.83331%2011.5H4.83331C4.70146%2011.5006%204.57273%2011.5402%204.46341%2011.6139C4.35409%2011.6876%204.26908%2011.7921%204.21913%2011.9141C4.16918%2012.0361%204.15653%2012.1702%204.18279%2012.2994C4.20904%2012.4286%204.27302%2012.5472%204.36664%2012.64L7.54664%2015.8267C7.60861%2015.8892%207.68235%2015.9387%207.76359%2015.9726C7.84483%2016.0064%207.93196%2016.0239%208.01997%2016.0239C8.10798%2016.0239%208.19512%2016.0064%208.27636%2015.9726C8.3576%2015.9387%208.43133%2015.8892%208.49331%2015.8267L11.6733%2012.64C11.7677%2012.5431%2011.8303%2012.4198%2011.853%2012.2864C11.8756%2012.153%2011.8571%2012.0159%2011.8%2011.8933Z'%20fill='%23424E6E'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_75842'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
959
977
|
const _imports_3 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_80100)'%3e%3cpath%20d='M11.8%2011.8933C11.75%2011.7716%2011.665%2011.6674%2011.5559%2011.5938C11.4467%2011.5203%2011.3183%2011.4807%2011.1866%2011.48H9.18664C9.16473%2011.4828%209.14248%2011.4812%209.12119%2011.4753C9.0999%2011.4694%209.07999%2011.4594%209.06262%2011.4457C9.04525%2011.4321%209.03077%2011.4151%209.02001%2011.3958C9.00926%2011.3765%209.00245%2011.3553%208.99997%2011.3333V1C8.99997%200.734784%208.89462%200.48043%208.70708%200.292893C8.51954%200.105357%208.26519%200%207.99997%200C7.73476%200%207.4804%200.105357%207.29287%200.292893C7.10533%200.48043%206.99997%200.734784%206.99997%201V11.3333C6.99997%2011.3775%206.98241%2011.4199%206.95116%2011.4512C6.9199%2011.4824%206.87751%2011.5%206.83331%2011.5H4.83331C4.70146%2011.5006%204.57273%2011.5402%204.46341%2011.6139C4.35409%2011.6876%204.26908%2011.7921%204.21913%2011.9141C4.16918%2012.0361%204.15653%2012.1702%204.18279%2012.2994C4.20904%2012.4286%204.27302%2012.5472%204.36664%2012.64L7.54664%2015.8267C7.60861%2015.8892%207.68235%2015.9387%207.76359%2015.9726C7.84483%2016.0064%207.93196%2016.0239%208.01997%2016.0239C8.10798%2016.0239%208.19512%2016.0064%208.27636%2015.9726C8.3576%2015.9387%208.43133%2015.8892%208.49331%2015.8267L11.6733%2012.64C11.7677%2012.5431%2011.8303%2012.4198%2011.853%2012.2864C11.8756%2012.153%2011.8571%2012.0159%2011.8%2011.8933Z'%20fill='%23323CEB'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_80100'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
960
978
|
const _hoisted_1 = { class: "flex items-center justify-between" };
|
|
961
|
-
const _hoisted_2 = { class: "
|
|
962
|
-
const _hoisted_3 = {
|
|
979
|
+
const _hoisted_2 = { class: "px-4 text-xs font-semibold text-p-gray-40" };
|
|
980
|
+
const _hoisted_3 = { class: "mt-2" };
|
|
981
|
+
const _hoisted_4 = {
|
|
963
982
|
key: 0,
|
|
964
983
|
src: _imports_0
|
|
965
984
|
};
|
|
966
|
-
const
|
|
985
|
+
const _hoisted_5 = {
|
|
967
986
|
key: 1,
|
|
968
987
|
src: _imports_1
|
|
969
988
|
};
|
|
970
|
-
const
|
|
989
|
+
const _hoisted_6 = {
|
|
971
990
|
key: 0,
|
|
972
991
|
src: _imports_2
|
|
973
992
|
};
|
|
974
|
-
const
|
|
993
|
+
const _hoisted_7 = {
|
|
975
994
|
key: 1,
|
|
976
995
|
src: _imports_3
|
|
977
996
|
};
|
|
@@ -999,25 +1018,25 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
999
1018
|
return (_ctx, _cache) => {
|
|
1000
1019
|
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
1001
1020
|
vue.createElementVNode("div", _hoisted_1, [
|
|
1002
|
-
|
|
1021
|
+
vue.createElementVNode("div", _hoisted_2, vue.toDisplayString(_ctx.$t("squirrel.table_sort_sort")), 1),
|
|
1003
1022
|
vue.createElementVNode("div", {
|
|
1004
1023
|
class: vue.normalizeClass([
|
|
1005
1024
|
"px-4 text-xs font-semibold text-primary",
|
|
1006
1025
|
[vue.unref(pTableSort.SORTING_TYPES).ASC, vue.unref(pTableSort.SORTING_TYPES).DESC].includes(__props.modelValue) ? "cursor-pointer opacity-100" : "opacity-50"
|
|
1007
1026
|
]),
|
|
1008
1027
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", vue.unref(pTableSort.SORTING_TYPES).NO_SORTING))
|
|
1009
|
-
}, "
|
|
1028
|
+
}, vue.toDisplayString(_ctx.$t("squirrel.table_sort_clear")), 3)
|
|
1010
1029
|
]),
|
|
1011
|
-
vue.createElementVNode("div",
|
|
1030
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
1012
1031
|
vue.createElementVNode("div", {
|
|
1013
1032
|
class: "flex cursor-pointer items-center justify-between px-4 py-1 hover:bg-p-blue-10",
|
|
1014
1033
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:modelValue", vue.unref(pTableSort.SORTING_TYPES).ASC))
|
|
1015
1034
|
}, [
|
|
1016
1035
|
vue.createElementVNode("div", {
|
|
1017
1036
|
class: vue.normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).ASC }])
|
|
1018
|
-
}, "
|
|
1037
|
+
}, vue.toDisplayString(_ctx.$t("squirrel.table_sort_sort_ascending")), 3),
|
|
1019
1038
|
vue.createElementVNode("div", null, [
|
|
1020
|
-
__props.modelValue === vue.unref(pTableSort.SORTING_TYPES).NO_SORTING || __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).DESC ? (vue.openBlock(), vue.createElementBlock("img",
|
|
1039
|
+
__props.modelValue === vue.unref(pTableSort.SORTING_TYPES).NO_SORTING || __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).DESC ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_4)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_5))
|
|
1021
1040
|
])
|
|
1022
1041
|
]),
|
|
1023
1042
|
vue.createElementVNode("div", {
|
|
@@ -1026,9 +1045,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1026
1045
|
}, [
|
|
1027
1046
|
vue.createElementVNode("div", {
|
|
1028
1047
|
class: vue.normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).DESC }])
|
|
1029
|
-
}, "
|
|
1048
|
+
}, vue.toDisplayString(_ctx.$t("squirrel.table_sort_sort_descending")), 3),
|
|
1030
1049
|
vue.createElementVNode("div", null, [
|
|
1031
|
-
__props.modelValue === vue.unref(pTableSort.SORTING_TYPES).NO_SORTING || __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).ASC ? (vue.openBlock(), vue.createElementBlock("img",
|
|
1050
|
+
__props.modelValue === vue.unref(pTableSort.SORTING_TYPES).NO_SORTING || __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).ASC ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_6)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_7))
|
|
1032
1051
|
])
|
|
1033
1052
|
])
|
|
1034
1053
|
])
|
|
@@ -1036,6 +1055,39 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
1036
1055
|
};
|
|
1037
1056
|
}
|
|
1038
1057
|
});
|
|
1058
|
+
const squirrel$1 = { "close": "Close", "action_bar_clear_all": "Clear All", "select_list_items": "{count} item | {count} items", "select_list_select_all": "Select all", "select_list_select_all_filtered": "Select all filtered", "select_list_clear_all": "Clear all", "select_list_no_items_found": "No items found", "dropdown_select_aria_label": "Dropdown select", "dropdown_select_remove_item": "Remove item", "dropdown_select_clear_selection": "Clear selection", "dropdown_select_all_options_selected": "All options selected", "dropdown_select_options": "option | options", "dropdown_select_selected": "selected", "dropdown_select_items": "@:squirrel.select_list_items", "dropdown_select_select_all": "@:squirrel.select_list_select_all", "dropdown_select_select_all_filtered": "@:squirrel.select_list_select_all_filtered", "dropdown_select_clear_all": "@:squirrel.select_list_clear_all", "dropdown_select_add": "Add", "dropdown_select_no_items_found_type_to_add": "No items found. Type to add", "dropdown_select_no_items_found": "@:squirrel.select_list_no_items_found", "file_upload_dropzone": "dropzone", "file_upload_drag_or_select": "Drag or {select}", "file_upload_drop": "Drop {fileWord}", "file_upload_max": "Max {count}", "file_upload_one": "One", "file_upload_files": "file | files", "file_upload_select": "select {fileWord}", "file_upload_with_size_less_than": "with size less than {maxSize} | with size less than {maxSize} each", "file_upload_max_files_exceeded": "You can only upload a maximum of {count} {fileWord}.", "file_upload_files_not_allowed": "{extension} files are not allowed.", "file_upload_file_size_exceeded": "File size of {fileName} exceeds {maxSize}.", "input_search_press_enter_to_search": "Press enter to search", "input_search_clear_search_input": "Clear search input", "pagination_go_to_previous_page": "go to the previous page", "pagination_go_to_page": "go to page {page}", "pagination_go_to_next_page": "go to the next page", "pagination_info_showing_results": "Showing {from} to {to} of {count} results", "pagination_info_no_results_found": "No results found", "table_sort_sort": "SORT", "table_sort_clear": "Clear", "table_sort_sort_ascending": "Sort ascending", "table_sort_sort_descending": "Sort descending", "tabs_pills_aria_label": "Tabs Pills" };
|
|
1059
|
+
const enUS = {
|
|
1060
|
+
squirrel: squirrel$1
|
|
1061
|
+
};
|
|
1062
|
+
const squirrel = { "close": "Fermer", "action_bar_clear_all": "Effacer tout", "select_list_items": "{count} élément | {count} éléments", "select_list_select_all": "Tout sélectionner", "select_list_select_all_filtered": "Sélectionner tout (filtré)", "select_list_clear_all": "Effacer tout", "select_list_no_items_found": "Aucun élément trouvé", "dropdown_select_aria_label": "Liste déroulante", "dropdown_select_remove_item": "Supprimer l'élément", "dropdown_select_clear_selection": "Effacer la sélection", "dropdown_select_all_options_selected": "Toutes les options sélectionnées", "dropdown_select_options": "option | options", "dropdown_select_selected": "sélectionné", "dropdown_select_items": "@:squirrel.select_list_items", "dropdown_select_select_all": "@:squirrel.select_list_select_all", "dropdown_select_select_all_filtered": "@:squirrel.select_list_select_all_filtered", "dropdown_select_clear_all": "@:squirrel.select_list_clear_all", "dropdown_select_add": "Ajouter", "dropdown_select_no_items_found_type_to_add": "Aucun élément trouvé. Tapez pour ajouter", "dropdown_select_no_items_found": "@:squirrel.select_list_no_items_found", "file_upload_dropzone": "zone de dépôt", "file_upload_drag_or_select": "Glisser ou {select}", "file_upload_drop": "Déposer {fileWord}", "file_upload_max": "Max {count}", "file_upload_one": "Un", "file_upload_files": "fichier | fichiers", "file_upload_select": "sélectionner {fileWord}", "file_upload_with_size_less_than": "avec une taille inférieure à {maxSize} | avec une taille inférieure à {maxSize} chacun", "file_upload_max_files_exceeded": "Vous ne pouvez télécharger qu'un maximum de {count} {fileWord}.", "file_upload_files_not_allowed": "Les fichiers {extension} ne sont pas autorisés.", "file_upload_file_size_exceeded": "La taille du fichier {fileName} dépasse {maxSize}.", "input_search_press_enter_to_search": "Appuyez sur Entrée pour rechercher", "input_search_clear_search_input": "Effacer la saisie de recherche", "pagination_go_to_previous_page": "aller à la page précédente", "pagination_go_to_page": "aller à la page {page}", "pagination_go_to_next_page": "aller à la page suivante", "pagination_info_showing_results": "Affichage de {from} à {to} sur {count} résultats", "pagination_info_no_results_found": "Aucun résultat trouvé", "table_sort_sort": "TRIER", "table_sort_clear": "Effacer", "table_sort_sort_ascending": "Trier par ordre croissant", "table_sort_sort_descending": "Trier par ordre décroissant", "tabs_pills_aria_label": "Onglets pilules" };
|
|
1063
|
+
const frCA = {
|
|
1064
|
+
squirrel
|
|
1065
|
+
};
|
|
1066
|
+
const squirrelMessages = {
|
|
1067
|
+
"en-US": enUS,
|
|
1068
|
+
"fr-CA": frCA
|
|
1069
|
+
};
|
|
1070
|
+
const isSquirrelLocale = (locale) => {
|
|
1071
|
+
return locale in squirrelMessages;
|
|
1072
|
+
};
|
|
1073
|
+
const SquirrelPlugin = {
|
|
1074
|
+
install(app, i18n) {
|
|
1075
|
+
const unwatch = vue.watchEffect(() => {
|
|
1076
|
+
const currentLocale = i18n.global.locale.value;
|
|
1077
|
+
if (isSquirrelLocale(currentLocale)) {
|
|
1078
|
+
const existingMessages = i18n.global.getLocaleMessage(currentLocale);
|
|
1079
|
+
if (!("squirrel" in existingMessages)) {
|
|
1080
|
+
i18n.global.mergeLocaleMessage(currentLocale, squirrelMessages[currentLocale]);
|
|
1081
|
+
}
|
|
1082
|
+
if (Object.keys(squirrelMessages).every((locale) => i18n.global.availableLocales.includes(locale))) {
|
|
1083
|
+
vue.nextTick(() => {
|
|
1084
|
+
unwatch();
|
|
1085
|
+
});
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
};
|
|
1039
1091
|
exports.PActionBar = pActionBar_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
1040
1092
|
exports.PAlert = pAlert_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
1041
1093
|
exports.PAvatar = pAvatar_vue_vue_type_script_setup_true_lang._sfc_main;
|
|
@@ -1109,3 +1161,4 @@ exports.PFileUpload = _sfc_main$3;
|
|
|
1109
1161
|
exports.PSelectList = _sfc_main$2;
|
|
1110
1162
|
exports.PTable = pTable;
|
|
1111
1163
|
exports.PTableSort = _sfc_main;
|
|
1164
|
+
exports.SquirrelPlugin = SquirrelPlugin;
|
package/dist/cjs/p-drawer.js
CHANGED
|
@@ -113,7 +113,7 @@ const __default__ = vue.defineComponent({
|
|
|
113
113
|
*/
|
|
114
114
|
closeLabel: {
|
|
115
115
|
type: String,
|
|
116
|
-
default: "
|
|
116
|
+
default: ""
|
|
117
117
|
},
|
|
118
118
|
/**
|
|
119
119
|
* Whether to show the backdrop behind the drawer.
|
|
@@ -237,7 +237,7 @@ const __default__ = vue.defineComponent({
|
|
|
237
237
|
});
|
|
238
238
|
const __injectCSSVars__ = () => {
|
|
239
239
|
vue.useCssVars((_ctx) => ({
|
|
240
|
-
"
|
|
240
|
+
"v485968ad": _ctx.width
|
|
241
241
|
}));
|
|
242
242
|
};
|
|
243
243
|
const __setup__ = __default__.setup;
|
|
@@ -309,7 +309,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
309
309
|
}, [
|
|
310
310
|
_ctx.enableClose ? (vue.openBlock(), vue.createBlock(_component_PCloseBtn, {
|
|
311
311
|
key: 0,
|
|
312
|
-
"aria-label": _ctx.closeLabel,
|
|
312
|
+
"aria-label": _ctx.closeLabel || _ctx.$t("squirrel.close"),
|
|
313
313
|
class: "flex-0",
|
|
314
314
|
disabled: _ctx.disabled,
|
|
315
315
|
onClick: _ctx.close
|
|
@@ -354,5 +354,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
354
354
|
}, 8, ["enter-active-class", "leave-active-class", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])
|
|
355
355
|
], 8, ["to"])) : vue.createCommentVNode("", true);
|
|
356
356
|
}
|
|
357
|
-
const pDrawer = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(__default__, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
357
|
+
const pDrawer = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(__default__, [["render", _sfc_render], ["__scopeId", "data-v-e3739b6f"]]);
|
|
358
358
|
module.exports = pDrawer;
|
|
@@ -4,6 +4,7 @@ const pBtn_types = require("./chunks/p-btn.types.js");
|
|
|
4
4
|
const pIcon_vue_vue_type_script_setup_true_lang = require("./chunks/p-icon.js");
|
|
5
5
|
const pInput_vue_vue_type_script_setup_true_lang = require("./chunks/p-input.js");
|
|
6
6
|
const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
|
|
7
|
+
const _hoisted_1 = ["aria-label"];
|
|
7
8
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
8
9
|
...{
|
|
9
10
|
name: "PInputSearch",
|
|
@@ -104,7 +105,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
104
105
|
}, null, 2)), [
|
|
105
106
|
[
|
|
106
107
|
_directive_tooltip,
|
|
107
|
-
{ content: "
|
|
108
|
+
{ content: _ctx.$t("squirrel.input_search_press_enter_to_search"), delay: { show: 100, hide: 0 } },
|
|
108
109
|
void 0,
|
|
109
110
|
{ bottom: true }
|
|
110
111
|
]
|
|
@@ -112,7 +113,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
112
113
|
query.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
113
114
|
key: 1,
|
|
114
115
|
role: "button",
|
|
115
|
-
"aria-label": "
|
|
116
|
+
"aria-label": _ctx.$t("squirrel.input_search_clear_search_input"),
|
|
116
117
|
class: vue.normalizeClass(["absolute cursor-pointer", clearIconClasses[__props.size]]),
|
|
117
118
|
onClick: clearSearch
|
|
118
119
|
}, [
|
|
@@ -120,12 +121,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
120
121
|
icon: "cancel-circle",
|
|
121
122
|
class: "text-p-gray-40 hover:text-p-gray-50"
|
|
122
123
|
})
|
|
123
|
-
],
|
|
124
|
+
], 10, _hoisted_1)) : vue.createCommentVNode("", true)
|
|
124
125
|
]),
|
|
125
126
|
_: 1
|
|
126
127
|
}, 16, ["modelValue", "size"]);
|
|
127
128
|
};
|
|
128
129
|
}
|
|
129
130
|
});
|
|
130
|
-
const PInputSearch = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
131
|
+
const PInputSearch = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-ed3f0628"]]);
|
|
131
132
|
module.exports = PInputSearch;
|
package/dist/cjs/p-modal.js
CHANGED
|
@@ -190,7 +190,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
190
190
|
emits: ["before-open", "opening", "opened", "before-close", "closing", "closed", "update:modelValue", "click:overlay"],
|
|
191
191
|
setup(__props, { emit: __emit }) {
|
|
192
192
|
vue.useCssVars((_ctx) => ({
|
|
193
|
-
"
|
|
193
|
+
"v19879df9": __props.maxWidth
|
|
194
194
|
}));
|
|
195
195
|
let animatingZIndex = 0;
|
|
196
196
|
const emit = __emit;
|
|
@@ -405,7 +405,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
405
405
|
vue.createVNode(pCloseBtn, {
|
|
406
406
|
disabled: __props.disabled,
|
|
407
407
|
class: vue.normalizeClass({ invisible: !__props.enableClose }),
|
|
408
|
-
"aria-label": __props.closeLabel,
|
|
408
|
+
"aria-label": __props.closeLabel || _ctx.$t("squirrel.close"),
|
|
409
409
|
onClick: vue.withModifiers(close, ["prevent"])
|
|
410
410
|
}, null, 8, ["disabled", "class", "aria-label"])
|
|
411
411
|
])
|
|
@@ -447,5 +447,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
449
|
});
|
|
450
|
-
const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
450
|
+
const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-f666f5ac"]]);
|
|
451
451
|
module.exports = pModal;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { defineComponent, createBlock, openBlock, Teleport, createElementBlock, createCommentVNode, mergeProps, createElementVNode, createVNode, toDisplayString, Fragment, renderList, withCtx,
|
|
1
|
+
import { defineComponent, createBlock, openBlock, Teleport, createElementBlock, createCommentVNode, mergeProps, createElementVNode, createVNode, toDisplayString, unref, Fragment, renderList, withCtx, resolveDynamicComponent } from "vue";
|
|
2
2
|
import { _ as _sfc_main$1 } from "./p-btn.js";
|
|
3
3
|
import PCloseBtn from "../p-close-btn.js";
|
|
4
4
|
import PDropdown from "../p-dropdown.js";
|
|
5
5
|
import { _ as _sfc_main$2 } from "./p-icon.js";
|
|
6
6
|
import { isComponent } from "../component.js";
|
|
7
7
|
import { isString } from "../string.js";
|
|
8
|
+
import { useI18n } from "vue-i18n";
|
|
8
9
|
const _hoisted_1 = { class: "flex h-12 w-max select-none items-center rounded-lg bg-p-purple-60 px-2 text-sm font-medium text-white" };
|
|
9
|
-
const _hoisted_2 = { class: "
|
|
10
|
-
const _hoisted_3 = { class: "
|
|
11
|
-
const _hoisted_4 = { class: "flex
|
|
10
|
+
const _hoisted_2 = { class: "text-xs" };
|
|
11
|
+
const _hoisted_3 = { class: "mx-4 whitespace-nowrap" };
|
|
12
|
+
const _hoisted_4 = { class: "flex" };
|
|
12
13
|
const _hoisted_5 = { class: "flex items-center gap-2 px-1" };
|
|
13
|
-
const _hoisted_6 = { class: "
|
|
14
|
-
const _hoisted_7 = { class: "
|
|
14
|
+
const _hoisted_6 = { class: "flex items-center gap-2 px-1" };
|
|
15
|
+
const _hoisted_7 = { class: "bg-p-purple-60 py-2" };
|
|
16
|
+
const _hoisted_8 = { class: "flex items-center gap-2 px-1" };
|
|
15
17
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
18
|
...{
|
|
17
19
|
name: "PActionBar",
|
|
@@ -25,6 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
27
|
},
|
|
26
28
|
emits: ["click:dismiss", "click:action"],
|
|
27
29
|
setup(__props) {
|
|
30
|
+
const { t } = useI18n();
|
|
28
31
|
return (_ctx, _cache) => {
|
|
29
32
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
30
33
|
__props.show ? (openBlock(), createElementBlock("div", mergeProps({
|
|
@@ -41,12 +44,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
44
|
variant: "dark",
|
|
42
45
|
class: "-mr-1"
|
|
43
46
|
}),
|
|
44
|
-
|
|
47
|
+
createElementVNode("div", _hoisted_2, toDisplayString(unref(t)("squirrel.action_bar_clear_all")), 1)
|
|
45
48
|
]),
|
|
46
|
-
_cache[
|
|
47
|
-
createElementVNode("p",
|
|
48
|
-
_cache[
|
|
49
|
-
createElementVNode("div",
|
|
49
|
+
_cache[1] || (_cache[1] = createElementVNode("div", { class: "h-9 w-0.5 shrink-0 rounded bg-p-purple-50" }, null, -1)),
|
|
50
|
+
createElementVNode("p", _hoisted_3, toDisplayString(__props.label), 1),
|
|
51
|
+
_cache[2] || (_cache[2] = createElementVNode("div", { class: "mr-2 h-9 w-0.5 shrink-0 rounded bg-p-purple-50" }, null, -1)),
|
|
52
|
+
createElementVNode("div", _hoisted_4, [
|
|
50
53
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (actionOrMenu) => {
|
|
51
54
|
return openBlock(), createElementBlock(Fragment, {
|
|
52
55
|
key: `action-${actionOrMenu.label}`
|
|
@@ -58,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
61
|
onClick: ($event) => _ctx.$emit("click:action", actionOrMenu.name)
|
|
59
62
|
}, {
|
|
60
63
|
default: withCtx(() => [
|
|
61
|
-
createElementVNode("div",
|
|
64
|
+
createElementVNode("div", _hoisted_5, [
|
|
62
65
|
unref(isComponent)(actionOrMenu.icon) ? (openBlock(), createBlock(resolveDynamicComponent(actionOrMenu.icon), {
|
|
63
66
|
key: 0,
|
|
64
67
|
class: "h-4 w-4"
|
|
@@ -78,7 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
78
81
|
strategy: "fixed"
|
|
79
82
|
}, {
|
|
80
83
|
popper: withCtx(({ hide }) => [
|
|
81
|
-
createElementVNode("ul",
|
|
84
|
+
createElementVNode("ul", _hoisted_7, [
|
|
82
85
|
(openBlock(true), createElementBlock(Fragment, null, renderList(actionOrMenu.subActions, (subaction) => {
|
|
83
86
|
return openBlock(), createElementBlock("li", {
|
|
84
87
|
key: `subaction-${subaction.name}`
|
|
@@ -90,7 +93,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
90
93
|
onClick: ($event) => (_ctx.$emit("click:action", subaction.name), hide())
|
|
91
94
|
}, {
|
|
92
95
|
default: withCtx(() => [
|
|
93
|
-
createElementVNode("div",
|
|
96
|
+
createElementVNode("div", _hoisted_8, [
|
|
94
97
|
unref(isComponent)(subaction.icon) ? (openBlock(), createBlock(resolveDynamicComponent(subaction.icon), {
|
|
95
98
|
key: 0,
|
|
96
99
|
class: "h-4 w-4"
|
|
@@ -115,7 +118,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
118
|
type: "secondary-ghost-dark"
|
|
116
119
|
}, {
|
|
117
120
|
default: withCtx(() => [
|
|
118
|
-
createElementVNode("div",
|
|
121
|
+
createElementVNode("div", _hoisted_6, [
|
|
119
122
|
unref(isComponent)(actionOrMenu.icon) ? (openBlock(), createBlock(resolveDynamicComponent(actionOrMenu.icon), {
|
|
120
123
|
key: 0,
|
|
121
124
|
class: "h-4 w-4"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, mergeModels, useModel, useAttrs, computed, createBlock, openBlock, unref, mergeProps, withCtx, createVNode, withKeys } from "vue";
|
|
2
2
|
import { _ as _sfc_main$1 } from "./p-input.js";
|
|
3
3
|
import VueDatePicker from "@vuepic/vue-datepicker";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
...{
|
|
6
7
|
name: "PDatePicker",
|
|
@@ -120,10 +121,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
120
121
|
setup(__props) {
|
|
121
122
|
const props = __props;
|
|
122
123
|
const model = useModel(__props, "modelValue");
|
|
124
|
+
const { locale } = useI18n();
|
|
123
125
|
const attrs = useAttrs();
|
|
124
126
|
const datePickerProps = computed(() => {
|
|
125
127
|
const { modelValue: _, ...propsWithoutModelValue } = props;
|
|
126
|
-
return propsWithoutModelValue;
|
|
128
|
+
return { ...propsWithoutModelValue, locale: locale.value };
|
|
127
129
|
});
|
|
128
130
|
const inputPropsAndAttrs = computed(() => {
|
|
129
131
|
const { class: classes, style, ...res } = attrs;
|