Skip to content

Commit a3205ed

Browse files
committed
fixup! refactor(ui): migrate TextInput to @perd-ui package
1 parent 340532a commit a3205ed

11 files changed

Lines changed: 22 additions & 207 deletions

File tree

app/components/ComboBox/ComboBox.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ref="rootRef"
44
:class="$style.component"
55
>
6-
<TextInput
6+
<PerdInput
77
:required="required"
88
:model-value="inputValue"
99
:label="label"
@@ -43,7 +43,7 @@
4343
<script lang="ts" setup>
4444
import { onClickOutside } from '@vueuse/core';
4545
import FidgetSpinner from '../FidgetSpinner.vue';
46-
import TextInput from '../inputs/TextInput.vue';
46+
import PerdInput from '../inputs/PerdInput.vue';
4747
4848
interface Option {
4949
readonly label: string;

app/components/PerdInput.vue

Lines changed: 0 additions & 189 deletions
This file was deleted.

app/components/brands/EditBrandForm.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@submit.prevent="onSubmit"
66
>
77
<div :class="$style.inputs">
8-
<TextInput
8+
<PerdInput
99
label="Name"
1010
placeholder="The West Pace"
1111
v-model.trim="name"
@@ -14,7 +14,7 @@
1414
autofocus
1515
/>
1616

17-
<TextInput
17+
<PerdInput
1818
label="Website URL"
1919
placeholder="https://perd.dev"
2020
type="url"
@@ -44,7 +44,7 @@
4444

4545
<script lang="ts" setup>
4646
import PerdButton from '~/components/PerdButton.vue'
47-
import TextInput from '../inputs/TextInput.vue';
47+
import PerdInput from '../inputs/PerdInput.vue';
4848
4949
interface Props {
5050
readonly submitting: boolean;

app/components/dialogs/InputDialog.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
{{ headerText }}
1010
</div>
1111

12-
<TextInput
13-
label="Equipment type"
12+
<PerdInput
13+
:label="inputLabel"
1414
required
1515
autofocus
1616
ref="textInputRef"
@@ -38,10 +38,11 @@
3838

3939
<script lang="ts" setup>
4040
import PerdButton from '~/components/PerdButton.vue'
41-
import TextInput from '~/components/inputs/TextInput.vue';
41+
import PerdInput from '~/components/inputs/PerdInput.vue';
4242
import ModalDialog from './ModalDialog.vue'
4343
4444
interface Props {
45+
readonly inputLabel: string;
4546
readonly headerText: string;
4647
readonly placeholder: string;
4748
readonly addButtonText: string;

app/components/dialogs/ModalDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
5252
&[open] {
5353
opacity: 1;
54-
translate: 0 0;
54+
translate: 0 0;
5555
5656
@starting-style {
5757
opacity: 0;

app/components/equipment/EditEquipmentForm.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@search="onBrandSearch"
2020
/>
2121

22-
<TextInput
22+
<PerdInput
2323
required
2424
autocomplete="off"
2525
label="Name"
@@ -35,7 +35,7 @@
3535
:class="$style.description"
3636
/>
3737

38-
<TextInput
38+
<PerdInput
3939
required
4040
autocomplete="off"
4141
label="Weight"
@@ -92,7 +92,7 @@
9292
import PerdSelect, { type SelectOption } from '~/components/PerdSelect.vue';
9393
import PerdTextArea from '~/components/PerdTextArea.vue';
9494
import ComboBox from '~/components/ComboBox/ComboBox.vue';
95-
import TextInput from '../inputs/TextInput.vue';
95+
import PerdInput from '../inputs/PerdInput.vue';
9696
9797
export interface Brand {
9898
readonly value: string;

app/components/equipment/SearchInput.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<TextInput
2+
<PerdInput
33
clearable
44
v-model.trim="model"
55
label="Search"
@@ -11,7 +11,7 @@
1111
</template>
1212

1313
<script lang="ts" setup>
14-
import TextInput from '../inputs/TextInput.vue';
14+
import PerdInput from '../inputs/PerdInput.vue';
1515
1616
interface Props {
1717
readonly loading?: boolean;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
2-
<TextInput v-bind="props" />
2+
<PerdInput v-bind="props" />
33
</template>
44

55
<script lang="ts" setup>
6-
import TextInput, { type TextInputProps } from '@perd-ui/text-input'
6+
import PerdInput, { type TextInputProps as PerdInputProps } from '@perd-ui/text-input'
77
import '@perd-ui/text-input/style.css'
88
9-
const props = defineProps<TextInputProps>()
9+
const props = defineProps<PerdInputProps>()
1010
</script>

app/pages/checklists/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111

1212
<InputDialog
1313
v-model="isDialogOpened"
14+
input-label="Checklist name"
1415
header-text="Create checklist"
15-
placeholder="Checklist name"
16+
placeholder="My checklist"
1617
add-button-text="Create"
1718
:maxlength="limits.maxChecklistNameLength"
1819
@submit="createChecklist"

app/pages/manager/equipment/groups.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<InputDialog
4141
v-model="isAddDialogOpen"
4242
header-text="Add equipment group"
43+
input-label="Group name"
4344
placeholder="Essentials"
4445
add-button-text="Add group"
4546
:maxlength="limits.maxEquipmentGroupNameLength"

0 commit comments

Comments
 (0)