@leaflink/stash 51.10.0 → 51.11.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,19 +1,55 @@
1
- import { defineComponent as j, useCssModule as U, inject as W, ref as F, computed as J, onBeforeMount as K, createElementBlock as s, openBlock as a, normalizeClass as v, unref as e, createElementVNode as h, createCommentVNode as l, createBlock as L, renderSlot as O, toDisplayString as q, Fragment as G, createVNode as n, withCtx as _ } from "vue";
2
- import { u as H } from "./usePaginationStats-d_q39naC.js";
3
- import { t as i } from "./locale.js";
4
- import x from "./Button.js";
5
- import Q from "./Checkbox.js";
1
+ import { ref as M, onMounted as U, nextTick as P, onBeforeUnmount as j, watch as J, defineComponent as K, useTemplateRef as W, inject as q, computed as G, onBeforeMount as H, createElementBlock as v, openBlock as m, normalizeClass as Q, unref as e, createElementVNode as X, createCommentVNode as x, createBlock as Y, createVNode as l, withCtx as r, renderSlot as Z, createTextVNode as ee, toDisplayString as te, Fragment as ae } from "vue";
2
+ import { u as oe } from "./usePaginationStats-d_q39naC.js";
3
+ import { t as k } from "./locale.js";
4
+ import T from "./Button.js";
5
+ import ne from "./Checkbox.js";
6
6
  import "lodash-es/cloneDeep";
7
- import y from "./Icon.js";
8
- import { D as k } from "./DataView.keys-aSOnA4AD.js";
9
- import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- const Y = { class: "tw-flex tw-place-items-center" }, Z = {
7
+ import D from "./Icon.js";
8
+ import { D as I } from "./DataView.keys-aSOnA4AD.js";
9
+ import le from "./IconLabel.js";
10
+ import ie from "./MoreActions.js";
11
+ function se(E) {
12
+ const { toolbarEl: o, paginationEl: t, checkboxEl: b, isPaginationEnabled: f, isSelectable: w, isEmpty: g } = E, i = M(null);
13
+ let a = null;
14
+ const n = () => {
15
+ if (!o.value) return;
16
+ const y = o.value.getBoundingClientRect().width;
17
+ let c = 0, u = 0;
18
+ f?.value && t.value && (c = t.value.getBoundingClientRect().width), w?.value && !g?.value && b.value?.$el && (u = b.value.$el.getBoundingClientRect().width);
19
+ const p = window.getComputedStyle(o.value), R = parseFloat(p.paddingLeft) || 0, S = parseFloat(p.paddingRight) || 0, C = Math.max(0, y - c - u - R - S);
20
+ i.value = `${C}px`;
21
+ }, d = () => {
22
+ o.value && (a = new ResizeObserver(() => {
23
+ P(() => {
24
+ n();
25
+ });
26
+ }), a.observe(o.value));
27
+ }, h = () => {
28
+ a && (a.disconnect(), a = null);
29
+ };
30
+ return U(() => {
31
+ P(() => {
32
+ n(), d();
33
+ });
34
+ }), j(() => {
35
+ h();
36
+ }), J([f, w, g], () => {
37
+ P(() => {
38
+ n();
39
+ });
40
+ }), {
41
+ actionsWidth: i,
42
+ updateActionsWidth: n
43
+ };
44
+ }
45
+ const re = { class: "tw-flex tw-place-items-center" }, de = {
11
46
  key: 0,
12
- class: "stash-data-view-toolbar__pagination tw-flex tw-items-center"
13
- }, ee = {
47
+ ref: "paginationEl",
48
+ class: "tw-flex tw-shrink-0 tw-items-center"
49
+ }, ce = {
14
50
  key: 0,
15
- class: "tw-mr-1.5"
16
- }, te = /* @__PURE__ */ j({
51
+ class: "tw-mx-1.5 tw-hidden md:tw-block"
52
+ }, ke = /* @__PURE__ */ K({
17
53
  __name: "DataViewToolbar",
18
54
  props: {
19
55
  allRowsSelected: { type: Boolean, default: !1 },
@@ -23,103 +59,134 @@ const Y = { class: "tw-flex tw-place-items-center" }, Z = {
23
59
  hasTabsAbove: { type: Boolean, default: !1 }
24
60
  },
25
61
  emits: ["select"],
26
- setup(S, { emit: C }) {
27
- const t = S, B = U(), P = C, {
28
- isWithinModule: r,
29
- variant: m,
30
- density: w,
62
+ setup(E, { emit: o }) {
63
+ const t = E, b = o, f = W("toolbarEl"), w = W("paginationEl"), g = W("checkboxEl"), {
64
+ isWithinModule: i,
65
+ variant: a,
66
+ density: n,
31
67
  currentPage: d,
32
- hasToolbar: p,
33
- isPaginateNextDisabled: E,
34
- isPaginationEnabled: V,
35
- isSelectable: D,
36
- pageCount: f,
37
- pageSize: N,
38
- totalDataCount: T,
39
- goPrevPage: R,
40
- goNextPage: z,
68
+ hasToolbar: h,
69
+ isPaginateNextDisabled: y,
70
+ isPaginationEnabled: c,
71
+ isSelectable: u,
72
+ pageCount: p,
73
+ pageSize: R,
74
+ totalDataCount: S,
75
+ goPrevPage: C,
76
+ goNextPage: $,
41
77
  isEmpty: A,
42
- isLoading: c
43
- } = W(k.key, k.defaults), b = F(0), u = J(() => t.radius ? t.radius : r.value ? "none" : m.value === "table" ? t.hasTabsAbove ? "rounded-top-right" : "rounded-top" : "rounded"), I = H({ currentPage: d, pageSize: N, totalItems: T });
44
- function g() {
45
- P("select"), b.value++;
78
+ isLoading: B
79
+ } = q(I.key, I.defaults), N = M(0), { actionsWidth: O } = se({
80
+ toolbarEl: f,
81
+ paginationEl: w,
82
+ checkboxEl: g,
83
+ isPaginationEnabled: c,
84
+ isSelectable: u,
85
+ isEmpty: A
86
+ }), _ = G(() => t.radius ? t.radius : i.value ? "none" : a.value === "table" ? t.hasTabsAbove ? "rounded-top-right" : "rounded-top" : "rounded"), L = oe({ currentPage: d, pageSize: R, totalItems: S });
87
+ function V() {
88
+ b("select"), N.value++;
46
89
  }
47
- return K(() => {
48
- p && (p.value = !0);
49
- }), (M, o) => (a(), s("div", {
50
- class: v(["stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5 tw-shadow", {
51
- "tw-border-t tw-border-ice-200": e(r),
52
- "tw-rounded-tr": u.value === "rounded-top-right",
53
- "tw-rounded": u.value === "rounded",
54
- "tw-rounded-t": u.value === "rounded-top",
55
- "tw-mb-3": e(m) !== "table" && !e(r),
56
- "tw-px-3": e(w) === "compact",
57
- "tw-px-3 lg:tw-px-6": e(w) === "comfortable"
90
+ return H(() => {
91
+ h && (h.value = !0);
92
+ }), (F, s) => (m(), v("div", {
93
+ ref: "toolbarEl",
94
+ class: Q(["stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5 tw-shadow", {
95
+ "tw-border-t tw-border-ice-200": e(i),
96
+ "tw-rounded-tr": _.value === "rounded-top-right",
97
+ "tw-rounded": _.value === "rounded",
98
+ "tw-rounded-t": _.value === "rounded-top",
99
+ "tw-mb-3": e(a) !== "table" && !e(i),
100
+ "tw-px-3": e(n) === "compact",
101
+ "tw-px-3 lg:tw-px-6": e(n) === "comfortable"
58
102
  }]),
59
103
  "data-test": "stash-data-view-toolbar"
60
104
  }, [
61
- h("div", Y, [
62
- e(D) && !e(A) ? (a(), L(Q, {
63
- key: b.value,
64
- class: "tw-mr-2",
105
+ X("div", re, [
106
+ e(u) && !e(A) ? (m(), Y(ne, {
107
+ ref: "checkboxEl",
108
+ key: N.value,
65
109
  checked: t.allRowsSelected,
66
110
  indeterminate: t.someRowsSelected && !t.allRowsSelected,
67
- title: e(i)("ll.selectAll"),
68
- disabled: e(c),
69
- "onUpdate:indeterminate": g,
70
- "onUpdate:checked": g
71
- }, null, 8, ["checked", "indeterminate", "title", "disabled"])) : l("", !0),
72
- h("div", {
73
- class: v([e(B).actions, "stash-data-view-toolbar__actions tw-flex tw-items-center tw-gap-x-2 lg:tw-gap-x-4"])
74
- }, [
75
- O(M.$slots, "default")
76
- ], 2)
111
+ title: e(k)("ll.selectAll"),
112
+ disabled: e(B),
113
+ "onUpdate:indeterminate": V,
114
+ "onUpdate:checked": V
115
+ }, null, 8, ["checked", "indeterminate", "title", "disabled"])) : x("", !0),
116
+ l(ie, {
117
+ "more-button-align": "together",
118
+ width: e(O) || void 0,
119
+ "actions-container-class": "tw-flex tw-items-center tw-gap-x-2 lg:tw-mr-6 lg:tw-gap-x-6",
120
+ "item-in-dropdown-class": "tw-text-center"
121
+ }, {
122
+ toggle: r(({ toggle: z }) => [
123
+ l(T, {
124
+ "icon-label": "",
125
+ class: "tw-text-blue-500",
126
+ "data-test": "stash-data-view-sort-button|sort-menu-button",
127
+ onClick: z
128
+ }, {
129
+ default: r(() => [
130
+ l(le, {
131
+ icon: "ellipsis",
132
+ stacked: ""
133
+ }, {
134
+ default: r(() => [...s[2] || (s[2] = [
135
+ ee(" More ", -1)
136
+ ])]),
137
+ _: 1
138
+ })
139
+ ]),
140
+ _: 1
141
+ }, 8, ["onClick"])
142
+ ]),
143
+ actions: r(() => [
144
+ Z(F.$slots, "default")
145
+ ]),
146
+ _: 3
147
+ }, 8, ["width"])
77
148
  ]),
78
- e(V) ? (a(), s("div", Z, [
79
- t.hidePageStats ? l("", !0) : (a(), s("span", ee, q(e(i)("ll.pageStats", e(I))), 1)),
80
- e(f) > 1 ? (a(), s(G, { key: 1 }, [
81
- n(x, {
149
+ e(c) ? (m(), v("div", de, [
150
+ t.hidePageStats ? x("", !0) : (m(), v("span", ce, te(e(k)("ll.pageStats", e(L))), 1)),
151
+ e(p) > 1 ? (m(), v(ae, { key: 1 }, [
152
+ l(T, {
82
153
  icon: "",
83
- "aria-label": e(i)("ll.previous"),
84
- class: "tw-ml-1.5 tw-w-auto tw-min-w-auto tw-px-1.5",
154
+ "aria-label": e(k)("ll.previous"),
155
+ class: "tw-size-9 tw-p-1.5",
85
156
  "data-test": "button|prev-page",
86
- disabled: e(c) || e(d) === 1,
87
- onClick: o[0] || (o[0] = ($) => e(R)({ shouldEmit: !0 }))
157
+ disabled: e(B) || e(d) === 1,
158
+ onClick: s[0] || (s[0] = (z) => e(C)({ shouldEmit: !0 }))
88
159
  }, {
89
- default: _(() => [
90
- n(y, {
160
+ default: r(() => [
161
+ l(D, {
91
162
  name: "chevron-left",
92
163
  size: "dense"
93
164
  })
94
165
  ]),
95
166
  _: 1
96
167
  }, 8, ["aria-label", "disabled"]),
97
- n(x, {
168
+ l(T, {
98
169
  icon: "",
99
- "aria-label": e(i)("ll.next"),
100
- class: "-tw-mr-4 tw-w-auto tw-min-w-auto tw-p-1.5",
170
+ "aria-label": e(k)("ll.next"),
171
+ class: "tw-size-9 tw-p-1.5",
101
172
  "data-test": "button|next-page",
102
- disabled: e(c) || e(E) || e(d) === e(f),
103
- onClick: o[1] || (o[1] = ($) => e(z)({ shouldEmit: !0 }))
173
+ disabled: e(B) || e(y) || e(d) === e(p),
174
+ onClick: s[1] || (s[1] = (z) => e($)({ shouldEmit: !0 }))
104
175
  }, {
105
- default: _(() => [
106
- n(y, {
176
+ default: r(() => [
177
+ l(D, {
107
178
  name: "chevron-right",
108
179
  size: "dense"
109
180
  })
110
181
  ]),
111
182
  _: 1
112
183
  }, 8, ["aria-label", "disabled"])
113
- ], 64)) : l("", !0)
114
- ])) : l("", !0)
184
+ ], 64)) : x("", !0)
185
+ ], 512)) : x("", !0)
115
186
  ], 2));
116
187
  }
117
- }), ae = "_actions_k8z80_2", oe = {
118
- actions: ae
119
- }, se = {
120
- $style: oe
121
- }, pe = /* @__PURE__ */ X(te, [["__cssModules", se]]);
188
+ });
122
189
  export {
123
- pe as default
190
+ ke as default
124
191
  };
125
192
  //# 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, onBeforeMount, ref, useCssModule } from 'vue';\n\n import usePaginationStats from '../../composables/usePaginationStats/usePaginationStats';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Checkbox from '../Checkbox/Checkbox.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 * When DataView has `variant=\"table\"` and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever all rows are selected, just like the standalone version on TableHeaderRow.\n */\n allRowsSelected?: boolean;\n\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 * When DataView has variant=\"table\" and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever one or more, but not all rows are selected, just like the standalone\n * version on TableHeaderRow.\n */\n someRowsSelected?: boolean;\n\n /**\n * When DataView has tabs above it, we need to remove the top left rounded corner\n */\n hasTabsAbove?: boolean;\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n allRowsSelected: false,\n hidePageStats: false,\n radius: undefined,\n someRowsSelected: false,\n hasTabsAbove: false,\n });\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'select'): void;\n }>();\n\n const {\n isWithinModule,\n variant: dataViewVariant,\n density,\n currentPage,\n hasToolbar,\n isPaginateNextDisabled,\n isPaginationEnabled,\n isSelectable,\n pageCount,\n pageSize,\n totalDataCount,\n goPrevPage,\n goNextPage,\n isEmpty,\n isLoading,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const checkboxKey = ref(0);\n\n const computedRadius = computed<ToolbarRadiuses>(() => {\n if (props.radius) {\n return props.radius;\n }\n\n if (isWithinModule.value) {\n return 'none';\n }\n\n if (dataViewVariant.value === 'table') {\n if (props.hasTabsAbove) {\n return 'rounded-top-right';\n }\n\n return 'rounded-top';\n }\n\n return 'rounded';\n });\n\n const pageStats = usePaginationStats({ currentPage, pageSize, totalItems: totalDataCount });\n\n function onSelect() {\n emit('select');\n\n /**\n * In Vue (as of this writing), if a user checks a native checkbox but the v-model is `false` and does not change from `false`, then the checkbox will display as checked even though the v-model is still `false`.\n * Forcing a re-render with a `key` change allows the checkbox to stay unchecked if its v-model is still `false` and its v-model not been changed.\n * To verify that this is necessary, test the \"select all\" checkbox in the SelectionWithSomeDisabled story in Table.story.ts with and without the `key` attribute.\n */\n checkboxKey.value++;\n }\n\n onBeforeMount(() => {\n if (hasToolbar) {\n hasToolbar.value = true;\n }\n });\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 tw-shadow\"\n :class=\"{\n 'tw-border-t tw-border-ice-200': isWithinModule,\n 'tw-rounded-tr': computedRadius === 'rounded-top-right',\n 'tw-rounded': computedRadius === 'rounded',\n 'tw-rounded-t': computedRadius === 'rounded-top',\n 'tw-mb-3': dataViewVariant !== 'table' && !isWithinModule,\n 'tw-px-3': density === 'compact',\n 'tw-px-3 lg:tw-px-6': density === 'comfortable',\n }\"\n data-test=\"stash-data-view-toolbar\"\n >\n <div class=\"tw-flex tw-place-items-center\">\n <Checkbox\n v-if=\"isSelectable && !isEmpty\"\n :key=\"checkboxKey\"\n class=\"tw-mr-2\"\n :checked=\"props.allRowsSelected\"\n :indeterminate=\"props.someRowsSelected && !props.allRowsSelected\"\n :title=\"t('ll.selectAll')\"\n :disabled=\"isLoading\"\n @update:indeterminate=\"onSelect\"\n @update:checked=\"onSelect\"\n />\n <div\n :class=\"classes.actions\"\n class=\"stash-data-view-toolbar__actions tw-flex tw-items-center tw-gap-x-2 lg:tw-gap-x-4\"\n >\n <!-- @slot default -->\n <slot></slot>\n </div>\n </div>\n\n <!-- Pagination -->\n <div v-if=\"isPaginationEnabled\" class=\"stash-data-view-toolbar__pagination tw-flex tw-items-center\">\n <span v-if=\"!props.hidePageStats\" class=\"tw-mr-1.5\">\n {{ t('ll.pageStats', pageStats) }}\n </span>\n <template v-if=\"pageCount > 1\">\n <Button\n icon\n :aria-label=\"t('ll.previous')\"\n class=\"tw-ml-1.5 tw-w-auto tw-min-w-auto tw-px-1.5\"\n data-test=\"button|prev-page\"\n :disabled=\"isLoading || currentPage === 1\"\n @click=\"goPrevPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-left\" size=\"dense\" />\n </Button>\n <Button\n icon\n :aria-label=\"t('ll.next')\"\n class=\"-tw-mr-4 tw-w-auto tw-min-w-auto tw-p-1.5\"\n data-test=\"button|next-page\"\n :disabled=\"isLoading || isPaginateNextDisabled || currentPage === pageCount\"\n @click=\"goNextPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-right\" size=\"dense\" />\n </Button>\n </template>\n </div>\n </div>\n</template>\n\n<style module>\n .actions :global(.stash-button) {\n min-width: auto;\n padding: 0 0.5rem;\n\n &:first-child {\n margin-left: -0.5rem;\n }\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","emit","__emit","isWithinModule","dataViewVariant","density","currentPage","hasToolbar","isPaginateNextDisabled","isPaginationEnabled","isSelectable","pageCount","pageSize","totalDataCount","goPrevPage","goNextPage","isEmpty","isLoading","inject","DATA_VIEW_INJECTION","checkboxKey","ref","computedRadius","computed","pageStats","usePaginationStats","onSelect","onBeforeMount","_createElementBlock","_unref","_createElementVNode","_hoisted_1","_createBlock","Checkbox","t","_normalizeClass","_renderSlot","_ctx","_openBlock","_hoisted_2","_hoisted_3","_toDisplayString","_Fragment","_createVNode","Button","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyCE,UAAMA,IAAQC,GAORC,IAAUC,EAAA,GAEVC,IAAOC,GAIP;AAAA,MACJ,gBAAAC;AAAA,MACA,SAASC;AAAA,MACT,SAAAC;AAAA,MACA,aAAAC;AAAA,MACA,YAAAC;AAAA,MACA,wBAAAC;AAAA,MACA,qBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,SAAAC;AAAA,MACA,WAAAC;AAAA,IAAA,IACEC,EAAOC,EAAoB,KAAKA,EAAoB,QAAQ,GAE1DC,IAAcC,EAAI,CAAC,GAEnBC,IAAiBC,EAA0B,MAC3C1B,EAAM,SACDA,EAAM,SAGXM,EAAe,QACV,SAGLC,EAAgB,UAAU,UACxBP,EAAM,eACD,sBAGF,gBAGF,SACR,GAEK2B,IAAYC,EAAmB,EAAE,aAAAnB,GAAa,UAAAM,GAAU,YAAYC,GAAgB;AAE1F,aAASa,IAAW;AAClB,M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,UApBTC,EASSC,GAAA;AAAA,YARP,MAAA;AAAA,YACC,cAAYf,EAAAK,CAAA,EAAC,aAAA;AAAA,YACd,OAAM;AAAA,YACN,aAAU;AAAA,YACT,UAAUL,EAAAZ,CAAA,KAAaY,EAAAvB,CAAA,MAAW;AAAA,YAClC,gCAAOuB,EAAAf,CAAA,EAAU,EAAA,YAAA,IAAA;AAAA,UAAA;uBAElB,MAAyC;AAAA,cAAzC6B,EAAyCE,GAAA;AAAA,gBAAnC,MAAK;AAAA,gBAAe,MAAK;AAAA,cAAA;;;;UAEjCF,EASSC,GAAA;AAAA,YARP,MAAA;AAAA,YACC,cAAYf,EAAAK,CAAA,EAAC,SAAA;AAAA,YACd,OAAM;AAAA,YACN,aAAU;AAAA,YACT,UAAUL,EAAAZ,CAAA,KAAaY,QAA0BA,EAAAvB,CAAA,MAAgBuB,EAAAlB,CAAA;AAAA,YACjE,gCAAOkB,EAAAd,CAAA,EAAU,EAAA,YAAA,IAAA;AAAA,UAAA;uBAElB,MAA0C;AAAA,cAA1C4B,EAA0CE,GAAA;AAAA,gBAApC,MAAK;AAAA,gBAAgB,MAAK;AAAA,cAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DataViewToolbar.js","sources":["../src/components/DataViewToolbar/useActionsWidth.ts","../src/components/DataViewToolbar/DataViewToolbar.vue"],"sourcesContent":["import { ComputedRef, nextTick, onBeforeUnmount, onMounted, Ref, ref, ShallowRef, watch } from 'vue';\n\nexport interface UseActionsWidthOptions {\n toolbarEl: ShallowRef<HTMLElement | null>;\n paginationEl: ShallowRef<HTMLElement | null>;\n checkboxEl: ShallowRef<{ $el: HTMLElement } | null>;\n isPaginationEnabled: ComputedRef<boolean> | undefined;\n isSelectable: Ref<boolean> | undefined;\n isEmpty: ComputedRef<boolean> | undefined;\n}\n\nexport function useActionsWidth(options: UseActionsWidthOptions) {\n const { toolbarEl, paginationEl, checkboxEl, isPaginationEnabled, isSelectable, isEmpty } = options;\n\n const actionsWidth = ref<string | null>(null);\n let resizeObserver: ResizeObserver | null = null;\n\n const updateActionsWidth = () => {\n if (!toolbarEl.value) return;\n\n const toolbarWidth = toolbarEl.value.getBoundingClientRect().width;\n let paginationWidth = 0;\n let checkboxWidth = 0;\n\n // Calculate pagination width if pagination is enabled\n if (isPaginationEnabled?.value && paginationEl.value) {\n paginationWidth = paginationEl.value.getBoundingClientRect().width;\n }\n\n // Calculate checkbox width if selectable and not empty\n if (isSelectable?.value && !isEmpty?.value && checkboxEl.value?.$el) {\n checkboxWidth = checkboxEl.value.$el.getBoundingClientRect().width;\n }\n\n // Get computed styles to calculate padding\n const computedStyle = window.getComputedStyle(toolbarEl.value);\n const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;\n const paddingRight = parseFloat(computedStyle.paddingRight) || 0;\n\n const availableWidth = Math.max(0, toolbarWidth - paginationWidth - checkboxWidth - paddingLeft - paddingRight);\n actionsWidth.value = `${availableWidth}px`;\n };\n\n const setupResizeObserver = () => {\n if (!toolbarEl.value) return;\n\n resizeObserver = new ResizeObserver(() => {\n nextTick(() => {\n updateActionsWidth();\n });\n });\n\n resizeObserver.observe(toolbarEl.value);\n };\n\n const cleanupResizeObserver = () => {\n if (resizeObserver) {\n resizeObserver.disconnect();\n resizeObserver = null;\n }\n };\n\n onMounted(() => {\n // Initial width calculation with nextTick to ensure DOM is ready\n nextTick(() => {\n updateActionsWidth();\n setupResizeObserver();\n });\n });\n\n onBeforeUnmount(() => {\n cleanupResizeObserver();\n });\n\n // Watch for changes in conditions that affect element visibility\n watch([isPaginationEnabled, isSelectable, isEmpty], () => {\n nextTick(() => {\n updateActionsWidth();\n });\n });\n\n return {\n actionsWidth,\n updateActionsWidth,\n };\n}\n","<script setup lang=\"ts\">\n import { computed, inject, onBeforeMount, ref, useTemplateRef } from 'vue';\n\n import usePaginationStats from '../../composables/usePaginationStats/usePaginationStats';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Checkbox from '../Checkbox/Checkbox.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Icon from '../Icon/Icon.vue';\n import IconLabel from '../IconLabel/IconLabel.vue';\n import MoreActions from '../MoreActions/MoreActions.vue';\n import { ToolbarRadiuses } from './DataViewToolbar.types';\n import { useActionsWidth } from './useActionsWidth';\n\n export interface DataViewToolbarProps {\n /**\n * When DataView has `variant=\"table\"` and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever all rows are selected, just like the standalone version on TableHeaderRow.\n */\n allRowsSelected?: boolean;\n\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 * When DataView has variant=\"table\" and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever one or more, but not all rows are selected, just like the standalone\n * version on TableHeaderRow.\n */\n someRowsSelected?: boolean;\n\n /**\n * When DataView has tabs above it, we need to remove the top left rounded corner\n */\n hasTabsAbove?: boolean;\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n allRowsSelected: false,\n hidePageStats: false,\n radius: undefined,\n someRowsSelected: false,\n hasTabsAbove: false,\n });\n\n const emit = defineEmits<{\n (e: 'select'): void;\n }>();\n\n // Refs for width calculation\n const toolbarRef = useTemplateRef('toolbarEl');\n const paginationRef = useTemplateRef('paginationEl');\n const checkboxRef = useTemplateRef('checkboxEl');\n\n const {\n isWithinModule,\n variant: dataViewVariant,\n density,\n currentPage,\n hasToolbar,\n isPaginateNextDisabled,\n isPaginationEnabled,\n isSelectable,\n pageCount,\n pageSize,\n totalDataCount,\n goPrevPage,\n goNextPage,\n isEmpty,\n isLoading,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const checkboxKey = ref(0);\n\n const { actionsWidth } = useActionsWidth({\n toolbarEl: toolbarRef,\n paginationEl: paginationRef,\n checkboxEl: checkboxRef,\n isPaginationEnabled,\n isSelectable,\n isEmpty,\n });\n\n const computedRadius = computed<ToolbarRadiuses>(() => {\n if (props.radius) {\n return props.radius;\n }\n\n if (isWithinModule.value) {\n return 'none';\n }\n\n if (dataViewVariant.value === 'table') {\n if (props.hasTabsAbove) {\n return 'rounded-top-right';\n }\n\n return 'rounded-top';\n }\n\n return 'rounded';\n });\n\n const pageStats = usePaginationStats({ currentPage, pageSize, totalItems: totalDataCount });\n\n function onSelect() {\n emit('select');\n\n /**\n * In Vue (as of this writing), if a user checks a native checkbox but the v-model is `false` and does not change from `false`, then the checkbox will display as checked even though the v-model is still `false`.\n * Forcing a re-render with a `key` change allows the checkbox to stay unchecked if its v-model is still `false` and its v-model not been changed.\n * To verify that this is necessary, test the \"select all\" checkbox in the SelectionWithSomeDisabled story in Table.story.ts with and without the `key` attribute.\n */\n checkboxKey.value++;\n }\n\n onBeforeMount(() => {\n if (hasToolbar) {\n hasToolbar.value = true;\n }\n });\n</script>\n\n<template>\n <div\n ref=\"toolbarEl\"\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 tw-shadow\"\n :class=\"{\n 'tw-border-t tw-border-ice-200': isWithinModule,\n 'tw-rounded-tr': computedRadius === 'rounded-top-right',\n 'tw-rounded': computedRadius === 'rounded',\n 'tw-rounded-t': computedRadius === 'rounded-top',\n 'tw-mb-3': dataViewVariant !== 'table' && !isWithinModule,\n 'tw-px-3': density === 'compact',\n 'tw-px-3 lg:tw-px-6': density === 'comfortable',\n }\"\n data-test=\"stash-data-view-toolbar\"\n >\n <div class=\"tw-flex tw-place-items-center\">\n <Checkbox\n v-if=\"isSelectable && !isEmpty\"\n ref=\"checkboxEl\"\n :key=\"checkboxKey\"\n :checked=\"props.allRowsSelected\"\n :indeterminate=\"props.someRowsSelected && !props.allRowsSelected\"\n :title=\"t('ll.selectAll')\"\n :disabled=\"isLoading\"\n @update:indeterminate=\"onSelect\"\n @update:checked=\"onSelect\"\n />\n <MoreActions\n more-button-align=\"together\"\n :width=\"actionsWidth || undefined\"\n actions-container-class=\"tw-flex tw-items-center tw-gap-x-2 lg:tw-mr-6 lg:tw-gap-x-6\"\n item-in-dropdown-class=\"tw-text-center\"\n >\n <template #toggle=\"{ toggle }\">\n <Button\n icon-label\n class=\"tw-text-blue-500\"\n data-test=\"stash-data-view-sort-button|sort-menu-button\"\n @click=\"toggle\"\n >\n <IconLabel icon=\"ellipsis\" stacked> More </IconLabel>\n </Button>\n </template>\n <template #actions>\n <slot></slot>\n </template>\n </MoreActions>\n </div>\n\n <!-- Pagination -->\n <div v-if=\"isPaginationEnabled\" ref=\"paginationEl\" class=\"tw-flex tw-shrink-0 tw-items-center\">\n <span v-if=\"!props.hidePageStats\" class=\"tw-mx-1.5 tw-hidden md:tw-block\">\n {{ t('ll.pageStats', pageStats) }}\n </span>\n <template v-if=\"pageCount > 1\">\n <Button\n icon\n :aria-label=\"t('ll.previous')\"\n class=\"tw-size-9 tw-p-1.5\"\n data-test=\"button|prev-page\"\n :disabled=\"isLoading || currentPage === 1\"\n @click=\"goPrevPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-left\" size=\"dense\" />\n </Button>\n <Button\n icon\n :aria-label=\"t('ll.next')\"\n class=\"tw-size-9 tw-p-1.5\"\n data-test=\"button|next-page\"\n :disabled=\"isLoading || isPaginateNextDisabled || currentPage === pageCount\"\n @click=\"goNextPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-right\" size=\"dense\" />\n </Button>\n </template>\n </div>\n </div>\n</template>\n"],"names":["useActionsWidth","options","toolbarEl","paginationEl","checkboxEl","isPaginationEnabled","isSelectable","isEmpty","actionsWidth","ref","resizeObserver","updateActionsWidth","toolbarWidth","paginationWidth","checkboxWidth","computedStyle","paddingLeft","paddingRight","availableWidth","setupResizeObserver","nextTick","cleanupResizeObserver","onMounted","onBeforeUnmount","watch","props","__props","emit","__emit","toolbarRef","useTemplateRef","paginationRef","checkboxRef","isWithinModule","dataViewVariant","density","currentPage","hasToolbar","isPaginateNextDisabled","pageCount","pageSize","totalDataCount","goPrevPage","goNextPage","isLoading","inject","DATA_VIEW_INJECTION","checkboxKey","computedRadius","computed","pageStats","usePaginationStats","onSelect","onBeforeMount","_createElementBlock","_unref","_createElementVNode","_hoisted_1","_createBlock","Checkbox","t","_createVNode","MoreActions","_withCtx","toggle","Button","IconLabel","_cache","_renderSlot","_ctx","_openBlock","_hoisted_2","_hoisted_3","_toDisplayString","_Fragment","Icon"],"mappings":";;;;;;;;;;AAWO,SAASA,GAAgBC,GAAiC;AAC/D,QAAM,EAAE,WAAAC,GAAW,cAAAC,GAAc,YAAAC,GAAY,qBAAAC,GAAqB,cAAAC,GAAc,SAAAC,MAAYN,GAEtFO,IAAeC,EAAmB,IAAI;AAC5C,MAAIC,IAAwC;AAE5C,QAAMC,IAAqB,MAAM;AAC/B,QAAI,CAACT,EAAU,MAAO;AAEtB,UAAMU,IAAeV,EAAU,MAAM,sBAAA,EAAwB;AAC7D,QAAIW,IAAkB,GAClBC,IAAgB;AAGpB,IAAIT,GAAqB,SAASF,EAAa,UAC7CU,IAAkBV,EAAa,MAAM,sBAAA,EAAwB,QAI3DG,GAAc,SAAS,CAACC,GAAS,SAASH,EAAW,OAAO,QAC9DU,IAAgBV,EAAW,MAAM,IAAI,sBAAA,EAAwB;AAI/D,UAAMW,IAAgB,OAAO,iBAAiBb,EAAU,KAAK,GACvDc,IAAc,WAAWD,EAAc,WAAW,KAAK,GACvDE,IAAe,WAAWF,EAAc,YAAY,KAAK,GAEzDG,IAAiB,KAAK,IAAI,GAAGN,IAAeC,IAAkBC,IAAgBE,IAAcC,CAAY;AAC9G,IAAAT,EAAa,QAAQ,GAAGU,CAAc;AAAA,EACxC,GAEMC,IAAsB,MAAM;AAChC,IAAKjB,EAAU,UAEfQ,IAAiB,IAAI,eAAe,MAAM;AACxC,MAAAU,EAAS,MAAM;AACb,QAAAT,EAAA;AAAA,MACF,CAAC;AAAA,IACH,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A0C;AAAA,cAA1CkB,EAA0Cc,GAAA;AAAA,gBAApC,MAAK;AAAA,gBAAgB,MAAK;AAAA,cAAA;;;;;;;;;"}
@@ -1,7 +1,24 @@
1
+ import { AllowedComponentProps } from 'vue';
2
+ import { CheckboxProps } from '../Checkbox/Checkbox.vue';
3
+ import { ComponentCustomProperties } from 'vue';
4
+ import { ComponentCustomProps } from 'vue';
5
+ import { ComponentInternalInstance } from 'vue';
6
+ import { ComponentOptionsBase } from 'vue';
1
7
  import { ComponentOptionsMixin } from 'vue';
2
8
  import { ComponentProvideOptions } from 'vue';
9
+ import { ComponentPublicInstance } from 'vue';
10
+ import { DebuggerEvent } from 'vue';
3
11
  import { DefineComponent } from 'vue';
12
+ import { GlobalComponents } from 'vue';
13
+ import { GlobalDirectives } from 'vue';
14
+ import { nextTick } from 'vue';
15
+ import { OnCleanup } from '@vue/reactivity';
4
16
  import { PublicProps } from 'vue';
17
+ import { ShallowUnwrapRef } from 'vue';
18
+ import { Slot } from 'vue';
19
+ import { VNodeProps } from 'vue';
20
+ import { WatchOptions } from 'vue';
21
+ import { WatchStopHandle } from 'vue';
5
22
 
6
23
  declare type __VLS_WithTemplateSlots<T, S> = T & {
7
24
  new (): {
@@ -45,7 +62,91 @@ allRowsSelected: boolean;
45
62
  hidePageStats: boolean;
46
63
  someRowsSelected: boolean;
47
64
  hasTabsAbove: boolean;
48
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>, {
65
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
66
+ toolbarEl: HTMLDivElement;
67
+ checkboxEl: ({
68
+ $: ComponentInternalInstance;
69
+ $data: {};
70
+ $props: {
71
+ readonly checked: boolean | (string | number)[];
72
+ readonly hasError?: boolean | undefined;
73
+ readonly id?: string | undefined;
74
+ readonly label?: string | undefined;
75
+ readonly errorText?: string | undefined;
76
+ readonly hintText?: string | undefined;
77
+ readonly modelValue?: boolean | (string | number)[] | undefined;
78
+ readonly value?: string | number | undefined;
79
+ readonly disabled?: boolean | undefined;
80
+ readonly "onUpdate:checked"?: ((value: boolean | (string | number)[]) => any) | undefined;
81
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
82
+ $attrs: {
83
+ [x: string]: unknown;
84
+ };
85
+ $refs: {
86
+ [x: string]: unknown;
87
+ };
88
+ $slots: Readonly<{
89
+ [name: string]: Slot<any> | undefined;
90
+ }>;
91
+ $root: ComponentPublicInstance< {}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null;
92
+ $parent: ComponentPublicInstance< {}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null;
93
+ $host: Element | null;
94
+ $emit: (event: "update:checked", value: boolean | (string | number)[]) => void;
95
+ $el: any;
96
+ $options: ComponentOptionsBase<Readonly<CheckboxProps> & Readonly<{
97
+ "onUpdate:checked"?: ((value: boolean | (string | number)[]) => any) | undefined;
98
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
99
+ "update:checked": (value: boolean | (string | number)[]) => any;
100
+ }, string, {
101
+ id: string;
102
+ label: string;
103
+ value: string | number;
104
+ disabled: boolean;
105
+ hasError: boolean;
106
+ errorText: string;
107
+ hintText: string;
108
+ modelValue: boolean | (string | number)[];
109
+ checked: boolean | (string | number)[];
110
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
111
+ beforeCreate?: ((() => void) | (() => void)[]) | undefined;
112
+ created?: ((() => void) | (() => void)[]) | undefined;
113
+ beforeMount?: ((() => void) | (() => void)[]) | undefined;
114
+ mounted?: ((() => void) | (() => void)[]) | undefined;
115
+ beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
116
+ updated?: ((() => void) | (() => void)[]) | undefined;
117
+ activated?: ((() => void) | (() => void)[]) | undefined;
118
+ deactivated?: ((() => void) | (() => void)[]) | undefined;
119
+ beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
120
+ beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
121
+ destroyed?: ((() => void) | (() => void)[]) | undefined;
122
+ unmounted?: ((() => void) | (() => void)[]) | undefined;
123
+ renderTracked?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
124
+ renderTriggered?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
125
+ errorCaptured?: (((err: unknown, instance: ComponentPublicInstance< {}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance< {}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void)[]) | undefined;
126
+ };
127
+ $forceUpdate: () => void;
128
+ $nextTick: nextTick;
129
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: OnCleanup) => any : (args_0: any, args_1: any, args_2: OnCleanup) => any, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
130
+ } & Readonly<{
131
+ id: string;
132
+ label: string;
133
+ value: string | number;
134
+ disabled: boolean;
135
+ hasError: boolean;
136
+ errorText: string;
137
+ hintText: string;
138
+ modelValue: boolean | (string | number)[];
139
+ checked: boolean | (string | number)[];
140
+ }> & Omit<Readonly<CheckboxProps> & Readonly<{
141
+ "onUpdate:checked"?: ((value: boolean | (string | number)[]) => any) | undefined;
142
+ }>, "id" | "label" | "value" | "disabled" | "hasError" | "errorText" | "hintText" | "modelValue" | "checked"> & ShallowUnwrapRef< {}> & {} & ComponentCustomProperties & {} & {
143
+ $slots: {
144
+ default?(_: {}): any;
145
+ hint?(_: {}): any;
146
+ };
147
+ }) | null;
148
+ paginationEl: HTMLDivElement;
149
+ }, HTMLDivElement>, {
49
150
  default?(_: {}): any;
50
151
  }>;
51
152
  export default _default;