@leaflink/stash 45.1.9 → 46.0.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.
@@ -1,84 +1,82 @@
1
- import { defineComponent as D, useCssModule as N, inject as M, computed as b, openBlock as a, createElementBlock as s, normalizeClass as g, unref as t, createElementVNode as B, renderSlot as I, toDisplayString as T, createCommentVNode as d, Fragment as $, createVNode as r, withCtx as _ } from "vue";
2
- import { t as z } from "./locale.js";
1
+ import { defineComponent as S, inject as V, computed as g, openBlock as o, createElementBlock as r, normalizeClass as N, unref as t, createElementVNode as D, renderSlot as B, toDisplayString as I, createCommentVNode as d, Fragment as T, createVNode as n, withCtx as b } from "vue";
2
+ import { t as $ } from "./locale.js";
3
3
  import h from "./Button.js";
4
4
  import "lodash-es/cloneDeep";
5
5
  import x from "./Icon.js";
6
6
  import "./Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js";
7
- import { D as y } from "./DataView.vue_used_vue_type_style_index_0_lang.module-d878ca9a.js";
8
- import { _ as j } from "./_plugin-vue_export-helper-dad06003.js";
7
+ import { D as _ } from "./DataView.vue_used_vue_type_style_index_0_lang.module-d878ca9a.js";
9
8
  import "lodash-es/get";
10
9
  import "./Button.vue_used_vue_type_style_index_0_lang.module-63d31dc0.js";
10
+ import "./_plugin-vue_export-helper-dad06003.js";
11
11
  import "lodash-es/uniqueId";
12
12
  import "./index-79ce320f.js";
13
13
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
14
- const A = {
14
+ const j = { class: "tw-flex tw-items-center tw-gap-x-2 lg:tw-gap-x-6" }, z = {
15
15
  key: 0,
16
16
  class: "tw-flex tw-items-center"
17
- }, W = {
17
+ }, A = {
18
18
  key: 0,
19
19
  class: "tw-mr-1.5 tw-text-xs"
20
- }, F = /* @__PURE__ */ D({
20
+ }, X = /* @__PURE__ */ S({
21
21
  __name: "DataViewToolbar",
22
22
  props: {
23
23
  hidePageStats: { type: Boolean, default: !1 },
24
24
  radius: { default: "rounded" }
25
25
  },
26
- setup(C) {
27
- const u = C, k = N(), {
28
- isWithinModule: n,
26
+ setup(y) {
27
+ const u = y, {
28
+ isWithinModule: s,
29
29
  variant: m,
30
- density: c,
31
- currentPage: o,
32
- isPaginationEnabled: V,
33
- pageCount: p,
30
+ density: p,
31
+ currentPage: a,
32
+ isPaginationEnabled: C,
33
+ pageCount: c,
34
34
  pageSize: w,
35
35
  totalDataCount: f,
36
- goPrevPage: E,
37
- goNextPage: P
38
- } = M(y.key, y.defaults), v = b(() => n.value ? "none" : m.value === "table" ? "rounded-top" : u.radius), S = b(() => {
39
- const l = w.value * (o.value - 1) + 1, e = Math.min(w.value * o.value, f.value), i = f.value;
40
- return z("ll.pageStats", { from: l, to: e, total: i });
36
+ goPrevPage: k,
37
+ goNextPage: E
38
+ } = V(_.key, _.defaults), v = g(() => s.value ? "none" : m.value === "table" ? "rounded-top" : u.radius), P = g(() => {
39
+ const i = w.value * (a.value - 1) + 1, e = Math.min(w.value * a.value, f.value), l = f.value;
40
+ return $("ll.pageStats", { from: i, to: e, total: l });
41
41
  });
42
- return (l, e) => (a(), s("div", {
43
- class: g(["stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5", {
44
- "tw-border-t tw-border-ice-200": t(n),
42
+ return (i, e) => (o(), r("div", {
43
+ class: N(["stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5", {
44
+ "tw-border-t tw-border-ice-200": t(s),
45
45
  "tw-rounded": v.value === "rounded",
46
46
  "tw-rounded-t": v.value === "rounded-top",
47
- "tw-mb-3": t(m) !== "table" && !t(n),
48
- "tw-px-0": t(c) === "compact",
49
- "lg:tw-px-3": t(c) === "comfortable"
47
+ "tw-mb-3": t(m) !== "table" && !t(s),
48
+ "tw-px-0": t(p) === "compact",
49
+ "lg:tw-px-3": t(p) === "comfortable"
50
50
  }]),
51
51
  "data-test": "stash-data-view-toolbar"
52
52
  }, [
53
- B("div", {
54
- class: g(["tw-flex tw-items-center", t(k)["default-slot"]])
55
- }, [
56
- I(l.$slots, "default")
57
- ], 2),
58
- t(V) ? (a(), s("div", A, [
59
- u.hidePageStats ? d("", !0) : (a(), s("span", W, T(S.value), 1)),
60
- t(p) > 1 ? (a(), s($, { key: 1 }, [
61
- r(h, {
53
+ D("div", j, [
54
+ B(i.$slots, "default")
55
+ ]),
56
+ t(C) ? (o(), r("div", z, [
57
+ u.hidePageStats ? d("", !0) : (o(), r("span", A, I(P.value), 1)),
58
+ t(c) > 1 ? (o(), r(T, { key: 1 }, [
59
+ n(h, {
62
60
  icon: "",
63
61
  class: "tw-h-9 tw-w-9 tw-p-1.5",
64
62
  "data-test": "button|prev-page",
65
- disabled: t(o) === 1,
66
- onClick: e[0] || (e[0] = (i) => t(E)({ shouldEmit: !0 }))
63
+ disabled: t(a) === 1,
64
+ onClick: e[0] || (e[0] = (l) => t(k)({ shouldEmit: !0 }))
67
65
  }, {
68
- default: _(() => [
69
- r(x, { name: "chevron-left" })
66
+ default: b(() => [
67
+ n(x, { name: "chevron-left" })
70
68
  ]),
71
69
  _: 1
72
70
  }, 8, ["disabled"]),
73
- r(h, {
71
+ n(h, {
74
72
  icon: "",
75
73
  class: "tw-h-9 tw-w-9 tw-p-1.5",
76
74
  "data-test": "button|next-page",
77
- disabled: t(o) === t(p),
78
- onClick: e[1] || (e[1] = (i) => t(P)({ shouldEmit: !0 }))
75
+ disabled: t(a) === t(c),
76
+ onClick: e[1] || (e[1] = (l) => t(E)({ shouldEmit: !0 }))
79
77
  }, {
80
- default: _(() => [
81
- r(x, { name: "chevron-right" })
78
+ default: b(() => [
79
+ n(x, { name: "chevron-right" })
82
80
  ]),
83
81
  _: 1
84
82
  }, 8, ["disabled"])
@@ -86,12 +84,8 @@ const A = {
86
84
  ])) : d("", !0)
87
85
  ], 2));
88
86
  }
89
- }), J = {
90
- "default-slot": "_default-slot_zx9nb_2"
91
- }, O = {
92
- $style: J
93
- }, ot = /* @__PURE__ */ j(F, [["__cssModules", O]]);
87
+ });
94
88
  export {
95
- ot as default
89
+ X as default
96
90
  };
97
91
  //# sourceMappingURL=DataViewToolbar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataViewToolbar.js","sources":["../src/components/DataViewToolbar/DataViewToolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, useCssModule } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Icon from '../Icon/Icon.vue';\n import { ToolbarRadiuses } from './DataViewToolbar.types';\n\n export interface DataViewToolbarProps {\n /**\n * Hides the page statistics (ex: \"1 - 12 of 20\") in the toolbar\n */\n hidePageStats?: boolean;\n\n /**\n * Controls the corners of DataViewToolbar with the \"border-radius\" CSS property. The default value is \"rounded\".\n */\n radius?: ToolbarRadiuses;\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n hidePageStats: false,\n radius: 'rounded',\n });\n const classes = useCssModule();\n\n const {\n isWithinModule,\n variant: dataViewVariant,\n density,\n currentPage,\n isPaginationEnabled,\n pageCount,\n pageSize,\n totalDataCount,\n goPrevPage,\n goNextPage,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const computedRadius = computed<ToolbarRadiuses>(() => {\n if (isWithinModule.value) {\n return 'none';\n }\n\n if (dataViewVariant.value === 'table') {\n return 'rounded-top';\n }\n\n return props.radius;\n });\n\n // #region pagination\n const pageStats = computed(() => {\n const from = pageSize.value * (currentPage.value - 1) + 1;\n const to = Math.min(pageSize.value * currentPage.value, totalDataCount.value);\n const total = totalDataCount.value;\n\n return t('ll.pageStats', { from, to, total });\n });\n // #endregion pagination\n</script>\n\n<template>\n <div\n class=\"stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5\"\n :class=\"{\n 'tw-border-t tw-border-ice-200': isWithinModule,\n 'tw-rounded': computedRadius === 'rounded',\n 'tw-rounded-t': computedRadius === 'rounded-top',\n 'tw-mb-3': dataViewVariant !== 'table' && !isWithinModule,\n 'tw-px-0': density === 'compact',\n 'lg:tw-px-3': density === 'comfortable',\n }\"\n data-test=\"stash-data-view-toolbar\"\n >\n <div class=\"tw-flex tw-items-center\" :class=\"classes['default-slot']\">\n <!-- @slot default -->\n <slot></slot>\n </div>\n\n <!-- Pagination -->\n <div v-if=\"isPaginationEnabled\" class=\"tw-flex tw-items-center\">\n <span v-if=\"!props.hidePageStats\" class=\"tw-mr-1.5 tw-text-xs\">\n {{ pageStats }}\n </span>\n <template v-if=\"pageCount > 1\">\n <Button\n icon\n class=\"tw-h-9 tw-w-9 tw-p-1.5\"\n data-test=\"button|prev-page\"\n :disabled=\"currentPage === 1\"\n @click=\"goPrevPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-left\" />\n </Button>\n <Button\n icon\n class=\"tw-h-9 tw-w-9 tw-p-1.5\"\n data-test=\"button|next-page\"\n :disabled=\"currentPage === pageCount\"\n @click=\"goNextPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-right\" />\n </Button>\n </template>\n </div>\n </div>\n</template>\n\n<style module>\n .default-slot > *:not(:last-of-type) {\n margin-right: 0.5rem;\n }\n</style>\n"],"names":["classes","useCssModule","isWithinModule","dataViewVariant","density","currentPage","isPaginationEnabled","pageCount","pageSize","totalDataCount","goPrevPage","goNextPage","inject","DATA_VIEW_INJECTION","computedRadius","computed","props","pageStats","from","to","total","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBQA,IAAUC,KAEV;AAAA,MACJ,gBAAAC;AAAA,MACA,SAASC;AAAA,MACT,SAAAC;AAAA,MACA,aAAAC;AAAA,MACA,qBAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,IACE,IAAAC,EAAOC,EAAoB,KAAKA,EAAoB,QAAQ,GAE1DC,IAAiBC,EAA0B,MAC3Cb,EAAe,QACV,SAGLC,EAAgB,UAAU,UACrB,gBAGFa,EAAM,MACd,GAGKC,IAAYF,EAAS,MAAM;AAC/B,YAAMG,IAAOV,EAAS,SAASH,EAAY,QAAQ,KAAK,GAClDc,IAAK,KAAK,IAAIX,EAAS,QAAQH,EAAY,OAAOI,EAAe,KAAK,GACtEW,IAAQX,EAAe;AAE7B,aAAOY,EAAE,gBAAgB,EAAE,MAAAH,GAAM,IAAAC,GAAI,OAAAC,GAAO;AAAA,IAAA,CAC7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DataViewToolbar.js","sources":["../src/components/DataViewToolbar/DataViewToolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Icon from '../Icon/Icon.vue';\n import { ToolbarRadiuses } from './DataViewToolbar.types';\n\n export interface DataViewToolbarProps {\n /**\n * Hides the page statistics (ex: \"1 - 12 of 20\") in the toolbar\n */\n hidePageStats?: boolean;\n\n /**\n * Controls the corners of DataViewToolbar with the \"border-radius\" CSS property. The default value is \"rounded\".\n */\n radius?: ToolbarRadiuses;\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n hidePageStats: false,\n radius: 'rounded',\n });\n\n const {\n isWithinModule,\n variant: dataViewVariant,\n density,\n currentPage,\n isPaginationEnabled,\n pageCount,\n pageSize,\n totalDataCount,\n goPrevPage,\n goNextPage,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const computedRadius = computed<ToolbarRadiuses>(() => {\n if (isWithinModule.value) {\n return 'none';\n }\n\n if (dataViewVariant.value === 'table') {\n return 'rounded-top';\n }\n\n return props.radius;\n });\n\n // #region pagination\n const pageStats = computed(() => {\n const from = pageSize.value * (currentPage.value - 1) + 1;\n const to = Math.min(pageSize.value * currentPage.value, totalDataCount.value);\n const total = totalDataCount.value;\n\n return t('ll.pageStats', { from, to, total });\n });\n // #endregion pagination\n</script>\n\n<template>\n <div\n class=\"stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5\"\n :class=\"{\n 'tw-border-t tw-border-ice-200': isWithinModule,\n 'tw-rounded': computedRadius === 'rounded',\n 'tw-rounded-t': computedRadius === 'rounded-top',\n 'tw-mb-3': dataViewVariant !== 'table' && !isWithinModule,\n 'tw-px-0': density === 'compact',\n 'lg:tw-px-3': density === 'comfortable',\n }\"\n data-test=\"stash-data-view-toolbar\"\n >\n <div class=\"tw-flex tw-items-center tw-gap-x-2 lg:tw-gap-x-6\">\n <!-- @slot default -->\n <slot></slot>\n </div>\n\n <!-- Pagination -->\n <div v-if=\"isPaginationEnabled\" class=\"tw-flex tw-items-center\">\n <span v-if=\"!props.hidePageStats\" class=\"tw-mr-1.5 tw-text-xs\">\n {{ pageStats }}\n </span>\n <template v-if=\"pageCount > 1\">\n <Button\n icon\n class=\"tw-h-9 tw-w-9 tw-p-1.5\"\n data-test=\"button|prev-page\"\n :disabled=\"currentPage === 1\"\n @click=\"goPrevPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-left\" />\n </Button>\n <Button\n icon\n class=\"tw-h-9 tw-w-9 tw-p-1.5\"\n data-test=\"button|next-page\"\n :disabled=\"currentPage === pageCount\"\n @click=\"goNextPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-right\" />\n </Button>\n </template>\n </div>\n </div>\n</template>\n"],"names":["isWithinModule","dataViewVariant","density","currentPage","isPaginationEnabled","pageCount","pageSize","totalDataCount","goPrevPage","goNextPage","inject","DATA_VIEW_INJECTION","computedRadius","computed","props","pageStats","from","to","total","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BQ;AAAA,MACJ,gBAAAA;AAAA,MACA,SAASC;AAAA,MACT,SAAAC;AAAA,MACA,aAAAC;AAAA,MACA,qBAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,IACE,IAAAC,EAAOC,EAAoB,KAAKA,EAAoB,QAAQ,GAE1DC,IAAiBC,EAA0B,MAC3Cb,EAAe,QACV,SAGLC,EAAgB,UAAU,UACrB,gBAGFa,EAAM,MACd,GAGKC,IAAYF,EAAS,MAAM;AAC/B,YAAMG,IAAOV,EAAS,SAASH,EAAY,QAAQ,KAAK,GAClDc,IAAK,KAAK,IAAIX,EAAS,QAAQH,EAAY,OAAOI,EAAe,KAAK,GACtEW,IAAQX,EAAe;AAE7B,aAAOY,EAAE,gBAAgB,EAAE,MAAAH,GAAM,IAAAC,GAAI,OAAAC,GAAO;AAAA,IAAA,CAC7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/Select.js CHANGED
@@ -956,7 +956,7 @@ function Rn(e, n, t) {
956
956
  update: E
957
957
  };
958
958
  }
959
- const On = (e) => (Mt("data-v-47027100"), e = e(), Dt(), e), kn = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], Tn = ["selected", "value"], Bn = /* @__PURE__ */ On(() => /* @__PURE__ */ z("option", { value: "" }, null, -1)), An = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled", "onKeyup"], Ln = ["id"], Mn = ["onKeypress", "onMousedown"], Dn = {
959
+ const On = (e) => (Mt("data-v-8f7abe47"), e = e(), Dt(), e), kn = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], Tn = ["selected", "value"], Bn = /* @__PURE__ */ On(() => /* @__PURE__ */ z("option", { value: "" }, null, -1)), An = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled", "onKeyup"], Ln = ["id"], Mn = ["onKeypress", "onMousedown"], Dn = {
960
960
  key: 0,
961
961
  class: "stash-select__total"
962
962
  }, Fn = {
@@ -1401,7 +1401,7 @@ const On = (e) => (Mt("data-v-47027100"), e = e(), Dt(), e), kn = ["id", "aria-e
1401
1401
  ]), 1032, ["id", "add-bottom-space", "class", "error-text", "hint-text", "label", "show-optional-in-label"]));
1402
1402
  }
1403
1403
  });
1404
- const ho = /* @__PURE__ */ Ut(Hn, [["__scopeId", "data-v-47027100"]]);
1404
+ const ho = /* @__PURE__ */ Ut(Hn, [["__scopeId", "data-v-8f7abe47"]]);
1405
1405
  export {
1406
1406
  ho as default
1407
1407
  };