@necrolab/dashboard 0.5.15 → 0.5.17
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.
- package/backend/api.js +2 -3
- package/eslint.config.js +46 -0
- package/index.html +2 -1
- package/package.json +5 -2
- package/src/App.vue +70 -566
- package/src/assets/css/base/mixins.scss +72 -0
- package/src/assets/css/base/reset.scss +0 -2
- package/src/assets/css/base/scroll.scss +43 -36
- package/src/assets/css/base/typography.scss +9 -10
- package/src/assets/css/base/variables.scss +43 -0
- package/src/assets/css/components/accessibility.scss +37 -0
- package/src/assets/css/components/buttons.scss +61 -74
- package/src/assets/css/components/forms.scss +31 -32
- package/src/assets/css/components/headers.scss +13 -21
- package/src/assets/css/components/modals.scss +2 -2
- package/src/assets/css/components/search-groups.scss +28 -22
- package/src/assets/css/components/tables.scss +5 -7
- package/src/assets/css/components/toasts.scss +7 -7
- package/src/assets/css/components/utilities.scss +295 -0
- package/src/assets/css/main.scss +55 -139
- package/src/components/Auth/LoginForm.vue +7 -86
- package/src/components/Console/ConsoleToolbar.vue +123 -0
- package/src/components/Editors/Account/Account.vue +12 -12
- package/src/components/Editors/Account/AccountView.vue +38 -111
- package/src/components/Editors/Account/CreateAccount.vue +11 -61
- package/src/components/Editors/Account/{AccountCreator.vue → CreateAccountBatch.vue} +28 -59
- package/src/components/Editors/AdminFileEditor.vue +179 -0
- package/src/components/Editors/Profile/CreateProfile.vue +77 -150
- package/src/components/Editors/Profile/Profile.vue +20 -21
- package/src/components/Editors/Profile/ProfileCountryChooser.vue +16 -60
- package/src/components/Editors/Profile/ProfileView.vue +41 -116
- package/src/components/Editors/ProxyFileEditor.vue +86 -0
- package/src/components/Editors/TagLabel.vue +16 -55
- package/src/components/Editors/TagToggle.vue +20 -8
- package/src/components/Filter/Filter.vue +66 -79
- package/src/components/Filter/FilterPreview.vue +153 -135
- package/src/components/Filter/PriceSortToggle.vue +36 -43
- package/src/components/Table/Header.vue +1 -1
- package/src/components/Table/Table.vue +45 -51
- package/src/components/Tasks/CheckStock.vue +7 -16
- package/src/components/Tasks/Controls/DesktopControls.vue +15 -60
- package/src/components/Tasks/Controls/MobileControls.vue +5 -20
- package/src/components/Tasks/CreateTaskAXS.vue +20 -118
- package/src/components/Tasks/CreateTaskTM.vue +33 -189
- package/src/components/Tasks/EventDetailRow.vue +21 -0
- package/src/components/Tasks/MassEdit.vue +6 -16
- package/src/components/Tasks/QuickSettings.vue +140 -216
- package/src/components/Tasks/ScrapeVenue.vue +4 -13
- package/src/components/Tasks/Stats.vue +20 -39
- package/src/components/Tasks/Task.vue +64 -270
- package/src/components/Tasks/TaskLabel.vue +9 -3
- package/src/components/Tasks/TaskView.vue +45 -64
- package/src/components/Tasks/Utilities.vue +10 -44
- package/src/components/Tasks/ViewTask.vue +23 -107
- package/src/components/icons/Close.vue +2 -8
- package/src/components/icons/Gear.vue +8 -8
- package/src/components/icons/Hash.vue +5 -0
- package/src/components/icons/Key.vue +2 -8
- package/src/components/icons/Pencil.vue +2 -8
- package/src/components/icons/Profile.vue +2 -8
- package/src/components/icons/Sell.vue +2 -8
- package/src/components/icons/Spinner.vue +4 -7
- package/src/components/icons/Wildcard.vue +2 -8
- package/src/components/icons/index.js +3 -5
- package/src/components/ui/ActionButtonGroup.vue +113 -52
- package/src/components/ui/BalanceIndicator.vue +60 -0
- package/src/components/ui/EmptyState.vue +24 -0
- package/src/components/ui/EnableDisableToggle.vue +23 -0
- package/src/components/ui/FormField.vue +49 -49
- package/src/components/ui/IconLabel.vue +23 -0
- package/src/components/ui/InfoRow.vue +21 -54
- package/src/components/ui/Modal.vue +161 -54
- package/src/components/ui/Navbar.vue +63 -44
- package/src/components/ui/ReadonlyFieldsSection.vue +31 -0
- package/src/components/ui/ReconnectIndicator.vue +111 -124
- package/src/components/ui/SectionCard.vue +6 -14
- package/src/components/ui/Splash.vue +2 -10
- package/src/components/ui/StatusBadge.vue +26 -28
- package/src/components/ui/TaskToggle.vue +54 -0
- package/src/components/ui/controls/CountryChooser.vue +29 -66
- package/src/components/ui/controls/EyeToggle.vue +1 -1
- package/src/components/ui/controls/atomic/Checkbox.vue +40 -121
- package/src/components/ui/controls/atomic/Dropdown.vue +103 -139
- package/src/components/ui/controls/atomic/MultiDropdown.vue +72 -120
- package/src/components/ui/controls/atomic/Switch.vue +21 -84
- package/src/composables/useCodeEditor.js +117 -0
- package/src/composables/useColorMapping.js +15 -0
- package/src/composables/useCopyToClipboard.js +1 -1
- package/src/composables/useDateFormatting.js +21 -0
- package/src/composables/useDeviceDetection.js +14 -0
- package/src/composables/useDropdownPosition.js +1 -4
- package/src/composables/useDynamicTableHeight.js +31 -0
- package/src/composables/useEnableDisable.js +6 -0
- package/src/composables/useFilterCSS.js +71 -0
- package/src/composables/useFormValidation.js +92 -0
- package/src/composables/useGetAllTags.js +9 -0
- package/src/composables/useIOSViewportHandling.js +76 -0
- package/src/composables/useNotchHandling.js +306 -0
- package/src/composables/useRowSelection.js +0 -3
- package/src/composables/useTableRender.js +23 -0
- package/src/composables/useTicketPricing.js +16 -0
- package/src/composables/useWindowDimensions.js +21 -0
- package/src/composables/useZoomPrevention.js +96 -0
- package/src/constants/tableLayout.js +14 -0
- package/src/libs/Filter.js +14 -20
- package/src/libs/panzoom.js +1 -5
- package/src/libs/utils/array.js +58 -0
- package/src/{stores/utils.js → libs/utils/dataGeneration.js} +2 -250
- package/src/libs/utils/eventUrl.js +40 -0
- package/src/libs/utils/string.js +3 -0
- package/src/libs/utils/time.js +20 -0
- package/src/libs/utils/validation.js +64 -0
- package/src/main.js +0 -2
- package/src/stores/connection.js +1 -29
- package/src/stores/logger.js +6 -12
- package/src/stores/sampleData.js +1 -2
- package/src/stores/ui.js +80 -71
- package/src/utils/tableHelpers.js +1 -0
- package/src/views/Accounts.vue +19 -38
- package/src/views/Console.vue +74 -253
- package/src/views/Editor.vue +47 -1114
- package/src/views/FilterBuilder.vue +190 -461
- package/src/views/Login.vue +3 -28
- package/src/views/Profiles.vue +17 -32
- package/src/views/Tasks.vue +51 -38
- package/tailwind.config.js +82 -71
- package/workbox-config.cjs +47 -5
- package/docs/plans/2026-02-08-tailwind-consolidation.md +0 -2438
- package/exit +0 -209
- package/run +0 -177
- package/src/assets/css/base/color-fallbacks.scss +0 -10
- package/src/assets/img/background.svg.backup +0 -11
- package/src/components/icons/SquareCheck.vue +0 -18
- package/src/components/icons/SquareUncheck.vue +0 -18
- package/src/components/ui/controls/atomic/LoadingButton.vue +0 -45
- package/switch-branch.sh +0 -41
- /package/public/{reconnect-logo.png → img/reconnect-logo.png} +0 -0
|
@@ -1,153 +1,78 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<Header class="grid-cols-
|
|
4
|
-
<div class="col-span-3
|
|
2
|
+
<div class="table-component relative box-border flex flex-col rounded-lg bg-dark-500 bg-clip-padding overflow-hidden shadow-sm">
|
|
3
|
+
<Header class="grid-cols-4 text-center sm:grid-cols-5 md:grid-cols-7 lg:grid-cols-8">
|
|
4
|
+
<div class="col-span-2 sm:col-span-2 md:col-span-3 lg:col-span-2 flex items-center justify-start">
|
|
5
5
|
<Checkbox
|
|
6
|
-
class="mr-
|
|
6
|
+
class="ml-2 mr-4 flex-shrink-0"
|
|
7
7
|
:toggled="ui.mainCheckbox.profiles"
|
|
8
8
|
@valueUpdate="ui.toggleMainCheckbox('profiles')"
|
|
9
9
|
:isHeader="true" />
|
|
10
|
-
<div class="mx-auto flex items-center" @click="ui.toggleSort('eventId')">
|
|
11
|
-
<ProfileIcon class="
|
|
12
|
-
<h4 class="hidden md:flex">Profile Name</h4>
|
|
10
|
+
<div class="mx-auto flex cursor-pointer items-center" @click="ui.toggleSort('eventId')">
|
|
11
|
+
<ProfileIcon class="icon-md" />
|
|
12
|
+
<h4 class="hidden text-white md:flex md:ml-3">Profile Name</h4>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
|
-
<div class="col-span-1 flex items-center justify-center
|
|
16
|
-
<CartIcon class="
|
|
17
|
-
<h4 class="hidden md:flex">Card Number</h4>
|
|
15
|
+
<div class="col-span-1 lg:col-span-2 hidden md:flex items-center justify-center" v-once>
|
|
16
|
+
<CartIcon class="icon-md" />
|
|
17
|
+
<h4 class="hidden text-white md:flex md:ml-3">Card Number</h4>
|
|
18
18
|
</div>
|
|
19
|
-
<div class="col-span-1 flex items-center justify-center" v-once>
|
|
20
|
-
<TimerIcon class="
|
|
21
|
-
<h4 class="hidden md:flex">Expiration</h4>
|
|
19
|
+
<div class="col-span-1 hidden md:flex items-center justify-center" v-once>
|
|
20
|
+
<TimerIcon class="icon-md" />
|
|
21
|
+
<h4 class="hidden text-white md:flex md:ml-3">Expiration</h4>
|
|
22
22
|
</div>
|
|
23
23
|
<div class="col-span-1 flex items-center justify-center" v-once>
|
|
24
|
-
<CheckmarkIcon class="
|
|
25
|
-
<h4 class="hidden md:flex">Enabled</h4>
|
|
24
|
+
<CheckmarkIcon class="icon-md" />
|
|
25
|
+
<h4 class="hidden text-white md:flex md:ml-3">Enabled</h4>
|
|
26
26
|
</div>
|
|
27
|
-
<div class="col-span-1 hidden items-center justify-center
|
|
28
|
-
<TicketIcon class="
|
|
29
|
-
<h4 class="hidden lg:flex">Tags</h4>
|
|
27
|
+
<div class="col-span-1 hidden lg:flex items-center justify-center" v-once>
|
|
28
|
+
<TicketIcon class="icon-md" />
|
|
29
|
+
<h4 class="hidden text-white lg:flex lg:ml-3">Tags</h4>
|
|
30
30
|
</div>
|
|
31
31
|
<div class="col-span-1 flex items-center justify-center" v-once>
|
|
32
|
-
<ClickIcon class="
|
|
33
|
-
<h4 class="hidden md:flex">Actions</h4>
|
|
32
|
+
<ClickIcon class="icon-md" />
|
|
33
|
+
<h4 class="hidden text-white md:flex md:ml-3">Actions</h4>
|
|
34
34
|
</div>
|
|
35
35
|
</Header>
|
|
36
36
|
<div
|
|
37
37
|
v-if="toRender.length != 0"
|
|
38
|
-
class="hidden-scrollbars
|
|
38
|
+
class="hidden-scrollbars flex flex-col divide-y divide-dark-650 overflow-y-auto overflow-x-hidden transition-colors duration-150 table-scroll"
|
|
39
39
|
:style="{ maxHeight: dynamicTableHeight }">
|
|
40
|
-
<div
|
|
40
|
+
<div
|
|
41
|
+
v-for="(profile, i) in toRender"
|
|
42
|
+
:key="profile.id || profile.index"
|
|
43
|
+
class="min-h-16 flex-shrink-0 hover:bg-dark-550">
|
|
41
44
|
<Profile
|
|
42
|
-
:class="i
|
|
45
|
+
:class="getRowClass(i)"
|
|
43
46
|
:profile="profile" />
|
|
44
47
|
</div>
|
|
45
48
|
</div>
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
<p class="text-sm text-light-400">No profiles found</p>
|
|
49
|
-
<p class="mt-1 text-xs text-light-500">Create profiles to get started</p>
|
|
50
|
-
</div>
|
|
51
|
-
</Table>
|
|
49
|
+
<EmptyState v-else :icon="ProfileIcon" message="No profiles found" subtitle="Create profiles to get started" />
|
|
50
|
+
</div>
|
|
52
51
|
</template>
|
|
53
|
-
<style lang="scss" scoped>
|
|
54
|
-
.profile-row-container {
|
|
55
|
-
min-height: 64px;
|
|
56
|
-
flex-shrink: 0;
|
|
57
|
-
transition: background-color 0.15s ease;
|
|
58
|
-
|
|
59
|
-
&:hover {
|
|
60
|
-
@apply bg-dark-550 !important;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
h4 {
|
|
65
|
-
@apply text-white;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.stop-pan {
|
|
69
|
-
touch-action: pan-y pan-up pan-down;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.max-h-big-prof {
|
|
73
|
-
max-height: calc(100vh - 20rem);
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.empty-state {
|
|
78
|
-
font-size: 14px;
|
|
79
|
-
font-weight: 500;
|
|
80
|
-
}
|
|
81
|
-
</style>
|
|
82
52
|
<script setup>
|
|
83
|
-
import {
|
|
53
|
+
import { Header } from "@/components/Table";
|
|
84
54
|
import { CartIcon, TicketIcon, ClickIcon, TimerIcon, ProfileIcon, CheckmarkIcon } from "@/components/icons";
|
|
85
55
|
import Profile from "./Profile.vue";
|
|
86
56
|
import Checkbox from "@/components/ui/controls/atomic/Checkbox.vue";
|
|
57
|
+
import EmptyState from "@/components/ui/EmptyState.vue";
|
|
87
58
|
import { useUIStore } from "@/stores/ui";
|
|
88
|
-
import {
|
|
59
|
+
import { useDynamicTableHeight } from "@/composables/useDynamicTableHeight";
|
|
60
|
+
import { computed } from "vue";
|
|
61
|
+
import { useTableRender } from "@/composables/useTableRender";
|
|
62
|
+
import { getRowClass } from "@/utils/tableHelpers";
|
|
89
63
|
|
|
90
64
|
const props = defineProps({
|
|
91
|
-
profiles: {
|
|
65
|
+
profiles: {
|
|
66
|
+
type: Object,
|
|
67
|
+
required: true
|
|
68
|
+
}
|
|
92
69
|
});
|
|
93
70
|
|
|
94
71
|
const ui = useUIStore();
|
|
95
72
|
|
|
96
|
-
const
|
|
97
|
-
const toRender = computed(() => {
|
|
98
|
-
let c = 0;
|
|
99
|
-
const rendered = props.profiles.map((t) => ({ ...t, index: c++ }));
|
|
100
|
-
|
|
101
|
-
// Initialize reactive refs for click tracking
|
|
102
|
-
rendered.forEach((t) => {
|
|
103
|
-
if (t.id && !(t.id in i.value)) {
|
|
104
|
-
i.value[t.id] = 0;
|
|
105
|
-
}
|
|
106
|
-
if (!(t.index in i.value)) {
|
|
107
|
-
i.value[t.index] = 0;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
return rendered;
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
// Dynamic height calculation for perfect item fitting
|
|
115
|
-
const windowHeight = ref(window.innerHeight);
|
|
116
|
-
const windowWidth = ref(window.innerWidth);
|
|
117
|
-
|
|
118
|
-
const updateDimensions = () => {
|
|
119
|
-
windowHeight.value = window.innerHeight;
|
|
120
|
-
windowWidth.value = window.innerWidth;
|
|
121
|
-
};
|
|
73
|
+
const { toRender } = useTableRender(computed(() => props.profiles));
|
|
122
74
|
|
|
123
|
-
|
|
124
|
-
window.addEventListener("resize", updateDimensions);
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
onUnmounted(() => {
|
|
128
|
-
window.removeEventListener("resize", updateDimensions);
|
|
129
|
-
});
|
|
75
|
+
import { TABLE_LAYOUT } from "@/constants/tableLayout";
|
|
130
76
|
|
|
131
|
-
const dynamicTableHeight =
|
|
132
|
-
// Calculate available space for profiles table with conservative buffer
|
|
133
|
-
const headerHeight = 60; // Header + navbar
|
|
134
|
-
const titleHeight = 50; // Profiles title and controls
|
|
135
|
-
const searchHeight = 50; // Search and filter controls
|
|
136
|
-
const margins = windowWidth.value >= 1024 ? 40 : 25;
|
|
137
|
-
const bufferSpace = 50; // Conservative buffer to prevent partial items
|
|
138
|
-
|
|
139
|
-
const totalUsedSpace = headerHeight + titleHeight + searchHeight + margins + bufferSpace;
|
|
140
|
-
const availableHeight = windowHeight.value - totalUsedSpace;
|
|
141
|
-
|
|
142
|
-
// Profile row height is always 64px
|
|
143
|
-
const rowHeight = 64;
|
|
144
|
-
const minRowsToShow = 2;
|
|
145
|
-
const minHeight = minRowsToShow * rowHeight;
|
|
146
|
-
|
|
147
|
-
// Calculate exact number of complete rows that fit with conservative approach
|
|
148
|
-
const maxCompleteRows = Math.floor(Math.max(availableHeight, minHeight) / rowHeight);
|
|
149
|
-
const exactHeight = maxCompleteRows * rowHeight;
|
|
150
|
-
|
|
151
|
-
return exactHeight + "px";
|
|
152
|
-
});
|
|
77
|
+
const { dynamicTableHeight } = useDynamicTableHeight(TABLE_LAYOUT.PROFILES);
|
|
153
78
|
</script>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="proxy-editor-section" :class="{ 'landscape-hidden': isHidden }">
|
|
3
|
+
<h5 class="text-white text-xl font-bold flex gap-x-3 mb-3">Proxy Editor</h5>
|
|
4
|
+
<div class="flex flex-wrap items-center gap-3 w-full mb-1">
|
|
5
|
+
<div class="w-full lg:w-64 flex flex-shrink-0 dropdown-container z-dropdown">
|
|
6
|
+
<div class="relative flex-grow">
|
|
7
|
+
<Dropdown
|
|
8
|
+
class="bg-dark-500 border-2 border-dark-550 proxy-file-dropdown w-full"
|
|
9
|
+
:default="defaultProxyList"
|
|
10
|
+
:onClick="loadProxies"
|
|
11
|
+
:options="proxyLists"
|
|
12
|
+
:allowDefault="false"
|
|
13
|
+
:includeAdjacentButtons="true"
|
|
14
|
+
rightAmount="right-1" />
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<div v-if="isProxyEditorVisible" class="flex gap-1.5 ml-auto">
|
|
18
|
+
<button class="button-default bg-dark-400" @click="$emit('save-proxies')" title="Save Proxies">
|
|
19
|
+
<svg
|
|
20
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
+
width="16"
|
|
22
|
+
height="16"
|
|
23
|
+
viewBox="0 0 24 24"
|
|
24
|
+
fill="none"
|
|
25
|
+
stroke="currentColor"
|
|
26
|
+
stroke-width="2"
|
|
27
|
+
stroke-linecap="round"
|
|
28
|
+
stroke-linejoin="round">
|
|
29
|
+
<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" />
|
|
30
|
+
<polyline points="17 21 17 13 7 13 7 21" />
|
|
31
|
+
<polyline points="7 3 7 8 15 8" />
|
|
32
|
+
</svg>
|
|
33
|
+
</button>
|
|
34
|
+
<button class="button-default bg-dark-400" @click="$emit('close-proxy')" title="Close File">
|
|
35
|
+
<svg
|
|
36
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
37
|
+
width="16"
|
|
38
|
+
height="16"
|
|
39
|
+
viewBox="0 0 24 24"
|
|
40
|
+
fill="none"
|
|
41
|
+
stroke="currentColor"
|
|
42
|
+
stroke-width="2"
|
|
43
|
+
stroke-linecap="round"
|
|
44
|
+
stroke-linejoin="round">
|
|
45
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
46
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
47
|
+
</svg>
|
|
48
|
+
</button>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<transition name="fade">
|
|
52
|
+
<div v-if="isProxyEditorVisible" class="relative my-3">
|
|
53
|
+
<div class="pb-4">
|
|
54
|
+
<div class="proxy-editor-container table-component">
|
|
55
|
+
<textarea
|
|
56
|
+
:value="proxyContent"
|
|
57
|
+
@input="$emit('update:proxyContent', $event.target.value)"
|
|
58
|
+
class="proxy-editor"
|
|
59
|
+
spellcheck="false"></textarea>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</transition>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script setup>
|
|
68
|
+
import { computed } from 'vue';
|
|
69
|
+
import Dropdown from '@/components/ui/controls/atomic/Dropdown.vue';
|
|
70
|
+
|
|
71
|
+
const props = defineProps({
|
|
72
|
+
proxyLists: { type: Array, required: true },
|
|
73
|
+
currentProxyList: { type: String, default: '' },
|
|
74
|
+
proxyContent: { type: String, default: '' },
|
|
75
|
+
defaultProxyList: { type: String, default: '' },
|
|
76
|
+
isHidden: { type: Boolean, default: false }
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const emit = defineEmits(['update:proxyContent', 'load-proxies', 'save-proxies', 'close-proxy']);
|
|
80
|
+
|
|
81
|
+
const isProxyEditorVisible = computed(() => props.currentProxyList !== '');
|
|
82
|
+
|
|
83
|
+
const loadProxies = (listName) => {
|
|
84
|
+
emit('load-proxies', listName);
|
|
85
|
+
};
|
|
86
|
+
</script>
|
|
@@ -1,64 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
|
|
2
|
+
<div class="inline-flex min-w-8 max-w-20 items-center justify-center rounded-full border-2 border-accent-green/25 bg-accent-green/12 px-2.5 py-1
|
|
3
|
+
lg:max-w-16 lg:px-2 lg:py-[3.2px]
|
|
4
|
+
md:max-w-14 md:px-[6.4px] md:py-[3.2px]
|
|
5
|
+
max-md:max-w-12 max-md:px-[5.6px] max-md:py-[2.4px]">
|
|
6
|
+
<span class="truncate text-xs+ font-semibold leading-tight tracking-[0.015em] text-accent-green
|
|
7
|
+
lg:text-2xs
|
|
8
|
+
md:text-[9.6px]
|
|
9
|
+
max-md:text-[9.2px]">
|
|
10
|
+
{{ formatText(props.text) }}
|
|
11
|
+
</span>
|
|
4
12
|
</div>
|
|
5
13
|
</template>
|
|
6
14
|
|
|
7
|
-
<style lang="scss" scoped>
|
|
8
|
-
.tag-pill {
|
|
9
|
-
@apply inline-flex items-center justify-center rounded-full;
|
|
10
|
-
background: oklch(0.72 0.15 145 / 0.12);
|
|
11
|
-
border: 1.5px solid oklch(0.72 0.15 145 / 0.25);
|
|
12
|
-
padding: 0.25rem 0.625rem;
|
|
13
|
-
min-width: 2rem;
|
|
14
|
-
max-width: 5rem;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.tag-text {
|
|
18
|
-
@apply truncate font-semibold;
|
|
19
|
-
color: oklch(0.72 0.15 145);
|
|
20
|
-
font-size: 0.6875rem;
|
|
21
|
-
line-height: 1.2;
|
|
22
|
-
letter-spacing: 0.015em;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Responsive design
|
|
26
|
-
@media (max-width: 1024px) {
|
|
27
|
-
.tag-pill {
|
|
28
|
-
padding: 0.2rem 0.5rem;
|
|
29
|
-
max-width: 4rem;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.tag-text {
|
|
33
|
-
font-size: 0.625rem;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@media (max-width: 768px) {
|
|
38
|
-
.tag-pill {
|
|
39
|
-
padding: 0.1875rem 0.4rem;
|
|
40
|
-
max-width: 3.5rem;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.tag-text {
|
|
44
|
-
font-size: 0.6rem;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@media (max-width: 480px) {
|
|
49
|
-
.tag-pill {
|
|
50
|
-
padding: 0.15rem 0.35rem;
|
|
51
|
-
max-width: 3rem;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.tag-text {
|
|
55
|
-
font-size: 0.575rem;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
</style>
|
|
59
15
|
|
|
60
16
|
<script setup>
|
|
61
|
-
const props = defineProps({
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
text: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
22
|
+
});
|
|
62
23
|
|
|
63
24
|
const formatText = (text) => {
|
|
64
25
|
if (!text) return "";
|
|
@@ -10,9 +10,6 @@
|
|
|
10
10
|
<span v-else-if="sortOptions[currentOpt % sortOptions.length] === 'Disabled'"
|
|
11
11
|
><img class="mx-auto" height="16px" width="14px" src="@/assets/img/square_uncheck.svg"
|
|
12
12
|
/></span>
|
|
13
|
-
<!-- <span v-else-if="sortOptions[currentOpt % sortOptions.length] === 'All'"
|
|
14
|
-
><img height="16px" width="14px" src="@/assets/img/wildcard.svg"
|
|
15
|
-
/></span> -->
|
|
16
13
|
<span v-else>{{ sortOptions[currentOpt % sortOptions.length] }}</span>
|
|
17
14
|
</button>
|
|
18
15
|
</template>
|
|
@@ -24,11 +21,26 @@ let sortOptions = ref([]);
|
|
|
24
21
|
const currentOpt = ref(0);
|
|
25
22
|
|
|
26
23
|
const props = defineProps({
|
|
27
|
-
filter:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
filter: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: () => ({})
|
|
27
|
+
},
|
|
28
|
+
index: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 0
|
|
31
|
+
},
|
|
32
|
+
expandedFilter: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: null
|
|
35
|
+
},
|
|
36
|
+
filterBuilder: {
|
|
37
|
+
type: Object,
|
|
38
|
+
default: () => ({})
|
|
39
|
+
},
|
|
40
|
+
options: {
|
|
41
|
+
type: Array,
|
|
42
|
+
required: true
|
|
43
|
+
},
|
|
32
44
|
noBorder: {
|
|
33
45
|
type: Boolean,
|
|
34
46
|
default: false
|