sprintify-ui 0.8.31 → 0.8.33
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 +54 -54
- 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 +0 -1
- package/src/components/BaseLayoutStackedConfigurable.vue +0 -1
- package/src/components/BaseMenu.stories.js +6 -1
- package/src/components/BaseMenu.vue +13 -5
- package/src/components/BaseMenuItem.vue +3 -3
- package/src/components/BaseNavbar.stories.js +1 -1
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -23861,7 +23861,7 @@ let Ky = Ar.RenderStrategy, Ua = ye({ props: { as: { type: [Object, String], def
|
|
|
23861
23861
|
} });
|
|
23862
23862
|
const rR = { class: "grow" }, iR = {
|
|
23863
23863
|
key: 1,
|
|
23864
|
-
class: "relative -top-px ml-
|
|
23864
|
+
class: "relative -top-px ml-3"
|
|
23865
23865
|
}, ml = /* @__PURE__ */ ye({
|
|
23866
23866
|
__name: "BaseMenuItem",
|
|
23867
23867
|
props: {
|
|
@@ -23922,7 +23922,7 @@ const rR = { class: "grow" }, iR = {
|
|
|
23922
23922
|
const s = Kt("BaseIcon");
|
|
23923
23923
|
return I(), Y("div", {
|
|
23924
23924
|
style: it(_(i)),
|
|
23925
|
-
class: ce(["rounded
|
|
23925
|
+
class: ce(["rounded text-left", [
|
|
23926
23926
|
n.disabled ? "" : "hover:bg-slate-100",
|
|
23927
23927
|
n.active && !n.disabled ? "bg-slate-100" : "bg-white",
|
|
23928
23928
|
n.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
@@ -23938,7 +23938,7 @@ const rR = { class: "grow" }, iR = {
|
|
|
23938
23938
|
}, null, 8, ["icon", "class"])) : ve("", !0),
|
|
23939
23939
|
j("div", rR, [
|
|
23940
23940
|
j("p", {
|
|
23941
|
-
class: ce(["font-medium", _(r), _(e)])
|
|
23941
|
+
class: ce(["font-medium leading-tight", _(r), _(e)])
|
|
23942
23942
|
}, Ce(n.label), 3),
|
|
23943
23943
|
n.description ? (I(), Y("p", {
|
|
23944
23944
|
key: 0,
|
|
@@ -23976,8 +23976,8 @@ const rR = { class: "grow" }, iR = {
|
|
|
23976
23976
|
type: String
|
|
23977
23977
|
},
|
|
23978
23978
|
width: {
|
|
23979
|
-
default:
|
|
23980
|
-
type: Number
|
|
23979
|
+
default: void 0,
|
|
23980
|
+
type: [Number, null, void 0]
|
|
23981
23981
|
},
|
|
23982
23982
|
twMenu: {
|
|
23983
23983
|
default: "",
|
|
@@ -23995,12 +23995,15 @@ const rR = { class: "grow" }, iR = {
|
|
|
23995
23995
|
fallbackPlacements: ["right", "bottom"]
|
|
23996
23996
|
})],
|
|
23997
23997
|
whileElementsMounted: Od
|
|
23998
|
+
}), o = N(() => {
|
|
23999
|
+
if (t.width)
|
|
24000
|
+
return `${t.width}px`;
|
|
23998
24001
|
});
|
|
23999
|
-
return (
|
|
24002
|
+
return (l, a) => (I(), Se(_(zO), {
|
|
24000
24003
|
as: "div",
|
|
24001
24004
|
class: "text-left"
|
|
24002
24005
|
}, {
|
|
24003
|
-
default: he(({ open:
|
|
24006
|
+
default: he(({ open: s }) => [
|
|
24004
24007
|
j("div", {
|
|
24005
24008
|
ref_key: "buttonWrapRef",
|
|
24006
24009
|
ref: e
|
|
@@ -24009,7 +24012,7 @@ const rR = { class: "grow" }, iR = {
|
|
|
24009
24012
|
class: ce(n.twButton)
|
|
24010
24013
|
}, {
|
|
24011
24014
|
default: he(() => [
|
|
24012
|
-
Re(
|
|
24015
|
+
Re(l.$slots, "button", { open: s })
|
|
24013
24016
|
]),
|
|
24014
24017
|
_: 2
|
|
24015
24018
|
}, 1032, ["class"])
|
|
@@ -24019,8 +24022,8 @@ const rR = { class: "grow" }, iR = {
|
|
|
24019
24022
|
ref_key: "menuItemsRef",
|
|
24020
24023
|
ref: r,
|
|
24021
24024
|
style: it({
|
|
24022
|
-
|
|
24023
|
-
|
|
24025
|
+
width: _(o),
|
|
24026
|
+
..._(i)
|
|
24024
24027
|
}),
|
|
24025
24028
|
class: "fixed top-0 left-0 z-menu"
|
|
24026
24029
|
}, [
|
|
@@ -24035,32 +24038,32 @@ const rR = { class: "grow" }, iR = {
|
|
|
24035
24038
|
default: he(() => [
|
|
24036
24039
|
ge(_($O), {
|
|
24037
24040
|
style: it({
|
|
24038
|
-
width:
|
|
24041
|
+
width: _(o)
|
|
24039
24042
|
}),
|
|
24040
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))
|
|
24041
24044
|
}, {
|
|
24042
24045
|
default: he(() => [
|
|
24043
|
-
Re(
|
|
24044
|
-
(I(!0), Y(Ge, null, at(n.items, (
|
|
24045
|
-
var
|
|
24046
|
+
Re(l.$slots, "items", { items: n.items }, () => [
|
|
24047
|
+
(I(!0), Y(Ge, null, at(n.items, (c) => {
|
|
24048
|
+
var d;
|
|
24046
24049
|
return I(), Y(Ge, {
|
|
24047
|
-
key:
|
|
24050
|
+
key: c.label + "link"
|
|
24048
24051
|
}, [
|
|
24049
|
-
(
|
|
24050
|
-
default: he(({ active:
|
|
24051
|
-
(I(), Se(Vn(
|
|
24052
|
-
to:
|
|
24053
|
-
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
|
|
24054
24057
|
}, {
|
|
24055
24058
|
default: he(() => [
|
|
24056
|
-
Re(
|
|
24059
|
+
Re(l.$slots, "item", { item: c }, () => [
|
|
24057
24060
|
ge(ml, {
|
|
24058
|
-
label:
|
|
24059
|
-
count:
|
|
24060
|
-
icon:
|
|
24061
|
-
color:
|
|
24062
|
-
disabled:
|
|
24063
|
-
active:
|
|
24061
|
+
label: c.label,
|
|
24062
|
+
count: c.count,
|
|
24063
|
+
icon: c.icon,
|
|
24064
|
+
color: c.color,
|
|
24065
|
+
disabled: c.disabled,
|
|
24066
|
+
active: f,
|
|
24064
24067
|
size: n.size
|
|
24065
24068
|
}, null, 8, ["label", "count", "icon", "color", "disabled", "active", "size"])
|
|
24066
24069
|
])
|
|
@@ -24069,44 +24072,44 @@ const rR = { class: "grow" }, iR = {
|
|
|
24069
24072
|
}, 1064, ["to", "onMouseup"]))
|
|
24070
24073
|
]),
|
|
24071
24074
|
_: 2
|
|
24072
|
-
}, 1024)) :
|
|
24075
|
+
}, 1024)) : c.href ? (I(), Se(_(vo), {
|
|
24073
24076
|
key: 2,
|
|
24074
|
-
as:
|
|
24075
|
-
href:
|
|
24077
|
+
as: c.disabled ? "span" : "a",
|
|
24078
|
+
href: c.href
|
|
24076
24079
|
}, {
|
|
24077
|
-
default: he(({ active:
|
|
24078
|
-
Re(
|
|
24080
|
+
default: he(({ active: f }) => [
|
|
24081
|
+
Re(l.$slots, "item", { item: c }, () => [
|
|
24079
24082
|
ge(ml, {
|
|
24080
|
-
label:
|
|
24081
|
-
count:
|
|
24082
|
-
icon:
|
|
24083
|
-
color:
|
|
24084
|
-
disabled:
|
|
24085
|
-
active:
|
|
24083
|
+
label: c.label,
|
|
24084
|
+
count: c.count,
|
|
24085
|
+
icon: c.icon,
|
|
24086
|
+
color: c.color,
|
|
24087
|
+
disabled: c.disabled,
|
|
24088
|
+
active: f,
|
|
24086
24089
|
size: n.size
|
|
24087
24090
|
}, null, 8, ["label", "count", "icon", "color", "disabled", "active", "size"])
|
|
24088
24091
|
])
|
|
24089
24092
|
]),
|
|
24090
24093
|
_: 2
|
|
24091
|
-
}, 1032, ["as", "href"])) :
|
|
24094
|
+
}, 1032, ["as", "href"])) : c.action ? (I(), Se(_(vo), {
|
|
24092
24095
|
key: 3,
|
|
24093
24096
|
as: "button",
|
|
24094
24097
|
type: "button",
|
|
24095
|
-
class: "
|
|
24096
|
-
onClick: (
|
|
24098
|
+
class: "block",
|
|
24099
|
+
onClick: (f) => c.disabled ? !1 : c.action()
|
|
24097
24100
|
}, {
|
|
24098
|
-
default: he(({ active:
|
|
24099
|
-
Re(
|
|
24100
|
-
item:
|
|
24101
|
-
active:
|
|
24101
|
+
default: he(({ active: f }) => [
|
|
24102
|
+
Re(l.$slots, "item", {
|
|
24103
|
+
item: c,
|
|
24104
|
+
active: f
|
|
24102
24105
|
}, () => [
|
|
24103
24106
|
ge(ml, {
|
|
24104
|
-
label:
|
|
24105
|
-
count:
|
|
24106
|
-
icon:
|
|
24107
|
-
color:
|
|
24108
|
-
disabled:
|
|
24109
|
-
active:
|
|
24107
|
+
label: c.label,
|
|
24108
|
+
count: c.count,
|
|
24109
|
+
icon: c.icon,
|
|
24110
|
+
color: c.color,
|
|
24111
|
+
disabled: c.disabled,
|
|
24112
|
+
active: f,
|
|
24110
24113
|
size: n.size
|
|
24111
24114
|
}, null, 8, ["label", "count", "icon", "color", "disabled", "active", "size"])
|
|
24112
24115
|
])
|
|
@@ -24908,7 +24911,6 @@ const rR = { class: "grow" }, iR = {
|
|
|
24908
24911
|
}, null, 8, ["section", "size", "onOpen"]))), 128)) : ve("", !0),
|
|
24909
24912
|
n.actions && n.actions.length ? (I(), Se(yi, {
|
|
24910
24913
|
key: 2,
|
|
24911
|
-
"tw-menu": "w-52",
|
|
24912
24914
|
size: _(g).size.value == "sm" ? "xs" : "sm",
|
|
24913
24915
|
items: n.actions
|
|
24914
24916
|
}, {
|
|
@@ -26535,7 +26537,6 @@ const iM = ["align", "colspan"], ob = /* @__PURE__ */ ye({
|
|
|
26535
26537
|
]),
|
|
26536
26538
|
(K = n.checkableActions) != null && K.length ? (I(), Se(yi, {
|
|
26537
26539
|
key: 0,
|
|
26538
|
-
"tw-menu": "w-52",
|
|
26539
26540
|
items: n.checkableActions
|
|
26540
26541
|
}, {
|
|
26541
26542
|
button: he(({ open: Q }) => [
|
|
@@ -46472,7 +46473,6 @@ const vP = /* @__PURE__ */ Ro(cP, [["render", gP]]), yP = /* @__PURE__ */ j("spa
|
|
|
46472
46473
|
}, null, 8, ["class", "dark", "size", "notifications-config"])) : ve("", !0),
|
|
46473
46474
|
s ? ve("", !0) : (I(), Se(yi, {
|
|
46474
46475
|
key: 1,
|
|
46475
|
-
"tw-menu": "w-52",
|
|
46476
46476
|
size: "sm",
|
|
46477
46477
|
items: n.userMenu
|
|
46478
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
|
@@ -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
|
>
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
v-slot="{ active }"
|
|
103
103
|
as="button"
|
|
104
104
|
type="button"
|
|
105
|
-
class="
|
|
105
|
+
class="block"
|
|
106
106
|
@click="item.disabled ? false : item.action()"
|
|
107
107
|
>
|
|
108
108
|
<slot
|
|
@@ -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"
|