nuxt-glorious 1.2.0 → 1.2.9-5

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 (151) hide show
  1. package/dist/module.d.mts +38 -1
  2. package/dist/module.d.ts +38 -1
  3. package/dist/module.json +2 -2
  4. package/dist/module.mjs +45 -36
  5. package/dist/runtime/assets/icons/glorious-eye-fill.svg +1 -1
  6. package/dist/runtime/assets/icons/glorious-eye-off-fill.svg +1 -1
  7. package/dist/runtime/assets/icons/glorious-star-fill.svg +3 -0
  8. package/dist/runtime/assets/icons/glorious-star-half.svg +3 -0
  9. package/dist/runtime/assets/icons/glorious-star-line.svg +3 -0
  10. package/dist/runtime/components/G/Alert.vue +16 -0
  11. package/dist/runtime/components/G/Avatar.vue +16 -0
  12. package/dist/runtime/components/G/Breadcrumb.vue +37 -0
  13. package/dist/runtime/components/G/Button.vue +13 -154
  14. package/dist/runtime/components/G/Checkbox.vue +26 -0
  15. package/dist/runtime/components/G/CountDown.vue +33 -43
  16. package/dist/runtime/components/G/Drawer.vue +16 -75
  17. package/dist/runtime/components/G/Dropdown.vue +17 -31
  18. package/dist/runtime/components/G/ErrorText.vue +7 -11
  19. package/dist/runtime/components/G/File.vue +25 -117
  20. package/dist/runtime/components/G/Icon.vue +125 -0
  21. package/dist/runtime/components/G/Input.vue +126 -250
  22. package/dist/runtime/components/G/Loading.vue +4 -21
  23. package/dist/runtime/components/G/Modal.vue +51 -138
  24. package/dist/runtime/components/G/Paginate.vue +24 -57
  25. package/dist/runtime/components/G/Radio.vue +18 -27
  26. package/dist/runtime/components/G/Rating.vue +30 -0
  27. package/dist/runtime/components/G/Select.vue +27 -112
  28. package/dist/runtime/components/G/Switch.vue +28 -0
  29. package/dist/runtime/components/G/Tab.vue +80 -44
  30. package/dist/runtime/components/G/Table.vue +62 -0
  31. package/dist/runtime/components/G/textarea.vue +17 -120
  32. package/dist/runtime/components/G/timeline.vue +28 -0
  33. package/dist/runtime/components/helper.d.ts +3 -0
  34. package/dist/runtime/components/helper.mjs +37 -0
  35. package/dist/runtime/components/props/Alert.d.ts +8 -0
  36. package/dist/runtime/components/props/Alert.mjs +4 -0
  37. package/dist/runtime/components/props/Avatar.d.ts +12 -0
  38. package/dist/runtime/components/props/Avatar.mjs +9 -0
  39. package/dist/runtime/components/props/Breadcrumb.d.ts +26 -0
  40. package/dist/runtime/components/props/Breadcrumb.mjs +11 -0
  41. package/dist/runtime/components/props/Button.d.ts +47 -0
  42. package/dist/runtime/components/props/Button.mjs +14 -0
  43. package/dist/runtime/components/props/CheckBox.d.ts +23 -0
  44. package/dist/runtime/components/props/CheckBox.mjs +7 -0
  45. package/dist/runtime/components/props/CountDown.d.ts +7 -0
  46. package/dist/runtime/components/props/CountDown.mjs +6 -0
  47. package/dist/runtime/components/props/Drawer.d.ts +8 -0
  48. package/dist/runtime/components/props/Drawer.mjs +7 -0
  49. package/dist/runtime/components/props/ErrorText.d.ts +8 -0
  50. package/dist/runtime/components/props/ErrorText.mjs +4 -0
  51. package/dist/runtime/components/props/File.d.ts +28 -0
  52. package/dist/runtime/components/props/File.mjs +9 -0
  53. package/dist/runtime/components/props/Icon.d.ts +23 -0
  54. package/dist/runtime/components/props/Icon.mjs +7 -0
  55. package/dist/runtime/components/props/Input.d.ts +91 -0
  56. package/dist/runtime/components/props/Input.mjs +50 -0
  57. package/dist/runtime/components/props/Loading.d.ts +18 -0
  58. package/dist/runtime/components/props/Loading.mjs +6 -0
  59. package/dist/runtime/components/props/Modal.d.ts +48 -0
  60. package/dist/runtime/components/props/Modal.mjs +38 -0
  61. package/dist/runtime/components/props/Paginate.d.ts +18 -0
  62. package/dist/runtime/components/props/Paginate.mjs +17 -0
  63. package/dist/runtime/components/props/Radio.d.ts +33 -0
  64. package/dist/runtime/components/props/Radio.mjs +9 -0
  65. package/dist/runtime/components/props/Select.d.ts +61 -0
  66. package/dist/runtime/components/props/Select.mjs +23 -0
  67. package/dist/runtime/components/props/Switch.d.ts +13 -0
  68. package/dist/runtime/components/props/Switch.mjs +5 -0
  69. package/dist/runtime/components/props/Tab.d.ts +21 -0
  70. package/dist/runtime/components/props/Tab.mjs +7 -0
  71. package/dist/runtime/components/props/Table.d.ts +49 -0
  72. package/dist/runtime/components/props/Table.mjs +19 -0
  73. package/dist/runtime/components/props/Textarea.d.ts +38 -0
  74. package/dist/runtime/components/props/Textarea.mjs +14 -0
  75. package/dist/runtime/components/props/Timeline.d.ts +11 -0
  76. package/dist/runtime/components/props/Timeline.mjs +7 -0
  77. package/dist/runtime/components/props/common/index.d.ts +161 -0
  78. package/dist/runtime/components/props/common/index.mjs +147 -0
  79. package/dist/runtime/composables/useGloriousCore.d.ts +1 -1
  80. package/dist/runtime/composables/useGloriousCore.mjs +1 -1
  81. package/dist/runtime/composables/useGloriousFetch.d.ts +4 -3
  82. package/dist/runtime/composables/useGloriousFetch.mjs +6 -5
  83. package/dist/runtime/middlewares/AuthStrategy.mjs +2 -6
  84. package/dist/runtime/middlewares/ResponseGloriousStore.mjs +9 -0
  85. package/dist/runtime/plugins/InputComponent.d.ts +2 -0
  86. package/dist/runtime/plugins/InputComponent.mjs +13 -0
  87. package/dist/runtime/plugins/module.d.ts +4 -0
  88. package/dist/runtime/plugins/module.mjs +94 -0
  89. package/dist/runtime/stores/GloriousStore.d.ts +0 -1
  90. package/dist/runtime/stores/GloriousStore.mjs +3 -13
  91. package/dist/runtime/style/components/alert.css +33 -0
  92. package/dist/runtime/style/components/alert.scss +7 -0
  93. package/dist/runtime/style/components/avatar.css +57 -0
  94. package/dist/runtime/style/components/avatar.scss +13 -0
  95. package/dist/runtime/style/components/breadcrumb.css +6 -0
  96. package/dist/runtime/style/components/breadcrumb.scss +6 -0
  97. package/dist/runtime/style/components/button.css +113 -0
  98. package/dist/runtime/style/components/button.scss +30 -0
  99. package/dist/runtime/style/components/checkbox.css +94 -0
  100. package/dist/runtime/style/components/checkbox.scss +52 -0
  101. package/dist/runtime/{assets/style → style}/components/drawer.css +14 -18
  102. package/dist/runtime/style/components/drawer.scss +57 -0
  103. package/dist/runtime/style/components/dropdown.scss +19 -0
  104. package/dist/runtime/style/components/editor.scss +4 -0
  105. package/dist/runtime/style/components/file.css +134 -0
  106. package/dist/runtime/style/components/file.scss +19 -0
  107. package/dist/runtime/style/components/input.css +187 -0
  108. package/dist/runtime/style/components/input.scss +87 -0
  109. package/dist/runtime/style/components/loading.css +43 -0
  110. package/dist/runtime/style/components/loading.scss +92 -0
  111. package/dist/runtime/style/components/modal.css +66 -0
  112. package/dist/runtime/style/components/modal.scss +76 -0
  113. package/dist/runtime/style/components/paginate.scss +18 -0
  114. package/dist/runtime/style/components/radio.css +121 -0
  115. package/dist/runtime/style/components/radio.scss +59 -0
  116. package/dist/runtime/style/components/rating.css +26 -0
  117. package/dist/runtime/style/components/rating.scss +25 -0
  118. package/dist/runtime/style/components/select.css +46 -0
  119. package/dist/runtime/style/components/select.scss +40 -0
  120. package/dist/runtime/style/components/switch.css +61 -0
  121. package/dist/runtime/style/components/switch.scss +74 -0
  122. package/dist/runtime/{assets/style → style}/components/tab.css +3 -3
  123. package/dist/runtime/style/components/tab.scss +11 -0
  124. package/dist/runtime/style/components/table.css +99 -0
  125. package/dist/runtime/style/components/table.scss +41 -0
  126. package/dist/runtime/style/components/textarea.css +64 -0
  127. package/dist/runtime/style/components/textarea.scss +43 -0
  128. package/dist/runtime/style/components/timeline.css +47 -0
  129. package/dist/runtime/style/components/timeline.scss +40 -0
  130. package/dist/runtime/style/mixin.css +0 -0
  131. package/dist/runtime/style/mixin.scss +40 -0
  132. package/dist/runtime/style/variable.css +0 -0
  133. package/dist/runtime/style/variable.scss +19 -0
  134. package/dist/types.d.mts +2 -10
  135. package/dist/types.d.ts +2 -10
  136. package/package.json +9 -7
  137. package/dist/runtime/assets/style/components/buttons.css +0 -107
  138. package/dist/runtime/assets/style/components/file.css +0 -65
  139. package/dist/runtime/assets/style/components/input.css +0 -91
  140. package/dist/runtime/assets/style/components/modal.css +0 -57
  141. package/dist/runtime/assets/style/components/select.css +0 -54
  142. package/dist/runtime/assets/style/components/textarea.css +0 -64
  143. package/dist/runtime/components/G/Breadcrump.vue +0 -46
  144. package/dist/runtime/components/G/Icon/index.vue +0 -143
  145. package/dist/runtime/plugins/Drawer.mjs +0 -35
  146. package/dist/runtime/utils/gTailwindColor.d.ts +0 -1
  147. package/dist/runtime/utils/gTailwindColor.mjs +0 -5
  148. /package/dist/runtime/{plugins/Drawer.d.ts → middlewares/ResponseGloriousStore.d.ts} +0 -0
  149. /package/dist/runtime/{assets/style → style}/components/dropdown.css +0 -0
  150. /package/dist/runtime/{assets/style → style}/components/editor.css +0 -0
  151. /package/dist/runtime/{assets/style → style}/components/paginate.css +0 -0
@@ -1,57 +1,93 @@
1
1
  <script lang="ts" setup>
2
- interface itemsType {
3
- active: boolean;
4
- text: string;
5
- key: string;
6
- }
7
-
8
- const props = defineProps({
9
- items: {
10
- required: true,
11
- default: [],
12
- type: Array<itemsType>,
13
- },
14
- modelValue: {
15
- required: true,
16
- type: String,
17
- },
18
- });
19
- const emits = defineEmits(["update:modelValue"]);
2
+ import _props from '../props/Tab'
3
+ const props: any = defineProps(_props)
4
+ const modelValue = defineModel()
20
5
  const tabClicked: any = (key: string, event: any) => {
21
- emits("update:modelValue", key);
6
+ modelValue.value = key
22
7
  Array.from(event.currentTarget.parentElement.parentElement.children).map(
23
- (item: any) => item.children[0].classList.remove("active")
24
- );
25
- event.currentTarget.classList.add("active");
26
- };
8
+ (item: any) => item.children[0].classList.remove('active')
9
+ )
10
+ event.currentTarget.classList.add('active')
11
+ }
12
+
13
+ const setArrow = () => {
14
+ document.querySelectorAll('.glorious-tab-content').forEach((element) => {
15
+ if (element.scrollWidth > element.clientWidth) {
16
+ element.previousElementSibling?.classList.replace('hidden', 'flex')
17
+
18
+ element.previousElementSibling?.parentElement?.classList.add('!px-7')
19
+ element.nextElementSibling?.classList.replace('hidden', 'flex')
20
+ } else {
21
+ element.previousElementSibling?.classList.add('hidden')
22
+ element.previousElementSibling?.parentElement?.classList.remove('!px-7')
23
+ element.nextElementSibling?.classList.add('hidden')
24
+ }
25
+ })
26
+ }
27
+ onMounted(() => {
28
+ window.addEventListener('resize', () => setArrow())
29
+ setArrow()
30
+ })
31
+
32
+ const scrollNext = (event: Event) => {
33
+ const currentTarget = event.currentTarget as HTMLDivElement
34
+ const nextElement = currentTarget.nextElementSibling as HTMLDivElement
35
+ nextElement.scrollBy({
36
+ left: 80,
37
+ behavior: 'smooth',
38
+ })
39
+ }
40
+ const scrollPrevious = (event: Event) => {
41
+ const currentTarget = event.currentTarget as HTMLDivElement
42
+ const previousElement = currentTarget.previousElementSibling as HTMLDivElement
43
+ previousElement.scrollBy({
44
+ left: -80,
45
+ behavior: 'smooth',
46
+ })
47
+ }
27
48
  </script>
28
49
 
29
50
  <template>
30
- <div class="glorious-tab">
51
+ <div class="glorious-tab relative">
31
52
  <div
32
- v-for="(item, index) in props.items"
33
- :key="index"
34
- class="flex justify-center"
35
- :style="{ flexBasis: `${100 / props.items.length}%` }"
53
+ @click="scrollNext($event)"
54
+ class="bg-green-700 absolute right-0 h-full top-0 w-8 justify-center items-center rounded-r-lg hidden cursor-pointer"
36
55
  >
37
- <button
38
- :class="item.active ? `active` : ''"
39
- @click="tabClicked(item.key, $event)"
56
+ <GIcon
57
+ name="glorious-arrow"
58
+ :size="15"
59
+ color="#fff"
60
+ />
61
+ </div>
62
+
63
+ <div class="flex overflow-auto px-3 py-2 gap-3 glorious-tab-content">
64
+ <div
65
+ v-for="(item, index) in props.items"
66
+ :key="index"
67
+ class="flex justify-center tab-item"
68
+ :style="{ flexBasis: `${100 / props.items.length}%` }"
40
69
  >
41
- {{ item.text }}
42
- </button>
70
+ <button
71
+ :class="item.active ? `active` : ''"
72
+ @click="tabClicked(item.key, $event)"
73
+ >
74
+ {{ item.text }}
75
+ </button>
76
+ </div>
77
+ </div>
78
+
79
+ <div
80
+ @click="scrollPrevious($event)"
81
+ class="bg-green-700 absolute left-0 h-full top-0 w-8 justify-center items-center rounded-l-lg hidden cursor-pointer"
82
+ >
83
+ <GIcon
84
+ name="glorious-arrow"
85
+ class="rotate-180"
86
+ :size="15"
87
+ color="#fff"
88
+ />
43
89
  </div>
44
90
  </div>
45
91
  </template>
46
92
 
47
- <style>
48
- .glorious-tab {
49
- @apply flex justify-between bg-green-100 px-3 py-2 rounded-lg gap-3 overflow-y-auto w-full shadow-md;
50
- }
51
- .glorious-tab > div > button {
52
- @apply text-gray-700 text-[14px] hover:bg-green-200 hover:text-gray-800 cursor-pointer px-2 py-1 rounded-lg;
53
- }
54
- .glorious-tab > div > button.active {
55
- @apply font-bold text-white bg-green-700;
56
- }
57
- </style>
93
+ <style lang="scss" src="../../style/components/tab.scss" />
@@ -0,0 +1,62 @@
1
+ <script lang="ts" setup>
2
+ import _props from '../props/Table'
3
+ const props = defineProps(_props)
4
+ </script>
5
+
6
+ <template>
7
+ <div class="flex flex-col">
8
+ <div
9
+ class="glorious-table"
10
+ :class="[`color-${props.color}`]"
11
+ >
12
+ <table>
13
+ <thead>
14
+ <tr>
15
+ <th
16
+ v-for="(headItem, index) in props.header"
17
+ :key="index"
18
+ >
19
+ {{ headItem }}
20
+ </th>
21
+ </tr>
22
+ </thead>
23
+ <tbody v-if="!props.loading">
24
+ <tr
25
+ v-for="(bodyItem, bodyIndex) in props.body"
26
+ :key="bodyIndex"
27
+ >
28
+ <td
29
+ v-for="(headItem, headKey, headIndex) in props.header"
30
+ :key="headIndex"
31
+ >
32
+ <slot
33
+ v-if="typeof $slots[headKey] !== 'undefined'"
34
+ :name="headKey"
35
+ :item="{ ...bodyItem, index: bodyIndex }"
36
+ />
37
+ <template v-else>
38
+ {{ bodyItem[headKey] }}
39
+ </template>
40
+ </td>
41
+ </tr>
42
+ </tbody>
43
+ </table>
44
+ </div>
45
+ <div
46
+ v-if="props.loading"
47
+ class="flex justify-center mt-3"
48
+ >
49
+ <GLoading :color="props.loadingOption.color" />
50
+ </div>
51
+ <div
52
+ class="flex justify-center mt-3"
53
+ v-if="!props.loading && props.body.length === 0"
54
+ >
55
+ <div class="bg-white shadow p-2 rounded w-max">
56
+ <span> {{ props.emptyText }} </span>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </template>
61
+
62
+ <style lang="scss" src="../../style/components/table.scss" />
@@ -1,140 +1,37 @@
1
1
  <script setup lang="ts">
2
- import { ref, watch } from "#imports";
3
- const props = defineProps({
4
- modelValue: {
5
- required: false,
6
- default: "",
7
- type: String,
8
- },
9
- color: {
10
- required: false,
11
- default: "primary",
12
- type: String as () => "orange" | "blue" | "gray" | "red" | "primary",
13
- },
14
- placeholder: {
15
- required: false,
16
- default: "",
17
- type: String,
18
- },
19
- title: {
20
- required: false,
21
- default: "",
22
- type: String,
23
- },
24
- size: {
25
- required: false,
26
- default: "md",
27
- type: String as () => "xl" | "lg" | "md" | "sm" | "xsm",
28
- },
29
- error: {
30
- required: false,
31
- default: "|",
32
- type: String,
33
- },
34
- disabled: {
35
- required: false,
36
- default: false,
37
- type: Boolean,
38
- },
39
- autocomplete: {
40
- required: false,
41
- default: "off",
42
- type: String,
43
- },
44
- });
2
+ import { ref, watch } from '#imports'
3
+ import _props from '../props/Textarea'
4
+ const props = defineProps(_props)
5
+ const modelValue = defineModel()
45
6
 
46
- const inputValue: any = ref(null);
47
- if (props.modelValue !== "") inputValue.value = props.modelValue;
48
- const emits = defineEmits(["update:modelValue"]);
7
+ const inputValue: any = ref(null)
8
+ if (modelValue.value !== '') inputValue.value = modelValue.value
49
9
  watch(
50
10
  () => inputValue.value,
51
- () => emits("update:modelValue", inputValue.value)
52
- );
11
+ () => (modelValue.value = inputValue.value)
12
+ )
53
13
  watch(
54
- () => props.modelValue,
55
- () => (inputValue.value = props.modelValue)
56
- );
14
+ () => modelValue.value,
15
+ () => (inputValue.value = modelValue.value)
16
+ )
57
17
  </script>
58
18
 
59
19
  <template>
60
20
  <div class="flex flex-col">
61
- <span class="text-[14px] font-medium text-gray-500">{{ props.title }}</span>
21
+ <span class="glorious-title text-sm font-medium text-gray-500">{{
22
+ props.title
23
+ }}</span>
62
24
  <div class="glorious-textarea">
63
25
  <textarea
64
26
  v-model="inputValue"
65
- :autocomplete="props.autocomplete"
66
- :class="[props.size, `glorious-textarea-${props.color}`]"
27
+ :class="[`glorious-textarea-${props.color}`]"
67
28
  :placeholder="props.placeholder"
68
29
  :disabled="props.disabled"
30
+ :rows="props.rows"
69
31
  />
70
32
  </div>
71
33
  <GErrorText :error="props.error" />
72
34
  </div>
73
35
  </template>
74
36
 
75
- <style>
76
- .xl.glorious-textarea-orange, .xl.glorious-textarea-blue, .xl.glorious-textarea-gray, .xl.glorious-textarea-red, .xl.glorious-textarea-primary {
77
- @apply py-2.5;
78
- }
79
- .lg.glorious-textarea-orange, .lg.glorious-textarea-blue, .lg.glorious-textarea-gray, .lg.glorious-textarea-red, .lg.glorious-textarea-primary {
80
- @apply py-2;
81
- }
82
- .md.glorious-textarea-orange, .md.glorious-textarea-blue, .md.glorious-textarea-gray, .md.glorious-textarea-red, .md.glorious-textarea-primary {
83
- @apply py-1.5;
84
- }
85
- .sm.glorious-textarea-orange, .sm.glorious-textarea-blue, .sm.glorious-textarea-gray, .sm.glorious-textarea-red, .sm.glorious-textarea-primary {
86
- @apply py-1;
87
- }
88
- .xsm.glorious-textarea-orange, .xsm.glorious-textarea-blue, .xsm.glorious-textarea-gray, .xsm.glorious-textarea-red, .xsm.glorious-textarea-primary {
89
- @apply py-0.5;
90
- }
91
-
92
- .glorious-textarea-orange:focus-visible, .glorious-textarea-blue:focus-visible, .glorious-textarea-gray:focus-visible, .glorious-textarea-red:focus-visible, .glorious-textarea-primary:focus-visible {
93
- @apply outline-none ring-2;
94
- }
95
-
96
- .glorious-textarea-primary {
97
- @apply rounded-md ring-1 ring-green-500 px-3;
98
- }
99
- .glorious-textarea-primary:disabled {
100
- @apply bg-green-300 cursor-not-allowed;
101
- }
102
-
103
- .glorious-textarea-red {
104
- @apply rounded-md ring-1 ring-red-500 px-3;
105
- }
106
- .glorious-textarea-red:disabled {
107
- @apply cursor-not-allowed;
108
- }
109
-
110
- .glorious-textarea-gray {
111
- @apply rounded-md ring-1 ring-gray-500 px-3;
112
- }
113
- .glorious-textarea-gray:disabled {
114
- @apply cursor-not-allowed;
115
- }
116
-
117
- .glorious-textarea-blue {
118
- @apply rounded-md ring-1 ring-blue-500 px-3;
119
- }
120
- .glorious-textarea-blue:disabled {
121
- @apply cursor-not-allowed;
122
- }
123
-
124
- .glorious-textarea-orange {
125
- @apply rounded-md ring-1 ring-orange-500 px-3;
126
- }
127
- .glorious-textarea-orange:disabled {
128
- @apply cursor-not-allowed;
129
- }
130
-
131
- .glorious-textarea {
132
- @apply relative w-full;
133
- }
134
- .glorious-textarea > textarea {
135
- @apply w-full;
136
- }
137
- .glorious-textarea > textarea::placeholder {
138
- @apply text-[14px];
139
- }
140
- </style>
37
+ <style lang="scss" src="../../style/components/textarea.scss" />
@@ -0,0 +1,28 @@
1
+ <script lang="ts" setup>
2
+ import _props from '../props/Timeline'
3
+ const props: any = defineProps(_props)
4
+ </script>
5
+ <template>
6
+ <div class="flex gap-3 mr-4">
7
+ <div
8
+ class="flex flex-col gap-5 glorious-timeline-items"
9
+ :class="[`color-${props.color}`]"
10
+ >
11
+ <div
12
+ v-for="(item, index) in props.items.reverse()"
13
+ :key="index"
14
+ >
15
+ <div class="glorious-timeline-items-count">
16
+ {{ props.items.length - index }}
17
+ </div>
18
+ <slot
19
+ name="item"
20
+ :item="item"
21
+ >
22
+ </slot>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </template>
27
+
28
+ <style scoped lang="scss" src="../../style/components/timeline.scss" />
@@ -0,0 +1,3 @@
1
+ export declare const createBlurDom: (callback: Function) => void;
2
+ export declare const removeBlurDom: () => void;
3
+ export declare const hasValidationError: (errorProp: string) => boolean;
@@ -0,0 +1,37 @@
1
+ import { GloriousStore } from "../stores/GloriousStore.mjs";
2
+ export const createBlurDom = (callback) => {
3
+ const div = document.createElement("div");
4
+ div.classList.add(
5
+ "fixed",
6
+ "top-0",
7
+ "right-0",
8
+ "backdrop-blur-sm",
9
+ "bg-gray-500",
10
+ "bg-opacity-50",
11
+ "h-full",
12
+ "w-full",
13
+ "z-[40]",
14
+ "glorious-backdrop"
15
+ );
16
+ const nuxt = document.getElementById("__nuxt");
17
+ nuxt?.appendChild(div);
18
+ div.addEventListener("click", () => {
19
+ callback();
20
+ div.remove();
21
+ });
22
+ };
23
+ export const removeBlurDom = () => {
24
+ const blur = document.querySelector(".glorious-backdrop");
25
+ if (blur !== null) blur.remove();
26
+ };
27
+ export const hasValidationError = (errorProp) => {
28
+ const gs = GloriousStore();
29
+ const error = errorProp.split("|");
30
+ let condition = false;
31
+ if (typeof gs.forms[error[0]]?.errors !== "undefined")
32
+ condition = Object.prototype.hasOwnProperty.call(
33
+ gs.forms[error[0]]?.errors,
34
+ error[1]
35
+ );
36
+ return condition;
37
+ };
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ color: {
3
+ required: boolean;
4
+ default: string;
5
+ type: () => import("../../../types").colors;
6
+ };
7
+ };
8
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { color } from "./common/index.mjs";
2
+ export default {
3
+ ...color()
4
+ };
@@ -0,0 +1,12 @@
1
+ declare const _default: {
2
+ src: {
3
+ required: boolean;
4
+ type: StringConstructor;
5
+ };
6
+ size: {
7
+ required: boolean;
8
+ default: string;
9
+ type: () => import("../../../types").rounded;
10
+ };
11
+ };
12
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { size, rounded } from "./common/index.mjs";
2
+ export default {
3
+ ...size(),
4
+ ...rounded,
5
+ src: {
6
+ required: true,
7
+ type: String
8
+ }
9
+ };
@@ -0,0 +1,26 @@
1
+ import type { breadcrumbInterface } from '../../../types';
2
+ declare const _default: {
3
+ items: {
4
+ required: boolean;
5
+ type: {
6
+ (arrayLength: number): breadcrumbInterface[];
7
+ (...items: breadcrumbInterface[]): breadcrumbInterface[];
8
+ new (arrayLength: number): breadcrumbInterface[];
9
+ new (...items: breadcrumbInterface[]): breadcrumbInterface[];
10
+ isArray(arg: any): arg is any[];
11
+ readonly prototype: any[];
12
+ from<T>(arrayLike: ArrayLike<T>): T[];
13
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
14
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
15
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
16
+ of<T>(...items: T[]): T[];
17
+ readonly [Symbol.species]: ArrayConstructor;
18
+ };
19
+ };
20
+ divider: {
21
+ required: boolean;
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ };
26
+ export default _default;
@@ -0,0 +1,11 @@
1
+ export default {
2
+ items: {
3
+ required: true,
4
+ type: Array
5
+ },
6
+ divider: {
7
+ required: false,
8
+ type: String,
9
+ default: "/"
10
+ }
11
+ };
@@ -0,0 +1,47 @@
1
+ declare const _default: {
2
+ outline: {
3
+ required: boolean;
4
+ default: boolean;
5
+ type: BooleanConstructor;
6
+ };
7
+ ariaLabel: {
8
+ required: boolean;
9
+ default: string;
10
+ type: StringConstructor;
11
+ };
12
+ to: {
13
+ required: boolean;
14
+ default: string;
15
+ type: StringConstructor;
16
+ };
17
+ loading: {
18
+ required: boolean;
19
+ default: boolean;
20
+ type: BooleanConstructor;
21
+ };
22
+ loadingOption: {
23
+ required: boolean;
24
+ default: {
25
+ color: string;
26
+ };
27
+ type: {
28
+ color: StringConstructor;
29
+ };
30
+ };
31
+ disabled: {
32
+ required: boolean;
33
+ default: boolean;
34
+ type: BooleanConstructor;
35
+ };
36
+ size: {
37
+ required: boolean;
38
+ default: import("../../../types").sizes;
39
+ type: () => import("../../../types").sizes;
40
+ };
41
+ color: {
42
+ required: boolean;
43
+ default: string;
44
+ type: () => import("../../../types").colors;
45
+ };
46
+ };
47
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { color, size, disabled, loading, to, ariaLabel } from "./common/index.mjs";
2
+ export default {
3
+ ...color(),
4
+ ...size(),
5
+ ...disabled,
6
+ ...loading,
7
+ ...to,
8
+ ...ariaLabel,
9
+ outline: {
10
+ required: false,
11
+ default: false,
12
+ type: Boolean
13
+ }
14
+ };
@@ -0,0 +1,23 @@
1
+ declare const _default: {
2
+ checked: {
3
+ required: boolean;
4
+ default: boolean;
5
+ type: BooleanConstructor;
6
+ };
7
+ disabled: {
8
+ required: boolean;
9
+ default: boolean;
10
+ type: BooleanConstructor;
11
+ };
12
+ size: {
13
+ required: boolean;
14
+ default: import("../../../types").sizes;
15
+ type: () => import("../../../types").sizes;
16
+ };
17
+ color: {
18
+ required: boolean;
19
+ default: string;
20
+ type: () => import("../../../types").colors;
21
+ };
22
+ };
23
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { color, size, disabled, checked } from "./common/index.mjs";
2
+ export default {
3
+ ...color(),
4
+ ...size("xs"),
5
+ ...disabled,
6
+ ...checked
7
+ };
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ second: {
3
+ required: boolean;
4
+ type: NumberConstructor;
5
+ };
6
+ };
7
+ export default _default;
@@ -0,0 +1,6 @@
1
+ export default {
2
+ second: {
3
+ required: true,
4
+ type: Number
5
+ }
6
+ };
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ position: {
3
+ require: boolean;
4
+ default: string;
5
+ type: () => "right" | "left";
6
+ };
7
+ };
8
+ export default _default;
@@ -0,0 +1,7 @@
1
+ export default {
2
+ position: {
3
+ require: false,
4
+ default: "right",
5
+ type: String
6
+ }
7
+ };
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ error: {
3
+ required: boolean;
4
+ default: string;
5
+ type: StringConstructor;
6
+ };
7
+ };
8
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { error } from "./common/index.mjs";
2
+ export default {
3
+ ...error
4
+ };