@vc-shell/framework 1.0.39 → 1.0.40

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 (212) hide show
  1. package/core/composables/usePermissions/index.ts +1 -1
  2. package/core/composables/useSettings/index.ts +31 -5
  3. package/core/types/index.ts +12 -12
  4. package/dist/core/composables/useSettings/index.d.ts +10 -1
  5. package/dist/core/composables/useSettings/index.d.ts.map +1 -1
  6. package/dist/core/types/index.d.ts.map +1 -1
  7. package/dist/framework.js +69 -69
  8. package/dist/framework.js.map +1 -1
  9. package/dist/index.d.ts +3 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/shared/blade-navigation/types/index.d.ts.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/dist/ui/components/atoms/vc-badge/index.d.ts +5 -0
  15. package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -0
  16. package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts +28 -0
  17. package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts.map +1 -0
  18. package/dist/{components → ui/components}/atoms/vc-badge/vc-badge.stories.d.ts +0 -0
  19. package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts.map +1 -0
  20. package/dist/ui/components/atoms/vc-button/index.d.ts +5 -0
  21. package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -0
  22. package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts +28 -0
  23. package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts.map +1 -0
  24. package/dist/{components → ui/components}/atoms/vc-button/vc-button.stories.d.ts +0 -0
  25. package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts.map +1 -0
  26. package/dist/{components → ui/components}/atoms/vc-checkbox/vc-checkbox.stories.d.ts +0 -0
  27. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.stories.d.ts.map +1 -0
  28. package/dist/{components → ui/components}/atoms/vc-container/vc-container.stories.d.ts +0 -0
  29. package/dist/ui/components/atoms/vc-container/vc-container.stories.d.ts.map +1 -0
  30. package/dist/{components → ui/components}/atoms/vc-hint/vc-hint.stories.d.ts +0 -0
  31. package/dist/ui/components/atoms/vc-hint/vc-hint.stories.d.ts.map +1 -0
  32. package/dist/{components → ui/components}/atoms/vc-icon/vc-icon.stories.d.ts +0 -0
  33. package/dist/ui/components/atoms/vc-icon/vc-icon.stories.d.ts.map +1 -0
  34. package/dist/{components → ui/components}/atoms/vc-image/vc-image.stories.d.ts +0 -0
  35. package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -0
  36. package/dist/{components → ui/components}/atoms/vc-label/vc-label.stories.d.ts +0 -0
  37. package/dist/ui/components/atoms/vc-label/vc-label.stories.d.ts.map +1 -0
  38. package/dist/{components → ui/components}/atoms/vc-link/vc-link.stories.d.ts +0 -0
  39. package/dist/ui/components/atoms/vc-link/vc-link.stories.d.ts.map +1 -0
  40. package/dist/{components → ui/components}/atoms/vc-progress/vc-progress.stories.d.ts +0 -0
  41. package/dist/ui/components/atoms/vc-progress/vc-progress.stories.d.ts.map +1 -0
  42. package/dist/{components → ui/components}/atoms/vc-status/vc-status.stories.d.ts +0 -0
  43. package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts.map +1 -0
  44. package/dist/{components → ui/components}/atoms/vc-switch/vc-switch.stories.d.ts +0 -0
  45. package/dist/ui/components/atoms/vc-switch/vc-switch.stories.d.ts.map +1 -0
  46. package/dist/{components → ui/components}/index.d.ts +4 -3
  47. package/dist/ui/components/index.d.ts.map +1 -0
  48. package/dist/{components → ui/components}/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts +0 -0
  49. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts.map +1 -0
  50. package/dist/{components → ui/components}/molecules/vc-form/vc-form.stories.d.ts +0 -0
  51. package/dist/ui/components/molecules/vc-form/vc-form.stories.d.ts.map +1 -0
  52. package/dist/ui/components/molecules/vc-input/index.d.ts +5 -0
  53. package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -0
  54. package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts +140 -0
  55. package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts.map +1 -0
  56. package/dist/ui/components/molecules/vc-input-currency/index.d.ts +5 -0
  57. package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -0
  58. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts +124 -0
  59. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts.map +1 -0
  60. package/dist/{components → ui/components}/molecules/vc-pagination/vc-pagination.stories.d.ts +0 -0
  61. package/dist/ui/components/molecules/vc-pagination/vc-pagination.stories.d.ts.map +1 -0
  62. package/dist/{components → ui/components}/molecules/vc-rating/vc-rating.stories.d.ts +0 -0
  63. package/dist/ui/components/molecules/vc-rating/vc-rating.stories.d.ts.map +1 -0
  64. package/dist/ui/components/molecules/vc-select/index.d.ts +5 -0
  65. package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -0
  66. package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts +207 -0
  67. package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts.map +1 -0
  68. package/dist/{components → ui/components}/molecules/vc-textarea/vc-textarea.stories.d.ts +0 -0
  69. package/dist/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts.map +1 -0
  70. package/dist/{components → ui/components}/organisms/vc-app/vc-app.stories.d.ts +0 -0
  71. package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -0
  72. package/dist/{components → ui/components}/organisms/vc-blade/vc-blade.stories.d.ts +0 -0
  73. package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -0
  74. package/dist/{components → ui/components}/organisms/vc-login-form/vc-login-form.stories.d.ts +0 -0
  75. package/dist/ui/components/organisms/vc-login-form/vc-login-form.stories.d.ts.map +1 -0
  76. package/dist/{components → ui/components}/organisms/vc-popup/vc-popup.stories.d.ts +0 -0
  77. package/dist/ui/components/organisms/vc-popup/vc-popup.stories.d.ts.map +1 -0
  78. package/dist/{components → ui/components}/organisms/vc-table/vc-table.stories.d.ts +0 -0
  79. package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -0
  80. package/dist/ui/types/index.d.ts +13 -0
  81. package/dist/ui/types/index.d.ts.map +1 -0
  82. package/dist/ui/types/ts-helpers.d.ts +13 -0
  83. package/dist/ui/types/ts-helpers.d.ts.map +1 -0
  84. package/dist/vite.config.d.ts.map +1 -1
  85. package/package.json +27 -10
  86. package/shared/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +9 -9
  87. package/shared/assets/components/assets-details/assets-details.vue +12 -12
  88. package/shared/blade-navigation/composables/useBladeNavigation/index.ts +4 -4
  89. package/shared/blade-navigation/types/index.ts +25 -25
  90. package/tailwind.config.js +4 -3
  91. package/ui/components/atoms/vc-badge/index.ts +7 -0
  92. package/ui/components/atoms/vc-badge/vc-badge-model.ts +30 -0
  93. package/{components → ui/components}/atoms/vc-badge/vc-badge.stories.ts +0 -0
  94. package/ui/components/atoms/vc-badge/vc-badge.vue +57 -0
  95. package/ui/components/atoms/vc-button/index.ts +7 -0
  96. package/ui/components/atoms/vc-button/vc-button-model.ts +30 -0
  97. package/{components → ui/components}/atoms/vc-button/vc-button.stories.ts +0 -0
  98. package/{components → ui/components}/atoms/vc-button/vc-button.vue +54 -54
  99. package/{components → ui/components}/atoms/vc-card/vc-card.vue +15 -15
  100. package/{components → ui/components}/atoms/vc-checkbox/vc-checkbox.stories.ts +0 -0
  101. package/{components → ui/components}/atoms/vc-checkbox/vc-checkbox.vue +21 -21
  102. package/{components → ui/components}/atoms/vc-col/vc-col.vue +2 -2
  103. package/{components → ui/components}/atoms/vc-container/vc-container.stories.ts +0 -0
  104. package/{components → ui/components}/atoms/vc-container/vc-container.vue +21 -19
  105. package/{components → ui/components}/atoms/vc-hint/vc-hint.stories.ts +0 -0
  106. package/{components → ui/components}/atoms/vc-hint/vc-hint.vue +1 -1
  107. package/{components → ui/components}/atoms/vc-icon/vc-icon.stories.ts +0 -0
  108. package/{components → ui/components}/atoms/vc-icon/vc-icon.vue +1 -1
  109. package/{components → ui/components}/atoms/vc-image/vc-image.stories.ts +0 -0
  110. package/{components → ui/components}/atoms/vc-image/vc-image.vue +9 -9
  111. package/{components → ui/components}/atoms/vc-info-row/vc-info-row.vue +3 -3
  112. package/{components → ui/components}/atoms/vc-label/vc-label.stories.ts +0 -0
  113. package/{components → ui/components}/atoms/vc-label/vc-label.vue +6 -6
  114. package/{components → ui/components}/atoms/vc-link/vc-link.stories.ts +0 -0
  115. package/{components → ui/components}/atoms/vc-link/vc-link.vue +3 -3
  116. package/ui/components/atoms/vc-loading/vc-loading.vue +33 -0
  117. package/{components → ui/components}/atoms/vc-progress/vc-progress.stories.ts +0 -0
  118. package/{components → ui/components}/atoms/vc-progress/vc-progress.vue +2 -2
  119. package/{components → ui/components}/atoms/vc-row/vc-row.vue +1 -1
  120. package/{components → ui/components}/atoms/vc-status/vc-status.stories.ts +0 -0
  121. package/{components → ui/components}/atoms/vc-status/vc-status.vue +4 -4
  122. package/{components → ui/components}/atoms/vc-status-icon/vc-status-icon.vue +3 -3
  123. package/{components → ui/components}/atoms/vc-switch/vc-switch.stories.ts +0 -0
  124. package/{components → ui/components}/atoms/vc-switch/vc-switch.vue +10 -10
  125. package/{components → ui/components}/atoms/vc-widget/vc-widget.vue +12 -12
  126. package/{components → ui/components}/index.ts +4 -3
  127. package/{components → ui/components}/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +17 -17
  128. package/{components → ui/components}/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +0 -0
  129. package/{components → ui/components}/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +1 -1
  130. package/{components/molecules/vc-input → ui/components/molecules/vc-currency-input}/vc-input.vue +30 -37
  131. package/{components → ui/components}/molecules/vc-editor/vc-editor.vue +4 -4
  132. package/{components → ui/components}/molecules/vc-file-upload/vc-file-upload.vue +6 -6
  133. package/{components → ui/components}/molecules/vc-form/vc-form.stories.ts +0 -0
  134. package/{components → ui/components}/molecules/vc-form/vc-form.vue +0 -0
  135. package/ui/components/molecules/vc-input/index.ts +8 -0
  136. package/ui/components/molecules/vc-input/vc-input-model.ts +150 -0
  137. package/ui/components/molecules/vc-input/vc-input.vue +324 -0
  138. package/ui/components/molecules/vc-input-currency/index.ts +8 -0
  139. package/ui/components/molecules/vc-input-currency/vc-input-currency-model.ts +128 -0
  140. package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +86 -0
  141. package/{components → ui/components}/molecules/vc-multivalue/vc-multivalue.vue +41 -41
  142. package/{components → ui/components}/molecules/vc-notification/vc-notification.vue +5 -5
  143. package/{components → ui/components}/molecules/vc-pagination/vc-pagination.stories.ts +0 -0
  144. package/{components → ui/components}/molecules/vc-pagination/vc-pagination.vue +24 -24
  145. package/{components → ui/components}/molecules/vc-rating/vc-rating.stories.ts +0 -0
  146. package/{components → ui/components}/molecules/vc-rating/vc-rating.vue +6 -6
  147. package/ui/components/molecules/vc-select/index.ts +7 -0
  148. package/ui/components/molecules/vc-select/vc-select-model.ts +216 -0
  149. package/ui/components/molecules/vc-select/vc-select.vue +727 -0
  150. package/{components → ui/components}/molecules/vc-slider/vc-slider.vue +12 -12
  151. package/{components → ui/components}/molecules/vc-textarea/vc-textarea.stories.ts +0 -0
  152. package/{components → ui/components}/molecules/vc-textarea/vc-textarea.vue +17 -17
  153. package/{components → ui/components}/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +20 -16
  154. package/{components → ui/components}/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +31 -31
  155. package/{components → ui/components}/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +9 -9
  156. package/{components → ui/components}/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +11 -11
  157. package/{components → ui/components}/organisms/vc-app/vc-app.stories.ts +0 -0
  158. package/{components → ui/components}/organisms/vc-app/vc-app.vue +9 -11
  159. package/{components → ui/components}/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +10 -10
  160. package/{components → ui/components}/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +17 -17
  161. package/{components → ui/components}/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +4 -4
  162. package/{components → ui/components}/organisms/vc-blade/vc-blade.stories.ts +0 -0
  163. package/{components → ui/components}/organisms/vc-blade/vc-blade.vue +5 -5
  164. package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +426 -0
  165. package/{components → ui/components}/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +12 -12
  166. package/{components → ui/components}/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +9 -9
  167. package/{components → ui/components}/organisms/vc-gallery/vc-gallery.vue +6 -6
  168. package/{components → ui/components}/organisms/vc-login-form/vc-login-form.stories.ts +6 -6
  169. package/{components → ui/components}/organisms/vc-login-form/vc-login-form.vue +5 -5
  170. package/{components → ui/components}/organisms/vc-popup/vc-popup.stories.ts +0 -0
  171. package/{components → ui/components}/organisms/vc-popup/vc-popup.vue +13 -13
  172. package/{components → ui/components}/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +6 -6
  173. package/{components → ui/components}/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +3 -3
  174. package/{components → ui/components}/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +13 -13
  175. package/{components → ui/components}/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +23 -23
  176. package/{components → ui/components}/organisms/vc-table/vc-table.stories.ts +3 -3
  177. package/{components → ui/components}/organisms/vc-table/vc-table.vue +42 -42
  178. package/ui/types/index.ts +38 -0
  179. package/ui/types/ts-helpers.ts +46 -0
  180. package/components/atoms/vc-badge/vc-badge.vue +0 -63
  181. package/components/atoms/vc-loading/vc-loading.vue +0 -30
  182. package/components/molecules/vc-input/vc-input.stories.ts +0 -26
  183. package/components/molecules/vc-select/vc-select.stories.ts +0 -25
  184. package/components/molecules/vc-select/vc-select.vue +0 -402
  185. package/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +0 -292
  186. package/dist/components/atoms/vc-badge/vc-badge.stories.d.ts.map +0 -1
  187. package/dist/components/atoms/vc-button/vc-button.stories.d.ts.map +0 -1
  188. package/dist/components/atoms/vc-checkbox/vc-checkbox.stories.d.ts.map +0 -1
  189. package/dist/components/atoms/vc-container/vc-container.stories.d.ts.map +0 -1
  190. package/dist/components/atoms/vc-hint/vc-hint.stories.d.ts.map +0 -1
  191. package/dist/components/atoms/vc-icon/vc-icon.stories.d.ts.map +0 -1
  192. package/dist/components/atoms/vc-image/vc-image.stories.d.ts.map +0 -1
  193. package/dist/components/atoms/vc-label/vc-label.stories.d.ts.map +0 -1
  194. package/dist/components/atoms/vc-link/vc-link.stories.d.ts.map +0 -1
  195. package/dist/components/atoms/vc-progress/vc-progress.stories.d.ts.map +0 -1
  196. package/dist/components/atoms/vc-status/vc-status.stories.d.ts.map +0 -1
  197. package/dist/components/atoms/vc-switch/vc-switch.stories.d.ts.map +0 -1
  198. package/dist/components/index.d.ts.map +0 -1
  199. package/dist/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts.map +0 -1
  200. package/dist/components/molecules/vc-form/vc-form.stories.d.ts.map +0 -1
  201. package/dist/components/molecules/vc-input/vc-input.stories.d.ts +0 -7
  202. package/dist/components/molecules/vc-input/vc-input.stories.d.ts.map +0 -1
  203. package/dist/components/molecules/vc-pagination/vc-pagination.stories.d.ts.map +0 -1
  204. package/dist/components/molecules/vc-rating/vc-rating.stories.d.ts.map +0 -1
  205. package/dist/components/molecules/vc-select/vc-select.stories.d.ts +0 -7
  206. package/dist/components/molecules/vc-select/vc-select.stories.d.ts.map +0 -1
  207. package/dist/components/molecules/vc-textarea/vc-textarea.stories.d.ts.map +0 -1
  208. package/dist/components/organisms/vc-app/vc-app.stories.d.ts.map +0 -1
  209. package/dist/components/organisms/vc-blade/vc-blade.stories.d.ts.map +0 -1
  210. package/dist/components/organisms/vc-login-form/vc-login-form.stories.d.ts.map +0 -1
  211. package/dist/components/organisms/vc-popup/vc-popup.stories.d.ts.map +0 -1
  212. package/dist/components/organisms/vc-table/vc-table.stories.d.ts.map +0 -1
@@ -11,7 +11,7 @@
11
11
  ]"
12
12
  >
13
13
  <!-- Input label -->
14
- <VcLabel v-if="label" class="mb-2" :required="required">
14
+ <VcLabel v-if="label" class="tw-mb-2" :required="required">
15
15
  <span>{{ label }}</span>
16
16
  <template v-if="tooltip" v-slot:tooltip>{{ tooltip }}</template>
17
17
  </VcLabel>
@@ -25,7 +25,7 @@
25
25
  >
26
26
  <div class="vc-multivalue__field-value">
27
27
  <span
28
- class="truncate"
28
+ class="tw-truncate"
29
29
  :title="
30
30
  type === 'number' ? Number(item.value).toFixed(3) : item.value
31
31
  "
@@ -46,7 +46,7 @@
46
46
  <template v-if="multivalue">
47
47
  <div
48
48
  ref="dropdownToggleRef"
49
- class="vc-multivalue__field vc-multivalue__field_dictionary grow basis-0 p-2"
49
+ class="vc-multivalue__field vc-multivalue__field_dictionary tw-grow tw-basis-0 tw-p-2"
50
50
  >
51
51
  <VcButton small @click.stop="toggleDropdown">Add +</VcButton>
52
52
  <teleport to="#app">
@@ -80,7 +80,7 @@
80
80
  </template>
81
81
  <template v-else>
82
82
  <input
83
- class="vc-multivalue__field grow basis-0 pl-3"
83
+ class="vc-multivalue__field tw-grow tw-basis-0 tw-pl-3"
84
84
  :placeholder="placeholder"
85
85
  :type="type"
86
86
  :value="value"
@@ -91,7 +91,7 @@
91
91
  </div>
92
92
 
93
93
  <slot v-if="errorMessage" name="error">
94
- <VcHint class="vc-multivalue__error mt-1">
94
+ <VcHint class="vc-multivalue__error tw-mt-1">
95
95
  {{ errorMessage }}
96
96
  </VcHint>
97
97
  </slot>
@@ -102,7 +102,7 @@
102
102
  import { unref, getCurrentInstance, nextTick, ref, computed } from "vue";
103
103
 
104
104
  import { useField } from "vee-validate";
105
- import { VcLabel, VcIcon } from "@/components";
105
+ import { VcLabel, VcIcon } from "@/ui/components";
106
106
  import { IValidationRules } from "@/core/types";
107
107
  import { createPopper, Instance, State } from "@popperjs/core";
108
108
  import { clickOutside as vClickOutside } from "@/core/directives";
@@ -352,96 +352,96 @@ function onSearch(event: InputEvent) {
352
352
  }
353
353
 
354
354
  .vc-multivalue {
355
- @apply overflow-hidden;
355
+ @apply tw-overflow-hidden;
356
356
 
357
357
  &_date,
358
358
  &_datetime-local {
359
- @apply max-w-[220px];
359
+ @apply tw-max-w-[220px];
360
360
 
361
361
  .vc-app_mobile & {
362
- @apply max-w-full;
362
+ @apply tw-max-w-full;
363
363
  }
364
364
  }
365
365
 
366
366
  &__field-wrapper {
367
- @apply border border-solid
368
- border-[color:var(--multivalue-border-color)]
369
- rounded-[var(--multivalue-border-radius)]
370
- bg-[color:var(--multivalue-background-color)]
371
- items-center
372
- flex
373
- flex-wrap;
367
+ @apply tw-border tw-border-solid
368
+ tw-border-[color:var(--multivalue-border-color)]
369
+ tw-rounded-[var(--multivalue-border-radius)]
370
+ tw-bg-[color:var(--multivalue-background-color)]
371
+ tw-items-center
372
+ tw-flex
373
+ tw-flex-wrap;
374
374
  }
375
375
 
376
376
  &__dropdown {
377
- @apply flex flex-col box-border
378
- max-h-[300px] z-10 overflow-hidden
379
- absolute bg-[color:var(--select-background-color)]
380
- border border-solid border-[color:var(--select-border-color)]
381
- border-t-[color:var(--select-background-color)]
382
- rounded-b-[var(--select-border-radius)]
383
- p-2;
377
+ @apply tw-flex tw-flex-col tw-box-border
378
+ tw-max-h-[300px] tw-z-10 tw-overflow-hidden
379
+ tw-absolute tw-bg-[color:var(--select-background-color)]
380
+ tw-border tw-border-solid tw-border-[color:var(--select-border-color)]
381
+ tw-border-t-[color:var(--select-background-color)]
382
+ tw-rounded-b-[var(--select-border-radius)]
383
+ tw-p-2;
384
384
  }
385
385
 
386
386
  &__search {
387
- @apply w-full box-border border border-solid border-[#eaecf2]
388
- rounded-[4px] h-8 leading-[32px]
389
- outline-none mb-3 px-2;
387
+ @apply tw-w-full tw-box-border tw-border tw-border-solid tw-border-[#eaecf2]
388
+ tw-rounded-[4px] tw-h-8 tw-leading-[32px]
389
+ tw-outline-none tw-mb-3 tw-px-2;
390
390
  }
391
391
 
392
392
  &__item {
393
- @apply flex items-center min-h-[36px] px-2 rounded-[3px] cursor-pointer hover:bg-[#eff7fc];
393
+ @apply tw-flex tw-items-center tw-min-h-[36px] tw-px-2 tw-rounded-[3px] tw-cursor-pointer hover:tw-bg-[#eff7fc];
394
394
  }
395
395
 
396
396
  &_opened &__field-wrapper {
397
- @apply rounded-t-[var(--select-border-radius)];
397
+ @apply tw-rounded-t-[var(--select-border-radius)];
398
398
  }
399
399
 
400
400
  &_error &__field-wrapper {
401
- @apply border border-solid border-[color:var(--multivalue-border-color-error)];
401
+ @apply tw-border tw-border-solid tw-border-[color:var(--multivalue-border-color-error)];
402
402
  }
403
403
 
404
404
  &__error {
405
- @apply text-[color:var(--multivalue-border-color-error)];
405
+ @apply tw-text-[color:var(--multivalue-border-color-error)];
406
406
  }
407
407
 
408
408
  &__field {
409
- @apply border-none outline-none h-[var(--multivalue-height)]
410
- min-w-[120px] box-border placeholder:text-[color:var(--multivalue-placeholder-color)];
409
+ @apply tw-border-none tw-outline-none tw-h-[var(--multivalue-height)]
410
+ tw-min-w-[120px] tw-box-border placeholder:tw-text-[color:var(--multivalue-placeholder-color)];
411
411
 
412
412
  &::-webkit-input-placeholder {
413
- @apply text-[color:var(--multivalue-placeholder-color)];
413
+ @apply tw-text-[color:var(--multivalue-placeholder-color)];
414
414
  }
415
415
 
416
416
  &::-moz-placeholder {
417
- @apply text-[color:var(--multivalue-placeholder-color)];
417
+ @apply tw-text-[color:var(--multivalue-placeholder-color)];
418
418
  }
419
419
 
420
420
  &::-ms-placeholder {
421
- @apply text-[color:var(--multivalue-placeholder-color)];
421
+ @apply tw-text-[color:var(--multivalue-placeholder-color)];
422
422
  }
423
423
 
424
424
  &-value-wrapper {
425
- @apply h-[var(--multivalue-height)] ml-2 flex items-center;
425
+ @apply tw-h-[var(--multivalue-height)] tw-ml-2 tw-flex tw-items-center;
426
426
  }
427
427
 
428
428
  &-value {
429
- @apply bg-[#fbfdfe] border border-solid border-[color:#bdd1df] rounded-[2px]
430
- flex items-center h-[28px] box-border px-2 max-w-[150px];
429
+ @apply tw-bg-[#fbfdfe] tw-border tw-border-solid tw-border-[color:#bdd1df] tw-rounded-[2px]
430
+ tw-flex tw-items-center tw-h-[28px] tw-box-border tw-px-2 tw-max-w-[150px];
431
431
 
432
432
  &-clear {
433
- @apply text-[#a9bfd2] ml-2 cursor-pointer;
433
+ @apply tw-text-[#a9bfd2] tw-ml-2 tw-cursor-pointer;
434
434
  }
435
435
  }
436
436
 
437
437
  &_dictionary {
438
- @apply h-auto min-w-[auto];
438
+ @apply tw-h-auto tw-min-w-[auto];
439
439
  }
440
440
  }
441
441
 
442
442
  &_disabled &__field-wrapper,
443
443
  &_disabled &__field {
444
- @apply bg-[#fafafa] text-[#424242];
444
+ @apply tw-bg-[#fafafa] tw-text-[#424242];
445
445
  }
446
446
  }
447
447
  </style>
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div
3
- class="vc-notification flex items-center mt-1 mb-3 mx-2 bg-[color:var(--notification-background)] border border-solid border-[color:#eef0f2] box-border shadow-[2px_2px_11px_rgba(126,142,157,0.4)] rounded-[var(--notification-border-radius)] overflow-hidden py-2 px-4 max-w-[600px]"
3
+ class="vc-notification tw-flex tw-items-center tw-mt-1 tw-mb-3 tw-mx-2 tw-bg-[color:var(--notification-background)] tw-border tw-border-solid tw-border-[color:#eef0f2] tw-box-border tw-shadow-[2px_2px_11px_rgba(126,142,157,0.4)] tw-rounded-[var(--notification-border-radius)] tw-overflow-hidden tw-py-2 tw-px-4 tw-max-w-[600px]"
4
4
  @mouseenter="onMouseEnter"
5
5
  @mouseleave="onMouseLeave"
6
6
  >
7
- <div class="text-[color:var(--notification-content-color)]">
7
+ <div class="tw-text-[color:var(--notification-content-color)]">
8
8
  <slot></slot>
9
9
  </div>
10
10
  <VcIcon
11
11
  icon="fas fa-times"
12
- class="cursor-pointer text-[color:var(--notification-dismiss-color)] ml-2"
12
+ class="tw-cursor-pointer tw-text-[color:var(--notification-dismiss-color)] tw-ml-2"
13
13
  size="s"
14
14
  @click="onDismiss"
15
15
  ></VcIcon>
@@ -17,7 +17,7 @@
17
17
  </template>
18
18
 
19
19
  <script lang="ts" setup>
20
- import { VcIcon } from "@/components";
20
+ import { VcIcon } from "@/ui/components";
21
21
 
22
22
  const props = defineProps({
23
23
  variant: {
@@ -95,7 +95,7 @@ function onDismiss() {
95
95
  pointer-events: all;
96
96
 
97
97
  .vc-app_mobile {
98
- @apply max-w-[80%];
98
+ @apply tw-max-w-[80%];
99
99
  }
100
100
  }
101
101
  </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="vc-pagination flex">
2
+ <div class="vc-pagination tw-flex">
3
3
  <!-- To first page chevron -->
4
4
  <div
5
5
  class="vc-pagination__item"
@@ -92,7 +92,7 @@
92
92
  </template>
93
93
 
94
94
  <script lang="ts" setup>
95
- import { VcIcon } from "@/components";
95
+ import { VcIcon } from "@/ui/components";
96
96
 
97
97
  defineProps({
98
98
  expanded: {
@@ -119,7 +119,7 @@ defineEmits(["itemClick"]);
119
119
  --pagination-item-width: 30px;
120
120
  --pagination-item-height: 30px;
121
121
  --pagination-item-color: #000000;
122
- --pagination-item-color-hover: #000000;
122
+ --pagination-item-color-hover:tw- #000000;
123
123
  --pagination-item-color-current: #ffffff;
124
124
  --pagination-item-color-disabled: #9c9c9c;
125
125
  --pagination-item-background-color: #ffffff;
@@ -135,34 +135,34 @@ defineEmits(["itemClick"]);
135
135
 
136
136
  .vc-pagination {
137
137
  &__item {
138
- @apply flex items-center justify-center w-[var(--pagination-item-width)]
139
- h-[var(--pagination-item-height)]
140
- bg-[color:var(--pagination-item-background-color)]
141
- border border-solid border-[color:var(--pagination-item-border-color)]
142
- rounded-[var(--pagination-item-border-radius)]
143
- text-[color:var(--pagination-item-color)]
144
- box-border cursor-pointer
145
- transition duration-200
146
- mr-3 select-none last:mr-0
147
- hover:bg-[color:var(--pagination-item-background-color-hover)]
148
- hover:text-[color:var(--pagination-item-color-hover)]
149
- hover:border hover:border-solid
150
- hover:border-[color:var(--pagination-item-border-color-hover)];
138
+ @apply tw-flex tw-items-center tw-justify-center tw-w-[var(--pagination-item-width)]
139
+ tw-h-[var(--pagination-item-height)]
140
+ tw-bg-[color:var(--pagination-item-background-color)]
141
+ tw-border tw-border-solid tw-border-[color:var(--pagination-item-border-color)]
142
+ tw-rounded-[var(--pagination-item-border-radius)]
143
+ tw-text-[color:var(--pagination-item-color)]
144
+ tw-box-border tw-cursor-pointer
145
+ tw-transition tw-duration-200
146
+ tw-mr-3 tw-select-none last:tw-mr-0
147
+ hover:tw-bg-[color:var(--pagination-item-background-color-hover)]
148
+ hover:tw-text-[color:var(--pagination-item-color-hover)]
149
+ hover:tw-border hover:tw-border-solid
150
+ hover:tw-border-[color:var(--pagination-item-border-color-hover)];
151
151
 
152
152
  &_current,
153
153
  &_current:hover {
154
- @apply bg-[color:var(--pagination-item-background-color-current)]
155
- text-[color:var(--pagination-item-color-current)]
156
- border border-solid border-[color:var(--pagination-item-border-color-current)]
157
- cursor-auto;
154
+ @apply tw-bg-[color:var(--pagination-item-background-color-current)]
155
+ tw-text-[color:var(--pagination-item-color-current)]
156
+ tw-border tw-border-solid tw-border-[color:var(--pagination-item-border-color-current)]
157
+ tw-cursor-auto;
158
158
  }
159
159
 
160
160
  &_disabled,
161
161
  &_disabled:hover {
162
- @apply bg-[color:var(--pagination-item-background-color-disabled)]
163
- text-[color:var(--pagination-item-color-disabled)]
164
- border border-solid border-[color:var(--pagination-item-border-color-disabled)]
165
- cursor-auto;
162
+ @apply tw-bg-[color:var(--pagination-item-background-color-disabled)]
163
+ tw-text-[color:var(--pagination-item-color-disabled)]
164
+ tw-border tw-border-solid tw-border-[color:var(--pagination-item-border-color-disabled)]
165
+ tw-cursor-auto;
166
166
  }
167
167
  }
168
168
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="vc-rating">
3
3
  <!-- Rating label -->
4
- <VcLabel v-if="label" class="mb-2">
4
+ <VcLabel v-if="label" class="tw-mb-2">
5
5
  <span>{{ label }}</span>
6
6
  <template v-if="tooltip" v-slot:tooltip>
7
7
  <span v-html="tooltip"></span>
@@ -41,7 +41,7 @@
41
41
  </template>
42
42
 
43
43
  <script lang="ts" setup>
44
- import { VcIcon, VcLabel } from "@/components";
44
+ import { VcIcon, VcLabel } from "@/ui/components";
45
45
 
46
46
  export interface Props {
47
47
  label?: string;
@@ -61,17 +61,17 @@ withDefaults(defineProps<Props>(), { max: 5, variant: "stars" });
61
61
  }
62
62
 
63
63
  .vc-rating {
64
- @apply align-middle;
64
+ @apply tw-align-middle;
65
65
 
66
66
  &__placeholder {
67
- @apply text-[color:var(--rating-placeholder-color)];
67
+ @apply tw-text-[color:var(--rating-placeholder-color)];
68
68
  }
69
69
  &__icon {
70
- @apply text-[color:var(--special-color)] mr-1;
70
+ @apply tw-text-[color:var(--special-color)] tw-mr-1;
71
71
  font-size: inherit;
72
72
  }
73
73
  &__rating {
74
- @apply mr-1;
74
+ @apply tw-mr-1;
75
75
  }
76
76
  }
77
77
  </style>
@@ -0,0 +1,7 @@
1
+ import { ComponentPublicInstance } from "vue";
2
+ import { VcSelectProps } from "./vc-select-model";
3
+ import { ComponentConstructor } from "@/ui/types/ts-helpers";
4
+ import Select from "./vc-select.vue";
5
+ export const VcSelect: ComponentConstructor<
6
+ ComponentPublicInstance<VcSelectProps>
7
+ > = Select;
@@ -0,0 +1,216 @@
1
+ import { VNode } from "vue";
2
+
3
+ export type OptionProp =
4
+ | ((option: string | Record<string, unknown>) => string)
5
+ | string
6
+ | undefined;
7
+
8
+ export interface VcSelectProps {
9
+ /**
10
+ * Name of select
11
+ */
12
+ name?: string | undefined;
13
+ /**
14
+ * Model of the component; Must be Array if using 'multiple' prop; Use this property with a listener for 'update:modelValue' event OR use v-model directive
15
+ */
16
+ modelValue: any;
17
+ /**
18
+ * Try to map labels of model from 'options' Array; If you are using emit-value you will probably need to use map-options to display the label text in the select field rather than the value;
19
+ * Default value: true
20
+ */
21
+ mapOptions?: boolean | undefined;
22
+ /**
23
+ * Does field have validation errors?
24
+ */
25
+ error?: boolean | undefined;
26
+ /**
27
+ * Validation error message (gets displayed only if 'error' is set to 'true')
28
+ */
29
+ errorMessage?: string | undefined;
30
+ /**
31
+ * Select label
32
+ */
33
+ label?: string | undefined;
34
+ /**
35
+ * Select description (hint) text below input component
36
+ */
37
+ hint?: string | undefined;
38
+ /**
39
+ * Prefix
40
+ */
41
+ prefix?: string | undefined;
42
+ /**
43
+ * Suffix
44
+ */
45
+ suffix?: string | undefined;
46
+ /**
47
+ * Signals the user a process is in progress by displaying a spinner
48
+ */
49
+ loading?: boolean | undefined;
50
+ /**
51
+ * Appends clearable icon when a value is set;
52
+ * When clicked, model becomes null
53
+ */
54
+ clearable?: boolean | undefined;
55
+ /**
56
+ * Put component in disabled mode
57
+ */
58
+ disabled?: boolean | undefined;
59
+ /**
60
+ * Allow multiple selection; Model must be Array
61
+ */
62
+ multiple?: boolean | undefined;
63
+ /**
64
+ * Available options that the user can select from.
65
+ * Default value: []
66
+ */
67
+ options?:
68
+ | ((
69
+ keyword?: string,
70
+ skip?: number,
71
+ ids?: string[]
72
+ ) => Promise<{
73
+ results?: Record<string, unknown>[];
74
+ totalCount?: number;
75
+ }>)
76
+ | any[]
77
+ | undefined;
78
+ /**
79
+ * Property of option which holds the 'value'
80
+ * Default value: id
81
+ * @param option The current option being processed
82
+ * @returns Value of the current option
83
+ */
84
+ optionValue?: OptionProp;
85
+ /**
86
+ * Property of option which holds the 'label'
87
+ * Default value: title
88
+ * @param option The current option being processed
89
+ * @returns Label of the current option
90
+ */
91
+ optionLabel?: OptionProp;
92
+ /**
93
+ * Update model with the value of the selected option instead of the whole option
94
+ */
95
+ emitValue?: boolean | undefined;
96
+ /**
97
+ * Debounce the search input update with an amount of milliseconds
98
+ * Default value: 500
99
+ */
100
+ debounce?: number | string | undefined;
101
+ /**
102
+ * Input placeholder text
103
+ */
104
+ placeholder?: string | undefined;
105
+ /**
106
+ * Input tooltip information
107
+ */
108
+ tooltip?: string | undefined;
109
+ /**
110
+ * Input required state
111
+ */
112
+ required?: boolean | undefined;
113
+ /**
114
+ * Input search activation
115
+ */
116
+ searchable?: boolean | undefined;
117
+ }
118
+ export interface VcSelectEmits {
119
+ /**
120
+ * Emitted when the component needs to change the model; Is also used by v-model
121
+ * @param event Emitted event name
122
+ * @param value New model value
123
+ */
124
+ (event: "update:modelValue", value: any): void;
125
+ /**
126
+ * Emitted when user wants to filter a value
127
+ * @param event Emitted event name
128
+ * @param inputValue What the user typed
129
+ */
130
+ (event: "search", inputValue: string): void;
131
+ /**
132
+ * Emitted when the select options list is hidden
133
+ * @param event Emitted event name
134
+ */
135
+ (event: "close"): void;
136
+ }
137
+ export interface VcSelectSlots {
138
+ /**
139
+ * Custom select control
140
+ */
141
+ control: (scope: { toggleHandler: () => void }) => VNode[];
142
+ /**
143
+ * Prepend inner field
144
+ */
145
+ "prepend-inner": () => VNode[];
146
+ /**
147
+ * Append to inner field
148
+ */
149
+ "append-inner": () => VNode[];
150
+ /**
151
+ * Prepend outer field
152
+ */
153
+ prepend: () => VNode[];
154
+ /**
155
+ * Append outer field
156
+ */
157
+ append: () => VNode[];
158
+ /**
159
+ * What should the menu display after filtering options and none are left to be displayed
160
+ * @param scope
161
+ */
162
+ "no-option": () => VNode[];
163
+ /**
164
+ * Slot for errors
165
+ */
166
+ error: () => VNode[];
167
+ /**
168
+ * Slot for hint text
169
+ */
170
+ hint: () => VNode[];
171
+ /**
172
+ * Override default selection slot
173
+ * @param scope
174
+ */
175
+ "selected-item": (scope: {
176
+ /**
177
+ * Selection index
178
+ */
179
+ index: number;
180
+ /**
181
+ * Selected option -- its value is taken from model
182
+ */
183
+ opt: any;
184
+ /**
185
+ * Always true -- passed as prop
186
+ */
187
+ selected: boolean;
188
+ /**
189
+ * Remove selected option located at specific index
190
+ * @param index Index at which to remove selection
191
+ */
192
+ removeAtIndex: (index: number) => void;
193
+ }) => VNode[];
194
+ /**
195
+ * Override default selection slot;
196
+ */
197
+ option: (scope: {
198
+ /**
199
+ * Option index
200
+ */
201
+ index: number;
202
+ /**
203
+ * Option -- its value is taken from 'options' prop
204
+ */
205
+ opt: any;
206
+ /**
207
+ * Is option selected?
208
+ */
209
+ selected: boolean;
210
+ /**
211
+ * Add/remove option from model
212
+ * @param opt Option to add to model
213
+ */
214
+ toggleOption: (opt: any) => void;
215
+ }) => VNode[];
216
+ }