Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio committed Sep 27, 2024
1 parent 74a0ff4 commit c82de4a
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 98 deletions.
12 changes: 0 additions & 12 deletions resources/js/Components/Form/AddressLookup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,6 @@
type: String,
default: null,
},
options: {
type: Array,
default: () => [],
},
optionValueKey: {
type: String,
default: 'value',
},
optionLabelKey: {
type: String,
default: 'label',
},
modelValue: {
type: String,
default: null,
Expand Down
22 changes: 0 additions & 22 deletions resources/js/Components/Form/AutoComplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

<script setup>
import { computed, ref } from 'vue';
import { CheckIcon } from '@heroicons/vue/16/solid';
import AutoComplete from 'primevue/autocomplete';
import FormField from '@/Components/Form/Field.vue';
Expand All @@ -31,18 +30,6 @@
type: String,
default: null,
},
options: {
type: Array,
default: () => [],
},
optionValueKey: {
type: String,
default: 'value',
},
optionLabelKey: {
type: String,
default: 'label',
},
modelValue: {
type: String,
default: null,
Expand All @@ -55,15 +42,6 @@
const emit = defineEmits(['update:modelValue']);
const getOption = (option, key) => (option.hasOwnProperty(key) ? option[key] : option);
const options = computed(() =>
props.options.map((option) => ({
value: getOption(option, props.optionValueKey),
label: getOption(option, props.optionLabelKey),
}))
);
const modelValue = computed({
get: () => props.modelValue,
set: (value) => emit('update:modelValue', value),
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Components/Form/Checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div
class="flex items-center justify-center w-4 h-4 my-0.5 border border-gray-300 bg-white text-white rounded peer-checked:border-transparent peer-disabled:bg-gray-400 peer-disabled:select-none peer-disabled:pointer-events-none peer-disabled:cursor-default peer-focus-visible:z-10 peer-focus-visible:outline-none peer-focus-visible:outline-offset-0 peer-focus-visible:ring-1 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-primary-500 peer-checked:ring-primary-700 peer-checked:bg-primary-700"
>
<CheckIcon />
<CheckIcon class="w-full h-full" />
</div>

<span v-if="label" class="text-sm font-medium text-gray-700" v-text="label" />
Expand Down
12 changes: 0 additions & 12 deletions resources/js/Components/Form/FileUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,6 @@
type: String,
default: null,
},
options: {
type: Array,
default: () => [],
},
optionValueKey: {
type: String,
default: 'value',
},
optionLabelKey: {
type: String,
default: 'label',
},
modelValue: {
type: [Array],
default: () => [],
Expand Down
25 changes: 0 additions & 25 deletions resources/js/Components/Form/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<InputText
:type="type"
v-model="modelValue"
:options="options"
optionValue="value"
optionLabel="label"
class="w-full"
:invalid="invalid"
:placeholder="placeholder"
Expand All @@ -20,7 +17,6 @@

<script setup>
import { computed } from 'vue';
import { CheckIcon } from '@heroicons/vue/16/solid';
import InputText from 'primevue/inputtext';
import FormField from '@/Components/Form/Field.vue';
Expand Down Expand Up @@ -57,18 +53,6 @@
type: String,
default: null,
},
options: {
type: Array,
default: () => [],
},
optionValueKey: {
type: String,
default: 'value',
},
optionLabelKey: {
type: String,
default: 'label',
},
modelValue: {
type: [Array, String, Number],
default: null,
Expand All @@ -81,15 +65,6 @@
const emit = defineEmits(['update:modelValue']);
const getOption = (option, key) => (option.hasOwnProperty(key) ? option[key] : option);
const options = computed(() =>
props.options.map((option) => ({
value: getOption(option, props.optionValueKey),
label: getOption(option, props.optionLabelKey),
}))
);
const modelValue = computed({
get: () => props.modelValue,
set: (value) => emit('update:modelValue', value),
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Components/Form/MaterialsChecklist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
'border-red-500': invalid,
}"
>
<component :is="!remove ? CheckIcon : XMarkIcon" />
<component :is="!remove ? CheckIcon : XMarkIcon" class="w-full h-full" />
</div>

<span
Expand Down
1 change: 0 additions & 1 deletion resources/js/Components/Form/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

<script setup>
import { computed, ref } from 'vue';
import { CheckIcon } from '@heroicons/vue/16/solid';
import Select from 'primevue/select';
import FormField from '@/Components/Form/Field.vue';
Expand Down
24 changes: 0 additions & 24 deletions resources/js/Components/Form/Textarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
<Textarea
:rows="rows"
v-model="modelValue"
:options="options"
optionValue="value"
optionLabel="label"
class="w-full"
:invalid="invalid"
:placeholder="placeholder"
Expand Down Expand Up @@ -63,18 +60,6 @@
type: String,
default: 'bottom',
},
options: {
type: Array,
default: () => [],
},
optionValueKey: {
type: String,
default: 'value',
},
optionLabelKey: {
type: String,
default: 'label',
},
modelValue: {
type: [Array, String, Number],
default: null,
Expand All @@ -87,15 +72,6 @@
const emit = defineEmits(['update:modelValue']);
const getOption = (option, key) => (option.hasOwnProperty(key) ? option[key] : option);
const options = computed(() =>
props.options.map((option) => ({
value: getOption(option, props.optionValueKey),
label: getOption(option, props.optionLabelKey),
}))
);
const modelValue = computed({
get: () => props.modelValue,
set: (value) => emit('update:modelValue', value),
Expand Down

0 comments on commit c82de4a

Please sign in to comment.