sprintify-ui 0.8.30 → 0.8.32
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/dist/sprintify-ui.es.js +56 -55
- package/dist/types/components/BaseMenu.vue.d.ts +5 -5
- package/package.json +1 -1
- package/src/components/BaseDataIterator.vue +0 -1
- package/src/components/BaseDataTable.vue +1 -2
- package/src/components/BaseDialog.vue +1 -1
- package/src/components/BaseLayoutStackedConfigurable.vue +0 -1
- package/src/components/BaseMenu.stories.js +6 -1
- package/src/components/BaseMenu.vue +12 -4
- package/src/components/BaseMenuItem.vue +3 -3
- package/src/components/BaseNavbar.stories.js +1 -1
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -7312,7 +7312,8 @@ const Yx = {
|
|
|
7312
7312
|
]),
|
|
7313
7313
|
j("div", rS, [
|
|
7314
7314
|
ge(pi, {
|
|
7315
|
-
|
|
7315
|
+
ref_key: "confirmRef",
|
|
7316
|
+
ref: i,
|
|
7316
7317
|
size: "sm",
|
|
7317
7318
|
class: "mb-2 w-full sm:mb-0 sm:w-auto",
|
|
7318
7319
|
color: n.color
|
|
@@ -23860,7 +23861,7 @@ let Ky = Ar.RenderStrategy, Ua = ye({ props: { as: { type: [Object, String], def
|
|
|
23860
23861
|
} });
|
|
23861
23862
|
const rR = { class: "grow" }, iR = {
|
|
23862
23863
|
key: 1,
|
|
23863
|
-
class: "relative -top-px ml-
|
|
23864
|
+
class: "relative -top-px ml-3"
|
|
23864
23865
|
}, ml = /* @__PURE__ */ ye({
|
|
23865
23866
|
__name: "BaseMenuItem",
|
|
23866
23867
|
props: {
|
|
@@ -23921,7 +23922,7 @@ const rR = { class: "grow" }, iR = {
|
|
|
23921
23922
|
const s = Kt("BaseIcon");
|
|
23922
23923
|
return I(), Y("div", {
|
|
23923
23924
|
style: it(_(i)),
|
|
23924
|
-
class: ce(["rounded
|
|
23925
|
+
class: ce(["rounded text-left", [
|
|
23925
23926
|
n.disabled ? "" : "hover:bg-slate-100",
|
|
23926
23927
|
n.active && !n.disabled ? "bg-slate-100" : "bg-white",
|
|
23927
23928
|
n.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
@@ -23937,7 +23938,7 @@ const rR = { class: "grow" }, iR = {
|
|
|
23937
23938
|
}, null, 8, ["icon", "class"])) : ve("", !0),
|
|
23938
23939
|
j("div", rR, [
|
|
23939
23940
|
j("p", {
|
|
23940
|
-
class: ce(["font-medium", _(r), _(e)])
|
|
23941
|
+
class: ce(["font-medium leading-tight", _(r), _(e)])
|
|
23941
23942
|
}, Ce(n.label), 3),
|
|
23942
23943
|
n.description ? (I(), Y("p", {
|
|
23943
23944
|
key: 0,
|
|
@@ -23975,8 +23976,8 @@ const rR = { class: "grow" }, iR = {
|
|
|
23975
23976
|
type: String
|
|
23976
23977
|
},
|
|
23977
23978
|
width: {
|
|
23978
|
-
default:
|
|
23979
|
-
type: Number
|
|
23979
|
+
default: void 0,
|
|
23980
|
+
type: [Number, null, void 0]
|
|
23980
23981
|
},
|
|
23981
23982
|
twMenu: {
|
|
23982
23983
|
default: "",
|
|
@@ -23994,12 +23995,15 @@ const rR = { class: "grow" }, iR = {
|
|
|
23994
23995
|
fallbackPlacements: ["right", "bottom"]
|
|
23995
23996
|
})],
|
|
23996
23997
|
whileElementsMounted: Od
|
|
23998
|
+
}), o = N(() => {
|
|
23999
|
+
if (t.width)
|
|
24000
|
+
return `${t.width}px`;
|
|
23997
24001
|
});
|
|
23998
|
-
return (
|
|
24002
|
+
return (l, a) => (I(), Se(_(zO), {
|
|
23999
24003
|
as: "div",
|
|
24000
24004
|
class: "text-left"
|
|
24001
24005
|
}, {
|
|
24002
|
-
default: he(({ open:
|
|
24006
|
+
default: he(({ open: s }) => [
|
|
24003
24007
|
j("div", {
|
|
24004
24008
|
ref_key: "buttonWrapRef",
|
|
24005
24009
|
ref: e
|
|
@@ -24008,7 +24012,7 @@ const rR = { class: "grow" }, iR = {
|
|
|
24008
24012
|
class: ce(n.twButton)
|
|
24009
24013
|
}, {
|
|
24010
24014
|
default: he(() => [
|
|
24011
|
-
Re(
|
|
24015
|
+
Re(l.$slots, "button", { open: s })
|
|
24012
24016
|
]),
|
|
24013
24017
|
_: 2
|
|
24014
24018
|
}, 1032, ["class"])
|
|
@@ -24018,8 +24022,8 @@ const rR = { class: "grow" }, iR = {
|
|
|
24018
24022
|
ref_key: "menuItemsRef",
|
|
24019
24023
|
ref: r,
|
|
24020
24024
|
style: it({
|
|
24021
|
-
|
|
24022
|
-
|
|
24025
|
+
width: _(o),
|
|
24026
|
+
..._(i)
|
|
24023
24027
|
}),
|
|
24024
24028
|
class: "fixed top-0 left-0 z-menu"
|
|
24025
24029
|
}, [
|
|
@@ -24034,32 +24038,32 @@ const rR = { class: "grow" }, iR = {
|
|
|
24034
24038
|
default: he(() => [
|
|
24035
24039
|
ge(_($O), {
|
|
24036
24040
|
style: it({
|
|
24037
|
-
width:
|
|
24041
|
+
width: _(o)
|
|
24038
24042
|
}),
|
|
24039
24043
|
class: ce(_(gt)("rounded-md bg-white p-1 shadow-2xl outline-none ring-1 ring-black ring-opacity-10 focus:outline-none", n.twMenu))
|
|
24040
24044
|
}, {
|
|
24041
24045
|
default: he(() => [
|
|
24042
|
-
Re(
|
|
24043
|
-
(I(!0), Y(Ge, null, at(n.items, (
|
|
24044
|
-
var
|
|
24046
|
+
Re(l.$slots, "items", { items: n.items }, () => [
|
|
24047
|
+
(I(!0), Y(Ge, null, at(n.items, (c) => {
|
|
24048
|
+
var d;
|
|
24045
24049
|
return I(), Y(Ge, {
|
|
24046
|
-
key:
|
|
24050
|
+
key: c.label + "link"
|
|
24047
24051
|
}, [
|
|
24048
|
-
(
|
|
24049
|
-
default: he(({ active:
|
|
24050
|
-
(I(), Se(Vn(
|
|
24051
|
-
to:
|
|
24052
|
-
onMouseup:
|
|
24052
|
+
(d = c.meta) != null && d.line ? (I(), Y("div", oR)) : c.to ? (I(), Se(_(vo), { key: 1 }, {
|
|
24053
|
+
default: he(({ active: f, close: h }) => [
|
|
24054
|
+
(I(), Se(Vn(c.disabled ? "span" : "router-link"), {
|
|
24055
|
+
to: c.to,
|
|
24056
|
+
onMouseup: h
|
|
24053
24057
|
}, {
|
|
24054
24058
|
default: he(() => [
|
|
24055
|
-
Re(
|
|
24059
|
+
Re(l.$slots, "item", { item: c }, () => [
|
|
24056
24060
|
ge(ml, {
|
|
24057
|
-
label:
|
|
24058
|
-
count:
|
|
24059
|
-
icon:
|
|
24060
|
-
color:
|
|
24061
|
-
disabled:
|
|
24062
|
-
active:
|
|
24061
|
+
label: c.label,
|
|
24062
|
+
count: c.count,
|
|
24063
|
+
icon: c.icon,
|
|
24064
|
+
color: c.color,
|
|
24065
|
+
disabled: c.disabled,
|
|
24066
|
+
active: f,
|
|
24063
24067
|
size: n.size
|
|
24064
24068
|
}, null, 8, ["label", "count", "icon", "color", "disabled", "active", "size"])
|
|
24065
24069
|
])
|
|
@@ -24068,44 +24072,44 @@ const rR = { class: "grow" }, iR = {
|
|
|
24068
24072
|
}, 1064, ["to", "onMouseup"]))
|
|
24069
24073
|
]),
|
|
24070
24074
|
_: 2
|
|
24071
|
-
}, 1024)) :
|
|
24075
|
+
}, 1024)) : c.href ? (I(), Se(_(vo), {
|
|
24072
24076
|
key: 2,
|
|
24073
|
-
as:
|
|
24074
|
-
href:
|
|
24077
|
+
as: c.disabled ? "span" : "a",
|
|
24078
|
+
href: c.href
|
|
24075
24079
|
}, {
|
|
24076
|
-
default: he(({ active:
|
|
24077
|
-
Re(
|
|
24080
|
+
default: he(({ active: f }) => [
|
|
24081
|
+
Re(l.$slots, "item", { item: c }, () => [
|
|
24078
24082
|
ge(ml, {
|
|
24079
|
-
label:
|
|
24080
|
-
count:
|
|
24081
|
-
icon:
|
|
24082
|
-
color:
|
|
24083
|
-
disabled:
|
|
24084
|
-
active:
|
|
24083
|
+
label: c.label,
|
|
24084
|
+
count: c.count,
|
|
24085
|
+
icon: c.icon,
|
|
24086
|
+
color: c.color,
|
|
24087
|
+
disabled: c.disabled,
|
|
24088
|
+
active: f,
|
|
24085
24089
|
size: n.size
|
|
24086
24090
|
}, null, 8, ["label", "count", "icon", "color", "disabled", "active", "size"])
|
|
24087
24091
|
])
|
|
24088
24092
|
]),
|
|
24089
24093
|
_: 2
|
|
24090
|
-
}, 1032, ["as", "href"])) :
|
|
24094
|
+
}, 1032, ["as", "href"])) : c.action ? (I(), Se(_(vo), {
|
|
24091
24095
|
key: 3,
|
|
24092
24096
|
as: "button",
|
|
24093
24097
|
type: "button",
|
|
24094
24098
|
class: "w-full",
|
|
24095
|
-
onClick: (
|
|
24099
|
+
onClick: (f) => c.disabled ? !1 : c.action()
|
|
24096
24100
|
}, {
|
|
24097
|
-
default: he(({ active:
|
|
24098
|
-
Re(
|
|
24099
|
-
item:
|
|
24100
|
-
active:
|
|
24101
|
+
default: he(({ active: f }) => [
|
|
24102
|
+
Re(l.$slots, "item", {
|
|
24103
|
+
item: c,
|
|
24104
|
+
active: f
|
|
24101
24105
|
}, () => [
|
|
24102
24106
|
ge(ml, {
|
|
24103
|
-
label:
|
|
24104
|
-
count:
|
|
24105
|
-
icon:
|
|
24106
|
-
color:
|
|
24107
|
-
disabled:
|
|
24108
|
-
active:
|
|
24107
|
+
label: c.label,
|
|
24108
|
+
count: c.count,
|
|
24109
|
+
icon: c.icon,
|
|
24110
|
+
color: c.color,
|
|
24111
|
+
disabled: c.disabled,
|
|
24112
|
+
active: f,
|
|
24109
24113
|
size: n.size
|
|
24110
24114
|
}, null, 8, ["label", "count", "icon", "color", "disabled", "active", "size"])
|
|
24111
24115
|
])
|
|
@@ -24907,7 +24911,6 @@ const rR = { class: "grow" }, iR = {
|
|
|
24907
24911
|
}, null, 8, ["section", "size", "onOpen"]))), 128)) : ve("", !0),
|
|
24908
24912
|
n.actions && n.actions.length ? (I(), Se(yi, {
|
|
24909
24913
|
key: 2,
|
|
24910
|
-
"tw-menu": "w-52",
|
|
24911
24914
|
size: _(g).size.value == "sm" ? "xs" : "sm",
|
|
24912
24915
|
items: n.actions
|
|
24913
24916
|
}, {
|
|
@@ -26534,7 +26537,6 @@ const iM = ["align", "colspan"], ob = /* @__PURE__ */ ye({
|
|
|
26534
26537
|
]),
|
|
26535
26538
|
(K = n.checkableActions) != null && K.length ? (I(), Se(yi, {
|
|
26536
26539
|
key: 0,
|
|
26537
|
-
"tw-menu": "w-52",
|
|
26538
26540
|
items: n.checkableActions
|
|
26539
26541
|
}, {
|
|
26540
26542
|
button: he(({ open: Q }) => [
|
|
@@ -26580,7 +26582,7 @@ const iM = ["align", "colspan"], ob = /* @__PURE__ */ ye({
|
|
|
26580
26582
|
default: he(() => [
|
|
26581
26583
|
Re(F.$slots, "default"),
|
|
26582
26584
|
ge(eb, {
|
|
26583
|
-
visible: _(C).length,
|
|
26585
|
+
visible: _(C).length > 0,
|
|
26584
26586
|
toggle: !1,
|
|
26585
26587
|
"ignore-row-interactions": "",
|
|
26586
26588
|
"custom-key": "actions",
|
|
@@ -46471,7 +46473,6 @@ const vP = /* @__PURE__ */ Ro(cP, [["render", gP]]), yP = /* @__PURE__ */ j("spa
|
|
|
46471
46473
|
}, null, 8, ["class", "dark", "size", "notifications-config"])) : ve("", !0),
|
|
46472
46474
|
s ? ve("", !0) : (I(), Se(yi, {
|
|
46473
46475
|
key: 1,
|
|
46474
|
-
"tw-menu": "w-52",
|
|
46475
46476
|
size: "sm",
|
|
46476
46477
|
items: n.userMenu
|
|
46477
46478
|
}, {
|
|
@@ -14,8 +14,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
14
14
|
type: PropType<"xs" | "sm" | "md">;
|
|
15
15
|
};
|
|
16
16
|
width: {
|
|
17
|
-
default:
|
|
18
|
-
type:
|
|
17
|
+
default: undefined;
|
|
18
|
+
type: PropType<number | null | undefined>;
|
|
19
19
|
};
|
|
20
20
|
twMenu: {
|
|
21
21
|
default: string;
|
|
@@ -39,8 +39,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
39
39
|
type: PropType<"xs" | "sm" | "md">;
|
|
40
40
|
};
|
|
41
41
|
width: {
|
|
42
|
-
default:
|
|
43
|
-
type:
|
|
42
|
+
default: undefined;
|
|
43
|
+
type: PropType<number | null | undefined>;
|
|
44
44
|
};
|
|
45
45
|
twMenu: {
|
|
46
46
|
default: string;
|
|
@@ -55,7 +55,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
55
55
|
twButton: string | unknown[] | Record<string, any>;
|
|
56
56
|
items: ActionItem[];
|
|
57
57
|
placement: "top" | "bottom-end" | "bottom-start" | "bottom" | "top-start" | "top-end";
|
|
58
|
-
width: number;
|
|
58
|
+
width: number | null | undefined;
|
|
59
59
|
twMenu: string | string[];
|
|
60
60
|
}, {}>, {
|
|
61
61
|
button?(_: {
|
package/package.json
CHANGED
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
</div>
|
|
43
43
|
<BaseMenu
|
|
44
44
|
v-if="checkableActions?.length"
|
|
45
|
-
tw-menu="w-52"
|
|
46
45
|
:items="checkableActions"
|
|
47
46
|
>
|
|
48
47
|
<template #button="{ open }">
|
|
@@ -93,7 +92,7 @@
|
|
|
93
92
|
|
|
94
93
|
<BaseTableColumn
|
|
95
94
|
v-slot="{ row }"
|
|
96
|
-
:visible="rowActionsInternal.length"
|
|
95
|
+
:visible="rowActionsInternal.length > 0"
|
|
97
96
|
:toggle="false"
|
|
98
97
|
ignore-row-interactions
|
|
99
98
|
custom-key="actions"
|
|
@@ -36,7 +36,7 @@ const Template = (args) => ({
|
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
label: 'Google',
|
|
39
|
+
label: 'Open the Google Website on new tab',
|
|
40
40
|
icon: 'mdi-google',
|
|
41
41
|
href: 'https://google.com',
|
|
42
42
|
count: 1000,
|
|
@@ -127,3 +127,8 @@ const Template = (args) => ({
|
|
|
127
127
|
|
|
128
128
|
export const Demo = Template.bind({});
|
|
129
129
|
Demo.args = {};
|
|
130
|
+
|
|
131
|
+
export const FixedWidth = Template.bind({});
|
|
132
|
+
FixedWidth.args = {
|
|
133
|
+
width: 280
|
|
134
|
+
};
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
<div
|
|
18
18
|
ref="menuItemsRef"
|
|
19
19
|
:style="{
|
|
20
|
+
width: widthStyle,
|
|
20
21
|
...floatingStyles,
|
|
21
|
-
width: `${width}px`,
|
|
22
22
|
}"
|
|
23
23
|
class="fixed top-0 left-0 z-menu"
|
|
24
24
|
>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
>
|
|
33
33
|
<MenuItems
|
|
34
34
|
:style="{
|
|
35
|
-
width:
|
|
35
|
+
width: widthStyle,
|
|
36
36
|
}"
|
|
37
37
|
:class="twMerge('rounded-md bg-white p-1 shadow-2xl outline-none ring-1 ring-black ring-opacity-10 focus:outline-none', twMenu)"
|
|
38
38
|
>
|
|
@@ -152,8 +152,8 @@ const props = defineProps({
|
|
|
152
152
|
type: String as PropType<'xs' | 'sm' | 'md'>,
|
|
153
153
|
},
|
|
154
154
|
width: {
|
|
155
|
-
default:
|
|
156
|
-
type: Number,
|
|
155
|
+
default: undefined,
|
|
156
|
+
type: [Number, null, undefined] as PropType<number | null | undefined>,
|
|
157
157
|
},
|
|
158
158
|
twMenu: {
|
|
159
159
|
default: '',
|
|
@@ -176,4 +176,12 @@ const { floatingStyles } = useFloating(buttonWrapRef, menuItemsRef, {
|
|
|
176
176
|
whileElementsMounted: autoUpdate,
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
+
const widthStyle = computed(() => {
|
|
180
|
+
if (!props.width) {
|
|
181
|
+
return undefined;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return `${props.width}px`;
|
|
185
|
+
})
|
|
186
|
+
|
|
179
187
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
:style="buttonStyles"
|
|
4
|
-
class="rounded
|
|
4
|
+
class="rounded text-left"
|
|
5
5
|
:class="[
|
|
6
6
|
!disabled ? 'hover:bg-slate-100' : '',
|
|
7
7
|
active && !disabled ? 'bg-slate-100' : 'bg-white',
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
:class="[iconClasses]"
|
|
19
19
|
/>
|
|
20
20
|
<div class="grow">
|
|
21
|
-
<p :class="['font-medium', textClasses, textColor]">
|
|
21
|
+
<p :class="['font-medium leading-tight', textClasses, textColor]">
|
|
22
22
|
{{ label }}
|
|
23
23
|
</p>
|
|
24
24
|
<p
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
<div
|
|
33
33
|
v-if="count"
|
|
34
|
-
class="relative -top-px ml-
|
|
34
|
+
class="relative -top-px ml-3"
|
|
35
35
|
>
|
|
36
36
|
<BaseCounter
|
|
37
37
|
:count="count"
|
|
@@ -100,7 +100,7 @@ const Template = (args) => ({
|
|
|
100
100
|
|
|
101
101
|
<div class="hidden md:ml-6 md:flex md:items-center shrink-0">
|
|
102
102
|
<!-- Profile dropdown -->
|
|
103
|
-
<BaseMenu
|
|
103
|
+
<BaseMenu :items="userMenu">
|
|
104
104
|
<template #button="{ open }">
|
|
105
105
|
<div
|
|
106
106
|
class="flex rounded-full"
|