@code-coaching/vuetiful 0.4.1 → 0.5.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/dist/types/components/molecules/VDrawer.vue.d.ts +0 -18
- package/dist/types/services/drawer.service.d.ts +2 -3
- package/dist/vuetiful.es.mjs +22 -22
- package/dist/vuetiful.umd.js +9 -9
- package/package.json +2 -1
- package/src/assets/main.css +6 -6
- package/src/components/molecules/VDrawer.vue +7 -13
- package/src/env.d.ts +4 -4
- package/src/services/drawer.service.ts +15 -12
- package/src/styles/core.css +49 -49
- package/src/styles/elements/alerts.css +13 -13
- package/src/styles/elements/badges.css +24 -24
- package/src/styles/elements/breadcrumbs.css +19 -19
- package/src/styles/elements/buttons.css +86 -86
- package/src/styles/elements/cards.css +22 -22
- package/src/styles/elements/chips.css +17 -17
- package/src/styles/elements/forms.css +237 -236
- package/src/styles/elements/lists.css +39 -39
- package/src/styles/elements/logo-clouds.css +21 -21
- package/src/styles/elements/modals.css +3 -3
- package/src/styles/elements/placeholders.css +10 -10
- package/src/styles/elements/popups.css +7 -7
- package/src/styles/elements/tables.css +73 -73
- package/src/styles/elements.css +13 -13
- package/src/styles/highlight-js.css +33 -33
- package/src/styles/typography.css +97 -97
- package/src/styles/variants.css +145 -145
- package/src/themes/theme-rocket.css +104 -104
- package/src/themes/theme-sahara.css +111 -111
- package/src/themes/theme-seafoam.css +110 -109
- package/src/themes/theme-seasonal.css +101 -101
- package/src/themes/theme-skeleton.css +102 -102
- package/src/themes/theme-vintage.css +109 -109
- package/src/themes/theme-vuetiful-0.0.1.css +110 -110
- package/src/types/index.ts +1 -1
- package/src/types/tailwind.ts +21 -2
- package/src/utils/code-block/highlight.service.test.ts +1 -1
- package/src/utils/index.test.ts +1 -1
- package/src/utils/platform/platform.service.ts +3 -5
- package/src/utils/theme/theme.service.test.ts +2 -3
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import type { CssClasses } from "@/index";
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
position: {
|
|
4
|
-
type: () => "left" | "top" | "right" | "bottom";
|
|
5
|
-
default: string;
|
|
6
|
-
};
|
|
7
|
-
duration: {
|
|
8
|
-
type: () => 150 | 300;
|
|
9
|
-
default: number;
|
|
10
|
-
};
|
|
11
3
|
regionBackdrop: {
|
|
12
4
|
type: () => CssClasses;
|
|
13
5
|
default: string;
|
|
@@ -25,14 +17,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
17
|
default: string;
|
|
26
18
|
};
|
|
27
19
|
}, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
-
position: {
|
|
29
|
-
type: () => "left" | "top" | "right" | "bottom";
|
|
30
|
-
default: string;
|
|
31
|
-
};
|
|
32
|
-
duration: {
|
|
33
|
-
type: () => 150 | 300;
|
|
34
|
-
default: number;
|
|
35
|
-
};
|
|
36
20
|
regionBackdrop: {
|
|
37
21
|
type: () => CssClasses;
|
|
38
22
|
default: string;
|
|
@@ -50,8 +34,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
34
|
default: string;
|
|
51
35
|
};
|
|
52
36
|
}>>, {
|
|
53
|
-
position: "left" | "top" | "right" | "bottom";
|
|
54
|
-
duration: 150 | 300;
|
|
55
37
|
regionBackdrop: string;
|
|
56
38
|
regionDrawer: string;
|
|
57
39
|
labelledby: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface DrawerSettings {
|
|
2
2
|
id?: string;
|
|
3
3
|
open?: boolean;
|
|
4
|
-
position?:
|
|
4
|
+
position?: "left" | "top" | "right" | "bottom";
|
|
5
5
|
duration?: 150 | 300;
|
|
6
6
|
regionBackdrop?: string;
|
|
7
7
|
regionDrawer?: string;
|
|
@@ -18,7 +18,6 @@ declare const useDrawer: () => {
|
|
|
18
18
|
readonly regionDrawer?: string | undefined;
|
|
19
19
|
};
|
|
20
20
|
open: (settings?: DrawerSettings | undefined) => void;
|
|
21
|
-
close: () =>
|
|
22
|
-
toggle: () => boolean;
|
|
21
|
+
close: () => void;
|
|
23
22
|
};
|
|
24
23
|
export { useDrawer };
|
package/dist/vuetiful.es.mjs
CHANGED
|
@@ -36,38 +36,35 @@ const useRail = () => {
|
|
|
36
36
|
};
|
|
37
37
|
const drawer = reactive({
|
|
38
38
|
id: "default",
|
|
39
|
-
open: false
|
|
39
|
+
open: false,
|
|
40
|
+
position: "left",
|
|
41
|
+
duration: 300,
|
|
42
|
+
regionBackdrop: "",
|
|
43
|
+
regionDrawer: ""
|
|
40
44
|
});
|
|
41
45
|
const useDrawer = () => {
|
|
42
46
|
const open = (settings) => {
|
|
47
|
+
var _a, _b, _c, _d, _e;
|
|
43
48
|
drawer.open = true;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
drawer.id = (_a = settings == null ? void 0 : settings.id) != null ? _a : "default";
|
|
50
|
+
drawer.duration = (_b = settings == null ? void 0 : settings.duration) != null ? _b : 300;
|
|
51
|
+
drawer.regionBackdrop = (_c = settings == null ? void 0 : settings.regionBackdrop) != null ? _c : "";
|
|
52
|
+
drawer.regionDrawer = (_d = settings == null ? void 0 : settings.regionDrawer) != null ? _d : "";
|
|
53
|
+
drawer.position = (_e = settings == null ? void 0 : settings.position) != null ? _e : "left";
|
|
54
|
+
};
|
|
55
|
+
const close = () => {
|
|
56
|
+
drawer.open = false;
|
|
49
57
|
};
|
|
50
|
-
const close = () => drawer.open = false;
|
|
51
|
-
const toggle = () => drawer.open = !drawer.open;
|
|
52
58
|
return {
|
|
53
59
|
drawer: readonly(drawer),
|
|
54
60
|
open,
|
|
55
|
-
close
|
|
56
|
-
toggle
|
|
61
|
+
close
|
|
57
62
|
};
|
|
58
63
|
};
|
|
59
64
|
const _hoisted_1$4 = ["aria-labelledby", "aria-describedby"];
|
|
60
65
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
61
66
|
__name: "VDrawer",
|
|
62
67
|
props: {
|
|
63
|
-
position: {
|
|
64
|
-
type: String,
|
|
65
|
-
default: "left"
|
|
66
|
-
},
|
|
67
|
-
duration: {
|
|
68
|
-
type: Number,
|
|
69
|
-
default: 300
|
|
70
|
-
},
|
|
71
68
|
regionBackdrop: {
|
|
72
69
|
type: String,
|
|
73
70
|
default: ""
|
|
@@ -89,14 +86,17 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
89
86
|
const props = __props;
|
|
90
87
|
const { drawer: drawer2, close } = useDrawer();
|
|
91
88
|
const attrs = useAttrs();
|
|
92
|
-
const {
|
|
89
|
+
const { regionBackdrop, regionDrawer, labelledby, describedby } = toRefs(props);
|
|
93
90
|
const presets = {
|
|
94
91
|
top: { alignment: "top-0", width: "w-full", height: "h-[50%]", rounded: "rounded-bl-container-token rounded-br-container-token" },
|
|
95
92
|
bottom: { alignment: "bottom-0", width: "w-full", height: " h-[50%]", rounded: "rounded-tl-container-token rounded-tr-container-token" },
|
|
96
93
|
left: { alignment: "lef-0", width: "w-[90%]", height: "h-full", rounded: "rounded-tr-container-token rounded-br-container-token" },
|
|
97
94
|
right: { alignment: "right-0", width: "w-[90%]", height: "h-full", rounded: "rounded-tl-container-token rounded-bl-container-token" }
|
|
98
95
|
};
|
|
99
|
-
const preset = computed(() =>
|
|
96
|
+
const preset = computed(() => {
|
|
97
|
+
const position = drawer2.position || "left";
|
|
98
|
+
return presets[position];
|
|
99
|
+
});
|
|
100
100
|
const elemBackdrop = ref();
|
|
101
101
|
const elemDrawer = ref();
|
|
102
102
|
const onBackdropInteraction = (event) => {
|
|
@@ -113,7 +113,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
113
113
|
return (_ctx, _cache) => {
|
|
114
114
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
115
115
|
createVNode(Transition, {
|
|
116
|
-
name: `slide-${unref(position
|
|
116
|
+
name: `slide-${unref(drawer2).position}-${unref(drawer2).duration}`
|
|
117
117
|
}, {
|
|
118
118
|
default: withCtx(() => [
|
|
119
119
|
unref(drawer2).open ? (openBlock(), createElementBlock("div", {
|
|
@@ -132,7 +132,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
132
132
|
_: 3
|
|
133
133
|
}, 8, ["name"]),
|
|
134
134
|
createVNode(Transition, {
|
|
135
|
-
name: `fade-${unref(duration
|
|
135
|
+
name: `fade-${unref(drawer2).duration}`
|
|
136
136
|
}, {
|
|
137
137
|
default: withCtx(() => {
|
|
138
138
|
var _a;
|