@tekkare/auriga 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +89 -0
  2. package/dist/module.cjs +5 -0
  3. package/dist/module.d.mts +7 -0
  4. package/dist/module.d.ts +7 -0
  5. package/dist/module.json +8 -0
  6. package/dist/module.mjs +23 -0
  7. package/dist/runtime/components/argAdvancedSearchBar.vue +866 -0
  8. package/dist/runtime/components/argAdvancedSearchBar.vue.d.ts +4 -0
  9. package/dist/runtime/components/argBtn.vue +108 -0
  10. package/dist/runtime/components/argBtn.vue.d.ts +4 -0
  11. package/dist/runtime/components/argComplexSelect.vue +558 -0
  12. package/dist/runtime/components/argComplexSelect.vue.d.ts +4 -0
  13. package/dist/runtime/components/argDataLoader.vue +337 -0
  14. package/dist/runtime/components/argDataLoader.vue.d.ts +4 -0
  15. package/dist/runtime/components/argDropdownSelect.vue +321 -0
  16. package/dist/runtime/components/argDropdownSelect.vue.d.ts +4 -0
  17. package/dist/runtime/components/argFileBtn.vue +136 -0
  18. package/dist/runtime/components/argFileBtn.vue.d.ts +4 -0
  19. package/dist/runtime/components/argHeaderTabs.vue +216 -0
  20. package/dist/runtime/components/argHeaderTabs.vue.d.ts +4 -0
  21. package/dist/runtime/components/argIcon.vue +3135 -0
  22. package/dist/runtime/components/argIcon.vue.d.ts +4 -0
  23. package/dist/runtime/components/argMultipleChoice.vue +149 -0
  24. package/dist/runtime/components/argMultipleChoice.vue.d.ts +4 -0
  25. package/dist/runtime/components/argNoData.vue +83 -0
  26. package/dist/runtime/components/argNoData.vue.d.ts +4 -0
  27. package/dist/runtime/components/argSearchInput.vue +123 -0
  28. package/dist/runtime/components/argSearchInput.vue.d.ts +4 -0
  29. package/dist/runtime/components/argSimpleLabel.vue +214 -0
  30. package/dist/runtime/components/argSimpleLabel.vue.d.ts +4 -0
  31. package/dist/runtime/components/argStyle.vue +975 -0
  32. package/dist/runtime/components/argStyle.vue.d.ts +4 -0
  33. package/dist/runtime/components/argTable.vue +863 -0
  34. package/dist/runtime/components/argTable.vue.d.ts +4 -0
  35. package/dist/runtime/components/argTags.vue +26 -0
  36. package/dist/runtime/components/argTags.vue.d.ts +4 -0
  37. package/dist/runtime/components/argTekkareLoader.vue +72 -0
  38. package/dist/runtime/components/argTekkareLoader.vue.d.ts +4 -0
  39. package/dist/runtime/components/argTooltip.vue +141 -0
  40. package/dist/runtime/components/argTooltip.vue.d.ts +4 -0
  41. package/dist/runtime/plugin.d.ts +2 -0
  42. package/dist/runtime/plugin.mjs +4 -0
  43. package/dist/types.d.mts +15 -0
  44. package/dist/types.d.ts +15 -0
  45. package/package.json +45 -0
@@ -0,0 +1,136 @@
1
+ <template>
2
+ <button class="prmt_file_button">
3
+ <client-only><arg-style /></client-only>
4
+ <arg-icon :name="fileIcon.icon" :color="fileIcon.color" size="24" />
5
+ <div class="prmt_file_name_group">
6
+ <arg-tooltip :tooltipText="fileName">
7
+ <h1 class="prmt_file_name">
8
+ {{ fileName }}
9
+ </h1>
10
+ </arg-tooltip>
11
+ <h2 class="prmt_file_size">{{ fileSize }}</h2>
12
+ </div>
13
+ <!-- Add event triggers sinon -->
14
+ <a class="prmt_file_link" v-if="preview" @click="onPreview()">Preview</a>
15
+ <a class="prmt_file_link" v-if="download" @click="onDownload()">Download</a>
16
+ </button>
17
+ </template>
18
+ <script>
19
+ export default {
20
+ name: "argFileBtn"
21
+ };
22
+ </script>
23
+ <script setup lang="ts">
24
+ import argIcon from "./argIcon.vue";
25
+ import { onMounted, ref, computed, defineProps, defineEmits } from "vue";
26
+ const props = defineProps({
27
+ fileType: {
28
+ type: String,
29
+ required: false,
30
+ },
31
+ fileName: {
32
+ type: String,
33
+ required: true,
34
+ },
35
+ fileSize: {
36
+ type: String,
37
+ required: false,
38
+ },
39
+ download: {
40
+ type: Boolean,
41
+ default: false,
42
+ required: false,
43
+ },
44
+ preview: {
45
+ type: Boolean,
46
+ default: false,
47
+ required: false,
48
+ },
49
+ });
50
+
51
+ const emit = defineEmits(["onPreview", "onDownload"]);
52
+
53
+ var fileIcon = computed(() => {
54
+ var iconName = { icon: "File", color: "#3E3F5E" };
55
+ if (props.fileType) {
56
+ var ft = props.fileType.toUpperCase();
57
+ if (ft === "PDF") {
58
+ iconName = { icon: "FilePdf", color: "#D93221" };
59
+ } else if (ft === "CSV") {
60
+ iconName = { icon: "FileCsv", color: "#387A47" };
61
+ } else if (ft === "XLS" || ft === "XLSX") {
62
+ iconName = { icon: "FileXls", color: "#387A47" };
63
+ } else if (ft === "PNG") {
64
+ iconName = { icon: "FilePng", color: "#3E3F5E" };
65
+ } else if (ft === "JPG" || ft === "JPEG") {
66
+ iconName = { icon: "FileJpg", color: "#3E3F5E" };
67
+ } else if (ft === "MP4" || ft === "AVI" || ft === "MOV") {
68
+ iconName = { icon: "FileVideo", color: "#3E3F5E" };
69
+ }
70
+ }
71
+ return iconName;
72
+ });
73
+
74
+ function onPreview() {
75
+ emit("onPreview");
76
+ }
77
+ function onDownload() {
78
+ emit("onDownload");
79
+ }
80
+ </script>
81
+ <style scoped>
82
+ .prmt_file_button {
83
+ cursor: pointer;
84
+ outline: none;
85
+ display: flex;
86
+ padding: 8px 16px;
87
+ align-items: center;
88
+ gap: 16px;
89
+ align-self: stretch;
90
+ border-radius: 10px;
91
+ border: 1.5px solid var(--base-dividers, #ececf2);
92
+ background: var(--demi-fond, #f9f9fa);
93
+ max-width: 600px;
94
+ width: 100%;
95
+ }
96
+ .prmt_file_name_group {
97
+ display: flex;
98
+ flex-direction: column;
99
+ justify-content: center;
100
+ align-items: flex-start;
101
+ gap: 4px;
102
+ flex: 1 0 0;
103
+ }
104
+ .prmt_file_name {
105
+ text-overflow: ellipsis;
106
+ font-size: 14px;
107
+ font-style: normal;
108
+ font-weight: 400;
109
+ line-height: 160%;
110
+ color: var(--independence, #3e3f5e);
111
+ display: -webkit-box;
112
+ -webkit-line-clamp: 1;
113
+ -webkit-box-orient: vertical;
114
+ overflow: hidden;
115
+ }
116
+ .prmt_file_size {
117
+ font-size: 10px;
118
+ font-style: normal;
119
+ font-weight: 400;
120
+ line-height: normal;
121
+ color: var(--cool-grey, #8487ac);
122
+ }
123
+ .prmt_file_button div:empty,
124
+ .prmt_file_button h2:empty {
125
+ display: none;
126
+ }
127
+ .prmt_file_link {
128
+ font-size: 14px;
129
+ font-style: normal;
130
+ font-weight: 500;
131
+ line-height: normal;
132
+ text-decoration-line: underline;
133
+ color: var(--primary, #2176ff);
134
+ text-align: center;
135
+ }
136
+ </style>
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ name: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,216 @@
1
+ <template>
2
+ <div class="header_tabs_section">
3
+ <div class="header_tabs">
4
+ <div class="header_tabs_overlay">
5
+ <div class="header_one_tab_active-selector" id="header_nav_bar"></div>
6
+ <span
7
+ class="header_one_tab_container"
8
+ v-for="(tab, index) in removeNullProps(tabs)"
9
+ :key="index"
10
+ :id="`headerTab${index + 1}`"
11
+ >
12
+ <button
13
+ class="header_one_tab"
14
+ :class="{
15
+ active: true_index_menu.toString() === (index + 1).toString(),
16
+ }"
17
+ @click="changeMenu(index + 1)"
18
+ >
19
+ <p class="header_one_tab_title">{{ tab }}</p>
20
+ </button>
21
+ </span>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </template>
26
+ <script>
27
+ export default {
28
+ name: "argHeaderTabs"
29
+ };
30
+ </script>
31
+
32
+ <script setup lang="ts">
33
+ import {
34
+ onMounted,
35
+ ref,
36
+ computed,
37
+ defineProps,
38
+ defineEmits,
39
+ watch,
40
+ defineComponent,
41
+ } from "vue";
42
+ import _ from "lodash";
43
+ const props = defineProps({
44
+ tabs: {
45
+ type: Array,
46
+ required: true,
47
+ },
48
+ index_menu: {
49
+ type: [String, Number],
50
+ default: 1,
51
+ },
52
+ });
53
+
54
+ const emit = defineEmits(["updateMenu", "update:Value"]);
55
+
56
+ var true_index_menu = ref(props.index_menu);
57
+ var scrollValue = ref(0);
58
+ var oldWidth = ref();
59
+
60
+ watch(
61
+ () => props.index_menu,
62
+ (new_index_menu: number | string) => {
63
+ true_index_menu.value = new_index_menu;
64
+ }
65
+ );
66
+
67
+ function removeNullProps(object) {
68
+ return _.reject(object, (value) => value === null);
69
+ }
70
+
71
+ var tabsWidth = computed(() => {
72
+ const table = [];
73
+ for (let i = 0; i < props.tabs.length; i++) {
74
+ let domTab = document?.getElementById(`headerTab${i + 1}`);
75
+ if (domTab !== null) {
76
+ table.push(domTab.offsetWidth);
77
+ }
78
+ }
79
+ return table;
80
+ });
81
+
82
+ var getTranslationWidth = computed(() => {
83
+ let translateWidth = 0;
84
+ if (true_index_menu.value === 1) {
85
+ return 0;
86
+ } else {
87
+ let i = 0;
88
+ while (i + 1 < true_index_menu.value) {
89
+ translateWidth += tabsWidth.value[i];
90
+ i += 1;
91
+ }
92
+ return translateWidth;
93
+ }
94
+ });
95
+
96
+ function changeMenu(value: number | string) {
97
+ if (typeof true_index_menu.value === "string") {
98
+ emit("updateMenu", value.toString());
99
+ emit("update:Value", value.toString());
100
+ } else {
101
+ emit("updateMenu", value);
102
+ emit("update:Value", value);
103
+ }
104
+ true_index_menu.value = value;
105
+ setBarWidth();
106
+ }
107
+
108
+ function setBarWidth() {
109
+ const selector = document?.getElementById("header_nav_bar");
110
+ const element = document?.getElementById(`headerTab${true_index_menu.value}`);
111
+ if (element !== null && selector !== null) {
112
+ const width = element.offsetWidth;
113
+ selector.style.width = `${width}px`;
114
+ selector.style.transform = `translateX(${
115
+ getTranslationWidth.value +
116
+ scrollValue.value +
117
+ 24 * (true_index_menu.value - 1)
118
+ }px)`;
119
+ }
120
+ }
121
+
122
+ onMounted(() => {
123
+ oldWidth.value = window?.innerWidth;
124
+ setTimeout(() => {
125
+ changeMenu(props.index_menu);
126
+ });
127
+ window.onresize = () => {
128
+ const content = document?.querySelector(".header_tabs_overlay");
129
+ if (content !== null) {
130
+ if (window.innerWidth > oldWidth.value) {
131
+ if (content.scrollLeft === 0) {
132
+ scrollValue.value = 0;
133
+ }
134
+ }
135
+ oldWidth.value = window.innerWidth;
136
+ }
137
+ setBarWidth();
138
+ };
139
+ });
140
+ </script>
141
+
142
+ <!-- Custom navbar -->
143
+ <style scoped>
144
+ .header_tabs {
145
+ white-space: nowrap;
146
+ position: relative;
147
+ background-color: transparent;
148
+ width: auto;
149
+ border-radius: 12px;
150
+ }
151
+
152
+ .header_tabs_section {
153
+ overflow-x: hidden;
154
+ }
155
+
156
+ .header_tabs_overlay {
157
+ overflow: hidden;
158
+ }
159
+
160
+ .header_one_tab_container {
161
+ display: inline-block;
162
+ margin-right: 24px;
163
+ }
164
+
165
+ .header_one_tab {
166
+ overflow: hidden;
167
+ display: inline-block;
168
+ border: none;
169
+ background-color: transparent;
170
+ color: var(--wild-blue-yonder);
171
+ list-style: none;
172
+ font-style: normal;
173
+ font-size: 12px;
174
+ font-weight: 700;
175
+ text-align: center;
176
+ padding: 0px 0px 8px 0px;
177
+ white-space: pre-line;
178
+ overflow-wrap: break-word;
179
+ vertical-align: middle;
180
+ font-size: 16px;
181
+ font-style: normal;
182
+ font-weight: 700;
183
+ line-height: normal;
184
+ }
185
+
186
+ .header_one_tab:hover {
187
+ color: var(--primary) !important;
188
+ cursor: pointer;
189
+ }
190
+
191
+ .header_one_tab.active {
192
+ color: var(--independence);
193
+ }
194
+
195
+ .header_one_tab_active-selector {
196
+ position: absolute;
197
+ bottom: 0;
198
+ left: 0;
199
+ height: 2px;
200
+ z-index: 0;
201
+ transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
202
+ list-style: none;
203
+ border-bottom: 3px solid var(--primary);
204
+ min-width: 5px;
205
+ }
206
+ .header_one_tab_bis {
207
+ display: flex;
208
+ gap: 8px;
209
+ align-items: center;
210
+ justify-content: center;
211
+ }
212
+
213
+ .header_one_tab_icon.active {
214
+ color: var(--primary);
215
+ }
216
+ </style>
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ name: string;
3
+ };
4
+ export default _default;