@leaflink/stash 52.0.3 → 53.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 +51 -52
- package/dist/Accordion.js +16 -16
- package/dist/Accordion.js.map +1 -1
- package/dist/AccordionGroup.js +7 -7
- package/dist/AccordionGroup.js.map +1 -1
- package/dist/ActionsDropdown.js +16 -16
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/AddressSelect.js.map +1 -1
- package/dist/AddressSelect.vue.d.ts +1 -1
- package/dist/Alert.js +34 -34
- package/dist/Alert.js.map +1 -1
- package/dist/AppNavigationItem.js +31 -31
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppSidebar.js +19 -19
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppTopbar.js +32 -32
- package/dist/AppTopbar.js.map +1 -1
- package/dist/Avatar.js +18 -18
- package/dist/Avatar.js.map +1 -1
- package/dist/Backdrop.js +5 -5
- package/dist/Backdrop.js.map +1 -1
- package/dist/Badge.js +38 -38
- package/dist/Badge.js.map +1 -1
- package/dist/Box.js +1 -1
- package/dist/{Box.vue_vue_type_script_setup_true_lang-rFnvwLVY.js → Box.vue_vue_type_script_setup_true_lang-dFFZN40_.js} +6 -6
- package/dist/{Box.vue_vue_type_script_setup_true_lang-rFnvwLVY.js.map → Box.vue_vue_type_script_setup_true_lang-dFFZN40_.js.map} +1 -1
- package/dist/Button.js +21 -21
- package/dist/Button.js.map +1 -1
- package/dist/ButtonGroup.js +26 -26
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/Card.js +14 -14
- package/dist/Card.js.map +1 -1
- package/dist/CardContent.js +1 -1
- package/dist/CardContent.js.map +1 -1
- package/dist/CardFooter.js +1 -1
- package/dist/CardFooter.js.map +1 -1
- package/dist/CardHeader.js +4 -4
- package/dist/CardHeader.js.map +1 -1
- package/dist/CardMedia.js +20 -20
- package/dist/CardMedia.js.map +1 -1
- package/dist/Carousel.js +60 -60
- package/dist/Carousel.js.map +1 -1
- package/dist/Checkbox.js +30 -30
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +0 -3
- package/dist/Chip.js +33 -33
- package/dist/Chip.js.map +1 -1
- package/dist/ConfirmationCodeInput.js +72 -72
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ContextSwitcher.js +27 -27
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/Copy.js +47 -48
- package/dist/Copy.js.map +1 -1
- package/dist/CurrencyInput.js +1 -1
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +5 -5
- package/dist/DataView.js +23 -23
- package/dist/DataView.js.map +1 -1
- package/dist/DataViewFilters.js +26 -26
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewSortButton.js +22 -22
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewToolbar.js +52 -52
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DatePicker.js +10 -10
- package/dist/DatePicker.js.map +1 -1
- package/dist/DescriptionList.js +2 -2
- package/dist/DescriptionList.js.map +1 -1
- package/dist/DescriptionListDetail.js +2 -2
- package/dist/DescriptionListDetail.js.map +1 -1
- package/dist/DescriptionListGroup.js +9 -9
- package/dist/DescriptionListGroup.js.map +1 -1
- package/dist/DescriptionListTerm.js +8 -8
- package/dist/DescriptionListTerm.js.map +1 -1
- package/dist/Dialog.js +47 -47
- package/dist/Dialog.js.map +1 -1
- package/dist/Divider.js +6 -6
- package/dist/Divider.js.map +1 -1
- package/dist/Dropdown.js +20 -20
- package/dist/Dropdown.js.map +1 -1
- package/dist/EmptyState.js +26 -26
- package/dist/EmptyState.js.map +1 -1
- package/dist/Field.js +1 -1
- package/dist/{Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js → Field.vue_vue_type_script_setup_true_lang-dAGKfjf5.js} +17 -17
- package/dist/Field.vue_vue_type_script_setup_true_lang-dAGKfjf5.js.map +1 -0
- package/dist/FileUpload.js +47 -49
- package/dist/FileUpload.js.map +1 -1
- package/dist/FilterChip.js +20 -20
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterDrawerItem.js +13 -13
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDropdown.js +27 -27
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterSelect.js +33 -33
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Filters.js +29 -29
- package/dist/Filters.js.map +1 -1
- package/dist/Filters.vue.d.ts +2 -8
- package/dist/HttpError.js +29 -29
- package/dist/HttpError.js.map +1 -1
- package/dist/HttpError.vue.d.ts +0 -3
- package/dist/Icon.js +12 -12
- package/dist/Icon.js.map +1 -1
- package/dist/IconLabel.js +19 -19
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +1 -1
- package/dist/Illustration.js +2 -2
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js → Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js} +4 -4
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js.map → Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js.map} +1 -1
- package/dist/Image.js +2 -2
- package/dist/Image.vue.d.ts +0 -3
- package/dist/{Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js → Image.vue_vue_type_script_setup_true_lang-CAj0FH9h.js} +11 -11
- package/dist/Image.vue_vue_type_script_setup_true_lang-CAj0FH9h.js.map +1 -0
- package/dist/InlineEdit.js +8 -8
- package/dist/InlineEdit.js.map +1 -1
- package/dist/Input.js +29 -29
- package/dist/Input.js.map +1 -1
- package/dist/InputOptions.js +87 -84
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +2 -2
- package/dist/IntegrationIcon.js +11 -11
- package/dist/IntegrationIcon.js.map +1 -1
- package/dist/Label.js +1 -1
- package/dist/{Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js → Label.vue_vue_type_script_setup_true_lang-xwY3X-iV.js} +16 -16
- package/dist/{Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js.map → Label.vue_vue_type_script_setup_true_lang-xwY3X-iV.js.map} +1 -1
- package/dist/ListItem.js +14 -14
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItem.vue.d.ts +0 -6
- package/dist/ListItemCell.js +9 -9
- package/dist/ListItemCell.js.map +1 -1
- package/dist/ListView.js +138 -141
- package/dist/ListView.js.map +1 -1
- package/dist/ListView.vue.d.ts +6 -40
- package/dist/Loading.js +8 -8
- package/dist/Loading.js.map +1 -1
- package/dist/Logo.js +1 -1
- package/dist/{Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js → Logo.vue_vue_type_script_setup_true_lang-DghNC_k6.js} +3 -3
- package/dist/{Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js.map → Logo.vue_vue_type_script_setup_true_lang-DghNC_k6.js.map} +1 -1
- package/dist/Menu.js +5 -5
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.js +12 -12
- package/dist/MenuItem.js.map +1 -1
- package/dist/Metric.js +24 -24
- package/dist/Metric.js.map +1 -1
- package/dist/Modal.js +60 -60
- package/dist/Modal.js.map +1 -1
- package/dist/Modals.js +1 -1
- package/dist/Modals.js.map +1 -1
- package/dist/Module.js +6 -6
- package/dist/Module.js.map +1 -1
- package/dist/ModuleContent.js +16 -16
- package/dist/ModuleContent.js.map +1 -1
- package/dist/ModuleFooter.js +13 -13
- package/dist/ModuleFooter.js.map +1 -1
- package/dist/ModuleHeader.js +29 -29
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/MoreActions.js +81 -84
- package/dist/MoreActions.js.map +1 -1
- package/dist/ObfuscateText.js +4 -4
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/PageContent.js +13 -13
- package/dist/PageContent.js.map +1 -1
- package/dist/PageHeader.js +28 -28
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageNavigation.js +1 -1
- package/dist/Paginate.js +45 -45
- package/dist/Paginate.js.map +1 -1
- package/dist/QuickAction.js +18 -18
- package/dist/QuickAction.js.map +1 -1
- package/dist/Radio.js +17 -17
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +121 -121
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioNew.js +80 -80
- package/dist/RadioNew.js.map +1 -1
- package/dist/RadioNew.vue.d.ts +0 -3
- package/dist/RangeInput.js +2 -2
- package/dist/RangeInput.js.map +1 -1
- package/dist/SearchBar.js +9 -9
- package/dist/SearchBar.js.map +1 -1
- package/dist/SectionHeader.js +14 -14
- package/dist/SectionHeader.js.map +1 -1
- package/dist/Select.js +369 -366
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +26 -26
- package/dist/SelectStatus.js.map +1 -1
- package/dist/Skeleton.js +20 -20
- package/dist/Skeleton.js.map +1 -1
- package/dist/Step.js +37 -40
- package/dist/Step.js.map +1 -1
- package/dist/Stepper.js +17 -17
- package/dist/Stepper.js.map +1 -1
- package/dist/Switch.js +57 -57
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.js +17 -19
- package/dist/Tab.js.map +1 -1
- package/dist/TabPanel.js +1 -1
- package/dist/TabPanel.js.map +1 -1
- package/dist/Table.js +22 -22
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.js +32 -32
- package/dist/TableCell.js.map +1 -1
- package/dist/TableHeaderCell.js +35 -35
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderRow.js +10 -10
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableRow.js +51 -51
- package/dist/TableRow.js.map +1 -1
- package/dist/Tabs.js +2 -2
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-B3Irnlcd.js → Tabs.vue_vue_type_script_setup_true_lang-BVTCcK6M.js} +33 -33
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-BVTCcK6M.js.map +1 -0
- package/dist/TextEditor.js +8 -8
- package/dist/TextEditor.js.map +1 -1
- package/dist/Textarea.js +15 -15
- package/dist/Textarea.js.map +1 -1
- package/dist/Thumbnail.js +41 -41
- package/dist/Thumbnail.js.map +1 -1
- package/dist/ThumbnailEmpty.js +3 -3
- package/dist/ThumbnailEmpty.js.map +1 -1
- package/dist/ThumbnailGroup.js +22 -22
- package/dist/ThumbnailGroup.js.map +1 -1
- package/dist/Timeline.js +6 -6
- package/dist/Timeline.js.map +1 -1
- package/dist/Timeline.vue.d.ts +2 -2
- package/dist/TimelineItem.js +22 -22
- package/dist/TimelineItem.js.map +1 -1
- package/dist/Toast.js +29 -29
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.vue.d.ts +3 -0
- package/dist/Toasts.js +11 -11
- package/dist/Toasts.js.map +1 -1
- package/dist/Tooltip.js +2 -81
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tooltip.vue.d.ts +1 -1
- package/dist/Tooltip.vue_vue_type_script_setup_true_lang-mzBLSXy3.js +84 -0
- package/dist/Tooltip.vue_vue_type_script_setup_true_lang-mzBLSXy3.js.map +1 -0
- package/dist/components.css +2 -2
- package/dist/constants.d.ts +9 -9
- package/dist/constants.js +17 -17
- package/dist/constants.js.map +1 -1
- package/dist/directives/tooltip.js +2 -2
- package/dist/directives/tooltip.js.map +1 -1
- package/dist/floating-ui.vue-CuGrC-z8.js.map +1 -1
- package/dist/formatDateTime-Dz8bXV0R.js.map +1 -1
- package/dist/index-D6bxWkZ1.js.map +1 -1
- package/dist/{index-C14LhAwV.js → index-DBV9Uz0C.js} +3 -3
- package/dist/index-DBV9Uz0C.js.map +1 -0
- package/dist/index.js.map +1 -1
- package/dist/isValid-DN-HkCoi.js.map +1 -1
- package/dist/parseISO-wlfIB_QJ.js.map +1 -1
- package/dist/searchFuzzy-B3TsUO-V.js.map +1 -1
- package/dist/tailwind-base.js +4 -4
- package/dist/tailwind-base.js.d.ts +12 -0
- package/dist/tailwind-base.js.map +1 -1
- package/dist/toTimeZone-Coq1oPTt.js.map +1 -1
- package/dist/useGoogleMaps.js.map +1 -1
- package/dist/useSortable.js +1 -1
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/helpers.js +15 -15
- package/dist/utils/helpers.js.map +1 -1
- package/package.json +12 -82
- package/styles/backwards-compat.css +375 -2854
- package/styles/main.css +8 -0
- package/styles/sofia-font.css +23 -27
- package/styles/theme.css +1033 -0
- package/LICENSE +0 -21
- package/dist/Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js.map +0 -1
- package/dist/Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js.map +0 -1
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3Irnlcd.js.map +0 -1
- package/dist/index-C14LhAwV.js.map +0 -1
- package/dist/tailwind-base.d.ts +0 -333
- package/styles/base.css +0 -902
- package/tailwind-base.ts +0 -455
package/dist/ModuleHeader.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as M, useCssModule as C, useSlots as S, ref as B, inject as $, computed as u, createElementBlock as r, openBlock as l, normalizeClass as n, unref as a, createElementVNode as i, createCommentVNode as m, renderSlot as o, createBlock as
|
|
2
|
-
import { M as
|
|
1
|
+
import { defineComponent as M, useCssModule as C, useSlots as S, ref as B, inject as $, computed as u, createElementBlock as r, openBlock as l, normalizeClass as n, unref as a, createElementVNode as i, createCommentVNode as m, renderSlot as o, createBlock as _, resolveDynamicComponent as b, withCtx as g, createTextVNode as V, toDisplayString as v } from "vue";
|
|
2
|
+
import { M as y } from "./Module.keys-CEsrW2f0.js";
|
|
3
3
|
import { M as c } from "./Module.types-B1FfGGac.js";
|
|
4
4
|
import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
const N = { class: "
|
|
5
|
+
const N = { class: "flex items-center" }, z = {
|
|
6
6
|
class: "stash-module-header__content__text",
|
|
7
7
|
"data-test": "stash-module-header|content-text"
|
|
8
8
|
}, D = {
|
|
9
9
|
key: 0,
|
|
10
|
-
class: "
|
|
10
|
+
class: "mb-0 mt-3"
|
|
11
11
|
}, O = /* @__PURE__ */ M({
|
|
12
12
|
name: "ll-module-header",
|
|
13
13
|
__name: "ModuleHeader",
|
|
@@ -18,12 +18,12 @@ const N = { class: "tw-flex tw-items-center" }, z = {
|
|
|
18
18
|
preventActionsWrap: { type: Boolean, default: !1 },
|
|
19
19
|
underline: { type: Boolean, default: !1 }
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const t =
|
|
23
|
-
if (!
|
|
21
|
+
setup(k) {
|
|
22
|
+
const t = k, w = C(), s = S(), d = B(), f = $(y.key, y.defaults);
|
|
23
|
+
if (!f.variant)
|
|
24
24
|
throw new Error("<ModuleHeader> must be used within a <Module> component.");
|
|
25
|
-
d.value =
|
|
26
|
-
const
|
|
25
|
+
d.value = f.variant.value;
|
|
26
|
+
const h = u(() => {
|
|
27
27
|
let e;
|
|
28
28
|
switch (t.size) {
|
|
29
29
|
case "small":
|
|
@@ -40,61 +40,61 @@ const N = { class: "tw-flex tw-items-center" }, z = {
|
|
|
40
40
|
break;
|
|
41
41
|
}
|
|
42
42
|
return e;
|
|
43
|
-
}), x = u(() => s.default ? s.default({}).length === 1 && typeof s.default({})[0].children == "string" && typeof s.default({})[0].type == "symbol" : !1),
|
|
43
|
+
}), x = u(() => s.default ? s.default({}).length === 1 && typeof s.default({})[0].children == "string" && typeof s.default({})[0].type == "symbol" : !1), p = u(() => {
|
|
44
44
|
const e = ["box", "table", "list"].includes(d.value);
|
|
45
|
-
return e && !t.underline ? "
|
|
45
|
+
return e && !t.underline ? "mb-3 lg:mb-6" : e && t.underline ? "mb-3" : "";
|
|
46
46
|
});
|
|
47
47
|
return (e, I) => (l(), r("header", {
|
|
48
|
-
class: n(["stash-module-header
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
48
|
+
class: n(["stash-module-header flex flex-wrap justify-between", {
|
|
49
|
+
"rounded-t border-b border-ice-500 bg-ice-100 p-3 lg:px-6": d.value === a(c).Card,
|
|
50
|
+
"mb-6 rounded bg-white px-3 pt-3 shadow lg:mb-0 lg:rounded-b-none lg:px-6 lg:pt-6 lg:shadow-none": d.value === a(c).List,
|
|
51
|
+
"mb-3 border-b border-ice-200 lg:mb-6": t.underline,
|
|
52
|
+
"mb-6 rounded-t bg-white px-3 pt-3 lg:mb-0 lg:px-6 lg:pt-6": d.value === a(c).Table
|
|
53
53
|
}]),
|
|
54
54
|
"data-test": "stash-module-header"
|
|
55
55
|
}, [
|
|
56
56
|
i("div", {
|
|
57
|
-
class: n(["stash-module-header__content
|
|
57
|
+
class: n(["stash-module-header__content mr-6", p.value]),
|
|
58
58
|
"data-test": "stash-module-header|content"
|
|
59
59
|
}, [
|
|
60
60
|
i("div", N, [
|
|
61
61
|
a(s).media && t.size === "large" ? (l(), r("div", {
|
|
62
62
|
key: 0,
|
|
63
|
-
class: n(["stash-module-header__content__media
|
|
63
|
+
class: n(["stash-module-header__content__media mr-3", a(w).media]),
|
|
64
64
|
"data-test": "stash-module-header|content-media"
|
|
65
65
|
}, [
|
|
66
66
|
o(e.$slots, "media")
|
|
67
67
|
], 2)) : m("", !0),
|
|
68
68
|
i("div", z, [
|
|
69
|
-
a(s).title ? o(e.$slots, "title", { key: 0 }) : x.value ? (l(),
|
|
69
|
+
a(s).title ? o(e.$slots, "title", { key: 0 }) : x.value ? (l(), _(b(h.value), {
|
|
70
70
|
key: 1,
|
|
71
|
-
class: "stash-module-header__default_slot_string
|
|
71
|
+
class: "stash-module-header__default_slot_string my-0",
|
|
72
72
|
"data-test": "stash-module-header|default-slot-text"
|
|
73
73
|
}, {
|
|
74
|
-
default:
|
|
74
|
+
default: g(() => [
|
|
75
75
|
o(e.$slots, "default")
|
|
76
76
|
]),
|
|
77
77
|
_: 3
|
|
78
78
|
})) : o(e.$slots, "default", { key: 2 }, () => [
|
|
79
|
-
(l(),
|
|
80
|
-
default:
|
|
81
|
-
V(
|
|
79
|
+
(l(), _(b(h.value), { class: "my-0" }, {
|
|
80
|
+
default: g(() => [
|
|
81
|
+
V(v(t.title), 1)
|
|
82
82
|
]),
|
|
83
83
|
_: 1
|
|
84
84
|
}))
|
|
85
85
|
]),
|
|
86
86
|
o(e.$slots, "description", {}, () => [
|
|
87
|
-
t.description ? (l(), r("p", D,
|
|
87
|
+
t.description ? (l(), r("p", D, v(t.description), 1)) : m("", !0)
|
|
88
88
|
])
|
|
89
89
|
])
|
|
90
90
|
])
|
|
91
91
|
], 2),
|
|
92
92
|
a(s).actions ? (l(), r("div", {
|
|
93
93
|
key: 0,
|
|
94
|
-
class: n(["stash-module-header__actions
|
|
95
|
-
|
|
94
|
+
class: n(["stash-module-header__actions self-center", [
|
|
95
|
+
p.value,
|
|
96
96
|
{
|
|
97
|
-
"
|
|
97
|
+
"w-full lg:w-auto": !t.preventActionsWrap
|
|
98
98
|
}
|
|
99
99
|
]]),
|
|
100
100
|
"data-test": "stash-module-header|actions"
|
|
@@ -103,7 +103,7 @@ const N = { class: "tw-flex tw-items-center" }, z = {
|
|
|
103
103
|
], 2)) : m("", !0)
|
|
104
104
|
], 2));
|
|
105
105
|
}
|
|
106
|
-
}), T = "
|
|
106
|
+
}), T = "_media_2ebhk_4", j = {
|
|
107
107
|
media: T
|
|
108
108
|
}, H = {
|
|
109
109
|
$style: j
|
package/dist/ModuleHeader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleHeader.js","sources":["../src/components/ModuleHeader/ModuleHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, ref, useCssModule, useSlots } from 'vue';\n\n import { MODULE_INJECTION } from '../Module/Module.keys';\n import { ModuleVariant } from '../Module/Module.types';\n\n defineOptions({\n name: 'll-module-header',\n });\n\n export interface ModuleHeaderProps {\n /**\n * Header title. Will get overridden by the `title` slot if provided.\n */\n title?: string;\n\n /**\n * Size of the header.\n *\n * - `small` = `h4`\n * - `medium` = `h3`\n * - `large` = `h2`\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Header description, aka subtitle. Will get overridden by the `description` slot if provided.\n */\n description?: string;\n\n /**\n * Stop the actions slot from force-wrapping on medium and smalls screens.\n */\n preventActionsWrap?: boolean;\n\n /**\n * Displays a border at the bottom\n */\n underline?: boolean;\n }\n\n const props = withDefaults(defineProps<ModuleHeaderProps>(), {\n title: '',\n size: 'medium',\n description: '',\n preventActionsWrap: false,\n underline: false,\n });\n const classes = useCssModule();\n const slots = useSlots();\n\n // get the module variant from the parent module\n const moduleVariant = ref();\n const moduleInjectedValues = inject(MODULE_INJECTION.key, MODULE_INJECTION.defaults);\n if (!moduleInjectedValues.variant) {\n throw new Error('<ModuleHeader> must be used within a <Module> component.');\n }\n moduleVariant.value = moduleInjectedValues.variant.value;\n\n const is = computed(() => {\n let component: string;\n\n switch (props.size) {\n case 'small':\n component = 'h4';\n break;\n\n case 'medium':\n component = 'h3';\n break;\n\n case 'large':\n component = 'h2';\n break;\n\n default:\n component = 'h3';\n break;\n }\n\n return component;\n });\n\n const isDefaultSlotSimpleString = computed(() => {\n if (!slots.default) {\n return false;\n }\n\n const defaultSlot = slots.default({});\n return (\n defaultSlot.length === 1 &&\n typeof slots.default({})[0].children === 'string' &&\n typeof slots.default({})[0].type === 'symbol'\n );\n });\n\n const marginBottomClasses = computed(() => {\n const isBoxOrTableOrList = ['box', 'table', 'list'].includes(moduleVariant.value);\n\n if (isBoxOrTableOrList && !props.underline) {\n return '
|
|
1
|
+
{"version":3,"file":"ModuleHeader.js","sources":["../src/components/ModuleHeader/ModuleHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, ref, useCssModule, useSlots } from 'vue';\n\n import { MODULE_INJECTION } from '../Module/Module.keys';\n import { ModuleVariant } from '../Module/Module.types';\n\n defineOptions({\n name: 'll-module-header',\n });\n\n export interface ModuleHeaderProps {\n /**\n * Header title. Will get overridden by the `title` slot if provided.\n */\n title?: string;\n\n /**\n * Size of the header.\n *\n * - `small` = `h4`\n * - `medium` = `h3`\n * - `large` = `h2`\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Header description, aka subtitle. Will get overridden by the `description` slot if provided.\n */\n description?: string;\n\n /**\n * Stop the actions slot from force-wrapping on medium and smalls screens.\n */\n preventActionsWrap?: boolean;\n\n /**\n * Displays a border at the bottom\n */\n underline?: boolean;\n }\n\n const props = withDefaults(defineProps<ModuleHeaderProps>(), {\n title: '',\n size: 'medium',\n description: '',\n preventActionsWrap: false,\n underline: false,\n });\n const classes = useCssModule();\n const slots = useSlots();\n\n // get the module variant from the parent module\n const moduleVariant = ref();\n const moduleInjectedValues = inject(MODULE_INJECTION.key, MODULE_INJECTION.defaults);\n if (!moduleInjectedValues.variant) {\n throw new Error('<ModuleHeader> must be used within a <Module> component.');\n }\n moduleVariant.value = moduleInjectedValues.variant.value;\n\n const is = computed(() => {\n let component: string;\n\n switch (props.size) {\n case 'small':\n component = 'h4';\n break;\n\n case 'medium':\n component = 'h3';\n break;\n\n case 'large':\n component = 'h2';\n break;\n\n default:\n component = 'h3';\n break;\n }\n\n return component;\n });\n\n const isDefaultSlotSimpleString = computed(() => {\n if (!slots.default) {\n return false;\n }\n\n const defaultSlot = slots.default({});\n return (\n defaultSlot.length === 1 &&\n typeof slots.default({})[0].children === 'string' &&\n typeof slots.default({})[0].type === 'symbol'\n );\n });\n\n const marginBottomClasses = computed(() => {\n const isBoxOrTableOrList = ['box', 'table', 'list'].includes(moduleVariant.value);\n\n if (isBoxOrTableOrList && !props.underline) {\n return 'mb-3 lg:mb-6';\n } else if (isBoxOrTableOrList && props.underline) {\n return 'mb-3';\n } else {\n return '';\n }\n });\n</script>\n\n<template>\n <header\n class=\"stash-module-header flex flex-wrap justify-between\"\n :class=\"{\n 'rounded-t border-b border-ice-500 bg-ice-100 p-3 lg:px-6': moduleVariant === ModuleVariant.Card,\n 'mb-6 rounded bg-white px-3 pt-3 shadow lg:mb-0 lg:rounded-b-none lg:px-6 lg:pt-6 lg:shadow-none':\n moduleVariant === ModuleVariant.List,\n 'mb-3 border-b border-ice-200 lg:mb-6': props.underline,\n 'mb-6 rounded-t bg-white px-3 pt-3 lg:mb-0 lg:px-6 lg:pt-6': moduleVariant === ModuleVariant.Table,\n }\"\n data-test=\"stash-module-header\"\n >\n <div class=\"stash-module-header__content mr-6\" :class=\"marginBottomClasses\" data-test=\"stash-module-header|content\">\n <div class=\"flex items-center\">\n <div\n v-if=\"slots.media && props.size === 'large'\"\n class=\"stash-module-header__content__media mr-3\"\n :class=\"classes.media\"\n data-test=\"stash-module-header|content-media\"\n >\n <!-- @slot Place an illustration that sits next to the header title & description. -->\n <slot name=\"media\"></slot>\n </div>\n\n <div class=\"stash-module-header__content__text\" data-test=\"stash-module-header|content-text\">\n <!--\n @slot Header title. **Deprecated**: Use the default slot or the `title` prop instead.\n -->\n <slot v-if=\"slots.title\" name=\"title\"></slot>\n\n <template v-else-if=\"isDefaultSlotSimpleString\">\n <component\n :is=\"is\"\n class=\"stash-module-header__default_slot_string my-0\"\n data-test=\"stash-module-header|default-slot-text\"\n >\n <!-- @slot Header title. -->\n <slot></slot>\n </component>\n </template>\n <!-- @slot Header title. Falls back to the `title` prop. -->\n <slot v-else>\n <component :is=\"is\" class=\"my-0\">{{ props.title }}</component>\n </slot>\n\n <!--\n @slot Header description, aka subtitle. Falls back to the `description` prop.\n -->\n <slot name=\"description\">\n <p v-if=\"props.description\" class=\"mb-0 mt-3\">{{ props.description }}</p>\n </slot>\n </div>\n </div>\n </div>\n\n <!-- todo: how can we pass a prop/class to actions in order to top align vs middle align? -->\n <div\n v-if=\"slots.actions\"\n class=\"stash-module-header__actions self-center\"\n :class=\"[\n marginBottomClasses,\n {\n 'w-full lg:w-auto': !props.preventActionsWrap,\n },\n ]\"\n data-test=\"stash-module-header|actions\"\n >\n <!-- @slot Add action buttons or other CTAs. -->\n <slot name=\"actions\"></slot>\n </div>\n </header>\n</template>\n\n<style module>\n @layer utilities {\n /* max size for media/marketing illustration icons we would be passing to the slot */\n .media {\n max-height: 58px;\n max-width: 58px;\n }\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","slots","useSlots","moduleVariant","ref","moduleInjectedValues","inject","MODULE_INJECTION","is","computed","component","isDefaultSlotSimpleString","marginBottomClasses","isBoxOrTableOrList"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyCE,UAAMA,IAAQC,GAORC,IAAUC,EAAA,GACVC,IAAQC,EAAA,GAGRC,IAAgBC,EAAA,GAChBC,IAAuBC,EAAOC,EAAiB,KAAKA,EAAiB,QAAQ;AACnF,QAAI,CAACF,EAAqB;AACxB,YAAM,IAAI,MAAM,0DAA0D;AAE5E,IAAAF,EAAc,QAAQE,EAAqB,QAAQ;AAEnD,UAAMG,IAAKC,EAAS,MAAM;AACxB,UAAIC;AAEJ,cAAQb,EAAM,MAAA;AAAA,QACZ,KAAK;AACH,UAAAa,IAAY;AACZ;AAAA,QAEF,KAAK;AACH,UAAAA,IAAY;AACZ;AAAA,QAEF,KAAK;AACH,UAAAA,IAAY;AACZ;AAAA,QAEF;AACE,UAAAA,IAAY;AACZ;AAAA,MAAA;AAGJ,aAAOA;AAAA,IACT,CAAC,GAEKC,IAA4BF,EAAS,MACpCR,EAAM,UAISA,EAAM,QAAQ,EAAE,EAEtB,WAAW,KACvB,OAAOA,EAAM,QAAQ,CAAA,CAAE,EAAE,CAAC,EAAE,YAAa,YACzC,OAAOA,EAAM,QAAQ,CAAA,CAAE,EAAE,CAAC,EAAE,QAAS,WAP9B,EASV,GAEKW,IAAsBH,EAAS,MAAM;AACzC,YAAMI,IAAqB,CAAC,OAAO,SAAS,MAAM,EAAE,SAASV,EAAc,KAAK;AAEhF,aAAIU,KAAsB,CAAChB,EAAM,YACxB,iBACEgB,KAAsBhB,EAAM,YAC9B,SAEA;AAAA,IAEX,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/MoreActions.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
import { b as K, c as
|
|
1
|
+
import { ref as T, onUnmounted as se, nextTick as V, onMounted as ue, onUpdated as re, onDeactivated as ce, onBeforeUnmount as oe, watch as X, defineComponent as de, useSlots as fe, computed as W, useTemplateRef as U, createElementBlock as ve, openBlock as H, normalizeStyle as z, createBlock as Y, createElementVNode as ee, createCommentVNode as me, resolveDynamicComponent as he, normalizeClass as te, unref as C, withCtx as P, renderSlot as G, createVNode as le, createTextVNode as pe, toDisplayString as ge } from "vue";
|
|
2
|
+
import Ae from "lodash-es/uniqueId";
|
|
3
|
+
import { b as K, c as Ie, d as Te, e as be } from "./index-DBV9Uz0C.js";
|
|
4
4
|
import { DEBOUNCE as k } from "./constants.js";
|
|
5
|
-
import { t as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import { t as Oe } from "./locale.js";
|
|
6
|
+
import ye from "./Button.js";
|
|
7
|
+
import Ee from "./Dropdown.js";
|
|
8
|
+
import we from "./Icon.js";
|
|
9
9
|
import Z from "lodash-es/debounce";
|
|
10
10
|
import { _ as Se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
function _e(e = {}) {
|
|
12
|
-
const { duration: t = 300, initialVisible: a = !1 } = e, [n, l] = K(a), [o, i] = K(a), [s, d] = K(!1), c =
|
|
12
|
+
const { duration: t = 300, initialVisible: a = !1 } = e, [n, l] = K(a), [o, i] = K(a), [s, d] = K(!1), c = T(null);
|
|
13
13
|
function g() {
|
|
14
14
|
c.value !== null && (clearTimeout(c.value), c.value = null);
|
|
15
15
|
}
|
|
16
16
|
function v(r) {
|
|
17
17
|
g(), n.value !== r && l(), o.value !== r && i(), s.value && d();
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function A(r) {
|
|
20
20
|
g(), r ? (n.value || l(), o.value || i(), s.value && d()) : (o.value && i(), s.value || d(), c.value = setTimeout(() => {
|
|
21
21
|
n.value && l(), s.value && d(), c.value = null;
|
|
22
22
|
}, t));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
24
|
+
function I() {
|
|
25
|
+
A(!0);
|
|
26
26
|
}
|
|
27
27
|
function h() {
|
|
28
|
-
|
|
28
|
+
A(!1);
|
|
29
29
|
}
|
|
30
30
|
function u() {
|
|
31
31
|
g();
|
|
@@ -36,8 +36,8 @@ function _e(e = {}) {
|
|
|
36
36
|
isVisible: n,
|
|
37
37
|
shouldShow: o,
|
|
38
38
|
shouldHide: s,
|
|
39
|
-
toggle:
|
|
40
|
-
show:
|
|
39
|
+
toggle: A,
|
|
40
|
+
show: I,
|
|
41
41
|
hide: h,
|
|
42
42
|
setVisible: v,
|
|
43
43
|
cleanup: u
|
|
@@ -87,12 +87,12 @@ function Be(e, t) {
|
|
|
87
87
|
function ne(e, t, a) {
|
|
88
88
|
const n = L.get(e);
|
|
89
89
|
if (n && (clearTimeout(n), L.delete(e)), a.has(t))
|
|
90
|
-
e.removeAttribute(p.PROCESSED), e.classList.add("
|
|
90
|
+
e.removeAttribute(p.PROCESSED), e.classList.add("invisible");
|
|
91
91
|
else {
|
|
92
92
|
const l = setTimeout(() => {
|
|
93
93
|
e.isConnected && e.setAttribute(p.PROCESSED, "true"), L.delete(e);
|
|
94
94
|
}, k.FAST);
|
|
95
|
-
L.set(e, l), e.classList.remove("
|
|
95
|
+
L.set(e, l), e.classList.remove("invisible");
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
function J(e, t) {
|
|
@@ -102,7 +102,7 @@ function J(e, t) {
|
|
|
102
102
|
e.querySelectorAll(`[${p.ACTION_ID}]`)
|
|
103
103
|
).filter((l) => l.querySelectorAll(`[${p.ACTION_ID}]`).length === 0).forEach((l) => {
|
|
104
104
|
const o = l.getAttribute(p.ACTION_ID);
|
|
105
|
-
o && t.has(o) ? l.classList.remove("
|
|
105
|
+
o && t.has(o) ? l.classList.remove("hidden") : l.classList.add("hidden");
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
function Ce({
|
|
@@ -112,7 +112,7 @@ function Ce({
|
|
|
112
112
|
trackerElementRef: n,
|
|
113
113
|
onOverflowChange: l
|
|
114
114
|
}) {
|
|
115
|
-
const o =
|
|
115
|
+
const o = T(!1), i = T(""), s = Ie(n);
|
|
116
116
|
function d(h, u, r) {
|
|
117
117
|
t.value.clear(), h.forEach((f) => t.value.add(f)), u.forEach((f) => {
|
|
118
118
|
const m = r.get(f) || f.getAttribute(p.ACTION_ID) || void 0;
|
|
@@ -124,10 +124,10 @@ function Ce({
|
|
|
124
124
|
o.value = !1;
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
|
-
const h = Array.from(e.value.children), u = ie(h), r = /* @__PURE__ */ new Set(), f = window.getComputedStyle(e.value), m = f.columnGap || f.gap,
|
|
128
|
-
h.forEach((_,
|
|
129
|
-
const
|
|
130
|
-
(
|
|
127
|
+
const h = Array.from(e.value.children), u = ie(h), r = /* @__PURE__ */ new Set(), f = window.getComputedStyle(e.value), m = f.columnGap || f.gap, O = m ? parseFloat(m) : 0;
|
|
128
|
+
h.forEach((_, E) => {
|
|
129
|
+
const y = u.get(_) || _.getAttribute(p.ACTION_ID) || void 0, w = _.getBoundingClientRect();
|
|
130
|
+
(E < h.length - 1 ? w.right + O : w.right) > s.left.value && y && r.add(y);
|
|
131
131
|
});
|
|
132
132
|
const S = Array.from(t.value).sort().join(","), B = Array.from(r).sort().join(",");
|
|
133
133
|
S !== B && (d(r, h, u), J(a.value, t.value), l && i.value !== B && (i.value = B, V(() => {
|
|
@@ -138,18 +138,18 @@ function Ce({
|
|
|
138
138
|
function v() {
|
|
139
139
|
o.value || !e.value || !n.value || (o.value = !0, g());
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function A() {
|
|
142
142
|
s.update();
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function I() {
|
|
145
145
|
g.cancel(), o.value = !1;
|
|
146
146
|
}
|
|
147
147
|
return {
|
|
148
148
|
calculateOverflow: v,
|
|
149
149
|
applyElementVisibility: ne,
|
|
150
150
|
updateOverflowState: d,
|
|
151
|
-
updateTrackerBounding:
|
|
152
|
-
cleanup:
|
|
151
|
+
updateTrackerBounding: A,
|
|
152
|
+
cleanup: I,
|
|
153
153
|
isProcessing: o
|
|
154
154
|
};
|
|
155
155
|
}
|
|
@@ -163,12 +163,12 @@ function Me({
|
|
|
163
163
|
hasMoreActionsSlot: i,
|
|
164
164
|
onOverflowChange: s
|
|
165
165
|
}) {
|
|
166
|
-
const d =
|
|
166
|
+
const d = T(!1), {
|
|
167
167
|
calculateOverflow: c,
|
|
168
168
|
applyElementVisibility: g,
|
|
169
169
|
updateOverflowState: v,
|
|
170
|
-
updateTrackerBounding:
|
|
171
|
-
cleanup:
|
|
170
|
+
updateTrackerBounding: A,
|
|
171
|
+
cleanup: I,
|
|
172
172
|
isProcessing: h
|
|
173
173
|
} = Ce({
|
|
174
174
|
actionsContainerRef: e,
|
|
@@ -181,12 +181,12 @@ function Me({
|
|
|
181
181
|
function m() {
|
|
182
182
|
t.value.clear(), l.value = 0;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function O() {
|
|
185
185
|
r && (r(), r = null), f && (f(), f = null);
|
|
186
186
|
}
|
|
187
187
|
const S = Z(
|
|
188
188
|
() => {
|
|
189
|
-
!e.value || !i.value || (j(e.value),
|
|
189
|
+
!e.value || !i.value || (j(e.value), O(), I(), E());
|
|
190
190
|
},
|
|
191
191
|
k.FAST,
|
|
192
192
|
{ leading: !1, trailing: !0 }
|
|
@@ -194,25 +194,25 @@ function Me({
|
|
|
194
194
|
function B() {
|
|
195
195
|
if (!e.value || !i.value)
|
|
196
196
|
return;
|
|
197
|
-
const
|
|
197
|
+
const y = Array.from(e.value.children), w = ie(y), $ = new Set(w.values());
|
|
198
198
|
Be(t.value, $);
|
|
199
|
-
const { stop: q } =
|
|
200
|
-
|
|
199
|
+
const { stop: q } = Te(e, () => {
|
|
200
|
+
A(), c();
|
|
201
201
|
});
|
|
202
202
|
r = q;
|
|
203
|
-
const { stop:
|
|
204
|
-
|
|
203
|
+
const { stop: b } = be(
|
|
204
|
+
y,
|
|
205
205
|
(M) => {
|
|
206
206
|
if (h.value)
|
|
207
207
|
return;
|
|
208
208
|
let D = !1;
|
|
209
209
|
const N = new Set(t.value);
|
|
210
210
|
if (M.forEach((R) => {
|
|
211
|
-
const F = R.target, x =
|
|
211
|
+
const F = R.target, x = w.get(F) || F.getAttribute(p.ACTION_ID) || void 0;
|
|
212
212
|
R.intersectionRatio === 1 ? x && N.has(x) && (N.delete(x), D = !0) : x && !N.has(x) && (N.add(x), D = !0);
|
|
213
213
|
}), D) {
|
|
214
214
|
const R = Array.from(t.value).sort().join(","), F = Array.from(N).sort().join(",");
|
|
215
|
-
R !== F && (v(N,
|
|
215
|
+
R !== F && (v(N, y, w), J(a.value, t.value), s && V(() => {
|
|
216
216
|
s();
|
|
217
217
|
}));
|
|
218
218
|
}
|
|
@@ -221,8 +221,8 @@ function Me({
|
|
|
221
221
|
root: e.value
|
|
222
222
|
}
|
|
223
223
|
);
|
|
224
|
-
f =
|
|
225
|
-
const D =
|
|
224
|
+
f = b, y.forEach((M) => {
|
|
225
|
+
const D = w.get(M) || M.getAttribute(p.ACTION_ID) || "";
|
|
226
226
|
g(M, D, t.value);
|
|
227
227
|
}), c(), J(a.value, t.value);
|
|
228
228
|
}
|
|
@@ -234,7 +234,7 @@ function Me({
|
|
|
234
234
|
// Only watch direct children
|
|
235
235
|
})));
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const E = Z(
|
|
238
238
|
() => {
|
|
239
239
|
d.value || (d.value = !0, _(), d.value = !1);
|
|
240
240
|
},
|
|
@@ -244,11 +244,11 @@ function Me({
|
|
|
244
244
|
ue(() => {
|
|
245
245
|
i.value && (j(e.value), _());
|
|
246
246
|
}), re(() => {
|
|
247
|
-
i.value && (j(e.value), e.value && Array.from(e.value.children).length === 0 && m(),
|
|
247
|
+
i.value && (j(e.value), e.value && Array.from(e.value.children).length === 0 && m(), O(), I(), E());
|
|
248
248
|
}), ce(() => {
|
|
249
|
-
|
|
249
|
+
O(), I(), S.cancel(), E.cancel(), u && (u.disconnect(), u = null);
|
|
250
250
|
}), oe(() => {
|
|
251
|
-
|
|
251
|
+
O(), I(), S.cancel(), E.cancel(), u && (u.disconnect(), u = null);
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
254
|
function Ne({
|
|
@@ -267,7 +267,7 @@ function Ne({
|
|
|
267
267
|
return i + c;
|
|
268
268
|
}
|
|
269
269
|
return i;
|
|
270
|
-
}, o =
|
|
270
|
+
}, o = T(0);
|
|
271
271
|
return X(n, (i) => {
|
|
272
272
|
i && e.value && V(() => {
|
|
273
273
|
const s = l();
|
|
@@ -279,7 +279,7 @@ function Ne({
|
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
function xe({ actionsContainerRef: e, overflowIds: t }) {
|
|
282
|
-
const a =
|
|
282
|
+
const a = T(0), n = T(!1), l = T(!1);
|
|
283
283
|
let o = null;
|
|
284
284
|
const i = () => {
|
|
285
285
|
if (!e.value) {
|
|
@@ -288,13 +288,13 @@ function xe({ actionsContainerRef: e, overflowIds: t }) {
|
|
|
288
288
|
}
|
|
289
289
|
let c = 0;
|
|
290
290
|
const g = Array.from(e.value.children);
|
|
291
|
-
g.forEach((v,
|
|
292
|
-
const
|
|
291
|
+
g.forEach((v, A) => {
|
|
292
|
+
const I = v.getAttribute(p.ACTION_ID), h = !I || !t.value.has(I), u = v.classList.contains("invisible");
|
|
293
293
|
if (h && !u) {
|
|
294
294
|
const r = v.getBoundingClientRect();
|
|
295
|
-
if (c += r.width,
|
|
296
|
-
const f = window.getComputedStyle(e.value), m = f.columnGap || f.gap,
|
|
297
|
-
c +=
|
|
295
|
+
if (c += r.width, A < g.length - 1 && e.value) {
|
|
296
|
+
const f = window.getComputedStyle(e.value), m = f.columnGap || f.gap, O = m ? parseFloat(m) : 0;
|
|
297
|
+
c += O;
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
}), a.value = c;
|
|
@@ -325,14 +325,14 @@ const We = ["id"], Ve = /* @__PURE__ */ de({
|
|
|
325
325
|
props: {
|
|
326
326
|
actionsContainerClass: { default: void 0 },
|
|
327
327
|
actionsContainerTag: { default: "div" },
|
|
328
|
-
moreButtonText: { default: () =>
|
|
328
|
+
moreButtonText: { default: () => Oe("ll.more") },
|
|
329
329
|
width: { default: void 0 },
|
|
330
330
|
dropdownMode: { default: "default" },
|
|
331
331
|
moreButtonAlign: { default: "separate" }
|
|
332
332
|
},
|
|
333
333
|
setup(e) {
|
|
334
|
-
const t = e, a = fe(), n = W(() => !!a["more-actions"]), l = U("actionsContainerRef"), o = U("moreDropdownRef"), i = U("moreDropdownMenuRef"), s = U("trackerElementRef"), d =
|
|
335
|
-
isVisible:
|
|
334
|
+
const t = e, a = fe(), n = W(() => !!a["more-actions"]), l = U("actionsContainerRef"), o = U("moreDropdownRef"), i = U("moreDropdownMenuRef"), s = U("trackerElementRef"), d = T(/* @__PURE__ */ new Set()), c = T(!1), g = Ae(Q.MORE_MENU), v = T(null), A = T(!1), {
|
|
335
|
+
isVisible: I,
|
|
336
336
|
shouldShow: h,
|
|
337
337
|
toggle: u
|
|
338
338
|
} = _e({
|
|
@@ -344,14 +344,14 @@ const We = ["id"], Ve = /* @__PURE__ */ de({
|
|
|
344
344
|
moreButtonAlign: t.moreButtonAlign,
|
|
345
345
|
hasOverflowActions: r
|
|
346
346
|
}), {
|
|
347
|
-
visibleElementsWidth:
|
|
347
|
+
visibleElementsWidth: O,
|
|
348
348
|
isRecalculatingWithDelay: S,
|
|
349
349
|
calculateVisibleElementsWidthDelayed: B,
|
|
350
350
|
cleanup: _
|
|
351
351
|
} = xe({
|
|
352
352
|
actionsContainerRef: l,
|
|
353
353
|
overflowIds: d
|
|
354
|
-
}),
|
|
354
|
+
}), E = W(() => n.value && r.value && !S.value && A.value), y = W(() => c.value.toString()), w = W(() => E.value ? `calc(100% - ${m.value}px)` : "100%"), $ = W(() => t.moreButtonAlign === "together" ? { left: `${O.value}px`, right: "auto" } : { right: "0", left: "auto" });
|
|
355
355
|
Me({
|
|
356
356
|
actionsContainerRef: l,
|
|
357
357
|
overflowIds: d,
|
|
@@ -363,21 +363,21 @@ const We = ["id"], Ve = /* @__PURE__ */ de({
|
|
|
363
363
|
onOverflowChange: B
|
|
364
364
|
}), X(
|
|
365
365
|
() => n.value && r.value && !S.value,
|
|
366
|
-
(
|
|
367
|
-
v.value && (clearTimeout(v.value), v.value = null),
|
|
368
|
-
|
|
369
|
-
}, k.FAST) :
|
|
366
|
+
(b) => {
|
|
367
|
+
v.value && (clearTimeout(v.value), v.value = null), b ? v.value = setTimeout(() => {
|
|
368
|
+
A.value = !0;
|
|
369
|
+
}, k.FAST) : A.value = !1;
|
|
370
370
|
}
|
|
371
|
-
), X(
|
|
372
|
-
u(
|
|
371
|
+
), X(E, (b) => {
|
|
372
|
+
u(b);
|
|
373
373
|
});
|
|
374
|
-
function q(
|
|
375
|
-
c.value =
|
|
374
|
+
function q(b) {
|
|
375
|
+
c.value = b;
|
|
376
376
|
}
|
|
377
377
|
return oe(() => {
|
|
378
378
|
_(), v.value && clearTimeout(v.value);
|
|
379
|
-
}), (
|
|
380
|
-
class: "stash-more-actions
|
|
379
|
+
}), (b, M) => (H(), ve("div", {
|
|
380
|
+
class: "stash-more-actions relative overflow-x-hidden",
|
|
381
381
|
"data-test": "stash-more-actions",
|
|
382
382
|
style: z({ width: t.width })
|
|
383
383
|
}, [
|
|
@@ -386,16 +386,13 @@ const We = ["id"], Ve = /* @__PURE__ */ de({
|
|
|
386
386
|
ref: l,
|
|
387
387
|
"data-test": "stash-more-actions__container",
|
|
388
388
|
style: z({
|
|
389
|
-
width:
|
|
389
|
+
width: w.value,
|
|
390
390
|
minWidth: C(m) ? `${C(m)}px` : void 0
|
|
391
391
|
}),
|
|
392
|
-
class: te([
|
|
393
|
-
"stash-more-actions__container tw-flex tw-items-center tw-gap-2 tw-overflow-x-hidden",
|
|
394
|
-
t.actionsContainerClass
|
|
395
|
-
])
|
|
392
|
+
class: te(["stash-more-actions__container flex items-center gap-2 overflow-x-hidden", t.actionsContainerClass])
|
|
396
393
|
}, {
|
|
397
394
|
default: P(() => [
|
|
398
|
-
G(
|
|
395
|
+
G(b.$slots, "default")
|
|
399
396
|
]),
|
|
400
397
|
_: 3
|
|
401
398
|
}, 8, ["style", "class"])),
|
|
@@ -414,33 +411,33 @@ const We = ["id"], Ve = /* @__PURE__ */ de({
|
|
|
414
411
|
zIndex: C(De).TRACKER
|
|
415
412
|
})
|
|
416
413
|
}, null, 4),
|
|
417
|
-
n.value ? (H(), Y(
|
|
414
|
+
n.value ? (H(), Y(Ee, {
|
|
418
415
|
key: 0,
|
|
419
416
|
ref_key: "moreDropdownRef",
|
|
420
417
|
ref: o,
|
|
421
418
|
class: te([
|
|
422
|
-
"!
|
|
423
|
-
C(h) ? "
|
|
424
|
-
{
|
|
419
|
+
"!absolute top-0",
|
|
420
|
+
C(h) ? "animate-fade-in" : "animate-fade-out",
|
|
421
|
+
{ invisible: !C(I) }
|
|
425
422
|
]),
|
|
426
423
|
style: z($.value),
|
|
427
424
|
onToggle: q
|
|
428
425
|
}, {
|
|
429
426
|
toggle: P(({ toggle: D }) => [
|
|
430
|
-
G(
|
|
427
|
+
G(b.$slots, "toggle", {
|
|
431
428
|
toggle: D,
|
|
432
429
|
isOpen: c.value
|
|
433
430
|
}, () => [
|
|
434
|
-
le(
|
|
435
|
-
class: "button
|
|
431
|
+
le(ye, {
|
|
432
|
+
class: "button -border-gray-500 text-gray-500 flex w-full items-center justify-between -border",
|
|
436
433
|
secondary: "",
|
|
437
|
-
"aria-expanded":
|
|
434
|
+
"aria-expanded": y.value,
|
|
438
435
|
onClick: D
|
|
439
436
|
}, {
|
|
440
437
|
default: P(() => [
|
|
441
438
|
pe(ge(t.moreButtonText) + " ", 1),
|
|
442
|
-
le(
|
|
443
|
-
class: "
|
|
439
|
+
le(we, {
|
|
440
|
+
class: "-ml-1.5",
|
|
444
441
|
name: "action-dots"
|
|
445
442
|
})
|
|
446
443
|
]),
|
|
@@ -454,9 +451,9 @@ const We = ["id"], Ve = /* @__PURE__ */ de({
|
|
|
454
451
|
ref_key: "moreDropdownMenuRef",
|
|
455
452
|
ref: i,
|
|
456
453
|
"data-test": "stash-more-actions__dropdown",
|
|
457
|
-
class: "
|
|
454
|
+
class: "flex flex-col gap-1.5 p-1.5"
|
|
458
455
|
}, [
|
|
459
|
-
G(
|
|
456
|
+
G(b.$slots, "more-actions")
|
|
460
457
|
], 8, We)
|
|
461
458
|
]),
|
|
462
459
|
_: 3
|