@a-vision-software/vue-input-components 1.4.3 → 1.4.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a-vision-software/vue-input-components",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "A collection of reusable Vue 3 input components with TypeScript support",
5
5
  "author": "A-Vision Software",
6
6
  "license": "MIT",
@@ -85,4 +85,4 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  }
88
- }
88
+ }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <Teleport to="body">
3
3
  <transition name="modal-fade">
4
- <div v-if="modelValue" class="modal-backdrop">
4
+ <div v-if="modelValue" class="modal-backdrop" :class="modalClass">
5
5
  <div class="modal" :style="modalStyle" role="dialog" aria-labelledby="modalTitle"
6
6
  aria-describedby="modalContent">
7
7
  <div v-if="props.isLargeIcon && props.icon" class="modal-large-icon">
@@ -39,6 +39,7 @@ import { ModalProps, ModalEmits } from '../types/modal'
39
39
 
40
40
  const props = withDefaults(defineProps<ModalProps>(), {
41
41
  modelValue: false,
42
+ class: '',
42
43
  title: '',
43
44
  minWidth: '300px',
44
45
  maxWidth: '800px',
@@ -115,12 +115,12 @@ const formatDateForModel = (date: Date | null): string => {
115
115
  const day = String(date.getDate()).padStart(2, '0')
116
116
  const month = String(date.getMonth() + 1).padStart(2, '0')
117
117
  const year = date.getFullYear()
118
- return `${day}/${month}/${year}`
118
+ return `${year}-${month}-${day}`
119
119
  }
120
120
 
121
121
  const parseDateFromModel = (dateStr: string): Date | null => {
122
122
  if (!dateStr) return null
123
- const [day, month, year] = dateStr.split('/').map(Number)
123
+ const [year, month, day] = dateStr.split('-').map(Number)
124
124
  return new Date(year, month - 1, day)
125
125
  }
126
126
 
@@ -210,7 +210,7 @@ onUnmounted(() => {
210
210
  })
211
211
 
212
212
  onMounted(() => {
213
- id.value = `text-input-${Math.random().toString(36).substr(2, 9)}`
213
+ id.value = `text-input-${Math.random().toString(36).substring(2, 9)}`
214
214
  if (props.type === 'date' && props.modelValue) {
215
215
  dateValue.value = parseDateFromModel(props.modelValue)
216
216
  }
@@ -1,5 +1,6 @@
1
1
  export interface ModalProps {
2
2
  modelValue: boolean
3
+ modalClass?: string
3
4
  title?: string
4
5
  minWidth?: string
5
6
  maxWidth?: string
@@ -9,7 +9,7 @@
9
9
 
10
10
  <Action label="Open Basic Modal" @click="showBasicModal = true" />
11
11
 
12
- <Modal v-model="showBasicModal" title="Basic Modal Example" icon="info-circle">
12
+ <Modal v-model="showBasicModal" title="Basic Modal Example" icon="info-circle" modal-class="basic-modal">
13
13
  <p>This is a basic modal example with default styling.</p>
14
14
  <p>The modal can be closed by clicking the X button in the top right corner.</p>
15
15
  </Modal>