@farm-investimentos/front-mfe-components 15.8.3 → 15.8.4
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/dist/front-mfe-components.common.js +170 -152
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +1 -1
- package/dist/front-mfe-components.umd.js +170 -152
- package/dist/front-mfe-components.umd.js.map +1 -1
- package/dist/front-mfe-components.umd.min.js +1 -1
- package/dist/front-mfe-components.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +1 -1
- package/src/components/DatePicker/DatePicker.stories.js +12 -6
- package/src/components/DatePicker/DatePicker.vue +8 -0
- package/src/components/RangeDatePicker/RangeDatePicker.stories.js +12 -0
- package/src/components/RangeDatePicker/RangeDatePicker.vue +8 -0
package/package.json
CHANGED
|
@@ -85,11 +85,11 @@ export const OnlyAllowedDates = () => ({
|
|
|
85
85
|
},
|
|
86
86
|
props: {
|
|
87
87
|
allowedDates: {
|
|
88
|
-
default: () =>
|
|
88
|
+
default: () => value => {
|
|
89
89
|
const day = parseInt(value.split('-')[2], 10);
|
|
90
90
|
return [5, 10, 15, 20, 25].includes(day);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
93
|
},
|
|
94
94
|
template: `<div style='max-width: 320px'><farm-input-datepicker position="bottom" :allowed-dates="allowedDates" inputId="input-custom-id-1" v-model="date" /></div>`,
|
|
95
95
|
});
|
|
@@ -98,7 +98,7 @@ export const WithInitialMonth = () => ({
|
|
|
98
98
|
data() {
|
|
99
99
|
return {
|
|
100
100
|
date: '',
|
|
101
|
-
pickerDate: '2023-01'
|
|
101
|
+
pickerDate: '2023-01',
|
|
102
102
|
};
|
|
103
103
|
},
|
|
104
104
|
template: `<div style='max-width: 320px'>
|
|
@@ -140,10 +140,16 @@ export const MultipleDates = () => ({
|
|
|
140
140
|
computed: {
|
|
141
141
|
dates() {
|
|
142
142
|
return this.date.join(' /// ');
|
|
143
|
-
}
|
|
143
|
+
},
|
|
144
144
|
},
|
|
145
145
|
template: `<div style='max-width: 320px'>
|
|
146
146
|
<farm-input-datepicker inputId="input-custom-id-0" v-model="date" multiple />
|
|
147
147
|
{{ dates }}
|
|
148
148
|
</div>`,
|
|
149
|
-
});
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
export const Disabled = () => ({
|
|
152
|
+
template: `<div style='max-width: 320px'>
|
|
153
|
+
<farm-input-datepicker :disabled="true" value="2021-08-01" inputId="input-custom-id-3"/>
|
|
154
|
+
</div>`,
|
|
155
|
+
});
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
:mask="`${isReadonly ? '' : '##/##/####'}`"
|
|
52
52
|
:id="inputId"
|
|
53
53
|
:rules="rules"
|
|
54
|
+
:disabled="disabled"
|
|
54
55
|
@keyup="keyUpInput"
|
|
55
56
|
/>
|
|
56
57
|
</template>
|
|
@@ -138,6 +139,13 @@ export default defineComponent({
|
|
|
138
139
|
type: Boolean,
|
|
139
140
|
default: false,
|
|
140
141
|
},
|
|
142
|
+
/**
|
|
143
|
+
* Disabled field
|
|
144
|
+
*/
|
|
145
|
+
disabled: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
default: false,
|
|
148
|
+
},
|
|
141
149
|
},
|
|
142
150
|
data() {
|
|
143
151
|
const s = this.formatDateRange(this.value);
|
|
@@ -81,3 +81,15 @@ export const Reset = () => ({
|
|
|
81
81
|
</farm-btn>
|
|
82
82
|
</div>`,
|
|
83
83
|
});
|
|
84
|
+
|
|
85
|
+
export const disabled = () => ({
|
|
86
|
+
data() {
|
|
87
|
+
return {
|
|
88
|
+
date: ['2023-08-01', '2023-08-05'],
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
template: `<div style='max-width: 320px'>
|
|
92
|
+
<RangeDatePicker disabled inputId="input-custom-id" :value="date" />
|
|
93
|
+
date: {{ date }}
|
|
94
|
+
</div>`,
|
|
95
|
+
});
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
:id="inputId"
|
|
50
50
|
:mask="`${readonly ? [''] : ['##/##/####' + ' a ' + '##/##/####']}`"
|
|
51
51
|
:rules="[checkDateValid, checkRequire]"
|
|
52
|
+
:disabled="disabled"
|
|
52
53
|
@keyup="keyUpInput"
|
|
53
54
|
/>
|
|
54
55
|
</template>
|
|
@@ -115,6 +116,13 @@ export default defineComponent({
|
|
|
115
116
|
type: Boolean,
|
|
116
117
|
default: false,
|
|
117
118
|
},
|
|
119
|
+
/**
|
|
120
|
+
* Disabled field
|
|
121
|
+
*/
|
|
122
|
+
disabled: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: false,
|
|
125
|
+
},
|
|
118
126
|
},
|
|
119
127
|
data() {
|
|
120
128
|
const s = this.formatDateRange(this.value);
|