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
@@ -1,13 +1,14 @@
1
1
  <script lang="ts" setup>
2
2
  import { watch, ref } from '#imports'
3
3
  import _props from '../props/Paginate'
4
+ import { getAttribute } from '../helper'
4
5
 
5
6
  const props = defineProps(_props)
6
7
  const modelValue = defineModel()
7
8
  const emits = defineEmits(['change'])
8
9
 
9
10
  const emit = (item: any) => {
10
- if (props.currentPage !== item) {
11
+ if (getAttribute(props.currentPage, 'paginate', 'currentPage') !== item) {
11
12
  modelValue.value = item
12
13
  emits('change', { page: item })
13
14
  }
@@ -17,37 +18,57 @@ const listPage = ref<Array<Number>>([])
17
18
 
18
19
  const computeListPage = () => {
19
20
  listPage.value = []
20
- let firstPage = props.currentPage - props.numberSuggestPage
21
- const endPage = props.currentPage + (props.numberSuggestPage + 1)
21
+ let firstPage =
22
+ getAttribute(props.currentPage, 'paginate', 'currentPage') -
23
+ getAttribute(props.numberSuggestPage, 'paginate', 'numberSuggestPage')
24
+ const endPage =
25
+ getAttribute(props.currentPage, 'paginate', 'currentPage') +
26
+ (getAttribute(props.numberSuggestPage, 'paginate', 'numberSuggestPage') + 1)
22
27
 
23
28
  while (firstPage <= endPage) {
24
- if (firstPage > 0 && firstPage <= props.lastPage)
29
+ if (
30
+ firstPage > 0 &&
31
+ firstPage <= getAttribute(props.lastPage, 'paginate', 'lastPage')
32
+ )
25
33
  listPage.value.push(firstPage)
26
34
  firstPage++
27
35
  }
28
36
  }
29
37
  computeListPage()
30
38
  watch(
31
- () => props.currentPage,
39
+ () => getAttribute(props.currentPage, 'paginate', 'currentPage'),
32
40
  () => computeListPage()
33
41
  )
34
42
 
35
43
  const arrowPrevious = () => {
36
- if (props.currentPage !== 1) emit(props.currentPage - 1)
44
+ if (getAttribute(props.currentPage, 'paginate', 'currentPage') !== 1)
45
+ emit(getAttribute(props.currentPage, 'paginate', 'currentPage') - 1)
37
46
  }
38
47
  const arrowNext = () => {
39
- if (props.currentPage !== props.lastPage) emit(props.currentPage + 1)
48
+ if (
49
+ getAttribute(props.currentPage, 'paginate', 'currentPage') !==
50
+ getAttribute(props.lastPage, 'paginate', 'lastPage')
51
+ )
52
+ emit(getAttribute(props.currentPage, 'paginate', 'currentPage') + 1)
40
53
  }
41
54
  </script>
42
55
 
43
56
  <template>
44
57
  <div
45
- v-if="props.currentPage && props.lastPage !== 1"
58
+ v-if="
59
+ getAttribute(props.currentPage, 'paginate', 'currentPage') &&
60
+ getAttribute(props.lastPage, 'paginate', 'lastPage') !== 1
61
+ "
46
62
  class="w-max glorious-paginate"
63
+ :class="[`color-${getAttribute(props.color, 'paginate', 'color')}`]"
47
64
  >
48
65
  <div>
49
66
  <GIcon
50
- :color="props.currentPage !== 1 ? '#000' : '#cbd5e1'"
67
+ :color="
68
+ getAttribute(props.currentPage, 'paginate', 'currentPage') !== 1
69
+ ? '#000'
70
+ : '#cbd5e1'
71
+ "
51
72
  class="ml-2 cursor-pointer"
52
73
  name="glorious-arrow"
53
74
  :size="15"
@@ -58,14 +79,23 @@ const arrowNext = () => {
58
79
  v-for="(item, index) in listPage"
59
80
  :key="index"
60
81
  class="w-6 h-6 rounded-lg flex items-center justify-center paginate font-bold"
61
- :class="[props.currentPage === item ? 'active' : 'cursor-pointer']"
82
+ :class="[
83
+ getAttribute(props.currentPage, 'paginate', 'currentPage') === item
84
+ ? 'active'
85
+ : 'cursor-pointer',
86
+ ]"
62
87
  @click="emit(item)"
63
88
  >
64
89
  {{ item }}
65
90
  </div>
66
91
 
67
92
  <GIcon
68
- :color="props.currentPage !== props.lastPage ? '#000' : '#cbd5e1'"
93
+ :color="
94
+ getAttribute(props.currentPage, 'paginate', 'currentPage') !==
95
+ getAttribute(props.lastPage, 'paginate', 'lastPage')
96
+ ? '#000'
97
+ : '#cbd5e1'
98
+ "
69
99
  name="glorious-arrow"
70
100
  class="mr-2 cursor-pointer"
71
101
  :size="15"
@@ -74,5 +104,3 @@ const arrowNext = () => {
74
104
  </div>
75
105
  </div>
76
106
  </template>
77
-
78
- <style lang="scss" src="../../style/components/paginate.scss" />
@@ -1,5 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import _props from '../props/Radio'
3
+ import { getAttribute } from '../helper'
4
+
3
5
  const props = defineProps(_props)
4
6
  const modelValue = defineModel()
5
7
 
@@ -12,18 +14,19 @@ const inputFunction = (event: Event) => {
12
14
  <template>
13
15
  <label
14
16
  class="glorious-radio"
15
- :class="[props.color, `size-${props.size}`]"
17
+ :class="[
18
+ getAttribute(props.color, 'radio', 'color'),
19
+ `size-${getAttribute(props.size, 'radio', 'size')}`,
20
+ ]"
16
21
  >
17
22
  <input
18
- :name="props.name"
23
+ :name="getAttribute(props.checked, 'radio', 'checked')"
19
24
  type="radio"
20
25
  :disabled="props.disabled"
21
26
  :value="props.value"
22
- :checked="props.checked"
27
+ :checked="getAttribute(props.checked, 'radio', 'checked')"
23
28
  @input="inputFunction($event)"
24
29
  />
25
30
  <div></div>
26
31
  </label>
27
32
  </template>
28
-
29
- <style lang="scss" src="../../style/components/radio.scss" />
@@ -36,5 +36,3 @@ const computeModelValue = (event: Event) => {
36
36
  </template>
37
37
  </div>
38
38
  </template>
39
-
40
- <style scoped lang="scss" src="../../style/components/rating.scss" />
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import { ref, watch } from '#imports'
3
3
  import _props from '../props/Select'
4
- import { hasValidationError } from '../helper'
4
+ import { hasValidationError, getAttribute } from '../helper'
5
5
 
6
6
  const props: any = defineProps(_props)
7
7
  const modelValue = defineModel()
@@ -32,7 +32,7 @@ const firstVal = selectValue.value
32
32
  <span class="glorious-title text-sm font-medium text-gray-500">
33
33
  {{ props.title }}
34
34
  <span
35
- v-if="props.required"
35
+ v-if="getAttribute(props.required, 'select', 'required')"
36
36
  class="text-red-500"
37
37
  >
38
38
  *
@@ -42,11 +42,11 @@ const firstVal = selectValue.value
42
42
  <select
43
43
  v-model="selectValue"
44
44
  aria-label="glorious select"
45
- :disabled="props.disabled"
45
+ :disabled="getAttribute(props.disabled, 'select', 'disabled')"
46
46
  class="grow glorious-select"
47
47
  :class="[
48
- `color-${props.color}`,
49
- props.size,
48
+ `color-${getAttribute(props.color, 'select', 'color')}`,
49
+ getAttribute(props.size, 'select', 'size'),
50
50
  hasValidationError(props.error) ? 'validation-error' : '',
51
51
  selectValue === null || selectValue === ''
52
52
  ? 'text-gray-500'
@@ -66,14 +66,14 @@ const firstVal = selectValue.value
66
66
  <option
67
67
  v-for="(item, index) in props.options"
68
68
  :key="index"
69
- :value="item[props.keyOfValue]"
69
+ :value="item[getAttribute(props.keyOfValue, 'select', 'keyOfValue')]"
70
70
  >
71
- {{ item[props.displayTextKey] }}
71
+ {{
72
+ item[getAttribute(props.displayTextKey, 'select', 'displayTextKey')]
73
+ }}
72
74
  </option>
73
75
  </select>
74
76
  </div>
75
77
  <GErrorText :error="props.error" />
76
78
  </div>
77
79
  </template>
78
-
79
- <style lang="scss" src="../../style/components/select.scss" />
@@ -24,5 +24,3 @@ const input = (e: Event) => {
24
24
  </label>
25
25
  </div>
26
26
  </template>
27
-
28
- <style lang="scss" src="../../style/components/switch.scss" />
@@ -1,5 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import _props from '../props/Tab'
3
+
3
4
  const props: any = defineProps(_props)
4
5
  const modelValue = defineModel()
5
6
  const tabClicked: any = (key: string, event: any) => {
@@ -89,5 +90,3 @@ const scrollPrevious = (event: Event) => {
89
90
  </div>
90
91
  </div>
91
92
  </template>
92
-
93
- <style lang="scss" src="../../style/components/tab.scss" />
@@ -58,5 +58,3 @@ const props = defineProps(_props)
58
58
  </div>
59
59
  </div>
60
60
  </template>
61
-
62
- <style lang="scss" src="../../style/components/table.scss" />
@@ -0,0 +1,17 @@
1
+ <script lang="ts" setup>
2
+ const props = defineProps({
3
+ text: {
4
+ required: true,
5
+ type: String,
6
+ },
7
+ })
8
+ </script>
9
+
10
+ <template>
11
+ <div class="glorious-tooltip">
12
+ <div class="tooltip-slot">
13
+ <slot />
14
+ </div>
15
+ <div class="tooltip-content">{{ props.text }}</div>
16
+ </div>
17
+ </template>
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { watch, onMounted } from "#imports";
2
+ import { watch, onMounted } from '#imports'
3
3
  const props = defineProps({
4
4
  items: {
5
5
  required: true,
@@ -12,67 +12,70 @@ const props = defineProps({
12
12
  },
13
13
  progressColor: {
14
14
  required: false,
15
- default: "#00ff00",
15
+ default: '#00ff00',
16
16
  type: String,
17
17
  },
18
18
  bgColor: {
19
19
  required: false,
20
- default: "#0000ff",
20
+ default: '#0000ff',
21
21
  type: String,
22
22
  },
23
- });
23
+ })
24
24
 
25
25
  const methods = {
26
26
  computeWizardMobile: () => {
27
- const circularProgress = document.querySelectorAll(".circular-progress");
27
+ const circularProgress = document.querySelectorAll('.circular-progress')
28
28
  Array.from(circularProgress).forEach((progressBar: any) => {
29
- const progressValue: any = progressBar.querySelector(".percentage");
30
- const innerCircle: any = progressBar.querySelector(".inner-circle");
31
- const eachStep = (1 / props.items.length) * 100;
29
+ const progressValue: any = progressBar.querySelector('.percentage')
30
+ const innerCircle: any = progressBar.querySelector('.inner-circle')
31
+ const eachStep = (1 / props.items.length) * 100
32
32
 
33
33
  let startValue =
34
- Number(progressBar.getAttribute("data-percentage")) - eachStep < 0
34
+ Number(progressBar.getAttribute('data-percentage')) - eachStep < 0
35
35
  ? 0
36
- : Number(progressBar.getAttribute("data-percentage"));
36
+ : Number(progressBar.getAttribute('data-percentage'))
37
37
 
38
38
  const endValue: any =
39
39
  props.step === 0
40
40
  ? 0
41
- : Number(progressBar.getAttribute("data-percentage")) + eachStep,
42
- progressColor = progressBar.getAttribute("data-progress-color");
41
+ : Number(progressBar.getAttribute('data-percentage')) + eachStep,
42
+ progressColor = progressBar.getAttribute('data-progress-color')
43
43
 
44
44
  const progress = setInterval(() => {
45
- progressValue.textContent = props.step + 1;
45
+ progressValue.textContent = props.step + 1
46
46
 
47
47
  innerCircle.style.backgroundColor = `${progressBar.getAttribute(
48
- "data-inner-circle-color"
49
- )}`;
48
+ 'data-inner-circle-color'
49
+ )}`
50
50
 
51
51
  progressBar.style.background = `conic-gradient(${progressColor} ${
52
52
  startValue * 3.6
53
- }deg,${progressBar.getAttribute("data-bg-color")} 0deg)`;
53
+ }deg,${progressBar.getAttribute('data-bg-color')} 0deg)`
54
54
 
55
55
  if (Math.floor(startValue) == Math.floor(endValue))
56
- clearInterval(progress);
56
+ clearInterval(progress)
57
57
 
58
- startValue++;
59
- }, 10);
60
- });
58
+ startValue++
59
+ }, 10)
60
+ })
61
61
  },
62
- };
62
+ }
63
63
 
64
- onMounted(() => methods.computeWizardMobile());
64
+ onMounted(() => methods.computeWizardMobile())
65
65
 
66
66
  watch(
67
67
  () => props.step,
68
68
  () => methods.computeWizardMobile()
69
- );
69
+ )
70
70
  </script>
71
71
 
72
72
  <template>
73
73
  <div class="glorious-wizard">
74
74
  <div class="glorious-wizard-desktop">
75
- <div v-for="(item, index) in props.items" :key="index">
75
+ <div
76
+ v-for="(item, index) in props.items"
77
+ :key="index"
78
+ >
76
79
  <div
77
80
  class="circle"
78
81
  :class="parseInt(index) < props.step ? 'checked' : ''"
@@ -119,5 +122,48 @@ watch(
119
122
  </template>
120
123
 
121
124
  <style scoped>
122
- .glorious-wizard{@apply md:w-full w-max}.glorious-wizard-desktop{@apply md:flex hidden flex-wrap gap-[3%] w-full justify-center}.glorious-wizard-desktop div{@apply flex flex-col items-center}.glorious-wizard-desktop>div>div.circle{@apply rounded-full border border-blue-200 w-12 h-12 flex justify-center items-center}.glorious-wizard-desktop>div>div.circle.checked{@apply border-green-500 bg-green-500}.glorious-wizard-mobile{@apply w-max md:hidden flex flex-col items-center}.glorious-wizard-mobile>span{@apply text-gray-500 text-[12px]}.circular-progress{align-items:center;border-radius:50%;display:flex;justify-content:center}.circular-progress p,.circular-progress>div{@apply z-[25] text-gray-500}.inner-circle{background-color:#fff;border-radius:50%;position:absolute}.inner-circle.checked{@apply bg-green-500}.percentage{font-size:1rem;position:relative}
125
+ /*
126
+ .glorious-wizard {
127
+ @apply md:w-full w-max;
128
+ }
129
+ .glorious-wizard-desktop {
130
+ @apply md:flex hidden flex-wrap gap-[3%] w-full justify-center;
131
+ }
132
+ .glorious-wizard-desktop div {
133
+ @apply flex flex-col items-center;
134
+ }
135
+ .glorious-wizard-desktop > div > div.circle {
136
+ @apply rounded-full border border-blue-200 w-12 h-12 flex justify-center items-center;
137
+ }
138
+ .glorious-wizard-desktop > div > div.circle.checked {
139
+ @apply border-green-500 bg-green-500;
140
+ }
141
+ .glorious-wizard-mobile {
142
+ @apply w-max md:hidden flex flex-col items-center;
143
+ }
144
+ .glorious-wizard-mobile > span {
145
+ @apply text-gray-500 text-[12px];
146
+ }
147
+ .circular-progress {
148
+ align-items: center;
149
+ border-radius: 50%;
150
+ display: flex;
151
+ justify-content: center;
152
+ }
153
+ .circular-progress p,
154
+ .circular-progress > div {
155
+ @apply z-[25] text-gray-500;
156
+ }
157
+ .inner-circle {
158
+ background-color: #fff;
159
+ border-radius: 50%;
160
+ position: absolute;
161
+ }
162
+ .inner-circle.checked {
163
+ @apply bg-green-500;
164
+ }
165
+ .percentage {
166
+ font-size: 1rem;
167
+ position: relative;
168
+ }*/
123
169
  </style>
@@ -1,7 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, watch } from '#imports'
3
3
  import _props from '../props/Textarea'
4
- import { hasValidationError } from '../helper'
4
+ import { hasValidationError, getAttribute } from '../helper'
5
+
5
6
  const props = defineProps(_props)
6
7
  const modelValue = defineModel()
7
8
 
@@ -20,9 +21,9 @@ watch(
20
21
  <template>
21
22
  <div class="flex flex-col">
22
23
  <span class="glorious-title text-sm font-medium text-gray-500">
23
- {{ props.title }}
24
+ {{ getAttribute(props.title, 'textarea', 'title') }}
24
25
  <span
25
- v-if="props.required"
26
+ v-if="getAttribute(props.required, 'textarea', 'required')"
26
27
  class="text-red-500"
27
28
  >
28
29
  *
@@ -32,16 +33,16 @@ watch(
32
33
  <textarea
33
34
  v-model="inputValue"
34
35
  :class="[
35
- `glorious-textarea-${props.color}`,
36
+ `glorious-textarea-${getAttribute(props.color, 'textarea', 'color')}`,
36
37
  hasValidationError(props.error) ? 'validation-error' : '',
37
38
  ]"
38
- :placeholder="props.placeholder"
39
- :disabled="props.disabled"
40
- :rows="props.rows"
39
+ :placeholder="
40
+ getAttribute(props.placeholder, 'textarea', 'placeholder')
41
+ "
42
+ :disabled="getAttribute(props.disabled, 'textarea', 'disabled')"
43
+ :rows="getAttribute(props.rows, 'textarea', 'rows')"
41
44
  />
42
45
  <GErrorText :error="props.error" />
43
46
  </div>
44
47
  </div>
45
48
  </template>
46
-
47
- <style lang="scss" src="../../style/components/textarea.scss" />
@@ -24,5 +24,3 @@ const props: any = defineProps(_props)
24
24
  </div>
25
25
  </div>
26
26
  </template>
27
-
28
- <style scoped lang="scss" src="../../style/components/timeline.scss" />
@@ -1,3 +1,4 @@
1
1
  export declare const createBlurDom: (callback: Function) => void;
2
2
  export declare const removeBlurDom: () => void;
3
3
  export declare const hasValidationError: (errorProp: string) => boolean;
4
+ export declare const getAttribute: (propsValue: any, componentName: string, prop: string) => any;
@@ -1,3 +1,4 @@
1
+ import { useRuntimeConfig } from "#app";
1
2
  import { GloriousStore } from "../stores/GloriousStore.mjs";
2
3
  export const createBlurDom = (callback) => {
3
4
  const div = document.createElement("div");
@@ -5,9 +6,9 @@ export const createBlurDom = (callback) => {
5
6
  "fixed",
6
7
  "top-0",
7
8
  "right-0",
8
- "backdrop-blur-sm",
9
+ "backdrop-blur-xl",
9
10
  "bg-gray-500",
10
- "bg-opacity-50",
11
+ "opacity-75",
11
12
  "h-full",
12
13
  "w-full",
13
14
  "z-[40]",
@@ -35,3 +36,13 @@ export const hasValidationError = (errorProp) => {
35
36
  );
36
37
  return condition;
37
38
  };
39
+ export const getAttribute = (propsValue, componentName, prop) => {
40
+ let mount;
41
+ if (import.meta.client) {
42
+ const config = useRuntimeConfig();
43
+ return config.public?.glorious?.components?.[componentName]?.props?.[prop] || propsValue;
44
+ } else {
45
+ mount = propsValue;
46
+ }
47
+ return mount;
48
+ };
@@ -2,7 +2,7 @@ declare const _default: {
2
2
  color: {
3
3
  required: boolean;
4
4
  default: string;
5
- type: () => import("../../../types").colors;
5
+ type: () => import("../../../types").colors | string;
6
6
  };
7
7
  };
8
8
  export default _default;
@@ -3,7 +3,16 @@ declare const _default: {
3
3
  required: boolean;
4
4
  type: StringConstructor;
5
5
  };
6
+ alt: {
7
+ required: boolean;
8
+ type: StringConstructor;
9
+ };
6
10
  size: {
11
+ required: boolean;
12
+ default: import("../../../types").sizes;
13
+ type: () => import("../../../types").sizes;
14
+ };
15
+ rounded: {
7
16
  required: boolean;
8
17
  default: string;
9
18
  type: () => import("../../../types").rounded;
@@ -1,9 +1,7 @@
1
- import { size, rounded } from "./common/index.mjs";
1
+ import { size, rounded, alt, src } from "./common/index.mjs";
2
2
  export default {
3
- ...size(),
4
3
  ...rounded,
5
- src: {
6
- required: true,
7
- type: String
8
- }
4
+ ...size(),
5
+ ...alt(),
6
+ ...src()
9
7
  };
@@ -41,7 +41,7 @@ declare const _default: {
41
41
  color: {
42
42
  required: boolean;
43
43
  default: string;
44
- type: () => import("../../../types").colors;
44
+ type: () => import("../../../types").colors | string;
45
45
  };
46
46
  };
47
47
  export default _default;
@@ -17,7 +17,7 @@ declare const _default: {
17
17
  color: {
18
18
  required: boolean;
19
19
  default: string;
20
- type: () => import("../../../types").colors;
20
+ type: () => import("../../../types").colors | string;
21
21
  };
22
22
  };
23
23
  export default _default;
@@ -27,7 +27,7 @@ declare const _default: {
27
27
  color: {
28
28
  required: boolean;
29
29
  default: string;
30
- type: () => import("../../../types").colors;
30
+ type: () => import("../../../types").colors | string;
31
31
  };
32
32
  error: {
33
33
  required: boolean;
@@ -1,4 +1,8 @@
1
1
  declare const _default: {
2
+ hoverColor: {
3
+ required: boolean;
4
+ default: string;
5
+ };
2
6
  stroke: {
3
7
  required: boolean;
4
8
  type: (NumberConstructor | null)[];
@@ -3,5 +3,9 @@ export default {
3
3
  ...name,
4
4
  ...hashColor,
5
5
  ...intSize(),
6
- ...stroke()
6
+ ...stroke(),
7
+ hoverColor: {
8
+ required: false,
9
+ default: ""
10
+ }
7
11
  };
@@ -109,7 +109,7 @@ declare const _default: {
109
109
  color: {
110
110
  required: boolean;
111
111
  default: string;
112
- type: () => import("../../../types").colors;
112
+ type: () => import("../../../types").colors | string;
113
113
  };
114
114
  };
115
115
  export default _default;
@@ -12,7 +12,7 @@ declare const _default: {
12
12
  color: {
13
13
  required: boolean;
14
14
  default: string;
15
- type: () => import("../../../types").colors;
15
+ type: () => import("../../../types").colors | string;
16
16
  };
17
17
  };
18
18
  export default _default;
@@ -32,7 +32,7 @@ declare const _default: {
32
32
  colorBtn: {
33
33
  required: boolean;
34
34
  default: string;
35
- type: () => import("../../../types").colors;
35
+ type: () => import("../../../types").colors | string;
36
36
  };
37
37
  title: {
38
38
  required: boolean;
@@ -14,5 +14,10 @@ declare const _default: {
14
14
  type: NumberConstructor;
15
15
  default: number;
16
16
  };
17
+ color: {
18
+ required: boolean;
19
+ default: string;
20
+ type: () => import("../../../types").colors | string;
21
+ };
17
22
  };
18
23
  export default _default;
@@ -1,4 +1,6 @@
1
+ import { color } from "./common/index.mjs";
1
2
  export default {
3
+ ...color(),
2
4
  currentPage: {
3
5
  required: true,
4
6
  type: Number,
@@ -12,7 +12,7 @@ declare const _default: {
12
12
  color: {
13
13
  required: boolean;
14
14
  default: string;
15
- type: () => import("../../../types").colors;
15
+ type: () => import("../../../types").colors | string;
16
16
  };
17
17
  checked: {
18
18
  required: boolean;
@@ -50,7 +50,7 @@ declare const _default: {
50
50
  color: {
51
51
  required: boolean;
52
52
  default: string;
53
- type: () => import("../../../types").colors;
53
+ type: () => import("../../../types").colors | string;
54
54
  };
55
55
  placeholder: {
56
56
  required: boolean;