nuxt-glorious 1.3.3 → 1.9.0-dev

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 (116) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +5 -23
  3. package/dist/runtime/components/G/Alert.vue +2 -3
  4. package/dist/runtime/components/G/Avatar.vue +9 -4
  5. package/dist/runtime/components/G/Breadcrumb.vue +4 -3
  6. package/dist/runtime/components/G/Button.vue +10 -11
  7. package/dist/runtime/components/G/Checkbox.vue +7 -5
  8. package/dist/runtime/components/G/Drawer.vue +6 -3
  9. package/dist/runtime/components/G/File.vue +11 -8
  10. package/dist/runtime/components/G/Icon.vue +37 -70
  11. package/dist/runtime/components/G/Input.vue +43 -25
  12. package/dist/runtime/components/G/Loading.vue +8 -4
  13. package/dist/runtime/components/G/Modal.vue +7 -6
  14. package/dist/runtime/components/G/Paginate.vue +41 -13
  15. package/dist/runtime/components/G/Radio.vue +8 -5
  16. package/dist/runtime/components/G/Rating.vue +0 -2
  17. package/dist/runtime/components/G/Select.vue +9 -9
  18. package/dist/runtime/components/G/Switch.vue +0 -2
  19. package/dist/runtime/components/G/Tab.vue +1 -2
  20. package/dist/runtime/components/G/Table.vue +0 -2
  21. package/dist/runtime/components/G/Tooltip.vue +17 -0
  22. package/dist/runtime/components/G/Wizard.vue +71 -25
  23. package/dist/runtime/components/G/textarea.vue +10 -9
  24. package/dist/runtime/components/G/timeline.vue +0 -2
  25. package/dist/runtime/components/helper.d.ts +1 -0
  26. package/dist/runtime/components/helper.mjs +13 -2
  27. package/dist/runtime/components/props/Alert.d.ts +1 -1
  28. package/dist/runtime/components/props/Avatar.d.ts +9 -0
  29. package/dist/runtime/components/props/Avatar.mjs +4 -6
  30. package/dist/runtime/components/props/Button.d.ts +1 -1
  31. package/dist/runtime/components/props/CheckBox.d.ts +1 -1
  32. package/dist/runtime/components/props/File.d.ts +1 -1
  33. package/dist/runtime/components/props/Icon.d.ts +4 -0
  34. package/dist/runtime/components/props/Icon.mjs +5 -1
  35. package/dist/runtime/components/props/Input.d.ts +1 -1
  36. package/dist/runtime/components/props/Loading.d.ts +1 -1
  37. package/dist/runtime/components/props/Modal.d.ts +1 -1
  38. package/dist/runtime/components/props/Paginate.d.ts +5 -0
  39. package/dist/runtime/components/props/Paginate.mjs +2 -0
  40. package/dist/runtime/components/props/Radio.d.ts +1 -1
  41. package/dist/runtime/components/props/Select.d.ts +1 -1
  42. package/dist/runtime/components/props/Switch.d.ts +1 -1
  43. package/dist/runtime/components/props/Table.d.ts +1 -1
  44. package/dist/runtime/components/props/Textarea.d.ts +1 -6
  45. package/dist/runtime/components/props/Textarea.mjs +0 -2
  46. package/dist/runtime/components/props/Timeline.d.ts +1 -1
  47. package/dist/runtime/components/props/common/index.d.ts +14 -2
  48. package/dist/runtime/components/props/common/index.mjs +13 -1
  49. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeAuth.d.ts +2 -0
  50. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeAuth.mjs +8 -0
  51. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeFormData.d.ts +3 -0
  52. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeFormData.mjs +14 -0
  53. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeGKey.d.ts +2 -0
  54. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeGKey.mjs +3 -0
  55. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeHeaderFetch.d.ts +2 -0
  56. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeHeaderFetch.mjs +9 -0
  57. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeParams.d.ts +2 -0
  58. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeParams.mjs +7 -0
  59. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeValidation.d.ts +2 -0
  60. package/dist/runtime/composables/helper/useGloriousFetch/functionComputeValidation.mjs +30 -0
  61. package/dist/runtime/composables/helper/useGloriousFetch/gloriousFetchDefaultOptions.d.ts +3 -0
  62. package/dist/runtime/composables/helper/useGloriousFetch/gloriousFetchDefaultOptions.mjs +15 -0
  63. package/dist/runtime/composables/helper/useGloriousFetch/gloriousFetchOptionsInterface.d.ts +15 -0
  64. package/dist/runtime/composables/useGloriousCore.d.ts +0 -1
  65. package/dist/runtime/composables/useGloriousCore.mjs +1 -3
  66. package/dist/runtime/composables/useGloriousFetch.d.ts +1 -15
  67. package/dist/runtime/composables/useGloriousFetch.mjs +11 -57
  68. package/dist/runtime/composables/useGloriousHead.mjs +1 -1
  69. package/dist/runtime/middlewares/AuthStrategy.mjs +1 -9
  70. package/dist/runtime/plugins/InputComponent.mjs +0 -2
  71. package/dist/runtime/style/components/drawer.css +4 -35
  72. package/dist/runtime/style/components/dropdown.css +17 -15
  73. package/dist/{runtime/style/components → scss}/alert.scss +7 -7
  74. package/dist/scss/avatar.scss +13 -0
  75. package/dist/scss/breadcrumb.scss +6 -0
  76. package/dist/{runtime/style/components → scss}/button.scss +30 -30
  77. package/dist/{runtime/style/components → scss}/checkbox.scss +1 -1
  78. package/dist/scss/drawer.scss +64 -0
  79. package/dist/{runtime/style/components → scss}/file.scss +2 -2
  80. package/dist/scss/glorious.scss +22 -0
  81. package/dist/{runtime/style/components → scss}/input.scss +9 -3
  82. package/dist/{runtime/style → scss}/mixin.scss +1 -1
  83. package/dist/scss/modal.scss +76 -0
  84. package/dist/scss/paginate.scss +28 -0
  85. package/dist/{runtime/style/components → scss}/radio.scss +1 -1
  86. package/dist/{runtime/style/components → scss}/select.scss +2 -2
  87. package/dist/{runtime/style/components → scss}/switch.scss +1 -1
  88. package/dist/{runtime/style/components → scss}/tab.scss +1 -1
  89. package/dist/{runtime/style/components → scss}/table.scss +1 -1
  90. package/dist/{runtime/style/components → scss}/textarea.scss +2 -2
  91. package/dist/{runtime/style/components → scss}/timeline.scss +2 -2
  92. package/dist/scss/tooltip.scss +14 -0
  93. package/package.json +9 -7
  94. package/dist/runtime/style/components/alert.css +0 -33
  95. package/dist/runtime/style/components/avatar.css +0 -57
  96. package/dist/runtime/style/components/avatar.scss +0 -13
  97. package/dist/runtime/style/components/breadcrumb.css +0 -6
  98. package/dist/runtime/style/components/breadcrumb.scss +0 -6
  99. package/dist/runtime/style/components/drawer.scss +0 -57
  100. package/dist/runtime/style/components/dropdown.scss +0 -19
  101. package/dist/runtime/style/components/editor.scss +0 -4
  102. package/dist/runtime/style/components/input.css +0 -184
  103. package/dist/runtime/style/components/loading.css +0 -43
  104. package/dist/runtime/style/components/modal.css +0 -66
  105. package/dist/runtime/style/components/modal.scss +0 -76
  106. package/dist/runtime/style/components/paginate.css +0 -17
  107. package/dist/runtime/style/components/paginate.scss +0 -18
  108. package/dist/runtime/style/components/radio.css +0 -121
  109. package/dist/runtime/style/components/rating.css +0 -30
  110. package/dist/runtime/style/components/select.css +0 -49
  111. package/dist/runtime/style/components/switch.css +0 -61
  112. package/dist/runtime/style/components/table.css +0 -99
  113. package/dist/runtime/style/components/textarea.css +0 -67
  114. /package/dist/{runtime/style/components → scss}/loading.scss +0 -0
  115. /package/dist/{runtime/style/components → scss}/rating.scss +0 -0
  116. /package/dist/{runtime/style → scss}/variable.scss +0 -0
@@ -7,7 +7,7 @@ declare const _default: {
7
7
  color: {
8
8
  required: boolean;
9
9
  default: string;
10
- type: () => import("../../../types").colors;
10
+ type: () => import("../../../types").colors | string;
11
11
  };
12
12
  };
13
13
  export default _default;
@@ -43,7 +43,7 @@ declare const _default: {
43
43
  color: {
44
44
  required: boolean;
45
45
  default: string;
46
- type: () => import("../../../types").colors;
46
+ type: () => import("../../../types").colors | string;
47
47
  };
48
48
  };
49
49
  export default _default;
@@ -19,11 +19,6 @@ declare const _default: {
19
19
  default: boolean;
20
20
  type: BooleanConstructor;
21
21
  };
22
- size: {
23
- required: boolean;
24
- default: import("../../../types").sizes;
25
- type: () => import("../../../types").sizes;
26
- };
27
22
  title: {
28
23
  required: boolean;
29
24
  default: string;
@@ -37,7 +32,7 @@ declare const _default: {
37
32
  color: {
38
33
  required: boolean;
39
34
  default: string;
40
- type: () => import("../../../types").colors;
35
+ type: () => import("../../../types").colors | string;
41
36
  };
42
37
  };
43
38
  export default _default;
@@ -2,7 +2,6 @@ import {
2
2
  color,
3
3
  placeholder,
4
4
  title,
5
- size,
6
5
  error,
7
6
  disabled,
8
7
  required
@@ -11,7 +10,6 @@ export default {
11
10
  ...color(),
12
11
  ...placeholder(),
13
12
  ...title(),
14
- ...size(),
15
13
  ...required(),
16
14
  ...error,
17
15
  ...disabled,
@@ -5,7 +5,7 @@ declare const _default: {
5
5
  color: {
6
6
  required: boolean;
7
7
  default: string;
8
- type: () => import("../../../types").colors;
8
+ type: () => import("../../../types").colors | string;
9
9
  };
10
10
  };
11
11
  export default _default;
@@ -3,7 +3,7 @@ export declare const color: (def?: string) => {
3
3
  color: {
4
4
  required: boolean;
5
5
  default: string;
6
- type: () => colors;
6
+ type: () => colors | string;
7
7
  };
8
8
  };
9
9
  export declare const size: (def?: sizes) => {
@@ -14,7 +14,7 @@ export declare const size: (def?: sizes) => {
14
14
  };
15
15
  };
16
16
  export declare const rounded: {
17
- size: {
17
+ rounded: {
18
18
  required: boolean;
19
19
  default: string;
20
20
  type: () => roundedType;
@@ -180,3 +180,15 @@ export declare const keyOfValue: () => {
180
180
  type: StringConstructor;
181
181
  };
182
182
  };
183
+ export declare const alt: () => {
184
+ alt: {
185
+ required: boolean;
186
+ type: StringConstructor;
187
+ };
188
+ };
189
+ export declare const src: () => {
190
+ src: {
191
+ required: boolean;
192
+ type: StringConstructor;
193
+ };
194
+ };
@@ -13,7 +13,7 @@ export const size = (def = "md") => ({
13
13
  }
14
14
  });
15
15
  export const rounded = {
16
- size: {
16
+ rounded: {
17
17
  required: false,
18
18
  default: "md",
19
19
  type: String
@@ -166,3 +166,15 @@ export const keyOfValue = () => ({
166
166
  type: String
167
167
  }
168
168
  });
169
+ export const alt = () => ({
170
+ alt: {
171
+ required: false,
172
+ type: String
173
+ }
174
+ });
175
+ export const src = () => ({
176
+ src: {
177
+ required: true,
178
+ type: String
179
+ }
180
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: (moduleConfig: any) => Object;
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { useCookie } from "nuxt/app";
2
+ export default (moduleConfig) => {
3
+ const header = {};
4
+ const token = useCookie(moduleConfig.public.glorious.auth.cookie.name);
5
+ if (typeof token.value !== "undefined")
6
+ header.Authorization = "Bearer " + token.value;
7
+ return header;
8
+ };
@@ -0,0 +1,3 @@
1
+ import type { gloriousFetchOptions } from './gloriousFetchOptionsInterface';
2
+ declare const _default: (options: gloriousFetchOptions) => any;
3
+ export default _default;
@@ -0,0 +1,14 @@
1
+ export default (options) => {
2
+ const form = new FormData();
3
+ Object.entries(options.body).forEach((item) => {
4
+ if (item[1] === null) return;
5
+ if (typeof item[1] === "object" && typeof item[1].lastModifiedDate === "undefined" && typeof item[1].type === "undefined" && typeof item[1].size === "undefined")
6
+ Object.entries(item[1]).forEach((nestedItem, index) => {
7
+ form.append(`${item[0]}[${index}]`, nestedItem[1]);
8
+ });
9
+ else {
10
+ form.append(`${item[0]}`, item[1]);
11
+ }
12
+ });
13
+ return form;
14
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: (gKey: String | undefined, url: string) => string | String;
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export default (gKey, url) => {
2
+ return typeof gKey !== "undefined" ? gKey : url.split("/")[url.split("/").length - 1];
3
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: (options: object) => Promise<any>;
2
+ export default _default;
@@ -0,0 +1,9 @@
1
+ export default async (options) => {
2
+ const fetch = import.meta.glob("/glorious/fetch.ts");
3
+ let data = {};
4
+ if (typeof fetch["/glorious/fetch.ts"] !== "undefined") {
5
+ data = await fetch["/glorious/fetch.ts"]();
6
+ data = data.fetchHandler.headers(options);
7
+ }
8
+ return data;
9
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: (params: Object) => Object;
2
+ export default _default;
@@ -0,0 +1,7 @@
1
+ export default (params) => {
2
+ const computeParams = {};
3
+ Object.entries(params).map((item) => {
4
+ if (item[1] !== null && item[1] !== "") computeParams[item[0]] = item[1];
5
+ });
6
+ return computeParams;
7
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: (validationRequest: any, gKey: String, body: any) => void;
2
+ export default _default;
@@ -0,0 +1,30 @@
1
+ import { createError } from "#app";
2
+ import { GloriousStore } from "../../../stores/GloriousStore.mjs";
3
+ let hasError = false;
4
+ let _gKey;
5
+ export default (validationRequest, gKey, body) => {
6
+ _gKey = gKey;
7
+ Object.entries(validationRequest).forEach((item) => {
8
+ const [key, value] = item;
9
+ value.forEach((itemOfValue) => {
10
+ validations[itemOfValue](body[key], key);
11
+ });
12
+ });
13
+ if (hasError) {
14
+ throw createError({
15
+ statusCode: 422,
16
+ statusMessage: "validation request error"
17
+ });
18
+ }
19
+ };
20
+ const validations = {
21
+ required: (mount, key) => {
22
+ if (mount === "" || mount === null) {
23
+ setError(key, `${key} is required`);
24
+ hasError = true;
25
+ } else {
26
+ setError(key);
27
+ }
28
+ }
29
+ };
30
+ const setError = (key, value = []) => GloriousStore().forms[_gKey].errors[key] = value.length === 0 ? [] : [value];
@@ -0,0 +1,3 @@
1
+ import type { gloriousFetchOptions } from './gloriousFetchOptionsInterface';
2
+ declare const options: gloriousFetchOptions;
3
+ export default options;
@@ -0,0 +1,15 @@
1
+ const options = {
2
+ validationRequest: [],
3
+ server: false,
4
+ method: "GET",
5
+ lazy: true,
6
+ is$: true,
7
+ keepResponse: false,
8
+ params: {},
9
+ headers: {
10
+ Accept: "application/json"
11
+ },
12
+ bodyType: "normal",
13
+ credentials: "same-origin"
14
+ };
15
+ export default options;
@@ -0,0 +1,15 @@
1
+ export interface gloriousFetchOptions {
2
+ validationRequest?: any
3
+ gKey?: String
4
+ params?: Object
5
+ server?: Boolean
6
+ is$?: Boolean
7
+ lazy?: Boolean
8
+ headers?: Object
9
+ body?: Object
10
+ keepResponse?: Boolean
11
+ bodyType?: 'formData' | 'formDataCustom' | 'normal'
12
+ method?: 'POST' | 'GET' | 'PATCH' | 'PUT' | 'DELETE' | 'HEAD'
13
+ credentials?: 'same-origin' | 'include'
14
+ watch?: Array<Object>
15
+ }
@@ -1,6 +1,5 @@
1
1
  declare const _default: () => {
2
2
  debounce: (callback: () => void, delay: number) => void;
3
3
  numbersWithSeparateSamePrice: (value: String) => string;
4
- compressImage: (file: any, MAX_WIDTH?: number, MAX_HEIGHT?: number, QUALITY?: number) => Promise<Blob>;
5
4
  };
6
5
  export default _default;
@@ -1,5 +1,4 @@
1
1
  import { GloriousStore } from "../stores/GloriousStore.mjs";
2
- import compressImage from "../../core/compressImage";
3
2
  const numbersWithSeparateSamePrice = (value) => {
4
3
  if (typeof value === "undefined") return "";
5
4
  let nStr = value.match(/\d+/g)?.join("") + "";
@@ -24,7 +23,6 @@ const debounce = (callback, delay) => {
24
23
  export default () => {
25
24
  return {
26
25
  debounce,
27
- numbersWithSeparateSamePrice,
28
- compressImage
26
+ numbersWithSeparateSamePrice
29
27
  };
30
28
  };
@@ -1,16 +1,2 @@
1
- interface gloriousFetchOptions {
2
- gKey?: String;
3
- params?: Object;
4
- server?: Boolean;
5
- is$?: Boolean;
6
- lazy?: Boolean;
7
- headers?: Object;
8
- body?: Object;
9
- keepResponse?: Boolean;
10
- bodyType?: 'formData' | 'formDataCustom' | 'normal';
11
- method?: 'POST' | 'GET' | 'PATCH' | 'PUT' | 'DELETE' | 'HEAD';
12
- credentials?: 'same-origin' | 'include';
13
- watch?: Array<Object>;
14
- }
1
+ import type { gloriousFetchOptions } from './helper/useGloriousFetch/gloriousFetchOptionsInterface';
15
2
  export default function (url: string, options?: gloriousFetchOptions): Promise<unknown>;
16
- export {};
@@ -1,28 +1,22 @@
1
- import { useCookie, useFetch, useRuntimeConfig } from "nuxt/app";
1
+ import { useFetch, useRuntimeConfig } from "nuxt/app";
2
2
  import { GloriousStore } from "../stores/GloriousStore.mjs";
3
+ import defaultOptions from "./helper/useGloriousFetch/gloriousFetchDefaultOptions.mjs";
4
+ import computeGKey from "./helper/useGloriousFetch/functionComputeGKey.mjs";
5
+ import computeParams from "./helper/useGloriousFetch/functionComputeParams.mjs";
6
+ import computeHeaderFetch from "./helper/useGloriousFetch/functionComputeHeaderFetch.mjs";
7
+ import computeFormData from "./helper/useGloriousFetch/functionComputeFormData.mjs";
8
+ import computeAuth from "./helper/useGloriousFetch/functionComputeAuth.mjs";
9
+ import computeValidation from "./helper/useGloriousFetch/functionComputeValidation.mjs";
3
10
  import defu from "defu";
4
- const defaultOptions = {
5
- server: false,
6
- method: "GET",
7
- lazy: true,
8
- is$: true,
9
- keepResponse: false,
10
- params: {},
11
- headers: {
12
- Accept: "application/json"
13
- },
14
- bodyType: "normal",
15
- credentials: "same-origin"
16
- };
17
11
  export default async function(url, options = defaultOptions) {
18
12
  const moduleConfig = useRuntimeConfig();
19
- options = defu(moduleConfig.public.glorious.fetch, options, defaultOptions);
20
13
  const gs = GloriousStore();
21
14
  const gKey = computeGKey(options.gKey, url);
15
+ options = defu(moduleConfig.public.glorious.fetch, options, defaultOptions);
22
16
  options.params = computeParams(options.params);
23
17
  options.headers = {
24
18
  ...options.headers,
25
- ...computeAuth(),
19
+ ...computeAuth(moduleConfig),
26
20
  ...await computeHeaderFetch({ ...options, url })
27
21
  };
28
22
  if (options.bodyType === "formData") options.body = computeFormData(options);
@@ -61,6 +55,7 @@ export default async function(url, options = defaultOptions) {
61
55
  };
62
56
  if (opt.keepResponse && !gs.keepResponse.includes(gKey))
63
57
  gs.keepResponse.push(gKey);
58
+ computeValidation(options.validationRequest, gKey, options.body);
64
59
  if (opt.method === "GET" && typeof opt.body !== "undefined") {
65
60
  opt.method = "POST";
66
61
  return $fetch(url, opt);
@@ -68,44 +63,3 @@ export default async function(url, options = defaultOptions) {
68
63
  return useFetch(url, opt);
69
64
  else return $fetch(url, opt);
70
65
  }
71
- function computeParams(params) {
72
- const computeParams2 = {};
73
- Object.entries(params).map((item) => {
74
- if (item[1] !== null && item[1] !== "") computeParams2[item[0]] = item[1];
75
- });
76
- return computeParams2;
77
- }
78
- function computeGKey(gKey, url) {
79
- return typeof gKey !== "undefined" ? gKey : url.split("/")[url.split("/").length - 1];
80
- }
81
- function computeAuth() {
82
- const moduleConfig = useRuntimeConfig();
83
- const header = {};
84
- const token = useCookie(moduleConfig.public.glorious.auth.cookie.name);
85
- if (typeof token.value !== "undefined")
86
- header.Authorization = "Bearer " + token.value;
87
- return header;
88
- }
89
- function computeFormData(options) {
90
- const form = new FormData();
91
- Object.entries(options.body).forEach((item) => {
92
- if (item[1] === null) return;
93
- if (typeof item[1] === "object" && typeof item[1].lastModifiedDate === "undefined" && typeof item[1].type === "undefined" && typeof item[1].size === "undefined")
94
- Object.entries(item[1]).forEach((nestedItem, index) => {
95
- form.append(`${item[0]}[${index}]`, nestedItem[1]);
96
- });
97
- else {
98
- form.append(`${item[0]}`, item[1]);
99
- }
100
- });
101
- return form;
102
- }
103
- async function computeHeaderFetch(options) {
104
- const fetch = import.meta.glob("/glorious/fetch.ts");
105
- let data = {};
106
- if (typeof fetch["/glorious/fetch.ts"] !== "undefined") {
107
- data = await fetch["/glorious/fetch.ts"]();
108
- data = data.fetchHandler.headers(options);
109
- }
110
- return data;
111
- }
@@ -1,4 +1,4 @@
1
- import { useSeoMeta } from "@unhead/vue";
1
+ import { useSeoMeta } from "#imports";
2
2
  import { useRuntimeConfig } from "nuxt/app";
3
3
  const head = {
4
4
  title: ``,
@@ -1,11 +1,3 @@
1
- import { defineNuxtRouteMiddleware, useCookie, useNuxtApp } from "#imports";
2
- import { GloriousStore } from "../stores/GloriousStore.mjs";
1
+ import { defineNuxtRouteMiddleware } from "#imports";
3
2
  export default defineNuxtRouteMiddleware(() => {
4
- const nuxtApp = useNuxtApp();
5
- const moduleConfig = nuxtApp.$config.public.glorious;
6
- const gs = GloriousStore();
7
- if (moduleConfig.auth.strategy.provider === "") return;
8
- const cookieToken = useCookie(moduleConfig.auth.cookie.name);
9
- if (typeof cookieToken.value === "undefined") return;
10
- nuxtApp.hook("app:beforeMount", () => gs.authGetUser(cookieToken.value));
11
3
  });
@@ -17,10 +17,8 @@ export default defineNuxtPlugin((nuxtApp) => {
17
17
  if (typeof event.target.nextElementSibling?.offsetHeight !== "undefined") {
18
18
  if (window.innerHeight < getElementPosition(event.target) + event.target.offsetHeight + event.target.nextElementSibling.offsetHeight) {
19
19
  event.target.nextElementSibling.style.width = `${event.target.offsetWidth}px`;
20
- event.target.nextElementSibling.style.top = `${getElementPosition(event.target) - event.target.nextElementSibling.offsetHeight}px`;
21
20
  } else {
22
21
  event.target.nextElementSibling.style.width = `${event.target.offsetWidth}px`;
23
- event.target.nextElementSibling.style.top = `${getElementPosition(event.target) + event.target.offsetHeight}px`;
24
22
  }
25
23
  }
26
24
  }
@@ -1,6 +1,3 @@
1
- .glorious-drawer {
2
- @apply fixed top-0 bg-white h-full w-[300px] z-[50];
3
- }
4
1
  .glorious-drawer.close.right {
5
2
  animation: drawer-close-right 250ms normal forwards;
6
3
  }
@@ -17,35 +14,7 @@
17
14
  animation: drawer-open-left 100ms normal forwards;
18
15
  }
19
16
 
20
- @keyframes drawer-open-right {
21
- from {
22
- @apply right-[-300px];
23
- }
24
- to {
25
- @apply right-0;
26
- }
27
- }
28
- @keyframes drawer-close-right {
29
- from {
30
- @apply right-0;
31
- }
32
- to {
33
- @apply right-[-300px] hidden;
34
- }
35
- }
36
- @keyframes drawer-open-left {
37
- from {
38
- @apply left-[-300px];
39
- }
40
- to {
41
- @apply left-0;
42
- }
43
- }
44
- @keyframes drawer-close-left {
45
- from {
46
- @apply left-0;
47
- }
48
- to {
49
- @apply left-[-300px] hidden;
50
- }
51
- }
17
+ @keyframes drawer-open-right {}
18
+ @keyframes drawer-close-right {}
19
+ @keyframes drawer-open-left {}
20
+ @keyframes drawer-close-left {}
@@ -1,18 +1,20 @@
1
1
  .glorious-dropdown {
2
+ /*
2
3
  @apply relative;
3
- }
4
- .glorious-dropdown > div:last-child {
5
- @apply hidden;
6
- }
7
- .glorious-dropdown > div:first-child {
8
- @apply relative;
9
- }
10
- .glorious-dropdown > div:first-child > button {
11
- @apply z-[30] w-5 relative;
12
- }
13
- .glorious-dropdown > div:first-child > div:nth-child(2) {
14
- @apply absolute top-0 bottom-0 my-auto z-[20];
15
- }
16
- .glorious-dropdown.open > div:last-child {
17
- @apply bg-white px-2 py-2 rounded-md shadow absolute z-[41] left-[16px] top-5 flex;
4
+ > div:last-child {
5
+ @apply hidden;
6
+ }
7
+ > div:first-child {
8
+ @apply relative;
9
+ > button {
10
+ @apply z-[30] w-5 relative;
11
+ }
12
+ > div:nth-child(2) {
13
+ @apply absolute top-0 bottom-0 my-auto z-[20];
14
+ }
15
+ }
16
+
17
+ &.open > div:last-child {
18
+ @apply bg-white px-2 py-2 rounded-md shadow absolute z-[41] left-[16px] top-5 flex;
19
+ }*/
18
20
  }
@@ -1,7 +1,7 @@
1
- @use '../mixin.scss' as mixin;
2
-
3
- .glorious-alert {
4
- @apply p-3 rounded shadow;
5
- @include mixin.load-bg();
6
- @include mixin.load-border();
7
- }
1
+ @use 'mixin.scss' as mixin;
2
+
3
+ .glorious-alert {
4
+ @apply p-3 rounded-md shadow-md;
5
+ @include mixin.load-bg();
6
+ @include mixin.load-border();
7
+ }
@@ -0,0 +1,13 @@
1
+ @use 'variable.scss' as var;
2
+
3
+ .glorious-avatar {
4
+ @apply overflow-hidden;
5
+ @each $key, $value in var.$sizes {
6
+ &.#{'size-' + $key} {
7
+ @apply #{"w-[" + ($value + 4 ) + "px] h-[" + ($value + 4 ) + "px]"};
8
+ > img {
9
+ @apply #{"w-[" + ($value + 4 ) + "px] h-[" + ($value + 4 ) + "px]"};
10
+ }
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,6 @@
1
+ .glorious-breadcrumb {
2
+ @apply text-sm text-gray-500;
3
+ .end-text {
4
+ @apply font-bold text-base text-black;
5
+ }
6
+ }
@@ -1,30 +1,30 @@
1
- @use '../variable.scss' as var;
2
- @use '../mixin.scss' as mixin;
3
-
4
- button:focus-visible {
5
- @apply outline-none;
6
- }
7
-
8
- .glorious-button {
9
- @apply rounded-md text-white px-3 relative;
10
- @include mixin.loading-size(6);
11
- @include mixin.load-size();
12
- }
13
- @each $color in var.$colors {
14
- .#{'button-color-' + $color} {
15
- @apply #{"bg-" + ($color) + "-600 border-" + $color + "-700 hover:bg-" + $color + "-700"};
16
-
17
- &.outline {
18
- @apply bg-transparent border outline-none;
19
- @apply #{"text-" + $color + "-500 hover:bg-" + $color + "-100"};
20
- @include mixin.loading-color($color);
21
- }
22
-
23
- &:disabled {
24
- @apply cursor-not-allowed;
25
- &:not(:disabled) {
26
- @apply #{"bg-" + ($color) + "-300"};
27
- }
28
- }
29
- }
30
- }
1
+ @use 'variable.scss' as var;
2
+ @use 'mixin.scss' as mixin;
3
+
4
+ button:focus-visible {
5
+ @apply outline-none;
6
+ }
7
+
8
+ .glorious-button {
9
+ @apply rounded-md text-white px-3 relative;
10
+ @include mixin.loading-size(6);
11
+ @include mixin.load-size();
12
+ }
13
+ @each $color in var.$colors {
14
+ .#{'button-color-' + $color} {
15
+ @apply #{"bg-" + ($color) + "-600 border-" + $color + "-700 hover:bg-" + $color + "-700"};
16
+
17
+ &.outline {
18
+ @apply bg-transparent border outline-none;
19
+ @apply #{"text-" + $color + "-500 hover:bg-" + $color + "-100"};
20
+ @include mixin.loading-color($color);
21
+ }
22
+
23
+ &:disabled {
24
+ @apply cursor-not-allowed;
25
+ &:not(:disabled) {
26
+ @apply #{"bg-" + ($color) + "-300"};
27
+ }
28
+ }
29
+ }
30
+ }
@@ -1,4 +1,4 @@
1
- @use '../variable.scss' as var;
1
+ @use 'variable.scss' as var;
2
2
  $svg-check-icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgMzIgMzIiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPjxwYXRoIGZpbGw9IndoaXRlIiBkPSJNIDI4LjI4MTI1IDYuMjgxMjUgTCAxMSAyMy41NjI1IEwgMy43MTg3NSAxNi4yODEyNSBMIDIuMjgxMjUgMTcuNzE4NzUgTCAxMC4yODEyNSAyNS43MTg3NSBMIDExIDI2LjQwNjI1IEwgMTEuNzE4NzUgMjUuNzE4NzUgTCAyOS43MTg3NSA3LjcxODc1IFoiLz48L3N2Zz4K';
3
3
  .glorious-checkbox {
4
4
  @apply block relative cursor-pointer;