refactor: rename component

This commit is contained in:
Calum H. (IMB11)
2026-07-31 12:05:45 +01:00
parent f08f2d8405
commit cb4462374c
129 changed files with 453 additions and 457 deletions
@@ -14,7 +14,7 @@ import {
DropdownSelect,
formatLoader,
injectNotificationManager,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { useStorage } from '@vueuse/core'
@@ -275,7 +275,7 @@ const filteredResults = computed(() => {
</script>
<template>
<div class="flex gap-2">
<StyledInput
<Input
v-model="search"
:icon="SearchIcon"
type="text"
@@ -7,7 +7,8 @@ import {
FileTreeSelect,
injectNotificationManager,
NewModal,
StyledInput,
Input,
Textarea,
useVIntl,
} from '@modrinth/ui'
import { save } from '@tauri-apps/plugin-dialog'
@@ -244,7 +245,7 @@ function isExportCandidateDisabled(path) {
<div class="grid grid-cols-2 gap-4">
<div class="labeled_input w-full">
<p class="text-contrast font-semibold">{{ formatMessage(messages.modpackNameLabel) }}</p>
<StyledInput
<Input
v-model="nameInput"
type="text"
:placeholder="formatMessage(messages.modpackNamePlaceholder)"
@@ -256,7 +257,7 @@ function isExportCandidateDisabled(path) {
<p class="text-contrast font-semibold">
{{ formatMessage(messages.versionNumberLabel) }}
</p>
<StyledInput
<Input
v-model="versionInput"
type="text"
:placeholder="formatMessage(messages.versionNumberPlaceholder)"
@@ -269,9 +270,8 @@ function isExportCandidateDisabled(path) {
<p class="m-0 text-contrast font-semibold">
{{ formatMessage(commonMessages.descriptionLabel) }}
</p>
<StyledInput
<Textarea
v-model="exportDescription"
multiline
:placeholder="formatMessage(messages.descriptionPlaceholder)"
wrapper-class="w-full"
/>
@@ -2,7 +2,7 @@
<JavaDetectionModal ref="detectJavaModal" @submit="(val) => emit('update:modelValue', val)" />
<div :id="props.id" class="toggle-setting" :class="{ compact }">
<div class="input-with-status">
<StyledInput
<Input
autocomplete="off"
:disabled="props.disabled"
:model-value="props.modelValue ? props.modelValue.path : ''"
@@ -93,7 +93,7 @@ import {
ButtonStyled,
defineMessages,
injectNotificationManager,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { open } from '@tauri-apps/plugin-dialog'
@@ -6,7 +6,7 @@ import {
defineMessages,
injectNotificationManager,
IntlFormatted,
StyledInput,
Input,
useRelativeTime,
useVIntl,
} from '@modrinth/ui'
@@ -232,7 +232,7 @@ const messages = defineMessages({
{{ formatMessage(messages.usernameDescription) }}
</p>
<div class="flex items-center gap-2 mt-4">
<StyledInput
<Input
v-model="username"
:icon="UserIcon"
type="text"
@@ -260,7 +260,7 @@ const messages = defineMessages({
<UserPlusIcon />
</button>
</ButtonStyled>
<StyledInput
<Input
v-model="search"
:icon="SearchIcon"
type="text"
@@ -5,7 +5,7 @@ import {
Avatar,
ButtonStyled,
injectNotificationManager,
StyledInput,
Input,
} from '@modrinth/ui'
import { useQueryClient } from '@tanstack/vue-query'
import { convertFileSrc } from '@tauri-apps/api/core'
@@ -85,7 +85,7 @@ async function addServer(instance) {
<ModalWrapper ref="modal" header="Add server to instance">
<div class="flex flex-col gap-4 min-w-[350px]">
<Admonition type="warning" body="This server may not be compatible with all instances." />
<StyledInput
<Input
v-model="searchFilter"
:icon="SearchIcon"
type="search"
@@ -8,7 +8,7 @@ import {
defineMessages,
injectNotificationManager,
OverflowMenu,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { useQueryClient } from '@tanstack/vue-query'
@@ -339,7 +339,7 @@ const messages = defineMessages({
{{ formatMessage(messages.name) }}
</label>
<div class="flex">
<StyledInput
<Input
id="instance-name"
v-model="title"
autocomplete="off"
@@ -382,7 +382,7 @@ const messages = defineMessages({
@click="toggleGroup(group)"
/>
<div class="flex gap-2 items-center">
<StyledInput
<Input
v-model="newCategoryInput"
:placeholder="formatMessage(messages.libraryGroupsEnterName)"
class="w-full max-w-[300px]"
@@ -3,7 +3,7 @@ import {
Checkbox,
defineMessages,
injectNotificationManager,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { computed, ref, watch } from 'vue'
@@ -112,7 +112,7 @@ const messages = defineMessages({
<h2 class="mt-6 m-0 text-lg font-semibold text-contrast">
{{ formatMessage(messages.preLaunch) }}
</h2>
<StyledInput
<Input
id="pre-launch"
v-model="hooks.pre_launch"
autocomplete="off"
@@ -127,7 +127,7 @@ const messages = defineMessages({
<h2 class="mt-6 m-0 text-lg font-semibold text-contrast">
{{ formatMessage(messages.wrapper) }}
</h2>
<StyledInput
<Input
id="wrapper"
v-model="hooks.wrapper"
autocomplete="off"
@@ -142,7 +142,7 @@ const messages = defineMessages({
<h2 class="mt-6 m-0 text-lg font-semibold text-contrast">
{{ formatMessage(messages.postExit) }}
</h2>
<StyledInput
<Input
id="post-exit"
v-model="hooks.post_exit"
autocomplete="off"
@@ -14,7 +14,7 @@ import {
defineMessages,
injectNotificationManager,
Slider,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { open } from '@tauri-apps/plugin-dialog'
@@ -216,7 +216,7 @@ const messages = defineMessages({
>Java {{ optimalJava?.parsed_version }}</span
>
<div class="flex gap-2 items-center">
<StyledInput
<Input
:model-value="activePath"
:disabled="!overrideJavaInstall"
autocomplete="off"
@@ -294,7 +294,7 @@ const messages = defineMessages({
:label="formatMessage(messages.customJavaArguments)"
class="my-2"
/>
<StyledInput
<Input
id="java-args"
v-model="javaArgs"
autocomplete="off"
@@ -310,7 +310,7 @@ const messages = defineMessages({
:label="formatMessage(messages.customEnvironmentVariables)"
class="mb-2"
/>
<StyledInput
<Input
id="env-vars"
v-model="envVars"
autocomplete="off"
@@ -3,7 +3,7 @@ import {
Checkbox,
defineMessages,
injectNotificationManager,
StyledInput,
Input,
Toggle,
useVIntl,
} from '@modrinth/ui'
@@ -129,7 +129,7 @@ const messages = defineMessages({
{{ formatMessage(messages.widthDescription) }}
</p>
</div>
<StyledInput
<Input
id="width"
v-model="resolution[0]"
autocomplete="off"
@@ -148,7 +148,7 @@ const messages = defineMessages({
{{ formatMessage(messages.heightDescription) }}
</p>
</div>
<StyledInput
<Input
id="height"
v-model="resolution[1]"
autocomplete="off"
@@ -3,7 +3,7 @@ import {
defineMessages,
injectNotificationManager,
Slider,
StyledInput,
Input,
Toggle,
useVIntl,
} from '@modrinth/ui'
@@ -187,7 +187,7 @@ watch(
</p>
</div>
<StyledInput
<Input
id="width"
v-model="settings.game_resolution[0]"
:disabled="settings.force_fullscreen"
@@ -207,7 +207,7 @@ watch(
</p>
</div>
<StyledInput
<Input
id="height"
v-model="settings.game_resolution[1]"
:disabled="settings.force_fullscreen"
@@ -244,7 +244,7 @@ watch(
<h2 class="m-0 text-lg font-semibold text-contrast">
{{ formatMessage(messages.javaArgumentsTitle) }}
</h2>
<StyledInput
<Input
id="java-args"
v-model="settings.launchArgs"
autocomplete="off"
@@ -261,7 +261,7 @@ watch(
<h2 class="m-0 text-lg font-semibold text-contrast">
{{ formatMessage(messages.environmentVariablesTitle) }}
</h2>
<StyledInput
<Input
id="env-vars"
v-model="settings.envVars"
autocomplete="off"
@@ -282,7 +282,7 @@ watch(
<h3 class="m-0 text-lg font-semibold text-contrast">
{{ formatMessage(messages.preLaunchHookTitle) }}
</h3>
<StyledInput
<Input
id="pre-launch"
v-model="settings.hooks.pre_launch"
autocomplete="off"
@@ -299,7 +299,7 @@ watch(
<h3 class="m-0 text-lg font-semibold text-contrast">
{{ formatMessage(messages.wrapperHookTitle) }}
</h3>
<StyledInput
<Input
id="wrapper"
v-model="settings.hooks.wrapper"
autocomplete="off"
@@ -316,7 +316,7 @@ watch(
<h3 class="m-0 text-lg font-semibold text-contrast">
{{ formatMessage(messages.postExitHookTitle) }}
</h3>
<StyledInput
<Input
id="post-exit"
v-model="settings.hooks.post_exit"
autocomplete="off"
@@ -5,7 +5,7 @@ import {
defineMessages,
injectNotificationManager,
Slider,
StyledInput,
Input,
Toggle,
useVIntl,
} from '@modrinth/ui'
@@ -175,7 +175,7 @@ async function findLauncherDir() {
<h2 class="m-0 text-lg font-semibold text-contrast">
{{ formatMessage(messages.appDirectoryTitle) }}
</h2>
<StyledInput
<Input
id="appDir"
v-model="settings.custom_dir"
:icon="BoxIcon"
@@ -194,7 +194,7 @@ async function findLauncherDir() {
</button>
</ButtonStyled>
</template>
</StyledInput>
</Input>
<p class="m-0 leading-tight text-secondary">
{{ formatMessage(messages.appDirectoryDescription) }}
</p>
@@ -6,7 +6,7 @@ import {
commonMessages,
defineMessages,
injectNotificationManager,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { computed, ref } from 'vue'
@@ -104,7 +104,7 @@ const messages = defineMessages({
<h2 class="text-lg font-extrabold text-contrast mt-0 mb-1">
{{ formatMessage(messages.name) }}
</h2>
<StyledInput
<Input
v-model="name"
:placeholder="formatMessage(messages.placeholderName)"
autocomplete="off"
@@ -3,7 +3,7 @@ import {
Combobox,
defineMessages,
type MessageDescriptor,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
@@ -65,7 +65,7 @@ defineExpose({ resourcePackOptions })
<div class="space-y-4 w-full">
<label class="flex flex-col gap-2">
<span class="font-semibold text-contrast">{{ formatMessage(messages.name) }}</span>
<StyledInput
<Input
v-model="name"
:placeholder="formatMessage(messages.placeholderName)"
autocomplete="off"
@@ -74,7 +74,7 @@ defineExpose({ resourcePackOptions })
</label>
<label class="flex flex-col gap-2">
<span class="font-semibold text-contrast">{{ formatMessage(messages.address) }}</span>
<StyledInput
<Input
v-model="address"
:placeholder="formatMessage(messages.placeholderAddress)"
autocomplete="off"
@@ -21,7 +21,7 @@
<ReadyTransition :pending="worldsReadyPending">
<div v-if="dedupedWorlds.length > 0" class="flex flex-col gap-4">
<div class="flex flex-wrap items-center gap-2">
<StyledInput
<Input
v-model="searchFilter"
:icon="SearchIcon"
type="text"
@@ -155,7 +155,7 @@ import {
type GameVersion,
injectNotificationManager,
ReadyTransition,
StyledInput,
Input,
useReadyState,
useVIntl,
} from '@modrinth/ui'
@@ -2,7 +2,7 @@
<div class="flex flex-col gap-4">
<div class="flex flex-col gap-4">
<div class="flex items-center gap-2">
<StyledInput
<Input
v-model="search"
:icon="SearchIcon"
:placeholder="`Search ${rows.length} users...`"
@@ -151,7 +151,7 @@ import {
ButtonStyled,
defineMessages,
type SortDirection,
StyledInput,
Input,
Table,
type TableColumn,
truncatedTooltip,
@@ -23,7 +23,7 @@
</div>
<div class="flex w-full flex-wrap items-center gap-2 md:w-auto">
<StyledInput
<Input
v-model="searchQuery"
:icon="SearchIcon"
:placeholder="formatMessage(analyticsTableMessages.searchPlaceholder)"
@@ -196,7 +196,7 @@ import {
OverflowMenu,
type OverflowMenuOption,
Pagination,
StyledInput,
Input,
Table,
useFormatNumber,
useVIntl,
@@ -48,7 +48,7 @@
To confirm this transfer, type
<span class="font-bold text-contrast">{{ organization.name }}</span> below
</p>
<StyledInput
<Input
v-model="confirmationText"
:placeholder="`Enter ${organization.name}`"
wrapper-class="w-full"
@@ -76,7 +76,7 @@
<script setup lang="ts">
import { RightArrowIcon, TransferIcon, XIcon } from '@modrinth/assets'
import { Admonition, Avatar, ButtonStyled, NewModal, StyledInput } from '@modrinth/ui'
import { Admonition, Avatar, ButtonStyled, NewModal, Input } from '@modrinth/ui'
import { computed, ref } from 'vue'
const props = defineProps<{
@@ -55,7 +55,7 @@
To confirm this transfer, type
<span class="font-bold text-contrast">{{ project.name }}</span> below
</p>
<StyledInput
<Input
v-model="confirmationText"
:placeholder="`Enter ${project.name}`"
wrapper-class="w-full"
@@ -83,7 +83,7 @@
<script setup lang="ts">
import { RightArrowIcon, TransferIcon, XIcon } from '@modrinth/assets'
import { Admonition, Avatar, ButtonStyled, NewModal, StyledInput } from '@modrinth/ui'
import { Admonition, Avatar, ButtonStyled, NewModal, Input } from '@modrinth/ui'
import { computed, ref } from 'vue'
const props = defineProps<{
@@ -11,7 +11,7 @@
>
<BookmarkIcon aria-hidden="true" :fill="saved ? 'currentColor' : 'none'" />
<template #menu>
<StyledInput
<Input
v-model="displayCollectionsSearch"
:placeholder="formatMessage(commonMessages.searchPlaceholder)"
wrapper-class="menu-search"
@@ -57,7 +57,7 @@ import {
Checkbox,
commonMessages,
PopoutMenu,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { computed, ref } from 'vue'
@@ -8,7 +8,7 @@ import {
injectNotificationManager,
NewModal,
ServerNotice,
StyledInput,
Input,
TagItem,
} from '@modrinth/ui'
import { ref } from 'vue'
@@ -175,7 +175,7 @@ defineExpose({ show, hide })
<span v-else class="mb-2"> No nodes assigned yet </span>
</div>
<div class="flex w-[45rem] items-center gap-2">
<StyledInput
<Input
id="server-assign-field"
v-model="inputField"
wrapper-class="w-full"
@@ -20,7 +20,7 @@
<label for="days" class="flex flex-col gap-1">
<span class="text-lg font-semibold text-contrast"> Days to credit </span>
</label>
<StyledInput
<Input
id="days"
v-model="days"
wrapper-class="w-32"
@@ -36,7 +36,7 @@
<span class="text-lg font-semibold text-contrast"> Node hostnames </span>
</label>
<div class="flex items-center gap-2">
<StyledInput
<Input
id="node-input"
v-model="nodeInput"
wrapper-class="w-32"
@@ -92,10 +92,9 @@
class="text-muted flex flex-col gap-2 rounded-lg border border-surface-5 bg-button-bg p-4"
>
<span>Hi {user.name},</span>
<StyledInput
<Textarea
id="message-batch"
v-model="message"
multiline
:rows="3"
input-class="!bg-surface-3"
/>
@@ -136,7 +135,8 @@ import {
injectModrinthClient,
injectNotificationManager,
NewModal,
StyledInput,
Input,
Textarea,
TagItem,
Toggle,
} from '@modrinth/ui'
@@ -25,10 +25,9 @@
</span>
<span>Server IDs (one per line or comma-separated.)</span>
</label>
<StyledInput
<Textarea
id="server-ids"
v-model="serverIdsInput"
multiline
:rows="4"
input-class="bg-surface-3"
placeholder="123e4569-e89b-12d3-a456-426614174005&#10;123e9569-e89b-12d3-a456-413678919876"
@@ -48,7 +47,7 @@
<span>Add nodes to transfer (comma or space-separated).</span>
</label>
<div class="flex items-center gap-2">
<StyledInput
<Input
id="node-input"
v-model="nodeInput"
wrapper-class="w-64"
@@ -86,7 +85,7 @@
<span class="text-lg font-semibold text-contrast">Tag transferred nodes</span>
<span>Optional tag to add to the transferred nodes.</span>
</label>
<StyledInput
<Input
id="tag-nodes"
v-model="tagNodes"
wrapper-class="max-w-[12rem]"
@@ -114,7 +113,7 @@
<span>Optional preferred node tags for node selection.</span>
</label>
<div class="flex items-center gap-2">
<StyledInput
<Input
id="tag-input"
v-model="tagInput"
wrapper-class="w-40"
@@ -147,7 +146,7 @@
:format-label="(item) => scheduleOptionLabels[item]"
:capitalize="false"
/>
<StyledInput
<DateInput
v-if="scheduleOption === 'later'"
v-model="scheduledDate"
type="datetime-local"
@@ -164,10 +163,9 @@
</span>
<span>Provide a reason for this transfer batch.</span>
</label>
<StyledInput
<Textarea
id="reason"
v-model="reason"
multiline
:rows="2"
input-class="bg-surface-3"
placeholder="Node maintenance scheduled"
@@ -200,8 +198,10 @@ import {
Combobox,
injectModrinthClient,
injectNotificationManager,
DateInput,
NewModal,
StyledInput,
Input,
Textarea,
TagItem,
Toggle,
} from '@modrinth/ui'
@@ -45,7 +45,7 @@
<label class="text-md font-semibold text-contrast" for="create-account-username">
{{ formatMessage(messages.usernameOptionalLabel) }}
</label>
<StyledInput
<Input
id="create-account-username"
v-model="usernameModel"
type="text"
@@ -106,7 +106,7 @@ import {
DatePicker,
defineMessages,
injectNotificationManager,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { computed, ref } from 'vue'
@@ -111,7 +111,7 @@
<div class="text-md font-semibold text-contrast">
{{ formatMessage(messages.passkeyNameLabel) }}
</div>
<StyledInput
<Input
id="passkey-name"
v-model="pendingPasskeyName"
:maxlength="255"
@@ -150,7 +150,7 @@
<div class="text-md font-semibold text-contrast">
{{ formatMessage(messages.passkeyNameLabel) }}
</div>
<StyledInput
<Input
id="passkey-rename"
v-model="passkeyToRenameName"
:maxlength="255"
@@ -216,7 +216,7 @@ import {
injectModrinthClient,
injectNotificationManager,
NewModal,
StyledInput,
Input,
useFormatDateTime,
useRelativeTime,
useVIntl,
@@ -18,7 +18,7 @@
{{ formatMessage(messages.twoFactorCodeLabelDescription) }}
</span>
</label>
<StyledInput
<Input
id="two-factor-code"
v-model="twoFactorCodeModel"
:maxlength="11"
@@ -89,7 +89,7 @@
<section class="mx-auto flex w-full flex-col gap-2.5">
<label for="email" hidden>{{ formatMessage(commonMessages.emailUsernameLabel) }}</label>
<StyledInput
<Input
id="email"
v-model="emailModel"
:icon="MailIcon"
@@ -101,7 +101,7 @@
/>
<label for="password" hidden>{{ formatMessage(commonMessages.passwordLabel) }}</label>
<StyledInput
<Input
id="password"
v-model="passwordModel"
:icon="KeyIcon"
@@ -167,7 +167,7 @@ import {
SteamColorIcon,
UserKeyIcon,
} from '@modrinth/assets'
import { ButtonStyled, commonMessages, defineMessages, StyledInput, useVIntl } from '@modrinth/ui'
import { ButtonStyled, commonMessages, defineMessages, Input, useVIntl } from '@modrinth/ui'
import { useStorage } from '@vueuse/core'
import { computed } from 'vue'
import type { LocationQuery } from 'vue-router'
@@ -84,7 +84,7 @@
<section class="flex flex-col gap-2.5">
<label for="email" hidden>{{ formatMessage(commonMessages.emailLabel) }}</label>
<StyledInput
<Input
id="email"
v-model="emailModel"
:icon="MailIcon"
@@ -95,7 +95,7 @@
/>
<label for="password" hidden>{{ formatMessage(commonMessages.passwordLabel) }}</label>
<StyledInput
<Input
id="password"
v-model="passwordModel"
:icon="KeyIcon"
@@ -163,7 +163,7 @@ import {
commonMessages,
defineMessages,
IntlFormatted,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { useStorage } from '@vueuse/core'
@@ -13,7 +13,7 @@
size="small"
/>
</div>
<StyledInput
<Input
v-model="searchQuery"
:icon="SearchIcon"
type="text"
@@ -68,7 +68,7 @@
<script lang="ts" setup>
import type { Labrinth } from '@modrinth/api-client'
import { SearchIcon } from '@modrinth/assets'
import { ButtonStyled, Chips, StyledInput } from '@modrinth/ui'
import { ButtonStyled, Chips, Input } from '@modrinth/ui'
import { useMagicKeys } from '@vueuse/core'
import { computed, nextTick, onMounted, ref } from 'vue'
@@ -24,7 +24,7 @@
<span class="font-semibold text-contrast">
{{ formatMessage(messages.versionNumber) }} <span class="text-red">*</span>
</span>
<StyledInput
<Input
id="version-number"
v-model="draftVersion.version_number"
:disabled="isUploading"
@@ -36,7 +36,7 @@
</div>
<div class="flex flex-col gap-2">
<span class="font-semibold text-contrast">{{ formatMessage(messages.versionSubtitle) }}</span>
<StyledInput
<Input
id="version-number"
v-model="draftVersion.name"
:placeholder="formatMessage(messages.versionSubtitlePlaceholder)"
@@ -67,7 +67,7 @@ import {
Chips,
defineMessages,
MarkdownEditor,
StyledInput,
Input,
Tabs,
type TabsTab,
useVIntl,
@@ -9,7 +9,7 @@
<span class="text-brand-red">*</span>
</span>
</label>
<StyledInput
<Input
id="name"
v-model="name"
:maxlength="64"
@@ -25,10 +25,9 @@
}}</span>
<span>{{ formatMessage(messages.summaryDescription) }}</span>
</label>
<StyledInput
<Textarea
id="additional-information"
v-model="description"
multiline
:maxlength="256"
:placeholder="formatMessage(messages.summaryPlaceholder)"
:disabled="hasHitLimit"
@@ -62,7 +61,8 @@ import {
defineMessages,
injectNotificationManager,
NewModal,
StyledInput,
Input,
Textarea,
useVIntl,
} from '@modrinth/ui'
@@ -9,7 +9,7 @@
<span class="text-brand-red">*</span>
</span>
</label>
<StyledInput
<Input
id="name"
v-model="name"
:maxlength="64"
@@ -28,7 +28,7 @@
</label>
<div class="text-input-wrapper">
<div class="text-input-wrapper__before">https://modrinth.com/organization/</div>
<StyledInput
<Input
id="slug"
v-model="slug"
:maxlength="64"
@@ -46,10 +46,9 @@
</span>
<span>{{ formatMessage(messages.summaryDescription) }}</span>
</label>
<StyledInput
<Textarea
id="additional-information"
v-model="description"
multiline
:maxlength="256"
:placeholder="formatMessage(messages.summaryPlaceholder)"
:disabled="hasHitLimit"
@@ -84,7 +83,8 @@ import {
defineMessages,
injectNotificationManager,
NewModal,
StyledInput,
Input,
Textarea,
useVIntl,
} from '@modrinth/ui'
import { ref } from 'vue'
@@ -32,7 +32,7 @@
{{ formatMessage(messages.nameLabel) }}
</span>
</label>
<StyledInput
<Input
id="name"
v-model="name"
:maxlength="64"
@@ -48,7 +48,7 @@
</span>
<div class="text-input-wrapper !w-full">
<div class="text-input-wrapper__before">https://modrinth.com/project/</div>
<StyledInput
<Input
id="slug"
v-model="slug"
:maxlength="64"
@@ -100,10 +100,9 @@
{{ formatMessage(messages.summaryLabel) }}
</span>
</label>
<StyledInput
<Textarea
id="additional-information"
v-model="description"
multiline
:maxlength="256"
:placeholder="formatMessage(messages.summaryPlaceholder)"
:disabled="hasHitLimit"
@@ -141,7 +140,8 @@ import {
injectModrinthClient,
injectNotificationManager,
NewModal,
StyledInput,
Input,
Textarea,
useVIntl,
} from '@modrinth/ui'
import { computed, defineAsyncComponent, h } from 'vue'
@@ -2,7 +2,7 @@
<div class="flex flex-col gap-2">
<div class="flex items-center gap-2">
<div class="relative flex-1">
<StyledInput
<Input
ref="amountInput"
:model-value="modelValue"
type="number"
@@ -12,7 +12,7 @@
:disabled="isDisabled"
:placeholder="formatMessage(formFieldPlaceholders.amountPlaceholder)"
wrapper-class="w-full"
@update:model-value="handleStyledInput"
@update:model-value="handleInput"
/>
</div>
<Combobox
@@ -54,7 +54,7 @@ import {
Combobox,
commonMessages,
formFieldPlaceholders,
StyledInput,
Input,
useFormatMoney,
useVIntl,
} from '@modrinth/ui'
@@ -83,7 +83,7 @@ const emit = defineEmits<{
const { formatMessage } = useVIntl()
const formatMoney = useFormatMoney()
const amountInput = ref<InstanceType<typeof StyledInput> | null>(null)
const amountInput = ref<InstanceType<typeof Input> | null>(null)
const safeMaxAmount = computed(() => {
return Math.max(0, props.maxAmount)
@@ -108,7 +108,7 @@ function setMaxAmount() {
emit('update:modelValue', maxValue)
}
function handleStyledInput(val: string | number) {
function handleInput(val: string | number) {
const value = String(val)
if (value && value.includes('.')) {
@@ -41,7 +41,7 @@
>
</label>
<div class="flex flex-row gap-2">
<StyledInput
<Input
v-model="venmoHandle"
:placeholder="formatMessage(messages.venmoHandlePlaceholder)"
wrapper-class="w-full"
@@ -112,7 +112,7 @@ import {
formFieldLabels,
IntlFormatted,
normalizeChildren,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { useDebounceFn } from '@vueuse/core'
@@ -56,7 +56,7 @@
</span>
<div class="flex flex-col gap-3 sm:flex-row sm:gap-4">
<div class="flex flex-1 flex-col gap-2.5">
<StyledInput
<Input
v-model="formData.bankAccountOwnerFirstName"
:placeholder="formatMessage(formFieldPlaceholders.firstNamePlaceholder)"
autocomplete="given-name"
@@ -64,7 +64,7 @@
/>
</div>
<div class="flex flex-1 flex-col gap-2.5">
<StyledInput
<Input
v-model="formData.bankAccountOwnerLastName"
:placeholder="formatMessage(formFieldPlaceholders.lastNamePlaceholder)"
autocomplete="family-name"
@@ -91,7 +91,7 @@
class="h-10"
/>
<StyledInput
<Input
v-else
v-model="formData.bankName"
:placeholder="formatMessage(formFieldPlaceholders.bankNamePlaceholder)"
@@ -108,7 +108,7 @@
</span>
</label>
<StyledInput
<Input
v-if="['text', 'email', 'tel'].includes(field.type)"
v-model="formData[field.name]"
:type="field.type === 'tel' ? undefined : field.type === 'text' ? undefined : field.type"
@@ -158,7 +158,7 @@
<span v-if="dynamicDocumentNumberField.required" class="text-red">*</span>
</span>
</label>
<StyledInput
<Input
v-model="formData.documentNumber"
:placeholder="dynamicDocumentNumberField.placeholder"
autocomplete="off"
@@ -240,7 +240,7 @@ import {
getCurrencyIcon,
IntlFormatted,
normalizeChildren,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { useDebounceFn } from '@vueuse/core'
@@ -32,7 +32,7 @@
<span class="text-red">*</span>
</span>
</label>
<StyledInput
<Input
v-model="formData.businessName"
:placeholder="formatMessage(formFieldPlaceholders.businessNamePlaceholder)"
autocomplete="organization"
@@ -47,7 +47,7 @@
<span class="text-red">*</span>
</span>
</label>
<StyledInput
<Input
v-model="formData.email"
type="email"
:placeholder="formatMessage(formFieldPlaceholders.emailPlaceholder)"
@@ -65,7 +65,7 @@
<span class="text-red">*</span>
</span>
</label>
<StyledInput
<Input
v-model="formData.firstName"
:placeholder="formatMessage(formFieldPlaceholders.firstNamePlaceholder)"
autocomplete="given-name"
@@ -79,7 +79,7 @@
<span class="text-red">*</span>
</span>
</label>
<StyledInput
<Input
v-model="formData.lastName"
:placeholder="formatMessage(formFieldPlaceholders.lastNamePlaceholder)"
autocomplete="family-name"
@@ -112,7 +112,7 @@
<span class="text-red">*</span>
</span>
</label>
<StyledInput
<Input
v-model="formData.physicalAddress.address1"
:placeholder="formatMessage(formFieldPlaceholders.addressPlaceholder)"
autocomplete="address-line1"
@@ -126,7 +126,7 @@
{{ formatMessage(formFieldLabels.addressLine2) }}
</span>
</label>
<StyledInput
<Input
v-model="formData.physicalAddress.address2"
:placeholder="formatMessage(formFieldPlaceholders.address2Placeholder)"
autocomplete="address-line2"
@@ -142,7 +142,7 @@
<span class="text-red">*</span>
</span>
</label>
<StyledInput
<Input
v-model="formData.physicalAddress.city"
:placeholder="formatMessage(formFieldPlaceholders.cityPlaceholder)"
autocomplete="address-level2"
@@ -164,7 +164,7 @@
searchable
:search-placeholder="formatMessage(messages.searchSubdivisionsPlaceholder)"
/>
<StyledInput
<Input
v-else
v-model="formData.physicalAddress.state"
:placeholder="formatMessage(formFieldPlaceholders.statePlaceholder)"
@@ -182,7 +182,7 @@
<span class="text-red">*</span>
</span>
</label>
<StyledInput
<Input
v-model="formData.physicalAddress.zip"
:placeholder="formatMessage(formFieldPlaceholders.postalCodePlaceholder)"
autocomplete="postal-code"
@@ -217,7 +217,7 @@ import {
defineMessages,
formFieldLabels,
formFieldPlaceholders,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
// TODO: Switch to using Muralpay's improved endpoint when it's available.
@@ -39,7 +39,7 @@
>{{ formatMessage(formFieldLabels.email) }} <span class="text-red">*</span></span
>
</label>
<StyledInput
<Input
v-model="deliveryEmail"
type="email"
:placeholder="formatMessage(formFieldPlaceholders.emailPlaceholder)"
@@ -131,7 +131,7 @@
<div v-if="showGiftCardSelector && useFixedDenominations" class="flex flex-col gap-2.5">
<template v-if="useDenominationSuggestions">
<StyledInput
<Input
v-model="denominationSearchInput"
type="number"
:icon="SearchIcon"
@@ -324,7 +324,7 @@ import {
IntlFormatted,
normalizeChildren,
paymentMethodMessages,
StyledInput,
Input,
useDebugLogger,
useFormatMoney,
useVIntl,
@@ -1,7 +1,7 @@
<template>
<div>
<form class="flex flex-col gap-2 sm:flex-row" @submit.prevent="executeSearch">
<StyledInput
<Input
v-model="query"
:icon="SearchIcon"
type="text"
@@ -129,7 +129,7 @@ import {
injectModrinthClient,
injectNotificationManager,
Pagination,
StyledInput,
Input,
} from '@modrinth/ui'
import GlobalDetailLocalTraceCard from '~/components/ui/moderation/GlobalDetailLocalTraceCard.vue'
@@ -218,10 +218,9 @@
:heading-buttons="false"
:on-image-upload="onUploadHandler"
/>
<StyledInput
<Textarea
v-else
v-model="messageText"
multiline
placeholder="No message generated."
autocomplete="off"
input-class="h-[400px] font-mono"
@@ -414,7 +413,7 @@ import {
injectNotificationManager,
injectProjectPageContext,
MarkdownEditor,
StyledInput,
Textarea,
useDebugLogger,
} from '@modrinth/ui'
import TeleportOverflowMenu from '@modrinth/ui/src/components/base/TeleportOverflowMenu.vue'
@@ -34,7 +34,7 @@
<label for="proof">
<span class="label__title">Proof</span>
</label>
<StyledInput
<Input
id="proof"
v-model="(modPackData[currentIndex] as ModerationUnknownModpackItem).proof"
autocomplete="off"
@@ -44,7 +44,7 @@
<label for="link">
<span class="label__title">Link</span>
</label>
<StyledInput
<Input
id="link"
v-model="(modPackData[currentIndex] as ModerationUnknownModpackItem).url"
autocomplete="off"
@@ -54,7 +54,7 @@
<label for="title">
<span class="label__title">Title</span>
</label>
<StyledInput
<Input
id="title"
v-model="(modPackData[currentIndex] as ModerationUnknownModpackItem).title"
autocomplete="off"
@@ -143,7 +143,7 @@
<script setup lang="ts">
import { LeftArrowIcon, RightArrowIcon } from '@modrinth/assets'
import { ButtonStyled, StyledInput } from '@modrinth/ui'
import { ButtonStyled, Input } from '@modrinth/ui'
import type {
ModerationFlameModpackItem,
ModerationJudgements,
@@ -31,10 +31,10 @@ import {
Combobox,
injectProjectPageContext,
MarkdownEditor,
StyledInput,
Input,
} from '@modrinth/ui'
import { renderHighlightedString, renderString } from '@modrinth/utils'
import { inject, nextTick, onMounted, reactive, watchEffect } from 'vue'
import { inject, onMounted, reactive, watchEffect } from 'vue'
import { NODE_META_KEY, STATE_KEY } from './checklist-context'
@@ -266,7 +266,6 @@ function setTextState(node: IdentifiedNodeBuilder, v: string): void {
const def = resolveDefault(node as ValueNodeBuilder)
const defStr = typeof def === 'string' ? def : ''
setNodeState(node, ov === defStr ? undefined : ov || undefined)
nextTick(() => textInputRefs.get(node)?.setValue(ov))
return
}
@@ -277,7 +276,7 @@ function setTextState(node: IdentifiedNodeBuilder, v: string): void {
function handleButtonClick(node: ButtonNodeBuilder): void {
const before = new Map<NodeBuilder, string>()
for (const inputNode of textInputRefs.keys()) {
for (const inputNode of textInputNodes) {
before.set(inputNode, getTextState(asIdentified(inputNode)))
}
node._onClick?.(props.showContext)
@@ -288,7 +287,7 @@ function handleButtonClick(node: ButtonNodeBuilder): void {
}
onMounted(() => {
for (const inputNode of textInputRefs.keys()) {
for (const inputNode of textInputNodes) {
setTextState(asIdentified(inputNode), getTextState(asIdentified(inputNode)))
}
})
@@ -325,7 +324,7 @@ function toggleChip(parent: IdentifiedNodeBuilder, child: IdentifiedNodeBuilder)
setNodeState(parent, selected.size > 0 ? selected : undefined)
}
const textInputRefs = new Map<NodeBuilder, { setValue: (v: string) => void }>()
const textInputNodes = new Set<NodeBuilder>()
const overrideHelpers = { override: (v: string): OverrideValue => ({ __override: v }) }
function isOverrideValue(v: unknown): v is OverrideValue {
@@ -720,9 +719,9 @@ watchEffect(async () => {
<!-- text -->
<template v-else-if="item.type === 'text'">
<StyledInput
<Input
:id="`node-${asIdentified(item).id}`"
:ref="(el: any) => (el ? textInputRefs.set(item, el) : textInputRefs.delete(item))"
:ref="(el: any) => (el ? textInputNodes.add(item) : textInputNodes.delete(item))"
v-tooltip="getTooltipConfig(item, showContext)"
:model-value="getTextState(asIdentified(item))"
:placeholder="getPlaceholder(asInput(item))"
@@ -43,7 +43,7 @@
<label for="gallery-image-title">
<span class="label__title">Title</span>
</label>
<StyledInput
<Input
id="gallery-image-title"
v-model="editTitle"
:maxlength="64"
@@ -52,17 +52,16 @@
<label for="gallery-image-desc">
<span class="label__title">Description</span>
</label>
<StyledInput
<Textarea
id="gallery-image-desc"
v-model="editDescription"
multiline
:maxlength="255"
placeholder="Enter description..."
/>
<label for="gallery-image-ordering">
<span class="label__title">Order Index</span>
</label>
<StyledInput
<Input
id="gallery-image-ordering"
v-model="editOrder"
type="number"
@@ -306,7 +305,8 @@ import {
FileInput,
injectProjectPageContext,
NewModal as Modal,
StyledInput,
Input,
Textarea,
useFormatDateTime,
} from '@modrinth/ui'
import { useEventListener } from '@vueuse/core'
@@ -43,7 +43,7 @@
<label for="gallery-image-title">
<span class="label__title">Title</span>
</label>
<StyledInput
<Input
id="gallery-image-title"
v-model="editTitle"
:maxlength="64"
@@ -52,17 +52,16 @@
<label for="gallery-image-desc">
<span class="label__title">Description</span>
</label>
<StyledInput
<Textarea
id="gallery-image-desc"
v-model="editDescription"
multiline
:maxlength="255"
placeholder="Enter description..."
/>
<label for="gallery-image-ordering">
<span class="label__title">Order Index</span>
</label>
<StyledInput
<Input
id="gallery-image-ordering"
v-model="editOrder"
type="number"
@@ -296,7 +295,8 @@ import {
FileInput,
injectProjectPageContext,
NewModal as Modal,
StyledInput,
Input,
Textarea,
useFormatDateTime,
} from '@modrinth/ui'
@@ -6,7 +6,7 @@ import {
injectProjectPageContext,
type MessageDescriptor,
SettingsLabel,
StyledInput,
Input,
UnsavedChangesPopup,
usePageLeaveSafety,
useSavable,
@@ -140,7 +140,7 @@ const placeholder = computed(() => placeholders[placeholderIndex.value] ?? place
:description="messages.nameDescription"
/>
<div class="flex">
<StyledInput
<Input
id="project-name"
v-model="current.title"
:placeholder="formatMessage(placeholder.name)"
@@ -156,7 +156,7 @@ const placeholder = computed(() => placeholders[placeholderIndex.value] ?? place
:title="messages.taglineTitle"
:description="messages.taglineDescription"
/>
<StyledInput
<Input
id="project-tagline"
v-model="current.tagline"
:placeholder="formatMessage(placeholder.tagline)"
@@ -169,7 +169,7 @@ const placeholder = computed(() => placeholders[placeholderIndex.value] ?? place
<SettingsLabel id="project-url" :title="messages.urlTitle" />
<div class="text-input-wrapper">
<div class="text-input-wrapper__before">https://modrinth.com/project/</div>
<StyledInput id="project-url" v-model="current.url" :maxlength="64" autocomplete="off" />
<Input id="project-url" v-model="current.url" :maxlength="64" autocomplete="off" />
</div>
</div>
</div>
@@ -21,7 +21,7 @@
<label for="project-name">
<span class="label__title">Name</span>
</label>
<StyledInput
<Input
id="project-name"
v-model="name"
:maxlength="2048"
@@ -39,7 +39,7 @@
$getProjectTypeForUrl(project.project_type, project.loaders)
}}/
</div>
<StyledInput
<Input
id="project-slug"
v-model="slug"
:maxlength="64"
@@ -53,10 +53,9 @@
<label for="project-summary">
<span class="label__title">Summary</span>
</label>
<StyledInput
<Textarea
id="project-summary"
v-model="summary"
multiline
:maxlength="256"
:disabled="!hasPermission"
resize="vertical"
@@ -341,7 +340,8 @@ import {
injectModrinthClient,
injectNotificationManager,
injectProjectPageContext,
StyledInput,
Input,
Textarea,
Toggle,
UnsavedChangesPopup,
useFormatBytes,
@@ -72,7 +72,7 @@
</label>
<div class="w-1/2">
<StyledInput
<Input
id="license-url"
v-model="current.licenseUrl"
type="url"
@@ -105,7 +105,7 @@
</label>
<div class="flex w-1/2 flex-col gap-2">
<StyledInput
<Input
v-if="!current.nonSpdxLicense"
id="license-spdx"
v-model="current.license.short"
@@ -114,7 +114,7 @@
placeholder="SPDX identifier"
:disabled="!hasPermission"
/>
<StyledInput
<Input
v-else
id="license-name"
v-model="current.license.short"
@@ -158,7 +158,7 @@ import {
ConfirmLeaveModal,
DropdownSelect,
injectProjectPageContext,
StyledInput,
Input,
UnsavedChangesPopup,
usePageLeaveSafety,
useSavable,
@@ -142,7 +142,7 @@
v-tooltip="`Link includes a domain which isn't common for this link type.`"
class="size-6 animate-pulse text-orange"
/>
<StyledInput
<Input
id="project-issue-tracker"
v-model="issuesUrl"
type="url"
@@ -176,7 +176,7 @@
v-tooltip="`Link includes a domain which isn't common for this link type.`"
class="size-6 animate-pulse text-orange"
/>
<StyledInput
<Input
id="project-source-code"
v-model="sourceUrl"
type="url"
@@ -205,7 +205,7 @@
v-tooltip="`Discord invites are not appropriate for this link type.`"
class="size-6 animate-pulse text-orange"
/>
<StyledInput
<Input
id="project-wiki-page"
v-model="wikiUrl"
type="url"
@@ -229,7 +229,7 @@
v-tooltip="`You're using a link which isn't common for this link type.`"
class="size-6 animate-pulse text-orange"
/>
<StyledInput
<Input
id="project-discord-invite"
v-model="discordUrl"
type="url"
@@ -250,7 +250,7 @@
:key="`donation-link-${index}`"
class="input-group donation-link-group"
>
<StyledInput
<Input
v-model="donationLink.url"
type="url"
:maxlength="2048"
@@ -292,7 +292,7 @@ import {
injectModrinthClient,
injectNotificationManager,
injectProjectPageContext,
StyledInput,
Input,
} from '@modrinth/ui'
const tags = useGeneratedState()
@@ -33,7 +33,7 @@
</span>
</span>
<div class="input-group">
<StyledInput
<Input
id="username"
v-model="currentUsername"
placeholder="Username"
@@ -112,7 +112,7 @@
The title of the role that this member plays for this project.
</span>
</label>
<StyledInput
<Input
:id="`member-${allTeamMembers[index].user.username}-role`"
v-model="allTeamMembers[index].role"
:disabled="(currentMember?.permissions & EDIT_MEMBER) !== EDIT_MEMBER"
@@ -126,7 +126,7 @@
this project's revenue goes to this member.
</span>
</label>
<StyledInput
<Input
:id="`member-${allTeamMembers[index].user.username}-monetization-weight`"
v-model="allTeamMembers[index].payouts_split"
type="number"
@@ -378,7 +378,7 @@
The title of the role that this member plays for this project.
</span>
</label>
<StyledInput
<Input
:id="`member-${allOrgMembers[index].user.username}-role`"
v-model="allOrgMembers[index].role"
:disabled="
@@ -395,7 +395,7 @@
this project's revenue goes to this member.
</span>
</label>
<StyledInput
<Input
:id="`member-${allOrgMembers[index].user.username}-monetization-weight`"
v-model="allOrgMembers[index].payouts_split"
type="number"
@@ -568,7 +568,7 @@ import {
injectModrinthClient,
injectNotificationManager,
injectProjectPageContext,
StyledInput,
Input,
Toggle,
} from '@modrinth/ui'
import { useQuery } from '@tanstack/vue-query'
@@ -30,7 +30,7 @@ import {
injectNotificationManager,
injectProjectPageContext,
IntlFormatted,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { isStaff } from '@modrinth/utils'
@@ -563,7 +563,7 @@ function dismissInfoBanner() {
</template>
<div class="flex flex-col gap-2">
<div class="grid grid-cols-1 gap-2 sm:grid-cols-[minmax(0,1fr)_auto_auto_auto]">
<StyledInput
<Input
v-model="searchQuery"
type="text"
autocomplete="off"
@@ -62,7 +62,7 @@
}
"
>
<StyledInput
<Input
id="java-address"
v-model="javaAddress"
:placeholder="formatMessage(messages.enterAddressPlaceholder)"
@@ -142,7 +142,7 @@
</span>
</label>
<div class="mt-2 flex items-center gap-2">
<StyledInput
<Input
id="bedrock-address"
v-model="bedrockAddress"
:placeholder="formatMessage(messages.enterAddressPlaceholder)"
@@ -182,7 +182,7 @@ import {
normalizeChildren,
SERVER_LANGUAGES,
SERVER_REGIONS,
StyledInput,
Input,
UnsavedChangesPopup,
usePageLeaveSafety,
useVIntl,
+2 -2
View File
@@ -19,7 +19,7 @@
>
<h1 class="m-0 grow text-2xl font-extrabold">Manage affiliate links</h1>
<div class="flex items-center gap-2">
<StyledInput
<Input
v-model="filterQuery"
:icon="SearchIcon"
type="text"
@@ -94,7 +94,7 @@ import {
ConfirmModal,
injectModrinthClient,
injectNotificationManager,
StyledInput,
Input,
} from '@modrinth/ui'
import type { User } from '@modrinth/utils'
import { useQuery } from '@tanstack/vue-query'
@@ -18,7 +18,7 @@
<div class="flex flex-col gap-5" @submit.prevent="saveEvent">
<div class="flex flex-col gap-2">
<span class="label__title font-semibold">Title</span>
<StyledInput
<Input
id="analytics-event-title"
ref="titleInput"
v-model="form.title"
@@ -48,7 +48,7 @@
</ButtonStyled>
</div>
<div class="flex items-center gap-2">
<StyledInput
<Input
id="analytics-event-link"
v-model="form.announcementUrl"
type="url"
@@ -129,7 +129,7 @@
<h1 class="m-0 text-2xl font-extrabold text-contrast">Analytics Events</h1>
<div class="flex flex-col gap-2 sm:flex-row sm:items-center">
<StyledInput
<Input
v-model="searchQuery"
:icon="SearchIcon"
type="search"
@@ -249,7 +249,7 @@ import {
type MultiSelectOption,
NewModal,
type SortDirection,
StyledInput,
Input,
Table,
type TableColumn,
} from '@modrinth/ui'
@@ -319,7 +319,7 @@ const allMetricKinds = metricKindOptions.map((option) => option.value)
const deleteEventModal = ref<InstanceType<typeof ConfirmModal> | null>(null)
const eventModal = ref<InstanceType<typeof NewModal> | null>(null)
const titleInput = ref<InstanceType<typeof StyledInput> | null>(null)
const titleInput = ref<InstanceType<typeof Input> | null>(null)
const searchQuery = ref('')
const sortColumn = ref<EventColumnKey | undefined>('date')
const sortDirection = ref<SortDirection>('desc')
@@ -30,7 +30,7 @@
{{ selectedCharge.net }})
</span>
</label>
<StyledInput id="amount" v-model="refundAmount" type="number" autocomplete="off" />
<Input id="amount" v-model="refundAmount" type="number" autocomplete="off" />
</div>
<div class="flex flex-col gap-2">
<label for="unprovision" class="flex flex-col gap-1">
@@ -107,7 +107,7 @@
<span class="text-lg font-semibold text-contrast">Days to credit</span>
<span>Enter the number of days to add to the next due date.</span>
</label>
<StyledInput id="days" v-model="creditDays" type="number" :min="1" autocomplete="off" />
<Input id="days" v-model="creditDays" type="number" :min="1" autocomplete="off" />
</div>
<div class="flex flex-col gap-2">
<label for="sendEmail" class="flex flex-col gap-1">
@@ -233,7 +233,7 @@ import {
injectModrinthClient,
injectNotificationManager,
NewModal,
StyledInput,
Input,
Toggle,
useFormatDateTime,
useRelativeTime,
+2 -2
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { CopyIcon, LibraryIcon, PlayIcon, SearchIcon } from '@modrinth/assets'
import { ButtonStyled, Card, StyledInput } from '@modrinth/ui'
import { ButtonStyled, Card, Input } from '@modrinth/ui'
import { computed, onMounted, ref } from 'vue'
import docs from '~/templates/docs'
@@ -51,7 +51,7 @@ onMounted(() => {
<div class="normal-page__content">
<Card class="mb-6 flex flex-col gap-4">
<div class="flex flex-wrap items-center gap-3">
<StyledInput
<Input
id="doc-search"
v-model="query"
type="search"
+3 -3
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { CopyIcon, LibraryIcon, PlayIcon, SearchIcon } from '@modrinth/assets'
import { ButtonStyled, NewModal, StyledInput } from '@modrinth/ui'
import { ButtonStyled, NewModal, Input } from '@modrinth/ui'
import { computed, onMounted, ref } from 'vue'
import emails from '~/templates/emails'
@@ -153,7 +153,7 @@ onMounted(() => {
class="flex flex-col"
>
<span class="label__title">{{ variable }}</span>
<StyledInput
<Input
:id="`preview-${variable}`"
v-model="variableValues[variable]"
type="text"
@@ -191,7 +191,7 @@ onMounted(() => {
</NewModal>
<div class="normal-page__content">
<div class="flex flex-wrap items-center gap-3">
<StyledInput
<Input
id="email-search"
v-model="query"
type="search"
@@ -24,7 +24,7 @@
<label for="notice-title" class="flex flex-col gap-1">
<span class="text-lg font-semibold text-contrast"> Title </span>
</label>
<StyledInput
<Input
id="notice-title"
v-model="newNoticeTitle"
placeholder="E.g. Maintenance"
@@ -38,18 +38,17 @@
<span class="text-brand-red">*</span>
</span>
</label>
<StyledInput
<Input
v-if="newNoticeSurvey"
id="notice-message"
v-model="newNoticeMessage"
placeholder="E.g. rXGtq2"
autocomplete="off"
/>
<StyledInput
<Textarea
v-else
id="notice-message"
v-model="newNoticeMessage"
multiline
wrapper-class="h-32"
/>
</div>
@@ -65,7 +64,7 @@
<span class="text-lg font-semibold text-contrast"> Announcement date </span>
<span>Leave blank for notice to be available immediately.</span>
</label>
<StyledInput
<DateInput
id="scheduled-date"
v-model="newNoticeScheduledDate"
type="datetime-local"
@@ -77,7 +76,7 @@
<span class="text-lg font-semibold text-contrast"> Expiration date </span>
<span>The notice will automatically be deleted after this date.</span>
</label>
<StyledInput
<DateInput
id="expiration-date"
v-model="newNoticeExpiresDate"
type="datetime-local"
@@ -270,9 +269,11 @@ import {
defineMessages,
injectModrinthClient,
injectNotificationManager,
DateInput,
NewModal,
ServerNotice,
StyledInput,
Input,
Textarea,
TagItem,
Toggle,
useFormatDateTime,
+2 -2
View File
@@ -10,7 +10,7 @@
<span class="text-brand-red">*</span>
</span>
</label>
<StyledInput
<Input
id="name"
v-model="userEmail"
type="email"
@@ -33,7 +33,7 @@
</template>
<script setup lang="ts">
import { MailIcon } from '@modrinth/assets'
import { ButtonStyled, injectNotificationManager, StyledInput } from '@modrinth/ui'
import { ButtonStyled, injectNotificationManager, Input } from '@modrinth/ui'
const { addNotification } = injectNotificationManager()
@@ -20,7 +20,7 @@
<label class="text-md font-semibold text-contrast" for="email">
{{ formatMessage(commonMessages.emailLabel) }}
</label>
<StyledInput
<Input
id="email"
v-model="email"
:icon="MailIcon"
@@ -61,7 +61,7 @@
<div class="flex flex-col gap-2.5">
<label for="password" hidden>{{ formatMessage(commonMessages.passwordLabel) }}</label>
<StyledInput
<Input
id="password"
v-model="newPassword"
:icon="KeyIcon"
@@ -74,7 +74,7 @@
<label for="confirm-password" hidden>
{{ formatMessage(commonMessages.passwordLabel) }}
</label>
<StyledInput
<Input
id="confirm-password"
v-model="confirmNewPassword"
:icon="KeyIcon"
@@ -102,7 +102,7 @@ import {
defineMessages,
injectModrinthClient,
injectNotificationManager,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { useQuery } from '@tanstack/vue-query'
@@ -80,7 +80,7 @@
<label class="mb-2 block text-lg font-semibold text-contrast" for="collection-title">
{{ formatMessage(commonMessages.titleLabel) }}
</label>
<StyledInput
<Input
id="collection-title"
v-model="current.name"
:maxlength="255"
@@ -94,10 +94,9 @@
>
{{ formatMessage(commonMessages.descriptionLabel) }}
</label>
<StyledInput
<Textarea
id="collection-description"
v-model="current.description"
multiline
:maxlength="255"
wrapper-class="h-24"
/>
@@ -422,7 +421,8 @@ import {
ProjectCardList,
RadioButtons,
SidebarCard,
StyledInput,
Input,
Textarea,
useCompactNumber,
useFormatDateTime,
useRelativeTime,
@@ -18,7 +18,7 @@
{{ formatMessage(messages.yourAffiliateLinks) }}
</h1>
<div class="flex items-center gap-2">
<StyledInput
<Input
v-model="filterQuery"
:icon="SearchIcon"
type="text"
@@ -68,7 +68,7 @@ import {
defineMessages,
injectModrinthClient,
injectNotificationManager,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import { useQuery } from '@tanstack/vue-query'
@@ -4,7 +4,7 @@
<h2 class="text-2xl">{{ formatMessage(commonMessages.collectionsLabel) }}</h2>
<div class="mb-3 flex flex-col gap-3">
<label for="search-input" hidden>{{ formatMessage(messages.searchInputLabel) }}</label>
<StyledInput
<Input
id="search-input"
v-model="filterQuery"
:icon="SearchIcon"
@@ -149,7 +149,7 @@ import {
defineMessages,
DropdownSelect,
injectModrinthClient,
StyledInput,
Input,
useCompactNumber,
useVIntl,
} from '@modrinth/ui'
@@ -8,7 +8,7 @@
<span class="label__title">{{ formatMessage(messages.issueTrackerLabel) }}</span>
</label>
<div class="flex gap-2">
<StyledInput
<Input
id="issue-tracker-input"
v-model="editLinks.issues.val"
:disabled="editLinks.issues.clear"
@@ -33,7 +33,7 @@
<span class="label__title">{{ formatMessage(messages.sourceCodeLabel) }}</span>
</label>
<div class="flex gap-2">
<StyledInput
<Input
id="source-code-input"
v-model="editLinks.source.val"
:disabled="editLinks.source.clear"
@@ -58,7 +58,7 @@
<span class="label__title">{{ formatMessage(messages.wikiPageLabel) }}</span>
</label>
<div class="flex gap-2">
<StyledInput
<Input
id="wiki-page-input"
v-model="editLinks.wiki.val"
:disabled="editLinks.wiki.clear"
@@ -86,7 +86,7 @@
<span class="label__title">{{ formatMessage(messages.discordInviteLabel) }}</span>
</label>
<div class="flex gap-2">
<StyledInput
<Input
id="discord-invite-input"
v-model="editLinks.discord.val"
:disabled="editLinks.discord.clear"
@@ -367,7 +367,7 @@ import {
IntlFormatted,
NewModal,
ProjectStatusBadge,
StyledInput,
Input,
Table,
useVIntl,
} from '@modrinth/ui'
+2 -2
View File
@@ -94,7 +94,7 @@
<label class="hidden" for="search">{{
formatMessage(commonMessages.searchLabel)
}}</label>
<StyledInput
<Input
id="search"
v-model="searchQuery"
:icon="SearchIcon"
@@ -451,7 +451,7 @@ import {
injectModrinthClient,
IntlFormatted,
ProjectCard,
StyledInput,
Input,
useRelativeTime,
useVIntl,
} from '@modrinth/ui'
@@ -2,13 +2,13 @@
<NewModal ref="editModal" header="Edit external project">
<form class="flex flex-col gap-2" @submit.prevent="saveExternalProjectEdit">
<label class="font-semibold text-contrast" for="edit-form-title">Title</label>
<StyledInput id="edit-form-title" v-model="editForm.title" type="text" />
<Input id="edit-form-title" v-model="editForm.title" type="text" />
<label class="mt-2 font-semibold text-contrast" for="edit-form-link">Link</label>
<StyledInput id="edit-form-link" v-model="editForm.link" type="text" />
<Input id="edit-form-link" v-model="editForm.link" type="text" />
<label class="mt-2 font-semibold text-contrast" for="edit-form-cf-id">
CurseForge project ID
</label>
<StyledInput id="edit-form-cf-id" v-model="editForm.flameProjectId" type="text" />
<Input id="edit-form-cf-id" v-model="editForm.flameProjectId" type="text" />
<label class="mt-2 font-semibold text-contrast" for="edit-form-status">Allowed?</label>
<Combobox
id="edit-form-status"
@@ -17,22 +17,18 @@
class="!w-full"
/>
<label class="mt-2 font-semibold text-contrast" for="edit-form-proof">Proof</label>
<StyledInput
<Textarea
id="edit-form-proof"
v-model="editForm.proof"
type="text"
multiline
resize="both"
class="w-[30rem]"
/>
<label class="mt-2 font-semibold text-contrast" for="edit-form-exceptions">
Exceptions / notes
</label>
<StyledInput
<Textarea
id="edit-form-exceptions"
v-model="editForm.exceptions"
type="text"
multiline
resize="both"
class="w-[30rem]"
/>
@@ -50,7 +46,7 @@
</NewModal>
<div>
<form class="flex gap-2" @submit.prevent="executeSearch">
<StyledInput
<Input
v-model="query"
:icon="SearchIcon"
type="text"
@@ -140,7 +136,8 @@ import {
ExternalProjectLookupCard,
injectModrinthClient,
NewModal,
StyledInput,
Input,
Textarea,
useVIntl,
} from '@modrinth/ui'
+2 -2
View File
@@ -1,7 +1,7 @@
<template>
<div class="flex flex-col gap-4">
<div class="flex flex-col justify-between gap-3 lg:flex-row">
<StyledInput
<Input
v-model="query"
:icon="SearchIcon"
type="text"
@@ -149,7 +149,7 @@ import {
injectModrinthClient,
injectNotificationManager,
Pagination,
StyledInput,
Input,
Toggle,
useVIntl,
} from '@modrinth/ui'
@@ -1,7 +1,7 @@
<template>
<div class="flex flex-col gap-4">
<div class="flex flex-col justify-between gap-3 lg:flex-row">
<StyledInput
<Input
v-model="query"
:icon="SearchIcon"
type="text"
@@ -213,7 +213,7 @@ import {
MultiSelect,
type MultiSelectItem,
Pagination,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import Fuse from 'fuse.js'
@@ -15,7 +15,7 @@ import {
FloatingPanel,
injectModrinthClient,
Pagination,
StyledInput,
Input,
Toggle,
useVIntl,
} from '@modrinth/ui'
@@ -582,7 +582,7 @@ watch(totalPages, (pages) => {
/> -->
<div class="flex flex-col justify-between gap-2 lg:flex-row">
<StyledInput
<Input
v-model="query"
:icon="SearchIcon"
type="text"
@@ -6,7 +6,8 @@ import {
ConfirmModal,
FileInput,
injectNotificationManager,
StyledInput,
Input,
Textarea,
UnsavedChangesPopup,
useSavable,
} from '@modrinth/ui'
@@ -188,7 +189,7 @@ const onDeleteOrganization = useClientTry(async () => {
<label for="project-name">
<span class="label__title">Name</span>
</label>
<StyledInput
<Input
id="project-name"
v-model="current.name"
:maxlength="2048"
@@ -200,7 +201,7 @@ const onDeleteOrganization = useClientTry(async () => {
</label>
<div class="text-input-wrapper">
<div class="text-input-wrapper__before">https://modrinth.com/organization/</div>
<StyledInput
<Input
id="project-slug"
v-model="current.slug"
:maxlength="64"
@@ -212,10 +213,9 @@ const onDeleteOrganization = useClientTry(async () => {
<label for="project-summary">
<span class="label__title">Summary</span>
</label>
<StyledInput
<Textarea
id="project-summary"
v-model="current.summary"
multiline
:maxlength="256"
:disabled="!hasPermission"
resize="vertical"
@@ -30,7 +30,7 @@
</span>
</span>
<div class="input-group">
<StyledInput
<Input
id="username"
v-model="currentUsername"
placeholder="Username"
@@ -118,7 +118,7 @@
The title of the role that this member plays for this organization.
</span>
</label>
<StyledInput
<Input
:id="`member-${member.user.id}-role`"
v-model="member.role"
:disabled="
@@ -137,7 +137,7 @@
the organization projects' revenue goes to this member.
</span>
</label>
<StyledInput
<Input
:id="`member-${member.user.id}-monetization-weight`"
v-model="member.payouts_split"
type="number"
@@ -249,7 +249,7 @@ import {
ButtonStyled,
Checkbox,
injectNotificationManager,
StyledInput,
Input,
} from '@modrinth/ui'
import { nextTick, ref } from 'vue'
@@ -8,7 +8,7 @@
<span class="label__title">{{ formatMessage(messages.issueTrackerLabel) }}</span>
</label>
<div class="flex gap-2">
<StyledInput
<Input
id="issue-tracker-input"
v-model="editLinks.issues.val"
:disabled="editLinks.issues.clear"
@@ -33,7 +33,7 @@
<span class="label__title">{{ formatMessage(messages.sourceCodeLabel) }}</span>
</label>
<div class="flex gap-2">
<StyledInput
<Input
id="source-code-input"
v-model="editLinks.source.val"
:disabled="editLinks.source.clear"
@@ -58,7 +58,7 @@
<span class="label__title">{{ formatMessage(messages.wikiPageLabel) }}</span>
</label>
<div class="flex gap-2">
<StyledInput
<Input
id="wiki-page-input"
v-model="editLinks.wiki.val"
:disabled="editLinks.wiki.clear"
@@ -86,7 +86,7 @@
<span class="label__title">{{ formatMessage(messages.discordInviteLabel) }}</span>
</label>
<div class="flex gap-2">
<StyledInput
<Input
id="discord-invite-input"
v-model="editLinks.discord.val"
:disabled="editLinks.discord.clear"
@@ -368,7 +368,7 @@ import {
IntlFormatted,
NewModal,
ProjectStatusBadge,
StyledInput,
Input,
Table,
useVIntl,
} from '@modrinth/ui'
+2 -2
View File
@@ -136,7 +136,7 @@
}}
</span>
<div class="flex gap-4">
<StyledInput
<Input
id="report-item-id"
v-model="reportItemID"
placeholder="ex: Dc7EYhxG"
@@ -298,7 +298,7 @@ import {
type MessageDescriptor,
RadialHeader,
RadioButtons,
StyledInput,
Input,
useVIntl,
} from '@modrinth/ui'
import type { Project, Report, User, Version } from '@modrinth/utils'
+7 -7
View File
@@ -24,7 +24,7 @@
formatMessage(messages.emailAddressLabel)
}}</span>
</label>
<StyledInput
<Input
id="email-input"
v-model="email"
:maxlength="2048"
@@ -72,7 +72,7 @@
formatMessage(messages.oldPasswordLabel)
}}</span>
</label>
<StyledInput
<Input
id="old-password"
v-model="oldPassword"
:maxlength="2048"
@@ -96,7 +96,7 @@
formatMessage(messages.newPasswordLabel)
}}</span></label
>
<StyledInput
<Input
id="new-password"
v-model="newPassword"
:maxlength="2048"
@@ -112,7 +112,7 @@
formatMessage(messages.confirmNewPasswordLabel)
}}</span>
</label>
<StyledInput
<Input
id="confirm-new-password"
v-model="confirmNewPassword"
:maxlength="2048"
@@ -191,7 +191,7 @@
formatMessage(messages.twoFactorEnterCodeDescription)
}}</span>
</label>
<StyledInput
<Input
id="two-factor-code"
v-model="twoFactorCode"
:maxlength="11"
@@ -260,7 +260,7 @@
formatMessage(messages.twoFactorVerifyCodeDescription)
}}</span>
</label>
<StyledInput
<Input
id="verify-code"
v-model="twoFactorCode"
:maxlength="6"
@@ -501,7 +501,7 @@ import {
injectNotificationManager,
IntlFormatted,
NewModal,
StyledInput,
Input,
Table,
useVIntl,
} from '@modrinth/ui'
@@ -12,7 +12,7 @@
<label for="app-name" class="m-0 mb-2 text-lg font-semibold text-contrast">
{{ formatMessage(messages.nameLabel) }}
</label>
<StyledInput
<Input
id="app-name"
v-model="name"
:maxlength="2048"
@@ -43,7 +43,7 @@
<label v-if="editingId" for="app-url" class="mb-2 mt-4 text-lg font-semibold text-contrast">
{{ formatMessage(messages.urlLabel) }}
</label>
<StyledInput
<Input
v-if="editingId"
id="app-url"
v-model="url"
@@ -59,11 +59,10 @@
>
{{ formatMessage(messages.descriptionLabel) }}
</label>
<StyledInput
<Textarea
v-if="editingId"
id="app-description"
v-model="description"
multiline
:maxlength="255"
autocomplete="off"
:placeholder="formatMessage(messages.descriptionPlaceholder)"
@@ -94,7 +93,7 @@
<div class="uri-input-list">
<div v-for="(_, index) in redirectUris" :key="index">
<div class="input-group url-input-group-fixes">
<StyledInput
<Input
v-model="redirectUris[index]"
:maxlength="2048"
type="url"
@@ -265,7 +264,8 @@ import {
IntlFormatted,
NewModal,
normalizeChildren,
StyledInput,
Input,
Textarea,
useFormatDateTime,
useVIntl,
} from '@modrinth/ui'
+2 -2
View File
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { SearchIcon } from '@modrinth/assets'
import { ButtonStyled, StyledInput, Toggle } from '@modrinth/ui'
import { ButtonStyled, Input, Toggle } from '@modrinth/ui'
import Fuse from 'fuse.js'
import { computed, ref, shallowReactive } from 'vue'
@@ -42,7 +42,7 @@ useSeoMeta({
<template>
<div class="mb-2">
<StyledInput
<Input
v-model="searchQuery"
type="search"
:icon="SearchIcon"
+2 -2
View File
@@ -21,7 +21,7 @@
<label for="pat-name">
<span class="font-semibold">{{ formatMessage(createModalMessages.nameLabel) }}</span>
</label>
<StyledInput
<Input
id="pat-name"
v-model="name"
:maxlength="2048"
@@ -218,7 +218,7 @@ import {
injectNotificationManager,
IntlFormatted,
NewModal,
StyledInput,
Input,
useFormatDateTime,
useRelativeTime,
useVIntl,
@@ -7,7 +7,7 @@
</span>
<span class="text-secondary mb-2">{{ formatMessage(messages.createUserDescription) }}</span>
</label>
<StyledInput
<Input
v-if="showUserField"
id="create-affiliate-user-input"
v-model="affiliateUsername"
@@ -28,7 +28,7 @@
</label>
<div class="flex items-center gap-2">
<div class="relative inline-flex items-center flex-1">
<StyledInput
<Input
id="create-affiliate-title-input"
v-model="affiliateLinkTitle"
autocomplete="off"
@@ -42,7 +42,7 @@
<AffiliateIcon />
</AutoBrandIcon>
</template>
</StyledInput>
</Input>
</div>
<ButtonStyled color="brand">
<button :disabled="creatingLink || !canCreate" @click="createAffiliateLink">
@@ -62,7 +62,7 @@ import { computed, ref, useTemplateRef } from 'vue'
import { defineMessages, useVIntl } from '../../composables/i18n'
import { commonMessages } from '../../utils/common-messages'
import { AutoBrandIcon, ButtonStyled, NewModal, StyledInput } from '../index'
import { AutoBrandIcon, ButtonStyled, NewModal, Input } from '../index'
export type CreateAffiliateProps = { sourceName: string; username?: string }
const props = withDefaults(
@@ -24,7 +24,7 @@
ref="inputRef"
class="border-t border-solid border-b-0 border-x-0 border-surface-4 bg-surface-3 p-4"
>
<StyledInput
<Input
v-model="commandInput"
v-tooltip="disableInput ? disableInputTooltip : undefined"
:icon="TerminalSquareIcon"
@@ -44,7 +44,7 @@ import type { Terminal } from '@xterm/xterm'
import { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
import ButtonStyled from '#ui/components/base/ButtonStyled.vue'
import StyledInput from '#ui/components/base/inputs/StyledInput.vue'
import Input from '#ui/components/base/inputs/Input.vue'
import { useTerminal } from '#ui/composables/terminal'
const props = withDefaults(
+4 -4
View File
@@ -12,7 +12,7 @@
<span class="min-w-0 truncate">{{ searchQuery }}</span>
<slot name="search-selection-affix" :option="selectedOption" />
</div>
<StyledInput
<Input
ref="searchTriggerRef"
v-model="searchQuery"
:icon="showSearchIcon ? SearchIcon : undefined"
@@ -41,7 +41,7 @@
:class="isOpen ? (openDirection === 'down' ? 'rotate-90' : '-rotate-90') : '-rotate-90'"
/>
</template>
</StyledInput>
</Input>
</div>
<!-- Standard mode: button trigger -->
@@ -213,7 +213,7 @@ import {
watch,
} from 'vue'
import StyledInput from './inputs/StyledInput.vue'
import Input from './inputs/Input.vue'
export interface ComboboxOption<T> {
value: T
@@ -340,7 +340,7 @@ const userHasTyped = ref(false)
const focusedIndex = ref(-1)
const containerRef = ref<HTMLElement>()
const triggerRef = ref<HTMLElement>()
const searchTriggerRef = ref<InstanceType<typeof StyledInput>>()
const searchTriggerRef = ref<InstanceType<typeof Input>>()
const dropdownRef = ref<HTMLElement>()
const optionsScrollbarRef = ref<HTMLElement>()
const optionsContainerRef = ref<HTMLElement>()
@@ -192,7 +192,7 @@
v-if="activeCategory.searchable"
class="flex justify-between border-0 border-b border-solid border-b-surface-5 py-1.5 w-full"
>
<StyledInput
<Input
v-model="categorySearchQuery"
:icon="SearchIcon"
type="text"
@@ -387,7 +387,7 @@ import { computed, nextTick, onBeforeUnmount, ref, watch } from 'vue'
import { useVirtualScroll } from '../../composables/virtual-scroll'
import ButtonStyled from './ButtonStyled.vue'
import MultiSelect, { type MultiSelectItem } from './MultiSelect.vue'
import StyledInput from './inputs/StyledInput.vue'
import Input from './inputs/Input.vue'
export type DropdownFilterBarOption = {
value: string
@@ -12,7 +12,7 @@ import { computed, nextTick, onBeforeUnmount, ref, watch } from 'vue'
import { injectI18nDebug } from '../../composables/i18n-debug'
import ButtonStyled from './ButtonStyled.vue'
import StyledInput from './inputs/StyledInput.vue'
import Input from './inputs/Input.vue'
const debugContext = injectI18nDebug()
@@ -341,7 +341,7 @@ const listMaxHeight = computed(() => `${panelHeight.value - 120}px`)
<div v-if="!minimized" class="flex flex-col overflow-hidden w-full">
<!-- Search -->
<div class="px-3 py-2.5 !w-full">
<StyledInput
<Input
ref="searchInputRef"
v-model="searchQuery"
placeholder="Search keys or values..."
@@ -18,7 +18,7 @@
<slot />
<DropdownIcon class="h-5 w-5 text-secondary" />
<template #menu>
<StyledInput
<Input
v-if="search"
id="search-input"
ref="searchInput"
@@ -74,7 +74,7 @@
import { CheckIcon, DropdownIcon, SearchIcon } from '@modrinth/assets'
import { computed, ref } from 'vue'
import { Button, ButtonStyled, PopoutMenu, StyledInput } from '../index'
import { Button, ButtonStyled, PopoutMenu, Input } from '../index'
import ScrollablePanel from './ScrollablePanel.vue'
type Option = string | number | object
@@ -4,7 +4,7 @@
<label class="label" for="insert-link-label">
<span class="label__title">{{ formatMessage(messages.linkModalLabelFieldTitle) }}</span>
</label>
<StyledInput
<Input
id="insert-link-label"
v-model="linkText"
:icon="AlignLeftIcon"
@@ -18,7 +18,7 @@
{{ formatMessage(messages.urlLabel) }}<span class="required">*</span>
</span>
</label>
<StyledInput
<Input
id="insert-link-url"
v-model="linkUrl"
:icon="LinkIcon"
@@ -78,7 +78,7 @@
{{ formatMessage(messages.imageModalDescriptionFieldDescription) }}
</span>
</label>
<StyledInput
<Input
id="insert-image-alt"
v-model="linkText"
:icon="AlignLeftIcon"
@@ -115,7 +115,7 @@
<UploadIcon />
</FileInput>
</div>
<StyledInput
<Input
v-if="!props.onImageUpload || imageUploadOption === 'link'"
id="insert-link-url"
v-model="linkUrl"
@@ -175,7 +175,7 @@
{{ formatMessage(messages.videoModalUrlFieldDescription) }}
</span>
</label>
<StyledInput
<Input
id="insert-video-url"
v-model="linkUrl"
:icon="YouTubeIcon"
@@ -340,7 +340,7 @@ import ButtonStyled from './ButtonStyled.vue'
import Chips from './Chips.vue'
import FileInput from './FileInput.vue'
import IntlFormatted from './IntlFormatted.vue'
import StyledInput from './inputs/StyledInput.vue'
import Input from './inputs/Input.vue'
import Toggle from './Toggle.vue'
const { formatMessage } = useVIntl()
@@ -127,7 +127,7 @@
v-if="searchable"
class="px-0 py-1.5 border-0 border-solid border-b border-b-surface-5 flex"
>
<StyledInput
<Input
ref="searchInputRef"
v-model="searchQuery"
:icon="SearchIcon"
@@ -414,7 +414,7 @@ import {
} from 'vue'
import { useVirtualScroll } from '../../composables/virtual-scroll'
import StyledInput from './inputs/StyledInput.vue'
import Input from './inputs/Input.vue'
export interface MultiSelectOption<T> {
value: T
@@ -546,7 +546,7 @@ const dropdownRef = ref<HTMLElement>()
const optionsScrollbarRef = ref<HTMLElement>()
const optionsContainerRef = ref<HTMLElement>()
const selectionActionsRef = ref<HTMLElement>()
const searchInputRef = ref<InstanceType<typeof StyledInput>>()
const searchInputRef = ref<InstanceType<typeof Input>>()
const rafId = ref<number | null>(null)
const tagsContainerRef = ref<HTMLElement>()
const optionsOverlayScrollbars = ref<OverlayScrollbarsInstance | null>(null)
+2 -2
View File
@@ -44,7 +44,7 @@
<span> {{ max }} {{ unit }} </span>
</div>
</div>
<StyledInput
<Input
:model-value="String(currentValue)"
type="number"
class="w-24 ml-3"
@@ -60,7 +60,7 @@
<script setup lang="ts">
import { ref, watch } from 'vue'
import StyledInput from './inputs/StyledInput.vue'
import Input from './inputs/Input.vue'
const emit = defineEmits<{ 'update:modelValue': [number] }>()
+3 -3
View File
@@ -102,9 +102,9 @@ export {
DatePicker,
InputClearButton,
InputFrame,
NativeDateInput,
StyledInput,
StyledTextarea,
DateInput,
Input,
Textarea,
} from './inputs'
export type { InputAppearance, InputSize } from './inputs'
export type { SortDirection, TableColumn } from './Table.vue'
@@ -1,7 +1,7 @@
export { default as DatePicker } from './DatePicker.vue'
export { default as InputClearButton } from './InputClearButton.vue'
export { default as InputFrame } from './InputFrame.vue'
export { default as NativeDateInput } from './NativeDateInput.vue'
export { default as StyledInput } from './StyledInput.vue'
export { default as StyledTextarea } from './StyledTextarea.vue'
export { default as DateInput } from './DateInput.vue'
export { default as Input } from './Input.vue'
export { default as Textarea } from './Textarea.vue'
export type { InputAppearance, InputSize } from './types'
@@ -60,7 +60,7 @@
<div v-if="!existingSubscription">
<p class="my-2 text-lg font-bold">Configure your server</p>
<div class="flex flex-col gap-4">
<StyledInput v-model="serverName" placeholder="Server name" :maxlength="48" />
<Input v-model="serverName" placeholder="Server name" :maxlength="48" />
<!-- <DropdownSelect
v-model="serverLoader"
v-tooltip="'Select the mod loader for your server'"
@@ -136,7 +136,7 @@
>
<div class="flex flex-col w-full gap-2">
<div class="font-semibold">Shared CPUs</div>
<StyledInput :model-value="sharedCpus" disabled wrapper-class="w-full" />
<Input :model-value="sharedCpus" disabled wrapper-class="w-full" />
</div>
<div class="flex flex-col w-full gap-2">
<div class="font-semibold flex items-center gap-1">
@@ -148,7 +148,7 @@
class="h-4 w-4text-secondary opacity-60"
/>
</div>
<StyledInput
<Input
:model-value="mutatedProduct.metadata.cpu"
disabled
wrapper-class="w-full"
@@ -156,7 +156,7 @@
</div>
<div class="flex flex-col w-full gap-2">
<div class="font-semibold">Storage</div>
<StyledInput
<Input
v-model="customServerConfig.storageGbFormatted"
disabled
wrapper-class="w-full"
@@ -477,7 +477,7 @@ import Admonition from '../base/Admonition.vue'
import Checkbox from '../base/Checkbox.vue'
import Combobox from '../base/Combobox.vue'
import Slider from '../base/Slider.vue'
import StyledInput from '../base/inputs/StyledInput.vue'
import Input from '../base/inputs/Input.vue'
import AnimatedLogo from '../brand/AnimatedLogo.vue'
import NewModal from '../modal/NewModal.vue'
import LoaderIcon from '../servers/icons/LoaderIcon.vue'
@@ -10,7 +10,7 @@ import { defineMessages, useVIntl } from '../../composables/i18n'
import { injectModrinthClient } from '../../providers/api-client'
import AutoLink from '../base/AutoLink.vue'
import Avatar from '../base/Avatar.vue'
import StyledInput from '../base/inputs/StyledInput.vue'
import Input from '../base/inputs/Input.vue'
const { formatMessage } = useVIntl()
const { formatCompactNumber } = useCompactNumber()
@@ -105,7 +105,7 @@ const messages = defineMessages({
<div
class="flex flex-col bg-surface-2 border-0 border-l border-solid border-surface-4 overflow-hidden"
>
<StyledInput
<Input
v-if="(projects?.length ?? 0) > 5"
v-model="query"
:placeholder="formatMessage(messages.searchPlaceholder)"
@@ -3,7 +3,7 @@ import type { Labrinth } from '@modrinth/api-client'
import { CheckIcon, PlusIcon, SearchIcon, SpinnerIcon, XIcon } from '@modrinth/assets'
import { computed, nextTick, ref } from 'vue'
import { ButtonStyled, NewModal, StyledInput } from '#ui/components'
import { ButtonStyled, NewModal, Input } from '#ui/components'
import { commonMessages } from '#ui/utils'
import { defineMessages, useVIntl } from '../../composables/i18n'
@@ -189,7 +189,7 @@ defineExpose({ show, hide })
<p class="text-secondary m-0">
{{ formatMessage(messages.addFilesModalDescription) }}
</p>
<StyledInput
<Input
ref="searchInputRef"
v-model="searchQuery"
type="text"
@@ -4,7 +4,7 @@ import { PlusIcon, SearchIcon, SpinnerIcon, XIcon } from '@modrinth/assets'
import { useMutation } from '@tanstack/vue-query'
import { computed, ref, useTemplateRef } from 'vue'
import { Accordion, ButtonStyled, NewModal, StyledInput } from '#ui/components'
import { Accordion, ButtonStyled, NewModal, Input } from '#ui/components'
import { injectModrinthClient, injectNotificationManager } from '../../providers'
import AttributionGroupFilePicker from './AttributionGroupFilePicker.vue'
@@ -44,7 +44,7 @@ const { addNotification } = injectNotificationManager()
const modalRef = useTemplateRef<InstanceType<typeof NewModal>>('modalRef')
const searchAccordionRef = useTemplateRef<InstanceType<typeof Accordion>>('searchAccordionRef')
const filesAccordionRef = useTemplateRef<InstanceType<typeof Accordion>>('filesAccordionRef')
const searchInputRef = useTemplateRef<InstanceType<typeof StyledInput>>('searchInputRef')
const searchInputRef = useTemplateRef<InstanceType<typeof Input>>('searchInputRef')
const query = ref('')
const isLoading = ref(false)
@@ -217,7 +217,7 @@ defineExpose({ show, hide })
class="flex flex-wrap gap-2 shrink-0 p-4 bg-surface-3 border-0 border-b border-solid border-surface-5"
@submit.prevent="executeSearch"
>
<StyledInput
<Input
ref="searchInputRef"
v-model="query"
:icon="SearchIcon"
@@ -10,8 +10,8 @@ import {
Combobox,
type ComboboxOption,
NewModal,
StyledInput,
StyledTextarea,
Input,
Textarea,
} from '#ui/components'
import { injectModrinthClient, injectNotificationManager } from '../../providers'
@@ -150,7 +150,7 @@ defineExpose({ show, hide })
<div class="flex flex-col gap-4">
<div class="flex flex-col gap-2">
<label class="font-semibold text-contrast" for="add-global-title">Title</label>
<StyledInput
<Input
id="add-global-title"
v-model="title"
type="text"
@@ -159,7 +159,7 @@ defineExpose({ show, hide })
</div>
<div class="flex flex-col gap-2">
<label class="font-semibold text-contrast" for="add-global-link">Link</label>
<StyledInput
<Input
id="add-global-link"
v-model="link"
type="text"
@@ -171,7 +171,7 @@ defineExpose({ show, hide })
<label class="font-semibold text-contrast" for="add-global-flame-id">
CurseForge project ID
</label>
<StyledInput
<Input
id="add-global-flame-id"
v-model="flameProjectId"
type="text"
@@ -194,7 +194,7 @@ defineExpose({ show, hide })
</div>
<div class="flex flex-col gap-2">
<label class="font-semibold text-contrast" for="add-global-proof">Proof or notes</label>
<StyledTextarea
<Textarea
id="add-global-proof"
v-model="proof"
input-class="min-h-[6rem]"
@@ -19,8 +19,8 @@ import {
Chips,
Combobox,
type ComboboxOption,
StyledInput,
StyledTextarea,
Input,
Textarea,
} from '#ui/components'
import { FileInput } from '#ui/components/base'
import { commonMessages } from '#ui/utils'
@@ -481,7 +481,7 @@ function cancelEditing() {
<span class="text-contrast font-semibold mt-1">
{{ formatMessage(messages.linkLabel) }}
</span>
<StyledInput
<Input
v-model="linkInput"
type="text"
class="max-w-[40rem]"
@@ -522,7 +522,7 @@ function cancelEditing() {
)
}}
</span>
<StyledInput
<Input
v-model="customLicenseInput"
type="text"
class="max-w-[40rem]"
@@ -549,7 +549,7 @@ function cancelEditing() {
formatMessage(selectedPermissionReason.notesDescription)
}}</span>
</div>
<StyledTextarea
<Textarea
v-model="notesInput"
resize="both"
:rows="notesInputRows"
@@ -30,8 +30,8 @@ import {
injectProjectPageContext,
} from '../../providers'
import type { QuickReply } from '../../providers/attribution-moderation'
import StyledInput from '../base/inputs/StyledInput.vue'
import StyledTextarea from '../base/inputs/StyledTextarea.vue'
import Input from '../base/inputs/Input.vue'
import Textarea from '../base/inputs/Textarea.vue'
import AddFilesToAttributionGroupModal from './AddFilesToAttributionGroupModal.vue'
import AddToExistingExternalProjectModal from './AddToExistingExternalProjectModal.vue'
import AddToGlobalPermissionsDatabaseModal from './AddToGlobalPermissionsDatabaseModal.vue'
@@ -708,7 +708,7 @@ const visibleQuickReplies = computed<OverflowMenuOption[]>(() => {
</div>
</template>
<template v-else>
<StyledTextarea
<Textarea
v-model="reviewReasonInput"
placeholder="Explanation of review (optional)"
class="mt-3"
@@ -22,7 +22,7 @@
<!-- Instance-specific: Name field -->
<div v-if="ctx.flowType === 'instance'" class="flex flex-col gap-2">
<span class="font-semibold text-contrast">{{ formatMessage(messages.nameLabel) }}</span>
<StyledInput
<Input
v-model="ctx.instanceName.value"
:placeholder="ctx.autoInstanceName.value || formatMessage(messages.instanceNamePlaceholder)"
/>
@@ -162,7 +162,7 @@ import Chips from '../../../base/Chips.vue'
import Collapsible from '../../../base/Collapsible.vue'
import Combobox, { type ComboboxOption } from '../../../base/Combobox.vue'
import PaperChannelBadge from '../../../base/PaperChannelBadge.vue'
import StyledInput from '../../../base/inputs/StyledInput.vue'
import Input from '../../../base/inputs/Input.vue'
import type { LoaderVersionEntry, LoaderVersionType } from '../creation-flow-context'
import { injectCreationFlowContext } from '../creation-flow-context'
import { formatLoaderLabel } from '../shared'
@@ -5,7 +5,7 @@
class="flex flex-col gap-2"
>
<span class="font-semibold text-contrast">{{ formatMessage(messages.worldNameLabel) }}</span>
<StyledInput
<Input
v-model="worldName"
:placeholder="formatMessage(messages.worldNamePlaceholder)"
/>
@@ -69,7 +69,7 @@
</template>
</IntlFormatted>
</span>
<StyledInput
<Input
v-model="worldSeed"
:placeholder="formatMessage(messages.worldSeedPlaceholder)"
/>
@@ -107,7 +107,7 @@
:options="generatorSettingsOptions"
:placeholder="formatMessage(messages.generatorSettingsPlaceholder)"
/>
<StyledTextarea
<Textarea
v-if="generatorSettingsMode === 'custom'"
v-model="generatorSettingsCustom"
:rows="4"
@@ -143,8 +143,8 @@ import { injectTags } from '../../../../providers'
import Accordion from '../../../base/Accordion.vue'
import Chips from '../../../base/Chips.vue'
import Combobox, { type ComboboxOption } from '../../../base/Combobox.vue'
import StyledInput from '../../../base/inputs/StyledInput.vue'
import StyledTextarea from '../../../base/inputs/StyledTextarea.vue'
import Input from '../../../base/inputs/Input.vue'
import Textarea from '../../../base/inputs/Textarea.vue'
import Toggle from '../../../base/Toggle.vue'
import type { Difficulty, Gamemode, GeneratorSettingsMode } from '../creation-flow-context'
import { injectCreationFlowContext } from '../creation-flow-context'
@@ -21,7 +21,7 @@
</template>
<template v-else>
<!-- Search -->
<StyledInput
<Input
v-if="ctx.importLaunchers.value.length > 0"
v-model="ctx.importSearchQuery.value"
:icon="SearchIcon"
@@ -88,7 +88,7 @@
<FolderSearchIcon />
</button>
</ButtonStyled>
<StyledInput
<Input
v-model="newLauncherPath"
:placeholder="formatMessage(messages.launcherPathPlaceholder)"
class="flex-1"
@@ -113,7 +113,7 @@ import type { ImportableLauncher } from '../../../../providers/instance-import'
import ButtonStyled from '../../../base/ButtonStyled.vue'
import Checkbox from '../../../base/Checkbox.vue'
import Collapsible from '../../../base/Collapsible.vue'
import StyledInput from '../../../base/inputs/StyledInput.vue'
import Input from '../../../base/inputs/Input.vue'
import { injectCreationFlowContext } from '../creation-flow-context'
const ctx = injectCreationFlowContext()
@@ -23,7 +23,7 @@
<span class="italic font-bold">{{ confirmationText }}</span> below:
</span>
</label>
<StyledInput
<Input
v-if="hasToType"
id="confirmation"
v-model="confirmation_typed"
@@ -54,7 +54,7 @@ import { renderString } from '@modrinth/utils'
import { computed, ref } from 'vue'
import ButtonStyled from '../base/ButtonStyled.vue'
import StyledInput from '../base/inputs/StyledInput.vue'
import Input from '../base/inputs/Input.vue'
import NewModal from './NewModal.vue'
const props = defineProps({
@@ -14,7 +14,7 @@ import { computed, nextTick, ref } from 'vue'
import { injectNotificationManager } from '#ui/providers'
import { ButtonStyled, NewModal, StyledTextarea } from '../index'
import { ButtonStyled, NewModal, Textarea } from '../index'
const props = defineProps({
header: {
@@ -167,7 +167,7 @@ defineExpose({
</button>
</ButtonStyled>
</div>
<StyledTextarea
<Textarea
v-else
v-model="content"
resize="vertical"
@@ -185,7 +185,7 @@ defineExpose({
</button>
</ButtonStyled>
</template>
</StyledTextarea>
</Textarea>
<div
v-if="link || socialButtons"
:class="['flex flex-col justify-center gap-2', link ? 'w-64 max-w-full' : 'flex-grow']"

Some files were not shown because too many files have changed in this diff Show More