@code-coaching/vuetiful 0.4.1 → 0.5.1

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.
Files changed (45) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/styles/all.css +62 -54
  3. package/dist/types/components/molecules/VDrawer.vue.d.ts +0 -18
  4. package/dist/types/services/drawer.service.d.ts +2 -3
  5. package/dist/types/types/index.d.ts +1 -1
  6. package/dist/types/utils/platform/platform.service.d.ts +1 -1
  7. package/dist/vuetiful.es.mjs +23 -23
  8. package/dist/vuetiful.umd.js +9 -9
  9. package/package.json +3 -2
  10. package/src/assets/main.css +6 -6
  11. package/src/components/molecules/VDrawer.vue +8 -14
  12. package/src/env.d.ts +4 -4
  13. package/src/services/drawer.service.ts +15 -12
  14. package/src/styles/core.css +49 -49
  15. package/src/styles/elements/alerts.css +13 -13
  16. package/src/styles/elements/badges.css +24 -24
  17. package/src/styles/elements/breadcrumbs.css +19 -19
  18. package/src/styles/elements/buttons.css +86 -86
  19. package/src/styles/elements/cards.css +22 -22
  20. package/src/styles/elements/chips.css +17 -17
  21. package/src/styles/elements/forms.css +237 -236
  22. package/src/styles/elements/lists.css +39 -39
  23. package/src/styles/elements/logo-clouds.css +21 -21
  24. package/src/styles/elements/modals.css +3 -3
  25. package/src/styles/elements/placeholders.css +10 -10
  26. package/src/styles/elements/popups.css +7 -7
  27. package/src/styles/elements/tables.css +73 -73
  28. package/src/styles/elements.css +13 -13
  29. package/src/styles/highlight-js.css +33 -33
  30. package/src/styles/typography.css +97 -97
  31. package/src/styles/variants.css +145 -145
  32. package/src/tailwind/generated/intellisense-classes.cjs +106 -106
  33. package/src/themes/theme-rocket.css +104 -104
  34. package/src/themes/theme-sahara.css +111 -111
  35. package/src/themes/theme-seafoam.css +110 -109
  36. package/src/themes/theme-seasonal.css +101 -101
  37. package/src/themes/theme-skeleton.css +102 -102
  38. package/src/themes/theme-vintage.css +109 -109
  39. package/src/themes/theme-vuetiful-0.0.1.css +110 -110
  40. package/src/types/index.ts +1 -1
  41. package/src/types/tailwind.ts +21 -2
  42. package/src/utils/code-block/highlight.service.test.ts +1 -1
  43. package/src/utils/index.test.ts +1 -1
  44. package/src/utils/platform/platform.service.ts +3 -5
  45. package/src/utils/theme/theme.service.test.ts +2 -3
@@ -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
- if (settings) {
45
- Object.keys(settings).forEach((key) => {
46
- drawer[key] = settings[key];
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 { position, duration, regionBackdrop, regionDrawer, labelledby, describedby } = toRefs(props);
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(() => presets[position.value]);
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)}-${unref(duration)}`
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;
@@ -141,7 +141,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
141
141
  key: 0,
142
142
  ref_key: "elemBackdrop",
143
143
  ref: elemBackdrop,
144
- class: normalizeClass(`drawer-backdrop backdrop-blur-xs fixed top-0 left-0 right-0 bottom-0 flex bg-surface-backdrop-token ${unref(regionBackdrop)} z-40 ${(_a = unref(attrs).class) != null ? _a : ""}`),
144
+ class: normalizeClass(`drawer-backdrop backdrop-blur-xs fixed bottom-0 left-0 right-0 top-0 flex bg-surface-backdrop-token ${unref(regionBackdrop)} z-40 ${(_a = unref(attrs).class) != null ? _a : ""}`),
145
145
  onMousedown: onBackdropInteraction,
146
146
  onTouchstart: onBackdropInteraction
147
147
  }, null, 34)) : createCommentVNode("", true)